feffery_utils_components 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESCRIPTION +1 -1
- package/Project.toml +1 -1
- package/README-en_US.md +1 -1
- package/README.md +1 -1
- package/feffery_utils_components/FefferyDPlayer.py +11 -7
- package/feffery_utils_components/async-feffery_animated_3d_background_p5.js +1 -1
- package/feffery_utils_components/async-feffery_animated_3d_background_three.js +1 -1
- package/feffery_utils_components/async-feffery_animated_image.js +1 -1
- package/feffery_utils_components/async-feffery_animated_image.js.LICENSE.txt +1 -1
- package/feffery_utils_components/async-feffery_aplayer.js +1 -1
- package/feffery_utils_components/async-feffery_auto_animate.js +1 -1
- package/feffery_utils_components/async-feffery_auto_fit.js +1 -1
- package/feffery_utils_components/async-feffery_auto_fit.js.LICENSE.txt +1 -1
- package/feffery_utils_components/async-feffery_barcode.js +1 -1
- package/feffery_utils_components/async-feffery_burger.js +1 -1
- package/feffery_utils_components/async-feffery_captcha.js +1 -1
- package/feffery_utils_components/async-feffery_color_pickers.js +1 -1
- package/feffery_utils_components/async-feffery_dom2image.js +1 -1
- package/feffery_utils_components/async-feffery_dom2image.js.LICENSE.txt +1 -1
- package/feffery_utils_components/async-feffery_dplayer.js +1 -1
- package/feffery_utils_components/async-feffery_emoji_picker.js +1 -1
- package/feffery_utils_components/async-feffery_emoji_picker.js.LICENSE.txt +1 -1
- package/feffery_utils_components/async-feffery_excel_preview.js +1 -1
- package/feffery_utils_components/async-feffery_extra_spinner.js +1 -1
- package/feffery_utils_components/async-feffery_fancy_button.js +1 -1
- package/feffery_utils_components/async-feffery_grid.js +1 -1
- package/feffery_utils_components/async-feffery_http_requests.js +1 -1
- package/feffery_utils_components/async-feffery_http_requests.js.LICENSE.txt +1 -1
- package/feffery_utils_components/async-feffery_image_cropper.js +1 -1
- package/feffery_utils_components/async-feffery_json_viewer.js +1 -1
- package/feffery_utils_components/async-feffery_local_large_storage.js +1 -1
- package/feffery_utils_components/async-feffery_local_large_storage.js.LICENSE.txt +1 -1
- package/feffery_utils_components/async-feffery_markdown_editor.js +1 -1
- package/feffery_utils_components/async-feffery_motion.js +1 -1
- package/feffery_utils_components/async-feffery_music_player.js +1 -1
- package/feffery_utils_components/async-feffery_photo_sphere_viewer.js +1 -1
- package/feffery_utils_components/async-feffery_photo_sphere_viewer.js.LICENSE.txt +4 -2
- package/feffery_utils_components/async-feffery_resizable.js +1 -1
- package/feffery_utils_components/async-feffery_rich_text_editor.js +1 -1
- package/feffery_utils_components/async-feffery_rnd.js +1 -1
- package/feffery_utils_components/async-feffery_seamless_scroll.js +1 -1
- package/feffery_utils_components/async-feffery_shortcut_panel.js +2 -2
- package/feffery_utils_components/async-feffery_slider_captcha.js +1 -1
- package/feffery_utils_components/async-feffery_slider_captcha.js.LICENSE.txt +1 -1
- package/feffery_utils_components/async-feffery_sortable.js +1 -1
- package/feffery_utils_components/async-feffery_vditor.js +1 -1
- package/feffery_utils_components/async-feffery_vditor.js.LICENSE.txt +1 -1
- package/feffery_utils_components/async-feffery_word_preview.js +1 -1
- package/feffery_utils_components/async-fuc-shared.js +1 -1
- package/feffery_utils_components/feffery_utils_components.min.js +8 -8
- package/feffery_utils_components/feffery_utils_components.min.js.LICENSE.txt +1 -1
- package/feffery_utils_components/metadata.json +1 -1
- package/feffery_utils_components/package-info.json +2 -2
- package/package.json +2 -2
- package/webpack.config.js +1 -0
- package/.vscode/settings.json +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! For license information please see async-feffery_slider_captcha.js.LICENSE.txt */
|
|
2
|
-
(window.webpackJsonpfeffery_utils_components=window.webpackJsonpfeffery_utils_components||[]).push([[31],{554:function(e,t,r){"use strict";r.r(t);var n=r(1),o=r.n(n),c=r(2),a=r(48),i=r.n(a),s=function(){var e=Object(n.useRef)(!1);return Object(n.useEffect)((function(){return e.current=!1,function(){e.current=!0}}),[]),e};var l=function(e){var t=s(),r=Object(c.f)(Object(n.useState)(e),2),o=r[0],a=r[1];return[o,Object(n.useCallback)((function(e){t.current||a(e)}),[])]};var u=function(e){var t=Object(n.useRef)(e);return t.current=e,t},f=function(e){Object(n.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 h(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 m="object"==typeof window&&window&&"object"==typeof document&&document&&window.document===document&&!!document.addEventListener,v=m&&"onpointerdown"in window,g=m&&"ontouchstart"in window;function b(e,t){return"number"==typeof e&&!Number.isNaN(e)&&"number"==typeof t&&t>0?Number(e.toFixed(t)):e}var y="".concat(d,"-button"),w=function(e){var t,r=e.className,n=e.disabled,a=e.active,s=e.success,l=e.error,u=e.verify,f=e.buttonRef,d=Object(c.g)(e,["className","disabled","active","success","error","verify","buttonRef"]);return o.a.createElement("span",Object(c.a)({className:i()(y,r,(t={},t["".concat(y,"-disabled")]=n,t["".concat(y,"-active")]=a,t["".concat(y,"-verify")]=u,t["".concat(y,"-success")]=s,t["".concat(y,"-error")]=l,t["".concat(y,"-pc")]=!g,t)),ref:f},d))};w.displayName="SliderButton";var x,j="".concat(d,"-icon"),O=function(e){var t,r=e.className,n=e.spin,a=Object(c.g)(e,["className","spin"]);return o.a.createElement("span",Object(c.a)({className:i()(j,(t={},t["".concat(j,"-spin")]=n,t),r)},a))},k={arrowRight:o.a.createElement((function(e){return o.a.createElement("svg",Object(c.a)({viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e),o.a.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"}),o.a.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:o.a.createElement((function(e){return o.a.createElement("svg",Object(c.a)({viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e),o.a.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:o.a.createElement((function(e){return o.a.createElement("svg",Object(c.a)({viewBox:"0 0 120 120",width:"1em",height:"1em"},e),o.a.createElement("defs",null,o.a.createElement("line",{id:"l",x1:"60",x2:"60",y1:"7",y2:"27",stroke:"currentColor",strokeWidth:"11",strokeLinecap:"round"})),o.a.createElement("g",null,o.a.createElement("use",{xlinkHref:"#l",opacity:".27"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".27",transform:"rotate(30 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".27",transform:"rotate(60 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".27",transform:"rotate(90 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".27",transform:"rotate(120 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".27",transform:"rotate(150 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".37",transform:"rotate(180 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".46",transform:"rotate(210 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".56",transform:"rotate(240 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".66",transform:"rotate(270 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".75",transform:"rotate(300 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".85",transform:"rotate(330 60,60)"})))}),null),refresh:o.a.createElement((function(e){return o.a.createElement("svg",Object(c.a)({viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e),o.a.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:o.a.createElement((function(e){return o.a.createElement("svg",Object(c.a)({viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e),o.a.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:o.a.createElement((function(e){return o.a.createElement("svg",Object(c.a)({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 16 16"},e),o.a.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)},E=function(e){var t=e.type,r=Object(c.g)(e,["type"]);return o.a.createElement(O,Object(c.a)({},r),k[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"}(x||(x={}));var T,z="".concat(d,"-control"),L=function(e){var t,r=e.status,a=void 0===r?x.Default:r,s=e.isLimitErrors,l=e.tipText,u=e.tipIcon,f=e.sliderButtonProps,d=e.indicatorProps,h=e.controlRef,m=Object(c.g)(e,["status","isLimitErrors","tipText","tipIcon","sliderButtonProps","indicatorProps","controlRef"]),v=Object(n.useRef)(null),g=Object(n.useRef)(null),b=Object(n.useRef)(null),y=Object(n.useRef)({}),j=Object(n.useMemo)((function(){return Object(c.a)({default:"向右拖动滑块填充拼图",loading:"加载中...",moving:null,verifying:null,success:null,error:null,errors:o.a.createElement(o.a.Fragment,null,o.a.createElement(E,{type:"x",style:{fontSize:20}})," 失败过多,点击重试"),loadFailed:"加载失败,点击重试"},l)}),[l]),O=Object(n.useMemo)((function(){return Object(c.a)({default:o.a.createElement(E,{type:"arrowRight"}),loading:o.a.createElement(E,{type:"loading",spin:!0}),error:o.a.createElement(E,{type:"x"}),success:o.a.createElement(E,{type:"check"})},u)}),[u]),k=Object(n.useMemo)((function(){var e;return(e={})[x.Default]=[j.default,O.default],e[x.Loading]=[j.loading,O.default],e[x.Moving]=[j.moving,O.default],e[x.Verify]=[j.verifying,O.loading],e[x.Error]=[j.error,O.error],e[x.Success]=[j.success,O.success],e[x.LoadFailed]=[j.loadFailed,O.default],e}),[j,O]),T=function(e){var t;return(e||"number"!=typeof y.current.sliderButtonWidth)&&(y.current.sliderButtonWidth=(null===(t=g.current)||void 0===t?void 0:t.clientWidth)||40),y.current.sliderButtonWidth},L=function(e){if(e||"number"!=typeof y.current.indicatorBorderWidth)if(b.current){var t=window.getComputedStyle(b.current);y.current.indicatorBorderWidth=parseInt(t.borderLeftWidth)+parseInt(t.borderRightWidth)}else y.current.indicatorBorderWidth=2;return y.current.indicatorBorderWidth},I=function(e){var t;return!e&&y.current.rect||v.current&&(y.current.rect=null===(t=v.current)||void 0===t?void 0:t.getBoundingClientRect()),y.current.rect};Object(n.useImperativeHandle)(h,(function(){return{getSliderButtonWidth:T,getIndicatorBorderWidth:L,getRect:I,updateLeft:function(e){var t=T(),r=L();p(g.current,{left:e+"px"}),p(b.current,{width:e+t+r+"px"})}}}),[]);var S=a===x.Loading,R=a===x.Moving,N=a===x.Verify,P=a===x.Success,_=a===x.Error,M=a===x.LoadFailed,C=s?j.errors:k[a][0];return o.a.createElement("div",Object(c.a)({},m,{className:i()(z,(t={},t["".concat(z,"-loading")]=S,t["".concat(z,"-moving")]=R,t["".concat(z,"-verify")]=N,t["".concat(z,"-success")]=P,t["".concat(z,"-error")]=_,t["".concat(z,"-errors")]=s,t["".concat(z,"-load-failed")]=M,t),m.className),ref:v}),o.a.createElement("div",Object(c.a)({},d,{className:i()("".concat(z,"-indicator"),null==d?void 0:d.className),ref:b})),o.a.createElement(w,Object(c.a)({},f,{className:i()("".concat(z,"-button"),null==f?void 0:f.className),disabled:S,active:R,verify:N,success:P,error:_,buttonRef:g}),k[a][1]),o.a.createElement("div",{className:i()("".concat(z,"-tips")),style:C?{}:{display:"none"}},C))},I="".concat(d,"-loading"),S=function(e){var t=e.icon,r=void 0===t?o.a.createElement(E,{type:"loading",spin:!0}):t,n=e.text,a=void 0===n?"加载中...":n,s=e.className,l=Object(c.g)(e,["icon","text","className"]);return o.a.createElement("div",Object(c.a)({className:i()(I,s)},l),o.a.createElement("div",{className:"".concat(I,"-icon")},r),o.a.createElement("div",{className:"".concat(I,"-text")},a))},R="".concat(d,"-jigsaw"),N={bgSize:{width:320,height:160},puzzleSize:{width:60,left:0},loadFailedIcon:o.a.createElement(E,{type:"imageFill"}),refreshIcon:o.a.createElement(E,{type:"refresh"})},P=function(e){var t,r,a=e.status,s=e.bgSize,l=void 0===s?N.bgSize:s,u=e.puzzleSize,f=void 0===u?N.puzzleSize:u,h=e.bgUrl,m=e.puzzleUrl,v=e.bgImgProps,g=e.puzzleImgProps,b=e.jigsawRef,y=e.loadingBoxProps,w=e.loadFailedIcon,j=void 0===w?N.loadFailedIcon:w,O=e.showRefreshIcon,k=void 0===O||O,E=e.refreshIcon,T=void 0===E?N.refreshIcon:E,z=e.disabledRefresh,L=e.onRefresh,I=e.style,P=e.className,_=e.children,M=Object(c.g)(e,["status","bgSize","puzzleSize","bgUrl","puzzleUrl","bgImgProps","puzzleImgProps","jigsawRef","loadingBoxProps","loadFailedIcon","showRefreshIcon","refreshIcon","disabledRefresh","onRefresh","style","className","children"]),C=Object(n.useRef)(null);if(Object(n.useImperativeHandle)(b,(function(){return{updateLeft:function(e){p(C.current,{left:e+"px"})}}})),a===x.Loading)return o.a.createElement(S,Object(c.a)({},y,{style:Object(c.a)(Object(c.a)({},null==y?void 0:y.style),l)}));if(a===x.LoadFailed||!h||!m)return o.a.createElement("div",{className:"".concat(d,"-load-failed"),style:l},j);var D=a===x.Verify||a===x.Error||a===x.Success;return o.a.createElement("div",Object(c.a)({className:i()(R,(t={},t["".concat(R,"-stop")]=D,t),P),style:Object(c.a)(Object(c.a)({},I),l)},M),o.a.createElement("img",Object(c.a)({src:h,alt:""},v,{className:i()("".concat(R,"-bg"),null==v?void 0:v.className),style:Object(c.a)(Object(c.a)({},null==v?void 0:v.style),l)})),o.a.createElement("img",Object(c.a)({src:m,alt:""},g,{className:i()("".concat(R,"-puzzle"),null==g?void 0:g.className),style:Object(c.a)(Object(c.a)({},null==g?void 0:g.style),f),ref:C})),k&&a!==x.Success&&T&&o.a.createElement("div",{className:i()("".concat(R,"-refresh"),(r={},r["".concat(R,"-refresh-disabled")]=a===x.Verify||z,r)),onClick:function(){a===x.Verify||z||null==L||L()}},T),_)},_=v?{start:"pointerdown",move:"pointermove",end:"pointerup",cancel:"pointercancel"}:g?{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}:{start:"mousedown",move:"mousemove",end:"mouseup",cancel:"touchcancel"},M=v?"onPointerDown":g?"onTouchStart":"onMouseDown";!function(e){e.Puzzle="puzzle",e.Button="button"}(T||(T={}));var C=function(e){var t,r,a,s=e.mode,m=void 0===s?"embed":s,v=e.limitErrorCount,y=void 0===v?0:v,w=e.tipText,j=e.tipIcon,O=e.refreshIcon,k=e.bgSize,E=e.puzzleSize,z=e.request,I=e.autoRequest,S=void 0===I||I,R=e.onVerify,C=e.autoRefreshOnError,D=void 0===C||C,B=e.actionRef,F=e.showRefreshIcon,W=void 0===F||F,H=e.jigsawContent,U=e.errorHoldDuration,V=void 0===U?500:U,A=e.loadingDelay,q=void 0===A?0:A,K=e.placement,G=void 0===K?"top":K,X=e.loadingBoxProps,Y=e.sliderButtonProps,J=e.precision,Z=void 0===J?7:J,Q=e.className,$=e.style,ee=e.styles,te=l(),re=te[0],ne=te[1],oe=l(x.Default),ce=oe[0],ae=oe[1],ie=u(ce),se=Object(n.useRef)(null),le=Object(n.useRef)(null),ue=Object(n.useRef)(null),fe=Object(n.useMemo)((function(){return"float"===m||"slider"===m?m:"embed"}),[m]),de=Object(n.useMemo)((function(){return void 0!==O?O:void 0!==(null==j?void 0:j.refresh)?j.refresh:void 0}),[O,j]),he=Object(n.useMemo)((function(){return Object(c.a)(Object(c.a)({},N.bgSize),k)}),[k]),pe=Object(n.useMemo)((function(){return Object(c.a)(Object(c.a)({},N.puzzleSize),E)}),[E]),me=Object(n.useMemo)((function(){return"bottom"===G?"top":"bottom"}),[G]),ve=Object(n.useRef)({isPressed:!1,trail:[],errorCount:0,startInfo:{x:0,y:0,timestamp:0},currentTargetType:T.Button,floatTransitionTimer:null,floatDelayShowTimer:null,floatDelayHideTimer:null,refreshTimer:null,loadingTimer:null,sliderButtonWidth:40,indicatorBorderWidth:2,ratio:1,buttonMaxDistance:0,puzzleMaxDistance:0}),ge="slider"===fe,be="number"==typeof q&&q>0,ye=ce===x.Error&&y>0&&ve.current.errorCount>=y,we=function(){var e;return(null===(e=se.current)||void 0===e?void 0:e.getRect(!0).height)||42},xe=function(){return Object(c.b)(void 0,void 0,void 0,(function(){var e;return Object(c.e)(this,(function(t){switch(t.label){case 0:if(ge)return[2];if(!z)return[3,4];be?ve.current.loadingTimer=setTimeout((function(){ae(x.Loading)}),q):ae(x.Loading),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,z()];case 2:return e=t.sent(),be&&clearTimeout(ve.current.loadingTimer),ne(e),ae(x.Default),[3,4];case 3:return t.sent(),be&&clearTimeout(ve.current.loadingTimer),ae(x.LoadFailed),[3,4];case 4:return[2]}}))}))},je=function(e){void 0===e&&(e=300),"float"===fe&&ie.current!==x.Success&&(clearTimeout(ve.current.floatTransitionTimer),clearTimeout(ve.current.floatDelayHideTimer),clearTimeout(ve.current.floatDelayShowTimer),ve.current.floatDelayShowTimer=setTimeout((function(){var e,t;p(ue.current,{display:"block"}),null==(t=ue.current)||t.scrollTop;var r=we()+"px";p(ue.current,((e={})[me]=r,e.opacity="1",e))}),e))},Oe=function(e){void 0===e&&(e=300),"float"===fe&&(clearTimeout(ve.current.floatTransitionTimer),clearTimeout(ve.current.floatDelayHideTimer),clearTimeout(ve.current.floatDelayShowTimer),ve.current.floatDelayHideTimer=setTimeout((function(){var e,t=we()/2+"px";p(ue.current,((e={})[me]=t,e.opacity="0",e)),ve.current.floatTransitionTimer=setTimeout((function(){p(ue.current,{display:"none"})}),300)}),e))},ke=function(e){var t;ge||null===(t=le.current)||void 0===t||t.updateLeft(e)},Ee=function(){var e;ve.current.isPressed=!1,ae(x.Default),null===(e=se.current)||void 0===e||e.updateLeft(0),ke(pe.left)},Te=function(e){void 0===e&&(e=!1),e&&(ve.current.errorCount=0),clearTimeout(ve.current.refreshTimer),ie.current!==x.Loading&&(Ee(),xe())},ze=function(e){if(ie.current===x.Default){e.preventDefault();var t=h(e),r=t.clientX,n=t.clientY;ve.current.startInfo={x:r,y:n,timestamp:(new Date).getTime()},ve.current.trail=[[r,n]],se.current&&(ve.current.sliderButtonWidth=se.current.getSliderButtonWidth(!0),ve.current.indicatorBorderWidth=se.current.getIndicatorBorderWidth(!0)),ve.current.buttonMaxDistance=he.width-ve.current.sliderButtonWidth-ve.current.indicatorBorderWidth,ve.current.puzzleMaxDistance=he.width-pe.width-pe.left,ve.current.ratio=ve.current.puzzleMaxDistance/ve.current.buttonMaxDistance,ve.current.currentTargetType===T.Puzzle&&(ve.current.ratio=1/ve.current.ratio),(g||"pen"===e.pointerType||"touch"===e.pointerType)&&je(0),ve.current.isPressed=!0,document.addEventListener(_.move,Le),document.addEventListener(_.end,Ie),document.addEventListener(_.cancel,Ie)}},Le=function(e){var t;if(ve.current.isPressed){e.preventDefault();var r=h(e),n=r.clientX,o=r.clientY,c=n-ve.current.startInfo.x;ve.current.trail.push([n,o]),ie.current!==x.Moving&&c>0&&ae(x.Moving);var a=c,i=c;ve.current.currentTargetType===T.Puzzle?(a=(c=Math.max(0,Math.min(c,ve.current.puzzleMaxDistance)))+pe.left,i=c*ve.current.ratio):(i=c=Math.max(0,Math.min(c,ve.current.buttonMaxDistance)),a=c*ve.current.ratio+pe.left),null===(t=se.current)||void 0===t||t.updateLeft(i),ke(a)}},Ie=function(e){if(document.removeEventListener(_.move,Le),document.removeEventListener(_.end,Ie),document.removeEventListener(_.cancel,Ie),ve.current.isPressed){if(ie.current!==x.Moving)return ve.current.isPressed=!1,void(g&&Oe());if(R){ve.current.isPressed=!1,ae(x.Verify);var t=(new Date).getTime(),r=h(e),n=r.clientX,o=r.clientY-ve.current.startInfo.y,c=n-ve.current.startInfo.x,a=c;ve.current.currentTargetType===T.Puzzle?a=(c=Math.max(0,Math.min(c,ve.current.puzzleMaxDistance)))*ve.current.ratio:(a=c=Math.max(0,Math.min(c,ve.current.buttonMaxDistance)),c*=ve.current.ratio),R({x:b(c,Z),y:b(o,Z),sliderOffsetX:b(a,Z),duration:t-ve.current.startInfo.timestamp,trail:ve.current.trail,targetType:ve.current.currentTargetType,errorCount:ve.current.errorCount}).then((function(){ve.current.errorCount=0,ae(x.Success),Oe()})).catch((function(){ve.current.errorCount+=1,ae(x.Error),(g||"pen"===e.pointerType||"touch"===e.pointerType)&&Oe(),(y<=0||ve.current.errorCount<y)&&D&&(ve.current.refreshTimer=setTimeout((function(){Te()}),V))}))}else Ee()}};return f((function(){S&&xe()})),Object(n.useImperativeHandle)(B,(function(){return{refresh:Te,get status(){return ie.current}}})),o.a.createElement("div",{className:i()(d,Q,"".concat(d,"-").concat(fe),(t={},t["".concat(d,"-").concat(fe,"-").concat(G)]="float"===fe,t)),style:Object(c.a)({width:he.width},$),onMouseEnter:function(){g||je()},onMouseLeave:function(){g||Oe()}},!ge&&o.a.createElement("div",{className:"".concat(d,"-panel"),ref:ue},o.a.createElement("div",{className:"".concat(d,"-panel-inner"),style:Object(c.a)(Object(c.a)({},null==ee?void 0:ee.panel),{height:he.height})},o.a.createElement(P,{status:ce,bgSize:he,puzzleSize:pe,bgUrl:null==re?void 0:re.bgUrl,puzzleUrl:null==re?void 0:re.puzzleUrl,jigsawRef:le,loadingBoxProps:X,loadFailedIcon:null==j?void 0:j.loadFailed,showRefreshIcon:W,refreshIcon:de,disabledRefresh:ye,onRefresh:Te,style:null==ee?void 0:ee.jigsaw,bgImgProps:{style:null==ee?void 0:ee.bgImg},puzzleImgProps:(r={style:null==ee?void 0:ee.puzzleImg},r[M]=function(e){ve.current.currentTargetType=T.Puzzle,ze(e)},r)},H))),o.a.createElement(L,{status:ce,isLimitErrors:ye,tipText:w,tipIcon:j,style:null==ee?void 0:ee.control,onClick:function(){(ye||ce===x.LoadFailed)&&Te(ye)},indicatorProps:{style:null==ee?void 0:ee.indicator},sliderButtonProps:Object(c.a)(Object(c.a)({},Y),(a={},a[M]=function(e){ve.current.currentTargetType=T.Button,ze(e)},a)),controlRef:se}))};var D,B="undefined"!=typeof URL,F=Object.keys,W=(Object.values,B?URL.createObjectURL:(D="",function(){return D})),H=B?URL.revokeObjectURL:function(){},U=r(618);function V(e){return U.c.call(e)}var A=typeof Blob!==U.e;var q=[200,304];function K(e,t){return new Promise((function(r,n){var o,a,i,s,l,u,f,d,h,p,m,v,g,b,y,w,x,j,O,k,E,T,z,L,I,S;!function(e){return!!(A&&e instanceof Blob)||V(e)===U.a}(e)?(o=e,a=Object(c.a)({responseType:"blob"},t),i=a||{},s=i.method,l=void 0===s?"get":s,u=i.data,f=void 0===u?null:u,d=i.timeout,h=i.headers,p=i.withCredentials,m=void 0!==p&&p,v=i.async,g=void 0===v||v,b=i.user,y=void 0===b?null:b,w=i.password,x=void 0===w?null:w,j=i.responseType,O=i.onReadyStateChange,k=i.onLoadStart,E=i.onProgress,T=i.onAbort,z=i.onTimeout,L=i.onError,I=i.onLoad,S=i.onLoadEnd,new Promise((function(e,t){var r=new XMLHttpRequest;r.open(l.toLowerCase(),o,g,y,x),O&&(r.onreadystatechange=O),"number"==typeof d&&d>0&&(r.timeout=d),r.withCredentials=m,j&&(r.responseType=j),"object"==typeof h&&F(h).map((function(e){r.setRequestHeader(e,h[e])}));var n,c=function(e){return function(n){t(n),null==e||e.call(r,n)}},a={loadstart:k,progress:E,abort:c(T),timeout:c(z),error:c(L),load:(n=I,function(t){e(t),null==n||n.call(r,t)}),loadend:S};F(a).map((function(e){var t=a[e];t&&r.addEventListener(e,t)})),r.send(f)}))).then((function(t){var o=t.target.status;if(-1!==q.indexOf(o))r(t.target.response);else{var c=new Error("The file does not support get requests, responseStatus ".concat(o,", '").concat(e,"'."));console.error(c),n(c)}})).catch((function(e){console.error(new Error("Failed to request file. ".concat(e))),n(e)})):r(e)}))}var G=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 a=1===o?"push":"unshift";this.handlers[e][a](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=[],a=0;a<arguments.length;a++)c[a]=arguments[a];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}(),X={},Y=function(){function e(e){void 0===e&&(e="default"),this.scope=e,X[this.scope]||(X[this.scope]={}),this.data=X[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(){X[this.scope]={},this.data=X[this.scope]},e}();function J(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 Z=function(){function e(e,t){void 0===t&&(t={});var r=!!e&&J(e);this.options=Object(c.a)({needParsed:r,prefix:""},t),this.storage=r?e:new Y(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}(),Q=function(e){function t(t,r){var n,o=e.call(this)||this,a="default";return"string"==typeof t?a=t||"default":"object"==typeof t&&(n=t),n||"object"!=typeof r||(n=r),o.options=Object(c.a)({max:-1,stdTTL:0,maxStrategy:"limited",checkperiod:0,prefix:"cache2_"},n),o.storage=new Z(o.options.storage,Object(c.a)({memoryScope:a},o.options)),o.cacheKey=a,o.startCheckperiod(),o}return Object(c.d)(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 a=this._getReplaceKey(c,n);this.del(a)}}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}(G),$=0,ee="_"+Object(U.b)().toString(36).substring(2,4);function te(e){return void 0===e&&(e=ee),""+e+ ++$}var re=function(){function e(e){this.promiseCache={},this.cache=new Q(te("uh_async_memo"),e)}return e.prototype.run=function(e,t,r){var n=this;if(!t||!function(e){return"string"==typeof e||V(e)===U.d}(t))return e();var o=Object(c.a)({persisted:!0},r);if(o.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 n.promiseCache[t],n.cache.set(t,e,o.ttl),e})).catch((function(e){return delete n.promiseCache[t],Promise.reject(e)}))),this.promiseCache[t]},e}(),ne=new WeakMap,oe=function(e){return"string"!=typeof e&&e?(ne.has(e)||ne.set(e,te("__uh_cache_key__")),ne.get(e)):e},ce=new re({max:1,maxStrategy:"replaced"});ce.cache.on("del",(function(e,t){try{t.r&&H(t.data.image.src)}catch(e){}}));var ae,ie=Math.PI;!function(e){e[e.None=0]="None",e[e.Outer=1]="Outer",e[e.Inner=2]="Inner"}(ae||(ae={}));var se=[ae.None,ae.Outer,ae.Inner];function le(e,t){return void 0===t&&(t=0),Math.max(Math.floor(Math.random()*e),t)}function ue(e){return e[le(e.length)]}function fe(e){var t={top:ue(se),right:ue(se),bottom:ue(se),left:ue(se)},r=Object.keys(t),n=["top","bottom"],o=["left","right"];if(t.top===ae.Outer&&t.bottom===ae.Outer?t[ue(n)]=ae.Inner:t.top!==ae.Outer&&t.bottom!==ae.Outer&&(t[ue(n)]=ae.Outer),t.left===ae.Outer&&t.right===ae.Outer?t[ue(o)]=ae.Inner:t.left!==ae.Outer&&t.right!==ae.Outer&&(t[ue(o)]=ae.Outer),e){var c=[],a=[];r.forEach((function(e){t[e]===ae.Inner?c.push(e):t[e]===ae.None&&a.push(e)})),2===e?c.forEach((function(e){return t[e]=ae.None})):3===e?0===c.length?t[ue(a)]=ae.Inner:2===c.length&&(t[ue(c)]=ae.None):4==e&&a.forEach((function(e){return t[e]=ae.Inner}))}return t}function de(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,a=t.w,i=void 0===a?60:a,s=t.h,l=void 0===s?60:s,u=t.points,f=t.margin,d=void 0===f?0:f;d=d<=0?0:d,"number"!=typeof u&&u||(u=fe(u));var h=.15*(Math.min(i,l)-2*d),p=Math.hypot(h,h)/2,m=h+p,v={x:n+d,y:c+d,w:i-m-2*d,h:l-m-2*d},g=v.w/2,b=v.h/2;u.left===ae.Outer&&(v.x+=m),u.top===ae.Outer&&(v.y+=m),e.beginPath(),e.lineWidth=2,e.moveTo(v.x,v.y),u.top!==ae.None&&(e.lineTo(v.x+g-p,v.y),u.top===ae.Inner?e.arc(v.x+g,v.y+p,h,1.25*ie,1.75*ie,!0):e.arc(v.x+g,v.y-p,h,.75*ie,.25*ie)),e.lineTo(v.x+v.w,v.y),u.right!==ae.None&&(e.lineTo(v.x+v.w,v.y+b-p),u.right===ae.Inner?e.arc(v.x+v.w-p,v.y+b,h,1.75*ie,.25*ie,!0):e.arc(v.x+v.w+p,v.y+b,h,1.25*ie,.75*ie)),e.lineTo(v.x+v.w,v.y+v.h),u.bottom!==ae.None&&(e.lineTo(v.x+g+p,v.y+v.h),u.bottom===ae.Inner?e.arc(v.x+g,v.y+v.h-p,h,.25*ie,.75*ie,!0):e.arc(v.x+g,v.y+v.h+p,h,1.75*ie,1.25*ie)),e.lineTo(v.x,v.y+v.h),u.left!==ae.None&&(e.lineTo(v.x,v.y+b+p),u.left===ae.Inner?e.arc(v.x+p,v.y+b,h,.75*ie,1.25*ie,!0):e.arc(v.x-p,v.y+b,h,.25*ie,1.75*ie)),e.lineTo(v.x,v.y),e.stroke(),e.closePath()}function he(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 pe="image/jpeg",me="image/png",ve=[];function ge(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,a=t.fillColor,i=void 0===a?"rgba(255,255,255,0.7)":a,s=t.points,l=t.width,u=void 0===l?60:l,f=t.height,d=void 0===f?60:f,h=t.x,p=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,j=t.bgHeight,O=t.bgOffset,k=void 0===O?[0,0]:O,E=t.bgImageType,T=void 0===E?pe:E,z=t.quality,L=void 0===z?.8:z,I=t.format,S=void 0===I?"dataURL":I,R=t.cacheImage,N=t.autoRevokePreviousBlobUrl,P=void 0===N||N,_=t.ajaxOptions;return new Promise((function(t,r){var o=document.createElement("canvas"),a=document.createElement("canvas"),l=o.getContext("2d"),f=a.getContext("2d");(function(e,t,r){void 0===t&&(t=!0);var n="object"==typeof t,o={useCache:n?!1!==t.useCache:!1!==t,autoRevokeOnDel:n?!1!==t.autoRevokeOnDel:!!t,cacheKey:n?t.cacheKey:void 0},c=o.useCache?oe(o.cacheKey||e):void 0;return ce.run((function(){return new Promise((function(t,n){K(e,r).then((function(r){var c=W(r),a=new Image;a.onload=function(){t({data:{blob:r,image:a},r:o.autoRevokeOnDel})},a.onerror=function(t){H(c),console.error("[loadImageWithBlob] The image load failed, '".concat(e,"'.")),n(t)},a.src=c})).catch(n)}))}),c).then((function(e){return e.data}))})(e,R,_).then((function(e){var m=e.image;y&&(m.width=y),w&&(m.height=w);var g="number"==typeof x&&x>0?x>u?x:u:m.width,O="number"==typeof j&&j>0?j>d?j:d:m.height;o.width=g,o.height=O;var E=g-u,z=O-d,I=void 0===h?le(E,u):h||0,R=void 0===p?le(z):p||0;I<0?I=0:I>E&&(I=E),R<0?R=0:R>z&&(R=z);var N="number"!=typeof s&&s?s:fe(s),_="function"==typeof k?k(m.width,m.height):k;l.strokeStyle=c,l.lineWidth=n,l.fillStyle=i,de(l,{x:I,y:R,w:u,h:d,points:N,margin:v}),l.fillStyle=i,l.fill(),l.globalCompositeOperation="destination-over",l.drawImage(m,_[0],_[1],m.width,m.height),a.width=g,a.height=O,f.strokeStyle=c,f.lineWidth=n,de(f,{x:I,y:R,w:u,h:d,points:N,margin:v}),f.globalCompositeOperation="destination-over",f.clip(),f.drawImage(m,_[0],_[1],m.width,m.height);var M=f.getImageData(I,R,u,d);f.clearRect(0,0,g,O),a.width=u,a.height=b?O:d,f.putImageData(M,0,b?R:0);var C="blob"===S,D=he(a,C,me,L),B=he(o,C,T,L);Promise.all([D,B]).then((function(e){var r=e[0],n=e[1];P&&(ve.length&&(ve.forEach((function(e){URL.revokeObjectURL(e)})),ve.length=0),C&&ve.push(n,r)),t({puzzleUrl:r,bgUrl:n,x:I,y:b?0:R})})).catch(r)})).catch(r)}))}var be=r(3),ye=r(272);function we(e){return(we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xe(){xe=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},a=c.iterator||"@@iterator",i=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var c=t&&t.prototype instanceof v?t:v,a=Object.create(c.prototype),i=new I(n||[]);return o(a,"_invoke",{value:E(e,r,i)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",h="executing",p="completed",m={};function v(){}function g(){}function b(){}var y={};l(y,a,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(S([])));x&&x!==r&&n.call(x,a)&&(y=x);var j=b.prototype=v.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,c,a,i){var s=f(e[o],e,c);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==we(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,a,i)}),(function(e){r("throw",e,a,i)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,i)}))}i(s.arg)}var c;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return c=c?c.then(o,o):o()}})}function E(t,r,n){var o=d;return function(c,a){if(o===h)throw Error("Generator is already running");if(o===p){if("throw"===c)throw a;return{value:e,done:!0}}for(n.method=c,n.arg=a;;){var i=n.delegate;if(i){var s=T(i,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?p:"suspendedYield",l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=p,n.method="throw",n.arg=l.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var c=f(o,t.iterator,r.arg);if("throw"===c.type)return r.method="throw",r.arg=c.arg,r.delegate=null,m;var a=c.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function z(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(z,this),this.reset(!0)}function S(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,c=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return c.next=c}}throw new TypeError(we(t)+" is not iterable")}return g.prototype=b,o(j,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,s,"GeneratorFunction")),e.prototype=Object.create(j),e},t.awrap=function(e){return{__await:e}},O(k.prototype),l(k.prototype,i,(function(){return this})),t.AsyncIterator=k,t.async=function(e,r,n,o,c){void 0===c&&(c=Promise);var a=new k(u(e,r,n,o),c);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},O(j),l(j,s,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return i.type="throw",i.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var c=this.tryEntries.length-1;c>=0;--c){var a=this.tryEntries[c],i=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var c=o;break}}c&&("break"===e||"continue"===e)&&c.tryLoc<=t&&t<=c.finallyLoc&&(c=null);var a=c?c.completion:{};return a.type=e,a.arg=t,c?(this.method="next",this.next=c.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:S(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function je(e,t,r,n,o,c,a){try{var i=e[c](a),s=i.value}catch(e){return void r(e)}i.done?t(s):Promise.resolve(s).then(n,o)}var Oe=function(e){var t=e.id,r=e.key,c=e.style,a=e.className,i=e.imgSrc,s=e.xOffset,l=e.imgWidth,u=e.imgHeight,f=e.mode,d=e.tipText,h=e.showRefreshIcon,p=e.autoRefreshOnError,m=e.errorHoldDuration,v=e.placement,g=e.refresh,b=e.setProps,y=Object(n.useRef)(0),w=Object(n.useRef)();return Object(n.useEffect)((function(){var e;g&&(null===(e=w.current)||void 0===e||e.refresh(),b({refresh:!1}))}),[g]),o.a.createElement(C,{id:t,key:r,style:c,className:a,actionRef:w,request:function(){return ge(i,{format:"blob"}).then((function(e){return y.current=e.x,{bgUrl:e.bgUrl,puzzleUrl:e.puzzleUrl}}))},onVerify:function(){var e,t=(e=xe().mark((function e(t){return xe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.x>=y.current-s&&t.x<y.current+s)){e.next=3;break}return b({verifyResult:{status:"success",timestamp:Date.now()}}),e.abrupt("return",Promise.resolve());case 3:return b({verifyResult:{status:"error",timestamp:Date.now()}}),e.abrupt("return",Promise.reject());case 5:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var c=e.apply(t,r);function a(e){je(c,n,o,a,i,"next",e)}function i(e){je(c,n,o,a,i,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}(),bgSize:{width:l,height:u},mode:f,tipText:d,showRefreshIcon:h,autoRefreshOnError:p,errorHoldDuration:m,placement:v,"data-dash-is-loading":Object(be.d)()})};t.default=Oe;Oe.defaultProps=ye.b,Oe.propTypes=ye.c},618:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return s})),r.d(t,"e",(function(){return n}));var n="undefined",o=Object.prototype,c=o.toString,a=(o.hasOwnProperty,o.propertyIsEnumerable,Object.getOwnPropertySymbols,Object.getPrototypeOf,Object.keys,Function.prototype.toString,typeof Symbol!==n&&Symbol.prototype,Array.prototype.slice,Math.min,Math.max,Math.random),i=(Math.floor,Math.ceil,Math.abs,Number.isFinite,Number.isInteger,Number.isSafeInteger,"object"==typeof globalThis&&globalThis,"object"==typeof self&&self,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,"[object "),s=i+"String]",l=(["Function","AsyncFunction","GeneratorFunction","Proxy"].map((function(e){return i+e+"]"})),i+"Blob]")}).call(this,r(36))}}]);
|
|
2
|
+
(window.webpackJsonpfeffery_utils_components=window.webpackJsonpfeffery_utils_components||[]).push([[31],{557:function(e,t,r){"use strict";r.r(t);var n=r(1),o=r.n(n),c=r(2),a=r(48),i=r.n(a),s=function(){var e=Object(n.useRef)(!1);return Object(n.useEffect)((function(){return e.current=!1,function(){e.current=!0}}),[]),e};var l=function(e){var t=s(),r=Object(c.f)(Object(n.useState)(e),2),o=r[0],a=r[1];return[o,Object(n.useCallback)((function(e){t.current||a(e)}),[])]};var u=function(e){var t=Object(n.useRef)(e);return t.current=e,t},d=function(e){Object(n.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 /* stylelint-disable-next-line declaration-property-value-no-unknown */\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 /* stylelint-disable-next-line declaration-property-value-no-unknown */\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 f="rc-slider-captcha";function p(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 h(e,t){if(void 0===t&&(t={}),e)for(var r in t)e.style[r]=t[r]}var m="object"==typeof window&&window&&"object"==typeof document&&document&&window.document===document&&!!document.addEventListener,v=m&&"onpointerdown"in window,b=m&&"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 y="".concat(f,"-button"),w=function(e){var t,r=e.className,n=e.disabled,a=e.active,s=e.success,l=e.error,u=e.verify,d=e.buttonRef,f=Object(c.g)(e,["className","disabled","active","success","error","verify","buttonRef"]);return o.a.createElement("span",Object(c.a)({className:i()(y,r,(t={},t["".concat(y,"-disabled")]=n,t["".concat(y,"-active")]=a,t["".concat(y,"-verify")]=u,t["".concat(y,"-success")]=s,t["".concat(y,"-error")]=l,t["".concat(y,"-pc")]=!b,t)),ref:d},f))};w.displayName="SliderButton";var x,j="".concat(f,"-icon"),O=function(e){var t,r=e.className,n=e.spin,a=Object(c.g)(e,["className","spin"]);return o.a.createElement("span",Object(c.a)({className:i()(j,(t={},t["".concat(j,"-spin")]=n,t),r)},a))},k={arrowRight:o.a.createElement((function(e){return o.a.createElement("svg",Object(c.a)({viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e),o.a.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"}),o.a.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:o.a.createElement((function(e){return o.a.createElement("svg",Object(c.a)({viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e),o.a.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:o.a.createElement((function(e){return o.a.createElement("svg",Object(c.a)({viewBox:"0 0 120 120",width:"1em",height:"1em"},e),o.a.createElement("defs",null,o.a.createElement("line",{id:"l",x1:"60",x2:"60",y1:"7",y2:"27",stroke:"currentColor",strokeWidth:"11",strokeLinecap:"round"})),o.a.createElement("g",null,o.a.createElement("use",{xlinkHref:"#l",opacity:".27"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".27",transform:"rotate(30 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".27",transform:"rotate(60 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".27",transform:"rotate(90 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".27",transform:"rotate(120 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".27",transform:"rotate(150 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".37",transform:"rotate(180 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".46",transform:"rotate(210 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".56",transform:"rotate(240 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".66",transform:"rotate(270 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".75",transform:"rotate(300 60,60)"}),o.a.createElement("use",{xlinkHref:"#l",opacity:".85",transform:"rotate(330 60,60)"})))}),null),refresh:o.a.createElement((function(e){return o.a.createElement("svg",Object(c.a)({viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e),o.a.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:o.a.createElement((function(e){return o.a.createElement("svg",Object(c.a)({viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e),o.a.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:o.a.createElement((function(e){return o.a.createElement("svg",Object(c.a)({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 16 16"},e),o.a.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)},E=function(e){var t=e.type,r=Object(c.g)(e,["type"]);return o.a.createElement(O,Object(c.a)({},r),k[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"}(x||(x={}));var T,z="".concat(f,"-control"),I=function(e){var t,r=e.status,a=void 0===r?x.Default:r,s=e.isLimitErrors,l=e.tipText,u=e.tipIcon,d=e.sliderButtonProps,f=e.indicatorProps,p=e.controlRef,m=Object(c.g)(e,["status","isLimitErrors","tipText","tipIcon","sliderButtonProps","indicatorProps","controlRef"]),v=Object(n.useRef)(null),b=Object(n.useRef)(null),g=Object(n.useRef)(null),y=Object(n.useRef)({}),j=Object(n.useMemo)((function(){return Object(c.a)({default:"向右拖动滑块填充拼图",loading:"加载中...",moving:null,verifying:null,success:null,error:null,errors:o.a.createElement(o.a.Fragment,null,o.a.createElement(E,{type:"x",style:{fontSize:20}})," 失败过多,点击重试"),loadFailed:"加载失败,点击重试"},l)}),[l]),O=Object(n.useMemo)((function(){return Object(c.a)({default:o.a.createElement(E,{type:"arrowRight"}),loading:o.a.createElement(E,{type:"loading",spin:!0}),error:o.a.createElement(E,{type:"x"}),success:o.a.createElement(E,{type:"check"})},u)}),[u]),k=Object(n.useMemo)((function(){var e;return(e={})[x.Default]=[j.default,O.default],e[x.Loading]=[j.loading,O.default],e[x.Moving]=[j.moving,O.default],e[x.Verify]=[j.verifying,O.loading],e[x.Error]=[j.error,O.error],e[x.Success]=[j.success,O.success],e[x.LoadFailed]=[j.loadFailed,O.default],e}),[j,O]),T=function(e){var t;return(e||"number"!=typeof y.current.sliderButtonWidth)&&(y.current.sliderButtonWidth=(null===(t=b.current)||void 0===t?void 0:t.clientWidth)||40),y.current.sliderButtonWidth},I=function(e){if(e||"number"!=typeof y.current.indicatorBorderWidth)if(g.current){var t=window.getComputedStyle(g.current);y.current.indicatorBorderWidth=parseInt(t.borderLeftWidth)+parseInt(t.borderRightWidth)}else y.current.indicatorBorderWidth=2;return y.current.indicatorBorderWidth},R=function(e){var t;return!e&&y.current.rect||v.current&&(y.current.rect=null===(t=v.current)||void 0===t?void 0:t.getBoundingClientRect()),y.current.rect};Object(n.useImperativeHandle)(p,(function(){return{getSliderButtonWidth:T,getIndicatorBorderWidth:I,getRect:R,updateLeft:function(e){var t=T(),r=I();h(b.current,{left:e+"px"}),h(g.current,{width:e+t+r+"px"})}}}),[]);var L=a===x.Loading,S=a===x.Moving,P=a===x.Verify,N=a===x.Success,M=a===x.Error,_=a===x.LoadFailed,C=s?j.errors:k[a][0];return o.a.createElement("div",Object(c.a)({},m,{className:i()(z,(t={},t["".concat(z,"-loading")]=L,t["".concat(z,"-moving")]=S,t["".concat(z,"-verify")]=P,t["".concat(z,"-success")]=N,t["".concat(z,"-error")]=M,t["".concat(z,"-errors")]=s,t["".concat(z,"-load-failed")]=_,t),m.className),ref:v}),o.a.createElement("div",Object(c.a)({},f,{className:i()("".concat(z,"-indicator"),null==f?void 0:f.className),ref:g})),o.a.createElement(w,Object(c.a)({},d,{className:i()("".concat(z,"-button"),null==d?void 0:d.className),disabled:L,active:S,verify:P,success:N,error:M,buttonRef:b}),k[a][1]),o.a.createElement("div",{className:i()("".concat(z,"-tips")),style:C?{}:{display:"none"}},C))},R="".concat(f,"-loading"),L=function(e){var t=e.icon,r=void 0===t?o.a.createElement(E,{type:"loading",spin:!0}):t,n=e.text,a=void 0===n?"加载中...":n,s=e.className,l=Object(c.g)(e,["icon","text","className"]);return o.a.createElement("div",Object(c.a)({className:i()(R,s)},l),o.a.createElement("div",{className:"".concat(R,"-icon")},r),o.a.createElement("div",{className:"".concat(R,"-text")},a))},S="".concat(f,"-jigsaw"),P={bgSize:{width:320,height:160},puzzleSize:{width:60,left:0},loadFailedIcon:o.a.createElement(E,{type:"imageFill"}),refreshIcon:o.a.createElement(E,{type:"refresh"})},N=function(e){var t,r,a=e.status,s=e.bgSize,l=void 0===s?P.bgSize:s,u=e.puzzleSize,d=void 0===u?P.puzzleSize:u,p=e.bgUrl,m=e.puzzleUrl,v=e.bgImgProps,b=e.puzzleImgProps,g=e.jigsawRef,y=e.loadingBoxProps,w=e.loadFailedIcon,j=void 0===w?P.loadFailedIcon:w,O=e.showRefreshIcon,k=void 0===O||O,E=e.refreshIcon,T=void 0===E?P.refreshIcon:E,z=e.disabledRefresh,I=e.onRefresh,R=e.style,N=e.className,M=e.children,_=Object(c.g)(e,["status","bgSize","puzzleSize","bgUrl","puzzleUrl","bgImgProps","puzzleImgProps","jigsawRef","loadingBoxProps","loadFailedIcon","showRefreshIcon","refreshIcon","disabledRefresh","onRefresh","style","className","children"]),C=Object(n.useRef)(null);if(Object(n.useImperativeHandle)(g,(function(){return{updateLeft:function(e){h(C.current,{left:e+"px"})}}})),a===x.Loading)return o.a.createElement(L,Object(c.a)({},y,{style:Object(c.a)(Object(c.a)({},null==y?void 0:y.style),l)}));if(a===x.LoadFailed)return o.a.createElement("div",{className:"".concat(f,"-load-failed"),style:l},j);var D=a===x.Verify||a===x.Error||a===x.Success;return o.a.createElement("div",Object(c.a)({className:i()(S,(t={},t["".concat(S,"-stop")]=D,t),N),style:Object(c.a)(Object(c.a)({},R),l)},_),o.a.createElement("img",Object(c.a)({src:p,alt:""},v,{className:i()("".concat(S,"-bg"),null==v?void 0:v.className),style:Object(c.a)(Object(c.a)({},null==v?void 0:v.style),l)})),o.a.createElement("img",Object(c.a)({src:m,alt:""},b,{className:i()("".concat(S,"-puzzle"),null==b?void 0:b.className),style:Object(c.a)(Object(c.a)({},null==b?void 0:b.style),d),ref:C})),k&&a!==x.Success&&T&&o.a.createElement("div",{className:i()("".concat(S,"-refresh"),(r={},r["".concat(S,"-refresh-disabled")]=a===x.Verify||z,r)),onClick:function(){a===x.Verify||z||null==I||I()}},T),M)},M=v?{move:"pointermove",end:"pointerup",cancel:"pointercancel"}:b?{move:"touchmove",end:"touchend",cancel:"touchcancel"}:{move:"mousemove",end:"mouseup",cancel:"touchcancel"},_=v?"onPointerDown":b?"onTouchStart":"onMouseDown";!function(e){e.Puzzle="puzzle",e.Button="button"}(T||(T={}));var C=function(e){var t,r,a,s=e.mode,m=void 0===s?"embed":s,v=e.limitErrorCount,y=void 0===v?0:v,w=e.tipText,j=e.tipIcon,O=e.refreshIcon,k=e.bgSize,E=e.puzzleSize,z=e.request,R=e.autoRequest,L=void 0===R||R,S=e.onVerify,C=e.autoRefreshOnError,D=void 0===C||C,B=e.actionRef,F=e.showRefreshIcon,W=void 0===F||F,H=e.jigsawContent,U=e.errorHoldDuration,V=void 0===U?500:U,A=e.showJigsawOnActive,q=void 0!==A&&A,K=e.loadingDelay,X=void 0===K?0:K,G=e.placement,Y=void 0===G?"top":G,J=e.loadingBoxProps,Z=e.sliderButtonProps,Q=e.precision,$=void 0===Q?7:Q,ee=e.className,te=e.style,re=e.styles,ne=l(),oe=ne[0],ce=ne[1],ae=l((function(){return!ye&&z&&L?x.Loading:x.Default})),ie=ae[0],se=ae[1],le=u(ie),ue=Object(n.useRef)(null),de=Object(n.useRef)(null),fe=Object(n.useRef)(null),pe=Object(n.useMemo)((function(){return"float"===m||"slider"===m?m:"embed"}),[m]),he=Object(n.useMemo)((function(){return void 0!==O?O:void 0!==(null==j?void 0:j.refresh)?j.refresh:void 0}),[O,j]),me=Object(n.useMemo)((function(){return Object(c.a)(Object(c.a)({},P.bgSize),k)}),[k]),ve=Object(n.useMemo)((function(){return Object(c.a)(Object(c.a)({},P.puzzleSize),E)}),[E]),be=Object(n.useMemo)((function(){return"bottom"===Y?"top":"bottom"}),[Y]),ge=Object(n.useRef)({isPressed:!1,trail:[],errorCount:0,startInfo:{x:0,y:0,timestamp:0},currentTargetType:T.Button,floatTransitionTimer:null,floatDelayShowTimer:null,floatDelayHideTimer:null,refreshTimer:null,loadingTimer:null,sliderButtonWidth:40,indicatorBorderWidth:2,ratio:1,buttonMaxDistance:0,puzzleMaxDistance:0}),ye="slider"===pe,we="number"==typeof X&&X>0,xe=ie===x.Error&&y>0&&ge.current.errorCount>=y,je=function(){var e;return(null===(e=ue.current)||void 0===e?void 0:e.getRect(!0).height)||42},Oe=function(){return Object(c.b)(void 0,void 0,void 0,(function(){var e;return Object(c.e)(this,(function(t){switch(t.label){case 0:if(ye)return[2];if(!z)return[3,4];we?ge.current.loadingTimer=setTimeout((function(){se(x.Loading)}),X):se(x.Loading),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,z()];case 2:return e=t.sent(),we&&clearTimeout(ge.current.loadingTimer),ce(e),se(x.Default),[3,4];case 3:return t.sent(),we&&clearTimeout(ge.current.loadingTimer),ce(void 0),se(x.LoadFailed),[3,4];case 4:return[2]}}))}))},ke=function(e){void 0===e&&(e=300),"float"===pe&&le.current!==x.Success&&(clearTimeout(ge.current.floatTransitionTimer),clearTimeout(ge.current.floatDelayHideTimer),clearTimeout(ge.current.floatDelayShowTimer),ge.current.floatDelayShowTimer=setTimeout((function(){var e,t;h(fe.current,{display:"block"}),null==(t=fe.current)||t.scrollTop;var r=je()+"px";h(fe.current,((e={})[be]=r,e.opacity="1",e))}),e))},Ee=function(e){void 0===e&&(e=300),"float"===pe&&(clearTimeout(ge.current.floatTransitionTimer),clearTimeout(ge.current.floatDelayHideTimer),clearTimeout(ge.current.floatDelayShowTimer),ge.current.floatDelayHideTimer=setTimeout((function(){var e,t=je()/2+"px";h(fe.current,((e={})[be]=t,e.opacity="0",e)),ge.current.floatTransitionTimer=setTimeout((function(){h(fe.current,{display:"none"})}),300)}),e))},Te=function(e){var t;ye||null===(t=de.current)||void 0===t||t.updateLeft(e)},ze=function(){var e;ge.current.isPressed=!1,se(x.Default),null===(e=ue.current)||void 0===e||e.updateLeft(0),Te(ve.left)},Ie=function(e){void 0===e&&(e=!1),e&&(ge.current.errorCount=0),clearTimeout(ge.current.refreshTimer),le.current!==x.Loading&&(ze(),Oe())},Re=function(e){if(le.current===x.Default){e.preventDefault();var t=p(e),r=t.clientX,n=t.clientY;ge.current.startInfo={x:r,y:n,timestamp:(new Date).getTime()},ge.current.trail=[[r,n]],ue.current&&(ge.current.sliderButtonWidth=ue.current.getSliderButtonWidth(!0),ge.current.indicatorBorderWidth=ue.current.getIndicatorBorderWidth(!0)),ge.current.buttonMaxDistance=me.width-ge.current.sliderButtonWidth-ge.current.indicatorBorderWidth,ge.current.puzzleMaxDistance=me.width-ve.width-ve.left,ge.current.ratio=ge.current.puzzleMaxDistance/ge.current.buttonMaxDistance,ge.current.currentTargetType===T.Puzzle&&(ge.current.ratio=1/ge.current.ratio),(b||"pen"===e.pointerType||"touch"===e.pointerType)&&ke(0),ge.current.isPressed=!0,document.addEventListener(M.move,Le),document.addEventListener(M.end,Se),document.addEventListener(M.cancel,Se)}},Le=function(e){var t;if(ge.current.isPressed){e.preventDefault();var r=p(e),n=r.clientX,o=r.clientY,c=n-ge.current.startInfo.x;ge.current.trail.push([n,o]),le.current!==x.Moving&&c>0&&se(x.Moving);var a=c,i=c;ge.current.currentTargetType===T.Puzzle?(a=(c=Math.max(0,Math.min(c,ge.current.puzzleMaxDistance)))+ve.left,i=c*ge.current.ratio):(i=c=Math.max(0,Math.min(c,ge.current.buttonMaxDistance)),a=c*ge.current.ratio+ve.left),null===(t=ue.current)||void 0===t||t.updateLeft(i),Te(a)}},Se=function(e){if(document.removeEventListener(M.move,Le),document.removeEventListener(M.end,Se),document.removeEventListener(M.cancel,Se),ge.current.isPressed){if(le.current!==x.Moving||"function"!=typeof S)return ge.current.isPressed=!1,(b||"pen"===e.pointerType||"touch"===e.pointerType||q)&&Ee(),void ze();ge.current.isPressed=!1,se(x.Verify);var t=(new Date).getTime(),r=p(e),n=r.clientX,o=r.clientY-ge.current.startInfo.y,c=n-ge.current.startInfo.x,a=c;ge.current.currentTargetType===T.Puzzle?a=(c=Math.max(0,Math.min(c,ge.current.puzzleMaxDistance)))*ge.current.ratio:(a=c=Math.max(0,Math.min(c,ge.current.buttonMaxDistance)),c*=ge.current.ratio),S({x:g(c,$),y:g(o,$),sliderOffsetX:g(a,$),duration:t-ge.current.startInfo.timestamp,trail:ge.current.trail,targetType:ge.current.currentTargetType,errorCount:ge.current.errorCount}).then((function(){ge.current.errorCount=0,se(x.Success),Ee()})).catch((function(){ge.current.errorCount+=1,se(x.Error),(b||"pen"===e.pointerType||"touch"===e.pointerType||q)&&Ee(),(y<=0||ge.current.errorCount<y)&&D&&(ge.current.refreshTimer=setTimeout((function(){Ie()}),V))}))}};return d((function(){L&&Oe()})),Object(n.useImperativeHandle)(B,(function(){return{refresh:Ie,get status(){return le.current}}})),o.a.createElement("div",{className:i()(f,ee,"".concat(f,"-").concat(pe),(t={},t["".concat(f,"-").concat(pe,"-").concat(Y)]="float"===pe,t)),style:Object(c.a)({width:me.width},te),onMouseEnter:function(){b||ke()},onMouseLeave:function(){b||q&&ge.current.isPressed||Ee()}},!ye&&o.a.createElement("div",{className:"".concat(f,"-panel"),ref:fe},o.a.createElement("div",{className:"".concat(f,"-panel-inner"),style:Object(c.a)(Object(c.a)({},null==re?void 0:re.panel),{height:me.height})},o.a.createElement(N,{status:ie,bgSize:me,puzzleSize:ve,bgUrl:null==oe?void 0:oe.bgUrl,puzzleUrl:null==oe?void 0:oe.puzzleUrl,jigsawRef:de,loadingBoxProps:J,loadFailedIcon:null==j?void 0:j.loadFailed,showRefreshIcon:W,refreshIcon:he,disabledRefresh:xe,onRefresh:Ie,style:null==re?void 0:re.jigsaw,bgImgProps:{style:null==re?void 0:re.bgImg},puzzleImgProps:(r={style:null==re?void 0:re.puzzleImg},r[_]=function(e){ge.current.currentTargetType=T.Puzzle,Re(e)},r)},H))),o.a.createElement(I,{status:ie,isLimitErrors:xe,tipText:w,tipIcon:j,style:null==re?void 0:re.control,onClick:function(){(xe||ie===x.LoadFailed)&&Ie(xe)},indicatorProps:{style:null==re?void 0:re.indicator},sliderButtonProps:Object(c.a)(Object(c.a)({},Z),(a={},a[_]=function(e){ge.current.currentTargetType=T.Button,Re(e)},a)),controlRef:ue}))};var D,B="undefined"!=typeof URL,F=Object.keys,W=(Object.values,B?URL.createObjectURL:(D="",function(){return D})),H=B?URL.revokeObjectURL:function(){},U=r(621);function V(e){return U.c.call(e)}var A=typeof Blob!==U.e;var q=[200,304];function K(e,t){return new Promise((function(r,n){var o,a,i,s,l,u,d,f,p,h,m,v,b,g,y,w,x,j,O,k,E,T,z,I,R,L;!function(e){return!!(A&&e instanceof Blob)||V(e)===U.a}(e)?(o=e,a=Object(c.a)({responseType:"blob"},t),i=a||{},s=i.method,l=void 0===s?"get":s,u=i.data,d=void 0===u?null:u,f=i.timeout,p=i.headers,h=i.withCredentials,m=void 0!==h&&h,v=i.async,b=void 0===v||v,g=i.user,y=void 0===g?null:g,w=i.password,x=void 0===w?null:w,j=i.responseType,O=i.onReadyStateChange,k=i.onLoadStart,E=i.onProgress,T=i.onAbort,z=i.onTimeout,I=i.onError,R=i.onLoad,L=i.onLoadEnd,new Promise((function(e,t){var r=new XMLHttpRequest;r.open(l.toLowerCase(),o,b,y,x),O&&(r.onreadystatechange=O),"number"==typeof f&&f>0&&(r.timeout=f),r.withCredentials=m,j&&(r.responseType=j),"object"==typeof p&&F(p).map((function(e){r.setRequestHeader(e,p[e])}));var n,c=function(e){return function(n){t(n),null==e||e.call(r,n)}},a={loadstart:k,progress:E,abort:c(T),timeout:c(z),error:c(I),load:(n=R,function(t){e(t),null==n||n.call(r,t)}),loadend:L};F(a).map((function(e){var t=a[e];t&&r.addEventListener(e,t)})),r.send(d)}))).then((function(t){var o=t.target.status;if(-1!==q.indexOf(o))r(t.target.response);else{var c=new Error("The file does not support get requests, responseStatus ".concat(o,", '").concat(e,"'."));console.error(c),n(c)}})).catch((function(e){console.error(new Error("Failed to request file. ".concat(e))),n(e)})):r(e)}))}var X=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 a=1===o?"push":"unshift";this.handlers[e][a](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=[],a=0;a<arguments.length;a++)c[a]=arguments[a];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}(),G={},Y=function(){function e(e){void 0===e&&(e="default"),this.scope=e,G[this.scope]||(G[this.scope]={}),this.data=G[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(){G[this.scope]={},this.data=G[this.scope]},e}();function J(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 Z=function(){function e(e,t){void 0===t&&(t={});var r=!!e&&J(e);this.options=Object(c.a)({needParsed:r,prefix:""},t),this.storage=r?e:new Y(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}(),Q=function(e){function t(t,r){var n,o=e.call(this)||this,a="default";return"string"==typeof t?a=t||"default":"object"==typeof t&&(n=t),n||"object"!=typeof r||(n=r),o.options=Object(c.a)({max:-1,stdTTL:0,maxStrategy:"limited",checkperiod:0,prefix:"cache2_"},n),o.storage=new Z(o.options.storage,Object(c.a)({memoryScope:a},o.options)),o.cacheKey=a,o.startCheckperiod(),o}return Object(c.d)(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 a=this._getReplaceKey(c,n);this.del(a)}}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}(X),$=0,ee="_"+Object(U.b)().toString(36).substring(2,4);function te(e){return void 0===e&&(e=ee),""+e+ ++$}var re=function(){function e(e){this.promiseCache={},this.cache=new Q(te("uh_async_memo"),e)}return e.prototype.run=function(e,t,r){var n=this;if(!t||!function(e){return"string"==typeof e||V(e)===U.d}(t))return e();var o=Object(c.a)({persisted:!0},r);if(o.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 n.promiseCache[t],n.cache.set(t,e,o.ttl),e})).catch((function(e){return delete n.promiseCache[t],Promise.reject(e)}))),this.promiseCache[t]},e}(),ne=new WeakMap,oe=function(e){return"string"!=typeof e&&e?(ne.has(e)||ne.set(e,te("__uh_cache_key__")),ne.get(e)):e},ce=new re({max:1,maxStrategy:"replaced"});ce.cache.on("del",(function(e,t){try{t.r&&H(t.data.image.src)}catch(e){}}));var ae,ie=Math.PI;!function(e){e[e.None=0]="None",e[e.Outer=1]="Outer",e[e.Inner=2]="Inner"}(ae||(ae={}));var se=[ae.None,ae.Outer,ae.Inner];function le(e,t){return void 0===t&&(t=0),Math.max(Math.floor(Math.random()*e),t)}function ue(e){return e[le(e.length)]}function de(e){var t={top:ue(se),right:ue(se),bottom:ue(se),left:ue(se)},r=Object.keys(t),n=["top","bottom"],o=["left","right"];if(t.top===ae.Outer&&t.bottom===ae.Outer?t[ue(n)]=ae.Inner:t.top!==ae.Outer&&t.bottom!==ae.Outer&&(t[ue(n)]=ae.Outer),t.left===ae.Outer&&t.right===ae.Outer?t[ue(o)]=ae.Inner:t.left!==ae.Outer&&t.right!==ae.Outer&&(t[ue(o)]=ae.Outer),e){var c=[],a=[];r.forEach((function(e){t[e]===ae.Inner?c.push(e):t[e]===ae.None&&a.push(e)})),2===e?c.forEach((function(e){return t[e]=ae.None})):3===e?0===c.length?t[ue(a)]=ae.Inner:2===c.length&&(t[ue(c)]=ae.None):4==e&&a.forEach((function(e){return t[e]=ae.Inner}))}return t}function fe(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,a=t.w,i=void 0===a?60:a,s=t.h,l=void 0===s?60:s,u=t.points,d=t.margin,f=void 0===d?0:d;f=f<=0?0:f,"number"!=typeof u&&u||(u=de(u));var p=.15*(Math.min(i,l)-2*f),h=Math.hypot(p,p)/2,m=p+h,v={x:n+f,y:c+f,w:i-m-2*f,h:l-m-2*f},b=v.w/2,g=v.h/2;u.left===ae.Outer&&(v.x+=m),u.top===ae.Outer&&(v.y+=m),e.beginPath(),e.lineWidth=2,e.moveTo(v.x,v.y),u.top!==ae.None&&(e.lineTo(v.x+b-h,v.y),u.top===ae.Inner?e.arc(v.x+b,v.y+h,p,1.25*ie,1.75*ie,!0):e.arc(v.x+b,v.y-h,p,.75*ie,.25*ie)),e.lineTo(v.x+v.w,v.y),u.right!==ae.None&&(e.lineTo(v.x+v.w,v.y+g-h),u.right===ae.Inner?e.arc(v.x+v.w-h,v.y+g,p,1.75*ie,.25*ie,!0):e.arc(v.x+v.w+h,v.y+g,p,1.25*ie,.75*ie)),e.lineTo(v.x+v.w,v.y+v.h),u.bottom!==ae.None&&(e.lineTo(v.x+b+h,v.y+v.h),u.bottom===ae.Inner?e.arc(v.x+b,v.y+v.h-h,p,.25*ie,.75*ie,!0):e.arc(v.x+b,v.y+v.h+h,p,1.75*ie,1.25*ie)),e.lineTo(v.x,v.y+v.h),u.left!==ae.None&&(e.lineTo(v.x,v.y+g+h),u.left===ae.Inner?e.arc(v.x+h,v.y+g,p,.75*ie,1.25*ie,!0):e.arc(v.x-h,v.y+g,p,.25*ie,1.75*ie)),e.lineTo(v.x,v.y),e.stroke(),e.closePath()}function pe(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 he="image/jpeg",me="image/png",ve=[];function be(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,a=t.fillColor,i=void 0===a?"rgba(255,255,255,0.7)":a,s=t.points,l=t.width,u=void 0===l?60:l,d=t.height,f=void 0===d?60:d,p=t.x,h=t.y,m=t.margin,v=void 0===m?2:m,b=t.equalHeight,g=void 0===b||b,y=t.imageWidth,w=t.imageHeight,x=t.bgWidth,j=t.bgHeight,O=t.bgOffset,k=void 0===O?[0,0]:O,E=t.bgImageType,T=void 0===E?he:E,z=t.quality,I=void 0===z?.8:z,R=t.format,L=void 0===R?"dataURL":R,S=t.cacheImage,P=t.autoRevokePreviousBlobUrl,N=void 0===P||P,M=t.ajaxOptions;return new Promise((function(t,r){var o=document.createElement("canvas"),a=document.createElement("canvas"),l=o.getContext("2d"),d=a.getContext("2d");(function(e,t,r){void 0===t&&(t=!0);var n="object"==typeof t,o={useCache:n?!1!==t.useCache:!1!==t,autoRevokeOnDel:n?!1!==t.autoRevokeOnDel:!!t,cacheKey:n?t.cacheKey:void 0},c=o.useCache?oe(o.cacheKey||e):void 0;return ce.run((function(){return new Promise((function(t,n){K(e,r).then((function(r){var c=W(r),a=new Image;a.onload=function(){t({data:{blob:r,image:a},r:o.autoRevokeOnDel})},a.onerror=function(t){H(c),console.error("[loadImageWithBlob] The image load failed, '".concat(e,"'.")),n(t)},a.src=c})).catch(n)}))}),c).then((function(e){return e.data}))})(e,S,M).then((function(e){var m=e.image;y&&(m.width=y),w&&(m.height=w);var b="number"==typeof x&&x>0?x>u?x:u:m.width,O="number"==typeof j&&j>0?j>f?j:f:m.height;o.width=b,o.height=O;var E=b-u,z=O-f,R=void 0===p?le(E,u):p||0,S=void 0===h?le(z):h||0;R<0?R=0:R>E&&(R=E),S<0?S=0:S>z&&(S=z);var P="number"!=typeof s&&s?s:de(s),M="function"==typeof k?k(m.width,m.height):k;l.strokeStyle=c,l.lineWidth=n,l.fillStyle=i,fe(l,{x:R,y:S,w:u,h:f,points:P,margin:v}),l.fillStyle=i,l.fill(),l.globalCompositeOperation="destination-over",l.drawImage(m,M[0],M[1],m.width,m.height),a.width=b,a.height=O,d.strokeStyle=c,d.lineWidth=n,fe(d,{x:R,y:S,w:u,h:f,points:P,margin:v}),d.globalCompositeOperation="destination-over",d.clip(),d.drawImage(m,M[0],M[1],m.width,m.height);var _=d.getImageData(R,S,u,f);d.clearRect(0,0,b,O),a.width=u,a.height=g?O:f,d.putImageData(_,0,g?S:0);var C="blob"===L,D=pe(a,C,me,I),B=pe(o,C,T,I);Promise.all([D,B]).then((function(e){var r=e[0],n=e[1];N&&(ve.length&&(ve.forEach((function(e){URL.revokeObjectURL(e)})),ve.length=0),C&&ve.push(n,r)),t({puzzleUrl:r,bgUrl:n,x:R,y:g?0:S})})).catch(r)})).catch(r)}))}var ge=r(3),ye=r(275);function we(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function c(r,n,o,c){var s=n&&n.prototype instanceof i?n:i,l=Object.create(s.prototype);return xe(l,"_invoke",function(r,n,o){var c,i,s,l=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return c=t,i=0,s=e,f.n=r,a}};function p(r,n){for(i=r,s=n,t=0;!d&&l&&!o&&t<u.length;t++){var o,c=u[t],p=f.p,h=c[2];r>3?(o=h===n)&&(s=c[(i=c[4])?5:(i=3,3)],c[4]=c[5]=e):c[0]<=p&&((o=r<2&&p<c[1])?(i=0,f.v=n,f.n=c[1]):p<h&&(o=r<3||c[0]>n||n>h)&&(c[4]=r,c[5]=n,f.n=h,i=0))}if(o||r>1)return a;throw d=!0,n}return function(o,u,h){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),i=u,s=h;(t=i<2?e:s)||!d;){c||(i?i<3?(i>1&&(f.n=-1),p(i,s)):f.n=s:f.v=s);try{if(l=2,c){if(i||(o="next"),t=c[o]){if(!(t=t.call(c,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,i<2&&(i=0)}else 1===i&&(t=c.return)&&t.call(c),i<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),i=1);c=e}else if((t=(d=f.n<0)?s:r.call(n,f))!==a)break}catch(t){c=e,i=1,s=t}finally{l=1}}return{value:t,done:d}}}(r,o,c),!0),l}var a={};function i(){}function s(){}function l(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(xe(t={},n,(function(){return this})),t),d=l.prototype=i.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,xe(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=l,xe(d,"constructor",l),xe(l,"constructor",s),s.displayName="GeneratorFunction",xe(l,o,"GeneratorFunction"),xe(d),xe(d,o,"Generator"),xe(d,n,(function(){return this})),xe(d,"toString",(function(){return"[object Generator]"})),(we=function(){return{w:c,m:f}})()}function xe(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(xe=function(e,t,r,n){function c(t,r){xe(e,t,(function(e){return this._invoke(t,r,e)}))}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(c("next",0),c("throw",1),c("return",2))})(e,t,r,n)}function je(e,t,r,n,o,c,a){try{var i=e[c](a),s=i.value}catch(e){return void r(e)}i.done?t(s):Promise.resolve(s).then(n,o)}var Oe=function(e){var t=e.id,r=e.key,c=e.style,a=e.className,i=e.imgSrc,s=e.xOffset,l=e.imgWidth,u=e.imgHeight,d=e.mode,f=e.tipText,p=e.showRefreshIcon,h=e.autoRefreshOnError,m=e.errorHoldDuration,v=e.placement,b=e.refresh,g=e.setProps,y=Object(n.useRef)(0),w=Object(n.useRef)();return Object(n.useEffect)((function(){var e;b&&(null===(e=w.current)||void 0===e||e.refresh(),g({refresh:!1}))}),[b]),o.a.createElement(C,{id:t,key:r,style:c,className:a,actionRef:w,request:function(){return be(i,{format:"blob"}).then((function(e){return y.current=e.x,{bgUrl:e.bgUrl,puzzleUrl:e.puzzleUrl}}))},onVerify:function(){var e,t=(e=we().m((function e(t){return we().w((function(e){for(;;)switch(e.n){case 0:if(!(t.x>=y.current-s&&t.x<y.current+s)){e.n=1;break}return g({verifyResult:{status:"success",timestamp:Date.now()}}),e.a(2,Promise.resolve());case 1:return g({verifyResult:{status:"error",timestamp:Date.now()}}),e.a(2,Promise.reject())}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var c=e.apply(t,r);function a(e){je(c,n,o,a,i,"next",e)}function i(e){je(c,n,o,a,i,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}(),bgSize:{width:l,height:u},mode:d,tipText:f,showRefreshIcon:p,autoRefreshOnError:h,errorHoldDuration:m,placement:v,"data-dash-is-loading":Object(ge.d)()})};t.default=Oe;Oe.defaultProps=ye.b,Oe.propTypes=ye.c},621:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return s})),r.d(t,"e",(function(){return n}));var n="undefined",o=Object.prototype,c=o.toString,a=(o.hasOwnProperty,o.propertyIsEnumerable,Object.getOwnPropertySymbols,Object.getPrototypeOf,Object.keys,Function.prototype.toString,typeof Symbol!==n&&Symbol.prototype,Array.prototype.slice,Math.min,Math.max,Math.random),i=(Math.floor,Math.ceil,Math.abs,Number.isFinite,Number.isInteger,Number.isSafeInteger,"object"==typeof globalThis&&globalThis,"object"==typeof self&&self,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,"[object "),s=i+"String]",l=(["Function","AsyncFunction","GeneratorFunction","Proxy"].map((function(e){return i+e+"]"})),i+"Blob]")}).call(this,r(36))}}]);
|
|
3
3
|
//# sourceMappingURL=async-feffery_slider_captcha.js.map
|
|
4
4
|
//# sourceMappingURL=async-feffery_slider_captcha.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/
|
|
1
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|