mirror of https://gitee.com/topiam/eiam
32 lines
41 KiB
JavaScript
32 lines
41 KiB
JavaScript
/*
|
|
* eiam-console - Employee Identity and Access Management Program
|
|
* Copyright © 2020-2023 TopIAM (support@topiam.cn)
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[4831],{29113:function(Y,U,c){"use strict";c.d(U,{Z:function(){return F}});var a=c(5543),C=c(79685),T={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}},{tag:"path",attrs:{d:"M376.9 656.4c1.8-33.5 15.7-64.7 39.5-88.6 25.4-25.5 60-39.8 96-39.8 36.2 0 70.3 14.1 96 39.8 1.4 1.4 2.7 2.8 4.1 4.3l-25 19.6a8 8 0 003 14.1l98.2 24c5 1.2 9.9-2.6 9.9-7.7l.5-101.3c0-6.7-7.6-10.5-12.9-6.3L663 532.7c-36.6-42-90.4-68.6-150.5-68.6-107.4 0-195 85.1-199.4 191.7-.2 4.5 3.4 8.3 8 8.3H369c4.2-.1 7.7-3.4 7.9-7.7zM703 664h-47.9c-4.2 0-7.7 3.3-8 7.6-1.8 33.5-15.7 64.7-39.5 88.6-25.4 25.5-60 39.8-96 39.8-36.2 0-70.3-14.1-96-39.8-1.4-1.4-2.7-2.8-4.1-4.3l25-19.6a8 8 0 00-3-14.1l-98.2-24c-5-1.2-9.9 2.6-9.9 7.7l-.4 101.4c0 6.7 7.6 10.5 12.9 6.3l23.2-18.2c36.6 42 90.4 68.6 150.5 68.6 107.4 0 195-85.1 199.4-191.7.2-4.5-3.4-8.3-8-8.3z"}}]},name:"cloud-sync",theme:"outlined"},E=T,x=c(20165),P=function(_,L){return C.createElement(x.Z,(0,a.Z)((0,a.Z)({},_),{},{ref:L,icon:E}))};P.displayName="CloudSyncOutlined";var F=C.forwardRef(P)},75827:function(Y,U,c){"use strict";var a=c(5543),C=c(79685),T=c(43370),E=c(20165),x=function(F,Z){return C.createElement(E.Z,(0,a.Z)((0,a.Z)({},F),{},{ref:Z,icon:T.Z}))};x.displayName="DeleteOutlined",U.Z=C.forwardRef(x)},47816:function(Y,U,c){"use strict";c.d(U,{Z:function(){return F}});var a=c(5543),C=c(79685),T={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z"}}]},name:"desktop",theme:"outlined"},E=T,x=c(20165),P=function(_,L){return C.createElement(x.Z,(0,a.Z)((0,a.Z)({},_),{},{ref:L,icon:E}))};P.displayName="DesktopOutlined";var F=C.forwardRef(P)},15685:function(Y,U,c){"use strict";c.d(U,{Z:function(){return F}});var a=c(5543),C=c(79685),T={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM492 400h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zM340 368a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"profile",theme:"outlined"},E=T,x=c(20165),P=function(_,L){return C.createElement(x.Z,(0,a.Z)((0,a.Z)({},_),{},{ref:L,icon:E}))};P.displayName="ProfileOutlined";var F=C.forwardRef(P)},16228:function(Y,U,c){"use strict";var a=c(5543),C=c(79685),T=c(53353),E=c(20165),x=function(F,Z){return C.createElement(E.Z,(0,a.Z)((0,a.Z)({},F),{},{ref:Z,icon:T.Z}))};x.displayName="SafetyCertificateOutlined",U.Z=C.forwardRef(x)},829:function(Y,U,c){"use strict";var a=c(5543),C=c(79685),T=c(42245),E=c(20165),x=function(F,Z){return C.createElement(E.Z,(0,a.Z)((0,a.Z)({},F),{},{ref:Z,icon:T.Z}))};x.displayName="VerticalAlignBottomOutlined",U.Z=C.forwardRef(x)},34718:function(Y,U,c){"use strict";var a=c(5543),C=c(66105),T=c(99370),E=c(98808),x=c(79685),P=c(76488),F=c(44709),Z=c(63342),_=["options","fieldProps","proFieldProps","valueEnum"],L=x.forwardRef(function(q,ue){var pe=q.options,ce=q.fieldProps,he=q.proFieldProps,ye=q.valueEnum,de=(0,C.Z)(q,_);return(0,Z.jsx)(F.Z,(0,a.Z)({ref:ue,valueType:"checkbox",valueEnum:(0,T.h)(ye,void 0),fieldProps:(0,a.Z)({options:pe},ce),lightProps:(0,a.Z)({labelFormatter:function(){return(0,Z.jsx)(F.Z,(0,a.Z)({ref:ue,valueType:"checkbox",mode:"read",valueEnum:(0,T.h)(ye,void 0),filedConfig:{customLightMode:!0},fieldProps:(0,a.Z)({options:pe},ce),proFieldProps:he},de))}},de.lightProps),proFieldProps:he},de))}),le=x.forwardRef(function(q,ue){var pe=q.fieldProps,ce=q.children;return(0,Z.jsx)(E.Z,(0,a.Z)((0,a.Z)({ref:ue},pe),{},{children:ce}))}),ge=(0,P.G)(le,{valuePropName:"checked"}),D=ge;D.Group=L,U.Z=D},4647:function(Y,U,c){"use strict";var a=c(5543),C=c(66105),T=c(79685),E=c(44709),x=c(63342),P=["fieldProps","proFieldProps"],F=function(_,L){var le=_.fieldProps,ge=_.proFieldProps,D=(0,C.Z)(_,P);return(0,x.jsx)(E.Z,(0,a.Z)({ref:L,valueType:"textarea",fieldProps:le,proFieldProps:ge},D))};U.Z=T.forwardRef(F)},16769:function(Y,U,c){"use strict";c.d(U,{Z:function(){return an}});var a=c(79685),C=c(23570),T=c(68591),E=c.n(T),x=c(97446),P=c(3836),F=c(71320),Z=c(78001),_=c(77790),L=c(16431),le=c(66105),ge=c(17211),D=c(56151),q=c(81033),ue=c(72203);function pe(e,n){var t="cannot ".concat(e.method," ").concat(e.action," ").concat(n.status,"'"),r=new Error(t);return r.status=n.status,r.method=e.method,r.url=e.action,r}function ce(e){var n=e.responseText||e.response;if(!n)return n;try{return JSON.parse(n)}catch(t){return n}}function he(e){var n=new XMLHttpRequest;e.onProgress&&n.upload&&(n.upload.onprogress=function(s){s.total>0&&(s.percent=s.loaded/s.total*100),e.onProgress(s)});var t=new FormData;e.data&&Object.keys(e.data).forEach(function(d){var s=e.data[d];if(Array.isArray(s)){s.forEach(function(l){t.append("".concat(d,"[]"),l)});return}t.append(d,s)}),e.file instanceof Blob?t.append(e.filename,e.file,e.file.name):t.append(e.filename,e.file),n.onerror=function(s){e.onError(s)},n.onload=function(){return n.status<200||n.status>=300?e.onError(pe(e,n),ce(n)):e.onSuccess(ce(n),n)},n.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in n&&(n.withCredentials=!0);var r=e.headers||{};return r["X-Requested-With"]!==null&&n.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach(function(d){r[d]!==null&&n.setRequestHeader(d,r[d])}),n.send(t),{abort:function(){n.abort()}}}var ye=+new Date,de=0;function Ae(){return"rc-upload-".concat(ye,"-").concat(++de)}var rt=c(885),Re=function(e,n){if(e&&n){var t=Array.isArray(n)?n:n.split(","),r=e.name||"",d=e.type||"",s=d.replace(/\/.*$/,"");return t.some(function(l){var o=l.trim();if(/^\*(\/\*)?$/.test(l))return!0;if(o.charAt(0)==="."){var f=r.toLowerCase(),p=o.toLowerCase(),m=[p];return(p===".jpg"||p===".jpeg")&&(m=[".jpg",".jpeg"]),m.some(function(y){return f.endsWith(y)})}return/\/\*$/.test(o)?s===o.replace(/\/.*$/,""):d===o?!0:/^\w+$/.test(o)?((0,rt.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(o,"'.Skip for check.")),!0):!1})}return!0};function Xe(e,n){var t=e.createReader(),r=[];function d(){t.readEntries(function(s){var l=Array.prototype.slice.apply(s);r=r.concat(l);var o=!l.length;o?n(r):d()})}d()}var be=function(n,t,r){var d=function s(l,o){l.path=o||"",l.isFile?l.file(function(f){r(f)&&(l.fullPath&&!f.webkitRelativePath&&(Object.defineProperties(f,{webkitRelativePath:{writable:!0}}),f.webkitRelativePath=l.fullPath.replace(/^\//,""),Object.defineProperties(f,{webkitRelativePath:{writable:!1}})),t([f]))}):l.isDirectory&&Xe(l,function(f){f.forEach(function(p){s(p,"".concat(o).concat(l.name,"/"))})})};n.forEach(function(s){d(s.webkitGetAsEntry())})},Ge=be,ot=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],at=function(e){(0,Z.Z)(t,e);var n=(0,_.Z)(t);function t(){var r;(0,P.Z)(this,t);for(var d=arguments.length,s=new Array(d),l=0;l<d;l++)s[l]=arguments[l];return r=n.call.apply(n,[this].concat(s)),r.state={uid:Ae()},r.reqs={},r.fileInput=void 0,r._isMounted=void 0,r.onChange=function(o){var f=r.props,p=f.accept,m=f.directory,y=o.target.files,w=(0,C.Z)(y).filter(function(A){return!m||Re(A,p)});r.uploadFiles(w),r.reset()},r.onClick=function(o){var f=r.fileInput;if(f){var p=r.props,m=p.children,y=p.onClick;if(m&&m.type==="button"){var w=f.parentNode;w.focus(),w.querySelector("button").blur()}f.click(),y&&y(o)}},r.onKeyDown=function(o){o.key==="Enter"&&r.onClick(o)},r.onFileDrop=function(o){var f=r.props.multiple;if(o.preventDefault(),o.type!=="dragover")if(r.props.directory)Ge(Array.prototype.slice.call(o.dataTransfer.items),r.uploadFiles,function(m){return Re(m,r.props.accept)});else{var p=(0,C.Z)(o.dataTransfer.files).filter(function(m){return Re(m,r.props.accept)});f===!1&&(p=p.slice(0,1)),r.uploadFiles(p)}},r.uploadFiles=function(o){var f=(0,C.Z)(o),p=f.map(function(m){return m.uid=Ae(),r.processFile(m,f)});Promise.all(p).then(function(m){var y=r.props.onBatchStart;y==null||y(m.map(function(w){var A=w.origin,K=w.parsedFile;return{file:A,parsedFile:K}})),m.filter(function(w){return w.parsedFile!==null}).forEach(function(w){r.post(w)})})},r.processFile=function(){var o=(0,q.Z)((0,ge.Z)().mark(function f(p,m){var y,w,A,K,Q,ee,B,W,V;return(0,ge.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(y=r.props.beforeUpload,w=p,!y){h.next=14;break}return h.prev=3,h.next=6,y(p,m);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:p,parsedFile:null,action:null,data:null});case 14:if(A=r.props.action,typeof A!="function"){h.next=21;break}return h.next=18,A(p);case 18:K=h.sent,h.next=22;break;case 21:K=A;case 22:if(Q=r.props.data,typeof Q!="function"){h.next=29;break}return h.next=26,Q(p);case 26:ee=h.sent,h.next=30;break;case 29:ee=Q;case 30:return B=((0,D.Z)(w)==="object"||typeof w=="string")&&w?w:p,B instanceof File?W=B:W=new File([B],p.name,{type:p.type}),V=W,V.uid=p.uid,h.abrupt("return",{origin:p,data:ee,parsedFile:V,action:K});case 35:case"end":return h.stop()}},f,null,[[3,9]])}));return function(f,p){return o.apply(this,arguments)}}(),r.saveFileInput=function(o){r.fileInput=o},r}return(0,F.Z)(t,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(d){var s=this,l=d.data,o=d.origin,f=d.action,p=d.parsedFile;if(this._isMounted){var m=this.props,y=m.onStart,w=m.customRequest,A=m.name,K=m.headers,Q=m.withCredentials,ee=m.method,B=o.uid,W=w||he,V={action:f,filename:A,data:l,file:p,headers:K,withCredentials:Q,method:ee||"post",onProgress:function(h){var X=s.props.onProgress;X==null||X(h,p)},onSuccess:function(h,X){var N=s.props.onSuccess;N==null||N(h,p,X),delete s.reqs[B]},onError:function(h,X){var N=s.props.onError;N==null||N(h,X,p),delete s.reqs[B]}};y(o),this.reqs[B]=W(V)}}},{key:"reset",value:function(){this.setState({uid:Ae()})}},{key:"abort",value:function(d){var s=this.reqs;if(d){var l=d.uid?d.uid:d;s[l]&&s[l].abort&&s[l].abort(),delete s[l]}else Object.keys(s).forEach(function(o){s[o]&&s[o].abort&&s[o].abort(),delete s[o]})}},{key:"render",value:function(){var d,s=this.props,l=s.component,o=s.prefixCls,f=s.className,p=s.disabled,m=s.id,y=s.style,w=s.multiple,A=s.accept,K=s.capture,Q=s.children,ee=s.directory,B=s.openFileDialogOnClick,W=s.onMouseEnter,V=s.onMouseLeave,z=(0,le.Z)(s,ot),h=E()((d={},(0,L.Z)(d,o,!0),(0,L.Z)(d,"".concat(o,"-disabled"),p),(0,L.Z)(d,f,f),d)),X=ee?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},N=p?{}:{onClick:B?this.onClick:function(){},onKeyDown:B?this.onKeyDown:function(){},onMouseEnter:W,onMouseLeave:V,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return a.createElement(l,(0,x.Z)({},N,{className:h,role:"button",style:y}),a.createElement("input",(0,x.Z)({},(0,ue.Z)(z,{aria:!0,data:!0}),{id:m,type:"file",ref:this.saveFileInput,onClick:function(se){return se.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:A},X,{multiple:w,onChange:this.onChange},K!=null?{capture:K}:{})),Q)}}]),t}(a.Component),Je=at;function Ue(){}var Me=function(e){(0,Z.Z)(t,e);var n=(0,_.Z)(t);function t(){var r;(0,P.Z)(this,t);for(var d=arguments.length,s=new Array(d),l=0;l<d;l++)s[l]=arguments[l];return r=n.call.apply(n,[this].concat(s)),r.uploader=void 0,r.saveUploader=function(o){r.uploader=o},r}return(0,F.Z)(t,[{key:"abort",value:function(d){this.uploader.abort(d)}},{key:"render",value:function(){return a.createElement(Je,(0,x.Z)({},this.props,{ref:this.saveUploader}))}}]),t}(a.Component);Me.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ue,onError:Ue,onSuccess:Ue,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var Ye=Me,je=Ye,it=c(73142),Qe=c(50374),Se=c(86787),st=c(39537),ke=c(51878),qe=c(22819),ae=c(5543),mt={icon:function(n,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:t}},{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:n}}]}},name:"file",theme:"twotone"},lt=mt,i=c(20165),u=function(n,t){return a.createElement(i.Z,(0,ae.Z)((0,ae.Z)({},n),{},{ref:t,icon:lt}))};u.displayName="FileTwoTone";var j=a.forwardRef(u),G=c(45726),fe={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"},ie=fe,Te=function(n,t){return a.createElement(i.Z,(0,ae.Z)((0,ae.Z)({},n),{},{ref:t,icon:ie}))};Te.displayName="PaperClipOutlined";var Ze=a.forwardRef(Te),Ot={icon:function(n,t){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:n}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:t}},{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:t}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:t}},{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:n}}]}},name:"picture",theme:"twotone"},xt=Ot,vt=function(n,t){return a.createElement(i.Z,(0,ae.Z)((0,ae.Z)({},n),{},{ref:t,icon:xt}))};vt.displayName="PictureTwoTone";var Pt=a.forwardRef(vt),ct=c(33666),gt=c(9101),Dt=c(68325),St=c(8119),et=c(28764);function tt(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 nt(e,n){const t=(0,C.Z)(n),r=t.findIndex(d=>{let{uid:s}=d;return s===e.uid});return r===-1?t.push(e):t[r]=e,t}function dt(e,n){const t=e.uid!==void 0?"uid":"name";return n.filter(r=>r[t]===e[t])[0]}function It(e,n){const t=e.uid!==void 0?"uid":"name",r=n.filter(d=>d[t]!==e[t]);return r.length===n.length?null:r}const Ft=function(){const n=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),r=n[n.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(r)||[""])[0]},ht=e=>e.indexOf("image/")===0,At=e=>{if(e.type&&!e.thumbUrl)return ht(e.type);const n=e.thumbUrl||e.url||"",t=Ft(n);return/^data:image\//.test(n)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(t)?!0:!(/^data:/.test(n)||t)},Ee=200;function Rt(e){return new Promise(n=>{if(!e.type||!ht(e.type)){n("");return}const t=document.createElement("canvas");t.width=Ee,t.height=Ee,t.style.cssText=`position: fixed; left: 0; top: 0; width: ${Ee}px; height: ${Ee}px; z-index: 9999; display: none;`,document.body.appendChild(t);const r=t.getContext("2d"),d=new Image;if(d.onload=()=>{const{width:s,height:l}=d;let o=Ee,f=Ee,p=0,m=0;s>l?(f=l*(Ee/s),m=-(f-o)/2):(o=s*(Ee/l),p=-(o-f)/2),r.drawImage(d,p,m,o,f);const y=t.toDataURL();document.body.removeChild(t),n(y)},d.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const s=new FileReader;s.addEventListener("load",()=>{s.result&&(d.src=s.result)}),s.readAsDataURL(e)}else d.src=window.URL.createObjectURL(e)})}var Ut=c(75827),Mt={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"},Tt=Mt,yt=function(n,t){return a.createElement(i.Z,(0,ae.Z)((0,ae.Z)({},n),{},{ref:t,icon:Tt}))};yt.displayName="DownloadOutlined";var Zt=a.forwardRef(yt),Lt=c(32538),jt=c(44132),Bt=c(41653),Nt=a.forwardRef((e,n)=>{let{prefixCls:t,className:r,style:d,locale:s,listType:l,file:o,items:f,progress:p,iconRender:m,actionIconRender:y,itemRender:w,isImgUrl:A,showPreviewIcon:K,showRemoveIcon:Q,showDownloadIcon:ee,previewIcon:B,removeIcon:W,downloadIcon:V,onPreview:z,onDownload:h,onClose:X}=e;var N,we;const{status:se}=o,[te,ze]=a.useState(se);a.useEffect(()=>{se!=="removed"&&ze(se)},[se]);const[We,He]=a.useState(!1),oe=a.useRef(null);a.useEffect(()=>(oe.current=setTimeout(()=>{He(!0)},300),()=>{oe.current&&clearTimeout(oe.current)}),[]);const I=m(o);let Ce=a.createElement("div",{className:`${t}-icon`},I);if(l==="picture"||l==="picture-card"||l==="picture-circle")if(te==="uploading"||!o.thumbUrl&&!o.url){const H=E()({[`${t}-list-item-thumbnail`]:!0,[`${t}-list-item-file`]:te!=="uploading"});Ce=a.createElement("div",{className:H},I)}else{const H=A!=null&&A(o)?a.createElement("img",{src:o.thumbUrl||o.url,alt:o.name,className:`${t}-list-item-image`,crossOrigin:o.crossOrigin}):I,Pe=E()({[`${t}-list-item-thumbnail`]:!0,[`${t}-list-item-file`]:A&&!A(o)});Ce=a.createElement("a",{className:Pe,onClick:Ie=>z(o,Ie),href:o.url||o.thumbUrl,target:"_blank",rel:"noopener noreferrer"},H)}const _e=E()(`${t}-list-item`,`${t}-list-item-${te}`),Ke=typeof o.linkProps=="string"?JSON.parse(o.linkProps):o.linkProps,$e=Q?y((typeof W=="function"?W(o):W)||a.createElement(Ut.Z,null),()=>X(o),t,s.removeFile):null,ne=ee&&te==="done"?y((typeof V=="function"?V(o):V)||a.createElement(Zt,null),()=>h(o),t,s.downloadFile):null,Le=l!=="picture-card"&&l!=="picture-circle"&&a.createElement("span",{key:"download-delete",className:E()(`${t}-list-item-actions`,{picture:l==="picture"})},ne,$e),v=E()(`${t}-list-item-name`),M=o.url?[a.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:v,title:o.name},Ke,{href:o.url,onClick:H=>z(o,H)}),o.name),Le]:[a.createElement("span",{key:"view",className:v,onClick:H=>z(o,H),title:o.name},o.name),Le],re={pointerEvents:"none",opacity:.5},J=K?a.createElement("a",{href:o.url||o.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:o.url||o.thumbUrl?void 0:re,onClick:H=>z(o,H),title:s.previewFile},typeof B=="function"?B(o):B||a.createElement(Lt.Z,null)):null,Oe=(l==="picture-card"||l==="picture-circle")&&te!=="uploading"&&a.createElement("span",{className:`${t}-list-item-actions`},J,te==="done"&&ne,$e),{getPrefixCls:me}=a.useContext(Se.E_),pt=me(),Ve=a.createElement("div",{className:_e},Ce,M,Oe,We&&a.createElement(ct.Z,{motionName:`${pt}-fade`,visible:te==="uploading",motionDeadline:2e3},H=>{let{className:Pe}=H;const Ie="percent"in o?a.createElement(jt.Z,Object.assign({},p,{type:"line",percent:o.percent})):null;return a.createElement("div",{className:E()(`${t}-list-item-progress`,Pe)},Ie)})),R=o.response&&typeof o.response=="string"?o.response:((N=o.error)===null||N===void 0?void 0:N.statusText)||((we=o.error)===null||we===void 0?void 0:we.message)||s.uploadError,xe=te==="error"?a.createElement(Bt.Z,{title:R,getPopupContainer:H=>H.parentNode},Ve):Ve;return a.createElement("div",{className:E()(`${t}-list-item-container`,r),style:d,ref:n},w?w(xe,o,f,{download:h.bind(null,o),preview:z.bind(null,o),remove:X.bind(null,o)}):xe)});const zt=(e,n)=>{const{listType:t="text",previewFile:r=Rt,onPreview:d,onDownload:s,onRemove:l,locale:o,iconRender:f,isImageUrl:p=At,prefixCls:m,items:y=[],showPreviewIcon:w=!0,showRemoveIcon:A=!0,showDownloadIcon:K=!1,removeIcon:Q,previewIcon:ee,downloadIcon:B,progress:W={strokeWidth:2,showInfo:!1},appendAction:V,appendActionVisible:z=!0,itemRender:h}=e,X=(0,Dt.Z)(),[N,we]=a.useState(!1);a.useEffect(()=>{t!=="picture"&&t!=="picture-card"&&t!=="picture-circle"||(y||[]).forEach(v=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(v.originFileObj instanceof File||v.originFileObj instanceof Blob)||v.thumbUrl!==void 0||(v.thumbUrl="",r&&r(v.originFileObj).then(M=>{v.thumbUrl=M||"",X()}))})},[t,y,r]),a.useEffect(()=>{we(!0)},[]);const se=(v,M)=>{if(d)return M==null||M.preventDefault(),d(v)},te=v=>{typeof s=="function"?s(v):v.url&&window.open(v.url)},ze=v=>{l==null||l(v)},We=v=>{if(f)return f(v,t);const M=v.status==="uploading",re=p&&p(v)?a.createElement(Pt,null):a.createElement(j,null);let J=M?a.createElement(G.Z,null):a.createElement(Ze,null);return t==="picture"?J=M?a.createElement(G.Z,null):re:(t==="picture-card"||t==="picture-circle")&&(J=M?o.uploading:re),J},He=(v,M,re,J)=>{const Oe={type:"text",size:"small",title:J,onClick:me=>{M(),(0,et.l$)(v)&&v.props.onClick&&v.props.onClick(me)},className:`${re}-list-item-action`};if((0,et.l$)(v)){const me=(0,et.Tm)(v,Object.assign(Object.assign({},v.props),{onClick:()=>{}}));return a.createElement(gt.ZP,Object.assign({},Oe,{icon:me}))}return a.createElement(gt.ZP,Object.assign({},Oe),a.createElement("span",null,v))};a.useImperativeHandle(n,()=>({handlePreview:se,handleDownload:te}));const{getPrefixCls:oe}=a.useContext(Se.E_),I=oe("upload",m),Ce=oe(),_e=E()({[`${I}-list`]:!0,[`${I}-list-${t}`]:!0}),Ke=(0,C.Z)(y.map(v=>({key:v.uid,file:v})));let ne={motionDeadline:2e3,motionName:`${I}-${t==="picture-card"||t==="picture-circle"?"animate-inline":"animate"}`,keys:Ke,motionAppear:N};const Le=(0,a.useMemo)(()=>{const v=Object.assign({},(0,St.ZP)(Ce));return delete v.onAppearEnd,delete v.onEnterEnd,delete v.onLeaveEnd,v},[Ce]);return t!=="picture-card"&&t!=="picture-circle"&&(ne=Object.assign(Object.assign({},Le),ne)),a.createElement("div",{className:_e},a.createElement(ct.V,Object.assign({},ne,{component:!1}),v=>{let{key:M,file:re,className:J,style:Oe}=v;return a.createElement(Nt,{key:M,locale:o,prefixCls:I,className:J,style:Oe,file:re,items:y,progress:W,listType:t,isImgUrl:p,showPreviewIcon:w,showRemoveIcon:A,showDownloadIcon:K,removeIcon:Q,previewIcon:ee,downloadIcon:B,iconRender:We,actionIconRender:He,itemRender:h,onPreview:se,onDownload:te,onClose:ze})}),V&&a.createElement(ct.Z,Object.assign({},ne,{visible:z,forceRender:!0}),v=>{let{className:M,style:re}=v;return(0,et.Tm)(V,J=>({className:E()(J.className,M),style:Object.assign(Object.assign(Object.assign({},re),{pointerEvents:M?"none":void 0}),J.style)}))}))};var Wt=a.forwardRef(zt),Ht=c(83763),_t=c(92232),Kt=e=>{const{componentCls:n,iconCls:t}=e;return{[`${n}-wrapper`]:{[`${n}-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}`,[n]:{padding:`${e.padding}px 0`},[`${n}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${n}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${n}-disabled):hover`]:{borderColor:e.colorPrimaryHover},[`p${n}-drag-icon`]:{marginBottom:e.margin,[t]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${n}-text`]:{margin:`0 0 ${e.marginXXS}px`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${n}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${n}-disabled`]:{cursor:"not-allowed",[`p${n}-drag-icon ${t},
|
|
p${n}-text,
|
|
p${n}-hint
|
|
`]:{color:e.colorTextDisabled}}}}}},Be=c(62371),Vt=e=>{const{componentCls:n,antCls:t,iconCls:r,fontSize:d,lineHeight:s}=e,l=`${n}-list-item`,o=`${l}-actions`,f=`${l}-action`,p=Math.round(d*s);return{[`${n}-wrapper`]:{[`${n}-list`]:Object.assign(Object.assign({},(0,Be.dF)()),{lineHeight:e.lineHeight,[l]:{position:"relative",height:e.lineHeight*d,marginTop:e.marginXS,fontSize:d,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,"&:hover":{backgroundColor:e.controlItemBgHover},[`${l}-name`]:Object.assign(Object.assign({},Be.vS),{padding:`0 ${e.paddingXS}px`,lineHeight:s,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[o]:{[f]:{opacity:0},[`${f}${t}-btn-sm`]:{height:p,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
|
|
${f}:focus,
|
|
&.picture ${f}
|
|
`]:{opacity:1},[r]:{color:e.colorTextDescription,transition:`all ${e.motionDurationSlow}`},[`&:hover ${r}`]:{color:e.colorText}},[`${n}-icon ${r}`]:{color:e.colorTextDescription,fontSize:d},[`${l}-progress`]:{position:"absolute",bottom:-e.uploadProgressOffset,width:"100%",paddingInlineStart:d+e.paddingXS,fontSize:d,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${l}:hover ${f}`]:{opacity:1,color:e.colorText},[`${l}-error`]:{color:e.colorError,[`${l}-name, ${n}-icon ${r}`]:{color:e.colorError},[o]:{[`${r}, ${r}:hover`]:{color:e.colorError},[f]:{opacity:1}}},[`${n}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},bt=c(25646);const Et=new bt.E4("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),wt=new bt.E4("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var Xt=e=>{const{componentCls:n}=e,t=`${n}-animate-inline`;return[{[`${n}-wrapper`]:{[`${t}-appear, ${t}-enter, ${t}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${t}-appear, ${t}-enter`]:{animationName:Et},[`${t}-leave`]:{animationName:wt}}},Et,wt]},Gt=c(31917);const Jt=e=>{const{componentCls:n,iconCls:t,uploadThumbnailSize:r,uploadProgressOffset:d}=e,s=`${n}-list`,l=`${s}-item`;return{[`${n}-wrapper`]:{[`
|
|
${s}${s}-picture,
|
|
${s}${s}-picture-card,
|
|
${s}${s}-picture-circle
|
|
`]:{[l]:{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"},[`${l}-thumbnail`]:Object.assign(Object.assign({},Be.vS),{width:r,height:r,lineHeight:`${r+e.paddingSM}px`,textAlign:"center",flex:"none",[t]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${l}-progress`]:{bottom:d,width:`calc(100% - ${e.paddingSM*2}px)`,marginTop:0,paddingInlineStart:r+e.paddingXS}},[`${l}-error`]:{borderColor:e.colorError,[`${l}-thumbnail ${t}`]:{["svg path[fill='#e6f7ff']"]:{fill:e.colorErrorBg},["svg path[fill='#1890ff']"]:{fill:e.colorError}}},[`${l}-uploading`]:{borderStyle:"dashed",[`${l}-name`]:{marginBottom:d}}},[`${s}${s}-picture-circle ${l}`]:{[`&, &::before, ${l}-thumbnail`]:{borderRadius:"50%"}}}}},Yt=e=>{const{componentCls:n,iconCls:t,fontSizeLG:r,colorTextLightSolid:d}=e,s=`${n}-list`,l=`${s}-item`,o=e.uploadPicCardSize;return{[`
|
|
${n}-wrapper${n}-picture-card-wrapper,
|
|
${n}-wrapper${n}-picture-circle-wrapper
|
|
`]:Object.assign(Object.assign({},(0,Be.dF)()),{display:"inline-block",width:"100%",[`${n}${n}-select`]:{width:o,height:o,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}`,[`> ${n}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${n}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${s}${s}-picture-card, ${s}${s}-picture-circle`]:{[`${s}-item-container`]:{display:"inline-block",width:o,height:o,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[l]:{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:'" "'}},[`${l}:hover`]:{[`&::before, ${l}-actions`]:{opacity:1}},[`${l}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`${t}-eye, ${t}-download, ${t}-delete`]:{zIndex:10,width:r,margin:`0 ${e.marginXXS}px`,fontSize:r,cursor:"pointer",transition:`all ${e.motionDurationSlow}`}},[`${l}-actions, ${l}-actions:hover`]:{[`${t}-eye, ${t}-download, ${t}-delete`]:{color:new Gt.C(d).setAlpha(.65).toRgbString(),"&:hover":{color:d}}},[`${l}-thumbnail, ${l}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${l}-name`]:{display:"none",textAlign:"center"},[`${l}-file + ${l}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${e.paddingXS*2}px)`},[`${l}-uploading`]:{[`&${l}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${t}-eye, ${t}-download, ${t}-delete`]:{display:"none"}},[`${l}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${e.paddingXS*2}px)`,paddingInlineStart:0}}}),[`${n}-wrapper${n}-picture-circle-wrapper`]:{[`${n}${n}-select`]:{borderRadius:"50%"}}}};var Qt=e=>{const{componentCls:n}=e;return{[`${n}-rtl`]:{direction:"rtl"}}},kt=c(59223);const qt=e=>{const{componentCls:n,colorTextDisabled:t}=e;return{[`${n}-wrapper`]:Object.assign(Object.assign({},(0,Be.Wf)(e)),{[n]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${n}-select`]:{display:"inline-block"},[`${n}-disabled`]:{color:t,cursor:"not-allowed"}})}};var en=(0,Ht.Z)("Upload",e=>{const{fontSizeHeading3:n,fontSize:t,lineHeight:r,lineWidth:d,controlHeightLG:s}=e,l=Math.round(t*r),o=(0,_t.TS)(e,{uploadThumbnailSize:n*2,uploadProgressOffset:l/2+d,uploadPicCardSize:s*2.55});return[qt(o),Kt(o),Jt(o),Yt(o),Vt(o),Xt(o),Qt(o),(0,kt.Z)(o)]}),tn=function(e,n,t,r){function d(s){return s instanceof t?s:new t(function(l){l(s)})}return new(t||(t=Promise))(function(s,l){function o(m){try{p(r.next(m))}catch(y){l(y)}}function f(m){try{p(r.throw(m))}catch(y){l(y)}}function p(m){m.done?s(m.value):d(m.value).then(o,f)}p((r=r.apply(e,n||[])).next())})};const Ne=`__LIST_IGNORE_${Date.now()}__`,nn=(e,n)=>{const{fileList:t,defaultFileList:r,onRemove:d,showUploadList:s=!0,listType:l="text",onPreview:o,onDownload:f,onChange:p,onDrop:m,previewFile:y,disabled:w,locale:A,iconRender:K,isImageUrl:Q,progress:ee,prefixCls:B,className:W,type:V="select",children:z,style:h,itemRender:X,maxCount:N,data:we={},multiple:se=!1,action:te="",accept:ze="",supportServerRender:We=!0}=e,He=a.useContext(st.Z),oe=w!=null?w:He,[I,Ce]=(0,it.Z)(r||[],{value:t,postState:g=>g!=null?g:[]}),[_e,Ke]=a.useState("drop"),$e=a.useRef(null);a.useMemo(()=>{const g=Date.now();(t||[]).forEach(($,S)=>{!$.uid&&!Object.isFrozen($)&&($.uid=`__AUTO__${g}_${S}__`)})},[t]);const ne=(g,$,S)=>{let b=(0,C.Z)($);N===1?b=b.slice(-1):N&&(b=b.slice(0,N)),(0,Qe.flushSync)(()=>{Ce(b)});const O={file:g,fileList:b};S&&(O.event=S),p==null||p(O)},Le=(g,$)=>tn(void 0,void 0,void 0,function*(){const{beforeUpload:S,transformFile:b}=e;let O=g;if(S){const k=yield S(g,$);if(k===!1)return!1;if(delete g[Ne],k===Ne)return Object.defineProperty(g,Ne,{value:!0,configurable:!0}),!1;typeof k=="object"&&k&&(O=k)}return b&&(O=yield b(O)),O}),v=g=>{const $=g.filter(O=>!O.file[Ne]);if(!$.length)return;const S=$.map(O=>tt(O.file));let b=(0,C.Z)(I);S.forEach(O=>{b=nt(O,b)}),S.forEach((O,k)=>{let Fe=O;if($[k].parsedFile)O.status="uploading";else{const{originFileObj:De}=O;let ve;try{ve=new File([De],De.name,{type:De.type})}catch(hn){ve=new Blob([De],{type:De.type}),ve.name=De.name,ve.lastModifiedDate=new Date,ve.lastModified=new Date().getTime()}ve.uid=O.uid,Fe=ve}ne(Fe,b)})},M=(g,$,S)=>{try{typeof g=="string"&&(g=JSON.parse(g))}catch(k){}if(!dt($,I))return;const b=tt($);b.status="done",b.percent=100,b.response=g,b.xhr=S;const O=nt(b,I);ne(b,O)},re=(g,$)=>{if(!dt($,I))return;const S=tt($);S.status="uploading",S.percent=g.percent;const b=nt(S,I);ne(S,b,g)},J=(g,$,S)=>{if(!dt(S,I))return;const b=tt(S);b.error=g,b.response=$,b.status="error";const O=nt(b,I);ne(b,O)},Oe=g=>{let $;Promise.resolve(typeof d=="function"?d(g):d).then(S=>{var b;if(S===!1)return;const O=It(g,I);O&&($=Object.assign(Object.assign({},g),{status:"removed"}),I==null||I.forEach(k=>{const Fe=$.uid!==void 0?"uid":"name";k[Fe]===$[Fe]&&!Object.isFrozen(k)&&(k.status="removed")}),(b=$e.current)===null||b===void 0||b.abort($),ne($,O))})},me=g=>{Ke(g.type),g.type==="drop"&&(m==null||m(g))};a.useImperativeHandle(n,()=>({onBatchStart:v,onSuccess:M,onProgress:re,onError:J,fileList:I,upload:$e.current}));const{getPrefixCls:pt,direction:Ve}=a.useContext(Se.E_),R=pt("upload",B),xe=Object.assign(Object.assign({onBatchStart:v,onError:J,onProgress:re,onSuccess:M},e),{data:we,multiple:se,action:te,accept:ze,supportServerRender:We,prefixCls:R,disabled:oe,beforeUpload:Le,onChange:void 0});delete xe.className,delete xe.style,(!z||oe)&&delete xe.id;const[H,Pe]=en(R),Ie=(g,$)=>s?a.createElement(ke.Z,{componentName:"Upload",defaultLocale:qe.Z.Upload},S=>{const{showRemoveIcon:b,showPreviewIcon:O,showDownloadIcon:k,removeIcon:Fe,previewIcon:De,downloadIcon:ve}=typeof s=="boolean"?{}:s;return a.createElement(Wt,{prefixCls:R,listType:l,items:I,previewFile:y,onPreview:o,onDownload:f,onRemove:Oe,showRemoveIcon:!oe&&b,showPreviewIcon:O,showDownloadIcon:k,removeIcon:Fe,previewIcon:De,downloadIcon:ve,iconRender:K,locale:Object.assign(Object.assign({},S),A),isImageUrl:Q,progress:ee,appendAction:g,appendActionVisible:$,itemRender:X})}):g,ft={[`${R}-rtl`]:Ve==="rtl"};if(V==="drag"){const g=E()(R,{[`${R}-drag`]:!0,[`${R}-drag-uploading`]:I.some($=>$.status==="uploading"),[`${R}-drag-hover`]:_e==="dragover",[`${R}-disabled`]:oe,[`${R}-rtl`]:Ve==="rtl"},Pe);return H(a.createElement("span",{className:E()(`${R}-wrapper`,ft,W,Pe)},a.createElement("div",{className:g,onDrop:me,onDragOver:me,onDragLeave:me,style:h},a.createElement(je,Object.assign({},xe,{ref:$e,className:`${R}-btn`}),a.createElement("div",{className:`${R}-drag-container`},z))),Ie()))}const sn=E()(R,`${R}-select`,{[`${R}-disabled`]:oe}),$t=(g=>a.createElement("div",{className:sn,style:g},a.createElement(je,Object.assign({},xe,{ref:$e}))))(z?void 0:{display:"none"});return H(l==="picture-card"||l==="picture-circle"?a.createElement("span",{className:E()(`${R}-wrapper`,{[`${R}-picture-card-wrapper`]:l==="picture-card",[`${R}-picture-circle-wrapper`]:l==="picture-circle"},ft,W,Pe)},Ie($t,!!z)):a.createElement("span",{className:E()(`${R}-wrapper`,ft,W,Pe)},$t,Ie()))};var Ct=a.forwardRef(nn),rn=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,r=Object.getOwnPropertySymbols(e);d<r.length;d++)n.indexOf(r[d])<0&&Object.prototype.propertyIsEnumerable.call(e,r[d])&&(t[r[d]]=e[r[d]]);return t},on=a.forwardRef((e,n)=>{var{style:t,height:r}=e,d=rn(e,["style","height"]);return a.createElement(Ct,Object.assign({ref:n},d,{type:"drag",style:Object.assign(Object.assign({},t),{height:r})}))});const ut=Ct;ut.Dragger=on,ut.LIST_IGNORE=Ne;var an=ut},10255:function(Y){function U(c){if(c==null)throw new TypeError("Cannot destructure "+c)}Y.exports=U,Y.exports.__esModule=!0,Y.exports.default=Y.exports},80840:function(Y,U,c){"use strict";c.d(U,{DS:function(){return lt}});var a=c(53441).lW;const C="3.7.5",T=C,E=typeof atob=="function",x=typeof btoa=="function",P=typeof a=="function",F=typeof TextDecoder=="function"?new TextDecoder:void 0,Z=typeof TextEncoder=="function"?new TextEncoder:void 0,_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",L=Array.prototype.slice.call(_),le=(i=>{let u={};return i.forEach((j,G)=>u[j]=G),u})(L),ge=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,D=String.fromCharCode.bind(String),q=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):i=>new Uint8Array(Array.prototype.slice.call(i,0)),ue=i=>i.replace(/=/g,"").replace(/[+\/]/g,u=>u=="+"?"-":"_"),pe=i=>i.replace(/[^A-Za-z0-9\+\/]/g,""),ce=i=>{let u,j,G,fe,ie="";const Te=i.length%3;for(let Ze=0;Ze<i.length;){if((j=i.charCodeAt(Ze++))>255||(G=i.charCodeAt(Ze++))>255||(fe=i.charCodeAt(Ze++))>255)throw new TypeError("invalid character found");u=j<<16|G<<8|fe,ie+=L[u>>18&63]+L[u>>12&63]+L[u>>6&63]+L[u&63]}return Te?ie.slice(0,Te-3)+"===".substring(Te):ie},he=x?i=>btoa(i):P?i=>a.from(i,"binary").toString("base64"):ce,ye=P?i=>a.from(i).toString("base64"):i=>{let j=[];for(let G=0,fe=i.length;G<fe;G+=4096)j.push(D.apply(null,i.subarray(G,G+4096)));return he(j.join(""))},de=(i,u=!1)=>u?ue(ye(i)):ye(i),Ae=i=>{if(i.length<2){var u=i.charCodeAt(0);return u<128?i:u<2048?D(192|u>>>6)+D(128|u&63):D(224|u>>>12&15)+D(128|u>>>6&63)+D(128|u&63)}else{var u=65536+(i.charCodeAt(0)-55296)*1024+(i.charCodeAt(1)-56320);return D(240|u>>>18&7)+D(128|u>>>12&63)+D(128|u>>>6&63)+D(128|u&63)}},rt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Re=i=>i.replace(rt,Ae),Xe=P?i=>a.from(i,"utf8").toString("base64"):Z?i=>ye(Z.encode(i)):i=>he(Re(i)),be=(i,u=!1)=>u?ue(Xe(i)):Xe(i),Ge=i=>be(i,!0),ot=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,at=i=>{switch(i.length){case 4:var u=(7&i.charCodeAt(0))<<18|(63&i.charCodeAt(1))<<12|(63&i.charCodeAt(2))<<6|63&i.charCodeAt(3),j=u-65536;return D((j>>>10)+55296)+D((j&1023)+56320);case 3:return D((15&i.charCodeAt(0))<<12|(63&i.charCodeAt(1))<<6|63&i.charCodeAt(2));default:return D((31&i.charCodeAt(0))<<6|63&i.charCodeAt(1))}},Je=i=>i.replace(ot,at),Ue=i=>{if(i=i.replace(/\s+/g,""),!ge.test(i))throw new TypeError("malformed base64.");i+="==".slice(2-(i.length&3));let u,j="",G,fe;for(let ie=0;ie<i.length;)u=le[i.charAt(ie++)]<<18|le[i.charAt(ie++)]<<12|(G=le[i.charAt(ie++)])<<6|(fe=le[i.charAt(ie++)]),j+=G===64?D(u>>16&255):fe===64?D(u>>16&255,u>>8&255):D(u>>16&255,u>>8&255,u&255);return j},Me=E?i=>atob(pe(i)):P?i=>a.from(i,"base64").toString("binary"):Ue,Ye=P?i=>q(a.from(i,"base64")):i=>q(Me(i).split("").map(u=>u.charCodeAt(0))),je=i=>Ye(Qe(i)),it=P?i=>a.from(i,"base64").toString("utf8"):F?i=>F.decode(Ye(i)):i=>Je(Me(i)),Qe=i=>pe(i.replace(/[-_]/g,u=>u=="-"?"+":"/")),Se=i=>it(Qe(i)),st=i=>{if(typeof i!="string")return!1;const u=i.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(u)||!/[^\s0-9a-zA-Z\-_]/.test(u)},ke=i=>({value:i,enumerable:!1,writable:!0,configurable:!0}),qe=function(){const i=(u,j)=>Object.defineProperty(String.prototype,u,ke(j));i("fromBase64",function(){return Se(this)}),i("toBase64",function(u){return be(this,u)}),i("toBase64URI",function(){return be(this,!0)}),i("toBase64URL",function(){return be(this,!0)}),i("toUint8Array",function(){return je(this)})},ae=function(){const i=(u,j)=>Object.defineProperty(Uint8Array.prototype,u,ke(j));i("toBase64",function(u){return de(this,u)}),i("toBase64URI",function(){return de(this,!0)}),i("toBase64URL",function(){return de(this,!0)})},lt={version:C,VERSION:T,atob:Me,atobPolyfill:Ue,btoa:he,btoaPolyfill:ce,fromBase64:Se,toBase64:be,encode:be,encodeURI:Ge,encodeURL:Ge,utob:Re,btou:Je,decode:Se,isValid:st,fromUint8Array:de,toUint8Array:je,extendString:qe,extendUint8Array:ae,extendBuiltins:()=>{qe(),ae()}}}}]);
|