You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

21 lines
39 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[417],{3089:function(jt,Me,d){d.d(Me,{Z:function(){return Te}});var i=d(1413),ee=d(67294),fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},ze=fe,N=d(91146),K=function($e,Fe){return ee.createElement(N.Z,(0,i.Z)((0,i.Z)({},$e),{},{ref:Fe,icon:ze}))},Pe=ee.forwardRef(K),Te=Pe},66309:function(jt,Me,d){d.d(Me,{Z:function(){return yt}});var i=d(67294),ee=d(93967),fe=d.n(ee),ze=d(98423),N=d(98787),K=d(69760),Pe=d(96159),Te=d(45353),z=d(53124),$e=d(54548),Fe=d(10274),D=d(14747),ut=d(45503),Ae=d(91945);const qe=c=>{const{paddingXXS:$,lineWidth:O,tagPaddingHorizontal:v,componentCls:C,calc:te}=c,R=te(v).sub(O).equal(),se=te($).sub(O).equal();return{[C]:Object.assign(Object.assign({},(0,D.Wf)(c)),{display:"inline-block",height:"auto",marginInlineEnd:c.marginXS,paddingInline:R,fontSize:c.tagFontSize,lineHeight:c.tagLineHeight,whiteSpace:"nowrap",background:c.defaultBg,border:`${(0,$e.bf)(c.lineWidth)} ${c.lineType} ${c.colorBorder}`,borderRadius:c.borderRadiusSM,opacity:1,transition:`all ${c.motionDurationMid}`,textAlign:"start",position:"relative",[`&${C}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:c.defaultColor},[`${C}-close-icon`]:{marginInlineStart:se,fontSize:c.tagIconSize,color:c.colorTextDescription,cursor:"pointer",transition:`all ${c.motionDurationMid}`,"&:hover":{color:c.colorTextHeading}},[`&${C}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${c.iconCls}-close, ${c.iconCls}-close:hover`]:{color:c.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${C}-checkable-checked):hover`]:{color:c.colorPrimary,backgroundColor:c.colorFillSecondary},"&:active, &-checked":{color:c.colorTextLightSolid},"&-checked":{backgroundColor:c.colorPrimary,"&:hover":{backgroundColor:c.colorPrimaryHover}},"&:active":{backgroundColor:c.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${c.iconCls} + span, > span + ${c.iconCls}`]:{marginInlineStart:R}}),[`${C}-borderless`]:{borderColor:"transparent",background:c.tagBorderlessBg}}},He=c=>{const{lineWidth:$,fontSizeIcon:O,calc:v}=c,C=c.fontSizeSM;return(0,ut.TS)(c,{tagFontSize:C,tagLineHeight:(0,$e.bf)(v(c.lineHeightSM).mul(C).equal()),tagIconSize:v(O).sub(v($).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:c.defaultBg})},Be=c=>({defaultBg:new Fe.C(c.colorFillQuaternary).onBackground(c.colorBgContainer).toHexString(),defaultColor:c.colorText});var ke=(0,Ae.I$)("Tag",c=>{const $=He(c);return qe($)},Be),pt=function(c,$){var O={};for(var v in c)Object.prototype.hasOwnProperty.call(c,v)&&$.indexOf(v)<0&&(O[v]=c[v]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function")for(var C=0,v=Object.getOwnPropertySymbols(c);C<v.length;C++)$.indexOf(v[C])<0&&Object.prototype.propertyIsEnumerable.call(c,v[C])&&(O[v[C]]=c[v[C]]);return O},ft=i.forwardRef((c,$)=>{const{prefixCls:O,style:v,className:C,checked:te,onChange:R,onClick:se}=c,re=pt(c,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:we,tag:J}=i.useContext(z.E_),Se=We=>{R==null||R(!te),se==null||se(We)},ce=we("tag",O),[Xe,Z,oe]=ke(ce),Ve=fe()(ce,`${ce}-checkable`,{[`${ce}-checkable-checked`]:te},J==null?void 0:J.className,C,Z,oe);return Xe(i.createElement("span",Object.assign({},re,{ref:$,style:Object.assign(Object.assign({},v),J==null?void 0:J.style),className:Ve,onClick:Se})))}),et=d(98719);const mt=c=>(0,et.Z)(c,($,O)=>{let{textColor:v,lightBorderColor:C,lightColor:te,darkColor:R}=O;return{[`${c.componentCls}${c.componentCls}-${$}`]:{color:v,background:te,borderColor:C,"&-inverse":{color:c.colorTextLightSolid,background:R,borderColor:R},[`&${c.componentCls}-borderless`]:{borderColor:"transparent"}}}});var gt=(0,Ae.bk)(["Tag","preset"],c=>{const $=He(c);return mt($)},Be);function vt(c){return typeof c!="string"?c:c.charAt(0).toUpperCase()+c.slice(1)}const De=(c,$,O)=>{const v=vt(O);return{[`${c.componentCls}${c.componentCls}-${$}`]:{color:c[`color${O}`],background:c[`color${v}Bg`],borderColor:c[`color${v}Border`],[`&${c.componentCls}-borderless`]:{borderColor:"transparent"}}}};var ht=(0,Ae.bk)(["Tag","status"],c=>{const $=He(c);return[De($,"success","Success"),De($,"processing","Info"),De($,"error","Error"),De($,"warning","Warning")]},Be),bt=function(c,$){var O={};for(var v in c)Object.prototype.hasOwnProperty.call(c,v)&&$.indexOf(v)<0&&(O[v]=c[v]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function")for(var C=0,v=Object.getOwnPropertySymbols(c);C<v.length;C++)$.indexOf(v[C])<0&&Object.prototype.propertyIsEnumerable.call(c,v[C])&&(O[v[C]]=c[v[C]]);return O};const nt=i.forwardRef((c,$)=>{const{prefixCls:O,className:v,rootClassName:C,style:te,children:R,icon:se,color:re,onClose:we,bordered:J=!0,visible:Se}=c,ce=bt(c,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:Xe,direction:Z,tag:oe}=i.useContext(z.E_),[Ve,We]=i.useState(!0),Ct=(0,ze.Z)(ce,["closeIcon","closable"]);i.useEffect(()=>{Se!==void 0&&We(Se)},[Se]);const rt=(0,N.o2)(re),$t=(0,N.yT)(re),Ge=rt||$t,ot=Object.assign(Object.assign({backgroundColor:re&&!Ge?re:void 0},oe==null?void 0:oe.style),te),Y=Xe("tag",O),[wt,Nt,St]=ke(Y),It=fe()(Y,oe==null?void 0:oe.className,{[`${Y}-${re}`]:Ge,[`${Y}-has-color`]:re&&!Ge,[`${Y}-hidden`]:!Ve,[`${Y}-rtl`]:Z==="rtl",[`${Y}-borderless`]:!J},v,C,Nt,St),at=me=>{me.stopPropagation(),we==null||we(me),!me.defaultPrevented&&We(!1)},[,Ot]=(0,K.Z)((0,K.w)(c),(0,K.w)(oe),{closable:!1,closeIconRender:me=>{const xt=i.createElement("span",{className:`${Y}-close-icon`,onClick:at},me);return(0,Pe.wm)(me,xt,ae=>({onClick:st=>{var Ke;(Ke=ae==null?void 0:ae.onClick)===null||Ke===void 0||Ke.call(ae,st),at(st)},className:fe()(ae==null?void 0:ae.className,`${Y}-close-icon`)}))}}),Et=typeof ce.onClick=="function"||R&&R.type==="a",it=se||null,Ie=it?i.createElement(i.Fragment,null,it,R&&i.createElement("span",null,R)):R,lt=i.createElement("span",Object.assign({},Ct,{ref:$,className:It,style:ot}),Ie,Ot,rt&&i.createElement(gt,{key:"preset",prefixCls:Y}),$t&&i.createElement(ht,{key:"status",prefixCls:Y}));return wt(Et?i.createElement(Te.Z,{component:"Tag"},lt):lt)});nt.CheckableTag=ft;var yt=nt},66476:function(jt,Me,d){d.d(Me,{Z:function(){return In}});var i=d(67294),ee=d(74902),fe=d(73935),ze=d(93967),N=d.n(ze),K=d(87462),Pe=d(15671),Te=d(43144),z=d(97326),$e=d(60136),Fe=d(29388),D=d(4942),ut=d(1413),Ae=d(91),qe=d(74165),He=d(71002),Be=d(15861),ke=d(64217),pt=d(80334),_e=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),o=e.name||"",l=e.type||"",a=l.replace(/\/.*$/,"");return r.some(function(s){var n=s.trim();if(/^\*(\/\*)?$/.test(s))return!0;if(n.charAt(0)==="."){var p=o.toLowerCase(),u=n.toLowerCase(),f=[u];return(u===".jpg"||u===".jpeg")&&(f=[".jpg",".jpeg"]),f.some(function(b){return p.endsWith(b)})}return/\/\*$/.test(n)?a===n.replace(/\/.*$/,""):l===n?!0:/^\w+$/.test(n)?((0,pt.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(n,"'.Skip for check.")),!0):!1})}return!0};function ft(e,t){var r="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),o=new Error(r);return o.status=t.status,o.method=e.method,o.url=e.action,o}function et(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(r){return t}}function mt(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(a){a.total>0&&(a.percent=a.loaded/a.total*100),e.onProgress(a)});var r=new FormData;e.data&&Object.keys(e.data).forEach(function(l){var a=e.data[l];if(Array.isArray(a)){a.forEach(function(s){r.append("".concat(l,"[]"),s)});return}r.append(l,a)}),e.file instanceof Blob?r.append(e.filename,e.file,e.file.name):r.append(e.filename,e.file),t.onerror=function(a){e.onError(a)},t.onload=function(){return t.status<200||t.status>=300?e.onError(ft(e,t),et(t)):e.onSuccess(et(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var o=e.headers||{};return o["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(o).forEach(function(l){o[l]!==null&&t.setRequestHeader(l,o[l])}),t.send(r),{abort:function(){t.abort()}}}function gt(e,t){var r=e.createReader(),o=[];function l(){r.readEntries(function(a){var s=Array.prototype.slice.apply(a);o=o.concat(s);var n=!s.length;n?t(o):l()})}l()}var vt=function(t,r,o){var l=function a(s,n){s&&(s.path=n||"",s.isFile?s.file(function(p){o(p)&&(s.fullPath&&!p.webkitRelativePath&&(Object.defineProperties(p,{webkitRelativePath:{writable:!0}}),p.webkitRelativePath=s.fullPath.replace(/^\//,""),Object.defineProperties(p,{webkitRelativePath:{writable:!1}})),r([p]))}):s.isDirectory&&gt(s,function(p){p.forEach(function(u){a(u,"".concat(n).concat(s.name,"/"))})}))};t.forEach(function(a){l(a.webkitGetAsEntry())})},De=vt,ht=+new Date,bt=0;function tt(){return"rc-upload-".concat(ht,"-").concat(++bt)}var nt=["component","prefixCls","className","classNames","disabled","id","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],yt=function(e){(0,$e.Z)(r,e);var t=(0,Fe.Z)(r);function r(){var o;(0,Pe.Z)(this,r);for(var l=arguments.length,a=new Array(l),s=0;s<l;s++)a[s]=arguments[s];return o=t.call.apply(t,[this].concat(a)),(0,D.Z)((0,z.Z)(o),"state",{uid:tt()}),(0,D.Z)((0,z.Z)(o),"reqs",{}),(0,D.Z)((0,z.Z)(o),"fileInput",void 0),(0,D.Z)((0,z.Z)(o),"_isMounted",void 0),(0,D.Z)((0,z.Z)(o),"onChange",function(n){var p=o.props,u=p.accept,f=p.directory,b=n.target.files,w=(0,ee.Z)(b).filter(function(E){return!f||_e(E,u)});o.uploadFiles(w),o.reset()}),(0,D.Z)((0,z.Z)(o),"onClick",function(n){var p=o.fileInput;if(p){var u=n.target,f=o.props.onClick;if(u&&u.tagName==="BUTTON"){var b=p.parentNode;b.focus(),u.blur()}p.click(),f&&f(n)}}),(0,D.Z)((0,z.Z)(o),"onKeyDown",function(n){n.key==="Enter"&&o.onClick(n)}),(0,D.Z)((0,z.Z)(o),"onFileDrop",function(n){var p=o.props.multiple;if(n.preventDefault(),n.type!=="dragover")if(o.props.directory)De(Array.prototype.slice.call(n.dataTransfer.items),o.uploadFiles,function(f){return _e(f,o.props.accept)});else{var u=(0,ee.Z)(n.dataTransfer.files).filter(function(f){return _e(f,o.props.accept)});p===!1&&(u=u.slice(0,1)),o.uploadFiles(u)}}),(0,D.Z)((0,z.Z)(o),"uploadFiles",function(n){var p=(0,ee.Z)(n),u=p.map(function(f){return f.uid=tt(),o.processFile(f,p)});Promise.all(u).then(function(f){var b=o.props.onBatchStart;b==null||b(f.map(function(w){var E=w.origin,A=w.parsedFile;return{file:E,parsedFile:A}})),f.filter(function(w){return w.parsedFile!==null}).forEach(function(w){o.post(w)})})}),(0,D.Z)((0,z.Z)(o),"processFile",function(){var n=(0,Be.Z)((0,qe.Z)().mark(function p(u,f){var b,w,E,A,Q,q,L,H,B;return(0,qe.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(b=o.props.beforeUpload,w=u,!b){h.next=14;break}return h.prev=3,h.next=6,b(u,f);case 6:w=h.sent,h.next=12;break;case 9:h.prev=9,h.t0=h.catch(3),w=!1;case 12:if(w!==!1){h.next=14;break}return h.abrupt("return",{origin:u,parsedFile:null,action:null,data:null});case 14:if(E=o.props.action,typeof E!="function"){h.next=21;break}return h.next=18,E(u);case 18:A=h.sent,h.next=22;break;case 21:A=E;case 22:if(Q=o.props.data,typeof Q!="function"){h.next=29;break}return h.next=26,Q(u);case 26:q=h.sent,h.next=30;break;case 29:q=Q;case 30:return L=((0,He.Z)(w)==="object"||typeof w=="string")&&w?w:u,L instanceof File?H=L:H=new File([L],u.name,{type:u.type}),B=H,B.uid=u.uid,h.abrupt("return",{origin:u,data:q,parsedFile:B,action:A});case 35:case"end":return h.stop()}},p,null,[[3,9]])}));return function(p,u){return n.apply(this,arguments)}}()),(0,D.Z)((0,z.Z)(o),"saveFileInput",function(n){o.fileInput=n}),o}return(0,Te.Z)(r,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(l){var a=this,s=l.data,n=l.origin,p=l.action,u=l.parsedFile;if(this._isMounted){var f=this.props,b=f.onStart,w=f.customRequest,E=f.name,A=f.headers,Q=f.withCredentials,q=f.method,L=n.uid,H=w||mt,B={action:p,filename:E,data:s,file:u,headers:A,withCredentials:Q,method:q||"post",onProgress:function(h){var X=a.props.onProgress;X==null||X(h,u)},onSuccess:function(h,X){var T=a.props.onSuccess;T==null||T(h,u,X),delete a.reqs[L]},onError:function(h,X){var T=a.props.onError;T==null||T(h,X,u),delete a.reqs[L]}};b(n),this.reqs[L]=H(B)}}},{key:"reset",value:function(){this.setState({uid:tt()})}},{key:"abort",value:function(l){var a=this.reqs;if(l){var s=l.uid?l.uid:l;a[s]&&a[s].abort&&a[s].abort(),delete a[s]}else Object.keys(a).forEach(function(n){a[n]&&a[n].abort&&a[n].abort(),delete a[n]})}},{key:"render",value:function(){var l,a=this.props,s=a.component,n=a.prefixCls,p=a.className,u=a.classNames,f=u===void 0?{}:u,b=a.disabled,w=a.id,E=a.style,A=a.styles,Q=A===void 0?{}:A,q=a.multiple,L=a.accept,H=a.capture,B=a.children,U=a.directory,h=a.openFileDialogOnClick,X=a.onMouseEnter,T=a.onMouseLeave,ie=a.hasControlInside,le=(0,Ae.Z)(a,nt),V=N()((l={},(0,D.Z)(l,n,!0),(0,D.Z)(l,"".concat(n,"-disabled"),b),(0,D.Z)(l,p,p),l)),ve=U?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Oe=b?{}:{onClick:h?this.onClick:function(){},onKeyDown:h?this.onKeyDown:function(){},onMouseEnter:X,onMouseLeave:T,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:ie?void 0:"0"};return i.createElement(s,(0,K.Z)({},Oe,{className:V,role:ie?void 0:"button",style:E}),i.createElement("input",(0,K.Z)({},(0,ke.Z)(le,{aria:!0,data:!0}),{id:w,disabled:b,type:"file",ref:this.saveFileInput,onClick:function(de){return de.stopPropagation()},key:this.state.uid,style:(0,ut.Z)({display:"none"},Q.input),className:f.input,accept:L},ve,{multiple:q,onChange:this.onChange},H!=null?{capture:H}:{})),B)}}]),r}(i.Component),c=yt;function $(){}var O=function(e){(0,$e.Z)(r,e);var t=(0,Fe.Z)(r);function r(){var o;(0,Pe.Z)(this,r);for(var l=arguments.length,a=new Array(l),s=0;s<l;s++)a[s]=arguments[s];return o=t.call.apply(t,[this].concat(a)),(0,D.Z)((0,z.Z)(o),"uploader",void 0),(0,D.Z)((0,z.Z)(o),"saveUploader",function(n){o.uploader=n}),o}return(0,Te.Z)(r,[{key:"abort",value:function(l){this.uploader.abort(l)}},{key:"render",value:function(){return i.createElement(c,(0,K.Z)({},this.props,{ref:this.saveUploader}))}}]),r}(i.Component);(0,D.Z)(O,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:$,onError:$,onSuccess:$,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var v=O,C=v,te=d(21770),R=d(53124),se=d(98866),re=d(10110),we=d(24457),J=d(14747),Se=d(33507),ce=d(91945),Xe=d(45503),Z=d(54548),Ve=e=>{const{componentCls:t,iconCls:r}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${(0,Z.bf)(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${(0,Z.bf)(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`
&:not(${t}-disabled):hover,
&-hover:not(${t}-disabled)
`]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[r]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${(0,Z.bf)(e.marginXXS)}`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{[`p${t}-drag-icon ${r},
p${t}-text,
p${t}-hint
`]:{color:e.colorTextDisabled}}}}}},Ct=e=>{const{componentCls:t,antCls:r,iconCls:o,fontSize:l,lineHeight:a,calc:s}=e,n=`${t}-list-item`,p=`${n}-actions`,u=`${n}-action`,f=e.fontHeightSM;return{[`${t}-wrapper`]:{[`${t}-list`]:Object.assign(Object.assign({},(0,J.dF)()),{lineHeight:e.lineHeight,[n]:{position:"relative",height:s(e.lineHeight).mul(l).equal(),marginTop:e.marginXS,fontSize:l,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,"&:hover":{backgroundColor:e.controlItemBgHover},[`${n}-name`]:Object.assign(Object.assign({},J.vS),{padding:`0 ${(0,Z.bf)(e.paddingXS)}`,lineHeight:a,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[p]:{whiteSpace:"nowrap",[u]:{opacity:0},[o]:{color:e.actionsColor,transition:`all ${e.motionDurationSlow}`},[`
${u}:focus-visible,
&.picture ${u}
`]:{opacity:1},[`${u}${r}-btn`]:{height:f,border:0,lineHeight:1}},[`${t}-icon ${o}`]:{color:e.colorTextDescription,fontSize:l},[`${n}-progress`]:{position:"absolute",bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:s(l).add(e.paddingXS).equal(),fontSize:l,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${n}:hover ${u}`]:{opacity:1},[`${n}-error`]:{color:e.colorError,[`${n}-name, ${t}-icon ${o}`]:{color:e.colorError},[p]:{[`${o}, ${o}: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:'""'}}})}}},rt=d(16932),Ge=e=>{const{componentCls:t}=e,r=new Z.E4("uploadAnimateInlineIn",{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),o=new Z.E4("uploadAnimateInlineOut",{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),l=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${l}-appear, ${l}-enter, ${l}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${l}-appear, ${l}-enter`]:{animationName:r},[`${l}-leave`]:{animationName:o}}},{[`${t}-wrapper`]:(0,rt.J$)(e)},r,o]},ot=d(78589);const Y=e=>{const{componentCls:t,iconCls:r,uploadThumbnailSize:o,uploadProgressOffset:l,calc:a}=e,s=`${t}-list`,n=`${s}-item`;return{[`${t}-wrapper`]:{[`
${s}${s}-picture,
${s}${s}-picture-card,
${s}${s}-picture-circle
`]:{[n]:{position:"relative",height:a(o).add(a(e.lineWidth).mul(2)).add(a(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${(0,Z.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${n}-thumbnail`]:Object.assign(Object.assign({},J.vS),{width:o,height:o,lineHeight:(0,Z.bf)(a(o).add(e.paddingSM).equal()),textAlign:"center",flex:"none",[r]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${n}-progress`]:{bottom:l,width:`calc(100% - ${(0,Z.bf)(a(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:a(o).add(e.paddingXS).equal()}},[`${n}-error`]:{borderColor:e.colorError,[`${n}-thumbnail ${r}`]:{[`svg path[fill='${ot.iN[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${ot.iN.primary}']`]:{fill:e.colorError}}},[`${n}-uploading`]:{borderStyle:"dashed",[`${n}-name`]:{marginBottom:l}}},[`${s}${s}-picture-circle ${n}`]:{[`&, &::before, ${n}-thumbnail`]:{borderRadius:"50%"}}}}},wt=e=>{const{componentCls:t,iconCls:r,fontSizeLG:o,colorTextLightSolid:l,calc:a}=e,s=`${t}-list`,n=`${s}-item`,p=e.uploadPicCardSize;return{[`
${t}-wrapper${t}-picture-card-wrapper,
${t}-wrapper${t}-picture-circle-wrapper
`]:Object.assign(Object.assign({},(0,J.dF)()),{display:"block",[`${t}${t}-select`]:{width:p,height:p,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${(0,Z.bf)(e.lineWidth)} 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}},[`${s}${s}-picture-card, ${s}${s}-picture-circle`]:{display:"flex",flexWrap:"wrap","@supports not (gap: 1px)":{"& > *":{marginBlockEnd:e.marginXS,marginInlineEnd:e.marginXS}},"@supports (gap: 1px)":{gap:e.marginXS},[`${s}-item-container`]:{display:"inline-block",width:p,height:p,verticalAlign:"top"},"&::after":{display:"none"},"&::before":{display:"none"},[n]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${(0,Z.bf)(a(e.paddingXS).mul(2).equal())})`,height:`calc(100% - ${(0,Z.bf)(a(e.paddingXS).mul(2).equal())})`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${n}:hover`]:{[`&::before, ${n}-actions`]:{opacity:1}},[`${n}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`
${r}-eye,
${r}-download,
${r}-delete
`]:{zIndex:10,width:o,margin:`0 ${(0,Z.bf)(e.marginXXS)}`,fontSize:o,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,color:l,"&:hover":{color:l},svg:{verticalAlign:"baseline"}}},[`${n}-thumbnail, ${n}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${n}-name`]:{display:"none",textAlign:"center"},[`${n}-file + ${n}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${(0,Z.bf)(a(e.paddingXS).mul(2).equal())})`},[`${n}-uploading`]:{[`&${n}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${r}-eye, ${r}-download, ${r}-delete`]:{display:"none"}},[`${n}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${(0,Z.bf)(a(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:"50%"}}}};var St=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}};const It=e=>{const{componentCls:t,colorTextDisabled:r}=e;return{[`${t}-wrapper`]:Object.assign(Object.assign({},(0,J.Wf)(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-disabled`]:{color:r,cursor:"not-allowed"}})}},at=e=>({actionsColor:e.colorTextDescription});var Ot=(0,ce.I$)("Upload",e=>{const{fontSizeHeading3:t,fontHeight:r,lineWidth:o,controlHeightLG:l,calc:a}=e,s=(0,Xe.TS)(e,{uploadThumbnailSize:a(t).mul(2).equal(),uploadProgressOffset:a(a(r).div(2)).add(o).equal(),uploadPicCardSize:a(l).mul(2.55).equal()});return[It(s),Ve(s),Y(s),wt(s),Ct(s),Ge(s),St(s),(0,Se.Z)(s)]},at),Et={icon:function(t,r){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:r}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"},it=Et,Ie=d(93771),lt=function(t,r){return i.createElement(Ie.Z,(0,K.Z)({},t,{ref:r,icon:it}))},me=i.forwardRef(lt),xt=me,ae=d(19267),st={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"},Ke=st,Vt=function(t,r){return i.createElement(Ie.Z,(0,K.Z)({},t,{ref:r,icon:Ke}))},Wt=i.forwardRef(Vt),Gt=Wt,Kt={icon:function(t,r){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:r}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:r}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:r}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"},Jt=Kt,Qt=function(t,r){return i.createElement(Ie.Z,(0,K.Z)({},t,{ref:r,icon:Jt}))},Yt=i.forwardRef(Qt),qt=Yt,Pt=d(82225),kt=d(57838),_t=d(33603),Lt=d(96159),Ut=d(14726);function ct(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function dt(e,t){const r=(0,ee.Z)(t),o=r.findIndex(l=>{let{uid:a}=l;return a===e.uid});return o===-1?r.push(e):r[o]=e,r}function Tt(e,t){const r=e.uid!==void 0?"uid":"name";return t.filter(o=>o[r]===e[r])[0]}function en(e,t){const r=e.uid!==void 0?"uid":"name",o=t.filter(l=>l[r]!==e[r]);return o.length===t.length?null:o}const tn=function(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),o=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(o)||[""])[0]},Mt=e=>e.indexOf("image/")===0,nn=e=>{if(e.type&&!e.thumbUrl)return Mt(e.type);const t=e.thumbUrl||e.url||"",r=tn(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(r)?!0:!(/^data:/.test(t)||r)},ge=200;function rn(e){return new Promise(t=>{if(!e.type||!Mt(e.type)){t("");return}const r=document.createElement("canvas");r.width=ge,r.height=ge,r.style.cssText=`position: fixed; left: 0; top: 0; width: ${ge}px; height: ${ge}px; z-index: 9999; display: none;`,document.body.appendChild(r);const o=r.getContext("2d"),l=new Image;if(l.onload=()=>{const{width:a,height:s}=l;let n=ge,p=ge,u=0,f=0;a>s?(p=s*(ge/a),f=-(p-n)/2):(n=a*(ge/s),u=-(n-p)/2),o.drawImage(l,u,f,n,p);const b=r.toDataURL();document.body.removeChild(r),window.URL.revokeObjectURL(l.src),t(b)},l.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const a=new FileReader;a.onload=()=>{a.result&&typeof a.result=="string"&&(l.src=a.result)},a.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){const a=new FileReader;a.onload=()=>{a.result&&t(a.result)},a.readAsDataURL(e)}else l.src=window.URL.createObjectURL(e)})}var on=d(47046),an=function(t,r){return i.createElement(Ie.Z,(0,K.Z)({},t,{ref:r,icon:on.Z}))},ln=i.forwardRef(an),sn=ln,cn={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"},dn=cn,un=function(t,r){return i.createElement(Ie.Z,(0,K.Z)({},t,{ref:r,icon:dn}))},pn=i.forwardRef(un),fn=pn,mn=d(1208),gn=d(38703),vn=d(83062),hn=i.forwardRef((e,t)=>{let{prefixCls:r,className:o,style:l,locale:a,listType:s,file:n,items:p,progress:u,iconRender:f,actionIconRender:b,itemRender:w,isImgUrl:E,showPreviewIcon:A,showRemoveIcon:Q,showDownloadIcon:q,previewIcon:L,removeIcon:H,downloadIcon:B,onPreview:U,onDownload:h,onClose:X}=e;var T,ie;const{status:le}=n,[V,ve]=i.useState(le);i.useEffect(()=>{le!=="removed"&&ve(le)},[le]);const[Oe,Re]=i.useState(!1);i.useEffect(()=>{const x=setTimeout(()=>{Re(!0)},300);return()=>{clearTimeout(x)}},[]);const de=f(n);let he=i.createElement("div",{className:`${r}-icon`},de);if(s==="picture"||s==="picture-card"||s==="picture-circle")if(V==="uploading"||!n.thumbUrl&&!n.url){const x=N()(`${r}-list-item-thumbnail`,{[`${r}-list-item-file`]:V!=="uploading"});he=i.createElement("div",{className:x},de)}else{const x=E!=null&&E(n)?i.createElement("img",{src:n.thumbUrl||n.url,alt:n.name,className:`${r}-list-item-image`,crossOrigin:n.crossOrigin}):de,pe=N()(`${r}-list-item-thumbnail`,{[`${r}-list-item-file`]:E&&!E(n)});he=i.createElement("a",{className:pe,onClick:Ne=>U(n,Ne),href:n.url||n.thumbUrl,target:"_blank",rel:"noopener noreferrer"},x)}const k=N()(`${r}-list-item`,`${r}-list-item-${V}`),j=typeof n.linkProps=="string"?JSON.parse(n.linkProps):n.linkProps,Ze=Q?b((typeof H=="function"?H(n):H)||i.createElement(sn,null),()=>X(n),r,a.removeFile,!0):null,je=q&&V==="done"?b((typeof B=="function"?B(n):B)||i.createElement(fn,null),()=>h(n),r,a.downloadFile):null,Qe=s!=="picture-card"&&s!=="picture-circle"&&i.createElement("span",{key:"download-delete",className:N()(`${r}-list-item-actions`,{picture:s==="picture"})},je,Ze),ne=N()(`${r}-list-item-name`),be=n.url?[i.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:ne,title:n.name},j,{href:n.url,onClick:x=>U(n,x)}),n.name),Qe]:[i.createElement("span",{key:"view",className:ne,onClick:x=>U(n,x),title:n.name},n.name),Qe],m=A&&(n.url||n.thumbUrl)?i.createElement("a",{href:n.url||n.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:x=>U(n,x),title:a.previewFile},typeof L=="function"?L(n):L||i.createElement(mn.Z,null)):null,F=(s==="picture-card"||s==="picture-circle")&&V!=="uploading"&&i.createElement("span",{className:`${r}-list-item-actions`},m,V==="done"&&je,Ze),{getPrefixCls:_}=i.useContext(R.E_),W=_(),ue=i.createElement("div",{className:k},he,be,F,Oe&&i.createElement(Pt.ZP,{motionName:`${W}-fade`,visible:V==="uploading",motionDeadline:2e3},x=>{let{className:pe}=x;const Ne="percent"in n?i.createElement(gn.Z,Object.assign({},u,{type:"line",percent:n.percent,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"]})):null;return i.createElement("div",{className:N()(`${r}-list-item-progress`,pe)},Ne)})),ye=n.response&&typeof n.response=="string"?n.response:((T=n.error)===null||T===void 0?void 0:T.statusText)||((ie=n.error)===null||ie===void 0?void 0:ie.message)||a.uploadError,Ce=V==="error"?i.createElement(vn.Z,{title:ye,getPopupContainer:x=>x.parentNode},ue):ue;return i.createElement("div",{className:N()(`${r}-list-item-container`,o),style:l,ref:t},w?w(Ce,n,p,{download:h.bind(null,n),preview:U.bind(null,n),remove:X.bind(null,n)}):Ce)});const bn=(e,t)=>{const{listType:r="text",previewFile:o=rn,onPreview:l,onDownload:a,onRemove:s,locale:n,iconRender:p,isImageUrl:u=nn,prefixCls:f,items:b=[],showPreviewIcon:w=!0,showRemoveIcon:E=!0,showDownloadIcon:A=!1,removeIcon:Q,previewIcon:q,downloadIcon:L,progress:H={size:[-1,2],showInfo:!1},appendAction:B,appendActionVisible:U=!0,itemRender:h,disabled:X}=e,T=(0,kt.Z)(),[ie,le]=i.useState(!1);i.useEffect(()=>{r!=="picture"&&r!=="picture-card"&&r!=="picture-circle"||(b||[]).forEach(m=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(m.originFileObj instanceof File||m.originFileObj)||m.thumbUrl!==void 0||o&&o(m.originFileObj).then(F=>{m.thumbUrl=F||"",T()})})},[r,b,o]),i.useEffect(()=>{le(!0)},[]);const V=(m,F)=>{if(l)return F==null||F.preventDefault(),l(m)},ve=m=>{typeof a=="function"?a(m):m.url&&window.open(m.url)},Oe=m=>{s==null||s(m)},Re=m=>{if(p)return p(m,r);const F=m.status==="uploading",_=u&&u(m)?i.createElement(qt,null):i.createElement(xt,null);let W=F?i.createElement(ae.Z,null):i.createElement(Gt,null);return r==="picture"?W=F?i.createElement(ae.Z,null):_:(r==="picture-card"||r==="picture-circle")&&(W=F?n.uploading:_),W},de=(m,F,_,W,ue)=>{const ye={type:"text",size:"small",title:W,onClick:Ce=>{var x,pe;F(),i.isValidElement(m)&&((pe=(x=m.props).onClick)===null||pe===void 0||pe.call(x,Ce))},className:`${_}-list-item-action`};if(ue&&(ye.disabled=X),i.isValidElement(m)){const Ce=(0,Lt.Tm)(m,Object.assign(Object.assign({},m.props),{onClick:()=>{}}));return i.createElement(Ut.ZP,Object.assign({},ye,{icon:Ce}))}return i.createElement(Ut.ZP,Object.assign({},ye),i.createElement("span",null,m))};i.useImperativeHandle(t,()=>({handlePreview:V,handleDownload:ve}));const{getPrefixCls:he}=i.useContext(R.E_),k=he("upload",f),j=he(),Ze=N()(`${k}-list`,`${k}-list-${r}`),je=(0,ee.Z)(b.map(m=>({key:m.uid,file:m})));let ne={motionDeadline:2e3,motionName:`${k}-${r==="picture-card"||r==="picture-circle"?"animate-inline":"animate"}`,keys:je,motionAppear:ie};const be=i.useMemo(()=>{const m=Object.assign({},(0,_t.Z)(j));return delete m.onAppearEnd,delete m.onEnterEnd,delete m.onLeaveEnd,m},[j]);return r!=="picture-card"&&r!=="picture-circle"&&(ne=Object.assign(Object.assign({},be),ne)),i.createElement("div",{className:Ze},i.createElement(Pt.V4,Object.assign({},ne,{component:!1}),m=>{let{key:F,file:_,className:W,style:ue}=m;return i.createElement(hn,{key:F,locale:n,prefixCls:k,className:W,style:ue,file:_,items:b,progress:H,listType:r,isImgUrl:u,showPreviewIcon:w,showRemoveIcon:E,showDownloadIcon:A,removeIcon:Q,previewIcon:q,downloadIcon:L,iconRender:Re,actionIconRender:de,itemRender:h,onPreview:V,onDownload:ve,onClose:Oe})}),B&&i.createElement(Pt.ZP,Object.assign({},ne,{visible:U,forceRender:!0}),m=>{let{className:F,style:_}=m;return(0,Lt.Tm)(B,W=>({className:N()(W.className,F),style:Object.assign(Object.assign(Object.assign({},_),{pointerEvents:F?"none":void 0}),W.style)}))}))};var yn=i.forwardRef(bn),Cn=function(e,t,r,o){function l(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function n(f){try{u(o.next(f))}catch(b){s(b)}}function p(f){try{u(o.throw(f))}catch(b){s(b)}}function u(f){f.done?a(f.value):l(f.value).then(n,p)}u((o=o.apply(e,t||[])).next())})};const Je=`__LIST_IGNORE_${Date.now()}__`,$n=(e,t)=>{const{fileList:r,defaultFileList:o,onRemove:l,showUploadList:a=!0,listType:s="text",onPreview:n,onDownload:p,onChange:u,onDrop:f,previewFile:b,disabled:w,locale:E,iconRender:A,isImageUrl:Q,progress:q,prefixCls:L,className:H,type:B="select",children:U,style:h,itemRender:X,maxCount:T,data:ie={},multiple:le=!1,hasControlInside:V=!0,action:ve="",accept:Oe="",supportServerRender:Re=!0,rootClassName:de}=e,he=i.useContext(se.Z),k=w!=null?w:he,[j,Ze]=(0,te.Z)(o||[],{value:r,postState:g=>g!=null?g:[]}),[je,Qe]=i.useState("drop"),ne=i.useRef(null),be=i.useRef(null);i.useMemo(()=>{const g=Date.now();(r||[]).forEach((S,P)=>{!S.uid&&!Object.isFrozen(S)&&(S.uid=`__AUTO__${g}_${P}__`)})},[r]);const m=(g,S,P)=>{let y=(0,ee.Z)(S),I=!1;T===1?y=y.slice(-1):T&&(I=y.length>T,y=y.slice(0,T)),(0,fe.flushSync)(()=>{Ze(y)});const G={file:g,fileList:y};P&&(G.event=P),(!I||g.status==="removed"||y.some(Ee=>Ee.uid===g.uid))&&(0,fe.flushSync)(()=>{u==null||u(G)})},F=(g,S)=>Cn(void 0,void 0,void 0,function*(){const{beforeUpload:P,transformFile:y}=e;let I=g;if(P){const G=yield P(g,S);if(G===!1)return!1;if(delete g[Je],G===Je)return Object.defineProperty(g,Je,{value:!0,configurable:!0}),!1;typeof G=="object"&&G&&(I=G)}return y&&(I=yield y(I)),I}),_=g=>{const S=g.filter(I=>!I.file[Je]);if(!S.length)return;const P=S.map(I=>ct(I.file));let y=(0,ee.Z)(j);P.forEach(I=>{y=dt(I,y)}),P.forEach((I,G)=>{let Ee=I;if(S[G].parsedFile)I.status="uploading";else{const{originFileObj:Ue}=I;let xe;try{xe=new File([Ue],Ue.name,{type:Ue.type})}catch(zn){xe=new Blob([Ue],{type:Ue.type}),xe.name=Ue.name,xe.lastModifiedDate=new Date,xe.lastModified=new Date().getTime()}xe.uid=I.uid,Ee=xe}m(Ee,y)})},W=(g,S,P)=>{try{typeof g=="string"&&(g=JSON.parse(g))}catch(G){}if(!Tt(S,j))return;const y=ct(S);y.status="done",y.percent=100,y.response=g,y.xhr=P;const I=dt(y,j);m(y,I)},ue=(g,S)=>{if(!Tt(S,j))return;const P=ct(S);P.status="uploading",P.percent=g.percent;const y=dt(P,j);m(P,y,g)},ye=(g,S,P)=>{if(!Tt(P,j))return;const y=ct(P);y.error=g,y.response=S,y.status="error";const I=dt(y,j);m(y,I)},Ce=g=>{let S;Promise.resolve(typeof l=="function"?l(g):l).then(P=>{var y;if(P===!1)return;const I=en(g,j);I&&(S=Object.assign(Object.assign({},g),{status:"removed"}),j==null||j.forEach(G=>{const Ee=S.uid!==void 0?"uid":"name";G[Ee]===S[Ee]&&!Object.isFrozen(G)&&(G.status="removed")}),(y=ne.current)===null||y===void 0||y.abort(S),m(S,I))})},x=g=>{Qe(g.type),g.type==="drop"&&(f==null||f(g))};i.useImperativeHandle(t,()=>({onBatchStart:_,onSuccess:W,onProgress:ue,onError:ye,fileList:j,upload:ne.current,nativeElement:be.current}));const{getPrefixCls:pe,direction:Ne,upload:Le}=i.useContext(R.E_),M=pe("upload",L),Ye=Object.assign(Object.assign({onBatchStart:_,onError:ye,onProgress:ue,onSuccess:W},e),{data:ie,multiple:le,action:ve,accept:Oe,supportServerRender:Re,prefixCls:M,disabled:k,beforeUpload:F,onChange:void 0,hasControlInside:V});delete Ye.className,delete Ye.style,(!U||k)&&delete Ye.id;const At=`${M}-wrapper`,[Dt,Ht,On]=Ot(M,At),[En]=(0,re.Z)("Upload",we.Z.Upload),{showRemoveIcon:Bt,showPreviewIcon:xn,showDownloadIcon:Pn,removeIcon:Tn,previewIcon:Fn,downloadIcon:Dn}=typeof a=="boolean"?{}:a,Rn=typeof Bt=="undefined"?!k:!!Bt,Rt=(g,S)=>a?i.createElement(yn,{prefixCls:M,listType:s,items:j,previewFile:b,onPreview:n,onDownload:p,onRemove:Ce,showRemoveIcon:Rn,showPreviewIcon:xn,showDownloadIcon:Pn,removeIcon:Tn,previewIcon:Fn,downloadIcon:Dn,iconRender:A,locale:Object.assign(Object.assign({},En),E),isImageUrl:Q,progress:q,appendAction:g,appendActionVisible:S,itemRender:X,disabled:k}):g,Zt=N()(At,H,de,Ht,On,Le==null?void 0:Le.className,{[`${M}-rtl`]:Ne==="rtl",[`${M}-picture-card-wrapper`]:s==="picture-card",[`${M}-picture-circle-wrapper`]:s==="picture-circle"}),Zn=Object.assign(Object.assign({},Le==null?void 0:Le.style),h);if(B==="drag"){const g=N()(Ht,M,`${M}-drag`,{[`${M}-drag-uploading`]:j.some(S=>S.status==="uploading"),[`${M}-drag-hover`]:je==="dragover",[`${M}-disabled`]:k,[`${M}-rtl`]:Ne==="rtl"});return Dt(i.createElement("span",{className:Zt,ref:be},i.createElement("div",{className:g,style:Zn,onDrop:x,onDragOver:x,onDragLeave:x},i.createElement(C,Object.assign({},Ye,{ref:ne,className:`${M}-btn`}),i.createElement("div",{className:`${M}-drag-container`},U))),Rt()))}const jn=N()(M,`${M}-select`,{[`${M}-disabled`]:k}),Xt=i.createElement("div",{className:jn,style:U?void 0:{display:"none"}},i.createElement(C,Object.assign({},Ye,{ref:ne})));return Dt(s==="picture-card"||s==="picture-circle"?i.createElement("span",{className:Zt,ref:be},Rt(Xt,!!U)):i.createElement("span",{className:Zt,ref:be},Xt,Rt()))};var zt=i.forwardRef($n),wn=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(e);l<o.length;l++)t.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(r[o[l]]=e[o[l]]);return r},Sn=i.forwardRef((e,t)=>{var{style:r,height:o,hasControlInside:l=!1}=e,a=wn(e,["style","height","hasControlInside"]);return i.createElement(zt,Object.assign({ref:t,hasControlInside:l},a,{type:"drag",style:Object.assign(Object.assign({},r),{height:o})}))});const Ft=zt;Ft.Dragger=Sn,Ft.LIST_IGNORE=Je;var In=Ft}}]);