@whyour/qinglong 2.18.0 → 2.18.2-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-en.md +4 -127
- package/README.md +4 -125
- package/SECURITY.md +5 -0
- package/back.d.ts +9 -0
- package/package.json +6 -8
- package/sample/ql_sample.js +6 -0
- package/sample/ql_sample.py +6 -1
- package/shell/api.sh +4 -1
- package/shell/preload/client.js +45 -0
- package/shell/preload/client.py +113 -0
- package/shell/preload/sitecustomize.js +2 -0
- package/shell/preload/sitecustomize.py +2 -1
- package/shell/share.sh +15 -4
- package/shell/update.sh +2 -1
- package/static/build/api/log.js +1 -1
- package/static/build/app.js +0 -1
- package/static/build/config/index.js +0 -2
- package/static/build/config/util.js +8 -4
- package/static/build/data/env.js +1 -1
- package/static/build/loaders/db.js +0 -70
- package/static/build/loaders/express.js +2 -27
- package/static/build/loaders/initData.js +20 -12
- package/static/build/protos/api.js +1084 -0
- package/static/build/protos/cron.js +36 -27
- package/static/build/protos/health.js +12 -3
- package/static/build/schedule/api.js +140 -0
- package/static/build/schedule/index.js +26 -0
- package/static/build/services/env.js +1 -1
- package/static/build/services/notify.js +19 -34
- package/static/build/services/open.js +11 -3
- package/static/build/services/system.js +1 -1
- package/static/build/shared/pLimit.js +12 -1
- package/static/dist/2208.c1a40612.async.js +1 -0
- package/static/dist/{8528.3dffc548.async.js → 3127.2579e73a.async.js} +1 -1
- package/static/dist/{2237.4d3def87.async.js → 3191.f56b00f8.async.js} +1 -1
- package/static/dist/4402.49bbe98d.async.js +1 -0
- package/static/dist/{5312.5545b3ed.async.js → 5312.74b95311.async.js} +1 -1
- package/static/dist/{1149.33cb7e7a.async.js → 7253.4b9bf133.async.js} +1 -1
- package/static/dist/{872.10bd0974.async.js → 7508.a31662a3.async.js} +1 -1
- package/static/dist/{2081.d0d781b1.async.js → 7984.e6bb9378.async.js} +1 -1
- package/static/dist/8317.c44c1ebd.async.js +1 -0
- package/static/dist/874.ae8edb1a.async.js +1 -0
- package/static/dist/8826.37966028.async.js +1 -0
- package/static/dist/{4799.d5ca9f30.async.js → 9313.37acaf13.async.js} +1 -1
- package/static/dist/index.html +2 -2
- package/static/dist/layouts__index.c986408d.async.js +1 -0
- package/static/dist/preload_helper.6482f199.js +1 -0
- package/static/dist/src__pages__404.771168fc.async.js +1 -0
- package/static/dist/src__pages__config__index.de6dca30.async.js +1 -0
- package/static/dist/{src__pages__crontab__detail.6f7c3205.async.js → src__pages__crontab__detail.80d30a01.async.js} +1 -1
- package/static/dist/src__pages__crontab__index.9e38b6dc.async.js +1 -0
- package/static/dist/{src__pages__crontab__logModal.c88ea3b7.async.js → src__pages__crontab__logModal.6a345e8a.async.js} +1 -1
- package/static/dist/src__pages__crontab__modal.78b1e588.async.js +1 -0
- package/static/dist/{src__pages__crontab__type.5895ed02.async.js → src__pages__crontab__type.bde5cda4.async.js} +1 -1
- package/static/dist/src__pages__crontab__viewManageModal.4874669b.async.js +1 -0
- package/static/dist/src__pages__dependence__index.4a0af2b9.async.js +1 -0
- package/static/dist/src__pages__dependence__modal.e6696a7c.async.js +1 -0
- package/static/dist/{src__pages__dependence__type.bdac3725.async.js → src__pages__dependence__type.e48c5c88.async.js} +1 -1
- package/static/dist/src__pages__diff__index.a4176b58.async.js +1 -0
- package/static/dist/src__pages__env__editNameModal.02322e80.async.js +1 -0
- package/static/dist/src__pages__env__index.f3bfe0c7.async.js +1 -0
- package/static/dist/src__pages__env__modal.066399fd.async.js +1 -0
- package/static/dist/src__pages__error__index.656c9940.async.js +1 -0
- package/static/dist/src__pages__initialization__index.75484c39.async.js +1 -0
- package/static/dist/src__pages__log__index.8a782756.async.js +1 -0
- package/static/dist/src__pages__login__index.8a653852.async.js +1 -0
- package/static/dist/src__pages__script__editModal.e7bf71bd.async.js +1 -0
- package/static/dist/src__pages__script__editNameModal.c048343e.async.js +1 -0
- package/static/dist/src__pages__script__index.9d9099c1.async.js +1 -0
- package/static/dist/src__pages__script__renameModal.357c6c72.async.js +1 -0
- package/static/dist/src__pages__script__saveModal.61fcb1fe.async.js +1 -0
- package/static/dist/src__pages__script__setting.f2d78204.async.js +1 -0
- package/static/dist/{src__pages__setting__about.3a1a6f3b.async.js → src__pages__setting__about.3d3c019f.async.js} +1 -1
- package/static/dist/src__pages__setting__appModal.9eeaeee7.async.js +1 -0
- package/static/dist/{src__pages__setting__checkUpdate.0dfdaf7c.async.js → src__pages__setting__checkUpdate.04c00c9c.async.js} +1 -1
- package/static/dist/src__pages__setting__dependence.0dd0969b.async.js +1 -0
- package/static/dist/src__pages__setting__index.46a8e768.async.js +1 -0
- package/static/dist/{src__pages__setting__loginLog.fc87584a.async.js → src__pages__setting__loginLog.cea6056c.async.js} +1 -1
- package/static/dist/src__pages__setting__notification.b038afec.async.js +1 -0
- package/static/dist/{src__pages__setting__other.34ccb2e8.async.js → src__pages__setting__other.0d869d58.async.js} +1 -1
- package/static/dist/{src__pages__setting__progress.75143dca.async.js → src__pages__setting__progress.8823ac90.async.js} +1 -1
- package/static/dist/src__pages__setting__security.af57bd6a.async.js +1 -0
- package/static/dist/src__pages__setting__systemLog.501844bd.async.js +1 -0
- package/static/dist/src__pages__subscription__index.b43143e7.async.js +1 -0
- package/static/dist/{src__pages__subscription__logModal.b3c7c02c.async.js → src__pages__subscription__logModal.02c80eb3.async.js} +1 -1
- package/static/dist/src__pages__subscription__modal.a61ece75.async.js +1 -0
- package/static/dist/umi.e783bacd.js +1 -0
- package/version.yaml +6 -7
- package/static/build/loaders/sentry.js +0 -53
- package/static/dist/2634.a765cd37.async.js +0 -1
- package/static/dist/4642.9e24d86c.async.js +0 -1
- package/static/dist/4865.98e5a005.async.js +0 -1
- package/static/dist/852.15be2189.async.js +0 -1
- package/static/dist/9065.df8d5dcc.async.js +0 -1
- package/static/dist/layouts__index.c164d41f.async.js +0 -1
- package/static/dist/preload_helper.55b35ae0.js +0 -1
- package/static/dist/src__pages__404.6871535b.async.js +0 -1
- package/static/dist/src__pages__config__index.39b5f99f.async.js +0 -1
- package/static/dist/src__pages__crontab__index.55a8714d.async.js +0 -1
- package/static/dist/src__pages__crontab__modal.328fee41.async.js +0 -1
- package/static/dist/src__pages__crontab__viewManageModal.c71ebc5a.async.js +0 -1
- package/static/dist/src__pages__dependence__index.edec638b.async.js +0 -1
- package/static/dist/src__pages__dependence__modal.9fd1176b.async.js +0 -1
- package/static/dist/src__pages__diff__index.8ba53a1e.async.js +0 -1
- package/static/dist/src__pages__env__editNameModal.c35e96f9.async.js +0 -1
- package/static/dist/src__pages__env__index.c799138c.async.js +0 -1
- package/static/dist/src__pages__env__modal.3b0ca9a6.async.js +0 -1
- package/static/dist/src__pages__error__index.0221fcd9.async.js +0 -1
- package/static/dist/src__pages__initialization__index.346725d1.async.js +0 -1
- package/static/dist/src__pages__log__index.2fd615f2.async.js +0 -1
- package/static/dist/src__pages__login__index.1dd6e684.async.js +0 -1
- package/static/dist/src__pages__script__editModal.28caeb56.async.js +0 -1
- package/static/dist/src__pages__script__editNameModal.1155d34c.async.js +0 -1
- package/static/dist/src__pages__script__index.6a212c2d.async.js +0 -1
- package/static/dist/src__pages__script__renameModal.dabfccfd.async.js +0 -1
- package/static/dist/src__pages__script__saveModal.04d43882.async.js +0 -1
- package/static/dist/src__pages__script__setting.9d5ad53c.async.js +0 -1
- package/static/dist/src__pages__setting__appModal.7b3bff1e.async.js +0 -1
- package/static/dist/src__pages__setting__dependence.a9b7ed43.async.js +0 -1
- package/static/dist/src__pages__setting__index.ffa1cdd6.async.js +0 -1
- package/static/dist/src__pages__setting__notification.97b1d997.async.js +0 -1
- package/static/dist/src__pages__setting__security.c777fb87.async.js +0 -1
- package/static/dist/src__pages__setting__systemLog.63e9c69d.async.js +0 -1
- package/static/dist/src__pages__subscription__index.69a6de02.async.js +0 -1
- package/static/dist/src__pages__subscription__modal.aefaf070.async.js +0 -1
- package/static/dist/umi.fb3ed7a0.js +0 -1
- /package/static/dist/{2625.675b6a18.chunk.css → 1883.675b6a18.chunk.css} +0 -0
- /package/static/dist/{872.3fffed15.chunk.css → 7508.3fffed15.chunk.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[2081],{1371:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(2053),o=n(75271),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},a=n(48881),s=function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))};var c=o.forwardRef(s)},69822:function(e,t,n){"use strict";n.d(t,{Z:function(){return ve}});var r=n(15767),o=n(52676),i=n(45520),a=n(6367),s=n(75271),c=n(93481),u=n(24744),l=n(57904),h=n(2053),d=n(99459),p=n(82187),f=n.n(p),v=n(35047),m=n(50631),g=n.n(m),y=n(6522),C=n(53162),b=n(98037),w=n(1260),x=s.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0});function S(e,t,n){return(e-t)/(n-t)}function E(e,t,n,r){var o=S(t,n,r),i={};switch(e){case"rtl":i.right="".concat(100*o,"%"),i.transform="translateX(50%)";break;case"btt":i.bottom="".concat(100*o,"%"),i.transform="translateY(50%)";break;case"ttb":i.top="".concat(100*o,"%"),i.transform="translateY(-50%)";break;default:i.left="".concat(100*o,"%"),i.transform="translateX(-50%)"}return i}function M(e,t){return Array.isArray(e)?e[t]:e}var P=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"];var R=s.forwardRef((function(e,t){var n,r,o=e.prefixCls,i=e.value,a=e.valueIndex,c=e.onStartMove,u=e.style,d=e.render,p=e.dragging,v=e.onOffsetChange,m=(0,C.Z)(e,P),g=s.useContext(x),y=g.min,S=g.max,R=g.direction,D=g.disabled,k=g.range,L=g.tabIndex,O=g.ariaLabelForHandle,z=g.ariaLabelledByForHandle,A=g.ariaValueTextFormatterForHandle,T="".concat(o,"-handle"),_=function(e){D||c(e,a)},Z=E(R,i,y,S),N=s.createElement("div",(0,h.Z)({ref:t,className:f()(T,(n={},(0,l.Z)(n,"".concat(T,"-").concat(a+1),k),(0,l.Z)(n,"".concat(T,"-dragging"),p),n)),style:(0,b.Z)((0,b.Z)({},Z),u),onMouseDown:_,onTouchStart:_,onKeyDown:function(e){if(!D){var t=null;switch(e.which||e.keyCode){case w.Z.LEFT:t="ltr"===R||"btt"===R?-1:1;break;case w.Z.RIGHT:t="ltr"===R||"btt"===R?1:-1;break;case w.Z.UP:t="ttb"!==R?1:-1;break;case w.Z.DOWN:t="ttb"!==R?-1:1;break;case w.Z.HOME:t="min";break;case w.Z.END:t="max";break;case w.Z.PAGE_UP:t=2;break;case w.Z.PAGE_DOWN:t=-2}null!==t&&(e.preventDefault(),v(t,a))}},tabIndex:D?null:M(L,a),role:"slider","aria-valuemin":y,"aria-valuemax":S,"aria-valuenow":i,"aria-disabled":D,"aria-label":M(O,a),"aria-labelledby":M(z,a),"aria-valuetext":null===(r=M(A,a))||void 0===r?void 0:r(i)},m));return d&&(N=d(N,{index:a,prefixCls:o,value:i,dragging:p})),N})),D=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"];var k=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.style,o=e.onStartMove,i=e.onOffsetChange,a=e.values,c=e.handleRender,u=e.draggingIndex,l=(0,C.Z)(e,D),d=s.useRef({});return s.useImperativeHandle(t,(function(){return{focus:function(e){var t;null===(t=d.current[e])||void 0===t||t.focus()}}})),s.createElement(s.Fragment,null,a.map((function(e,t){return s.createElement(R,(0,h.Z)({ref:function(e){e?d.current[t]=e:delete d.current[t]},dragging:u===t,prefixCls:n,style:M(r,t),key:t,value:e,valueIndex:t,onStartMove:o,onOffsetChange:i,render:c},l))})))}));function L(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function O(e){var t=e.prefixCls,n=e.style,r=e.start,o=e.end,i=e.index,a=e.onStartMove,c=s.useContext(x),u=c.direction,l=c.min,h=c.max,d=c.disabled,p=c.range,v="".concat(t,"-track"),m=S(r,l,h),g=S(o,l,h),y=function(e){!d&&a&&a(e,-1)},C={};switch(u){case"rtl":C.right="".concat(100*m,"%"),C.width="".concat(100*g-100*m,"%");break;case"btt":C.bottom="".concat(100*m,"%"),C.height="".concat(100*g-100*m,"%");break;case"ttb":C.top="".concat(100*m,"%"),C.height="".concat(100*g-100*m,"%");break;default:C.left="".concat(100*m,"%"),C.width="".concat(100*g-100*m,"%")}return s.createElement("div",{className:f()(v,p&&"".concat(v,"-").concat(i+1)),style:(0,b.Z)((0,b.Z)({},C),n),onMouseDown:y,onTouchStart:y})}function z(e){var t=e.prefixCls,n=e.style,r=e.values,o=e.startPoint,i=e.onStartMove,a=s.useContext(x),c=a.included,u=a.range,l=a.min,h=s.useMemo((function(){if(!u){if(0===r.length)return[];var e=null!=o?o:l,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],i=0;i<r.length-1;i+=1)n.push({start:r[i],end:r[i+1]});return n}),[r,u,o,l]);return c?h.map((function(e,r){var o=e.start,a=e.end;return s.createElement(O,{index:r,prefixCls:t,style:M(n,r),start:o,end:a,key:r,onStartMove:i})})):null}function A(e){var t=e.prefixCls,n=e.style,r=e.children,o=e.value,i=e.onClick,a=s.useContext(x),c=a.min,u=a.max,h=a.direction,d=a.includedStart,p=a.includedEnd,v=a.included,m="".concat(t,"-text"),g=E(h,o,c,u);return s.createElement("span",{className:f()(m,(0,l.Z)({},"".concat(m,"-active"),v&&d<=o&&o<=p)),style:(0,b.Z)((0,b.Z)({},g),n),onMouseDown:function(e){e.stopPropagation()},onClick:function(){i(o)}},r)}function T(e){var t=e.prefixCls,n=e.marks,r=e.onClick,o="".concat(t,"-mark");return n.length?s.createElement("div",{className:o},n.map((function(e){var t=e.value,n=e.style,i=e.label;return s.createElement(A,{key:t,prefixCls:o,style:n,value:t,onClick:r},i)}))):null}function _(e){var t=e.prefixCls,n=e.value,r=e.style,o=e.activeStyle,i=s.useContext(x),a=i.min,c=i.max,u=i.direction,h=i.included,d=i.includedStart,p=i.includedEnd,v="".concat(t,"-dot"),m=h&&d<=n&&n<=p,g=(0,b.Z)((0,b.Z)({},E(u,n,a,c)),"function"==typeof r?r(n):r);return m&&(g=(0,b.Z)((0,b.Z)({},g),"function"==typeof o?o(n):o)),s.createElement("span",{className:f()(v,(0,l.Z)({},"".concat(v,"-active"),m)),style:g})}function Z(e){var t=e.prefixCls,n=e.marks,r=e.dots,o=e.style,i=e.activeStyle,a=s.useContext(x),c=a.min,u=a.max,l=a.step,h=s.useMemo((function(){var e=new Set;if(n.forEach((function(t){e.add(t.value)})),r&&null!==l)for(var t=c;t<=u;)e.add(t),t+=l;return Array.from(e)}),[c,u,l,r,n]);return s.createElement("div",{className:"".concat(t,"-step")},h.map((function(e){return s.createElement(_,{prefixCls:t,key:e,value:e,style:o,activeStyle:i})})))}n(7432);var N=s.forwardRef((function(e,t){var n,r=e.prefixCls,o=void 0===r?"rc-slider":r,i=e.className,a=e.style,c=e.disabled,h=void 0!==c&&c,p=e.autoFocus,m=e.onFocus,C=e.onBlur,b=e.min,w=void 0===b?0:b,S=e.max,E=void 0===S?100:S,M=e.step,P=void 0===M?1:M,R=e.value,D=e.defaultValue,O=e.range,A=e.count,_=e.onChange,N=e.onBeforeChange,B=e.onAfterChange,I=e.allowCross,j=void 0===I||I,F=e.pushable,H=void 0!==F&&F,W=e.draggableTrack,G=e.reverse,U=e.vertical,X=e.included,Y=void 0===X||X,K=e.startPoint,V=e.trackStyle,$=e.handleStyle,q=e.railStyle,J=e.dotStyle,Q=e.activeDotStyle,ee=e.marks,te=e.dots,ne=e.handleRender,re=e.tabIndex,oe=void 0===re?0:re,ie=e.ariaLabelForHandle,ae=e.ariaLabelledByForHandle,se=e.ariaValueTextFormatterForHandle,ce=s.useRef(),ue=s.useRef(),le=s.useMemo((function(){return U?G?"ttb":"btt":G?"rtl":"ltr"}),[G,U]),he=s.useMemo((function(){return isFinite(w)?w:0}),[w]),de=s.useMemo((function(){return isFinite(E)?E:100}),[E]),pe=s.useMemo((function(){return null!==P&&P<=0?1:P}),[P]),fe=s.useMemo((function(){return!0===H?pe:H>=0&&H}),[H,pe]),ve=s.useMemo((function(){return Object.keys(ee||{}).map((function(e){var t=ee[e],n={value:Number(e)};return t&&"object"===(0,u.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}))}),[ee]),me=function(e,t,n,r,o,i){var a=s.useCallback((function(n){var r=isFinite(n)?n:e;return r=Math.min(t,n),Math.max(e,r)}),[e,t]),c=s.useCallback((function(r){if(null!==n){var o=e+Math.round((a(r)-e)/n)*n,i=function(e){return(String(e).split(".")[1]||"").length},s=Math.max(i(n),i(t),i(e)),c=Number(o.toFixed(s));return e<=c&&c<=t?c:null}return null}),[n,e,t,a]),u=s.useCallback((function(o){var i=a(o),s=r.map((function(e){return e.value}));null!==n&&s.push(c(o)),s.push(e,t);var u=s[0],l=t-e;return s.forEach((function(e){var t=Math.abs(i-e);t<=l&&(u=e,l=t)})),u}),[e,t,r,n,a,c]),l=function o(i,a,s){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"==typeof a){var l,h=i[s],d=h+a,p=[];r.forEach((function(e){p.push(e.value)})),p.push(e,t),p.push(c(h));var f=a>0?1:-1;"unit"===u?p.push(c(h+f*n)):p.push(c(d)),p=p.filter((function(e){return null!==e})).filter((function(e){return a<0?e<=h:e>=h})),"unit"===u&&(p=p.filter((function(e){return e!==h})));var m="unit"===u?h:d;l=p[0];var g=Math.abs(l-m);if(p.forEach((function(e){var t=Math.abs(e-m);t<g&&(l=e,g=t)})),void 0===l)return a<0?e:t;if("dist"===u)return l;if(Math.abs(a)>1){var y=(0,v.Z)(i);return y[s]=l,o(y,a-f,s,u)}return l}return"min"===a?e:"max"===a?t:void 0},h=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",o=e[n],i=l(e,t,n,r);return{value:i,changed:i!==o}},d=function(e){return null===i&&0===e||"number"==typeof i&&e<i};return[u,function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",a=e.map(u),s=a[n],c=l(a,t,n,r);if(a[n]=c,!1===o){var p=i||0;n>0&&a[n-1]!==s&&(a[n]=Math.max(a[n],a[n-1]+p)),n<a.length-1&&a[n+1]!==s&&(a[n]=Math.min(a[n],a[n+1]-p))}else if("number"==typeof i||null===i){for(var f=n+1;f<a.length;f+=1)for(var v=!0;d(a[f]-a[f-1])&&v;){var m=h(a,1,f);a[f]=m.value,v=m.changed}for(var g=n;g>0;g-=1)for(var y=!0;d(a[g]-a[g-1])&&y;){var C=h(a,-1,g-1);a[g-1]=C.value,y=C.changed}for(var b=a.length-1;b>0;b-=1)for(var w=!0;d(a[b]-a[b-1])&&w;){var x=h(a,-1,b-1);a[b-1]=x.value,w=x.changed}for(var S=0;S<a.length-1;S+=1)for(var E=!0;d(a[S+1]-a[S])&&E;){var M=h(a,1,S+1);a[S+1]=M.value,E=M.changed}}return{value:a[n],values:a}}]}(he,de,pe,ve,j,fe),ge=(0,d.Z)(me,2),ye=ge[0],Ce=ge[1],be=(0,y.Z)(D,{value:R}),we=(0,d.Z)(be,2),xe=we[0],Se=we[1],Ee=s.useMemo((function(){var e=null==xe?[]:Array.isArray(xe)?xe:[xe],t=(0,d.Z)(e,1)[0],n=null===xe?[]:[void 0===t?he:t];if(O){if(n=(0,v.Z)(e),A||void 0===xe){var r=A>=0?A+1:2;for(n=n.slice(0,r);n.length<r;){var o;n.push(null!==(o=n[n.length-1])&&void 0!==o?o:he)}}n.sort((function(e,t){return e-t}))}return n.forEach((function(e,t){n[t]=ye(e)})),n}),[xe,O,he,A,ye]),Me=s.useRef(Ee);Me.current=Ee;var Pe=function(e){return O?e:e[0]},Re=function(e){var t=(0,v.Z)(e).sort((function(e,t){return e-t}));_&&!g()(t,Me.current)&&_(Pe(t)),Se(t)},De=function(e){if(!h){var t=0,n=de-he;Ee.forEach((function(r,o){var i=Math.abs(e-r);i<=n&&(n=i,t=o)}));var r=(0,v.Z)(Ee);r[t]=e,O&&!Ee.length&&void 0===A&&r.push(e),null==N||N(Pe(r)),Re(r),null==B||B(Pe(r))}},ke=s.useState(null),Le=(0,d.Z)(ke,2),Oe=Le[0],ze=Le[1];s.useEffect((function(){if(null!==Oe){var e=Ee.indexOf(Oe);e>=0&&ce.current.focus(e)}ze(null)}),[Oe]);var Ae=s.useMemo((function(){return(!W||null!==pe)&&W}),[W,pe]),Te=function(e,t,n,r,o,i,a,c,u){var l=s.useState(null),h=(0,d.Z)(l,2),p=h[0],f=h[1],m=s.useState(-1),g=(0,d.Z)(m,2),y=g[0],C=g[1],b=s.useState(n),w=(0,d.Z)(b,2),x=w[0],S=w[1],E=s.useState(n),M=(0,d.Z)(E,2),P=M[0],R=M[1],D=s.useRef(null),k=s.useRef(null);s.useEffect((function(){-1===y&&S(n)}),[n,y]),s.useEffect((function(){return function(){document.removeEventListener("mousemove",D.current),document.removeEventListener("mouseup",k.current),document.removeEventListener("touchmove",D.current),document.removeEventListener("touchend",k.current)}}),[]);var O=function(e,t){x.some((function(t,n){return t!==e[n]}))&&(void 0!==t&&f(t),S(e),a(e))},z=function(e,t){if(-1===e){var n=P[0],a=P[P.length-1],s=r-n,c=o-a,l=t*(o-r);l=Math.max(l,s),l=Math.min(l,c);var h=i(n+l);l=h-n;var d=P.map((function(e){return e+l}));O(d)}else{var p=(o-r)*t,f=(0,v.Z)(x);f[e]=P[e];var m=u(f,p,e,"dist");O(m.values,m.value)}},A=s.useRef(z);A.current=z;var T=s.useMemo((function(){var e=(0,v.Z)(n).sort((function(e,t){return e-t})),t=(0,v.Z)(x).sort((function(e,t){return e-t}));return e.every((function(e,n){return e===t[n]}))?x:n}),[n,x]);return[y,p,T,function(r,o){r.stopPropagation();var i=n[o];C(o),f(i),R(n);var a=L(r),s=a.pageX,u=a.pageY,l=function(n){n.preventDefault();var r,i=L(n),a=i.pageX,c=i.pageY,l=a-s,h=c-u,d=e.current.getBoundingClientRect(),p=d.width,f=d.height;switch(t){case"btt":r=-h/f;break;case"ttb":r=h/f;break;case"rtl":r=-l/p;break;default:r=l/p}A.current(o,r)},h=function e(t){t.preventDefault(),document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",l),document.removeEventListener("touchend",e),document.removeEventListener("touchmove",l),D.current=null,k.current=null,C(-1),c()};document.addEventListener("mouseup",h),document.addEventListener("mousemove",l),document.addEventListener("touchend",h),document.addEventListener("touchmove",l),D.current=l,k.current=h}]}(ue,le,Ee,he,de,ye,Re,(function(){null==B||B(Pe(Me.current))}),Ce),_e=(0,d.Z)(Te,4),Ze=_e[0],Ne=_e[1],Be=_e[2],Ie=_e[3],je=function(e,t){Ie(e,t),null==N||N(Pe(Me.current))},Fe=-1!==Ze;s.useEffect((function(){if(!Fe){var e=Ee.lastIndexOf(Ne);ce.current.focus(e)}}),[Fe]);var He=s.useMemo((function(){return(0,v.Z)(Be).sort((function(e,t){return e-t}))}),[Be]),We=s.useMemo((function(){return O?[He[0],He[He.length-1]]:[he,He[0]]}),[He,O,he]),Ge=(0,d.Z)(We,2),Ue=Ge[0],Xe=Ge[1];s.useImperativeHandle(t,(function(){return{focus:function(){ce.current.focus(0)},blur:function(){var e=document.activeElement;ue.current.contains(e)&&(null==e||e.blur())}}})),s.useEffect((function(){p&&ce.current.focus(0)}),[]);var Ye=s.useMemo((function(){return{min:he,max:de,direction:le,disabled:h,step:pe,included:Y,includedStart:Ue,includedEnd:Xe,range:O,tabIndex:oe,ariaLabelForHandle:ie,ariaLabelledByForHandle:ae,ariaValueTextFormatterForHandle:se}}),[he,de,le,h,pe,Y,Ue,Xe,O,oe,ie,ae,se]);return s.createElement(x.Provider,{value:Ye},s.createElement("div",{ref:ue,className:f()(o,i,(n={},(0,l.Z)(n,"".concat(o,"-disabled"),h),(0,l.Z)(n,"".concat(o,"-vertical"),U),(0,l.Z)(n,"".concat(o,"-horizontal"),!U),(0,l.Z)(n,"".concat(o,"-with-marks"),ve.length),n)),style:a,onMouseDown:function(e){e.preventDefault();var t,n=ue.current.getBoundingClientRect(),r=n.width,o=n.height,i=n.left,a=n.top,s=n.bottom,c=n.right,u=e.clientX,l=e.clientY;switch(le){case"btt":t=(s-l)/o;break;case"ttb":t=(l-a)/o;break;case"rtl":t=(c-u)/r;break;default:t=(u-i)/r}De(ye(he+t*(de-he)))}},s.createElement("div",{className:"".concat(o,"-rail"),style:q}),s.createElement(z,{prefixCls:o,style:V,values:He,startPoint:K,onStartMove:Ae?je:null}),s.createElement(Z,{prefixCls:o,marks:ve,dots:te,style:J,activeStyle:Q}),s.createElement(k,{ref:ce,prefixCls:o,style:$,values:Be,draggingIndex:Ze,onStartMove:je,onOffsetChange:function(e,t){if(!h){var n=Ce(Ee,e,t);null==N||N(Pe(Ee)),Re(n.values),null==B||B(Pe(n.values)),ze(n.value)}},onFocus:m,onBlur:C,handleRender:ne}),s.createElement(T,{prefixCls:o,marks:ve,onClick:De})))}));var B=N,I=n(96820),j=n(15363),F=n(3083),H=n(59816),W=s.forwardRef((function(e,t){var n=e.open,r=(0,s.useRef)(null),o=(0,s.useRef)(null);function i(){j.Z.cancel(o.current),o.current=null}return s.useEffect((function(){return n?o.current=(0,j.Z)((function(){var e;null===(e=r.current)||void 0===e||e.forcePopupAlign(),o.current=null})):i(),i}),[n,e.title]),s.createElement(H.Z,(0,h.Z)({ref:(0,F.sQ)(r,t)},e))})),G=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},U=s.forwardRef((function(e,t){var n=s.useContext(I.E_),r=n.getPrefixCls,o=n.direction,i=n.getPopupContainer,a=s.useState({}),c=(0,d.Z)(a,2),p=c[0],v=c[1],m=function(e,t){v((function(n){return(0,h.Z)((0,h.Z)({},n),(0,l.Z)({},e,t))}))},g=function(e,t){return e||(t?"rtl"===o?"left":"right":"top")},y=e.prefixCls,C=e.range,b=e.className,w=G(e,["prefixCls","range","className"]),x=r("slider",y),S=f()(b,(0,l.Z)({},"".concat(x,"-rtl"),"rtl"===o));"rtl"!==o||w.vertical||(w.reverse=!w.reverse);var E=s.useMemo((function(){return C?"object"===(0,u.Z)(C)?[!0,C.draggableTrack]:[!0,!1]:[!1]}),[C]),M=(0,d.Z)(E,2),P=M[0],R=M[1];return s.createElement(B,(0,h.Z)({},w,{step:w.step,range:P,draggableTrack:R,className:S,ref:t,prefixCls:x,handleRender:function(t,n){var o,a=n.index,c=n.dragging,u=r(),l=e.tooltip,d=void 0===l?{}:l,f=e.vertical,v=(0,h.Z)({formatter:null!==(o=e.tipFormatter)&&void 0!==o?o:function(e){return"number"==typeof e?e.toString():""},open:e.tooltipVisible,placement:e.tooltipPlacement,getPopupContainer:e.getTooltipPopupContainer},d),y=v.open,C=v.placement,b=v.getPopupContainer,w=v.prefixCls,S=v.formatter,E=!!S&&(p[a]||c),M=y||void 0===y&&E,P=(0,h.Z)((0,h.Z)({},t.props),{onMouseEnter:function(){return m(a,!0)},onMouseLeave:function(){return m(a,!1)}}),R=r("tooltip",w);return s.createElement(W,{prefixCls:R,title:S?S(n.value):"",open:M,placement:g(C,f),transitionName:"".concat(u,"-zoom-down"),key:a,overlayClassName:"".concat(x,"-tooltip"),getPopupContainer:b||i},s.cloneElement(t,P))}}))}));var X=U,Y=n(6210),K=n.n(Y);function V(e,t,n,r,o,i){void 0===i&&(i=0);var a=ae(e,t,i),s=a.width,c=a.height,u=Math.min(s,n),l=Math.min(c,r);return u>l*o?{width:l*o,height:l}:{width:u,height:u/o}}function $(e,t,n,r,o){void 0===o&&(o=0);var i=ae(t.width,t.height,o),a=i.width,s=i.height;return{x:q(e.x,a,n.width,r),y:q(e.y,s,n.height,r)}}function q(e,t,n,r){var o=t*r/2-n/2;return se(e,-o,o)}function J(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Q(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function ee(e,t,n,o,i,a,s){void 0===a&&(a=0),void 0===s&&(s=!0);var c=s?te:ne,u=ae(t.width,t.height,a),l=ae(t.naturalWidth,t.naturalHeight,a),h={x:c(100,((u.width-n.width/i)/2-e.x/i)/u.width*100),y:c(100,((u.height-n.height/i)/2-e.y/i)/u.height*100),width:c(100,n.width/u.width*100/i),height:c(100,n.height/u.height*100/i)},d=Math.round(c(l.width,h.width*l.width/100)),p=Math.round(c(l.height,h.height*l.height/100)),f=l.width>=l.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:h,croppedAreaPixels:(0,r.pi)((0,r.pi)({},f),{x:Math.round(c(l.width-f.width,h.x*l.width/100)),y:Math.round(c(l.height-f.height,h.y*l.height/100))})}}function te(e,t){return Math.min(e,Math.max(0,t))}function ne(e,t){return t}function re(e,t,n,r,o,i){var a=ae(t.width,t.height,n),s=se(r.width/a.width*(100/e.width),o,i);return{crop:{x:s*a.width/2-r.width/2-a.width*s*(e.x/100),y:s*a.height/2-r.height/2-a.height*s*(e.y/100)},zoom:s}}function oe(e,t,n,r,o,i){void 0===n&&(n=0);var a=ae(t.naturalWidth,t.naturalHeight,n),s=se(function(e,t,n){var r=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}(e,t,r),o,i),c=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((a.width-e.width)/2-e.x)*c,y:((a.height-e.height)/2-e.y)*c},zoom:s}}function ie(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function ae(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function se(e,t,n){return Math.min(Math.max(e,t),n)}function ce(){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 ue=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=s.createRef(),n.videoRef=s.createRef(),n.containerPosition={x:0,y:0},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.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){e?e=!1: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("gesturemove",n.onGestureMove),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.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=re(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,o=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var i=oe(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);r=i.crop,o=i.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var e,t,o,i,a,s,c=n.imageRef.current||n.videoRef.current;if(c&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var u=n.containerRect.width/n.containerRect.height,l=(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,h=(null===(o=n.imageRef.current)||void 0===o?void 0:o.naturalHeight)||(null===(i=n.videoRef.current)||void 0===i?void 0:i.videoHeight)||0,d=l/h,p=void 0;if(c.offsetWidth<l||c.offsetHeight<h)switch(n.state.mediaObjectFit){default:case"contain":p=u>d?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":p={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":p={width:n.containerRect.height*d,height:n.containerRect.height}}else p={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=(0,r.pi)((0,r.pi)({},p),{naturalWidth:l,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var f=n.props.cropSize?n.props.cropSize:V(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(a=n.state.cropSize)||void 0===a?void 0:a.height)===f.height&&(null===(s=n.state.cropSize)||void 0===s?void 0:s.width)===f.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(f),n.setState({cropSize:f},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(f),f}},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.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),o=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,o,i=e.x,a=e.y;n.dragStartPosition={x:i,y:a},n.dragStartCrop=(0,r.pi)({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,r=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!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},a=n.props.restrictPosition?$(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 r=t.getMousePoint(e),o=K()(e).pixelY,i=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(i,r,{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 r=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(r-t.x),y:n.containerRect.height/2-(o-t.y)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,i=o.crop,a=o.zoom;return{x:(t+i.x)/a,y:(r+i.y)/a}},n.setNewZoom=function(e,t,r){var o=(void 0===r?{}:r).shouldUpdatePosition,i=void 0===o||o;if(n.state.cropSize&&n.props.onZoomChange){var a=se(e,n.props.minZoom,n.props.maxZoom);if(i){var s=n.getPointOnContainer(t,n.containerPosition),c=n.getPointOnMedia(s),u={x:c.x*a-s.x,y:c.y*a-s.y},l=n.props.restrictPosition?$(u,n.mediaSize,n.state.cropSize,a,n.props.rotation):u;n.props.onCropChange(l)}n.props.onZoomChange(a)}},n.getCropData=function(){return n.state.cropSize?ee(n.props.restrictPosition?$(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?$(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n.onKeyDown=function(e){var t=n.props,o=t.crop,i=t.onCropChange,a=t.keyboardStep,s=t.zoom,c=t.rotation,u=a;if(n.state.cropSize){e.shiftKey&&(u*=.2);var l=(0,r.pi)({},o);switch(e.key){case"ArrowUp":l.y-=u,e.preventDefault();break;case"ArrowDown":l.y+=u,e.preventDefault();break;case"ArrowLeft":l.x-=u,e.preventDefault();break;case"ArrowRight":l.x+=u,e.preventDefault();break;default:return}n.props.restrictPosition&&(l=$(l,n.mediaSize,n.state.cropSize,s,c)),i(l)}},n}return(0,r.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))},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){var t,n,r,o,i,a,s,c,u;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect||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===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.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===(s=e.crop)||void 0===s?void 0:s.y)===(null===(c=this.props.crop)||void 0===c?void 0:c.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===(u=this.videoRef.current)||void 0===u||u.load());var l=this.getObjectFit();l!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:l},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,r;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var o=this.containerRect.width/this.containerRect.height;return((null===(e=this.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(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===(r=this.videoRef.current)||void 0===r?void 0:r.videoHeight)||0)<o?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=J(n,r),this.lastPinchRotation=Q(n,r),this.onDragStart(ie(n,r))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=ie(r,o);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=J(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var a=Q(r,o),s=n.props.rotation+(a-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=a}))}},t.prototype.render=function(){var e,t=this,n=this.props,o=n.image,i=n.video,a=n.mediaProps,c=n.transform,u=n.crop,l=u.x,h=u.y,d=n.rotation,p=n.zoom,f=n.cropShape,v=n.showGrid,m=n.style,g=m.containerStyle,y=m.cropAreaStyle,C=m.mediaStyle,b=n.classes,w=b.containerClassName,x=b.cropAreaClassName,S=b.mediaClassName,E=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:g,className:ce("reactEasyCrop_Container",w)},o?s.createElement("img",(0,r.pi)({alt:"",className:ce("reactEasyCrop_Image","contain"===E&&"reactEasyCrop_Contain","horizontal-cover"===E&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===E&&"reactEasyCrop_Cover_Vertical",S)},a,{src:o,ref:this.imageRef,style:(0,r.pi)((0,r.pi)({},C),{transform:c||"translate(".concat(l,"px, ").concat(h,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):i&&s.createElement("video",(0,r.pi)({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:ce("reactEasyCrop_Video","contain"===E&&"reactEasyCrop_Contain","horizontal-cover"===E&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===E&&"reactEasyCrop_Cover_Vertical",S)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:(0,r.pi)((0,r.pi)({},C),{transform:c||"translate(".concat(l,"px, ").concat(h,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(i)?i:[{src:i}]).map((function(e){return s.createElement("source",(0,r.pi)({key:e.src},e))}))),this.state.cropSize&&s.createElement("div",{style:(0,r.pi)((0,r.pi)({},y),{width:this.state.cropSize.width,height:this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,"data-testid":"cropper",className:ce("reactEasyCrop_CropArea","round"===f&&"reactEasyCrop_CropAreaRound",v&&"reactEasyCrop_CropAreaGrid",x)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},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);const le="img-crop",he=.1,de=.01,pe=(0,s.forwardRef)(((e,t)=>{const{cropperRef:n,zoomSlider:r,rotationSlider:i,aspectSlider:a,showReset:u,resetBtnText:l,modalImage:h,aspect:d,minZoom:p,maxZoom:f,cropShape:v,showGrid:m,cropperProps:g}=e,[y,C]=(0,s.useState)(1),[b,w]=(0,s.useState)(0),[x,S]=(0,s.useState)(d),E=1!==y||0!==b||x!==d,M=()=>{C(1),w(0),S(d)},[P,R]=(0,s.useState)({x:0,y:0}),D=(0,s.useRef)({width:0,height:0,x:0,y:0}),k=(0,s.useCallback)(((e,t)=>{D.current=t}),[]);(0,s.useImperativeHandle)(t,(()=>({rotation:b,cropPixelsRef:D,onReset:M})));const L="[display:flex] [align-items:center] [width:60%] [margin-inline:auto]",O="[display: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]",z="[flex:1]";return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ue,Object.assign({},g,{ref:n,image:h,crop:P,zoom:y,rotation:b,aspect:x,minZoom:p,maxZoom:f,zoomWithScroll:r,cropShape:v,showGrid:m,onCropChange:R,onZoomChange:C,onRotationChange:w,onCropComplete:k,classes:{containerClassName:`${le}-container ![position:relative] [width:100%] [height:40vh] [&~section:first-of-type]:[margin-top:16px] [&~section:last-of-type]:[margin-bottom:16px]`,mediaClassName:`${le}-media`}})),r&&(0,o.jsxs)("section",{className:`${le}-control ${le}-control-zoom ${L}`,children:[(0,o.jsx)("button",{className:O,onClick:()=>C(+(y-he).toFixed(1)),disabled:y-he<p,children:"-"}),(0,o.jsx)(X,{className:z,min:p,max:f,step:he,value:y,onChange:C}),(0,o.jsx)("button",{className:O,onClick:()=>C(+(y+he).toFixed(1)),disabled:y+he>f,children:"+"})]}),i&&(0,o.jsxs)("section",{className:`${le}-control ${le}-control-rotation ${L}`,children:[(0,o.jsx)("button",{className:`${O} [font-size:16px]`,onClick:()=>w(b-1),disabled:-180===b,children:"↺"}),(0,o.jsx)(X,{className:z,min:-180,max:180,step:1,value:b,onChange:w}),(0,o.jsx)("button",{className:`${O} [font-size:16px]`,onClick:()=>w(b+1),disabled:180===b,children:"↻"})]}),a&&(0,o.jsxs)("section",{className:`${le}-control ${le}-control-aspect ${L}`,children:[(0,o.jsx)("button",{className:O,onClick:()=>S(+(x-de).toFixed(2)),disabled:x-de<.5,children:"↕️"}),(0,o.jsx)(X,{className:z,min:.5,max:2,step:de,value:x,onChange:S}),(0,o.jsx)("button",{className:O,onClick:()=>S(+(x+de).toFixed(2)),disabled:x+de>2,children:"↔️"})]}),u&&(r||i||a)&&(0,o.jsx)(c.Z,{className:"[bottom:20px] [position:absolute]",style:E?{}:{opacity:.3,pointerEvents:"none"},onClick:M,children:l})]})}));var fe=(0,s.memo)(pe);!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".\\[align-items\\:center\\]{align-items:center}.\\[background\\:transparent\\]{background:transparent}.\\[border\\:0\\]{border:0}.\\[bottom\\:20px\\]{bottom:20px}.\\[cursor\\:pointer\\]{cursor:pointer}.\\[display\\:flex\\]{display:flex}.\\[flex\\:1\\]{flex:1}.\\[font-family\\:inherit\\]{font-family:inherit}.\\[font-size\\:16px\\]{font-size:16px}.\\[font-size\\:18px\\]{font-size:18px}.\\[height\\:32px\\]{height:32px}.\\[height\\:40vh\\]{height:40vh}.\\[justify-content\\:center\\]{justify-content:center}.\\[margin-inline\\:auto\\]{margin-inline:auto}.\\[position\\:absolute\\]{position:absolute}.\\!\\[position\\:relative\\]{position:relative!important}.\\[width\\:100\\%\\]{width:100%}.\\[width\\:32px\\]{width:32px}.\\[width\\:60\\%\\]{width:60%}.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}",{insertAt:"top"});const ve=(0,s.forwardRef)(((e,t)=>{const{quality:n=.4,fillColor:c="white",zoomSlider:u=!0,rotationSlider:l=!1,aspectSlider:h=!1,showReset:d=!1,resetText:p,aspect:f=1,minZoom:v=1,maxZoom:m=3,cropShape:g="rect",showGrid:y=!1,cropperProps:C,modalClassName:b,modalTitle:w,modalWidth:x,modalOk:S,modalCancel:E,onModalOk:M,onModalCancel:P,modalProps:R,beforeCrop:D,children:k}=e,L=(0,s.useRef)({});L.current.onModalOk=M,L.current.onModalCancel=P,L.current.beforeCrop=D;const O=(0,s.useRef)(null),z=(0,s.useCallback)((e=>{var t;const n=document.createElement("canvas"),r=n.getContext("2d"),o=((null===(t=null==e?void 0:e.getRootNode)||void 0===t?void 0:t.call(e))||document).querySelector(`.${le}-media`),{width:i,height:a,x:s,y:u}=O.current.cropPixelsRef.current;if(l&&0!==O.current.rotation){const{naturalWidth:e,naturalHeight:t}=o,l=O.current.rotation*(Math.PI/180),h=Math.abs(Math.sin(l)),d=Math.abs(Math.cos(l)),p=e*d+t*h,f=t*d+e*h;n.width=p,n.height=f,r.fillStyle=c,r.fillRect(0,0,p,f);const v=p/2,m=f/2;r.translate(v,m),r.rotate(l),r.translate(-v,-m);const g=(p-e)/2,y=(f-t)/2;r.drawImage(o,0,0,e,t,g,y,e,t);const C=r.getImageData(0,0,p,f);n.width=i,n.height=a,r.putImageData(C,-s,-u)}else n.width=i,n.height=a,r.fillStyle=c,r.fillRect(0,0,i,a),r.drawImage(o,s,u,i,a,0,0,i,a);return n}),[c,l]),[A,T]=(0,s.useState)(""),_=(0,s.useRef)(),Z=(0,s.useRef)(),N=(0,s.useCallback)((e=>(0,r.mG)(void 0,[e],void 0,(function*({beforeUpload:e,file:t,resolve:n,reject:r}){const o=t;if("function"==typeof e)try{const r=yield e(t,[t]);n(!1!==r&&(!0!==r&&r||o))}catch(e){r(e)}else n(o)}))),[]),B=(0,s.useCallback)((e=>(t,o)=>new Promise(((i,s)=>(0,r.mG)(void 0,void 0,void 0,(function*(){let c=t;if("function"==typeof L.current.beforeCrop)try{const n=yield L.current.beforeCrop(t,o);if(!1===n)return N({beforeUpload:e,file:t,resolve:i,reject:s});!0!==n&&(c=n||t)}catch(n){return N({beforeUpload:e,file:t,resolve:i,reject:s})}const u=new FileReader;u.addEventListener("load",(()=>{"string"==typeof u.result&&T(u.result)})),u.readAsDataURL(c),_.current=()=>{var e,t;T(""),O.current.onReset();let n=!1;null===(t=(e=L.current).onModalCancel)||void 0===t||t.call(e,(e=>{i(e),n=!0})),n||i(a.Z.LIST_IGNORE)},Z.current=t=>(0,r.mG)(void 0,void 0,void 0,(function*(){T(""),O.current.onReset();const o=z(t.target),{type:a,name:u,uid:l}=c;o.toBlob((t=>(0,r.mG)(void 0,void 0,void 0,(function*(){const n=new File([t],u,{type:a});Object.assign(n,{uid:l}),N({beforeUpload:e,file:n,resolve:e=>{var t,n;i(e),null===(n=(t=L.current).onModalOk)||void 0===n||n.call(t,e)},reject:e=>{var t,n;s(e),null===(n=(t=L.current).onModalOk)||void 0===n||n.call(t,e)}})}))),a,n)}))}))))),[z,n,N]),I=(0,s.useCallback)((e=>{const t=Array.isArray(e)?e[0]:e,n=t.props,{beforeUpload:o,accept:i}=n,a=(0,r._T)(n,["beforeUpload","accept"]);return Object.assign(Object.assign({},t),{props:Object.assign(Object.assign({},a),{accept:i||"image/*",beforeUpload:B(o)})})}),[B]),j=(0,s.useMemo)((()=>{const e={};return void 0!==x&&(e.width=x),void 0!==S&&(e.okText=S),void 0!==E&&(e.cancelText=E),e}),[E,S,x]),F=`${le}-modal${b?` ${b}`:""}`,H="zh-CN"===("undefined"==typeof window?"":window.navigator.language),W=w||(H?"编辑图片":"Edit image"),G=p||(H?"重置":"Reset");return(0,o.jsxs)(o.Fragment,{children:[I(k),A&&(0,o.jsx)(i.Z,Object.assign({},R,j,{open:!0,title:W,onCancel:_.current,onOk:Z.current,wrapClassName:F,maskClosable:!1,destroyOnClose:!0,children:(0,o.jsx)(fe,{ref:O,cropperRef:t,zoomSlider:u,rotationSlider:l,aspectSlider:h,showReset:d,resetBtnText:G,modalImage:A,aspect:f,minZoom:v,maxZoom:m,cropShape:g,showGrid:y,cropperProps:C})}))]})}))},72540:function(e,t,n){"use strict";n(55214),n(43543)},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,r,o,i,a,s,c,u,l,h,d,p,f,v,m=!1;function g(){if(!m){m=!0;var e=navigator.userAgent,g=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),y=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(d=/\b(iPhone|iP[ao]d)/.exec(e),p=/\b(iP[ao]d)/.exec(e),l=/Android/i.exec(e),f=/FBAN\/\w+;/i.exec(e),v=/Mobile/i.exec(e),h=!!/Win64/.exec(e),g){(t=g[1]?parseFloat(g[1]):g[5]?parseFloat(g[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var C=/(?:Trident\/(\d+.\d+))/.exec(e);a=C?parseFloat(C[1])+4:t,n=g[2]?parseFloat(g[2]):NaN,r=g[3]?parseFloat(g[3]):NaN,(o=g[4]?parseFloat(g[4]):NaN)?(g=/(?:Chrome\/(\d+\.\d+))/.exec(e),i=g&&g[1]?parseFloat(g[1]):NaN):i=NaN}else t=n=r=i=o=NaN;if(y){if(y[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);s=!b||parseFloat(b[1].replace("_","."))}else s=!1;c=!!y[2],u=!!y[3]}else s=c=u=!1}}var y={ie:function(){return g()||t},ieCompatibilityMode:function(){return g()||a>t},ie64:function(){return y.ie()&&h},firefox:function(){return g()||n},opera:function(){return g()||r},webkit:function(){return g()||o},safari:function(){return y.webkit()},chrome:function(){return g()||i},windows:function(){return g()||c},osx:function(){return g()||s},linux:function(){return g()||u},iphone:function(){return g()||d},mobile:function(){return g()||d||p||l||v},nativeApp:function(){return g()||f},android:function(){return g()||l},ipad:function(){return g()||p}};e.exports=y},16177:function(e,t,n){"use strict";var r,o=n(72906);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=function(e,t){if(!o.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&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},92782:function(e,t,n){"use strict";var r=n(73211),o=n(16177);function i(e){var t=0,n=0,r=0,o=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),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(1==e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}}i.getEventType=function(){return r.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},e.exports=i},31688:function(e,t,n){var r=n(45478);function o(e){this.mode=r.MODE_8BIT_BYTE,this.data=e}o.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=o},77572:function(e){function t(){this.buffer=new Array,this.length=0}t.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},12538:function(e){e.exports={L:1,M:0,Q:3,H:2}},14382:function(e,t,n){var r=n(4897);function o(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}o.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var i=0;i<e.getLength();i++)t[n+i]^=r.gexp(r.glog(this.get(n))+r.glog(e.get(i)));return new o(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=r.glog(this.get(0))-r.glog(e.get(0)),n=new Array(this.getLength()),i=0;i<this.getLength();i++)n[i]=this.get(i);for(i=0;i<e.getLength();i++)n[i]^=r.gexp(r.glog(e.get(i))+t);return new o(n,0).mod(e)}},e.exports=o},46175:function(e,t,n){var r=n(31688),o=n(77515),i=n(77572),a=n(62739),s=n(14382);function c(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var u=c.prototype;u.addData=function(e){var t=new r(e);this.dataList.push(t),this.dataCache=null},u.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},u.getModuleCount=function(){return this.moduleCount},u.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=o.getRSBlocks(e,this.errorCorrectLevel),n=new i,r=0,s=0;s<t.length;s++)r+=t[s].dataCount;for(s=0;s<this.dataList.length;s++){var c=this.dataList[s];n.put(c.mode,4),n.put(c.getLength(),a.getLengthInBits(c.mode,e)),c.write(n)}if(n.getLengthInBits()<=8*r)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},u.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=c.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},u.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},u.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=a.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},u.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var o=0;o<this.modules.length;o++)for(var i=1*o,a=0;a<this.modules[o].length;a++){var s=1*a;this.modules[o][a]&&(r.beginFill(0,100),r.moveTo(s,i),r.lineTo(s+1,i),r.lineTo(s+1,i+1),r.lineTo(s,i+1),r.endFill())}return r},u.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},u.setupPositionAdjustPattern=function(){for(var e=a.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],o=e[n];if(null==this.modules[r][o])for(var i=-2;i<=2;i++)for(var s=-2;s<=2;s++)this.modules[r+i][o+s]=-2==i||2==i||-2==s||2==s||0==i&&0==s}},u.setupTypeNumber=function(e){for(var t=a.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},u.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=a.getBCHTypeInfo(n),o=0;o<15;o++){var i=!e&&1==(r>>o&1);o<6?this.modules[o][8]=i:o<8?this.modules[o+1][8]=i:this.modules[this.moduleCount-15+o][8]=i}for(o=0;o<15;o++){i=!e&&1==(r>>o&1);o<8?this.modules[8][this.moduleCount-o-1]=i:o<9?this.modules[8][15-o-1+1]=i:this.modules[8][15-o-1]=i}this.modules[this.moduleCount-8][8]=!e},u.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,o=7,i=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var c=0;c<2;c++)if(null==this.modules[r][s-c]){var u=!1;i<e.length&&(u=1==(e[i]>>>o&1)),a.getMask(t,r,s-c)&&(u=!u),this.modules[r][s-c]=u,-1==--o&&(i++,o=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},c.PAD0=236,c.PAD1=17,c.createData=function(e,t,n){for(var r=o.getRSBlocks(e,t),s=new i,u=0;u<n.length;u++){var l=n[u];s.put(l.mode,4),s.put(l.getLength(),a.getLengthInBits(l.mode,e)),l.write(s)}var h=0;for(u=0;u<r.length;u++)h+=r[u].dataCount;if(s.getLengthInBits()>8*h)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*h+")");for(s.getLengthInBits()+4<=8*h&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*h||(s.put(c.PAD0,8),s.getLengthInBits()>=8*h));)s.put(c.PAD1,8);return c.createBytes(s,r)},c.createBytes=function(e,t){for(var n=0,r=0,o=0,i=new Array(t.length),c=new Array(t.length),u=0;u<t.length;u++){var l=t[u].dataCount,h=t[u].totalCount-l;r=Math.max(r,l),o=Math.max(o,h),i[u]=new Array(l);for(var d=0;d<i[u].length;d++)i[u][d]=255&e.buffer[d+n];n+=l;var p=a.getErrorCorrectPolynomial(h),f=new s(i[u],p.getLength()-1).mod(p);c[u]=new Array(p.getLength()-1);for(d=0;d<c[u].length;d++){var v=d+f.getLength()-c[u].length;c[u][d]=v>=0?f.get(v):0}}var m=0;for(d=0;d<t.length;d++)m+=t[d].totalCount;var g=new Array(m),y=0;for(d=0;d<r;d++)for(u=0;u<t.length;u++)d<i[u].length&&(g[y++]=i[u][d]);for(d=0;d<o;d++)for(u=0;u<t.length;u++)d<c[u].length&&(g[y++]=c[u][d]);return g},e.exports=c},77515:function(e,t,n){var r=n(12538);function o(e,t){this.totalCount=e,this.dataCount=t}o.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],o.getRSBlocks=function(e,t){var n=o.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,i=new Array,a=0;a<r;a++)for(var s=n[3*a+0],c=n[3*a+1],u=n[3*a+2],l=0;l<s;l++)i.push(new o(c,u));return i},o.getRsBlockTable=function(e,t){switch(t){case r.L:return o.RS_BLOCK_TABLE[4*(e-1)+0];case r.M:return o.RS_BLOCK_TABLE[4*(e-1)+1];case r.Q:return o.RS_BLOCK_TABLE[4*(e-1)+2];case r.H:return o.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},e.exports=o},4897:function(e){for(var t={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return t.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},n=0;n<8;n++)t.EXP_TABLE[n]=1<<n;for(n=8;n<256;n++)t.EXP_TABLE[n]=t.EXP_TABLE[n-4]^t.EXP_TABLE[n-5]^t.EXP_TABLE[n-6]^t.EXP_TABLE[n-8];for(n=0;n<255;n++)t.LOG_TABLE[t.EXP_TABLE[n]]=n;e.exports=t},45478:function(e){e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},62739:function(e,t,n){var r=n(45478),o=n(14382),i=n(4897),a=0,s=1,c=2,u=3,l=4,h=5,d=6,p=7,f={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;f.getBCHDigit(t)-f.getBCHDigit(f.G15)>=0;)t^=f.G15<<f.getBCHDigit(t)-f.getBCHDigit(f.G15);return(e<<10|t)^f.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;f.getBCHDigit(t)-f.getBCHDigit(f.G18)>=0;)t^=f.G18<<f.getBCHDigit(t)-f.getBCHDigit(f.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return f.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case a:return(t+n)%2==0;case s:return t%2==0;case c:return n%3==0;case u:return(t+n)%3==0;case l:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case h:return t*n%2+t*n%3==0;case d:return(t*n%2+t*n%3)%2==0;case p:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new o([1],0),n=0;n<e;n++)t=t.multiply(new o([1,i.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var o=0;o<t;o++){for(var i=0,a=e.isDark(r,o),s=-1;s<=1;s++)if(!(r+s<0||t<=r+s))for(var c=-1;c<=1;c++)o+c<0||t<=o+c||0==s&&0==c||a==e.isDark(r+s,o+c)&&i++;i>5&&(n+=3+i-5)}for(r=0;r<t-1;r++)for(o=0;o<t-1;o++){var u=0;e.isDark(r,o)&&u++,e.isDark(r+1,o)&&u++,e.isDark(r,o+1)&&u++,e.isDark(r+1,o+1)&&u++,0!=u&&4!=u||(n+=3)}for(r=0;r<t;r++)for(o=0;o<t-6;o++)e.isDark(r,o)&&!e.isDark(r,o+1)&&e.isDark(r,o+2)&&e.isDark(r,o+3)&&e.isDark(r,o+4)&&!e.isDark(r,o+5)&&e.isDark(r,o+6)&&(n+=40);for(o=0;o<t;o++)for(r=0;r<t-6;r++)e.isDark(r,o)&&!e.isDark(r+1,o)&&e.isDark(r+2,o)&&e.isDark(r+3,o)&&e.isDark(r+4,o)&&!e.isDark(r+5,o)&&e.isDark(r+6,o)&&(n+=40);var l=0;for(o=0;o<t;o++)for(r=0;r<t;r++)e.isDark(r,o)&&l++;return n+=10*(Math.abs(100*l/t/t-50)/5)}};e.exports=f},63392:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(n,!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function h(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?p(e):t}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=n(75271),y=(n(40507),n(46175)),C=n(12538);function b(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r<2048?(t+=String.fromCharCode(192|r>>6),t+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(t+=String.fromCharCode(224|r>>12),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|r>>18),t+=String.fromCharCode(128|r>>12&63),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r))}return t}var w={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return e.forEach((function(e,r){var o=null;e.forEach((function(i,a){if(!i&&null!==o)return n.push("M".concat(o+t," ").concat(r+t,"h").concat(a-o,"v1H").concat(o+t,"z")),void(o=null);if(a!==e.length-1)i&&null===o&&(o=a);else{if(!i)return;null===o?n.push("M".concat(a+t,",").concat(r+t," h1v1H").concat(a+t,"z")):n.push("M".concat(o+t,",").concat(r+t," h").concat(a+1-o,"v1H").concat(o+t,"z"))}}))})),n.join("")}function S(e,t){return e.slice().map((function(e,n){return n<t.y||n>=t.y+t.h?e:e.map((function(e,n){return(n<t.x||n>=t.x+t.w)&&e}))}))}function E(e,t){var n=e.imageSettings,r=e.size,o=e.includeMargin;if(null==n)return null;var i=o?4:0,a=t.length+2*i,s=Math.floor(.1*r),c=a/r,u=(n.width||s)*c,l=(n.height||s)*c,h=null==n.x?t.length/2-u/2:n.x*c,d=null==n.y?t.length/2-l/2:n.y*c,p=null;if(n.excavate){var f=Math.floor(h),v=Math.floor(d);p={x:f,y:v,w:Math.ceil(u+h-f),h:Math.ceil(l+d-v)}}return{x:h,y:d,h:l,w:u,excavation:p}}var M=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),P=function(e){function t(){var e,n;c(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return m(p(n=h(this,(e=d(t)).call.apply(e,[this].concat(o)))),"_canvas",void 0),m(p(n),"_image",void 0),m(p(n),"state",{imgLoaded:!1}),m(p(n),"handleImageLoad",(function(){n.setState({imgLoaded:!0})})),n}return f(t,e),l(t,[{key:"componentDidMount",value:function(){this._image&&this._image.complete&&this.handleImageLoad(),this.update()}},{key:"componentWillReceiveProps",value:function(e){var t,n;(null===(t=this.props.imageSettings)||void 0===t?void 0:t.src)!==(null===(n=e.imageSettings)||void 0===n?void 0:n.src)&&this.setState({imgLoaded:!1})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,o=e.bgColor,i=e.fgColor,a=e.includeMargin,s=e.imageSettings,c=new y(-1,C[r]);if(c.addData(b(t)),c.make(),null!=this._canvas){var u=this._canvas,l=u.getContext("2d");if(!l)return;var h=c.modules;if(null===h)return;var d=a?4:0,p=h.length+2*d,f=E(this.props,h);null!=s&&null!=f&&null!=f.excavation&&(h=S(h,f.excavation));var v=window.devicePixelRatio||1;u.height=u.width=n*v;var m=n/p*v;l.scale(m,m),l.fillStyle=o,l.fillRect(0,0,p,p),l.fillStyle=i,M?l.fill(new Path2D(x(h,d))):h.forEach((function(e,t){e.forEach((function(e,n){e&&l.fillRect(n+d,t+d,1,1)}))})),this.state.imgLoaded&&this._image&&null!=f&&l.drawImage(this._image,f.x+d,f.y+d,f.w,f.h)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.value,t.size),r=(t.level,t.bgColor,t.fgColor,t.style),i=(t.includeMargin,t.imageSettings),c=s(t,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),u=a({height:n,width:n},r),l=null,h=i&&i.src;return null!=i&&null!=h&&(l=g.createElement("img",{src:h,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(t){return e._image=t}})),g.createElement(g.Fragment,null,g.createElement("canvas",o({style:u,height:n,width:n,ref:function(t){return e._canvas=t}},c)),l)}}]),t}(g.PureComponent);m(P,"defaultProps",w);var R=function(e){function t(){return c(this,t),h(this,d(t).apply(this,arguments))}return f(t,e),l(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,i=e.bgColor,a=e.fgColor,c=e.includeMargin,u=e.imageSettings,l=s(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),h=new y(-1,C[r]);h.addData(b(t)),h.make();var d=h.modules;if(null===d)return null;var p=c?4:0,f=d.length+2*p,v=E(this.props,d),m=null;null!=u&&null!=v&&(null!=v.excavation&&(d=S(d,v.excavation)),m=g.createElement("image",{xlinkHref:u.src,height:v.h,width:v.w,x:v.x+p,y:v.y+p,preserveAspectRatio:"none"}));var w=x(d,p);return g.createElement("svg",o({shapeRendering:"crispEdges",height:n,width:n,viewBox:"0 0 ".concat(f," ").concat(f)},l),g.createElement("path",{fill:i,d:"M0,0 h".concat(f,"v").concat(f,"H0z")}),g.createElement("path",{fill:a,d:w}),m)}}]),t}(g.PureComponent);m(R,"defaultProps",w);var D=function(e){var t=e.renderAs,n=s(e,["renderAs"]),r="svg"===t?R:P;return g.createElement(r,n)};D.defaultProps=a({renderAs:"canvas"},w),e.exports=D}}]);
|
|
1
|
+
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[7984],{1371:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(2053),o=n(75271),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},a=n(48881),s=function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))};var c=o.forwardRef(s)},69822:function(e,t,n){"use strict";n.d(t,{Z:function(){return ve}});var r=n(15767),o=n(52676),i=n(45520),a=n(6367),s=n(75271),c=n(93481),u=n(24744),l=n(57904),h=n(2053),d=n(99459),p=n(82187),f=n.n(p),v=n(35047),m=n(50631),g=n.n(m),y=n(6522),C=n(53162),b=n(98037),w=n(1260),x=s.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0});function S(e,t,n){return(e-t)/(n-t)}function E(e,t,n,r){var o=S(t,n,r),i={};switch(e){case"rtl":i.right="".concat(100*o,"%"),i.transform="translateX(50%)";break;case"btt":i.bottom="".concat(100*o,"%"),i.transform="translateY(50%)";break;case"ttb":i.top="".concat(100*o,"%"),i.transform="translateY(-50%)";break;default:i.left="".concat(100*o,"%"),i.transform="translateX(-50%)"}return i}function M(e,t){return Array.isArray(e)?e[t]:e}var P=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"];var R=s.forwardRef((function(e,t){var n,r,o=e.prefixCls,i=e.value,a=e.valueIndex,c=e.onStartMove,u=e.style,d=e.render,p=e.dragging,v=e.onOffsetChange,m=(0,C.Z)(e,P),g=s.useContext(x),y=g.min,S=g.max,R=g.direction,D=g.disabled,k=g.range,L=g.tabIndex,O=g.ariaLabelForHandle,z=g.ariaLabelledByForHandle,A=g.ariaValueTextFormatterForHandle,T="".concat(o,"-handle"),_=function(e){D||c(e,a)},Z=E(R,i,y,S),N=s.createElement("div",(0,h.Z)({ref:t,className:f()(T,(n={},(0,l.Z)(n,"".concat(T,"-").concat(a+1),k),(0,l.Z)(n,"".concat(T,"-dragging"),p),n)),style:(0,b.Z)((0,b.Z)({},Z),u),onMouseDown:_,onTouchStart:_,onKeyDown:function(e){if(!D){var t=null;switch(e.which||e.keyCode){case w.Z.LEFT:t="ltr"===R||"btt"===R?-1:1;break;case w.Z.RIGHT:t="ltr"===R||"btt"===R?1:-1;break;case w.Z.UP:t="ttb"!==R?1:-1;break;case w.Z.DOWN:t="ttb"!==R?-1:1;break;case w.Z.HOME:t="min";break;case w.Z.END:t="max";break;case w.Z.PAGE_UP:t=2;break;case w.Z.PAGE_DOWN:t=-2}null!==t&&(e.preventDefault(),v(t,a))}},tabIndex:D?null:M(L,a),role:"slider","aria-valuemin":y,"aria-valuemax":S,"aria-valuenow":i,"aria-disabled":D,"aria-label":M(O,a),"aria-labelledby":M(z,a),"aria-valuetext":null===(r=M(A,a))||void 0===r?void 0:r(i)},m));return d&&(N=d(N,{index:a,prefixCls:o,value:i,dragging:p})),N})),D=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"];var k=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.style,o=e.onStartMove,i=e.onOffsetChange,a=e.values,c=e.handleRender,u=e.draggingIndex,l=(0,C.Z)(e,D),d=s.useRef({});return s.useImperativeHandle(t,(function(){return{focus:function(e){var t;null===(t=d.current[e])||void 0===t||t.focus()}}})),s.createElement(s.Fragment,null,a.map((function(e,t){return s.createElement(R,(0,h.Z)({ref:function(e){e?d.current[t]=e:delete d.current[t]},dragging:u===t,prefixCls:n,style:M(r,t),key:t,value:e,valueIndex:t,onStartMove:o,onOffsetChange:i,render:c},l))})))}));function L(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function O(e){var t=e.prefixCls,n=e.style,r=e.start,o=e.end,i=e.index,a=e.onStartMove,c=s.useContext(x),u=c.direction,l=c.min,h=c.max,d=c.disabled,p=c.range,v="".concat(t,"-track"),m=S(r,l,h),g=S(o,l,h),y=function(e){!d&&a&&a(e,-1)},C={};switch(u){case"rtl":C.right="".concat(100*m,"%"),C.width="".concat(100*g-100*m,"%");break;case"btt":C.bottom="".concat(100*m,"%"),C.height="".concat(100*g-100*m,"%");break;case"ttb":C.top="".concat(100*m,"%"),C.height="".concat(100*g-100*m,"%");break;default:C.left="".concat(100*m,"%"),C.width="".concat(100*g-100*m,"%")}return s.createElement("div",{className:f()(v,p&&"".concat(v,"-").concat(i+1)),style:(0,b.Z)((0,b.Z)({},C),n),onMouseDown:y,onTouchStart:y})}function z(e){var t=e.prefixCls,n=e.style,r=e.values,o=e.startPoint,i=e.onStartMove,a=s.useContext(x),c=a.included,u=a.range,l=a.min,h=s.useMemo((function(){if(!u){if(0===r.length)return[];var e=null!=o?o:l,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],i=0;i<r.length-1;i+=1)n.push({start:r[i],end:r[i+1]});return n}),[r,u,o,l]);return c?h.map((function(e,r){var o=e.start,a=e.end;return s.createElement(O,{index:r,prefixCls:t,style:M(n,r),start:o,end:a,key:r,onStartMove:i})})):null}function A(e){var t=e.prefixCls,n=e.style,r=e.children,o=e.value,i=e.onClick,a=s.useContext(x),c=a.min,u=a.max,h=a.direction,d=a.includedStart,p=a.includedEnd,v=a.included,m="".concat(t,"-text"),g=E(h,o,c,u);return s.createElement("span",{className:f()(m,(0,l.Z)({},"".concat(m,"-active"),v&&d<=o&&o<=p)),style:(0,b.Z)((0,b.Z)({},g),n),onMouseDown:function(e){e.stopPropagation()},onClick:function(){i(o)}},r)}function T(e){var t=e.prefixCls,n=e.marks,r=e.onClick,o="".concat(t,"-mark");return n.length?s.createElement("div",{className:o},n.map((function(e){var t=e.value,n=e.style,i=e.label;return s.createElement(A,{key:t,prefixCls:o,style:n,value:t,onClick:r},i)}))):null}function _(e){var t=e.prefixCls,n=e.value,r=e.style,o=e.activeStyle,i=s.useContext(x),a=i.min,c=i.max,u=i.direction,h=i.included,d=i.includedStart,p=i.includedEnd,v="".concat(t,"-dot"),m=h&&d<=n&&n<=p,g=(0,b.Z)((0,b.Z)({},E(u,n,a,c)),"function"==typeof r?r(n):r);return m&&(g=(0,b.Z)((0,b.Z)({},g),"function"==typeof o?o(n):o)),s.createElement("span",{className:f()(v,(0,l.Z)({},"".concat(v,"-active"),m)),style:g})}function Z(e){var t=e.prefixCls,n=e.marks,r=e.dots,o=e.style,i=e.activeStyle,a=s.useContext(x),c=a.min,u=a.max,l=a.step,h=s.useMemo((function(){var e=new Set;if(n.forEach((function(t){e.add(t.value)})),r&&null!==l)for(var t=c;t<=u;)e.add(t),t+=l;return Array.from(e)}),[c,u,l,r,n]);return s.createElement("div",{className:"".concat(t,"-step")},h.map((function(e){return s.createElement(_,{prefixCls:t,key:e,value:e,style:o,activeStyle:i})})))}n(7432);var N=s.forwardRef((function(e,t){var n,r=e.prefixCls,o=void 0===r?"rc-slider":r,i=e.className,a=e.style,c=e.disabled,h=void 0!==c&&c,p=e.autoFocus,m=e.onFocus,C=e.onBlur,b=e.min,w=void 0===b?0:b,S=e.max,E=void 0===S?100:S,M=e.step,P=void 0===M?1:M,R=e.value,D=e.defaultValue,O=e.range,A=e.count,_=e.onChange,N=e.onBeforeChange,B=e.onAfterChange,I=e.allowCross,j=void 0===I||I,F=e.pushable,H=void 0!==F&&F,W=e.draggableTrack,G=e.reverse,U=e.vertical,X=e.included,Y=void 0===X||X,K=e.startPoint,V=e.trackStyle,$=e.handleStyle,q=e.railStyle,J=e.dotStyle,Q=e.activeDotStyle,ee=e.marks,te=e.dots,ne=e.handleRender,re=e.tabIndex,oe=void 0===re?0:re,ie=e.ariaLabelForHandle,ae=e.ariaLabelledByForHandle,se=e.ariaValueTextFormatterForHandle,ce=s.useRef(),ue=s.useRef(),le=s.useMemo((function(){return U?G?"ttb":"btt":G?"rtl":"ltr"}),[G,U]),he=s.useMemo((function(){return isFinite(w)?w:0}),[w]),de=s.useMemo((function(){return isFinite(E)?E:100}),[E]),pe=s.useMemo((function(){return null!==P&&P<=0?1:P}),[P]),fe=s.useMemo((function(){return!0===H?pe:H>=0&&H}),[H,pe]),ve=s.useMemo((function(){return Object.keys(ee||{}).map((function(e){var t=ee[e],n={value:Number(e)};return t&&"object"===(0,u.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}))}),[ee]),me=function(e,t,n,r,o,i){var a=s.useCallback((function(n){var r=isFinite(n)?n:e;return r=Math.min(t,n),Math.max(e,r)}),[e,t]),c=s.useCallback((function(r){if(null!==n){var o=e+Math.round((a(r)-e)/n)*n,i=function(e){return(String(e).split(".")[1]||"").length},s=Math.max(i(n),i(t),i(e)),c=Number(o.toFixed(s));return e<=c&&c<=t?c:null}return null}),[n,e,t,a]),u=s.useCallback((function(o){var i=a(o),s=r.map((function(e){return e.value}));null!==n&&s.push(c(o)),s.push(e,t);var u=s[0],l=t-e;return s.forEach((function(e){var t=Math.abs(i-e);t<=l&&(u=e,l=t)})),u}),[e,t,r,n,a,c]),l=function o(i,a,s){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"==typeof a){var l,h=i[s],d=h+a,p=[];r.forEach((function(e){p.push(e.value)})),p.push(e,t),p.push(c(h));var f=a>0?1:-1;"unit"===u?p.push(c(h+f*n)):p.push(c(d)),p=p.filter((function(e){return null!==e})).filter((function(e){return a<0?e<=h:e>=h})),"unit"===u&&(p=p.filter((function(e){return e!==h})));var m="unit"===u?h:d;l=p[0];var g=Math.abs(l-m);if(p.forEach((function(e){var t=Math.abs(e-m);t<g&&(l=e,g=t)})),void 0===l)return a<0?e:t;if("dist"===u)return l;if(Math.abs(a)>1){var y=(0,v.Z)(i);return y[s]=l,o(y,a-f,s,u)}return l}return"min"===a?e:"max"===a?t:void 0},h=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",o=e[n],i=l(e,t,n,r);return{value:i,changed:i!==o}},d=function(e){return null===i&&0===e||"number"==typeof i&&e<i};return[u,function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",a=e.map(u),s=a[n],c=l(a,t,n,r);if(a[n]=c,!1===o){var p=i||0;n>0&&a[n-1]!==s&&(a[n]=Math.max(a[n],a[n-1]+p)),n<a.length-1&&a[n+1]!==s&&(a[n]=Math.min(a[n],a[n+1]-p))}else if("number"==typeof i||null===i){for(var f=n+1;f<a.length;f+=1)for(var v=!0;d(a[f]-a[f-1])&&v;){var m=h(a,1,f);a[f]=m.value,v=m.changed}for(var g=n;g>0;g-=1)for(var y=!0;d(a[g]-a[g-1])&&y;){var C=h(a,-1,g-1);a[g-1]=C.value,y=C.changed}for(var b=a.length-1;b>0;b-=1)for(var w=!0;d(a[b]-a[b-1])&&w;){var x=h(a,-1,b-1);a[b-1]=x.value,w=x.changed}for(var S=0;S<a.length-1;S+=1)for(var E=!0;d(a[S+1]-a[S])&&E;){var M=h(a,1,S+1);a[S+1]=M.value,E=M.changed}}return{value:a[n],values:a}}]}(he,de,pe,ve,j,fe),ge=(0,d.Z)(me,2),ye=ge[0],Ce=ge[1],be=(0,y.Z)(D,{value:R}),we=(0,d.Z)(be,2),xe=we[0],Se=we[1],Ee=s.useMemo((function(){var e=null==xe?[]:Array.isArray(xe)?xe:[xe],t=(0,d.Z)(e,1)[0],n=null===xe?[]:[void 0===t?he:t];if(O){if(n=(0,v.Z)(e),A||void 0===xe){var r=A>=0?A+1:2;for(n=n.slice(0,r);n.length<r;){var o;n.push(null!==(o=n[n.length-1])&&void 0!==o?o:he)}}n.sort((function(e,t){return e-t}))}return n.forEach((function(e,t){n[t]=ye(e)})),n}),[xe,O,he,A,ye]),Me=s.useRef(Ee);Me.current=Ee;var Pe=function(e){return O?e:e[0]},Re=function(e){var t=(0,v.Z)(e).sort((function(e,t){return e-t}));_&&!g()(t,Me.current)&&_(Pe(t)),Se(t)},De=function(e){if(!h){var t=0,n=de-he;Ee.forEach((function(r,o){var i=Math.abs(e-r);i<=n&&(n=i,t=o)}));var r=(0,v.Z)(Ee);r[t]=e,O&&!Ee.length&&void 0===A&&r.push(e),null==N||N(Pe(r)),Re(r),null==B||B(Pe(r))}},ke=s.useState(null),Le=(0,d.Z)(ke,2),Oe=Le[0],ze=Le[1];s.useEffect((function(){if(null!==Oe){var e=Ee.indexOf(Oe);e>=0&&ce.current.focus(e)}ze(null)}),[Oe]);var Ae=s.useMemo((function(){return(!W||null!==pe)&&W}),[W,pe]),Te=function(e,t,n,r,o,i,a,c,u){var l=s.useState(null),h=(0,d.Z)(l,2),p=h[0],f=h[1],m=s.useState(-1),g=(0,d.Z)(m,2),y=g[0],C=g[1],b=s.useState(n),w=(0,d.Z)(b,2),x=w[0],S=w[1],E=s.useState(n),M=(0,d.Z)(E,2),P=M[0],R=M[1],D=s.useRef(null),k=s.useRef(null);s.useEffect((function(){-1===y&&S(n)}),[n,y]),s.useEffect((function(){return function(){document.removeEventListener("mousemove",D.current),document.removeEventListener("mouseup",k.current),document.removeEventListener("touchmove",D.current),document.removeEventListener("touchend",k.current)}}),[]);var O=function(e,t){x.some((function(t,n){return t!==e[n]}))&&(void 0!==t&&f(t),S(e),a(e))},z=function(e,t){if(-1===e){var n=P[0],a=P[P.length-1],s=r-n,c=o-a,l=t*(o-r);l=Math.max(l,s),l=Math.min(l,c);var h=i(n+l);l=h-n;var d=P.map((function(e){return e+l}));O(d)}else{var p=(o-r)*t,f=(0,v.Z)(x);f[e]=P[e];var m=u(f,p,e,"dist");O(m.values,m.value)}},A=s.useRef(z);A.current=z;var T=s.useMemo((function(){var e=(0,v.Z)(n).sort((function(e,t){return e-t})),t=(0,v.Z)(x).sort((function(e,t){return e-t}));return e.every((function(e,n){return e===t[n]}))?x:n}),[n,x]);return[y,p,T,function(r,o){r.stopPropagation();var i=n[o];C(o),f(i),R(n);var a=L(r),s=a.pageX,u=a.pageY,l=function(n){n.preventDefault();var r,i=L(n),a=i.pageX,c=i.pageY,l=a-s,h=c-u,d=e.current.getBoundingClientRect(),p=d.width,f=d.height;switch(t){case"btt":r=-h/f;break;case"ttb":r=h/f;break;case"rtl":r=-l/p;break;default:r=l/p}A.current(o,r)},h=function e(t){t.preventDefault(),document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",l),document.removeEventListener("touchend",e),document.removeEventListener("touchmove",l),D.current=null,k.current=null,C(-1),c()};document.addEventListener("mouseup",h),document.addEventListener("mousemove",l),document.addEventListener("touchend",h),document.addEventListener("touchmove",l),D.current=l,k.current=h}]}(ue,le,Ee,he,de,ye,Re,(function(){null==B||B(Pe(Me.current))}),Ce),_e=(0,d.Z)(Te,4),Ze=_e[0],Ne=_e[1],Be=_e[2],Ie=_e[3],je=function(e,t){Ie(e,t),null==N||N(Pe(Me.current))},Fe=-1!==Ze;s.useEffect((function(){if(!Fe){var e=Ee.lastIndexOf(Ne);ce.current.focus(e)}}),[Fe]);var He=s.useMemo((function(){return(0,v.Z)(Be).sort((function(e,t){return e-t}))}),[Be]),We=s.useMemo((function(){return O?[He[0],He[He.length-1]]:[he,He[0]]}),[He,O,he]),Ge=(0,d.Z)(We,2),Ue=Ge[0],Xe=Ge[1];s.useImperativeHandle(t,(function(){return{focus:function(){ce.current.focus(0)},blur:function(){var e=document.activeElement;ue.current.contains(e)&&(null==e||e.blur())}}})),s.useEffect((function(){p&&ce.current.focus(0)}),[]);var Ye=s.useMemo((function(){return{min:he,max:de,direction:le,disabled:h,step:pe,included:Y,includedStart:Ue,includedEnd:Xe,range:O,tabIndex:oe,ariaLabelForHandle:ie,ariaLabelledByForHandle:ae,ariaValueTextFormatterForHandle:se}}),[he,de,le,h,pe,Y,Ue,Xe,O,oe,ie,ae,se]);return s.createElement(x.Provider,{value:Ye},s.createElement("div",{ref:ue,className:f()(o,i,(n={},(0,l.Z)(n,"".concat(o,"-disabled"),h),(0,l.Z)(n,"".concat(o,"-vertical"),U),(0,l.Z)(n,"".concat(o,"-horizontal"),!U),(0,l.Z)(n,"".concat(o,"-with-marks"),ve.length),n)),style:a,onMouseDown:function(e){e.preventDefault();var t,n=ue.current.getBoundingClientRect(),r=n.width,o=n.height,i=n.left,a=n.top,s=n.bottom,c=n.right,u=e.clientX,l=e.clientY;switch(le){case"btt":t=(s-l)/o;break;case"ttb":t=(l-a)/o;break;case"rtl":t=(c-u)/r;break;default:t=(u-i)/r}De(ye(he+t*(de-he)))}},s.createElement("div",{className:"".concat(o,"-rail"),style:q}),s.createElement(z,{prefixCls:o,style:V,values:He,startPoint:K,onStartMove:Ae?je:null}),s.createElement(Z,{prefixCls:o,marks:ve,dots:te,style:J,activeStyle:Q}),s.createElement(k,{ref:ce,prefixCls:o,style:$,values:Be,draggingIndex:Ze,onStartMove:je,onOffsetChange:function(e,t){if(!h){var n=Ce(Ee,e,t);null==N||N(Pe(Ee)),Re(n.values),null==B||B(Pe(n.values)),ze(n.value)}},onFocus:m,onBlur:C,handleRender:ne}),s.createElement(T,{prefixCls:o,marks:ve,onClick:De})))}));var B=N,I=n(96820),j=n(15363),F=n(3083),H=n(59816),W=s.forwardRef((function(e,t){var n=e.open,r=(0,s.useRef)(null),o=(0,s.useRef)(null);function i(){j.Z.cancel(o.current),o.current=null}return s.useEffect((function(){return n?o.current=(0,j.Z)((function(){var e;null===(e=r.current)||void 0===e||e.forcePopupAlign(),o.current=null})):i(),i}),[n,e.title]),s.createElement(H.Z,(0,h.Z)({ref:(0,F.sQ)(r,t)},e))})),G=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},U=s.forwardRef((function(e,t){var n=s.useContext(I.E_),r=n.getPrefixCls,o=n.direction,i=n.getPopupContainer,a=s.useState({}),c=(0,d.Z)(a,2),p=c[0],v=c[1],m=function(e,t){v((function(n){return(0,h.Z)((0,h.Z)({},n),(0,l.Z)({},e,t))}))},g=function(e,t){return e||(t?"rtl"===o?"left":"right":"top")},y=e.prefixCls,C=e.range,b=e.className,w=G(e,["prefixCls","range","className"]),x=r("slider",y),S=f()(b,(0,l.Z)({},"".concat(x,"-rtl"),"rtl"===o));"rtl"!==o||w.vertical||(w.reverse=!w.reverse);var E=s.useMemo((function(){return C?"object"===(0,u.Z)(C)?[!0,C.draggableTrack]:[!0,!1]:[!1]}),[C]),M=(0,d.Z)(E,2),P=M[0],R=M[1];return s.createElement(B,(0,h.Z)({},w,{step:w.step,range:P,draggableTrack:R,className:S,ref:t,prefixCls:x,handleRender:function(t,n){var o,a=n.index,c=n.dragging,u=r(),l=e.tooltip,d=void 0===l?{}:l,f=e.vertical,v=(0,h.Z)({formatter:null!==(o=e.tipFormatter)&&void 0!==o?o:function(e){return"number"==typeof e?e.toString():""},open:e.tooltipVisible,placement:e.tooltipPlacement,getPopupContainer:e.getTooltipPopupContainer},d),y=v.open,C=v.placement,b=v.getPopupContainer,w=v.prefixCls,S=v.formatter,E=!!S&&(p[a]||c),M=y||void 0===y&&E,P=(0,h.Z)((0,h.Z)({},t.props),{onMouseEnter:function(){return m(a,!0)},onMouseLeave:function(){return m(a,!1)}}),R=r("tooltip",w);return s.createElement(W,{prefixCls:R,title:S?S(n.value):"",open:M,placement:g(C,f),transitionName:"".concat(u,"-zoom-down"),key:a,overlayClassName:"".concat(x,"-tooltip"),getPopupContainer:b||i},s.cloneElement(t,P))}}))}));var X=U,Y=n(6210),K=n.n(Y);function V(e,t,n,r,o,i){void 0===i&&(i=0);var a=ae(e,t,i),s=a.width,c=a.height,u=Math.min(s,n),l=Math.min(c,r);return u>l*o?{width:l*o,height:l}:{width:u,height:u/o}}function $(e,t,n,r,o){void 0===o&&(o=0);var i=ae(t.width,t.height,o),a=i.width,s=i.height;return{x:q(e.x,a,n.width,r),y:q(e.y,s,n.height,r)}}function q(e,t,n,r){var o=t*r/2-n/2;return se(e,-o,o)}function J(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Q(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function ee(e,t,n,o,i,a,s){void 0===a&&(a=0),void 0===s&&(s=!0);var c=s?te:ne,u=ae(t.width,t.height,a),l=ae(t.naturalWidth,t.naturalHeight,a),h={x:c(100,((u.width-n.width/i)/2-e.x/i)/u.width*100),y:c(100,((u.height-n.height/i)/2-e.y/i)/u.height*100),width:c(100,n.width/u.width*100/i),height:c(100,n.height/u.height*100/i)},d=Math.round(c(l.width,h.width*l.width/100)),p=Math.round(c(l.height,h.height*l.height/100)),f=l.width>=l.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:h,croppedAreaPixels:(0,r.pi)((0,r.pi)({},f),{x:Math.round(c(l.width-f.width,h.x*l.width/100)),y:Math.round(c(l.height-f.height,h.y*l.height/100))})}}function te(e,t){return Math.min(e,Math.max(0,t))}function ne(e,t){return t}function re(e,t,n,r,o,i){var a=ae(t.width,t.height,n),s=se(r.width/a.width*(100/e.width),o,i);return{crop:{x:s*a.width/2-r.width/2-a.width*s*(e.x/100),y:s*a.height/2-r.height/2-a.height*s*(e.y/100)},zoom:s}}function oe(e,t,n,r,o,i){void 0===n&&(n=0);var a=ae(t.naturalWidth,t.naturalHeight,n),s=se(function(e,t,n){var r=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}(e,t,r),o,i),c=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((a.width-e.width)/2-e.x)*c,y:((a.height-e.height)/2-e.y)*c},zoom:s}}function ie(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function ae(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function se(e,t,n){return Math.min(Math.max(e,t),n)}function ce(){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 ue=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=s.createRef(),n.videoRef=s.createRef(),n.containerPosition={x:0,y:0},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.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){e?e=!1: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("gesturemove",n.onGestureMove),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.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=re(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,o=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var i=oe(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);r=i.crop,o=i.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var e,t,o,i,a,s,c=n.imageRef.current||n.videoRef.current;if(c&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var u=n.containerRect.width/n.containerRect.height,l=(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,h=(null===(o=n.imageRef.current)||void 0===o?void 0:o.naturalHeight)||(null===(i=n.videoRef.current)||void 0===i?void 0:i.videoHeight)||0,d=l/h,p=void 0;if(c.offsetWidth<l||c.offsetHeight<h)switch(n.state.mediaObjectFit){default:case"contain":p=u>d?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":p={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":p={width:n.containerRect.height*d,height:n.containerRect.height}}else p={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=(0,r.pi)((0,r.pi)({},p),{naturalWidth:l,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var f=n.props.cropSize?n.props.cropSize:V(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(a=n.state.cropSize)||void 0===a?void 0:a.height)===f.height&&(null===(s=n.state.cropSize)||void 0===s?void 0:s.width)===f.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(f),n.setState({cropSize:f},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(f),f}},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.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),o=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,o,i=e.x,a=e.y;n.dragStartPosition={x:i,y:a},n.dragStartCrop=(0,r.pi)({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,r=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!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},a=n.props.restrictPosition?$(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 r=t.getMousePoint(e),o=K()(e).pixelY,i=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(i,r,{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 r=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(r-t.x),y:n.containerRect.height/2-(o-t.y)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,i=o.crop,a=o.zoom;return{x:(t+i.x)/a,y:(r+i.y)/a}},n.setNewZoom=function(e,t,r){var o=(void 0===r?{}:r).shouldUpdatePosition,i=void 0===o||o;if(n.state.cropSize&&n.props.onZoomChange){var a=se(e,n.props.minZoom,n.props.maxZoom);if(i){var s=n.getPointOnContainer(t,n.containerPosition),c=n.getPointOnMedia(s),u={x:c.x*a-s.x,y:c.y*a-s.y},l=n.props.restrictPosition?$(u,n.mediaSize,n.state.cropSize,a,n.props.rotation):u;n.props.onCropChange(l)}n.props.onZoomChange(a)}},n.getCropData=function(){return n.state.cropSize?ee(n.props.restrictPosition?$(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?$(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n.onKeyDown=function(e){var t=n.props,o=t.crop,i=t.onCropChange,a=t.keyboardStep,s=t.zoom,c=t.rotation,u=a;if(n.state.cropSize){e.shiftKey&&(u*=.2);var l=(0,r.pi)({},o);switch(e.key){case"ArrowUp":l.y-=u,e.preventDefault();break;case"ArrowDown":l.y+=u,e.preventDefault();break;case"ArrowLeft":l.x-=u,e.preventDefault();break;case"ArrowRight":l.x+=u,e.preventDefault();break;default:return}n.props.restrictPosition&&(l=$(l,n.mediaSize,n.state.cropSize,s,c)),i(l)}},n}return(0,r.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))},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){var t,n,r,o,i,a,s,c,u;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect||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===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.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===(s=e.crop)||void 0===s?void 0:s.y)===(null===(c=this.props.crop)||void 0===c?void 0:c.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===(u=this.videoRef.current)||void 0===u||u.load());var l=this.getObjectFit();l!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:l},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,r;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var o=this.containerRect.width/this.containerRect.height;return((null===(e=this.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(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===(r=this.videoRef.current)||void 0===r?void 0:r.videoHeight)||0)<o?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=J(n,r),this.lastPinchRotation=Q(n,r),this.onDragStart(ie(n,r))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=ie(r,o);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=J(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var a=Q(r,o),s=n.props.rotation+(a-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=a}))}},t.prototype.render=function(){var e,t=this,n=this.props,o=n.image,i=n.video,a=n.mediaProps,c=n.transform,u=n.crop,l=u.x,h=u.y,d=n.rotation,p=n.zoom,f=n.cropShape,v=n.showGrid,m=n.style,g=m.containerStyle,y=m.cropAreaStyle,C=m.mediaStyle,b=n.classes,w=b.containerClassName,x=b.cropAreaClassName,S=b.mediaClassName,E=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:g,className:ce("reactEasyCrop_Container",w)},o?s.createElement("img",(0,r.pi)({alt:"",className:ce("reactEasyCrop_Image","contain"===E&&"reactEasyCrop_Contain","horizontal-cover"===E&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===E&&"reactEasyCrop_Cover_Vertical",S)},a,{src:o,ref:this.imageRef,style:(0,r.pi)((0,r.pi)({},C),{transform:c||"translate(".concat(l,"px, ").concat(h,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):i&&s.createElement("video",(0,r.pi)({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:ce("reactEasyCrop_Video","contain"===E&&"reactEasyCrop_Contain","horizontal-cover"===E&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===E&&"reactEasyCrop_Cover_Vertical",S)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:(0,r.pi)((0,r.pi)({},C),{transform:c||"translate(".concat(l,"px, ").concat(h,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(i)?i:[{src:i}]).map((function(e){return s.createElement("source",(0,r.pi)({key:e.src},e))}))),this.state.cropSize&&s.createElement("div",{style:(0,r.pi)((0,r.pi)({},y),{width:this.state.cropSize.width,height:this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,"data-testid":"cropper",className:ce("reactEasyCrop_CropArea","round"===f&&"reactEasyCrop_CropAreaRound",v&&"reactEasyCrop_CropAreaGrid",x)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},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);const le="img-crop",he=.1,de=.01,pe=(0,s.forwardRef)(((e,t)=>{const{cropperRef:n,zoomSlider:r,rotationSlider:i,aspectSlider:a,showReset:u,resetBtnText:l,modalImage:h,aspect:d,minZoom:p,maxZoom:f,cropShape:v,showGrid:m,cropperProps:g}=e,[y,C]=(0,s.useState)(1),[b,w]=(0,s.useState)(0),[x,S]=(0,s.useState)(d),E=1!==y||0!==b||x!==d,M=()=>{C(1),w(0),S(d)},[P,R]=(0,s.useState)({x:0,y:0}),D=(0,s.useRef)({width:0,height:0,x:0,y:0}),k=(0,s.useCallback)(((e,t)=>{D.current=t}),[]);(0,s.useImperativeHandle)(t,(()=>({rotation:b,cropPixelsRef:D,onReset:M})));const L="[display:flex] [align-items:center] [width:60%] [margin-inline:auto]",O="[display: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]",z="[flex:1]";return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ue,Object.assign({},g,{ref:n,image:h,crop:P,zoom:y,rotation:b,aspect:x,minZoom:p,maxZoom:f,zoomWithScroll:r,cropShape:v,showGrid:m,onCropChange:R,onZoomChange:C,onRotationChange:w,onCropComplete:k,classes:{containerClassName:`${le}-container ![position:relative] [width:100%] [height:40vh] [&~section:first-of-type]:[margin-top:16px] [&~section:last-of-type]:[margin-bottom:16px]`,mediaClassName:`${le}-media`}})),r&&(0,o.jsxs)("section",{className:`${le}-control ${le}-control-zoom ${L}`,children:[(0,o.jsx)("button",{className:O,onClick:()=>C(+(y-he).toFixed(1)),disabled:y-he<p,children:"-"}),(0,o.jsx)(X,{className:z,min:p,max:f,step:he,value:y,onChange:C}),(0,o.jsx)("button",{className:O,onClick:()=>C(+(y+he).toFixed(1)),disabled:y+he>f,children:"+"})]}),i&&(0,o.jsxs)("section",{className:`${le}-control ${le}-control-rotation ${L}`,children:[(0,o.jsx)("button",{className:`${O} [font-size:16px]`,onClick:()=>w(b-1),disabled:-180===b,children:"↺"}),(0,o.jsx)(X,{className:z,min:-180,max:180,step:1,value:b,onChange:w}),(0,o.jsx)("button",{className:`${O} [font-size:16px]`,onClick:()=>w(b+1),disabled:180===b,children:"↻"})]}),a&&(0,o.jsxs)("section",{className:`${le}-control ${le}-control-aspect ${L}`,children:[(0,o.jsx)("button",{className:O,onClick:()=>S(+(x-de).toFixed(2)),disabled:x-de<.5,children:"↕️"}),(0,o.jsx)(X,{className:z,min:.5,max:2,step:de,value:x,onChange:S}),(0,o.jsx)("button",{className:O,onClick:()=>S(+(x+de).toFixed(2)),disabled:x+de>2,children:"↔️"})]}),u&&(r||i||a)&&(0,o.jsx)(c.Z,{className:"[bottom:20px] [position:absolute]",style:E?{}:{opacity:.3,pointerEvents:"none"},onClick:M,children:l})]})}));var fe=(0,s.memo)(pe);!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".\\[align-items\\:center\\]{align-items:center}.\\[background\\:transparent\\]{background:transparent}.\\[border\\:0\\]{border:0}.\\[bottom\\:20px\\]{bottom:20px}.\\[cursor\\:pointer\\]{cursor:pointer}.\\[display\\:flex\\]{display:flex}.\\[flex\\:1\\]{flex:1}.\\[font-family\\:inherit\\]{font-family:inherit}.\\[font-size\\:16px\\]{font-size:16px}.\\[font-size\\:18px\\]{font-size:18px}.\\[height\\:32px\\]{height:32px}.\\[height\\:40vh\\]{height:40vh}.\\[justify-content\\:center\\]{justify-content:center}.\\[margin-inline\\:auto\\]{margin-inline:auto}.\\[position\\:absolute\\]{position:absolute}.\\!\\[position\\:relative\\]{position:relative!important}.\\[width\\:100\\%\\]{width:100%}.\\[width\\:32px\\]{width:32px}.\\[width\\:60\\%\\]{width:60%}.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}",{insertAt:"top"});const ve=(0,s.forwardRef)(((e,t)=>{const{quality:n=.4,fillColor:c="white",zoomSlider:u=!0,rotationSlider:l=!1,aspectSlider:h=!1,showReset:d=!1,resetText:p,aspect:f=1,minZoom:v=1,maxZoom:m=3,cropShape:g="rect",showGrid:y=!1,cropperProps:C,modalClassName:b,modalTitle:w,modalWidth:x,modalOk:S,modalCancel:E,onModalOk:M,onModalCancel:P,modalProps:R,beforeCrop:D,children:k}=e,L=(0,s.useRef)({});L.current.onModalOk=M,L.current.onModalCancel=P,L.current.beforeCrop=D;const O=(0,s.useRef)(null),z=(0,s.useCallback)((e=>{var t;const n=document.createElement("canvas"),r=n.getContext("2d"),o=((null===(t=null==e?void 0:e.getRootNode)||void 0===t?void 0:t.call(e))||document).querySelector(`.${le}-media`),{width:i,height:a,x:s,y:u}=O.current.cropPixelsRef.current;if(l&&0!==O.current.rotation){const{naturalWidth:e,naturalHeight:t}=o,l=O.current.rotation*(Math.PI/180),h=Math.abs(Math.sin(l)),d=Math.abs(Math.cos(l)),p=e*d+t*h,f=t*d+e*h;n.width=p,n.height=f,r.fillStyle=c,r.fillRect(0,0,p,f);const v=p/2,m=f/2;r.translate(v,m),r.rotate(l),r.translate(-v,-m);const g=(p-e)/2,y=(f-t)/2;r.drawImage(o,0,0,e,t,g,y,e,t);const C=r.getImageData(0,0,p,f);n.width=i,n.height=a,r.putImageData(C,-s,-u)}else n.width=i,n.height=a,r.fillStyle=c,r.fillRect(0,0,i,a),r.drawImage(o,s,u,i,a,0,0,i,a);return n}),[c,l]),[A,T]=(0,s.useState)(""),_=(0,s.useRef)(),Z=(0,s.useRef)(),N=(0,s.useCallback)((e=>(0,r.mG)(void 0,[e],void 0,(function*({beforeUpload:e,file:t,resolve:n,reject:r}){const o=t;if("function"==typeof e)try{const r=yield e(t,[t]);n(!1!==r&&(!0!==r&&r||o))}catch(e){r(e)}else n(o)}))),[]),B=(0,s.useCallback)((e=>(t,o)=>new Promise(((i,s)=>(0,r.mG)(void 0,void 0,void 0,(function*(){let c=t;if("function"==typeof L.current.beforeCrop)try{const n=yield L.current.beforeCrop(t,o);if(!1===n)return N({beforeUpload:e,file:t,resolve:i,reject:s});!0!==n&&(c=n||t)}catch(n){return N({beforeUpload:e,file:t,resolve:i,reject:s})}const u=new FileReader;u.addEventListener("load",(()=>{"string"==typeof u.result&&T(u.result)})),u.readAsDataURL(c),_.current=()=>{var e,t;T(""),O.current.onReset();let n=!1;null===(t=(e=L.current).onModalCancel)||void 0===t||t.call(e,(e=>{i(e),n=!0})),n||i(a.Z.LIST_IGNORE)},Z.current=t=>(0,r.mG)(void 0,void 0,void 0,(function*(){T(""),O.current.onReset();const o=z(t.target),{type:a,name:u,uid:l}=c;o.toBlob((t=>(0,r.mG)(void 0,void 0,void 0,(function*(){const n=new File([t],u,{type:a});Object.assign(n,{uid:l}),N({beforeUpload:e,file:n,resolve:e=>{var t,n;i(e),null===(n=(t=L.current).onModalOk)||void 0===n||n.call(t,e)},reject:e=>{var t,n;s(e),null===(n=(t=L.current).onModalOk)||void 0===n||n.call(t,e)}})}))),a,n)}))}))))),[z,n,N]),I=(0,s.useCallback)((e=>{const t=Array.isArray(e)?e[0]:e,n=t.props,{beforeUpload:o,accept:i}=n,a=(0,r._T)(n,["beforeUpload","accept"]);return Object.assign(Object.assign({},t),{props:Object.assign(Object.assign({},a),{accept:i||"image/*",beforeUpload:B(o)})})}),[B]),j=(0,s.useMemo)((()=>{const e={};return void 0!==x&&(e.width=x),void 0!==S&&(e.okText=S),void 0!==E&&(e.cancelText=E),e}),[E,S,x]),F=`${le}-modal${b?` ${b}`:""}`,H="zh-CN"===("undefined"==typeof window?"":window.navigator.language),W=w||(H?"编辑图片":"Edit image"),G=p||(H?"重置":"Reset");return(0,o.jsxs)(o.Fragment,{children:[I(k),A&&(0,o.jsx)(i.Z,Object.assign({},R,j,{open:!0,title:W,onCancel:_.current,onOk:Z.current,wrapClassName:F,maskClosable:!1,destroyOnClose:!0,children:(0,o.jsx)(fe,{ref:O,cropperRef:t,zoomSlider:u,rotationSlider:l,aspectSlider:h,showReset:d,resetBtnText:G,modalImage:A,aspect:f,minZoom:v,maxZoom:m,cropShape:g,showGrid:y,cropperProps:C})}))]})}))},94095:function(e,t,n){"use strict";n(5860),n(58504)},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,r,o,i,a,s,c,u,l,h,d,p,f,v,m=!1;function g(){if(!m){m=!0;var e=navigator.userAgent,g=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),y=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(d=/\b(iPhone|iP[ao]d)/.exec(e),p=/\b(iP[ao]d)/.exec(e),l=/Android/i.exec(e),f=/FBAN\/\w+;/i.exec(e),v=/Mobile/i.exec(e),h=!!/Win64/.exec(e),g){(t=g[1]?parseFloat(g[1]):g[5]?parseFloat(g[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var C=/(?:Trident\/(\d+.\d+))/.exec(e);a=C?parseFloat(C[1])+4:t,n=g[2]?parseFloat(g[2]):NaN,r=g[3]?parseFloat(g[3]):NaN,(o=g[4]?parseFloat(g[4]):NaN)?(g=/(?:Chrome\/(\d+\.\d+))/.exec(e),i=g&&g[1]?parseFloat(g[1]):NaN):i=NaN}else t=n=r=i=o=NaN;if(y){if(y[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);s=!b||parseFloat(b[1].replace("_","."))}else s=!1;c=!!y[2],u=!!y[3]}else s=c=u=!1}}var y={ie:function(){return g()||t},ieCompatibilityMode:function(){return g()||a>t},ie64:function(){return y.ie()&&h},firefox:function(){return g()||n},opera:function(){return g()||r},webkit:function(){return g()||o},safari:function(){return y.webkit()},chrome:function(){return g()||i},windows:function(){return g()||c},osx:function(){return g()||s},linux:function(){return g()||u},iphone:function(){return g()||d},mobile:function(){return g()||d||p||l||v},nativeApp:function(){return g()||f},android:function(){return g()||l},ipad:function(){return g()||p}};e.exports=y},16177:function(e,t,n){"use strict";var r,o=n(72906);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=function(e,t){if(!o.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&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},92782:function(e,t,n){"use strict";var r=n(73211),o=n(16177);function i(e){var t=0,n=0,r=0,o=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),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(1==e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}}i.getEventType=function(){return r.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},e.exports=i},31688:function(e,t,n){var r=n(45478);function o(e){this.mode=r.MODE_8BIT_BYTE,this.data=e}o.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=o},77572:function(e){function t(){this.buffer=new Array,this.length=0}t.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},12538:function(e){e.exports={L:1,M:0,Q:3,H:2}},14382:function(e,t,n){var r=n(4897);function o(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}o.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var i=0;i<e.getLength();i++)t[n+i]^=r.gexp(r.glog(this.get(n))+r.glog(e.get(i)));return new o(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=r.glog(this.get(0))-r.glog(e.get(0)),n=new Array(this.getLength()),i=0;i<this.getLength();i++)n[i]=this.get(i);for(i=0;i<e.getLength();i++)n[i]^=r.gexp(r.glog(e.get(i))+t);return new o(n,0).mod(e)}},e.exports=o},46175:function(e,t,n){var r=n(31688),o=n(77515),i=n(77572),a=n(62739),s=n(14382);function c(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var u=c.prototype;u.addData=function(e){var t=new r(e);this.dataList.push(t),this.dataCache=null},u.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},u.getModuleCount=function(){return this.moduleCount},u.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=o.getRSBlocks(e,this.errorCorrectLevel),n=new i,r=0,s=0;s<t.length;s++)r+=t[s].dataCount;for(s=0;s<this.dataList.length;s++){var c=this.dataList[s];n.put(c.mode,4),n.put(c.getLength(),a.getLengthInBits(c.mode,e)),c.write(n)}if(n.getLengthInBits()<=8*r)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},u.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=c.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},u.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},u.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=a.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},u.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var o=0;o<this.modules.length;o++)for(var i=1*o,a=0;a<this.modules[o].length;a++){var s=1*a;this.modules[o][a]&&(r.beginFill(0,100),r.moveTo(s,i),r.lineTo(s+1,i),r.lineTo(s+1,i+1),r.lineTo(s,i+1),r.endFill())}return r},u.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},u.setupPositionAdjustPattern=function(){for(var e=a.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],o=e[n];if(null==this.modules[r][o])for(var i=-2;i<=2;i++)for(var s=-2;s<=2;s++)this.modules[r+i][o+s]=-2==i||2==i||-2==s||2==s||0==i&&0==s}},u.setupTypeNumber=function(e){for(var t=a.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},u.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=a.getBCHTypeInfo(n),o=0;o<15;o++){var i=!e&&1==(r>>o&1);o<6?this.modules[o][8]=i:o<8?this.modules[o+1][8]=i:this.modules[this.moduleCount-15+o][8]=i}for(o=0;o<15;o++){i=!e&&1==(r>>o&1);o<8?this.modules[8][this.moduleCount-o-1]=i:o<9?this.modules[8][15-o-1+1]=i:this.modules[8][15-o-1]=i}this.modules[this.moduleCount-8][8]=!e},u.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,o=7,i=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var c=0;c<2;c++)if(null==this.modules[r][s-c]){var u=!1;i<e.length&&(u=1==(e[i]>>>o&1)),a.getMask(t,r,s-c)&&(u=!u),this.modules[r][s-c]=u,-1==--o&&(i++,o=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},c.PAD0=236,c.PAD1=17,c.createData=function(e,t,n){for(var r=o.getRSBlocks(e,t),s=new i,u=0;u<n.length;u++){var l=n[u];s.put(l.mode,4),s.put(l.getLength(),a.getLengthInBits(l.mode,e)),l.write(s)}var h=0;for(u=0;u<r.length;u++)h+=r[u].dataCount;if(s.getLengthInBits()>8*h)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*h+")");for(s.getLengthInBits()+4<=8*h&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*h||(s.put(c.PAD0,8),s.getLengthInBits()>=8*h));)s.put(c.PAD1,8);return c.createBytes(s,r)},c.createBytes=function(e,t){for(var n=0,r=0,o=0,i=new Array(t.length),c=new Array(t.length),u=0;u<t.length;u++){var l=t[u].dataCount,h=t[u].totalCount-l;r=Math.max(r,l),o=Math.max(o,h),i[u]=new Array(l);for(var d=0;d<i[u].length;d++)i[u][d]=255&e.buffer[d+n];n+=l;var p=a.getErrorCorrectPolynomial(h),f=new s(i[u],p.getLength()-1).mod(p);c[u]=new Array(p.getLength()-1);for(d=0;d<c[u].length;d++){var v=d+f.getLength()-c[u].length;c[u][d]=v>=0?f.get(v):0}}var m=0;for(d=0;d<t.length;d++)m+=t[d].totalCount;var g=new Array(m),y=0;for(d=0;d<r;d++)for(u=0;u<t.length;u++)d<i[u].length&&(g[y++]=i[u][d]);for(d=0;d<o;d++)for(u=0;u<t.length;u++)d<c[u].length&&(g[y++]=c[u][d]);return g},e.exports=c},77515:function(e,t,n){var r=n(12538);function o(e,t){this.totalCount=e,this.dataCount=t}o.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],o.getRSBlocks=function(e,t){var n=o.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,i=new Array,a=0;a<r;a++)for(var s=n[3*a+0],c=n[3*a+1],u=n[3*a+2],l=0;l<s;l++)i.push(new o(c,u));return i},o.getRsBlockTable=function(e,t){switch(t){case r.L:return o.RS_BLOCK_TABLE[4*(e-1)+0];case r.M:return o.RS_BLOCK_TABLE[4*(e-1)+1];case r.Q:return o.RS_BLOCK_TABLE[4*(e-1)+2];case r.H:return o.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},e.exports=o},4897:function(e){for(var t={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return t.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},n=0;n<8;n++)t.EXP_TABLE[n]=1<<n;for(n=8;n<256;n++)t.EXP_TABLE[n]=t.EXP_TABLE[n-4]^t.EXP_TABLE[n-5]^t.EXP_TABLE[n-6]^t.EXP_TABLE[n-8];for(n=0;n<255;n++)t.LOG_TABLE[t.EXP_TABLE[n]]=n;e.exports=t},45478:function(e){e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},62739:function(e,t,n){var r=n(45478),o=n(14382),i=n(4897),a=0,s=1,c=2,u=3,l=4,h=5,d=6,p=7,f={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;f.getBCHDigit(t)-f.getBCHDigit(f.G15)>=0;)t^=f.G15<<f.getBCHDigit(t)-f.getBCHDigit(f.G15);return(e<<10|t)^f.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;f.getBCHDigit(t)-f.getBCHDigit(f.G18)>=0;)t^=f.G18<<f.getBCHDigit(t)-f.getBCHDigit(f.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return f.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case a:return(t+n)%2==0;case s:return t%2==0;case c:return n%3==0;case u:return(t+n)%3==0;case l:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case h:return t*n%2+t*n%3==0;case d:return(t*n%2+t*n%3)%2==0;case p:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new o([1],0),n=0;n<e;n++)t=t.multiply(new o([1,i.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var o=0;o<t;o++){for(var i=0,a=e.isDark(r,o),s=-1;s<=1;s++)if(!(r+s<0||t<=r+s))for(var c=-1;c<=1;c++)o+c<0||t<=o+c||0==s&&0==c||a==e.isDark(r+s,o+c)&&i++;i>5&&(n+=3+i-5)}for(r=0;r<t-1;r++)for(o=0;o<t-1;o++){var u=0;e.isDark(r,o)&&u++,e.isDark(r+1,o)&&u++,e.isDark(r,o+1)&&u++,e.isDark(r+1,o+1)&&u++,0!=u&&4!=u||(n+=3)}for(r=0;r<t;r++)for(o=0;o<t-6;o++)e.isDark(r,o)&&!e.isDark(r,o+1)&&e.isDark(r,o+2)&&e.isDark(r,o+3)&&e.isDark(r,o+4)&&!e.isDark(r,o+5)&&e.isDark(r,o+6)&&(n+=40);for(o=0;o<t;o++)for(r=0;r<t-6;r++)e.isDark(r,o)&&!e.isDark(r+1,o)&&e.isDark(r+2,o)&&e.isDark(r+3,o)&&e.isDark(r+4,o)&&!e.isDark(r+5,o)&&e.isDark(r+6,o)&&(n+=40);var l=0;for(o=0;o<t;o++)for(r=0;r<t;r++)e.isDark(r,o)&&l++;return n+=10*(Math.abs(100*l/t/t-50)/5)}};e.exports=f},63392:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(n,!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function h(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?p(e):t}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=n(75271),y=(n(40507),n(46175)),C=n(12538);function b(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r<2048?(t+=String.fromCharCode(192|r>>6),t+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(t+=String.fromCharCode(224|r>>12),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|r>>18),t+=String.fromCharCode(128|r>>12&63),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r))}return t}var w={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return e.forEach((function(e,r){var o=null;e.forEach((function(i,a){if(!i&&null!==o)return n.push("M".concat(o+t," ").concat(r+t,"h").concat(a-o,"v1H").concat(o+t,"z")),void(o=null);if(a!==e.length-1)i&&null===o&&(o=a);else{if(!i)return;null===o?n.push("M".concat(a+t,",").concat(r+t," h1v1H").concat(a+t,"z")):n.push("M".concat(o+t,",").concat(r+t," h").concat(a+1-o,"v1H").concat(o+t,"z"))}}))})),n.join("")}function S(e,t){return e.slice().map((function(e,n){return n<t.y||n>=t.y+t.h?e:e.map((function(e,n){return(n<t.x||n>=t.x+t.w)&&e}))}))}function E(e,t){var n=e.imageSettings,r=e.size,o=e.includeMargin;if(null==n)return null;var i=o?4:0,a=t.length+2*i,s=Math.floor(.1*r),c=a/r,u=(n.width||s)*c,l=(n.height||s)*c,h=null==n.x?t.length/2-u/2:n.x*c,d=null==n.y?t.length/2-l/2:n.y*c,p=null;if(n.excavate){var f=Math.floor(h),v=Math.floor(d);p={x:f,y:v,w:Math.ceil(u+h-f),h:Math.ceil(l+d-v)}}return{x:h,y:d,h:l,w:u,excavation:p}}var M=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),P=function(e){function t(){var e,n;c(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return m(p(n=h(this,(e=d(t)).call.apply(e,[this].concat(o)))),"_canvas",void 0),m(p(n),"_image",void 0),m(p(n),"state",{imgLoaded:!1}),m(p(n),"handleImageLoad",(function(){n.setState({imgLoaded:!0})})),n}return f(t,e),l(t,[{key:"componentDidMount",value:function(){this._image&&this._image.complete&&this.handleImageLoad(),this.update()}},{key:"componentWillReceiveProps",value:function(e){var t,n;(null===(t=this.props.imageSettings)||void 0===t?void 0:t.src)!==(null===(n=e.imageSettings)||void 0===n?void 0:n.src)&&this.setState({imgLoaded:!1})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,o=e.bgColor,i=e.fgColor,a=e.includeMargin,s=e.imageSettings,c=new y(-1,C[r]);if(c.addData(b(t)),c.make(),null!=this._canvas){var u=this._canvas,l=u.getContext("2d");if(!l)return;var h=c.modules;if(null===h)return;var d=a?4:0,p=h.length+2*d,f=E(this.props,h);null!=s&&null!=f&&null!=f.excavation&&(h=S(h,f.excavation));var v=window.devicePixelRatio||1;u.height=u.width=n*v;var m=n/p*v;l.scale(m,m),l.fillStyle=o,l.fillRect(0,0,p,p),l.fillStyle=i,M?l.fill(new Path2D(x(h,d))):h.forEach((function(e,t){e.forEach((function(e,n){e&&l.fillRect(n+d,t+d,1,1)}))})),this.state.imgLoaded&&this._image&&null!=f&&l.drawImage(this._image,f.x+d,f.y+d,f.w,f.h)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.value,t.size),r=(t.level,t.bgColor,t.fgColor,t.style),i=(t.includeMargin,t.imageSettings),c=s(t,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),u=a({height:n,width:n},r),l=null,h=i&&i.src;return null!=i&&null!=h&&(l=g.createElement("img",{src:h,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(t){return e._image=t}})),g.createElement(g.Fragment,null,g.createElement("canvas",o({style:u,height:n,width:n,ref:function(t){return e._canvas=t}},c)),l)}}]),t}(g.PureComponent);m(P,"defaultProps",w);var R=function(e){function t(){return c(this,t),h(this,d(t).apply(this,arguments))}return f(t,e),l(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,i=e.bgColor,a=e.fgColor,c=e.includeMargin,u=e.imageSettings,l=s(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),h=new y(-1,C[r]);h.addData(b(t)),h.make();var d=h.modules;if(null===d)return null;var p=c?4:0,f=d.length+2*p,v=E(this.props,d),m=null;null!=u&&null!=v&&(null!=v.excavation&&(d=S(d,v.excavation)),m=g.createElement("image",{xlinkHref:u.src,height:v.h,width:v.w,x:v.x+p,y:v.y+p,preserveAspectRatio:"none"}));var w=x(d,p);return g.createElement("svg",o({shapeRendering:"crispEdges",height:n,width:n,viewBox:"0 0 ".concat(f," ").concat(f)},l),g.createElement("path",{fill:i,d:"M0,0 h".concat(f,"v").concat(f,"H0z")}),g.createElement("path",{fill:a,d:w}),m)}}]),t}(g.PureComponent);m(R,"defaultProps",w);var D=function(e){var t=e.renderAs,n=s(e,["renderAs"]),r="svg"===t?R:P;return g.createElement(r,n)};D.defaultProps=a({renderAs:"canvas"},w),e.exports=D}}]);
|