D;L=0<=D?++W:--W)b[I]=x*h>>O,b[I+1]=u*h>>O,b[I+2]=a*h>>O,x-=w,u-=c,a-=i,w-=T.r,c-=T.g,i-=T.b,m=H+((m=L+e+1)D;L=0<=D?++Y:--Y){for(l=t=_=u=a=x=0,w=E*(v=b[I=L<<2]),c=E*(y=b[I+1]),i=E*(g=b[I+2]),x+=j*v,u+=j*y,a+=j*g,k=A,d=X=0;0<=E?XE;d=0<=E?++X:--X)k.r=v,k.g=y,k.b=g,k=k.next;for(z=D,d=V=1;1<=e?V<=e:V>=e;d=1<=e?++V:--V)I=z+L<<2,x+=(k.r=v=b[I])*(C=E-d),u+=(k.g=y=b[I+1])*C,a+=(k.b=g=b[I+2])*C,_+=v,l+=y,t+=g,k=k.next,df;M=0<=f?++q:--q)b[m=I<<2]=x*h>>O,b[m+1]=u*h>>O,b[m+2]=a*h>>O,x-=w,u-=c,a-=i,w-=T.r,c-=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",y(t,e.attrs),h(e,t),t}function y(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(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=c++;n=l||(l=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",y(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),s=(e=a?-1*e:e,n=n&&"c"!=n?n:a?"#000000":"#FFFFFF",window.sbcRip(t)),l=window.sbcRip(n);return s&&l?i?"rgb("+o((l[0]-s[0])*e+s[0])+","+o((l[1]-s[1])*e+s[1])+","+o((l[2]-s[2])*e+s[2])+(s[3]<0&&l[3]<0?")":","+(s[3]>-1&&l[3]>-1?o(1e4*((l[3]-s[3])*e+s[3]))/1e4:l[3]<0?s[3]:l[3])+")"):"#"+(4294967296+16777216*(s[3]>-1&&l[3]>-1?o(255*((l[3]-s[3])*e+s[3])):l[3]>-1?o(255*l[3]):s[3]>-1?o(255*s[3]):255)+65536*o((l[0]-s[0])*e+s[0])+256*o((l[1]-s[1])*e+s[1])+o((l[2]-s[2])*e+s[2])).toString(16).slice(s[3]>-1||l[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 y(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 b=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=y(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="\\002B";break;case"image":t="\\e918";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","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(f,"variables","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(p,"getModalWidth","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(d,"getFieldColorStyles","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(h,"getIconStyles","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(m,"shadeBlendConvert","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(g,"isHex","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(y,"hexToRgb","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(b,"getHoverColor","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(v,"getWithOpacity","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(_,"getElementStylesBySize","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(w,"getColor","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(x,"getIconByName","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"));function E(){var e=j(["\n text-transform: capitalize;\n height: 20px;\n line-height: 20px;\n"]);return E=function(){return e},e}function C(){var e=j(["\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=j(["\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 k(){var e=j(["\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 k=function(){return e},e}function S(){var e=j(["\n height: 20px;\n line-height: 20px;\n"]);return S=function(){return e},e}function T(){var e=j(["\n height: 40px;\n font-size: 40px;\n \n ","\n ","\n"]);return T=function(){return e},e}function R(){var e=j(["\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 R=function(){return e},e}function A(){var e=j(["\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 A=function(){return e},e}function j(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var D=a.b.div(A(),(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(R(),(function(e){return e.theme.colors.text}),(function(e){return 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(S()),I=a.b.div(k()),z=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})),H=a.b.div(C(),(function(e){return e.src})),U=a.b.div(E());"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(D,"Toolbar","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(P,"ToolWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(L,"ToolIcon","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(M,"ToolLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(I,"EffectsWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(z,"EffectWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(H,"EffectIcon","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(U,"EffectLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"));function B(){var e=N(["\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 F(){var e=N(["\n height: 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 F=function(){return e},e}function N(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var W=Object(a.b)("div")(F()),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","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/ImageEditor.ui.js"),__REACT_HOT_LOADER__.register(Y,"Wrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/ImageEditor.ui.js"));function X(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 V(){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 V=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 $(){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 $=function(){return e},e}function Q(){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 Q=function(){return e},e}function Z(){var e=re(["\n display: none;\n \n :checked + .onoffswitch-label .onoffswitch-inner {\n margin-left: 0;\n}\n"]);return Z=function(){return e},e}function G(){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 G=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)})),se=a.b.div(J(),(function(e){return h(e)}),x("reset"),(function(e){return ge(e)})),le=a.b.div(G()),ce=a.b.input(Z()),ue=a.b.label(Q(),(function(e){return e.theme.colors.border})),fe=a.b.span($(),(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")(V(),(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;X(e,["id","handleChange","text","checked","style"]);return(i.a.createElement(de,{style:a},i.a.createElement(le,null,i.a.createElement(ce,{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","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(ie,"PreviousBtn","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(ae,"NextBtn","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(se,"ResetBtn","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(le,"SwitcherWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(ce,"SwitcherInput","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(ue,"SwitcherLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(fe,"SwitcherInner","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(pe,"SwitcherSwitch","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(de,"SwitcherBlock","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(he,"SwitcherText","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(me,"Switcher","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(ge,"getActionIconStyle","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"));function ye(){var e=ke(["\n display: ",";\n max-height: 100%;\n max-width: 100%;\n vertical-align: middle;\n"]);return ye=function(){return e},e}function be(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=ke(["\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=ke(["\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=ke(["\n display: inline-block;\n vertical-align: middle;\n width: 100%;\n"]);return Ce=function(){return e},e}function Oe(){var e=ke(["\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 ke(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Se=a.b.div(Oe()),Te=Object(a.b)("div")(Ce()),Re=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 }"})),Ae=Object(a.b)("canvas")(xe(),(function(e){return e.width||0}),(function(e){return e.height||0})),je=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 Ne(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(ze,"Button","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Button.js"),__REACT_HOT_LOADER__.register(He,"getElementStylesBySize","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Button.js"),__REACT_HOT_LOADER__.register(Ue,"isDisabled","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Button.js"),__REACT_HOT_LOADER__.register(Be,"getButtonStyles","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Button.js"),__REACT_HOT_LOADER__.register(Fe,"getColor","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Button.js"),__REACT_HOT_LOADER__.register(Ne,"getLinkColor","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Button.js"));function We(){var e=Ge(["\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=Ge(["\n right: 0;\n"]);return Ye=function(){return e},e}function Xe(){var e=Ge(["\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 Xe=function(){return e},e}function Ve(){var e=Ge(["\n background: ",";\n border-color: ",";\n color: ",";\n text-transform: capitalize;\n \n :hover {\n background: ",";\n border-color: ",";\n color: ","; \n }\n"]);return Ve=function(){return e},e}function qe(){var e=Ge(["\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=Ge(["\n @media (max-width: 768px) {\n display: flex;\n justify-content: center;\n width: 100%;\n }\n"]);return Ke=function(){return e},e}function $e(){var e=Ge(["\n text-align: center;\n text-transform: capitalize;\n color: ","\n"]);return $e=function(){return e},e}function Qe(){var e=Ge(["\n line-height: 35px;\n border-bottom: 1px solid ",";\n background: ",";\n"]);return Qe=function(){return e},e}function Ze(){var e=Ge(["\n background: ",";\n"]);return Ze=function(){return e},e}function Ge(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Je=a.b.div(Ze(),(function(e){return e.theme.colors.secondaryBg})),et=a.b.div(Qe(),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.theme.colors.primaryBg})),tt=a.b.div($e(),(function(e){return e.theme.colors.text})),nt=Object(a.b)("div")(Ke()),rt=Object(a.b)("div")(qe()),ot=Object(a.b)(ze)(Ve(),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.theme.colors.text}),(function(e){return b(e.theme.colors.primaryBg)}),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.theme.colors.text})),it=Object(a.b)(rt)(Xe(),(function(e){return e.hide?"none":"flex"}),ot),at=Object(a.b)(rt)(Ye()),st=a.b.div(We(),(function(e){return e.theme.colors.secondaryBg}));"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Je,"HeaderWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(et,"HeaderTop","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(tt,"Title","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(nt,"ActionsWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(rt,"Actions","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(ot,"CancelBtn","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(it,"LeftActions","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(at,"RightActions","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(st,"ToolbarWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"));function lt(){var e=Ct(["\n height: 20px;\n line-height: 20px;\n"]);return lt=function(){return e},e}function ct(){var e=Ct(["\n display: inline-block;\n vertical-align: middle;\n height: 50px;\n"]);return ct=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 yt(){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 yt=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: 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 bt=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})),kt=Object(a.b)("div")(xt()),St=a.b.div(wt(),(function(e){return e.theme.colors.text})),Tt=a.b.div(_t()),Rt=a.b.label(vt()),At=a.b.input.attrs((function(e){return{type:e.type?e.type:"text"}}))(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"number"===e.type&&"::-webkit-inner-spin-button {\n -webkit-appearance: none;\n }"}),(function(e){return e.theme.colors.secondaryBg})),jt=Object(a.b)("input").attrs((function(e){return{type:e.type?e.type:"file"}}))(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 e.theme.colors.secondaryBg})),Dt=a.b.div(gt()),Pt=Object(a.b)(ze)(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()),zt=a.b.div(ft(),(function(e){return Nt(e.ratio)}),(function(e){return e.theme.textColor}),(function(e){return Ft(e.ratio)}),(function(e){var t=e.radius;return t&&"border-radius: ".concat(t,"%;")})),Ht=Object(a.b)("div")(ut()),Ut=Object(a.b)("div")(ct()),Bt=a.b.div(lt()),Ft=function(e){var t=50*e;return t>200&&(t=200),t},Nt=function(e){var t=50;return 50*e>200&&(t=200/e),t};"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Ot,"CropWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(kt,"PresetsWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(St,"CustomLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Tt,"FieldSet","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Rt,"FieldLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(At,"FieldInput","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(jt,"FileInput","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Dt,"BlockRatioWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Pt,"BlockRatioBtn","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Lt,"BlockRatioIcon","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Mt,"CropBox","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(It,"CropBoxInner","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(zt,"CropShape","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Ht,"CropShapeWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Ut,"ShapeAligner","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Bt,"CropLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Ft,"getWidthOfShape","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Nt,"getHeightOfShape","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"));function Wt(){var e=Qt(["\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=Qt(["\n display: inline-block;\n"]);return Yt=function(){return e},e}function Xt(){var e=Qt(["\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 Xt=function(){return e},e}function Vt(){var e=Qt(["\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 Vt=function(){return e},e}function qt(){var e=Qt(["\n button {\n min-width: 240px;\n }\n"]);return qt=function(){return e},e}function Kt(){var e=Qt(["\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 $t(){var e=Qt(["\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 $t=function(){return e},e}function Qt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Zt=a.b.div($t(),(function(e){return e.theme.colors.text})),Gt=a.b.div(Kt()),Jt=Object(a.b)("div")(qt()),en=Object(a.b)("p")(Vt(),(function(e){return e.theme.colors.textWarn}),(function(e){return e.theme.colors.secondaryBg})),tn=Object(a.b)("div")(Xt(),(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(Zt,"ResizeWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(Gt,"ResizeBox","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(Jt,"PreResizeActions","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(en,"PreResizeWarning","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(tn,"PreResizeInner","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(nn,"SuggestionsBox","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(rn,"SuggestionOption","/Users/dmitry/scaleflex/plugins/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 sn(){var e=pn(["\n display: flex;\n width: 100%;\n flex-wrap: wrap;\n justify-content: center;\n"]);return sn=function(){return e},e}function ln(){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 ln=function(){return e},e}function cn(){var e=pn(["\n\n"]);return cn=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(cn()),gn=a.b.div(ln()),yn=Object(a.b)("div")(sn()),bn=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","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(hn,"RotateWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(mn,"RotateLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(gn,"RotateButton","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(yn,"ButtonGroup","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(bn,"RotateIcon","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(vn,"DarkBtn","/Users/dmitry/scaleflex/plugins/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","/Users/dmitry/scaleflex/plugins/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()),kn=Object(a.b)("div")(xn());"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(On,"NoClickOverlay","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Common.ui.js"),__REACT_HOT_LOADER__.register(kn,"NoClickToolbar","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Common.ui.js"));function Sn(){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 Sn=function(){return e},e}var Tn=a.b.span.attrs((function(){return{role:"button"}}))(Sn(),(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","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/CloseBtn.js");function Rn(){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 Rn=function(){return e},e}var An=a.b.span.attrs((function(){return{role:"button"}}))(Rn(),(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(An,"FullscreenBtn","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/FullscreenBtn.js");function jn(){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 jn=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")(jn(),(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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Spinner.js"),__REACT_HOT_LOADER__.register(Mn,"IconWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Spinner.js"),__REACT_HOT_LOADER__.register(In,"Spinner","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Spinner.js"));function zn(){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 zn=function(){return e},e}function Hn(){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 Hn=function(){return e},e}function Un(){var e=Kn(["\n display: inline-block;\n vertical-align: middle;\n margin-left: 20px;\n cursor: pointer;\n"]);return Un=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 Fn(){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 Fn=function(){return e},e}function Nn(){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 Nn=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-block;\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 Xn(){var e=Kn(["\n ","\n"]);return Xn=function(){return e},e}function Vn(){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 Vn=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 $n=a.b.div(qn(),(function(e){return e.theme.colors.text})),Qn=Object(a.b)("div")(Vn()),Zn=Object(a.b)("div")(Xn(),(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;"})),Gn=Object(a.b)("div")(Yn()),Jn=Object(a.b)("div")(Wn()),er=Object(a.b)("div")(Nn()),tr=Object(a.b)("div")(Fn(),(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")(Un()),or=Object(a.b)("div")(Hn(),(function(e){return e.theme.colors.secondaryBg})),ir=Object(a.b)("div")(zn(),(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($n,"WatermarkWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(Qn,"WrapperForURL","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(Zn,"WrapperForControls","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(Gn,"WrapperForOpacity","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(Jn,"WatermarkInputs","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(er,"WatermarkPositionWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(tr,"WatermarkInputTypes","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(nr,"PositionSquare","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(rr,"SelectWatermarkLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(or,"Watermarks","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(ir,"WatermarkIcon","/Users/dmitry/scaleflex/plugins/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 sr(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 lr(e){for(var t=1;t1&&m)&&(-1!==h||1!==d.length);return i.a.createElement(oe,null,i.a.createElement(se,{muted:"preview"!==c,onClick:function(){"preview"===c&&l()},title:u["footer.reset"]}),i.a.createElement(ie,{onClick:function(){!g&&s({operationIndex:h-1,operationObject:lr(lr({},d[h]),{},{index:h})})},muted:g,title:u["footer.undo"]}),i.a.createElement(ae,{onClick:function(){!y&&s({operationIndex:h+1,operationObject:lr(lr({},d[h]),{},{index:h})})},muted:y,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"]}))}}])&&cr(t.prototype,n),r&&cr(t,r),a}(o.Component),yr=gr,br=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(gr,"default","/Users/dmitry/scaleflex/plugins/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:""}),vr=function(e){return e.url&&e.url.public?e.url.public:e.url_public?e.url_public:""},_r=("undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(br,"getPermalink","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/adjust-api.js"),__REACT_HOT_LOADER__.register(vr,"getPubliclink","/Users/dmitry/scaleflex/plugins/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/")}),Cr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Er,"getBaseUrl","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/get-base-url.js"),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scaleflex-image-edit-box";return window.document.getElementById(e)}),Or=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Cr,"getCanvasNode","/Users/dmitry/scaleflex/plugins/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}}),kr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Or,"getEffectHandlerName","/Users/dmitry/scaleflex/plugins/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""}}),Sr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(kr,"getIcon","/Users/dmitry/scaleflex/plugins/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," ")}),Tr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Sr,"getLabel","/Users/dmitry/scaleflex/plugins/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"}),Rr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Tr,"getSecretHeaderName","/Users/dmitry/scaleflex/plugins/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 s=o.width-n,l=o.height-r;return e.map((function(e,t){return"center"===e?0===t?i:a:"right"===e?s:"bottom"===e?l:0}))}),Ar=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Rr,"getWatermarkPosition","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/get-watermark-position.js"),n(15)),jr=n.n(Ar);function Dr(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,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pr(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 Pr(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 Pr(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&&(c=f.join("&")),l=zr(u.join("&"),n,o,i)}else l=zr(e,n,o,i);return[l,c].filter((function(e){return e})).join("&")};function Mr(e){return btoa(e).replace(/=*$/g,"")}function Ir(e,t){return jr()(e).slice(0,t)}function zr(e,t,n,r){var o=Mr(e),i=Ir(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(Lr,"getImageSealingParams","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/get-image-sealing-params.js"),__REACT_HOT_LOADER__.register(Mr,"encodeBase64","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/get-image-sealing-params.js"),__REACT_HOT_LOADER__.register(Ir,"getSha1","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/get-image-sealing-params.js"),__REACT_HOT_LOADER__.register(zr,"getSealingParams","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/get-image-sealing-params.js"));var Hr=function(e,t){var n=e.getBoundingClientRect(),r=window.getComputedStyle(e)||{},o=r.paddingLeft,i=void 0===o?0:o,a=r.paddingRight,s=void 0===a?0:a,l=r.paddingTop,c=void 0===l?0:l,u=r.paddingBottom,f=void 0===u?0:u,p=n.width-(parseInt(i,10)||0)-(parseInt(s,10)||0),d=n.height-(parseInt(c,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,y=p/t.ratio,b=d*t.ratio,v=d;t.width<=g&&t.height<=y?(h=g,m=y):(h=b,m=v)}return{width:h,height:m}},Ur=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Hr,"getInnerBoxSize","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/get-inner-box-size.js"),"filerobot-image-editor"),Br="scaleflex-filerobot-shapes-edit-box",Fr=["adjust","effects","filters","rotate","crop","resize","watermark","shapes","image","text"],Nr=["edge_enhance","emboss","grungy","hazy","lomo","radial_blur","sin_city","tilt_shift"],Wr=["cross_process","glow_sun","jarques","love","old_boot","orange_peel","pin_hole","sepia","sun_rise","vintage"],Yr=["crop","resize","rotate","watermark","focus_point"],Xr=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],Vr={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]},qr={opacity:.7,position:"center",url:"",applyByDefault:!1},Kr="watermark-layer",$r=[{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}],Qr=[{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"}],Gr=[{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"}],Jr={RECT:"rect",SQUARE:"square",CIRCLE:"circle",IMAGE:"image",TEXT:"text"},eo="https://image.flaticon.com/icons/svg/916/916762.svg",to={hideCloudimageSwitcher:!0,processWithCloudimage:!1,uploadWithCloudimageLink:!1,elementId:null,isLowQualityPreview:!0,reduceBeforeEdit:{mode:"manual",widthLimit:2e3,heightLimit:2e3},cropBeforeEdit:null,cropPresets:$r,resizePresets:Qr},no=("undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Ur,"MODAL_ID","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Br,"PREVIEW_CANVAS_ID","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Fr,"TOOLS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Nr,"EFFECTS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Wr,"FILTERS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Yr,"CLOUDIMAGE_OPERATIONS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Xr,"WATERMARK_POSITIONS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Vr,"WATERMARK_POSITIONS_PRESET","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(qr,"DEFAULT_WATERMARK","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Kr,"WATERMARK_UNIQUE_KEY","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register($r,"cropPresets","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Qr,"resizePresets","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Zr,"STANDARD_FONTS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Gr,"WATERMARK_CLOUDIMAGE_FONTS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Jr,"SHAPES_VARIANTS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(eo,"DEFAULT_IMG_URL","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(to,"UPLOADER","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js")),n(16)),ro=n.n(no),oo=n(9),io=n.n(oo);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 ao=CanvasRenderingContext2D,so=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(ao,"default","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/canvas-round.js"),Number.prototype.map=function(e,t,n,r){return(this-e)*(r-n)/(t-e)+n});"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(so,"default","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/map-number-range.js");function lo(e){return(lo="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 co(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 uo(e){return function(e){if(Array.isArray(e))return fo(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 fo(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 fo(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 fo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1050){var l=Cr("scaleflex-image-edit-box-original"),c=l.getContext("2d");l.width=t.width,l.height=t.height,c.drawImage(t,0,0,t.width,t.height),s=t.height/800;var u=t.width/s,f=t.height/s;a({initialZoom:s,canvasOriginal:n.cloneCanvas(l)}),setTimeout((function(){new window.Caman(Cr("scaleflex-image-edit-box"),(function(){this.resize({width:u,height:f}),this.render((function(){var e=n.replaceWithNewCanvas("scaleflex-image-edit-box");n.CamanInstanceZoomed=new window.Caman(e,(function(){n.CamanInstanceOriginal=new window.Caman(Cr("scaleflex-image-edit-box-original"),(function(){})),a({isShowSpinner:!1,canvasZoomed:n.cloneCanvas(e)})}))}))}))}))}else setTimeout((function(){n.CamanInstance=new window.Caman(Cr("scaleflex-image-edit-box"),(function(){a({isShowSpinner:!1,canvasOriginal:n.cloneCanvas(Cr("scaleflex-image-edit-box"))})}))}))})),wo(vo(e),"mergeCanvases",(function(e){var t=e.getContext("2d"),n=document.getElementById(Br);return t.drawImage(n,0,0,e.width,e.height),e.toDataURL()})),wo(vo(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})),wo(vo(e),"replaceWithNewCanvas",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Cr(e),r=n.width,o=n.height,i=document.createElement("canvas"),a=i.getContext("2d"),s=n.parentElement;return s.removeChild(n),i.width=r,i.height=o,i.id=e,a.drawImage(n,0,0),t&&a.round(),s.appendChild(i),i})),wo(vo(e),"replaceCanvas",(function(e,t){var n=Cr(t),r=n.parentElement;return r.removeChild(n),r.appendChild(e),e})),wo(vo(e),"saveImage",(function(){var t=e.props,n=t.onComplete,r=t.onClose,o=t.updateState,i=t.closeOnLoad,a=t.config,s=t.processWithCloudService,l=t.uploadCloudimageImage,c=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,y=void 0===g?"filerobot":g,b=e.props.src.split("?")[0],v=Cr(1!==u?"scaleflex-image-edit-box-original":"scaleflex-image-edit-box"),_=xr(m.baseAPI,m.container,y),w=(m.uploadParams||{}).dir||"image-editor",x=vo(e);if(s){var E=(1!==u?f:c).filter((function(e){var t=e.operation;return Yr.includes(t)})),C=e.generateCloudimageURL(E,b.replace(/https?:\/\/scaleflex.ultrafast.io\//,""));if(l){var O=new XMLHttpRequest;O.addEventListener("load",e.onFileLoad),O.open("POST",[_,"upload?dir=".concat(w)].join("")),O.setRequestHeader(Tr(y),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()}else{e.mergeCanvases(v);var k=v.toDataURL(p).split(";")[1].split(",")[1],S=_r(k,p,null),T=d.replace(/-version-.{6}/g,"").split("."),R=T.length,A="";A=R<=1?"".concat(T.join("."),"-version-").concat((io()()||"").slice(0,6)):[T.slice(0,R-1).join("."),"-version-",(io()()||"").slice(0,6),".",T[R-1]].join("");var j=new FormData,D=new XMLHttpRequest;D.addEventListener("load",x.onFileLoad),j.append("files[]",S,A),D.open("POST",[_,"upload?dir=".concat(w)].join("")),D.setRequestHeader(Tr(y),m.uploadKey),D.send(j)}})),wo(vo(e),"getResultCanvas",(function(){var t=e.props.initialZoom,n=Cr(1!==t?"scaleflex-image-edit-box-original":"scaleflex-image-edit-box");return e.mergeCanvases(n),n})),wo(vo(e),"getFinalImageMime",(function(){var t=e.props,n=t.roundCrop,r=t.imageMime;return n?"image/png":r})),wo(vo(e),"getFinalImageName",(function(){var t=e.props.roundCrop,n=e.state.imageName;return t&&(n=n.replace(n.substr(n.lastIndexOf(".")+1),"png")),n})),wo(vo(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()})),wo(vo(e),"onFileLoad",(function(t){var n=e.props,r=n.onComplete,o=n.onClose,i=n.updateState,a=n.closeOnLoad,s=t.srcElement,l=(void 0===s?{}:s).response,c=void 0===l?"{}":l,u=JSON.parse(c)||{};if("success"===u.status){var f=u.file,p=void 0===f?{}:f,d=vr(p);if(!d)return;i({isShowSpinner:!1,isHideCanvas:!1}),r(d,p),a&&o()}else i({isShowSpinner:!1,isHideCanvas:!1}),alert(u),a&&o()})),wo(vo(e),"generateCloudimageURL",(function(t,n){var r=e.props,o=r.config,i=r.watermark,a=r.logoImage,s=r.processWithCloudimage,l=r.processWithFilerobot,c=r.imageSealing,u=o.cloudimage,f=void 0===u?{}:u,p=o.filerobot,d=void 0===p?{}:p,h=s&&f.token+".cloudimg.io/"+(f.version?"".concat(f.version,"/"):"v7/"),m=l&&d.token+".filerobot.com/"+(d.version?"".concat(d.version,"/"):""),g=m||h||"";g=(g?"https://":"")+g;var y=(m?d.doNotPrefixURL:f.doNotPrefixURL)?"":g,b=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="",k="",S="";b&&(E=e.getCropArguments(b.props)),v&&(C=(E?"&":"")+e.getResizeArguments(v.props)),_&&(O=(E||C?"&":"")+e.getOrientationArguments(_.props)),x&&(k=(E||C||O?"&":"")+e.getWatermarkArguments()),w&&(S=(E||C||O||k?"&":"")+e.getFocusPointArguments(w.props)),n=(n=n.split("?")[0]).replace(y,"");var T=E+C+O+k+S;return c.enabled&&(T=Lr(T,c,n.replace(g,""))),y+n+(T?"?":"")+T})),wo(vo(e),"initFiltersOrEffects",(function(){})),wo(vo(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[Or(e.props[t])](),e.CamanInstanceOriginal.render((function(){o(wo({},t,null),(function(){e.makeCanvasSnapshot({operation:t},n)}))}))):o(wo({},t,null),(function(){e.makeCanvasSnapshot({operation:t},n)}))}))})),wo(vo(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,s=i.contrast,l=i.saturation,c=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"!==s.toString()&&e.CamanInstanceOriginal.contrast(parseInt(s||"0")),"0"!==l.toString()&&e.CamanInstanceOriginal.saturation(parseInt(l||"0")),"0"!==c.toString()&&e.CamanInstanceOriginal.exposure(parseInt(c||"0")),e.CamanInstanceOriginal.render((function(){r({adjust:ho({},u)},(function(){e.makeCanvasSnapshot({operation:"adjust"},t)}))}))):r({adjust:ho({},u)},(function(){e.makeCanvasSnapshot({operation:"adjust"},t)}))}))})),wo(vo(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 s=a.findIndex((function(e){return"rotate"===e.operation}));s>-1&&r({operationIndex:s-1,callback:function(){},resetActiveTab:!1})}})),wo(vo(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,s=i.rotate,l=i.updateState,c=s+t;l({isHideCanvas:!0,isShowSpinner:!0,rotate:c,correctionDegree:n,flipX:r,flipY:o},(function(){1!==a?(e.CamanInstanceZoomed.reset(),r&&e.CamanInstanceZoomed.flip("x"),o&&e.CamanInstanceZoomed.flip("y"),(c||n)&&e.CamanInstanceZoomed.rotate((c||0)+(n||0)),e.CamanInstanceZoomed.render((function(){l({isHideCanvas:!1,isShowSpinner:!1})}))):(e.CamanInstance.reset(),r&&e.CamanInstance.flip("x"),o&&e.CamanInstance.flip("y"),(c||n)&&e.CamanInstance.rotate((c||0)+(n||0)),e.CamanInstance.render((function(){l({isHideCanvas:!1,isShowSpinner:!1})})))}))})),wo(vo(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,s=n.flipX,l=n.flipY;r({isHideCanvas:!0,isShowSpinner:!0},(function(){var n=(i||0)+(a||0);1!==o?(e.CamanInstanceOriginal.reset(),s&&e.CamanInstanceOriginal.flip("x"),l&&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)}))}))})),wo(vo(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)}})),wo(vo(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 s=a.findIndex((function(e){return"crop"===e.operation}));s>-1&&r({operationIndex:s-1,callback:e.onInitCrop,resetActiveTab:!1})}else e.onInitCrop()})),wo(vo(e),"onInitCrop",(function(){var t=e.props,n=t.updateState,r=t.config.beginCropArea,o=void 0===r?1:r;n({isHideCanvas:!0,isShowSpinner:!0},(function(){var t=Cr(),r=t.getBoundingClientRect(),i=t.width/r.width;e.cropper=new ro.a(t,{viewMode:1,modal:!1,background:!1,rotatable:!1,scalable:!1,zoomable:!1,movable:!1,autoCropArea:o,crop:function(t){e.props.updateState({cropDetails:t.detail})}}),window.scaleflexPlugins=window.scaleflexPlugins||{},window.scaleflexPlugins.zoom=i,window.scaleflexPlugins.cropperjs=e.cropper,n({isHideCanvas:!1,isShowSpinner:!1})}))})),wo(vo(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,s=i.width,l=i.height,c=i.x,u=i.y;o({isShowSpinner:!0},(function(){var n,o,i;(e.destroyCrop(),1!==r)?(n=[s,l,c,u].map((function(e){return e*r})),e.CamanInstanceZoomed.crop(s,l,c,u),(o=e.CamanInstanceOriginal).crop.apply(o,uo(n))):(n=[s,l,c,u],(i=e.CamanInstance).crop.apply(i,uo(n)));e.makeCanvasSnapshot({operation:"crop",props:{width:n[0],height:n[1],x:n[2],y:n[3],roundCrop:a}},t)}))})),wo(vo(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,s=o.operationsZoomed,l=o.currentOperation,c=o.operationsOriginal,u=o.operations,f=o.roundCrop,p=1!==a;if(r){var d=(p?s:u).indexOf(l)+1,h=e.cloneCanvas(Cr("scaleflex-image-edit-box")),m=ho(ho({},t),{},{previewCanvas:!0,canvas:h}),g={isHideCanvas:!1,isShowSpinner:!1,currentOperation:m};return p?(g.operationsZoomed=[].concat(uo(s.slice(0,d)),[m]),g.operationsOriginal=[].concat(uo(c.slice(0,d)),[ho(ho({},m),{},{canvas:e.cloneCanvas(Cr("scaleflex-image-edit-box-original"))})]),g.isHideCanvasOriginal=!1,g.isShowSpinnerOriginal=!1):g.operations=[].concat(uo(u.slice(0,d)),[m]),void i(g,n)}if(p){var y=s.indexOf(l)+1;e.CamanInstanceOriginal.render((function(){var r=e.replaceWithNewCanvas("scaleflex-image-edit-box-original",f),o=ho(ho({},t),{},{canvas:e.cloneCanvas(Cr("scaleflex-image-edit-box-original"))});e.CamanInstanceOriginal=new window.Caman(r,(function(){i({isHideCanvasOriginal:!1,isShowSpinnerOriginal:!1,operationsOriginal:[].concat(uo(c.slice(0,y)),[o])},n)}))})),e.CamanInstanceZoomed.render((function(){var n=e.replaceWithNewCanvas("scaleflex-image-edit-box",f),r=ho(ho({},t),{},{canvas:e.cloneCanvas(Cr("scaleflex-image-edit-box"))});e.CamanInstanceZoomed=new window.Caman(n,(function(){i({isHideCanvas:!1,isShowSpinner:!1,operationsZoomed:[].concat(uo(s.slice(0,y)),[r]),currentOperation:r})}))}))}else{var b=u.indexOf(l)+1;e.CamanInstance.render((function(){var r=e.replaceWithNewCanvas("scaleflex-image-edit-box",f),o=ho(ho({},t),{},{canvas:e.cloneCanvas(Cr("scaleflex-image-edit-box"))});e.CamanInstance=new window.Caman(r,(function(){i({isHideCanvas:!1,isShowSpinner:!1,operations:[].concat(uo(u.slice(0,b)),[o]),currentOperation:o},n)}))}))}})),wo(vo(e),"destroyCrop",(function(){e.cropper.destroy()})),wo(vo(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"):"")})),wo(vo(e),"initResize",(function(){var t=e.props,n=t.initialZoom,r=t.updateState,o=Cr(1!==n?"scaleflex-image-edit-box-original":"scaleflex-image-edit-box");r({canvasDimensions:{width:o.width,height:o.height,ratio:o.width/o.height}})})),wo(vo(e),"applyResize",(function(){var t=e.props,n=t.initialZoom,r=t.canvasDimensions,o=t.updateState,i=t.handleSave,a=t.operations,s=t.operationsOriginal;o({isHideCanvas:!0,isShowSpinner:!0,operationsOriginal:[].concat(uo(s),[{operation:"resize",props:r}]),operations:[].concat(uo(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()})))}))})),wo(vo(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)})),wo(vo(e),"initAdjust",(function(){})),wo(vo(e),"onAdjust",(function(t,n){var r,o=e.props,i=o.updateState,a=o.adjust;i({adjust:ho(ho({},a),{},(r={},wo(r,t,n),wo(r,"isHideCanvas",!0),wo(r,"isShowSpinner",!0),r))},(function(){e.applyCorrections((function(){i({isHideCanvas:!1,isShowSpinner:!1})}))}))})),wo(vo(e),"initFocusPoint",(function(){var t=e.props,n=t.updateState,r=t.original,o=t.focusPoint,i=ho({},o);null===i.x&&(i.x=r.width/2),null===i.y&&(i.y=r.height/2),e.tempFocusPoint=ho({},o),n({focusPoint:i,isHideCanvas:!0,isShowSpinner:!0})})),wo(vo(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(uo(i),[{operation:"focus_point",props:a}]),operations:[].concat(uo(o),[{operation:"focus_point",props:a}])}),t()})),wo(vo(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)}))})),wo(vo(e),"getFocusPointArguments",(function(e){return"gravity=".concat(e.x,",").concat(e.y)})),wo(vo(e),"destroyFocusPoint",(function(){e.props.updateState({focusPoint:e.tempFocusPoint,isHideCanvas:!1,isShowSpinner:!1})})),wo(vo(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)})),wo(vo(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,s=o.operationsZoomed,l=o.operationsOriginal,c=o.canvasZoomed,u=o.canvasOriginal,f=o.updateState,p=1!==i,d=p?s[t]:a[t],h=-1!==t;if(r&&r.previewCanvas&&r.index-1===t||d&&d.previewCanvas&&r.index+1===t){var m,g,y=e.props.shapeOperations,b=null==d?void 0:null===(m=d.props)||void 0===m?void 0:m.shapes;if(!b){var v=(p?s:a).filter((function(e,t){return"shape"===e.operation&&t0?v[v.length-1].props.shapes:[]}return y.replaceAllShapes(b),g=p?h?s[t]:{canvas:e.cloneCanvas(c)}:h?a[t]:{canvas:e.cloneCanvas(u)},void f(ho(ho({},xo),{},{currentOperation:g}),(function(){n&&n()}))}if(h||e.props.shapeOperations.replaceAllShapes([]),p){var _=h?s[t]:{canvas:e.cloneCanvas(c)},w=e.replaceCanvas(_.canvas,"scaleflex-image-edit-box");e.CamanInstanceZoomed=new window.Caman(w,(function(){f(ho(ho({},xo),{},{currentOperation:_}),(function(){n&&n()}))}));var x=h?l[t]:{canvas:e.cloneCanvas(u)},E=e.replaceCanvas(x.canvas,"scaleflex-image-edit-box-original");e.CamanInstanceOriginal=new window.Caman(E,(function(){}))}else{var C=h?a[t]:{canvas:e.cloneCanvas(u)},O=e.replaceCanvas(C.canvas,"scaleflex-image-edit-box");e.CamanInstance=new window.Caman(O,(function(){f(ho(ho({},xo),{},{currentOperation:C}),(function(){n&&n()}))}))}})),wo(vo(e),"isOperationExist",(function(e,t){return e.find((function(e){return e.operation===t}))})),wo(vo(e),"getOperationQuery",(function(e,t){return e?"crop_px":t?"width":"cdn"})),wo(vo(e),"destroyAll",(function(){})),wo(vo(e),"resetAll",(function(t){var n=e.props.activeTab;n?e.cancelLastOperation(n,(function(){e.applyOperations(-1,t)})):e.applyOperations(-1,t)})),wo(vo(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,s=a.brightness,l=a.contrast,c=a.saturation,u=a.exposure;1!==r?(e.CamanInstanceZoomed.revert(!1),o&&e.CamanInstanceZoomed[Or(o)](),i&&e.CamanInstanceZoomed[Or(i)](),"0"!==s.toString()&&e.CamanInstanceZoomed.brightness(parseInt(s||"0")),"0"!==l.toString()&&e.CamanInstanceZoomed.contrast(parseInt(l||"0")),"0"!==c.toString()&&e.CamanInstanceZoomed.saturation(parseInt(c||"0")),"0"!==u.toString()&&e.CamanInstanceZoomed.exposure(parseInt(u||"0")),e.CamanInstanceZoomed.render(t)):(e.CamanInstance.revert(!1),o&&e.CamanInstance[Or(o)](),i&&e.CamanInstance[Or(i)](),"0"!==s.toString()&&e.CamanInstance.brightness(parseInt(s||"0")),"0"!==l.toString()&&e.CamanInstance.contrast(parseInt(l||"0")),"0"!==c.toString()&&e.CamanInstance.saturation(parseInt(c||"0")),"0"!==u.toString()&&e.CamanInstance.exposure(parseInt(u||"0")),e.CamanInstance.render(t))})),wo(vo(e),"cancelAddedShapes",(function(){e.props.shapeOperations.deleteShapes({all:!0},{selectedShape:{}})})),wo(vo(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()})))})),wo(vo(e),"initWatermark",(function(){var t=e.props,n=t.watermark,r=t.updateState;e.setState({tempWatermark:n&&wr(n)}),n.applyByDefault||r({watermark:ho(ho({},n),{},{applyByDefault:!0})})})),wo(vo(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:Kr})||{}).index;e.setState({tempWatermark:null}),r({selectedShape:{}}),e.makeCanvasSnapshot({operation:"shape",props:{shapes:[i]}},t,!0),t()})),wo(vo(e),"cancelWatermark",(function(){var t=e.state.tempWatermark,n=e.props,r=n.updateState,o=n.shapeOperations,i=o.getShape({key:Kr})||{},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:{}})})),wo(vo(e),"getWatermarkArguments",(function(){var t=e.props,n=t.config.processWithCloudimage,r=t.shapeOperations.getShape({key:Kr}),o=r.x,i=r.y,a=r.opacity,s=co(r,["x","y","opacity"]),l=e.state.original,c=(l=void 0===l?{}:l).width,u=l.height,f=Cr(Br),p=f.width,d=f.height,h=Math.round(o.map(0,p,0,c)),m=Math.round(i.map(0,d,0,u)),g="&wat_gravity=northwest&wat_pad=".concat(h,",").concat(m),y="wat=1&wat_opacity=".concat(a,"&wat_scale=31p").concat(g);return console.log(g),y+=n&&s.text?"&wat_text=".concat(s.text,"&wat_font=").concat(s.textFont,"&wat_fontsize=").concat(s.textSize,"&wat_colour=").concat(s.color.replace("#","")):"&wat_url=".concat(s.img.src.split("?")[0])})),wo(vo(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)}})),wo(vo(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()}})),wo(vo(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},e.CamanInstance=null,e.CamanInstanceOriginal=null,e.CamanInstanceZoomed=null,e}return t=a,(n=[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.activeTab!==this.props.activeTab&&(this.props.activeTab&&this.destroyMode(this.props.activeTab),this.changeTab(e.activeTab)),this.setState(ho({},e))}},{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=Cr("scaleflex-image-edit-box"),s=n.getContext("2d");n.width=o.width,n.height=o.height,s.drawImage(o,0,0,o.width,o.height);var l={height:o.height,width:o.width,ratio:o.width/o.height};r({original:l,canvasDimensions:l}),i&&a?new window.Caman(n,(function(){this.resize({width:a.width,height:a.height}),this.render((function(){var e=t.replaceWithNewCanvas("scaleflex-image-edit-box"),n={height:e.height,width:e.width,ratio:e.width/e.height};r({original:n,canvasDimensions:ho({},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:"scaleflex-image-edit-box-original"}),i.a.createElement(Me,{id:"scaleflex-image-edit-box"}))}}])&&mo(t.prototype,n),r&&mo(t,r),a}(o.Component);"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(xo,"INITIAL_PARAMS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/components/Preview/ImageManipulator.js"),__REACT_HOT_LOADER__.register(Eo,"ImageManipulator","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/components/Preview/ImageManipulator.js"));function Co(e,t,n,r){var o,i=!1,a=0;function s(){o&&clearTimeout(o)}function l(){var l=this,c=Date.now()-a,u=arguments;function f(){a=Date.now(),n.apply(l,u)}i||(r&&!o&&f(),s(),void 0===r&&c>e?f():!0!==t&&(o=setTimeout(r?function(){o=void 0}:f,void 0===r?e-c:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){s(),i=!0},l}function Oo(e,t,n){return void 0===n?Co(e,t,!1):Co(e,n,!1!==t)}function ko(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,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return So(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 So(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 So(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 Lo(e){return function(e){if(Array.isArray(e))return Io(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Mo(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){if(e){if("string"==typeof e)return Io(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)?Io(e,t):void 0}}function Io(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)})),Xo(Wo(t),"pushShapeToShapes",(function(e,n){var r=t.props.shapes,o=r.length;return t.updateState(Ho({shapes:[].concat(Lo(r),[Ho(Ho({},e),{},{index:o})])},n)),o})),Xo(Wo(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})),Xo(Wo(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,s=!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&&(s=!0,t.updateState({selectedShape:Ho(Ho({},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),document.addEventListener("mouseup",t.endDragging))})),s||(t.updateState({selectedShape:{}}),t.disableResizingActions(),t._canvas.removeEventListener("keyup",t.activateShapeDeleting),t._canvas.removeEventListener("mousemove",t.startDragging),document.removeEventListener("mouseup",t.endDragging))}})),Xo(Wo(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))})),Xo(Wo(t),"activateResizingActions",(function(){Array.from(document.getElementsByClassName("shape-resizing-control")).forEach((function(e){e.addEventListener("mousedown",t.trackShapeResize)}))})),Xo(Wo(t),"trackShapeResize",(function(e){var n=e.target;t.setState({resizeControlTarget:n}),document.addEventListener("mousemove",t.handleShapeResizing),document.addEventListener("mouseup",t.disableResizingActions)})),Xo(Wo(t),"handleShapeResizing",(function(e){var n=e.movementX,r=e.movementY,o=e.shiftKey,i=t.state.resizeControlTarget,a=t.props.selectedShape,s=a.index,l=a.width,c=a.height,u=a.x,f=a.y,p=a.variant;if(i&&p!==Jr.TEXT){var d=c,h=function(e){var t=l/c;if(Math.abs(n)>=Math.abs(r)){var o=Math.abs(c-(l+n)/t);r=(e?1:-1)*Math.sign(n)*o}else{var i=Math.abs(l-(c+r)*t);n=(e?1:-1)*Math.sign(r)*i}},m=function(){l+=n},g=function(){c+=r},y=function(){l-=n,u+=n},b=function(){c-=r,f+=r};switch(i.dataset.direction){case"e":m();break;case"w":y();break;case"n":b();break;case"s":g();break;case"ne":o&&h(!1),b(),m();break;case"nw":o&&h(!0),b(),y();break;case"se":o&&h(!0),g(),m();break;case"sw":o&&h(!1),g(),y();break;default:return}p!==Jr.SQUARE&&p!==Jr.CIRCLE||(c!==d?l=c:c=l);if(!(c<=15||l<=15)){u<0&&(u=0),f<0&&(f=0),u+l>t._canvas.width&&(u=t._canvas.width-l),f+c>t._canvas.height&&(f=t._canvas.height-c),l>t._canvas.width&&(l=t._canvas.width),c>t._canvas.height&&(c=t._canvas.height);var v={width:l,height:c,x:u,y:f};t.updateShape(v,s,{selectedShape:Ho(Ho({},a),v)})}}})),Xo(Wo(t),"disableResizingActions",(function(e){document.removeEventListener("mousemove",t.handleShapeResizing),document.removeEventListener("mouseup",t.disableResizingActions),t.updateState({selectedShape:{}}),t.setState({resizeControlTarget:null})})),Xo(Wo(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:Ho(Ho({},o),{},{resizingBox:!1})}),t._canvas.removeEventListener("click",t.removeResizingBox))})),Xo(Wo(t),"startDragging",(function(e){var n=t.props.selectedShape,r=n.startEdgeOffset,o=void 0===r?{}:r,i=n.width,a=n.height,s=n.index,l=e.offsetX-o.x,c=e.offsetY-o.y;l<0&&(l=0),c<0&&(c=0),l+i>t._canvas.width&&(l=t._canvas.width-i),c+a>t._canvas.height&&(c=t._canvas.height-a);var u=Ho(Ho({},n),{},{x:l,y:c});t.updateShape(u,s,{selectedShape:u})})),Xo(Wo(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)})),Xo(Wo(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]})),Xo(Wo(t),"draw",(function(e,n){var r=n.opacity,o=void 0===r?1:r,i=n.hidden,a=n.color,s=n.stroke,l=void 0===s?{}:s;i||(t._context.globalAlpha=+o,t._context.fillStyle=a,t._context.strokeStyle=l.color||"transparent",t._context.lineWidth=l.width||1,e(),t.props.round&&t._context.round())})),Xo(Wo(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=Ho(Ho({},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)}))})),Xo(Wo(t),"drawShapeThroughVariant",(function(e){switch(e.variant){case Jr.IMAGE:t.drawImage(e);break;case Jr.RECT:case Jr.SQUARE:t.drawRect(e);break;case Jr.CIRCLE:t.drawCircle(e);break;case Jr.TEXT:t.drawText(e);default:return}})),Xo(Wo(t),"drawRect",(function(e){var n=e.x,r=e.y,o=e.width,i=e.height,a=e.stroke,s=Po(e,["x","y","width","height","stroke"]);t.draw((function(){t._context.fillRect(n,r,o,i),a&&t._context.strokeRect(n,r,o,i)}),Ho({stroke:a},s))})),Xo(Wo(t),"drawCircle",(function(e){var n=e.x,r=e.y,o=(e.radius,e.width),i=e.height,a=e.stroke,s=Po(e,["x","y","radius","width","height","stroke"]);t.draw((function(){t._context.roundRect(n,r,o,i),t._context.fill(),a&&t._context.stroke()}),Ho({stroke:a},s))})),Xo(Wo(t),"drawImage",(function(e){var n=e.img,r=e.x,o=e.y,i=e.width,a=e.height,s=e.stroke,l=Po(e,["img","x","y","width","height","stroke"]);t.draw((function(){t._context.drawImage(n,r,o,i,a),s&&t._context.strokeRect(r,o,i,a)}),Ho({stroke:s},l))})),Xo(Wo(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)})),Xo(Wo(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]})),Xo(Wo(t),"drawText",(function(e){var n=e.text,r=e.textSize,o=e.textFont,i=e.x,a=e.y,s=e.stroke,l=Po(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),s&&t._context.strokeText(n,i,a)}),Ho({stroke:s},l))})),Xo(Wo(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,s=void 0===a?75:a,l=e.stroke,c=void 0===l?{}:l,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?Jr.RECT:h,g=e.tab,y=void 0===g?"shapes":g,b=Po(e,["x","y","width","height","stroke","color","opacity","variant","tab"]),v=t.getCanvasCenter(i/2,s/2),_=Do(v,2),w=_[0],x=_[1],E={x:n||w,y:r||x,width:i,height:s,stroke:c,opacity:d,color:f},C=Ho(Ho(Ho(Ho({},t._initArgs),b),E),{},{variant:m,tab:y});if(!b.key||!t.replaceShapeIfExisted(b.key,C)){t.drawRect(E);var O=t.pushShapeToShapes(C);t.updateState({selectedShape:Ho(Ho({},C),{},{index:O,resizingBox:!0})},t.activateResizingActions)}})),Xo(Wo(t),"addSquare",(function(e){e.width||(e.width=e.height=75),e.variant=Jr.SQUARE,t.addRect(e)})),Xo(Wo(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,s=void 0===a?{}:a,l=e.color,c=void 0===l?"#000000":l,u=e.opacity,f=void 0===u?1:u,p=e.tab,d=void 0===p?"shapes":p,h=Po(e,["x","y","radius","stroke","color","opacity","tab"]),m=t.getCanvasCenter(i,i),g=Do(m,2),y=g[0],b=g[1],v=2*i,_={x:n||y,y:r||b,radius:i,color:c,opacity:f,stroke:s,width:v,height:v},w=Ho(Ho(Ho(Ho({},t._initArgs),h),_),{},{tab:d,variant:Jr.CIRCLE});if(!h.key||!t.replaceShapeIfExisted(h.key,w)){t.drawCircle(_);var x=t.pushShapeToShapes(w);t.updateState({selectedShape:Ho(Ho({},w),{},{index:x,resizingBox:!0})},t.activateResizingActions)}})),Xo(Wo(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,s=e.opacity,l=void 0===s?1:s,c=e.tab,u=void 0===c?"image":c,f=e.stroke,p=void 0===f?{}:f,d=e.otherStates,h=Po(e,["img","x","y","opacity","tab","stroke","otherStates"]);if(n){var m=function(){var e=n.width,r=n.height,i=Do(t.getCanvasCenter(e/2,r/2),2),s=i[0],c=i[1],f={img:n,opacity:l,width:e,height:r,originalWidth:e,originalHeight:r,x:o||s,y:a||c,stroke:p},m=Ho(Ho(Ho(Ho({},t._initArgs),h),f),{},{variant:Jr.IMAGE,tab:u});if(!h.key||!t.replaceShapeIfExisted(h.key,m,d)){t.drawImage(f);var g=t.pushShapeToShapes(m);t.updateState(Ho({selectedShape:Ho(Ho({},m),{},{index:g,resizingBox:!0})},d),t.activateResizingActions)}};"string"==typeof n?n=t.makeImgElement(n,m):m()}})),Xo(Wo(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,s=void 0===a?"#000000":a,l=e.textFont,c=void 0===l?"Arial":l,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,y=void 0===g?1:g,b=e.tab,v=void 0===b?"text":b,_=e.otherStates,w=Po(e,["text","textSize","color","textFont","x","y","stroke","opacity","tab","otherStates"]),x=t.getTextWidthAndHeight({text:r,textSize:i,textFont:c}),E=Do(x,2),C=E[0],O=E[1],k=t.getCanvasCenter(C/2,O/2),S=Do(k,2),T=S[0],R=S[1];if(r){var A={text:r,textSize:i,textFont:c,x:f||T,y:d||R,opacity:y,stroke:m,color:s},j=Ho(Ho(Ho(Ho({},t._initArgs),w),A),{},{width:C,height:O,variant:Jr.TEXT,tab:v});if(w.key&&t.replaceShapeIfExisted(w.key,j,_))return;t.drawText(A);var D=t.pushShapeToShapes(j);t.updateState(Ho({selectedShape:Ho(Ho({},j),{},{index:D,resizingBox:!0})},_),t.activateResizingActions)}})),Xo(Wo(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=Ho(Ho({},e),{},{otherStates:n});switch(e.variant){case Jr.IMAGE:t.addImage(o);break;case Jr.RECT:t.addRect(o);break;case Jr.SQUARE:t.addSquare(o);break;case Jr.CIRCLE:t.addCircle(o);break;case Jr.TEXT:t.addText(o);default:return}})),Xo(Wo(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]})),Xo(Wo(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=Ho(Ho({},n),{},{x:o.x,y:o.y,width:o.width,height:o.height}),t.updateShape(n,o.index,r),!0)})),Xo(Wo(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)})),Xo(Wo(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})),Xo(Wo(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 Ho(Ho({},t),e)})),t.updateState(Ho({shapes:o},n),r)})),Xo(Wo(t),"replaceAllShapes",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};t.updateState({shapes:e},(function(){t.redrawShape(),n()}))})),Xo(Wo(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:Ho(Ho({},a),{},{img:e.img})}),void t.makeImgElement(e.img,t.updateShape,e,n,r);var s={};if(n||0===n||(s.selectedShape=Ho(Ho({},a),e)),i[n=n||0===n?n:a.index]){var l=i;if(e.textSize&&e.textSize!==i[n].textSize||e.text&&e.text!==i[n].text){var c=i[n],u=t.getTextWidthAndHeight(Ho(Ho({},c),e)),f=Do(u,2),p=f[0],d=f[1];s.selectedShape?(e.width=s.selectedShape.width=p,e.height=s.selectedShape.height=d,e.text=s.selectedShape.text=e.text||c.text):(e.width=p,e.height=d,e.text=e.text||c.text)}l[n]=Ho(Ho({},l[n]),e),t.updateState(Ho(Ho({shapes:l},s),r),(function(){t.redrawShape(n)}))}}})),Xo(Wo(t),"clearShape",(function(e,n,r,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=i.width,s=a||1,l=e-s,c=n-s,u=r+s,f=o+s;t._context.clearRect(l,c,u,f)})),Xo(Wo(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)}))})),Xo(Wo(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,s=n||0===n?n:(t.getShapeByKeyOrIndex({key:r})||{}).index;(s||0===s)&&(s===i.index&&(o.selectedShape={}),t.updateState(Ho({shapes:t.eraseAndRemoveShapeFromArray(s,a)},o)))})),Xo(Wo(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(Ho({shapes:r},n))})),Xo(Wo(t),"deleteAllShapesOrByTypeOrIndicies",(function(e){var n=e.type,r=e.all,o=void 0!==r&&r,i=e.applied,a=void 0!==i&&i,s=e.secured,l=void 0===s?[]:s;if(n||o){if(o){var c=(t.getShapeByKeyOrIndex({key:Kr})||{}).index,u=Lo(l);!c&&0!==c||u.includes(c)||u.push(c);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)}})),Xo(Wo(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,s=n.t;return i.a.createElement(Te,{id:"preview-img-box"},i.a.createElement(en,null,s["warning.too_big_resolution"]),i.a.createElement(tn,null,i.a.createElement("h4",null,s["pre_resize.title"]),i.a.createElement(Zt,null,i.a.createElement(Gt,null,i.a.createElement(Tt,null,i.a.createElement(Rt,null,s["common.width"]),i.a.createElement(At,{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(Rt,null,s["common.height"]),i.a.createElement(At,{fullSize:!0,value:parseInt(r.height,10)||"",onChange:this.changeHeight})))),i.a.createElement(Jt,null,i.a.createElement("p",null,i.a.createElement(ze,{themeColor:!0,themeBtn:!0,onClick:function(){a("keep")}},s["pre_resize.keep_original_resolution"])),i.a.createElement("p",null,i.a.createElement(ze,{themeColor:!0,success:!0,onClick:function(){a("resize")}},s["pre_resize.resize_n_continue"])))))}}])&&oi(t.prototype,n),r&&oi(t,r),a}(o.Component),pi=fi;"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(fi,"default","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/components/PreResize/PreResize.js");function di(e){return(di="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 hi(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&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(s),t.state={isBlockRatio:!1,opacity:r||.7,handleOpacity:"boolean"!=typeof u||u,position:m,url:s||p&&p.length>1?p[0]&&p[0].url:"",urls:p||[],activePositions:h,isWatermarkList:p&&p.length>1,applyByDefault:l||!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:"UNSAFE_componentWillReceiveProps",value:function(e){e.watermark.position!==this.state.position&&this.onPositionChange(this.state.position),e.watermark.applyByDefault!==this.props.watermark.applyByDefault&&(this.getWatermarkLayer()?this.updateWatermarkProperty({applyByDefault:!1},{hidden:!0,resizingBox:!1},{applyByDefault:!1}):this.setState({applyByDefault:e.watermark.applyByDefault}),e.watermark.applyByDefault&&(this.getWatermarkLayer()?this.updateWatermarkProperty({applyByDefault:!0},{hidden:!1,resizingBox:!0},{applyByDefault:!0}):this.initWatermarkImage(e.watermark.url)))}},{key:"render",value:function(){var e=this,t=this.state,n=t.isWatermarkList,r=t.url,o=t.urls,a=t.opacity,s=t.handleOpacity,l=t.position,c=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,y=this.props.config,b="upload"===f,v="gallery"===f,_="url"===f,w="text"===f,x=this.props.t;return i.a.createElement($n,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:y.processWithCloudimage?"not-allowed":"auto"}},x["common.upload"],i.a.createElement("input",{type:"radio",value:"upload",checked:"upload"===f,disabled:y.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(Qn,null,v&&i.a.createElement(i.a.Fragment,null,i.a.createElement("label",{htmlFor:"url"},"Watermark Gallery"),i.a.createElement(Cs,{width:"100%",list:o,valueProp:"url",id:"gallery",value:r,style:{width:"calc(100% - 120px)"},onChange:function(t){console.log("chosen",t),e.changeURL({target:{value:t}})}})),_&&i.a.createElement(i.a.Fragment,null,i.a.createElement("label",{htmlFor:"url"},"Watermark URL"),i.a.createElement(At,{id:"url",value:r,style:{width:"calc(100% - 120px)"},onChange:this.changeURL})),b&&i.a.createElement(i.a.Fragment,null,i.a.createElement("label",{htmlFor:"image-upload"},"Watermark Image"),i.a.createElement(jt,{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(At,{id:"text",value:p,style:{width:"calc(65% - 135px)"},name:"text",onChange:this.changeTextProperty}),i.a.createElement(Cs,{list:y.processWithCloudimage?Gr: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(At,{value:m,type:"number",name:"textSize",style:{width:60,marginLeft:8},onChange:this.changeTextProperty}),i.a.createElement(At,{value:d,type:"color",style:{width:30,marginLeft:8,padding:0,background:"transparent",boxShadow:"none"},name:"color",onChange:this.changeTextProperty}))),i.a.createElement(Zn,{switcherPosition:s?"right":"left"},s&&i.a.createElement(Gn,null,i.a.createElement("label",{htmlFor:"opacity"},"Opacity"),i.a.createElement(Da,{label:x["common.opacity"],min:0,max:1,step:.05,range:a,updateRange:this.changeOpacity})))),i.a.createElement(er,null,Xr.map((function(t,n){return i.a.createElement(nr,{key:t,value:t,active:t===l,clickable:c[n],onClick:function(){c[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)}})}))))}}])&&As(t.prototype,n),r&&As(t,r),a}(o.Component),Hs=zs;"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(zs,"default","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/components/Toolbar/Watermark.js");function Us(e){return(Us="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 Bs(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 Fs(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})),bc.register("difference",(function(e,t){return{r:e.r-t.r,g:e.g-t.g,b:e.b-t.b}})),bc.register("addition",(function(e,t){return{r:t.r+e.r,g:t.g+e.g,b:t.b+e.b}})),bc.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}})),bc.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})),bc.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}})),bc.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(45);Caman.Plugin.register("crop",(function(e,t,n,r){var o;return null==n&&(n=0),null==r&&(r=0),o=document.createElement("canvas"),hc.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"),hc.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);fc.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 xc,Ec,Cc;n(46),n(47),n(48),n(49),n(50),n(51),n(52);xc=[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],Ec=[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],Cc=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,s=this.dimensions.width,l=this.dimensions.height,c=this.pixelData,u=e.data,f=s*l,p=[];for(o=0,i=0<=(a=f<<2);i?oa;i?o++:o--)p[o]=c[o];var d=0,h=r;for(r-=1;h-- >=0;){var m,g,y,b,v,_,w,x,E,C,O,k,S,T,R,A,j,D,P,L,M,I,z,H=t+.5|0;if(0!==H){H>256&&(H=256);var U=H+H+1,B=s-1,F=l-1,N=H+1,W=N*(N+1)/2,Y=new Cc,X=void 0,V=Y;for(o=1,m=1<=(g=U);m?og;m?o++:o--)V=V.next=new Cc,o===N&&(X=V);V.next=Y;var q=null,K=null,$=P=0,Q=xc[H],Z=Ec[H];for(D=0,L=0<=(M=l);L?DM;L?D++:D--){var G,J,ee,te,ne,re;for(S=_=y=R=x=v=0,T=N*(k=p[P]),w=N*(O=p[P+1]),b=N*(C=p[P+2]),R+=W*k,x+=W*O,v+=W*C,V=Y,o=0,G=0<=(J=N);G?oJ;G?o++:o--)V.r=k,V.g=O,V.b=C,V=V.next;for(o=1,ee=1<=(te=N);ee?ote;ee?o++:o--)E=P+((Bre;ne?j++:j--)p[P]=R*Q>>Z,p[P+1]=x*Q>>Z,p[P+2]=v*Q>>Z,R-=T,x-=w,v-=b,T-=q.r,w-=q.g,b-=q.b,E=$+((E=j+N)z;I?j++:j--){var oe,ie,ae,se,le,ce;for(_=y=S=x=v=R=0,T=N*(k=p[P=j<<2]),w=N*(O=p[P+1]),b=N*(C=p[P+2]),R+=W*k,x+=W*O,v+=W*C,V=Y,o=0,oe=0<=(ie=N);oe?oie;oe?o++:o--)V.r=k,V.g=O,V.b=C,V=V.next;var ue=s;for(o=1,ae=1<=(se=N);ae?ose;ae?o++:o--)P=ue+j<<2,R+=(V.r=k=p[P])*(A=N-o),x+=(V.g=O=p[P+1])*A,v+=(V.b=C=p[P+2])*A,S+=k,_+=O,y+=C,V=V.next,oce;le?D++:D--)p[E=P<<2]=R*Q>>Z,p[E+1]=x*Q>>Z,p[E+2]=v*Q>>Z,R-=T,x-=w,v-=b,T-=q.r,w-=q.g,b-=q.b,E=j+((E=D+N)-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;c[fe]=c[fe]*me+p[fe]*he>>8,c[fe+1]=c[fe+1]*me+p[fe+1]*he>>8,c[fe+2]=c[fe+2]*me+p[fe+2]*he>>8}else de===d+1&&(c[fe]=p[fe],c[fe+1]=p[fe+1],c[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=hc.b.extend(t,e)).angle*=Math.PI/180;var n=function(e,t,n,r,o,i,a){var s=document.createElement("canvas");s.width=e,s.height=t;var l=n+Math.cos(o)*i*.5,c=r+Math.sin(o)*i*.5,u=n-Math.cos(o)*i*.5,f=r-Math.sin(o)*i*.5,p=s.getContext("2d"),d=p.createLinearGradient(l,c,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=hc.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:c.indexOf("?")>-1?c.slice(0,c.indexOf("?")):c};if("manual"===o&&(i=u.height){var r=u.width/u.height,s={ratio:r,width:i,height:i/r};t.setState(Tc(Tc({preCanvasDimensions:Tc({},s),canvasDimensions:Tc({},s)},n),{},{activeBody:"preview",isPreResize:!0}))}else{var l=u.height/u.width,p={ratio:l,width:a/l,height:a};t.setState(Tc(Tc({preCanvasDimensions:Tc({},p),canvasDimensions:Tc({},p)},n),{},{activeBody:"preview",isPreResize:!0}))}else{var d,h=t.props.config.tools;1===h.length&&(d=h[0]),t.setState(Tc(Tc({},n),{},{activeBody:"preview",isPreResize:!1}),(function(){t.setState({activeTab:d})}))}}})),Mc(Pc(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:uc()(new Uint8Array(n.response)).mime})},n.send()}})),Mc(Pc(t),"updateState",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};t._isMounted&&t.setState(e,n)})),Mc(Pc(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(Tc({isHideCanvas:!1,isShowSpinner:!1},Ic))}))})),Mc(Pc(t),"onAdjust",(function(e,n){(0,t.state.onAdjust)(e,n)})),Mc(Pc(t),"onRotate",(function(e,n,r,o){(0,t.state.onRotate)(e,n,r,o)})),Mc(Pc(t),"onFlip",(function(e){(0,t.state.flip)(e)})),Mc(Pc(t),"onSave",(function(){var e=t.state.saveImage;t.setState({isShowSpinner:!0}),e()})),Mc(Pc(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()})):(t.props.onComplete({status:"success",canvas:o}),t.props.onClose())})),Mc(Pc(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})}))}))})),Mc(Pc(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})}))}))})),Mc(Pc(t),"handleSave",(function(){var e=t.state,n=e.processWithFilerobot,r=e.processWithCloudService;n||r?t.onSave():t.onDownloadImage()})),Mc(Pc(t),"apply",(function(e){var n=t.state,r=n.activeTab;(0,n.applyChanges)(r,e),t.setState({activeTab:null})})),Mc(Pc(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,s=e.operationObject,l=void 0===s?{}:s,c=t.state.applyOperations;a?t.setState({activeTab:null,isHideCanvas:!0,isShowSpinner:!0}):t.setState({isHideCanvas:!0,isShowSpinner:!0}),c(n,(function(){t.setState({isHideCanvas:!1,isShowSpinner:!1},o)}),l)})),Mc(Pc(t),"resetOperations",(function(){var e=t.state.resetAll;t.setState({activeTab:null,isHideCanvas:!0,isShowSpinner:!0}),e((function(){t.setState(Tc({isHideCanvas:!1,isShowSpinner:!1},Ic))}))})),Mc(Pc(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,s=n.processWithCloudService,l=n.uploadWithCloudimageLink,c=n.reduceBeforeEdit,u=n.cropBeforeEdit,f=n.watermark,p=n.imageSealing;return t.state=Tc(Tc({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:s,uploadCloudimageImage:l,reduceBeforeEdit:c,cropBeforeEdit:u,roundCrop:!1,imageSealing:Tc({enabled:!1,salt:"",char_count:10,include_params:null},p),operationsOriginal:[],operationsZoomed:[],operations:[],canvasZoomed:null,canvasOriginal:null,isPreResize:!1,initialZoom:1},Ic),{},{watermark:f||qr,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,s=e.currentOperation,l=e.isHideCanvas,c=e.cropDetails,u=e.original,f=e.canvasDimensions,p=e.processWithCloudimage,d=e.processWithFilerobot,h=e.processWithCloudService,m=e.uploadCloudimageImage,g=e.imageMime,y=e.lastOperation,b=e.operationList,v=e.initialZoom,_=e.canvasZoomed,w=e.canvasOriginal,x=e.reduceBeforeEdit,E=e.cropBeforeEdit,C=e.img,O=e.imageName,k=e.activeBody,S=e.isPreResize,T=e.preCanvasDimensions,R=e.logoImage,A=e.imageSealing,j=e.effect,D=e.filter,P=e.crop,L=e.roundCrop,M=e.resize,I=e.rotate,z=e.correctionDegree,H=e.flipX,U=e.flipY,B=e.adjust,F=e.watermark,N=e.focusPoint,W=e.shapes,X=e.shapeOperations,V=e.selectedShape,q=e.availableShapes,K=this.props,$=K.src,Q=K.config,Z=K.onClose,G=K.onComplete,J=K.closeOnLoad,ee=void 0===J||J,te=K.t,ne=void 0===te?{}:te,re=K.theme,oe={effect:j,filter:D,crop:P,resize:M,rotate:I,flipX:H,flipY:U,adjust:B,correctionDegree:z},ie=Tc(Tc({t:ne,theme:re,cropDetails:c,original:u,activeTab:n,src:$,onClose:Z,config:Q,canvasDimensions:f,processWithCloudimage:p,processWithFilerobot:d,processWithCloudService:h,operations:r,operationsOriginal:o,operationsZoomed:a,initialZoom:v,isShowSpinner:t,img:C,logoImage:R,imageName:O,activeBody:k,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:F,focusPoint:N,shapes:W,shapeOperations:X,selectedShape:V,availableShapes:q}),ae=Tc(Tc({t:ne,theme:re,cropDetails:c,original:u,activeTab:n,isShowSpinner:t,operations:r,operationsOriginal:o,operationsZoomed:a,initialZoom:v,currentOperation:s,isHideCanvas:l,src:$,imageMime:g,onClose:Z,onComplete:G,canvasDimensions:f,closeOnLoad:ee,config:Q,processWithCloudimage:p,processWithFilerobot:d,processWithCloudService:h,imageSealing:A,uploadCloudimageImage:m,lastOperation:y,operationList:b,canvasZoomed:_,canvasOriginal:w,reduceBeforeEdit:x,cropBeforeEdit:E,img:C,logoImage:R,imageName:O,isPreResize:S,preCanvasDimensions:T,updateState:this.updateState,handleSave:this.handleSave,onPreResize:this.onPreResize,redoOperation:this.redoOperation,roundCrop:L},oe),{},{watermark:F,focusPoint:N,shapes:W,shapeOperations:X,selectedShape:V}),se={logoImage:R,t:ne,theme:re,activeBody:k,operations:r,operationsOriginal:o,operationsZoomed:a,initialZoom:v,currentOperation:s,processWithCloudimage:p,processWithCloudService:h,updateState:this.updateState,redoOperation:this.redoOperation,resetOperations:this.resetOperations,config:Q,watermark:F};return i.a.createElement(Y,{roundCrop:L},i.a.createElement(lc,ie),i.a.createElement(Se,null,"preview"===k&&i.a.createElement(ei,ae),"preResize"===k&&i.a.createElement(pi,ae),i.a.createElement(In,{overlay:!0,show:t,label:ne["spinner.label"]})),i.a.createElement(yr,se))}}])&&Rc(t.prototype,n),r&&Rc(t,r),a}(o.Component),Hc=zc;"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Ic,"INITIAL_PARAMS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/ImageEditor.js"),__REACT_HOT_LOADER__.register(zc,"default","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/ImageEditor.js"));function Uc(){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 Uc=function(){return e},e}var Bc=a.b.span.attrs((function(){return{role:"button"}}))(Uc(),(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(Bc,"CloseBtn","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/components/CloseBtn.js");function Fc(e){return(Fc="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 Nc(){return(Nc=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 Yc(e,t){for(var n=0;n div {\n padding: 40px !important;\n }\n \n * {\n color: black !important;\n }\n ":""}));function ru(){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 ou=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&&Xc(e,t)}(l,e);var t,n,a,s=Vc(l);function l(){var e,t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l);for(var o=arguments.length,i=new Array(o),a=0;a-1})):n})})),Su(Ou(t),"open",(function(e){var n=t.props.onOpen;t._isMounted&&t.setState({isVisible:!0,src:e},(function(){n&&n()}))})),Su(Ou(t),"close",(function(){var e=t.props.onClose;t._isMounted&&t.setState({isVisible:!1},(function(){e&&e()}))})),c.translations=c.translations||{},c.language=c.translations[c.language]||pu[c.language]?c.language:"en",c.theme=c.theme||{},c.theme.colors=c.theme.colors||{},c.theme.fonts=c.theme.fonts||{},c.colorScheme=c.colorScheme||"dark",c.platform=c.platform||"filerobot",t.state={isVisible:r,src:a,config:t.processConfig(c),t:_u(_u({},pu[c.language]),c.translations[c.language]),colorScheme:c.colorScheme||"dark",theme:{colors:_u(_u({},("light"===c.colorScheme?gu:hu).colors),c.theme.colors),fonts:_u(_u({},("light"===c.colorScheme?gu:hu).fonts),c.theme.fonts)}},t}return t=s,(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,s=e.theme,l=this.props,c=l.onComplete,u=void 0===c?function(){}:c,f=l.onBeforeComplete,p=l.closeOnLoad,d=l.showInModal,h=void 0===d||d;if(!n||!t||yu)return null;if(n instanceof Blob&&r.processWithCloudimage)return null;var m=i.a.createElement(W,null,i.a.createElement(Hc,{src:n,config:r,onComplete:u,onBeforeComplete:f,onClose:this.close,closeOnLoad:p,t:o}));return(i.a.createElement(a.a,{theme:_u({},s)},h?i.a.createElement(ou,{noBorder:!0,fullScreen:"lg",isHideCloseBtn:!0,style:{borderRadius:5},onClose:this.close},m):m))}}])&&wu(t.prototype,n),r&&wu(t,r),s}(o.Component),Ru=Tu,Au=Ru;"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Tu,"ImageEditorWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/ImageEditorWrapper.js"),__REACT_HOT_LOADER__.register(Ru,"default","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/ImageEditorWrapper.js"));function ju(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];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var s=n.elementId||"filerobot-image-editor",l=document.getElementById(s),c=function(e){console.log(e)};c=o&&"function"==typeof o?o:(o=o||{}).onComplete||c,l||((l=document.createElement("div")).id=s,document.body.appendChild(l));var u;this.component=(u=Au,Object(r.render)(i.a.createElement(u,{show:a,config:n,onComplete:c,onBeforeComplete:o.onBeforeComplete,onOpen:o.onOpen,onClose:o.onClose}),l)),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)}}])&&ju(t.prototype,n),o&&ju(t,o),e}();window.FilerobotImageEditor=Du;"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Du,"FilerobotImageEditor","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/js/index.js")}]);
\ No newline at end of file
+var r=n(35),o=n(36),i=n(37);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return N(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,o);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,o){var i,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var u=-1;for(i=n;is&&(n=s-l),i=n;i>=0;i--){for(var f=!0,p=0;po&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function O(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(i=e[o+1]))&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(l=(15&c)<<12|(63&i)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,f=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),o+=f}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,r,o){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),c=this.slice(r,o),u=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function T(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,r,o,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function I(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(e,t,n,r,i){return i||I(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function H(e,t,n,r,i){return i||I(e,0,n,8),o.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},l.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);P(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);P(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return H(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return H(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!l.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function N(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(12))},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],l=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),u=0,f=s>0?a-4:a;for(n=0;n>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===s&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,l[u++]=255&t);1===s&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;as?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var o,i,a=[],s=t;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,l=(1<>1,u=-7,f=n?o-1:0,p=n?-1:1,d=e[t+f];for(f+=p,i=d&(1<<-u)-1,d>>=-u,u+=s;u>0;i=256*i+e[t+f],f+=p,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+e[t+f],f+=p,u-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=c}return(d?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,l,c=8*i-o-1,u=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+f>=1?p/l:p*Math.pow(2,1-f))*l>=2&&(a++,l/=2),a+f>=u?(s=0,a=u):a+f>=1?(s=(t*l-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+d]=255&s,d+=h,s/=256,o-=8);for(a=a<0;e[n+d]=255&a,d+=h,a/=256,c-=8);e[n+d-h]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(module,__webpack_exports__,__webpack_require__){"use strict";var _module__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(18),_core_util__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(2),_logger__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(3),_store__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(5),_renderer__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(19);function _typeof(e){return(_typeof="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 _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n",this.hiDPIReplacement()),this.swapped=!0,this.image.src=this.hiDPIReplacement()),Caman.IO.isRemote(this.image))return this.image.src=Caman.IO.proxyUrl(this.image.src),_logger__WEBPACK_IMPORTED_MODULE_2__.a.debug("Remote image detected, using URL = ".concat(this.image.src))}},{key:"waitForImageLoaded",value:function(){return this.isImageLoaded()?this.imageLoaded():this.image.onload=this.imageLoaded}},{key:"isImageLoaded",value:function(){return!!this.image.complete&&(null==this.image.naturalWidth||0!==this.image.naturalWidth)}},{key:"imageWidth",value:function(){return this.image.width||this.image.naturalWidth}},{key:"imageHeight",value:function(){return this.image.height||this.image.naturalHeight}},{key:"imageLoaded",value:function(){return _logger__WEBPACK_IMPORTED_MODULE_2__.a.debug("Image loaded. Width = ".concat(this.imageWidth(),", Height = ").concat(this.imageHeight())),this.swapped?(this.canvas.width=this.imageWidth()/this.hiDPIRatio(),this.canvas.height=this.imageHeight()/this.hiDPIRatio()):(this.canvas.width=this.imageWidth(),this.canvas.height=this.imageHeight()),this.finishInit()}},{key:"finishInit",value:function(){if(null==this.context&&(this.context=this.canvas.getContext("2d")),this.originalWidth=this.preScaledWidth=this.width=this.canvas.width,this.originalHeight=this.preScaledHeight=this.height=this.canvas.height,this.hiDPIAdjustments(),this.hasId()||this.assignId(),null!=this.image&&this.context.drawImage(this.image,0,0,this.imageWidth(),this.imageHeight(),0,0,this.preScaledWidth,this.preScaledHeight),this.imageData=this.context.getImageData(0,0,this.canvas.width,this.canvas.height),this.pixelData=this.imageData.data,Caman.allowRevert){this.initializedPixelData=_core_util__WEBPACK_IMPORTED_MODULE_1__.b.dataArray(this.pixelData.length),this.originalPixelData=_core_util__WEBPACK_IMPORTED_MODULE_1__.b.dataArray(this.pixelData.length);for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;if(null==r&&(r=0),null==n){n=0;for(var o=0,i=t.length,a=0<=i;a?oi;a?o++:o--)n+=t[o]}return this.renderer.add({type:Caman.Filter.Type.Kernel,name:e,adjust:t,divisor:n,bias:r}),this}},{key:"processPlugin",value:function(e,t){return this.renderer.add({type:Caman.Filter.Type.Plugin,plugin:e,args:t}),this}},{key:"newLayer",value:function(e){var t=new Caman.Layer(this);return this.canvasQueue.push(t),this.renderer.add({type:Caman.Filter.Type.LayerDequeue}),e.call(t),this.renderer.add({type:Caman.Filter.Type.LayerFinished}),this}},{key:"executeLayer",value:function(e){return this.pushContext(e)}},{key:"pushContext",value:function(e){return this.layerStack.push(this.currentLayer),this.pixelStack.push(this.pixelData),this.currentLayer=e,this.pixelData=e.pixelData}},{key:"popContext",value:function(){return this.pixelData=this.pixelStack.pop(),this.currentLayer=this.layerStack.pop()}},{key:"applyCurrentLayer",value:function(){return this.currentLayer.applyToParent()}},{key:"save",value:function(){return this.browserSave.apply(this,arguments)}},{key:"browserSave",value:function(e){null==e&&(e="png"),e=e.toLowerCase();var t=this.toBase64(e).replace("image/".concat(e),"image/octet-stream");return document.location.href=t}},{key:"toImage",value:function(e){var t=new Image;return t.src=this.toBase64(e),t.width=this.dimensions.width,t.height=this.dimensions.height,window.devicePixelRatio&&(t.width/=window.devicePixelRatio,t.height/=window.devicePixelRatio),t}},{key:"toBase64",value:function(e){return null==e&&(e="png"),e=e.toLowerCase(),this.canvas.toDataURL("image/".concat(e))}}]),Caman}(_module__WEBPACK_IMPORTED_MODULE_0__.a);Caman.initClass(),window.Caman=Caman;var _default=Caman,_unused_webpack_default_export=_default,_temp=void("undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Caman,"Caman","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/lib/caman/core/index.js"),__REACT_HOT_LOADER__.register(_default,"default","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/lib/caman/core/index.js")))},function(e,t){function n(e,t){for(var n=0;n1;){for(var m=[],g=0,y=h.length-2,b=0<=y;b?g<=y:g>=y;b?g++:g--)m.push([f(h[g][0],h[g+1][0],d),f(h[g][1],h[g+1][1],d)]);h=m}u[Math.round(h[0][0])]=Math.round((s=h[0][1],l=o,c=i,Math.min(Math.max(s,l),c)))}var v=a[a.length-1][0];return u=Caman.Calculate.missingValues(u,v),null==u[v]&&(u[v]=u[v-1]),u}},{key:"hermite",value:function(e,t,n){if(e.length<2)throw"Invalid number of arguments to hermite";for(var r,o,i,a,s={},l=function(e,t){return[e[0]*t[0],e[1]*t[1]]},c=function(e,t){return[e[0]-t[0],e[1]-t[1]]},u=function(e,t,n){return Math.min(Math.max(e,t),n)},f=0,p=e.length-2,d=0<=p;d?f<=p:f>=p;d?f++:f--){var h=e[f],m=e[f+1],g=m[0]-h[0],y=1/g;f===e.length-2&&(y=1/(g-1));for(var b=f>0?e[f-1]:h,v=l(c(m,b),[.5,.5]),_=l(c(b=f=x;E?w++:w--){var C=w*y,O=2*C*C*C-3*C*C+1,k=C*C*C-2*C*C+C,S=-2*C*C*C+3*C*C,T=C*C*C-C*C,R=(r=l(h,[O,O]),o=l(v,[k,k]),i=l(m,[S,S]),a=l(_,[T,T]),[r[0]+o[0]+i[0]+a[0],r[1]+o[1]+i[1]+a[1]]);s[Math.round(R[0])]=Math.round(u(R[1],t,n))}}var A=e[e.length-1][0];return s=Caman.Calculate.missingValues(s,A)}},{key:"missingValues",value:function(e,t){var n,r,o,i,a,s,l;if(Object.keys(e).length=t;n=0<=t?++s:--s)if(null!=e[n])i[n]=e[n];else{for(o=[n-1,i[n-1]],r=l=n;n<=t?l<=t:l>=t;r=n<=t?++l:--l)if(null!=e[r]){a=[r,e[r]];break}a||(a=[0,0]),i[n]=o[1]+(a[1]-o[1])/(a[0]-o[0])*(n-o[0])}return i}return e}}],(r=null)&&n(t.prototype,r),o&&n(t,o),e}();Caman.Calculate=r;"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(r,"Calculate","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/lib/caman/core/calculate.js")},function(e,t){function n(e){return(n="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 r(e,t){for(var n=0;n.5?c/(2-a-s):c/(a+s),o=function(){switch(a){case e:return(t-r)/c+(t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}},{key:"rgbToHSV",value:function(e,t,n){var r;e/=255,t/=255,n/=255;var o=Math.max(e,t,n),i=Math.min(e,t,n),a=o,s=o-i,l=0===o?0:s/o;return o===i?r=0:(r=function(){switch(o){case e:return(t-n)/s+(t.04045?e=Math.pow((e+.055)/1.055,2.4):e/=12.92,t>.04045?t=Math.pow((t+.055)/1.055,2.4):t/=12.92,n>.04045?n=Math.pow((n+.055)/1.055,2.4):n/=12.92,{x:100*(.4124*e+.3576*t+.1805*n),y:100*(.2126*e+.7152*t+.0722*n),z:100*(.0193*e+.1192*t+.9505*n)}}},{key:"xyzToRGB",value:function(e,t,n){var r=3.2406*(e/=100)+-1.5372*(t/=100)+-.4986*(n/=100),o=-.9689*e+1.8758*t+.0415*n,i=.0557*e+-.204*t+1.057*n;return r>.0031308?r=1.055*Math.pow(r,.4166666667)-.055:r*=12.92,o>.0031308?o=1.055*Math.pow(o,.4166666667)-.055:o*=12.92,i>.0031308?i=1.055*Math.pow(i,.4166666667)-.055:i*=12.92,{r:255*r,g:255*o,b:255*i}}},{key:"xyzToLab",value:function(e,t,r){return"object"===n(e)&&(t=e.y,r=e.z,e=e.x),t/=100,r/=108.883,e=(e/=95.047)>.008856451679?Math.pow(e,.3333333333):7.787037037*e+.1379310345,{l:116*(t=t>.008856451679?Math.pow(t,.3333333333):7.787037037*t+.1379310345)-16,a:500*(e-t),b:200*(t-(r=r>.008856451679?Math.pow(r,.3333333333):7.787037037*r+.1379310345))}}},{key:"labToXYZ",value:function(e,t,r){"object"===n(e)&&(t=e.a,r=e.b,e=e.l);var o=(e+16)/116,i=o+t/500,a=o-r/200;return i>.2068965517?i*=i*i:i=.1284185493*(i-.1379310345),o>.2068965517?o*=o*o:o=.1284185493*(o-.1379310345),a>.2068965517?a*=a*a:a=.1284185493*(a-.1379310345),{x:95.047*i,y:100*o,z:108.883*a}}},{key:"rgbToLab",value:function(e,t,r){"object"===n(e)&&(t=e.g,r=e.b,e=e.r);var o=this.rgbToXYZ(e,t,r);return this.xyzToLab(o)}},{key:"labToRGB",value:function(e,t,n){}}],(o=null)&&r(t.prototype,o),i&&r(t,i),e}();Caman.Convert=o;"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(o,"Convert","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/lib/caman/core/convert.js")},function(e,t){function n(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null;if(this.events[t]&&this.events[t].length)return function(){for(var o=[],i=0,a=Array.from(n.events[t]);i4&&void 0!==arguments[4]?arguments[4]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),null==t&&(t=0),this.r=t,null==n&&(n=0),this.g=n,null==r&&(r=0),this.b=r,null==o&&(o=255),this.a=o,this.c=i,this.loc=0}return r(e,null,[{key:"coordinatesToLocation",value:function(e,t,n){return 4*(t*n+e)}},{key:"locationToCoordinates",value:function(e,t){return{x:e%(4*t)/4,y:Math.floor(e/(4*t))}}}]),r(e,[{key:"setContext",value:function(e){return this.c=e}},{key:"locationXY",value:function(){if(null==this.c)throw"Requires a CamanJS context";var e=this.c.dimensions.height-Math.floor(this.loc/(4*this.c.dimensions.width));return{x:this.loc%(4*this.c.dimensions.width)/4,y:e}}},{key:"pixelAtLocation",value:function(t){if(null==this.c)throw"Requires a CamanJS context";return new e(this.c.pixelData[t],this.c.pixelData[t+1],this.c.pixelData[t+2],this.c.pixelData[t+3],this.c)}},{key:"getPixelRelative",value:function(t,n){if(null==this.c)throw"Requires a CamanJS context";var r=this.loc+4*this.c.dimensions.width*(-1*n)+4*t;return r>this.c.pixelData.length||r<0?new e(0,0,0,255,this.c):this.pixelAtLocation(r)}},{key:"putPixelRelative",value:function(e,t,n){if(null==this.c)throw"Requires a CamanJS context";this.loc,this.c.dimensions.width;if(!(newLoc>this.c.pixelData.length||newLoc<0))return this.c.pixelData[newLoc]=n.r,this.c.pixelData[newLoc+1]=n.g,this.c.pixelData[newLoc+2]=n.b,this.c.pixelData[newLoc+3]=n.a,!0}},{key:"getPixel",value:function(e,t){if(null==this.c)throw"Requires a CamanJS context";var n=this.coordinatesToLocation(e,t,this.width);return this.pixelAtLocation(n)}},{key:"putPixel",value:function(e,t,n){if(null==this.c)throw"Requires a CamanJS context";var r=this.coordinatesToLocation(e,t,this.width);return this.c.pixelData[r]=n.r,this.c.pixelData[r+1]=n.g,this.c.pixelData[r+2]=n.b,this.c.pixelData[r+3]=n.a}},{key:"toString",value:function(){return this.toKey()}},{key:"toHex",value:function(e){null==e&&(e=!1);var t="#"+this.r.toString(16)+this.g.toString(16)+this.b.toString(16);return e?t+this.a.toString(16):t}}]),e}();Caman.Pixel=o;"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(o,"Pixel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/lib/caman/core/pixel.js")},function(e,t){function n(e,t){for(var n=0;n255-e?t.r=255:t.r255-e?t.g=255:t.g255-e?t.b=255:t.b0?t.r+=(255-t.r)*e.red:t.r-=t.r*Math.abs(e.red)),null!=e.green&&(e.green>0?t.g+=(255-t.g)*e.green:t.g-=t.g*Math.abs(e.green)),null!=e.blue&&(e.blue>0?t.b+=(255-t.b)*e.blue:t.b-=t.b*Math.abs(e.blue)),t}))})),Caman.Filter.register("curves",(function(){var e,t,n,r,o,i,a,s,l,c,u,f;if(n=arguments[0],"function"==typeof(a=(r=2<=arguments.length?[].slice.call(arguments,1):[])[r.length-1])?(e=a,r.pop()):"string"==typeof a?(e=Caman.Calculate[a],r.pop()):e=Caman.Calculate.bezier,"string"==typeof n&&(n=n.split("")),"v"===n[0]&&(n=["r","g","b"]),r.length<2)throw"Invalid number of arguments to curves filter";if(t=e(r,0,255),(s=r[0])[0]>0)for(i=l=0,u=s[0];0<=u?lu;i=0<=u?++l:--l)t[i]=s[1];if((o=r[r.length-1])[0]<255)for(i=c=f=o[0];f<=255?c<=255:c>=255;i=f<=255?++c:--c)t[i]=o[1];return this.process("curves",(function(e){var r,o;for(i=r=0,o=n.length;0<=o?ro;i=0<=o?++r:--r)e[n[i]]=t[e[n[i]]];return e}))})),Caman.Filter.register("exposure",(function(e){var t,n,r;return t=[0,255*(r=Math.abs(e)/100)],n=[255-255*r,255],e<0&&(t=t.reverse(),n=n.reverse()),this.curves("rgb",[0,0],t,n,[255,255])}))},function(e,t){Caman.Filter.register("boxBlur",(function(){return this.processKernel("Box Blur",[1,1,1,1,1,1,1,1,1])})),Caman.Filter.register("heavyRadialBlur",(function(){return this.processKernel("Heavy Radial Blur",[0,0,1,0,0,0,1,1,1,0,1,1,1,1,1,0,1,1,1,0,0,0,1,0,0])})),Caman.Filter.register("gaussianBlur",(function(){return this.processKernel("Gaussian Blur",[1,4,6,4,1,4,16,24,16,4,6,24,36,24,6,4,16,24,16,4,1,4,6,4,1])})),Caman.Filter.register("motionBlur",(function(e){var t;return t=0===e||180===e?[0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0]:e>0&&e<90||e>180&&e<270?[0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0]:90===e||270===e?[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0]:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],this.processKernel("Motion Blur",t)})),Caman.Filter.register("sharpen",(function(e){return null==e&&(e=100),e/=100,this.processKernel("Sharpen",[0,-e,0,-e,4*e+1,-e,0,-e,0])}))},function(e,t){Caman.Filter.register("vignette",(function(e,t){var n,r,o,i;return null==t&&(t=60),"string"==typeof e&&"%"===e.substr(-1)&&(e=this.dimensions.height>this.dimensions.width?this.dimensions.width*(parseInt(e.substr(0,e.length-1),10)/100):this.dimensions.height*(parseInt(e.substr(0,e.length-1),10)/100)),t/=100,r=[this.dimensions.width/2,this.dimensions.height/2],i=Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2)),o=i-e,n=Caman.Calculate.bezier([0,1],[30,30],[70,60],[100,80]),this.process("vignette",(function(i){var a,s,l;return l=i.locationXY(),(a=Caman.Calculate.distance(l.x,l.y,r[0],r[1]))>o&&(s=Math.max(1,n[Math.round((a-o)/e*100)]/10*t),i.r=255*Math.pow(i.r/255,s),i.g=255*Math.pow(i.g/255,s),i.b=255*Math.pow(i.b/255,s)),i}))}))},function(e,t){Caman.Filter.register("posterize",(function(e){var t,n;return t=256/e,n=255/(e-1),this.process("posterize",(function(e){return e.r=Math.floor(Math.floor(e.r/t)*n),e.g=Math.floor(Math.floor(e.g/t)*n),e.b=Math.floor(Math.floor(e.b/t)*n),e}))}))},function(e,t){Caman.Filter.register("edgeEnhance",(function(){return this.processKernel("Edge Enhance",[0,0,0,-1,1,0,0,0,0])})),Caman.Filter.register("edgeDetect",(function(){return this.processKernel("Edge Detect",[-1,-1,-1,-1,8,-1,-1,-1,-1])})),Caman.Filter.register("emboss",(function(){return this.processKernel("Emboss",[-2,-1,0,-1,1,1,0,1,2])}))},function(e,t){Caman.Filter.register("grungy",(function(){return this.gamma(1.5),this.clip(25),this.saturation(-60),this.contrast(5),this.noise(5),this.vignette("50%",30)}))},function(e,t){Caman.Filter.register("hazyDays",(function(){return this.gamma(1.2),this.newLayer((function(){return this.setBlendingMode("overlay"),this.opacity(60),this.copyParent(),this.filter.channels({red:5}),this.filter.stackBlur(15)})),this.newLayer((function(){return this.setBlendingMode("addition"),this.opacity(40),this.fillColor("#6899ba")})),this.newLayer((function(){return this.setBlendingMode("multiply"),this.opacity(35),this.copyParent(),this.filter.brightness(40),this.filter.vibrance(40),this.filter.exposure(30),this.filter.contrast(15),this.filter.curves("r",[0,40],[128,128],[128,128],[255,215]),this.filter.curves("g",[0,40],[128,128],[128,128],[255,215]),this.filter.curves("b",[0,40],[128,128],[128,128],[255,215]),this.filter.stackBlur(5)})),this.curves("r",[20,0],[128,158],[128,128],[235,255]),this.curves("g",[20,0],[128,128],[128,128],[235,255]),this.curves("b",[20,0],[128,108],[128,128],[235,255]),this.vignette("45%",20)}))},function(e,t){Caman.Filter.register("lomo",(function(e){return null==e&&(e=!0),this.brightness(15),this.exposure(15),this.curves("rgb",[0,0],[200,0],[155,255],[255,255]),this.saturation(-20),this.gamma(1.8),e&&this.vignette("50%",60),this.brightness(5)}))},function(e,t){Caman.Filter.register("sinCity",(function(){return this.contrast(100),this.brightness(15),this.exposure(10),this.posterize(80),this.clip(30),this.greyscale()}))},function(e,t){Caman.Filter.register("crossProcess",(function(){return this.exposure(5),this.colorize("#e87b22",4),this.sepia(20),this.channels({blue:8,red:3}),this.curves("b",[0,0],[100,150],[180,180],[255,255]),this.contrast(15),this.vibrance(75),this.gamma(1.6)}))},function(e,t){Caman.Filter.register("glowingSun",(function(e){if(null==e&&(e=!0),this.brightness(10),this.newLayer((function(){return this.setBlendingMode("multiply"),this.opacity(80),this.copyParent(),this.filter.gamma(.8),this.filter.contrast(50),this.filter.exposure(10)})),this.newLayer((function(){return this.setBlendingMode("softLight"),this.opacity(80),this.fillColor("#f49600")})),this.exposure(20),this.gamma(.8),e)return this.vignette("45%",20)}))},function(e,t){Caman.Filter.register("jarques",(function(){return this.saturation(-35),this.curves("b",[20,0],[90,120],[186,144],[255,230]),this.curves("r",[0,0],[144,90],[138,120],[255,255]),this.curves("g",[10,0],[115,105],[148,100],[255,248]),this.curves("rgb",[0,0],[120,100],[128,140],[255,255]),this.sharpen(20)}))},function(e,t){Caman.Filter.register("love",(function(){return this.brightness(5),this.exposure(8),this.contrast(4),this.colorize("#c42007",30),this.vibrance(50),this.gamma(1.3)}))},function(e,t){Caman.Filter.register("oldBoot",(function(){return this.saturation(-20),this.vibrance(-50),this.gamma(1.1),this.sepia(30),this.channels({red:-10,blue:5}),this.curves("rgb",[0,0],[80,50],[128,230],[255,255]),this.vignette("60%",30)}))},function(e,t){Caman.Filter.register("orangePeel",(function(){return this.curves("rgb",[0,0],[100,50],[140,200],[255,255]),this.vibrance(-30),this.saturation(-30),this.colorize("#ff9000",30),this.contrast(-5),this.gamma(1.4)}))},function(e,t){Caman.Filter.register("pinhole",(function(){return this.greyscale(),this.sepia(10),this.exposure(10),this.contrast(15),this.vignette("60%",35)}))},function(e,t){Caman.Filter.register("sunrise",(function(){return this.exposure(3.5),this.saturation(-5),this.vibrance(50),this.sepia(60),this.colorize("#e87b22",10),this.channels({red:8,blue:8}),this.contrast(5),this.gamma(1.2),this.vignette("55%",25)}))},function(e,t){Caman.Filter.register("vintage",(function(e){if(null==e&&(e=!0),this.greyscale(),this.contrast(5),this.noise(3),this.sepia(100),this.channels({red:8,blue:2,green:4}),this.gamma(.87),e)return this.vignette("40%",30)}))},function(e,t){var n,r,o;r=[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],o=[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],n=function(){return this.r=0,this.g=0,this.b=0,this.a=0,this.next=null},Caman.Plugin.register("stackBlur",(function(e){var t,i,a,s,l,c,u,f,p,d,h,m,g,y,b,v,_,w,x,E,C,O,k,S,T,R,A,j,D,P,L,M,I,z,H,U,B,F,N,W,Y,X,V,q;if(!(isNaN(e)||e<1)){for(e|=0,b=this.pixelData,s=e+e+1,(D=this.dimensions.width)<<2,P=D-1,p=(f=this.dimensions.height)-1,j=(E=e+1)*(E+1)/2,k=A=new n,d=U=1;1<=s?Us;d=1<=s?++U:--U)k=k.next=new n,d===E&&(S=k);for(k.next=A,T=null,R=null,H=I=0,h=r[e],O=o[e],M=B=0;0<=f?Bf;M=0<=f?++B:--B){for(_=l=t=x=u=a=0,w=E*(v=b[I]),c=E*(y=b[I+1]),i=E*(g=b[I+2]),x+=j*v,u+=j*y,a+=j*g,k=A,d=F=0;0<=E?FE;d=0<=E?++F:--F)k.r=v,k.g=y,k.b=g,k=k.next;for(d=N=1;1<=E?NE;d=1<=E?++N:--N)m=I+((PD;L=0<=D?++W:--W)b[I]=x*h>>O,b[I+1]=u*h>>O,b[I+2]=a*h>>O,x-=w,u-=c,a-=i,w-=T.r,c-=T.g,i-=T.b,m=H+((m=L+e+1)D;L=0<=D?++Y:--Y){for(l=t=_=u=a=x=0,w=E*(v=b[I=L<<2]),c=E*(y=b[I+1]),i=E*(g=b[I+2]),x+=j*v,u+=j*y,a+=j*g,k=A,d=X=0;0<=E?XE;d=0<=E?++X:--X)k.r=v,k.g=y,k.b=g,k=k.next;for(z=D,d=V=1;1<=e?V<=e:V>=e;d=1<=e?++V:--V)I=z+L<<2,x+=(k.r=v=b[I])*(C=E-d),u+=(k.g=y=b[I+1])*C,a+=(k.b=g=b[I+2])*C,_+=v,l+=y,t+=g,k=k.next,df;M=0<=f?++q:--q)b[m=I<<2]=x*h>>O,b[m+1]=u*h>>O,b[m+2]=a*h>>O,x-=w,u-=c,a-=i,w-=T.r,c-=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",y(t,e.attrs),h(e,t),t}function y(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(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=c++;n=l||(l=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",y(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),s=(e=a?-1*e:e,n=n&&"c"!=n?n:a?"#000000":"#FFFFFF",window.sbcRip(t)),l=window.sbcRip(n);return s&&l?i?"rgb("+o((l[0]-s[0])*e+s[0])+","+o((l[1]-s[1])*e+s[1])+","+o((l[2]-s[2])*e+s[2])+(s[3]<0&&l[3]<0?")":","+(s[3]>-1&&l[3]>-1?o(1e4*((l[3]-s[3])*e+s[3]))/1e4:l[3]<0?s[3]:l[3])+")"):"#"+(4294967296+16777216*(s[3]>-1&&l[3]>-1?o(255*((l[3]-s[3])*e+s[3])):l[3]>-1?o(255*l[3]):s[3]>-1?o(255*s[3]):255)+65536*o((l[0]-s[0])*e+s[0])+256*o((l[1]-s[1])*e+s[1])+o((l[2]-s[2])*e+s[2])).toString(16).slice(s[3]>-1||l[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 y(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 b=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=y(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","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(f,"variables","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(p,"getModalWidth","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(d,"getFieldColorStyles","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(h,"getIconStyles","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(m,"shadeBlendConvert","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(g,"isHex","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(y,"hexToRgb","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(b,"getHoverColor","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(v,"getWithOpacity","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(_,"getElementStylesBySize","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(w,"getColor","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"),__REACT_HOT_LOADER__.register(x,"getIconByName","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/styleUtils.js"));function E(){var e=j(["\n text-transform: capitalize;\n height: 20px;\n line-height: 20px;\n"]);return E=function(){return e},e}function C(){var e=j(["\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=j(["\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 k(){var e=j(["\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 k=function(){return e},e}function S(){var e=j(["\n height: 20px;\n line-height: 20px;\n"]);return S=function(){return e},e}function T(){var e=j(["\n height: 40px;\n font-size: 40px;\n \n ","\n ","\n"]);return T=function(){return e},e}function R(){var e=j(["\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 R=function(){return e},e}function A(){var e=j(["\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 A=function(){return e},e}function j(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var D=a.b.div(A(),(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(R(),(function(e){return e.theme.colors.text}),(function(e){return 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(S()),I=a.b.div(k()),z=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})),H=a.b.div(C(),(function(e){return e.src})),U=a.b.div(E());"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(D,"Toolbar","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(P,"ToolWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(L,"ToolIcon","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(M,"ToolLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(I,"EffectsWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(z,"EffectWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(H,"EffectIcon","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"),__REACT_HOT_LOADER__.register(U,"EffectLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Toolbar.ui.js"));function B(){var e=N(["\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 F(){var e=N(["\n height: 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 F=function(){return e},e}function N(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var W=Object(a.b)("div")(F()),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","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/ImageEditor.ui.js"),__REACT_HOT_LOADER__.register(Y,"Wrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/ImageEditor.ui.js"));function X(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 V(){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 V=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 $(){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 $=function(){return e},e}function Q(){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 Q=function(){return e},e}function Z(){var e=re(["\n display: none;\n \n :checked + .onoffswitch-label .onoffswitch-inner {\n margin-left: 0;\n}\n"]);return Z=function(){return e},e}function G(){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 G=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)})),se=a.b.div(J(),(function(e){return h(e)}),x("reset"),(function(e){return ge(e)})),le=a.b.div(G()),ce=a.b.input(Z()),ue=a.b.label(Q(),(function(e){return e.theme.colors.border})),fe=a.b.span($(),(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")(V(),(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;X(e,["id","handleChange","text","checked","style"]);return(i.a.createElement(de,{style:a},i.a.createElement(le,null,i.a.createElement(ce,{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","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(ie,"PreviousBtn","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(ae,"NextBtn","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(se,"ResetBtn","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(le,"SwitcherWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(ce,"SwitcherInput","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(ue,"SwitcherLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(fe,"SwitcherInner","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(pe,"SwitcherSwitch","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(de,"SwitcherBlock","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(he,"SwitcherText","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(me,"Switcher","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"),__REACT_HOT_LOADER__.register(ge,"getActionIconStyle","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Footer.ui.js"));function ye(){var e=ke(["\n display: ",";\n max-height: 100%;\n max-width: 100%;\n vertical-align: middle;\n"]);return ye=function(){return e},e}function be(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=ke(["\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=ke(["\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=ke(["\n display: inline-block;\n vertical-align: middle;\n width: 100%;\n"]);return Ce=function(){return e},e}function Oe(){var e=ke(["\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 ke(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Se=a.b.div(Oe()),Te=Object(a.b)("div")(Ce()),Re=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 }"})),Ae=Object(a.b)("canvas")(xe(),(function(e){return e.width||0}),(function(e){return e.height||0})),je=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 Ne(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(ze,"Button","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Button.js"),__REACT_HOT_LOADER__.register(He,"getElementStylesBySize","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Button.js"),__REACT_HOT_LOADER__.register(Ue,"isDisabled","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Button.js"),__REACT_HOT_LOADER__.register(Be,"getButtonStyles","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Button.js"),__REACT_HOT_LOADER__.register(Fe,"getColor","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Button.js"),__REACT_HOT_LOADER__.register(Ne,"getLinkColor","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Button.js"));function We(){var e=Ge(["\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=Ge(["\n right: 0;\n"]);return Ye=function(){return e},e}function Xe(){var e=Ge(["\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 Xe=function(){return e},e}function Ve(){var e=Ge(["\n background: ",";\n border-color: ",";\n color: ",";\n text-transform: capitalize;\n \n :hover {\n background: ",";\n border-color: ",";\n color: ","; \n }\n"]);return Ve=function(){return e},e}function qe(){var e=Ge(["\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=Ge(["\n @media (max-width: 768px) {\n display: flex;\n justify-content: center;\n width: 100%;\n }\n"]);return Ke=function(){return e},e}function $e(){var e=Ge(["\n text-align: center;\n text-transform: capitalize;\n color: ","\n"]);return $e=function(){return e},e}function Qe(){var e=Ge(["\n line-height: 35px;\n border-bottom: 1px solid ",";\n background: ",";\n"]);return Qe=function(){return e},e}function Ze(){var e=Ge(["\n background: ",";\n"]);return Ze=function(){return e},e}function Ge(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Je=a.b.div(Ze(),(function(e){return e.theme.colors.secondaryBg})),et=a.b.div(Qe(),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.theme.colors.primaryBg})),tt=a.b.div($e(),(function(e){return e.theme.colors.text})),nt=Object(a.b)("div")(Ke()),rt=Object(a.b)("div")(qe()),ot=Object(a.b)(ze)(Ve(),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.theme.colors.text}),(function(e){return b(e.theme.colors.primaryBg)}),(function(e){return e.theme.colors.primaryBg}),(function(e){return e.theme.colors.text})),it=Object(a.b)(rt)(Xe(),(function(e){return e.hide?"none":"flex"}),ot),at=Object(a.b)(rt)(Ye()),st=a.b.div(We(),(function(e){return e.theme.colors.secondaryBg}));"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Je,"HeaderWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(et,"HeaderTop","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(tt,"Title","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(nt,"ActionsWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(rt,"Actions","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(ot,"CancelBtn","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(it,"LeftActions","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(at,"RightActions","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"),__REACT_HOT_LOADER__.register(st,"ToolbarWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Header.ui.js"));function lt(){var e=Ct(["\n height: 20px;\n line-height: 20px;\n"]);return lt=function(){return e},e}function ct(){var e=Ct(["\n display: inline-block;\n vertical-align: middle;\n height: 50px;\n"]);return ct=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 yt(){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 yt=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: 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 bt=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})),kt=Object(a.b)("div")(xt()),St=a.b.div(wt(),(function(e){return e.theme.colors.text})),Tt=a.b.div(_t()),Rt=a.b.label(vt()),At=a.b.input.attrs((function(e){return{type:e.type?e.type:"text"}}))(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"number"===e.type&&"::-webkit-inner-spin-button {\n -webkit-appearance: none;\n }"}),(function(e){return e.theme.colors.secondaryBg})),jt=Object(a.b)("input").attrs((function(e){return{type:e.type?e.type:"file"}}))(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 e.theme.colors.secondaryBg})),Dt=a.b.div(gt()),Pt=Object(a.b)(ze)(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()),zt=a.b.div(ft(),(function(e){return Nt(e.ratio)}),(function(e){return e.theme.textColor}),(function(e){return Ft(e.ratio)}),(function(e){var t=e.radius;return t&&"border-radius: ".concat(t,"%;")})),Ht=Object(a.b)("div")(ut()),Ut=Object(a.b)("div")(ct()),Bt=a.b.div(lt()),Ft=function(e){var t=50*e;return t>200&&(t=200),t},Nt=function(e){var t=50;return 50*e>200&&(t=200/e),t};"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Ot,"CropWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(kt,"PresetsWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(St,"CustomLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Tt,"FieldSet","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Rt,"FieldLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(At,"FieldInput","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(jt,"FileInput","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Dt,"BlockRatioWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Pt,"BlockRatioBtn","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Lt,"BlockRatioIcon","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Mt,"CropBox","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(It,"CropBoxInner","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(zt,"CropShape","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Ht,"CropShapeWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Ut,"ShapeAligner","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Bt,"CropLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Ft,"getWidthOfShape","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"),__REACT_HOT_LOADER__.register(Nt,"getHeightOfShape","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Crop.ui.js"));function Wt(){var e=Qt(["\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=Qt(["\n display: inline-block;\n"]);return Yt=function(){return e},e}function Xt(){var e=Qt(["\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 Xt=function(){return e},e}function Vt(){var e=Qt(["\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 Vt=function(){return e},e}function qt(){var e=Qt(["\n button {\n min-width: 240px;\n }\n"]);return qt=function(){return e},e}function Kt(){var e=Qt(["\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 $t(){var e=Qt(["\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 $t=function(){return e},e}function Qt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Zt=a.b.div($t(),(function(e){return e.theme.colors.text})),Gt=a.b.div(Kt()),Jt=Object(a.b)("div")(qt()),en=Object(a.b)("p")(Vt(),(function(e){return e.theme.colors.textWarn}),(function(e){return e.theme.colors.secondaryBg})),tn=Object(a.b)("div")(Xt(),(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(Zt,"ResizeWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(Gt,"ResizeBox","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(Jt,"PreResizeActions","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(en,"PreResizeWarning","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(tn,"PreResizeInner","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(nn,"SuggestionsBox","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Resize.ui.js"),__REACT_HOT_LOADER__.register(rn,"SuggestionOption","/Users/dmitry/scaleflex/plugins/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 sn(){var e=pn(["\n display: flex;\n width: 100%;\n flex-wrap: wrap;\n justify-content: center;\n"]);return sn=function(){return e},e}function ln(){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 ln=function(){return e},e}function cn(){var e=pn(["\n\n"]);return cn=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(cn()),gn=a.b.div(ln()),yn=Object(a.b)("div")(sn()),bn=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","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(hn,"RotateWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(mn,"RotateLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(gn,"RotateButton","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(yn,"ButtonGroup","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(bn,"RotateIcon","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Orientation.ui.js"),__REACT_HOT_LOADER__.register(vn,"DarkBtn","/Users/dmitry/scaleflex/plugins/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","/Users/dmitry/scaleflex/plugins/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()),kn=Object(a.b)("div")(xn());"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(On,"NoClickOverlay","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Common.ui.js"),__REACT_HOT_LOADER__.register(kn,"NoClickToolbar","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Common.ui.js"));function Sn(){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 Sn=function(){return e},e}var Tn=a.b.span.attrs((function(){return{role:"button"}}))(Sn(),(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","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/CloseBtn.js");function Rn(){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 Rn=function(){return e},e}var An=a.b.span.attrs((function(){return{role:"button"}}))(Rn(),(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(An,"FullscreenBtn","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/FullscreenBtn.js");function jn(){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 jn=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")(jn(),(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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Spinner.js"),__REACT_HOT_LOADER__.register(Mn,"IconWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Spinner.js"),__REACT_HOT_LOADER__.register(In,"Spinner","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Spinner.js"));function zn(){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 zn=function(){return e},e}function Hn(){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 Hn=function(){return e},e}function Un(){var e=Kn(["\n display: inline-block;\n vertical-align: middle;\n margin-left: 20px;\n cursor: pointer;\n"]);return Un=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 Fn(){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 Fn=function(){return e},e}function Nn(){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 Nn=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-block;\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 Xn(){var e=Kn(["\n ","\n"]);return Xn=function(){return e},e}function Vn(){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 Vn=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 $n=a.b.div(qn(),(function(e){return e.theme.colors.text})),Qn=Object(a.b)("div")(Vn()),Zn=Object(a.b)("div")(Xn(),(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;"})),Gn=Object(a.b)("div")(Yn()),Jn=Object(a.b)("div")(Wn()),er=Object(a.b)("div")(Nn()),tr=Object(a.b)("div")(Fn(),(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")(Un()),or=Object(a.b)("div")(Hn(),(function(e){return e.theme.colors.secondaryBg})),ir=Object(a.b)("div")(zn(),(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($n,"WatermarkWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(Qn,"WrapperForURL","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(Zn,"WrapperForControls","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(Gn,"WrapperForOpacity","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(Jn,"WatermarkInputs","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(er,"WatermarkPositionWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(tr,"WatermarkInputTypes","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(nr,"PositionSquare","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(rr,"SelectWatermarkLabel","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(or,"Watermarks","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/styledComponents/Watermark.ui.js"),__REACT_HOT_LOADER__.register(ir,"WatermarkIcon","/Users/dmitry/scaleflex/plugins/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 sr(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 lr(e){for(var t=1;t1&&m)&&(-1!==h||1!==d.length);return i.a.createElement(oe,null,i.a.createElement(se,{muted:"preview"!==c,onClick:function(){"preview"===c&&l()},title:u["footer.reset"]}),i.a.createElement(ie,{onClick:function(){!g&&s({operationIndex:h-1,operationObject:lr(lr({},d[h]),{},{index:h})})},muted:g,title:u["footer.undo"]}),i.a.createElement(ae,{onClick:function(){!y&&s({operationIndex:h+1,operationObject:lr(lr({},d[h]),{},{index:h})})},muted:y,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"]}))}}])&&cr(t.prototype,n),r&&cr(t,r),a}(o.Component),yr=gr,br=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(gr,"default","/Users/dmitry/scaleflex/plugins/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:""}),vr=function(e){return e.url&&e.url.public?e.url.public:e.url_public?e.url_public:""},_r=("undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(br,"getPermalink","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/adjust-api.js"),__REACT_HOT_LOADER__.register(vr,"getPubliclink","/Users/dmitry/scaleflex/plugins/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/")}),Cr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Er,"getBaseUrl","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/get-base-url.js"),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scaleflex-image-edit-box";return window.document.getElementById(e)}),Or=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Cr,"getCanvasNode","/Users/dmitry/scaleflex/plugins/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}}),kr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Or,"getEffectHandlerName","/Users/dmitry/scaleflex/plugins/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""}}),Sr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(kr,"getIcon","/Users/dmitry/scaleflex/plugins/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," ")}),Tr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Sr,"getLabel","/Users/dmitry/scaleflex/plugins/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"}),Rr=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Tr,"getSecretHeaderName","/Users/dmitry/scaleflex/plugins/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 s=o.width-n,l=o.height-r;return e.map((function(e,t){return"center"===e?0===t?i:a:"right"===e?s:"bottom"===e?l:0}))}),Ar=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Rr,"getWatermarkPosition","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/get-watermark-position.js"),n(15)),jr=n.n(Ar);function Dr(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,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pr(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 Pr(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 Pr(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&&(c=f.join("&")),l=zr(u.join("&"),n,o,i)}else l=zr(e,n,o,i);return[l,c].filter((function(e){return e})).join("&")};function Mr(e){return btoa(e).replace(/=*$/g,"")}function Ir(e,t){return jr()(e).slice(0,t)}function zr(e,t,n,r){var o=Mr(e),i=Ir(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(Lr,"getImageSealingParams","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/get-image-sealing-params.js"),__REACT_HOT_LOADER__.register(Mr,"encodeBase64","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/get-image-sealing-params.js"),__REACT_HOT_LOADER__.register(Ir,"getSha1","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/get-image-sealing-params.js"),__REACT_HOT_LOADER__.register(zr,"getSealingParams","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/get-image-sealing-params.js"));var Hr=function(e,t){var n=e.getBoundingClientRect(),r=window.getComputedStyle(e)||{},o=r.paddingLeft,i=void 0===o?0:o,a=r.paddingRight,s=void 0===a?0:a,l=r.paddingTop,c=void 0===l?0:l,u=r.paddingBottom,f=void 0===u?0:u,p=n.width-(parseInt(i,10)||0)-(parseInt(s,10)||0),d=n.height-(parseInt(c,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,y=p/t.ratio,b=d*t.ratio,v=d;t.width<=g&&t.height<=y?(h=g,m=y):(h=b,m=v)}return{width:h,height:m}},Ur=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Hr,"getInnerBoxSize","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/get-inner-box-size.js"),"filerobot-image-editor"),Br="scaleflex-filerobot-shapes-edit-box",Fr=["adjust","effects","filters","rotate","crop","resize","watermark","shapes","image","text"],Nr=["edge_enhance","emboss","grungy","hazy","lomo","radial_blur","sin_city","tilt_shift"],Wr=["cross_process","glow_sun","jarques","love","old_boot","orange_peel","pin_hole","sepia","sun_rise","vintage"],Yr=["crop","resize","rotate","watermark","focus_point"],Xr=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],Vr={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]},qr={opacity:.7,position:"center",url:"",applyByDefault:!1},Kr="watermark-layer",$r=[{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}],Qr=[{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"}],Gr=[{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"}],Jr={RECT:"rect",SQUARE:"square",CIRCLE:"circle",IMAGE:"image",TEXT:"text"},eo="https://image.flaticon.com/icons/svg/916/916762.svg",to={hideCloudimageSwitcher:!0,processWithCloudimage:!1,uploadWithCloudimageLink:!1,elementId:null,isLowQualityPreview:!0,reduceBeforeEdit:{mode:"manual",widthLimit:2e3,heightLimit:2e3},cropBeforeEdit:null,cropPresets:$r,resizePresets:Qr},no=("undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Ur,"MODAL_ID","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Br,"PREVIEW_CANVAS_ID","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Fr,"TOOLS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Nr,"EFFECTS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Wr,"FILTERS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Yr,"CLOUDIMAGE_OPERATIONS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Xr,"WATERMARK_POSITIONS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Vr,"WATERMARK_POSITIONS_PRESET","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(qr,"DEFAULT_WATERMARK","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Kr,"WATERMARK_UNIQUE_KEY","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register($r,"cropPresets","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Qr,"resizePresets","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Zr,"STANDARD_FONTS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Gr,"WATERMARK_CLOUDIMAGE_FONTS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(Jr,"SHAPES_VARIANTS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(eo,"DEFAULT_IMG_URL","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js"),__REACT_HOT_LOADER__.register(to,"UPLOADER","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/config.js")),n(16)),ro=n.n(no),oo=n(9),io=n.n(oo);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 ao=CanvasRenderingContext2D,so=("undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(ao,"default","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/canvas-round.js"),Number.prototype.map=function(e,t,n,r){return(this-e)*(r-n)/(t-e)+n});"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(so,"default","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/utils/map-number-range.js");function lo(e){return(lo="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 co(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 uo(e){return function(e){if(Array.isArray(e))return fo(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 fo(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 fo(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 fo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1050){var l=Cr("scaleflex-image-edit-box-original"),c=l.getContext("2d");l.width=t.width,l.height=t.height,c.drawImage(t,0,0,t.width,t.height),s=t.height/800;var u=t.width/s,f=t.height/s;a({initialZoom:s,canvasOriginal:n.cloneCanvas(l)}),setTimeout((function(){new window.Caman(Cr("scaleflex-image-edit-box"),(function(){this.resize({width:u,height:f}),this.render((function(){var e=n.replaceWithNewCanvas("scaleflex-image-edit-box");n.CamanInstanceZoomed=new window.Caman(e,(function(){n.CamanInstanceOriginal=new window.Caman(Cr("scaleflex-image-edit-box-original"),(function(){})),a({isShowSpinner:!1,canvasZoomed:n.cloneCanvas(e)})}))}))}))}))}else setTimeout((function(){n.CamanInstance=new window.Caman(Cr("scaleflex-image-edit-box"),(function(){a({isShowSpinner:!1,canvasOriginal:n.cloneCanvas(Cr("scaleflex-image-edit-box"))})}))}))})),wo(vo(e),"mergeCanvases",(function(e){var t=e.getContext("2d"),n=document.getElementById(Br);return t.drawImage(n,0,0,e.width,e.height),e.toDataURL()})),wo(vo(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})),wo(vo(e),"replaceWithNewCanvas",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Cr(e),r=n.width,o=n.height,i=document.createElement("canvas"),a=i.getContext("2d"),s=n.parentElement;return s.removeChild(n),i.width=r,i.height=o,i.id=e,a.drawImage(n,0,0),t&&a.round(),s.appendChild(i),i})),wo(vo(e),"replaceCanvas",(function(e,t){var n=Cr(t),r=n.parentElement;return r.removeChild(n),r.appendChild(e),e})),wo(vo(e),"saveImage",(function(){var t=e.props,n=t.onComplete,r=t.onClose,o=t.updateState,i=t.closeOnLoad,a=t.config,s=t.processWithCloudService,l=t.uploadCloudimageImage,c=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,y=void 0===g?"filerobot":g,b=e.props.src.split("?")[0],v=Cr(1!==u?"scaleflex-image-edit-box-original":"scaleflex-image-edit-box"),_=xr(m.baseAPI,m.container,y),w=(m.uploadParams||{}).dir||"image-editor",x=vo(e);if(s){var E=(1!==u?f:c).filter((function(e){var t=e.operation;return Yr.includes(t)})),C=e.generateCloudimageURL(E,b.replace(/https?:\/\/scaleflex.ultrafast.io\//,""));if(l){var O=new XMLHttpRequest;O.addEventListener("load",e.onFileLoad),O.open("POST",[_,"upload?dir=".concat(w)].join("")),O.setRequestHeader(Tr(y),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()}else{e.mergeCanvases(v);var k=v.toDataURL(p).split(";")[1].split(",")[1],S=_r(k,p,null),T=d.replace(/-version-.{6}/g,"").split("."),R=T.length,A="";A=R<=1?"".concat(T.join("."),"-version-").concat((io()()||"").slice(0,6)):[T.slice(0,R-1).join("."),"-version-",(io()()||"").slice(0,6),".",T[R-1]].join("");var j=new FormData,D=new XMLHttpRequest;D.addEventListener("load",x.onFileLoad),j.append("files[]",S,A),D.open("POST",[_,"upload?dir=".concat(w)].join("")),D.setRequestHeader(Tr(y),m.uploadKey),D.send(j)}})),wo(vo(e),"getResultCanvas",(function(){var t=e.props.initialZoom,n=Cr(1!==t?"scaleflex-image-edit-box-original":"scaleflex-image-edit-box");return e.mergeCanvases(n),n})),wo(vo(e),"getFinalImageMime",(function(){var t=e.props,n=t.roundCrop,r=t.imageMime;return n?"image/png":r})),wo(vo(e),"getFinalImageName",(function(){var t=e.props.roundCrop,n=e.state.imageName;return t&&(n=n.replace(n.substr(n.lastIndexOf(".")+1),"png")),n})),wo(vo(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()})),wo(vo(e),"onFileLoad",(function(t){var n=e.props,r=n.onComplete,o=n.onClose,i=n.updateState,a=n.closeOnLoad,s=t.srcElement,l=(void 0===s?{}:s).response,c=void 0===l?"{}":l,u=JSON.parse(c)||{};if("success"===u.status){var f=u.file,p=void 0===f?{}:f,d=vr(p);if(!d)return;i({isShowSpinner:!1,isHideCanvas:!1}),r(d,p),a&&o()}else i({isShowSpinner:!1,isHideCanvas:!1}),alert(u),a&&o()})),wo(vo(e),"generateCloudimageURL",(function(t,n){var r=e.props,o=r.config,i=r.watermark,a=r.logoImage,s=r.processWithCloudimage,l=r.processWithFilerobot,c=r.imageSealing,u=o.cloudimage,f=void 0===u?{}:u,p=o.filerobot,d=void 0===p?{}:p,h=s&&f.token+".cloudimg.io/"+(f.version?"".concat(f.version,"/"):"v7/"),m=l&&d.token+".filerobot.com/"+(d.version?"".concat(d.version,"/"):""),g=m||h||"";g=(g?"https://":"")+g;var y=(m?d.doNotPrefixURL:f.doNotPrefixURL)?"":g,b=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="",k="",S="";b&&(E=e.getCropArguments(b.props)),v&&(C=(E?"&":"")+e.getResizeArguments(v.props)),_&&(O=(E||C?"&":"")+e.getOrientationArguments(_.props)),x&&(k=(E||C||O?"&":"")+e.getWatermarkArguments()),w&&(S=(E||C||O||k?"&":"")+e.getFocusPointArguments(w.props)),n=(n=n.split("?")[0]).replace(y,"");var T=E+C+O+k+S;return c.enabled&&(T=Lr(T,c,n.replace(g,""))),y+n+(T?"?":"")+T})),wo(vo(e),"initFiltersOrEffects",(function(){})),wo(vo(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[Or(e.props[t])](),e.CamanInstanceOriginal.render((function(){o(wo({},t,null),(function(){e.makeCanvasSnapshot({operation:t},n)}))}))):o(wo({},t,null),(function(){e.makeCanvasSnapshot({operation:t},n)}))}))})),wo(vo(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,s=i.contrast,l=i.saturation,c=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"!==s.toString()&&e.CamanInstanceOriginal.contrast(parseInt(s||"0")),"0"!==l.toString()&&e.CamanInstanceOriginal.saturation(parseInt(l||"0")),"0"!==c.toString()&&e.CamanInstanceOriginal.exposure(parseInt(c||"0")),e.CamanInstanceOriginal.render((function(){r({adjust:ho({},u)},(function(){e.makeCanvasSnapshot({operation:"adjust"},t)}))}))):r({adjust:ho({},u)},(function(){e.makeCanvasSnapshot({operation:"adjust"},t)}))}))})),wo(vo(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 s=a.findIndex((function(e){return"rotate"===e.operation}));s>-1&&r({operationIndex:s-1,callback:function(){},resetActiveTab:!1})}})),wo(vo(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,s=i.rotate,l=i.updateState,c=s+t;l({isHideCanvas:!0,isShowSpinner:!0,rotate:c,correctionDegree:n,flipX:r,flipY:o},(function(){1!==a?(e.CamanInstanceZoomed.reset(),r&&e.CamanInstanceZoomed.flip("x"),o&&e.CamanInstanceZoomed.flip("y"),(c||n)&&e.CamanInstanceZoomed.rotate((c||0)+(n||0)),e.CamanInstanceZoomed.render((function(){l({isHideCanvas:!1,isShowSpinner:!1})}))):(e.CamanInstance.reset(),r&&e.CamanInstance.flip("x"),o&&e.CamanInstance.flip("y"),(c||n)&&e.CamanInstance.rotate((c||0)+(n||0)),e.CamanInstance.render((function(){l({isHideCanvas:!1,isShowSpinner:!1})})))}))})),wo(vo(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,s=n.flipX,l=n.flipY;r({isHideCanvas:!0,isShowSpinner:!0},(function(){var n=(i||0)+(a||0);1!==o?(e.CamanInstanceOriginal.reset(),s&&e.CamanInstanceOriginal.flip("x"),l&&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)}))}))})),wo(vo(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)}})),wo(vo(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 s=a.findIndex((function(e){return"crop"===e.operation}));s>-1&&r({operationIndex:s-1,callback:e.onInitCrop,resetActiveTab:!1})}else e.onInitCrop()})),wo(vo(e),"onInitCrop",(function(){var t=e.props,n=t.updateState,r=t.config.beginCropArea,o=void 0===r?1:r;n({isHideCanvas:!0,isShowSpinner:!0},(function(){var t=Cr(),r=t.getBoundingClientRect(),i=t.width/r.width;e.cropper=new ro.a(t,{viewMode:1,modal:!1,background:!1,rotatable:!1,scalable:!1,zoomable:!1,movable:!1,autoCropArea:o,crop:function(t){e.props.updateState({cropDetails:t.detail})}}),window.scaleflexPlugins=window.scaleflexPlugins||{},window.scaleflexPlugins.zoom=i,window.scaleflexPlugins.cropperjs=e.cropper,n({isHideCanvas:!1,isShowSpinner:!1})}))})),wo(vo(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,s=i.width,l=i.height,c=i.x,u=i.y;o({isShowSpinner:!0},(function(){var n,o,i;(e.destroyCrop(),1!==r)?(n=[s,l,c,u].map((function(e){return e*r})),e.CamanInstanceZoomed.crop(s,l,c,u),(o=e.CamanInstanceOriginal).crop.apply(o,uo(n))):(n=[s,l,c,u],(i=e.CamanInstance).crop.apply(i,uo(n)));e.makeCanvasSnapshot({operation:"crop",props:{width:n[0],height:n[1],x:n[2],y:n[3],roundCrop:a}},t)}))})),wo(vo(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,s=o.operationsZoomed,l=o.currentOperation,c=o.operationsOriginal,u=o.operations,f=o.roundCrop,p=1!==a;if(r){var d=(p?s:u).indexOf(l)+1,h=e.cloneCanvas(Cr("scaleflex-image-edit-box")),m=ho(ho({},t),{},{previewCanvas:!0,canvas:h}),g={isHideCanvas:!1,isShowSpinner:!1,currentOperation:m};return p?(g.operationsZoomed=[].concat(uo(s.slice(0,d)),[m]),g.operationsOriginal=[].concat(uo(c.slice(0,d)),[ho(ho({},m),{},{canvas:e.cloneCanvas(Cr("scaleflex-image-edit-box-original"))})]),g.isHideCanvasOriginal=!1,g.isShowSpinnerOriginal=!1):g.operations=[].concat(uo(u.slice(0,d)),[m]),void i(g,n)}if(p){var y=s.indexOf(l)+1;e.CamanInstanceOriginal.render((function(){var r=e.replaceWithNewCanvas("scaleflex-image-edit-box-original",f),o=ho(ho({},t),{},{canvas:e.cloneCanvas(Cr("scaleflex-image-edit-box-original"))});e.CamanInstanceOriginal=new window.Caman(r,(function(){i({isHideCanvasOriginal:!1,isShowSpinnerOriginal:!1,operationsOriginal:[].concat(uo(c.slice(0,y)),[o])},n)}))})),e.CamanInstanceZoomed.render((function(){var n=e.replaceWithNewCanvas("scaleflex-image-edit-box",f),r=ho(ho({},t),{},{canvas:e.cloneCanvas(Cr("scaleflex-image-edit-box"))});e.CamanInstanceZoomed=new window.Caman(n,(function(){i({isHideCanvas:!1,isShowSpinner:!1,operationsZoomed:[].concat(uo(s.slice(0,y)),[r]),currentOperation:r})}))}))}else{var b=u.indexOf(l)+1;e.CamanInstance.render((function(){var r=e.replaceWithNewCanvas("scaleflex-image-edit-box",f),o=ho(ho({},t),{},{canvas:e.cloneCanvas(Cr("scaleflex-image-edit-box"))});e.CamanInstance=new window.Caman(r,(function(){i({isHideCanvas:!1,isShowSpinner:!1,operations:[].concat(uo(u.slice(0,b)),[o]),currentOperation:o},n)}))}))}})),wo(vo(e),"destroyCrop",(function(){e.cropper.destroy()})),wo(vo(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"):"")})),wo(vo(e),"initResize",(function(){var t=e.props,n=t.initialZoom,r=t.updateState,o=Cr(1!==n?"scaleflex-image-edit-box-original":"scaleflex-image-edit-box");r({canvasDimensions:{width:o.width,height:o.height,ratio:o.width/o.height}})})),wo(vo(e),"applyResize",(function(){var t=e.props,n=t.initialZoom,r=t.canvasDimensions,o=t.updateState,i=t.handleSave,a=t.operations,s=t.operationsOriginal;o({isHideCanvas:!0,isShowSpinner:!0,operationsOriginal:[].concat(uo(s),[{operation:"resize",props:r}]),operations:[].concat(uo(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()})))}))})),wo(vo(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)})),wo(vo(e),"initAdjust",(function(){})),wo(vo(e),"onAdjust",(function(t,n){var r,o=e.props,i=o.updateState,a=o.adjust;i({adjust:ho(ho({},a),{},(r={},wo(r,t,n),wo(r,"isHideCanvas",!0),wo(r,"isShowSpinner",!0),r))},(function(){e.applyCorrections((function(){i({isHideCanvas:!1,isShowSpinner:!1})}))}))})),wo(vo(e),"initFocusPoint",(function(){var t=e.props,n=t.updateState,r=t.original,o=t.focusPoint,i=ho({},o);null===i.x&&(i.x=r.width/2),null===i.y&&(i.y=r.height/2),e.tempFocusPoint=ho({},o),n({focusPoint:i,isHideCanvas:!0,isShowSpinner:!0})})),wo(vo(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(uo(i),[{operation:"focus_point",props:a}]),operations:[].concat(uo(o),[{operation:"focus_point",props:a}])}),t()})),wo(vo(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)}))})),wo(vo(e),"getFocusPointArguments",(function(e){return"gravity=".concat(e.x,",").concat(e.y)})),wo(vo(e),"destroyFocusPoint",(function(){e.props.updateState({focusPoint:e.tempFocusPoint,isHideCanvas:!1,isShowSpinner:!1})})),wo(vo(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)})),wo(vo(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,s=o.operationsZoomed,l=o.operationsOriginal,c=o.canvasZoomed,u=o.canvasOriginal,f=o.updateState,p=1!==i,d=p?s[t]:a[t],h=-1!==t;if(r&&r.previewCanvas&&r.index-1===t||d&&d.previewCanvas&&r.index+1===t){var m,g,y=e.props.shapeOperations,b=null==d?void 0:null===(m=d.props)||void 0===m?void 0:m.shapes;if(!b){var v=(p?s:a).filter((function(e,t){return"shape"===e.operation&&t0?v[v.length-1].props.shapes:[]}return y.replaceAllShapes(b),g=p?h?s[t]:{canvas:e.cloneCanvas(c)}:h?a[t]:{canvas:e.cloneCanvas(u)},void f(ho(ho({},xo),{},{currentOperation:g}),(function(){n&&n()}))}if(h||e.props.shapeOperations.replaceAllShapes([]),p){var _=h?s[t]:{canvas:e.cloneCanvas(c)},w=e.replaceCanvas(_.canvas,"scaleflex-image-edit-box");e.CamanInstanceZoomed=new window.Caman(w,(function(){f(ho(ho({},xo),{},{currentOperation:_}),(function(){n&&n()}))}));var x=h?l[t]:{canvas:e.cloneCanvas(u)},E=e.replaceCanvas(x.canvas,"scaleflex-image-edit-box-original");e.CamanInstanceOriginal=new window.Caman(E,(function(){}))}else{var C=h?a[t]:{canvas:e.cloneCanvas(u)},O=e.replaceCanvas(C.canvas,"scaleflex-image-edit-box");e.CamanInstance=new window.Caman(O,(function(){f(ho(ho({},xo),{},{currentOperation:C}),(function(){n&&n()}))}))}})),wo(vo(e),"isOperationExist",(function(e,t){return e.find((function(e){return e.operation===t}))})),wo(vo(e),"getOperationQuery",(function(e,t){return e?"crop_px":t?"width":"cdn"})),wo(vo(e),"destroyAll",(function(){})),wo(vo(e),"resetAll",(function(t){var n=e.props.activeTab;n?e.cancelLastOperation(n,(function(){e.applyOperations(-1,t)})):e.applyOperations(-1,t)})),wo(vo(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,s=a.brightness,l=a.contrast,c=a.saturation,u=a.exposure;1!==r?(e.CamanInstanceZoomed.revert(!1),o&&e.CamanInstanceZoomed[Or(o)](),i&&e.CamanInstanceZoomed[Or(i)](),"0"!==s.toString()&&e.CamanInstanceZoomed.brightness(parseInt(s||"0")),"0"!==l.toString()&&e.CamanInstanceZoomed.contrast(parseInt(l||"0")),"0"!==c.toString()&&e.CamanInstanceZoomed.saturation(parseInt(c||"0")),"0"!==u.toString()&&e.CamanInstanceZoomed.exposure(parseInt(u||"0")),e.CamanInstanceZoomed.render(t)):(e.CamanInstance.revert(!1),o&&e.CamanInstance[Or(o)](),i&&e.CamanInstance[Or(i)](),"0"!==s.toString()&&e.CamanInstance.brightness(parseInt(s||"0")),"0"!==l.toString()&&e.CamanInstance.contrast(parseInt(l||"0")),"0"!==c.toString()&&e.CamanInstance.saturation(parseInt(c||"0")),"0"!==u.toString()&&e.CamanInstance.exposure(parseInt(u||"0")),e.CamanInstance.render(t))})),wo(vo(e),"cancelAddedShapes",(function(){e.props.shapeOperations.deleteShapes({all:!0},{selectedShape:{}})})),wo(vo(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()})))})),wo(vo(e),"initWatermark",(function(){var t=e.props,n=t.watermark,r=t.updateState;e.setState({tempWatermark:n&&wr(n)}),n.applyByDefault||r({watermark:ho(ho({},n),{},{applyByDefault:!0})})})),wo(vo(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:Kr})||{}).index;e.setState({tempWatermark:null}),r({selectedShape:{}}),e.makeCanvasSnapshot({operation:"shape",props:{shapes:[i]}},t,!0),t()})),wo(vo(e),"cancelWatermark",(function(){var t=e.state.tempWatermark,n=e.props,r=n.updateState,o=n.shapeOperations,i=o.getShape({key:Kr})||{},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:{}})})),wo(vo(e),"getWatermarkArguments",(function(){var t=e.props,n=t.config.processWithCloudimage,r=t.shapeOperations.getShape({key:Kr}),o=r.x,i=r.y,a=r.opacity,s=co(r,["x","y","opacity"]),l=e.state.original,c=(l=void 0===l?{}:l).width,u=l.height,f=Cr(Br),p=f.width,d=f.height,h=Math.round(o.map(0,p,0,c)),m=Math.round(i.map(0,d,0,u)),g="&wat_gravity=northwest&wat_pad=".concat(h,",").concat(m),y="wat=1&wat_opacity=".concat(a,"&wat_scale=31p").concat(g);return console.log(g),y+=n&&s.text?"&wat_text=".concat(s.text,"&wat_font=").concat(s.textFont,"&wat_fontsize=").concat(s.textSize,"&wat_colour=").concat(s.color.replace("#","")):"&wat_url=".concat(s.img.src.split("?")[0])})),wo(vo(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)}})),wo(vo(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()}})),wo(vo(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},e.CamanInstance=null,e.CamanInstanceOriginal=null,e.CamanInstanceZoomed=null,e}return t=a,(n=[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.activeTab!==this.props.activeTab&&(this.props.activeTab&&this.destroyMode(this.props.activeTab),this.changeTab(e.activeTab)),this.setState(ho({},e))}},{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=Cr("scaleflex-image-edit-box"),s=n.getContext("2d");n.width=o.width,n.height=o.height,s.drawImage(o,0,0,o.width,o.height);var l={height:o.height,width:o.width,ratio:o.width/o.height};r({original:l,canvasDimensions:l}),i&&a?new window.Caman(n,(function(){this.resize({width:a.width,height:a.height}),this.render((function(){var e=t.replaceWithNewCanvas("scaleflex-image-edit-box"),n={height:e.height,width:e.width,ratio:e.width/e.height};r({original:n,canvasDimensions:ho({},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:"scaleflex-image-edit-box-original"}),i.a.createElement(Me,{id:"scaleflex-image-edit-box"}))}}])&&mo(t.prototype,n),r&&mo(t,r),a}(o.Component);"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(xo,"INITIAL_PARAMS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/components/Preview/ImageManipulator.js"),__REACT_HOT_LOADER__.register(Eo,"ImageManipulator","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/components/Preview/ImageManipulator.js"));function Co(e,t,n,r){var o,i=!1,a=0;function s(){o&&clearTimeout(o)}function l(){var l=this,c=Date.now()-a,u=arguments;function f(){a=Date.now(),n.apply(l,u)}i||(r&&!o&&f(),s(),void 0===r&&c>e?f():!0!==t&&(o=setTimeout(r?function(){o=void 0}:f,void 0===r?e-c:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){s(),i=!0},l}function Oo(e,t,n){return void 0===n?Co(e,t,!1):Co(e,n,!1!==t)}function ko(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,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return So(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 So(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 So(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 Lo(e){return function(e){if(Array.isArray(e))return Io(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Mo(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){if(e){if("string"==typeof e)return Io(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)?Io(e,t):void 0}}function Io(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)})),Xo(Wo(t),"pushShapeToShapes",(function(e,n){var r=t.props.shapes,o=r.length;return t.updateState(Ho({shapes:[].concat(Lo(r),[Ho(Ho({},e),{},{index:o})])},n)),o})),Xo(Wo(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})),Xo(Wo(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,s=!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&&(s=!0,t.updateState({selectedShape:Ho(Ho({},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),document.addEventListener("mouseup",t.endDragging))})),s||(t.updateState({selectedShape:{}}),t.disableResizingActions(),t._canvas.removeEventListener("keyup",t.activateShapeDeleting),t._canvas.removeEventListener("mousemove",t.startDragging),document.removeEventListener("mouseup",t.endDragging))}})),Xo(Wo(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))})),Xo(Wo(t),"activateResizingActions",(function(){Array.from(document.getElementsByClassName("shape-resizing-control")).forEach((function(e){e.addEventListener("mousedown",t.trackShapeResize)}))})),Xo(Wo(t),"trackShapeResize",(function(e){var n=e.target;t.setState({resizeControlTarget:n}),document.addEventListener("mousemove",t.handleShapeResizing),document.addEventListener("mouseup",t.disableResizingActions)})),Xo(Wo(t),"handleShapeResizing",(function(e){var n=e.movementX,r=e.movementY,o=e.shiftKey,i=t.state.resizeControlTarget,a=t.props.selectedShape,s=a.index,l=a.width,c=a.height,u=a.x,f=a.y,p=a.variant;if(i&&p!==Jr.TEXT){var d=c,h=function(e){var t=l/c;if(Math.abs(n)>=Math.abs(r)){var o=Math.abs(c-(l+n)/t);r=(e?1:-1)*Math.sign(n)*o}else{var i=Math.abs(l-(c+r)*t);n=(e?1:-1)*Math.sign(r)*i}},m=function(){l+=n},g=function(){c+=r},y=function(){l-=n,u+=n},b=function(){c-=r,f+=r};switch(i.dataset.direction){case"e":m();break;case"w":y();break;case"n":b();break;case"s":g();break;case"ne":o&&h(!1),b(),m();break;case"nw":o&&h(!0),b(),y();break;case"se":o&&h(!0),g(),m();break;case"sw":o&&h(!1),g(),y();break;default:return}p!==Jr.SQUARE&&p!==Jr.CIRCLE||(c!==d?l=c:c=l);if(!(c<=15||l<=15)){u<0&&(u=0),f<0&&(f=0),u+l>t._canvas.width&&(u=t._canvas.width-l),f+c>t._canvas.height&&(f=t._canvas.height-c),l>t._canvas.width&&(l=t._canvas.width),c>t._canvas.height&&(c=t._canvas.height);var v={width:l,height:c,x:u,y:f};t.updateShape(v,s,{selectedShape:Ho(Ho({},a),v)})}}})),Xo(Wo(t),"disableResizingActions",(function(e){document.removeEventListener("mousemove",t.handleShapeResizing),document.removeEventListener("mouseup",t.disableResizingActions),t.updateState({selectedShape:{}}),t.setState({resizeControlTarget:null})})),Xo(Wo(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:Ho(Ho({},o),{},{resizingBox:!1})}),t._canvas.removeEventListener("click",t.removeResizingBox))})),Xo(Wo(t),"startDragging",(function(e){var n=t.props.selectedShape,r=n.startEdgeOffset,o=void 0===r?{}:r,i=n.width,a=n.height,s=n.index,l=e.offsetX-o.x,c=e.offsetY-o.y;l<0&&(l=0),c<0&&(c=0),l+i>t._canvas.width&&(l=t._canvas.width-i),c+a>t._canvas.height&&(c=t._canvas.height-a);var u=Ho(Ho({},n),{},{x:l,y:c});t.updateShape(u,s,{selectedShape:u})})),Xo(Wo(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)})),Xo(Wo(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]})),Xo(Wo(t),"draw",(function(e,n){var r=n.opacity,o=void 0===r?1:r,i=n.hidden,a=n.color,s=n.stroke,l=void 0===s?{}:s;i||(t._context.globalAlpha=+o,t._context.fillStyle=a,t._context.strokeStyle=l.color||"transparent",t._context.lineWidth=l.width||1,e(),t.props.round&&t._context.round())})),Xo(Wo(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=Ho(Ho({},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)}))})),Xo(Wo(t),"drawShapeThroughVariant",(function(e){switch(e.variant){case Jr.IMAGE:t.drawImage(e);break;case Jr.RECT:case Jr.SQUARE:t.drawRect(e);break;case Jr.CIRCLE:t.drawCircle(e);break;case Jr.TEXT:t.drawText(e);default:return}})),Xo(Wo(t),"drawRect",(function(e){var n=e.x,r=e.y,o=e.width,i=e.height,a=e.stroke,s=Po(e,["x","y","width","height","stroke"]);t.draw((function(){t._context.fillRect(n,r,o,i),a&&t._context.strokeRect(n,r,o,i)}),Ho({stroke:a},s))})),Xo(Wo(t),"drawCircle",(function(e){var n=e.x,r=e.y,o=(e.radius,e.width),i=e.height,a=e.stroke,s=Po(e,["x","y","radius","width","height","stroke"]);t.draw((function(){t._context.roundRect(n,r,o,i),t._context.fill(),a&&t._context.stroke()}),Ho({stroke:a},s))})),Xo(Wo(t),"drawImage",(function(e){var n=e.img,r=e.x,o=e.y,i=e.width,a=e.height,s=e.stroke,l=Po(e,["img","x","y","width","height","stroke"]);t.draw((function(){t._context.drawImage(n,r,o,i,a),s&&t._context.strokeRect(r,o,i,a)}),Ho({stroke:s},l))})),Xo(Wo(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)})),Xo(Wo(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]})),Xo(Wo(t),"drawText",(function(e){var n=e.text,r=e.textSize,o=e.textFont,i=e.x,a=e.y,s=e.stroke,l=Po(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),s&&t._context.strokeText(n,i,a)}),Ho({stroke:s},l))})),Xo(Wo(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,s=void 0===a?75:a,l=e.stroke,c=void 0===l?{}:l,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?Jr.RECT:h,g=e.tab,y=void 0===g?"shapes":g,b=Po(e,["x","y","width","height","stroke","color","opacity","variant","tab"]),v=t.getCanvasCenter(i/2,s/2),_=Do(v,2),w=_[0],x=_[1],E={x:n||w,y:r||x,width:i,height:s,stroke:c,opacity:d,color:f},C=Ho(Ho(Ho(Ho({},t._initArgs),b),E),{},{variant:m,tab:y});if(!b.key||!t.replaceShapeIfExisted(b.key,C)){t.drawRect(E);var O=t.pushShapeToShapes(C);t.updateState({selectedShape:Ho(Ho({},C),{},{index:O,resizingBox:!0})},t.activateResizingActions)}})),Xo(Wo(t),"addSquare",(function(e){e.width||(e.width=e.height=75),e.variant=Jr.SQUARE,t.addRect(e)})),Xo(Wo(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,s=void 0===a?{}:a,l=e.color,c=void 0===l?"#000000":l,u=e.opacity,f=void 0===u?1:u,p=e.tab,d=void 0===p?"shapes":p,h=Po(e,["x","y","radius","stroke","color","opacity","tab"]),m=t.getCanvasCenter(i,i),g=Do(m,2),y=g[0],b=g[1],v=2*i,_={x:n||y,y:r||b,radius:i,color:c,opacity:f,stroke:s,width:v,height:v},w=Ho(Ho(Ho(Ho({},t._initArgs),h),_),{},{tab:d,variant:Jr.CIRCLE});if(!h.key||!t.replaceShapeIfExisted(h.key,w)){t.drawCircle(_);var x=t.pushShapeToShapes(w);t.updateState({selectedShape:Ho(Ho({},w),{},{index:x,resizingBox:!0})},t.activateResizingActions)}})),Xo(Wo(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,s=e.opacity,l=void 0===s?1:s,c=e.tab,u=void 0===c?"image":c,f=e.stroke,p=void 0===f?{}:f,d=e.otherStates,h=Po(e,["img","x","y","opacity","tab","stroke","otherStates"]);if(n){var m=function(){var e=n.width,r=n.height,i=Do(t.getCanvasCenter(e/2,r/2),2),s=i[0],c=i[1],f={img:n,opacity:l,width:e,height:r,originalWidth:e,originalHeight:r,x:o||s,y:a||c,stroke:p},m=Ho(Ho(Ho(Ho({},t._initArgs),h),f),{},{variant:Jr.IMAGE,tab:u});if(!h.key||!t.replaceShapeIfExisted(h.key,m,d)){t.drawImage(f);var g=t.pushShapeToShapes(m);t.updateState(Ho({selectedShape:Ho(Ho({},m),{},{index:g,resizingBox:!0})},d),t.activateResizingActions)}};"string"==typeof n?n=t.makeImgElement(n,m):m()}})),Xo(Wo(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,s=void 0===a?"#000000":a,l=e.textFont,c=void 0===l?"Arial":l,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,y=void 0===g?1:g,b=e.tab,v=void 0===b?"text":b,_=e.otherStates,w=Po(e,["text","textSize","color","textFont","x","y","stroke","opacity","tab","otherStates"]),x=t.getTextWidthAndHeight({text:r,textSize:i,textFont:c}),E=Do(x,2),C=E[0],O=E[1],k=t.getCanvasCenter(C/2,O/2),S=Do(k,2),T=S[0],R=S[1];if(r){var A={text:r,textSize:i,textFont:c,x:f||T,y:d||R,opacity:y,stroke:m,color:s},j=Ho(Ho(Ho(Ho({},t._initArgs),w),A),{},{width:C,height:O,variant:Jr.TEXT,tab:v});if(w.key&&t.replaceShapeIfExisted(w.key,j,_))return;t.drawText(A);var D=t.pushShapeToShapes(j);t.updateState(Ho({selectedShape:Ho(Ho({},j),{},{index:D,resizingBox:!0})},_),t.activateResizingActions)}})),Xo(Wo(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=Ho(Ho({},e),{},{otherStates:n});switch(e.variant){case Jr.IMAGE:t.addImage(o);break;case Jr.RECT:t.addRect(o);break;case Jr.SQUARE:t.addSquare(o);break;case Jr.CIRCLE:t.addCircle(o);break;case Jr.TEXT:t.addText(o);default:return}})),Xo(Wo(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]})),Xo(Wo(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=Ho(Ho({},n),{},{x:o.x,y:o.y,width:o.width,height:o.height}),t.updateShape(n,o.index,r),!0)})),Xo(Wo(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)})),Xo(Wo(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})),Xo(Wo(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 Ho(Ho({},t),e)})),t.updateState(Ho({shapes:o},n),r)})),Xo(Wo(t),"replaceAllShapes",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};t.updateState({shapes:e},(function(){t.redrawShape(),n()}))})),Xo(Wo(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:Ho(Ho({},a),{},{img:e.img})}),void t.makeImgElement(e.img,t.updateShape,e,n,r);var s={};if(n||0===n||(s.selectedShape=Ho(Ho({},a),e)),i[n=n||0===n?n:a.index]){var l=i;if(e.textSize&&e.textSize!==i[n].textSize||e.text&&e.text!==i[n].text){var c=i[n],u=t.getTextWidthAndHeight(Ho(Ho({},c),e)),f=Do(u,2),p=f[0],d=f[1];s.selectedShape?(e.width=s.selectedShape.width=p,e.height=s.selectedShape.height=d,e.text=s.selectedShape.text=e.text||c.text):(e.width=p,e.height=d,e.text=e.text||c.text)}l[n]=Ho(Ho({},l[n]),e),t.updateState(Ho(Ho({shapes:l},s),r),(function(){t.redrawShape(n)}))}}})),Xo(Wo(t),"clearShape",(function(e,n,r,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=i.width,s=a||1,l=e-s,c=n-s,u=r+s,f=o+s;t._context.clearRect(l,c,u,f)})),Xo(Wo(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)}))})),Xo(Wo(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,s=n||0===n?n:(t.getShapeByKeyOrIndex({key:r})||{}).index;(s||0===s)&&(s===i.index&&(o.selectedShape={}),t.updateState(Ho({shapes:t.eraseAndRemoveShapeFromArray(s,a)},o)))})),Xo(Wo(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(Ho({shapes:r},n))})),Xo(Wo(t),"deleteAllShapesOrByTypeOrIndicies",(function(e){var n=e.type,r=e.all,o=void 0!==r&&r,i=e.applied,a=void 0!==i&&i,s=e.secured,l=void 0===s?[]:s;if(n||o){if(o){var c=(t.getShapeByKeyOrIndex({key:Kr})||{}).index,u=Lo(l);!c&&0!==c||u.includes(c)||u.push(c);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)}})),Xo(Wo(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,s=n.t;return i.a.createElement(Te,{id:"preview-img-box"},i.a.createElement(en,null,s["warning.too_big_resolution"]),i.a.createElement(tn,null,i.a.createElement("h4",null,s["pre_resize.title"]),i.a.createElement(Zt,null,i.a.createElement(Gt,null,i.a.createElement(Tt,null,i.a.createElement(Rt,null,s["common.width"]),i.a.createElement(At,{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(Rt,null,s["common.height"]),i.a.createElement(At,{fullSize:!0,value:parseInt(r.height,10)||"",onChange:this.changeHeight})))),i.a.createElement(Jt,null,i.a.createElement("p",null,i.a.createElement(ze,{themeColor:!0,themeBtn:!0,onClick:function(){a("keep")}},s["pre_resize.keep_original_resolution"])),i.a.createElement("p",null,i.a.createElement(ze,{themeColor:!0,success:!0,onClick:function(){a("resize")}},s["pre_resize.resize_n_continue"])))))}}])&&oi(t.prototype,n),r&&oi(t,r),a}(o.Component),pi=fi;"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(fi,"default","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/components/PreResize/PreResize.js");function di(e){return(di="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 hi(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&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(s),t.state={isBlockRatio:!1,opacity:r||.7,handleOpacity:"boolean"!=typeof u||u,position:m,url:s||p&&p.length>1?p[0]&&p[0].url:"",urls:p||[],activePositions:h,isWatermarkList:p&&p.length>1,applyByDefault:l||!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:"UNSAFE_componentWillReceiveProps",value:function(e){e.watermark.position!==this.state.position&&this.onPositionChange(this.state.position),e.watermark.applyByDefault!==this.props.watermark.applyByDefault&&(this.getWatermarkLayer()?this.updateWatermarkProperty({applyByDefault:!1},{hidden:!0,resizingBox:!1},{applyByDefault:!1}):this.setState({applyByDefault:e.watermark.applyByDefault}),e.watermark.applyByDefault&&(this.getWatermarkLayer()?this.updateWatermarkProperty({applyByDefault:!0},{hidden:!1,resizingBox:!0},{applyByDefault:!0}):this.initWatermarkImage(e.watermark.url)))}},{key:"render",value:function(){var e=this,t=this.state,n=t.isWatermarkList,r=t.url,o=t.urls,a=t.opacity,s=t.handleOpacity,l=t.position,c=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,y=this.props.config,b="upload"===f,v="gallery"===f,_="url"===f,w="text"===f,x=this.props.t;return i.a.createElement($n,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:y.processWithCloudimage?"not-allowed":"auto"}},x["common.upload"],i.a.createElement("input",{type:"radio",value:"upload",checked:"upload"===f,disabled:y.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(Qn,null,v&&i.a.createElement(i.a.Fragment,null,i.a.createElement("label",{htmlFor:"url"},"Watermark Gallery"),i.a.createElement(Cs,{width:"100%",list:o,valueProp:"url",id:"gallery",value:r,style:{width:"calc(100% - 120px)"},onChange:function(t){console.log("chosen",t),e.changeURL({target:{value:t}})}})),_&&i.a.createElement(i.a.Fragment,null,i.a.createElement("label",{htmlFor:"url"},"Watermark URL"),i.a.createElement(At,{id:"url",value:r,style:{width:"calc(100% - 120px)"},onChange:this.changeURL})),b&&i.a.createElement(i.a.Fragment,null,i.a.createElement("label",{htmlFor:"image-upload"},"Watermark Image"),i.a.createElement(jt,{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(At,{id:"text",value:p,style:{width:"calc(65% - 135px)"},name:"text",onChange:this.changeTextProperty}),i.a.createElement(Cs,{list:y.processWithCloudimage?Gr: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(At,{value:m,type:"number",name:"textSize",style:{width:60,marginLeft:8},onChange:this.changeTextProperty}),i.a.createElement(At,{value:d,type:"color",style:{width:30,marginLeft:8,padding:0,background:"transparent",boxShadow:"none"},name:"color",onChange:this.changeTextProperty}))),i.a.createElement(Zn,{switcherPosition:s?"right":"left"},s&&i.a.createElement(Gn,null,i.a.createElement("label",{htmlFor:"opacity"},"Opacity"),i.a.createElement(Da,{label:x["common.opacity"],min:0,max:1,step:.05,range:a,updateRange:this.changeOpacity})))),i.a.createElement(er,null,Xr.map((function(t,n){return i.a.createElement(nr,{key:t,value:t,active:t===l,clickable:c[n],onClick:function(){c[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)}})}))))}}])&&As(t.prototype,n),r&&As(t,r),a}(o.Component),Hs=zs;"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(zs,"default","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/components/Toolbar/Watermark.js");function Us(e){return(Us="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 Bs(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 Fs(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})),bc.register("difference",(function(e,t){return{r:e.r-t.r,g:e.g-t.g,b:e.b-t.b}})),bc.register("addition",(function(e,t){return{r:t.r+e.r,g:t.g+e.g,b:t.b+e.b}})),bc.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}})),bc.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})),bc.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}})),bc.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(45);Caman.Plugin.register("crop",(function(e,t,n,r){var o;return null==n&&(n=0),null==r&&(r=0),o=document.createElement("canvas"),hc.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"),hc.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);fc.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 xc,Ec,Cc;n(46),n(47),n(48),n(49),n(50),n(51),n(52);xc=[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],Ec=[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],Cc=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,s=this.dimensions.width,l=this.dimensions.height,c=this.pixelData,u=e.data,f=s*l,p=[];for(o=0,i=0<=(a=f<<2);i?oa;i?o++:o--)p[o]=c[o];var d=0,h=r;for(r-=1;h-- >=0;){var m,g,y,b,v,_,w,x,E,C,O,k,S,T,R,A,j,D,P,L,M,I,z,H=t+.5|0;if(0!==H){H>256&&(H=256);var U=H+H+1,B=s-1,F=l-1,N=H+1,W=N*(N+1)/2,Y=new Cc,X=void 0,V=Y;for(o=1,m=1<=(g=U);m?og;m?o++:o--)V=V.next=new Cc,o===N&&(X=V);V.next=Y;var q=null,K=null,$=P=0,Q=xc[H],Z=Ec[H];for(D=0,L=0<=(M=l);L?DM;L?D++:D--){var G,J,ee,te,ne,re;for(S=_=y=R=x=v=0,T=N*(k=p[P]),w=N*(O=p[P+1]),b=N*(C=p[P+2]),R+=W*k,x+=W*O,v+=W*C,V=Y,o=0,G=0<=(J=N);G?oJ;G?o++:o--)V.r=k,V.g=O,V.b=C,V=V.next;for(o=1,ee=1<=(te=N);ee?ote;ee?o++:o--)E=P+((Bre;ne?j++:j--)p[P]=R*Q>>Z,p[P+1]=x*Q>>Z,p[P+2]=v*Q>>Z,R-=T,x-=w,v-=b,T-=q.r,w-=q.g,b-=q.b,E=$+((E=j+N)z;I?j++:j--){var oe,ie,ae,se,le,ce;for(_=y=S=x=v=R=0,T=N*(k=p[P=j<<2]),w=N*(O=p[P+1]),b=N*(C=p[P+2]),R+=W*k,x+=W*O,v+=W*C,V=Y,o=0,oe=0<=(ie=N);oe?oie;oe?o++:o--)V.r=k,V.g=O,V.b=C,V=V.next;var ue=s;for(o=1,ae=1<=(se=N);ae?ose;ae?o++:o--)P=ue+j<<2,R+=(V.r=k=p[P])*(A=N-o),x+=(V.g=O=p[P+1])*A,v+=(V.b=C=p[P+2])*A,S+=k,_+=O,y+=C,V=V.next,oce;le?D++:D--)p[E=P<<2]=R*Q>>Z,p[E+1]=x*Q>>Z,p[E+2]=v*Q>>Z,R-=T,x-=w,v-=b,T-=q.r,w-=q.g,b-=q.b,E=j+((E=D+N)-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;c[fe]=c[fe]*me+p[fe]*he>>8,c[fe+1]=c[fe+1]*me+p[fe+1]*he>>8,c[fe+2]=c[fe+2]*me+p[fe+2]*he>>8}else de===d+1&&(c[fe]=p[fe],c[fe+1]=p[fe+1],c[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=hc.b.extend(t,e)).angle*=Math.PI/180;var n=function(e,t,n,r,o,i,a){var s=document.createElement("canvas");s.width=e,s.height=t;var l=n+Math.cos(o)*i*.5,c=r+Math.sin(o)*i*.5,u=n-Math.cos(o)*i*.5,f=r-Math.sin(o)*i*.5,p=s.getContext("2d"),d=p.createLinearGradient(l,c,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=hc.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:c.indexOf("?")>-1?c.slice(0,c.indexOf("?")):c};if("manual"===o&&(i=u.height){var r=u.width/u.height,s={ratio:r,width:i,height:i/r};t.setState(Tc(Tc({preCanvasDimensions:Tc({},s),canvasDimensions:Tc({},s)},n),{},{activeBody:"preview",isPreResize:!0}))}else{var l=u.height/u.width,p={ratio:l,width:a/l,height:a};t.setState(Tc(Tc({preCanvasDimensions:Tc({},p),canvasDimensions:Tc({},p)},n),{},{activeBody:"preview",isPreResize:!0}))}else{var d,h=t.props.config.tools;1===h.length&&(d=h[0]),t.setState(Tc(Tc({},n),{},{activeBody:"preview",isPreResize:!1}),(function(){t.setState({activeTab:d})}))}}})),Mc(Pc(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:uc()(new Uint8Array(n.response)).mime})},n.send()}})),Mc(Pc(t),"updateState",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};t._isMounted&&t.setState(e,n)})),Mc(Pc(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(Tc({isHideCanvas:!1,isShowSpinner:!1},Ic))}))})),Mc(Pc(t),"onAdjust",(function(e,n){(0,t.state.onAdjust)(e,n)})),Mc(Pc(t),"onRotate",(function(e,n,r,o){(0,t.state.onRotate)(e,n,r,o)})),Mc(Pc(t),"onFlip",(function(e){(0,t.state.flip)(e)})),Mc(Pc(t),"onSave",(function(){var e=t.state.saveImage;t.setState({isShowSpinner:!0}),e()})),Mc(Pc(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()})):(t.props.onComplete({status:"success",canvas:o}),t.props.onClose())})),Mc(Pc(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})}))}))})),Mc(Pc(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})}))}))})),Mc(Pc(t),"handleSave",(function(){var e=t.state,n=e.processWithFilerobot,r=e.processWithCloudService;n||r?t.onSave():t.onDownloadImage()})),Mc(Pc(t),"apply",(function(e){var n=t.state,r=n.activeTab;(0,n.applyChanges)(r,e),t.setState({activeTab:null})})),Mc(Pc(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,s=e.operationObject,l=void 0===s?{}:s,c=t.state.applyOperations;a?t.setState({activeTab:null,isHideCanvas:!0,isShowSpinner:!0}):t.setState({isHideCanvas:!0,isShowSpinner:!0}),c(n,(function(){t.setState({isHideCanvas:!1,isShowSpinner:!1},o)}),l)})),Mc(Pc(t),"resetOperations",(function(){var e=t.state.resetAll;t.setState({activeTab:null,isHideCanvas:!0,isShowSpinner:!0}),e((function(){t.setState(Tc({isHideCanvas:!1,isShowSpinner:!1},Ic))}))})),Mc(Pc(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,s=n.processWithCloudService,l=n.uploadWithCloudimageLink,c=n.reduceBeforeEdit,u=n.cropBeforeEdit,f=n.watermark,p=n.imageSealing;return t.state=Tc(Tc({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:s,uploadCloudimageImage:l,reduceBeforeEdit:c,cropBeforeEdit:u,roundCrop:!1,imageSealing:Tc({enabled:!1,salt:"",char_count:10,include_params:null},p),operationsOriginal:[],operationsZoomed:[],operations:[],canvasZoomed:null,canvasOriginal:null,isPreResize:!1,initialZoom:1},Ic),{},{watermark:f||qr,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,s=e.currentOperation,l=e.isHideCanvas,c=e.cropDetails,u=e.original,f=e.canvasDimensions,p=e.processWithCloudimage,d=e.processWithFilerobot,h=e.processWithCloudService,m=e.uploadCloudimageImage,g=e.imageMime,y=e.lastOperation,b=e.operationList,v=e.initialZoom,_=e.canvasZoomed,w=e.canvasOriginal,x=e.reduceBeforeEdit,E=e.cropBeforeEdit,C=e.img,O=e.imageName,k=e.activeBody,S=e.isPreResize,T=e.preCanvasDimensions,R=e.logoImage,A=e.imageSealing,j=e.effect,D=e.filter,P=e.crop,L=e.roundCrop,M=e.resize,I=e.rotate,z=e.correctionDegree,H=e.flipX,U=e.flipY,B=e.adjust,F=e.watermark,N=e.focusPoint,W=e.shapes,X=e.shapeOperations,V=e.selectedShape,q=e.availableShapes,K=this.props,$=K.src,Q=K.config,Z=K.onClose,G=K.onComplete,J=K.closeOnLoad,ee=void 0===J||J,te=K.t,ne=void 0===te?{}:te,re=K.theme,oe={effect:j,filter:D,crop:P,resize:M,rotate:I,flipX:H,flipY:U,adjust:B,correctionDegree:z},ie=Tc(Tc({t:ne,theme:re,cropDetails:c,original:u,activeTab:n,src:$,onClose:Z,config:Q,canvasDimensions:f,processWithCloudimage:p,processWithFilerobot:d,processWithCloudService:h,operations:r,operationsOriginal:o,operationsZoomed:a,initialZoom:v,isShowSpinner:t,img:C,logoImage:R,imageName:O,activeBody:k,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:F,focusPoint:N,shapes:W,shapeOperations:X,selectedShape:V,availableShapes:q}),ae=Tc(Tc({t:ne,theme:re,cropDetails:c,original:u,activeTab:n,isShowSpinner:t,operations:r,operationsOriginal:o,operationsZoomed:a,initialZoom:v,currentOperation:s,isHideCanvas:l,src:$,imageMime:g,onClose:Z,onComplete:G,canvasDimensions:f,closeOnLoad:ee,config:Q,processWithCloudimage:p,processWithFilerobot:d,processWithCloudService:h,imageSealing:A,uploadCloudimageImage:m,lastOperation:y,operationList:b,canvasZoomed:_,canvasOriginal:w,reduceBeforeEdit:x,cropBeforeEdit:E,img:C,logoImage:R,imageName:O,isPreResize:S,preCanvasDimensions:T,updateState:this.updateState,handleSave:this.handleSave,onPreResize:this.onPreResize,redoOperation:this.redoOperation,roundCrop:L},oe),{},{watermark:F,focusPoint:N,shapes:W,shapeOperations:X,selectedShape:V}),se={logoImage:R,t:ne,theme:re,activeBody:k,operations:r,operationsOriginal:o,operationsZoomed:a,initialZoom:v,currentOperation:s,processWithCloudimage:p,processWithCloudService:h,updateState:this.updateState,redoOperation:this.redoOperation,resetOperations:this.resetOperations,config:Q,watermark:F};return i.a.createElement(Y,{roundCrop:L},i.a.createElement(lc,ie),i.a.createElement(Se,null,"preview"===k&&i.a.createElement(ei,ae),"preResize"===k&&i.a.createElement(pi,ae),i.a.createElement(In,{overlay:!0,show:t,label:ne["spinner.label"]})),i.a.createElement(yr,se))}}])&&Rc(t.prototype,n),r&&Rc(t,r),a}(o.Component),Hc=zc;"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Ic,"INITIAL_PARAMS","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/ImageEditor.js"),__REACT_HOT_LOADER__.register(zc,"default","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/ImageEditor.js"));function Uc(){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 Uc=function(){return e},e}var Bc=a.b.span.attrs((function(){return{role:"button"}}))(Uc(),(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(Bc,"CloseBtn","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/components/CloseBtn.js");function Fc(e){return(Fc="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 Nc(){return(Nc=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 Yc(e,t){for(var n=0;n div {\n padding: 40px !important;\n }\n \n * {\n color: black !important;\n }\n ":""}));function ru(){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 ou=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&&Xc(e,t)}(l,e);var t,n,a,s=Vc(l);function l(){var e,t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l);for(var o=arguments.length,i=new Array(o),a=0;a-1})):n})})),Su(Ou(t),"open",(function(e){var n=t.props.onOpen;t._isMounted&&t.setState({isVisible:!0,src:e},(function(){n&&n()}))})),Su(Ou(t),"close",(function(){var e=t.props.onClose;t._isMounted&&t.setState({isVisible:!1},(function(){e&&e()}))})),c.translations=c.translations||{},c.language=c.translations[c.language]||pu[c.language]?c.language:"en",c.theme=c.theme||{},c.theme.colors=c.theme.colors||{},c.theme.fonts=c.theme.fonts||{},c.colorScheme=c.colorScheme||"dark",c.platform=c.platform||"filerobot",t.state={isVisible:r,src:a,config:t.processConfig(c),t:_u(_u({},pu[c.language]),c.translations[c.language]),colorScheme:c.colorScheme||"dark",theme:{colors:_u(_u({},("light"===c.colorScheme?gu:hu).colors),c.theme.colors),fonts:_u(_u({},("light"===c.colorScheme?gu:hu).fonts),c.theme.fonts)}},t}return t=s,(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,s=e.theme,l=this.props,c=l.onComplete,u=void 0===c?function(){}:c,f=l.onBeforeComplete,p=l.closeOnLoad,d=l.showInModal,h=void 0===d||d;if(!n||!t||yu)return null;if(n instanceof Blob&&r.processWithCloudimage)return null;var m=i.a.createElement(W,null,i.a.createElement(Hc,{src:n,config:r,onComplete:u,onBeforeComplete:f,onClose:this.close,closeOnLoad:p,t:o}));return(i.a.createElement(a.a,{theme:_u({},s)},h?i.a.createElement(ou,{noBorder:!0,fullScreen:"lg",isHideCloseBtn:!0,style:{borderRadius:5},onClose:this.close},m):m))}}])&&wu(t.prototype,n),r&&wu(t,r),s}(o.Component),Ru=Tu,Au=Ru;"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Tu,"ImageEditorWrapper","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/ImageEditorWrapper.js"),__REACT_HOT_LOADER__.register(Ru,"default","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/react/ImageEditorWrapper.js"));function ju(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];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var s=n.elementId||"filerobot-image-editor",l=document.getElementById(s),c=function(e){console.log(e)};c=o&&"function"==typeof o?o:(o=o||{}).onComplete||c,l||((l=document.createElement("div")).id=s,document.body.appendChild(l));var u;this.component=(u=Au,Object(r.render)(i.a.createElement(u,{show:a,config:n,onComplete:c,onBeforeComplete:o.onBeforeComplete,onOpen:o.onOpen,onClose:o.onClose}),l)),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)}}])&&ju(t.prototype,n),o&&ju(t,o),e}();window.FilerobotImageEditor=Du;"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(Du,"FilerobotImageEditor","/Users/dmitry/scaleflex/plugins/filerobot-image-editor/projects/js/index.js")}]);
\ No newline at end of file
diff --git a/build/3/filerobot-image-editor.min.js b/build/3/filerobot-image-editor.min.js
index eac272bc..34aec8e1 100644
--- a/build/3/filerobot-image-editor.min.js
+++ b/build/3/filerobot-image-editor.min.js
@@ -1,12 +1,12 @@
/*!
*
- * filerobot-image-editor v3.10.0
+ * filerobot-image-editor v3.10.1
* https://github.com/scaleflex/filerobot-image-editor
*
* Copyright (c) 2019 scaleflex
* Released under the MIT license
*
- * Date: 2020-08-12T12:06:47.097Z
+ * Date: 2020-08-12T15:28:02.481Z
*
*/!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/",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 qe}));var r=n(6),o=n.n(r),i=n(13),a=n.n(i),s=n(0),l=n.n(s),c=n(14),u=n(7),f=n(8),p=(n(27),n(20)),d=n(21),h=function(e,t){for(var n=[e[0]],r=0,o=t.length;r=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},w=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},x=function(e){return"object"===(void 0===e?"undefined":m(e))&&e.constructor===Object},E=Object.freeze([]),C=Object.freeze({});function O(e){return"function"==typeof e}function k(e){return e.displayName||e.name||"Component"}function S(e){return e&&"string"==typeof e.styledComponentId}var T=void 0!==e&&(e.env.REACT_APP_SC_ATTR||e.env.SC_ATTR)||"data-styled",R="undefined"!=typeof window&&"HTMLElement"in window,A="boolean"==typeof SC_DISABLE_SPEEDY&&SC_DISABLE_SPEEDY||void 0!==e&&(e.env.REACT_APP_SC_DISABLE_SPEEDY||e.env.SC_DISABLE_SPEEDY)||!1;var j=function(e){function t(n){g(this,t);for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i0?" Additional arguments: "+o.join(", "):"")));return w(a)}return v(t,e),t}(Error),D=/^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm,P=function(e){var t=""+(e||""),n=[];return t.replace(D,(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)}}))},L=/^\s*\/\/.*$/gm,M=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=[],H=function(e){if(-2===e){var t=z;return z=[],t}},U=a()((function(e){z.push(e)})),B=void 0,F=void 0,N=void 0,W=function(e,t,n){return t>0&&-1!==n.slice(0,t).indexOf(F)&&n.slice(t-F.length,t)!==F?"."+B:e};I.use([function(e,t,n){2===e&&n.length&&n[0].lastIndexOf(F)>0&&(n[0]=n[0].replace(N,W))},U,H]),M.use([U,H]);var Y=function(e){return M("",e)};function X(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&",o=e.join("").replace(L,""),i=t&&n?n+" "+t+" { "+o+" }":o;return B=r,F=t,N=new RegExp("\\"+F+"\\b","g"),I(n||!t?"":t,i)}var V=function(){return n.nc},q=function(e,t,n){n&&((e[t]||(e[t]=Object.create(null)))[n]=!0)},K=function(e,t){e[t]=Object.create(null)},$=function(e){return function(t,n){return void 0!==e[t]&&e[t][n]}},Q=function(e){var t="";for(var n in e)t+=Object.keys(e[n]).join(" ")+" ";return t.trim()},Z=function(e){if(e.sheet)return e.sheet;for(var t=e.ownerDocument.styleSheets.length,n=0;n"+e()+""}},ne=function(e,t){return function(){var n,r=((n={})[T]=Q(t),n["data-styled-version"]="4.4.0",n),o=V();return o&&(r.nonce=o),l.a.createElement("style",b({},r,{dangerouslySetInnerHTML:{__html:e()}}))}},re=function(e){return function(){return Object.keys(e)}},oe=function(e,t){return e.createTextNode(J(t))},ie=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+=J(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:re(o),hasNameForId:$(r),insertMarker:i,insertRules:function(e,t,n){i(e)[0]+=t.join(" "),q(r,e,n)},removeRules:function(e){var t=o[e];void 0!==t&&(t[0]="",K(r,e))},sealed:!1,styleTag:null,toElement:ne(a,r),toHTML:te(a,r)}},ae=function(e,t,n,r,o){if(R&&!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(T,""),o.setAttribute("data-styled-version","4.4.0");var i=V();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 A?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]=oe(e.ownerDocument,t),e.appendChild(r[t]),n[t]=Object.create(null),r[t])},s=function(){var e="";for(var t in r)e+=r[t].data;return e};return{clone:function(){throw new j(5)},css:s,getIds:re(r),hasNameForId:$(n),insertMarker:a,insertRules:function(e,r,s){for(var l=a(e),c=[],u=r.length,f=0;f0&&(i=!0,t().insertRules(e+"-import",c))},removeRules:function(a){var s=r[a];if(void 0!==s){var l=oe(e.ownerDocument,a);e.replaceChild(l,s),r[a]=l,K(n,a),o&&i&&t().removeRules(a+"-import")}},sealed:!1,styleTag:e,toElement:ne(s,n),toHTML:te(s,n)}}(i,o):function(e,t){var n=Object.create(null),r=Object.create(null),o=[],i=void 0!==t,a=!1,s=function(e){var t=r[e];return void 0!==t?t:(r[e]=o.length,o.push(0),K(n,e),r[e])},l=function(){var t=Z(e).cssRules,n="";for(var i in r){n+=J(i);for(var a=r[i],s=ee(o,a),l=s-o[a];l0&&(a=!0,t().insertRules(r+"-import",h)),o[u]+=d,q(n,r,c)},removeRules:function(s){var l=r[s];if(void 0!==l&&!1!==e.isConnected){var c=o[l];!function(e,t,n){for(var r=t-n,o=t;o>r;o-=1)e.deleteRule(o)}(Z(e),ee(o,l)-1,c),o[l]=0,K(n,s),i&&a&&t().removeRules(s+"-import")}},sealed:!1,styleTag:e,toElement:ne(l,n),toHTML:te(l,n)}}(i,o)}return ie()},se=/\s+/,le=void 0;le=R?A?40:1e3:-1;var ce=0,ue=void 0,fe=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R?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=ae(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(!R||this.forceServer)return this;var e=[],t=[],n=!1,r=document.querySelectorAll("style["+T+'][data-styled-version="4.4.0"]'),o=r.length;if(!o)return this;for(var i=0;i0&&void 0!==arguments[0]&&arguments[0];ue=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=52,xe=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ee(e){var t="",n=void 0;for(n=e;n>we;n=Math.floor(n/we))t=xe(n%we)+t;return xe(n%we)+t}function Ce(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},Re=/[[\].#*$><+~=|^:(),"'`-]+/g,Ae=/(^-|-$)/g;function je(e){return e.replace(Re,"-").replace(Ae,"")}function De(e){return"string"==typeof e&&!0}var Pe={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},Le={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Me=((Oe={})[u.ForwardRef]={$$typeof:!0,render:!0},Oe),Ie=Object.defineProperty,ze=Object.getOwnPropertyNames,He=Object.getOwnPropertySymbols,Ue=void 0===He?function(){return[]}:He,Be=Object.getOwnPropertyDescriptor,Fe=Object.getPrototypeOf,Ne=Object.prototype,We=Array.prototype;function Ye(e,t,n){if("string"!=typeof t){var r=Fe(t);r&&r!==Ne&&Ye(e,r,n);for(var o=We.concat(ze(t),Ue(t)),i=Me[e.$$typeof]||Pe,a=Me[t.$$typeof]||Pe,s=o.length,l=void 0,c=void 0;s--;)if(c=o[s],!(Le[c]||n&&n[c]||a&&a[c]||i&&i[c])&&(l=Be(t,c)))try{Ie(e,c,l)}catch(e){}return e}return e}var Xe=Object(s.createContext)(),Ve=Xe.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.bind(r)),r.renderInner=r.renderInner.bind(r),r}return v(t,e),t.prototype.render=function(){return this.props.children?l.a.createElement(Xe.Consumer,null,this.renderInner):null},t.prototype.renderInner=function(e){var t=this.getContext(this.props.theme,e);return l.a.createElement(Xe.Provider,{value:t},this.props.children)},t.prototype.getTheme=function(e,t){if(O(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}(s.Component),Ke=(function(){function e(){g(this,e),this.masterSheet=fe.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 l.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(s.createContext)()),$e=Ke.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 v(t,e),t.prototype.getContext=function(e,t){if(e)return e;if(t)return new fe(t);throw new j(4)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.sheet,r=e.target;return l.a.createElement(Ke.Provider,{value:this.getContext(n,r)},t)},t}(s.Component),Ze={};var Ge=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 v(t,e),t.prototype.render=function(){return l.a.createElement($e,null,this.renderOuter)},t.prototype.renderOuter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fe.master;return this.styleSheet=e,this.props.forwardedComponent.componentStyle.isStatic?this.renderInner():l.a.createElement(Ve,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,l=(t.usesTheme,void 0),c=void 0;n.isStatic?l=this.generateAndInjectStyles(C,this.props):(c=Te(this.props,e,r),l=this.generateAndInjectStyles(c||C,this.props));var u=this.props.as||this.attrs.as||a,f=De(u),d={},h=b({},this.props,this.attrs),m=void 0;for(m in h)"forwardedComponent"!==m&&"as"!==m&&("forwardedRef"===m?d.ref=h[m]:"forwardedAs"===m?d.as=h[m]:f&&!Object(p.a)(m)||(d[m]=h[m]));return this.props.style&&this.attrs.style&&(d.style=b({},this.attrs.style,this.props.style)),d.className=Array.prototype.concat(o,i,l!==i?l:null,this.props.className,this.attrs.className).filter(Boolean).join(" "),Object(s.createElement)(u,d)},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,s=void 0;for(s in O(n)&&(n=n(o),i=!0),n)a=n[s],i||!O(a)||(t=a)&&t.prototype&&t.prototype.isReactComponent||S(a)||(a=a(o)),r.attrs[s]=a,o[s]=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}(s.Component);function Je(e,t,n){var r=S(e),o=!De(e),i=t.displayName,a=void 0===i?function(e){return De(e)?"styled."+e:"Styled("+k(e)+")"}(e):i,s=t.componentId,c=void 0===s?function(e,t,n){var r="string"!=typeof t?"sc":je(t),o=(Ze[r]||0)+1;Ze[r]=o;var i=r+"-"+e.generateName(r+o);return n?n+"-"+i:i}(Se,t.displayName,t.parentComponentId):s,u=t.ParentComponent,f=void 0===u?Ge:u,p=t.attrs,h=void 0===p?E:p,m=t.displayName&&t.componentId?je(t.displayName)+"-"+t.componentId:t.componentId||c,g=r&&e.attrs?Array.prototype.concat(e.attrs,h).filter(Boolean):h,y=new Se(r?e.componentStyle.rules.concat(n):n,g,m),v=void 0,w=function(e,t){return l.a.createElement(f,b({},e,{forwardedComponent:v,forwardedRef:t}))};return w.displayName=a,(v=l.a.forwardRef(w)).displayName=a,v.attrs=g,v.componentStyle=y,v.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):E,v.styledComponentId=m,v.target=r?e.target:e,v.withComponent=function(e){var r=t.componentId,o=_(t,["componentId"]),i=r&&r+"-"+(De(e)?e:je(k(e)));return Je(e,b({},o,{attrs:g,componentId:i,ParentComponent:f}),n)},Object.defineProperty(v,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Object(d.a)(e.defaultProps,t):t}}),v.toString=function(){return"."+v.styledComponentId},o&&Ye(v,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,styledComponentId:!0,target:!0,withComponent:!0}),v}var et=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,ve.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}(Je,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){et[e]=et(e)}));!function(){function e(t,n){g(this,e),this.rules=t,this.componentId=n,this.isStatic=Ce(t,E),fe.master.hasId(n)||fe.master.deferredInject(n,[])}e.prototype.createStyles=function(e,t){var n=X(be(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)}}();R&&(window.scCGSHMRCache={});t.b=et}).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,v=/(\{[^{]+?);(?=\})/g,_=/\s{2,}/g,w=/([^\(])(:+) */g,x=/[svh]\w+-[tblr]{2}/,E=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,O=/-self|flex-/g,k=/[^]*?(:[rp][el]a[\w-]+)[^]*/,S=/stretch|:\s*\w+\-(?:conte|avail)/,T=/([^-])(image-set\()/,R="-webkit-",A="-moz-",j="-ms-",D=59,P=125,L=123,M=40,I=41,z=91,H=93,U=10,B=13,F=9,N=64,W=32,Y=38,X=45,V=95,q=42,K=44,$=58,Q=39,Z=34,G=47,J=62,ee=43,te=126,ne=0,re=12,oe=11,ie=107,ae=109,se=115,le=112,ce=111,ue=105,fe=99,pe=100,de=112,he=1,me=1,ge=0,ye=1,be=1,ve=1,_e=0,we=0,xe=0,Ee=[],Ce=[],Oe=0,ke=null,Se=-2,Te=-1,Re=0,Ae=1,je=2,De=3,Pe=0,Le=1,Me="",Ie="",ze="";function He(e,t,o,i,a){for(var s,l,u=0,f=0,p=0,d=0,y=0,b=0,v=0,_=0,x=0,C=0,O=0,k=0,S=0,T=0,V=0,_e=0,Ce=0,ke=0,Se=0,Te=o.length,Be=Te-1,Ve="",qe="",Ke="",$e="",Qe="",Ze="";V0&&(qe=qe.replace(r,"")),qe.trim().length>0)){switch(v){case W:case F:case D:case B:case U:break;default:qe+=o.charAt(V)}v=D}if(1===Ce)switch(v){case L:case P:case D:case Z:case Q:case M:case I:case K:Ce=0;case F:case B:case U:case W:break;default:for(Ce=0,Se=V,y=v,V--,v=D;Se0&&(++V,v=y);case L:Se=Te}}switch(v){case L:for(y=(qe=qe.trim()).charCodeAt(0),O=1,Se=++V;V0&&(qe=qe.replace(r,"")),b=qe.charCodeAt(1)){case pe:case ae:case se:case X:s=t;break;default:s=Ee}if(Se=(Ke=He(t,s,Ke,b,a+1)).length,xe>0&&0===Se&&(Se=qe.length),Oe>0&&(s=Ue(Ee,qe,ke),l=Ye(De,Ke,s,t,me,he,Se,b,a,i),qe=s.join(""),void 0!==l&&0===(Se=(Ke=l.trim()).length)&&(b=0,Ke="")),Se>0)switch(b){case se:qe=qe.replace(E,We);case pe:case ae:case X:Ke=qe+"{"+Ke+"}";break;case ie:Ke=(qe=qe.replace(h,"$1 $2"+(Le>0?Me:"")))+"{"+Ke+"}",Ke=1===be||2===be&&Ne("@"+Ke,3)?"@"+R+Ke+"@"+Ke:"@"+Ke;break;default:Ke=qe+Ke,i===de&&($e+=Ke,Ke="")}else Ke="";break;default:Ke=He(t,Ue(t,qe,ke),Ke,i,a+1)}Qe+=Ke,k=0,Ce=0,T=0,_e=0,ke=0,S=0,qe="",Ke="",v=o.charCodeAt(++V);break;case P:case D:if((Se=(qe=(_e>0?qe.replace(r,""):qe).trim()).length)>1)switch(0===T&&((y=qe.charCodeAt(0))===X||y>96&&y<123)&&(Se=(qe=qe.replace(" ",":")).length),Oe>0&&void 0!==(l=Ye(Ae,qe,t,e,me,he,$e.length,i,a,i))&&0===(Se=(qe=l.trim()).length)&&(qe="\0\0"),y=qe.charCodeAt(0),b=qe.charCodeAt(1),y){case ne:break;case N:if(b===ue||b===fe){Ze+=qe+o.charAt(V);break}default:if(qe.charCodeAt(Se-1)===$)break;$e+=Fe(qe,y,b,qe.charCodeAt(2))}k=0,Ce=0,T=0,_e=0,ke=0,qe="",v=o.charCodeAt(++V)}}switch(v){case B:case U:if(f+d+p+u+we===0)switch(C){case I:case Q:case Z:case N:case te:case J:case q:case ee:case G:case X:case $:case K:case D:case L:case P:break;default:T>0&&(Ce=1)}f===G?f=0:ye+k===0&&i!==ie&&qe.length>0&&(_e=1,qe+="\0"),Oe*Pe>0&&Ye(Re,qe,t,e,me,he,$e.length,i,a,i),he=1,me++;break;case D:case P:if(f+d+p+u===0){he++;break}default:switch(he++,Ve=o.charAt(V),v){case F:case W:if(d+u+f===0)switch(_){case K:case $:case F:case W:Ve="";break;default:v!==W&&(Ve=" ")}break;case ne:Ve="\\0";break;case re:Ve="\\f";break;case oe:Ve="\\v";break;case Y:d+f+u===0&&ye>0&&(ke=1,_e=1,Ve="\f"+Ve);break;case 108:if(d+f+u+ge===0&&T>0)switch(V-T){case 2:_===le&&o.charCodeAt(V-3)===$&&(ge=_);case 8:x===ce&&(ge=x)}break;case $:d+f+u===0&&(T=V);break;case K:f+p+d+u===0&&(_e=1,Ve+="\r");break;case Z:case Q:0===f&&(d=d===v?0:0===d?v:d);break;case z:d+f+p===0&&u++;break;case H:d+f+p===0&&u--;break;case I:d+f+u===0&&p--;break;case M:if(d+f+u===0){if(0===k)switch(2*_+3*x){case 533:break;default:O=0,k=1}p++}break;case N:f+p+d+u+T+S===0&&(S=1);break;case q:case G:if(d+u+p>0)break;switch(f){case 0:switch(2*v+3*o.charCodeAt(V+1)){case 235:f=G;break;case 220:Se=V,f=q}break;case q:v===G&&_===q&&Se+2!==V&&(33===o.charCodeAt(Se+2)&&($e+=o.substring(Se,V+1)),Ve="",f=0)}}if(0===f){if(ye+d+u+S===0&&i!==ie&&v!==D)switch(v){case K:case te:case J:case ee:case I:case M:if(0===k){switch(_){case F:case W:case U:case B:Ve+="\0";break;default:Ve="\0"+Ve+(v===K?"":"\0")}_e=1}else switch(v){case M:T+7===V&&108===_&&(T=0),k=++O;break;case I:0==(k=--O)&&(_e=1,Ve+="\0")}break;case F:case W:switch(_){case ne:case L:case P:case D:case K:case re:case F:case W:case U:case B:break;default:0===k&&(_e=1,Ve+="\0")}}qe+=Ve,v!==W&&v!==F&&(C=v)}}x=_,_=v,V++}if(Se=$e.length,xe>0&&0===Se&&0===Qe.length&&0===t[0].length==0&&(i!==ae||1===t.length&&(ye>0?Ie:ze)===t[0])&&(Se=t.join(",").length+2),Se>0){if(s=0===ye&&i!==ie?function(e){for(var t,n,o=0,i=e.length,a=Array(i);o1)){if(p=l.charCodeAt(l.length-1),d=n.charCodeAt(0),t="",0!==u)switch(p){case q:case te:case J:case ee:case W:case M:break;default:t=" "}switch(d){case Y:n=t+Ie;case te:case J:case ee:case W:case I:case M:break;case z:n=t+n+Ie;break;case $:switch(2*n.charCodeAt(1)+3*n.charCodeAt(2)){case 530:if(ve>0){n=t+n.substring(8,f-1);break}default:(u<1||s[u-1].length<1)&&(n=t+Ie+n)}break;case K:t="";default:n=f>1&&n.indexOf(":")>0?t+n.replace(w,"$1"+Ie+"$2"):t+n+Ie}l+=n}a[o]=l.replace(r,"").trim()}return a}(t):t,Oe>0&&void 0!==(l=Ye(je,$e,s,e,me,he,Se,i,a,i))&&0===($e=l).length)return Ze+$e+Qe;if($e=s.join(",")+"{"+$e+"}",be*ge!=0){switch(2!==be||Ne($e,2)||(ge=0),ge){case ce:$e=$e.replace(g,":"+A+"$1")+$e;break;case le:$e=$e.replace(m,"::"+R+"input-$1")+$e.replace(m,"::"+A+"$1")+$e.replace(m,":"+j+"input-$1")+$e}ge=0}}return Ze+$e+Qe}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 s=0,l=0===a?"":e[0]+" ";s0&&ye>0)return o.replace(p,"$1").replace(f,"$1"+ze);break;default:return e.trim()+o.replace(f,"$1"+e.trim())}default:if(n*ye>0&&o.indexOf("\f")>0)return o.replace(f,(e.charCodeAt(0)===$?"":"$1")+e.trim())}return e+o}function Fe(e,t,n,r){var c,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)*Le){case 0:break;case X:if(110!==e.charCodeAt(10))break;default:var i=o.split((o="",s)),a=0;for(n=0,t=i.length;aN&&f<90||f>96&&f<123||f===V||f===X&&c.charCodeAt(1)!==X))switch(isNaN(parseFloat(c))+(-1!==c.indexOf("("))){case 1:switch(c){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:c+=Me}}u[n++]=c}o+=(0===a?"":",")+u.join(" ")}}return o=r+o+";",1===be||2===be&&Ne(o,1)?R+o+o:o}(f);if(0===be||2===be&&!Ne(f,1))return f;switch(p){case 1015:return 97===f.charCodeAt(10)?R+f+f:f;case 951:return 116===f.charCodeAt(3)?R+f+f:f;case 963:return 110===f.charCodeAt(5)?R+f+f:f;case 1009:if(100!==f.charCodeAt(4))break;case 969:case 942:return R+f+f;case 978:return R+f+A+f+f;case 1019:case 983:return R+f+A+f+j+f+f;case 883:return f.charCodeAt(8)===X?R+f+f:f.indexOf("image-set(",11)>0?f.replace(T,"$1"+R+"$2")+f:f;case 932:if(f.charCodeAt(4)===X)switch(f.charCodeAt(5)){case 103:return R+"box-"+f.replace("-grow","")+R+f+j+f.replace("grow","positive")+f;case 115:return R+f+j+f.replace("shrink","negative")+f;case 98:return R+f+j+f.replace("basis","preferred-size")+f}return R+f+j+f+f;case 964:return R+f+j+"flex-"+f+f;case 1023:if(99!==f.charCodeAt(8))break;return c=f.substring(f.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),R+"box-pack"+c+R+f+j+"flex-pack"+c+f;case 1005:return i.test(f)?f.replace(o,":"+R)+f.replace(o,":"+A)+f:f;case 1e3:switch(u=(c=f.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(u)){case 226:c=f.replace(x,"tb");break;case 232:c=f.replace(x,"tb-rl");break;case 220:c=f.replace(x,"lr");break;default:return f}return R+f+j+c+f;case 1017:if(-1===f.indexOf("sticky",9))return f;case 975:switch(u=(f=e).length-10,p=(c=(33===f.charCodeAt(u)?f.substring(0,u):f).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(c.charCodeAt(8)<111)break;case 115:f=f.replace(c,R+c)+";"+f;break;case 207:case 102:f=f.replace(c,R+(p>102?"inline-":"")+"box")+";"+f.replace(c,R+c)+";"+f.replace(c,j+c+"box")+";"+f}return f+";";case 938:if(f.charCodeAt(5)===X)switch(f.charCodeAt(6)){case 105:return c=f.replace("-items",""),R+f+R+"box-"+c+j+"flex-"+c+f;case 115:return R+f+j+"flex-item-"+f.replace(O,"")+f;default:return R+f+j+"flex-line-pack"+f.replace("align-content","").replace(O,"")+f}break;case 973:case 989:if(f.charCodeAt(3)!==X||122===f.charCodeAt(4))break;case 931:case 953:if(!0===S.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?Fe(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):f.replace(c,R+c)+f.replace(c,A+c.replace("fill-",""))+f;break;case 962:if(f=R+f+(102===f.charCodeAt(5)?j+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"+R+"$2")+f}return f}function Ne(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 ke(2!==t?r:r.replace(k,"$1"),o,t)}function We(e,t){var n=Fe(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(C," or ($1)").substring(4):"("+t+")"}function Ye(e,t,n,r,o,i,a,s,l,c){for(var u,f=0,p=t;f0&&(Me=o.replace(d,i===z?"":"-")),i=1,1===ye?ze=o:Ie=o;var a,s=[ze];Oe>0&&void 0!==(a=Ye(Te,n,s,s,me,he,0,0,0,0))&&"string"==typeof a&&(n=a);var l=He(Ee,s,n,0,0);return Oe>0&&void 0!==(a=Ye(Se,l,s,s,me,he,l.length,0,0,0))&&"string"!=typeof(l=a)&&(i=0),Me="",ze="",Ie="",ge=0,me=1,he=1,_e*i==0?l:l.replace(r,"").replace(y,"").replace(b,"$1").replace(v,"$1").replace(_," ")}return qe.use=function e(t){switch(t){case void 0:case null:Oe=Ce.length=0;break;default:if("function"==typeof t)Ce[Oe++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n
* @license MIT
*/
-var r=n(35),o=n(36),i=n(37);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return N(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,o);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,o){var i,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var u=-1;for(i=n;is&&(n=s-l),i=n;i>=0;i--){for(var f=!0,p=0;po&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a