D;L=0<=D?++W:--W)y[I]=x*h>>O,y[I+1]=u*h>>O,y[I+2]=a*h>>O,x-=w,u-=s,a-=i,w-=T.r,s-=T.g,i-=T.b,m=z+((m=L+e+1)D;L=0<=D?++Y:--Y){for(c=t=_=u=a=x=0,w=E*(v=y[I=L<<2]),s=E*(b=y[I+1]),i=E*(g=y[I+2]),x+=A*v,u+=A*b,a+=A*g,S=R,d=V=0;0<=E?VE;d=0<=E?++V:--V)S.r=v,S.g=b,S.b=g,S=S.next;for(F=D,d=X=1;1<=e?X<=e:X>=e;d=1<=e?++X:--X)I=F+L<<2,x+=(S.r=v=y[I])*(C=E-d),u+=(S.g=b=y[I+1])*C,a+=(S.b=g=y[I+2])*C,_+=v,c+=b,t+=g,S=S.next,df;M=0<=f?++q:--q)y[m=I<<2]=x*h>>O,y[m+1]=u*h>>O,y[m+2]=a*h>>O,x-=w,u-=s,a-=i,w-=T.r,s-=T.g,i-=T.b,m=L+((m=M+E)
=0&&u.splice(t,1)}function g(e){var t=document.createElement("style");return e.attrs.type="text/css",b(t,e.attrs),h(e,t),t}function b(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function y(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=s++;n=c||(c=g(t)),r=w.bind(null,n,a,!1),o=w.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",b(t,e.attrs),h(e,t),t}(t),r=E.bind(null,n,t),o=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),r=x.bind(null,n),o=function(){m(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=d(e,t);return p(n,t),function(e){for(var r=[],o=0;o1||"string"!=typeof t||"r"!=t[0]&&"#"!=t[0]||"string"!=typeof n&&void 0!==n)return null;window.sbcRip||(window.sbcRip=function(e){var t=e.length,n=new Object;if(t>9){if((e=e.split(",")).length<3||e.length>4)return null;n[0]=r(e[0].slice(4)),n[1]=r(e[1]),n[2]=r(e[2]),n[3]=e[3]?parseFloat(e[3]):-1}else{if(8==t||6==t||t<4)return null;t<6&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+(t>4?e[4]+""+e[4]:"")),e=r(e.slice(1),16),n[0]=e>>16&255,n[1]=e>>8&255,n[2]=255&e,n[3]=9==t||5==t?o((e>>24&255)/255*1e4)/1e4:-1}return n});var r=parseInt,o=Math.round,i=t.length>9,a=(i="string"==typeof n?n.length>9||"c"==n&&!i:i,e<0),l=(e=a?-1*e:e,n=n&&"c"!=n?n:a?"#000000":"#FFFFFF",window.sbcRip(t)),c=window.sbcRip(n);return l&&c?i?"rgb("+o((c[0]-l[0])*e+l[0])+","+o((c[1]-l[1])*e+l[1])+","+o((c[2]-l[2])*e+l[2])+(l[3]<0&&c[3]<0?")":","+(l[3]>-1&&c[3]>-1?o(1e4*((c[3]-l[3])*e+l[3]))/1e4:c[3]<0?l[3]:c[3])+")"):"#"+(4294967296+16777216*(l[3]>-1&&c[3]>-1?o(255*((c[3]-l[3])*e+l[3])):c[3]>-1?o(255*c[3]):l[3]>-1?o(255*l[3]):255)+65536*o((c[0]-l[0])*e+l[0])+256*o((c[1]-l[1])*e+l[1])+o((c[2]-l[2])*e+l[2])).toString(16).slice(l[3]>-1||c[3]>-1?1:3):null}function g(e){return/^#?([a-f\d])([a-f\d])([a-f\d])$/i.test(e)||/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.test(e)}function b(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,r){return t+t+n+n+r+r}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}var y=function(e){if(!e)return null;var t=m(-.1,e)||"";return t.toLowerCase()===e.toLowerCase()?m(.25,e):t},v=function(e,t){if(!e)return null;var n=g(e)?e:m(0,e,"c");if(!n)return null;var r=b(n);return r?"rgba(".concat(r.r,", ").concat(r.g,", ").concat(r.b,", ").concat(t,")"):e},_=function(e,t,n){var r=e.sm,o=e.lg,i=r?"sm":o?"lg":"md";return f[t]&&f[t][i]&&f[t][i][n]},w=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"base",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=r?f.colors.base:null;return f.colors[t][i?i+(o?"er":""):n]};function x(e){var t="";switch(e){case"watermark":t="\\e918";break;case"reset":t="\\e912";break;case"flip-v":t="\\e916";break;case"flip-h":t="\\e914";break;case"cross":t="\\e90c";break;case"effects":t="\\e900";break;case"filters":t="\\e904";break;case"adjust":t="\\e90a";break;case"crop":t="\\e901";break;case"resize":t="\\e907";break;case"rotate":t="\\e90b";break;case"previous":t="\\e905";break;case"next":t="\\e906";break;case"ratio":t="\\e90e";break;case"no-ratio":t="\\e90f";break;case"left-rotate":t="\\e902";break;case"right-rotate":t="\\e908";break;case"focus_point":t="\\e919";break;case"shapes":t="\\e91b";break;case"image":t="\\e91a";break;case"text":t="T";break;default:return}return"\n :before {\n content: '".concat(t,"'\n }\n ")}"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(u,"commonTheme","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(f,"variables","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(p,"getModalWidth","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(d,"getFieldColorStyles","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(h,"getIconStyles","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(m,"shadeBlendConvert","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(g,"isHex","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(b,"hexToRgb","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(y,"getHoverColor","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(v,"getWithOpacity","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(_,"getElementStylesBySize","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(w,"getColor","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(x,"getIconByName","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"));function E(){var e=A(["\n text-transform: ",";\n height: 20px;\n line-height: 20px;\n"]);return E=function(){return e},e}function C(){var e=A(["\n background: url('","') 50% 50% / cover no-repeat;\n width: 55px;\n height: 55px;\n border-radius: 2px;\n overflow: hidden;\n display: inline-block;\n"]);return C=function(){return e},e}function O(){var e=A(["\n display: inline-block;\n vertical-align: top;\n padding: 10px;\n text-align: center;\n min-width: 90px;\n height: 90px;\n cursor: pointer;\n color: ",";\n font-size: 12px;\n background: ",";\n \n :hover {\n background: ",";\n }\n"]);return O=function(){return e},e}function S(){var e=A(["\n overflow-x: auto;\n overflow-y: hidden;\n white-space: nowrap;\n \n ::-webkit-scrollbar {\n height: 10px !important;\n }\n \n ::-webkit-scrollbar-thumb {\n background: #3b4d54;\n border-radius: 5px;\n }\n"]);return S=function(){return e},e}function k(){var e=A(["\n height: 20px;\n line-height: 20px;\n"]);return k=function(){return e},e}function T(){var e=A(["\n height: 40px;\n font-size: 40px;\n \n ","\n ","\n"]);return T=function(){return e},e}function j(){var e=A(["\n padding: 20px 10px;\n cursor: pointer;\n display: inline-block;\n min-width: 80px;\n min-height: 100px;\n text-align: center;\n font-size: 12px;\n color: ",";\n text-transform: ",";\n background: ",";\n \n :hover {\n color: ",";\n background: ",";\n }\n"]);return j=function(){return e},e}function R(){var e=A(["\n height: 100px;\n width: calc(100% - 200px);\n border-left: 1px solid ",";\n border-right: 1px solid ",";\n overflow-x: ",";\n overflow-y: ",";\n white-space: nowrap;\n \n ::-webkit-scrollbar {\n height: 10px !important;\n }\n \n ::-webkit-scrollbar-thumb {\n background: #3b4d54;\n border-radius: 5px;\n }\n \n @media (max-width: 768px) {\n width: 100%;\n height: initial;\n padding: 0 10px;\n }\n"]);return R=function(){return e},e}function A(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var D=a.b.div(R(),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.overlayYHidden?"auto":"none"}),(function(e){return e.overlayYHidden?"hidden":"visible"})),P=a.b.div(j(),(function(e){return e.theme.colors.text}),(function(e){return e.noCapitalStrs?"none":e.tt||"capitalize"}),(function(e){return e.active?e.theme.colors.secondaryBg:"inherit"}),(function(e){return e.theme.colors.textHover}),(function(e){return e.theme.colors.secondaryBg})),L=a.b.div(T(),(function(e){return h(e)}),(function(e){return x(e.name)})),M=a.b.div(k()),I=a.b.div(S()),F=a.b.div(O(),(function(e){return e.theme.colors.text}),(function(e){return e.active?e.theme.colors.secondaryBgHover:"transparent"}),(function(e){return e.theme.colors.secondaryBgHover})),z=a.b.div(C(),(function(e){return e.src})),H=a.b.div(E(),(function(e){return e.noCapitalStrs?"none":"capitalize"}));"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(D,"Toolbar","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(P,"ToolWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(L,"ToolIcon","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(M,"ToolLabel","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(I,"EffectsWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(F,"EffectWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(z,"EffectIcon","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(H,"EffectLabel","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"));function B(){var e=U(["\n position: relative;\n background: ",";\n z-index: 1050;\n width: 100%;\n height: 100%;\n min-height: 520px;\n overflow-y: auto;\n font-size: 12px;\n \n #scaleflex-image-edit-box-original {\n visibility: hidden;\n position: absolute;\n left: -99999px;\n display: none;\n }\n \n .cropper-container {\n direction: ltr;\n font-size: 0;\n line-height: 0;\n position: relative;\n -ms-touch-action: none;\n touch-action: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n \n .cropper-container img {/*Avoid margin top issue (Occur only when margin-top <= -height)*/\n display: block;\n height: 100%;\n image-orientation: 0deg;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n }\n \n .cropper-wrap-box,\n .cropper-canvas,\n .cropper-drag-box,\n .cropper-crop-box,\n .cropper-modal {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n }\n \n .cropper-wrap-box,\n .cropper-canvas {\n overflow: hidden;\n }\n \n .cropper-drag-box {\n background-color: #fff;\n opacity: 0;\n }\n \n .cropper-modal {\n background-color: #000;\n opacity: .5;\n }\n \n .cropper-view-box {\n display: block;\n height: 100%;\n outline-color: rgba(255, 255, 255, 0.75);\n outline: 1px solid #fff;\n overflow: hidden;\n width: 100%;\n ","\n }\n \n .cropper-dashed {\n border: 0 dashed #eee;\n display: block;\n opacity: .5;\n position: absolute;\n }\n \n .cropper-dashed.dashed-h {\n border-bottom-width: 1px;\n border-top-width: 1px;\n height: 33.33333%;\n left: 0;\n top: 33.33333%;\n width: 100%;\n }\n \n .cropper-dashed.dashed-v {\n border-left-width: 1px;\n border-right-width: 1px;\n height: 100%;\n left: 33.33333%;\n top: 0;\n width: 33.33333%;\n }\n \n .cropper-center {\n display: block;\n height: 0;\n left: 50%;\n opacity: .75;\n position: absolute;\n top: 50%;\n width: 0;\n }\n \n .cropper-center:before,\n .cropper-center:after {\n background-color: #fff;\n content: ' ';\n display: block;\n position: absolute;\n }\n \n .cropper-center:before {\n height: 1px;\n left: -10px;\n top: 0;\n width: 20px;\n }\n \n .cropper-center:after {\n height: 20px;\n left: 0;\n top: -10px;\n width: 1px;\n }\n \n .cropper-face,\n .cropper-line,\n .cropper-point {\n display: block;\n height: 100%;\n opacity: .1;\n position: absolute;\n width: 100%;\n }\n \n .cropper-face {\n background-color: #fff;\n left: 0;\n top: 0;\n ","\n }\n \n .cropper-line {\n background-color: #fff;\n }\n \n .cropper-line.line-e {\n cursor: ew-resize;\n right: -3px;\n top: 0;\n width: 5px;\n }\n \n .cropper-line.line-n {\n cursor: ns-resize;\n height: 5px;\n left: 0;\n top: -3px;\n }\n \n .cropper-line.line-w {\n cursor: ew-resize;\n left: -3px;\n top: 0;\n width: 5px;\n }\n \n .cropper-line.line-s {\n bottom: -3px;\n cursor: ns-resize;\n height: 5px;\n left: 0;\n }\n \n .cropper-point {\n background-color: #fff;\n height: 20px;\n opacity: .90;\n width: 20px;\n border-radius: 50%;\n \n &:before {\n content: '';\n display: table;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: black;\n opacity: 0.8;\n z-index: 11;\n position: absolute;\n top: calc(50% - 4px);\n left: calc(50% - 4px);\n }\n }\n \n .cropper-point.point-e {\n cursor: ew-resize;\n margin-top: -10px;\n right: -10px;\n top: 50%;\n }\n \n .cropper-point.point-n {\n cursor: ns-resize;\n left: 50%;\n margin-left: -10px;\n top: -10px;\n }\n \n .cropper-point.point-w {\n cursor: ew-resize;\n left: -10px;\n margin-top: -10px;\n top: 50%;\n }\n \n .cropper-point.point-s {\n bottom: -10px;\n cursor: s-resize;\n left: 50%;\n margin-left: -10px;\n }\n \n .cropper-point.point-ne {\n cursor: nesw-resize;\n right: -10px;\n top: -10px;\n }\n \n .cropper-point.point-nw {\n cursor: nwse-resize;\n left: -10px;\n top: -10px;\n }\n \n .cropper-point.point-sw {\n bottom: -10px;\n cursor: nesw-resize;\n left: -10px;\n }\n \n .cropper-point.point-se {\n bottom: -10px;\n cursor: nwse-resize;\n height: 20px;\n right: -10px;\n width: 20px;\n }\n \n .cropper-point.point-se:before {\n content: '';\n display: table;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: black;\n opacity: 0.8;\n z-index: 11;\n position: absolute;\n top: calc(50% - 4px);\n left: calc(50% - 4px);\n }\n \n .cropper-invisible {\n opacity: 0;\n }\n \n .cropper-bg {\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');\n }\n \n .cropper-hide {\n display: block;\n height: 0;\n position: absolute;\n width: 0;\n }\n \n .cropper-hidden {\n display: none !important;\n }\n \n .cropper-move {\n cursor: move;\n }\n \n .cropper-crop {\n cursor: crosshair;\n }\n \n .cropper-disabled .cropper-drag-box,\n .cropper-disabled .cropper-face,\n .cropper-disabled .cropper-line,\n .cropper-disabled .cropper-point {\n cursor: not-allowed;\n }\n \n @media (max-width: 768px) {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n }\n"]);return B=function(){return e},e}function N(){var e=U(["\n height: 100%;\n width: 100%;\n overflow-y: auto;\n\n *, *:after, *:before, *::after, *::before {\n box-sizing: border-box;\n }\n *:after, *:before, *::after, *::before {\n padding: 0;\n margin: 0;\n outline: 0;\n box-sizing: border-box;\n }\n\n /* cyrillic-ext */\n @font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 400;\n src: local('Roboto Mono'), local('RobotoMono-Regular'), url(https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY_ZraR2Tg8w2lzm7kLNL0-w.woff2) format('woff2');\n unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;\n }\n /* cyrillic */\n @font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 400;\n src: local('Roboto Mono'), local('RobotoMono-Regular'), url(https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY14sYYdJg5dU2qzJEVSuta0.woff2) format('woff2');\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n }\n /* greek-ext */\n @font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 400;\n src: local('Roboto Mono'), local('RobotoMono-Regular'), url(https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY1BW26QxpSj-_ZKm_xT4hWw.woff2) format('woff2');\n unicode-range: U+1F00-1FFF;\n }\n /* greek */\n @font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 400;\n src: local('Roboto Mono'), local('RobotoMono-Regular'), url(https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpYwt_Rm691LTebKfY2ZkKSmI.woff2) format('woff2');\n unicode-range: U+0370-03FF;\n }\n /* vietnamese */\n @font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 400;\n src: local('Roboto Mono'), local('RobotoMono-Regular'), url(https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY9DiNsR5a-9Oe_Ivpu8XWlY.woff2) format('woff2');\n unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 400;\n src: local('Roboto Mono'), local('RobotoMono-Regular'), url(https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY6E8kM4xWR1_1bYURRojRGc.woff2) format('woff2');\n unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 400;\n src: local('Roboto Mono'), local('RobotoMono-Regular'), url(https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY4gp9Q8gbYrhqGlRav_IXfk.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;\n }\n"]);return N=function(){return e},e}function U(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var W=Object(a.b)("div")(N()),Y=a.b.div(B(),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.roundCrop&&"border-radius: 50%;"}),(function(e){return e.roundCrop&&"\n border-radius: 50%;\n box-shadow: 0 0 80px 15px #000;\n border: 2px solid #000;"}));"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(W,"Container","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/ImageEditor.ui.js"),__REACT_HOT_LOADER__.register(Y,"Wrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/ImageEditor.ui.js"));function V(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function X(){var e=re(["\n margin-left: 8px;\n display: inline-block;\n vertical-align: middle;\n color: ",";\n margin-bottom: 3px;\n cursor: pointer;\n"]);return X=function(){return e},e}function q(){var e=re(["\n display: inline-block;\n vertical-align: middle;\n line-height: 30px;\n margin-right: 10px;\n float: right;\n"]);return q=function(){return e},e}function K(){var e=re(["\n display: block; \n width: 10px;\n height: 10px;\n margin: 5.5px;\n background: ",";\n position: absolute; top: 0; bottom: 0;\n right: ",";\n border: 1px solid ","; \n border-radius: 12px;\n transition: all 0.3s ease-in 0s;\n"]);return K=function(){return e},e}function Q(){var e=re(["\n display: block; \n width: 200%; \n margin-left: ",';\n transition: margin 0.3s ease-in 0s;\n \n &:before, &:after {\n display: block; float: left; width: 50%; height: 19px; padding: 0; line-height: 19px;\n font-size: 10px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;\n box-sizing: border-box;\n }\n \n &:before {\n content: "ON";\n padding-left: 10px !important;\n background-color: #01717d; \n color: #fff;\n }\n \n &:after {\n content: "OFF";\n padding-right: 10px !important;\n background-color: ',"; \n color: #aaa;\n text-align: right;\n }\n"]);return Q=function(){return e},e}function $(){var e=re(["\n display: block; \n overflow: hidden; \n cursor: pointer;\n border: 1px solid ","; \n border-radius: 4px;\n margin: 0;\n"]);return $=function(){return e},e}function G(){var e=re(["\n display: none;\n \n :checked + .onoffswitch-label .onoffswitch-inner {\n margin-left: 0;\n}\n"]);return G=function(){return e},e}function Z(){var e=re(["\n position: relative; \n display: inline-block;\n vertical-align: middle;\n width: 60px;\n margin-bottom: 2px;\n -webkit-user-select: none; \n -moz-user-select: none; \n -ms-user-select: none;\n"]);return Z=function(){return e},e}function J(){var e=re(["\n ","\n ","\n \n ","\n"]);return J=function(){return e},e}function ee(){var e=re(["\n ","\n ","\n \n ","\n"]);return ee=function(){return e},e}function te(){var e=re(["\n ","\n ","\n \n ","\n"]);return te=function(){return e},e}function ne(){var e=re(["\n background: ",";\n height: 34px;\n position: relative;\n z-index: 1;\n"]);return ne=function(){return e},e}function re(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var oe=a.b.div(ne(),(function(e){return e.theme.colors.secondaryBg})),ie=a.b.div(te(),(function(e){return h(e)}),x("previous"),(function(e){return ge(e)})),ae=a.b.div(ee(),(function(e){return h(e)}),x("next"),(function(e){return ge(e)})),le=a.b.div(J(),(function(e){return h(e)}),x("reset"),(function(e){return ge(e)})),ce=a.b.div(Z()),se=a.b.input(G()),ue=a.b.label($(),(function(e){return e.theme.colors.border})),fe=a.b.span(Q(),(function(e){return e.checked?"0":"-100%"}),(function(e){return e.theme.colors.primaryBg})),pe=a.b.span(K(),(function(e){return e.theme.colors.secondaryBg}),(function(e){return e.checked?"0":"37px"}),(function(e){return e.theme.colors.secondaryBg})),de=Object(a.b)("div").attrs((function(){return{className:"cloudimage-url-generator-switch"}}))(q()),he=Object(a.b)("div")(X(),(function(e){return e.theme.colors.text})),me=function(e){var t=e.id,n=e.handleChange,r=e.text,o=e.checked,a=e.style;V(e,["id","handleChange","text","checked","style"]);return i.a.createElement(de,{style:a},i.a.createElement(ce,null,i.a.createElement(se,{type:"checkbox",name:t,id:t,onChange:function(){n(!o)},checked:o}),i.a.createElement(ue,{htmlFor:t},i.a.createElement(fe,{checked:o}),i.a.createElement(pe,{checked:o}))),r&&i.a.createElement(he,{onClick:function(){n(!o)}},r))};function ge(e){return"\n display: inline-block;\n height: 34px;\n width: 34px;\n cursor: ".concat(e.muted?"not-allowed":"pointer",";\n text-align: center;\n line-height: 34px;\n border-right: 1px solid ").concat(e.theme.colors.border,";\n \n :hover {\n background: ").concat(e.muted?"inherit":e.theme.colors.secondaryBgHover,";\n }\n ")}"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(oe,"Footer","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(ie,"PreviousBtn","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(ae,"NextBtn","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(le,"ResetBtn","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(ce,"SwitcherWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(se,"SwitcherInput","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(ue,"SwitcherLabel","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(fe,"SwitcherInner","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(pe,"SwitcherSwitch","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(de,"SwitcherBlock","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(he,"SwitcherText","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(me,"Switcher","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(ge,"getActionIconStyle","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"));function be(){var e=Se(["\n display: ",";\n max-height: 100%;\n max-width: 100%;\n vertical-align: middle;\n"]);return be=function(){return e},e}function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(){return(_e=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function xe(){var e=Se(["\n width: ","px;\n height: ","px;\n display: inline-block;\n max-height: 100%;\n max-width: 100%;\n vertical-align: middle;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n outline: 0;\n"]);return xe=function(){return e},e}function Ee(){var e=Se(["\n display: inline-block;\n max-height: 100%;\n max-width: 100%;\n /*width: 100%;*/\n height: 100%;\n vertical-align: middle;\n\n ","\n\n /* Limit image width to avoid overflow the container */\n img {\n max-width: 100% !important; /* This rule is very important, please do not ignore this! */\n }\n\n #scaleflex-image-edit-box {\n display: ",";\n max-height: 100%;\n max-width: 100%;\n vertical-align: middle;\n }\n\n ","\n"]);return Ee=function(){return e},e}function Ce(){var e=Se(["\n display: inline-block;\n vertical-align: middle;\n width: 100%;\n"]);return Ce=function(){return e},e}function Oe(){var e=Se(["\n height: calc(100% - 170px);\n text-align: center;\n line-height: calc(100% - 170px);\n padding: 20px;\n position: relative;\n\n :before {\n content: '';\n display: inline-block;\n height: 100%;\n vertical-align: middle;\n }\n"]);return Oe=function(){return e},e}function Se(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ke=a.b.div(Oe()),Te=Object(a.b)("div")(Ce()),je=a.b.div(Ee(),(function(e){return e.hideCanvas?"\n canvas {\n position: relative;\n left: -9999px;\n }\n ":"\n :before {\n content: '';\n display: inline-block;\n height: 100%;\n vertical-align: middle;\n }"}),(function(e){return e.hide?"none":"inline-block"}),(function(e){return e.isShowWatermark&&"\ncanvas:after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: red;\n opacity: 0.5;\n }"})),Re=Object(a.b)("canvas")(xe(),(function(e){return e.width||0}),(function(e){return e.height||0})),Ae=Object(a.b)(i.a.forwardRef((function(e,t){e.width,e.height;var n=we(e,["width","height"]);return i.a.createElement("div",_e({className:"focus-point"},n,{ref:t}))})))((function(e){return{width:e.width,height:e.height,position:"absolute",margin:"auto",top:0,bottom:0,left:0,right:0,display:"inline-block",maxHeight:"100%",maxWidth:"100%",verticalAlign:"middle"}})),De=Object(a.b)((function(e){e.image;var t=we(e,["image"]);return i.a.createElement("div",t)}))((function(e){var t=e.image;return function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"base",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=r?f.colors.base:null;return f.colors[t][i?i+(o?"er":""):n]}function Ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"base",n=e.light?"light":e.dark?"dark":null,r="base"!==t,o=f.colors.base;return n?f.colors[n][r?o:"base"]:f.colors.link[t]}"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Fe,"Button","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Button.js"),__REACT_HOT_LOADER__.register(ze,"getElementStylesBySize","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Button.js"),__REACT_HOT_LOADER__.register(He,"isDisabled","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Button.js"),__REACT_HOT_LOADER__.register(Be,"getButtonStyles","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Button.js"),__REACT_HOT_LOADER__.register(Ne,"getColor","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Button.js"),__REACT_HOT_LOADER__.register(Ue,"getLinkColor","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Button.js"));function We(){var e=Ze(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100px;\n background: ",";\n \n @media (max-width: 768px) {\n flex-direction: column;\n height: initial;\n }\n"]);return We=function(){return e},e}function Ye(){var e=Ze(["\n right: 0;\n"]);return Ye=function(){return e},e}function Ve(){var e=Ze(["\n display: ",";\n flex-direction: column;\n justify-content: center;\n left: 0;\n top: 0;\n bottom: 0;\n \n ",":nth-child(2) {\n margin-top: 5px;\n }\n"]);return Ve=function(){return e},e}function Xe(){var e=Ze(["\n background: ",";\n border-color: ",";\n color: ",";\n text-transform: ",";\n \n :hover {\n background: ",";\n border-color: ",";\n color: ","; \n }\n"]);return Xe=function(){return e},e}function qe(){var e=Ze(["\n display: inline-block;\n position: absolute;\n top: calc(50% - 20px);\n text-align: center;\n width: 100px;\n padding: 10px 10px 5px;\n \n @media (max-width: 768px) {\n position: initial;\n width: 50%;\n }\n"]);return qe=function(){return e},e}function Ke(){var e=Ze(["\n @media (max-width: 768px) {\n display: flex;\n justify-content: center;\n width: 100%;\n }\n"]);return Ke=function(){return e},e}function Qe(){var e=Ze(["\n text-align: center;\n text-transform: ",";\n color: ","\n"]);return Qe=function(){return e},e}function $e(){var e=Ze(["\n line-height: 35px;\n border-bottom: 1px solid ",";\n background: ",";\n"]);return $e=function(){return e},e}function Ge(){var e=Ze(["\n background: ",";\n"]);return Ge=function(){return e},e}function Ze(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Je=a.b.div(Ge(),(function(e){return e.theme.colors.secondaryBg})),et=a.b.div($e(),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.theme.colors.primaryBg})),tt=a.b.div(Qe(),(function(e){return e.noCapitalStrs?"none":"capitalize"}),(function(e){return e.theme.colors.text})),nt=Object(a.b)("div")(Ke()),rt=Object(a.b)("div")(qe()),ot=Object(a.b)(Fe)(Xe(),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.theme.colors.text}),(function(e){return e.noCapitalStrs?"none":"capitalize"}),(function(e){return y(e.theme.colors.primaryBg)}),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.theme.colors.text})),it=Object(a.b)(rt)(Ve(),(function(e){return e.hide?"none":"flex"}),ot),at=Object(a.b)(rt)(Ye()),lt=a.b.div(We(),(function(e){return e.theme.colors.secondaryBg}));"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Je,"HeaderWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(et,"HeaderTop","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(tt,"Title","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(nt,"ActionsWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(rt,"Actions","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(ot,"CancelBtn","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(it,"LeftActions","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(at,"RightActions","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(lt,"ToolbarWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"));function ct(){var e=Ct(["\n height: 20px;\n line-height: 20px;\n"]);return ct=function(){return e},e}function st(){var e=Ct(["\n display: inline-block;\n vertical-align: middle;\n height: 50px;\n"]);return st=function(){return e},e}function ut(){var e=Ct(["\n height: 50px;\n line-height: 50px;\n"]);return ut=function(){return e},e}function ft(){var e=Ct(["\n height: ","px;\n border: 1px solid ",";\n width: ","px;\n margin: 0 auto;\n display: inline-block;\n vertical-align: middle;\n ","\n"]);return ft=function(){return e},e}function pt(){var e=Ct(["\n padding: 15px 0;\n height: 90px;\n line-height: 100px;\n"]);return pt=function(){return e},e}function dt(){var e=Ct(["\n display: inline-block;\n vertical-align: top;\n text-align: center;\n padding: 0 20px;\n cursor: pointer;\n background: ","\n"]);return dt=function(){return e},e}function ht(){var e=Ct(["\n cursor: pointer;\n position: relative;\n font-weight: bold;\n font-size: ",";\n\n ","\n ","\n \n color: ","\n"]);return ht=function(){return e},e}function mt(){var e=Ct(["\n padding: 0;\n \n > span {\n color: "," !important;\n }\n"]);return mt=function(){return e},e}function gt(){var e=Ct(["\n display: inline-block;\n padding: 0 5px;\n"]);return gt=function(){return e},e}function bt(){var e=Ct(["\n display: inline-block;\n width: ",";\n height: 30px;\n padding: 6px 12px;\n font-size: 12px;\n line-height: 1;\n color: ",";\n background: ",";\n border-radius: 3px;\n box-shadow: rgba(0, 0, 0, 0.5) 0px 1px 1px inset, rgba(82, 104, 109, 0.4) 0px 1px 0px;\n transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;\n vertical-align: middle;\n border: 0px solid transparent;\n font-family: Roboto, sans-serif;\n \n :hover {\n outline: none;\n }\n \n :focus {\n border: 1px solid ",";\n outline: none;\n box-shadow: rgba(0, 112, 124, 0.5) 0px 1px 1px inset, rgba(0, 112, 124, 0.4) 0px 1px 0px;\n }\n"]);return bt=function(){return e},e}function yt(){var e=Ct(["\n display: inline-block;\n width: ",";\n height: 30px;\n padding: 6px 12px;\n font-size: 12px;\n line-height: 30px;\n color: ",";\n background: ",";\n border-radius: 3px;\n box-shadow: rgba(0, 0, 0, 0.5) 0px 1px 1px inset, rgba(82, 104, 109, 0.4) 0px 1px 0px;\n transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;\n vertical-align: middle;\n border: 0px solid transparent;\n font-family: Roboto, sans-serif;\n \n ","\n \n :hover {\n outline: none;\n }\n \n :focus {\n border: 1px solid ",";\n outline: none;\n box-shadow: rgba(0, 112, 124, 0.5) 0px 1px 1px inset, rgba(0, 112, 124, 0.4) 0px 1px 0px;\n }\n"]);return yt=function(){return e},e}function vt(){var e=Ct(["\n display: block;\n margin-bottom: 5px;\n line-height: 15px;\n"]);return vt=function(){return e},e}function _t(){var e=Ct(["\n display: inline-block;\n width: 100px;\n padding-top: 10px;\n text-align: center;\n"]);return _t=function(){return e},e}function wt(){var e=Ct(["\n display: block;\n color: ",";\n height: 30px;\n line-height: 30px;\n"]);return wt=function(){return e},e}function xt(){var e=Ct(["\n @media (max-width: 768px) {\n width: 100%;\n overflow-x: scroll;\n }\n"]);return xt=function(){return e},e}function Et(){var e=Ct(["\n color: ",";\n display: flex;\n \n ::-webkit-scrollbar {\n height: 10px !important;\n }\n \n ::-webkit-scrollbar-thumb {\n background: #3b4d54;\n border-radius: 5px;\n }\n \n @media (min-widthL 768px) {\n overflow-x: auto;\n overflow-y: hidden;\n white-space: nowrap;\n }\n \n @media (max-width: 768px) {\n flex-direction: column;\n }\n"]);return Et=function(){return e},e}function Ct(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ot=a.b.div(Et(),(function(e){return e.theme.colors.text})),St=Object(a.b)("div")(xt()),kt=a.b.div(wt(),(function(e){return e.theme.colors.text})),Tt=a.b.div(_t()),jt=a.b.label(vt()),Rt=a.b.input.attrs((function(e){return{type:e.type?e.type:"text"}}))(yt(),(function(e){return e.fullSize?"100%":e.theme.fieldWidth}),(function(e){return e.theme.colors.text}),(function(e){return e.dark?e.theme.colors.primaryBg:e.theme.colors.secondaryBgHover}),(function(e){return"number"===e.type&&"::-webkit-inner-spin-button {\n -webkit-appearance: none;\n }"}),(function(e){return e.theme.colors.secondaryBg})),At=Object(a.b)("input").attrs((function(e){return{type:e.type?e.type:"file"}}))(bt(),(function(e){return e.fullSize?"100%":e.theme.fieldWidth}),(function(e){return e.theme.colors.text}),(function(e){return e.dark?e.theme.colors.primaryBg:e.theme.colors.secondaryBgHover}),(function(e){return e.theme.colors.secondaryBg})),Dt=a.b.div(gt()),Pt=Object(a.b)(Fe)(mt(),(function(e){return e.active?e.theme.colors.text:e.theme.colors.textMute})),Lt=a.b.span(ht(),(function(e){return e.fz||"28px"}),(function(e){return h(e)}),(function(e){return x(e.active?"ratio":"no-ratio")}),(function(e){return e.theme.textMuted})),Mt=a.b.div(dt(),(function(e){return e.active?e.theme.colors.secondaryBgHover:"transparent"})),It=a.b.div(pt()),Ft=a.b.div(ft(),(function(e){return Ut(e.ratio)}),(function(e){return e.theme.textColor}),(function(e){return Nt(e.ratio)}),(function(e){var t=e.radius;return t&&"border-radius: ".concat(t,"%;")})),zt=Object(a.b)("div")(ut()),Ht=Object(a.b)("div")(st()),Bt=a.b.div(ct()),Nt=function(e){var t=50*e;return t>200&&(t=200),t},Ut=function(e){var t=50;return 50*e>200&&(t=200/e),t};"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Ot,"CropWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(St,"PresetsWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(kt,"CustomLabel","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Tt,"FieldSet","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(jt,"FieldLabel","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Rt,"FieldInput","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(At,"FileInput","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Dt,"BlockRatioWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Pt,"BlockRatioBtn","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Lt,"BlockRatioIcon","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Mt,"CropBox","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(It,"CropBoxInner","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Ft,"CropShape","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(zt,"CropShapeWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Ht,"ShapeAligner","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Bt,"CropLabel","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Nt,"getWidthOfShape","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Ut,"getHeightOfShape","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"));function Wt(){var e=$t(["\n display: inline-block;\n background: ",";\n padding: 15px;\n margin: 5px;\n border-radius: 4px;\n cursor: pointer;\n \n :hover {\n background: ",";\n }\n"]);return Wt=function(){return e},e}function Yt(){var e=$t(["\n display: inline-block;\n"]);return Yt=function(){return e},e}function Vt(){var e=$t(["\n max-width: 600px;\n margin: 15px auto;\n background: ",";\n border-radius: 4px;\n padding: 15px;\n \n h4 {\n line-height: 1.4;\n font-size: 16px;\n color: ",";\n }\n"]);return Vt=function(){return e},e}function Xt(){var e=$t(["\n color: ",";\n font-size: 14px;\n max-width: 600px;\n line-height: 1.4;\n margin: 0 auto;\n background: ",";\n border-radius: 4px;\n padding: 15px 15px 15px 55px;\n position: relative;\n font-weight: normal;\n text-align: left;\n \n :before {\n content: '\\e917';\n font-family: filerobot-image-editor-font;\n position: absolute;\n font-size: 20px;\n line-height: 20px;\n left: 20px;\n top: 50%;\n margin-top: -10px;\n }\n"],["\n color: ",";\n font-size: 14px;\n max-width: 600px;\n line-height: 1.4;\n margin: 0 auto;\n background: ",";\n border-radius: 4px;\n padding: 15px 15px 15px 55px;\n position: relative;\n font-weight: normal;\n text-align: left;\n \n :before {\n content: '\\\\e917';\n font-family: filerobot-image-editor-font;\n position: absolute;\n font-size: 20px;\n line-height: 20px;\n left: 20px;\n top: 50%;\n margin-top: -10px;\n }\n"]);return Xt=function(){return e},e}function qt(){var e=$t(["\n button {\n min-width: 240px;\n }\n"]);return qt=function(){return e},e}function Kt(){var e=$t(["\n display: inline-block;\n \n @media (min-width: 768px) {\n width: 300px;\n padding: 20px;\n height: 100px;\n }\n"]);return Kt=function(){return e},e}function Qt(){var e=$t(["\n color: ",";\n text-align: center;\n \n @media (max-width: 768px) {\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n"]);return Qt=function(){return e},e}function $t(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Gt=a.b.div(Qt(),(function(e){return e.theme.colors.text})),Zt=a.b.div(Kt()),Jt=Object(a.b)("div")(qt()),en=Object(a.b)("p")(Xt(),(function(e){return e.theme.colors.textWarn}),(function(e){return e.theme.colors.secondaryBg})),tn=Object(a.b)("div")(Vt(),(function(e){return e.theme.colors.secondaryBg}),(function(e){return e.theme.colors.text})),nn=Object(a.b)("div")(Yt()),rn=Object(a.b)("div")(Wt(),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.theme.colors.primaryBgHover}));"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Gt,"ResizeWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(Zt,"ResizeBox","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(Jt,"PreResizeActions","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(en,"PreResizeWarning","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(tn,"PreResizeInner","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(nn,"SuggestionsBox","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(rn,"SuggestionOption","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"));function on(){var e=pn(["\n @media (max-width: 768px) {\n width: 50%;\n margin-right: 0 !important;\n }\n"]);return on=function(){return e},e}function an(){var e=pn(["\n ","\n ","\n height: 16px;\n font-size: 16px;\n margin-top: -4px;\n display: inline-block;\n vertical-align: middle;\n color: ",";\n margin-right: 5px;\n"]);return an=function(){return e},e}function ln(){var e=pn(["\n display: flex;\n width: 100%;\n flex-wrap: wrap;\n justify-content: center;\n"]);return ln=function(){return e},e}function cn(){var e=pn(["\n margin-top: 10px;\n width: 100%;\n \n button {\n text-transform: none;\n font-size: 12px;\n min-width: 142px;\n margin-right: 5px;\n }\n \n button:focus, button:active {\n outline: none !important;\n box-shadow: none !important;\n }\n"]);return cn=function(){return e},e}function sn(){var e=pn(["\n\n"]);return sn=function(){return e},e}function un(){var e=pn(["\n display: inline-block;\n width: 100%;\n //padding: 20px;\n"]);return un=function(){return e},e}function fn(){var e=pn(["\n color: ",";\n text-align: center;\n \n svg {\n margin-top: -7px;\n width: 750px;\n \n text {\n font-size: 2px;\n }\n }\n \n .image-editor-range-wrapper {\n width: 280px;\n padding: 0;\n margin: 12px auto 0;\n \n input#range {\n background: none;\n width: 280px;\n \n &::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 9px;\n height: 18px;\n border-radius: 50%;\n background: ",";\n }\n \n &::-moz-range-thumb {\n border: none;\n width: 9px;\n height: 18px;\n border-radius: 50%;\n background: ",";\n cursor: pointer;\n }\n }\n \n label {\n display: none;\n }\n \n :after {\n display: none;\n }\n }\n \n @media (max-width: 768px) {\n svg {\n width: 100%;\n }\n }\n"]);return fn=function(){return e},e}function pn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var dn=a.b.div(fn(),(function(e){return e.theme.colors.text}),(function(e){return e.theme.colors.text}),(function(e){return e.theme.colors.text})),hn=a.b.div(un()),mn=a.b.div(sn()),gn=a.b.div(cn()),bn=Object(a.b)("div")(ln()),yn=a.b.span(an(),(function(e){return h(e)}),(function(e){return x(e.name)}),(function(e){return e.theme.colors.text})),vn=Object(a.b)(ot)(on());"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(dn,"OrientationWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(hn,"RotateWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(mn,"RotateLabel","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(gn,"RotateButton","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(bn,"ButtonGroup","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(yn,"RotateIcon","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(vn,"DarkBtn","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"));function _n(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n color: ",";\n text-align: center;\n display: flex;\n justify-content: center;\n \n @media (max-width: 768px) {\n flex-wrap: wrap;\n \n .image-editor-range-wrapper {\n width: 50%;\n \n input {\n width: 100% !important;\n }\n }\n }\n"]);return _n=function(){return e},e}var wn=a.b.div(_n(),(function(e){return e.theme.colors.text}));"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(wn,"AdjustWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Adjust.ui.js");function xn(){var e=Cn(["\n position: absolute;\n z-index: 999;\n top: 36px;\n left: 0;\n right: 0;\n height: 104px;\n cursor: not-allowed;\n"]);return xn=function(){return e},e}function En(){var e=Cn(["\n position: absolute;\n z-index: 999;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n cursor: wait;\n"]);return En=function(){return e},e}function Cn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var On=a.b.div(En()),Sn=Object(a.b)("div")(xn());"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(On,"NoClickOverlay","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Common.ui.js"),__REACT_HOT_LOADER__.register(Sn,"NoClickToolbar","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Common.ui.js"));function kn(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n cursor: pointer;\n position: absolute;\n font-weight: normal;\n top: ",";\n right: ",";\n left: ",";\n bottom: ",";\n font-size: ",";\n z-index: 10;\n font-family: 'filerobot-image-editor-font' !important;\n color: ",";\n speak: none;\n font-style: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n \n :hover {\n color: ",";\n }\n \n :before {\n content: '\\e90c'\n }\n"],["\n cursor: pointer;\n position: absolute;\n font-weight: normal;\n top: ",";\n right: ",";\n left: ",";\n bottom: ",";\n font-size: ",";\n z-index: 10;\n font-family: 'filerobot-image-editor-font' !important;\n color: ",";\n speak: none;\n font-style: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n \n :hover {\n color: ",";\n }\n \n :before {\n content: '\\\\e90c'\n }\n"]);return kn=function(){return e},e}var Tn=a.b.span.attrs((function(){return{role:"button"}}))(kn(),(function(e){return e.t||"10px"}),(function(e){return e.r||"10px"}),(function(e){return e.l||"auto"}),(function(e){return e.b||"auto"}),(function(e){return e.fz||"18px"}),(function(e){return f.modal.colorMuted}),(function(e){return f.modal.colorMutedHover}));"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Tn,"CloseBtn","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/CloseBtn.js");function jn(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n cursor: pointer;\n position: absolute;\n font-weight: normal;\n top: ",";\n right: ",";\n left: ",";\n bottom: ",";\n font-size: ",";\n z-index: 10;\n font-family: 'filerobot-image-editor-font' !important;\n color: ",";\n speak: none;\n font-style: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n \n :hover {\n color: ",";\n }\n \n :before {\n content: '\\26F6'\n }\n"],["\n cursor: pointer;\n position: absolute;\n font-weight: normal;\n top: ",";\n right: ",";\n left: ",";\n bottom: ",";\n font-size: ",";\n z-index: 10;\n font-family: 'filerobot-image-editor-font' !important;\n color: ",";\n speak: none;\n font-style: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n \n :hover {\n color: ",";\n }\n \n :before {\n content: '\\\\26F6'\n }\n"]);return jn=function(){return e},e}var Rn=a.b.span.attrs((function(){return{role:"button"}}))(jn(),(function(e){return e.t||"10px"}),(function(e){return e.r||"35px"}),(function(e){return e.l||"auto"}),(function(e){return e.b||"auto"}),(function(e){return e.fz||"15px"}),(function(e){return f.modal.colorMuted}),(function(e){return f.modal.colorMutedHover}));"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Rn,"FullscreenBtn","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/FullscreenBtn.js");function An(){var e=Pn(["\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 200px;\n height: 200px;\n margin: auto;\n padding: 40px;\n border-radius: 50%;\n background: ",";\n \n .svg-spin-icon {\n fill: ",";\n }\n \n p {\n color: ",";\n }\n"]);return An=function(){return e},e}function Dn(){var e=Pn(["\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow: hidden;\n position: ",";\n background: "," !important;\n opacity: "," !important;\n z-index: 1042;\n"]);return Dn=function(){return e},e}function Pn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ln=a.b.div(Dn(),(function(e){return e.fullScreen?"fixed":"absolute"}),(function(e){return e.overlay?"rgba(10,10,10,0.26)":"transparent"}),(function(e){return e.overlay?"0.25":"0"})),Mn=Object(a.b)("div")(An(),(function(e){return e.theme.colors.secondaryBgOpacity}),(function(e){return e.theme.colors.text}),(function(e){return e.theme.colors.text})),In=function(e){return e.show?i.a.createElement(o.Fragment,null,i.a.createElement(Ln,{fullScreen:e.fullScreen,overlay:e.overlay}),i.a.createElement(Mn,null,i.a.createElement("svg",{id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 150 150",style:{enableBackground:"new 0 0 150 150"}},i.a.createElement("path",{className:"svg-spin-icon",d:"M74.9,14.8c-12.2,0-24.3,0-36.5,0c-2.4,0-3.9-1-4.8-3.1c-1.3-3-1.2-6,0.6-8.9c0.8-1.3,2-2,3.5-2\r c1.1,0,2.3,0,3.4,0c23.3,0,46.7,0,70-0.1c3.9,0,5.3,1.9,6,4.7c0.5,2.1,0.4,4.2-0.5,6.3c-0.9,2.2-2.5,3.1-4.8,3c-2.9,0-5.7,0-8.6,0\r C93.9,14.8,84.4,14.8,74.9,14.8z"}),i.a.createElement("path",{className:"svg-spin-icon",d:"M75.1,118.1c12,0,24,0,35.9,0c4,0,5.9,1.7,6.3,5.7c0.1,1.4,0,2.9-0.3,4.2c-0.7,2.9-2.4,4.1-5.3,4.1\r c-24.1,0-48.3,0-72.4,0c-3.7,0-5.4-1.2-6.3-5.3c-0.4-2-0.1-3.9,0.7-5.7c0.9-2,2.4-3.1,4.7-3C50.6,118.1,62.9,118.1,75.1,118.1z"}),i.a.createElement("path",{className:"svg-spin-icon",d:"M75.3,76.3c0.2,0.4,3.1,9.3,7.2,14.1c3.9,4.7,8.9,8.5,13,12.5c3.2,3.2,5.4,7,6.8,11.2c0.5,1.6,0.3,1.9-1.4,1.9\r c-17.3,0-34.5,0-51.8,0c-1.7,0-1.9-0.2-1.3-1.8c1.8-5.5,5.2-10,9.4-13.9c3.5-3.3,7.7-6.1,10.6-9.9c3.5-4.7,6.8-13.3,7.1-14.1\r C75.1,76.3,75.2,76.3,75.3,76.3z"}),i.a.createElement("path",{className:"svg-spin-icon",d:"M45.5,23.6c0,3.8-0.1,7.6,1.2,11.3c1,2.9,2.8,5.2,4.9,7.3c5,5.3,10.2,10.5,15.2,15.8c1.1,1.2,2,2.6,3.1,3.9\r c2,2.5,2.2,7.6-0.2,10.5c-1.8,2.2-3.6,4.3-5.5,6.4C59.5,84,54.7,89.1,50,94.2c-3.1,3.4-4.4,7.5-4.5,12c0,2.8-0.1,5.6,0,8.4\r c0,1-0.3,1.4-1.4,1.4c-1.7,0-2.3,0-3.7,0c-0.9,0-1.3-0.4-1.3-1.3c0-5-0.3-10,0.8-14.9c0.8-3.5,2.5-6.6,4.8-9.3\r c3.6-4.2,7.5-8.2,11.3-12.3c1.7-1.8,3.3-3.7,4.9-5.5c0.9-1,1.9-2,2.7-3c1.8-2.3,1.6-4.3-0.4-6.4c-5.2-5.4-10.4-11-15.8-16.3\r c-5.7-5.7-8.4-12.4-8.3-20.4c0-2.9,0-5.7,0-8.6c0-1.1,0.4-1.6,1.5-1.5c1.3,0,2.6,0,3.8,0c0.8,0,1.1,0.3,1.1,1.2\r C45.5,19.8,45.5,21.7,45.5,23.6z"}),i.a.createElement("path",{className:"svg-spin-icon",d:"M109.9,35.9c-0.6,2.7-2.1,5.3-3.9,7.5c-3.5,4.2-7.5,8.1-11.2,12.1c-3,3.2-5.9,6.5-8.8,9.7\r c-0.9,1-0.9,2.1-0.2,3.1c1.2,1.7,2.5,3.3,3.8,4.8c1.5,1.8,3,3.6,4.6,5.3c3.4,3.6,6.8,7.1,10.1,10.7c4.7,5.1,6.8,11.2,6.9,18.1\r c0,2.4,0,5,0,7.5c0,1.3-0.3,1.5-1.6,1.5c-1.3,0-2.1,0-3.3,0c-1.1,0-1.5-0.4-1.5-1.5c0-3.4-0.2-6.7-0.3-10.1\r c-0.1-4.1-1.9-7.5-4.5-10.5c-3.3-3.8-6.8-7.4-10.2-11.1c-3.3-3.5-6.9-6.6-9.3-10.8c-0.8-1.5-1.4-3.2-1.7-4.9c-0.4-2.1,0.7-4,1.9-5.5\r c3.1-3.8,6.5-7.4,9.8-11.1c2.9-3.2,6-6.2,9-9.3c3.5-3.6,5.1-8,5.2-13c0-3.4,0.1-6.7,0.1-10.1c0-1.1,0.3-1.5,1.3-1.4\r c1.2,0,2.4,0,3.6,0c1.2,0,1.6,0.5,1.6,1.6c-0.1,1.6,0,3.1,0,4.7C111.4,23,110.9,31.7,109.9,35.9z"}),i.a.createElement("path",{className:"svg-spin-icon",d:"M74.8,67.9c-0.2-1.3-1.1-5.7-1.5-7C71.4,54,59.7,44.3,54.3,39c-0.7-0.7-1.3-1.5-1.8-2.5\r c7.1,3.4,14.4,6.1,22.6,6.1c8.2,0,15.5-2.6,22.4-6.2c0.1,0.1,0.2,0.2,0.3,0.3c-0.5,0.6-0.9,1.2-1.4,1.8c-4.5,4.5-18.7,15.5-20,22.4\r c-0.2,0.8-1,6.2-1.2,7C75.1,67.9,75,67.9,74.8,67.9z"}),i.a.createElement("g",null)),i.a.createElement("p",{style:{textAlign:"center"}},e.label))):null};"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Ln,"SpinnerOverlay","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Spinner.js"),__REACT_HOT_LOADER__.register(Mn,"IconWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Spinner.js"),__REACT_HOT_LOADER__.register(In,"Spinner","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Spinner.js"));function Fn(){var e=Kn(["\n width: 200px;\n height: 70px;\n display: inline-block;\n vertical-align: middle;\n background: "," url(",") 50% 50% / contain no-repeat; \n margin: 10px;\n padding: 20px;\n border-radius: 4px;\n cursor: pointer;\n \n :hover {\n background-color: ",";\n }\n"]);return Fn=function(){return e},e}function zn(){var e=Kn(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n line-height: 100px;\n background: ",";\n"]);return zn=function(){return e},e}function Hn(){var e=Kn(["\n display: inline-block;\n vertical-align: middle;\n margin-left: 20px;\n cursor: pointer;\n"]);return Hn=function(){return e},e}function Bn(){var e=Kn(["\n width: 30px;\n height: 30px;\n display: inline-block;\n vertical-align: top;\n border: 1px solid ",";\n background: ",";\n cursor: ",";\n \n ","\n"]);return Bn=function(){return e},e}function Nn(){var e=Kn(["\n width: 100px;\n padding: 10px;\n display: inline-block;\n vertical-align: top;\n \n /* The container */\n label {\n display: block;\n position: relative;\n line-height: 12px;\n padding-left: 15px;\n margin-bottom: 12px;\n cursor: pointer;\n user-select: none;\n }\n \n /* Hide the browser's default radio button */\n label input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n }\n \n /* Create a custom radio button */\n span {\n position: absolute;\n top: 0;\n left: 0;\n height: 10px;\n width: 10px;\n background-color: ",";\n border-radius: 50%;\n }\n \n /* On mouse-over, add a grey background color */\n label:hover input ~ span {\n // background-color: #ccc;\n }\n \n /* When the radio button is checked, add a blue background */\n label input:checked ~ span {\n background-color: ",";\n }\n \n label input:checked ~ span:after {\n background-color: ",';\n }\n \n /* Create the indicator (the dot/circle - hidden when not checked) */\n span:after {\n content: "";\n position: absolute;\n display: none;\n }\n \n /* Show the indicator (dot/circle) when checked */\n label input:checked ~ span:after {\n display: block;\n }\n \n /* Style the indicator (dot/circle) */\n label span:after {\n top: 3px;\n left: 2px;\n width: 6px;\n height: 5px;\n border-radius: 50%;\n background: ',";\n }\n \n @media (max-width: 768px) {\n width: 100%\n \n label {\n display: inline-block;\n margin-right: 10px;\n }\n }\n"]);return Nn=function(){return e},e}function Un(){var e=Kn(["\n width: 100px;\n padding: 5px;\n display: inline-block;\n font-size: 0;\n \n div:nth-child(1) {\n border-radius: 4px 0 0 0;\n }\n \n div:nth-child(3) {\n border-radius: 0 4px 0 0;\n }\n \n div:nth-child(7) {\n border-radius: 0 0 0 4px;\n }\n \n div:nth-child(9) {\n border-radius: 0 0 4px 0;\n }\n"]);return Un=function(){return e},e}function Wn(){var e=Kn(["\n width: calc(100% - 200px);\n display: inline-block;\n vertical-align: top;\n \n @media (max-width: 768px) {\n width: 100%;\n }\n"]);return Wn=function(){return e},e}function Yn(){var e=Kn(["\n display: inline;\n vertical-align: middle;\n padding: 10px;\n\n label {\n min-width: 120px;\n display: inline-block;\n vertical-align: middle;\n }\n"]);return Yn=function(){return e},e}function Vn(){var e=Kn(["\n ","\n"]);return Vn=function(){return e},e}function Xn(){var e=Kn(["\n padding: 10px;\n \n label {\n min-width: 120px;\n display: inline-block;\n vertical-align: middle;\n margin: 0;\n }\n \n input {\n width: 100%;\n }\n"]);return Xn=function(){return e},e}function qn(){var e=Kn(["\n position: relative;\n color: ",";\n text-align: left;\n white-space: normal;\n \n .image-editor-range {\n display: inline-block;\n padding: 5px;\n vertical-align: middle;\n \n :after {\n display: none;\n }\n \n label {\n display: none;\n }\n }\n \n @media (max-width: 768px) { \n display: flex;\n flex-direction: column;\n align-items: center;\n \n .image-editor-range {\n width: 100%;\n \n input {\n width: 100% !important;\n }\n }\n }\n"]);return qn=function(){return e},e}function Kn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Qn=a.b.div(qn(),(function(e){return e.theme.colors.text})),$n=Object(a.b)("div")(Xn()),Gn=Object(a.b)("div")(Vn(),(function(e){return"right"===e.switcherPosition?".cloudimage-url-generator-switch {\n margin-left: 100px;\n margin-top: -6px;\n \n label {\n min-width: auto;\n }\n \n @media (max-width: 768px) {\n margin-left: 4px;\n }\n }":"padding: 10px;"})),Zn=Object(a.b)("div")(Yn()),Jn=Object(a.b)("div")(Wn()),er=Object(a.b)("div")(Un()),tr=Object(a.b)("div")(Nn(),(function(e){return e.theme.colors.text}),(function(e){return e.theme.colors.text}),(function(e){return e.theme.colors.accent}),(function(e){return e.theme.colors.text})),nr=Object(a.b)("div")(Bn(),(function(e){return e.theme.colors.secondaryBgHover}),(function(e){return e.clickable?e.active?e.theme.colors.accent:e.theme.colors.secondaryBg:e.theme.colors.disabledBg}),(function(e){return e.clickable?"pointer":"not-allowed"}),(function(e){if(0!==e.clickable&&!e.active)return"\n :hover {\n background: ".concat(e.theme.colors.primaryBg,";\n }\n ")})),rr=Object(a.b)("div")(Hn()),or=Object(a.b)("div")(zn(),(function(e){return e.theme.colors.secondaryBg})),ir=Object(a.b)("div")(Fn(),(function(e){return e.theme.colors.primaryBgHover}),(function(e){return e.src}),(function(e){return e.theme.colors.secondaryBgHover}));"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Qn,"WatermarkWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register($n,"WrapperForURL","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(Gn,"WrapperForControls","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(Zn,"WrapperForOpacity","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(Jn,"WatermarkInputs","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(er,"WatermarkPositionWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(tr,"WatermarkInputTypes","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(nr,"PositionSquare","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(rr,"SelectWatermarkLabel","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(or,"Watermarks","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(ir,"WatermarkIcon","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"));function ar(e){return(ar="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 lr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t1&&m)&&(-1!==h||1!==d.length);return i.a.createElement(oe,null,i.a.createElement(le,{muted:"preview"!==s,onClick:function(){"preview"===s&&c()},title:u["footer.reset"]}),i.a.createElement(ie,{onClick:function(){!g&&l({operationIndex:h-1,operationObject:cr(cr({},d[h]),{},{index:h})})},muted:g,title:u["footer.undo"]}),i.a.createElement(ae,{onClick:function(){!b&&l({operationIndex:h+1,operationObject:cr(cr({},d[h]),{},{index:h})})},muted:b,title:u["footer.redo"]}),f&&p&&i.a.createElement(me,{id:"switch-watermark-footer",checked:p&&p.applyByDefault,handleChange:this.onApplyWatermarkChange,text:u["common.apply_watermark"]}))}}])&&ur(t.prototype,n),r&&ur(t,r),a}(o.Component),yr=br,vr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(br,"default","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/components/Footer/Footer.js"),function(e){return e.url&&e.url.permalink?e.url.permalink:e.url_permalink?e.url_permalink:""}),_r=function(e){return e.url&&e.url.public?e.url.public:e.url_public?e.url_public:""},wr=("undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(vr,"getPermalink","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/adjust-api.js"),__REACT_HOT_LOADER__.register(_r,"getPubliclink","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/adjust-api.js")),function(e,t,n){t=t||"",n=n||512;for(var r=atob(e),o=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:"filerobot";return"filerobot"===t?"https://api.filerobot.com/".concat(e,"/v3/"):"https://".concat(e,".api.airstore.io/v1/")}),Or=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Cr,"getBaseUrl","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/get-base-url.js"),"filerobot-image-editor"),Sr="scaleflex-filerobot-shapes-edit-box",kr="scaleflex-image-edit-box",Tr="scaleflex-image-edit-box-original",jr=["adjust","effects","filters","rotate","crop","resize","watermark","shapes","image","text"],Rr=["edge_enhance","emboss","grungy","hazy","lomo","radial_blur","sin_city","tilt_shift"],Ar=["cross_process","glow_sun","jarques","love","old_boot","orange_peel","pin_hole","sepia","sun_rise","vintage"],Dr=["crop","resize","rotate","watermark","focus_point"],Pr=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],Lr={corners:[1,0,1,0,0,0,1,0,1],star:[0,1,0,1,1,1,0,1,0],center:[0,0,0,0,1,0,0,0,0],"top-row":[1,1,1,0,0,0,0,0,0],"center-row":[0,0,0,1,1,1,0,0,0],"bottom-row":[0,0,0,0,0,0,1,1,1]},Mr={opacity:.7,position:"center",url:"",applyByDefault:!1},Ir=[{name:"original",value:0},{name:"square",value:1},{name:"banner",value:7.8},{name:"round",value:1,radius:50},{name:"5 : 4",value:1.25},{name:"4 : 3",value:1.33333},{name:"6 : 4",value:1.5},{name:"16 : 9",value:1.7777}],Fr=[{name:"big square",width:600,height:600,ratio:1},{name:"middle square",width:400,height:400,ratio:1},{name:"small square",width:200,height:200,ratio:1},{name:"small size",width:1200,height:960,ratio:1.25},{name:"better quality",width:1920,height:1536,ratio:1.25},{name:"small size",width:1200,height:900,ratio:1.33333},{name:"better quality",width:1920,height:1440,ratio:1.33333},{name:"small size",width:1200,height:800,ratio:1.5},{name:"better quality",width:1920,height:1280,ratio:1.5},{name:"small size",width:1200,height:675,ratio:1.7777},{name:"better quality",width:1920,height:1080,ratio:1.7777},{name:"small banner",width:468,height:60,ratio:7.8},{name:"big banner",width:936,height:120,ratio:7.8}],zr=[{label:"Arial",value:"Arial"},{label:"Tahoma",value:"Tahoma"},{label:"Times New Roman",value:"Times New Roman"},{label:"Courier",value:"Courier"},{label:"Courier New",value:"Courier New"},{label:"Verdana",value:"Verdana"},{label:"Georgia",value:"Georgia"},{label:"Palatino",value:"Palatino"},{label:"Garamond",value:"Garamond"},{label:"Bookman",value:"Bookman"},{label:"Comic Sans MS",value:"Comic Sans MS"},{label:"Candara",value:"Candara"},{label:"Impact",value:"Impact"}],Hr=[{label:"Arial",value:"Arial"},{label:"Arial Bold",value:"Arial-Bold"},{label:"Arial Black",value:"Arial-Black"},{label:"AvantGarde Book",value:"AvantGarde-Book"},{label:"Bitstream Charter",value:"Bitstream-Charter"},{label:"Bitstream Charter Bold",value:"Bitstream-Charter-Bold"},{label:"Bookman Demi",value:"Bookman-Demi"},{label:"Comic Sans MS",value:"Comic-Sans-MS"},{label:"Courier",value:"Courier"},{label:"Courier Bold",value:"Courier-Bold"},{label:"Courier New",value:"Courier-New\t"},{label:"Courier New Bold",value:"Courier-New-bold"},{label:"DejaVu Sans",value:"DejaVu-Sans"},{label:"DejaVu Sans Bold",value:"DejaVu-Sans-bold"},{label:"Dingbats",value:"Dingbats"},{label:"fixed",value:"fixed"},{label:"FreeMono",value:"FreeMono"},{label:"FreeMono Bold",value:"FreeMono-Bold"},{label:"FreeSans",value:"FreeSans-Bold"},{label:"Halvetica",value:"Halvetica"},{label:"Georgia",value:"Georgia"},{label:"Impact",value:"Impact"},{label:"Noto mono",value:"Noto-Mono"}],Br={RECT:"rect",SQUARE:"square",CIRCLE:"circle",IMAGE:"image",TEXT:"text"},Nr="https://image.flaticon.com/icons/svg/916/916762.svg",Ur={hideCloudimageSwitcher:!0,processWithCloudimage:!1,uploadWithCloudimageLink:!1,elementId:null,isLowQualityPreview:!0,reduceBeforeEdit:{mode:"manual",widthLimit:2e3,heightLimit:2e3},cropBeforeEdit:null,cropPresets:Ir,resizePresets:Fr},Wr={CLOSE_BTN_CLICKED:"close-button-clicked",TOOLBAR_CANCEL_BTN_CLICKED:"toolbar-cancel-button-clicked",ESC_KEY_PRESSED:"esc-key-pressed",MODAL_OVERLAY_CLICKED:"modal-overlay-clicked",IMAGE_EDITS_COMPLETED:"image-edits-completed",IMAGE_DOWNLOADED:"image-downloaded",IMAGE_UPLOADED_FILEROBOT:"image-uploaded-filerobot",IMAGE_UPLOADED_CLOUDIMAGE:"image-uploaded-cloudimage",IMAGE_UPLOADING_FAIL_FILEROBOT:"image-uploading-fail-filerobot"},Yr=("undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Or,"MODAL_ID","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Sr,"PREVIEW_CANVAS_ID","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(kr,"CANVAS_ID","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Tr,"ORIGINAL_CANVAS_ID","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(jr,"TOOLS","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Rr,"EFFECTS","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Ar,"FILTERS","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Dr,"CLOUDIMAGE_OPERATIONS","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Pr,"WATERMARK_POSITIONS","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Lr,"WATERMARK_POSITIONS_PRESET","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Mr,"DEFAULT_WATERMARK","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register("watermark-layer","WATERMARK_UNIQUE_KEY","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Ir,"cropPresets","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Fr,"resizePresets","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(zr,"STANDARD_FONTS","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Hr,"WATERMARK_CLOUDIMAGE_FONTS","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Br,"SHAPES_VARIANTS","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Nr,"DEFAULT_IMG_URL","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Ur,"UPLOADER","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Wr,"ON_CLOSE_STATUSES","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/config.js")),function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return window.document.getElementById(e||(t?Tr:kr))}),Vr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Yr,"getCanvasNode","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/get-canvas-node.js"),function(e){switch(e){case"colorize":return"colorize";case"contrast":return"contrast";case"cross_process":return"crossProcess";case"glow_sun":return"glowingSun";case"hdr_effect":return"hdr";case"jarques":return"jarques";case"love":return"love";case"old_boot":return"oldBoot";case"orange_peel":return"orangePeel";case"pin_hole":return"pinhole";case"pleasant":return"pleasant";case"sepia":return"sepia";case"sun_rise":return"sunrise";case"vintage":return"vintage";case"clarity":return"";case"edge_enhance":return"edgeEnhance";case"emboss":return"emboss";case"grungy":return"grungy";case"hazy":return"hazyDays";case"lomo":return"lomo";case"noise":return"noise";case"old_paper":return"oldPaper";case"posterize":return"posterize";case"radial_blur":return"radialBlur";case"sin_city":return"sinCity";case"tilt_shift":return"tiltShift";default:return null}}),Xr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Vr,"getEffectHandlerName","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/get-effect-handler-name.js"),function(e){switch(e){case"colorize":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/filters/colorize.jpg";case"contrast":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/filters/contrast.png";case"cross_process":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/filters/cross_process.png";case"glow_sun":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/filters/glow_sun.png";case"hdr_effect":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/filters/hdr_effect.png";case"jarques":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/filters/jarques.png";case"love":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/filters/love.png";case"old_boot":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/filters/old_boot.png";case"orange_peel":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/filters/orange_peel.png";case"pin_hole":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/filters/pin_hole.png";case"pleasant":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/filters/pleasant.png";case"sepia":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/filters/sepia.png";case"sun_rise":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/filters/sun_rise.png";case"vintage":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/filters/vintage.png";case"clarity":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/effects/clarity.png";case"edge_enhance":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/effects/edge_enhance.png";case"emboss":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/effects/emboss.png";case"grungy":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/effects/grungy.png";case"hazy":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/effects/hazy.png";case"lomo":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/effects/lomo.png";case"noise":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/effects/noise.png";case"old_paper":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/effects/old_paper.png";case"posterize":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/effects/posterize.png";case"radial_blur":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/effects/radial_blur.png";case"sin_city":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/effects/sin_city.png";case"tilt_shift":return"https://cdn.scaleflex.it/plugins/filerobot-image-editor/assets/images/effects/tilt_shift.png";default:return""}}),qr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Xr,"getIcon","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/get-icon.js"),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.replace(/_/g," ")}),Kr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(qr,"getLabel","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/get-label.js"),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"filerobot";return"filerobot"===e?"X-Filerobot-Key":"X-Airstore-Secret-Key"}),Qr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Kr,"getSecretHeaderName","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/get-secret-header-name.js"),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"center",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=t.getBoundingClientRect(),i=o.width/2-n/2,a=o.height/2-r/2;if("center"===e)return[i,a];e=e.split("-");var l=o.width-n,c=o.height-r;return e.map((function(e,t){return"center"===e?0===t?i:a:"right"===e?l:"bottom"===e?c:0}))}),$r=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Qr,"getWatermarkPosition","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/get-watermark-position.js"),n(16)),Gr=n.n($r);function Zr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Jr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1?u.push(e):f.push(e)})),f.length>0&&(s=f.join("&")),c=ro(u.join("&"),n,o,i)}else c=ro(e,n,o,i);return[c,s].filter((function(e){return e})).join("&")};function to(e){return btoa(e).replace(/=*$/g,"")}function no(e,t){return Gr()(e).slice(0,t)}function ro(e,t,n,r){var o=to(e),i=no(t+o+n,r);return[i?"ci_seal=".concat(i):"",o?"ci_eqs=".concat(o):""].filter((function(e){return e})).join("&")}"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(eo,"getImageSealingParams","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/get-image-sealing-params.js"),__REACT_HOT_LOADER__.register(to,"encodeBase64","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/get-image-sealing-params.js"),__REACT_HOT_LOADER__.register(no,"getSha1","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/get-image-sealing-params.js"),__REACT_HOT_LOADER__.register(ro,"getSealingParams","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/get-image-sealing-params.js"));var oo=function(e,t){var n=e.getBoundingClientRect(),r=window.getComputedStyle(e)||{},o=r.paddingLeft,i=void 0===o?0:o,a=r.paddingRight,l=void 0===a?0:a,c=r.paddingTop,s=void 0===c?0:c,u=r.paddingBottom,f=void 0===u?0:u,p=n.width-(parseInt(i,10)||0)-(parseInt(l,10)||0),d=n.height-(parseInt(s,10)||0)-(parseInt(f,10)||0),h=0,m=0;if(p>=t.width&&d>=t.height)h=t.width,m=t.height;else if(p>t.width&&dt.height)h=p,m=p/t.ratio;else{var g=p,b=p/t.ratio,y=d*t.ratio,v=d;t.width<=g&&t.height<=b?(h=g,m=b):(h=y,m=v)}return{width:h,height:m}},io=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(oo,"getInnerBoxSize","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/get-inner-box-size.js"),n(17)),ao=n.n(io),lo=n(10),co=n.n(lo);CanvasRenderingContext2D.prototype.roundRect=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;return o?(n<2*o&&(o=n/2),r<2*o&&(o=r/2)):o=n>=r?n/2:r/2,this.beginPath(),this.moveTo(e+o,t),this.arcTo(e+n,t,e+n,t+r,o),this.arcTo(e+n,t+r,e,t+r,o),this.arcTo(e,t+r,e,t,o),this.arcTo(e,t,e+n,t,o),this.closePath(),this},CanvasRenderingContext2D.prototype.round=function(){var e=this.canvas,t=e.width,n=e.height;return this.imageSmoothingEnabled=!0,this.globalCompositeOperation="destination-in",this.strokeStyle="transparent",this.lineWidth=1,this.beginPath(),this.roundRect(0,0,t,n,Math.max(t,n)),this.fill(),this.globalCompositeOperation="source-over",this};var so=CanvasRenderingContext2D,uo=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(so,"default","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/canvas-round.js"),Number.prototype.mapNumber=function(e,t,n,r){return(this-e)*(r-n)/(t-e)+n});"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(uo,"default","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/map-number-range.js");function fo(e){return(fo="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 po(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ho(e){return function(e){if(Array.isArray(e))return mo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return mo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mo(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1050){var c=Yr(null,!0),s=c.getContext("2d");c.width=t.width,c.height=t.height,s.drawImage(t,0,0,t.width,t.height),l=t.height/800;var u=t.width/l,f=t.height/l;a({initialZoom:l,canvasOriginal:n.cloneCanvas(c)}),setTimeout((function(){new window.Caman(Yr(),(function(){this.resize({width:u,height:f}),this.render((function(){var e=n.replaceWithNewCanvas(kr);n.CamanInstanceZoomed=new window.Caman(e,(function(){n.CamanInstanceOriginal=new window.Caman(Yr(null,!0),(function(){})),a({isShowSpinner:!1,canvasZoomed:n.cloneCanvas(e)})}))}))}))}))}else setTimeout((function(){n.CamanInstance=new window.Caman(Yr(),(function(){a({isShowSpinner:!1,canvasOriginal:n.cloneCanvas(Yr())})}))}))})),Co(xo(e),"mergeCanvases",(function(t){var n=e.props.shapeOperations,r=t.getContext("2d"),o=n.prepareFinalCanvas();return console.log(t,t.width,t.height),r.drawImage(o,0,0),t.toDataURL()})),Co(xo(e),"cloneCanvas",(function(e){var t=document.createElement("canvas"),n=t.getContext("2d");return t.width=e.width,t.height=e.height,t.id=e.id,n.drawImage(e,0,0),t})),Co(xo(e),"replaceWithNewCanvas",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Yr(e),r=n.width,o=n.height,i=document.createElement("canvas"),a=i.getContext("2d"),l=n.parentElement;return l.removeChild(n),i.width=r,i.height=o,i.id=e,a.drawImage(n,0,0),t&&a.round(),l.appendChild(i),i})),Co(xo(e),"replaceCanvas",(function(e,t){var n=Yr(t),r=n.parentElement;return r.removeChild(n),r.appendChild(e),e})),Co(xo(e),"saveImage",(function(){var t=e.props,n=t.onComplete,r=t.onClose,o=t.updateState,i=t.closeOnLoad,a=t.config,l=t.processWithCloudService,c=t.uploadCloudimageImage,s=t.operations,u=t.initialZoom,f=t.operationsOriginal,p=e.getFinalImageMime(),d=e.getFinalImageName(),h=a.filerobot,m=void 0===h?{}:h,g=a.platform,b=void 0===g?"filerobot":g,y=e.props.src.split("?")[0],v=Yr(1!==u?Tr:kr),_=Er(m.baseAPI,m.container,b),w=(m.uploadParams||{}).dir||"image-editor",x=xo(e);if(l){var E=(1!==u?f:s).filter((function(e){var t=e.operation;return Dr.includes(t)})),C=e.generateCloudimageURL(E,y.replace(/https?:\/\/scaleflex.ultrafast.io\//,""));if(c){var O=new XMLHttpRequest;O.addEventListener("load",e.onFileLoad),O.open("POST",[_,"upload?dir=".concat(w)].join("")),O.setRequestHeader(Kr(b),m.uploadKey),O.setRequestHeader("Content-Type","application/json"),O.send(JSON.stringify({files_urls:[C]}))}else o({isShowSpinner:!1,isHideCanvas:!1}),n(C,{url_permalink:C,url_public:C,url:{public:C,permalink:C}}),i&&r(Wr.IMAGE_UPLOADED_CLOUDIMAGE)}else{e.mergeCanvases(v);var S=v.toDataURL(p).split(";")[1].split(",")[1],k=wr(S,p,null),T=d.replace(/-version-.{6}/g,"").split("."),j=T.length,R="";R=j<=1?"".concat(T.join("."),"-version-").concat((co()()||"").slice(0,6)):[T.slice(0,j-1).join("."),"-version-",(co()()||"").slice(0,6),".",T[j-1]].join("");var A=new FormData,D=new XMLHttpRequest;D.addEventListener("load",x.onFileLoad),A.append("files[]",k,R),D.open("POST",[_,"upload?dir=".concat(w)].join("")),D.setRequestHeader(Kr(b),m.uploadKey),D.send(A)}})),Co(xo(e),"getResultCanvas",(function(){var t=e.props.initialZoom,n=Yr(1!==t?Tr:kr);return e.mergeCanvases(n),n})),Co(xo(e),"getFinalImageMime",(function(){var t=e.props,n=t.roundCrop,r=t.imageMime;return n?"image/png":r})),Co(xo(e),"getFinalImageName",(function(){var t=e.props.roundCrop,n=e.state.imageName;return t&&(n=n.replace(n.substr(n.lastIndexOf(".")+1),"png")),n})),Co(xo(e),"downloadImage",(function(t){var n,r=e.getResultCanvas(),o=e.getFinalImageName(),i=e.getFinalImageMime(),a=document.createElement("a");a.download=o,a.href=r.toDataURL(i,.8),document.createEvent?((n=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),a.dispatchEvent(n)):a.fireEvent&&a.fireEvent("onclick"),t&&t()})),Co(xo(e),"onFileLoad",(function(t){var n=e.props,r=n.onComplete,o=n.onClose,i=n.updateState,a=n.closeOnLoad,l=t.srcElement,c=(void 0===l?{}:l).response,s=void 0===c?"{}":c,u=JSON.parse(s)||{};if("success"===u.status){var f=u.file,p=void 0===f?{}:f,d=_r(p);if(!d)return;i({isShowSpinner:!1,isHideCanvas:!1}),r(d,p),a&&o(Wr.IMAGE_UPLOADED_FILEROBOT)}else i({isShowSpinner:!1,isHideCanvas:!1}),alert(u),a&&o(Wr.IMAGE_UPLOADING_FAIL_FILEROBOT)})),Co(xo(e),"generateCloudimageURL",(function(t,n){var r=e.props,o=r.config,i=r.watermark,a=r.logoImage,l=r.processWithCloudimage,c=r.processWithFilerobot,s=r.imageSealing,u=o.cloudimage,f=void 0===u?{}:u,p=o.filerobot,d=void 0===p?{}:p,h=l&&f.token+".cloudimg.io/"+(f.version?"".concat(f.version,"/"):"v7/"),m=c&&d.token+".filerobot.com/"+(d.version?"".concat(d.version,"/"):""),g=m||h||"";g=(g?"https://":"")+g;var b=(m?d.doNotPrefixURL:f.doNotPrefixURL)?"":g,y=e.isOperationExist(t,"crop"),v=e.isOperationExist(t,"resize"),_=e.isOperationExist(t,"rotate"),w=e.isOperationExist(t,"focus_point"),x=i&&a&&i.applyByDefault,E="",C="",O="",S="",k="";y&&(E=e.getCropArguments(y.props)),v&&(C=(E?"&":"")+e.getResizeArguments(v.props)),_&&(O=(E||C?"&":"")+e.getOrientationArguments(_.props)),x&&(S=(E||C||O?"&":"")+e.getWatermarkArguments()),w&&(k=(E||C||O||S?"&":"")+e.getFocusPointArguments(w.props)),n=(n=n.split("?")[0]).replace(b,"");var T=E+C+O+S+k;return s.enabled&&(T=eo(T,s,n.replace(g,""))),b+n+(T?"?":"")+T})),Co(xo(e),"initFiltersOrEffects",(function(){})),Co(xo(e),"applyFilterOrEffect",(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=e.props,o=r.updateState,i=r.initialZoom;e.props[t]&&o({isHideCanvas:!0,isShowSpinner:!0},(function(){1!==i?(e.CamanInstanceOriginal.revert(!1),e.CamanInstanceOriginal[Vr(e.props[t])](),e.CamanInstanceOriginal.render((function(){o(Co({},t,null),(function(){e.makeCanvasSnapshot({operation:t},n)}))}))):o(Co({},t,null),(function(){e.makeCanvasSnapshot({operation:t},n)}))}))})),Co(xo(e),"applyAdjust",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},n=e.props,r=n.updateState,o=n.initialZoom,i=n.adjust,a=i.brightness,l=i.contrast,c=i.saturation,s=i.exposure,u={brightness:0,contrast:0,saturation:0,exposure:0};r({isHideCanvas:!0,isShowSpinner:!0},(function(){1!==o?(e.CamanInstanceOriginal.revert(!1),"0"!==a.toString()&&e.CamanInstanceOriginal.brightness(parseInt(a||"0")),"0"!==l.toString()&&e.CamanInstanceOriginal.contrast(parseInt(l||"0")),"0"!==c.toString()&&e.CamanInstanceOriginal.saturation(parseInt(c||"0")),"0"!==s.toString()&&e.CamanInstanceOriginal.exposure(parseInt(s||"0")),e.CamanInstanceOriginal.render((function(){r({adjust:bo({},u)},(function(){e.makeCanvasSnapshot({operation:"adjust"},t)}))}))):r({adjust:bo({},u)},(function(){e.makeCanvasSnapshot({operation:"adjust"},t)}))}))})),Co(xo(e),"initOrientation",(function(){var t=e.props,n=t.config,r=t.redoOperation,o=t.operations,i=t.operationsZoomed,a=1!==t.initialZoom?i:o;if(n.processWithCloudService&&a.length>=1){var l=a.findIndex((function(e){return"rotate"===e.operation}));l>-1&&r({operationIndex:l-1,callback:function(){},resetActiveTab:!1})}})),Co(xo(e),"onRotate",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=e.props,a=i.initialZoom,l=i.rotate,c=i.updateState,s=l+t;c({isHideCanvas:!0,isShowSpinner:!0,rotate:s,correctionDegree:n,flipX:r,flipY:o},(function(){1!==a?(e.CamanInstanceZoomed.reset(),r&&e.CamanInstanceZoomed.flip("x"),o&&e.CamanInstanceZoomed.flip("y"),(s||n)&&e.CamanInstanceZoomed.rotate((s||0)+(n||0)),e.CamanInstanceZoomed.render((function(){c({isHideCanvas:!1,isShowSpinner:!1})}))):(e.CamanInstance.reset(),r&&e.CamanInstance.flip("x"),o&&e.CamanInstance.flip("y"),(s||n)&&e.CamanInstance.rotate((s||0)+(n||0)),e.CamanInstance.render((function(){c({isHideCanvas:!1,isShowSpinner:!1})})))}))})),Co(xo(e),"applyOrientation",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},n=e.props,r=n.updateState,o=n.initialZoom,i=n.rotate,a=n.correctionDegree,l=n.flipX,c=n.flipY;r({isHideCanvas:!0,isShowSpinner:!0},(function(){var n=(i||0)+(a||0);1!==o?(e.CamanInstanceOriginal.reset(),l&&e.CamanInstanceOriginal.flip("x"),c&&e.CamanInstanceOriginal.flip("y"),(i||a)&&e.CamanInstanceOriginal.rotate(n),e.CamanInstanceOriginal.render((function(){r({rotate:0,flipX:!1,flipY:!1,correctionDegree:0},(function(){e.makeCanvasSnapshot({operation:"rotate",props:{rotate:n}},t)}))}))):r({rotate:0,flipX:!1,flipY:!1,correctionDegree:0},(function(){e.makeCanvasSnapshot({operation:"rotate",props:{rotate:n}},t)}))}))})),Co(xo(e),"getOrientationArguments",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.rotate;switch(t){case 90:return"r=270";case-90:return"r=90";default:return"r=".concat(t)}})),Co(xo(e),"initCrop",(function(){var t=e.props,n=t.config,r=t.redoOperation,o=t.operations,i=t.operationsZoomed,a=1!==t.initialZoom?i:o;if(n.processWithCloudService&&a.length>=1){var l=a.findIndex((function(e){return"crop"===e.operation}));l>-1&&r({operationIndex:l-1,callback:e.onInitCrop,resetActiveTab:!1})}else e.onInitCrop()})),Co(xo(e),"onInitCrop",(function(){var t=e.props,n=t.updateState,r=t.config,o=r.beginCropArea,i=void 0===o?1:o,a=r.minCropAreaWidth,l=r.minCropAreaHeight;n({isHideCanvas:!0,isShowSpinner:!0},(function(){var t=Yr(),r=t.getBoundingClientRect(),o=t.width/r.width;e.cropper=new ao.a(t,{viewMode:1,modal:!1,background:!1,rotatable:!1,scalable:!1,zoomable:!1,movable:!1,autoCropArea:i,minCropBoxWidth:a,minCropBoxHeight:l,crop:function(t){e.props.updateState({cropDetails:t.detail})}}),window.scaleflexPlugins=window.scaleflexPlugins||{},window.scaleflexPlugins.zoom=o,window.scaleflexPlugins.cropperjs=e.cropper,n({isHideCanvas:!1,isShowSpinner:!1})}))})),Co(xo(e),"applyCrop",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},n=e.props,r=n.initialZoom,o=n.updateState,i=n.cropDetails,a=n.roundCrop,l=i.width,c=i.height,s=i.x,u=i.y;o({isShowSpinner:!0},(function(){var n,o,i;(e.destroyCrop(),1!==r)?(n=[l,c,s,u].map((function(e){return e*r})),e.CamanInstanceZoomed.crop(l,c,s,u),(o=e.CamanInstanceOriginal).crop.apply(o,ho(n))):(n=[l,c,s,u],(i=e.CamanInstance).crop.apply(i,ho(n)));e.makeCanvasSnapshot({operation:"crop",props:{width:n[0],height:n[1],x:n[2],y:n[3],roundCrop:a}},t)}))})),Co(xo(e),"makeCanvasSnapshot",(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=e.props,i=o.updateState,a=o.initialZoom,l=o.operationsZoomed,c=o.currentOperation,s=o.operationsOriginal,u=o.operations,f=o.roundCrop,p=1!==a;if(r){var d=(p?l:u).indexOf(c)+1,h=e.cloneCanvas(Yr()),m=bo(bo({},t),{},{previewCanvas:!0,canvas:h}),g={isHideCanvas:!1,isShowSpinner:!1,currentOperation:m};return p?(g.operationsZoomed=[].concat(ho(l.slice(0,d)),[m]),g.operationsOriginal=[].concat(ho(s.slice(0,d)),[bo(bo({},m),{},{canvas:e.cloneCanvas(Yr(null,!0))})]),g.isHideCanvasOriginal=!1,g.isShowSpinnerOriginal=!1):g.operations=[].concat(ho(u.slice(0,d)),[m]),void i(g,n)}if(p){var b=l.indexOf(c)+1;e.CamanInstanceOriginal.render((function(){var r=e.replaceWithNewCanvas(Tr,f),o=bo(bo({},t),{},{canvas:e.cloneCanvas(Yr(null,!0))});e.CamanInstanceOriginal=new window.Caman(r,(function(){i({isHideCanvasOriginal:!1,isShowSpinnerOriginal:!1,operationsOriginal:[].concat(ho(s.slice(0,b)),[o])},n)}))})),e.CamanInstanceZoomed.render((function(){var n=e.replaceWithNewCanvas(kr,f),r=bo(bo({},t),{},{canvas:e.cloneCanvas(Yr())});e.CamanInstanceZoomed=new window.Caman(n,(function(){i({isHideCanvas:!1,isShowSpinner:!1,operationsZoomed:[].concat(ho(l.slice(0,b)),[r]),currentOperation:r})}))}))}else{var y=u.indexOf(c)+1;e.CamanInstance.render((function(){var r=e.replaceWithNewCanvas(kr,f),o=bo(bo({},t),{},{canvas:e.cloneCanvas(Yr())});e.CamanInstance=new window.Caman(r,(function(){i({isHideCanvas:!1,isShowSpinner:!1,operations:[].concat(ho(u.slice(0,y)),[o]),currentOperation:o},n)}))}))}})),Co(xo(e),"destroyCrop",(function(){e.cropper.destroy()})),Co(xo(e),"getCropArguments",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.x,o=e.y,i=e.roundCrop;return"tl_px=".concat(Math.round(r),",").concat(Math.round(o),"&br_px=").concat(Math.round(r+t),",").concat(Math.round(o+n)).concat(i?"&radius=".concat(Math.round(Math.max(t,n)),"&force_format=png"):"")})),Co(xo(e),"initResize",(function(){var t=e.props,n=t.initialZoom,r=t.updateState,o=Yr(1!==n?Tr:kr);r({canvasDimensions:{width:o.width,height:o.height,ratio:o.width/o.height}})})),Co(xo(e),"applyResize",(function(){var t=e.props,n=t.initialZoom,r=t.canvasDimensions,o=t.updateState,i=t.handleSave,a=t.operations,l=t.operationsOriginal;o({isHideCanvas:!0,isShowSpinner:!0,operationsOriginal:[].concat(ho(l),[{operation:"resize",props:r}]),operations:[].concat(ho(a),[{operation:"resize",props:r}])},(function(){1!==n?(e.CamanInstanceOriginal.resize(r),e.CamanInstanceOriginal.render((function(){i()}))):(e.CamanInstance.resize(r),e.CamanInstance.render((function(){i()})))}))})),Co(xo(e),"getResizeArguments",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height;return"w=".concat(t,"&h=").concat(n)})),Co(xo(e),"initAdjust",(function(){})),Co(xo(e),"onAdjust",(function(t,n){var r,o=e.props,i=o.updateState,a=o.adjust;i({adjust:bo(bo({},a),{},(r={},Co(r,t,n),Co(r,"isHideCanvas",!0),Co(r,"isShowSpinner",!0),r))},(function(){e.applyCorrections((function(){i({isHideCanvas:!1,isShowSpinner:!1})}))}))})),Co(xo(e),"initFocusPoint",(function(){var t=e.props,n=t.updateState,r=t.original,o=t.focusPoint,i=bo({},o);null===i.x&&(i.x=r.width/2),null===i.y&&(i.y=r.height/2),e.tempFocusPoint=bo({},o),n({focusPoint:i,isHideCanvas:!0,isShowSpinner:!0})})),Co(xo(e),"applyFocusPoint",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},n=e.props,r=n.updateState,o=n.operations,i=n.operationsOriginal,a=n.focusPoint;e.tempFocusPoint=a,r({operationsOriginal:[].concat(ho(i),[{operation:"focus_point",props:a}]),operations:[].concat(ho(o),[{operation:"focus_point",props:a}])}),t()})),Co(xo(e),"applyShapes",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},n=e.props.shapeOperations;n.updateShapes({applied:!0},{selectedShape:{}},(function(){e.makeCanvasSnapshot({operation:"shape",props:{shapes:e.props.shapes}},t,!0)}))})),Co(xo(e),"getFocusPointArguments",(function(e){return"gravity=".concat(e.x,",").concat(e.y)})),Co(xo(e),"destroyFocusPoint",(function(){e.props.updateState({focusPoint:e.tempFocusPoint,isHideCanvas:!1,isShowSpinner:!1})})),Co(xo(e),"pushOperation",(function(e,t,n){var r=e.findIndex((function(e){return e===n})),o=e.length;o&&r!==e[o]&&e.splice(r+1,o),e.push(t)})),Co(xo(e),"applyOperations",(function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=e.props,i=o.initialZoom,a=o.operations,l=o.operationsZoomed,c=o.operationsOriginal,s=o.canvasZoomed,u=o.canvasOriginal,f=o.updateState,p=1!==i,d=p?l[t]:a[t],h=-1!==t;if(r&&r.previewCanvas&&r.index-1===t||d&&d.previewCanvas&&r.index+1===t){var m,g,b=e.props.shapeOperations,y=null==d||null===(m=d.props)||void 0===m?void 0:m.shapes;if(!y){var v=(p?l:a).filter((function(e,t){return"shape"===e.operation&&t0?v[v.length-1].props.shapes:[]}return b.replaceAllShapes(y),g=p?h?l[t]:{canvas:e.cloneCanvas(s)}:h?a[t]:{canvas:e.cloneCanvas(u)},void f(bo(bo({},Oo),{},{currentOperation:g}),(function(){n&&n()}))}if(h||e.props.shapeOperations.replaceAllShapes([]),p){var _=h?l[t]:{canvas:e.cloneCanvas(s)},w=e.replaceCanvas(_.canvas,kr);e.CamanInstanceZoomed=new window.Caman(w,(function(){f(bo(bo({},Oo),{},{currentOperation:_}),(function(){n&&n()}))}));var x=h?c[t]:{canvas:e.cloneCanvas(u)},E=e.replaceCanvas(x.canvas,Tr);e.CamanInstanceOriginal=new window.Caman(E,(function(){}))}else{var C=h?a[t]:{canvas:e.cloneCanvas(u)},O=e.replaceCanvas(C.canvas,kr);e.CamanInstance=new window.Caman(O,(function(){f(bo(bo({},Oo),{},{currentOperation:C}),(function(){n&&n()}))}))}})),Co(xo(e),"isOperationExist",(function(e,t){return e.find((function(e){return e.operation===t}))})),Co(xo(e),"getOperationQuery",(function(e,t){return e?"crop_px":t?"width":"cdn"})),Co(xo(e),"destroyAll",(function(){})),Co(xo(e),"resetAll",(function(t){var n=e.props.activeTab;n?e.cancelLastOperation(n,(function(){e.applyOperations(-1,t)})):e.applyOperations(-1,t)})),Co(xo(e),"applyCorrections",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},n=e.props,r=n.initialZoom,o=n.effect,i=n.filter,a=n.adjust,l=a.brightness,c=a.contrast,s=a.saturation,u=a.exposure;1!==r?(e.CamanInstanceZoomed.revert(!1),o&&e.CamanInstanceZoomed[Vr(o)](),i&&e.CamanInstanceZoomed[Vr(i)](),"0"!==l.toString()&&e.CamanInstanceZoomed.brightness(parseInt(l||"0")),"0"!==c.toString()&&e.CamanInstanceZoomed.contrast(parseInt(c||"0")),"0"!==s.toString()&&e.CamanInstanceZoomed.saturation(parseInt(s||"0")),"0"!==u.toString()&&e.CamanInstanceZoomed.exposure(parseInt(u||"0")),e.CamanInstanceZoomed.render(t)):(e.CamanInstance.revert(!1),o&&e.CamanInstance[Vr(o)](),i&&e.CamanInstance[Vr(i)](),"0"!==l.toString()&&e.CamanInstance.brightness(parseInt(l||"0")),"0"!==c.toString()&&e.CamanInstance.contrast(parseInt(c||"0")),"0"!==s.toString()&&e.CamanInstance.saturation(parseInt(s||"0")),"0"!==u.toString()&&e.CamanInstance.exposure(parseInt(u||"0")),e.CamanInstance.render(t))})),Co(xo(e),"cancelAddedShapes",(function(){e.props.shapeOperations.deleteShapes({all:!0},{selectedShape:{}})})),Co(xo(e),"cancelLastOperation",(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=e.props.initialZoom;"crop"===t&&e.destroyCrop(),"watermark"===t&&e.cancelWatermark(),["shapes","image","text"].includes(t)&&e.cancelAddedShapes(),1!==r?(e.CamanInstanceZoomed.reset(),e.CamanInstanceOriginal.reset(),e.CamanInstanceOriginal.render(),e.CamanInstanceZoomed.render((function(){n&&n()}))):(e.CamanInstance.reset(),e.CamanInstance.render((function(){n&&n()})))})),Co(xo(e),"initWatermark",(function(){var t=e.props,n=t.watermark,r=t.updateState;n.applyByDefault||r({watermark:bo(bo({},n),{},{applyByDefault:!0})})})),Co(xo(e),"applyWatermark",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},n=e.props,r=n.updateState,o=n.shapeOperations,i=(o.getShape({key:"watermark-layer"})||{}).index;e.setState({tempWatermark:null}),r({selectedShape:{}}),e.makeCanvasSnapshot({operation:"shape",props:{shapes:[i]}},t,!0),t()})),Co(xo(e),"cancelWatermark",(function(){var t=e.state.tempWatermark,n=e.props,r=n.updateState,o=n.shapeOperations,i=o.getShape({key:"watermark-layer"})||{},a=null;t&&t.url&&t.applyByDefault?(r({isShowSpinner:!0}),(a=new Image).setAttribute("crossOrigin","Anonymous"),a.src=t.url+"?"+(new Date).getTime(),a.onload=function(){o.updateShape({img:a},i.index,{watermark:t,logoImage:a,isShowSpinner:!1,selectedShape:{}})}):o.deleteShape({index:i.index},{watermark:t,logoImage:a,selectedShape:{}})})),Co(xo(e),"getWatermarkArguments",(function(){var t=e.props,n=t.config.processWithCloudimage,r=t.shapeOperations.getShape({key:"watermark-layer"});if(!r)return"";var o=r.x,i=r.y,a=r.opacity,l=po(r,["x","y","opacity"]),c=e.state.original,s=(c=void 0===c?{}:c).width,u=c.height,f=Yr(Sr),p=f.width,d=f.height,h=Math.round(o.map(0,p,0,s)),m=Math.round(i.map(0,d,0,u)),g="&wat_gravity=northwest&wat_pad=".concat(h,",").concat(m),b="wat=1&wat_opacity=".concat(a,"&wat_scale=31p").concat(g);return b+=n&&l.text?"&wat_text=".concat(l.text,"&wat_font=").concat(l.textFont,"&wat_fontsize=").concat(l.textSize,"&wat_colour=").concat(l.color.replace("#","")):"&wat_url=".concat(l.img.src.split("?")[0])})),Co(xo(e),"applyChanges",(function(t,n){switch(t){case"adjust":e.applyAdjust(n);break;case"effects":e.applyFilterOrEffect("effect",n);break;case"filters":e.applyFilterOrEffect("filter",n);break;case"crop":e.applyCrop(n);break;case"resize":e.applyResize();break;case"rotate":e.applyOrientation(n);break;case"watermark":e.applyWatermark(n);break;case"focus_point":e.applyFocusPoint(n);break;case"shapes":case"image":case"text":e.applyShapes(n)}})),Co(xo(e),"changeTab",(function(t){switch(t){case"effects":case"filters":e.initFiltersOrEffects();break;case"adjust":e.initAdjust();break;case"crop":e.initCrop();break;case"resize":e.initResize();break;case"rotate":e.initOrientation();break;case"watermark":e.initWatermark();break;case"focus_point":e.initFocusPoint();break;default:e.destroyAll()}})),Co(xo(e),"destroyMode",(function(t){switch(t){case"effects":case"filters":case"adjust":break;case"crop":e.destroyCrop();break;case"resize":case"rotate":break;case"focus_point":e.destroyFocusPoint()}})),e.state={canvas:null,self:xo(e)},e.CamanInstance=null,e.CamanInstanceOriginal=null,e.CamanInstanceZoomed=null,e}return t=a,r=[{key:"getDerivedStateFromProps",value:function(e,t){var n={};return e.activeTab!==t.activeTab&&(t.activeTab&&t.self.destroyMode(t.activeTab),"watermark"===e.activeTab&&(n.tempWatermark=e.watermark&&xr(e.watermark)),t.self.changeTab(e.activeTab)),bo(bo({},n),e)}}],(n=[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentDidMount",value:function(){var e=this,t=this,n=this.props,r=n.updateState,o=n.img,i=n.isPreResize,a=n.preCanvasDimensions;r({isShowSpinner:!0,applyChanges:this.applyChanges,applyOperations:this.applyOperations,resetAll:this.resetAll,onRotate:this.onRotate,onAdjust:this.onAdjust,downloadImage:this.downloadImage,getResultCanvas:this.getResultCanvas,saveImage:this.saveImage,applyCorrections:this.applyCorrections,restoreAll:this.restoreAll,cancelLastOperation:this.cancelLastOperation},(function(){var n=Yr(),l=n.getContext("2d");n.width=o.width,n.height=o.height,l.drawImage(o,0,0,o.width,o.height);var c={height:o.height,width:o.width,ratio:o.width/o.height};r({original:c,canvasDimensions:c}),i&&a?new window.Caman(n,(function(){this.resize({width:a.width,height:a.height}),this.render((function(){var e=t.replaceWithNewCanvas(kr),n={height:e.height,width:e.width,ratio:e.width/e.height};r({original:n,canvasDimensions:bo({},n),canvasOriginal:t.cloneCanvas(e)},(function(){t.initializeCanvases(e)}))}))})):e.initializeCanvases(o)}))}},{key:"render",value:function(){return i.a.createElement(i.a.Fragment,null,i.a.createElement(Me,{id:Tr}),i.a.createElement(Me,{id:kr}))}}])&&yo(t.prototype,n),r&&yo(t,r),a}(o.Component),ko=("undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Oo,"INITIAL_PARAMS","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/components/Preview/ImageManipulator.js"),__REACT_HOT_LOADER__.register(So,"ImageManipulator","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/components/Preview/ImageManipulator.js")),n(4));function To(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return jo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Io(e){return function(e){if(Array.isArray(e))return zo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Fo(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fo(e,t){if(e){if("string"==typeof e)return zo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zo(e,t):void 0}}function zo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:function(){},r=t.props.updateState;r(e,n)})),qo(Vo(t),"pushShapeToShapes",(function(e,n){var r=t.props.shapes,o=r.length;return t.updateState(Bo({shapes:[].concat(Io(r),[Bo(Bo({},e),{},{index:o})])},n)),o})),qo(Vo(t),"targettedShape",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return e||0===e?t.props.shapes[e]:t.props.selectedShape})),qo(Vo(t),"onSelect",(function(e){var n=t.props,r=n.shapes,o=n.activeTab;if(t._allowedTabs.includes(o)){var i=e.offsetX,a=e.offsetY,l=!1;r.forEach((function(e){!e.hidden&&i>=e.x&&i<=e.x+e.width&&a>=e.y&&a<=e.y+e.height&&e.tab===o&&(l=!0,t.updateState({selectedShape:Bo(Bo({},e),{},{resizingBox:!0,startEdgeOffset:{x:i-e.x,y:a-e.y}})}),t.activateResizingActions(),t._canvas.addEventListener("keyup",t.activateShapeDeleting),t._canvas.addEventListener("mousemove",t.startDragging),t._canvas.addEventListener("touchmove",t.startDragging),document.addEventListener("mouseup",t.endDragging),document.addEventListener("touchend",t.endDragging))})),l||(t.updateState({selectedShape:{}}),t.disableResizingActions(),t._canvas.removeEventListener("keyup",t.activateShapeDeleting),t._canvas.removeEventListener("mousemove",t.startDragging),t._canvas.removeEventListener("touchmove",t.startDragging),document.removeEventListener("mouseup",t.endDragging),document.removeEventListener("touchend",t.endDragging))}})),qo(Vo(t),"activateShapeDeleting",(function(e){var n=e.key,r=t.props.selectedShape;"Delete"!==n&&"Backspace"!==n||!r||(t.deleteShapeByKeyOrIndex({index:r.index}),t.updateState({selectedShape:{}}),t.disableResizingActions(),t._canvas.removeEventListener("keyup",t.activateShapeDeleting))})),qo(Vo(t),"activateResizingActions",(function(){Array.from(document.getElementsByClassName("shape-resizing-control")).forEach((function(e){e.addEventListener("mousedown",t.trackShapeResize)}))})),qo(Vo(t),"trackShapeResize",(function(e){var n=e.target;t.setState({resizeControlTarget:n}),document.addEventListener("mousemove",t.handleShapeResizing),document.addEventListener("touchmove",t.handleShapeResizing),document.addEventListener("mouseup",t.disableResizingActions),document.addEventListener("touchend",t.disableResizingActions)})),qo(Vo(t),"handleShapeResizing",(function(e){var n=e.movementX,r=e.movementY,o=e.shiftKey,i=t.state.resizeControlTarget,a=t.props.selectedShape,l=a.index,c=a.width,s=a.height,u=a.x,f=a.y,p=a.variant;if(i&&p!==Br.TEXT){var d=s,h=function(e){var t=c/s;if(Math.abs(n)>=Math.abs(r)){var o=Math.abs(s-(c+n)/t);r=(e?1:-1)*Math.sign(n)*o}else{var i=Math.abs(c-(s+r)*t);n=(e?1:-1)*Math.sign(r)*i}},m=function(){c+=n},g=function(){s+=r},b=function(){c-=n,u+=n},y=function(){s-=r,f+=r};switch(i.dataset.direction){case"e":m();break;case"w":b();break;case"n":y();break;case"s":g();break;case"ne":o&&h(!1),y(),m();break;case"nw":o&&h(!0),y(),b();break;case"se":o&&h(!0),g(),m();break;case"sw":o&&h(!1),g(),b();break;default:return}p!==Br.SQUARE&&p!==Br.CIRCLE||(s!==d?c=s:s=c);if(!(s<=15||c<=15)){u<0&&(u=0),f<0&&(f=0),u+c>t._canvas.width&&(u=t._canvas.width-c),f+s>t._canvas.height&&(f=t._canvas.height-s),c>t._canvas.width&&(c=t._canvas.width),s>t._canvas.height&&(s=t._canvas.height);var v={width:c,height:s,x:u,y:f};t.updateShape(v,l,{selectedShape:Bo(Bo({},a),v)})}}})),qo(Vo(t),"disableResizingActions",(function(e){document.removeEventListener("mousemove",t.handleShapeResizing),document.removeEventListener("mouseup",t.disableResizingActions),t.updateState({selectedShape:{}}),t.setState({resizeControlTarget:null})})),qo(Vo(t),"removeResizingBox",(function(e){var n=e.offsetX,r=e.offsetY,o=t.props.selectedShape;(no.x+o.width||ro.y+o.height)&&(t.updateState({selectedShape:Bo(Bo({},o),{},{resizingBox:!1})}),t._canvas.removeEventListener("click",t.removeResizingBox))})),qo(Vo(t),"startDragging",(function(e){if(e.targetTouches&&e.targetTouches[0]){e.preventDefault();var n=e.targetTouches[0],r=n.clientX,o=n.clientY,i=t._canvas.getBoundingClientRect(),a=i.x,l=i.y;e.offsetX=r-a,e.offsetY=o-l}var c=t.props.selectedShape,s=c.startEdgeOffset,u=void 0===s?{}:s,f=c.width,p=c.height,d=c.index,h=e.offsetX-u.x,m=e.offsetY-u.y;h<0&&(h=0),m<0&&(m=0),h+f>t._canvas.width&&(h=t._canvas.width-f),m+p>t._canvas.height&&(m=t._canvas.height-p);var g=Bo(Bo({},c),{},{x:h,y:m});t.updateShape(g,d,{selectedShape:g})})),qo(Vo(t),"endDragging",(function(){t._canvas.removeEventListener("mousemove",t.startDragging),t._canvas.removeEventListener("mouseup",t.endDragging),t._canvas.removeEventListener("mouseleave",t.endDragging),t._canvas.addEventListener("click",t.removeResizingBox)})),qo(Vo(t),"getCanvasCenter",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=t._canvas.width/2-e,o=t._canvas.height/2-n;return[r,o]})),qo(Vo(t),"draw",(function(e,n){var r=n.opacity,o=void 0===r?1:r,i=n.hidden,a=n.color,l=n.stroke,c=void 0===l?{}:l;i||(t._context.globalAlpha=+o,t._context.fillStyle=a,t._context.strokeStyle=c.color||"transparent",t._context.lineWidth=c.width||1,e(),t.props.round&&t._context.round())})),qo(Vo(t),"redrawShape",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=t.props.shapes;t.clearShape(0,0,t._canvas.width,t._canvas.height);var r=n.length;if(e&&e!==r-1){var o=Bo(Bo({},n.splice(e,1)[0]),{},{index:r});n.splice(r,0,o),n=n.map((function(e,n){return e.index=n,t.drawShapeThroughVariant(e),e})),t.updateState({shapes:n,selectedShape:o})}else n.forEach((function(e){return t.drawShapeThroughVariant(e)}))})),qo(Vo(t),"drawShapeThroughVariant",(function(e){switch(e.variant){case Br.IMAGE:t.drawImage(e);break;case Br.RECT:case Br.SQUARE:t.drawRect(e);break;case Br.CIRCLE:t.drawCircle(e);break;case Br.TEXT:t.drawText(e);default:return}})),qo(Vo(t),"drawRect",(function(e){var n=e.x,r=e.y,o=e.width,i=e.height,a=e.stroke,l=Mo(e,["x","y","width","height","stroke"]);t.draw((function(){t._context.fillRect(n,r,o,i),a&&t._context.strokeRect(n,r,o,i)}),Bo({stroke:a},l))})),qo(Vo(t),"drawCircle",(function(e){var n=e.x,r=e.y,o=(e.radius,e.width),i=e.height,a=e.stroke,l=Mo(e,["x","y","radius","width","height","stroke"]);t.draw((function(){t._context.roundRect(n,r,o,i),t._context.fill(),a&&t._context.stroke()}),Bo({stroke:a},l))})),qo(Vo(t),"drawImage",(function(e){var n=e.img,r=e.x,o=e.y,i=e.width,a=e.height,l=e.stroke,c=Mo(e,["img","x","y","width","height","stroke"]);t.draw((function(){t._context.drawImage(n,r,o,i,a),l&&t._context.strokeRect(r,o,i,a)}),Bo({stroke:l},c))})),qo(Vo(t),"setTextStyle",(function(e){var n=e.textSize,r=e.textFont;t._context.textAlign="start",t._context.textBaseline="top",t._context.font="".concat(n,"px ").concat(r)})),qo(Vo(t),"getTextWidthAndHeight",(function(e){var n=e.text,r=e.textSize,o=e.textFont;t.setTextStyle({textSize:r,textFont:o});var i=t._context.measureText(n),a=i.width;return[a,0===a?0:i.actualBoundingBoxDescent-i.actualBoundingBoxAscent]})),qo(Vo(t),"drawText",(function(e){var n=e.text,r=e.textSize,o=e.textFont,i=e.x,a=e.y,l=e.stroke,c=Mo(e,["text","textSize","textFont","x","y","stroke"]);t.draw((function(){t.setTextStyle({textSize:r,textFont:o}),t._context.fillText(n,i,a,t._canvas.width),l&&t._context.strokeText(n,i,a)}),Bo({stroke:l},c))})),qo(Vo(t),"addRect",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.x,r=e.y,o=e.width,i=void 0===o?100:o,a=e.height,l=void 0===a?75:a,c=e.stroke,s=void 0===c?{}:c,u=e.color,f=void 0===u?"#000000":u,p=e.opacity,d=void 0===p?1:p,h=e.variant,m=void 0===h?Br.RECT:h,g=e.tab,b=void 0===g?"shapes":g,y=Mo(e,["x","y","width","height","stroke","color","opacity","variant","tab"]),v=t.getCanvasCenter(i/2,l/2),_=Lo(v,2),w=_[0],x=_[1],E={x:n||w,y:r||x,width:i,height:l,stroke:s,opacity:d,color:f},C=Bo(Bo(Bo(Bo({},t._initArgs),y),E),{},{variant:m,tab:b});if(!y.key||!t.replaceShapeIfExisted(y.key,C)){t.drawRect(E);var O=t.pushShapeToShapes(C);t.updateState({selectedShape:Bo(Bo({},C),{},{index:O,resizingBox:!0})},t.activateResizingActions)}})),qo(Vo(t),"addSquare",(function(e){e.width||(e.width=e.height=75),e.variant=Br.SQUARE,t.addRect(e)})),qo(Vo(t),"addCircle",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.x,r=e.y,o=e.radius,i=void 0===o?50:o,a=e.stroke,l=void 0===a?{}:a,c=e.color,s=void 0===c?"#000000":c,u=e.opacity,f=void 0===u?1:u,p=e.tab,d=void 0===p?"shapes":p,h=Mo(e,["x","y","radius","stroke","color","opacity","tab"]),m=t.getCanvasCenter(i,i),g=Lo(m,2),b=g[0],y=g[1],v=2*i,_={x:n||b,y:r||y,radius:i,color:s,opacity:f,stroke:l,width:v,height:v},w=Bo(Bo(Bo(Bo({},t._initArgs),h),_),{},{tab:d,variant:Br.CIRCLE});if(!h.key||!t.replaceShapeIfExisted(h.key,w)){t.drawCircle(_);var x=t.pushShapeToShapes(w);t.updateState({selectedShape:Bo(Bo({},w),{},{index:x,resizingBox:!0})},t.activateResizingActions)}})),qo(Vo(t),"addImage",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.img,r=e.x,o=void 0===r?void 0:r,i=e.y,a=void 0===i?void 0:i,l=e.opacity,c=void 0===l?1:l,s=e.tab,u=void 0===s?"image":s,f=e.stroke,p=void 0===f?{}:f,d=e.otherStates,h=Mo(e,["img","x","y","opacity","tab","stroke","otherStates"]);if(n){var m=function(){var e=Lo(t.getSuitableImgDiemensions(n),2),r=e[0],i=e[1],l=Lo(t.getCanvasCenter(r/2,i/2),2),s=l[0],f=l[1],m={img:n,opacity:c,width:r,height:i,originalWidth:r,originalHeight:i,x:o||s,y:a||f,stroke:p},g=Bo(Bo(Bo(Bo({},t._initArgs),h),m),{},{variant:Br.IMAGE,tab:u});if(!h.key||!t.replaceShapeIfExisted(h.key,g,d)){t.drawImage(m);var b=t.pushShapeToShapes(g);t.updateState(Bo({selectedShape:Bo(Bo({},g),{},{index:b,resizingBox:!0})},d),t.activateResizingActions)}};"string"==typeof n?n=t.makeImgElement(n,m):m()}})),qo(Vo(t),"addText",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.text,r=void 0===n?"Text":n,o=e.textSize,i=void 0===o?62:o,a=e.color,l=void 0===a?"#000000":a,c=e.textFont,s=void 0===c?"Arial":c,u=e.x,f=void 0===u?void 0:u,p=e.y,d=void 0===p?void 0:p,h=e.stroke,m=void 0===h?{}:h,g=e.opacity,b=void 0===g?1:g,y=e.tab,v=void 0===y?"text":y,_=e.otherStates,w=Mo(e,["text","textSize","color","textFont","x","y","stroke","opacity","tab","otherStates"]),x=t.getTextWidthAndHeight({text:r,textSize:i,textFont:s}),E=Lo(x,2),C=E[0],O=E[1],S=t.getCanvasCenter(C/2,O/2),k=Lo(S,2),T=k[0],j=k[1];if(r){var R={text:r,textSize:i,textFont:s,x:f||T,y:d||j,opacity:b,stroke:m,color:l},A=Bo(Bo(Bo(Bo({},t._initArgs),w),R),{},{width:C,height:O,variant:Br.TEXT,tab:v});if(w.key&&t.replaceShapeIfExisted(w.key,A,_))return;t.drawText(R);var D=t.pushShapeToShapes(A);t.updateState(Bo({selectedShape:Bo(Bo({},A),{},{index:D,resizingBox:!0})},_),t.activateResizingActions)}})),qo(Vo(t),"addAnyShape",(function(e,n){if(e.index||0===e.index){var r=t.props.shapes[e.index];if(!e.variant||r.variant===e.variant)return void t.updateShape(e,e.index,n)}var o=Bo(Bo({},e),{},{otherStates:n});switch(e.variant){case Br.IMAGE:t.addImage(o);break;case Br.RECT:t.addRect(o);break;case Br.SQUARE:t.addSquare(o);break;case Br.CIRCLE:t.addCircle(o);break;case Br.TEXT:t.addText(o);default:return}})),qo(Vo(t),"getSuitableImgDiemensions",(function(e){var n=e.width,r=e.height;return n>t._canvas.width&&(n/=n/t._canvas.width),r>t._canvas.height&&(r/=r/t._canvas.height),[n=t.fromoriginalCanvasDimensionsValue(n,"width"),r=t.fromoriginalCanvasDimensionsValue(r,"height")]})),qo(Vo(t),"getShapeByKeyOrIndex",(function(e){var n=e.key,r=e.index;if(!n&&!r&&0!==n&&0!==r)return!1;var o=t.props.shapes;return r?o[r]:o.filter((function(e){return e.key===n}))[0]})),qo(Vo(t),"replaceShapeIfExisted",(function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,o=t.getShapeByKeyOrIndex({key:e});return!!o&&(n=Bo(Bo({},n),{},{x:o.x,y:o.y,width:o.width,height:o.height}),t.updateShape(n,o.index,r),!0)})),qo(Vo(t),"setShapeVisibilityByKeyOrIndex",(function(e){var n=e.key,r=e.index,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=t.getShapeByKeyOrIndex({key:n,index:r});i&&i.hidden!==o&&t.updateShape({hidden:o||!i.hidden},i.index)})),qo(Vo(t),"getShapesIndexByAnyProp",(function(e,n){var r=t.props.shapes;if(r&&0===r.length)return[];var o=[];return r.filter((function(t,r){var i=t[e];return(i===n||void 0===i&&Boolean(i)===n)&&(o.push(r),!0)})),o})),qo(Vo(t),"updateShapes",(function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=t.props.shapes;o=o.map((function(t){return Bo(Bo({},t),e)})),t.updateState(Bo({shapes:o},n),r)})),qo(Vo(t),"replaceAllShapes",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};t.updateState({shapes:e},(function(){t.redrawShape(),n()}))})),qo(Vo(t),"updateShape",(function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,o=t.props,i=o.shapes,a=o.selectedShape;if(e&&(n||0===n||a&&(a.index||0===a.index))){if("string"==typeof e.img)return t.updateState({selectedShape:Bo(Bo({},a),{},{img:e.img})}),void t.makeImgElement(e.img,t.updateShape,e,n,r);var l={};if(n||0===n||(l.selectedShape=Bo(Bo({},a),e)),i[n=n||0===n?n:a.index]){var c=i;if(e.textSize&&e.textSize!==i[n].textSize||e.text&&e.text!==i[n].text){var s=i[n],u=t.getTextWidthAndHeight(Bo(Bo({},s),e)),f=Lo(u,2),p=f[0],d=f[1];l.selectedShape?(e.width=l.selectedShape.width=p,e.height=l.selectedShape.height=d,e.text=l.selectedShape.text=e.text||s.text):(e.width=p,e.height=d,e.text=e.text||s.text)}else e.width&&e.height&&(l.selectedShape=Bo(Bo({},a),{},{width:e.width,height:e.height}));c[n]=Bo(Bo({},c[n]),e),t.updateState(Bo(Bo({shapes:c},l),r),(function(){t.redrawShape(n)}))}}})),qo(Vo(t),"clearShape",(function(e,n,r,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=i.width,l=a||1,c=e-l,s=n-l,u=r+l,f=o+l;t._context.clearRect(c,s,u,f)})),qo(Vo(t),"eraseAndRemoveShapeFromArray",(function(e,n){if(0!==Object.keys(t.targettedShape(e)).length)return t.clearShape(0,0,t._canvas.width,t._canvas.height),n.filter((function(n){return n.index!==e&&(n.index>e&&(n.index-=1),t.drawShapeThroughVariant(n),n)}))})),qo(Vo(t),"deleteShapeByKeyOrIndex",(function(e){var n=e.index,r=e.key,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.props.selectedShape;if(!n&&0!==n&&!r){if(!i)return;n=i.index}var a=t.props.shapes,l=n||0===n?n:(t.getShapeByKeyOrIndex({key:r})||{}).index;(l||0===l)&&(l===i.index&&(o.selectedShape={}),t.updateState(Bo({shapes:t.eraseAndRemoveShapeFromArray(l,a)},o)))})),qo(Vo(t),"deleteShapes",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=t.props.shapes;e.forEach((function(e){r=t.eraseAndRemoveShapeFromArray(e,r)})),t.updateState(Bo({shapes:r},n))})),qo(Vo(t),"deleteAllShapesOrByTypeOrIndicies",(function(e){var n=e.type,r=e.all,o=void 0!==r&&r,i=e.applied,a=void 0!==i&&i,l=e.secured,c=void 0===l?[]:l;if(n||o){if(o){var s=(t.getShapeByKeyOrIndex({key:"watermark-layer"})||{}).index,u=Io(c);!s&&0!==s||u.includes(s)||u.push(s);var f=[];return t.clearShape(0,0,t._canvas.width,t._canvas.height),a||(f=t.props.shapes.filter((function(e){return!(!e.applied&&!u.includes(e.index))&&(t.drawShapeThroughVariant(e),e)}))),void t.updateState({shapes:f,selectedShape:{}})}var p=t.getShapesIndexByAnyProp("type",n);p.length>0&&t.deleteShapes(p)}})),qo(Vo(t),"makeImgElement",(function(e,n,r){for(var o=arguments.length,i=new Array(o>3?o-3:0),a=3;a-1&&n&&(t.splice(i,1),r({operations:t}),o(t,"resize"))}},{key:"render",value:function(){var e=this,t=this.state.isBlockRatio,n=this.props,r=n.canvasDimensions,o=n.processWithCloudService,a=n.onPreResize,l=n.t;return i.a.createElement(Te,{id:"preview-img-box"},i.a.createElement(en,null,l["warning.too_big_resolution"]),i.a.createElement(tn,null,i.a.createElement("h4",null,l["pre_resize.title"]),i.a.createElement(Gt,null,i.a.createElement(Zt,null,i.a.createElement(Tt,null,i.a.createElement(jt,null,l["common.width"]),i.a.createElement(Rt,{fullSize:!0,value:parseInt(r.width,10)||"",onChange:this.changeWidth})),i.a.createElement(Dt,null,i.a.createElement(Pt,{active:!t,style:o?{cursor:"not-allowed"}:{},link:!0,onClick:function(){!o&&e.toggleRatio()}},i.a.createElement(Lt,{active:!t,style:o?{cursor:"not-allowed"}:{}}))),i.a.createElement(Tt,null,i.a.createElement(jt,null,l["common.height"]),i.a.createElement(Rt,{fullSize:!0,value:parseInt(r.height,10)||"",onChange:this.changeHeight})))),i.a.createElement(Jt,null,i.a.createElement("p",null,i.a.createElement(Fe,{themeColor:!0,themeBtn:!0,onClick:function(){a("keep")}},l["pre_resize.keep_original_resolution"])),i.a.createElement("p",null,i.a.createElement(Fe,{themeColor:!0,success:!0,onClick:function(){a("resize")}},l["pre_resize.resize_n_continue"])))))}}])&&ci(t.prototype,n),r&&ci(t,r),a}(o.Component),gi=mi;"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(mi,"default","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/components/PreResize/PreResize.js");function bi(e){return(bi="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 yi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vi(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},r=e.target.value;t.props.watermark.text?t.initWatermarkImage(r):t.updateWatermarkProperty({url:r},Ul({img:r},n),{url:"",text:!1})})),Ql(ql(t),"changeTextProperty",(function(e){var n=Ql({},e.target.name,e.target.value);if(t.props.watermark.text)t.updateWatermarkProperty(n);else{var r=t.state,o=Ul({text:r.text,color:r.color,textSize:r.textSize,textFont:r.textFont,opacity:r.opacity,variant:Br.TEXT,tab:"watermark"},n);t.updateWatermarkProperty(Ul({},n),Ul(Ul({},o),{},{resizingBox:!0}),{text:Ul(Ul({},t.props.watermark.text),o)})}})),Ql(ql(t),"readFile",(function(e){if(t.props.config.processWithCloudimage)return null;var n=e.target;if(n.files&&n.files[0]){var r=new FileReader;r.onload=function(e){t.changeURL({target:{value:e.target.result}},{variant:Br.IMAGE})},r.readAsDataURL(n.files[0])}})),Ql(ql(t),"onPositionChange",(function(e){var n=t.getWatermarkLayer(),r=n.width,o=n.height,i=Hl(Qr(e,Yr(),r,o),2),a=i[0],l=i[1];t.updateWatermarkProperty({position:e},{x:a,y:l},{position:e,x:a,y:l})})),Ql(ql(t),"initWatermarkImage",Object(ko.debounce)(500,(function(e){var n=t.props.updateState,r=null;n({isShowSpinner:!0});var o=function(e){return{logoImage:e,isShowSpinner:!1,watermark:Ul(Ul({},t.props.watermark),{},{url:e.src})}};if(e){var i=t.props.shapeOperations,a=t.state.opacity;(r=new Image).setAttribute("crossOrigin","Anonymous"),r.onload=function(){var e,n=t.props.watermark.imageFilter;n&&"function"==typeof n?(r.onload=null,e=o(n(r))):e=o(r);var l=(t.getWatermarkLayer()||{}).index;i.addOrUpdate({img:r,opacity:a,index:l,variant:Br.IMAGE,key:"watermark-layer",tab:"watermark"},e)},r.onerror=function(){n({isShowSpinner:!1})},e.match(/^https?:\/\/./)?r.src=e+"?"+(new Date).getTime():r.src=e}else n({isShowSpinner:!1})}))),Ql(ql(t),"showWatermarkList",(function(){t.setState({showWaterMarkList:!0})})),Ql(ql(t),"hideWatermarkList",(function(){t.setState({showWaterMarkList:!1})})),Ql(ql(t),"onChangeWatermark",(function(e){t.changeURL({target:{value:e}}),t.hideWatermarkList()})),Ql(ql(t),"handleInputTypeChange",(function(e){var n=e.target,r=t.props,o=r.updateState,i=r.config;o({isShowSpinner:!0}),t.setState({selectedInputType:n.value}),"text"===n.value?(t.changeTextProperty({target:{name:"text",value:(i.watermark||{}).defaultText||"Your text"}}),o({isShowSpinner:!1})):(o({watermark:Ul(Ul({},t.props.watermark),{},{text:null})}),t.initWatermarkImage(t.props.watermark.url||""))}));var n=e.watermark,r=n.opacity,i=n.position,l=n.url,c=n.applyByDefault,s=n.activePositions,u=n.handleOpacity,f=e.watermark,p=f.urls,d=f.fonts,h=[],m=i||"center";if("string"==typeof s&&Lr.hasOwnProperty(s))h=Lr[s];else if(Array.isArray(s)){var g=Array(9).fill(0);s.map((function(e,t){return g[t]=e})),h=g}else h=Array(9).fill(1);return 1!==h[Pr.indexOf(m)]&&(m=Pr[h.indexOf(1)]),p&&(p=p.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if("string"==typeof e){var t=e.split("/");return{url:e,label:t[t.length-1]}}return e}))),t.initWatermarkImage(l),t.state={isBlockRatio:!1,opacity:r||.7,handleOpacity:"boolean"!=typeof u||u,position:m,url:l||(p&&p.length>1?p[0]&&p[0].url:""),urls:p||[],activePositions:h,isWatermarkList:p&&p.length>1,applyByDefault:c||!1,showWaterMarkList:!1,selectedInputType:p&&p.length>1?"gallery":"upload",text:"",color:"#000000",textSize:62,textFont:"Arial",fonts:d||zr},t}return t=a,(n=[{key:"componentDidUpdate",value:function(e){var t=this.props;t.watermark.position!==this.state.position&&this.onPositionChange(this.state.position),t.watermark.applyByDefault!==e.watermark.applyByDefault&&(this.getWatermarkLayer()?this.updateWatermarkProperty({applyByDefault:!1},{hidden:!0,resizingBox:!1},{applyByDefault:!1}):this.setState({applyByDefault:t.watermark.applyByDefault}),t.watermark.applyByDefault&&(this.getWatermarkLayer()?this.updateWatermarkProperty({applyByDefault:!0},{hidden:!1,resizingBox:!0},{applyByDefault:!0}):this.initWatermarkImage(t.watermark.url)))}},{key:"render",value:function(){var e=this,t=this.state,n=t.isWatermarkList,r=t.url,o=t.urls,a=t.opacity,l=t.handleOpacity,c=t.position,s=t.activePositions,u=(t.applyByDefault,t.showWaterMarkList),f=t.selectedInputType,p=t.text,d=t.color,h=t.textFont,m=t.textSize,g=t.fonts,b=this.props.config,y="upload"===f,v="gallery"===f,_="url"===f,w="text"===f,x=this.props.t;return i.a.createElement(Qn,null,i.a.createElement(tr,null,i.a.createElement("label",null,x["common.gallery"],i.a.createElement("input",{type:"radio",value:"gallery",checked:"gallery"===f,onChange:this.handleInputTypeChange}),i.a.createElement("span",null)),i.a.createElement("label",{style:{cursor:b.processWithCloudimage?"not-allowed":"auto"}},x["common.upload"],i.a.createElement("input",{type:"radio",value:"upload",checked:"upload"===f,disabled:b.processWithCloudimage,onChange:this.handleInputTypeChange}),i.a.createElement("span",null)),i.a.createElement("label",null,x["common.url"],i.a.createElement("input",{type:"radio",value:"url",checked:"url"===f,onChange:this.handleInputTypeChange}),i.a.createElement("span",null)),i.a.createElement("label",null,x["common.text"],i.a.createElement("input",{type:"radio",value:"text",checked:"text"===f,onChange:this.handleInputTypeChange}),i.a.createElement("span",null))),i.a.createElement(Jn,null,i.a.createElement($n,null,v&&i.a.createElement(i.a.Fragment,null,i.a.createElement("label",{htmlFor:"url"},"Watermark Gallery"),i.a.createElement(Fl,{width:"100%",list:o,valueProp:"url",id:"gallery",value:r,style:{width:"calc(100% - 120px)"},onChange:function(t){e.changeURL({target:{value:t}})}})),_&&i.a.createElement(i.a.Fragment,null,i.a.createElement("label",{htmlFor:"url"},"Watermark URL"),i.a.createElement(Rt,{id:"url",value:r,style:{width:"calc(100% - 120px)"},onChange:this.changeURL})),y&&i.a.createElement(i.a.Fragment,null,i.a.createElement("label",{htmlFor:"image-upload"},"Watermark Image"),i.a.createElement(At,{id:"image-upload",style:{width:"calc(100% - 120px)"},onChange:this.readFile})),w&&i.a.createElement(i.a.Fragment,null,i.a.createElement("label",{htmlFor:"text"},"Watermark Text"),i.a.createElement(Rt,{id:"text",value:p,style:{width:"calc(65% - 135px)",minWidth:120},name:"text",onChange:this.changeTextProperty}),i.a.createElement(Fl,{list:b.processWithCloudimage?Hr:g,valueProp:"value",id:"textFont",value:h,style:{width:111,display:"inline-block",marginLeft:8},onChange:function(t){return e.changeTextProperty({target:{name:"textFont",value:t}})}}),i.a.createElement(Rt,{value:m,type:"number",name:"textSize",style:{width:60,marginLeft:8},onChange:this.changeTextProperty}),i.a.createElement(Rt,{value:d,type:"color",style:{width:30,marginLeft:8,padding:0,background:"transparent",boxShadow:"none"},name:"color",onChange:this.changeTextProperty}))),i.a.createElement(Gn,{switcherPosition:l?"right":"left"},l&&i.a.createElement(Zn,null,i.a.createElement("label",{htmlFor:"opacity",style:{minWidth:80}},"Opacity"),i.a.createElement(Wa,{label:x["common.opacity"],min:0,max:1,step:.05,range:a,updateRange:this.changeOpacity})))),i.a.createElement(er,null,Pr.map((function(t,n){return i.a.createElement(nr,{key:t,value:t,active:t===c,clickable:s[n],onClick:function(){s[n]&&e.onPositionChange(t)}})}))),n&&u&&i.a.createElement(or,null,o.map((function(t){return i.a.createElement(ir,{key:t,src:t,onClick:function(){e.onChangeWatermark(t)}})}))))}}])&&Wl(t.prototype,n),r&&Wl(t,r),a}(o.Component),Gl=$l;"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register($l,"default","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/components/Toolbar/Watermark.js");function Zl(e){return(Zl="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 Jl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ec(e){for(var t=1;t128?255-2*(255-e.r)*(255-t.r)/255:t.r*e.r*2/255,n.g=t.g>128?255-2*(255-e.g)*(255-t.g)/255:t.g*e.g*2/255,n.b=t.b>128?255-2*(255-e.b)*(255-t.b)/255:t.b*e.b*2/255,n})),Fs.register("difference",(function(e,t){return{r:e.r-t.r,g:e.g-t.g,b:e.b-t.b}})),Fs.register("addition",(function(e,t){return{r:t.r+e.r,g:t.g+e.g,b:t.b+e.b}})),Fs.register("exclusion",(function(e,t){return{r:128-2*(t.r-128)*(e.r-128)/255,g:128-2*(t.g-128)*(e.g-128)/255,b:128-2*(t.b-128)*(e.b-128)/255}})),Fs.register("softLight",(function(e,t){var n;return(n={}).r=t.r>128?255-(255-t.r)*(255-(e.r-128))/255:t.r*(e.r+128)/255,n.g=t.g>128?255-(255-t.g)*(255-(e.g-128))/255:t.g*(e.g+128)/255,n.b=t.b>128?255-(255-t.b)*(255-(e.b-128))/255:t.b*(e.b+128)/255,n})),Fs.register("lighten",(function(e,t){return{r:t.r>e.r?t.r:e.r,g:t.g>e.g?t.g:e.g,b:t.b>e.b?t.b:e.b}})),Fs.register("darken",(function(e,t){return{r:t.r>e.r?e.r:t.r,g:t.g>e.g?e.g:t.g,b:t.b>e.b?e.b:t.b}}));n(46);Caman.Plugin.register("crop",(function(e,t,n,r){var o;return null==n&&(n=0),null==r&&(r=0),o=document.createElement("canvas"),Ps.b.copyAttributes(this.canvas,o),o.width=e,o.height=t,o.getContext("2d").drawImage(this.canvas,n,r,e,t,0,0,e,t),this.cropCoordinates={x:n,y:r},this.cropped=!0,this.replaceCanvas(o)})),Caman.Plugin.register("resize",(function(e){var t;if(null==e&&(e=null),null!==e&&(null!=e.width||null!=e.height))return null==e.width?e.width=this.canvas.width*e.height/this.canvas.height:null==e.height&&(e.height=this.canvas.height*e.width/this.canvas.width),t=document.createElement("canvas"),Ps.b.copyAttributes(this.canvas,t),t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(this.canvas,0,0,this.canvas.width,this.canvas.height,0,0,e.width,e.height),this.resized=!0,this.replaceCanvas(t);Rs.a.error("Invalid or missing dimensions given for resize")})),Caman.Filter.register("crop",(function(){return this.processPlugin("crop",Array.prototype.slice.call(arguments,0))})),Caman.Filter.register("resize",(function(){return this.processPlugin("resize",Array.prototype.slice.call(arguments,0))}));var Ns,Us,Ws;n(47),n(48),n(49),n(50),n(51),n(52),n(53);Ns=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],Us=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],Ws=function(){return this.r=0,this.g=0,this.b=0,this.a=0,this.next=null},Caman.Plugin.register("compoundBlur",(function(e,t,n,r){var o,i,a,l=this.dimensions.width,c=this.dimensions.height,s=this.pixelData,u=e.data,f=l*c,p=[];for(o=0,i=0<=(a=f<<2);i?oa;i?o++:o--)p[o]=s[o];var d=0,h=r;for(r-=1;h-- >=0;){var m,g,b,y,v,_,w,x,E,C,O,S,k,T,j,R,A,D,P,L,M,I,F,z=t+.5|0;if(0!==z){z>256&&(z=256);var H=z+z+1,B=l-1,N=c-1,U=z+1,W=U*(U+1)/2,Y=new Ws,V=void 0,X=Y;for(o=1,m=1<=(g=H);m?og;m?o++:o--)X=X.next=new Ws,o===U&&(V=X);X.next=Y;var q=null,K=null,Q=P=0,$=Ns[z],G=Us[z];for(D=0,L=0<=(M=c);L?DM;L?D++:D--){var Z,J,ee,te,ne,re;for(k=_=b=j=x=v=0,T=U*(S=p[P]),w=U*(O=p[P+1]),y=U*(C=p[P+2]),j+=W*S,x+=W*O,v+=W*C,X=Y,o=0,Z=0<=(J=U);Z?oJ;Z?o++:o--)X.r=S,X.g=O,X.b=C,X=X.next;for(o=1,ee=1<=(te=U);ee?ote;ee?o++:o--)E=P+((Bre;ne?A++:A--)p[P]=j*$>>G,p[P+1]=x*$>>G,p[P+2]=v*$>>G,j-=T,x-=w,v-=y,T-=q.r,w-=q.g,y-=q.b,E=Q+((E=A+U)F;I?A++:A--){var oe,ie,ae,le,ce,se;for(_=b=k=x=v=j=0,T=U*(S=p[P=A<<2]),w=U*(O=p[P+1]),y=U*(C=p[P+2]),j+=W*S,x+=W*O,v+=W*C,X=Y,o=0,oe=0<=(ie=U);oe?oie;oe?o++:o--)X.r=S,X.g=O,X.b=C,X=X.next;var ue=l;for(o=1,ae=1<=(le=U);ae?ole;ae?o++:o--)P=ue+A<<2,j+=(X.r=S=p[P])*(R=U-o),x+=(X.g=O=p[P+1])*R,v+=(X.b=C=p[P+2])*R,k+=S,_+=O,b+=C,X=X.next,ose;ce?D++:D--)p[E=P<<2]=j*$>>G,p[E+1]=x*$>>G,p[E+2]=v*$>>G,j-=T,x-=w,v-=y,T-=q.r,w-=q.g,y-=q.b,E=A+((E=D+U)-1;){var fe=o<<2,pe=(255&u[fe+2])/255*r,de=0|pe;if(de===d){var he=256*(pe-(0|pe)),me=256-he;s[fe]=s[fe]*me+p[fe]*he>>8,s[fe+1]=s[fe+1]*me+p[fe+1]*he>>8,s[fe+2]=s[fe+2]*me+p[fe+2]*he>>8}else de===d+1&&(s[fe]=p[fe],s[fe+1]=p[fe+1],s[fe+2]=p[fe+2])}d++}}return this})),Caman.Filter.register("tiltShift",(function(e){var t={center:{x:this.dimensions.width/2,y:this.dimensions.height/2},angle:45,focusWidth:200,startRadius:3,radiusFactor:1.5,steps:3};(e=Ps.b.extend(t,e)).angle*=Math.PI/180;var n=function(e,t,n,r,o,i,a){var l=document.createElement("canvas");l.width=e,l.height=t;var c=n+Math.cos(o)*i*.5,s=r+Math.sin(o)*i*.5,u=n-Math.cos(o)*i*.5,f=r-Math.sin(o)*i*.5,p=l.getContext("2d"),d=p.createLinearGradient(c,s,u,f);return a?(d.addColorStop(0,"white"),d.addColorStop(.5,"black"),d.addColorStop(1,"white")):(d.addColorStop(0,"white"),d.addColorStop(1,"black")),p.fillStyle=d,p.fillRect(0,0,e,t),p.getImageData(0,0,e,t)}(this.dimensions.width,this.dimensions.height,e.center.x,e.center.y,e.angle,e.focusWidth,!0);return this.processPlugin("compoundBlur",[n,e.startRadius,e.radiusFactor,e.steps])})),Caman.Filter.register("radialBlur",(function(e){var t={size:50,center:{x:this.dimensions.width/2,y:this.dimensions.height/2},startRadius:3,radiusFactor:1.5,steps:3,radius:null};(e=Ps.b.extend(t,e)).radius||(e.radius=this.dimensions.width-1?"&version=":"?version=")+(new Date).getTime()),u.onload=function(){var e={width:u.width,height:u.height,ratio:u.width/u.height},n={activeBody:"preResize",isShowSpinner:!1,img:u,logoImage:f,imageName:s.indexOf("?")>-1?s.slice(0,s.indexOf("?")):s};if("manual"===o&&(i=u.height){var r=u.width/u.height,l={ratio:r,width:i,height:i/r};t.setState(qs(qs({preCanvasDimensions:qs({},l),canvasDimensions:qs({},l)},n),{},{activeBody:"preview",isPreResize:!0}))}else{var c=u.height/u.width,p={ratio:c,width:a/c,height:a};t.setState(qs(qs({preCanvasDimensions:qs({},p),canvasDimensions:qs({},p)},n),{},{activeBody:"preview",isPreResize:!0}))}else{var d,h=t.props.config.tools;1===h.length&&(d=h[0]),t.setState(qs(qs({},n),{},{activeBody:"preview",isPreResize:!1}),(function(){t.setState({activeTab:d})}))}}})),eu(Zs(t),"determineImageType",(function(){var e=t.props.src;if(e instanceof Blob)t.setState({imageMime:e.type});else{var n=new XMLHttpRequest;n.open("GET",e),n.responseType="arraybuffer",n.onload=function(e){var n=e.target;t.setState({imageMime:js()(new Uint8Array(n.response)).mime})},n.send()}})),eu(Zs(t),"updateState",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};t._isMounted&&t.setState(e,n)})),eu(Zs(t),"onRevert",(function(){var e=t.state,n=e.cancelLastOperation,r=e.activeTab;t.setState({activeTab:null,isHideCanvas:!0,isShowSpinner:!0}),n(r,(function(){t.setState(qs({isHideCanvas:!1,isShowSpinner:!1},tu))}))})),eu(Zs(t),"onAdjust",(function(e,n){(0,t.state.onAdjust)(e,n)})),eu(Zs(t),"onRotate",(function(e,n,r,o){(0,t.state.onRotate)(e,n,r,o)})),eu(Zs(t),"onFlip",(function(e){(0,t.state.flip)(e)})),eu(Zs(t),"onSave",(function(){var e=t.state.saveImage;t.setState({isShowSpinner:!0}),e()})),eu(Zs(t),"onDownloadImage",(function(){var e=t.props.onBeforeComplete,n=t.state,r=n.downloadImage,o=(0,n.getResultCanvas)();!e||e({status:"before-complete",canvas:o})?r((function(){t.props.onComplete({status:"success",canvas:o}),t.props.onClose(Wr.IMAGE_DOWNLOADED)})):(t.props.onComplete({status:"success",canvas:o}),t.props.onClose(Wr.IMAGE_EDITS_COMPLETED))})),eu(Zs(t),"onApplyEffects",(function(e){var n=t.state,r=n.applyCorrections,o=n.effect===e?null:e;t.setState({isShowSpinner:!0,effect:o},(function(){r((function(){t.setState({isShowSpinner:!1})}))}))})),eu(Zs(t),"onApplyFilters",(function(e){var n=t.state,r=n.applyCorrections,o=n.filter===e?null:e;t.setState({isShowSpinner:!0,filter:o},(function(){r((function(){t.setState({isShowSpinner:!1})}))}))})),eu(Zs(t),"handleSave",(function(){var e=t.state,n=e.processWithFilerobot,r=e.processWithCloudService;n||r?t.onSave():t.onDownloadImage()})),eu(Zs(t),"apply",(function(e){var n=t.state,r=n.activeTab;(0,n.applyChanges)(r,e),t.setState({activeTab:null})})),eu(Zs(t),"redoOperation",(function(e){var n=e.operationIndex,r=e.callback,o=void 0===r?function(){}:r,i=e.resetActiveTab,a=void 0===i||i,l=e.operationObject,c=void 0===l?{}:l,s=t.state.applyOperations;a?t.setState({activeTab:null,isHideCanvas:!0,isShowSpinner:!0}):t.setState({isHideCanvas:!0,isShowSpinner:!0}),s(n,(function(){t.setState({isHideCanvas:!1,isShowSpinner:!1},o)}),c)})),eu(Zs(t),"resetOperations",(function(){var e=t.state.resetAll;t.setState({activeTab:null,isHideCanvas:!0,isShowSpinner:!0}),e((function(){t.setState(qs({isHideCanvas:!1,isShowSpinner:!1},tu))}))})),eu(Zs(t),"onPreResize",(function(e){var n,r=t.props.config.tools;switch(1===r.length&&(n=r[0]),e){case"keep":t.setState({canvasDimensions:{},isPreResize:!1,activeBody:"preview"},(function(){t.setState({activeTab:n})}));break;case"resize":var o=t.state.canvasDimensions;t.setState({preCanvasDimensions:o,isPreResize:!0,activeBody:"preview"},(function(){t.setState({activeTab:n})}))}}));var n=e.config,r=n.processWithCloudimage,i=n.processWithFilerobot,l=n.processWithCloudService,c=n.uploadWithCloudimageLink,s=n.reduceBeforeEdit,u=n.cropBeforeEdit,f=n.watermark,p=n.imageSealing;return t.state=qs(qs({isShowSpinner:!0,isHideCanvas:!1,activeTab:null,activeBody:null,currentOperation:null,original:{width:300,height:200},cropDetails:{width:300,height:200},canvasDimensions:{width:300,height:200,ratio:1.5},processWithFilerobot:i,processWithCloudimage:r,processWithCloudService:l,uploadCloudimageImage:c,reduceBeforeEdit:s,cropBeforeEdit:u,roundCrop:!1,imageSealing:qs({enabled:!1,salt:"",char_count:10,include_params:null},p),operationsOriginal:[],operationsZoomed:[],operations:[],canvasZoomed:null,canvasOriginal:null,isPreResize:!1,initialZoom:1},tu),{},{watermark:f||Mr,focusPoint:{x:null,y:null},shapes:[],selectedShape:{},availableShapes:[]}),t}return t=a,(n=[{key:"componentDidMount",value:function(){this._isMounted=!0,this.loadImage(),this.determineImageType()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1}},{key:"render",value:function(){var e=this.state,t=e.isShowSpinner,n=e.activeTab,r=e.operations,o=e.operationsOriginal,a=e.operationsZoomed,l=e.currentOperation,c=e.isHideCanvas,s=e.cropDetails,u=e.original,f=e.canvasDimensions,p=e.processWithCloudimage,d=e.processWithFilerobot,h=e.processWithCloudService,m=e.uploadCloudimageImage,g=e.imageMime,b=e.lastOperation,y=e.operationList,v=e.initialZoom,_=e.canvasZoomed,w=e.canvasOriginal,x=e.reduceBeforeEdit,E=e.cropBeforeEdit,C=e.img,O=e.imageName,S=e.activeBody,k=e.isPreResize,T=e.preCanvasDimensions,j=e.logoImage,R=e.imageSealing,A=e.effect,D=e.filter,P=e.crop,L=e.roundCrop,M=e.resize,I=e.rotate,F=e.correctionDegree,z=e.flipX,H=e.flipY,B=e.adjust,N=e.watermark,U=e.focusPoint,W=e.shapes,V=e.shapeOperations,X=e.selectedShape,q=e.availableShapes,K=this.props,Q=K.src,$=K.config,G=K.onClose,Z=K.onComplete,J=K.closeOnLoad,ee=void 0===J||J,te=K.t,ne=void 0===te?{}:te,re=K.theme,oe={effect:A,filter:D,crop:P,resize:M,rotate:I,flipX:z,flipY:H,adjust:B,correctionDegree:F},ie=qs(qs({t:ne,theme:re,cropDetails:s,original:u,activeTab:n,src:Q,onClose:G,config:$,canvasDimensions:f,processWithCloudimage:p,processWithFilerobot:d,processWithCloudService:h,operations:r,operationsOriginal:o,operationsZoomed:a,initialZoom:v,isShowSpinner:t,img:C,logoImage:j,imageName:O,activeBody:S,preCanvasDimensions:T,updateState:this.updateState,onRevert:this.onRevert,apply:this.apply,onSave:this.onSave,onFlip:this.onFlip,onApplyEffects:this.onApplyEffects,onApplyFilters:this.onApplyFilters,onRotate:this.onRotate,onAdjust:this.onAdjust,onDownloadImage:this.onDownloadImage,handleSave:this.handleSave},oe),{},{watermark:N,focusPoint:U,shapes:W,shapeOperations:V,selectedShape:X,availableShapes:q}),ae=qs(qs({t:ne,theme:re,cropDetails:s,original:u,activeTab:n,isShowSpinner:t,operations:r,operationsOriginal:o,operationsZoomed:a,initialZoom:v,currentOperation:l,isHideCanvas:c,src:Q,imageMime:g,onClose:G,onComplete:Z,canvasDimensions:f,closeOnLoad:ee,config:$,processWithCloudimage:p,processWithFilerobot:d,processWithCloudService:h,imageSealing:R,uploadCloudimageImage:m,lastOperation:b,operationList:y,canvasZoomed:_,canvasOriginal:w,reduceBeforeEdit:x,cropBeforeEdit:E,img:C,logoImage:j,imageName:O,isPreResize:k,preCanvasDimensions:T,updateState:this.updateState,handleSave:this.handleSave,onPreResize:this.onPreResize,redoOperation:this.redoOperation,roundCrop:L},oe),{},{watermark:N,focusPoint:U,shapes:W,shapeOperations:V,selectedShape:X}),le={logoImage:j,t:ne,theme:re,activeBody:S,operations:r,operationsOriginal:o,operationsZoomed:a,initialZoom:v,currentOperation:l,processWithCloudimage:p,processWithCloudService:h,updateState:this.updateState,redoOperation:this.redoOperation,resetOperations:this.resetOperations,config:$,watermark:N};return i.a.createElement(Y,{roundCrop:L},i.a.createElement(ks,ie),i.a.createElement(ke,null,"preview"===S&&i.a.createElement(ri,ae),"preResize"===S&&i.a.createElement(gi,ae),i.a.createElement(In,{overlay:!0,show:t,label:ne["spinner.label"]})),i.a.createElement(yr,le))}}])&&Ks(t.prototype,n),r&&Ks(t,r),a}(o.Component),ru=nu;"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(tu,"INITIAL_PARAMS","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/ImageEditor.js"),__REACT_HOT_LOADER__.register(nu,"default","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/ImageEditor.js"));function ou(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n cursor: pointer;\n position: absolute;\n font-weight: normal;\n top: ",";\n right: ",";\n left: ",";\n bottom: ",";\n font-size: ",";\n z-index: 10;\n font-family: 'filerobot-image-editor-font' !important;\n color: ",";\n speak: none;\n font-style: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n \n :hover {\n color: ",";\n }\n \n :before {\n content: '\\e90c'\n }\n"],["\n cursor: pointer;\n position: absolute;\n font-weight: normal;\n top: ",";\n right: ",";\n left: ",";\n bottom: ",";\n font-size: ",";\n z-index: 10;\n font-family: 'filerobot-image-editor-font' !important;\n color: ",";\n speak: none;\n font-style: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n \n :hover {\n color: ",";\n }\n \n :before {\n content: '\\\\e90c'\n }\n"]);return ou=function(){return e},e}var iu=a.b.span.attrs((function(){return{role:"button"}}))(ou(),(function(e){return e.t||"10px"}),(function(e){return e.r||"10px"}),(function(e){return e.l||"auto"}),(function(e){return e.b||"auto"}),(function(e){return e.fz||"18px"}),(function(){return f.modal.colorMuted}),(function(e){return f.modal.colorMutedHover}));"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(iu,"CloseBtn","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/components/CloseBtn.js");function au(e){return(au="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 lu(){return(lu=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function su(e,t){for(var n=0;n div {\n padding: 40px !important;\n }\n \n * {\n color: black !important;\n }\n ":""}));function xu(){return"\n top: 20% !important;\n left: 15px !important;\n right: 15px !important;\n bottom: auto !important;\n color: black !important;\n text-align: center !important;\n font-size: 18px;\n \n > div {\n padding: 40px !important;\n }\n \n * {\n color: black !important;\n }\n "}var Eu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&uu(e,t)}(c,e);var t,n,a,l=fu(c);function c(e){var t,n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),t=l.call(this,e),n=du(t),o=function(e){var n=t.props.onClose,r=void 0===n?function(){}:n;27===e.keyCode&&(e.stopPropagation(),r(Wr.ESC_KEY_PRESSED))},(r="handleOutsideMouseClick")in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t.root=document.createElement("div"),t.root.classList.add("filerobot-image-editor-root"),document.body.appendChild(t.root);var i=t.props.closeOnOutsideClick;return(void 0===i||i)&&document.addEventListener("keydown",t.handleOutsideMouseClick),t}return t=c,(n=[{key:"componentWillUnmount",value:function(){var e=this.props.closeOnOutsideClick,t=void 0===e||e;document.body.removeChild(this.root),t&&document.removeEventListener("keydown",this.handleOutsideMouseClick)}},{key:"render",value:function(){var e=this.props,t=e.onClose,n=void 0===t?function(){}:t,a=e.isHideCloseBtn,l=e.configModalId,c=cu(e,["onClose","isHideCloseBtn","configModalId"]);return Object(r.createPortal)(i.a.createElement(o.Fragment,null,i.a.createElement(vu,{className:"modal-overlay",onClick:function(){return n(Wr.MODAL_OVERLAY_CLICKED)}}),i.a.createElement(wu,lu({id:l||Or},this.props),!a&&i.a.createElement(iu,{onClick:n}),i.a.createElement(_u,lu({h:"100%"},c),this.props.children))),this.root)}}])&&su(t.prototype,n),a&&su(t,a),c}(o.Component),Cu=("undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(vu,"ModalOverlay","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/components/Modal.js"),__REACT_HOT_LOADER__.register(_u,"ModalContent","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/components/Modal.js"),__REACT_HOT_LOADER__.register(wu,"ModalFullScreen","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/components/Modal.js"),__REACT_HOT_LOADER__.register(xu,"getSmallModalStyle","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/components/Modal.js"),__REACT_HOT_LOADER__.register(Eu,"Modal","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/components/Modal.js")),n(66),{"header.image_editor_title":"Filerobot Image Editor","header.toggle_fullscreen":"Toggle fullscreen","header.close_modal":"Close window","toolbar.download":"Download","toolbar.save":"Save","toolbar.apply":"Apply","toolbar.cancel":"Cancel","toolbar.go_back":"Go Back","toolbar.adjust":"Adjust","toolbar.effects":"Effects","toolbar.filters":"Filters","toolbar.orientation":"Orientation","toolbar.crop":"Crop","toolbar.resize":"Resize","toolbar.watermark":"Watermark","toolbar.focus_point":"Focus point","toolbar.shapes":"Shapes","toolbar.image":"Image","toolbar.text":"Text","adjust.brightness":"Brightness","adjust.contrast":"Contrast","adjust.exposure":"Exposure","adjust.saturation":"Saturation","orientation.rotate_l":"Rotate Left","orientation.rotate_r":"Rotate Right","orientation.flip_h":"Flip Horizontally","orientation.flip_v":"Flip Vertically","pre_resize.title":"Would you like to reduce resolution before editing the image?","pre_resize.keep_original_resolution":"Keep original resolution","pre_resize.resize_n_continue":"Resize & Continue","footer.reset":"Reset","footer.undo":"Undo","footer.redo":"Redo","spinner.label":"Processing...","warning.too_big_resolution":"The resolution of the image is too big for the web. It can cause problems with Image Editor performance.","common.x":"x","common.y":"y","common.width":"width","common.height":"height","common.custom":"custom","common.original":"original","common.square":"square","common.opacity":"Opacity","common.apply_watermark":"Apply watermark","common.url":"URL","common.upload":"Upload","common.gallery":"Gallery","common.text":"Text"}),Ou=Cu,Su=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Cu,"default","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/assets/i18n/en.js"),{"header.image_editor_title":"Éditeur d'Image Filerobot","toolbar.download":"Télécharger","toolbar.save":"Sauvegarder","toolbar.apply":"Appliquer","toolbar.cancel":"Annuler","toolbar.go_back":"Retour","toolbar.adjust":"Ajuster","toolbar.effects":"Effets","toolbar.filters":"Filtres","toolbar.orientation":"Orientation","toolbar.crop":"Rogner","toolbar.resize":"Redimensionner","toolbar.watermark":"Watermark","toolbar.focus_point":"Focus point","toolbar.shapes":"Shapes","toolbar.image":"Image","toolbar.text":"Text","adjust.brightness":"Luminosité","adjust.contrast":"Contraste","adjust.exposure":"Exposition","adjust.saturation":"Saturation","orientation.rotate_l":"Rotation Gauche","orientation.rotate_r":"Rotation Droite","orientation.flip_h":"Miroir Horizontal","orientation.flip_v":"Miroir Vertical","pre_resize.title":"Voulez-vous réduire la résolution de l'image avant d'éditer l'image ?","pre_resize.keep_original_resolution":"Conserver la résolution d'origine","pre_resize.resize_n_continue":"Redimensionner et Continuer","footer.reset":"Réinitialiser","footer.undo":"Annuler","footer.redo":"Refaire","spinner.label":"Transformation...","warning.too_big_resolution":"La résolution de l'image est trop grande pour le web et peut endommager les performances de l'Éditeur d'Image Filerobot.","common.x":"x","common.y":"y","common.width":"largeur","common.height":"hauteur","common.custom":"custom","common.original":"original","common.square":"carré","common.opacity":"opacité","common.apply_watermark":"Appliquer watermark","common.url":"URL","common.upload":"Upload","common.gallery":"Gallery"}),ku=Su,Tu=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Su,"default","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/assets/i18n/fr.js"),{"header.image_editor_title":"Filerobot 图片编辑器","toolbar.download":"下载","toolbar.save":"保存","toolbar.apply":"应用","toolbar.cancel":"取消","toolbar.go_back":"后退","toolbar.adjust":"调整","toolbar.effects":"效果","toolbar.filters":"滤镜","toolbar.orientation":"方向","toolbar.crop":"裁切","toolbar.resize":"缩放","toolbar.watermark":"水印","toolbar.focus_point":"Focus point","toolbar.shapes":"Shapes","toolbar.image":"Image","toolbar.text":"Text","adjust.brightness":"亮度","adjust.contrast":"对比对","adjust.exposure":"曝光度","adjust.saturation":"饱和度","orientation.rotate_l":"向左旋转","orientation.rotate_r":"向右旋转","orientation.flip_h":"水平翻转","orientation.flip_v":"垂直翻转","pre_resize.title":"是否需要在开始编辑之前缩小图片的分辨率?","pre_resize.keep_original_resolution":"保持原始分辨率","pre_resize.resize_n_continue":"缩小并继续","footer.reset":"重置","footer.undo":"撤销","footer.redo":"重做","spinner.label":"处理中...","warning.too_big_resolution":"图片的分辨率过大,这会严重影响图片编辑器的性能。","common.x":"x","common.y":"y","common.width":"宽度","common.height":"高度","common.custom":"自定义","common.original":"原始比例","common.square":"方形","common.banner":"通栏","common.opacity":"透明度","common.apply_watermark":"应用水印","common.url":"URL","common.upload":"Upload","common.gallery":"Gallery"}),ju=Tu,Ru=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Tu,"default","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/assets/i18n/zh-cn.js"),{en:Ou,fr:ku,"zh-cn":ju}),Au=Ru,Du=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Ru,"default","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/assets/i18n/index.js"),{colors:{primaryBg:"#1e262c",primaryBgHover:"#637381",secondaryBg:"#263138",secondaryBgHover:"#34444c",text:"#F9FAFB",textHover:"#fff",textMute:"#aaa",textWarn:"#f7931e",secondaryBgOpacity:"rgba(0, 0, 0, 0.75)",accent:"#00707c",border:"#161e23",borderLight:"#70777f",disabledBg:"rgba(255, 0, 0, 0.1)"},fonts:{}}),Pu=Du,Lu=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Du,"default","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/assets/theme/dark.js"),{colors:{primaryBg:"#f2f2f2",primaryBgHover:"#fff",secondaryBg:"#fff",secondaryBgHover:"#f9fafb",secondaryBgOpacity:"rgba(255,255,255, 0.75)",text:"#34444c",textHover:"#1a2329",textMute:"#aaa",textWarn:"#f7931e",accent:"#00707c",border:"#aeaeae",borderLight:"#e1e1e1",disabledBg:"rgba(255, 0, 0, 0.1)"},fonts:{}}),Mu=Lu,Iu=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Lu,"default","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/assets/theme/light.js"),"undefined"==typeof window||"undefined"==typeof CanvasRenderingContext2D);"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Iu,"isServerSide","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/utils/is-server-side.js");function Fu(e){return(Fu="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 zu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hu(e){for(var t=1;t-1})):n})})),Xu(Yu(t),"open",(function(e){var n=t.props.onOpen;t._isMounted&&t.setState({isVisible:!0,src:e},(function(){n&&n()}))})),Xu(Yu(t),"close",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wr.CLOSE_BTN_CLICKED,n=t.props.onClose,r="object"===Fu(e)?Wr.CLOSE_BTN_CLICKED:e;t._isMounted&&t.setState({isVisible:!1},(function(){n&&n({status:r})}))})),s.translations=s.translations||{},s.language=s.translations[s.language]||Au[s.language]?s.language:"en",s.theme=s.theme||{},s.theme.colors=s.theme.colors||{},s.theme.fonts=s.theme.fonts||{},s.colorScheme=s.colorScheme||"dark",s.platform=s.platform||"filerobot",t.state={isVisible:r,src:a,config:t.processConfig(s),t:Hu(Hu({},Au[s.language]),s.translations[s.language]),colorScheme:s.colorScheme||"dark",theme:{colors:Hu(Hu({},("light"===s.colorScheme?Mu:Pu).colors),s.theme.colors),fonts:Hu(Hu({},("light"===s.colorScheme?Mu:Pu).fonts),s.theme.fonts)}},t}return t=l,(n=[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1}},{key:"componentDidUpdate",value:function(e){this.props.show!==e.show&&(this.props.show?this.open(this.props.src):this.close())}},{key:"render",value:function(){var e=this.state,t=e.isVisible,n=e.src,r=e.config,o=e.t,l=e.theme,c=this.props,s=c.onComplete,u=void 0===s?function(){}:s,f=c.onBeforeComplete,p=c.closeOnLoad,d=r.showInModal,h=void 0===d||d;if(!n||!t||Iu)return null;if(n instanceof Blob&&r.processWithCloudimage)return null;var m=i.a.createElement(W,null,i.a.createElement(ru,{src:n,config:r,onComplete:u,onBeforeComplete:f,onClose:this.close,closeOnLoad:p,t:o}));return i.a.createElement(a.a,{theme:Hu({},l)},h?i.a.createElement(Eu,{noBorder:!0,fullScreen:"lg",isHideCloseBtn:!0,style:{borderRadius:5},onClose:this.close,configModalId:r.elementId},m):m)}}])&&Bu(t.prototype,n),r&&Bu(t,r),l}(o.Component),Ku=qu,Qu=Ku;"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(qu,"ImageEditorWrapper","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/ImageEditorWrapper.js"),__REACT_HOT_LOADER__.register(Ku,"default","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/react/ImageEditorWrapper.js"));function $u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gu(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];$u(this,e);var l=n.elementId;l=n.elementId?n.elementId:n.processWithCloudimage||n.cloudimage?"filerobot-image-editor-cloudimage":n.processWithFilerobot||n.filerobot?"filerobot-image-editor-uploader":"filerobot-image-editor";var c=document.getElementById(l),s=function(e){console.log(e)};s=o&&"function"==typeof o?o:(o=o||{}).onComplete||s,c||((c=document.createElement("div")).id=l,document.body.appendChild(c));var u=function(e){return Object(r.render)(i.a.createElement(e,{show:a,config:n,onComplete:s,onBeforeComplete:o.onBeforeComplete,onOpen:o.onOpen,onClose:o.onClose}),c)};this.component=u(Qu),this.open=this.component.open,this.close=this.component.close,this.unmount=function(){return t.__unmount__REACT_HOT_LOADER__.apply(t,arguments)}}var t,n,o;return t=e,(n=[{key:"__unmount__REACT_HOT_LOADER__",value:function(){return Object(r.unmountComponentAtNode)(container)}}])&&Gu(t.prototype,n),o&&Gu(t,o),e}();window.FilerobotImageEditor=Zu;"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Zu,"FilerobotImageEditor","/mnt/w/ScaleFlex/projects/filerobot-image-editor/projects/js/index.js")}]);
\ No newline at end of file
diff --git a/build/3.12.1/filerobot-image-editor.min.js b/build/3.12.1/filerobot-image-editor.min.js
new file mode 100644
index 00000000..f28b7ef0
--- /dev/null
+++ b/build/3.12.1/filerobot-image-editor.min.js
@@ -0,0 +1,88 @@
+/*!
+ *
+ * filerobot-image-editor v3.12.1
+ * https://github.com/scaleflex/filerobot-image-editor
+ *
+ * Copyright (c) 2019 scaleflex
+ * Released under the MIT license
+ *
+ * Date: 2020-10-09T11:48:47.886Z
+ *
+ */!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="https://cdn.scaleflex.it/plugins/filerobot-image-editor/3.12.1/",n(n.s=70)}([function(e,t,n){"use strict";e.exports=n(23)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Xe}));var r=n(6),o=n.n(r),i=n(13),a=n.n(i),l=n(0),c=n.n(l),s=n(14),u=n(7),f=n(8),p=(n(27),n(20)),h=n(21),d=function(e,t){for(var n=[e[0]],r=0,o=t.length;r1?r-1:0),i=1;i0?" Additional arguments: "+o.join(", "):"")));return w(a)}return y(t,e),t}(Error),R=/^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm,D=function(e){var t=""+(e||""),n=[];return t.replace(R,(function(e,t,r){return n.push({componentId:t,matchIndex:r}),e})),n.map((function(e,r){var o=e.componentId,i=e.matchIndex,a=n[r+1];return{componentId:o,cssFromDOM:a?t.slice(i,a.matchIndex):t.slice(i)}}))},M=/^\s*\/\/.*$/gm,A=new o.a({global:!1,cascade:!0,keyframe:!1,prefix:!1,compress:!1,semicolon:!0}),I=new o.a({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!1}),z=[],B=function(e){if(-2===e){var t=z;return z=[],t}},L=a()((function(e){z.push(e)})),N=void 0,F=void 0,U=void 0,H=function(e,t,n){return t>0&&-1!==n.slice(0,t).indexOf(F)&&n.slice(t-F.length,t)!==F?"."+N:e};I.use([function(e,t,n){2===e&&n.length&&n[0].lastIndexOf(F)>0&&(n[0]=n[0].replace(U,H))},L,B]),A.use([L,B]);var W=function(e){return A("",e)};function Y(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&",o=e.join("").replace(M,""),i=t&&n?n+" "+t+" { "+o+" }":o;return N=r,F=t,U=new RegExp("\\"+F+"\\b","g"),I(n||!t?"":t,i)}var X=function(){return n.nc},V=function(e,t,n){n&&((e[t]||(e[t]=Object.create(null)))[n]=!0)},q=function(e,t){e[t]=Object.create(null)},Q=function(e){return function(t,n){return void 0!==e[t]&&e[t][n]}},$=function(e){var t="";for(var n in e)t+=Object.keys(e[n]).join(" ")+" ";return t.trim()},K=function(e){if(e.sheet)return e.sheet;for(var t=e.ownerDocument.styleSheets.length,n=0;n"+e()+""}},te=function(e,t){return function(){var n,r=((n={})[_]=$(t),n["data-styled-version"]="4.4.1",n),o=X();return o&&(r.nonce=o),c.a.createElement("style",b({},r,{dangerouslySetInnerHTML:{__html:e()}}))}},ne=function(e){return function(){return Object.keys(e)}},re=function(e,t){return e.createTextNode(G(t))},oe=function e(t,n){var r=void 0===t?Object.create(null):t,o=void 0===n?Object.create(null):n,i=function(e){var t=o[e];return void 0!==t?t:o[e]=[""]},a=function(){var e="";for(var t in o){var n=o[t][0];n&&(e+=G(t)+n)}return e};return{clone:function(){var t=function(e){var t=Object.create(null);for(var n in e)t[n]=b({},e[n]);return t}(r),n=Object.create(null);for(var i in o)n[i]=[o[i][0]];return e(t,n)},css:a,getIds:ne(o),hasNameForId:Q(r),insertMarker:i,insertRules:function(e,t,n){i(e)[0]+=t.join(" "),V(r,e,n)},removeRules:function(e){var t=o[e];void 0!==t&&(t[0]="",q(r,e))},sealed:!1,styleTag:null,toElement:te(a,r),toHTML:ee(a,r)}},ie=function(e,t,n,r,o){if(P&&!n){var i=function(e,t,n){var r=document;e?r=e.ownerDocument:t&&(r=t.ownerDocument);var o=r.createElement("style");o.setAttribute(_,""),o.setAttribute("data-styled-version","4.4.1");var i=X();if(i&&o.setAttribute("nonce",i),o.appendChild(r.createTextNode("")),e&&!t)e.appendChild(o);else{if(!t||!e||!t.parentNode)throw new j(6);t.parentNode.insertBefore(o,n?t:t.nextSibling)}return o}(e,t,r);return T?function(e,t){var n=Object.create(null),r=Object.create(null),o=void 0!==t,i=!1,a=function(t){var o=r[t];return void 0!==o?o:(r[t]=re(e.ownerDocument,t),e.appendChild(r[t]),n[t]=Object.create(null),r[t])},l=function(){var e="";for(var t in r)e+=r[t].data;return e};return{clone:function(){throw new j(5)},css:l,getIds:ne(r),hasNameForId:Q(n),insertMarker:a,insertRules:function(e,r,l){for(var c=a(e),s=[],u=r.length,f=0;f0&&(i=!0,t().insertRules(e+"-import",s))},removeRules:function(a){var l=r[a];if(void 0!==l){var c=re(e.ownerDocument,a);e.replaceChild(c,l),r[a]=c,q(n,a),o&&i&&t().removeRules(a+"-import")}},sealed:!1,styleTag:e,toElement:te(l,n),toHTML:ee(l,n)}}(i,o):function(e,t){var n=Object.create(null),r=Object.create(null),o=[],i=void 0!==t,a=!1,l=function(e){var t=r[e];return void 0!==t?t:(r[e]=o.length,o.push(0),q(n,e),r[e])},c=function(){var t=K(e).cssRules,n="";for(var i in r){n+=G(i);for(var a=r[i],l=J(o,a),c=l-o[a];c0&&(a=!0,t().insertRules(r+"-import",d)),o[u]+=h,V(n,r,s)},removeRules:function(l){var c=r[l];if(void 0!==c&&!1!==e.isConnected){var s=o[c];!function(e,t,n){for(var r=t-n,o=t;o>r;o-=1)e.deleteRule(o)}(K(e),J(o,c)-1,s),o[c]=0,q(n,l),i&&a&&t().removeRules(l+"-import")}},sealed:!1,styleTag:e,toElement:te(c,n),toHTML:ee(c,n)}}(i,o)}return oe()},ae=/\s+/,le=void 0;le=P?T?40:1e3:-1;var ce=0,se=void 0,ue=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P?document.head:null,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g(this,e),this.getImportRuleTag=function(){var e=t.importRuleTag;if(void 0!==e)return e;var n=t.tags[0];return t.importRuleTag=ie(t.target,n?n.styleTag:null,t.forceServer,!0)},ce+=1,this.id=ce,this.forceServer=r,this.target=r?null:n,this.tagMap={},this.deferred={},this.rehydratedNames={},this.ignoreRehydratedNames={},this.tags=[],this.capacity=1,this.clones=[]}return e.prototype.rehydrate=function(){if(!P||this.forceServer)return this;var e=[],t=[],n=!1,r=document.querySelectorAll("style["+_+'][data-styled-version="4.4.1"]'),o=r.length;if(!o)return this;for(var i=0;i0&&void 0!==arguments[0]&&arguments[0];se=new e(void 0,t).rehydrate()},e.prototype.clone=function(){var t=new e(this.target,this.forceServer);return this.clones.push(t),t.tags=this.tags.map((function(e){for(var n=e.getIds(),r=e.clone(),o=0;o1?t-1:0),r=1;r=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return((r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16))^r>>>15)>>>0}var we=function(e){return String.fromCharCode(e+(e>25?39:97))};function xe(e){var t="",n=void 0;for(n=e;n>52;n=Math.floor(n/52))t=we(n%52)+t;return we(n%52)+t}function ke(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:C,r=!!n&&e.theme===n.theme,o=e.theme&&!r?e.theme:t||n.theme;return o},_e=/[[\].#*$><+~=|^:(),"'`-]+/g,Pe=/(^-|-$)/g;function Te(e){return e.replace(_e,"-").replace(Pe,"")}function je(e){return"string"==typeof e&&!0}var Re={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},De={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Me=((Ce={})[u.ForwardRef]={$$typeof:!0,render:!0},Ce),Ae=Object.defineProperty,Ie=Object.getOwnPropertyNames,ze=Object.getOwnPropertySymbols,Be=void 0===ze?function(){return[]}:ze,Le=Object.getOwnPropertyDescriptor,Ne=Object.getPrototypeOf,Fe=Object.prototype,Ue=Array.prototype;function He(e,t,n){if("string"!=typeof t){var r=Ne(t);r&&r!==Fe&&He(e,r,n);for(var o=Ue.concat(Ie(t),Be(t)),i=Me[e.$$typeof]||Re,a=Me[t.$$typeof]||Re,l=o.length,c=void 0,s=void 0;l--;)if(s=o[l],!(De[s]||n&&n[s]||a&&a[s]||i&&i[s])&&(c=Le(t,s)))try{Ae(e,s,c)}catch(e){}return e}return e}var We=Object(l.createContext)(),Ye=We.Consumer,Xe=function(e){function t(n){g(this,t);var r=w(this,e.call(this,n));return r.getContext=Object(f.a)(r.getContext.bind(r)),r.renderInner=r.renderInner.bind(r),r}return y(t,e),t.prototype.render=function(){return this.props.children?c.a.createElement(We.Consumer,null,this.renderInner):null},t.prototype.renderInner=function(e){var t=this.getContext(this.props.theme,e);return c.a.createElement(We.Provider,{value:t},this.props.children)},t.prototype.getTheme=function(e,t){if(S(e))return e(t);if(null===e||Array.isArray(e)||"object"!==(void 0===e?"undefined":m(e)))throw new j(8);return b({},t,e)},t.prototype.getContext=function(e,t){return this.getTheme(e,t)},t}(l.Component),Ve=(function(){function e(){g(this,e),this.masterSheet=ue.master,this.instance=this.masterSheet.clone(),this.sealed=!1}e.prototype.seal=function(){if(!this.sealed){var e=this.masterSheet.clones.indexOf(this.instance);this.masterSheet.clones.splice(e,1),this.sealed=!0}},e.prototype.collectStyles=function(e){if(this.sealed)throw new j(2);return c.a.createElement(Qe,{sheet:this.instance},e)},e.prototype.getStyleTags=function(){return this.seal(),this.instance.toHTML()},e.prototype.getStyleElement=function(){return this.seal(),this.instance.toReactElements()},e.prototype.interleaveWithNodeStream=function(e){throw new j(3)}}(),Object(l.createContext)()),qe=Ve.Consumer,Qe=function(e){function t(n){g(this,t);var r=w(this,e.call(this,n));return r.getContext=Object(f.a)(r.getContext),r}return y(t,e),t.prototype.getContext=function(e,t){if(e)return e;if(t)return new ue(t);throw new j(4)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.sheet,r=e.target;return c.a.createElement(Ve.Provider,{value:this.getContext(n,r)},t)},t}(l.Component),$e={};var Ke=function(e){function t(){g(this,t);var n=w(this,e.call(this));return n.attrs={},n.renderOuter=n.renderOuter.bind(n),n.renderInner=n.renderInner.bind(n),n}return y(t,e),t.prototype.render=function(){return c.a.createElement(qe,null,this.renderOuter)},t.prototype.renderOuter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ue.master;return this.styleSheet=e,this.props.forwardedComponent.componentStyle.isStatic?this.renderInner():c.a.createElement(Ye,null,this.renderInner)},t.prototype.renderInner=function(e){var t=this.props.forwardedComponent,n=t.componentStyle,r=t.defaultProps,o=(t.displayName,t.foldedComponentIds),i=t.styledComponentId,a=t.target,c=void 0;c=n.isStatic?this.generateAndInjectStyles(C,this.props):this.generateAndInjectStyles(Oe(this.props,e,r)||C,this.props);var s=this.props.as||this.attrs.as||a,u=je(s),f={},h=b({},this.props,this.attrs),d=void 0;for(d in h)"forwardedComponent"!==d&&"as"!==d&&("forwardedRef"===d?f.ref=h[d]:"forwardedAs"===d?f.as=h[d]:u&&!Object(p.a)(d)||(f[d]=h[d]));return this.props.style&&this.attrs.style&&(f.style=b({},this.attrs.style,this.props.style)),f.className=Array.prototype.concat(o,i,c!==i?c:null,this.props.className,this.attrs.className).filter(Boolean).join(" "),Object(l.createElement)(s,f)},t.prototype.buildExecutionContext=function(e,t,n){var r=this,o=b({},t,{theme:e});return n.length?(this.attrs={},n.forEach((function(e){var t,n=e,i=!1,a=void 0,l=void 0;for(l in S(n)&&(n=n(o),i=!0),n)a=n[l],i||!S(a)||(t=a)&&t.prototype&&t.prototype.isReactComponent||O(a)||(a=a(o)),r.attrs[l]=a,o[l]=a})),o):o},t.prototype.generateAndInjectStyles=function(e,t){var n=t.forwardedComponent,r=n.attrs,o=n.componentStyle;n.warnTooManyClasses;return o.isStatic&&!r.length?o.generateAndInjectStyles(C,this.styleSheet):o.generateAndInjectStyles(this.buildExecutionContext(e,t,r),this.styleSheet)},t}(l.Component);function Ze(e,t,n){var r=O(e),o=!je(e),i=t.displayName,a=void 0===i?function(e){return je(e)?"styled."+e:"Styled("+E(e)+")"}(e):i,l=t.componentId,s=void 0===l?function(e,t,n){var r="string"!=typeof t?"sc":Te(t),o=($e[r]||0)+1;$e[r]=o;var i=r+"-"+e.generateName(r+o);return n?n+"-"+i:i}(Ee,t.displayName,t.parentComponentId):l,u=t.ParentComponent,f=void 0===u?Ke:u,p=t.attrs,d=void 0===p?k:p,m=t.displayName&&t.componentId?Te(t.displayName)+"-"+t.componentId:t.componentId||s,g=r&&e.attrs?Array.prototype.concat(e.attrs,d).filter(Boolean):d,v=new Ee(r?e.componentStyle.rules.concat(n):n,g,m),y=void 0,w=function(e,t){return c.a.createElement(f,b({},e,{forwardedComponent:y,forwardedRef:t}))};return w.displayName=a,(y=c.a.forwardRef(w)).displayName=a,y.attrs=g,y.componentStyle=v,y.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):k,y.styledComponentId=m,y.target=r?e.target:e,y.withComponent=function(e){var r=t.componentId,o=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["componentId"]),i=r&&r+"-"+(je(e)?e:Te(E(e)));return Ze(e,b({},o,{attrs:g,componentId:i,ParentComponent:f}),n)},Object.defineProperty(y,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Object(h.a)(e.defaultProps,t):t}}),y.toString=function(){return"."+y.styledComponentId},o&&He(y,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,styledComponentId:!0,target:!0,withComponent:!0}),y}var Ge=function(e){return function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:C;if(!Object(u.isValidElementType)(n))throw new j(1,String(n));var o=function(){return t(n,r,be.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,n,b({},r,o))},o.attrs=function(o){return e(t,n,b({},r,{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o}(Ze,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Ge[e]=Ge(e)}));!function(){function e(t,n){g(this,e),this.rules=t,this.componentId=n,this.isStatic=ke(t,k),ue.master.hasId(n)||ue.master.deferredInject(n,[])}e.prototype.createStyles=function(e,t){var n=Y(ve(this.rules,e,t),"");t.inject(this.componentId,n)},e.prototype.removeStyles=function(e){var t=this.componentId;e.hasId(t)&&e.remove(t)},e.prototype.renderStyles=function(e,t){this.removeStyles(t),this.createStyles(e,t)}}();P&&(window.scCGSHMRCache={});t.b=Ge}).call(this,n(11))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n1?n-1:0),o=1;o255?255:e}},{key:"copyAttributes",value:function(e,t,n){return null==n&&(n={}),function(){for(var r=[],o=0,i=Array.from(e.attributes);o])/g,b=/([[}=:>])\s+/g,y=/(\{[^{]+?);(?=\})/g,w=/\s{2,}/g,x=/([^\(])(:+) */g,k=/[svh]\w+-[tblr]{2}/,C=/\(\s*(.*)\s*\)/g,S=/([\s\S]*?);/g,E=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,_=/stretch|:\s*\w+\-(?:conte|avail)/,P=/([^-])(image-set\()/,T="-webkit-",j="-moz-",R="-ms-",D=59,M=125,A=123,I=40,z=41,B=10,L=13,N=32,F=45,U=42,H=44,W=58,Y=47,X=1,V=1,q=0,Q=1,$=1,K=1,Z=0,G=0,J=0,ee=[],te=[],ne=0,re=null,oe=0,ie=1,ae="",le="",ce="";function se(e,t,o,i,a){for(var l,c,u=0,f=0,p=0,h=0,v=0,b=0,y=0,w=0,k=0,S=0,E=0,O=0,_=0,P=0,j=0,R=0,Z=0,te=0,re=0,fe=o.length,ve=fe-1,be="",ye="",we="",xe="",ke="",Ce="";j0&&(ye=ye.replace(r,"")),ye.trim().length>0)){switch(y){case N:case 9:case D:case L:case B:break;default:ye+=o.charAt(j)}y=D}if(1===Z)switch(y){case A:case M:case D:case 34:case 39:case I:case z:case H:Z=0;case 9:case L:case B:case N:break;default:for(Z=0,re=j,v=y,j--,y=D;re0&&(++j,y=v);case A:re=fe}}switch(y){case A:for(v=(ye=ye.trim()).charCodeAt(0),E=1,re=++j;j0&&(ye=ye.replace(r,"")),b=ye.charCodeAt(1)){case 100:case 109:case 115:case F:l=t;break;default:l=ee}if(re=(we=se(t,l,we,b,a+1)).length,J>0&&0===re&&(re=ye.length),ne>0&&(c=me(3,we,l=ue(ee,ye,te),t,V,X,re,b,a,i),ye=l.join(""),void 0!==c&&0===(re=(we=c.trim()).length)&&(b=0,we="")),re>0)switch(b){case 115:ye=ye.replace(C,de);case 100:case 109:case F:we=ye+"{"+we+"}";break;case 107:we=(ye=ye.replace(d,"$1 $2"+(ie>0?ae:"")))+"{"+we+"}",we=1===$||2===$&&he("@"+we,3)?"@"+T+we+"@"+we:"@"+we;break;default:we=ye+we,112===i&&(xe+=we,we="")}else we="";break;default:we=se(t,ue(t,ye,te),we,i,a+1)}ke+=we,O=0,Z=0,P=0,R=0,te=0,_=0,ye="",we="",y=o.charCodeAt(++j);break;case M:case D:if((re=(ye=(R>0?ye.replace(r,""):ye).trim()).length)>1)switch(0===P&&((v=ye.charCodeAt(0))===F||v>96&&v<123)&&(re=(ye=ye.replace(" ",":")).length),ne>0&&void 0!==(c=me(1,ye,t,e,V,X,xe.length,i,a,i))&&0===(re=(ye=c.trim()).length)&&(ye="\0\0"),v=ye.charCodeAt(0),b=ye.charCodeAt(1),v){case 0:break;case 64:if(105===b||99===b){Ce+=ye+o.charAt(j);break}default:if(ye.charCodeAt(re-1)===W)break;xe+=pe(ye,v,b,ye.charCodeAt(2))}O=0,Z=0,P=0,R=0,te=0,ye="",y=o.charCodeAt(++j)}}switch(y){case L:case B:if(f+h+p+u+G===0)switch(S){case z:case 39:case 34:case 64:case 126:case 62:case U:case 43:case Y:case F:case W:case H:case D:case A:case M:break;default:P>0&&(Z=1)}f===Y?f=0:Q+O===0&&107!==i&&ye.length>0&&(R=1,ye+="\0"),ne*oe>0&&me(0,ye,t,e,V,X,xe.length,i,a,i),X=1,V++;break;case D:case M:if(f+h+p+u===0){X++;break}default:switch(X++,be=o.charAt(j),y){case 9:case N:if(h+u+f===0)switch(w){case H:case W:case 9:case N:be="";break;default:y!==N&&(be=" ")}break;case 0:be="\\0";break;case 12:be="\\f";break;case 11:be="\\v";break;case 38:h+f+u===0&&Q>0&&(te=1,R=1,be="\f"+be);break;case 108:if(h+f+u+q===0&&P>0)switch(j-P){case 2:112===w&&o.charCodeAt(j-3)===W&&(q=w);case 8:111===k&&(q=k)}break;case W:h+f+u===0&&(P=j);break;case H:f+p+h+u===0&&(R=1,be+="\r");break;case 34:case 39:0===f&&(h=h===y?0:0===h?y:h);break;case 91:h+f+p===0&&u++;break;case 93:h+f+p===0&&u--;break;case z:h+f+u===0&&p--;break;case I:if(h+f+u===0){if(0===O)switch(2*w+3*k){case 533:break;default:E=0,O=1}p++}break;case 64:f+p+h+u+P+_===0&&(_=1);break;case U:case Y:if(h+u+p>0)break;switch(f){case 0:switch(2*y+3*o.charCodeAt(j+1)){case 235:f=Y;break;case 220:re=j,f=U}break;case U:y===Y&&w===U&&re+2!==j&&(33===o.charCodeAt(re+2)&&(xe+=o.substring(re,j+1)),be="",f=0)}}if(0===f){if(Q+h+u+_===0&&107!==i&&y!==D)switch(y){case H:case 126:case 62:case 43:case z:case I:if(0===O){switch(w){case 9:case N:case B:case L:be+="\0";break;default:be="\0"+be+(y===H?"":"\0")}R=1}else switch(y){case I:P+7===j&&108===w&&(P=0),O=++E;break;case z:0==(O=--E)&&(R=1,be+="\0")}break;case 9:case N:switch(w){case 0:case A:case M:case D:case H:case 12:case 9:case N:case B:case L:break;default:0===O&&(R=1,be+="\0")}}ye+=be,y!==N&&9!==y&&(S=y)}}k=w,w=y,j++}if(re=xe.length,J>0&&0===re&&0===ke.length&&0===t[0].length==0&&(109!==i||1===t.length&&(Q>0?le:ce)===t[0])&&(re=t.join(",").length+2),re>0){if(l=0===Q&&107!==i?function(e){for(var t,n,o=0,i=e.length,a=Array(i);o1)){if(p=c.charCodeAt(c.length-1),h=n.charCodeAt(0),t="",0!==u)switch(p){case U:case 126:case 62:case 43:case N:case I:break;default:t=" "}switch(h){case 38:n=t+le;case 126:case 62:case 43:case N:case z:case I:break;case 91:n=t+n+le;break;case W:switch(2*n.charCodeAt(1)+3*n.charCodeAt(2)){case 530:if(K>0){n=t+n.substring(8,f-1);break}default:(u<1||l[u-1].length<1)&&(n=t+le+n)}break;case H:t="";default:n=f>1&&n.indexOf(":")>0?t+n.replace(x,"$1"+le+"$2"):t+n+le}c+=n}a[o]=c.replace(r,"").trim()}return a}(t):t,ne>0&&void 0!==(c=me(2,xe,l,e,V,X,re,i,a,i))&&0===(xe=c).length)return Ce+xe+ke;if(xe=l.join(",")+"{"+xe+"}",$*q!=0){switch(2!==$||he(xe,2)||(q=0),q){case 111:xe=xe.replace(g,":-moz-$1")+xe;break;case 112:xe=xe.replace(m,"::"+T+"input-$1")+xe.replace(m,"::-moz-$1")+xe.replace(m,":-ms-input-$1")+xe}q=0}}return Ce+xe+ke}function ue(e,t,n){var r=t.trim().split(u),o=r,i=r.length,a=e.length;switch(a){case 0:case 1:for(var l=0,c=0===a?"":e[0]+" ";l0&&Q>0)return o.replace(p,"$1").replace(f,"$1"+ce);break;default:return e.trim()+o.replace(f,"$1"+e.trim())}default:if(n*Q>0&&o.indexOf("\f")>0)return o.replace(f,(e.charCodeAt(0)===W?"":"$1")+e.trim())}return e+o}function pe(e,t,n,r){var s,u=0,f=e+";",p=2*t+3*n+4*r;if(944===p)return function(e){var t=e.length,n=e.indexOf(":",9)+1,r=e.substring(0,n).trim(),o=e.substring(n,t-1).trim();switch(e.charCodeAt(9)*ie){case 0:break;case F:if(110!==e.charCodeAt(10))break;default:var i=o.split((o="",l)),a=0;for(n=0,t=i.length;a64&&f<90||f>96&&f<123||95===f||f===F&&s.charCodeAt(1)!==F))switch(isNaN(parseFloat(s))+(-1!==s.indexOf("("))){case 1:switch(s){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:s+=ae}}u[n++]=s}o+=(0===a?"":",")+u.join(" ")}}return o=r+o+";",1===$||2===$&&he(o,1)?T+o+o:o}(f);if(0===$||2===$&&!he(f,1))return f;switch(p){case 1015:return 97===f.charCodeAt(10)?T+f+f:f;case 951:return 116===f.charCodeAt(3)?T+f+f:f;case 963:return 110===f.charCodeAt(5)?T+f+f:f;case 1009:if(100!==f.charCodeAt(4))break;case 969:case 942:return T+f+f;case 978:return T+f+j+f+f;case 1019:case 983:return T+f+j+f+R+f+f;case 883:return f.charCodeAt(8)===F?T+f+f:f.indexOf("image-set(",11)>0?f.replace(P,"$1"+T+"$2")+f:f;case 932:if(f.charCodeAt(4)===F)switch(f.charCodeAt(5)){case 103:return T+"box-"+f.replace("-grow","")+T+f+R+f.replace("grow","positive")+f;case 115:return T+f+R+f.replace("shrink","negative")+f;case 98:return T+f+R+f.replace("basis","preferred-size")+f}return T+f+R+f+f;case 964:return T+f+R+"flex-"+f+f;case 1023:if(99!==f.charCodeAt(8))break;return s=f.substring(f.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),T+"box-pack"+s+T+f+R+"flex-pack"+s+f;case 1005:return i.test(f)?f.replace(o,":"+T)+f.replace(o,":"+j)+f:f;case 1e3:switch(u=(s=f.substring(13).trim()).indexOf("-")+1,s.charCodeAt(0)+s.charCodeAt(u)){case 226:s=f.replace(k,"tb");break;case 232:s=f.replace(k,"tb-rl");break;case 220:s=f.replace(k,"lr");break;default:return f}return T+f+R+s+f;case 1017:if(-1===f.indexOf("sticky",9))return f;case 975:switch(u=(f=e).length-10,p=(s=(33===f.charCodeAt(u)?f.substring(0,u):f).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|s.charCodeAt(7))){case 203:if(s.charCodeAt(8)<111)break;case 115:f=f.replace(s,T+s)+";"+f;break;case 207:case 102:f=f.replace(s,T+(p>102?"inline-":"")+"box")+";"+f.replace(s,T+s)+";"+f.replace(s,R+s+"box")+";"+f}return f+";";case 938:if(f.charCodeAt(5)===F)switch(f.charCodeAt(6)){case 105:return s=f.replace("-items",""),T+f+T+"box-"+s+R+"flex-"+s+f;case 115:return T+f+R+"flex-item-"+f.replace(E,"")+f;default:return T+f+R+"flex-line-pack"+f.replace("align-content","").replace(E,"")+f}break;case 973:case 989:if(f.charCodeAt(3)!==F||122===f.charCodeAt(4))break;case 931:case 953:if(!0===_.test(e))return 115===(s=e.substring(e.indexOf(":")+1)).charCodeAt(0)?pe(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):f.replace(s,T+s)+f.replace(s,j+s.replace("fill-",""))+f;break;case 962:if(f=T+f+(102===f.charCodeAt(5)?R+f:"")+f,n+r===211&&105===f.charCodeAt(13)&&f.indexOf("transform",10)>0)return f.substring(0,f.indexOf(";",27)+1).replace(a,"$1"+T+"$2")+f}return f}function he(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10),o=e.substring(n+1,e.length-1);return re(2!==t?r:r.replace(O,"$1"),o,t)}function de(e,t){var n=pe(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(S," or ($1)").substring(4):"("+t+")"}function me(e,t,n,r,o,i,a,l,c,s){for(var u,f=0,p=t;f0&&(ae=o.replace(h,91===i?"":"-")),i=1,1===Q?ce=o:le=o;var a,l=[ce];ne>0&&void 0!==(a=me(-1,n,l,l,V,X,0,0,0,0))&&"string"==typeof a&&(n=a);var c=se(ee,l,n,0,0);return ne>0&&void 0!==(a=me(-2,c,l,l,V,X,c.length,0,0,0))&&"string"!=typeof(c=a)&&(i=0),ae="",ce="",le="",q=0,V=1,X=1,Z*i==0?c:c.replace(r,"").replace(v,"").replace(b,"$1").replace(y,"$1").replace(w," ")}return be.use=function e(t){switch(t){case void 0:case null:ne=te.length=0;break;default:if("function"==typeof t)te[ne++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n1)for(var n=1;n>2]|=e[o]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(a[r>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=64?(this.block=a[16],this.start=r-64,this.hash(),this.hashed=!0):this.start=r}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha1.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha1.prototype.hash=function(){var e,t,n=this.h0,r=this.h1,o=this.h2,i=this.h3,a=this.h4,l=this.blocks;for(e=16;e<80;++e)t=l[e-3]^l[e-8]^l[e-14]^l[e-16],l[e]=t<<1|t>>>31;for(e=0;e<20;e+=5)n=(t=(r=(t=(o=(t=(i=(t=(a=(t=n<<5|n>>>27)+(r&o|~r&i)+a+1518500249+l[e]<<0)<<5|a>>>27)+(n&(r=r<<30|r>>>2)|~n&o)+i+1518500249+l[e+1]<<0)<<5|i>>>27)+(a&(n=n<<30|n>>>2)|~a&r)+o+1518500249+l[e+2]<<0)<<5|o>>>27)+(i&(a=a<<30|a>>>2)|~i&n)+r+1518500249+l[e+3]<<0)<<5|r>>>27)+(o&(i=i<<30|i>>>2)|~o&a)+n+1518500249+l[e+4]<<0,o=o<<30|o>>>2;for(;e<40;e+=5)n=(t=(r=(t=(o=(t=(i=(t=(a=(t=n<<5|n>>>27)+(r^o^i)+a+1859775393+l[e]<<0)<<5|a>>>27)+(n^(r=r<<30|r>>>2)^o)+i+1859775393+l[e+1]<<0)<<5|i>>>27)+(a^(n=n<<30|n>>>2)^r)+o+1859775393+l[e+2]<<0)<<5|o>>>27)+(i^(a=a<<30|a>>>2)^n)+r+1859775393+l[e+3]<<0)<<5|r>>>27)+(o^(i=i<<30|i>>>2)^a)+n+1859775393+l[e+4]<<0,o=o<<30|o>>>2;for(;e<60;e+=5)n=(t=(r=(t=(o=(t=(i=(t=(a=(t=n<<5|n>>>27)+(r&o|r&i|o&i)+a-1894007588+l[e]<<0)<<5|a>>>27)+(n&(r=r<<30|r>>>2)|n&o|r&o)+i-1894007588+l[e+1]<<0)<<5|i>>>27)+(a&(n=n<<30|n>>>2)|a&r|n&r)+o-1894007588+l[e+2]<<0)<<5|o>>>27)+(i&(a=a<<30|a>>>2)|i&n|a&n)+r-1894007588+l[e+3]<<0)<<5|r>>>27)+(o&(i=i<<30|i>>>2)|o&a|i&a)+n-1894007588+l[e+4]<<0,o=o<<30|o>>>2;for(;e<80;e+=5)n=(t=(r=(t=(o=(t=(i=(t=(a=(t=n<<5|n>>>27)+(r^o^i)+a-899497514+l[e]<<0)<<5|a>>>27)+(n^(r=r<<30|r>>>2)^o)+i-899497514+l[e+1]<<0)<<5|i>>>27)+(a^(n=n<<30|n>>>2)^r)+o-899497514+l[e+2]<<0)<<5|o>>>27)+(i^(a=a<<30|a>>>2)^n)+r-899497514+l[e+3]<<0)<<5|r>>>27)+(o^(i=i<<30|i>>>2)^a)+n-899497514+l[e+4]<<0,o=o<<30|o>>>2;this.h0=this.h0+n<<0,this.h1=this.h1+r<<0,this.h2=this.h2+o<<0,this.h3=this.h3+i<<0,this.h4=this.h4+a<<0},Sha1.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,o=this.h4;return HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]},Sha1.prototype.toString=Sha1.prototype.hex,Sha1.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,o=this.h4;return[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24&255,n>>16&255,n>>8&255,255&n,r>>24&255,r>>16&255,r>>8&255,255&r,o>>24&255,o>>16&255,o>>8&255,255&o]},Sha1.prototype.array=Sha1.prototype.digest,Sha1.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(20),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),e};var exports=createMethod();COMMON_JS?module.exports=exports:(root.sha1=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))}()}).call(this,__webpack_require__(11),__webpack_require__(12))},function(e,t,n){
+/*!
+ * Cropper.js v1.5.7
+ * https://fengyuanchen.github.io/cropperjs
+ *
+ * Copyright 2015-present Chen Fengyuan
+ * Released under the MIT license
+ *
+ * Date: 2020-05-23T05:23:00.081Z
+ */
+e.exports=function(){"use strict";function e(t){return(e="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})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&e<1/0};function I(e){return void 0===e}function z(t){return"object"===e(t)&&null!==t}var B=Object.prototype.hasOwnProperty;function L(e){if(!z(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&B.call(n,"isPrototypeOf")}catch(e){return!1}}function N(e){return"function"==typeof e}var F=Array.prototype.slice;function U(e){return Array.from?Array.from(e):F.call(e)}function H(e,t){return e&&N(t)&&(Array.isArray(e)||M(e.length)?U(e).forEach((function(n,r){t.call(e,n,r,e)})):z(e)&&Object.keys(e).forEach((function(n){t.call(e,e[n],n,e)}))),e}var W=Object.assign||function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&n.forEach((function(t){z(t)&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e},Y=/\.\d*(?:0|9){12}\d*$/;function X(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return Y.test(e)?Math.round(e*t)/t:e}var V=/^width|height|left|top|marginLeft|marginTop$/;function q(e,t){var n=e.style;H(t,(function(e,t){V.test(t)&&M(e)&&(e="".concat(e,"px")),n[t]=e}))}function Q(e,t){if(t)if(M(e.length))H(e,(function(e){Q(e,t)}));else if(e.classList)e.classList.add(t);else{var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function $(e,t){t&&(M(e.length)?H(e,(function(e){$(e,t)})):e.classList?e.classList.remove(t):e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,"")))}function K(e,t,n){t&&(M(e.length)?H(e,(function(e){K(e,t,n)})):n?Q(e,t):$(e,t))}var Z=/([a-z\d])([A-Z])/g;function G(e){return e.replace(Z,"$1-$2").toLowerCase()}function J(e,t){return z(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(G(t)))}function ee(e,t,n){z(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(G(t)),n)}var te=/\s\s*/,ne=function(){var e=!1;if(c){var t=!1,n=function(){},r=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});s.addEventListener("test",n,r),s.removeEventListener("test",n,r)}return e}();function re(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n;t.trim().split(te).forEach((function(t){if(!ne){var i=e.listeners;i&&i[t]&&i[t][n]&&(o=i[t][n],delete i[t][n],0===Object.keys(i[t]).length&&delete i[t],0===Object.keys(i).length&&delete e.listeners)}e.removeEventListener(t,o,r)}))}function oe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n;t.trim().split(te).forEach((function(t){if(r.once&&!ne){var i=e.listeners,a=void 0===i?{}:i;o=function(){delete a[t][n],e.removeEventListener(t,o,r);for(var i=arguments.length,l=new Array(i),c=0;c1&&void 0!==arguments[1]?arguments[1]:"contain",i=A(r),a=A(n);if(i&&a){var l=n*t;"contain"===o&&l>r||"cover"===o&&l=8&&(i=c+u)}}}if(i){var f,p,h=n.getUint16(i,r);for(p=0;pe.width?3===n?l=e.height*a:c=e.width/a:3===n?c=e.width/a:l=e.height*a;var s={aspectRatio:a,naturalWidth:o,naturalHeight:i,width:l,height:c};s.left=(e.width-l)/2,s.top=(e.height-c)/2,s.oldLeft=s.left,s.oldTop=s.top,this.canvasData=s,this.limited=1===n||2===n,this.limitCanvas(!0,!0),this.initialImageData=W({},t),this.initialCanvasData=W({},s)},limitCanvas:function(e,t){var n=this.options,r=this.containerData,o=this.canvasData,i=this.cropBoxData,a=n.viewMode,l=o.aspectRatio,c=this.cropped&&i;if(e){var s=Number(n.minCanvasWidth)||0,u=Number(n.minCanvasHeight)||0;a>1?(s=Math.max(s,r.width),u=Math.max(u,r.height),3===a&&(u*l>s?s=u*l:u=s/l)):a>0&&(s?s=Math.max(s,c?i.width:0):u?u=Math.max(u,c?i.height:0):c&&(s=i.width,(u=i.height)*l>s?s=u*l:u=s/l));var f=he({aspectRatio:l,width:s,height:u});s=f.width,u=f.height,o.minWidth=s,o.minHeight=u,o.maxWidth=1/0,o.maxHeight=1/0}if(t)if(a>(c?0:1)){var p=r.width-o.width,h=r.height-o.height;o.minLeft=Math.min(0,p),o.minTop=Math.min(0,h),o.maxLeft=Math.max(0,p),o.maxTop=Math.max(0,h),c&&this.limited&&(o.minLeft=Math.min(i.left,i.left+(i.width-o.width)),o.minTop=Math.min(i.top,i.top+(i.height-o.height)),o.maxLeft=i.left,o.maxTop=i.top,2===a&&(o.width>=r.width&&(o.minLeft=Math.min(0,p),o.maxLeft=Math.max(0,p)),o.height>=r.height&&(o.minTop=Math.min(0,h),o.maxTop=Math.max(0,h))))}else o.minLeft=-o.width,o.minTop=-o.height,o.maxLeft=r.width,o.maxTop=r.height},renderCanvas:function(e,t){var n=this.canvasData,r=this.imageData;if(t){var o=function(e){var t=e.width,n=e.height,r=e.degree;if(90==(r=Math.abs(r)%180))return{width:n,height:t};var o=r%90*Math.PI/180,i=Math.sin(o),a=Math.cos(o),l=t*a+n*i,c=t*i+n*a;return r>90?{width:c,height:l}:{width:l,height:c}}({width:r.naturalWidth*Math.abs(r.scaleX||1),height:r.naturalHeight*Math.abs(r.scaleY||1),degree:r.rotate||0}),i=o.width,a=o.height,l=n.width*(i/n.naturalWidth),c=n.height*(a/n.naturalHeight);n.left-=(l-n.width)/2,n.top-=(c-n.height)/2,n.width=l,n.height=c,n.aspectRatio=i/a,n.naturalWidth=i,n.naturalHeight=a,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.widthn.maxHeight||n.heightt.width?o.height=o.width/n:o.width=o.height*n),this.cropBoxData=o,this.limitCropBox(!0,!0),o.width=Math.min(Math.max(o.width,o.minWidth),o.maxWidth),o.height=Math.min(Math.max(o.height,o.minHeight),o.maxHeight),o.width=Math.max(o.minWidth,o.width*r),o.height=Math.max(o.minHeight,o.height*r),o.left=t.left+(t.width-o.width)/2,o.top=t.top+(t.height-o.height)/2,o.oldLeft=o.left,o.oldTop=o.top,this.initialCropBoxData=W({},o)},limitCropBox:function(e,t){var n=this.options,r=this.containerData,o=this.canvasData,i=this.cropBoxData,a=this.limited,l=n.aspectRatio;if(e){var c=Number(n.minCropBoxWidth)||0,s=Number(n.minCropBoxHeight)||0,u=a?Math.min(r.width,o.width,o.width+o.left,r.width-o.left):r.width,f=a?Math.min(r.height,o.height,o.height+o.top,r.height-o.top):r.height;c=Math.min(c,r.width),s=Math.min(s,r.height),l&&(c&&s?s*l>c?s=c/l:c=s*l:c?s=c/l:s&&(c=s*l),f*l>u?f=u/l:u=f*l),i.minWidth=Math.min(c,u),i.minHeight=Math.min(s,f),i.maxWidth=u,i.maxHeight=f}t&&(a?(i.minLeft=Math.max(0,o.left),i.minTop=Math.max(0,o.top),i.maxLeft=Math.min(r.width,o.left+o.width)-i.width,i.maxTop=Math.min(r.height,o.top+o.height)-i.height):(i.minLeft=0,i.minTop=0,i.maxLeft=r.width-i.width,i.maxTop=r.height-i.height))},renderCropBox:function(){var e=this.options,t=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.widthn.maxHeight||n.height=t.width&&n.height>=t.height?"move":"all"),q(this.cropBox,W({width:n.width,height:n.height},fe({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),ie(this.element,"crop",this.getData())}},ye={initPreview:function(){var e=this.element,t=this.crossOrigin,n=this.options.preview,r=t?this.crossOriginUrl:this.url,o=e.alt||"The image to preview",i=document.createElement("img");if(t&&(i.crossOrigin=t),i.src=r,i.alt=o,this.viewBox.appendChild(i),this.viewBoxImage=i,n){var a=n;"string"==typeof n?a=e.ownerDocument.querySelectorAll(n):n.querySelector&&(a=[n]),this.previews=a,H(a,(function(e){var n=document.createElement("img");ee(e,w,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),t&&(n.crossOrigin=t),n.src=r,n.alt=o,n.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',e.innerHTML="",e.appendChild(n)}))}},resetPreview:function(){H(this.previews,(function(e){var t=J(e,w);q(e,{width:t.width,height:t.height}),e.innerHTML=t.html,function(e,t){if(z(e[t]))try{delete e[t]}catch(n){e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch(n){e.dataset[t]=void 0}else e.removeAttribute("data-".concat(G(t)))}(e,w)}))},preview:function(){var e=this.imageData,t=this.canvasData,n=this.cropBoxData,r=n.width,o=n.height,i=e.width,a=e.height,l=n.left-t.left-e.left,c=n.top-t.top-e.top;this.cropped&&!this.disabled&&(q(this.viewBoxImage,W({width:i,height:a},fe(W({translateX:-l,translateY:-c},e)))),H(this.previews,(function(t){var n=J(t,w),s=n.width,u=n.height,f=s,p=u,h=1;r&&(p=o*(h=s/r)),o&&p>u&&(f=r*(h=u/o),p=u),q(t,{width:f,height:p}),q(t.getElementsByTagName("img")[0],W({width:i*h,height:a*h},fe(W({translateX:-l*h,translateY:-c*h},e))))})))}},we={bind:function(){var e=this.element,t=this.options,n=this.cropper;N(t.cropstart)&&oe(e,"cropstart",t.cropstart),N(t.cropmove)&&oe(e,"cropmove",t.cropmove),N(t.cropend)&&oe(e,"cropend",t.cropend),N(t.crop)&&oe(e,"crop",t.crop),N(t.zoom)&&oe(e,"zoom",t.zoom),oe(n,S,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&oe(n,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&oe(n,"dblclick",this.onDblclick=this.dblclick.bind(this)),oe(e.ownerDocument,E,this.onCropMove=this.cropMove.bind(this)),oe(e.ownerDocument,O,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&oe(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,n=this.cropper;N(t.cropstart)&&re(e,"cropstart",t.cropstart),N(t.cropmove)&&re(e,"cropmove",t.cropmove),N(t.cropend)&&re(e,"cropend",t.cropend),N(t.crop)&&re(e,"crop",t.crop),N(t.zoom)&&re(e,"zoom",t.zoom),re(n,S,this.onCropStart),t.zoomable&&t.zoomOnWheel&&re(n,"wheel",this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&re(n,"dblclick",this.onDblclick),re(e.ownerDocument,E,this.onCropMove),re(e.ownerDocument,O,this.onCropEnd),t.responsive&&re(window,"resize",this.onResize)}},xe={resize:function(){if(!this.disabled){var e,t,n=this.options,r=this.container,o=this.containerData,i=r.offsetWidth/o.width;1===i&&r.offsetHeight===o.height||(n.restore&&(e=this.getCanvasData(),t=this.getCropBoxData()),this.render(),n.restore&&(this.setCanvasData(H(e,(function(t,n){e[n]=t*i}))),this.setCropBoxData(H(t,(function(e,n){t[n]=e*i})))))}},dblclick:function(){var e,t;this.disabled||"none"===this.options.dragMode||this.setDragMode((e=this.dragBox,t=p,(e.classList?e.classList.contains(t):e.className.indexOf(t)>-1)?"move":"crop"))},wheel:function(e){var t=this,n=Number(this.options.wheelZoomRatio)||.1,r=1;this.disabled||(e.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){t.wheeling=!1}),50),e.deltaY?r=e.deltaY>0?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=e.detail>0?1:-1),this.zoom(-r*n,e)))},cropStart:function(e){var t=e.buttons,n=e.button;if(!(this.disabled||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(M(t)&&1!==t||M(n)&&0!==n||e.ctrlKey))){var r,o=this.options,i=this.pointers;e.changedTouches?H(e.changedTouches,(function(e){i[e.identifier]=pe(e)})):i[e.pointerId||0]=pe(e),r=Object.keys(i).length>1&&o.zoomable&&o.zoomOnTouch?"zoom":J(e.target,y),_.test(r)&&!1!==ie(this.element,"cropstart",{originalEvent:e,action:r})&&(e.preventDefault(),this.action=r,this.cropping=!1,"crop"===r&&(this.cropping=!0,Q(this.dragBox,v)))}},cropMove:function(e){var t=this.action;if(!this.disabled&&t){var n=this.pointers;e.preventDefault(),!1!==ie(this.element,"cropmove",{originalEvent:e,action:t})&&(e.changedTouches?H(e.changedTouches,(function(e){W(n[e.identifier]||{},pe(e,!0))})):W(n[e.pointerId||0]||{},pe(e,!0)),this.change(e))}},cropEnd:function(e){if(!this.disabled){var t=this.action,n=this.pointers;e.changedTouches?H(e.changedTouches,(function(e){delete n[e.identifier]})):delete n[e.pointerId||0],t&&(e.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,K(this.dragBox,v,this.cropped&&this.options.modal)),ie(this.element,"cropend",{originalEvent:e,action:t}))}}},ke={change:function(e){var t,n=this.options,r=this.canvasData,o=this.containerData,a=this.cropBoxData,l=this.pointers,c=this.action,s=n.aspectRatio,u=a.left,f=a.top,p=a.width,h=a.height,m=u+p,g=f+h,v=0,b=0,y=o.width,w=o.height,x=!0;!s&&e.shiftKey&&(s=p&&h?p/h:1),this.limited&&(v=a.minLeft,b=a.minTop,y=v+Math.min(o.width,r.width,r.left+r.width),w=b+Math.min(o.height,r.height,r.top+r.height));var k=l[Object.keys(l)[0]],C={x:k.endX-k.startX,y:k.endY-k.startY},S=function(e){switch(e){case"e":m+C.x>y&&(C.x=y-m);break;case"w":u+C.xw&&(C.y=w-g)}};switch(c){case"all":u+=C.x,f+=C.y;break;case"e":if(C.x>=0&&(m>=y||s&&(f<=b||g>=w))){x=!1;break}S("e"),(p+=C.x)<0&&(c="w",u-=p=-p),s&&(h=p/s,f+=(a.height-h)/2);break;case"n":if(C.y<=0&&(f<=b||s&&(u<=v||m>=y))){x=!1;break}S("n"),h-=C.y,f+=C.y,h<0&&(c="s",f-=h=-h),s&&(p=h*s,u+=(a.width-p)/2);break;case"w":if(C.x<=0&&(u<=v||s&&(f<=b||g>=w))){x=!1;break}S("w"),p-=C.x,u+=C.x,p<0&&(c="e",u-=p=-p),s&&(h=p/s,f+=(a.height-h)/2);break;case"s":if(C.y>=0&&(g>=w||s&&(u<=v||m>=y))){x=!1;break}S("s"),(h+=C.y)<0&&(c="n",f-=h=-h),s&&(p=h*s,u+=(a.width-p)/2);break;case"ne":if(s){if(C.y<=0&&(f<=b||m>=y)){x=!1;break}S("n"),h-=C.y,f+=C.y,p=h*s}else S("n"),S("e"),C.x>=0?mb&&(h-=C.y,f+=C.y):(h-=C.y,f+=C.y);p<0&&h<0?(c="sw",f-=h=-h,u-=p=-p):p<0?(c="nw",u-=p=-p):h<0&&(c="se",f-=h=-h);break;case"nw":if(s){if(C.y<=0&&(f<=b||u<=v)){x=!1;break}S("n"),h-=C.y,f+=C.y,p=h*s,u+=a.width-p}else S("n"),S("w"),C.x<=0?u>v?(p-=C.x,u+=C.x):C.y<=0&&f<=b&&(x=!1):(p-=C.x,u+=C.x),C.y<=0?f>b&&(h-=C.y,f+=C.y):(h-=C.y,f+=C.y);p<0&&h<0?(c="se",f-=h=-h,u-=p=-p):p<0?(c="ne",u-=p=-p):h<0&&(c="sw",f-=h=-h);break;case"sw":if(s){if(C.x<=0&&(u<=v||g>=w)){x=!1;break}S("w"),p-=C.x,u+=C.x,h=p/s}else S("s"),S("w"),C.x<=0?u>v?(p-=C.x,u+=C.x):C.y>=0&&g>=w&&(x=!1):(p-=C.x,u+=C.x),C.y>=0?g=0&&(m>=y||g>=w)){x=!1;break}S("e"),h=(p+=C.x)/s}else S("s"),S("e"),C.x>=0?m=0&&g>=w&&(x=!1):p+=C.x,C.y>=0?g0?c=C.y>0?"se":"ne":C.x<0&&(u-=p,c=C.y>0?"sw":"nw"),C.y<0&&(f-=h),this.cropped||($(this.cropBox,d),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}x&&(a.width=p,a.height=h,a.left=u,a.top=f,this.action=c,this.renderCropBox()),H(l,(function(e){e.startX=e.endX,e.startY=e.endY}))}},Ce={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Q(this.dragBox,v),$(this.cropBox,d),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=W({},this.initialImageData),this.canvasData=W({},this.initialCanvasData),this.cropBoxData=W({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(W(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),$(this.dragBox,v),Q(this.cropBox,d)),this},replace:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&e&&(this.isImg&&(this.element.src=e),t?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,H(this.previews,(function(t){t.getElementsByTagName("img")[0].src=e})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,$(this.cropper,h)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Q(this.cropper,h)),this},destroy:function(){var e=this.element;return e.cropper?(e.cropper=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate(),this):this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=n.left,o=n.top;return this.moveTo(I(e)?e:r+Number(e),I(t)?t:o+Number(t))},moveTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(M(e)&&(n.left=e,r=!0),M(t)&&(n.top=t,r=!0),r&&this.renderCanvas(!0)),this},zoom:function(e,t){var n=this.canvasData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(n.width*e/n.naturalWidth,null,t)},zoomTo:function(e,t,n){var r=this.options,o=this.canvasData,i=o.width,a=o.height,l=o.naturalWidth,c=o.naturalHeight;if((e=Number(e))>=0&&this.ready&&!this.disabled&&r.zoomable){var s=l*e,u=c*e;if(!1===ie(this.element,"zoom",{ratio:e,oldRatio:i/l,originalEvent:n}))return this;if(n){var f=this.pointers,p=ae(this.cropper),h=f&&Object.keys(f).length?function(e){var t=0,n=0,r=0;return H(e,(function(e){var o=e.startX,i=e.startY;t+=o,n+=i,r+=1})),{pageX:t/=r,pageY:n/=r}}(f):{pageX:n.pageX,pageY:n.pageY};o.left-=(s-i)*((h.pageX-p.left-o.left)/i),o.top-=(u-a)*((h.pageY-p.top-o.top)/a)}else L(t)&&M(t.x)&&M(t.y)?(o.left-=(s-i)*((t.x-o.left)/i),o.top-=(u-a)*((t.y-o.top)/a)):(o.left-=(s-i)/2,o.top-=(u-a)/2);o.width=s,o.height=u,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return M(e=Number(e))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,M(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(M(t)?t:1,e)},scale:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(M(e)&&(n.scaleX=e,r=!0),M(t)&&(n.scaleY=t,r=!0),r&&this.renderCanvas(!0,!0)),this},getData:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.options,r=this.imageData,o=this.canvasData,i=this.cropBoxData;if(this.ready&&this.cropped){e={x:i.left-o.left,y:i.top-o.top,width:i.width,height:i.height};var a=r.width/r.naturalWidth;if(H(e,(function(t,n){e[n]=t/a})),t){var l=Math.round(e.y+e.height),c=Math.round(e.x+e.width);e.x=Math.round(e.x),e.y=Math.round(e.y),e.width=c-e.x,e.height=l-e.y}}else e={x:0,y:0,width:0,height:0};return n.rotatable&&(e.rotate=r.rotate||0),n.scalable&&(e.scaleX=r.scaleX||1,e.scaleY=r.scaleY||1),e},setData:function(e){var t=this.options,n=this.imageData,r=this.canvasData,o={};if(this.ready&&!this.disabled&&L(e)){var i=!1;t.rotatable&&M(e.rotate)&&e.rotate!==n.rotate&&(n.rotate=e.rotate,i=!0),t.scalable&&(M(e.scaleX)&&e.scaleX!==n.scaleX&&(n.scaleX=e.scaleX,i=!0),M(e.scaleY)&&e.scaleY!==n.scaleY&&(n.scaleY=e.scaleY,i=!0)),i&&this.renderCanvas(!0,!0);var a=n.width/n.naturalWidth;M(e.x)&&(o.left=e.x*a+r.left),M(e.y)&&(o.top=e.y*a+r.top),M(e.width)&&(o.width=e.width*a),M(e.height)&&(o.height=e.height*a),this.setCropBoxData(o)}return this},getContainerData:function(){return this.ready?W({},this.containerData):{}},getImageData:function(){return this.sized?W({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,t={};return this.ready&&H(["left","top","width","height","naturalWidth","naturalHeight"],(function(n){t[n]=e[n]})),t},setCanvasData:function(e){var t=this.canvasData,n=t.aspectRatio;return this.ready&&!this.disabled&&L(e)&&(M(e.left)&&(t.left=e.left),M(e.top)&&(t.top=e.top),M(e.width)?(t.width=e.width,t.height=e.width/n):M(e.height)&&(t.height=e.height,t.width=e.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var e,t=this.cropBoxData;return this.ready&&this.cropped&&(e={left:t.left,top:t.top,width:t.width,height:t.height}),e||{}},setCropBoxData:function(e){var t,n,r=this.cropBoxData,o=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&L(e)&&(M(e.left)&&(r.left=e.left),M(e.top)&&(r.top=e.top),M(e.width)&&e.width!==r.width&&(t=!0,r.width=e.width),M(e.height)&&e.height!==r.height&&(n=!0,r.height=e.height),o&&(t?r.height=r.width/o:n&&(r.width=r.height*o)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var t=this.canvasData,n=de(this.image,this.imageData,t,e);if(!this.cropped)return n;var r=this.getData(),o=r.x,i=r.y,l=r.width,c=r.height,s=n.width/Math.floor(t.naturalWidth);1!==s&&(o*=s,i*=s,l*=s,c*=s);var u=l/c,f=he({aspectRatio:u,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),p=he({aspectRatio:u,width:e.minWidth||0,height:e.minHeight||0},"cover"),h=he({aspectRatio:u,width:e.width||(1!==s?n.width:l),height:e.height||(1!==s?n.height:c)}),d=h.width,m=h.height;d=Math.min(f.width,Math.max(p.width,d)),m=Math.min(f.height,Math.max(p.height,m));var g=document.createElement("canvas"),v=g.getContext("2d");g.width=X(d),g.height=X(m),v.fillStyle=e.fillColor||"transparent",v.fillRect(0,0,d,m);var b=e.imageSmoothingEnabled,y=void 0===b||b,w=e.imageSmoothingQuality;v.imageSmoothingEnabled=y,w&&(v.imageSmoothingQuality=w);var x,k,C,S,E,O,_=n.width,P=n.height,T=o,j=i;T<=-l||T>_?(T=0,x=0,C=0,E=0):T<=0?(C=-T,T=0,E=x=Math.min(_,l+T)):T<=_&&(C=0,E=x=Math.min(l,_-T)),x<=0||j<=-c||j>P?(j=0,k=0,S=0,O=0):j<=0?(S=-j,j=0,O=k=Math.min(P,c+j)):j<=P&&(S=0,O=k=Math.min(c,P-j));var R=[T,j,x,k];if(E>0&&O>0){var D=d/l;R.push(C*D,S*D,E*D,O*D)}return v.drawImage.apply(v,[n].concat(a(R.map((function(e){return Math.floor(X(e))}))))),g},setAspectRatio:function(e){var t=this.options;return this.disabled||I(e)||(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var t=this.options,n=this.dragBox,r=this.face;if(this.ready&&!this.disabled){var o="crop"===e,i=t.movable&&"move"===e;e=o||i?e:"none",t.dragMode=e,ee(n,y,e),K(n,p,o),K(n,b,i),t.cropBoxMovable||(ee(r,y,e),K(r,p,o),K(r,b,i))}return this}},Se=s.Cropper,Ee=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,e),!n||!j.test(n.tagName))throw new Error("The first argument is required and must be an or