!function(){var t,e={998:function(t,e,n){"use strict";n(196),e.Z="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMCIgaGVpZ2h0PSIzMCIgZmlsbD0ibm9uZSI+CiAgICA8ZyBmaWxsPSIjQkFCRkM1IiBjbGlwLXBhdGg9InVybCgjYSkiPgogICAgICAgIDxwYXRoIGQ9Im0xNS43NTUgMTEuMzM1LTIuMDgtMi4wOGEzLjc1IDMuNzUgMCAwIDAtNS4zMDQgNS4zMDJsMi42NTIgMi42NTJhMy43NSAzLjc1IDAgMCAwIDYuMDM2LTEuMDM0bC0uNzMzLS43MzRhMS4yMzUgMS4yMzUgMCAwIDAtLjI0OS0uMTkzIDIuNSAyLjUgMCAwIDEtNC4xNyAxLjA3N2wtMi42NTItMi42NTFhMi41IDIuNSAwIDEgMSAzLjUzNS0zLjUzNmwxLjM1NyAxLjM1N2E1LjAyIDUuMDIgMCAwIDEgMS42MDktLjE2aC0uMDAxWiIvPgogICAgICAgIDxwYXRoIGQ9Im0xNS4yMzMgMTIuNTgxLjIwOS4yMDljLjMyMi4zMjIuNTM4LjcxLjY0NyAxLjEyLjQyNC4xMTQuODEuMzM3IDEuMTIuNjQ4bC4yMS4yMDhhMy43NTYgMy43NTYgMCAwIDAtLjM2LTEuODI2IDMuNzUgMy43NSAwIDAgMC0xLjgyNi0uMzU5WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0xOC4wOTMgMTMuNjc0YTMuNzUgMy43NSAwIDAgMC02LjAzNyAxLjAzNGwuOTcxLjk3YTIuNSAyLjUgMCAwIDEgNC4xODMtMS4xMmwyLjY1MSAyLjY1MWEyLjUgMi41IDAgMSAxLTMuNTM1IDMuNTM2bC0xLjM1Ny0xLjM1N2E1LjAyNSA1LjAyNSAwIDAgMS0xLjYwOS4xNTlsMi4wODIgMi4wODFhMy43NSAzLjc1IDAgMCAwIDUuMzAzLTUuMzAzbC0yLjY1Mi0yLjY1MVoiLz4KICAgICAgICA8cGF0aCBkPSJNMTIuMDU2IDE3Ljk0M2MuNTcuMjcgMS4xOTguMzk0IDEuODI3LjM1OWwtLjIwOS0uMjA5YTIuNDg3IDIuNDg3IDAgMCAxLS42NDctMS4xMiAyLjQ4NyAyLjQ4NyAwIDAgMS0xLjEyLS42NDhsLS4yMS0uMjA4YTMuNzYyIDMuNzYyIDAgMCAwIC4zNiAxLjgyNloiLz4KICAgIDwvZz4KICAgIDxkZWZzPgogICAgICAgIDxjbGlwUGF0aCBpZD0iYSI+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0xNSAuODU3IDI5LjE0MiAxNSAxNSAyOS4xNDIuODU4IDE1eiIvPgogICAgICAgIDwvY2xpcFBhdGg+CiAgICA8L2RlZnM+Cjwvc3ZnPgo="},193:function(t,e,n){"use strict";var r=window.wp.element,o=n(196),i=function(){function t(t){var e=this;this._insertTag=function(t){var n;n=0===e.tags.length?e.insertionPoint?e.insertionPoint.nextSibling:e.prepend?e.container.firstChild:e.before:e.tags[e.tags.length-1].nextSibling,e.container.insertBefore(t,n),e.tags.push(t)},this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(t){t.forEach(this._insertTag)},e.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}(this));var e=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(t){if(t.sheet)return t.sheet;for(var e=0;e0?p(_,--w):0,y--,10===x&&(y=1,v--),x}function E(){return x=w2||j(x)>3?"":" "}function A(t,e){for(;--e&&E()&&!(x<48||x>102||x>57&&x<65||x>70&&x<97););return z(t,C()+(e<6&&32==R()&&32==E()))}function N(t){for(;E();)switch(x){case t:return w;case 34:case 39:34!==t&&39!==t&&N(x);break;case 40:41===t&&N(t);break;case 92:E()}return w}function D(t,e){for(;E()&&t+x!==57&&(t+x!==84||47!==R()););return"/*"+z(e,w-1)+"*"+u(47===t?t:E())}function G(t){for(;!j(R());)E();return z(t,w)}var M="-ms-",F="-moz-",B="-webkit-",H="comm",W="rule",U="decl",q="@keyframes";function Z(t,e){for(var n="",r=m(t),o=0;o0&&h(N)-v&&g(b>32?Q(N+";",r,n,v-1):Q(s(N," ","")+";",r,n,v-2),l);break;case 59:N+=";";default:if(g(P=X(N,e,n,d,m,o,c,z,j=[],L=[],v),i),123===k)if(0===m)Y(N,e,P,P,j,i,v,c,L);else switch(99===y&&110===p(N,3)?100:y){case 100:case 108:case 109:case 115:Y(t,P,P,r&&g(X(t,P,P,0,0,o,c,z,o,j=[],v),L),o,L,v,c,r?j:L);break;default:Y(N,P,P,P,[""],L,0,c,L)}}d=m=b=0,x=S=1,z=N="",v=a;break;case 58:v=1+h(N),b=w;default:if(x<1)if(123==k)--x;else if(125==k&&0==x++&&125==O())continue;switch(N+=u(k),k*x){case 38:S=m>0?1:(N+="\f",-1);break;case 44:c[d++]=(h(N)-1)*S,S=1;break;case 64:45===R()&&(N+=T(E())),y=R(),m=v=h(z=N+=G(C())),k++;break;case 45:45===w&&2==h(N)&&(x=0)}}return i}function X(t,e,n,r,o,i,u,c,f,p,h){for(var g=o-1,v=0===o?i:[""],y=m(v),b=0,w=0,x=0;b0?v[_]+" "+k:s(k,/&\f/g,v[_])))&&(f[x++]=O);return S(t,e,n,0===o?W:c,f,p,h)}function K(t,e,n){return S(t,e,n,H,u(x),d(t,2,-2),0)}function Q(t,e,n,r){return S(t,e,n,U,d(t,0,r),d(t,r+1,-1),r)}var J=function(t,e,n){for(var r=0,o=0;r=o,o=R(),38===r&&12===o&&(e[n]=1),!j(o);)E();return z(t,w)},tt=new WeakMap,et=function(t){if("rule"===t.type&&t.parent&&!(t.length<1)){for(var e=t.value,n=t.parent,r=t.column===n.column&&t.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==t.props.length||58===e.charCodeAt(0)||tt.get(n))&&!r){tt.set(t,!0);for(var o=[],i=function(t,e){return P(function(t,e){var n=-1,r=44;do{switch(j(r)){case 0:38===r&&12===R()&&(e[n]=1),t[n]+=J(w-1,e,n);break;case 2:t[n]+=T(r);break;case 4:if(44===r){t[++n]=58===R()?"&\f":"",e[n]=t[n].length;break}default:t[n]+=u(r)}}while(r=E());return t}(L(t),e))}(e,o),a=n.props,c=0,l=0;c6)switch(p(t,e+1)){case 109:if(45!==p(t,e+4))break;case 102:return s(t,/(.+:)(.+)-([^]+)/,"$1"+B+"$2-$3$1"+F+(108==p(t,e+3)?"$3":"$2-$3"))+t;case 115:return~f(t,"stretch")?rt(s(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(115!==p(t,e+1))break;case 6444:switch(p(t,h(t)-3-(~f(t,"!important")&&10))){case 107:return s(t,":",":"+B)+t;case 101:return s(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+B+(45===p(t,14)?"inline-":"")+"box$3$1"+B+"$2$3$1"+M+"$2box$3")+t}break;case 5936:switch(p(t,e+11)){case 114:return B+t+M+s(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return B+t+M+s(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return B+t+M+s(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return B+t+M+t+t}return t}var ot=[function(t,e,n,r){if(t.length>-1&&!t.return)switch(t.type){case U:t.return=rt(t.value,t.length);break;case q:return Z([k(t,{value:s(t.value,"@","@"+B)})],r);case W:if(t.length)return function(t,e){return t.map(e).join("")}(t.props,(function(e){switch(function(t,e){return(t=/(::plac\w+|:read-\w+)/.exec(t))?t[0]:t}(e)){case":read-only":case":read-write":return Z([k(t,{props:[s(e,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Z([k(t,{props:[s(e,/:(plac\w+)/,":"+B+"input-$1")]}),k(t,{props:[s(e,/:(plac\w+)/,":-moz-$1")]}),k(t,{props:[s(e,/:(plac\w+)/,M+"input-$1")]})],r)}return""}))}}],it=function(t){var e=t.key;if("css"===e){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(t){-1!==t.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(t),t.setAttribute("data-s",""))}))}var r,o,a=t.stylisPlugins||ot,u={},c=[];r=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),(function(t){for(var e=t.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)e=1540483477*(65535&(e=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24))+(59797*(e>>>16)<<16),n=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&t.charCodeAt(r+2))<<16;case 2:n^=(255&t.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+c;return{name:l,styles:o,next:wt}},St=!!o.useInsertionEffect&&o.useInsertionEffect,kt=St||function(t){return t()},Ot=(St||o.useLayoutEffect,{}.hasOwnProperty),Et=o.createContext("undefined"!=typeof HTMLElement?it({key:"css"}):null);Et.Provider;var Rt=function(t){return(0,o.forwardRef)((function(e,n){var r=(0,o.useContext)(Et);return t(e,r,n)}))},Ct=o.createContext({}),zt=function(){return o.useContext(Ct)},jt=ut((function(t){return ut((function(e){return function(t,e){return"function"==typeof e?e(t):at({},t,e)}(t,e)}))})),Lt=function(t){var e=o.useContext(Ct);return t.theme!==e&&(e=jt(e)(t.theme)),o.createElement(Ct.Provider,{value:e},t.children)},Pt="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Tt=function(t){var e=t.cache,n=t.serialized,r=t.isStringTag;return lt(e,n,r),kt((function(){return st(e,n,r)})),null},It=Rt((function(t,e,n){var r=t.css;"string"==typeof r&&void 0!==e.registered[r]&&(r=e.registered[r]);var i=t[Pt],a=[r],u="";"string"==typeof t.className?u=ct(e.registered,a,t.className):null!=t.className&&(u=t.className+" ");var c=_t(a,void 0,o.useContext(Ct));u+=e.key+"-"+c.name;var l={};for(var s in t)Ot.call(t,s)&&"css"!==s&&s!==Pt&&(l[s]=t[s]);return l.ref=n,l.className=u,o.createElement(o.Fragment,null,o.createElement(Tt,{cache:e,serialized:c,isStringTag:"string"==typeof i}),o.createElement(i,l))})),At={palette:{native:{blue:"#2271b1",blueActive:"#135e96"},primary:{main:"#F0ABFC",light:"#5EEAD4",accent:"#524CFF"},text:{default:"#3A3F45",white:"#FFFFFF",primary:"#0C0D0E",secondary:"#2271B1",tertiary:"#69727D",lightGrey:"#535961",dark:"#26292C",darkGrey:"#64666A",disabled:"#DDDDDD",toast:"#D5DADF",noticeInfo:"#1E1E1E",link:"#040080",brand:"#45f2b6"},background:{default:"#FFFFFF",lightGrey:"#F6F7F7",grey:"#D9D9D9",toast:"#2D2D2D",noticeInfo:"#F1F6FB",brand:"#040080",disabled:"#D5D8DC"},border:{default:"#E6E8EA",lightest:"#D5DADF",grey:"#D9D9D9",grey600:"#949494"},info:{notice:"#0288D1"},success:{main:"#5EEAD4"},warning:{},error:{main:"#DC2626"},badge:{background:{success:"#E9FCF2",danger:"#FDE8EB",warning:"#FFF6E6"},text:{success:"#0F6737",danger:"#B21027",warning:"#8D5E01"}}},fonts:{default:"Roboto, sans-serif"}},Nt=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Dt=pt((function(t){return Nt.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91})),Gt=function(t){return"theme"!==t},Mt=function(t){return"string"==typeof t&&t.charCodeAt(0)>96?Dt:Gt},Ft=function(t,e,n){var r;if(e){var o=e.shouldForwardProp;r=t.__emotion_forwardProp&&o?function(e){return t.__emotion_forwardProp(e)&&o(e)}:o}return"function"!=typeof r&&n&&(r=t.__emotion_forwardProp),r},Bt=function(t){var e=t.cache,n=t.serialized,r=t.isStringTag;return lt(e,n,r),kt((function(){return st(e,n,r)})),null},Ht=function t(e,n){var r,i,a=e.__emotion_real===e,u=a&&e.__emotion_base||e;void 0!==n&&(r=n.label,i=n.target);var c=Ft(e,n,a),l=c||Mt(u),s=!l("as");return function(){var f=arguments,p=a&&void 0!==e.__emotion_styles?e.__emotion_styles.slice(0):[];if(void 0!==r&&p.push("label:"+r+";"),null==f[0]||void 0===f[0].raw)p.push.apply(p,f);else{p.push(f[0][0]);for(var d=f.length,h=1;h=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),z(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;z(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function ve(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function ye(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){ve(i,r,o,a,u,"next",t)}function u(t){ve(i,r,o,a,u,"throw",t)}a(void 0)}))}}function be(t,e){for(var n=0;n0&&void 0!==o[0]&&o[0],e.abrupt("return",t.request({path:"".concat(_e,"/optimize/bulk"),data:{reoptimize:r,"image-optimization-optimize-bulk":null===(n=window)||void 0===n||null===(n=n.imageOptimizerUserData)||void 0===n?void 0:n.optimizeBulkNonce}}));case 2:case"end":return e.stop()}}),e)}))),function(){return a.apply(this,arguments)})},{key:"cancelBulkOptimization",value:(i=ye(ge().mark((function e(){var n;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({path:"".concat(_e,"/optimize/bulk/cancel"),data:{"image-optimization-cancel-bulk-optimization":null===(n=window)||void 0===n||null===(n=n.imageOptimizerUserData)||void 0===n?void 0:n.cancelBulkOptimizationNonce}}));case 1:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})},{key:"getBulkOptimizationStatus",value:(o=ye(ge().mark((function e(){return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({method:"GET",path:"".concat(_e,"/optimize/bulk/status")}));case 1:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)})},{key:"getBulkOptimizationImages",value:(r=ye(ge().mark((function e(n){var r;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={operation_id:n},e.abrupt("return",t.request({method:"GET",path:(0,ue.addQueryArgs)("".concat(_e,"/optimize/bulk/images"),r)}));case 2:case"end":return e.stop()}}),e)}))),function(t){return r.apply(this,arguments)})}],n&&be(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),ke=Se;function Oe(t){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(t)}function Ee(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Oe(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Oe(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Re=Object.freeze({NOT_STARTED:"not-started",OPTIMIZED:"optimized",PENDING:"pending",IN_PROGRESS:"in-progress",FAILED:"optimization-failed",CANCELLED:"canceled"}),Ce=Object.freeze((Ee(we={},Re.NOT_STARTED,(0,oe.__)("Not started","image-optimization")),Ee(we,Re.OPTIMIZED,(0,oe.__)("Optimized","image-optimization")),Ee(we,Re.PENDING,(0,oe.__)("Pending","image-optimization")),Ee(we,Re.IN_PROGRESS,(0,oe.__)("In progress","image-optimization")),Ee(we,Re.FAILED,(0,oe.__)("Failed","image-optimization")),Ee(we,Re.CANCELLED,(0,oe.__)("Cancelled","image-optimization")),we));function ze(t){return ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ze(t)}function je(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),z(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;z(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function We(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Ue(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){We(i,r,o,a,u,"next",t)}function u(t){We(i,r,o,a,u,"throw",t)}a(void 0)}))}}function qe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||Ze(t,e)||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 Ze(t,e){if(t){if("string"==typeof t)return $e(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$e(t,e):void 0}}function $e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),z(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;z(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Je(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function tn(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Je(i,r,o,a,u,"next",t)}function u(t){Je(i,r,o,a,u,"throw",t)}a(void 0)}))}}function en(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return nn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nn(t,e):void 0}}(t,e)||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 nn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,ln),i=zt(),a=e||"span",u=r?pn[r]:[],c=[fn(i).styles,(null==u?void 0:u.styles)||""].join(" ");return $t(a,sn({css:Vt(c,";","","")},o),n)};dn.propTypes={as:Ut().oneOf(["span","label","p","h1","h2","h3","h4","h5","h6"]),variant:Ut().oneOf(["h4","h6","subtitle1"]),children:Ut().node.isRequired};var hn=dn,mn=window.wp.components,gn=function(t){var e=t.size,n=t.props;return $t(mn.Icon,{icon:$t("svg",n,$t("path",{d:"M7.333 4.667h1.333V6H7.333V4.667Zm0 2.667h1.333v4H7.333v-4Zm.667-6A6.67 6.67 0 0 0 1.333 8 6.669 6.669 0 0 0 8 14.667 6.669 6.669 0 0 0 14.666 8 6.669 6.669 0 0 0 8 1.333Zm0 12A5.34 5.34 0 0 1 2.666 8 5.34 5.34 0 0 1 8 2.667 5.34 5.34 0 0 1 13.333 8 5.34 5.34 0 0 1 8 13.334Z"})),size:e})},vn=["children"];function yn(){return yn=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,vn);return $t(mn.Tooltip,yn({children:e},n))},wn=Ht("div",{target:"e10skkyh4"})("width:100px;height:100px;display:flex;justify-content:center;align-items:center;margin-block-end:10px;border-radius:50%;background:radial-gradient(closest-side, white 79%, transparent 80% 100%),conic-gradient(",(function(t){return t.theme.palette.native.blue})," ",(function(t){return t.percentage}),"%, ",(function(t){return t.theme.palette.border.default})," 0);&>span{color:",(function(t){return t.theme.palette.native.blue}),";}"),xn=Ht("div",{target:"e10skkyh3"})("width:123px;height:11px;margin-block-end:10px;background-color:",(function(t){return t.theme.palette.background.grey}),";"),Sn=Ht("div",{target:"e10skkyh2"})("width:",(function(t){return t.percentage}),"%;height:11px;background-color:",(function(t){return t.theme.palette.native.blue}),";"),kn=Ht("div",{target:"e10skkyh1"})("width:123px;margin-block-end:17px;display:flex;justify-content:space-between;color:",(function(t){return t.theme.palette.text.tertiary}),";"),On=Ht(hn,{target:"e10skkyh0"})("color:",(function(t){return t.theme.palette.text.tertiary}),";"),En=function(t){var e=t.type,n=t.value,r=t.min,o=t.max;return"relative"===e?$t(wn,{percentage:n},$t(hn,{variant:"h4"},"".concat(n,"%"))):$t(React.Fragment,null,$t(xn,null,$t(Sn,{percentage:n})),$t(kn,null,$t(On,null,r||0),o&&$t(On,null,o)))};En.propTypes={type:Ut().oneOf(["absolute","relative"]),value:Ut().number.isRequired,min:Ut().number,max:Ut().number};var Rn=En,Cn=Ht("div",{target:"eo04e8w5"})("display:flex;padding:15px 11px 16px 5px;border:1px solid ",(function(t){return t.theme.palette.border.lightest}),";width:calc(100% / ",(function(t){return t.columns}),");&:not(:last-child){border-inline-end:none;}"),zn=Ht("div",{target:"eo04e8w4"})({name:"1u6n871",styles:"display:flex;flex-direction:column;justify-content:center;align-items:flex-start"}),jn=Ht(zn,{target:"eo04e8w3"})("width:50%;align-items:center;justify-content:",(function(t){return"absolute"===t.type?"flex-end":"center"}),";"),Ln=Ht(hn,{target:"eo04e8w2"})("display:flex;justify-content:center;align-items:center;margin-inline-start:20px;& span{display:flex;margin-inline-start:4.5px;}& svg{fill:",(function(t){return t.theme.palette.text.tertiary}),";}"),Pn=Ht(zn,{target:"eo04e8w1"})("width:45%;margin-inline-start:10px;",(function(t){return t.isButtonShown&&"\n\t\t& div {\n\t\t\tmargin-block-start: auto;\n\t\t}\n\n\t\t& button,\n\t\t& a {\n\t\t\tmargin-block-start: 6px;\n\t\t}\n\t"}),";"),Tn=Ht("hr",{target:"eo04e8w0"})("border:0.5px solid ",(function(t){return t.theme.palette.border.grey}),";width:100%;"),In=(0,r.memo)((function(t){var e=t.title,n=t.tooltipText,r=t.type,o=t.value,i=t.min,a=t.max,u=t.firstRow,c=t.secondRow,l=t.actionButton,s=t.columns;return $t(Cn,{columns:s},$t(jn,{type:r},$t(Rn,{type:r,value:o,max:a,min:i}),$t(Ln,{variant:"subtitle1"},e,n&&$t(bn,{text:n,placement:"top"},$t("span",null,$t(gn,{size:16}))))),$t(Pn,{isButtonShown:!!l},$t("div",null,$t(hn,null,u),$t(Tn,null),$t(hn,null,c)),l))}));In.propTypes={title:Ut().string.isRequired,type:Ut().oneOf(["absolute","relative"]),value:Ut().number.isRequired,min:Ut().number,max:Ut().number,firstRow:Ut().node.isRequired,secondRow:Ut().node,actionButton:Ut().node};var An=In,Nn=["isNative","isPink"];var Dn=Ht(mn.Button,{target:"ey2oztq2"})("&.components-button.is-primary{background:",(function(t){return t.theme.palette.native.blue}),";border-color:",(function(t){return t.theme.palette.native.blue}),";border-radius:4px;color:",(function(t){return t.theme.palette.text.white}),";font-size:13px;line-height:2.15;height:revert;min-height:30px;padding:0 10px;}&.components-button:disabled{opacity:0.4;cursor:not-allowed;}&.components-button.is-primary:not(:disabled):hover{background:",(function(t){return t.theme.palette.native.blueActive}),";border-color:",(function(t){return t.theme.palette.native.blueActive}),";color:",(function(t){return t.theme.palette.text.white}),";}"),Gn=Ht(Dn,{target:"ey2oztq1"})("background-color:",(function(t){return t.theme.palette.primary.main}),"!important;color:",(function(t){return t.theme.palette.text.primary}),"!important;font-weight:500!important;"),Mn=Ht(mn.Button,{target:"ey2oztq0"})("border-radius:4px;&.components-button.is-primary:not(.is-destructive){background:",(function(t){return t.theme.palette.native.blue}),";border-color:",(function(t){return t.theme.palette.native.blue}),";color:",(function(t){return t.theme.palette.text.white}),";}&.components-button.is-primary:not(.is-destructive):not(:disabled):hover{background:",(function(t){return t.theme.palette.native.blueActive}),";border-color:",(function(t){return t.theme.palette.native.blueActive}),";color:",(function(t){return t.theme.palette.text.white}),";}&.components-button.is-secondary:not(.is-destructive){background:",(function(t){return t.theme.palette.background.default}),";box-shadow:inset 0 0 0 1px ",(function(t){return t.theme.palette.native.blue}),";color:",(function(t){return t.theme.palette.native.blue}),";}&.components-button.is-secondary:not(.is-destructive):not(:disabled):hover{background:",(function(t){return t.theme.palette.background.default}),";box-shadow:inset 0 0 0 1px ",(function(t){return t.theme.palette.native.blueActive}),";color:",(function(t){return t.theme.palette.native.blueActive}),";}&.components-button:disabled{opacity:0.4;cursor:not-allowed;}&.components-button.is-primary.is-destructive{background-color:",(function(t){return t.theme.palette.error.main}),";}"),Fn=function(t){var e=t.isNative,n=t.isPink,r=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,Nn);return $t(n?Gn:e?Dn:Mn,r)},Bn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=[ // translators: %s: file size in bytes (0,oe.__)("%s Bytes","image-optimization"), // translators: %s: file size in kilobytes (0,oe.__)("%s Kb","image-optimization"), // translators: %s: file size in megabytes (0,oe.__)("%s Mb","image-optimization"), // translators: %s: file size in gigabytes (0,oe.__)("%s Gb","image-optimization")];if(!t) // translators: %s: file size in bytes return(0,oe.sprintf)((0,oe.__)("%s Bytes","image-optimization"),0);var r=Math.floor(Math.log(t)/Math.log(1024)),o=parseFloat((t/Math.pow(1024,r)).toFixed(e));return(0,oe.sprintf)(n[r],o)};function Hn(t){return Hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hn(t)}function Wn(t,e){for(var n=0;n=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),z(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;z(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Yn(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Xn(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Yn(i,r,o,a,u,"next",t)}function u(t){Yn(i,r,o,a,u,"throw",t)}a(void 0)}))}}var Kn=function(){var t=on(),e=t.isActivated,n=t.licenseKey,r=function(){var t=Xn(Vn().mark((function t(){var e;return Vn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o();case 2:e=t.sent,window.open(e,"_self").focus();case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),o=function(){var t=Xn(Vn().mark((function t(){return Vn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",ke.initConnect());case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),i=function(){var t=Xn(Vn().mark((function t(){return Vn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=3;break}return t.next=3,ke.deactivate(n);case 3:return t.next=5,ke.disconnect();case 5:setTimeout((function(){var t=(0,ue.addQueryArgs)(window.location.href,{action:"connect"});window.location.href=t}),300);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return{redirectToConnect:r,sendActivationEvent:function(){Zn.dispatch(Un)},getConnectLink:o,switchUser:i}},Qn="active",Jn="expired",tr="exceeded",er="not_connected",nr="not_activated",rr=function(){var t=on(),e=t.isConnected,n=t.isActivated,r=t.planData,o=Kn(),i=o.redirectToConnect,a=o.sendActivationEvent;return e?n?r?r.status===Jn?$t(Fn,{type:"button",variant:"primary",href:"https://go.elementor.com/io-quota-upgrade/",isNative:!0,isPink:!0,target:"_blank",rel:"noopener noreferrer"},(0,oe.__)("Renew Plan","image-optimization")):$t(Fn,{type:"button",variant:"primary",href:cn,isNative:!0,isPink:!0,target:"_blank",rel:"noopener noreferrer"},(0,oe.__)("Upgrade Plan","image-optimization")):$t("div",null):$t(Fn,{type:"button",variant:"primary",onClick:a,isNative:!0,isPink:!0},(0,oe.__)("Activate to start","image-optimization")):$t(Fn,{type:"button",className:"image-optimization-stats-connect-button",variant:"primary",onClick:i,isNative:!0,isPink:!0},(0,oe.__)("Connect to start","image-optimization"))},or=function(){return or=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),z(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;z(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function _r(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}var Sr=Ht("div",{target:"e5t2zyp0"})("display:flex;background-color:",(function(t){return t.theme.palette.background.default}),";position:relative;height:161px;"),kr=function(t){var e=t.isOwner;return $t(Sr,null,$t(dr,{isOwner:e}))},Or=function(t){var e,n,o,i=t.page,a=on(),u=a.subscriptionEmail,c=a.isOwner,l=rn().runOptimization,s=Xe(),f=s.stats,p=s.bulkOptimizationStatus,d=s.statsIsLoading,h=s.error,m=s.fetchStats,g=function(){var t=on(),e=t.isConnected,n=t.isActivated,r=t.planData;return e&&n&&r?{type:"absolute",value:100-r.used_quota/r.quota*100,min:0,max:r.quota,title:(0,oe.__)("Images in your plan","image-optimization"),tooltipText:(0,oe.__)("This refers to the amount of credits in your plan that you've already used.","image-optimization"),firstRow:$t(hn,null,(0,oe.sprintf)( // translators: %s: Subscription plan title (0,oe.__)("Current plan: %s","image-optimization"),r.subscription_plan.title)),secondRow:$t(hn,null,(0,oe.sprintf)( // translators: %s: Images left in a plan (0,oe.__)("Images left: %s","image-optimization"),"".concat(r.quota-r.used_quota,"/").concat(r.quota))),actionButton:$t(rr,null)}:{type:"absolute",value:0,min:0,max:1e3,title:(0,oe.__)("Images in your plan","image-optimization"),tooltipText:(0,oe.__)("This refers to the amount of credits in your plan that you've already used.","image-optimization"),firstRow:$t(hn,null,(0,oe.sprintf)( // translators: %s: Subscription plan title (0,oe.__)("Current plan: %s","image-optimization"),(0,oe.__)("N/A","image-optimization"))),secondRow:$t(hn,null,(0,oe.sprintf)( // translators: %s: Images left in a plan (0,oe.__)("Images left: %s","image-optimization"),(0,oe.__)("N/A","image-optimization"))),actionButton:$t(rr,null)}}(),v=function(){var t,e=(t=xr().mark((function t(){return xr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l();case 2:i!==an.BULK_OPTIMIZATION&&(location.href="/wp-admin/upload.php?page=image-optimization-bulk-optimization");case 3:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){_r(i,r,o,a,u,"next",t)}function u(t){_r(i,r,o,a,u,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}(),y=r.useDeferredValue?(0,r.useDeferredValue)(f):f,b=(e=y.initial_image_size,n=y.current_image_size,o=Math.round(100-n/e*100),Number.isNaN(o)&&(o=0),{type:"relative",value:o,title:(0,oe.__)("Space saved","image-optimization"),tooltipText:(0,oe.__)("This refers to the percentage of storage space saved by optimizing your images.","image-optimization"),firstRow:(0,oe.sprintf)( // translators: %s: File size (0,oe.__)("Initial size: %s","image-optimization"),null!==e?Bn(e):(0,oe.__)("N/A","image-optimization")),secondRow:(0,oe.sprintf)( // translators: %s: File size (0,oe.__)("Current size: %s","image-optimization"),null!==n?Bn(n):(0,oe.__)("N/A","image-optimization"))}),w=function(t,e,n,r){var o=t-e,i=Math.round(e/t*100),a=on(),u=a.isActivated,c=a.imagesLeft;return Number.isNaN(i)&&(i=0),{type:"relative",value:i,title:(0,oe.__)("Images optimized","image-optimization"),tooltipText:(0,oe.__)("This refers to the amount of images you've optimized out of your whole library.","image-optimization"),firstRow:(0,oe.sprintf)( // translators: %s: Images count (0,oe.__)("Total: %s","image-optimization"),null!==t?t:(0,oe.__)("N/A","image-optimization")),secondRow:(0,oe.sprintf)( // translators: %s: Images count (0,oe.__)("Unoptimized: %s","image-optimization"),null!==t?o:(0,oe.__)("N/A","image-optimization")),actionButton:u&&o>0&&c>0&&$t(Fn,{type:"button",variant:"primary",disabled:[Re.IN_PROGRESS,Re.CANCELLED].includes(n),onClick:r,isNative:!0},(0,oe.sprintf)( // Translators: %s: Images count (0,oe.__)("Optimize All (%s)","image-optimization"),o))}}(y.total_image_count,y.optimized_image_count,p,v);if(!Object.keys(y).length&&d)return $t(kr,{isOwner:c});if(h)return $t(Sr,null,$t(dr,{isOwner:c}),$t(yr,{onTryAgainClick:m}));var x=[b,w];return(!u||u&&c)&&x.push(g),$t(r.Suspense,{fallback:$t(kr,{isOwner:c})},$t(Sr,null,x.map((function(t,e){return $t(An,wr({key:"optimization-stats-item-".concat(e),columns:x.length},t))}))))};Or.propTypes={page:Ut().string};var Er=Or;function Rr(t){return Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rr(t)}function Cr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return zr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zr(t,e):void 0}}(t,e)||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 zr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,Tr);return $t(Ar,Ir({showDivider:u},c),$t(Nr,null,e&&$t(Dr,{variant:"subtitle1",as:"h3"},e),$t(Gr,null,n)),$t("div",null,r),i&&$t(Mr,null,i),o&&$t(Fr,null,(0,oe.__)("Setting saved!","image-optimization")))};Br.propTypes={title:Ut().string,subtitle:Ut().oneOfType([Ut().string,Ut().node]).isRequired,children:Ut().node.isRequired,showUpdated:Ut().bool.isRequired,error:Ut().string,showDivider:Ut().bool};var Hr=Br,Wr=function(t){var e=t.message,n=t.supportiveText;return $t("p",null,$t("b",null,e)," ",$t("span",null,n))},Ur=Ht(mn.PanelBody,{target:"e16t28jn0"})({name:"sq4cu8",styles:'.components-panel__row:last-of-type{padding-block-end:0;}& .components-panel__body-toggle .components-panel__arrow{position:relative;inset-block-start:1px;inset-inline-end:0;transform:rotate(-90deg);width:16px;height:16px;margin-inline-end:4px;}& .components-panel__body-toggle[aria-expanded="true"] .components-panel__arrow{transform:rotate(180deg);}'}),qr=function(t){var e=t.title,n=t.children,r=t.initialOpen,o=void 0===r||r,i=e?$t(hn,{variant:"subtitle1"},e):void 0;return $t(Ur,{title:i,initialOpen:o},n)};qr.propTypes={title:Ut().string,children:Ut().node,initialOpen:Ut().bool};var Zr=qr,$r=Ht(mn.Disabled,{target:"e1f5yh580"})({name:"o9ww1u",styles:"opacity:0.5"}),Vr=function(t){var e=t.isDisabled,n=t.children;return $t($r,{isDisabled:e},n)},Yr=Ht(mn.Panel,{target:"eopetj90"})("margin-block-start:16px;min-height:50vh;& .components-panel__header{height:67px;padding:0 23px;}& .components-panel__header h2{color:",(function(t){return t.theme.palette.text.primary}),";}.components-panel__body.is-opened{padding:16px;}"),Xr=function(t){var e=t.header,n=t.children,r=$t(hn,{variant:"h6"},e);return $t(Yr,{header:r},n)};Xr.propTypes={header:Ut().string.isRequired,children:Ut().node};var Kr=Xr,Qr=function(t){var e=t.children;return $t(Kr,{header:(0,oe.__)("Settings","image-optimization")},e)};Qr.propTypes={children:Ut().node};var Jr=Qr,to=Ht("span",{target:"e8cyu560"})({name:"96f02t",styles:"display:flex;padding:4px 8px;align-items:center;border-radius:4px;&>svg{margin-inline-end:4px;}"}),eo=function(t){return Vt("color:",t.palette.badge.text.success,";background-color:",t.palette.badge.background.success,";&>svg{fill:",t.palette.badge.text.success,";}","","")},no={success:eo,error:function(t){return Vt("color:",t.palette.badge.text.danger,";background-color:",t.palette.badge.background.danger,";&>svg{fill:",t.palette.badge.text.danger,";}","","")},warning:function(t){return Vt("color:",t.palette.badge.text.warning,";background-color:",t.palette.badge.background.warning,";&>svg{fill:",t.palette.badge.text.warning,";}","","")}},ro=function(t){var e=t.icon,n=t.text,r=t.variant,o=zt();return $t(to,{css:Vt((r?no[r]:eo)(o).styles,";","","")},e||"",n)};ro.propTypes={icon:Ut().node,text:Ut().string.isRequired,variant:Ut().oneOf(["success","warning","error"])};var oo=ro;function io(){return io=Object.assign?Object.assign.bind():function(t){for(var e=1;e:first-of-type{margin-inline-end:16px;}"}),vo=Ht(hn,{target:"ezm8g9k0"})("color:",(function(t){return t.theme.palette.text.primary}),";"),yo=function(){var t=on(),e=t.isConnected,n=t.isActivated,r=t.planData,o=t.imagesLeft;if(!e)return $t(go,null,$t(mo,{status:er}));if(e&&!n||!r)return $t(go,null,$t(mo,{status:nr}));var i=r.subscription_plan.title,a=r.status;return $t(go,null,$t(vo,null,i),$t(mo,0===o?{status:tr}:{status:"active"===a?Qn:Jn}))},bo=Ht("div",{target:"e1cnhkfy0"})('& [data-wp-component="ToggleGroupControl"]{border-radius:2px;border:1px solid ',(function(t){return t.theme.palette.border.grey600}),';}& button[aria-checked="true"],& div[role="presentation"]{background-color:',(function(t){return t.theme.palette.text.secondary}),";}& .components-base-control__field>:first-of-type{display:",(function(t){return t.hasLabel?"flex":"none"}),";}"),wo=function(t){var e=t.id,n=t.options,r=t.label,o=void 0===r?"":r,i=Pr(),a=i.getControlData,u=i.setControlData,c=a(e)||"";if(c)return $t(bo,{hasLabel:!!o},$t(mn.__experimentalToggleGroupControl,{id:e,value:c,label:o,isAdaptiveWidth:!0,onChange:function(t){return function(t){c!==t&&u(e,t)}(t)}},n.map((function(t){var e=t.label,n=t.value,r=t.tooltip;return $t(mn.__experimentalToggleGroupControlOption,{key:n,label:e,value:n,showTooltip:Boolean(r),"aria-label":Boolean(r)?r:""})}))))};wo.propTypes={id:Ut().string.isRequired,options:Ut().array.isRequired,label:Ut().string};var xo=wo,_o=Ht(mn.CheckboxControl,{target:"ehetvcd0"})("& .components-checkbox-control__label{color:",(function(t){return t.theme.palette.text.primary}),';}& .components-checkbox-control__input[type="checkbox"]:checked,& .components-checkbox-control__input[type="checkbox"]:indeterminate{background-color:',(function(t){return t.theme.palette.native.blue}),";}"),So=function(t){var e=t.id,n=t.label,r=Pr(),o=r.getControlData,i=r.setControlData,a=o(e)||!1;return $t(_o,{id:e,checked:a,label:n,onChange:function(){i(e,!a)}})};So.propTypes={id:Ut().string.isRequired,label:Ut().string.isRequired};var ko=So,Oo=Ht(mn.TextControl,{target:"eruxtwg0"})({name:"l0gpp6",styles:"& ::-webkit-outer-spin-button,& ::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}& input{-moz-appearance:textfield;}"}),Eo=function(t){var e=t.id,n=t.type,r=void 0===n?"text":n,o=t.label,i=Pr(),a=i.getControlData,u=i.setControlData,c=a(e)||"";return $t(Oo,{id:e,defaultValue:c,type:r,label:o,onChange:function(){},onBlur:function(t){return n=t.target.value,void(c!==n&&u(e,n));var n}})};Eo.propTypes={id:Ut().string.isRequired,type:Ut().oneOf(["number","text","search","email","password","tel","url"]),label:Ut().string};var Ro=Eo,Co=Ht("div",{target:"elnnxye0"})("display:flex;align-items:center;margin-block-start:13px;margin-inline-start:32px;color:",(function(t){return t.theme.palette.text.primary}),';input[id*="resize_larger_images_size"]{width:64px;margin:0 8px;}'),zo=function(){var t=(0,Pr().getControlData)(ki);return $t(React.Fragment,null,$t(ko,{id:ki,label:(0,oe.__)("Allow large image resizing","image-optimization")}),t&&$t(Co,null,(0,oe.__)("to maximum","image-optimization"),$t(Ro,{id:Oi,type:"number"}),(0,oe.__)("pixels width/height","image-optimization")))},jo=Ht(mn.ToggleControl,{target:"e1knkpa90"})("margin-block-end:0!important;& .components-toggle-control__label{color:",(function(t){return t.theme.palette.text.primary}),";}& .components-form-toggle.is-checked .components-form-toggle__track{background-color:",(function(t){return t.theme.palette.native.blue}),";}"),Lo=function(t){var e=t.id,n=t.label,r=Pr(),o=r.getControlData,i=r.setControlData,a=o(e)||!1;return $t(jo,{id:e,checked:a,label:n,onChange:function(){i(e,!a)}})};Lo.propTypes={id:Ut().string.isRequired,label:Ut().string.isRequired};var Po=Lo;function To(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,Ao);return $t(Do,No({title:e,onRequestClose:i},s),$t("div",null,l),$t(Go,null,$t(Fn,{onClick:o},(0,oe.__)("Cancel","image-optimization")),$t(Fn,{isDestructive:r,variant:"primary",onClick:a},c)))};Mo.propTypes={title:Ut().string.isRequired,isDestructive:Ut().bool,onCancel:Ut().func.isRequired,onClose:Ut().func.isRequired,onApprove:Ut().func.isRequired,approveText:Ut().string,children:Ut().node};var Fo=Mo;function Bo(t){return Bo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bo(t)}function Ho(){Ho=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(r||[]);return o(a,"_invoke",{value:E(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(L([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=v.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Bo(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var u=r.delegate;if(u){var c=R(u,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(e,n,r);if("normal"===l.type){if(o=r.done?m:d,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function R(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,R(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function z(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),z(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;z(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Wo(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}var Uo=function(){var t=Io(),e=t.isOpen,n=t.open,r=t.close,o=Xe(),i=o.backupsExist,a=o.bulkRestoringStatus,u=o.setBulkRestoringStatus,c=Me().showToastNotification,l=function(){var t,e=(t=Ho().mark((function t(){return Ho().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ke.restoreAllImages();case 3:u(Re.IN_PROGRESS),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),c(new Pe({level:"error",message:(0,oe.__)("An error occurred while restoring your original images.","image-optimization"),actions:[{label:(0,oe.__)("Retry","image-optimization"),onClick:l}]}));case 9:r();case 10:case"end":return t.stop()}}),t,null,[[0,6]])})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Wo(i,r,o,a,u,"next",t)}function u(t){Wo(i,r,o,a,u,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}(),s=Re.IN_PROGRESS===a?(0,oe.__)("Restoring…","image-optimization"):(0,oe.__)("Restore originals","image-optimization"),f=!i||Re.IN_PROGRESS===a;return $t(React.Fragment,null,$t(Fn,{variant:"primary",isDestructive:!0,onClick:e?r:n,disabled:f},s),e&&$t(Fo,{isDestructive:!0,onClose:r,onCancel:r,title:(0,oe.__)("Restore all original images?","image-optimization"),approveText:(0,oe.__)("Restore","image-optimization"),onApprove:l,style:{width:"335px"}},$t(hn,{as:"p"},(0,oe.__)("This will remove all optimized images and may cause performance issues.","image-optimization"))))},qo=function(){return imageOptimizerAppSettings};function Zo(){return Zo=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,Jo))};function ni(t){return function(t){if(Array.isArray(t))return ii(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||oi(t)||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 ri(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||oi(t,e)||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 oi(t,e){if(t){if("string"==typeof t)return ii(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ii(t,e):void 0}}function ii(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),z(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;z(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function di(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}var hi=function(){var t=Io(),e=t.isOpen,n=t.open,r=t.close,o=Xe(),i=o.backupsExist,a=o.bulkBackupRemovingStatus,u=o.setBulkBackupRemovingStatus,c=o.bulkRestoringStatus,l=Me().showToastNotification,s=function(){var t,e=(t=pi().mark((function t(){return pi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ke.removeAllImageBackups();case 3:u(Re.IN_PROGRESS),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),l(new Pe({level:"error",message:(0,oe.__)("An error occurred while deleting your backups.","image-optimization"),actions:[{label:(0,oe.__)("Retry","image-optimization"),onClick:s}]}));case 9:r();case 10:case"end":return t.stop()}}),t,null,[[0,6]])})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){di(i,r,o,a,u,"next",t)}function u(t){di(i,r,o,a,u,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}(),f=Re.IN_PROGRESS===a?(0,oe.__)("Deleting…","image-optimization"):(0,oe.__)("Delete backups","image-optimization"),p=!i||[a,c].includes(Re.IN_PROGRESS);return $t(React.Fragment,null,$t(Fn,{variant:"primary",isDestructive:!0,onClick:e?r:n,disabled:p},f),e&&$t(Fo,{isDestructive:!0,onClose:r,onCancel:r,title:(0,oe.__)("Delete all original images?","image-optimization"),approveText:(0,oe.__)("Delete","image-optimization"),onApprove:s,style:{width:"335px"}},$t(hn,{as:"p"},(0,oe.__)("This action can’t be undone and your library will only contain the new, optimized versions.","image-optimization"))))},mi=Ht("div",{target:"e161r2h60"})("display:flex;align-items:start;&:not(:last-of-type){margin-bottom:20px;}& input{position:relative;top:5px;}& div{display:flex;flex-direction:column;margin-left:16px;}& div label{color:",(function(t){return t.theme.palette.text.primary}),";}& div span{color:",(function(t){return t.theme.palette.text.tertiary}),";}"),gi=function(){var t=Pr(),e=t.getControlData,n=t.setControlData,r=e(Ci);return Pi.map((function(t){return $t(mi,{key:t.id},$t("input",{type:"radio",id:"io-convert-format-field-".concat(t.id),name:Ci,value:t.id,checked:t.id===r,onChange:function(){return e=t.id,void n(Ci,e);var e}}),$t("div",null,$t(hn,{as:"label",htmlFor:"io-convert-format-field-".concat(t.id)},t.title),$t(hn,null,t.description)))}))};function vi(t){return vi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vi(t)}function yi(){yi=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(r||[]);return o(a,"_invoke",{value:E(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(L([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=v.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==vi(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var u=r.delegate;if(u){var c=R(u,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(e,n,r);if("normal"===l.type){if(o=r.done?m:d,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function R(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,R(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function z(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),z(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;z(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function bi(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function wi(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){bi(i,r,o,a,u,"next",t)}function u(t){bi(i,r,o,a,u,"throw",t)}a(void 0)}))}}function xi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),z(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;z(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Ai(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Ni(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Ai(i,r,o,a,u,"next",t)}function u(t){Ai(i,r,o,a,u,"throw",t)}a(void 0)}))}}function Di(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Gi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gi(t,e):void 0}}(t,e)||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 Gi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var Ji=function(){var t,e,n,o,i,a,u=(e=(t=(0,r.useContext)(jr)).formDataState,n=t.lastUpdateState,{formData:(o=Cr(e,2))[0],setFormData:o[1],lastUpdate:Cr(n,1)[0]}),c=u.formData,l=u.setFormData,s=u.lastUpdate,f=on(),p=f.isConnected,d=f.isActivated,h=function(){var t=Di((0,r.useState)(null),2),e=t[0],n=t[1],o=Di((0,r.useState)(!1),2),i=o[0],a=o[1],u=Di((0,r.useState)(null),2),c=u[0],l=u[1],s=Di((0,r.useState)({}),2),f=s[0],p=s[1],d=Di((0,r.useState)({}),2),h=d[0],m=d[1],g=function(){var t=Ni(Ii().mark((function t(){var e;return Ii().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a(!0),l(null),t.prev=2,t.next=5,ke.getSettings();case 5:e=t.sent,n(Mi(e)),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),l(t.t0.message);case 12:a(!1);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(){return t.apply(this,arguments)}}(),v=function(){var t=Ni(Ii().mark((function t(e){var n,r;return Ii().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a(!0),m({}),p({}),t.prev=3,t.next=6,ke.updateSettings(e);case 6:n={},Object.keys(e).forEach((function(t){return n[t]=!0})),p(n),t.next=16;break;case 11:t.prev=11,t.t0=t.catch(3),r={},Object.keys(e).forEach((function(e){return r[e]=t.t0.message})),m(r);case 16:a(!1);case 17:case"end":return t.stop()}}),t,null,[[3,11]])})));return function(_x){return t.apply(this,arguments)}}();return{isLoading:i,data:e,fetchingError:c,updatedFields:f,updatingError:h,hideUpdateSuccessMessages:function(){p({})},hideUpdatingErrors:function(){m({})},fetchSettings:g,pushSettings:v}}(),m=h.data,g=h.isLoading,v=h.fetchingError,y=h.updatedFields,b=h.updatingError,w=h.fetchSettings,x=h.pushSettings,_=h.hideUpdateSuccessMessages,S=h.hideUpdatingErrors,k=Fe().showGeneralNotification,O=rn().runReoptimization,E=Xe().backupsExist,R=(i=on().isOwner,a=[{key:_i,title:(0,oe.__)("Compression level","image-optimization"),subtitle:(0,oe.__)("This refers to the amount of data preserved in the image file.","image-optimization"),component:$t(xo,{id:_i,options:Li})},{key:Si,title:(0,oe.__)("Optimize new uploads","image-optimization"),subtitle:(0,oe.__)("This will automatically apply your optimization settings to all new uploads.","image-optimization"),component:$t(Po,{id:Si,label:(0,oe.__)("Optimize new uploads","image-optimization")})},{key:ki,title:(0,oe.__)("Resize larger images","image-optimization"),subtitle:(0,oe.__)("This uses one additional credit per image.","image-optimization"),component:$t(zo,null)},{key:Ei,title:(0,oe.__)("Clear EXIF Metadata","image-optimization"),subtitle:(0,oe.__)("This refers to date, time, location, etc.","image-optimization"),component:$t(Po,{id:Ei,label:(0,oe.__)("Clear metadata","image-optimization")})},{key:Ri,title:(0,oe.__)("Backup original images","image-optimization"),subtitle:(0,oe.__)("This takes up additional space in your library.","image-optimization"),component:$t(Po,{id:Ri,label:(0,oe.__)("Backup originals","image-optimization")})},{key:Ci,title:(0,oe.__)("Convert to a different format","image-optimization"),subtitle:(0,oe.__)("Select the type of format to convert the images on your site. Original formats will be saved as a backup, even if you convert your images.","image-optimization"),component:$t(gi,null)},{key:"files_optimization",title:(0,oe.__)("File optimization","image-optimization"),subtitle:(0,oe.__)("In addition to your original upload, you can optimize the versions resized by WordPress. Each additional size counts as one credit.","image-optimization"),component:$t(si,null),showDivider:!1}],i&&a.unshift({key:"subscription_status",title:(0,oe.__)("Subscription status","image-optimization"),subtitle:(0,oe.__)("To use Image Optimizer, first you need to connect an Elementor account.","image-optimization"),component:$t(yo,null),alwaysVisible:!0}),{fields:a}).fields,C=function(){var t,e,n=on(),o=n.isConnected,i=n.isActivated,a=n.subscriptionEmail,u=n.licenseKey,c=Kn().switchUser,l=Me().showToastNotification,s=(t=(0,r.useState)(!1),e=2,function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return xi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xi(t,e):void 0}}(t,e)||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.")}()),f=s[0],p=s[1],d=function(){var t=wi(yi().mark((function t(){return yi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return p(!0),t.prev=1,t.next=4,c();case 4:t.next=16;break;case 6:return t.prev=6,t.t0=t.catch(1),t.prev=8,t.next=11,c();case 11:t.next=16;break;case 13:t.prev=13,t.t1=t.catch(8),l(new Pe({level:"error",message:(0,oe.__)("Error while disconnecting","image-optimization"),actions:[{label:(0,oe.__)("Got it","image-optimization"),onClick:function(){}}]}));case 16:p(!1);case 17:case"end":return t.stop()}}),t,null,[[1,6],[8,13]])})));return function(){return t.apply(this,arguments)}}(),h=function(){var t=wi(yi().mark((function t(){return yi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ke.deactivate(u);case 3:location.reload(),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),l(new Pe({level:"error",message:(0,oe.__)("Error while deactivating","image-optimization"),actions:[{label:(0,oe.__)("Got it","image-optimization"),onClick:function(){}}]}));case 9:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}();return{fields:[{key:"restore_originals",title:(0,oe.__)("Restore original images","image-optimization"),subtitle:"",component:$t(Uo,null),showDivider:!1},{key:"remove_backups",title:(0,oe.__)("Remove backups permanently","image-optimization"),subtitle:"",component:$t(hi,null),showDivider:!1},{key:"subscription_settings",title:(0,oe.__)("Subscription settings","image-optimization"),subtitle:a?(0,oe.sprintf)( // translators: %s: User email (0,oe.__)("You're connected as %s. Want to switch this subscription to a different account?","image-optimization"),a):(0,oe.__)("Want to switch this subscription to a different account?","image-optimization"),component:$t(Fn,{variant:"primary",disabled:!o||f,onClick:d},f&&$t(mn.Spinner,null),(0,oe.__)("Switch account","image-optimization")),showDivider:!1},{key:"deactivate",subtitle:(0,oe.__)("Want to deactivate the subscription for any reason?","image-optimization"),component:$t(Fn,{variant:"secondary",disabled:!o||!i,onClick:h},(0,oe.__)("Deactivate","image-optimization")),showDivider:!1}]}}(),z=C.fields,j=Object.keys(b).length,L=new Pe({id:"settings_changed",level:"info",message:$t(Wr,{message:(0,oe.__)("You’ve updated your optimization settings.","image-optimization"),supportiveText:(0,oe.__)("These new settings apply to future uploads, but you can apply them to the existing content in your library.","image-optimization")}),actions:[{label:(0,oe.__)("Apply them now","image-optimization"),onClick:O,variant:"link",noDefaultClasses:!0}]});return(0,r.useEffect)((function(){w()}),[]),(0,r.useEffect)((function(){m&&l(m)}),[m]),(0,r.useEffect)((function(){Object.keys(s).length&&(x(s),!j&&E&&ji.includes(Object.keys(s)[0])&&k(L))}),[s]),(0,r.useEffect)((function(){if(j){l(m);var t=setTimeout((function(){S()}),2e3);return function(){return clearTimeout(t)}}}),[b]),(0,r.useEffect)((function(){var t=setTimeout((function(){_()}),2e3);return function(){return clearTimeout(t)}}),[y]),!m&&g?$t(Wi,null):v?$t(Wi,null,$t(Vi,{onTryAgainClick:w})):$t(r.Suspense,{fallback:$t(Wi,null)},$t(Jr,null,0!==Object.keys(c).length&&$t(React.Fragment,null,$t(Zr,null,R.map((function(t){var e=t.key,n=t.component,r=t.alwaysVisible,o=Qi(t,Yi);return $t(Hr,Ki({key:e,showUpdated:e in y,error:e in b?b[e]:""},o),p&&d||r?n:$t(Vr,null,n))}))),$t(Zr,{title:(0,oe.__)("Advanced actions","image-optimization"),initialOpen:!1},z.map((function(t){var e=t.key,n=t.component,r=Qi(t,Xi);return $t(Hr,Ki({className:"components-panel__row--advanced-action",key:e},r),n)}))))))},ta=Ht("div",{target:"eoepye53"})("width:100%;height:8px;margin-block-end:10px;background-color:",(function(t){return t.theme.palette.background.grey}),";"),ea=Ht("div",{target:"eoepye52"})("width:",(function(t){return t.percentage}),"%;height:8px;background-color:",(function(t){return t.theme.palette.primary.light}),";"),na=Ht("div",{target:"eoepye51"})({name:"a7eilb",styles:"width:100%;margin-block-end:12px;display:flex;justify-content:space-between"}),ra=Ht(hn,{target:"eoepye50"})("color:",(function(t){return t.theme.palette.text.dark}),";"),oa=function(t){var e=t.percentage,n=t.min,r=t.max,o=void 0!==n&&void 0!==r;return $t(React.Fragment,null,$t(ta,null,$t(ea,{percentage:e})),o&&$t(na,null,$t(ra,{variant:"subtitle1"},n),$t(ra,{variant:"h6"},"".concat(e,"%")),$t(ra,{variant:"subtitle1"},r)))};oa.propTypes={percentage:Ut().number.isRequired,min:Ut().string,max:Ut().string};var ia=oa,aa=["isNative"];var ua=function(t){var e=t.isNative,n=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,aa),r=zt();return e?$t("span",{className:"spinner is-active",style:{margin:"0 10px 0 0",backgroundColor:r.palette.background.default,borderRadius:"100%"}}):$t(mn.Spinner,n)},ca=function(t){var e=t.disabled,n=t.optimizationStatus,r=t.onCancelOptimization,o=t.onStartOptimization;return[Re.CANCELLED,Re.IN_PROGRESS].includes(n)?$t(React.Fragment,null,$t(Fn,{variant:"secondary",onClick:r,disabled:Re.CANCELLED===n},(0,oe.__)("Cancel","image-optimization")),$t(Fn,{variant:"primary",disabled:!0},$t(ua,{isNative:!0}),(0,oe.__)("In progress…","image-optimization"))):$t(Fn,{variant:"primary",onClick:o,disabled:e},(0,oe.__)("Start","image-optimization"))};ca.propTypes={disabled:Ut().bool.isRequired,optimizationStatus:Ut().oneOf(Object.values(Re)).isRequired,onCancelOptimization:Ut().func.isRequired,onStartOptimization:Ut().func.isRequired};var la=ca,sa=Ht("div",{target:"efssyw54"})("background-color:",(function(t){return t.theme.palette.background.default}),";border:0.5px solid ",(function(t){return t.theme.palette.border.grey}),";margin:16px 0;padding:24px;text-align:center;"),fa=Ht("div",{target:"efssyw53"})({name:"1v91bu0",styles:"display:flex;justify-content:flex-end;align-items:center;position:relative"}),pa=Ht(hn,{target:"efssyw52"})("position:absolute;inset-inline-end:0;inset-inline-start:0;color:",(function(t){return t.theme.palette.error.main}),";font-weight:700;"),da=Ht("div",{target:"efssyw51"})({name:"fq8405",styles:"display:flex;align-items:center;z-index:10;& :not(:last-of-type){margin-inline-end:24px;}"}),ha=Ht(hn,{target:"efssyw50"})("color:",(function(t){return t.theme.palette.text.darkGrey}),";margin:0;&:last-of-type{margin-block-end:31px;}"),ma=function(t){var e=t.error,n=t.optimizationStatus,r=t.totalImages,o=t.progressPercentage,i=t.onCancelOptimization,a=t.onStartOptimization;return o>100&&(o=100),$t(sa,null,$t(ha,{as:"p"},(0,oe.__)("Optimize all the images left in your library in one go.","image-optimization")),$t(ia,{percentage:o||0,min:"0%",max:"100%"}),$t(fa,null,e&&$t(pa,null,(0,oe.__)("There was a snag with the bulk optimization.","image-optimization")),$t(da,null,$t(la,{disabled:100===o||!r,onCancelOptimization:i,onStartOptimization:a,optimizationStatus:n}))))};ma.propTypes={error:Ut().string,optimizationStatus:Ut().oneOf(Object.values(Re)).isRequired,totalImages:Ut().number,progressPercentage:Ut().number.isRequired,onCancelOptimization:Ut().func.isRequired,onStartOptimization:Ut().func.isRequired};var ga=ma,va=n(521),ya=[{Header:"",accessor:"thumbnail"},{Header:(0,oe.__)("File name","image-optimization"),accessor:"fileName"},{Header:(0,oe.__)("Original size","image-optimization"),accessor:"originalSize"},{Header:(0,oe.__)("Current size","image-optimization"),accessor:"currentSize"},{Header:(0,oe.__)("Optimization level","image-optimization"),accessor:"optimizationLevel"},{Header:(0,oe.__)("Status","image-optimization"),accessor:"status"}];function ba(){return ba=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,Ga);return $t(mn.CustomSelectControl,Ma({options:e,label:"",size:"__unstable-large"},n))};Fa.propTypes={options:Ut().array.isRequired};var Ba=Fa,Ha=Ht("div",{target:"e16a6jh43"})({name:"1azakc",styles:"text-align:center"}),Wa=Ht("hr",{target:"e16a6jh42"})({name:"19miswd",styles:"max-width:560px;margin:12px auto"}),Ua=Ht(hn,{target:"e16a6jh41"})("color:",(function(t){return t.theme.palette.text.primary}),";font-size:16px;"),qa=Ht(Ba,{target:"e16a6jh40"})({name:"f8a4yy",styles:"max-width:560px;margin:0 auto"}),Za=function(t){var e=t.subscriptions,n=t.onLicenseSelect;if(!e.length)return $t(Ha,null,$t(Ua,{as:"p",style:{marginBlockEnd:"12px"}},(0,oe.__)("No available license","image-optimization")),$t(Wa,null));if(1===e.length){var r=e[0];return $t(Ha,null,$t(Ua,{as:"p",style:{marginBlockEnd:"45px"}},(0,oe.sprintf)( // translators: %s: Subscription plan name, %s: expiration date (0,oe.__)("Image Optimizer - %1$s license, Expiration Date: %2$s","image-optimization"),r.plan.title,(0,Da.dateI18n)("M Y",r.date_next_payment,void 0))))}var o=null==e?void 0:e.map((function(t){return{name:(0,oe.sprintf)( // translators: %s: Subscription plan name, %s: expiration date (0,oe.__)("Image Optimizer - %1$s license, Expiration Date: %2$s","image-optimization"),t.plan.title,(0,Da.dateI18n)("M Y",t.date_next_payment,void 0)),key:t.license_key,style:{fontSize:"100%"}}}));return o.unshift({name:(0,oe.__)("Select","image-optimization"),key:"",style:{fontSize:"100%"}}),$t(React.Fragment,null,$t(qa,{id:"subscription_list",options:o,onChange:function(t){return n(t)}}),$t(Wa,null))};Za.propTypes={subscriptions:Ut().array.isRequired};var $a=Za,Va=Ht("div",{target:"ecxzfwj2"})({name:"1azakc",styles:"text-align:center"}),Ya=Ht(hn,{target:"ecxzfwj1"})("margin:0 0 20px 0;font-size:36px;font-style:normal;font-weight:700;line-height:normal;letter-spacing:-0.72px;color:",(function(t){return t.theme.palette.text.primary}),";"),Xa=Ht(hn,{target:"ecxzfwj0"})("font-size:16px;font-weight:400;line-height:150%;max-width:386px;margin:0 auto 45px;color:",(function(t){return t.theme.palette.text.tertiary}),";"),Ka=function(){return $t(Va,null,$t(Ya,{as:"h1",variant:"h4"},(0,oe.__)("Ready to use Image Optimizer?","image-optimization")),$t(Xa,{as:"p",variant:"subtitle1"},(0,oe.__)("Connect your WordPress site and activate your license to use all of of the features in Image Optimizer.","image-optimization")))},Qa=function(t){var e=t.size,n=void 0===e?60:e,r=t.props;return $t(mn.Icon,{icon:$t("svg",r,$t("rect",{width:"60",height:"60",fill:"#FF7BE5",rx:"30"}),$t("path",{fill:"#fff",d:"M19.702 7.754a.234.234 0 0 0-.443 0l-2.217 6.413a.234.234 0 0 1-.146.146L10.412 16.5a.234.234 0 0 0 0 .444l6.484 2.187a.234.234 0 0 1 .146.146l2.217 6.413c.073.21.37.21.443 0l2.217-6.413a.234.234 0 0 1 .147-.146l6.483-2.187a.234.234 0 0 0 0-.444l-6.483-2.187a.234.234 0 0 1-.147-.146l-2.217-6.413ZM32.672 23.884v6.907l-7.638 8.59L49.68 17.996a.234.234 0 0 1 .388.177V46.02c0 .13-.105.234-.235.234H11.014a.234.234 0 0 1-.168-.397L32.27 23.72a.234.234 0 0 1 .402.163Z"})),size:n})},Ja=function(t){var e=t.size,n=void 0===e?60:e,r=t.props;return $t(mn.Icon,{icon:$t("svg",r,$t("circle",{cx:"30",cy:"30",r:"30",fill:"#F1F2F3"}),$t("path",{fill:"#69727D",fillRule:"evenodd",d:"M34.2 31.5c-1.345 0-1.992.75-4.2.75s-2.85-.75-4.2-.75a6.302 6.302 0 0 0-6.3 6.3v1.95A2.25 2.25 0 0 0 21.75 42h16.5a2.25 2.25 0 0 0 2.25-2.25V37.8c0-3.478-2.822-6.3-6.3-6.3Zm4.8 8.25c0 .413-.337.75-.75.75h-16.5a.752.752 0 0 1-.75-.75V37.8c0-2.648 2.152-4.8 4.8-4.8.919 0 1.833.75 4.2.75 2.362 0 3.281-.75 4.2-.75 2.648 0 4.8 2.152 4.8 4.8v1.95ZM30 30a6 6 0 1 0 0-12 6 6 0 1 0 0 12Zm0-10.5c2.48 0 4.5 2.02 4.5 4.5s-2.02 4.5-4.5 4.5-4.5-2.02-4.5-4.5 2.02-4.5 4.5-4.5Z",clipRule:"evenodd"}),$t("path",{fill:"#69727D",d:"M34.2 31.4c-.691 0-1.206.194-1.806.38-.6.185-1.303.37-2.394.37v.2c1.117 0 1.841-.19 2.453-.38.612-.189 1.093-.37 1.747-.37v-.2Zm-4.2.75a7.45 7.45 0 0 1-2.392-.37c-.6-.186-1.114-.38-1.808-.38v.2c.656 0 1.138.181 1.749.37.61.19 1.334.38 2.451.38v-.2Zm-4.2-.75a6.402 6.402 0 0 0-6.4 6.4h.2c0-3.423 2.777-6.2 6.2-6.2v-.2Zm-6.4 6.4v1.95h.2V37.8h-.2Zm0 1.95a2.35 2.35 0 0 0 2.35 2.35v-.2a2.15 2.15 0 0 1-2.15-2.15h-.2Zm2.35 2.35h16.5v-.2h-16.5v.2Zm16.5 0a2.35 2.35 0 0 0 2.35-2.35h-.2a2.15 2.15 0 0 1-2.15 2.15v.2Zm2.35-2.35V37.8h-.2v1.95h.2Zm0-1.95c0-3.533-2.867-6.4-6.4-6.4v.2c3.423 0 6.2 2.777 6.2 6.2h.2Zm-1.7 1.95c0 .357-.293.65-.65.65v.2c.468 0 .85-.382.85-.85h-.2Zm-.65.65h-16.5v.2h16.5v-.2Zm-16.5 0a.652.652 0 0 1-.65-.65h-.2c0 .468.382.85.85.85v-.2Zm-.65-.65V37.8h-.2v1.95h.2Zm0-1.95c0-2.593 2.107-4.7 4.7-4.7v-.2a4.903 4.903 0 0 0-4.9 4.9h.2Zm4.7-4.7c.216 0 .436.044.684.114.255.07.516.16.845.257.646.19 1.476.379 2.671.379v-.2a8.825 8.825 0 0 1-2.615-.371c-.31-.091-.598-.189-.847-.258a2.736 2.736 0 0 0-.738-.121v.2Zm4.2.75a9.03 9.03 0 0 0 2.67-.379c.328-.096.59-.186.845-.257a2.55 2.55 0 0 1 .685-.114v-.2c-.243 0-.483.05-.739.12-.25.07-.537.168-.848.259A8.829 8.829 0 0 1 30 33.65v.2Zm4.2-.75c2.593 0 4.7 2.107 4.7 4.7h.2c0-2.704-2.196-4.9-4.9-4.9v.2Zm4.7 4.7v1.95h.2V37.8h-.2ZM30 30.1a6.1 6.1 0 0 0 6.1-6.1h-.2a5.9 5.9 0 0 1-5.9 5.9v.2Zm6.1-6.1a6.1 6.1 0 0 0-6.1-6.1v.2a5.9 5.9 0 0 1 5.9 5.9h.2ZM30 17.9a6.1 6.1 0 0 0-6.1 6.1h.2a5.9 5.9 0 0 1 5.9-5.9v-.2ZM23.9 24a6.1 6.1 0 0 0 6.1 6.1v-.2a5.9 5.9 0 0 1-5.9-5.9h-.2Zm6.1-4.4c2.425 0 4.4 1.976 4.4 4.4h.2c0-2.535-2.065-4.6-4.6-4.6v.2Zm4.4 4.4c0 2.424-1.975 4.4-4.4 4.4v.2c2.535 0 4.6-2.065 4.6-4.6h-.2ZM30 28.4a4.407 4.407 0 0 1-4.4-4.4h-.2c0 2.535 2.065 4.6 4.6 4.6v-.2ZM25.6 24c0-2.424 1.976-4.4 4.4-4.4v-.2a4.607 4.607 0 0 0-4.6 4.6h.2Z"})),size:n})};function tu(t){return tu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tu(t)}function eu(){eu=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(r||[]);return o(a,"_invoke",{value:E(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(L([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=v.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==tu(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var u=r.delegate;if(u){var c=R(u,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(e,n,r);if("normal"===l.type){if(o=r.done?m:d,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function R(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,R(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function z(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),z(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;z(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function nu(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}var ru=Ht("div",{target:"e1j22c7t3"})("display:flex;justify-content:space-between;align-items:baseline;max-width:420px;margin:0 auto 40px;position:relative;& svg{margin-block-end:14px;}&::before{content:'';position:absolute;inset-block-start:22px;inset-inline-end:20px;inset-inline-start:0;margin:auto;border:2px dashed ",(function(t){return t.theme.palette.background.grey}),";width:48%;}&::after{content:url(",n(998).Z,");display:flex;justify-content:center;align-items:center;position:absolute;inset-block-start:7px;inset-inline-start:0;inset-inline-end:20px;width:32px;height:32px;margin:auto;border:1px solid ",(function(t){return t.theme.palette.background.grey}),";border-radius:100%;background-color:",(function(t){return t.theme.palette.background.default}),";}"),ou=Ht("div",{target:"e1j22c7t2"})({name:"zigog8",styles:"display:flex;flex-direction:column;align-items:center"}),iu=Ht(hn,{target:"e1j22c7t1"})("color:",(function(t){return t.theme.palette.text.tertiary}),";margin-block-end:8px;"),au=Ht(Fn,{target:"e1j22c7t0"})("&.is-link{color:",(function(t){return t.theme.palette.text.tertiary}),";font-size:14px;font-style:normal;font-weight:500;line-height:100%;text-decoration:none;}"),uu=function(){var t=qo().siteUrl,e=on().subscriptionEmail,n=Kn().switchUser,r=Me().showToastNotification,o=function(){var t,e=(t=eu().mark((function t(){return eu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n();case 3:close(),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),r(new Pe({level:"error",message:(0,oe.__)("Error while disconnecting","image-optimization"),actions:[{label:(0,oe.__)("Got it","image-optimization"),onClick:function(){}}]}));case 9:case"end":return t.stop()}}),t,null,[[0,6]])})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){nu(i,r,o,a,u,"next",t)}function u(t){nu(i,r,o,a,u,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();return $t(ru,null,$t(ou,null,$t(Qa,null),$t(iu,null,t)),$t(ou,null,$t(Ja,null),$t(iu,null,e),$t(au,{variant:"link",onClick:o},(0,oe.__)("Switch User","image-optimization"))))},cu=Ht("div",{target:"emrn7r52"})({name:"1yldona",styles:"display:flex;flex-direction:column;justify-content:center;align-items:center;margin-block-end:35px;& p{margin:0;}"}),lu=Ht(hn,{target:"emrn7r51"})("color:",(function(t){return t.theme.palette.text.tertiary}),";"),su=Ht(Fn,{target:"emrn7r50"})("&.is-link{color:",(function(t){return t.theme.palette.text.link}),";font-size:14px;line-height:normal;}"),fu=function(){return $t(cu,null,$t(lu,{as:"p"},(0,oe.sprintf)( // translators: %s: Full year (0,oe.__)("© %s All Rights Reserved.","image-optimization"),(0,Da.dateI18n)("Y",new Date,void 0))),$t("p",null,$t(su,{variant:"link",href:"https://elementor.com/terms/",target:"_blank",rel:"noopener noreferrer"},(0,oe.__)("Terms of Service","image-optimization")),$t("span",null,", "),$t(su,{variant:"link",href:"https://elementor.com/about/privacy/",target:"_blank",rel:"noopener noreferrer"},(0,oe.__)("Privacy Policy","image-optimization"))))};function pu(t){return pu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pu(t)}function du(){du=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(r||[]);return o(a,"_invoke",{value:E(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(L([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=v.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==pu(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var u=r.delegate;if(u){var c=R(u,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(e,n,r);if("normal"===l.type){if(o=r.done?m:d,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function R(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,R(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function z(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),z(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;z(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function hu(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function mu(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){hu(i,r,o,a,u,"next",t)}function u(t){hu(i,r,o,a,u,"throw",t)}a(void 0)}))}}function gu(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return vu(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vu(t,e):void 0}}(t,e)||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 vu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),z(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;z(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Ou(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}var Eu=function(){var t=function(){var t=window.location;return new URLSearchParams(t.search).get("page")||null}();return function(){var t=Xe(),e=t.fetchStats,n=t.bulkRestoringStatus,o=t.bulkBackupRemovingStatus,i=t.bulkOptimizationOperationId,a=t.bulkOptimizationStatus,u=t.setBulkOptimizationImages,c=t.fetchBulkOptimizationImages,l=Me().showToastNotification,s=rn().hideBulkWPNotice,f=(0,r.useRef)(n),p=(0,r.useRef)(o),d=(0,r.useRef)(a),h=(0,r.useRef)(!1),m=(0,r.useRef)(!1),g=function(){var t=Ue(He().mark((function t(){return He().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!h.current){t.next=2;break}return t.abrupt("return");case 2:return h.current=!0,t.next=5,e();case 5:h.current=!1;case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),v=function(){var t=Ue(He().mark((function t(e){return He().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!m.current){t.next=2;break}return t.abrupt("return");case 2:return m.current=!0,t.next=5,c(e);case 5:m.current=!1;case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();(0,r.useEffect)((function(){g();var t=setInterval(g,5e3);return function(){return clearInterval(t)}}),[]),(0,r.useEffect)((function(){Re.NOT_STARTED===n&&Re.IN_PROGRESS===f.current&&l(new Pe({level:"success",message:(0,oe.__)("Restoring your original images was completed successfully.","image-optimization"),actions:[{label:(0,oe.__)("Got it","image-optimization"),onClick:function(){}}]})),f.current=n}),[n]),(0,r.useEffect)((function(){Re.NOT_STARTED===o&&Re.IN_PROGRESS===p.current&&l(new Pe({level:"success",message:(0,oe.__)("Deleting your backups was completed successfully.","image-optimization"),actions:[{label:(0,oe.__)("Got it","image-optimization"),onClick:function(){}}]})),p.current=o}),[o]),(0,r.useEffect)((function(){Re.NOT_STARTED===a&&Re.IN_PROGRESS===d.current&&(l(new Pe({level:"success",message:(0,oe.__)("Bulk optimization is completed.","image-optimization"),actions:[{label:(0,oe.__)("Got it","image-optimization"),onClick:function(){}}]})),s()),d.current=a}),[a]);var y=(0,r.useRef)(null),b=(0,r.useRef)(null);(0,r.useEffect)((function(){return a===Re.NOT_STARTED&&y.current&&(clearInterval(y.current),y.current=null,b.current=null,v(i)),a===Re.IN_PROGRESS&&!y.current&&i?(v(i),y.current=setInterval((function(){return v(i)}),5e3),b.current=i,function(){return clearInterval(y.current)}):a===Re.IN_PROGRESS&&y.current&&b!==i?(clearInterval(y.current),u([]),y.current=setInterval((function(){return v(i)}),5e3),b.current=i,function(){return clearInterval(y.current)}):void 0}),[a,i])}(),function(t){var e=Kn().redirectToConnect,n=Me().showToastNotification,o=function(){var t,r=(t=ku().mark((function t(){return ku().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e();case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),n(new Pe({level:"error",message:(0,oe.__)("Error while connecting","image-optimization"),actions:[{label:(0,oe.__)("Got it","image-optimization"),onClick:function(){}}]}));case 8:case"end":return t.stop()}}),t,null,[[0,5]])})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Ou(i,r,o,a,u,"next",t)}function u(t){Ou(i,r,o,a,u,"throw",t)}a(void 0)}))});return function(){return r.apply(this,arguments)}}();(0,r.useEffect)((function(){t===an.SETTINGS&&"connect"===new URLSearchParams(location.search).get("action")&&o()}),[])}(t),$t(re,null,$t(re.Header,null,$t(Na,null)),$t(re.Content,{fullWidth:!0},$t(_u,{page:t}),$t(Er,{page:t}),$t(Ca,{page:t}),$t(Ia,null)))},Ru=function(){return $t(Lt,{theme:At},$t(Ye,null,$t(Ge,null,$t(Eu,null))))};function Cu(){return Cu=Object.assign?Object.assign.bind():function(t){for(var e=1;esvg{margin-inline-end:6px;}}"),Bu=function(){var t=on(),e=t.isConnected,n=t.isActivated,r=t.planData,o=null;return e||(o=Au.STATUS_NOT_CONNECTED),e&&!n&&(o=Au.STATUS_NOT_ACTIVATED),e&&n&&!r&&(o=Au.STATUS_PLAN_DATA_UNAVAILABLE),e&&n&&r&&r.status===Jn&&(o=Au.STATUS_PLAN_EXPIRED),$t("nav",null,$t(Gu,null,$t(Mu,{role:"menuitem"},$t(Fu,{href:"https://go.elementor.com/io-panel-learn-more/",variant:"link",target:"_blank",rel:"noopener noreferrer"},$t(Tu,{size:16}),(0,oe.__)("Help","image-optimization"))),$t(Mu,null,$t(Du,{state:o}))))},Hu=Ht("div",{target:"e1dnt4qf0"})("padding:10px 20px;position:relative;inset-inline-start:-20px;width:calc(100vw - 160px - 40px);box-shadow:0 3px 16px 0 rgba(35, 38, 42, 0.20);background-color:",(function(t){return t.theme.palette.background.default}),";display:flex;justify-content:space-between;align-items:center;@media screen and (max-width: 960px){width:calc(100vw - 36px - 32px);}@media screen and (max-width: 782px){inset-inline-start:-10px;width:calc(100vw - 32px);}"),Wu=function(){return $t(Hu,{role:"navigation"},$t(Pu,null),$t(Bu,null))},Uu=(0,r.createContext)({}),qu=function(t){var e=t.children,n=Io();return $t(Uu.Provider,{value:{activationModalState:n}},e)};qu.propTypes={children:Ut().node};var Zu,$u=function(){return $t(Lt,{theme:At},$t(qu,null,$t(Wu,null)))},Vu=document.getElementById("image-optimization-top-bar"),Yu=document.getElementById("image-optimization-app"),Xu=(null===(Zu=window)||void 0===Zu||null===(Zu=Zu.imageOptimizerAppSettings)||void 0===Zu?void 0:Zu.isDevelopment)?r.Fragment:r.StrictMode;if(r.createRoot){var Ku=(0,r.createRoot)(Vu),Qu=(0,r.createRoot)(Yu);Ku.render($t(Xu,null,$t($u,null))),Qu.render($t(Xu,null,$t(Ru,null)))}else r.render&&((0,r.render)($t(Xu,null,$t($u,null)),Vu),(0,r.render)($t(Xu,null,$t(Ru,null)),Yu))},679:function(t,e,n){"use strict";var r=n(296),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function c(t){return r.isMemo(t)?a:u[t.$$typeof]||o}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[r.Memo]=a;var l=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(h){var o=d(n);o&&o!==h&&t(e,o,r)}var a=s(n);f&&(a=a.concat(f(n)));for(var u=c(e),m=c(n),g=0;g=0||(o[n]=t[n]);return o}function a(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var u={init:"init"},c=function(t){var e=t.value;return void 0===e?"":e},l=function(){return e.createElement(e.Fragment,null," ")},s={Cell:c,width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function f(){for(var t=arguments.length,e=new Array(t),n=0;n(i="number"==typeof i?i:1/0)){var a=o;o=i,i=a}return t.filter((function(t){return e.some((function(e){var n=t.values[e];return n>=o&&n<=i}))}))};_t.autoRemove=function(t){return!t||"number"!=typeof t[0]&&"number"!=typeof t[1]};var St=Object.freeze({__proto__:null,text:dt,exactText:ht,exactTextCase:mt,includes:gt,includesAll:vt,includesSome:yt,includesValue:bt,exact:wt,equals:xt,between:_t});u.resetFilters="resetFilters",u.setFilter="setFilter",u.setAllFilters="setAllFilters";var kt=function(t){t.stateReducers.push(Ot),t.useInstance.push(Et)};function Ot(t,e,n,r){if(e.type===u.init)return o({filters:[]},t);if(e.type===u.resetFilters)return o({},t,{filters:r.initialState.filters||[]});if(e.type===u.setFilter){var i=e.columnId,a=e.filterValue,c=r.allColumns,l=r.filterTypes,s=c.find((function(t){return t.id===i}));if(!s)throw new Error("React-Table: Could not find a column with id: "+i);var f=L(s.filter,l||{},St),p=t.filters.find((function(t){return t.id===i})),d=g(a,p&&p.value);return P(f.autoRemove,d,s)?o({},t,{filters:t.filters.filter((function(t){return t.id!==i}))}):o({},t,p?{filters:t.filters.map((function(t){return t.id===i?{id:i,value:d}:t}))}:{filters:[].concat(t.filters,[{id:i,value:d}])})}if(e.type===u.setAllFilters){var h=e.filters,m=r.allColumns,v=r.filterTypes;return o({},t,{filters:g(h,t.filters).filter((function(t){var e=m.find((function(e){return e.id===t.id}));return!P(L(e.filter,v||{},St).autoRemove,t.value,e)}))})}}function Et(t){var n=t.data,r=t.rows,o=t.flatRows,i=t.rowsById,a=t.allColumns,c=t.filterTypes,l=t.manualFilters,s=t.defaultCanFilter,f=void 0!==s&&s,p=t.disableFilters,d=t.state.filters,h=t.dispatch,m=t.autoResetFilters,g=void 0===m||m,y=e.useCallback((function(t,e){h({type:u.setFilter,columnId:t,filterValue:e})}),[h]),w=e.useCallback((function(t){h({type:u.setAllFilters,filters:t})}),[h]);a.forEach((function(t){var e=t.id,n=t.accessor,r=t.defaultCanFilter,o=t.disableFilters;t.canFilter=n?R(!0!==o&&void 0,!0!==p&&void 0,!0):R(r,f,!1),t.setFilter=function(e){return y(t.id,e)};var i=d.find((function(t){return t.id===e}));t.filterValue=i&&i.value}));var x=e.useMemo((function(){if(l||!d.length)return[r,o,i];var t=[],e={};return[function n(r,o){void 0===o&&(o=0);var i=r;return(i=d.reduce((function(t,e){var n=e.id,r=e.value,i=a.find((function(t){return t.id===n}));if(!i)return t;0===o&&(i.preFilteredRows=t);var u=L(i.filter,c||{},St);return u?(i.filteredRows=u(t,[n],r),i.filteredRows):(console.warn("Could not find a valid 'column.filter' for column with the ID: "+i.id+"."),t)}),r)).forEach((function(r){t.push(r),e[r.id]=r,r.subRows&&(r.subRows=r.subRows&&r.subRows.length>0?n(r.subRows,o+1):r.subRows)})),i}(r),t,e]}),[l,d,r,o,i,a,c]),_=x[0],S=x[1],k=x[2];e.useMemo((function(){a.filter((function(t){return!d.find((function(e){return e.id===t.id}))})).forEach((function(t){t.preFilteredRows=_,t.filteredRows=_}))}),[_,d,a]);var O=v(g);b((function(){O()&&h({type:u.resetFilters})}),[h,l?null:n]),Object.assign(t,{preFilteredRows:r,preFilteredFlatRows:o,preFilteredRowsById:i,filteredRows:_,filteredFlatRows:S,filteredRowsById:k,rows:_,flatRows:S,rowsById:k,setFilter:y,setAllFilters:w})}kt.pluginName="useFilters",u.resetGlobalFilter="resetGlobalFilter",u.setGlobalFilter="setGlobalFilter";var Rt=function(t){t.stateReducers.push(Ct),t.useInstance.push(zt)};function Ct(t,e,n,r){if(e.type===u.resetGlobalFilter)return o({},t,{globalFilter:r.initialState.globalFilter||void 0});if(e.type===u.setGlobalFilter){var a=e.filterValue,c=r.userFilterTypes,l=L(r.globalFilter,c||{},St),s=g(a,t.globalFilter);return P(l.autoRemove,s)?(t.globalFilter,i(t,["globalFilter"])):o({},t,{globalFilter:s})}}function zt(t){var n=t.data,r=t.rows,o=t.flatRows,i=t.rowsById,a=t.allColumns,c=t.filterTypes,l=t.globalFilter,s=t.manualGlobalFilter,f=t.state.globalFilter,p=t.dispatch,d=t.autoResetGlobalFilter,h=void 0===d||d,m=t.disableGlobalFilter,g=e.useCallback((function(t){p({type:u.setGlobalFilter,filterValue:t})}),[p]),y=e.useMemo((function(){if(s||void 0===f)return[r,o,i];var t=[],e={},n=L(l,c||{},St);if(!n)return console.warn("Could not find a valid 'globalFilter' option."),r;a.forEach((function(t){var e=t.disableGlobalFilter;t.canFilter=R(!0!==e&&void 0,!0!==m&&void 0,!0)}));var u=a.filter((function(t){return!0===t.canFilter}));return[function r(o){return(o=n(o,u.map((function(t){return t.id})),f)).forEach((function(n){t.push(n),e[n.id]=n,n.subRows=n.subRows&&n.subRows.length?r(n.subRows):n.subRows})),o}(r),t,e]}),[s,f,l,c,a,r,o,i,m]),w=y[0],x=y[1],_=y[2],S=v(h);b((function(){S()&&p({type:u.resetGlobalFilter})}),[p,s?null:n]),Object.assign(t,{preGlobalFilteredRows:r,preGlobalFilteredFlatRows:o,preGlobalFilteredRowsById:i,globalFilteredRows:w,globalFilteredFlatRows:x,globalFilteredRowsById:_,rows:w,flatRows:x,rowsById:_,setGlobalFilter:g,disableGlobalFilter:m})}function jt(t,e){return e.reduce((function(t,e){return t+("number"==typeof e?e:0)}),0)}Rt.pluginName="useGlobalFilter";var Lt=Object.freeze({__proto__:null,sum:jt,min:function(t){var e=t[0]||0;return t.forEach((function(t){"number"==typeof t&&(e=Math.min(e,t))})),e},max:function(t){var e=t[0]||0;return t.forEach((function(t){"number"==typeof t&&(e=Math.max(e,t))})),e},minMax:function(t){var e=t[0]||0,n=t[0]||0;return t.forEach((function(t){"number"==typeof t&&(e=Math.min(e,t),n=Math.max(n,t))})),e+".."+n},average:function(t){return jt(0,t)/t.length},median:function(t){if(!t.length)return null;var e=Math.floor(t.length/2),n=[].concat(t).sort((function(t,e){return t-e}));return t.length%2!=0?n[e]:(n[e-1]+n[e])/2},unique:function(t){return Array.from(new Set(t).values())},uniqueCount:function(t){return new Set(t).size},count:function(t){return t.length}}),Pt=[],Tt={};u.resetGroupBy="resetGroupBy",u.setGroupBy="setGroupBy",u.toggleGroupBy="toggleGroupBy";var It=function(t){t.getGroupByToggleProps=[At],t.stateReducers.push(Nt),t.visibleColumnsDeps.push((function(t,e){var n=e.instance;return[].concat(t,[n.state.groupBy])})),t.visibleColumns.push(Dt),t.useInstance.push(Mt),t.prepareRow.push(Ft)};It.pluginName="useGroupBy";var At=function(t,e){var n=e.header;return[t,{onClick:n.canGroupBy?function(t){t.persist(),n.toggleGroupBy()}:void 0,style:{cursor:n.canGroupBy?"pointer":void 0},title:"Toggle GroupBy"}]};function Nt(t,e,n,r){if(e.type===u.init)return o({groupBy:[]},t);if(e.type===u.resetGroupBy)return o({},t,{groupBy:r.initialState.groupBy||[]});if(e.type===u.setGroupBy)return o({},t,{groupBy:e.value});if(e.type===u.toggleGroupBy){var i=e.columnId,a=e.value,c=void 0!==a?a:!t.groupBy.includes(i);return o({},t,c?{groupBy:[].concat(t.groupBy,[i])}:{groupBy:t.groupBy.filter((function(t){return t!==i}))})}}function Dt(t,e){var n=e.instance.state.groupBy,r=n.map((function(e){return t.find((function(t){return t.id===e}))})).filter(Boolean),o=t.filter((function(t){return!n.includes(t.id)}));return(t=[].concat(r,o)).forEach((function(t){t.isGrouped=n.includes(t.id),t.groupedIndex=n.indexOf(t.id)})),t}var Gt={};function Mt(t){var n=t.data,r=t.rows,i=t.flatRows,a=t.rowsById,c=t.allColumns,l=t.flatHeaders,s=t.groupByFn,f=void 0===s?Bt:s,d=t.manualGroupBy,h=t.aggregations,g=void 0===h?Gt:h,y=t.plugins,w=t.state.groupBy,x=t.dispatch,_=t.autoResetGroupBy,S=void 0===_||_,k=t.disableGroupBy,O=t.defaultCanGroupBy,E=t.getHooks;m(y,["useColumnOrder","useFilters"],"useGroupBy");var C=v(t);c.forEach((function(e){var n=e.accessor,r=e.defaultGroupBy,o=e.disableGroupBy;e.canGroupBy=n?R(e.canGroupBy,!0!==o&&void 0,!0!==k&&void 0,!0):R(e.canGroupBy,r,O,!1),e.canGroupBy&&(e.toggleGroupBy=function(){return t.toggleGroupBy(e.id)}),e.Aggregated=e.Aggregated||e.Cell}));var j=e.useCallback((function(t,e){x({type:u.toggleGroupBy,columnId:t,value:e})}),[x]),L=e.useCallback((function(t){x({type:u.setGroupBy,value:t})}),[x]);l.forEach((function(t){t.getGroupByToggleProps=p(E().getGroupByToggleProps,{instance:C(),header:t})}));var P=e.useMemo((function(){if(d||!w.length)return[r,i,a,Pt,Tt,i,a];var t=w.filter((function(t){return c.find((function(e){return e.id===t}))})),e=[],n={},u=[],l={},s=[],p={},h=function r(i,a,d){if(void 0===a&&(a=0),a===t.length)return i.map((function(t){return o({},t,{depth:a})}));var h=t[a],m=f(i,h);return Object.entries(m).map((function(o,i){var f=o[0],m=o[1],v=h+":"+f,y=r(m,a+1,v=d?d+">"+v:v),b=a?z(m,"leafRows"):m,w=function(e,n,r){var o={};return c.forEach((function(i){if(t.includes(i.id))o[i.id]=n[0]?n[0].values[i.id]:null;else{var a="function"==typeof i.aggregate?i.aggregate:g[i.aggregate]||Lt[i.aggregate];if(a){var u=n.map((function(t){return t.values[i.id]})),c=e.map((function(t){var e=t.values[i.id];if(!r&&i.aggregateValue){var n="function"==typeof i.aggregateValue?i.aggregateValue:g[i.aggregateValue]||Lt[i.aggregateValue];if(!n)throw console.info({column:i}),new Error("React Table: Invalid column.aggregateValue option for column listed above");e=n(e,t,i)}return e}));o[i.id]=a(c,u)}else{if(i.aggregate)throw console.info({column:i}),new Error("React Table: Invalid column.aggregate option for column listed above");o[i.id]=null}}})),o}(b,m,a),x={id:v,isGrouped:!0,groupByID:h,groupByVal:f,values:w,subRows:y,leafRows:b,depth:a,index:i};return y.forEach((function(t){e.push(t),n[t.id]=t,t.isGrouped?(u.push(t),l[t.id]=t):(s.push(t),p[t.id]=t)})),x}))}(r);return h.forEach((function(t){e.push(t),n[t.id]=t,t.isGrouped?(u.push(t),l[t.id]=t):(s.push(t),p[t.id]=t)})),[h,e,n,u,l,s,p]}),[d,w,r,i,a,c,g,f]),T=P[0],I=P[1],A=P[2],N=P[3],D=P[4],G=P[5],M=P[6],F=v(S);b((function(){F()&&x({type:u.resetGroupBy})}),[x,d?null:n]),Object.assign(t,{preGroupedRows:r,preGroupedFlatRow:i,preGroupedRowsById:a,groupedRows:T,groupedFlatRows:I,groupedRowsById:A,onlyGroupedFlatRows:N,onlyGroupedRowsById:D,nonGroupedFlatRows:G,nonGroupedRowsById:M,rows:T,flatRows:I,rowsById:A,toggleGroupBy:j,setGroupBy:L})}function Ft(t){t.allCells.forEach((function(e){var n;e.isGrouped=e.column.isGrouped&&e.column.id===t.groupByID,e.isPlaceholder=!e.isGrouped&&e.column.isGrouped,e.isAggregated=!e.isGrouped&&!e.isPlaceholder&&(null==(n=t.subRows)?void 0:n.length)}))}function Bt(t,e){return t.reduce((function(t,n,r){var o=""+n.values[e];return t[o]=Array.isArray(t[o])?t[o]:[],t[o].push(n),t}),{})}var Ht=/([0-9]+)/gm;function Wt(t,e){return t===e?0:t>e?1:-1}function Ut(t,e,n){return[t.values[n],e.values[n]]}function qt(t){return"number"==typeof t?isNaN(t)||t===1/0||t===-1/0?"":String(t):"string"==typeof t?t:""}var Zt=Object.freeze({__proto__:null,alphanumeric:function(t,e,n){var r=Ut(t,e,n),o=r[0],i=r[1];for(o=qt(o),i=qt(i),o=o.split(Ht).filter(Boolean),i=i.split(Ht).filter(Boolean);o.length&&i.length;){var a=o.shift(),u=i.shift(),c=parseInt(a,10),l=parseInt(u,10),s=[c,l].sort();if(isNaN(s[0])){if(a>u)return 1;if(u>a)return-1}else{if(isNaN(s[1]))return isNaN(c)?-1:1;if(c>l)return 1;if(l>c)return-1}}return o.length-i.length},datetime:function(t,e,n){var r=Ut(t,e,n),o=r[0],i=r[1];return Wt(o=o.getTime(),i=i.getTime())},basic:function(t,e,n){var r=Ut(t,e,n);return Wt(r[0],r[1])},string:function(t,e,n){var r=Ut(t,e,n),o=r[0],i=r[1];for(o=o.split("").filter(Boolean),i=i.split("").filter(Boolean);o.length&&i.length;){var a=o.shift(),u=i.shift(),c=a.toLowerCase(),l=u.toLowerCase();if(c>l)return 1;if(l>c)return-1;if(a>u)return 1;if(u>a)return-1}return o.length-i.length},number:function(t,e,n){var r=Ut(t,e,n),o=r[0],i=r[1],a=/[^0-9.]/gi;return Wt(o=Number(String(o).replace(a,"")),i=Number(String(i).replace(a,"")))}});u.resetSortBy="resetSortBy",u.setSortBy="setSortBy",u.toggleSortBy="toggleSortBy",u.clearSortBy="clearSortBy",s.sortType="alphanumeric",s.sortDescFirst=!1;var $t=function(t){t.getSortByToggleProps=[Vt],t.stateReducers.push(Yt),t.useInstance.push(Xt)};$t.pluginName="useSortBy";var Vt=function(t,e){var n=e.instance,r=e.column,o=n.isMultiSortEvent,i=void 0===o?function(t){return t.shiftKey}:o;return[t,{onClick:r.canSort?function(t){t.persist(),r.toggleSortBy(void 0,!n.disableMultiSort&&i(t))}:void 0,style:{cursor:r.canSort?"pointer":void 0},title:r.canSort?"Toggle SortBy":void 0}]};function Yt(t,e,n,r){if(e.type===u.init)return o({sortBy:[]},t);if(e.type===u.resetSortBy)return o({},t,{sortBy:r.initialState.sortBy||[]});if(e.type===u.clearSortBy)return o({},t,{sortBy:t.sortBy.filter((function(t){return t.id!==e.columnId}))});if(e.type===u.setSortBy)return o({},t,{sortBy:e.sortBy});if(e.type===u.toggleSortBy){var i,a=e.columnId,c=e.desc,l=e.multi,s=r.allColumns,f=r.disableMultiSort,p=r.disableSortRemove,d=r.disableMultiRemove,h=r.maxMultiSortColCount,m=void 0===h?Number.MAX_SAFE_INTEGER:h,g=t.sortBy,v=s.find((function(t){return t.id===a})).sortDescFirst,y=g.find((function(t){return t.id===a})),b=g.findIndex((function(t){return t.id===a})),w=null!=c,x=[];return"toggle"!=(i=!f&&l?y?"toggle":"add":b!==g.length-1||1!==g.length?"replace":y?"toggle":"replace")||p||w||l&&d||!(y&&y.desc&&!v||!y.desc&&v)||(i="remove"),"replace"===i?x=[{id:a,desc:w?c:v}]:"add"===i?(x=[].concat(g,[{id:a,desc:w?c:v}])).splice(0,x.length-m):"toggle"===i?x=g.map((function(t){return t.id===a?o({},t,{desc:w?c:!y.desc}):t})):"remove"===i&&(x=g.filter((function(t){return t.id!==a}))),o({},t,{sortBy:x})}}function Xt(t){var n=t.data,r=t.rows,o=t.flatRows,i=t.allColumns,a=t.orderByFn,c=void 0===a?Kt:a,l=t.sortTypes,s=t.manualSortBy,f=t.defaultCanSort,d=t.disableSortBy,h=t.flatHeaders,g=t.state.sortBy,y=t.dispatch,w=t.plugins,x=t.getHooks,_=t.autoResetSortBy,S=void 0===_||_;m(w,["useFilters","useGlobalFilter","useGroupBy","usePivotColumns"],"useSortBy");var k=e.useCallback((function(t){y({type:u.setSortBy,sortBy:t})}),[y]),O=e.useCallback((function(t,e,n){y({type:u.toggleSortBy,columnId:t,desc:e,multi:n})}),[y]),E=v(t);h.forEach((function(t){var e=t.accessor,n=t.canSort,r=t.disableSortBy,o=t.id,i=e?R(!0!==r&&void 0,!0!==d&&void 0,!0):R(f,n,!1);t.canSort=i,t.canSort&&(t.toggleSortBy=function(e,n){return O(t.id,e,n)},t.clearSortBy=function(){y({type:u.clearSortBy,columnId:t.id})}),t.getSortByToggleProps=p(x().getSortByToggleProps,{instance:E(),column:t});var a=g.find((function(t){return t.id===o}));t.isSorted=!!a,t.sortedIndex=g.findIndex((function(t){return t.id===o})),t.isSortedDesc=t.isSorted?a.desc:void 0}));var z=e.useMemo((function(){if(s||!g.length)return[r,o];var t=[],e=g.filter((function(t){return i.find((function(e){return e.id===t.id}))}));return[function n(r){var o=c(r,e.map((function(t){var e=i.find((function(e){return e.id===t.id}));if(!e)throw new Error("React-Table: Could not find a column with id: "+t.id+" while sorting");var n=e.sortType,r=C(n)||(l||{})[n]||Zt[n];if(!r)throw new Error("React-Table: Could not find a valid sortType of '"+n+"' for column '"+t.id+"'.");return function(e,n){return r(e,n,t.id,t.desc)}})),e.map((function(t){var e=i.find((function(e){return e.id===t.id}));return e&&e.sortInverted?t.desc:!t.desc})));return o.forEach((function(e){t.push(e),e.subRows&&0!==e.subRows.length&&(e.subRows=n(e.subRows))})),o}(r),t]}),[s,g,r,o,i,c,l]),j=z[0],L=z[1],P=v(S);b((function(){P()&&y({type:u.resetSortBy})}),[s?null:n]),Object.assign(t,{preSortedRows:r,preSortedFlatRows:o,sortedRows:j,sortedFlatRows:L,rows:j,flatRows:L,setSortBy:k,toggleSortBy:O})}function Kt(t,e,n){return[].concat(t).sort((function(t,r){for(var o=0;ot.pageIndex?l=-1===i?a.length>=t.pageSize:c-1),l?o({},t,{pageIndex:c}):t}if(e.type===u.setPageSize){var s=e.pageSize,f=t.pageSize*t.pageIndex;return o({},t,{pageIndex:Math.floor(f/s),pageSize:s})}}function te(t){var n=t.rows,r=t.autoResetPage,o=void 0===r||r,i=t.manualExpandedKey,a=void 0===i?"expanded":i,c=t.plugins,l=t.pageCount,s=t.paginateExpandedRows,f=void 0===s||s,p=t.expandSubRows,d=void 0===p||p,h=t.state,g=h.pageSize,y=h.pageIndex,w=h.expanded,x=h.globalFilter,_=h.filters,S=h.groupBy,k=h.sortBy,O=t.dispatch,E=t.data,R=t.manualPagination;m(c,["useGlobalFilter","useFilters","useGroupBy","useSortBy","useExpanded"],"usePagination");var C=v(o);b((function(){C()&&O({type:u.resetPage})}),[O,R?null:E,x,_,S,k]);var z=R?l:Math.ceil(n.length/g),L=e.useMemo((function(){return z>0?[].concat(new Array(z)).fill(null).map((function(t,e){return e})):[]}),[z]),P=e.useMemo((function(){var t;if(R)t=n;else{var e=g*y,r=e+g;t=n.slice(e,r)}return f?t:j(t,{manualExpandedKey:a,expanded:w,expandSubRows:d})}),[d,w,a,R,y,g,f,n]),T=y>0,I=-1===z?P.length>=g:y-1&&i.push(o.splice(e,1)[0])};o.length&&r.length;)a();return[].concat(i,o)}function je(t){var n=t.dispatch;t.setColumnOrder=e.useCallback((function(t){return n({type:u.setColumnOrder,columnOrder:t})}),[n])}Re.pluginName="useColumnOrder",s.canResize=!0,u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize";var Le=function(t){t.getResizerProps=[Pe],t.getHeaderProps.push({style:{position:"relative"}}),t.stateReducers.push(Te),t.useInstance.push(Ae),t.useInstanceBeforeDimensions.push(Ie)},Pe=function(t,e){var n=e.instance,r=e.header,o=n.dispatch,i=function(t,e){var n=!1;if("touchstart"===t.type){if(t.touches&&t.touches.length>1)return;n=!0}var r,i,a=function(t){var e=[];return function t(n){n.columns&&n.columns.length&&n.columns.map(t),e.push(n)}(t),e}(e).map((function(t){return[t.id,t.totalWidth]})),c=n?Math.round(t.touches[0].clientX):t.clientX,l=function(){window.cancelAnimationFrame(r),r=null,o({type:u.columnDoneResizing})},s=function(){window.cancelAnimationFrame(r),r=null,o({type:u.columnResizing,clientX:i})},f=function(t){i=t,r||(r=window.requestAnimationFrame(s))},p={mouse:{moveEvent:"mousemove",moveHandler:function(t){return f(t.clientX)},upEvent:"mouseup",upHandler:function(t){document.removeEventListener("mousemove",p.mouse.moveHandler),document.removeEventListener("mouseup",p.mouse.upHandler),l()}},touch:{moveEvent:"touchmove",moveHandler:function(t){return t.cancelable&&(t.preventDefault(),t.stopPropagation()),f(t.touches[0].clientX),!1},upEvent:"touchend",upHandler:function(t){document.removeEventListener(p.touch.moveEvent,p.touch.moveHandler),document.removeEventListener(p.touch.upEvent,p.touch.moveHandler),l()}}},d=n?p.touch:p.mouse,h=!!function(){if("boolean"==typeof I)return I;var t=!1;try{var e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){t=!1}return I=t}()&&{passive:!1};document.addEventListener(d.moveEvent,d.moveHandler,h),document.addEventListener(d.upEvent,d.upHandler,h),o({type:u.columnStartResizing,columnId:e.id,columnWidth:e.totalWidth,headerIdWidths:a,clientX:c})};return[t,{onMouseDown:function(t){return t.persist()||i(t,r)},onTouchStart:function(t){return t.persist()||i(t,r)},style:{cursor:"col-resize"},draggable:!1,role:"separator"}]};function Te(t,e){if(e.type===u.init)return o({columnResizing:{columnWidths:{}}},t);if(e.type===u.resetResize)return o({},t,{columnResizing:{columnWidths:{}}});if(e.type===u.columnStartResizing){var n=e.clientX,r=e.columnId,i=e.columnWidth,a=e.headerIdWidths;return o({},t,{columnResizing:o({},t.columnResizing,{startX:n,headerIdWidths:a,columnWidth:i,isResizingColumn:r})})}if(e.type===u.columnResizing){var c=e.clientX,l=t.columnResizing,s=l.startX,f=l.columnWidth,p=l.headerIdWidths,d=(c-s)/f,h={};return(void 0===p?[]:p).forEach((function(t){var e=t[0],n=t[1];h[e]=Math.max(n+n*d,0)})),o({},t,{columnResizing:o({},t.columnResizing,{columnWidths:o({},t.columnResizing.columnWidths,{},h)})})}return e.type===u.columnDoneResizing?o({},t,{columnResizing:o({},t.columnResizing,{startX:null,isResizingColumn:null})}):void 0}Le.pluginName="useResizeColumns";var Ie=function(t){var e=t.flatHeaders,n=t.disableResizing,r=t.getHooks,o=t.state.columnResizing,i=v(t);e.forEach((function(t){var e=R(!0!==t.disableResizing&&void 0,!0!==n&&void 0,!0);t.canResize=e,t.width=o.columnWidths[t.id]||t.originalWidth||t.width,t.isResizing=o.isResizingColumn===t.id,e&&(t.getResizerProps=p(r().getResizerProps,{instance:i(),header:t}))}))};function Ae(t){var n=t.plugins,r=t.dispatch,o=t.autoResetResize,i=void 0===o||o,a=t.columns;m(n,["useAbsoluteLayout"],"useResizeColumns");var c=v(i);b((function(){c()&&r({type:u.resetResize})}),[a]);var l=e.useCallback((function(){return r({type:u.resetResize})}),[r]);Object.assign(t,{resetResizing:l})}var Ne={position:"absolute",top:0},De=function(t){t.getTableBodyProps.push(Ge),t.getRowProps.push(Ge),t.getHeaderGroupProps.push(Ge),t.getFooterGroupProps.push(Ge),t.getHeaderProps.push((function(t,e){var n=e.column;return[t,{style:o({},Ne,{left:n.totalLeft+"px",width:n.totalWidth+"px"})}]})),t.getCellProps.push((function(t,e){var n=e.cell;return[t,{style:o({},Ne,{left:n.column.totalLeft+"px",width:n.column.totalWidth+"px"})}]})),t.getFooterProps.push((function(t,e){var n=e.column;return[t,{style:o({},Ne,{left:n.totalLeft+"px",width:n.totalWidth+"px"})}]}))};De.pluginName="useAbsoluteLayout";var Ge=function(t,e){return[t,{style:{position:"relative",width:e.instance.totalColumnsWidth+"px"}}]},Me={display:"inline-block",boxSizing:"border-box"},Fe=function(t,e){return[t,{style:{display:"flex",width:e.instance.totalColumnsWidth+"px"}}]},Be=function(t){t.getRowProps.push(Fe),t.getHeaderGroupProps.push(Fe),t.getFooterGroupProps.push(Fe),t.getHeaderProps.push((function(t,e){var n=e.column;return[t,{style:o({},Me,{width:n.totalWidth+"px"})}]})),t.getCellProps.push((function(t,e){var n=e.cell;return[t,{style:o({},Me,{width:n.column.totalWidth+"px"})}]})),t.getFooterProps.push((function(t,e){var n=e.column;return[t,{style:o({},Me,{width:n.totalWidth+"px"})}]}))};function He(t){t.getTableProps.push(We),t.getRowProps.push(Ue),t.getHeaderGroupProps.push(Ue),t.getFooterGroupProps.push(Ue),t.getHeaderProps.push(qe),t.getCellProps.push(Ze),t.getFooterProps.push($e)}Be.pluginName="useBlockLayout",He.pluginName="useFlexLayout";var We=function(t,e){return[t,{style:{minWidth:e.instance.totalColumnsMinWidth+"px"}}]},Ue=function(t,e){return[t,{style:{display:"flex",flex:"1 0 auto",minWidth:e.instance.totalColumnsMinWidth+"px"}}]},qe=function(t,e){var n=e.column;return[t,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]},Ze=function(t,e){var n=e.cell;return[t,{style:{boxSizing:"border-box",flex:n.column.totalFlexWidth+" 0 auto",minWidth:n.column.totalMinWidth+"px",width:n.column.totalWidth+"px"}}]},$e=function(t,e){var n=e.column;return[t,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]};function Ve(t){t.stateReducers.push(Qe),t.getTableProps.push(Ye),t.getHeaderProps.push(Xe),t.getRowProps.push(Ke)}u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize",Ve.pluginName="useGridLayout";var Ye=function(t,e){var n=e.instance;return[t,{style:{display:"grid",gridTemplateColumns:n.visibleColumns.map((function(t){var e;return n.state.gridLayout.columnWidths[t.id]?n.state.gridLayout.columnWidths[t.id]+"px":(null==(e=n.state.columnResizing)?void 0:e.isResizingColumn)?n.state.gridLayout.startWidths[t.id]+"px":"number"==typeof t.width?t.width+"px":t.width})).join(" ")}}]},Xe=function(t,e){var n=e.column;return[t,{id:"header-cell-"+n.id,style:{position:"sticky",gridColumn:"span "+n.totalVisibleHeaderCount}}]},Ke=function(t,e){var n=e.row;return n.isExpanded?[t,{style:{gridColumn:"1 / "+(n.cells.length+1)}}]:[t,{}]};function Qe(t,e,n,r){if(e.type===u.init)return o({gridLayout:{columnWidths:{}}},t);if(e.type===u.resetResize)return o({},t,{gridLayout:{columnWidths:{}}});if(e.type===u.columnStartResizing){var i=e.columnId,a=e.headerIdWidths,c=Je(i);if(void 0!==c){var l=r.visibleColumns.reduce((function(t,e){var n;return o({},t,((n={})[e.id]=Je(e.id),n))}),{}),s=r.visibleColumns.reduce((function(t,e){var n;return o({},t,((n={})[e.id]=e.minWidth,n))}),{}),f=r.visibleColumns.reduce((function(t,e){var n;return o({},t,((n={})[e.id]=e.maxWidth,n))}),{}),p=a.map((function(t){var e=t[0];return[e,Je(e)]}));return o({},t,{gridLayout:o({},t.gridLayout,{startWidths:l,minWidths:s,maxWidths:f,headerIdGridWidths:p,columnWidth:c})})}return t}if(e.type===u.columnResizing){var d=e.clientX,h=t.columnResizing.startX,m=t.gridLayout,g=m.columnWidth,v=m.minWidths,y=m.maxWidths,b=m.headerIdGridWidths,w=(d-h)/g,x={};return(void 0===b?[]:b).forEach((function(t){var e=t[0],n=t[1];x[e]=Math.min(Math.max(v[e],n+n*w),y[e])})),o({},t,{gridLayout:o({},t.gridLayout,{columnWidths:o({},t.gridLayout.columnWidths,{},x)})})}return e.type===u.columnDoneResizing?o({},t,{gridLayout:o({},t.gridLayout,{startWidths:{},minWidths:{},maxWidths:{}})}):void 0}function Je(t){var e,n=null==(e=document.getElementById("header-cell-"+t))?void 0:e.offsetWidth;if(void 0!==n)return n}t._UNSTABLE_usePivotColumns=ee,t.actions=u,t.defaultColumn=s,t.defaultGroupByFn=Bt,t.defaultOrderByFn=Kt,t.defaultRenderer=c,t.emptyRenderer=l,t.ensurePluginOrder=m,t.flexRender=x,t.functionalUpdate=g,t.loopHooks=h,t.makePropGetter=p,t.makeRenderer=w,t.reduceHooks=d,t.safeUseLayoutEffect=y,t.useAbsoluteLayout=De,t.useAsyncDebounce=function(t,n){void 0===n&&(n=0);var o=e.useRef({}),i=v(t),a=v(n);return e.useCallback(function(){var t=r(regeneratorRuntime.mark((function t(){var e,n,u,c=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=c.length,n=new Array(e),u=0;u1?n-1:0),i=1;i=i)&&Object.keys(r.O).every((function(t){return r.O[t](n[c])}))?n.splice(c--,1):(u=!1,i0&&t[s-1][2]>i;s--)t[s]=t[s-1];t[s]=[n,o,i]},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){var t={328:0,72:0};r.O.j=function(e){return 0===t[e]};var e=function(e,n){var o,i,a=n[0],u=n[1],c=n[2],l=0;if(a.some((function(e){return 0!==t[e]}))){for(o in u)r.o(u,o)&&(r.m[o]=u[o]);if(c)var s=c(r)}for(e&&e(n);l