1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6138],{57786:function(e,t,n){"use strict";n.d(t,{Z:function(){return ek}});var o=n(15767),r=n(52676),i=n(56571),a=n(79406),c=n(43532),s=n(75271),l=n(78051),u=n(82187),d=n.n(u),p=n(17816),h=n(75621),f=n(12686),v=n(79869),m=n(50155),g=n(59373),b=n(93954),y=n(47996),C=n(4449),x=n(45929),w=n(17039),S=n(30967);function E(e,t,n,o){var r=(t-n)/(o-n),i={};switch(e){case"rtl":i.right="".concat(100*r,"%"),i.transform="translateX(50%)";break;case"btt":i.bottom="".concat(100*r,"%"),i.transform="translateY(50%)";break;case"ttb":i.top="".concat(100*r,"%"),i.transform="translateY(-50%)";break;default:i.left="".concat(100*r,"%"),i.transform="translateX(-50%)"}return i}function k(e,t){return Array.isArray(e)?e[t]:e}var R=n(14583),M=s.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),z=s.createContext({}),D=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],P=s.forwardRef(function(e,t){var n,o=e.prefixCls,r=e.value,i=e.valueIndex,a=e.onStartMove,c=e.onDelete,l=e.style,u=e.render,f=e.dragging,v=e.draggingDelete,m=e.onOffsetChange,g=e.onChangeComplete,b=e.onFocus,y=e.onMouseEnter,C=(0,w.Z)(e,D),S=s.useContext(M),z=S.min,P=S.max,Z=S.direction,O=S.disabled,j=S.keyboard,N=S.range,A=S.tabIndex,T=S.ariaLabelForHandle,F=S.ariaLabelledByForHandle,I=S.ariaRequired,L=S.ariaValueTextFormatterForHandle,W=S.styles,B=S.classNames,H="".concat(o,"-handle"),_=function(e){O||a(e,i)},q=E(Z,r,z,P),G={};null!==i&&(G={tabIndex:O?null:k(A,i),role:"slider","aria-valuemin":z,"aria-valuemax":P,"aria-valuenow":r,"aria-disabled":O,"aria-label":k(T,i),"aria-labelledby":k(F,i),"aria-required":k(I,i),"aria-valuetext":null===(n=k(L,i))||void 0===n?void 0:n(r),"aria-orientation":"ltr"===Z||"rtl"===Z?"horizontal":"vertical",onMouseDown:_,onTouchStart:_,onFocus:function(e){null==b||b(e,i)},onMouseEnter:function(e){y(e,i)},onKeyDown:function(e){if(!O&&j){var t=null;switch(e.which||e.keyCode){case R.Z.LEFT:t="ltr"===Z||"btt"===Z?-1:1;break;case R.Z.RIGHT:t="ltr"===Z||"btt"===Z?1:-1;break;case R.Z.UP:t="ttb"!==Z?1:-1;break;case R.Z.DOWN:t="ttb"!==Z?-1:1;break;case R.Z.HOME:t="min";break;case R.Z.END:t="max";break;case R.Z.PAGE_UP:t=2;break;case R.Z.PAGE_DOWN:t=-2;break;case R.Z.BACKSPACE:case R.Z.DELETE:null==c||c(i)}null!==t&&(e.preventDefault(),m(t,i))}},onKeyUp:function(e){switch(e.which||e.keyCode){case R.Z.LEFT:case R.Z.RIGHT:case R.Z.UP:case R.Z.DOWN:case R.Z.HOME:case R.Z.END:case R.Z.PAGE_UP:case R.Z.PAGE_DOWN:null==g||g()}}});var U=s.createElement("div",(0,x.Z)({ref:t,className:d()(H,(0,h.Z)((0,h.Z)((0,h.Z)({},"".concat(H,"-").concat(i+1),null!==i&&N),"".concat(H,"-dragging"),f),"".concat(H,"-dragging-delete"),v),B.handle),style:(0,p.Z)((0,p.Z)((0,p.Z)({},q),l),W.handle)},G,C));return u&&(U=u(U,{index:i,prefixCls:o,value:r,dragging:f,draggingDelete:v})),U}),Z=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onF
1ocus"],O=s.forwardRef(function(e,t){var n=e.prefixCls,o=e.style,r=e.onStartMove,i=e.onOffsetChange,a=e.values,c=e.handleRender,l=e.activeHandleRender,u=e.draggingIndex,d=e.draggingDelete,h=e.onFocus,f=(0,w.Z)(e,Z),v=s.useRef({}),g=s.useState(!1),b=(0,m.Z)(g,2),y=b[0],C=b[1],E=s.useState(-1),R=(0,m.Z)(E,2),M=R[0],z=R[1],D=function(e){z(e),C(!0)};s.useImperativeHandle(t,function(){return{focus:function(e){var t;null===(t=v.current[e])||void 0===t||t.focus()},hideHelp:function(){(0,S.flushSync)(function(){C(!1)})}}});var O=(0,p.Z)({prefixCls:n,onStartMove:r,onOffsetChange:i,render:c,onFocus:function(e,t){D(t),null==h||h(e)},onMouseEnter:function(e,t){D(t)}},f);return s.createElement(s.Fragment,null,a.map(function(e,t){var n=u===t;return s.createElement(P,(0,x.Z)({ref:function(e){e?v.current[t]=e:delete v.current[t]},dragging:n,draggingDelete:n&&d,style:k(o,t),key:t,value:e,valueIndex:t},O))}),l&&y&&s.createElement(P,(0,x.Z)({key:"a11y"},O,{value:a[M],valueIndex:null,dragging:-1!==u,draggingDelete:d,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))}),j=function(e){var t=e.prefixCls,n=e.style,o=e.children,r=e.value,i=e.onClick,a=s.useContext(M),c=a.min,l=a.max,u=a.direction,f=a.includedStart,v=a.includedEnd,m=a.included,g="".concat(t,"-text"),b=E(u,r,c,l);return s.createElement("span",{className:d()(g,(0,h.Z)({},"".concat(g,"-active"),m&&f<=r&&r<=v)),style:(0,p.Z)((0,p.Z)({},b),n),onMouseDown:function(e){e.stopPropagation()},onClick:function(){i(r)}},o)},N=function(e){var t=e.prefixCls,n=e.marks,o=e.onClick,r="".concat(t,"-mark");return n.length?s.createElement("div",{className:r},n.map(function(e){var t=e.value,n=e.style,i=e.label;return s.createElement(j,{key:t,prefixCls:r,style:n,value:t,onClick:o},i)})):null},A=function(e){var t=e.prefixCls,n=e.value,o=e.style,r=e.activeStyle,i=s.useContext(M),a=i.min,c=i.max,l=i.direction,u=i.included,f=i.includedStart,v=i.includedEnd,m="".concat(t,"-dot"),g=u&&f<=n&&n<=v,b=(0,p.Z)((0,p.Z)({},E(l,n,a,c)),"function"==typeof o?o(n):o);return g&&(b=(0,p.Z)((0,p.Z)({},b),"function"==typeof r?r(n):r)),s.createElement("span",{className:d()(m,(0,h.Z)({},"".concat(m,"-active"),g)),style:b})},T=function(e){var t=e.prefixCls,n=e.marks,o=e.dots,r=e.style,i=e.activeStyle,a=s.useContext(M),c=a.min,l=a.max,u=a.step,d=s.useMemo(function(){var e=new Set;if(n.forEach(function(t){e.add(t.value)}),o&&null!==u)for(var t=c;t<=l;)e.add(t),t+=u;return Array.from(e)},[c,l,u,o,n]);return s.createElement("div",{className:"".concat(t,"-step")},d.map(function(e){return s.createElement(A,{prefixCls:t,key:e,value:e,style:r,activeStyle:i})}))},F=function(e){var t=e.prefixCls,n=e.style,o=e.start,r=e.end,i=e.index,a=e.onStartMove,c=e.replaceCls,l=s.useContext(M),u=l.direction,f=l.min,v=l.max,m=l.disabled,g=l.range,b=l.classNames,y="".concat(t,"-track"),C=(o-f)/(v-f),x=(r-f)/(v-f),w=function(e){!m&&a&&a(e,-1)},S={};switch(u){case"rtl":S.right="".concat(100*C,"%"),S.width="".concat(100*x-100*C,"%");break;case"btt":S.bottom="".concat(100*C,"%"),S.height="".concat(100*x-100*C,"%");break;case"ttb":S.top="".concat(100*C,"%"),S.height="".concat(100*x-100*C,"%");break;default:S.left="".concat(100*C,"%"),S.width="".concat(100*x-100*C,"%")}var E=c||d()(y,(0,h.Z)((0,h.Z)({},"".concat(y,"-").concat(i+1),null!==i&&g),"".concat(t,"-track-draggable"),a),b.track);return s.createElement("div",{className:E,style:(0,p.Z)((0,p.Z)({},S),n),onMouseDown:w,onTouchStart:w})},I=function(e){var t=e.prefixCls,n=e.style,o=e.values,r=e.startPoint,i=e.onStartMove,a=s.useContext(M),c=a.included,l=a.range,u=a.min,h=a.styles,f=a.classNames,v=s.useMemo(function(){if(!l){if(0===o.length)return[];var e=null!=r?r:u,t=o[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],i=0;i<o.length-1;i+=1)n.push({start:o[i],end:o[i+1]});return n},[o,l,r,u]);if(!c)return null;var m=null!=v&&v.length&&(f.tracks||h.tracks)?s.createElement(F,{index:null,prefixCls:t,start:v[0].start,end:v[v.length-1].end,replaceCls:d()(f.tracks,"".concat(t,"-tracks")),style:h.tracks}):null;return s.createElement(s.Fragment,null,m,v.map(function(e,o){var r=e.start,a=e.end;return s.createElement(F,{index:o,prefixCls:t,style:(0,p.Z)((0,p.Z)({},k(n,o)),h.track),start:r,end:a,key:o,onStartMove:i})}
1))},L=n(92076);function W(e){var t="targetTouches"in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}var B=function(e,t,n,o,r,i,a,c,l,u,d){var p=s.useState(null),h=(0,m.Z)(p,2),v=h[0],b=h[1],y=s.useState(-1),C=(0,m.Z)(y,2),x=C[0],w=C[1],S=s.useState(!1),E=(0,m.Z)(S,2),k=E[0],R=E[1],M=s.useState(n),D=(0,m.Z)(M,2),P=D[0],Z=D[1],O=s.useState(n),j=(0,m.Z)(O,2),N=j[0],A=j[1],T=s.useRef(null),F=s.useRef(null),I=s.useRef(null),B=s.useContext(z),H=B.onDragStart,_=B.onDragChange;(0,L.Z)(function(){-1===x&&Z(n)},[n,x]),s.useEffect(function(){return function(){document.removeEventListener("mousemove",T.current),document.removeEventListener("mouseup",F.current),I.current&&(I.current.removeEventListener("touchmove",T.current),I.current.removeEventListener("touchend",F.current))}},[]);var q=function(e,t,n){void 0!==t&&b(t),Z(e);var o=e;n&&(o=e.filter(function(e,t){return t!==x})),a(o),_&&_({rawValues:e,deleteIndex:n?x:-1,draggingIndex:x,draggingValue:t})},G=(0,g.Z)(function(e,t,n){if(-1===e){var a=N[0],c=N[N.length-1],s=t*(r-o);s=Math.min(s=Math.max(s,o-a),r-c),s=i(a+s)-a,q(N.map(function(e){return e+s}))}else{var u=(0,f.Z)(P);u[e]=N[e];var d=l(u,(r-o)*t,e,"dist");q(d.values,d.value,n)}});return[x,v,k,s.useMemo(function(){var e=(0,f.Z)(n).sort(function(e,t){return e-t}),t=(0,f.Z)(P).sort(function(e,t){return e-t}),o={};t.forEach(function(e){o[e]=(o[e]||0)+1}),e.forEach(function(e){o[e]=(o[e]||0)-1});var r=u?1:0;return Object.values(o).reduce(function(e,t){return e+Math.abs(t)},0)<=r?P:n},[n,P,u]),function(o,r,i){o.stopPropagation();var a=i||n,s=a[r];w(r),b(s),A(a),Z(a),R(!1);var l=W(o),p=l.pageX,h=l.pageY,f=!1;H&&H({rawValues:a,draggingIndex:r,draggingValue:s});var v=function(n){n.preventDefault();var o,i,a=W(n),c=a.pageX,s=a.pageY,l=c-p,v=s-h,m=e.current.getBoundingClientRect(),g=m.width,b=m.height;switch(t){case"btt":o=-v/b,i=l;break;case"ttb":o=v/b,i=l;break;case"rtl":o=-l/g,i=v;break;default:o=l/g,i=v}R(f=!!u&&Math.abs(i)>130&&d<P.length),G(r,o,f)},m=function e(t){t.preventDefault(),document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",v),I.current&&(I.current.removeEventListener("touchmove",T.current),I.current.removeEventListener("touchend",F.current)),T.current=null,F.current=null,I.current=null,c(f),w(-1),R(!1)};document.addEventListener("mouseup",m),document.addEventListener("mousemove",v),o.currentTarget.addEventListener("touchend",m),o.currentTarget.addEventListener("touchmove",v),T.current=v,F.current=m,I.current=o.currentTarget}]},H=s.forwardRef(function(e,t){var n,o,r,i,a,c,l,u=e.prefixCls,x=void 0===u?"rc-slider":u,w=e.className,S=e.style,E=e.classNames,k=e.styles,R=e.id,z=e.disabled,D=void 0!==z&&z,P=e.keyboard,Z=void 0===P||P,j=e.autoFocus,A=e.onFocus,F=e.onBlur,L=e.min,W=void 0===L?0:L,H=e.max,_=void 0===H?100:H,q=e.step,G=void 0===q?1:q,U=e.value,V=e.defaultValue,X=e.range,Y=e.count,K=e.onChange,J=e.onBeforeChange,Q=e.onAfterChange,$=e.onChangeComplete,ee=e.allowCross,et=e.pushable,en=void 0!==et&&et,eo=e.reverse,er=e.vertical,ei=e.included,ea=void 0===ei||ei,ec=e.startPoint,es=e.trackStyle,el=e.handleStyle,eu=e.railStyle,ed=e.dotStyle,ep=e.activeDotStyle,eh=e.marks,ef=e.dots,ev=e.handleRender,em=e.activeHandleRender,eg=e.track,eb=e.tabIndex,ey=void 0===eb?0:eb,eC=e.ariaLabelForHandle,ex=e.ariaLabelledByForHandle,ew=e.ariaRequired,eS=e.ariaValueTextFormatterForHandle,eE=s.useRef(null),ek=s.useRef(null),eR=s.useMemo(function(){return er?eo?"ttb":"btt":eo?"rtl":"ltr"},[eo,er]),eM=(0,s.useMemo)(function(){if(!0===X||!X)return[!!X,!1,!1,0];var e=X.editable,t=X.draggableTrack;return[!0,e,!e&&t,X.minCount||0,X.maxCount]},[X]),ez=(0,m.Z)(eM,5),eD=ez[0],eP=ez[1],eZ=ez[2],eO=ez[3],ej=ez[4],eN=s.useMemo(function(){return isFinite(W)?W:0},[W]),eA=s.useMemo(function(){return isFinite(_)?_:100},[_]),eT=s.useMemo(function(){return null!==G&&G<=0?1:G},[G]),eF=s.useMemo(function(){return"boolean"==typeof en?!!en&&eT:en>=0&&en},[en,eT]),eI=s.useMemo(function(){return Object.keys(eh||{}).map(function(e){var t=eh[e],n={value:Number(e)};return t&&"object"===(0,v.Z)(t)&&!s.isValidElement(t)&&("label"in t||"style"in t)?(n.style=t.style,n.label=t.label):n.label=t,n}).filter(function(e){var t=e.label;return t||"number"==typeof t}).sort(function(e,t){return e.value-t.value})},[eh]),eL=(n=void 0===ee||ee,o=s.useCallback(function(e){return Math.max(eN,Math.min(eA,e))},[eN,eA]),r=s.useCallback(function(e){if(null!==eT){var t=eN+Math.round((o(e)-eN)/eT)*eT,n=function(e){return(String(e).split(".")[1]||"").length},r=Math.max(n(eT),n(eA),n(eN)),i=Number(t.toFixed(r));return eN<=i&&i<=eA?i:null}return null},[eT,eN,eA,o]),i=s.useCallback(function(e){var t=o(e),n=eI.map(function(e){return e.value});
1null!==eT&&n.push(r(e)),n.push(eN,eA);var i=n[0],a=eA-eN;return n.forEach(function(e){var n=Math.abs(t-e);n<=a&&(i=e,a=n)}),i},[eN,eA,eI,eT,o,r]),a=function e(t,n,o){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"==typeof n){var a,c=t[o],s=c+n,l=[];eI.forEach(function(e){l.push(e.value)}),l.push(eN,eA),l.push(r(c));var u=n>0?1:-1;"unit"===i?l.push(r(c+u*eT)):l.push(r(s)),l=l.filter(function(e){return null!==e}).filter(function(e){return n<0?e<=c:e>=c}),"unit"===i&&(l=l.filter(function(e){return e!==c}));var d="unit"===i?c:s,p=Math.abs((a=l[0])-d);if(l.forEach(function(e){var t=Math.abs(e-d);t<p&&(a=e,p=t)}),void 0===a)return n<0?eN:eA;if("dist"===i)return a;if(Math.abs(n)>1){var h=(0,f.Z)(t);return h[o]=a,e(h,n-u,o,i)}return a}return"min"===n?eN:"max"===n?eA:void 0},c=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",r=e[n],i=a(e,t,n,o);return{value:i,changed:i!==r}},l=function(e){return null===eF&&0===e||"number"==typeof eF&&e<eF},[i,function(e,t,o){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",s=e.map(i),u=s[o],d=a(s,t,o,r);if(s[o]=d,!1===n){var p=eF||0;o>0&&s[o-1]!==u&&(s[o]=Math.max(s[o],s[o-1]+p)),o<s.length-1&&s[o+1]!==u&&(s[o]=Math.min(s[o],s[o+1]-p))}else if("number"==typeof eF||null===eF){for(var h=o+1;h<s.length;h+=1)for(var f=!0;l(s[h]-s[h-1])&&f;){var v=c(s,1,h);s[h]=v.value,f=v.changed}for(var m=o;m>0;m-=1)for(var g=!0;l(s[m]-s[m-1])&&g;){var b=c(s,-1,m-1);s[m-1]=b.value,g=b.changed}for(var y=s.length-1;y>0;y-=1)for(var C=!0;l(s[y]-s[y-1])&&C;){var x=c(s,-1,y-1);s[y-1]=x.value,C=x.changed}for(var w=0;w<s.length-1;w+=1)for(var S=!0;l(s[w+1]-s[w])&&S;){var E=c(s,1,w+1);s[w+1]=E.value,S=E.changed}}return{value:s[o],values:s}}]),eW=(0,m.Z)(eL,2),eB=eW[0],eH=eW[1],e_=(0,b.Z)(V,{value:U}),eq=(0,m.Z)(e_,2),eG=eq[0],eU=eq[1],eV=s.useMemo(function(){var e=null==eG?[]:Array.isArray(eG)?eG:[eG],t=(0,m.Z)(e,1)[0],n=void 0===t?eN:t,o=null===eG?[]:[n];if(eD){if(o=(0,f.Z)(e),Y||void 0===eG){var r,i=Y>=0?Y+1:2;for(o=o.slice(0,i);o.length<i;)o.push(null!==(r=o[o.length-1])&&void 0!==r?r:eN)}o.sort(function(e,t){return e-t})}return o.forEach(function(e,t){o[t]=eB(e)}),o},[eG,eD,eN,Y,eB]),eX=function(e){return eD?e:e[0]},eY=(0,g.Z)(function(e){var t=(0,f.Z)(e).sort(function(e,t){return e-t});K&&!(0,y.Z)(t,eV,!0)&&K(eX(t)),eU(t)}),eK=(0,g.Z)(function(e){e&&eE.current.hideHelp();var t=eX(eV);null==Q||Q(t),(0,C.ZP)(!Q,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),null==$||$(t)}),eJ=B(ek,eR,eV,eN,eA,eB,eY,eK,eH,eP,eO),eQ=(0,m.Z)(eJ,5),e$=eQ[0],e0=eQ[1],e1=eQ[2],e2=eQ[3],e5=eQ[4],e3=function(e,t){if(!D){var n,o,r=(0,f.Z)(eV),i=0,a=0,c=eA-eN;eV.forEach(function(t,n){var o=Math.abs(e-t);o<=c&&(c=o,i=n),t<e&&(a=n)});var s=i;eP&&0!==c&&(!ej||eV.length<ej)?(r.splice(a+1,0,e),s=a+1):r[i]=e,eD&&!eV.length&&void 0===Y&&r.push(e);var l=eX(r);null==J||J(l),eY(r),t?(null===(n=document.activeElement)||void 0===n||null===(o=n.blur)||void 0===o||o.call(n),eE.current.focus(s),e5(t,s,r)):(null==Q||Q(l),(0,C.ZP)(!Q,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),null==$||$(l))}},e6=s.useState(null),e4=(0,m.Z)(e6,2),e8=e4[0],e7=e4[1];s.useEffect(function(){if(null!==e8){var e=eV.indexOf(e8);e>=0&&eE.current.focus(e)}e7(null)},[e8]);var e9=s.useMemo(function(){return(!eZ||null!==eT)&&eZ},[eZ,eT]),te=(0,g.Z)(function(e,t){e5(e,t),null==J||J(eX(eV))}),tt=-1!==e$;s.useEffect(function(){if(!tt){var e=eV.lastIndexOf(e0);eE.current.focus(e)}},[tt]);var tn=s.useMemo(function(){return(0,f.Z)(e2).sort(function(e,t){return e-t})},[e2]),to=s.useMemo(function(){return eD?[tn[0],tn[tn.length-1]]:[eN,tn[0]]},[tn,eD,eN]),tr=(0,m.Z)(to,2),ti=tr[0],ta=tr[1];s.useImperativeHandle(t,function(){return{focus:function(){eE.current.focus(0)},blur:function(){var e,t=document.activeElement;null!==(e=ek.current)&&void 0!==e&&e.contains(t)&&(null==t||t.blur())}}}),s.useEffect(function(){j&&eE.current.focus(0)},[]);var tc=s.useMemo(function(){return{min:eN,max:eA,direction:eR,disabled:D,keyboard:Z,step:eT,included:ea,includedStart:ti,includedEnd:ta,range:eD,tabIndex:ey,ariaLabelForHandle:eC,ariaLabelledByForHandle:ex,ariaRequired:ew,ariaValueTextFormatterForHandle:eS,styles:k||{},classNames:E||{}}},[eN,eA,eR,D,Z,eT,ea,ti,ta,eD,ey,eC,ex,ew,eS,k,E]);return s.createElement(M.Provider,{value:tc},s.createElement("div",{ref:ek,className:d()(x,w,(0,h.Z)((0,h.Z)((0,h.Z)((0,h.Z)({},"".concat(x,"-disabled"),D),"".concat(x,"-vertical"),er),"".concat(x,"-horizontal"),!er),"".concat(x,"-with-marks"),eI.length)),style:S,onMouseDown:function(e){e.preventDefault();var t,n=ek.current.getBoundingClientRect(),o=n.width,r=n.height,i=n.left,a=n.top,c=n.bottom,s=n.right,l=e.clientX,u=e.clientY;switch(eR){case"btt":t=(c-u)/r;break;case"ttb":t=(u-a)/r;break;case"rtl":t=(s-l)/o;break;default:t=(l-i)/o}e3(eB(eN+t*(eA-eN)),e)},id:R},s.createElement("div",{className:d()("".concat(x,"-rail"),null==E?void 0:E.rail),style:(0,p.Z)((0,p.Z)({},eu),null==k?void 0:k.rail)}),!1!==eg&&s.createElement(I,{prefixCls:x,style:es,values:eV,startPoint:ec,onStartMove:e9?te:void 0}),s.createElement(T,{prefixCls:x,marks:eI,dots:ef,style:ed,activeStyle:ep}),s.createElement(O,{ref:eE,prefixCls:x,style:el,values:e2,draggingIndex:e$,draggingDelete:e1,onStartMove:te,onOffsetChange:function(e,t){if(!D){var n=eH(eV,e,t);null==J||J(eX(eV)),eY(n.values),e7(n.value)}},onFocus:A,onBlur:F,handleRender:ev,activeHandleRender:em,onChangeComplete:eK,onDelete:eP?function(e){if(!D&&eP&&!(eV.length<=eO)){var t=(0,f.Z)(eV);t.splice(e,1),null==J||J(eX(t)),eY(t),eE.current.hideHelp(),eE.current.focus(Math.max(0,e-1))}}:void 0}),s.createElement(N,{prefixCls:x,marks:eI,onClick:e3})))}),_=n(49975),q=n(8154);let G=(0,s.createContext)({});var U=n(42684),V=n(27610);let X=s.forwardRef((e,t)=>
1{let{open:n,draggingDelete:o,value:r}=e,i=(0,s.useRef)(null),a=n&&!o,c=(0,s.useRef)(null);function l(){_.Z.cancel(c.current),c.current=null}return s.useEffect(()=>(a?c.current=(0,_.Z)(()=>{var e;null===(e=i.current)||void 0===e||e.forceAlign(),c.current=null}):l(),l),[a,e.title,r]),s.createElement(V.Z,Object.assign({ref:(0,U.sQ)(i,t)},e,{open:a}))});var Y=n(84759),K=n(84432),J=n(42446),Q=n(38841),$=n(83509);let ee=e=>{let{componentCls:t,antCls:n,controlSize:o,dotSize:r,marginFull:i,marginPart:a,colorFillContentHover:c,handleColorDisabled:s,calc:l,handleSize:u,handleSizeHover:d,handleActiveColor:p,handleActiveOutlineColor:h,handleLineWidth:f,handleLineWidthHover:v,motionDurationMid:m}=e;return{[t]:Object.assign(Object.assign({},(0,J.Wf)(e)),{position:"relative",height:o,margin:"".concat((0,Y.unit)(a)," ").concat((0,Y.unit)(i)),padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:"".concat((0,Y.unit)(i)," ").concat((0,Y.unit)(a))},["".concat(t,"-rail")]:{position:"absolute",backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:"background-color ".concat(m)},["".concat(t,"-track,").concat(t,"-tracks")]:{position:"absolute",transition:"background-color ".concat(m)},["".concat(t,"-track")]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},["".concat(t,"-track-draggable")]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{["".concat(t,"-rail")]:{backgroundColor:e.railHoverBg},["".concat(t,"-track")]:{backgroundColor:e.trackHoverBg},["".concat(t,"-dot")]:{borderColor:c},["".concat(t,"-handle::after")]:{boxShadow:"0 0 0 ".concat((0,Y.unit)(f)," ").concat(e.colorPrimaryBorderHover)},["".concat(t,"-dot-active")]:{borderColor:e.dotActiveBorderColor}},["".concat(t,"-handle")]:{position:"absolute",width:u,height:u,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0}
1,"&::before":{content:'""',position:"absolute",insetInlineStart:l(f).mul(-1).equal(),insetBlockStart:l(f).mul(-1).equal(),width:l(u).add(l(f).mul(2)).equal(),height:l(u).add(l(f).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:e.colorBgElevated,boxShadow:"0 0 0 ".concat((0,Y.unit)(f)," ").concat(e.handleColor),outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:"\n inset-inline-start ".concat(m,",\n inset-block-start ").concat(m,",\n width ").concat(m,",\n height ").concat(m,",\n box-shadow ").concat(m,",\n outline ").concat(m,"\n ")},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:l(d).sub(u).div(2).add(v).mul(-1).equal(),insetBlockStart:l(d).sub(u).div(2).add(v).mul(-1).equal(),width:l(d).add(l(v).mul(2)).equal(),height:l(d).add(l(v).mul(2)).equal()},"&::after":{boxShadow:"0 0 0 ".concat((0,Y.unit)(v)," ").concat(p),outline:"6px solid ".concat(h),width:d,height:d,insetInlineStart:e.calc(u).sub(d).div(2).equal(),insetBlockStart:e.calc(u).sub(d).div(2).equal()}}},["&-lock ".concat(t,"-handle")]:{"&::before, &::after":{transition:"none"}},["".concat(t,"-mark")]:{position:"absolute",fontSize:e.fontSize},["".concat(t,"-mark-text")]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},["".concat(t,"-step")]:{position:"absolute",background:"transparent",pointerEvents:"none"},["".concat(t,"-dot")]:{position:"absolute",width:r,height:r,backgroundColor:e.colorBgElevated,border:"".concat((0,Y.unit)(f)," solid ").concat(e.dotBorderColor),borderRadius:"50%",cursor:"pointer",transition:"border-color ".concat(e.motionDurationSlow),pointerEvents:"auto","&-active":{borderColor:e.dotActiveBorderColor}},["&".concat(t,"-disabled")]:{cursor:"not-allowed",["".concat(t,"-rail")]:{backgroundColor:"".concat(e.railBg," !important")},["".concat(t,"-track")]:{backgroundColor:"".concat(e.trackBgDisabled," !important")},["\n ".concat(t,"-dot\n ")]:{backgroundColor:e.colorBgElevated,borderColor:e.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},["".concat(t,"-handle::after")]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:u,height:u,boxShadow:"0 0 0 ".concat((0,Y.unit)(f)," ").concat(s),insetInlineStart:0,insetBlockStart:0},["\n ".concat(t,"-mark-text,\n ").concat(t,"-dot\n ")]:{cursor:"not-allowed !important"}},["&-tooltip ".concat(n,"-tooltip-inner")]:{minWidth:"unset"}})}},et=(e,t)=>{let{componentCls:n,railSize:o,handleSize:r,dotSize:i,marginFull:a,calc:c}=e,s=t?"width":"height",l=t?"height":"width",u=t?"insetBlockStart":"insetInlineStart",d=t?"top":"insetInlineStart",p=c(o).mul(3).sub(r).div(2).equal(),h=c(r).sub(o).div(2).equal(),f=t?{borderWidth:"".concat((0,Y.unit)(h)," 0"),transform:"translateY(".concat((0,Y.unit)(c(h).mul(-1).equal()),")")}:{borderWidth:"0 ".concat((0,Y.unit)(h)),transform:"translateX(".concat((0,Y.unit)(e.calc(h).mul(-1).equal()),")")};return{[t?"paddingBlock":"paddingInline"]:o,[l]:c(o).mul(3).equal(),["".concat(n,"-rail")]:{[s]:"100%",[l]:o},["".concat(n,"-track,").concat(n,"-tracks")]:{[l]:o},["".concat(n,"-track-draggable")]:Object.assign({},f),["".concat(n,"-handle")]:{[u]:p},["".concat(n,"-mark")]:{insetInlineStart:0,top:0,[d]:c(o).mul(3).add(t?0:a).equal(),[s]:"100%"},["".concat(n,"-step")]:{insetInlineStart:0,top:0,[d]:o,[s]:"100%",[l]:o},["".concat(n,"-dot")]:{position:"absolute",[u]:c(o).sub(i).div(2).equal()}}},en=e=>{let{componentCls:t,marginPartWithMark:n}=e;return{["".concat(t,"-horizontal")]:Object.assign(Object.assign({},et(e,!0)),{["&".concat(t,"-with-marks")]:{marginBottom:n}})}},eo=e=>{let{componentCls:t}=e;return{["".concat(t,"-vertical")]:Object.assign(Object.assign({},et(e,!1)),{height:"100%"})}};var er=(0,Q.I$)("Slider",e=>{let t=(0,$.mergeToken)(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return[ee(t),en(t),eo(t)]},e=>{let t=e.controlHeightLG/4,n=e.controlHeightSM/2,o=e.lineWidth+1,r=e.lineWidth+1.5,i=e.colorPrimary,a=new K.FastColor(i).setA(.2).toRgbString();return{controlSize:t,railSize:4,handleSize:t,handleSizeHover:n,dotSize:8,handleLineWidth:o,handleLineWidthHover:r,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:i,handleActiveOutlineColor:a,handleColorDisabled:new K.FastColor(e.colorTextDisabled).onBackgroun
1d(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}});function ei(){let[e,t]=s.useState(!1),n=s.useRef(null),o=()=>{_.Z.cancel(n.current)};return s.useEffect(()=>o,[]),[e,e=>{o(),e?t(e):n.current=(0,_.Z)(()=>{t(e)})}]}var ea=n(88859),ec=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)0>t.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n};let es=s.forwardRef((e,t)=>{let{prefixCls:n,range:o,className:r,rootClassName:i,style:a,disabled:c,tooltipPrefixCls:l,tipFormatter:u,tooltipVisible:p,getTooltipPopupContainer:h,tooltipPlacement:f,tooltip:v={},onChangeComplete:m,classNames:g,styles:b}=e,y=ec(e,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete","classNames","styles"]),{vertical:C}=e,{getPrefixCls:x,direction:w,className:S,style:E,classNames:k,styles:R,getPopupContainer:M}=(0,ea.dj)("slider"),z=s.useContext(q.Z),{handleRender:D,direction:P}=s.useContext(G),Z="rtl"===(P||w),[O,j]=ei(),[N,A]=ei(),T=Object.assign({},v),{open:F,placement:I,getPopupContainer:L,prefixCls:W,formatter:B}=T,U=null!=F?F:p,V=(O||N)&&!1!==U,Y=B||null===B?B:u||null===u?u:e=>"number"==typeof e?e.toString():"",[K,J]=ei(),Q=(e,t)=>e||(t?Z?"left":"right":"top"),$=x("slider",n),[ee,et,en]=er($),eo=d()(r,S,k.root,null==g?void 0:g.root,i,{["".concat($,"-rtl")]:Z,["".concat($,"-lock")]:K},et,en);Z&&!y.vertical&&(y.reverse=!y.reverse),s.useEffect(()=>{let e=()=>{(0,_.Z)(()=>{A(!1)},1)};return document.addEventListener("mouseup",e),()=>{document.removeEventListener("mouseup",e)}},[]);let es=o&&!U,el=D||((e,t)=>{let{index:n}=t,o=e.props;function r(e,t,n){var r,i;n&&(null===(r=y[e])||void 0===r||r.call(y,t)),null===(i=o[e])||void 0===i||i.call(o,t)}let i=Object.assign(Object.assign({},o),{onMouseEnter:e=>{j(!0),r("onMouseEnter",e)},onMouseLeave:e=>{j(!1),r("onMouseLeave",e)},onMouseDown:e=>{A(!0),J(!0),r("onMouseDown",e)},onFocus:e=>{var t;A(!0),null===(t=y.onFocus)||void 0===t||t.call(y,e),r("onFocus",e,!0)},onBlur:e=>{var t;A(!1),null===(t=y.onBlur)||void 0===t||t.call(y,e),r("onBlur",e,!0)}}),a=s.cloneElement(e,i),c=(!!U||V)&&null!==Y;return es?a:s.createElement(X,Object.assign({},T,{prefixCls:x("tooltip",null!=W?W:l),title:Y?Y(t.value):"",value:t.value,open:c,placement:Q(null!=I?I:f,C),key:n,classNames:{root:"".concat($,"-tooltip")},getPopupContainer:L||h||M}),a)}),eu=es?(e,t)=>{let n=s.cloneElement(e,{style:Object.assign(Object.assign({},e.props.style),{visibility:"hidden"})});return s.createElement(X,Object.assign({},T,{prefixCls:x("tooltip",null!=W?W:l),title:Y?Y(t.value):"",open:null!==Y&&V,placement:Q(null!=I?I:f,C),key:"tooltip",classNames:{root:"".concat($,"-tooltip")},getPopupContainer:L||h||M,draggingDelete:t.draggingDelete}),n)}:void 0,ed=Object.assign(Object.assign(Object.assign(Object.assign({},R.root),E),null==b?void 0:b.root),a),ep=Object.assign(Object.assign({},R.tracks),null==b?void 0:b.tracks),eh=d()(k.tracks,null==g?void 0:g.tracks);return ee(s.createElement(H,Object.assign({},y,{classNames:Object.assign({handle:d()(k.handle,null==g?void 0:g.handle),rail:d()(k.rail,null==g?void 0:g.rail),track:d()(k.track,null==g?void 0:g.track)},eh?{tracks:eh}:{}),styles:Object.assign({handle:Object.assign(Object.assign({},R.handle),null==b?void 0:b.handle),rail:Object.assign(Object.assign({},R.rail),null==b?void 0:b.rail),track:Object.assign(Object.assign({},R.track),null==b?void 0:b.track)},Object.keys(ep).length?{tracks:ep}:{}),step:y.step,range:o,className:eo,style:ed,disabled:null!=c?c:z,ref:t,prefixCls:$,handleRender:el,activeHandleRender:eu,onChangeComplete:e=>{null==m||m(e),J(!1)}})))});var el=n(6210);function eu(e,t,n,o,r){void 0===r&&(r=0);var i=eg(t.width,t.height,r),a=i.width,c=i.height;return{x:ed(e.x,a,n.width,o),y:ed(e.y,c,n.height,o)}}function ed(e,t,n,o){var r=Math.abs(t*o/2-n/2);return eb(e,-r,r)}function ep(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function eh(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function ef(e,t){return Math.min(e,Math.max(0,t))}function ev(e,t){return t}function em(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function eg(e,t,n){var o=n*Math.PI/180;return{width:Math.abs(Math.cos(o)*e)+Math.abs(Math.sin(o)*t),height:Math.abs(Math.sin(o)*e)+Math.abs(Math.cos(o)*t)}}function eb(e,t,n){return Math.min(Math.max(e,t),n)}function ey(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return"string"==typeof e&&e.length>0}).join(" ").trim()}var eC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.cropperRef=s.createRef(),n.imageRef=s.createRef(),n.videoRef=s.createRef(),n.containerPosition={x:0,y:0}
1,n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!=typeof document?document:null,n.currentWindow="undefined"!=typeof window?window:null,n.resizeObserver=null,n.previousCropSize=null,n.isInitialized=!1,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver(function(t){if(e){e=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturechange",n.onGestureChange),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.previousCropSize=e,n.emitCropData(),n.setInitialCrop(e),n.isInitialized=!0),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t,o,r,i,a,c,s,l=(t=n.props.initialCroppedAreaPercentages,o=n.mediaSize,r=n.props.rotation,i=n.props.minZoom,a=n.props.maxZoom,c=eg(o.width,o.height,r),{crop:{x:(s=eb(e.width/c.width*(100/t.width),i,a))*c.width/2-e.width/2-c.width*s*(t.x/100),y:s*c.height/2-e.height/2-c.height*s*(t.y/100)},zoom:s}),u=l.crop,d=l.zoom;n.props.onCropChange(u),n.props.onZoomChange&&n.props.onZoomChange(d)}else if(n.props.initialCroppedAreaPixels){var p,h,f,v,m,g,b,y,C,x=(p=n.props.initialCroppedAreaPixels,h=n.mediaSize,f=n.props.rotation,v=n.props.minZoom,m=n.props.maxZoom,void 0===f&&(f=0),g=eg(h.naturalWidth,h.naturalHeight,f),y=eb((b=h.width>h.height?h.width/h.naturalWidth:h.height/h.naturalHeight,e.height>e.width?e.height/(p.height*b):e.width/(p.width*b)),v,m),C=e.height>e.width?e.height/p.height:e.width/p.width,{crop:{x:((g.width-p.width)/2-p.x)*C,y:((g.height-p.height)/2-p.y)*C},zoom:y}),u=x.crop,d=x.zoom;n.props.onCropChange(u),n.props.onZoomChange&&n.props.onZoomChange(d)}},n.computeSizes=function(){var e,t,r,i,a,c,s=n.imageRef.current||n.videoRef.current;if(s&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var l,u,d,p,h,f,v,m,g,b,y,C=n.containerRect.width/n.containerRect.height,x=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,w=(null===(r=n.imageRef.current)||void 0===r?void 0:r.naturalHeight)||(null===(i=n.videoRef.current)||void 0===i?void 0:i.videoHeight)||0,S=s.offsetWidth<x||s.offsetHeight<w,E=x/w,k=void 0;if(S)switch(n.state.mediaObjectFit){default:case"contain":k=C>E?{width:n.containerRect.height*E,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/E};break;case"horizontal-cover":k={width:n.containerRect.width,height:n.containerRect.width/E};break;case"vertical-cover":k={width:n.containerRect.height*E,height:n.containerRect.height}}else k={width:s.offsetWidth,height:s.offsetHeight};n.mediaSize=(0,o.pi)((0,o.pi)({},k),{naturalWidth:x,naturalHeight:w}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var R=n.props.cropSize?n.props.cropSize:(l=n.mediaSize.width,u=n.mediaSize.height,d=n.containerRect.width,p=n.containerRect.height,h=n.props.aspect,void 0===(f=n.props.rotation)&&(f=0),m=(v=eg(l,u,f)).width,g=v.height,(b=Math.min(m,d))>(y=Math.min(g,p))*h?{width:y*h,height:y}:{width:b,height:b/h});return((null===(a=n.state.cropSize)||void 0===a?void 0:a.height)!==R.height||(null===(c=n.state.cropSize)||void 0===c?void 0:c.width)!==R.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(R),n.setState({cropSize:R},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(R),R}},n.saveContainerPosition=function(){if(n.containerRef){var e=n.containerRef.getBoundingClientRect();n.containerPosition={x:e.left,y:e.top}}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onScroll=function(e){n.currentDoc&&(e.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,(!n.props.onTouchRequest||n.props.onTouchRequest(e))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureChange),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureChange=function(e){if(e.preventDefault(),!n.isTouching){var o=t.getMousePoint(e),r=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(r,o,{shouldUpdatePosition:!0}),n.props.onRotationChange){var i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()}
1,n.onDragStart=function(e){var t,r,i=e.x,a=e.y;n.dragStartPosition={x:i,y:a},n.dragStartCrop=(0,o.pi)({},n.props.crop),null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t)},n.onDrag=function(e){var t=e.x,o=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&void 0!==t&&void 0!==o){var e=t-n.dragStartPosition.x,r=o-n.dragStartPosition.y,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},a=n.props.restrictPosition?eu(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(a)}}))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var o=t.getMousePoint(e),r=el(e).pixelY,i=n.props.zoom-r*n.props.zoomSpeed/200;n.setNewZoom(i,o,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)})},250)}},n.getPointOnContainer=function(e,t){var o=e.x,r=e.y;if(!n.containerRect)throw Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(o-t.x),y:n.containerRect.height/2-(r-t.y)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,i=r.crop,a=r.zoom;return{x:(t+i.x)/a,y:(o+i.y)/a}},n.setNewZoom=function(e,t,o){var r=(void 0===o?{}:o).shouldUpdatePosition;if(n.state.cropSize&&n.props.onZoomChange){var i=eb(e,n.props.minZoom,n.props.maxZoom);if(void 0===r||r){var a=n.getPointOnContainer(t,n.containerPosition),c=n.getPointOnMedia(a),s={x:c.x*i-a.x,y:c.y*i-a.y},l=n.props.restrictPosition?eu(s,n.mediaSize,n.state.cropSize,i,n.props.rotation):s;n.props.onCropChange(l)}n.props.onZoomChange(i)}},n.getCropData=function(){var e,t,r,i,a,c,s,l,u,d,p,h,f,v,m;return n.state.cropSize?(e=n.props.restrictPosition?eu(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,t=n.mediaSize,r=n.state.cropSize,i=n.getAspect(),a=n.props.zoom,c=n.props.rotation,s=n.props.restrictPosition,void 0===c&&(c=0),void 0===s&&(s=!0),l=s?ef:ev,u=eg(t.width,t.height,c),d=eg(t.naturalWidth,t.naturalHeight,c),p={x:l(100,((u.width-r.width/a)/2-e.x/a)/u.width*100),y:l(100,((u.height-r.height/a)/2-e.y/a)/u.height*100),width:l(100,r.width/u.width*100/a),height:l(100,r.height/u.height*100/a)},h=Math.round(l(d.width,p.width*d.width/100)),f=Math.round(l(d.height,p.height*d.height/100)),v=d.width>=d.height*i?{width:Math.round(f*i),height:f}:{width:h,height:Math.round(h/i)},m=(0,o.pi)((0,o.pi)({},v),{x:Math.round(l(d.width-v.width,p.x*d.width/100)),y:Math.round(l(d.height-v.height,p.y*d.height/100))}),{croppedAreaPercentages:p,croppedAreaPixels:m}):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e,t,o=n.props.crop;if(n.isInitialized&&(null===(e=n.previousCropSize)||void 0===e?void 0:e.width)&&(null===(t=n.previousCropSize)||void 0===t?void 0:t.height)&&(Math.abs(n.previousCropSize.width-n.state.cropSize.width)>1e-6||Math.abs(n.previousCropSize.height-n.state.cropSize.height)>1e-6)){var r=n.state.cropSize.width/n.previousCropSize.width,i=n.state.cropSize.height/n.previousCropSize.height;o={x:n.props.crop.x*r,y:n.props.crop.y*i}}var a=n.props.restrictPosition?eu(o,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):o;n.previousCropSize=n.state.cropSize,n.props.onCropChange(a),n.emitCropData()}},n.onKeyDown=function(e){var t,r,i=n.props,a=i.crop,c=i.onCropChange,s=i.keyboardStep,l=i.zoom,u=i.rotation,d=s;if(n.state.cropSize){e.shiftKey&&(d*=.2);var p=(0,o.pi)({},a);switch(e.key){case"ArrowUp":p.y-=d,e.preventDefault();break;case"ArrowDown":p.y+=d,e.preventDefault();break;case"ArrowLeft":p.x-=d,e.preventDefault();break;case"ArrowRight":p.x+=d,e.preventDefault();break;default:return}n.props.restrictPosition&&(p=eu(p,n.mediaSize,n.state.cropSize,l,u)),e.repeat||null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t),c(
1p)}},n.onKeyUp=function(e){var t,o;switch(e.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":e.preventDefault();break;default:return}n.emitCropData(),null===(o=(t=n.props).onInteractionEnd)||void 0===o||o.call(t)},n}return(0,o.ZT)(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.objectFit!==this.props.objectFit?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(o=e.cropSize)||void 0===o?void 0:o.width)!==(null===(r=this.props.cropSize)||void 0===r?void 0:r.width)?this.computeSizes():((null===(i=e.crop)||void 0===i?void 0:i.x)!==(null===(a=this.props.crop)||void 0===a?void 0:a.x)||(null===(c=e.crop)||void 0===c?void 0:c.y)!==(null===(s=this.props.crop)||void 0===s?void 0:s.y))&&this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(l=this.videoRef.current)||void 0===l||l.load());var t,n,o,r,i,a,c,s,l,u=this.getObjectFit();u!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:u},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.getObjectFit=function(){var e,t,n,o;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var r=this.containerRect.width/this.containerRect.height;return((null===(e=this.imageRef.current)||void 0===e?void 0:e.naturalWi
1dth)||(null===(t=this.videoRef.current)||void 0===t?void 0:t.videoWidth)||0)/((null===(n=this.imageRef.current)||void 0===n?void 0:n.naturalHeight)||(null===(o=this.videoRef.current)||void 0===o?void 0:o.videoHeight)||0)<r?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=ep(n,o),this.lastPinchRotation=eh(n,o),this.onDragStart(em(n,o))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),i=em(o,r);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var e=ep(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var a=eh(o,r),c=n.props.rotation+(a-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(c),n.lastPinchRotation=a})}},t.prototype.render=function(){var e,t=this,n=this.props,r=n.image,i=n.video,a=n.mediaProps,c=n.cropperProps,l=n.transform,u=n.crop,d=u.x,p=u.y,h=n.rotation,f=n.zoom,v=n.cropShape,m=n.showGrid,g=n.roundCropAreaPixels,b=n.style,y=b.containerStyle,C=b.cropAreaStyle,x=b.mediaStyle,w=n.classes,S=w.containerClassName,E=w.cropAreaClassName,k=w.mediaClassName,R=null!==(e=this.state.mediaObjectFit)&&void 0!==e?e:this.getObjectFit();return s.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(e){return t.containerRef=e},"data-testid":"container",style:y,className:ey("reactEasyCrop_Container",S)},r?s.createElement("img",(0,o.pi)({alt:"",className:ey("reactEasyCrop_Image","contain"===R&&"reactEasyCrop_Contain","horizontal-cover"===R&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===R&&"reactEasyCrop_Cover_Vertical",k)},a,{src:r,ref:this.imageRef,style:(0,o.pi)((0,o.pi)({},x),{transform:l||"translate(".concat(d,"px, ").concat(p,"px) rotate(").concat(h,"deg) scale(").concat(f,")")}),onLoad:this.onMediaLoad})):i&&s.createElement("video",(0,o.pi)({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:ey("reactEasyCrop_Video","contain"===R&&"reactEasyCrop_Contain","horizontal-cover"===R&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===R&&"reactEasyCrop_Cover_Vertical",k)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:(0,o.pi)((0,o.pi)({},x),{transform:l||"translate(".concat(d,"px, ").concat(p,"px) rotate(").concat(h,"deg) scale(").concat(f,")")}),controls:!1}),(Array.isArray(i)?i:[{src:i}]).map(function(e){return s.createElement("source",(0,o.pi)({key:e.src},e))})),this.state.cropSize&&s.createElement("div",(0,o.pi)({ref:this.cropperRef,style:(0,o.pi)((0,o.pi)({},C),{width:g?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:g?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:ey("reactEasyCrop_CropArea","round"===v&&"reactEasyCrop_CropAreaRound",m&&"reactEasyCrop_CropAreaGrid",E)},c)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:1},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(s.Component);let ex="img-crop",ew=(0,s.forwardRef)((e,t)=>{let{cropperRef:n,zoomSlider:o,rotationSlider:i,aspectSlider:a,showReset:c,resetBtnText:u,modalImage:d,aspect:p,minZoom:h,maxZoom:f,minAspect:v,maxAspect:m,cropShape:g,showGrid:b,cropperProps:y}=e,[C,x]=(0,s.useState)({x:0,y:0}),[w,S]=(0,s.useState)(1),[E,k]=(0,s.useState)(0),[R,M]=(0,s.useState)(p),z=(0,s.useRef)({width:0,height:0,x:0,y:0}),D=(0,s.useCallback)((e,t)=>{z.current=t},[]),P=(0,s.useRef)(p);P.current!==p&&(P.current=p,M(p));let Z=1!==w||0!==E||R!==p,O=()=>{S(1),k(0),M(p)};(0,s.useImperativeHandle)(t,()=>({rotation:E,cropPixelsRef:z,onReset:O}));let j="[display:flex] [align-items:center] [width:60%] [margin-inline:auto]",N="[dis
1play:flex] [align-items:center] [justify-content:center] [height:32px] [width:32px] [background:transparent] [border:0] [font-family:inherit] [font-size:18px] [cursor:pointer] disabled:[opacity:20%] disabled:[cursor:default]",A="[flex:1]";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eC,Object.assign({},y,{ref:n,image:d,crop:C,zoom:w,rotation:E,aspect:R,minZoom:h,maxZoom:f,zoomWithScroll:o,cropShape:g,showGrid:b,onCropChange:x,onZoomChange:S,onRotationChange:k,onCropComplete:D,classes:{containerClassName:"".concat(ex,"-container ![position:relative] [width:100%] [height:40vh] [&~section:first-of-type]:[margin-top:16px] [&~section:last-of-type]:[margin-bottom:16px]"),mediaClassName:"".concat(ex,"-media")}})),o&&(0,r.jsxs)("section",{className:"".concat(ex,"-control ").concat(ex,"-control-zoom ").concat(j),children:[(0,r.jsx)("button",{className:N,onClick:()=>S(+(w-.1).toFixed(1)),disabled:w-.1<h,children:"ï¼"}),(0,r.jsx)(es,{className:A,min:h,max:f,step:.1,value:w,onChange:S}),(0,r.jsx)("button",{className:N,onClick:()=>S(+(w+.1).toFixed(1)),disabled:w+.1>f,children:"ï¼"})]}),i&&(0,r.jsxs)("section",{className:"".concat(ex,"-control ").concat(ex,"-control-rotation ").concat(j),children:[(0,r.jsx)("button",{className:"".concat(N," [font-size:16px]"),onClick:()=>k(E-1),disabled:-180===E,children:"âº"}),(0,r.jsx)(es,{className:A,min:-180,max:180,step:1,value:E,onChange:k}),(0,r.jsx)("button",{className:"".concat(N," [font-size:16px]"),onClick:()=>k(E+1),disabled:180===E,children:"â»"})]}),a&&(0,r.jsxs)("section",{className:"".concat(ex,"-control ").concat(ex,"-control-aspect ").concat(j),children:[(0,r.jsx)("button",{className:N,onClick:()=>M(+(R-.01).toFixed(2)),disabled:R-.01<v,children:"â"}),(0,r.jsx)(es,{className:A,min:v,max:m,step:.01,value:R,onChange:M}),(0,r.jsx)("button",{className:N,onClick:()=>M(+(R+.01).toFixed(2)),disabled:R+.01>m,children:"â"})]}),c&&(o||i||a)&&(0,r.jsx)(l.ZP,{className:"[position:absolute] [bottom:20px]",style:Z?{}:{opacity:.3,pointerEvents:"none"},onClick:O,children:u})]})});var eS=(0,s.memo)(ew);!function(){if("undefined"==typeof document)return;let e=document.createElement("style"),t=document.querySelector('meta[name="csp-nonce"]');t&&t.content&&e.setAttribute("nonce",t.content),e.textContent="/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */.visible{visibility:visible}.\\!\\[position\\:relative\\]{position:relative!important}.\\[position\\:absolute\\]{position:absolute}.\\[bottom\\:20px\\]{bottom:20px}.container{width:100%}.\\[margin-inline\\:auto\\]{margin-inline:auto}.\\[display\\:flex\\]{display:flex}.grid{display:grid}.\\[height\\:32px\\]{height:32px}.\\[height\\:40vh\\]{height:40vh}.\\[width\\:32px\\]{width:32px}.\\[width\\:60\\%\\]{width:60%}.\\[width\\:100\\%\\]{width:100%}.\\[flex\\:1\\]{flex:1}.\\[cursor\\:pointer\\]{cursor:pointer}.\\[align-items\\:center\\]{align-items:center}.\\[justify-content\\:center\\]{justify-content:center}.\\[font-family\\:inherit\\]{font-family:inherit}.\\[font-size\\:16px\\]{font-size:16px}.\\[font-size\\:18px\\]{font-size:18px}.\\[background\\:transparent\\]{background:transparent}.\\[border\\:0\\]{border:0}.disabled\\:\\[cursor\\:default\\]{&:disabled{cursor:default}}.disabled\\:\\[opacity\\:20\\%\\]{&:disabled{opacity:20%}}.\\[\\&\\~section\\:first-of-type\\]\\:\\[margin-top\\:16px\\]{&~section:first-of-type{margin-top:16px}}.\\[\\&\\~section\\:last-of-type\\]\\:\\[margin-bottom\\:16px\\]{&~section:last-of-type{margin-bottom:16px}}",document.head.appendChild(e)}();let eE=(e,t)=>{var n,o;let r=e.split(".").map(Number),i=t.split(".").map(Number),a=Math.max(r.length,i.length);for(let e=0;e<a;e++){let t=null!==(n=r[e])&&void 0!==n?n:0,a=null!==(o=i[e])&&void 0!==o?o:0;if(t>a)break;if(t<a)return!1}return!0},ek=(0,s.forwardRef)((e,t)=>{let{quality:n=.4,fillColor:l="white",zoomSlider:u=!0,rotationSlider:d=!1,aspectSlider:p=!1,showReset:h=!1,resetText:f,aspect:v=1,minZoom:m=1,maxZoom:g=3,minAspect:b=.5,maxAspect:y=2,cropShape:C="rect",showGrid:x=!1,cropperProps:w,modalClassName:S,modalTitle:E,modalWidth:k,modalOk:R,modalCancel:M,onModalOk:z,onModalCancel:D,modalProps:P,beforeCrop:Z,children:O}=e,j=(0,s.useRef)({});j.current.onModalOk=z,j.current.onModalCancel=D,j.current.beforeCrop=Z;let N=(0,s.useRef)(null),A=(0,s.useCallback)(e=>{var t;let n=document.createElement("canvas"),o=n.getContext("2d"),r=((null===(t=null==e?void 0:e.getRootNode)||void 0===t?void 0:t.call(e))||document).querySelector(".".concat(ex,"-media")),{width:i,height:a,x:c,y:s}=N.current.cropPixelsRef.current;
1if(d&&0!==N.current.rotation){let{naturalWidth:e,naturalHeight:t}=r,u=N.current.rotation*(Math.PI/180),d=Math.abs(Math.sin(u)),p=Math.abs(Math.cos(u)),h=e*p+t*d,f=t*p+e*d;n.width=h,n.height=f,o.fillStyle=l,o.fillRect(0,0,h,f);let v=h/2,m=f/2;o.translate(v,m),o.rotate(u),o.translate(-v,-m);let g=(h-e)/2,b=(f-t)/2;o.drawImage(r,0,0,e,t,g,b,e,t);let y=o.getImageData(0,0,h,f);n.width=i,n.height=a,o.putImageData(y,-c,-s)}else n.width=i,n.height=a,o.fillStyle=l,o.fillRect(0,0,i,a),o.drawImage(r,c,s,i,a,0,0,i,a);return n},[l,d]),[T,F]=(0,s.useState)(!1),[I,L]=(0,s.useState)(""),W=(0,s.useRef)(void 0),B=(0,s.useRef)(void 0),H=(0,s.useCallback)(e=>(0,o.mG)(void 0,[e],void 0,function*(e){let{beforeUpload:t,file:n,resolve:o,reject:r}=e;if("function"!=typeof t){o(n);return}try{let e=yield t(n,[n]);o(!1!==e&&(!0!==e&&e||n))}catch(e){r(e)}}),[]),_=(0,s.useCallback)(e=>(t,r)=>new Promise((i,a)=>(0,o.mG)(void 0,void 0,void 0,function*(){let s=t;if("function"==typeof j.current.beforeCrop)try{let n=yield j.current.beforeCrop(t,r);if(!1===n)return H({beforeUpload:e,file:t,resolve:i,reject:a});!0!==n&&(s=n||t)}catch(n){return H({beforeUpload:e,file:t,resolve:i,reject:a})}let l=new FileReader;l.addEventListener("load",()=>{"string"==typeof l.result&&(F(!0),setTimeout(()=>{L(l.result)},10))}),l.readAsDataURL(s),W.current=()=>{var e,t;F(!1),L(""),N.current.onReset();let n=!1;null===(t=(e=j.current).onModalCancel)||void 0===t||t.call(e,e=>{i(e),n=!0}),n||i(c.default.LIST_IGNORE)},B.current=t=>(0,o.mG)(void 0,void 0,void 0,function*(){F(!1),L(""),N.current.onReset();let r=A(t.target),{type:c,name:l,uid:u}=s;r.toBlob(t=>(0,o.mG)(void 0,void 0,void 0,function*(){let n=new File([t],l,{type:c});Object.assign(n,{uid:u}),H({beforeUpload:e,file:n,resolve:e=>{var t,n;i(e),null===(n=(t=j.current).onModalOk)||void 0===n||n.call(t,e)},reject:e=>{var t,n;a(e),null===(n=(t=j.current).onModalOk)||void 0===n||n.call(t,e)}})}),c,n)})})),[A,n,H]),q=(0,s.useCallback)(e=>{let t=Array.isArray(e)?e[0]:e,n=t.props,{beforeUpload:r,accept:i}=n,a=(0,o._T)(n,["beforeUpload","accept"]);return Object.assign(Object.assign({},t),{props:Object.assign(Object.assign({},a),{accept:i||"image/*",beforeUpload:_(r)})})},[_]),G=(0,s.useMemo)(()=>{let e={};return void 0!==k&&(e.width=k),void 0!==R&&(e.okText=R),void 0!==M&&(e.cancelText=M),e},[M,R,k]),U="".concat(ex,"-modal").concat(S?" ".concat(S):""),V="zh-CN"===window.navigator.language;return(0,r.jsxs)(r.Fragment,{children:[q(O),(0,r.jsx)(a.Z,Object.assign({},P,G,{open:T,title:E||(V?"ç¼è¾å¾ç":"Edit image"),onCancel:W.current,onOk:B.current,wrapClassName:U,destroyOnHidden:!0},eE(i.Z,"6.3.1")?{mask:{closable:!1}}:{maskClosable:!0},{children:(0,r.jsx)(eS,{ref:N,cropperRef:t,zoomSlider:u,rotationSlider:d,aspectSlider:p,showReset:h,resetBtnText:f||(V?"éç½®":"Reset"),modalImage:I,aspect:v,minZoom:m,maxZoom:g,minAspect:b,maxAspect:y,cropShape:C,showGrid:x,cropperProps:w})}))]})})},29607:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});let o=(0,n(35082).Z)("cloud-upload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]])},57065:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});let o=(0,n(35082).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},6210:function(e,t,n){e.exports=n(92782)},72906:function(e){"use strict";var t=!!("undefined"!=typeof window&&window.document&&window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!!(window.addEventListener||window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},73211:function(e){var t,n,o,r,i,a,c,s,l,u,d,p,h,f,v,m=!1;function g(){if(!m){m=!0;var e=navigator.userAgent,g=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Ice
1weasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),b=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(p=/\b(iPhone|iP[ao]d)/.exec(e),h=/\b(iP[ao]d)/.exec(e),u=/Android/i.exec(e),f=/FBAN\/\w+;/i.exec(e),v=/Mobile/i.exec(e),d=!!/Win64/.exec(e),g){(t=g[1]?parseFloat(g[1]):g[5]?parseFloat(g[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var y=/(?:Trident\/(\d+.\d+))/.exec(e);a=y?parseFloat(y[1])+4:t,n=g[2]?parseFloat(g[2]):NaN,o=g[3]?parseFloat(g[3]):NaN,i=(r=g[4]?parseFloat(g[4]):NaN)&&(g=/(?:Chrome\/(\d+\.\d+))/.exec(e))&&g[1]?parseFloat(g[1]):NaN}else t=n=o=i=r=NaN;if(b){if(b[1]){var C=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);c=!C||parseFloat(C[1].replace("_","."))}else c=!1;s=!!b[2],l=!!b[3]}else c=s=l=!1}}var b={ie:function(){return g()||t},ieCompatibilityMode:function(){return g()||a>t},ie64:function(){return b.ie()&&d},firefox:function(){return g()||n},opera:function(){return g()||o},webkit:function(){return g()||r},safari:function(){return b.webkit()},chrome:function(){return g()||i},windows:function(){return g()||s},osx:function(){return g()||c},linux:function(){return g()||l},iphone:function(){return g()||p},mobile:function(){return g()||p||h||u||v},nativeApp:function(){return g()||f},android:function(){return g()||u},ipad:function(){return g()||h}};e.exports=b},16177:function(e,t,n){"use strict";var o,r=n(72906);r.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=function(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&o&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},92782:function(e,t,n){"use strict";var o=n(73211),r=n(16177);function i(e){var t=0,n=0,o=0,r=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=10*t,r=10*n,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(1==e.deltaMode?(o*=40,r*=40):(o*=800,r*=800)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}}i.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=i},15767:function(e,t,n){"use strict";n.d(t,{CR:function(){return l},Q_:function(){return d},XA:function(){return s},ZT:function(){return r},_T:function(){return a},ev:function(){return u},mG:function(){return c},pi:function(){return i}});var o=function(e,t){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)0>t.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function c(e,t,n,o){return new(n||(n=Promise))(function(r,i){function a(e){try{s(o.next(e))}catch(e){i(e)}}function c(e){try{s(o.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,c)}s((o=o.apply(e,t||[])).next())})}function s(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);
vendor: 1,014 bytes, line 1
1if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function u(e,t,n){if(n||2==arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function d(e,t,n,o){if("a"===n&&!o)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(e):o?o.value:t.get(e)}"function"==typeof SuppressedError&&SuppressedError}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.