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.
1 line
47 KiB
1 line
47 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[68355],{99003: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})),P=O?URL.revokeObjectURL:function(){};var R=[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,P;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,P=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:P};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!==R.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&&P(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,P=t.cacheImage,R=void 0===P||P,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=R?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 P="number"!=typeof l&&l?l:K(l),R="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:P,margin:v}),d.fillStyle=a,d.fill(),d.globalCompositeOperation="destination-over",d.drawImage(o,R[0],R[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:P,margin:v}),m.globalCompositeOperation="destination-over",m.clip(),m.drawImage(o,R[0],R[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)}))}},32635:function(e,t,r){r.d(t,{ZP:function(){return _}});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,m=h&&"onpointerdown"in window,v=h&&"ontouchstart"in window;function g(e,t){return"number"==typeof e&&!Number.isNaN(e)&&"number"==typeof t&&t>0?Number(e.toFixed(t)):e}var b="".concat(d,"-button"),y=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()(b,o,(r={},r["".concat(b,"-disabled")]=a,r["".concat(b,"-active")]=l,r["".concat(b,"-verify")]=d,r["".concat(b,"-success")]=s,r["".concat(b,"-error")]=u,r["".concat(b,"-pc")]=!v,r)),ref:t},f))}));y.displayName="SliderButton";var w,x="".concat(d,"-icon"),k=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()(x,(t={},t["".concat(x,"-spin")]=o,t),r)},a))},E={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)},T=function(e){var t=e.type,r=(0,n._T)(e,["type"]);return i.createElement(k,(0,n.pi)({},r),E[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"}(w||(w={}));var z,I="".concat(d,"-control"),j=function(e){var t,r=e.status,o=void 0===r?w.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),g=(0,i.useRef)(null),b=(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(T,{type:"x",style:{fontSize:20}})," 失败过多,点击重试"),loadFailed:"加载失败,点击重试"},l)}),[l]),k=(0,i.useMemo)((function(){return(0,n.pi)({default:i.createElement(T,{type:"arrowRight"}),loading:i.createElement(T,{type:"loading",spin:!0}),error:i.createElement(T,{type:"x"}),success:i.createElement(T,{type:"check"})},s)}),[s]),E=(0,i.useMemo)((function(){var e;return(e={})[w.Default]=[x.default,k.default],e[w.Loading]=[x.loading,k.default],e[w.Moving]=[x.moving,k.default],e[w.Verify]=[x.verifying,k.loading],e[w.Error]=[x.error,k.error],e[w.Success]=[x.success,k.success],e[w.LoadFailed]=[x.loadFailed,k.default],e}),[x,k]),z=function(e){var t;return(e||"number"!=typeof b.current.sliderButtonWidth)&&(b.current.sliderButtonWidth=(null===(t=v.current)||void 0===t?void 0:t.clientWidth)||40),b.current.sliderButtonWidth},j=function(e){if(e||"number"!=typeof b.current.indicatorBorderWidth)if(g.current){var t=window.getComputedStyle(g.current);b.current.indicatorBorderWidth=parseInt(t.borderLeftWidth)+parseInt(t.borderRightWidth)}else b.current.indicatorBorderWidth=2;return b.current.indicatorBorderWidth},S=function(e){var t;return!e&&b.current.rect||m.current&&(b.current.rect=null===(t=m.current)||void 0===t?void 0:t.getBoundingClientRect()),b.current.rect};(0,i.useImperativeHandle)(f,(function(){return{getSliderButtonWidth:z,getIndicatorBorderWidth:j,getRect:S,updateLeft:function(e){var t=z(),r=j();p(v.current,{left:e+"px"}),p(g.current,{width:e+t+r+"px"})}}}),[]);var O=o===w.Loading,L=o===w.Moving,N=o===w.Verify,P=o===w.Success,R=o===w.Error,M=o===w.LoadFailed,_=a?x.errors:E[o][0];return i.createElement("div",(0,n.pi)({},h,{className:c()(I,(t={},t["".concat(I,"-loading")]=O,t["".concat(I,"-moving")]=L,t["".concat(I,"-verify")]=N,t["".concat(I,"-success")]=P,t["".concat(I,"-error")]=R,t["".concat(I,"-errors")]=a,t["".concat(I,"-load-failed")]=M,t),h.className),ref:m}),i.createElement("div",(0,n.pi)({},d,{className:c()("".concat(I,"-indicator"),null==d?void 0:d.className),ref:g})),i.createElement(y,(0,n.pi)({},u,{className:c()("".concat(I,"-button"),null==u?void 0:u.className),disabled:O,active:L,verify:N,success:P,error:R,ref:v}),E[o][1]),i.createElement("div",{className:c()("".concat(I,"-tips")),style:_?{}:{display:"none"}},_))},S="".concat(d,"-loading"),O=function(e){var t=e.icon,r=void 0===t?i.createElement(T,{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()(S,l)},s),i.createElement("div",{className:"".concat(S,"-icon")},r),i.createElement("div",{className:"".concat(S,"-text")},a))},L="".concat(d,"-jigsaw"),N={bgSize:{width:320,height:160},puzzleSize:{width:60,left:0},loadFailedIcon:i.createElement(T,{type:"imageFill"}),refreshIcon:i.createElement(T,{type:"refresh"})},P=function(e){var t,r,o=e.status,a=e.bgSize,l=void 0===a?N.bgSize:a,s=e.puzzleSize,u=void 0===s?N.puzzleSize:s,f=e.bgUrl,h=e.puzzleUrl,m=e.bgImgProps,v=e.puzzleImgProps,g=e.jigsawRef,b=e.loadingBoxProps,y=e.loadFailedIcon,x=void 0===y?N.loadFailedIcon:y,k=e.showRefreshIcon,E=void 0===k||k,T=e.refreshIcon,z=void 0===T?N.refreshIcon:T,I=e.disabledRefresh,j=e.onRefresh,S=e.style,P=e.className,R=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===w.Loading)return i.createElement(O,(0,n.pi)({},b,{style:(0,n.pi)((0,n.pi)({},null==b?void 0:b.style),l)}));if(o===w.LoadFailed||!f||!h)return i.createElement("div",{className:"".concat(d,"-load-failed"),style:l},x);var C=o===w.Verify||o===w.Error||o===w.Success;return i.createElement("div",(0,n.pi)({className:c()(L,(t={},t["".concat(L,"-stop")]=C,t),P),style:(0,n.pi)((0,n.pi)({},S),l)},M),i.createElement("img",(0,n.pi)({src:f,alt:""},m,{className:c()("".concat(L,"-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(L,"-puzzle"),null==v?void 0:v.className),style:(0,n.pi)((0,n.pi)({},null==v?void 0:v.style),u),ref:_})),E&&o!==w.Success&&z&&i.createElement("div",{className:c()("".concat(L,"-refresh"),(r={},r["".concat(L,"-refresh-disabled")]=o===w.Verify||I,r)),onClick:function(){o===w.Verify||I||null==j||j()}},z),R)},R=m?{start:"pointerdown",move:"pointermove",end:"pointerup",cancel:"pointercancel"}:v?{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}:{start:"mousedown",move:"mousemove",end:"mouseup",cancel:"touchcancel"},M=m?"onPointerDown":v?"onTouchStart":"onMouseDown";!function(e){e.Puzzle="puzzle",e.Button="button"}(z||(z={}));var _=function(e){var t,r,o,a=e.mode,h=void 0===a?"embed":a,m=e.limitErrorCount,b=void 0===m?0:m,y=e.tipText,x=e.tipIcon,k=e.refreshIcon,E=e.bgSize,T=e.puzzleSize,I=e.request,S=e.autoRequest,O=void 0===S||S,L=e.onVerify,_=e.autoRefreshOnError,C=void 0===_||_,B=e.actionRef,D=e.showRefreshIcon,W=void 0===D||D,F=e.jigsawContent,H=e.errorHoldDuration,U=void 0===H?500:H,V=e.loadingDelay,A=void 0===V?0:V,q=e.placement,X=void 0===q?"top":q,K=e.loadingBoxProps,Y=e.sliderButtonProps,G=e.precision,J=void 0===G?7:G,Z=e.className,$=e.style,Q=e.styles,ee=l(),te=ee[0],re=ee[1],ne=l(w.Default),oe=ne[0],ce=ne[1],ie=s(oe),ae=(0,i.useRef)(null),le=(0,i.useRef)(null),se=(0,i.useRef)(null),ue=(0,i.useMemo)((function(){return"float"===h||"slider"===h?h:"embed"}),[h]),de=(0,i.useMemo)((function(){return void 0!==k?k:void 0!==(null==x?void 0:x.refresh)?x.refresh:void 0}),[k,x]),fe=(0,i.useMemo)((function(){return(0,n.pi)((0,n.pi)({},N.bgSize),E)}),[E]),pe=(0,i.useMemo)((function(){return(0,n.pi)((0,n.pi)({},N.puzzleSize),T)}),[T]),he=(0,i.useMemo)((function(){return"bottom"===X?"top":"bottom"}),[X]),me=(0,i.useRef)({isPressed:!1,trail:[],errorCount:0,startInfo:{x:0,y:0,timestamp:0},currentTargetType:z.Button,floatTransitionTimer:null,floatDelayShowTimer:null,floatDelayHideTimer:null,refreshTimer:null,loadingTimer:null,sliderButtonWidth:40,indicatorBorderWidth:2,ratio:1,buttonMaxDistance:0,puzzleMaxDistance:0}),ve="slider"===ue,ge="number"==typeof A&&A>0,be=oe===w.Error&&b>0&&me.current.errorCount>=b,ye=function(){var e;return(null===(e=ae.current)||void 0===e?void 0:e.getRect(!0).height)||42},we=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(ve)return[2];if(!I)return[3,4];ge?me.current.loadingTimer=setTimeout((function(){ce(w.Loading)}),A):ce(w.Loading),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,I()];case 2:return e=t.sent(),ge&&clearTimeout(me.current.loadingTimer),re(e),ce(w.Default),[3,4];case 3:return t.sent(),ge&&clearTimeout(me.current.loadingTimer),ce(w.LoadFailed),[3,4];case 4:return[2]}}))}))},xe=function(e){void 0===e&&(e=300),"float"===ue&&ie.current!==w.Success&&(clearTimeout(me.current.floatTransitionTimer),clearTimeout(me.current.floatDelayHideTimer),clearTimeout(me.current.floatDelayShowTimer),me.current.floatDelayShowTimer=setTimeout((function(){var e,t;p(se.current,{display:"block"}),null==(t=se.current)||t.scrollTop;var r=ye()+"px";p(se.current,((e={})[he]=r,e.opacity="1",e))}),e))},ke=function(e){void 0===e&&(e=300),"float"===ue&&(clearTimeout(me.current.floatTransitionTimer),clearTimeout(me.current.floatDelayHideTimer),clearTimeout(me.current.floatDelayShowTimer),me.current.floatDelayHideTimer=setTimeout((function(){var e,t=ye()/2+"px";p(se.current,((e={})[he]=t,e.opacity="0",e)),me.current.floatTransitionTimer=setTimeout((function(){p(se.current,{display:"none"})}),300)}),e))},Ee=function(e){var t;ve||null===(t=le.current)||void 0===t||t.updateLeft(e)},Te=function(){var e;me.current.isPressed=!1,ce(w.Default),null===(e=ae.current)||void 0===e||e.updateLeft(0),Ee(pe.left)},ze=function(e){void 0===e&&(e=!1),e&&(me.current.errorCount=0),clearTimeout(me.current.refreshTimer),ie.current!==w.Loading&&(Te(),we())},Ie=function(e){if(ie.current===w.Default){e.preventDefault();var t=f(e),r=t.clientX,n=t.clientY;me.current.startInfo={x:r,y:n,timestamp:(new Date).getTime()},me.current.trail=[[r,n]],ae.current&&(me.current.sliderButtonWidth=ae.current.getSliderButtonWidth(!0),me.current.indicatorBorderWidth=ae.current.getIndicatorBorderWidth(!0)),me.current.buttonMaxDistance=fe.width-me.current.sliderButtonWidth-me.current.indicatorBorderWidth,me.current.puzzleMaxDistance=fe.width-pe.width-pe.left,me.current.ratio=me.current.puzzleMaxDistance/me.current.buttonMaxDistance,me.current.currentTargetType===z.Puzzle&&(me.current.ratio=1/me.current.ratio),v&&xe(0),me.current.isPressed=!0,document.addEventListener(R.move,je),document.addEventListener(R.end,Se),document.addEventListener(R.cancel,Se)}},je=function(e){var t;if(me.current.isPressed){e.preventDefault();var r=f(e),n=r.clientX,o=r.clientY,c=n-me.current.startInfo.x;me.current.trail.push([n,o]),ie.current!==w.Moving&&c>0&&ce(w.Moving);var i=c,a=c;me.current.currentTargetType===z.Puzzle?(i=(c=Math.max(0,Math.min(c,me.current.puzzleMaxDistance)))+pe.left,a=c*me.current.ratio):(a=c=Math.max(0,Math.min(c,me.current.buttonMaxDistance)),i=c*me.current.ratio+pe.left),null===(t=ae.current)||void 0===t||t.updateLeft(a),Ee(i)}},Se=function(e){if(document.removeEventListener(R.move,je),document.removeEventListener(R.end,Se),document.removeEventListener(R.cancel,Se),me.current.isPressed){if(ie.current!==w.Moving)return me.current.isPressed=!1,void(v&&ke());if(L){me.current.isPressed=!1,ce(w.Verify);var t=(new Date).getTime(),r=f(e),n=r.clientX,o=r.clientY-me.current.startInfo.y,c=n-me.current.startInfo.x,i=c;me.current.currentTargetType===z.Puzzle?i=(c=Math.max(0,Math.min(c,me.current.puzzleMaxDistance)))*me.current.ratio:(i=c=Math.max(0,Math.min(c,me.current.buttonMaxDistance)),c*=me.current.ratio),L({x:g(c,J),y:g(o,J),sliderOffsetX:g(i,J),duration:t-me.current.startInfo.timestamp,trail:me.current.trail,targetType:me.current.currentTargetType,errorCount:me.current.errorCount}).then((function(){me.current.errorCount=0,ce(w.Success),ke()})).catch((function(){me.current.errorCount+=1,ce(w.Error),v&&ke(),(b<=0||me.current.errorCount<b)&&C&&(me.current.refreshTimer=setTimeout((function(){ze()}),U))}))}else Te()}};return u((function(){O&&we()})),(0,i.useImperativeHandle)(B,(function(){return{refresh:ze,get status(){return ie.current}}})),i.createElement("div",{className:c()(d,Z,"".concat(d,"-").concat(ue),(t={},t["".concat(d,"-").concat(ue,"-").concat(X)]="float"===ue,t)),style:(0,n.pi)({width:fe.width},$),onMouseEnter:function(){v||xe()},onMouseLeave:function(){v||ke()}},!ve&&i.createElement("div",{className:"".concat(d,"-panel"),ref:se},i.createElement("div",{className:"".concat(d,"-panel-inner"),style:(0,n.pi)((0,n.pi)({},null==Q?void 0:Q.panel),{height:fe.height})},i.createElement(P,{status:oe,bgSize:fe,puzzleSize:pe,bgUrl:null==te?void 0:te.bgUrl,puzzleUrl:null==te?void 0:te.puzzleUrl,jigsawRef:le,loadingBoxProps:K,loadFailedIcon:null==x?void 0:x.loadFailed,showRefreshIcon:W,refreshIcon:de,disabledRefresh:be,onRefresh:ze,style:null==Q?void 0:Q.jigsaw,bgImgProps:{style:null==Q?void 0:Q.bgImg},puzzleImgProps:(r={style:null==Q?void 0:Q.puzzleImg},r[M]=function(e){me.current.currentTargetType=z.Puzzle,Ie(e)},r)},F))),i.createElement(j,{status:oe,isLimitErrors:be,tipText:y,tipIcon:x,style:null==Q?void 0:Q.control,onClick:function(){(be||oe===w.LoadFailed)&&ze(be)},indicatorProps:{style:null==Q?void 0:Q.indicator},sliderButtonProps:(0,n.pi)((0,n.pi)({},Y),(o={},o[M]=function(e){me.current.currentTargetType=z.Button,Ie(e)},o)),controlRef:ae}))}},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}}]); |