import{P as ie,Q as ue,S as ce,n as Ce,b as he,e as ba,f as V,W as ut,p as Me,al as Ta,aW as Oa,c as wa,i as de,w as xe,d as ze,a3 as Fe,m as Se,an as _a,aA as Ra,k as Pa,aX as Ca,aY as Na,ax as et,ac as Re,h as Ge,Z as ke,aZ as Va,am as Aa,a_ as Ha,$ as tt,a0 as We,g as oe,O as Oe,Y as ct,l as Ka}from"./index.a0309a28.js";import{d as Y,c as g,j as K,w as ve,t as we,i as qa,n as Xe,o as Ye,aI as r,aV as ne,aY as Xa,aK as je,aW as Fa,a_ as Za,a$ as Ga,b0 as Wa,aZ as Ya,b as Ja,aU as at,h as Qa}from"./arco.b087a425.js";import{l as Pe,b as nt,a as en,e as tn,i as an,C as nn,B as Sa}from"./index.e1e291ce.js";import{o as ln,e as rn,v as on,w as un,T as Je,x as cn,f as sn,n as vn,y as dn,l as fn,u as gn,z as mn,r as pn}from"./dep-71c4f289.8a8673b4.js";import{a as hn}from"./slot.ff9cd5b8.js";import{L as lt}from"./index.0cdd9cfb.js";import{S as st}from"./index.e8fb17a9.js";import{_ as vt,r as Ae}from"./form-model.7bb64fbd.js";import{D as yn}from"./index.9bcc2d7d.js";function dt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function ft(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-delete",l.value]),c=g(()=>ft(ft({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(bn,i.value)}});const ja=On;function gt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function mt(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-download",l.value]),c=g(()=>mt(mt({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(wn,i.value)}});const Pn=_n;function pt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function ht(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-file-excel",l.value]),c=g(()=>ht(ht({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Cn,i.value)}});const Sn=Fn;function yt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function bt(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-file-pdf",l.value]),c=g(()=>bt(bt({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(jn,i.value)}});const In=xn;function Ot(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function wt(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-file-powerpoint",l.value]),c=g(()=>wt(wt({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Dn,i.value)}});const Un=En;function _t(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function Pt(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-file-word",l.value]),c=g(()=>Pt(Pt({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(zn,i.value)}});const Ln=kn;function Ct(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function Ft(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-file",l.value]),c=g(()=>Ft(Ft({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Bn,i.value)}});const $n=Mn;function St(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function jt(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-image-error",l.value]),c=g(()=>jt(jt({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Tn,i.value)}});const xa=Rn;function xt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function It(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-image",l.value]),c=g(()=>It(It({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Nn,i.value)}});const Ia=Vn;function Dt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function Et(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-mirror",l.value]),c=g(()=>Et(Et({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(An,i.value)}});const Kn=Hn;function Ut(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function zt(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-refresh",l.value]),c=g(()=>zt(zt({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(qn,i.value)}});const Mr=Xn;function kt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function Lt(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-rotation",l.value]),c=g(()=>Lt(Lt({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Zn,i.value)}});const Wn=Gn;function Bt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function Mt(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-time-filled",l.value]),c=g(()=>Mt(Mt({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Yn,i.value)}});const Da=Jn;function $t(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function Tt(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-upload",l.value]),c=g(()=>Tt(Tt({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Qn,i.value)}});const tl=el;function Rt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function Nt(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-video",l.value]),c=g(()=>Nt(Nt({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(al,i.value)}});const ll=nl;function Vt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function At(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-zoom-in",l.value]),c=g(()=>At(At({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(rl,i.value)}});const il=ol;function Ht(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function Kt(t){for(var e=1;et.size),{className:l,style:o}=ie(n),s=g(()=>["t-icon","t-icon-zoom-out",l.value]),c=g(()=>Kt(Kt({},o.value),a.style)),i=g(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(ul,i.value)}});const sl=cl;/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var vl=/(.png|.jpg|.jpeg|.jpe|.webp|.avif|.svg|.gif|.bmp)/i,dl=/(.png|.jpg|.jpeg|.jpe|.webp|.avif|.svg|.gif|.bmp|.dwg|.dxf|.svf|.tif|.tiff|.arw)/i,fl=/(.pdf)/i,gl=/(.xlsx|.xls|.csv|.xlc|.xlm|.xlt|.xlw)/i,ml=/(.dox|docx|.document|.wps|.wdb|.msword)/i,pl=/(.ppt|.pptx|.key)/i,Ea=/(.avi|.mp4|.wmv|.mpg|.mpeg|.mov|.rm|.ram|.swf|.flv|.rmvb|.flash|.mid|.3gp)/i,hl=/(.mp2|.mp3|.mp4|.ogg|.3gpp|.ac3|.au)/i,qt={"audio/*":hl,"video/*":Ea,"image/*":dl,".ico":/image\/vnd.microsoft.icon/i,".doc":/application\/msword/i,".docx":/application\/vnd.openxmlformats-officedocument.wordprocessingml.document/i,".xls":/application\/vnd.ms-excel/i,".xlsx":/application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet/i,".ppt":/application\/vnd.ms-powerpoint/i,".pptx":/application\/vnd.openxmlformats-officedocument.presentationml.presentation/i,".vsd":/application\/vnd.visio/i,".txt":/text\/plain/i,".abw":/application\/x-abiword/i,".avi":/video\/x-msvideo/i,".azw":/application\/vnd.amazon.ebook/i,".bin":/application\/octet-stream/i,".cda":/application\/x-cdf/i,".mpkg":/application\/vnd.apple.installer+xml/i,".odp":/application\/vnd.oasis.opendocument.presentation/i,".ods":/application\/vnd.oasis.opendocument.spreadsheet/i,".odt":/application\/vnd.oasis.opendocument.text/i,".oga":/audio\/ogg/i,".ogv":/video\/ogg/i,".ogx":/application\/ogg/i},be={B:1,KB:1024,MB:1048576,GB:1073741824};function yl(t){return t=be.KB&&t=be.MB&&t=be.GB?"".concat((t/be.GB).toFixed(1)," GB"):""}function Ua(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=new Date,a=e.getMonth()+1;a=a<10?"0".concat(a):a;var n="".concat(e.getFullYear(),"-").concat(a,"-").concat(e.getDate()),l="".concat(e.getHours(),":").concat(e.getMinutes(),":").concat(e.getSeconds());return t?[n,l].join(" "):n}function Ue(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,n=t,l=0,o=0;if(!n)return"";for(var s=0;ss-a&&o=1024&&t<1048576?"".concat((t/1024).toFixed(1)," KB"):t>=1048576?"".concat((t/1048576).toFixed(1)," MB"):""}function Ol(t,e,a){var n=["B","KB","MB","GB"],l=1,o=n.indexOf(a);o===-1&&(Pe.warn("Upload","`sizeLimit.unit` can only be one of ".concat(n.join())),o=l);var s=be[a];return t>e*s}function wl(t){return new Promise(function(e){if(!t){e("");return}var a=new FileReader;a.readAsDataURL(t),a.onload=function(n){var l;e((l=n.target)===null||l===void 0?void 0:l.result)}})}function _l(t,e,a){var n=e||a;if(!t)return!0;if(!n)return!1;for(var l=t.split(",").map(function(v){return v.trim()}),o=0,s=l.length;o1&&arguments[1]!==void 0?arguments[1]:"",a=[],n=0;n"u"||!t)){var e=window.getComputedStyle(t),a=e.getPropertyValue("box-sizing")||e.getPropertyValue("-moz-box-sizing")||e.getPropertyValue("-webkit-box-sizing"),n=parseFloat(e.getPropertyValue("padding-bottom"))+parseFloat(e.getPropertyValue("padding-top")),l=parseFloat(e.getPropertyValue("border-bottom-width"))+parseFloat(e.getPropertyValue("border-top-width")),o=Cl.map(function(s){return"".concat(s,":").concat(e.getPropertyValue(s))}).join(";");return{sizingStyle:o,paddingSize:n,borderSize:l,boxSizing:a}}}function Xt(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;pe||(pe=document.createElement("textarea"),document.body.appendChild(pe));var n=Fl(t),l=n.paddingSize,o=n.borderSize,s=n.boxSizing,c=n.sizingStyle;pe.setAttribute("style","".concat(c,";").concat(Pl)),pe.value=t.value||t.placeholder||"";var i=pe.scrollHeight,v={};s==="border-box"?i+=o:s==="content-box"&&(i-=l),pe.value="";var u=pe.scrollHeight-l;if(e!==null){var h=u*e;s==="border-box"&&(h=h+l+o),i=Math.max(h,i),v.minHeight="".concat(h,"px")}if(a!==null){var _=u*a;s==="border-box"&&(_=_+l+o),i=Math.min(_,i)}return v.height="".concat(i,"px"),pe.parentNode&&pe.parentNode.removeChild(pe),pe=null,v}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Sl={allowInputOverMax:{type:Boolean,default:!1},autofocus:Boolean,autosize:{type:[Boolean,Object],default:!1},disabled:{type:Boolean,default:void 0},maxcharacter:{type:Number},maxlength:{type:[Number,String]},name:{type:String,default:""},placeholder:{type:String,default:void 0},readonly:Boolean,status:{type:String,validator:function(e){return["default","success","warning","error"].includes(e)}},tips:{type:[String,Function]},value:{type:[String,Number]},modelValue:{type:[String,Number]},defaultValue:{type:[String,Number]},onBlur:Function,onChange:Function,onFocus:Function,onKeydown:Function,onKeypress:Function,onKeyup:Function,onValidate:Function};/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function Zt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function jl(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:"",F=U.value,E=String(f);!F||F.value!==E&&(F.value=E,S.value=E)},O=function(f){var F=f.target,E=F.value;if(e.maxcharacter&&e.maxcharacter>=0){var R=ut(E,e.maxcharacter);E=Me(R)==="object"&&R.characters}!M.value&&N(E,{e:f}),Xe(function(){return I(E)}),x()},m=function(f){O(f)},C=function(){M.value=!0},q=function(f){M.value=!1,O(f)},H=function(f,F){var E;if(!P.value){var R="on".concat(f[0].toUpperCase()).concat(f.slice(1));(E=e[R])===null||E===void 0||E.call(e,S.value,{e:F})}},G=function(f){H("keydown",f)},L=function(f){H("keyup",f)},T=function(f){H("keypress",f)},z=function(f){var F;x(),!P.value&&(j.value=!0,(F=e.onFocus)===null||F===void 0||F.call(e,S.value,{e:f}))},A=qa(en,void 0),W=function(f){var F;x(),j.value=!1,(F=e.onBlur)===null||F===void 0||F.call(e,S.value,{e:f}),A==null||A.handleBlur()},Q=g(function(){return[s.value,V(V({},"".concat(o.value,"-is-disabled"),P.value),"".concat(o.value,"-is-readonly"),e.readonly)]}),te=g(function(){return Gt({autofocus:e.autofocus,disabled:P.value,readonly:e.readonly,placeholder:e.placeholder,maxlength:!e.allowInputOverMax&&e.maxlength||void 0,name:e.name||void 0})}),le=g(function(){var b=ut(String(S.value||""));return Me(b)==="object"?b.length:b}),ae=g(function(){return{value:[void 0,null].includes(S.value)?void 0:String(S.value),status:e.status,maxlength:Number(e.maxlength),maxcharacter:e.maxcharacter,allowInputOverMax:e.allowInputOverMax,onValidate:e.onValidate}}),k=tn(ae),d=k.tStatus;ve(function(){return S.value},function(){return x()}),ve(U,function(b){!b||x()}),ve(function(){return e.autofocus},function(b){b&&U.value.focus()}),ve($,function(b){var f=n.style;Ta(U.value,Oa(f,b))}),ve(S,function(){Xe(function(){return x()})}),ve(function(){return e.autosize},x,{deep:!0}),l({focus:D,blur:w}),Ye(function(){x()});var y=de();return function(){var b,f=Gt({onFocus:z,onBlur:W,onKeydown:G,onKeyup:L,onKeypress:T}),F=wa(),E=F.STATUS,R=g(function(){return["".concat(s.value,"__inner"),V(V(V(V({},"".concat(o.value,"-is-").concat(d.value),d.value),E.value.disabled,P.value),E.value.focused,j.value),"".concat(o.value,"-resize-none"),Me(e.autosize)==="object"),"narrow-scrollbar"]}),B=y("tips"),X=B&&r("div",{class:"".concat(c.value," ").concat(s.value,"__tips--").concat(e.status||"normal")},[B]),ee=e.maxcharacter&&r("span",{class:i.value},["".concat(le.value,"/").concat(e.maxcharacter)])||!e.maxcharacter&&e.maxlength&&r("span",{class:i.value},["".concat(S.value?(b=String(S.value))===null||b===void 0?void 0:b.length:0,"/").concat(e.maxlength)]);return r("div",ne({class:Q.value},ln(n,["style"])),[r("textarea",ne({onInput:m,onCompositionstart:C,onCompositionend:q,ref:U,value:S.value,class:R.value},f,te.value),null),X||ee?r("div",{class:["".concat(s.value,"__info_wrapper"),V({},"".concat(s.value,"__info_wrapper_align"),!X)]},[X,ee]):null])}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var $r=xe(xl);/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Il={alt:{type:String,default:""},error:{type:[String,Function]},fallback:{type:String,default:""},fit:{type:String,default:"fill",validator:function(e){return e?["contain","cover","fill","none","scale-down"].includes(e):!0}},gallery:Boolean,lazy:Boolean,loading:{type:[String,Function]},overlayContent:{type:[String,Function]},overlayTrigger:{type:String,default:"always",validator:function(e){return e?["always","hover"].includes(e):!0}},placeholder:{type:[String,Function]},position:{type:String,default:"center"},referrerpolicy:{type:String,default:"strict-origin-when-cross-origin",validator:function(e){return e?["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"].includes(e):!0}},shape:{type:String,default:"square",validator:function(e){return e?["circle","round","square"].includes(e):!0}},src:{type:[String,Object]},srcset:{type:Object},onError:Function,onLoad:Function};/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Dl=Y({name:"TImage",props:Il,setup:function(e){var a=K(null),n=K(null),l=null,o=we(e),s=o.src,c=de();Ye(function(){var L;if((L=n.value)!==null&&L!==void 0&&L.complete&&!e.lazy&&U(),!(!e.lazy||!a.value)){var T=rn(a.value,null,N,0);l=T}}),Xa(function(){a.value&&l&&l.unobserve(a.value)});var i=ze("image"),v=i.classPrefix,u=i.globalConfig,h=K(s.value);ve([s,u],function(L){var T=Ce(L,2),z=T[0],A=T[1],W=A||{},Q=W.replaceImageSrc,te=Fe(Q)?Q(e):z;te===h.value&&h.value||(h.value=te)},{immediate:!0});var _=Ze(h),p=_.previewUrl;ve([p],function(){j.value=!1,P.value=!1});var S=K(!e.lazy),N=function(){S.value=!0},P=K(!1),$=function(T){var z;P.value=!0,(z=e.onLoad)===null||z===void 0||z.call(e,{e:T})},U=function(){var T=new Event("load");Object.defineProperty(T,"target",{value:n.value,enumerable:!0}),$(T)},j=K(!1),M=function(T){var z;j.value=!0,(z=e.onError)===null||z===void 0||z.call(e,{e:T}),e.fallback&&(h.value=e.fallback,j.value=!1)},D=g(function(){return e.overlayTrigger==="hover"}),w=g(function(){return["".concat(v.value,"-image"),"".concat(v.value,"-image--fit-").concat(e.fit),"".concat(v.value,"-image--position-").concat(e.position)]}),x=K(!D.value),I=function(){D.value&&(x.value=!x.value)},O=function(){var T=c("placeholder");return T?r("div",{class:"".concat(v.value,"-image__placeholder")},[T]):null},m=function(){return e.gallery?r("div",{class:"".concat(v.value,"-image__gallery-shadow")},null):null},C=function(){var T=G("overlayContent");return T?r("div",{class:["".concat(v.value,"-image__overlay-content"),!x.value&&"".concat(v.value,"-image__overlay-content--hidden")]},[T]):null};function q(){return r("picture",null,[Object.entries(e.srcset).map(function(L){var T=Ce(L,2),z=T[0],A=T[1];return r("source",{type:z,srcset:A},null)}),H()])}function H(){var L=Se(h.value)?h.value:p.value;return r("img",{ref:n,src:L,onError:M,onLoad:$,class:w.value,alt:e.alt,referrerpolicy:e.referrerpolicy},null)}var G=Ra();return function(){return r("div",ne({ref:a,class:["".concat(v.value,"-image__wrapper"),"".concat(v.value,"-image__wrapper--shape-").concat(e.shape),e.gallery&&"".concat(v.value,"-image__wrapper--gallery"),D.value&&"".concat(v.value,"-image__wrapper--need-hover")],onMouseenter:I,onMouseleave:I},_a(e,["src","alt","fit","position","shape","placeholder","loading","error","overlayTrigger","overlayContent","lazy","gallery","onLoad","onError"])),[O(),m(),(j.value||!S.value)&&r("div",{class:"".concat(v.value,"-image")},null),!(j.value||!S.value)&&(e.srcset&&Object.keys(e.srcset).length?q():H()),!(j.value||!S.value)&&!P.value&&r("div",{class:"".concat(v.value,"-image__loading")},[c("loading")||r(st,{direction:"vertical",size:8,align:"center"},{default:function(){return[r(Ia,{size:"24px"},null),Se(e.loading)?e.loading:u.value.loadingText]}})]),j.value&&r("div",{class:"".concat(v.value,"-image__error")},[G("error",{defaultNode:r(st,{direction:"vertical",size:8,align:"center"},{default:function(){return[r(xa,{size:"24px"},null),Se(e.error)?e.error:u.value.errorText]}})})]),C()])}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Te=xe(Dl);/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function Wt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function El(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:{max:2,min:.5,step:.5},e=t.max,a=t.min,n=t.step,l=t.defaultScale,o=K(l!=null?l:1),s=function(){var h=on(o.value,n);v(h)},c=function(){var h=un(o.value,n);v(h)},i=function(){o.value=l!=null?l:1},v=function(h){var _=h;he&&(_=e),o.value=_};return ve(function(){return t},function(){return i()}),{scale:o,onZoomIn:s,onZoomOut:c,resetScale:i}}function Ll(){var t=K(0),e=90,a=function(){t.value+=e},n=function(){t.value=0};return{rotate:t,onRotate:a,resetRotate:n}}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var ka=Y({name:"TImageItem",props:{rotate:Number,scale:Number,mirror:Number,src:[String,Object],placementSrc:[String,Object],isSvg:Boolean},setup:function(e){var a=we(e),n=a.src,l=a.placementSrc,o=a.isSvg,s=he(),c=K(!1),i=K(!1),v=Ul({translateX:0,translateY:0}),u=v.transform,h=v.mouseDownHandler,_=ze("imageViewer"),p=_.globalConfig,S=p.value.errorText,N=K(),P=g(function(){return{transform:"rotate(".concat(e.rotate,"deg) scale(").concat(e.scale,")"),display:!e.placementSrc||i.value?"block":"none"}}),$=g(function(){return{transform:"rotate(".concat(e.rotate,"deg) scale(").concat(e.scale,")"),display:i.value?"none":"block"}}),U=g(function(){var O=u.value,m=O.translateX,C=O.translateY;return{transform:"translate(".concat(m,"px, ").concat(C,"px) scale(").concat(e.mirror,", 1)")}}),j=function(){c.value=!1,i.value=!1,o.value&&M(w.value)},M=function(){var O=vt(Ae.mark(function m(C){var q,H,G,L,T,z,A,W,Q,te,le,ae,k;return Ae.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,fetch(C);case 2:if(H=y.sent,H.ok){y.next=6;break}throw c.value=!0,new Error("Failed to fetch SVG: ".concat(H.statusText));case 6:return y.next=8,H.text();case 8:G=y.sent,L=N.value,L.innerHTML="",(q=L.classList)===null||q===void 0||q.add("".concat(s.value,"-image-viewer__modal-image-svg")),T=L.attachShadow({mode:"closed"}),z=document.createElement("div"),z.style.background="transparent",z.innerHTML=G,T.appendChild(z),A=z.querySelector("svg"),A&&(W=A.getAttribute("viewBox"),W?(Q=W.split(/[\s\,]/).filter(function(b){return b}).map(parseFloat),te=Q[2],le=Q[3],z.style.width="".concat(te,"px"),z.style.height="".concat(le,"px")):(ae=A.getBBox(),k="".concat(ae.x," ").concat(ae.y," ").concat(ae.width," ").concat(ae.height),A.setAttribute("viewBox",k),z.style.width="".concat(ae.width,"px"),z.style.height="".concat(ae.height,"px"))),i.value=!0;case 20:case"end":return y.stop()}},m)}));return function(C){return O.apply(this,arguments)}}(),D=Ze(n),w=D.previewUrl,x=Ze(l),I=x.previewUrl;return ve([w,I],function(){j()}),Ye(vt(Ae.mark(function O(){return Ae.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(!o.value){C.next=3;break}return C.next=3,M(w.value);case 3:case"end":return C.stop()}},O)}))),function(){return r("div",{class:"".concat(s.value,"-image-viewer__modal-pic")},[r("div",{class:"".concat(s.value,"-image-viewer__modal-box"),style:U.value},[c.value&&r("div",{class:"".concat(s.value,"-image-viewer__img-error")},[r("div",{class:"".concat(s.value,"-image-viewer__img-error-content")},[r(xa,{size:"4em"},null),r("div",{class:"".concat(s.value,"-image-viewer__img-error-text")},[S])])]),!c.value&&!!e.placementSrc&&I.value&&r("img",{class:"".concat(s.value,"-image-viewer__modal-image"),onMousedown:function(m){m.stopPropagation(),h(m)},src:I.value,style:$.value,alt:"image",draggable:"false"},null),!c.value&&w.value&&!o.value&&r("img",{class:"".concat(s.value,"-image-viewer__modal-image"),onMousedown:function(m){m.stopPropagation(),h(m)},src:w.value,onLoad:function(){return i.value=!0},onError:function(){return c.value=!0},style:P.value,alt:"image",draggable:"false"},null),!c.value&&w.value&&o.value&&r("div",{ref:N,class:"".concat(s.value,"-image-viewer__modal-image"),onMousedown:function(m){m.stopPropagation(),h(m)},"data-alt":"svg",style:P.value,draggable:"false"},null)])])}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var _e=Y({name:"TImageModalIcon",props:{disabled:Boolean,onClick:Function,label:String,icon:Function},setup:function(e){var a=he(),n=de(),l=g(function(){return["".concat(a.value,"-image-viewer__modal-icon"),V({},"".concat(a.value,"-is-disabled"),e.disabled)]});return function(){return r("div",{class:l.value,onClick:e.onClick},[n("icon"),e.label&&r("span",{class:"".concat(a.value,"-image-viewer__modal-icon-label")},[e.label])])}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var $e={attach:{type:[String,Function],default:"body"},closeBtn:{type:[Boolean,Function],default:!0},closeOnEscKeydown:{type:Boolean,default:!0},closeOnOverlay:Boolean,draggable:{type:Boolean,default:void 0},imageScale:{type:Object},images:{type:Array,default:function(){return[]}},index:{type:Number,default:void 0},defaultIndex:{type:Number,default:0},mode:{type:String,default:"modal",validator:function(e){return e?["modal","modeless"].includes(e):!0}},navigationArrow:{type:[Boolean,Function],default:!0},showOverlay:{type:Boolean,default:void 0},title:{type:[String,Function]},trigger:{type:[String,Function]},viewerScale:{type:Object},visible:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultVisible:Boolean,zIndex:{type:Number},onClose:Function,onIndexChange:Function};/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function Yt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function Bl(t){for(var e=1;e=d.value.length?S.value:Z,{trigger:"next"})},R=function(Z){N(Z,{trigger:"current"})},B=function(){j(!0)},X=function(Z){var re;j(!1),(re=e.onClose)===null||re===void 0||re.call(e,Z)},ee=function(Z){X({e:Z,trigger:"close-btn"})},fe=function(Z){e.closeOnOverlay&&X({e:Z,trigger:"overlay"})},ge=function(Z){switch(Z.stopPropagation(),Z.code){case Ee.left:F();break;case Ee.right:E();break;case Ee.up:z();break;case Ee.down:A();break;case Ee.esc:e.closeOnEscKeydown&&f()&&X({e:Z,trigger:"esc"});break}},me=K();ve(function(){return U.value},function(J){clearTimeout(D.value),J?(M.value=!1,Xe().then(function(){var Z,re;(Z=me.value)===null||Z===void 0||(re=Z.focus)===null||re===void 0||re.call(Z)}),k()):D.value=setTimeout(function(){M.value=!0},200)});var ye=function(Z){Z.preventDefault();var re=Z.deltaY;re>0?A():z()},Le=g(function(){return{transform:"translateX(calc(-".concat(S.value," * (40px / 9 * 16 + 4px)))")}}),Be=function(){return r("div",{class:I.value},[r(_e,{icon:function(){return r(vn,null,null)},class:"".concat(l.value,"__header-pre-bt"),onClick:m},null),r("div",{class:"".concat(l.value,"__header-prev")},[r("div",{class:"".concat(l.value,"__header-trans"),style:Le.value},[d.value.map(function(Z,re){return r("div",{key:re,class:["".concat(l.value,"__header-box"),V({},"".concat(n.value,"-is-active"),re===S.value)]},[r(Te,{src:Z.thumbnail||Z.mainImage,error:"",className:"".concat(l.value,"__header-img"),onClick:function(){return R(re)}},null)])})])])])},Ie=function(Z){var re=Z==="prev"?0:180,De=o("navigationArrow",r(dn,{style:{transform:"rotate(".concat(re,"deg)")},size:"24px"},null));return r(_e,{class:"".concat(l.value,"__modal-").concat(Z,"-bt"),onClick:Z==="prev"?F:E,icon:function(){return De}},null)},Ve=function(){if(e.closeBtn!==!1)return r("div",{class:["".concat(l.value,"__modal-icon"),"".concat(l.value,"__modal-close-bt")],onClick:ee},[o("closeBtn",r(et,{size:"24px"},null))])};return function(){return e.mode==="modeless"?r(je,null,[o("trigger",{params:{open:B}}),r(Nl,{zIndex:O.value,visible:U.value,index:S.value,images:d.value,scale:T.value,rotate:te.value,mirror:q.value,currentImage:y.value,onRotate:le,onZoomIn:z,onZoomOut:A,onMirror:H,onReset:k,onClose:X,draggable:e.draggable,showOverlay:c.value,title:e.title},null)]):r(je,null,[o("trigger",{params:{open:B}}),r(Fa,{disabled:!e.attach||!w.value,to:w.value},{default:function(){return[r(Za,null,{default:function(){return[(U.value||!M.value)&&Ga(r("div",{ref:me,class:x.value,style:{zIndex:O.value},onWheel:ye,tabindex:-1,onKeydown:ge},[!!c.value&&r("div",{class:"".concat(l.value,"__modal-mask"),onClick:fe},null),d.value.length>1&&r(je,null,[Be(),r("div",{class:"".concat(l.value,"__modal-index")},[e.title&&o("title"),"".concat(S.value+1,"/").concat(d.value.length)]),Ie("prev"),Ie("next")]),Ve(),r(La,{onZoomIn:z,onZoomOut:A,onMirror:H,onReset:k,onRotate:le,scale:T.value,currentImage:y.value},null),r(ka,{scale:T.value,rotate:te.value,mirror:q.value,src:y.value.mainImage,placementSrc:y.value.thumbnail,isSvg:y.value.isSvg},null)]),[[Wa,U.value]])]}})]}})])}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var rt=xe(Al);/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Ba={asyncLoading:{type:[String,Function]},footer:{type:[String,Function]},header:{type:[String,Function]},layout:{type:String,default:"horizontal",validator:function(e){return e?["horizontal","vertical"].includes(e):!0}},scroll:{type:Object},size:{type:String,default:"medium",validator:function(e){return e?["small","medium","large"].includes(e):!0}},split:Boolean,stripe:Boolean,onLoadMore:Function,onScroll:Function};/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Ma=Y({name:"TListItem",props:Ba,setup:function(){var e=he("list-item"),a=de();return function(){var n=a("content"),l=a("default"),o=a("action");return r("li",{class:e.value},[r("div",{class:"".concat(e.value,"-main")},[l||n,o&&r("li",{class:"".concat(e.value,"__action")},[o])])])}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Qt="load-more",Hl="loading";/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function ea(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function ta(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(v){throw v},f:l}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,s=!0,c=!1;return{s:function(){a=a.call(t)},n:function(){var v=a.next();return s=v.done,v},e:function(v){c=!0,o=v},f:function(){try{s||a.return==null||a.return()}finally{if(c)throw o}}}}function ql(t,e){if(t){if(typeof t=="string")return aa(t,e);var a={}.toString.call(t).slice(8,-1);return a==="Object"&&t.constructor&&(a=t.constructor.name),a==="Map"||a==="Set"?Array.from(t):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?aa(t,e):void 0}}function aa(t,e){(e==null||e>t.length)&&(e=t.length);for(var a=0,n=Array(e);a"u"||(n.value="".concat(x,"px"),(u=e.onSizeDragEnd)===null||u===void 0||u.call(e,{e:v,size:x}))}},c=g(function(){var i=["right","left"].includes(e.placement),v={left:"right",right:"left",top:"bottom",bottom:"top"};return V(V(V(V({zIndex:1,position:"absolute",background:"transparent"},v[e.placement],0),"width",i?"16px":"100%"),"height",i?"100%":"16px"),"cursor",i?"col-resize":"row-resize")});return{draggedSizeValue:n,enableDrag:l,draggableLineStyles:c}};/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var nr=1,lr=Y({name:"TDrawer",inheritAttrs:!1,props:Ql,emits:["update:visible"],setup:function(e,a){var n=K(!1),l=K(!1),o=K(),s=K(),c=ze("drawer"),i=c.globalConfig,v=ke({CloseIcon:et}),u=v.CloseIcon,h=de(),_=Ge(),p=he("drawer"),S=ar(e),N=S.draggedSizeValue,P=S.enableDrag,$=S.draggableLineStyles,U=Ca(function(){return e.attach}),j=function(d){var y;(y=e.onConfirm)===null||y===void 0||y.call(e,{e:d})},M=function(d){var y;(y=e.onCancel)===null||y===void 0||y.call(e,{e:d}),ae({trigger:"cancel",e:d})},D=Va({confirmBtnAction:j,cancelBtnAction:M}),w=D.getConfirmBtn,x=D.getCancelBtn,I=K(null),O=g(function(){return[p.value,"".concat(p.value,"--").concat(e.placement),V(V(V({},"".concat(p.value,"--open"),l.value),"".concat(p.value,"--attach"),e.showInAttachedElement),"".concat(p.value,"--without-mask"),!e.showOverlay)]}),m=g(function(){var k;if(N.value)return N.value;var d=(k=e.size)!==null&&k!==void 0?k:i.value.size,y=isNaN(Number(d))?d:"".concat(d,"px");return{small:"300px",medium:"500px",large:"760px"}[d]||y}),C=g(function(){return{transform:l.value?"translateX(0)":void 0,width:["left","right"].includes(e.placement)?m.value:"",height:["top","bottom"].includes(e.placement)?m.value:""}}),q=g(function(){return["".concat(p.value,"__content-wrapper"),"".concat(p.value,"__content-wrapper--").concat(e.placement)]}),H=g(function(){return I.value&&I.value.parentNode}),G=g(function(){return[e.mode,e.placement].join()}),L=g(function(){return{display:"flex",justifyContent:e.placement==="right"?"flex-start":"flex-end"}}),T=function(d){var y;if(((y=e.closeOnEscKeydown)!==null&&y!==void 0?y:i.value.closeOnEscKeydown)&&d.key==="Escape"&&l.value){var b;(b=e.onEscKeydown)===null||b===void 0||b.call(e,{e:d}),ae({trigger:"esc",e:d})}},z=function(){clearTimeout(s.value),s.value=setTimeout(function(){var d,y;(d=o.value)===null||d===void 0||(d=d.parentNode)===null||d===void 0||(y=d.removeChild)===null||y===void 0||y.call(d,o.value)},150)},A=function(){e.mode==="push"&&Xe(function(){!H.value||(H.value.style.cssText="transition: margin 300ms cubic-bezier(0.7, 0.3, 0.1, 1) 0s;")})},W=function(){if(!!H.value&&!(e.mode!=="push"||!H.value)){var d={left:"margin: 0 0 0 ".concat(m.value),right:"margin: 0 0 0 -".concat(m.value),top:"margin: ".concat(m.value," 0 0 0"),bottom:"margin: -".concat(m.value," 0 0 0")}[e.placement];l.value?H.value.style.cssText+=d:H.value.style.cssText=H.value.style.cssText.replace(/margin:.+;/,"")}},Q=function(){var d=w({confirmBtn:e.confirmBtn,globalConfirm:i.value.confirm,className:"".concat(p.value,"__confirm")}),y=x({cancelBtn:e.cancelBtn,globalCancel:i.value.cancel,className:"".concat(p.value,"__cancel")});return r("div",{style:L.value},[e.placement==="right"?d:null,y,e.placement!=="right"?d:null])};ve(G,function(){A()},{immediate:!0}),ve(function(){return e.visible},function(k){Aa||(k?!e.showInAttachedElement&&e.preventScrollThrough&&o.value&&document.head.appendChild(o.value):z(),e.destroyOnClose?k?(n.value=!1,setTimeout(function(){l.value=!0})):(l.value=!1,setTimeout(function(){n.value=!0},200)):n.value===!0&&k?(n.value=!1,setTimeout(function(){l.value=!0})):l.value=k)},{immediate:!0});var te=function(d){var y;(y=e.onCloseBtnClick)===null||y===void 0||y.call(e,{e:d}),ae({trigger:"close-btn",e:d})},le=function(d){var y,b;(y=e.onOverlayClick)===null||y===void 0||y.call(e,{e:d}),((b=e.closeOnOverlayClick)!==null&&b!==void 0?b:i.value.closeOnOverlayClick)&&ae({trigger:"overlay",e:d})},ae=function(d){var y;(y=e.onClose)===null||y===void 0||y.call(e,d),a.emit("update:visible",!1)};return Ya(function(){W()}),Ye(function(){var k=document.documentElement.scrollHeight>document.documentElement.clientHeight,d=k?Ha():0;o.value=document.createElement("style"),o.value.dataset.id="td_drawer_".concat(+new Date,"_").concat(nr+=1),o.value.innerHTML=` html body { overflow-y: hidden; transition: margin 300ms cubic-bezier(0.7, 0.3, 0.1, 1) 0s; `.concat(e.mode==="push"?"":"width: calc(100% - ".concat(d,"px);"),` } `),l.value&&!e.showInAttachedElement&&e.preventScrollThrough&&document.head.appendChild(o.value),window.addEventListener("keydown",T)}),Ja(function(){z(),window.removeEventListener("keydown",T)}),function(){if(!n.value){var k=_("body","default"),d=h("header"),y=Q();return r(Fa,{disabled:!e.attach||!U.value,to:U.value},{default:function(){return[r("div",ne({ref:I,class:O.value,style:{zIndex:e.zIndex},onKeydown:T,tabindex:0},a.attrs),[e.showOverlay&&r("div",{class:"".concat(p.value,"__mask"),onClick:le},null),r("div",{class:q.value,style:C.value},[d&&r("div",{class:"".concat(p.value,"__header")},[d]),e.closeBtn&&r("div",{class:"".concat(p.value,"__close-btn"),onClick:te},[h("closeBtn",r(u,null,null))]),r("div",{class:["".concat(p.value,"__body"),"narrow-scrollbar"]},[k]),e.footer&&r("div",{class:"".concat(p.value,"__footer")},[h("footer",y)]),e.sizeDraggable&&r("div",{style:$.value,onMousedown:P},null)])])]}})}}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Nr=xe(lr);/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var rr={abridgeName:{type:Array},accept:{type:String,default:""},action:{type:String,default:""},allowUploadDuplicateFile:Boolean,autoUpload:{type:Boolean,default:!0},beforeAllFilesUpload:{type:Function},beforeUpload:{type:Function},cancelUploadButton:{type:[Object,Function]},data:{type:[Object,Function]},default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},dragContent:{type:[String,Function]},draggable:{type:Boolean,default:void 0},fileListDisplay:{type:Function},files:{type:Array,default:void 0},defaultFiles:{type:Array,default:function(){return[]}},format:{type:Function},formatRequest:{type:Function},formatResponse:{type:Function},headers:{type:Object},imageViewerProps:{type:Object},inputAttributes:{type:Object},isBatchUpload:Boolean,locale:{type:Object},max:{type:Number,default:0},method:{type:String,default:"POST",validator:function(e){return e?["POST","GET","PUT","OPTION","PATCH","post","get","put","option","patch"].includes(e):!0}},mockProgressDuration:{type:Number},multiple:Boolean,name:{type:String,default:"file"},placeholder:{type:String,default:""},requestMethod:{type:Function},showImageFileName:{type:Boolean,default:!0},showThumbnail:Boolean,showUploadProgress:{type:Boolean,default:!0},sizeLimit:{type:[Number,Object]},status:{type:String,validator:function(e){return e?["default","success","warning","error"].includes(e):!0}},theme:{type:String,default:"file",validator:function(e){return e?["custom","file","file-input","file-flow","image","image-flow"].includes(e):!0}},tips:{type:[String,Function]},trigger:{type:Function},triggerButtonProps:{type:Object},uploadAllFilesInOneRequest:Boolean,uploadButton:{type:[Object,Function]},uploadPastedFiles:{type:Boolean,default:!0},useMockProgress:{type:Boolean,default:!0},value:{type:Array,default:void 0},modelValue:{type:Array,default:void 0},defaultValue:{type:Array,default:function(){return[]}},withCredentials:Boolean,onCancelUpload:Function,onChange:Function,onDragenter:Function,onDragleave:Function,onDrop:Function,onFail:Function,onOneFileFail:Function,onOneFileSuccess:Function,onPreview:Function,onProgress:Function,onRemove:Function,onSelectChange:Function,onSuccess:Function,onValidate:Function,onWaitingUploadFilesChange:Function};/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Ne={accept:String,files:Array,toUploadFiles:Array,displayFiles:Array,theme:String,abridgeName:Array,placeholder:String,classPrefix:String,tips:[String,Function],status:String,locale:Object,sizeOverLimitMessage:String,autoUpload:Boolean,uploadPastedFiles:Boolean,onPasteFileChange:Function,disabled:Boolean,uploading:Boolean,tipsClasses:[String,Array,Object],errorClasses:[String,Array,Object],placeholderClass:[String,Array,Object],showUploadProgress:Boolean,default:Function,fileListDisplay:Function,onRemove:Function,imageViewerProps:Object};/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function la(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function or(t){for(var e=1;e1?"".concat(N,"[").concat(A,"]"):N;G[W]=z.raw}),I.length===1?G[N]=I[0].raw:G[N]=I.map(function(z){return z.raw}),G.length=I.length,M&&(G=M(G));var T=new FormData;return Object.keys(G).forEach(function(z){T.append(z,G[z])}),m.open(n,l,!0),Object.keys(i).forEach(function(z){m.setRequestHeader(z,i[z])}),m.onerror=function(z){D({event:z,file:h,files:I,XMLHttpRequest:m}),clearInterval(C),clearTimeout(q)},m.ontimeout=function(z){D({event:z,file:h,files:I,XMLHttpRequest:m})},m.upload&&(m.upload.onprogress=function(z){var A,W=0;if(z.total>0&&(W=Math.round(z.loaded/z.total*100)),O=Math.max(W,O),O!==W&&((A=I[0])===null||A===void 0?void 0:A.percent)!==O){var Q=I.map(function(te){return Ke(Ke({},te),{},{percent:O})});w({event:z,percent:O,file:h||Q[0],files:Q,type:"real",XMLHttpRequest:m})}}),m.onload=function(z){var A={};A.XMLHttpRequest=m;var W=m.status<200||m.status>=300;if(W)return D({event:z,file:h,files:I,response:A,XMLHttpRequest:m});var Q=m.responseText||m.response;try{A=JSON.parse(Q)}catch{A=Q,Pe.error("Upload","response does not a valid json")}clearInterval(C),clearTimeout(q),I.forEach(function(te){var le;te.percent=100,te.status="success",te.uploadTime=((le=A)===null||le===void 0?void 0:le.uploadTime)||Ua()}),Me(A)==="object"&&(A.XMLHttpRequest=m),x({event:z,file:h||I[0],files:oe(I),XMLHttpRequest:m,response:A})},m.send(T),m.upload.requestParams=G,m.upload.requestHeaders=i,m}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function ga(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function se(t){for(var e=1;e=0?se(se({},t[v]),i):i;n.push(u)},o=0,s=e.length;o2&&arguments[2]!==void 0?arguments[2]:void 0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return t.map(function(l){var o=l;Fe(e)&&(o=e(l));var s=se({raw:l,lastModified:l.lastModified,name:l.name,size:l.size,type:l.type,percent:n,status:a},o);return s})}function wr(t){var e=t.files,a=t.uploadValue,n=t.max,l=t.allowUploadDuplicateFile;return new Promise(function(o){var s=e.filter(function(P){var $=a.find(function(U){return U.name===P.name});return l||!$}),c=!1;if(s.lengthn&&(v=!0)}var h=Qe(s,t.format,t.autoUpload?"progress":"waiting"),_;if(t.beforeAllFilesUpload){var p,S=(p=t.beforeAllFilesUpload)===null||p===void 0?void 0:p.call(t,h);_=S instanceof Promise?S:new Promise(function(P){return P(S)})}var N=h.map(function(P){return new Promise(function($){pr(P,{beforeUpload:t.beforeUpload,sizeLimit:t.sizeLimit}).then(function(U){var j=Ce(U,2),M=j[0],D=j[1];M?$({file:P,validateResult:{type:"FILE_OVER_SIZE_LIMIT",extra:M}}):D===!1&&$({file:P,validateResult:{type:"CUSTOM_BEFORE_UPLOAD"}}),$({file:P})})})});Promise.all([_].concat(N)).then(function(P){var $=pn(P),U=$[0],j=$.slice(1);o(U===!1?{lengthOverLimit:v,hasSameNameFile:c,validateResult:{type:"BEFORE_ALL_FILES_UPLOAD"},files:h}:{lengthOverLimit:v,hasSameNameFile:c,fileValidateList:j,files:h})})})}function _r(t,e){var a=[],n=[],l=[];return t.forEach(function(o){var s,c;if(((s=o.validateResult)===null||s===void 0?void 0:s.type)==="CUSTOM_BEFORE_UPLOAD"){n.push(o.file);return}if(((c=o.validateResult)===null||c===void 0?void 0:c.type)==="FILE_OVER_SIZE_LIMIT"){o.file.response||(o.file.response={}),o.file.response.error=o.file.response.error||e(o.validateResult.extra),a.push(o);return}l.push(o.file)}),{sizeLimitErrors:a,beforeUploadErrorFiles:n,toFiles:l}}function Pr(t){return t.isBatchUpload&&t.status||t.status==="fail"?"reupload":t.status==="progress"?"uploading":t.status==="success"||!t.autoUpload&&t.status==="waiting"?t.multiple?"continueUpload":"reupload":"fileInput"}function Cr(t){var e=t.multiple,a=t.uploadValue,n=t.toUploadFiles,l=t.autoUpload,o=l?n:n.filter(function(s){return s.status!=="success"});return e&&!t.isBatchUpload?l?(o.length?a.concat(o):a)||[]:a:(o.length?o:a)||[]}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function ha(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),a.push.apply(a,n)}return a}function qe(t){for(var e=1;e