import{V as mt,X as vt,s as B,q as Q,A as G,B as xe,g as z,d as O,M as ce,Y as Se,_ as P,b as D,z as te,k as Ye,m as Je,r as Qe,E as Oe,a as ge,Z as ht,$ as yt,a0 as bt,l as wt,I as le,O as $t,e as pe,a1 as Ct,T as St,S as Ze,a2 as xt,a3 as Ot,L as je,i as Pt,a4 as _e,Q as It,a5 as Ke,C as et,h as Dt,a6 as Ft,a7 as Rt,j as re,f as Tt}from"./bootstrap-BcAf5ut0.js";import{k as At}from"./Trigger-BMBnz4_5.js";import{b as jt}from"./index-iITHj3w5.js";import{a4 as W,J as T,x as c,F as tt,P as K,p as _t,a9 as me,az as nt,a5 as ie,Y as rt,aA as ot,ao as Lt,br as Et,bq as Mt,_ as Ut}from"../jse/index-index-CTvWBEcQ.js";import{E as kt}from"./EyeOutlined-C73B4IyK.js";import{T as it}from"./index-DxUmZom-.js";import{C as Nt}from"./CheckOutlined-sgV0A0U5.js";import{u as zt}from"./useRefs-CONmYVWe.js";import{c as Bt}from"./collapseMotion-CzT5BY2T.js";import{u as Ht}from"./useMergedState-BzITn3yP.js";import{g as Wt}from"./collapse-BuqCI_Sc.js";import{u as Xt}from"./FormItemContext-fvdlX2Jo.js";import"./vnode-9TBgietd.js";import"./ResizeObserver.es-CDE7jhPe.js";import"./hasIn-CcM2-X2i.js";import"./isPlainObject-DZz0qCfY.js";import"./responsiveObserve-TSBkGYpX.js";import"./useFlexGapSupport-CKLozNLN.js";import"./colors-CKalYN3D.js";function Vt(e,t,n,r){for(var o=-1,l=e==null?0:e.length;++o({prefixCls:String,type:B(),percent:Number,format:O(),status:B(),showInfo:z(),strokeWidth:Number,strokeLinecap:B(),strokeColor:xe(),trailColor:String,width:Number,success:G(),gapDegree:Number,gapPosition:B(),size:Q([String,Number,Array]),steps:Number,successPercent:Number,title:String,progressStatus:B()});function Z(e){return!e||e<0?0:e>100?100:e}function fe(e){let{success:t,successPercent:n}=e,r=n;return t&&"progress"in t&&(ce(!1,"Progress","`success.progress` is deprecated. Please use `success.percent` instead."),r=t.progress),t&&"percent"in t&&(r=t.percent),r}function nn(e){let{percent:t,success:n,successPercent:r}=e;const o=Z(fe({success:n,successPercent:r}));return[o,Z(Z(t)-o)]}function rn(e){let{success:t={},strokeColor:n}=e;const{strokeColor:r}=t;return[r||Se.green,n||null]}const he=(e,t,n)=>{var r,o,l,i;let s=-1,u=-1;if(t==="step"){const b=n.steps,d=n.strokeWidth;typeof e=="string"||typeof e=="undefined"?(s=e==="small"?2:14,u=d!=null?d:8):typeof e=="number"?[s,u]=[e,e]:[s=14,u=8]=e,s*=b}else if(t==="line"){const b=n==null?void 0:n.strokeWidth;typeof e=="string"||typeof e=="undefined"?u=b||(e==="small"?6:8):typeof e=="number"?[s,u]=[e,e]:[s=-1,u=8]=e}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e=="undefined"?[s,u]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[s,u]=[e,e]:(s=(o=(r=e[0])!==null&&r!==void 0?r:e[1])!==null&&o!==void 0?o:120,u=(i=(l=e[0])!==null&&l!==void 0?l:e[1])!==null&&i!==void 0?i:120));return{width:s,height:u}};var on=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);oP(P({},ve()),{strokeColor:xe(),direction:B()}),an=e=>{let t=[];return Object.keys(e).forEach(n=>{const r=parseFloat(n.replace(/%/g,""));isNaN(r)||t.push({key:r,value:e[n]})}),t=t.sort((n,r)=>n.key-r.key),t.map(n=>{let{key:r,value:o}=n;return`${o} ${r}%`}).join(", ")},sn=(e,t)=>{const{from:n=Se.blue,to:r=Se.blue,direction:o=t==="rtl"?"to left":"to right"}=e,l=on(e,["from","to","direction"]);if(Object.keys(l).length!==0){const i=an(l);return{backgroundImage:`linear-gradient(${o}, ${i})`}}return{backgroundImage:`linear-gradient(${o}, ${n}, ${r})`}},cn=W({compatConfig:{MODE:3},name:"ProgressLine",inheritAttrs:!1,props:ln(),setup(e,t){let{slots:n,attrs:r}=t;const o=T(()=>{const{strokeColor:g,direction:F}=e;return g&&typeof g!="string"?sn(g,F):{backgroundColor:g}}),l=T(()=>e.strokeLinecap==="square"||e.strokeLinecap==="butt"?0:void 0),i=T(()=>e.trailColor?{backgroundColor:e.trailColor}:void 0),s=T(()=>{var g;return(g=e.size)!==null&&g!==void 0?g:[-1,e.strokeWidth||(e.size==="small"?6:8)]}),u=T(()=>he(s.value,"line",{strokeWidth:e.strokeWidth})),b=T(()=>{const{percent:g}=e;return P({width:`${Z(g)}%`,height:`${u.value.height}px`,borderRadius:l.value},o.value)}),d=T(()=>fe(e)),I=T(()=>{const{success:g}=e;return{width:`${Z(d.value)}%`,height:`${u.value.height}px`,borderRadius:l.value,backgroundColor:g==null?void 0:g.strokeColor}}),y={width:u.value.width<0?"100%":u.value.width,height:`${u.value.height}px`};return()=>{var g;return c(tt,null,[c("div",D(D({},r),{},{class:[`${e.prefixCls}-outer`,r.class],style:[r.style,y]}),[c("div",{class:`${e.prefixCls}-inner`,style:i.value},[c("div",{class:`${e.prefixCls}-bg`,style:b.value},null),d.value!==void 0?c("div",{class:`${e.prefixCls}-success-bg`,style:I.value},null):null])]),(g=n.default)===null||g===void 0?void 0:g.call(n)])}}}),un={percent:0,prefixCls:"vc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1},dn=e=>{const t=K(null);return _t(()=>{const n=Date.now();let r=!1;e.value.forEach(o=>{const l=(o==null?void 0:o.$el)||o;if(!l)return;r=!0;const i=l.style;i.transitionDuration=".3s, .3s, .3s, .06s",t.value&&n-t.value<100&&(i.transitionDuration="0s, 0s")}),r&&(t.value=Date.now())}),e},pn={gapDegree:Number,gapPosition:{type:String},percent:{type:[Array,Number]},prefixCls:String,strokeColor:{type:[Object,String,Array]},strokeLinecap:{type:String},strokeWidth:Number,trailColor:String,trailWidth:Number,transition:String};var fn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o4&&arguments[4]!==void 0?arguments[4]:0,l=arguments.length>5?arguments[5]:void 0;const i=50-r/2;let s=0,u=-i,b=0,d=-2*i;switch(l){case"left":s=-i,u=0,b=2*i,d=0;break;case"right":s=i,u=0,b=-2*i,d=0;break;case"bottom":u=i,d=2*i;break}const I=`M 50,50 m ${s},${u} a ${i},${i} 0 1 1 ${b},${-d} a ${i},${i} 0 1 1 ${-b},${d}`,y=Math.PI*2*i,g={stroke:n,strokeDasharray:`${t/100*(y-o)}px ${y}px`,strokeDashoffset:`-${o/2+e/100*(y-o)}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s"};return{pathString:I,pathStyle:g}}const gn=W({compatConfig:{MODE:3},name:"VCCircle",props:te(pn,un),setup(e){Le+=1;const t=K(Le),n=T(()=>Me(e.percent)),r=T(()=>Me(e.strokeColor)),[o,l]=zt();dn(l);const i=()=>{const{prefixCls:s,strokeWidth:u,strokeLinecap:b,gapDegree:d,gapPosition:I}=e;let y=0;return n.value.map((g,F)=>{const a=r.value[F]||r.value[r.value.length-1],v=Object.prototype.toString.call(a)==="[object Object]"?`url(#${s}-gradient-${t.value})`:"",{pathString:R,pathStyle:p}=Ue(y,g,a,u,d,I);y+=g;const h={key:F,d:R,stroke:v,"stroke-linecap":b,"stroke-width":u,opacity:g===0?0:1,"fill-opacity":"0",class:`${s}-circle-path`,style:p};return c("path",D({ref:o(F)},h),null)})};return()=>{const{prefixCls:s,strokeWidth:u,trailWidth:b,gapDegree:d,gapPosition:I,trailColor:y,strokeLinecap:g,strokeColor:F}=e,a=fn(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","strokeColor"]),{pathString:v,pathStyle:R}=Ue(0,100,y,u,d,I);delete a.percent;const p=r.value.find(m=>Object.prototype.toString.call(m)==="[object Object]"),h={d:v,stroke:y,"stroke-linecap":g,"stroke-width":b||u,"fill-opacity":"0",class:`${s}-circle-trail`,style:R};return c("svg",D({class:`${s}-circle`,viewBox:"0 0 100 100"},a),[p&&c("defs",null,[c("linearGradient",{id:`${s}-gradient-${t.value}`,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[Object.keys(p).sort((m,S)=>Ee(m)-Ee(S)).map((m,S)=>c("stop",{key:S,offset:m,"stop-color":p[m]},null))])]),c("path",h,null),i().reverse()])}}}),mn=()=>P(P({},ve()),{strokeColor:xe()}),vn=3,hn=e=>vn/e*100,yn=W({compatConfig:{MODE:3},name:"ProgressCircle",inheritAttrs:!1,props:te(mn(),{trailColor:null}),setup(e,t){let{slots:n,attrs:r}=t;const o=T(()=>{var a;return(a=e.width)!==null&&a!==void 0?a:120}),l=T(()=>{var a;return(a=e.size)!==null&&a!==void 0?a:[o.value,o.value]}),i=T(()=>he(l.value,"circle")),s=T(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),u=T(()=>({width:`${i.value.width}px`,height:`${i.value.height}px`,fontSize:`${i.value.width*.15+6}px`})),b=T(()=>{var a;return(a=e.strokeWidth)!==null&&a!==void 0?a:Math.max(hn(i.value.width),6)}),d=T(()=>e.gapPosition||e.type==="dashboard"&&"bottom"||void 0),I=T(()=>nn(e)),y=T(()=>Object.prototype.toString.call(e.strokeColor)==="[object Object]"),g=T(()=>rn({success:e.success,strokeColor:e.strokeColor})),F=T(()=>({[`${e.prefixCls}-inner`]:!0,[`${e.prefixCls}-circle-gradient`]:y.value}));return()=>{var a;const v=c(gn,{percent:I.value,strokeWidth:b.value,trailWidth:b.value,strokeColor:g.value,strokeLinecap:e.strokeLinecap,trailColor:e.trailColor,prefixCls:e.prefixCls,gapDegree:s.value,gapPosition:d.value},null);return c("div",D(D({},r),{},{class:[F.value,r.class],style:[r.style,u.value]}),[i.value.width<=20?c(it,null,{default:()=>[c("span",null,[v])],title:n.default}):c(tt,null,[v,(a=n.default)===null||a===void 0?void 0:a.call(n)])])}}}),bn=()=>P(P({},ve()),{steps:Number,strokeColor:Q(),trailColor:String}),wn=W({compatConfig:{MODE:3},name:"Steps",props:bn(),setup(e,t){let{slots:n}=t;const r=T(()=>Math.round(e.steps*((e.percent||0)/100))),o=T(()=>{var s;return(s=e.size)!==null&&s!==void 0?s:[e.size==="small"?2:14,e.strokeWidth||8]}),l=T(()=>he(o.value,"step",{steps:e.steps,strokeWidth:e.strokeWidth||8})),i=T(()=>{const{steps:s,strokeColor:u,trailColor:b,prefixCls:d}=e,I=[];for(let y=0;y{var s;return c("div",{class:`${e.prefixCls}-steps-outer`},[i.value,(s=n.default)===null||s===void 0?void 0:s.call(n)])}}}),$n=new Oe("antProgressActive",{"0%":{transform:"translateX(-100%) scaleX(0)",opacity:.1},"20%":{transform:"translateX(-100%) scaleX(0)",opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}}),Cn=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:P(P({},Qe(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize,marginInlineEnd:e.marginXS,marginBottom:e.marginXS},[`${t}-outer`]:{display:"inline-block",width:"100%"},[`&${t}-show-info`]:{[`${t}-outer`]:{marginInlineEnd:`calc(-2em - ${e.marginXS}px)`,paddingInlineEnd:`calc(2em + ${e.paddingXS}px)`}},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:e.progressRemainingColor,borderRadius:e.progressLineRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorInfo}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",backgroundColor:e.colorInfo,borderRadius:e.progressLineRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",width:"2em",marginInlineStart:e.marginXS,color:e.progressInfoTextColor,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:e.fontSize}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.progressLineRadius,opacity:0,animationName:$n,animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Sn=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.progressRemainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.colorText,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:`${e.fontSize/e.fontSizeSM}em`}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},xn=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.progressRemainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.colorInfo}}}}}},On=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${n}`]:{fontSize:e.fontSizeSM}}}},Pn=Ye("Progress",e=>{const t=e.marginXXS/2,n=Je(e,{progressLineRadius:100,progressInfoTextColor:e.colorText,progressDefaultColor:e.colorInfo,progressRemainingColor:e.colorFillSecondary,progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Cn(n),Sn(n),xn(n),On(n)]});var In=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);oArray.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor),b=T(()=>{const{percent:F=0}=e,a=fe(e);return parseInt(a!==void 0?a.toString():F.toString(),10)}),d=T(()=>{const{status:F}=e;return!tn.includes(F)&&b.value>=100?"success":F||"normal"}),I=T(()=>{const{type:F,showInfo:a,size:v}=e,R=o.value;return{[R]:!0,[`${R}-inline-circle`]:F==="circle"&&he(v,"circle").width<=20,[`${R}-${F==="dashboard"&&"circle"||F}`]:!0,[`${R}-status-${d.value}`]:!0,[`${R}-show-info`]:a,[`${R}-${v}`]:v,[`${R}-rtl`]:l.value==="rtl",[s.value]:!0}}),y=T(()=>typeof e.strokeColor=="string"||Array.isArray(e.strokeColor)?e.strokeColor:void 0),g=()=>{const{showInfo:F,format:a,type:v,percent:R,title:p}=e,h=fe(e);if(!F)return null;let m;const S=a||(n==null?void 0:n.format)||(L=>`${L}%`),_=v==="line";return a||n!=null&&n.format||d.value!=="exception"&&d.value!=="success"?m=S(Z(R),Z(h)):d.value==="exception"?m=_?c(ht,null,null):c(yt,null,null):d.value==="success"&&(m=_?c(bt,null,null):c(Nt,null,null)),c("span",{class:`${o.value}-text`,title:p===void 0&&typeof m=="string"?m:void 0},[m])};return()=>{const{type:F,steps:a,title:v}=e,{class:R}=r,p=In(r,["class"]),h=g();let m;return F==="line"?m=a?c(wn,D(D({},e),{},{strokeColor:y.value,prefixCls:o.value,steps:a}),{default:()=>[h]}):c(cn,D(D({},e),{},{strokeColor:u.value,prefixCls:o.value,direction:l.value}),{default:()=>[h]}):(F==="circle"||F==="dashboard")&&(m=c(yn,D(D({},e),{},{prefixCls:o.value,strokeColor:u.value,progressStatus:d.value}),{default:()=>[h]})),i(c("div",D(D({role:"progressbar"},p),{},{class:[I.value,R],title:v}),[m]))}}}),Fn=wt(Dn);var Rn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};function ke(e){for(var t=1;t0&&(l.percent=l.loaded/l.total*100),e.onProgress(l)});const n=new FormData;e.data&&Object.keys(e.data).forEach(o=>{const l=e.data[o];if(Array.isArray(l)){l.forEach(i=>{n.append(`${o}[]`,i)});return}n.append(o,l)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(l){e.onError(l)},t.onload=function(){return t.status<200||t.status>=300?e.onError(An(e,t),Ne(t)):e.onSuccess(Ne(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const r=e.headers||{};return r["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach(o=>{r[o]!==null&&t.setRequestHeader(o,r[o])}),t.send(n),{abort(){t.abort()}}}const _n=+new Date;let Ln=0;function be(){return`vc-upload-${_n}-${++Ln}`}const we=(e,t)=>{if(e&&t){const n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=e.type||"",l=o.replace(/\/.*$/,"");return n.some(i=>{const s=i.trim();if(/^\*(\/\*)?$/.test(i))return!0;if(s.charAt(0)==="."){const u=r.toLowerCase(),b=s.toLowerCase();let d=[b];return(b===".jpg"||b===".jpeg")&&(d=[".jpg",".jpeg"]),d.some(I=>u.endsWith(I))}return/\/\*$/.test(s)?l===s.replace(/\/.*$/,""):!!(o===s||/^\w+$/.test(s))})}return!0};function En(e,t){const n=e.createReader();let r=[];function o(){n.readEntries(l=>{const i=Array.prototype.slice.apply(l);r=r.concat(i),!i.length?t(r):o()})}o()}const Mn=(e,t,n)=>{const r=(o,l)=>{o.path=l||"",o.isFile?o.file(i=>{n(i)&&(o.fullPath&&!i.webkitRelativePath&&(Object.defineProperties(i,{webkitRelativePath:{writable:!0}}),i.webkitRelativePath=o.fullPath.replace(/^\//,""),Object.defineProperties(i,{webkitRelativePath:{writable:!1}})),t([i]))}):o.isDirectory&&En(o,i=>{i.forEach(s=>{r(s,`${l}${o.name}/`)})})};e.forEach(o=>{r(o.webkitGetAsEntry())})},lt=()=>({capture:[Boolean,String],multipart:{type:Boolean,default:void 0},name:String,disabled:{type:Boolean,default:void 0},componentTag:String,action:[String,Function],method:String,directory:{type:Boolean,default:void 0},data:[Object,Function],headers:Object,accept:String,multiple:{type:Boolean,default:void 0},onBatchStart:Function,onReject:Function,onStart:Function,onError:Function,onSuccess:Function,onProgress:Function,beforeUpload:Function,customRequest:Function,withCredentials:{type:Boolean,default:void 0},openFileDialogOnClick:{type:Boolean,default:void 0},prefixCls:String,id:String,onMouseenter:Function,onMouseleave:Function,onClick:Function});var Un=function(e,t,n,r){function o(l){return l instanceof n?l:new n(function(i){i(l)})}return new(n||(n=Promise))(function(l,i){function s(d){try{b(r.next(d))}catch(I){i(I)}}function u(d){try{b(r.throw(d))}catch(I){i(I)}}function b(d){d.done?l(d.value):o(d.value).then(s,u)}b((r=r.apply(e,t||[])).next())})},kn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);oUn(this,void 0,void 0,function*(){const{beforeUpload:m}=e;let S=p;if(m){try{S=yield m(p,h)}catch($){S=!1}if(S===!1)return{origin:p,parsedFile:null,action:null,data:null}}const{action:_}=e;let L;typeof _=="function"?L=yield _(p):L=_;const{data:k}=e;let M;typeof k=="function"?M=yield k(p):M=k;const N=(typeof S=="object"||typeof S=="string")&&S?S:p;let f;N instanceof File?f=N:f=new File([N],p.name,{type:p.type});const w=f;return w.uid=p.uid,{origin:p,data:M,parsedFile:w,action:L}}),d=p=>{let{data:h,origin:m,action:S,parsedFile:_}=p;if(!u)return;const{onStart:L,customRequest:k,name:M,headers:N,withCredentials:f,method:w}=e,{uid:$}=m,C=k||jn,x={action:S,filename:M,data:h,file:_,headers:N,withCredentials:f,method:w||"post",onProgress:A=>{const{onProgress:E}=e;E==null||E(A,_)},onSuccess:(A,E)=>{const{onSuccess:j}=e;j==null||j(A,_,E),delete i[$]},onError:(A,E)=>{const{onError:j}=e;j==null||j(A,E,_),delete i[$]}};L(m),i[$]=C(x)},I=()=>{l.value=be()},y=p=>{if(p){const h=p.uid?p.uid:p;i[h]&&i[h].abort&&i[h].abort(),delete i[h]}else Object.keys(i).forEach(h=>{i[h]&&i[h].abort&&i[h].abort(),delete i[h]})};me(()=>{u=!0}),nt(()=>{u=!1,y()});const g=p=>{const h=[...p],m=h.map(S=>(S.uid=be(),b(S,h)));Promise.all(m).then(S=>{const{onBatchStart:_}=e;_==null||_(S.map(L=>{let{origin:k,parsedFile:M}=L;return{file:k,parsedFile:M}})),S.filter(L=>L.parsedFile!==null).forEach(L=>{d(L)})})},F=p=>{const{accept:h,directory:m}=e,{files:S}=p.target,_=[...S].filter(L=>!m||we(L,h));g(_),I()},a=p=>{const h=s.value;if(!h)return;const{onClick:m}=e;h.click(),m&&m(p)},v=p=>{p.key==="Enter"&&a(p)},R=p=>{const{multiple:h}=e;if(p.preventDefault(),p.type!=="dragover")if(e.directory)Mn(Array.prototype.slice.call(p.dataTransfer.items),g,m=>we(m,e.accept));else{const m=en(Array.prototype.slice.call(p.dataTransfer.files),L=>we(L,e.accept));let S=m[0];const _=m[1];h===!1&&(S=S.slice(0,1)),g(S),_.length&&e.onReject&&e.onReject(_)}};return o({abort:y}),()=>{var p;const{componentTag:h,prefixCls:m,disabled:S,id:_,multiple:L,accept:k,capture:M,directory:N,openFileDialogOnClick:f,onMouseenter:w,onMouseleave:$}=e,C=kn(e,["componentTag","prefixCls","disabled","id","multiple","accept","capture","directory","openFileDialogOnClick","onMouseenter","onMouseleave"]),x={[m]:!0,[`${m}-disabled`]:S,[r.class]:!!r.class},A=N?{directory:"directory",webkitdirectory:"webkitdirectory"}:{};return c(h,D(D({},S?{}:{onClick:f?a:()=>{},onKeydown:f?v:()=>{},onMouseenter:w,onMouseleave:$,onDrop:R,onDragover:R,tabindex:"0"}),{},{class:x,role:"button",style:r.style}),{default:()=>[c("input",D(D(D({},$t(C,{aria:!0,data:!0})),{},{id:_,type:"file",ref:s,onClick:j=>j.stopPropagation(),onCancel:j=>j.stopPropagation(),key:l.value,style:{display:"none"},accept:k},A),{},{multiple:L,onChange:F},M!=null?{capture:M}:{}),null),(p=n.default)===null||p===void 0?void 0:p.call(n)]})}}});function $e(){}const ze=W({compatConfig:{MODE:3},name:"Upload",inheritAttrs:!1,props:te(lt(),{componentTag:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:$e,onError:$e,onSuccess:$e,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0}),setup(e,t){let{slots:n,attrs:r,expose:o}=t;const l=K();return o({abort:s=>{var u;(u=l.value)===null||u===void 0||u.abort(s)}}),()=>c(Nn,D(D(D({},e),r),{},{ref:l}),n)}});var zn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};function Be(e){for(var t=1;t{let{uid:l}=o;return l===e.uid});return r===-1?n.push(e):n[r]=e,n}function Ce(e,t){const n=e.uid!==void 0?"uid":"name";return t.filter(r=>r[n]===e[n])[0]}function qn(e,t){const n=e.uid!==void 0?"uid":"name",r=t.filter(o=>o[n]!==e[n]);return r.length===t.length?null:r}const Yn=function(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),r=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(r)||[""])[0]},st=e=>e.indexOf("image/")===0,Jn=e=>{if(e.type&&!e.thumbUrl)return st(e.type);const t=e.thumbUrl||e.url||"",n=Yn(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n)?!0:!(/^data:/.test(t)||n)},J=200;function Qn(e){return new Promise(t=>{if(!e.type||!st(e.type)){t("");return}const n=document.createElement("canvas");n.width=J,n.height=J,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${J}px; height: ${J}px; z-index: 9999; display: none;`,document.body.appendChild(n);const r=n.getContext("2d"),o=new Image;if(o.onload=()=>{const{width:l,height:i}=o;let s=J,u=J,b=0,d=0;l>i?(u=i*(J/l),d=-(u-s)/2):(s=l*(J/i),b=-(s-u)/2),r.drawImage(o,b,d,s,u);const I=n.toDataURL();document.body.removeChild(n),t(I)},o.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const l=new FileReader;l.addEventListener("load",()=>{l.result&&(o.src=l.result)}),l.readAsDataURL(e)}else o.src=window.URL.createObjectURL(e)})}var Zn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};function Xe(e){for(var t=1;t({prefixCls:String,locale:G(void 0),file:G(),items:pe(),listType:B(),isImgUrl:O(),showRemoveIcon:z(),showDownloadIcon:z(),showPreviewIcon:z(),removeIcon:O(),downloadIcon:O(),previewIcon:O(),iconRender:O(),actionIconRender:O(),itemRender:O(),onPreview:O(),onClose:O(),onDownload:O(),progress:G()}),tr=W({compatConfig:{MODE:3},name:"ListItem",inheritAttrs:!1,props:er(),setup(e,t){let{slots:n,attrs:r}=t;var o;const l=ie(!1),i=ie();me(()=>{i.value=setTimeout(()=>{l.value=!0},300)}),nt(()=>{clearTimeout(i.value)});const s=ie((o=e.file)===null||o===void 0?void 0:o.status);rt(()=>{var d;return(d=e.file)===null||d===void 0?void 0:d.status},d=>{d!=="removed"&&(s.value=d)});const{rootPrefixCls:u}=ge("upload",e),b=T(()=>Ct(`${u.value}-fade`));return()=>{var d,I;const{prefixCls:y,locale:g,listType:F,file:a,items:v,progress:R,iconRender:p=n.iconRender,actionIconRender:h=n.actionIconRender,itemRender:m=n.itemRender,isImgUrl:S,showPreviewIcon:_,showRemoveIcon:L,showDownloadIcon:k,previewIcon:M=n.previewIcon,removeIcon:N=n.removeIcon,downloadIcon:f=n.downloadIcon,onPreview:w,onDownload:$,onClose:C}=e,{class:x,style:A}=r,E=p({file:a});let j=c("div",{class:`${y}-text-icon`},[E]);if(F==="picture"||F==="picture-card")if(s.value==="uploading"||!a.thumbUrl&&!a.url){const H={[`${y}-list-item-thumbnail`]:!0,[`${y}-list-item-file`]:s.value!=="uploading"};j=c("div",{class:H},[E])}else{const H=S!=null&&S(a)?c("img",{src:a.thumbUrl||a.url,alt:a.name,class:`${y}-list-item-image`,crossorigin:a.crossOrigin},null):E,ft={[`${y}-list-item-thumbnail`]:!0,[`${y}-list-item-file`]:S&&!S(a)};j=c("a",{class:ft,onClick:gt=>w(a,gt),href:a.url||a.thumbUrl,target:"_blank",rel:"noopener noreferrer"},[H])}const U={[`${y}-list-item`]:!0,[`${y}-list-item-${s.value}`]:!0},q=typeof a.linkProps=="string"?JSON.parse(a.linkProps):a.linkProps,ee=L?h({customIcon:N?N({file:a}):c(Pe,null,null),callback:()=>C(a),prefixCls:y,title:g.removeFile}):null,X=k&&s.value==="done"?h({customIcon:f?f({file:a}):c(Re,null,null),callback:()=>$(a),prefixCls:y,title:g.downloadFile}):null,V=F!=="picture-card"&&c("span",{key:"download-delete",class:[`${y}-list-item-actions`,{picture:F==="picture"}]},[X,ee]),Y=`${y}-list-item-name`,ne=a.url?[c("a",D(D({key:"view",target:"_blank",rel:"noopener noreferrer",class:Y,title:a.name},q),{},{href:a.url,onClick:H=>w(a,H)}),[a.name]),V]:[c("span",{key:"view",class:Y,onClick:H=>w(a,H),title:a.name},[a.name]),V],ye={pointerEvents:"none",opacity:.5},ct=_?c("a",{href:a.url||a.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:a.url||a.thumbUrl?void 0:ye,onClick:H=>w(a,H),title:g.previewFile},[M?M({file:a}):c(kt,null,null)]):null,ut=F==="picture-card"&&s.value!=="uploading"&&c("span",{class:`${y}-list-item-actions`},[ct,s.value==="done"&&X,ee]),Te=c("div",{class:U},[j,ne,ut,l.value&&c(St,b.value,{default:()=>[ot(c("div",{class:`${y}-list-item-progress`},["percent"in a?c(Fn,D(D({},R),{},{type:"line",percent:a.percent}),null):null]),[[Ze,s.value==="uploading"]])]})]),dt={[`${y}-list-item-container`]:!0,[`${x}`]:!!x},pt=a.response&&typeof a.response=="string"?a.response:((d=a.error)===null||d===void 0?void 0:d.statusText)||((I=a.error)===null||I===void 0?void 0:I.message)||g.uploadError,Ae=s.value==="error"?c(it,{title:pt,getPopupContainer:H=>H.parentNode},{default:()=>[Te]}):Te;return c("div",{class:dt,style:A},[m?m({originNode:Ae,file:a,fileList:v,actions:{download:$.bind(null,a),preview:w.bind(null,a),remove:C.bind(null,a)}}):Ae])}}}),nr=(e,t)=>{let{slots:n}=t;var r;return It((r=n.default)===null||r===void 0?void 0:r.call(n))[0]},rr=W({compatConfig:{MODE:3},name:"AUploadList",props:te(Gn(),{listType:"text",progress:{strokeWidth:2,showInfo:!1},showRemoveIcon:!0,showDownloadIcon:!1,showPreviewIcon:!0,previewFile:Qn,isImageUrl:Jn,items:[],appendActionVisible:!0}),setup(e,t){let{slots:n,expose:r}=t;const o=ie(!1);me(()=>{o.value==!0});const l=ie([]);rt(()=>e.items,function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];l.value=a.slice()},{immediate:!0,deep:!0}),Lt(()=>{if(e.listType!=="picture"&&e.listType!=="picture-card")return;let a=!1;(e.items||[]).forEach((v,R)=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(v.originFileObj instanceof File||v.originFileObj instanceof Blob)||v.thumbUrl!==void 0||(v.thumbUrl="",e.previewFile&&e.previewFile(v.originFileObj).then(p=>{const h=p||"";h!==v.thumbUrl&&(l.value[R].thumbUrl=h,a=!0)}))}),a&&Et(l)});const i=(a,v)=>{if(e.onPreview)return v==null||v.preventDefault(),e.onPreview(a)},s=a=>{typeof e.onDownload=="function"?e.onDownload(a):a.url&&window.open(a.url)},u=a=>{var v;(v=e.onRemove)===null||v===void 0||v.call(e,a)},b=a=>{let{file:v}=a;const R=e.iconRender||n.iconRender;if(R)return R({file:v,listType:e.listType});const p=v.status==="uploading",h=e.isImageUrl&&e.isImageUrl(v)?c(De,null,null):c(Fe,null,null);let m=p?c(je,null,null):c(Ie,null,null);return e.listType==="picture"?m=p?c(je,null,null):h:e.listType==="picture-card"&&(m=p?e.locale.uploading:h),m},d=a=>{const{customIcon:v,callback:R,prefixCls:p,title:h}=a,m={type:"text",size:"small",title:h,onClick:()=>{R()},class:`${p}-list-item-action`};return Pt(v)?c(_e,m,{icon:()=>v}):c(_e,m,{default:()=>[c("span",null,[v])]})};r({handlePreview:i,handleDownload:s});const{prefixCls:I,rootPrefixCls:y}=ge("upload",e),g=T(()=>({[`${I.value}-list`]:!0,[`${I.value}-list-${e.listType}`]:!0})),F=T(()=>{const a=P({},Bt(`${y.value}-motion-collapse`));delete a.onAfterAppear,delete a.onAfterEnter,delete a.onAfterLeave;const v=P(P({},xt(`${I.value}-${e.listType==="picture-card"?"animate-inline":"animate"}`)),{class:g.value,appear:o.value});return e.listType!=="picture-card"?P(P({},a),v):v});return()=>{const{listType:a,locale:v,isImageUrl:R,showPreviewIcon:p,showRemoveIcon:h,showDownloadIcon:m,removeIcon:S,previewIcon:_,downloadIcon:L,progress:k,appendAction:M,itemRender:N,appendActionVisible:f}=e,w=M==null?void 0:M(),$=l.value;return c(Ot,D(D({},F.value),{},{tag:"div"}),{default:()=>[$.map(C=>{const{uid:x}=C;return c(tr,{key:x,locale:v,prefixCls:I.value,file:C,items:$,progress:k,listType:a,isImgUrl:R,showPreviewIcon:p,showRemoveIcon:h,showDownloadIcon:m,onPreview:i,onDownload:s,onClose:u,removeIcon:S,previewIcon:_,downloadIcon:L,itemRender:N},P(P({},n),{iconRender:b,actionIconRender:d}))}),M?ot(c(nr,{key:"__ant_upload_appendAction"},{default:()=>w}),[[Ze,!!f]]):null]})}}}),or=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:`${e.padding}px 0`},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${e.marginXXS}px`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{cursor:"not-allowed",[`p${t}-drag-icon ${n}, p${t}-text, p${t}-hint `]:{color:e.colorTextDisabled}}}}}},ir=e=>{const{componentCls:t,antCls:n,iconCls:r,fontSize:o,lineHeight:l}=e,i=`${t}-list-item`,s=`${i}-actions`,u=`${i}-action`,b=Math.round(o*l);return{[`${t}-wrapper`]:{[`${t}-list`]:P(P({},Ke()),{lineHeight:e.lineHeight,[i]:{position:"relative",height:e.lineHeight*o,marginTop:e.marginXS,fontSize:o,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,"&:hover":{backgroundColor:e.controlItemBgHover},[`${i}-name`]:P(P({},et),{padding:`0 ${e.paddingXS}px`,lineHeight:l,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[s]:{[u]:{opacity:0},[`${u}${n}-btn-sm`]:{height:b,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[` ${u}:focus, &.picture ${u} `]:{opacity:1},[r]:{color:e.colorTextDescription,transition:`all ${e.motionDurationSlow}`},[`&:hover ${r}`]:{color:e.colorText}},[`${t}-icon ${r}`]:{color:e.colorTextDescription,fontSize:o},[`${i}-progress`]:{position:"absolute",bottom:-e.uploadProgressOffset,width:"100%",paddingInlineStart:o+e.paddingXS,fontSize:o,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${i}:hover ${u}`]:{opacity:1,color:e.colorText},[`${i}-error`]:{color:e.colorError,[`${i}-name, ${t}-icon ${r}`]:{color:e.colorError},[s]:{[`${r}, ${r}:hover`]:{color:e.colorError},[u]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Ve=new Oe("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),Ge=new Oe("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),lr=e=>{const{componentCls:t}=e,n=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${n}-appear, ${n}-enter`]:{animationName:Ve},[`${n}-leave`]:{animationName:Ge}}},Ve,Ge]},ar=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:o}=e,l=`${t}-list`,i=`${l}-item`;return{[`${t}-wrapper`]:{[`${l}${l}-picture, ${l}${l}-picture-card`]:{[i]:{position:"relative",height:r+e.lineWidth*2+e.paddingXS*2,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${i}-thumbnail`]:P(P({},et),{width:r,height:r,lineHeight:`${r+e.paddingSM}px`,textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${i}-progress`]:{bottom:o,width:`calc(100% - ${e.paddingSM*2}px)`,marginTop:0,paddingInlineStart:r+e.paddingXS}},[`${i}-error`]:{borderColor:e.colorError,[`${i}-thumbnail ${n}`]:{"svg path[fill='#e6f7ff']":{fill:e.colorErrorBg},"svg path[fill='#1890ff']":{fill:e.colorError}}},[`${i}-uploading`]:{borderStyle:"dashed",[`${i}-name`]:{marginBottom:o}}}}}},sr=e=>{const{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:o}=e,l=`${t}-list`,i=`${l}-item`,s=e.uploadPicCardSize;return{[`${t}-wrapper${t}-picture-card-wrapper`]:P(P({},Ke()),{display:"inline-block",width:"100%",[`${t}${t}-select`]:{width:s,height:s,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${l}${l}-picture-card`]:{[`${l}-item-container`]:{display:"inline-block",width:s,height:s,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[i]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${e.paddingXS*2}px)`,height:`calc(100% - ${e.paddingXS*2}px)`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${i}:hover`]:{[`&::before, ${i}-actions`]:{opacity:1}},[`${i}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`${n}-eye, ${n}-download, ${n}-delete`]:{zIndex:10,width:r,margin:`0 ${e.marginXXS}px`,fontSize:r,cursor:"pointer",transition:`all ${e.motionDurationSlow}`}},[`${i}-actions, ${i}-actions:hover`]:{[`${n}-eye, ${n}-download, ${n}-delete`]:{color:new Mt(o).setAlpha(.65).toRgbString(),"&:hover":{color:o}}},[`${i}-thumbnail, ${i}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${i}-name`]:{display:"none",textAlign:"center"},[`${i}-file + ${i}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${e.paddingXS*2}px)`},[`${i}-uploading`]:{[`&${i}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${i}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${e.paddingXS*2}px)`,paddingInlineStart:0}}})}},cr=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},ur=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:P(P({},Qe(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},dr=Ye("Upload",e=>{const{fontSizeHeading3:t,fontSize:n,lineHeight:r,lineWidth:o,controlHeightLG:l}=e,i=Math.round(n*r),s=Je(e,{uploadThumbnailSize:t*2,uploadProgressOffset:i/2+o,uploadPicCardSize:l*2.55});return[ur(s),or(s),ar(s),sr(s),ir(s),lr(s),cr(s),Wt(s)]});var pr=function(e,t,n,r){function o(l){return l instanceof n?l:new n(function(i){i(l)})}return new(n||(n=Promise))(function(l,i){function s(d){try{b(r.next(d))}catch(I){i(I)}}function u(d){try{b(r.throw(d))}catch(I){i(I)}}function b(d){d.done?l(d.value):o(d.value).then(s,u)}b((r=r.apply(e,t||[])).next())})},fr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{var f;return(f=u.value)!==null&&f!==void 0?f:I.value}),[g,F]=Ht(e.defaultFileList||[],{value:Ut(e,"fileList"),postState:f=>{const w=Date.now();return(f!=null?f:[]).map(($,C)=>(!$.uid&&!Object.isFrozen($)&&($.uid=`__AUTO__${w}_${C}__`),$))}}),a=K("drop"),v=K(null);me(()=>{ce(e.fileList!==void 0||r.value===void 0,"Upload","`value` is not a valid prop, do you mean `fileList`?"),ce(e.transformFile===void 0,"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly."),ce(e.remove===void 0,"Upload","`remove` props is deprecated. Please use `remove` event.")});const R=(f,w,$)=>{var C,x;let A=[...w];e.maxCount===1?A=A.slice(-1):e.maxCount&&(A=A.slice(0,e.maxCount)),F(A);const E={file:f,fileList:A};$&&(E.event=$),(C=e["onUpdate:fileList"])===null||C===void 0||C.call(e,E.fileList),(x=e.onChange)===null||x===void 0||x.call(e,E),l.onFieldChange()},p=(f,w)=>pr(this,void 0,void 0,function*(){const{beforeUpload:$,transformFile:C}=e;let x=f;if($){const A=yield $(f,w);if(A===!1)return!1;if(delete f[oe],A===oe)return Object.defineProperty(f,oe,{value:!0,configurable:!0}),!1;typeof A=="object"&&A&&(x=A)}return C&&(x=yield C(x)),x}),h=f=>{const w=f.filter(x=>!x.file[oe]);if(!w.length)return;const $=w.map(x=>ae(x.file));let C=[...g.value];$.forEach(x=>{C=se(x,C)}),$.forEach((x,A)=>{let E=x;if(w[A].parsedFile)x.status="uploading";else{const{originFileObj:j}=x;let U;try{U=new File([j],j.name,{type:j.type})}catch(q){U=new Blob([j],{type:j.type}),U.name=j.name,U.lastModifiedDate=new Date,U.lastModified=new Date().getTime()}U.uid=x.uid,E=U}R(E,C)})},m=(f,w,$)=>{try{typeof f=="string"&&(f=JSON.parse(f))}catch(A){}if(!Ce(w,g.value))return;const C=ae(w);C.status="done",C.percent=100,C.response=f,C.xhr=$;const x=se(C,g.value);R(C,x)},S=(f,w)=>{if(!Ce(w,g.value))return;const $=ae(w);$.status="uploading",$.percent=f.percent;const C=se($,g.value);R($,C,f)},_=(f,w,$)=>{if(!Ce($,g.value))return;const C=ae($);C.error=f,C.response=w,C.status="error";const x=se(C,g.value);R(C,x)},L=f=>{let w;const $=e.onRemove||e.remove;Promise.resolve(typeof $=="function"?$(f):$).then(C=>{var x,A;if(C===!1)return;const E=qn(f,g.value);E&&(w=P(P({},f),{status:"removed"}),(x=g.value)===null||x===void 0||x.forEach(j=>{const U=w.uid!==void 0?"uid":"name";j[U]===w[U]&&!Object.isFrozen(j)&&(j.status="removed")}),(A=v.value)===null||A===void 0||A.abort(w),R(w,E))})},k=f=>{var w;a.value=f.type,f.type==="drop"&&((w=e.onDrop)===null||w===void 0||w.call(e,f))};o({onBatchStart:h,onSuccess:m,onProgress:S,onError:_,fileList:g,upload:v});const[M]=Ft("Upload",Rt.Upload,T(()=>e.locale)),N=(f,w)=>{const{removeIcon:$,previewIcon:C,downloadIcon:x,previewFile:A,onPreview:E,onDownload:j,isImageUrl:U,progress:q,itemRender:ee,iconRender:X,showUploadList:V}=e,{showDownloadIcon:Y,showPreviewIcon:ne,showRemoveIcon:ye}=typeof V=="boolean"?{}:V;return V?c(rr,{prefixCls:i.value,listType:e.listType,items:g.value,previewFile:A,onPreview:E,onDownload:j,onRemove:L,showRemoveIcon:!y.value&&ye,showPreviewIcon:ne,showDownloadIcon:Y,removeIcon:$,previewIcon:C,downloadIcon:x,iconRender:X,locale:M.value,isImageUrl:U,progress:q,itemRender:ee,appendActionVisible:w,appendAction:f},P({},n)):f==null?void 0:f()};return()=>{var f,w,$;const{listType:C,type:x}=e,{class:A,style:E}=r,j=fr(r,["class","style"]),U=P(P(P({onBatchStart:h,onError:_,onProgress:S,onSuccess:m},j),e),{id:(f=e.id)!==null&&f!==void 0?f:l.id.value,prefixCls:i.value,beforeUpload:p,onChange:void 0,disabled:y.value});delete U.remove,(!n.default||y.value)&&delete U.id;const q={[`${i.value}-rtl`]:s.value==="rtl"};if(x==="drag"){const Y=re(i.value,{[`${i.value}-drag`]:!0,[`${i.value}-drag-uploading`]:g.value.some(ne=>ne.status==="uploading"),[`${i.value}-drag-hover`]:a.value==="dragover",[`${i.value}-disabled`]:y.value,[`${i.value}-rtl`]:s.value==="rtl"},r.class,d.value);return b(c("span",D(D({},r),{},{class:re(`${i.value}-wrapper`,q,A,d.value)}),[c("div",{class:Y,onDrop:k,onDragover:k,onDragleave:k,style:r.style},[c(ze,D(D({},U),{},{ref:v,class:`${i.value}-btn`}),D({default:()=>[c("div",{class:`${i.value}-drag-container`},[(w=n.default)===null||w===void 0?void 0:w.call(n)])]},n))]),N()]))}const ee=re(i.value,{[`${i.value}-select`]:!0,[`${i.value}-select-${C}`]:!0,[`${i.value}-disabled`]:y.value,[`${i.value}-rtl`]:s.value==="rtl"}),X=Tt(($=n.default)===null||$===void 0?void 0:$.call(n)),V=Y=>c("div",{class:ee,style:Y},[c(ze,D(D({},U),{},{ref:v}),n)]);return b(C==="picture-card"?c("span",D(D({},r),{},{class:re(`${i.value}-wrapper`,`${i.value}-picture-card-wrapper`,q,r.class,d.value)}),[N(V,!!(X&&X.length))]):c("span",D(D({},r),{},{class:re(`${i.value}-wrapper`,q,r.class,d.value)}),[V(X&&X.length?void 0:{display:"none"}),N()]))}}});var qe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{const{height:o}=e,l=qe(e,["height"]),{style:i}=r,s=qe(r,["style"]),u=P(P(P({},l),s),{type:"drag",style:P(P({},i),{height:typeof o=="number"?`${o}px`:o})});return c(ue,u,n)}}}),jr=de,_r=P(ue,{Dragger:de,LIST_IGNORE:oe,install(e){return e.component(ue.name,ue),e.component(de.name,de),e}});export{jr as UploadDragger,_r as default};