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

1 line
47 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[11161],{70481:function(e,t,r){r.d(t,{wT:function(){return te}});var n=r(80813),o=function(){function e(){this.handlers={}}return e.prototype.eventNames=function(){var e,t=(null===(e=Object.getOwnPropertySymbols)||void 0===e?void 0:e.call(Object,this.handlers))||[];return Object.keys(this.handlers).concat(t)},e.prototype.rawListeners=function(e){var t=this.handlers[e];return t?t.map((function(e){return e.raw})):[]},e.prototype.listeners=function(e){var t=this.handlers[e];return t?t.map((function(e){return e.wrap})):[]},e.prototype.hasListener=function(e,t){return this.rawListeners(e).some((function(e){return e===t}))},e.prototype._on=function(e,t,r,n,o){void 0===n&&(n=null),void 0===o&&(o=1);var c={raw:t,wrap:r,context:n};if(this.handlers[e]){var i=1===o?"push":"unshift";this.handlers[e][i](c)}else this.handlers[e]=[c];return this},e.prototype.prependListener=function(e,t,r){return this._on(e,t,t,r,0)},e.prototype.on=function(e,t,r){return this._on(e,t,t,r)},e.prototype._wrapOnce=function(e,t,r){var n=this;void 0===r&&(r=null);var o=function(){for(var c=[],i=0;i<arguments.length;i++)c[i]=arguments[i];t.apply(r,c),n.off(e,o)};return o},e.prototype.once=function(e,t,r){var n=this._wrapOnce(e,t,r);return this._on(e,t,n,r)},e.prototype.prependOnceListener=function(e,t,r){var n=this._wrapOnce(e,t,r);return this._on(e,t,n,r,0)},e.prototype.off=function(e,t){var r=this.handlers[e];if(r)if(t){var n=r.findIndex((function(e){return e.wrap===t||e.raw===t}));-1!==n&&r.splice(n,1)}else delete this.handlers[e];return this},e.prototype.offAll=function(){return this.handlers={},this},e.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=this.handlers[e];return!!(n&&n.length>0)&&(n.forEach((function(e){e.wrap.apply(e.context,t)})),!0)},e}(),c={},i=function(){function e(e){void 0===e&&(e="default"),this.scope=e,c[this.scope]||(c[this.scope]={}),this.data=c[this.scope]}return e.prototype.getItem=function(e){return e in this.data?this.data[e]:null},e.prototype.setItem=function(e,t){this.data[e]=t},e.prototype.removeItem=function(e){delete this.data[e]},e.prototype.clear=function(){c[this.scope]={},this.data=c[this.scope]},e}();function a(e){try{var t="object"==typeof e&&null!==e&&!!e.setItem&&!!e.getItem&&!!e.removeItem;if(t){var r=Math.random().toString(16).substring(2,8)+(new Date).getTime();if(e.setItem(r,"1"),"1"!==e.getItem(r))return!1;e.removeItem(r)}return t}catch(t){return console.error("[cache2] ".concat(e," is not supported. The default memory cache will be used.")),!1}}var l=function(){function e(e,t){void 0===t&&(t={});var r=!!e&&a(e);this.options=(0,n.pi)({needParsed:r,prefix:""},t),this.storage=r?e:new i(this.options.memoryScope)}return e.prototype.getKey=function(e){return this.options.prefix+e},e.prototype.get=function(e){var t=this.storage.getItem(this.getKey(e));return this.options.needParsed?function(e,t){try{return JSON.parse(e,t)}catch(t){return e}}(t,this.options.reviver):t},e.prototype.set=function(e,t){this.storage.setItem(this.getKey(e),this.options.needParsed?function(e,t){return JSON.stringify(e,t)}(t,this.options.replacer):t)},e.prototype.del=function(e){this.storage.removeItem(this.getKey(e))},e.prototype.clear=function(){"function"==typeof this.storage.clear&&this.storage.clear()},e}(),s="default",u=function(e){function t(t,r){var o,c=e.call(this)||this,i=s;return"string"==typeof t?i=t||s:"object"==typeof t&&(o=t),o||"object"!=typeof r||(o=r),c.options=(0,n.pi)({max:-1,stdTTL:0,maxStrategy:"limited",checkperiod:0,prefix:"cache2_"},o),c.storage=new l(c.options.storage,(0,n.pi)({memoryScope:i},c.options)),c.cacheKey=i,c.startCheckperiod(),c}return(0,n.ZT)(t,e),t.prototype._check=function(e,t){var r=!0;return 0!==t.t&&t.t<Date.now()&&(r=!1,this.del(e),this.emit("expired",e,t.v)),r},t.prototype._wrap=function(e,t){var r=Date.now(),n="number"==typeof t?t:this.options.stdTTL;return{v:e,t:n>0?r+n:0,n:r}},t.prototype._isLimited=function(e){return this.options.max>-1&&e>=this.options.max},t.prototype._getReplaceKey=function(e,t){var r=e[0];return e.forEach((function(e){(t[e].t<t[r].t||t[e].t===t[r].t&&t[e].n<t[r].n)&&(r=e)})),r},Object.defineProperty(t.prototype,"cacheValues",{get:function(){return this.storage.get(this.cacheKey)||{}},enumerable:!1,configurable:!0}),t.prototype.setCacheValues=function(e){this.storage.set(this.cacheKey,e)},t.prototype.get=function(e){var t=this.cacheValues[e];if(t&&this._check(e,t))return t.v},t.prototype.mget=function(e){var t=this,r={};if(!Array.isArray(e))return r;var n=this.cacheValues;return e.forEach((function(e){var o=n[e];o&&t._check(e,o)&&(r[e]=o.v)})),r},t.prototype.getAll=function(){var e=Object.keys(this.cacheValues);return this.mget(e)},t.prototype.set=function(e,t,r){if(0===this.options.max)return!1;var n=this.cacheValues,o=Object.keys(n);if(!n[e]&&this._isLimited(o.length)){var c=this.keys();if(this._isLimited(c.length)){if("replaced"!==this.options.maxStrategy)return!1;var i=this._getReplaceKey(c,n);this.del(i)}}return n[e]=this._wrap(t,r),this.setCacheValues(n),this.emit("set",e,n[e].v),!0},t.prototype.mset=function(e){var t=this,r=!0;return e.forEach((function(e){var n=t.set(e.key,e.value,e.ttl);r&&!n&&(r=!1)})),r},t.prototype.del=function(e){var t=this,r=this.cacheValues,n=0;return(Array.isArray(e)?e:[e]).forEach((function(e){if(r[e]){n++;var o=r[e];delete r[e],t.emit("del",e,o.v)}})),n>0&&this.setCacheValues(r),n},t.prototype.clear=function(){this.storage.del(this.cacheKey)},t.prototype.keys=function(){var e=this,t=this.cacheValues;return Object.keys(t).filter((function(r){return e._check(r,t[r])}))},t.prototype.has=function(e){var t=this.cacheValues[e];return!(!t||!this._check(e,t))},t.prototype.take=function(e){var t,r=this.cacheValues[e];return r&&this._check(e,r)&&(t=r.v,this.del(e)),t},t.prototype.ttl=function(e,t){var r=this.cacheValues,n=r[e];return!(!n||!this._check(e,n))&&(r[e]=this._wrap(n.v,t),!0)},t.prototype.getTtl=function(e){var t=this.cacheValues,r=t[e];if(r&&this._check(e,r))return t[e].t},t.prototype.getLastModified=function(e){var t=this.cacheValues,r=t[e];if(r&&this._check(e,r))return t[e].n},t.prototype.startCheckperiod=function(){var e=this;this.keys(),this.options.checkperiod>0&&(clearTimeout(this._checkTimeout),this._checkTimeout=setTimeout((function(){e.startCheckperiod()}),this.options.checkperiod))},t.prototype.stopCheckperiod=function(){clearTimeout(this._checkTimeout)},t}(o),d="undefined",f="object",p=Object.prototype,h=p.toString,m=(p.hasOwnProperty,p.propertyIsEnumerable,Object.getOwnPropertySymbols,Object.getPrototypeOf,Object.keys,Function.prototype.toString,typeof Symbol!==d&&Symbol.prototype,Array.prototype.slice,Math.min),v=Math.max,g=Math.random,b=Math.floor,y=Math.ceil,w=(Math.abs,Number.isFinite,Number.isInteger,Number.isSafeInteger,typeof globalThis===f&&globalThis,typeof r.g===f&&r.g,typeof self===f&&self,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,["Function","AsyncFunction","GeneratorFunction","Proxy"].map((function(e){return"[object "+e+"]"})),0),x="_"+g().toString(36).substring(2,4);function k(e){return void 0===e&&(e=x),""+e+ ++w}function E(e){return h.call(e)}var T=function(){function e(e){this.promiseCache={},this.cache=new u(k("uh_async_memo"),e)}return e.prototype.run=function(e,t,r){var o,c=this;if(!t||"string"!=typeof(o=t)&&"[object String]"!==E(o))return e();var i=(0,n.pi)({persisted:!0},r);if(i.persisted){var a=this.cache.get(t);if(a)return Promise.resolve(a)}return this.promiseCache[t]||(this.promiseCache[t]=e().then((function(e){return delete c.promiseCache[t],c.cache.set(t,e,i.ttl),e})).catch((function(e){return delete c.promiseCache[t],Promise.reject(e)}))),this.promiseCache[t]},e}(),z=T,I=typeof Blob!==d;function j(e){return!!(I&&e instanceof Blob)||"[object Blob]"===E(e)}var S,O="undefined"!=typeof URL,L=Object.keys,N=(Object.values,O?URL.createObjectURL:(S="",function(){return S})),R=O?URL.revokeObjectURL:function(){};var P=[200,304];function M(e,t){return new Promise((function(r,o){var c,i,a,l,s,u,d,f,p,h,m,v,g,b,y,w,x,k,E,T,z,I,S,O,N,R;j(e)?r(e):(c=e,i=(0,n.pi)({responseType:"blob"},t),a=i||{},l=a.method,s=void 0===l?"get":l,u=a.data,d=void 0===u?null:u,f=a.timeout,p=a.headers,h=a.withCredentials,m=void 0!==h&&h,v=a.async,g=void 0===v||v,b=a.user,y=void 0===b?null:b,w=a.password,x=void 0===w?null:w,k=a.responseType,E=a.onReadyStateChange,T=a.onLoadStart,z=a.onProgress,I=a.onAbort,S=a.onTimeout,O=a.onError,N=a.onLoad,R=a.onLoadEnd,new Promise((function(e,t){var r=new XMLHttpRequest;r.open(s.toLowerCase(),c,g,y,x),E&&(r.onreadystatechange=E),"number"==typeof f&&f>0&&(r.timeout=f),r.withCredentials=m,k&&(r.responseType=k),"object"==typeof p&&L(p).map((function(e){r.setRequestHeader(e,p[e])}));var n,o=function(e){return function(n){t(n),null==e||e.call(r,n)}},i={loadstart:T,progress:z,abort:o(I),timeout:o(S),error:o(O),load:(n=N,function(t){e(t),null==n||n.call(r,t)}),loadend:R};L(i).map((function(e){var t=i[e];t&&r.addEventListener(e,t)})),r.send(d)}))).then((function(t){var n=t.target.status;if(-1!==P.indexOf(n))r(t.target.response);else{var c=new Error("The file does not support get requests, responseStatus ".concat(n,", '").concat(e,"'."));console.error(c),o(c)}})).catch((function(e){console.error(new Error("Failed to request file. ".concat(e))),o(e)}))}))}function _(e,t){return M(e,t).then((function(e){return function(e){return new Promise((function(t,r){var n=j(e),o=n?N(e):e,c=new Image;n||(c.crossOrigin="anonymous"),c.onload=function(){t(c)},c.onerror=function(t){n&&R(o),console.error("[loadImage] The image load failed, '".concat(e,"'.")),r(t)},c.src=o}))}(e).then((function(t){return{blob:e,image:t}}))}))}function C(e){return"function"==typeof e||function(e){return null!==e&&"object"==typeof e}(e)}var B=/^0b[01]+$/i,D=/^0o[0-7]+$/i,W=/^[-+]0x[0-9a-f]+$/i;function F(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||"[object Symbol]"===E(e)}(e))return NaN;if(C(e)&&(e=Number(e)),"string"!=typeof e)return 0===e?e:+e;e=e.trim();var t=B.test(e);return t||D.test(e)?parseInt(e.slice(2),t?2:8):W.test(e)?NaN:+e}function H(e){return e?(e=F(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function U(e,t){void 0===e&&(e=0),void 0===t&&(t=1),e=H(e),t=H(t);var r=y(m(e,t)||0),n=b(v(e,t)||0);if(r>n){var o=r;r=n,n=o}return b(r+g()*(n-r+1))}var V,A=Math.PI;!function(e){e[e.None=0]="None",e[e.Outer=1]="Outer",e[e.Inner=2]="Inner"}(V||(V={}));var q=[V.None,V.Outer,V.Inner];function X(e){return e[U(0,e.length-1)]}function K(e){var t={top:X(q),right:X(q),bottom:X(q),left:X(q)},r=Object.keys(t),n=["top","bottom"],o=["left","right"];if(t.top===V.Outer&&t.bottom===V.Outer?t[X(n)]=V.Inner:t.top!==V.Outer&&t.bottom!==V.Outer&&(t[X(n)]=V.Outer),t.left===V.Outer&&t.right===V.Outer?t[X(o)]=V.Inner:t.left!==V.Outer&&t.right!==V.Outer&&(t[X(o)]=V.Outer),e){var c=[],i=[];r.forEach((function(e){t[e]===V.Inner?c.push(e):t[e]===V.None&&i.push(e)})),2===e?c.forEach((function(e){return t[e]=V.None})):3===e?0===c.length?t[X(i)]=V.Inner:2===c.length&&(t[X(c)]=V.None):4==e&&i.forEach((function(e){return t[e]=V.Inner}))}return t}function Y(e,t){void 0===t&&(t={});var r=t.x,n=void 0===r?0:r,o=t.y,c=void 0===o?0:o,i=t.w,a=void 0===i?60:i,l=t.h,s=void 0===l?60:l,u=t.needClosePath,d=void 0===u||u,f=t.points,p=t.margin,h=void 0===p?0:p;h=h<=0?0:h,"number"!=typeof f&&f||(f=K(f));var m=.15*(Math.min(a,s)-2*h),v=Math.hypot(m,m)/2,g=m+v,b={x:n+h,y:c+h,w:a-g-2*h,h:s-g-2*h},y=b.w/2,w=b.h/2;f.left===V.Outer&&(b.x+=g),f.top===V.Outer&&(b.y+=g),e.beginPath(),e.lineWidth=2,e.moveTo(b.x,b.y),f.top!==V.None&&(e.lineTo(b.x+y-v,b.y),f.top===V.Inner?e.arc(b.x+y,b.y+v,m,1.25*A,1.75*A,!0):e.arc(b.x+y,b.y-v,m,.75*A,.25*A)),e.lineTo(b.x+b.w,b.y),f.right!==V.None&&(e.lineTo(b.x+b.w,b.y+w-v),f.right===V.Inner?e.arc(b.x+b.w-v,b.y+w,m,1.75*A,.25*A,!0):e.arc(b.x+b.w+v,b.y+w,m,1.25*A,.75*A)),e.lineTo(b.x+b.w,b.y+b.h),f.bottom!==V.None&&(e.lineTo(b.x+y+v,b.y+b.h),f.bottom===V.Inner?e.arc(b.x+y,b.y+b.h-v,m,.25*A,.75*A,!0):e.arc(b.x+y,b.y+b.h+v,m,1.75*A,1.25*A)),e.lineTo(b.x,b.y+b.h),f.left!==V.None&&(e.lineTo(b.x,b.y+w+v),f.left===V.Inner?e.arc(b.x+v,b.y+w,m,.75*A,1.25*A,!0):e.arc(b.x-v,b.y+w,m,.25*A,1.75*A)),e.lineTo(b.x,b.y),e.stroke(),d&&e.closePath()}function G(e,t,r,n){return new Promise((function(o){t?e.toBlob((function(t){o(t?URL.createObjectURL(t):e.toDataURL(r,n))}),r,n):o(e.toDataURL(r,n))}))}var J=new z({max:5,maxStrategy:"replaced"});J.cache.on("del",(function(e,t){try{t.image.src&&URL.revokeObjectURL(t.image.src)}catch(e){}}));var Z=new WeakMap,$="image/jpeg",Q="image/png",ee=[];function te(e,t){void 0===t&&(t={});var r=t.borderWidth,n=void 0===r?2:r,o=t.borderColor,c=void 0===o?"rgba(255,255,255,0.7)":o,i=t.fillColor,a=void 0===i?"rgba(255,255,255,0.7)":i,l=t.points,s=t.width,u=void 0===s?60:s,d=t.height,f=void 0===d?60:d,p=t.x,h=t.y,m=t.margin,v=void 0===m?2:m,g=t.equalHeight,b=void 0===g||g,y=t.imageWidth,w=t.imageHeight,x=t.bgWidth,E=t.bgHeight,T=t.bgOffset,z=void 0===T?[0,0]:T,I=t.bgImageType,j=void 0===I?$:I,S=t.quality,O=void 0===S?.8:S,L=t.format,N=void 0===L?"dataURL":L,R=t.cacheImage,P=void 0===R||R,M=t.autoRevokePreviousBlobUrl,B=void 0===M||M,D=t.ajaxOptions;return new Promise((function(t,r){var o,i=document.createElement("canvas"),s=document.createElement("canvas"),d=i.getContext("2d"),m=s.getContext("2d"),g=P?C(o=e)?(Z.get(o)||Z.set(o,k("cp")),Z.get(o)):String(o):void 0;J.run((function(){return _(e,D)}),g).then((function(e){var o=e.image;y&&(o.width=y),w&&(o.height=w);var g="number"==typeof x&&x>0?x>u?x:u:o.width,k="number"==typeof E&&E>0?E>f?E:f:o.height;i.width=g,i.height=k;var T=g-u,I=k-f,S=void 0===p?U(u,T):p||0,L=void 0===h?U(0,I):h||0;S<0?S=0:S>T&&(S=T),L<0?L=0:L>I&&(L=I);var R="number"!=typeof l&&l?l:K(l),P="function"==typeof z?z(o.width,o.height):z;d.strokeStyle=c,d.lineWidth=n,d.fillStyle=a,Y(d,{x:S,y:L,w:u,h:f,points:R,margin:v}),d.fillStyle=a,d.fill(),d.globalCompositeOperation="destination-over",d.drawImage(o,P[0],P[1],o.width,o.height),s.width=g,s.height=k,m.strokeStyle=c,m.lineWidth=n,Y(m,{x:S,y:L,w:u,h:f,points:R,margin:v}),m.globalCompositeOperation="destination-over",m.clip(),m.drawImage(o,P[0],P[1],o.width,o.height);var M=m.getImageData(S,L,u,f);m.clearRect(0,0,g,k),s.width=u,s.height=b?k:f,m.putImageData(M,0,b?L:0);var _="blob"===N,C=G(s,_,Q,O),D=G(i,_,j,O);Promise.all([C,D]).then((function(e){var r=e[0],n=e[1];B&&(ee.length&&(ee.forEach((function(e){URL.revokeObjectURL(e)})),ee.length=0),_&&ee.push(n,r)),t({puzzleUrl:r,bgUrl:n,x:S,y:b?0:L})})).catch(r)})).catch(r)}))}},90526:function(e,t,r){r.d(t,{ZP:function(){return R}});var n=r(80813),o=r(92310),c=r.n(o),i=r(59301),a=function(){var e=(0,i.useRef)(!1);return(0,i.useEffect)((function(){return e.current=!1,function(){e.current=!0}}),[]),e};var l=function(e){var t=a(),r=(0,n.CR)((0,i.useState)(e),2),o=r[0],c=r[1];return[o,(0,i.useCallback)((function(e){t.current||c(e)}),[])]};var s=function(e){var t=(0,i.useRef)(e);return t.current=e,t},u=function(e){(0,i.useEffect)((function(){e()}),[])};!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("@-webkit-keyframes slider-icon-animate_spin {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes slider-icon-animate_spin {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.rc-slider-captcha-icon {\n display: inline-block;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.rc-slider-captcha-icon > svg {\n line-height: 1;\n}\n.rc-slider-captcha-icon-spin {\n -webkit-animation: slider-icon-animate_spin 1s infinite linear;\n animation: slider-icon-animate_spin 1s infinite linear;\n}\n.rc-slider-captcha-button {\n display: inline-block;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 40px;\n height: 100%;\n padding: 5px 0;\n color: #676d73;\n color: var(--rcsc-button-color, #676d73);\n font-size: 22px;\n line-height: 1;\n background-color: #fff;\n background-color: var(--rcsc-button-bg-color, #fff);\n box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);\n cursor: -webkit-grab;\n cursor: grab;\n transition-timing-function: linear;\n transition-duration: 0.2s;\n transition-property: background-color, color;\n touch-action: none;\n}\n.rc-slider-captcha-button-active {\n color: #fff;\n color: var(--rcsc-button-hover-color, #fff);\n background-color: #1991fa;\n background-color: var(--rcsc-primary, #1991fa);\n}\n.rc-slider-captcha-button-verify {\n color: #fff;\n color: var(--rcsc-button-hover-color, #fff);\n background-color: #1991fa;\n background-color: var(--rcsc-primary, #1991fa);\n}\n.rc-slider-captcha-button-pc:hover {\n color: #fff;\n color: var(--rcsc-button-hover-color, #fff);\n background-color: #1991fa;\n background-color: var(--rcsc-primary, #1991fa);\n}\n.rc-slider-captcha-button:active {\n color: #fff;\n color: var(--rcsc-button-hover-color, #fff);\n background-color: #1991fa;\n background-color: var(--rcsc-primary, #1991fa);\n}\n.rc-slider-captcha-button-active,\n.rc-slider-captcha-button:active {\n cursor: -webkit-grabbing;\n cursor: grabbing;\n}\n.rc-slider-captcha-button-verify,\n.rc-slider-captcha-button-verify:active {\n cursor: wait;\n}\n.rc-slider-captcha-button-error {\n color: #fff;\n color: var(--rcsc-button-hover-color, #fff);\n background-color: #f57a7a;\n background-color: var(--rcsc-error, #f57a7a);\n cursor: default;\n}\n.rc-slider-captcha-button-error:hover {\n color: #fff;\n color: var(--rcsc-button-hover-color, #fff);\n background-color: #f57a7a;\n background-color: var(--rcsc-error, #f57a7a);\n cursor: default;\n}\n.rc-slider-captcha-button-error:active {\n color: #fff;\n color: var(--rcsc-button-hover-color, #fff);\n background-color: #f57a7a;\n background-color: var(--rcsc-error, #f57a7a);\n cursor: default;\n}\n.rc-slider-captcha-button-success {\n color: #fff;\n color: var(--rcsc-button-hover-color, #fff);\n background-color: #52ccba;\n background-color: var(--rcsc-success, #52ccba);\n cursor: default;\n}\n.rc-slider-captcha-button-success:hover {\n color: #fff;\n color: var(--rcsc-button-hover-color, #fff);\n background-color: #52ccba;\n background-color: var(--rcsc-success, #52ccba);\n cursor: default;\n}\n.rc-slider-captcha-button-success:active {\n color: #fff;\n color: var(--rcsc-button-hover-color, #fff);\n background-color: #52ccba;\n background-color: var(--rcsc-success, #52ccba);\n cursor: default;\n}\n.rc-slider-captcha-button-disabled {\n color: #676d73;\n color: var(--rcsc-button-color, #676d73);\n background-color: #fff;\n background-color: var(--rcsc-button-bg-color, #fff);\n cursor: no-drop;\n opacity: 0.7;\n}\n.rc-slider-captcha-button-disabled:hover {\n color: #676d73;\n color: var(--rcsc-button-color, #676d73);\n background-color: #fff;\n background-color: var(--rcsc-button-bg-color, #fff);\n cursor: no-drop;\n opacity: 0.7;\n}\n.rc-slider-captcha-button-disabled:active {\n color: #676d73;\n color: var(--rcsc-button-color, #676d73);\n background-color: #fff;\n background-color: var(--rcsc-button-bg-color, #fff);\n cursor: no-drop;\n opacity: 0.7;\n}\n.rc-slider-captcha-control {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 42px;\n height: var(--rcsc-control-height, 42px);\n background-color: #f7f9fa;\n background-color: var(--rcsc-bg-color, #f7f9fa);\n border: 1px solid #e4e7eb;\n border: 1px solid var(--rcsc-border-color, #e4e7eb);\n border-radius: 2px;\n border-radius: var(--rcsc-control-border-radius, 2px);\n}\n.rc-slider-captcha-control-button {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2;\n border-radius: 2px;\n border-radius: var(--rcsc-control-border-radius, 2px);\n}\n.rc-slider-captcha-control-indicator {\n position: absolute;\n top: -1px;\n bottom: -1px;\n left: -1px;\n display: none;\n box-sizing: border-box;\n width: 0;\n background-color: #d1e9fe;\n background-color: var(--rcsc-primary-light, #d1e9fe);\n border: 1px solid #1991fa;\n border: 1px solid var(--rcsc-primary, #1991fa);\n border-radius: 2px;\n border-radius: var(--rcsc-control-border-radius, 2px);\n}\n.rc-slider-captcha-control-tips {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n color: #45494c;\n color: var(--rcsc-text-color, #45494c);\n font-size: 14px;\n line-height: 20px;\n text-align: center;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.rc-slider-captcha-control-moving .rc-slider-captcha-control-indicator,\n.rc-slider-captcha-control-verify .rc-slider-captcha-control-indicator,\n.rc-slider-captcha-control-error .rc-slider-captcha-control-indicator,\n.rc-slider-captcha-control-success .rc-slider-captcha-control-indicator {\n display: block;\n}\n.rc-slider-captcha-control-error .rc-slider-captcha-control-indicator {\n background-color: #fce1e1;\n background-color: var(--rcsc-error-light, #fce1e1);\n border-color: #f57a7a;\n border-color: var(--rcsc-error, #f57a7a);\n}\n.rc-slider-captcha-control-success .rc-slider-captcha-control-indicator {\n background-color: #d2f4ef;\n background-color: var(--rcsc-success-light, #d2f4ef);\n border-color: #52ccba;\n border-color: var(--rcsc-success, #52ccba);\n}\n.rc-slider-captcha-control-errors {\n padding-left: 0;\n background-color: #fce1e1;\n background-color: var(--rcsc-error-light, #fce1e1);\n border-color: #f57a7a;\n border-color: var(--rcsc-error, #f57a7a);\n}\n.rc-slider-captcha-control-load-failed {\n padding-left: 0;\n background-color: #fce1e1;\n background-color: var(--rcsc-error-light, #fce1e1);\n border-color: #f57a7a;\n border-color: var(--rcsc-error, #f57a7a);\n}\n.rc-slider-captcha-control-errors .rc-slider-captcha-control-button,\n.rc-slider-captcha-control-errors .rc-slider-captcha-control-indicator,\n.rc-slider-captcha-control-load-failed .rc-slider-captcha-control-button,\n.rc-slider-captcha-control-load-failed .rc-slider-captcha-control-indicator {\n display: none;\n}\n.rc-slider-captcha-control-errors .rc-slider-captcha-control-tips {\n color: #f57a7a;\n color: var(--rcsc-error, #f57a7a);\n cursor: pointer;\n}\n.rc-slider-captcha-control-load-failed .rc-slider-captcha-control-tips {\n color: #f57a7a;\n color: var(--rcsc-error, #f57a7a);\n cursor: pointer;\n}\n.rc-slider-captcha-jigsaw {\n position: relative;\n background-color: #f7f9fa;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.rc-slider-captcha-jigsaw img {\n position: absolute;\n}\n.rc-slider-captcha-jigsaw-bg {\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.rc-slider-captcha-jigsaw-puzzle {\n width: 60px;\n height: 100%;\n touch-action: none;\n}\n.rc-slider-captcha-jigsaw-puzzle:hover {\n cursor: -webkit-grab;\n cursor: grab;\n}\n.rc-slider-captcha-jigsaw-puzzle:active {\n cursor: -webkit-grabbing;\n cursor: grabbing;\n}\n.rc-slider-captcha-jigsaw-refresh {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n padding: 5px;\n color: #fff;\n font-size: 22px;\n line-height: 0;\n cursor: pointer;\n opacity: 0.75;\n transition: opacity 0.2s linear;\n}\n.rc-slider-captcha-jigsaw-refresh:hover {\n opacity: 1;\n}\n.rc-slider-captcha-jigsaw-refresh-disabled {\n cursor: not-allowed;\n}\n.rc-slider-captcha-jigsaw-refresh-disabled:hover {\n opacity: 0.75;\n}\n.rc-slider-captcha-jigsaw-stop .rc-slider-captcha-jigsaw-puzzle {\n pointer-events: none;\n}\n.rc-slider-captcha-jigsaw-stop .rc-slider-captcha-jigsaw-puzzle:hover,\n.rc-slider-captcha-jigsaw-stop .rc-slider-captcha-jigsaw-puzzle:active {\n cursor: default;\n}\n.rc-slider-captcha-loading {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 15px;\n color: #45494c;\n color: var(--rcsc-text-color, #45494c);\n font-size: 14px;\n text-align: center;\n background-color: #f7f9fa;\n background-color: var(--rcsc-bg-color, #f7f9fa);\n}\n.rc-slider-captcha-loading-icon {\n font-size: 30px;\n}\n.rc-slider-captcha-loading-text {\n margin-top: 5px;\n}\n.rc-slider-captcha-load-failed {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n color: #ccc;\n font-size: 85px;\n background-color: #f7f9fa;\n background-color: var(--rcsc-bg-color, #f7f9fa);\n}\n.rc-slider-captcha {\n position: relative;\n}\n.rc-slider-captcha > * {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider-captcha-panel {\n padding-bottom: 15px;\n}\n.rc-slider-captcha-panel-inner {\n overflow: hidden;\n border-radius: 2px;\n border-radius: var(--rcsc-panel-border-radius, 2px);\n}\n.rc-slider-captcha-float .rc-slider-captcha-panel {\n position: absolute;\n left: 0;\n display: none;\n opacity: 0;\n transition-timing-function: ease-out;\n transition-duration: 0.3s;\n transition-property: top, bottom, opacity;\n}\n.rc-slider-captcha-float-top .rc-slider-captcha-panel {\n bottom: 22px;\n}\n.rc-slider-captcha-float-bottom .rc-slider-captcha-panel {\n top: 22px;\n padding: 15px 0 0;\n}\n");var d="rc-slider-captcha";function f(e){var t=0,r=0;return"number"==typeof e.clientX&&"number"==typeof e.clientY?(t=e.clientX,r=e.clientY):e.touches&&e.touches[0]?(t=e.touches[0].clientX,r=e.touches[0].clientY):e.changedTouches&&e.changedTouches[0]&&(t=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY),{clientX:t,clientY:r}}function p(e,t){if(void 0===t&&(t={}),e)for(var r in t)e.style[r]=t[r]}var h="object"==typeof window&&window&&"object"==typeof document&&document&&window.document===document&&!!document.addEventListener&&"ontouchstart"in window;function m(e,t){return"number"==typeof e&&!Number.isNaN(e)&&"number"==typeof t&&t>0?Number(e.toFixed(t)):e}var v="".concat(d,"-button"),g=i.forwardRef((function(e,t){var r,o=e.className,a=e.disabled,l=e.active,s=e.success,u=e.error,d=e.verify,f=(0,n._T)(e,["className","disabled","active","success","error","verify"]);return i.createElement("span",(0,n.pi)({className:c()(v,o,(r={},r["".concat(v,"-disabled")]=a,r["".concat(v,"-active")]=l,r["".concat(v,"-verify")]=d,r["".concat(v,"-success")]=s,r["".concat(v,"-error")]=u,r["".concat(v,"-pc")]=!h,r)),ref:t},f))}));g.displayName="SliderButton";var b,y="".concat(d,"-icon"),w=function(e){var t,r=e.className,o=e.spin,a=(0,n._T)(e,["className","spin"]);return i.createElement("span",(0,n.pi)({className:c()(y,(t={},t["".concat(y,"-spin")]=o,t),r)},a))},x={arrowRight:i.createElement((function(e){return i.createElement("svg",(0,n.pi)({viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e),i.createElement("path",{d:"M116.9408 561.4592m0-40.96l0 0q0-40.96 40.96-40.96l573.44 0q40.96 0 40.96 40.96l0 0q0 40.96-40.96 40.96l-573.44 0q-40.96 0-40.96-40.96Z"}),i.createElement("path",{d:"M769.82272 519.43424l-203.22304-203.22304a40.96 40.96 0 1 1 57.91744-57.91744l231.71072 231.71072a40.96 40.96 0 0 1 0.45056 58.44992L624.9472 780.12416a40.96 40.96 0 0 1-57.93792-57.91744l202.79296-202.79296z"}))}),null),check:i.createElement((function(e){return i.createElement("svg",(0,n.pi)({viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e),i.createElement("path",{d:"M864.554667 268.501333a42.666667 42.666667 0 0 1 0 60.330667L412.032 781.397333a42.453333 42.453333 0 0 1-22.613333 11.818667l-5.034667 0.597333H379.306667a42.496 42.496 0 0 1-27.648-12.416l-211.2-211.2a42.666667 42.666667 0 1 1 60.330666-60.330666l180.992 180.992 422.4-422.4a42.666667 42.666667 0 0 1 60.330667 0z"}))}),null),loading:i.createElement((function(e){return i.createElement("svg",(0,n.pi)({viewBox:"0 0 120 120",width:"1em",height:"1em"},e),i.createElement("defs",null,i.createElement("line",{id:"l",x1:"60",x2:"60",y1:"7",y2:"27",stroke:"currentColor",strokeWidth:"11",strokeLinecap:"round"})),i.createElement("g",null,i.createElement("use",{xlinkHref:"#l",opacity:".27"}),i.createElement("use",{xlinkHref:"#l",opacity:".27",transform:"rotate(30 60,60)"}),i.createElement("use",{xlinkHref:"#l",opacity:".27",transform:"rotate(60 60,60)"}),i.createElement("use",{xlinkHref:"#l",opacity:".27",transform:"rotate(90 60,60)"}),i.createElement("use",{xlinkHref:"#l",opacity:".27",transform:"rotate(120 60,60)"}),i.createElement("use",{xlinkHref:"#l",opacity:".27",transform:"rotate(150 60,60)"}),i.createElement("use",{xlinkHref:"#l",opacity:".37",transform:"rotate(180 60,60)"}),i.createElement("use",{xlinkHref:"#l",opacity:".46",transform:"rotate(210 60,60)"}),i.createElement("use",{xlinkHref:"#l",opacity:".56",transform:"rotate(240 60,60)"}),i.createElement("use",{xlinkHref:"#l",opacity:".66",transform:"rotate(270 60,60)"}),i.createElement("use",{xlinkHref:"#l",opacity:".75",transform:"rotate(300 60,60)"}),i.createElement("use",{xlinkHref:"#l",opacity:".85",transform:"rotate(330 60,60)"})))}),null),refresh:i.createElement((function(e){return i.createElement("svg",(0,n.pi)({viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e),i.createElement("path",{d:"M866.133333 573.013333a42.666667 42.666667 0 0 0-53.333333 27.733334A304.64 304.64 0 0 1 519.68 810.666667 302.933333 302.933333 0 0 1 213.333333 512a302.933333 302.933333 0 0 1 306.346667-298.666667 309.76 309.76 0 0 1 198.4 71.253334l-92.586667-15.36a42.666667 42.666667 0 0 0-49.066666 35.413333 42.666667 42.666667 0 0 0 35.413333 49.066667l180.906667 29.866666h7.253333a42.666667 42.666667 0 0 0 14.506667-2.56 14.08 14.08 0 0 0 4.266666-2.56 33.28 33.28 0 0 0 8.533334-4.693333l3.84-4.693333c0-2.133333 3.84-3.84 5.546666-6.4s0-4.266667 2.133334-5.973334a57.173333 57.173333 0 0 0 2.986666-7.68l32-170.666666a42.666667 42.666667 0 0 0-85.333333-16.213334l-11.52 61.866667A392.96 392.96 0 0 0 519.68 128 388.266667 388.266667 0 0 0 128 512a388.266667 388.266667 0 0 0 391.68 384A389.12 389.12 0 0 0 896 626.346667a42.666667 42.666667 0 0 0-29.866667-53.333334z"}))}),null),x:i.createElement((function(e){return i.createElement("svg",(0,n.pi)({viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e),i.createElement("path",{d:"M572.96896 524.6976l217.23136 217.25184a40.96 40.96 0 1 1-57.93792 57.91744L515.072 582.63552l-212.3776 212.3776a40.96 40.96 0 1 1-57.9584-57.91744l212.39808-212.3776-217.21088-217.23136a40.96 40.96 0 1 1 57.91744-57.91744l217.23136 217.21088L737.0752 244.736a40.96 40.96 0 1 1 57.93792 57.91744L572.96896 524.71808z"}))}),null),imageFill:i.createElement((function(e){return i.createElement("svg",(0,n.pi)({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 16 16"},e),i.createElement("path",{d:"M.002 3a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-12a2 2 0 0 1-2-2zm1 9v1a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V9.5l-3.777-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062zm5-6.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0"}))}),null)},k=function(e){var t=e.type,r=(0,n._T)(e,["type"]);return i.createElement(w,(0,n.pi)({},r),x[t])};!function(e){e[e.Default=1]="Default",e[e.Loading=2]="Loading",e[e.Moving=3]="Moving",e[e.Verify=4]="Verify",e[e.Success=5]="Success",e[e.Error=6]="Error",e[e.LoadFailed=7]="LoadFailed"}(b||(b={}));var E,T="".concat(d,"-control"),z=function(e){var t,r=e.status,o=void 0===r?b.Default:r,a=e.isLimitErrors,l=e.tipText,s=e.tipIcon,u=e.sliderButtonProps,d=e.indicatorProps,f=e.controlRef,h=(0,n._T)(e,["status","isLimitErrors","tipText","tipIcon","sliderButtonProps","indicatorProps","controlRef"]),m=(0,i.useRef)(null),v=(0,i.useRef)(null),y=(0,i.useRef)(null),w=(0,i.useRef)({}),x=(0,i.useMemo)((function(){return(0,n.pi)({default:"向右拖动滑块填充拼图",loading:"加载中...",moving:null,verifying:null,success:null,error:null,errors:i.createElement(i.Fragment,null,i.createElement(k,{type:"x",style:{fontSize:20}})," 失败过多,点击重试"),loadFailed:"加载失败,点击重试"},l)}),[l]),E=(0,i.useMemo)((function(){return(0,n.pi)({default:i.createElement(k,{type:"arrowRight"}),loading:i.createElement(k,{type:"loading",spin:!0}),error:i.createElement(k,{type:"x"}),success:i.createElement(k,{type:"check"})},s)}),[s]),z=(0,i.useMemo)((function(){var e;return(e={})[b.Default]=[x.default,E.default],e[b.Loading]=[x.loading,E.default],e[b.Moving]=[x.moving,E.default],e[b.Verify]=[x.verifying,E.loading],e[b.Error]=[x.error,E.error],e[b.Success]=[x.success,E.success],e[b.LoadFailed]=[x.loadFailed,E.default],e}),[x,E]),I=function(e){var t;return(e||"number"!=typeof w.current.sliderButtonWidth)&&(w.current.sliderButtonWidth=(null===(t=v.current)||void 0===t?void 0:t.clientWidth)||40),w.current.sliderButtonWidth},j=function(e){if(e||"number"!=typeof w.current.indicatorBorderWidth)if(y.current){var t=window.getComputedStyle(y.current);w.current.indicatorBorderWidth=parseInt(t.borderLeftWidth)+parseInt(t.borderRightWidth)}else w.current.indicatorBorderWidth=2;return w.current.indicatorBorderWidth},S=function(e){var t;return!e&&w.current.rect||m.current&&(w.current.rect=null===(t=m.current)||void 0===t?void 0:t.getBoundingClientRect()),w.current.rect};(0,i.useImperativeHandle)(f,(function(){return{getSliderButtonWidth:I,getIndicatorBorderWidth:j,getRect:S,updateLeft:function(e){var t=I(),r=j();p(v.current,{left:e+"px"}),p(y.current,{width:e+t+r+"px"})}}}),[]);var O=o===b.Loading,L=o===b.Moving,N=o===b.Verify,R=o===b.Success,P=o===b.Error,M=o===b.LoadFailed,_=a?x.errors:z[o][0];return i.createElement("div",(0,n.pi)({},h,{className:c()(T,(t={},t["".concat(T,"-loading")]=O,t["".concat(T,"-moving")]=L,t["".concat(T,"-verify")]=N,t["".concat(T,"-success")]=R,t["".concat(T,"-error")]=P,t["".concat(T,"-errors")]=a,t["".concat(T,"-load-failed")]=M,t),h.className),ref:m}),i.createElement("div",(0,n.pi)({},d,{className:c()("".concat(T,"-indicator"),null==d?void 0:d.className),ref:y})),i.createElement(g,(0,n.pi)({},u,{className:c()("".concat(T,"-button"),null==u?void 0:u.className),disabled:O,active:L,verify:N,success:R,error:P,ref:v}),z[o][1]),i.createElement("div",{className:c()("".concat(T,"-tips")),style:_?{}:{display:"none"}},_))},I="".concat(d,"-loading"),j=function(e){var t=e.icon,r=void 0===t?i.createElement(k,{type:"loading",spin:!0}):t,o=e.text,a=void 0===o?"加载中...":o,l=e.className,s=(0,n._T)(e,["icon","text","className"]);return i.createElement("div",(0,n.pi)({className:c()(I,l)},s),i.createElement("div",{className:"".concat(I,"-icon")},r),i.createElement("div",{className:"".concat(I,"-text")},a))},S="".concat(d,"-jigsaw"),O={bgSize:{width:320,height:160},puzzleSize:{width:60,left:0},loadFailedIcon:i.createElement(k,{type:"imageFill"}),refreshIcon:i.createElement(k,{type:"refresh"})},L=function(e){var t,r,o=e.status,a=e.bgSize,l=void 0===a?O.bgSize:a,s=e.puzzleSize,u=void 0===s?O.puzzleSize:s,f=e.bgUrl,h=e.puzzleUrl,m=e.bgImgProps,v=e.puzzleImgProps,g=e.jigsawRef,y=e.loadingBoxProps,w=e.loadFailedIcon,x=void 0===w?O.loadFailedIcon:w,k=e.showRefreshIcon,E=void 0===k||k,T=e.refreshIcon,z=void 0===T?O.refreshIcon:T,I=e.disabledRefresh,L=e.onRefresh,N=e.style,R=e.className,P=e.children,M=(0,n._T)(e,["status","bgSize","puzzleSize","bgUrl","puzzleUrl","bgImgProps","puzzleImgProps","jigsawRef","loadingBoxProps","loadFailedIcon","showRefreshIcon","refreshIcon","disabledRefresh","onRefresh","style","className","children"]),_=(0,i.useRef)(null);if((0,i.useImperativeHandle)(g,(function(){return{updateLeft:function(e){p(_.current,{left:e+"px"})}}})),o===b.Loading)return i.createElement(j,(0,n.pi)({},y,{style:(0,n.pi)((0,n.pi)({},null==y?void 0:y.style),l)}));if(o===b.LoadFailed||!f||!h)return i.createElement("div",{className:"".concat(d,"-load-failed"),style:l},x);var C=o===b.Verify||o===b.Error||o===b.Success;return i.createElement("div",(0,n.pi)({className:c()(S,(t={},t["".concat(S,"-stop")]=C,t),R),style:(0,n.pi)((0,n.pi)({},N),l)},M),i.createElement("img",(0,n.pi)({src:f,alt:""},m,{className:c()("".concat(S,"-bg"),null==m?void 0:m.className),style:(0,n.pi)((0,n.pi)({},null==m?void 0:m.style),l)})),i.createElement("img",(0,n.pi)({src:h,alt:""},v,{className:c()("".concat(S,"-puzzle"),null==v?void 0:v.className),style:(0,n.pi)((0,n.pi)({},null==v?void 0:v.style),u),ref:_})),E&&o!==b.Success&&z&&i.createElement("div",{className:c()("".concat(S,"-refresh"),(r={},r["".concat(S,"-refresh-disabled")]=o===b.Verify||I,r)),onClick:function(){o===b.Verify||I||null==L||L()}},z),P)};!function(e){e.Puzzle="puzzle",e.Button="button"}(E||(E={}));var N=h?{start:"touchstart",move:"touchmove",end:"touchend"}:{start:"mousedown",move:"mousemove",end:"mouseup"},R=function(e){var t,r=e.mode,o=void 0===r?"embed":r,a=e.limitErrorCount,v=void 0===a?0:a,g=e.tipText,y=e.tipIcon,w=e.refreshIcon,x=e.bgSize,k=e.puzzleSize,T=e.request,I=e.autoRequest,j=void 0===I||I,S=e.onVerify,R=e.autoRefreshOnError,P=void 0===R||R,M=e.actionRef,_=e.showRefreshIcon,C=void 0===_||_,B=e.jigsawContent,D=e.errorHoldDuration,W=void 0===D?500:D,F=e.loadingDelay,H=void 0===F?0:F,U=e.placement,V=void 0===U?"top":U,A=e.loadingBoxProps,q=e.sliderButtonProps,X=e.precision,K=void 0===X?7:X,Y=e.className,G=e.style,J=e.styles,Z=l(),$=Z[0],Q=Z[1],ee=l(b.Default),te=ee[0],re=ee[1],ne=s(te),oe=(0,i.useRef)(null),ce=(0,i.useRef)(null),ie=(0,i.useRef)(null),ae=(0,i.useMemo)((function(){return"float"===o||"slider"===o?o:"embed"}),[o]),le=(0,i.useMemo)((function(){return void 0!==w?w:void 0!==(null==y?void 0:y.refresh)?y.refresh:void 0}),[w,y]),se=(0,i.useMemo)((function(){return(0,n.pi)((0,n.pi)({},O.bgSize),x)}),[x]),ue=(0,i.useMemo)((function(){return(0,n.pi)((0,n.pi)({},O.puzzleSize),k)}),[k]),de=(0,i.useMemo)((function(){return"bottom"===V?"top":"bottom"}),[V]),fe=(0,i.useRef)({isPressed:!1,trail:[],errorCount:0,startInfo:{x:0,y:0,timestamp:0},currentTargetType:E.Button,floatTransitionTimer:null,floatDelayShowTimer:null,floatDelayHideTimer:null,refreshTimer:null,loadingTimer:null,sliderButtonWidth:40,indicatorBorderWidth:2,ratio:1,buttonMaxDistance:0,puzzleMaxDistance:0}),pe="slider"===ae,he="number"==typeof H&&H>0,me=te===b.Error&&v>0&&fe.current.errorCount>=v,ve=function(){var e;return(null===(e=oe.current)||void 0===e?void 0:e.getRect(!0).height)||42},ge=function(){return(0,n.mG)(void 0,void 0,void 0,(function(){var e;return(0,n.Jh)(this,(function(t){switch(t.label){case 0:if(pe)return[2];if(!T)return[3,4];he?fe.current.loadingTimer=setTimeout((function(){re(b.Loading)}),H):re(b.Loading),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,T()];case 2:return e=t.sent(),he&&clearTimeout(fe.current.loadingTimer),Q(e),re(b.Default),[3,4];case 3:return t.sent(),he&&clearTimeout(fe.current.loadingTimer),re(b.LoadFailed),[3,4];case 4:return[2]}}))}))},be=function(e){void 0===e&&(e=300),"float"===ae&&ne.current!==b.Success&&(clearTimeout(fe.current.floatTransitionTimer),clearTimeout(fe.current.floatDelayHideTimer),clearTimeout(fe.current.floatDelayShowTimer),fe.current.floatDelayShowTimer=setTimeout((function(){var e,t;p(ie.current,{display:"block"}),null==(t=ie.current)||t.scrollTop;var r=ve()+"px";p(ie.current,((e={})[de]=r,e.opacity="1",e))}),e))},ye=function(e){void 0===e&&(e=300),"float"===ae&&(clearTimeout(fe.current.floatTransitionTimer),clearTimeout(fe.current.floatDelayHideTimer),clearTimeout(fe.current.floatDelayShowTimer),fe.current.floatDelayHideTimer=setTimeout((function(){var e,t=ve()/2+"px";p(ie.current,((e={})[de]=t,e.opacity="0",e)),fe.current.floatTransitionTimer=setTimeout((function(){p(ie.current,{display:"none"})}),300)}),e))},we=function(e){var t;pe||null===(t=ce.current)||void 0===t||t.updateLeft(e)},xe=function(){var e;fe.current.isPressed=!1,re(b.Default),null===(e=oe.current)||void 0===e||e.updateLeft(0),we(ue.left)},ke=function(e){void 0===e&&(e=!1),e&&(fe.current.errorCount=0),clearTimeout(fe.current.refreshTimer),ne.current!==b.Loading&&(xe(),ge())},Ee=function(e){fe.current.currentTargetType=E.Puzzle,ze(e)},Te=function(e){fe.current.currentTargetType=E.Button,ze(e)},ze=function(e){if(ne.current===b.Default){e.preventDefault();var t=f(e),r=t.clientX,n=t.clientY;fe.current.startInfo={x:r,y:n,timestamp:(new Date).getTime()},fe.current.trail=[[r,n]],oe.current&&(fe.current.sliderButtonWidth=oe.current.getSliderButtonWidth(!0),fe.current.indicatorBorderWidth=oe.current.getIndicatorBorderWidth(!0)),fe.current.buttonMaxDistance=se.width-fe.current.sliderButtonWidth-fe.current.indicatorBorderWidth,fe.current.puzzleMaxDistance=se.width-ue.width-ue.left,fe.current.ratio=fe.current.puzzleMaxDistance/fe.current.buttonMaxDistance,fe.current.currentTargetType===E.Puzzle&&(fe.current.ratio=1/fe.current.ratio),h&&be(0),fe.current.isPressed=!0,document.addEventListener(N.move,Ie),document.addEventListener(N.end,je),document.addEventListener("touchcancel",je)}},Ie=function(e){var t;if(fe.current.isPressed){e.preventDefault();var r=f(e),n=r.clientX,o=r.clientY,c=n-fe.current.startInfo.x;fe.current.trail.push([n,o]),ne.current!==b.Moving&&c>0&&re(b.Moving);var i=c,a=c;fe.current.currentTargetType===E.Puzzle?(i=(c=Math.max(0,Math.min(c,fe.current.puzzleMaxDistance)))+ue.left,a=c*fe.current.ratio):(a=c=Math.max(0,Math.min(c,fe.current.buttonMaxDistance)),i=c*fe.current.ratio+ue.left),null===(t=oe.current)||void 0===t||t.updateLeft(a),we(i)}},je=function(e){if(document.removeEventListener(N.move,Ie),document.removeEventListener(N.end,je),document.removeEventListener("touchcancel",je),fe.current.isPressed){if(ne.current!==b.Moving)return fe.current.isPressed=!1,void(h&&ye());if(S){fe.current.isPressed=!1,re(b.Verify);var t=(new Date).getTime(),r=f(e),n=r.clientX,o=r.clientY-fe.current.startInfo.y,c=n-fe.current.startInfo.x,i=c;fe.current.currentTargetType===E.Puzzle?i=(c=Math.max(0,Math.min(c,fe.current.puzzleMaxDistance)))*fe.current.ratio:(i=c=Math.max(0,Math.min(c,fe.current.buttonMaxDistance)),c*=fe.current.ratio),S({x:m(c,K),y:m(o,K),sliderOffsetX:m(i,K),duration:t-fe.current.startInfo.timestamp,trail:fe.current.trail,targetType:fe.current.currentTargetType,errorCount:fe.current.errorCount}).then((function(){fe.current.errorCount=0,re(b.Success),ye()})).catch((function(){fe.current.errorCount+=1,re(b.Error),h&&ye(),(v<=0||fe.current.errorCount<v)&&P&&(fe.current.refreshTimer=setTimeout((function(){ke()}),W))}))}else xe()}};return u((function(){j&&ge()})),(0,i.useImperativeHandle)(M,(function(){return{refresh:ke,get status(){return ne.current}}})),i.createElement("div",{className:c()(d,Y,"".concat(d,"-").concat(ae),(t={},t["".concat(d,"-").concat(ae,"-").concat(V)]="float"===ae,t)),style:(0,n.pi)({width:se.width},G),onMouseEnter:function(){h||be()},onMouseLeave:function(){h||ye()}},!pe&&i.createElement("div",{className:"".concat(d,"-panel"),ref:ie},i.createElement("div",{className:"".concat(d,"-panel-inner"),style:(0,n.pi)((0,n.pi)({},null==J?void 0:J.panel),{height:se.height})},i.createElement(L,{status:te,bgSize:se,puzzleSize:ue,bgUrl:null==$?void 0:$.bgUrl,puzzleUrl:null==$?void 0:$.puzzleUrl,jigsawRef:ce,loadingBoxProps:A,loadFailedIcon:null==y?void 0:y.loadFailed,showRefreshIcon:C,refreshIcon:le,disabledRefresh:me,onRefresh:ke,style:null==J?void 0:J.jigsaw,bgImgProps:{style:null==J?void 0:J.bgImg},puzzleImgProps:{style:null==J?void 0:J.puzzleImg,onTouchStart:Ee,onMouseDown:Ee}},B))),i.createElement(z,{status:te,isLimitErrors:me,tipText:g,tipIcon:y,style:null==J?void 0:J.control,onClick:function(){(me||te===b.LoadFailed)&&ke(me)},indicatorProps:{style:null==J?void 0:J.indicator},sliderButtonProps:(0,n.pi)((0,n.pi)({},q),{onTouchStart:Te,onMouseDown:Te}),controlRef:oe}))}},80813:function(e,t,r){r.d(t,{CR:function(){return u},Jh:function(){return l},Q_:function(){return p},XA:function(){return s},ZT:function(){return o},_T:function(){return i},ev:function(){return f},mG:function(){return a},pi:function(){return c},pr:function(){return d}});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c.apply(this,arguments)};function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function a(e,t,r,n){return new(r||(r=Promise))((function(o,c){function i(e){try{l(n.next(e))}catch(e){c(e)}}function a(e){try{l(n.throw(e))}catch(e){c(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}l((n=n.apply(e,t||[])).next())}))}function l(e,t){var r,n,o,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(c=0)),c;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return c.label++,{value:a[1],done:!1};case 5:c.label++,n=a[1],a=[0];continue;case 7:a=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){c=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){c.label=a[1];break}if(6===a[0]&&c.label<o[1]){c.label=o[1],o=a;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(a);break}o[2]&&c.ops.pop(),c.trys.pop();continue}a=t.call(e,c)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}Object.create;function s(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,c=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=c.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=c.return)&&r.call(c)}finally{if(o)throw o.error}}return i}function d(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var c=arguments[t],i=0,a=c.length;i<a;i++,o++)n[o]=c[i];return n}function f(e,t,r){if(r||2===arguments.length)for(var n,o=0,c=t.length;o<c;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}Object.create;function p(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}"function"==typeof SuppressedError&&SuppressedError}}]);