Файловый менеджер - Редактировать - /var/www/xthruster/html/wp-content/plugins/image-optimization/assets/build/admin.js
Назад
!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="},282: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;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(e);try{n.insertRule(t,n.cssRules.length)}catch(t){}}else e.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach((function(t){return t.parentNode&&t.parentNode.removeChild(t)})),this.tags=[],this.ctr=0},t}(),a=Math.abs,u=String.fromCharCode,c=Object.assign;function l(t){return t.trim()}function s(t,e,n){return t.replace(e,n)}function f(t,e){return t.indexOf(e)}function p(t,e){return 0|t.charCodeAt(e)}function d(t,e,n){return t.slice(e,n)}function h(t){return t.length}function m(t){return t.length}function g(t,e){return e.push(t),t}var v=1,y=1,b=0,w=0,x=0,_="";function S(t,e,n,r,o,i,a){return{value:t,root:e,parent:n,type:r,props:o,children:i,line:v,column:y,length:a,return:""}}function k(t,e){return c(S("",null,null,"",null,null,0),t,{length:-t.length},e)}function O(){return x=w>0?p(_,--w):0,y--,10===x&&(y=1,v--),x}function E(){return x=w<b?p(_,w++):0,y++,10===x&&(y=1,v++),x}function R(){return p(_,w)}function z(){return w}function C(t,e){return d(_,t,e)}function j(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function L(t){return v=y=1,b=h(_=t),w=0,[]}function P(t){return _="",t}function I(t){return l(C(w-1,N(91===t?t+2:40===t?t+1:t)))}function T(t){for(;(x=R())&&x<33;)E();return j(t)>2||j(x)>3?"":" "}function A(t,e){for(;--e&&E()&&!(x<48||x>102||x>57&&x<65||x>70&&x<97););return C(t,z()+(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 G(t,e){for(;E()&&t+x!==57&&(t+x!==84||47!==R()););return"/*"+C(e,w-1)+"*"+u(47===t?t:E())}function M(t){for(;!j(R());)E();return C(t,w)}var F="-ms-",D="-moz-",B="-webkit-",H="comm",W="rule",U="decl",q="@keyframes";function Z(t,e){for(var n="",r=m(t),o=0;o<r;o++)n+=e(t[o],o,t,e)||"";return n}function $(t,e,n,r){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case U:return t.return=t.return||t.value;case H:return"";case q:return t.return=t.value+"{"+Z(t.children,r)+"}";case W:t.value=t.props.join(",")}return h(n=Z(t.children,r))?t.return=t.value+"{"+n+"}":""}function V(t){return P(Y("",null,null,null,[""],t=L(t),0,[0],t))}function Y(t,e,n,r,o,i,a,c,l){for(var d=0,m=0,v=a,y=0,b=0,w=0,x=1,_=1,S=1,k=0,C="",j=o,L=i,P=r,N=C;_;)switch(w=k,k=E()){case 40:if(108!=w&&58==p(N,v-1)){-1!=f(N+=s(I(k),"&","&\f"),"&\f")&&(S=-1);break}case 34:case 39:case 91:N+=I(k);break;case 9:case 10:case 13:case 32:N+=T(w);break;case 92:N+=A(z()-1,7);continue;case 47:switch(R()){case 42:case 47:g(K(G(E(),z()),e,n),l);break;default:N+="/"}break;case 123*x:c[d++]=h(N)*S;case 125*x:case 59:case 0:switch(k){case 0:case 125:_=0;case 59+m:-1==S&&(N=s(N,/\f/g,"")),b>0&&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,C,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,C,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,C=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+=I(E())),y=R(),m=v=h(C=N+=M(z())),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;b<r;++b)for(var _=0,k=d(t,g+1,g=a(w=u[b])),O=t;_<y;++_)(O=l(w>0?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 C(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]+=I(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;c<i.length;c++)for(var s=0;s<a.length;s++,l++)t.props[l]=o[c]?i[c].replace(/&\f/g,a[s]):a[s]+" "+i[c]}}},nt=function(t){if("decl"===t.type){var e=t.value;108===e.charCodeAt(0)&&98===e.charCodeAt(2)&&(t.return="",t.value="")}};function rt(t,e){switch(function(t,e){return 45^p(t,0)?(((e<<2^p(t,0))<<2^p(t,1))<<2^p(t,2))<<2^p(t,3):0}(t,e)){case 5103:return B+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return B+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return B+t+D+t+F+t+t;case 6828:case 4268:return B+t+F+t+t;case 6165:return B+t+F+"flex-"+t+t;case 5187:return B+t+s(t,/(\w+).+(:[^]+)/,B+"box-$1$2"+F+"flex-$1$2")+t;case 5443:return B+t+F+"flex-item-"+s(t,/flex-|-self/,"")+t;case 4675:return B+t+F+"flex-line-pack"+s(t,/align-content|flex-|-self/,"")+t;case 5548:return B+t+F+s(t,"shrink","negative")+t;case 5292:return B+t+F+s(t,"basis","preferred-size")+t;case 6060:return B+"box-"+s(t,"-grow","")+B+t+F+s(t,"grow","positive")+t;case 4554:return B+s(t,/([^-])(transform)/g,"$1"+B+"$2")+t;case 6187:return s(s(s(t,/(zoom-|grab)/,B+"$1"),/(image-set)/,B+"$1"),t,"")+t;case 5495:case 3959:return s(t,/(image-set\([^]*)/,B+"$1$`$1");case 4968:return s(s(t,/(.+:)(flex-)?(.*)/,B+"box-pack:$3"+F+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+B+t+t;case 4095:case 3583:case 4068:case 2532:return s(t,/(.+)-inline(.+)/,B+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(h(t)-1-e>6)switch(p(t,e+1)){case 109:if(45!==p(t,e+4))break;case 102:return s(t,/(.+:)(.+)-([^]+)/,"$1"+B+"$2-$3$1"+D+(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"+F+"$2box$3")+t}break;case 5936:switch(p(t,e+11)){case 114:return B+t+F+s(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return B+t+F+s(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return B+t+F+s(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return B+t+F+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+)/,F+"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<e.length;n++)u[e[n]]=!0;c.push(t)}));var l,s,f,p,d=[$,(p=function(t){l.insert(t)},function(t){t.root||(t=t.return)&&p(t)})],h=(s=[et,nt].concat(a,d),f=m(s),function(t,e,n,r){for(var o="",i=0;i<f;i++)o+=s[i](t,e,n,r)||"";return o});o=function(t,e,n,r){l=n,Z(V(t?t+"{"+e.styles+"}":e.styles),h),r&&(g.inserted[e.name]=!0)};var g={key:e,sheet:new i({key:e,container:r,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:u,registered:{},insert:o};return g.sheet.hydrate(c),g};function at(){return at=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},at.apply(this,arguments)}var ut=function(t){var e=new WeakMap;return function(n){if(e.has(n))return e.get(n);var r=t(n);return e.set(n,r),r}};function ct(t,e,n){var r="";return n.split(" ").forEach((function(n){void 0!==t[n]?e.push(t[n]+";"):r+=n+" "})),r}var lt=function(t,e,n){var r=t.key+"-"+e.name;!1===n&&void 0===t.registered[r]&&(t.registered[r]=e.styles)},st=function(t,e,n){lt(t,e,n);var r=t.key+"-"+e.name;if(void 0===t.inserted[e.name]){var o=e;do{t.insert(e===o?"."+r:"",o,t.sheet,!0),o=o.next}while(void 0!==o)}},ft={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function pt(t){var e=Object.create(null);return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}var dt=/[A-Z]|^ms/g,ht=/_EMO_([^_]+?)_([^]*?)_EMO_/g,mt=function(t){return 45===t.charCodeAt(1)},gt=function(t){return null!=t&&"boolean"!=typeof t},vt=pt((function(t){return mt(t)?t:t.replace(dt,"-$&").toLowerCase()})),yt=function(t,e){switch(t){case"animation":case"animationName":if("string"==typeof e)return e.replace(ht,(function(t,e,n){return wt={name:e,styles:n,next:wt},e}))}return 1===ft[t]||mt(t)||"number"!=typeof e||0===e?e:e+"px"};function bt(t,e,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return wt={name:n.name,styles:n.styles,next:wt},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)wt={name:r.name,styles:r.styles,next:wt},r=r.next;return n.styles+";"}return function(t,e,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=bt(t,e,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=e&&void 0!==e[a]?r+=i+"{"+e[a]+"}":gt(a)&&(r+=vt(i)+":"+yt(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=e&&void 0!==e[a[0]]){var u=bt(t,e,a);switch(i){case"animation":case"animationName":r+=vt(i)+":"+u+";";break;default:r+=i+"{"+u+"}"}}else for(var c=0;c<a.length;c++)gt(a[c])&&(r+=vt(i)+":"+yt(i,a[c])+";")}return r}(t,e,n);case"function":if(void 0!==t){var o=wt,i=n(t);return wt=o,bt(t,e,i)}}if(null==e)return n;var a=e[n];return void 0!==a?a:n}var wt,xt=/label:\s*([^\s;\n{]+)\s*(;|$)/g,_t=function(t,e,n){if(1===t.length&&"object"==typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var r=!0,o="";wt=void 0;var i=t[0];null==i||void 0===i.raw?(r=!1,o+=bt(n,e,i)):o+=i[0];for(var a=1;a<t.length;a++)o+=bt(n,e,t[a]),r&&(o+=i[a]);xt.lastIndex=0;for(var u,c="";null!==(u=xt.exec(o));)c+="-"+u[1];var l=function(t){for(var e,n=0,r=0,o=t.length;o>=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)}))},zt=o.createContext({}),Ct=function(){return o.useContext(zt)},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(zt);return t.theme!==e&&(e=jt(e)(t.theme)),o.createElement(zt.Provider,{value:e},t.children)},Pt="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",It=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},Tt=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(zt));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(It,{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)-.*))$/,Gt=pt((function(t){return Nt.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91})),Mt=function(t){return"theme"!==t},Ft=function(t){return"string"==typeof t&&t.charCodeAt(0)>96?Gt:Mt},Dt=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=Dt(e,n,a),l=c||Ft(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<d;h++)p.push(f[h],f[0][h])}var m=Rt((function(t,e,n){var r=s&&t.as||u,a="",f=[],d=t;if(null==t.theme){for(var h in d={},t)d[h]=t[h];d.theme=o.useContext(zt)}"string"==typeof t.className?a=ct(e.registered,f,t.className):null!=t.className&&(a=t.className+" ");var m=_t(p.concat(f),e.registered,d);a+=e.key+"-"+m.name,void 0!==i&&(a+=" "+i);var g=s&&void 0===c?Ft(r):l,v={};for(var y in t)s&&"as"===y||g(y)&&(v[y]=t[y]);return v.className=a,v.ref=n,o.createElement(o.Fragment,null,o.createElement(Bt,{cache:e,serialized:m,isStringTag:"string"==typeof r}),o.createElement(r,v))}));return m.displayName=void 0!==r?r:"Styled("+("string"==typeof u?u:u.displayName||u.name||"Component")+")",m.defaultProps=e.defaultProps,m.__emotion_real=m,m.__emotion_base=u,m.__emotion_styles=p,m.__emotion_forwardProp=c,Object.defineProperty(m,"toString",{value:function(){return"."+i}}),m.withComponent=function(e,r){return t(e,at({},n,r,{shouldForwardProp:Dt(m,r,!0)})).apply(void 0,p)},m}},Wt=n(697),Ut=n.n(Wt),qt=function(t){return t.children};qt.propTypes={children:Ut().node},qt.__name="Header";var Zt=qt,$t=(n(679),function(t,e){var n=arguments;if(null==e||!Ot.call(e,"css"))return o.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=Tt,i[1]=function(t,e){var n={};for(var r in e)Ot.call(e,r)&&(n[r]=e[r]);return n[Pt]=t,n}(t,e);for(var a=2;a<r;a++)i[a]=n[a];return o.createElement.apply(null,i)});function Vt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return _t(e)}var Yt=Ht("div",{target:"e11nhus00"})("width:",(function(t){return t.fullWidth?"100vw":"calc(100% - 16px - 225px)"}),";"),Xt=function(t){var e=t.fullWidth,n=t.children;return $t(Yt,{fullWidth:e},n)};Xt.propTypes={fullWidth:Ut().bool,children:Ut().node},Xt.__name="Content";var Kt=Xt,Qt=Ht("aside",{target:"e1o94q9m0"})({name:"1i30uc2",styles:"width:225px"}),Jt=function(t){var e=t.children;return $t(Qt,null,e)};Jt.propTypes={children:Ut().node},Jt.__name="Sidebar";var te=Jt,ee=Ht("main",{target:"e11mga1l0"})({name:"1p0vzpg",styles:"display:flex;justify-content:space-between;margin-block-start:16px"}),ne=function(t){var e,n,r;return t.children.forEach((function(t){var o,i,a;"Header"===(null==t||null===(o=t.type)||void 0===o?void 0:o.__name)&&(e=t),"Content"===(null==t||null===(i=t.type)||void 0===i?void 0:i.__name)&&(n=t),"Sidebar"===(null==t||null===(a=t.type)||void 0===a?void 0:a.__name)&&(r=t)})),$t(React.Fragment,null,e,r?$t(ee,{className:"wrap"},n,r):$t(ee,{className:"wrap"},n))};ne.propTypes={children:Ut().node},ne.Header=Zt,ne.Content=Kt,ne.Sidebar=te;var re=ne,oe=window.wp.i18n,ie=window.wp.apiFetch,ae=n.n(ie),ue=window.wp.url;function ce(t){return ce="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},ce(t)}function le(t){var e="function"==typeof Map?new Map:void 0;return le=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return se(t,arguments,de(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),pe(r,t)},le(t)}function se(t,e,n){return se=fe()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&pe(o,n.prototype),o},se.apply(null,arguments)}function fe(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function pe(t,e){return pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pe(t,e)}function de(t){return de=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},de(t)}var he=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pe(t,e)}(i,t);var e,n,r,o=(n=i,r=fe(),function(){var t,e=de(n);if(r){var o=de(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ce(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).name="APIError",e}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(le(Error));function me(t){return me="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},me(t)}function ge(){ge=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"==me(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 z(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,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<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(me(e)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),l(S,c,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(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;C(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;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==me(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===me(o)?o:String(o)),r)}var o}var we,xe="/wp/v2",_e="/image-optimizer/v1",Se=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r,o,i,a,u,c,l,s,f,p,d,h,m,g,v,y;return e=t,null,n=[{key:"request",value:(y=ye(ge().mark((function t(e){var n,r,o,i,a,u;return ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.path,o=e.data,i=e.method,a=void 0===i?"POST":i,null!==(n=window)&&void 0!==n&&null!==(n=n.imageOptimizerUserData)&&void 0!==n&&n.isConnectOnFly&&r.includes(_e+"/connect/init")&&(r=r.replace("/init","/authorize")),"GET"!==a||r.startsWith(xe)||(r=(0,ue.addQueryArgs)(r,{io_time:(new Date).getTime()})),t.prev=3,t.next=6,ae()({path:r,method:a,data:o});case 6:if(u=t.sent,!r.startsWith(xe)){t.next=9;break}return t.abrupt("return",u);case 9:if(u.success){t.next=11;break}throw new he(u.data.message);case 11:return t.abrupt("return",u.data);case 14:if(t.prev=14,t.t0=t.catch(3),!(t.t0 instanceof he)){t.next=20;break}throw t.t0;case 20:throw new he(t.t0.message);case 21:case"end":return t.stop()}}),t,null,[[3,14]])}))),function(_x){return y.apply(this,arguments)})},{key:"initConnect",value:(v=ye(ge().mark((function e(){var n,r,o,i,a,u,c,l,s=arguments;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=s.length>0&&void 0!==s[0]?s[0]:"new",u={action:"image_optimizer_connect",wp_rest:null===(n=window)||void 0===n||null===(n=n.imageOptimizerUserData)||void 0===n?void 0:n.wpRestNonce,"image-optimization-connect":null===(r=window)||void 0===r||null===(r=r.imageOptimizerUserData)||void 0===r?void 0:r.authInitNonce},"update"===a&&(u.update_redirect_uri=!0),e.next=5,ae()({path:"/image-optimizer/v1/connect/version",method:"GET"});case 5:return c=e.sent,l="init",2===(null==c||null===(o=c.data)||void 0===o?void 0:o.version)&&(l="authorize"),e.abrupt("return",t.request({method:null!==(i=window)&&void 0!==i&&null!==(i=i.imageOptimizerUserData)&&void 0!==i&&i.isConnectOnFly?"POST":"GET",path:(0,ue.addQueryArgs)("".concat(_e,"/connect/").concat(l),u)}));case 9:case"end":return e.stop()}}),e)}))),function(){return v.apply(this,arguments)})},{key:"clearSession",value:(g=ye(ge().mark((function e(){var n,r,o,i;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(n=window)&&void 0!==n&&null!==(n=n.imageOptimizerUserData)&&void 0!==n&&n.isConnectOnFly){e.next=2;break}return e.abrupt("return",!0);case 2:return e.prev=2,e.next=5,t.request({method:"POST",path:"".concat(_e,"/connect/deactivate_and_disconnect"),data:{wp_rest:null===(r=window)||void 0===r||null===(r=r.imageOptimizerUserData)||void 0===r?void 0:r.wpRestNonce,"image-optimization-deactivate-subscription":null===(o=window)||void 0===o||null===(o=o.imageOptimizerUserData)||void 0===o?void 0:o.authDeactivateNonce,clear_session:!0}});case 5:return i=e.sent,e.abrupt("return",i);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",!1);case 12:case"end":return e.stop()}}),e,null,[[2,9]])}))),function(){return g.apply(this,arguments)})},{key:"disconnect",value:(m=ye(ge().mark((function e(){var n,r,o,i,a,u;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ae()({path:"/image-optimizer/v1/connect/version",method:"GET"});case 2:if(r=e.sent,o="disconnect",2!==(null==r||null===(n=r.data)||void 0===n?void 0:n.version)){e.next=6;break}return e.abrupt("return");case 6:return e.prev=6,e.next=9,t.request({method:"POST",path:"".concat(_e,"/connect/").concat(o),data:{wp_rest:null===(i=window)||void 0===i||null===(i=i.imageOptimizerUserData)||void 0===i?void 0:i.wpRestNonce,"image-optimization-disconnect":null===(a=window)||void 0===a||null===(a=a.imageOptimizerUserData)||void 0===a?void 0:a.authDisconnectNonce}});case 9:return u=e.sent,e.abrupt("return",u);case 13:return e.prev=13,e.t0=e.catch(6),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[6,13]])}))),function(){return m.apply(this,arguments)})},{key:"deactivate",value:(h=ye(ge().mark((function e(n){var r,o,i,a,u;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="deactivate",null!==(r=window)&&void 0!==r&&null!==(r=r.imageOptimizerUserData)&&void 0!==r&&r.isConnectOnFly&&(o="deactivate_and_disconnect"),e.prev=2,e.next=5,t.request({method:"POST",path:"".concat(_e,"/connect/").concat(o),data:{license_key:n,wp_rest:null===(i=window)||void 0===i||null===(i=i.imageOptimizerUserData)||void 0===i?void 0:i.wpRestNonce,"image-optimization-deactivate-subscription":null===(a=window)||void 0===a||null===(a=a.imageOptimizerUserData)||void 0===a?void 0:a.authDeactivateNonce}});case 5:return u=e.sent,e.abrupt("return",u);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",!1);case 12:case"end":return e.stop()}}),e,null,[[2,9]])}))),function(t){return h.apply(this,arguments)})},{key:"activateSubscription",value:(d=ye(ge().mark((function e(n){var r,o;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({method:"POST",path:"".concat(_e,"/connect/activate"),data:{license_key:n,wp_rest:null===(r=window)||void 0===r||null===(r=r.imageOptimizerUserData)||void 0===r?void 0:r.wpRestNonce,"image-optimization-activate-subscription":null===(o=window)||void 0===o||null===(o=o.imageOptimizerUserData)||void 0===o?void 0:o.authActivateNonce}}));case 1:case"end":return e.stop()}}),e)}))),function(t){return d.apply(this,arguments)})},{key:"fetchSubscriptions",value:(p=ye(ge().mark((function e(){var n,r;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({method:"POST",path:"".concat(_e,"/connect/get-subscriptions"),data:{wp_rest:null===(n=window)||void 0===n||null===(n=n.imageOptimizerUserData)||void 0===n?void 0:n.wpRestNonce,"image-optimization-get-subscription":null===(r=window)||void 0===r||null===(r=r.imageOptimizerUserData)||void 0===r?void 0:r.authGetSubscriptionsNonce}}));case 1:case"end":return e.stop()}}),e)}))),function(){return p.apply(this,arguments)})},{key:"getSettings",value:(f=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(xe,"/settings")}));case 1:case"end":return e.stop()}}),e)}))),function(){return f.apply(this,arguments)})},{key:"updateSettings",value:(s=ye(ge().mark((function e(n){return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({method:"PUT",path:"".concat(xe,"/settings"),data:n}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)})},{key:"getStats",value:(l=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,"/stats")}));case 1:case"end":return e.stop()}}),e)}))),function(){return l.apply(this,arguments)})},{key:"removeAllImageBackups",value:(c=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({method:"DELETE",path:"".concat(_e,"/backups"),data:{"image-optimization-remove-backups":null===(n=window)||void 0===n||null===(n=n.imageOptimizerUserData)||void 0===n?void 0:n.removeBackupsNonce}}));case 1:case"end":return e.stop()}}),e)}))),function(){return c.apply(this,arguments)})},{key:"restoreAllImages",value:(u=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,"/backups/restore"),data:{"image-optimization-restore-all":null===(n=window)||void 0===n||null===(n=n.imageOptimizerUserData)||void 0===n?void 0:n.restoreAllImagesNonce}}));case 1:case"end":return e.stop()}}),e)}))),function(){return u.apply(this,arguments)})},{key:"runBulkOptimization",value:(a=ye(ge().mark((function e(){var n,r,o=arguments;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>0&&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"}),ze=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 Ce(t){return Ce="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},Ce(t)}function je(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==Ce(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Ce(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Ce(o)?o:String(o)),r)}var o}function Le(t,e,n){return e&&je(t.prototype,e),n&&je(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var Pe=Le((function t(e){var n=e.id,r=e.level,o=e.message,i=e.actions;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=n,this.level=r,this.message=o,this.actions=i}));function Ie(t){return function(t){if(Array.isArray(t))return Ne(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ae(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 Te(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)||Ae(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 Ae(t,e){if(t){if("string"==typeof t)return Ne(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)?Ne(t,e):void 0}}function Ne(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ge=(0,r.createContext)({}),Me=function(t){var e=t.children,n=(0,r.useState)([]),o=(0,r.useState)([]);return $t(Ge.Provider,{value:{toastNotificationsState:n,generalNotificationsState:o}},e)};Me.propTypes={children:Ut().node};var Fe=function(){var t=Te((0,r.useContext)(Ge).toastNotificationsState,2),e=t[0],n=t[1];return{toastNotifications:e,showToastNotification:function(t){var r=Ie(e);t.id=e.length+1,r.push(t),n(r)},hideToastNotification:function(t){var r=Ie(e),o=r.findIndex((function(e){return e.id===t}));-1!==o&&(r.splice(o,1),n(r))}}},De=function(){var t=Te((0,r.useContext)(Ge).generalNotificationsState,2),e=t[0],n=t[1];return{generalNotifications:e,showGeneralNotification:function(t){var r=Ie(e);if(t.id){if(-1!==r.findIndex((function(e){return e.id===t.id})))return}else t.id=e.length+1;r.push(t),window.scrollTo({top:0,behavior:"smooth"}),n(r)},hideGeneralNotification:function(t){var r=Ie(e),o=r.findIndex((function(e){return e.id===t}));-1!==o&&(r.splice(o,1),n(r))}}};function Be(t){return Be="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},Be(t)}function He(){He=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"==Be(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 z(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,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<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Be(e)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),l(S,c,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(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;C(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<e;n++)r[n]=t[n];return r}var Ve=(0,r.createContext)({}),Ye=function(t){var e=t.children,n=(0,r.useState)({}),o=(0,r.useState)(!1),i=(0,r.useState)(null),a=(0,r.useState)(Re.NOT_STARTED),u=(0,r.useState)([]),c=(0,r.useState)(!1),l=(0,r.useState)(""),s=(0,r.useState)(""),f=(0,r.useState)(Re.NOT_STARTED),p=(0,r.useState)(Re.NOT_STARTED),d=(0,r.useState)(!1);return $t(Ve.Provider,{value:{statsDataState:n,statsLoadingState:o,bulkOptimizationOperationIdState:i,bulkOptimizationStatusState:a,bulkOptimizationImagesState:u,bulkOptimizationImagesLoadingState:c,bulkOptimizationImagesErrorState:l,generalErrorState:s,bulkRestoringState:f,bulkBackupRemovingState:p,backupsExistState:d}},e)};Ye.propTypes={children:Ut().node};var Xe=function(){var t=(0,r.useContext)(Ve),e=t.statsDataState,n=t.statsLoadingState,o=t.bulkOptimizationOperationIdState,i=t.bulkOptimizationStatusState,a=t.bulkOptimizationImagesState,u=t.bulkOptimizationImagesLoadingState,c=t.bulkOptimizationImagesErrorState,l=t.generalErrorState,s=t.bulkRestoringState,f=t.bulkBackupRemovingState,p=t.backupsExistState,d=qe(e,2),h=d[0],m=d[1],g=qe(n,2),v=g[0],y=g[1],b=qe(o,2),w=b[0],x=b[1],_=qe(i,2),S=_[0],k=_[1],O=qe(a,2),E=O[0],R=O[1],z=qe(u,2),C=z[0],j=z[1],L=qe(c,2),P=L[0],I=L[1],T=qe(l,2),A=T[0],N=T[1],G=qe(s,2),M=G[0],F=G[1],D=qe(f,2),B=D[0],H=D[1],W=qe(p,2),U=W[0],q=W[1],Z=function(){var t=Ue(He().mark((function t(){var e;return He().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return y(!0),N(""),t.prev=2,t.next=5,ke.getStats();case 5:(e=t.sent).bulk_optimization_operation_id&&e.bulk_optimization_operation_id!==w&&x(e.bulk_optimization_operation_id),m(e.optimization_stats),k(e.bulk_optimization_status),F(e.bulk_restoring_status),H(e.bulk_backup_removing_status),q(e.backups_exist),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(2),N(t.t0.message);case 17:y(!1);case 18:case"end":return t.stop()}}),t,null,[[2,14]])})));return function(){return t.apply(this,arguments)}}(),$=function(){var t=Ue(He().mark((function t(e){var n;return He().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return j(!0),I(""),t.prev=2,t.next=5,ke.getBulkOptimizationImages(e);case 5:n=t.sent,R((function(t){if(!t.length)return n.images;var e,r=function(t){if(Array.isArray(t))return $e(t)}(e=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||Ze(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return n.images.forEach((function(t){var e=r.findIndex((function(e){return e.id===t.id}));r[e]=t})),r})),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),I(t.t0.message);case 12:j(!1);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(_x){return t.apply(this,arguments)}}();return{stats:h,statsIsLoading:v,bulkOptimizationOperationId:w,bulkOptimizationStatus:S,setBulkOptimizationStatus:k,bulkOptimizationImages:E,setBulkOptimizationImages:R,bulkOptimizationImagesLoading:C,bulkOptimizationImagesError:P,error:A,bulkRestoringStatus:M,setBulkRestoringStatus:F,bulkBackupRemovingStatus:B,setBulkBackupRemovingStatus:H,backupsExist:U,fetchStats:Z,fetchBulkOptimizationImages:$}};function Ke(t){return Ke="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},Ke(t)}function Qe(){Qe=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"==Ke(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 z(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,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<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Ke(e)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),l(S,c,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(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;C(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<e;n++)r[n]=t[n];return r}var rn=function(){var t=Xe().setBulkOptimizationStatus,e=Fe().showToastNotification,n=en((0,r.useState)(!1),2),o=n[0],i=n[1],a=en((0,r.useState)(null),2),u=a[0],c=a[1],l=function(){var e=tn(Qe().mark((function e(){return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i(!0),c(null),e.prev=2,e.next=5,ke.runBulkOptimization(!1);case 5:t(Re.IN_PROGRESS),p(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),c(e.t0.message);case 12:i(!1);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),s=function(){var t=tn(Qe().mark((function t(){return Qe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ke.runBulkOptimization(!0);case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),e(new Pe({level:"error",message:(0,oe.__)("Reoptimization failed","image-optimization"),actions:[{label:(0,oe.__)("Try again","image-optimization"),onClick:s}]}));case 8:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(){return t.apply(this,arguments)}}(),f=function(){var e=tn(Qe().mark((function e(){return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i(!0),c(null),e.prev=2,e.next=5,ke.cancelBulkOptimization();case 5:t(Re.CANCELLED),d(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),c(e.t0.message);case 12:i(!1);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),p=function(){var t=document.querySelector(".image-optimizer__notice--bulk-tip");t&&(t.style.display="block")},d=function(){var t=document.querySelector(".image-optimizer__notice--bulk-tip");t&&(t.style.display="none")};return{loading:o,error:u,runOptimization:l,runReoptimization:s,cancelOptimization:f,hideBulkWPNotice:d}},on=function(){var t=window.imageOptimizerUserData;return"isConnected"in t&&(t.isConnected=Boolean(t.isConnected)),"isActivated"in t&&(t.isActivated=Boolean(t.isActivated)),"isUrlMismatch"in t&&(t.isUrlMismatch=Boolean(t.isUrlMismatch)),"imagesLeft"in t&&(t.imagesLeft=Number(t.imagesLeft)),"isOwner"in t&&(t.isOwner=Boolean(t.isOwner)),"isConnectOnFly"in t&&(t.isConnectOnFly=Boolean(t.isConnectOnFly)),t},an=Object.freeze({SETTINGS:"image-optimization-settings",BULK_OPTIMIZATION:"image-optimization-bulk-optimization"}),un=Object.freeze({SPEED:2,FOREGROUND_COLOR:"#D9D9D9"}),cn="https://go.elementor.com/io-panel-upgrade/",ln=["as","children","variant"];function sn(){return sn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},sn.apply(this,arguments)}var fn=function(t){return Vt("color:",t.palette.text.default,";font-family:",t.fonts.default,";font-size:14px;font-style:normal;font-weight:400;line-height:150%;","","")},pn={h4:{name:"18b6qqh",styles:"font-size:24px;font-weight:700;line-height:130%"},h6:{name:"bfkuon",styles:"font-size:18px;font-weight:700;line-height:130%"},subtitle1:{name:"jfk0b9",styles:"font-weight:700;line-height:130%"}},dn=function(t){var e=t.as,n=t.children,r=t.variant,o=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<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,ln),i=Ct(),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<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},yn.apply(this,arguments)}var bn=function(t){var e=t.children,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<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=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:100%;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,zn=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;}@media screen and (max-width: 768px){justify-content:space-between;width:auto;padding:16px 50px;}"),Cn=Ht("div",{target:"eo04e8w4"})({name:"1u6n871",styles:"display:flex;flex-direction:column;justify-content:center;align-items:flex-start"}),jn=Ht(Cn,{target:"eo04e8w3"})("width:50%;align-items:center;justify-content:",(function(t){return"absolute"===t.type?"flex-end":"center"}),";@media screen and (max-width: 1120px){width:auto;}"),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(Cn,{target:"eo04e8w1"})("width:45%;margin-inline-start:10px;@media screen and (max-width: 1120px){width:auto;}",(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"}),";"),In=Ht("hr",{target:"eo04e8w0"})("border:0.5px solid ",(function(t){return t.theme.palette.border.grey}),";width:100%;"),Tn=(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(zn,{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(In,null),$t(hn,null,c)),l))}));Tn.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=Tn,Nn=["isNative","isPink"];var Gn=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}),";}"),Mn=Ht(Gn,{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;"),Fn=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}),";}"),Dn=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<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,Nn);return $t(n?Mn:e?Gn:Fn,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)},Hn="active",Wn="expired",Un="exceeded",qn="not_connected",Zn="not_activated",$n="url_mismatch",Vn="error",Yn=function(){var t=on(),e=t.isConnected,n=t.isActivated,r=t.isUrlMismatch,o=t.planData,i=t.imagesLeft;if(r)return $n;if(!e)return qn;if(e&&!n)return Zn;if(!o)return Vn;var a=o.status;return 0===i?Un:"active"===a?Hn:Wn};function Xn(t){return Xn="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},Xn(t)}function Kn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==Xn(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Xn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Xn(o)?o:String(o)),r)}var o}var Qn="image-optimizer/auth/activation-modal/open",Jn="image-optimizer/auth/url-mismatch-modal/open",tr=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"dispatch",value:function(t){var e=new Event(t);document.dispatchEvent(e)}},{key:"listen",value:function(t,e){document.addEventListener(t,(function(){return e.apply(void 0,arguments)}))}}],null&&Kn(e.prototype,null),n&&Kn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),er=tr;function nr(t){return nr="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},nr(t)}function rr(){rr=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"==nr(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 z(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,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<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(nr(e)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),l(S,c,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(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;C(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 or(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 ir(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){or(i,r,o,a,u,"next",t)}function u(t){or(i,r,o,a,u,"throw",t)}a(void 0)}))}}var ar=function(){var t=on(),e=t.isActivated,n=t.licenseKey,r=function(){var t=ir(rr().mark((function t(){var e;return rr().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=ir(rr().mark((function t(){return rr().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=ir(rr().mark((function t(){return rr().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(){window.location.href=(0,ue.addQueryArgs)(window.location.href,{action:"connect"})}),300);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return{redirectToConnect:r,sendActivationEvent:function(){er.dispatch(Qn)},sendUrlMismatchEvent:function(){er.dispatch(Jn)},getConnectLink:o,switchUser:i}},ur=function(){var t=on().planData,e=ar(),n=e.redirectToConnect,r=e.sendActivationEvent,o=e.sendUrlMismatchEvent,i=Yn();return $n===i?$t(Dn,{type:"button",className:"image-optimization-stats-connect-button",variant:"primary",onClick:o,isNative:!0,isPink:!0},(0,oe.__)("Fix mismatched URL","image-optimization")):qn===i?$t(Dn,{type:"button",className:"image-optimization-stats-connect-button",variant:"primary",onClick:n,isNative:!0,isPink:!0},(0,oe.__)("Connect to start","image-optimization")):Zn===i?$t(Dn,{type:"button",variant:"primary",onClick:r,isNative:!0,isPink:!0},(0,oe.__)("Activate to start","image-optimization")):t?t.status===Wn?$t(Dn,{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(Dn,{type:"button",variant:"primary",href:cn,isNative:!0,isPink:!0,target:"_blank",rel:"noopener noreferrer"},(0,oe.__)("Upgrade Plan","image-optimization")):$t("div",null)},cr=function(){return cr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},cr.apply(this,arguments)},lr=function(t){var e=t.animate,n=void 0===e||e,r=t.animateBegin,i=t.backgroundColor,a=void 0===i?"#f5f6f7":i,u=t.backgroundOpacity,c=void 0===u?1:u,l=t.baseUrl,s=void 0===l?"":l,f=t.children,p=t.foregroundColor,d=void 0===p?"#eee":p,h=t.foregroundOpacity,m=void 0===h?1:h,g=t.gradientRatio,v=void 0===g?2:g,y=t.gradientDirection,b=void 0===y?"left-right":y,w=t.uniqueKey,x=t.interval,_=void 0===x?.25:x,S=t.rtl,k=void 0!==S&&S,O=t.speed,E=void 0===O?1.2:O,R=t.style,z=void 0===R?{}:R,C=t.title,j=void 0===C?"Loading...":C,L=t.beforeMask,P=void 0===L?null:L,I=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}(t,["animate","animateBegin","backgroundColor","backgroundOpacity","baseUrl","children","foregroundColor","foregroundOpacity","gradientRatio","gradientDirection","uniqueKey","interval","rtl","speed","style","title","beforeMask"]),T=w||Math.random().toString(36).substring(6),A=T+"-diff",N=T+"-animated-diff",G=T+"-aria",M=k?{transform:"scaleX(-1)"}:null,F="0; "+_+"; 1",D=E+"s",B="top-bottom"===b?"rotate(90)":void 0;return(0,o.createElement)("svg",cr({"aria-labelledby":G,role:"img",style:cr(cr({},z),M)},I),j?(0,o.createElement)("title",{id:G},j):null,P&&(0,o.isValidElement)(P)?P:null,(0,o.createElement)("rect",{role:"presentation",x:"0",y:"0",width:"100%",height:"100%",clipPath:"url("+s+"#"+A+")",style:{fill:"url("+s+"#"+N+")"}}),(0,o.createElement)("defs",null,(0,o.createElement)("clipPath",{id:A},f),(0,o.createElement)("linearGradient",{id:N,gradientTransform:B},(0,o.createElement)("stop",{offset:"0%",stopColor:a,stopOpacity:c},n&&(0,o.createElement)("animate",{attributeName:"offset",values:-v+"; "+-v+"; 1",keyTimes:F,dur:D,repeatCount:"indefinite",begin:r})),(0,o.createElement)("stop",{offset:"50%",stopColor:d,stopOpacity:m},n&&(0,o.createElement)("animate",{attributeName:"offset",values:-v/2+"; "+-v/2+"; "+(1+v/2),keyTimes:F,dur:D,repeatCount:"indefinite",begin:r})),(0,o.createElement)("stop",{offset:"100%",stopColor:a,stopOpacity:c},n&&(0,o.createElement)("animate",{attributeName:"offset",values:"0; 0; "+(1+v),keyTimes:F,dur:D,repeatCount:"indefinite",begin:r})))))},sr=function(t){return t.children?(0,o.createElement)(lr,cr({},t)):(0,o.createElement)(fr,cr({},t))},fr=function(t){return(0,o.createElement)(sr,cr({viewBox:"0 0 476 124"},t),(0,o.createElement)("rect",{x:"48",y:"8",width:"88",height:"6",rx:"3"}),(0,o.createElement)("rect",{x:"48",y:"26",width:"52",height:"6",rx:"3"}),(0,o.createElement)("rect",{x:"0",y:"56",width:"410",height:"6",rx:"3"}),(0,o.createElement)("rect",{x:"0",y:"72",width:"380",height:"6",rx:"3"}),(0,o.createElement)("rect",{x:"0",y:"88",width:"178",height:"6",rx:"3"}),(0,o.createElement)("circle",{cx:"20",cy:"20",r:"20"}))},pr=sr,dr=Ht("div",{target:"e4bhht70"})("display:flex;justify-content:center;align-items:center;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;}"),hr=(0,r.memo)((function(){return $t(pr,{speed:un.SPEED,foregroundColor:un.FOREGROUND_COLOR,height:127},$t("path",{d:"M34 42a4 4 0 0 0-4 4v8a4 4 0 0 0 4 4h32a4 4 0 0 0 4-4v-8a4 4 0 0 0-4-4H34Z"}),$t("path",{fillRule:"evenodd",d:"M100 50c0 27.614-22.386 50-50 50S0 77.614 0 50 22.386 0 50 0s50 22.386 50 50Zm-90 0c0 22.091 17.909 40 40 40s40-17.909 40-40-17.909-40-40-40-40 17.909-40 40Z",clipRule:"evenodd"}),$t("path",{d:"M157 37a4 4 0 0 0-4 4v8a4 4 0 0 0 4 4h104a4 4 0 0 0 4-4v-8a4 4 0 0 0-4-4H157ZM157 75a4 4 0 0 0-4 4v8a4 4 0 0 0 4 4h120a4 4 0 0 0 4-4v-8a4 4 0 0 0-4-4H157ZM14 111a4 4 0 0 0-4 4v8a4 4 0 0 0 4 4h72a4 4 0 0 0 4-4v-8a4 4 0 0 0-4-4H14ZM366 63H137v1h229v-1Z"}))})),mr=(0,r.memo)((function(){return $t(pr,{speed:un.SPEED,foregroundColor:un.FOREGROUND_COLOR,height:90},$t("path",{d:"M171 4a4 4 0 0 1 4-4h104a4 4 0 0 1 4 4v8a4 4 0 0 1-4 4H175a4 4 0 0 1-4-4V4ZM123 19v11H0V19h123ZM379 26H150v1h229v-1ZM22 78a4 4 0 0 1 4-4h72a4 4 0 0 1 4 4v8a4 4 0 0 1-4 4H26a4 4 0 0 1-4-4v-8ZM171 42a4 4 0 0 1 4-4h120a4 4 0 0 1 4 4v8a4 4 0 0 1-4 4H175a4 4 0 0 1-4-4v-8Z"}))})),gr=(0,r.memo)((function(t){var e=t.isOwner,n=e?3:2;return $t(React.Fragment,null,$t(dr,{columns:n},$t(hr,null)),$t(dr,{columns:n},$t(hr,null)),e&&$t(dr,{columns:n},$t(mr,null)))}));gr.propTypes={isOwner:Ut().bool.isRequired};var vr=gr,yr=Ht("div",{target:"e17a0xp02"})("display:flex;justify-content:center;align-items:center;flex-direction:column;background-color:",(function(t){return t.theme.palette.background.default}),";position:absolute;inset:0;"),br=Ht(hn,{target:"e17a0xp01"})({name:"ocysru",styles:"margin-block-end:9px"}),wr=Ht(hn,{target:"e17a0xp00"})({name:"19m435s",styles:"margin-block-start:0"}),xr=function(t){var e=t.onTryAgainClick;return $t(yr,null,$t(br,{variant:"subtitle1",as:"h2"},(0,oe.__)("We couldn't load your stats.","image-optimization")),$t(wr,{as:"p"},(0,oe.__)("It's probably a temporary glitch.","image-optimization")),$t(Dn,{variant:"secondary",onClick:e},(0,oe.__)("Try again","image-optimization")))};xr.propTypes={onTryAgainClick:Ut().func.isRequired};var _r=xr;function Sr(t){return Sr="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},Sr(t)}function kr(){return kr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},kr.apply(this,arguments)}function Or(){Or=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"==Sr(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 z(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,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<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Sr(e)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),l(S,c,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(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;C(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 Er(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 Rr=Ht("div",{target:"e5t2zyp0"})("display:flex;background-color:",(function(t){return t.theme.palette.background.default}),";position:relative;min-height:161px;@media screen and (max-width: 768px){flex-direction:column;height:auto;}"),zr=function(t){var e=t.isOwner;return $t(Rr,null,$t(vr,{isOwner:e}))},Cr=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().planData,e=Yn();return[qn,Zn,$n,Vn].includes(e)?{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(ur,null)}:{type:"absolute",value:100-t.used_quota/t.quota*100,min:0,max:t.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"),t.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(t.quota-t.used_quota,"/").concat(t.quota))),actionButton:$t(ur,null)}}(),v=function(){var t,e=(t=Or().mark((function t(){return Or().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){Er(i,r,o,a,u,"next",t)}function u(t){Er(i,r,o,a,u,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}(),y=(0,r.useDeferredValue)(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:Math.min(i,100),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?Math.max(t,0):(0,oe.__)("N/A","image-optimization")),secondRow:(0,oe.sprintf)( // translators: %s: Images count (0,oe.__)("Unoptimized: %s","image-optimization"),null!==t?Math.max(o,0):(0,oe.__)("N/A","image-optimization")),actionButton:u&&o>0&&c>0&&$t(Dn,{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(zr,{isOwner:c});if(h)return $t(Rr,null,$t(vr,{isOwner:c}),$t(_r,{onTryAgainClick:m}));var x=[b,w];return(!u||u&&c)&&x.push(g),$t(r.Suspense,{fallback:$t(zr,{isOwner:c})},$t(Rr,null,x.map((function(t,e){return $t(An,kr({key:"optimization-stats-item-".concat(e),columns:x.length},t))}))))};Cr.propTypes={page:Ut().string};var jr=Cr;function Lr(t){return Lr="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},Lr(t)}function Pr(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 Ir(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)?Ir(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 Ir(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Tr=(0,r.createContext)({}),Ar=function(t){var e=t.children,n=(0,r.useState)({}),o=(0,r.useState)({});return $t(Tr.Provider,{value:{formDataState:n,lastUpdateState:o}},e)};Ar.propTypes={children:Ut().node};var Nr=function(){var t=(0,r.useContext)(Tr),e=t.formDataState,n=t.lastUpdateState,o=Pr(e,2),i=o[0],a=o[1],u=Pr(n,2)[1];return{getControlData:function(t){return i&&t in i?i[t]:null},setControlData:function(t,e){var n=JSON.parse(JSON.stringify(i));n[t]=e,u(function(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Lr(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Lr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Lr(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},t,e)),a(n)}}},Gr=["title","subtitle","children","showUpdated","error","showDivider"];function Mr(){return Mr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Mr.apply(this,arguments)}var Fr=Ht(mn.PanelRow,{target:"efkj2fw5"})("justify-content:flex-start;margin-block-start:16px;padding-inline-start:7px;padding-inline-end:7px;padding-block-end:16px;",(function(t){var e=t.showDivider,n=t.theme;return e&&"\n\t\tborder-block-end: 1px solid ".concat(n.palette.border.grey,";\n\t")})," &.components-panel__row--advanced-action{padding-inline-start:21px;padding-inline-end:21px;}"),Dr=Ht("div",{target:"efkj2fw4"})({name:"h3t0bk",styles:"display:flex;flex-direction:column;align-self:flex-start;width:300px;margin-inline-end:50px"}),Br=Ht(hn,{target:"efkj2fw3"})("color:",(function(t){return t.theme.palette.text.primary}),";&:not(:disabled){margin-block-end:9px;}"),Hr=Ht(hn,{target:"efkj2fw2"})("color:",(function(t){return t.theme.palette.text.tertiary}),";"),Wr=Ht(hn,{target:"efkj2fw1"})("color:",(function(t){return t.theme.palette.error.main}),";margin-inline-start:16px;"),Ur=Ht(hn,{target:"efkj2fw0"})("color:",(function(t){return t.theme.palette.badge.text.success}),";margin-inline-start:16px;"),qr=function(t){var e=t.title,n=t.subtitle,r=t.children,o=t.showUpdated,i=t.error,a=t.showDivider,u=void 0===a||a,c=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<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,Gr);return $t(Fr,Mr({showDivider:u},c),$t(Dr,null,e&&$t(Br,{variant:"subtitle1",as:"h3"},e),$t(Hr,null,n)),$t("div",null,r),i&&$t(Wr,null,i),o&&$t(Ur,null,(0,oe.__)("Setting saved!","image-optimization")))};qr.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 Zr=qr,$r=function(t){var e=t.message,n=t.supportiveText;return $t("p",null,$t("b",null,e)," ",$t("span",null,n))},Vr=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);}'}),Yr=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(Vr,{title:i,initialOpen:o},n)};Yr.propTypes={title:Ut().string,children:Ut().node,initialOpen:Ut().bool};var Xr=Yr,Kr=Ht(mn.Disabled,{target:"e1f5yh580"})({name:"o9ww1u",styles:"opacity:0.5"}),Qr=function(t){var e=t.isDisabled,n=t.children;return $t(Kr,{isDisabled:e},n)},Jr=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;}"),to=function(t){var e=t.header,n=t.children,r=$t(hn,{variant:"h6"},e);return $t(Jr,{header:r},n)};to.propTypes={header:Ut().string.isRequired,children:Ut().node};var eo=to,no=function(t){var e=t.children;return $t(eo,{header:(0,oe.__)("Settings","image-optimization")},e)};no.propTypes={children:Ut().node};var ro=no,oo=Ht("span",{target:"e8cyu560"})({name:"96f02t",styles:"display:flex;padding:4px 8px;align-items:center;border-radius:4px;&>svg{margin-inline-end:4px;}"}),io=function(t){return Vt("color:",t.palette.badge.text.success,";background-color:",t.palette.badge.background.success,";&>svg{fill:",t.palette.badge.text.success,";}","","")},ao={success:io,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,";}","","")}},uo=function(t){var e=t.icon,n=t.text,r=t.variant,o=Ct();return $t(oo,{css:Vt((r?ao[r]:io)(o).styles,";","","")},e||"",n)};uo.propTypes={icon:Ut().node,text:Ut().string.isRequired,variant:Ut().oneOf(["success","warning","error"])};var co=uo;function lo(){return lo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},lo.apply(this,arguments)}var so,fo,po=function(t){var e=t.size,n=t.props;return $t(mn.Icon,{icon:$t("svg",lo({width:"8",height:"8"},n),$t("circle",{cx:"4",cy:"4",r:"4"})),size:e})};function ho(t){return ho="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},ho(t)}function mo(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==ho(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ho(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===ho(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var go=Object.freeze((mo(so={},Hn,"success"),mo(so,qn,"warning"),mo(so,Zn,"warning"),mo(so,$n,"error"),mo(so,Vn,"error"),mo(so,Wn,"error"),mo(so,Un,"error"),so)),vo=Object.freeze((mo(fo={},Hn,(0,oe.__)("Active","image-optimization")),mo(fo,qn,(0,oe.__)("Not Connected","image-optimization")),mo(fo,Zn,(0,oe.__)("Not Activated","image-optimization")),mo(fo,$n,(0,oe.__)("Mismatch","image-optimization")),mo(fo,Vn,(0,oe.__)("Connection error","image-optimization")),mo(fo,Wn,(0,oe.__)("Expired","image-optimization")),mo(fo,Un,(0,oe.__)("Quota reached","image-optimization")),fo)),yo=function(t){var e=t.status;return $t(co,{variant:go[e],text:vo[e],icon:$t(po,{size:"8"})})};yo.propTypes={status:Ut().oneOf(Object.keys(go))};var bo=yo,wo=Ht("div",{target:"ezm8g9k1"})({name:"1nsxxnd",styles:"display:flex;align-items:center;&>:first-of-type{margin-inline-end:16px;}"}),xo=Ht(hn,{target:"ezm8g9k0"})("color:",(function(t){return t.theme.palette.text.primary}),";"),_o=function(){var t,e=on().planData,n=Yn();return $t(wo,null,[Un,Hn,Wn].includes(n)&&$t(xo,null,null==e||null===(t=e.subscription_plan)||void 0===t?void 0:t.title),$t(bo,{status:n}))},So=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"}),";}"),ko=function(t){var e=t.id,n=t.options,r=t.label,o=void 0===r?"":r,i=Nr(),a=i.getControlData,u=i.setControlData,c=a(e)||"";if(c)return $t(So,{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:""})}))))};ko.propTypes={id:Ut().string.isRequired,options:Ut().array.isRequired,label:Ut().string};var Oo=ko,Eo=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}),";}"),Ro=function(t){var e=t.id,n=t.label,r=Nr(),o=r.getControlData,i=r.setControlData,a=o(e)||!1;return $t(Eo,{id:e,checked:a,label:n,onChange:function(){i(e,!a)}})};Ro.propTypes={id:Ut().string.isRequired,label:Ut().string.isRequired};var zo=Ro,Co=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;}"}),jo=function(t){var e=t.id,n=t.type,r=void 0===n?"text":n,o=t.label,i=Nr(),a=i.getControlData,u=i.setControlData,c=a(e)||"";return $t(Co,{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}})};jo.propTypes={id:Ut().string.isRequired,type:Ut().oneOf(["number","text","search","email","password","tel","url"]),label:Ut().string};var Lo=jo,Po=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;}'),Io=function(){var t=(0,Nr().getControlData)(zi);return $t(React.Fragment,null,$t(zo,{id:zi,label:(0,oe.__)("Allow large image resizing","image-optimization")}),t&&$t(Po,null,(0,oe.__)("to maximum","image-optimization"),$t(Lo,{id:Ci,type:"number"}),(0,oe.__)("pixels width/height","image-optimization")))},To=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}),";}"),Ao=function(t){var e=t.id,n=t.label,r=Nr(),o=r.getControlData,i=r.setControlData,a=o(e)||!1;return $t(To,{id:e,checked:a,label:n,onChange:function(){i(e,!a)}})};Ao.propTypes={id:Ut().string.isRequired,label:Ut().string.isRequired};var No=Ao;function Go(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Mo=function(){var t,e,n=(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 Go(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)?Go(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.")}()),o=n[0],i=n[1];return{isOpen:o,open:function(){i(!0)},close:function(){i(!1)}}},Fo=["title","isDestructive","onCancel","onClose","onApprove","approveText","children"];function Do(){return Do=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Do.apply(this,arguments)}var Bo=Ht(mn.Modal,{target:"e1yhoqj01"})("font-family:",(function(t){return t.theme.fonts.default}),";"),Ho=Ht("div",{target:"e1yhoqj00"})("display:flex;justify-content:flex-end;margin-block-start:40px;& button:first-of-type{margin-inline-end:13px;color:",(function(t){return t.theme.palette.text.secondary}),";}"),Wo=function(t){var e=t.title,n=t.isDestructive,r=void 0!==n&&n,o=t.onCancel,i=t.onClose,a=t.onApprove,u=t.approveText,c=void 0===u?(0,oe.__)("Submit","image-optimization"):u,l=t.children,s=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<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,Fo);return $t(Bo,Do({title:e,onRequestClose:i},s),$t("div",null,l),$t(Ho,null,$t(Dn,{onClick:o},(0,oe.__)("Cancel","image-optimization")),$t(Dn,{isDestructive:r,variant:"primary",onClick:a},c)))};Wo.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 Uo=Wo;function qo(t){return qo="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},qo(t)}function Zo(){Zo=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"==qo(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 z(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,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<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(qo(e)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),l(S,c,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(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;C(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 $o(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 Vo=function(){var t=Mo(),e=t.isOpen,n=t.open,r=t.close,o=Xe(),i=o.backupsExist,a=o.bulkRestoringStatus,u=o.setBulkRestoringStatus,c=Fe().showToastNotification,l=function(){var t,e=(t=Zo().mark((function t(){return Zo().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){$o(i,r,o,a,u,"next",t)}function u(t){$o(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(Dn,{variant:"primary",isDestructive:!0,onClick:e?r:n,disabled:f},s),e&&$t(Uo,{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"))))},Yo=function(){return imageOptimizerAppSettings};function Xo(){return Xo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xo.apply(this,arguments)}var Ko=function(t){var e=t.size,n=t.props;return $t(mn.Icon,{icon:$t("svg",Xo({width:"20",height:"24"},n),$t("path",{fillRule:"evenodd",d:"m13.99 10.889-3.988 3.418-3.988-3.418.976-1.139 3.012 2.582 3.012-2.582.976 1.139Z",clipRule:"evenodd"})),size:e})},Qo=Ht("button",{target:"e1kawxtg1"})("display:flex;align-items:center;background-color:transparent;border:none;color:",(function(t){return t.theme.palette.text.primary}),";& svg{transform:",(function(t){return t.isOpen?"initial":"rotate(-90deg);"})," margin-inline-end:6px;}&:disabled{color:",(function(t){return t.theme.palette.text.disabled}),";}&:disabled svg{fill:",(function(t){return t.theme.palette.text.disabled}),";}"),Jo=Ht("div",{target:"e1kawxtg0"})("height:",(function(t){return t.isOpen?"initial":"0"}),";overflow:hidden;margin-block-start:10px;margin-inline-start:29px;"),ti=function(t){var e=t.isOpen,n=t.onOpen,r=t.onClose,o=t.title,i=t.disabled,a=t.children;return $t(React.Fragment,null,$t(Qo,{onClick:function(){if(!i)return e?r():n()},isOpen:e,disabled:i},$t(Ko,null),o),$t(Jo,{isOpen:e},a))};ti.propTypes={isOpen:Ut().bool.isRequired,onOpen:Ut().func.isRequired,onClose:Ut().func.isRequired,title:Ut().string.isRequired,disabled:Ut().bool,children:Ut().node};var ei=ti;function ni(t){return ni="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},ni(t)}var ri=["getControlData","setControlData"];function oi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var ii=function(t){var e=t.getControlData,n=t.setControlData;return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?oi(Object(n),!0).forEach((function(e){var r,o,i;r=t,o=e,i=n[e],(o=function(t){var e=function(t,e){if("object"!==ni(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ni(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===ni(e)?e:String(e)}(o))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oi(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({getControlData:function(){return(t=e.apply(void 0,arguments))&&"all"!==t?t.split(","):t;var t},setControlData:function(t,e){return n(t,function(t){return Array.isArray(t)?t.join():t}(e))}},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<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,ri))};function ai(t){return function(t){if(Array.isArray(t))return li(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ci(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 ui(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)||ci(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 ci(t,e){if(t){if("string"==typeof t)return li(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)?li(t,e):void 0}}function li(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var si=Ht("div",{target:"e1ncrsyk0"})('margin-block-start:15px;margin-inline-start:15px;& .components-checkbox-control__input[type="checkbox"]:checked,& .components-checkbox-control__input[type="checkbox"]:indeterminate{background-color:',(function(t){return t.theme.palette.native.blue}),";}& .components-checkbox-control:not(:last-of-type){margin-block-end:12px;}"),fi="all",pi="custom",di=[{label:(0,oe.__)("All Sizes","image-optimization"),value:fi},{label:(0,oe.__)("Custom","image-optimization"),value:pi}],hi=function(){var t,e=Yo().thumbnailSizes,n=ui((0,r.useState)(!1),2),o=n[0],i=n[1],a=ii(Nr()),u=a.getControlData,c=a.setControlData,l=u(Ii);return(0,r.useEffect)((function(){l===fi||o||i(!0),l===fi&&o&&i(!1)}),[]),$t(React.Fragment,null,$t(mn.SelectControl,{id:zi,options:di,value:o?pi:fi,onChange:function(t){return function(t){if(t===fi)return l!==fi&&c(Ii,fi),void i(!1);i(!0)}(t)}}),$t(si,null,$t(ei,{title:(0,oe.__)("Custom sizes","image-optimization"),disabled:!o,isOpen:o,onOpen:function(){i(!0)},onClose:function(){i(!1),c(Ii,fi)}},null===(t=Object.entries(e))||void 0===t?void 0:t.map((function(t){var n,r,o=ui(t,2),i=o[0],a=o[1],u=a.width,s=a.height;return $t(Eo,{key:i,id:i,checked:l===fi||(null==l?void 0:l.includes(i)),label:(n=i,r="".concat(u,"x").concat(s),n=(n=n.charAt(0).toUpperCase()+n.slice(1)).replaceAll("_"," "),"".concat(n," (").concat(r,")")),onChange:function(t){return function(t,n){if(l!==fi){var r=ai(l);n?r.push(t):r.splice(r.findIndex((function(e){return e===t})),1),c(Ii,r)}else{var o=ai(Object.keys(e));c(Ii,o.filter((function(e){return e!==t})))}}(i,t)}})})))))};function mi(t){return mi="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},mi(t)}function gi(){gi=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"==mi(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 z(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,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<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(mi(e)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),l(S,c,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(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;C(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 vi(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 yi=function(){var t=Mo(),e=t.isOpen,n=t.open,r=t.close,o=Xe(),i=o.backupsExist,a=o.bulkBackupRemovingStatus,u=o.setBulkBackupRemovingStatus,c=o.bulkRestoringStatus,l=Fe().showToastNotification,s=function(){var t,e=(t=gi().mark((function t(){return gi().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){vi(i,r,o,a,u,"next",t)}function u(t){vi(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(Dn,{variant:"primary",isDestructive:!0,onClick:e?r:n,disabled:p},f),e&&$t(Uo,{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"))))},bi=Ht("div",{target:"e161r2h60"})("display:flex;align-items:start;&:not(:last-of-type){margin-block-end:20px;}& input{position:relative;top:5px;}& div{display:flex;flex-direction:column;margin-inline-start:16px;}& div label{color:",(function(t){return t.theme.palette.text.primary}),";}& div span{color:",(function(t){return t.theme.palette.text.tertiary}),";}"),wi=function(){var t=Nr(),e=t.getControlData,n=t.setControlData,r=e(Pi);return Ni.map((function(t){return $t(bi,{key:t.id},$t("input",{type:"radio",id:"io-convert-format-field-".concat(t.id),name:Pi,value:t.id,checked:t.id===r,onChange:function(){return e=t.id,void n(Pi,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 xi(t){return xi="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},xi(t)}function _i(){_i=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"==xi(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 z(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,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<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(xi(e)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),l(S,c,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(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;C(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 Si(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 ki(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Si(i,r,o,a,u,"next",t)}function u(t){Si(i,r,o,a,u,"throw",t)}a(void 0)}))}}function Oi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ei="image_optimizer_compression_level",Ri="image_optimizer_optimize_on_upload",zi="image_optimizer_resize_larger_images",Ci="image_optimizer_resize_larger_images_size",ji="image_optimizer_exif_metadata",Li="image_optimizer_original_images",Pi="image_optimizer_convert_to_format",Ii="image_optimizer_custom_sizes",Ti=[Ei],Ai=[{label:(0,oe.__)("Lossless","image-optimization"),value:"lossless",tooltip:(0,oe.__)("Reduces image file sizes without compromising the integrity or quality of your images.","image-optimization")},{label:(0,oe.__)("Lossy","image-optimization"),value:"lossy",tooltip:(0,oe.__)("Maximizes compression to produce lightweight images with smaller file sizes","image-optimization")}],Ni=[{id:"webp",title:(0,oe.__)("WebP","image-optimization"),description:(0,oe.__)("Best for high compatibility.","image-optimization")},{id:"avif",title:(0,oe.__)("AVIF","image-optimization"),description:(0,oe.__)("Offers superior compression.","image-optimization")},{id:"original",title:(0,oe.__)("Keep original format","image-optimization"),description:(0,oe.__)("No changes to the format will be made.","image-optimization")}];function Gi(t){return Gi="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},Gi(t)}function Mi(){Mi=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"==Gi(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 z(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,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<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Gi(e)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),l(S,c,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(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;C(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 Fi(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 Di(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Fi(i,r,o,a,u,"next",t)}function u(t){Fi(i,r,o,a,u,"throw",t)}a(void 0)}))}}function Bi(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 Hi(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)?Hi(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 Hi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Wi=function(t){return Object.keys(t).forEach((function(e){e.startsWith("image_optimizer_")||delete t[e]})),t},Ui=Ht(mn.Panel,{target:"ezomauk0"})({name:"1tmq4qk",styles:"margin-block-start:16px;min-height:50vh;padding:23px"}),qi=(0,r.memo)((function(){return $t(pr,{speed:un.SPEED,foregroundColor:un.FOREGROUND_COLOR,height:222,width:595},$t("path",{d:"M4 0a4 4 0 0 0-4 4v8a4 4 0 0 0 4 4h168a4 4 0 0 0 4-4V4a4 4 0 0 0-4-4H4ZM4 60a4 4 0 0 0-4 4v4a4 4 0 0 0 4 4h168a4 4 0 0 0 4-4v-4a4 4 0 0 0-4-4H4ZM4 162a4 4 0 0 0-4 4v4a4 4 0 0 0 4 4h168a4 4 0 0 0 4-4v-4a4 4 0 0 0-4-4H4ZM4 88a4 4 0 0 0-4 4v4a4 4 0 0 0 4 4h272a4 4 0 0 0 4-4v-4a4 4 0 0 0-4-4H4ZM4 190a4 4 0 0 0-4 4v4a4 4 0 0 0 4 4h272a4 4 0 0 0 4-4v-4a4 4 0 0 0-4-4H4ZM4 108a4 4 0 0 0-4 4v4a4 4 0 0 0 4 4h208a4 4 0 0 0 4-4v-4a4 4 0 0 0-4-4H4ZM4 210a4 4 0 0 0-4 4v4a4 4 0 0 0 4 4h208a4 4 0 0 0 4-4v-4a4 4 0 0 0-4-4H4ZM439 81a4 4 0 0 0-4 4v16a4 4 0 0 0 4 4h112a4 4 0 0 0 4-4V85a4 4 0 0 0-4-4H439ZM439 178a4 4 0 0 0-4 4v24a4 4 0 0 0 4 4h152a4 4 0 0 0 4-4v-24a4 4 0 0 0-4-4H439Z"}))})),Zi=(0,r.memo)((function(t){var e=t.children;return $t(Ui,null,$t(qi,null),e)}));Zi.propTypes={children:Ut().node};var $i=Zi,Vi=Ht("div",{target:"euy8j142"})({name:"18ywltx",styles:"display:flex;justify-content:center;align-items:center;flex-direction:column;margin-block-start:92px"}),Yi=Ht(hn,{target:"euy8j141"})({name:"ocysru",styles:"margin-block-end:9px"}),Xi=Ht(hn,{target:"euy8j140"})({name:"19m435s",styles:"margin-block-start:0"}),Ki=(0,r.memo)((function(t){var e=t.onTryAgainClick;return $t(Vi,null,$t(Yi,{variant:"subtitle1",as:"h2"},(0,oe.__)("Oh! There was a temporary glitch.","image-optimization")),$t(Xi,{as:"p"},(0,oe.__)("No big deal. Wait a moment then try again.","image-optimization")),$t(Dn,{variant:"secondary",onClick:e},(0,oe.__)("Try again","image-optimization")))}));Ki.propTypes={onTryAgainClick:Ut().func.isRequired};var Qi=Ki,Ji=["key","component","alwaysVisible"],ta=["key","component"];function ea(){return ea=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ea.apply(this,arguments)}function na(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<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var ra=function(){var t,e,n,o,i,a,u=(e=(t=(0,r.useContext)(Tr)).formDataState,n=t.lastUpdateState,{formData:(o=Pr(e,2))[0],setFormData:o[1],lastUpdate:Pr(n,1)[0]}),c=u.formData,l=u.setFormData,s=u.lastUpdate,f=Yn(),p=function(){var t=Bi((0,r.useState)(null),2),e=t[0],n=t[1],o=Bi((0,r.useState)(!1),2),i=o[0],a=o[1],u=Bi((0,r.useState)(null),2),c=u[0],l=u[1],s=Bi((0,r.useState)({}),2),f=s[0],p=s[1],d=Bi((0,r.useState)({}),2),h=d[0],m=d[1],g=function(){var t=Di(Mi().mark((function t(){var e;return Mi().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(Wi(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=Di(Mi().mark((function t(e){var n,r;return Mi().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}}(),d=p.data,h=p.isLoading,m=p.fetchingError,g=p.updatedFields,v=p.updatingError,y=p.fetchSettings,b=p.pushSettings,w=p.hideUpdateSuccessMessages,x=p.hideUpdatingErrors,_=De().showGeneralNotification,S=rn().runReoptimization,k=Xe().backupsExist,O=(i=on().isOwner,a=[{key:Ei,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(Oo,{id:Ei,options:Ai})},{key:Ri,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(No,{id:Ri,label:(0,oe.__)("Optimize new uploads","image-optimization")})},{key:zi,title:(0,oe.__)("Resize larger images","image-optimization"),subtitle:(0,oe.__)("This uses one additional credit per image.","image-optimization"),component:$t(Io,null)},{key:ji,title:(0,oe.__)("Clear EXIF Metadata","image-optimization"),subtitle:(0,oe.__)("This refers to date, time, location, etc.","image-optimization"),component:$t(No,{id:ji,label:(0,oe.__)("Clear metadata","image-optimization")})},{key:Li,title:(0,oe.__)("Backup original images","image-optimization"),subtitle:(0,oe.__)("This takes up additional space in your library.","image-optimization"),component:$t(No,{id:Li,label:(0,oe.__)("Backup originals","image-optimization")})},{key:Pi,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(wi,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(hi,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(_o,null),alwaysVisible:!0}),{fields:a}).fields,E=function(){var t,e,n=on(),o=n.isConnected,i=n.isActivated,a=n.subscriptionEmail,u=n.licenseKey,c=n.showResetButton,l=ar().switchUser,s=Fe().showToastNotification,f=(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 Oi(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)?Oi(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.")}()),p=f[0],d=f[1],h=function(){var t=ki(_i().mark((function t(){return _i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return d(!0),t.prev=1,t.next=4,l();case 4:t.next=16;break;case 6:return t.prev=6,t.t0=t.catch(1),t.prev=8,t.next=11,l();case 11:t.next=16;break;case 13:t.prev=13,t.t1=t.catch(8),s(new Pe({level:"error",message:(0,oe.__)("Error while disconnecting","image-optimization"),actions:[{label:(0,oe.__)("Got it","image-optimization"),onClick:function(){}}]}));case 16:d(!1);case 17:case"end":return t.stop()}}),t,null,[[1,6],[8,13]])})));return function(){return t.apply(this,arguments)}}(),m=function(){var t=ki(_i().mark((function t(){return _i().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),s(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)}}(),g=function(){var t=ki(_i().mark((function t(){return _i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ke.clearSession();case 3:location.reload(),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),s(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)}}(),v=[{key:"restore_originals",title:(0,oe.__)("Restore original images","image-optimization"),subtitle:"",component:$t(Vo,null),showDivider:!1},{key:"remove_backups",title:(0,oe.__)("Remove backups permanently","image-optimization"),subtitle:"",component:$t(yi,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(Dn,{variant:"primary",disabled:!o||p,onClick:h},p&&$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(Dn,{variant:"secondary",disabled:!o||!i,onClick:m},(0,oe.__)("Deactivate","image-optimization")),showDivider:!1}];return c&&v.push({key:"reset_connection",subtitle:(0,oe.__)("Having issues with connecting the plugin?","image-optimization"),component:$t(Dn,{variant:"secondary",onClick:g},(0,oe.__)("Reset connect","image-optimization")),showDivider:!1}),{fields:v}}(),R=E.fields,z=Object.keys(v).length,C=new Pe({id:"settings_changed",level:"info",message:$t($r,{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:S,variant:"link",noDefaultClasses:!0}]});return(0,r.useEffect)((function(){y()}),[]),(0,r.useEffect)((function(){d&&l(d)}),[d]),(0,r.useEffect)((function(){Object.keys(s).length&&(b(s),!z&&k&&Ti.includes(Object.keys(s)[0])&&_(C))}),[s]),(0,r.useEffect)((function(){if(z){l(d);var t=setTimeout((function(){x()}),2e3);return function(){return clearTimeout(t)}}}),[v]),(0,r.useEffect)((function(){var t=setTimeout((function(){w()}),2e3);return function(){return clearTimeout(t)}}),[g]),!d&&h?$t($i,null):m?$t($i,null,$t(Qi,{onTryAgainClick:y})):$t(r.Suspense,{fallback:$t($i,null)},$t(ro,null,0!==Object.keys(c).length&&$t(React.Fragment,null,$t(Xr,null,O.map((function(t){var e=t.key,n=t.component,r=t.alwaysVisible,o=na(t,Ji);return $t(Zr,ea({key:e,showUpdated:e in g,error:e in v?v[e]:""},o),[qn,Zn,$n].includes(f)&&!r?$t(Qr,null,n):n)}))),$t(Xr,{title:(0,oe.__)("Advanced actions","image-optimization"),initialOpen:!1},R.map((function(t){var e=t.key,n=t.component,r=na(t,ta);return $t(Zr,ea({className:"components-panel__row--advanced-action",key:e},r),n)}))))))},oa=Ht("div",{target:"eoepye53"})("width:100%;height:8px;margin-block-end:10px;background-color:",(function(t){return t.theme.palette.background.grey}),";"),ia=Ht("div",{target:"eoepye52"})("width:",(function(t){return t.percentage}),"%;height:8px;background-color:",(function(t){return t.theme.palette.primary.light}),";"),aa=Ht("div",{target:"eoepye51"})({name:"a7eilb",styles:"width:100%;margin-block-end:12px;display:flex;justify-content:space-between"}),ua=Ht(hn,{target:"eoepye50"})("color:",(function(t){return t.theme.palette.text.dark}),";"),ca=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(oa,null,$t(ia,{percentage:e})),o&&$t(aa,null,$t(ua,{variant:"subtitle1"},n),$t(ua,{variant:"h6"},"".concat(e,"%")),$t(ua,{variant:"subtitle1"},r)))};ca.propTypes={percentage:Ut().number.isRequired,min:Ut().string,max:Ut().string};var la=ca,sa=["isNative"];var fa=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<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,sa),r=Ct();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)},pa=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(Dn,{variant:"secondary",onClick:r,disabled:Re.CANCELLED===n},(0,oe.__)("Cancel","image-optimization")),$t(Dn,{variant:"primary",disabled:!0},$t(fa,{isNative:!0}),(0,oe.__)("In progress…","image-optimization"))):$t(Dn,{variant:"primary",onClick:o,disabled:e},(0,oe.__)("Start","image-optimization"))};pa.propTypes={disabled:Ut().bool.isRequired,optimizationStatus:Ut().oneOf(Object.values(Re)).isRequired,onCancelOptimization:Ut().func.isRequired,onStartOptimization:Ut().func.isRequired};var da=pa,ha=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;"),ma=Ht("div",{target:"efssyw53"})({name:"1v91bu0",styles:"display:flex;justify-content:flex-end;align-items:center;position:relative"}),ga=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;"),va=Ht("div",{target:"efssyw51"})({name:"fq8405",styles:"display:flex;align-items:center;z-index:10;& :not(:last-of-type){margin-inline-end:24px;}"}),ya=Ht(hn,{target:"efssyw50"})("color:",(function(t){return t.theme.palette.text.darkGrey}),";margin:0;&:last-of-type{margin-block-end:31px;}"),ba=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(ha,null,$t(ya,{as:"p"},(0,oe.__)("Optimize all the images left in your library in one go.","image-optimization")),$t(la,{percentage:o||0,min:"0%",max:"100%"}),$t(ma,null,e&&$t(ga,null,(0,oe.__)("There was a snag with the bulk optimization.","image-optimization")),$t(va,null,$t(da,{disabled:100===o||!r,onCancelOptimization:i,onStartOptimization:a,optimizationStatus:n}))))};ba.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 wa=ba,xa=n(521),_a=[{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 Sa(){return Sa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Sa.apply(this,arguments)}var ka=Ht("table",{target:"e1g7ufyo2"})("width:100%;background-color:",(function(t){return t.theme.palette.background.default}),";margin:16px 0;padding:24px;border-spacing:0;& img{width:40px;height:40px;}& th{color:",(function(t){return t.theme.palette.text.dark}),";}& td{height:40px;}"),Oa=Ht("thead",{target:"e1g7ufyo1"})({name:"1flj9lk",styles:"text-align:left"}),Ea=Ht("tr",{target:"e1g7ufyo0"})("background-color:",(function(t){var e=t.index,n=t.theme;return e%2==0?n.palette.background.default:n.palette.background.lightGrey}),";"),Ra="optimization-table-bulk",za=function(t){var e=t.images,n=(0,r.useMemo)((function(){return _a}),[]),o=(0,r.useMemo)((function(){return e.map((function(t){var e,n=null==t?void 0:t.current_file_size,r=null!=t&&t.original_file_size?null==t?void 0:t.original_file_size:n,o=Math.max(Math.round(100-n/r*100),0);return{thumbnail:$t("img",{src:t.thumbnail_url,alt:""}),fileName:t.image_name,originalSize:"".concat(Bn(r)),currentSize:"".concat(Bn(n)),optimizationLevel:"".concat(o,"%"),status:null!==(e=ze[t.status])&&void 0!==e?e:ze[Re.NOT_STARTED]}}))}),[e]),i=(0,xa.useTable)({autoResetExpanded:!1,columns:n,data:o}),a=i.getTableProps,u=i.getTableBodyProps,c=i.headerGroups,l=i.rows,s=i.prepareRow;return $t(ka,a(),$t(Oa,null,c.map((function(t,e){return $t("tr",Sa({},t.getHeaderGroupProps(),{key:"".concat(Ra,"-header-group-").concat(e)}),t.headers.map((function(t,e){return $t("th",Sa({},t.getHeaderProps(),{key:"".concat(Ra,"-header-cell-").concat(e)}),$t(hn,{variant:"subtitle1"},t.render("Header")))})))}))),$t("tbody",u(),l.map((function(t,e){return s(t),$t(Ea,Sa({index:parseInt(t.id)},t.getRowProps(),{key:"".concat(Ra,"-row-").concat(e)}),t.cells.map((function(t,e){return $t("td",Sa({},t.getCellProps(),{key:"".concat(Ra,"-cell-").concat(e)}),t.render("Cell"))})))}))))};za.propTypes={images:Ut().array.isRequired};var Ca=za,ja=function(){var t=Xe(),e=t.stats,n=t.bulkOptimizationStatus,r=t.bulkOptimizationImages,o=on(),i=o.isConnected,a=o.isActivated,u=o.imagesLeft,c=rn(),l=c.error,s=c.cancelOptimization,f=c.runOptimization,p=0===e.total_image_count?0:Math.round(e.optimized_image_count/e.total_image_count*100);return $t(Qr,{isDisabled:!i||!a||0===u},$t(wa,{error:l,optimizationStatus:n,totalImages:e.total_image_count,progressPercentage:p,onCancelOptimization:s,onStartOptimization:f}),$t(Ca,{images:r}))},La=function(t){var e=t.page;return e===an.SETTINGS?$t(Ar,null,$t(ra,null)):e===an.BULK_OPTIMIZATION?$t(ja,null):null};La.propTypes={page:Ut().string};var Pa=La,Ia=function(t){var e=t.size,n=t.props;return $t(mn.Icon,{icon:$t("svg",n,$t("path",{d:"M8 .333A6.67 6.67 0 0 0 1.333 7 6.669 6.669 0 0 0 8 13.666 6.669 6.669 0 0 0 14.667 7 6.669 6.669 0 0 0 8 .333Zm.667 10H7.334V9h1.333v1.333Zm0-2.667H7.334v-4h1.333v4Z"})),size:e})},Ta=function(t){var e=t.size,n=t.props;return $t(mn.Icon,{icon:$t("svg",n,$t("path",{d:"M8 1.333A6.67 6.67 0 0 0 1.333 8 6.669 6.669 0 0 0 8 14.666 6.669 6.669 0 0 0 14.667 8 6.669 6.669 0 0 0 8 1.333Zm-1.333 10L3.334 8l.94-.94 2.393 2.386 5.06-5.06.94.947-6 6Z"})),size:e})},Aa=function(t){var e=t.level,n=Ct();return"error"===e?$t(Ia,{size:16,props:{fill:n.palette.error.main}}):$t(Ta,{size:16,props:{fill:n.palette.success.main}})};Aa.propTypes={level:Ut().string.isRequired};var Na=Aa,Ga=Ht(mn.SnackbarList,{target:"e1div4p60"})("width:98%;position:fixed;inset-inline-end:20px;inset-block-end:15px;& .components-snackbar{border-radius:3px;color:",(function(t){return t.theme.palette.text.toast}),";background-color:",(function(t){return t.theme.palette.background.toast}),";font-family:",(function(t){return t.theme.fonts.default}),';font-weight:500;padding:20px 6px;}& .components-snackbar-list__notice-container{display:flex;justify-content:flex-end;}& .components-snackbar__content{display:flex;flex-direction:column;justify-content:center;align-items:flex-end;}& .components-snackbar__content .components-snackbar__custom-message{display:flex;align-items:flex-start;max-width:280px;margin-block-start:0;margin-block-end:17px;}& .components-snackbar__content .components-snackbar__custom-message span{max-width:260px;}& .components-snackbar__content .components-snackbar__custom-message svg{margin-inline-end:4px;position:relative;inset-block-start:2px;}& .components-snackbar__content .components-snackbar__action:not(:disabled):not([aria-disabled="true"]):not(.is-secondary){font-weight:500;text-decoration:none;text-transform:uppercase;}& .components-snackbar__content .components-snackbar__action svg{margin-inline-end:4px;position:relative;inset-block-start:-1px;}'),Ma=function(){var t=Fe(),e=t.toastNotifications,n=t.hideToastNotification,r=e.map((function(t){return{actions:t.actions,id:t.id,content:$t("p",{className:"components-snackbar__custom-message"},$t(Na,{level:t.level}),$t("span",null,t.message)),spokenMessage:t.message,status:t.level,politeness:"assertive"}}));return $t(Ga,{notices:r,onRemove:function(t){return n(t)}})},Fa=Ht(mn.NoticeList,{target:"ez8pnkz0"})("margin:16px 0;& .components-notice{margin:0;}& .components-notice:not(:last-of-type){margin-block-end:16px;}& .components-notice.is-info{background-color:",(function(t){return t.theme.palette.background.noticeInfo}),";color:",(function(t){return t.theme.palette.text.noticeInfo}),";border-inline-start:4px solid ",(function(t){return t.theme.palette.info.notice}),";}& .components-notice__content,& .components-notice__content p{margin:0 15px 0 0;}& .components-notice__content p,& .components-notice__content .components-notice__actions{display:inline-block;}& .components-notice__dismiss svg{color:",(function(t){return t.theme.palette.text.noticeInfo}),";}"),Da=function(){var t=De(),e=t.generalNotifications,n=t.hideGeneralNotification,r=e.map((function(t){return{actions:t.actions.map((function(e){if("onClick"in e){var r=e.onClick;e.onClick=function(){n(t.id),r()}}return e})),id:t.id,content:t.message,spokenMessage:t.message,status:t.level,politeness:"assertive"}}));return $t("div",{className:"wrap"},$t(Fa,{notices:r,onRemove:function(t){return n(t)}}))},Ba=window.wp.date,Ha=["options"];function Wa(){return Wa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Wa.apply(this,arguments)}var Ua=function(t){var e=t.options,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<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,Ha);return $t(mn.CustomSelectControl,Wa({options:e,label:"",size:"__unstable-large"},n))};Ua.propTypes={options:Ut().array.isRequired};var qa=Ua,Za=Ht("div",{target:"e16a6jh43"})({name:"1azakc",styles:"text-align:center"}),$a=Ht("hr",{target:"e16a6jh42"})({name:"19miswd",styles:"max-width:560px;margin:12px auto"}),Va=Ht(hn,{target:"e16a6jh41"})("color:",(function(t){return t.theme.palette.text.primary}),";font-size:16px;"),Ya=Ht(qa,{target:"e16a6jh40"})({name:"f8a4yy",styles:"max-width:560px;margin:0 auto"}),Xa=function(t){var e=t.subscriptions,n=t.onLicenseSelect;if(!e.length)return $t(Za,null,$t(Va,{as:"p",style:{marginBlockEnd:"12px"}},(0,oe.__)("No available license","image-optimization")),$t($a,null));if(1===e.length){var r=e[0];return $t(Za,null,$t(Va,{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,Ba.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,Ba.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(Ya,{id:"subscription_list",options:o,onChange:function(t){return n(t)}}),$t($a,null))};Xa.propTypes={subscriptions:Ut().array.isRequired};var Ka=Xa,Qa=Ht("div",{target:"ecxzfwj2"})({name:"1azakc",styles:"text-align:center"}),Ja=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}),";"),tu=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}),";"),eu=function(){return $t(Qa,null,$t(Ja,{as:"h1",variant:"h4"},(0,oe.__)("Ready to use Image Optimizer?","image-optimization")),$t(tu,{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")))},nu=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})},ru=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 ou(t){return ou="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},ou(t)}function iu(){iu=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"==ou(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 z(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,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<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(ou(e)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),l(S,c,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(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;C(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 au(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 uu=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}),";}"),cu=Ht("div",{target:"e1j22c7t2"})({name:"zigog8",styles:"display:flex;flex-direction:column;align-items:center"}),lu=Ht(hn,{target:"e1j22c7t1"})("color:",(function(t){return t.theme.palette.text.tertiary}),";margin-block-end:8px;"),su=Ht(Dn,{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;}"),fu=function(){var t=Yo().siteUrl,e=on().subscriptionEmail,n=ar().switchUser,r=Fe().showToastNotification,o=function(){var t,e=(t=iu().mark((function t(){return iu().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){au(i,r,o,a,u,"next",t)}function u(t){au(i,r,o,a,u,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();return $t(uu,null,$t(cu,null,$t(nu,null),$t(lu,null,t)),$t(cu,null,$t(ru,null),$t(lu,null,e),$t(su,{variant:"link",onClick:o},(0,oe.__)("Switch User","image-optimization"))))},pu=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;}"}),du=Ht(hn,{target:"emrn7r51"})("color:",(function(t){return t.theme.palette.text.tertiary}),";"),hu=Ht(Dn,{target:"emrn7r50"})("&.is-link{color:",(function(t){return t.theme.palette.text.link}),";font-size:14px;line-height:normal;}"),mu=function(){return $t(pu,null,$t(du,{as:"p"},(0,oe.sprintf)( // translators: %s: Full year (0,oe.__)("© %s All Rights Reserved.","image-optimization"),(0,Ba.dateI18n)("Y",new Date,void 0))),$t("p",null,$t(hu,{variant:"link",href:"https://elementor.com/terms/",target:"_blank",rel:"noopener noreferrer"},(0,oe.__)("Terms of Service","image-optimization")),$t("span",null,", "),$t(hu,{variant:"link",href:"https://elementor.com/about/privacy/",target:"_blank",rel:"noopener noreferrer"},(0,oe.__)("Privacy Policy","image-optimization"))))};function gu(t){return gu="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},gu(t)}function vu(){vu=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"==gu(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 z(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,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<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(gu(e)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),l(S,c,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(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;C(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 yu(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 bu(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){yu(i,r,o,a,u,"next",t)}function u(t){yu(i,r,o,a,u,"throw",t)}a(void 0)}))}}function wu(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 xu(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)?xu(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 xu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var _u=Ht(mn.Modal,{target:"e1c223pl2"})("font-family:",(function(t){return t.theme.fonts.default}),";width:900px;max-height:80%;border-radius:0;.components-modal__header{padding:0 23px 8px;}.components-modal__content{padding:0;margin-block-start:55px;}"),Su=Ht("div",{target:"e1c223pl1"})({name:"lhj7k3",styles:"display:flex;flex-direction:column;justify-content:center;align-items:center;max-width:560px;margin:0 auto 56px"}),ku=Ht(Dn,{target:"e1c223pl0"})("display:flex;justify-content:center;align-items:center;background-color:",(function(t){return t.theme.palette.background.brand}),"!important;width:100%;letter-spacing:-.02em;color:",(function(t){return t.theme.palette.text.brand}),"!important;font-size:15px;font-weight:500;user-select:none;max-width:560px;border-radius:0;height:48px;&:not(:last-of-type){margin-block-end:20px;}&:disabled{color:#9DA5AE!important;background:",(function(t){return t.theme.palette.background.disabled}),"!important;}"),Ou=function(t){var e=t.page,n=on(),o=n.isConnected,i=n.isActivated,a=Mo(),u=a.isOpen,c=a.close,l=a.open,s=Fe().showToastNotification,f=wu((0,r.useState)([]),2),p=f[0],d=f[1],h=wu((0,r.useState)(null),2),m=h[0],g=h[1],v=function(){var t=bu(vu().mark((function t(){var e;return vu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ke.fetchSubscriptions();case 2:1===(e=t.sent).length&&g(e[0].license_key),d(e),l();case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,r.useEffect)((function(){e===an.SETTINGS&&o&&!i&&v(),er.listen(Qn,v)}),[]),u?$t(_u,{onRequestClose:c,value:m,title:""},$t(eu,null),$t(fu,null),$t(Ka,{subscriptions:p,onLicenseSelect:function(t){g(t.selectedItem.key)}}),$t(Su,null,null!=p&&p.length?$t(ku,{variant:"primary",disabled:!m,onClick:function(){var t=function(){var t=bu(vu().mark((function t(){return vu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ke.activateSubscription(m);case 3:location.reload(),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),s(new Pe({level:"error",message:(0,oe.__)("Activation error","image-optimization"),actions:[{label:(0,oe.__)("Got it","image-optimization"),onClick:function(){}}]}));case 9:c();case 10:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}();t()}},(0,oe.__)("Activate my license","image-optimization")):$t(ku,{variant:"primary",href:"https://go.elementor.com/io-panel-get-free/",target:"_blank",rel:"noopener noreferrer",onClick:c},(0,oe.__)("Get a new subscription","image-optimization"))),$t(mu,null)):""};Ou.propTypes={page:Ut().string};var Eu=Ou;function Ru(t){return Ru="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},Ru(t)}function zu(){zu=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"==Ru(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 z(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,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<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Ru(e)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),l(S,c,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(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;C(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 Cu(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 ju=["size"];function Lu(){return Lu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Lu.apply(this,arguments)}var Pu=function(t){var e=t.size,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<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,ju);return $t(mn.Icon,{icon:$t("svg",Lu({width:"32",height:"32",fill:"none"},n),$t("path",{fill:"#000",fillRule:"evenodd",d:"M2.696 24.89A16 16 0 1 1 29.304 7.11 16 16 0 0 1 2.696 24.89Zm9.305-15.557H9.334v13.333h2.667V9.333Zm10.665 0h-8v2.666h8V9.333Zm0 5.332h-8v2.667h8v-2.667Zm0 5.335h-8v2.666h8V20Z",clipRule:"evenodd"})),size:e})};function Iu(t){return Iu="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},Iu(t)}function Tu(){Tu=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"==Iu(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 z(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,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<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Iu(e)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),l(S,c,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(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;C(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 Au(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 Nu(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Au(i,r,o,a,u,"next",t)}function u(t){Au(i,r,o,a,u,"throw",t)}a(void 0)}))}}var Gu=Ht("span",{target:"e18vfjh05"})({name:"13zqvnj",styles:"display:flex;justify-content:center;align-items:center;& svg{margin-inline-end:8px;}& span{font-size:16px;font-style:normal;font-weight:500;line-height:130%;letter-spacing:0.15px;}"}),Mu=Ht(mn.Modal,{target:"e18vfjh04"})("font-family:",(function(t){return t.theme.fonts.default}),";width:900px;max-height:80%;.components-modal__header{padding:0 24px 0;height:48px;border-block-end:1px solid #0000001F;}.components-modal__content{padding:0;margin-block-start:55px;}"),Fu=Ht("div",{target:"e18vfjh03"})({name:"149rfrl",styles:"text-align:center;h2{font-size:32px;font-style:normal;font-weight:700;line-height:123.5%;letter-spacing:0.25px;}"}),Du=Ht("div",{target:"e18vfjh02"})({name:"15vee90",styles:"display:flex;justify-content:center;padding:40px 24px;column-gap:51px;@media screen and (max-width: 768px){flex-wrap:wrap;row-gap:50px;padding:20px 24px;}& h3{margin-block-end:24px;font-size:16px;font-style:normal;font-weight:500;line-height:130%;letter-spacing:0.15px;}"}),Bu=Ht("div",{target:"e18vfjh01"})({name:"1kexohv",styles:"display:flex;flex-direction:column;width:50%;padding:40px;border:1px solid rgba(0, 0, 0, 0.12);border-radius:4px;@media screen and (max-width: 768px){width:100%;}& span{margin-block-end:24px;}"}),Hu=Ht(Dn,{target:"e18vfjh00"})({name:"4wjgsd",styles:"&.components-button{margin:0 auto;font-size:16px;font-style:normal;font-weight:500;line-height:26px;color:#C00BB9;text-decoration:none;}"}),Wu=function(){var t=Mo(),e=t.isOpen,n=t.close,o=t.open,i=Fe().showToastNotification;(0,r.useEffect)((function(){er.listen(Jn,o)}),[]);var a=function(){var t=Nu(Tu().mark((function t(){var e;return Tu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ke.initConnect("update");case 3:e=t.sent,window.open(e,"_self").focus(),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),i(new Pe({level:"error",message:(0,oe.__)("An error occurred","image-optimization"),actions:[]}));case 10:n();case 11:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}(),u=function(){var t=Nu(Tu().mark((function t(){return Tu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ke.clearSession();case 3:window.location.href=(0,ue.addQueryArgs)(window.location.href,{action:"connect"}),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),i(new Pe({level:"error",message:(0,oe.__)("An error occurred","image-optimization"),actions:[]}));case 9:n();case 10:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}();return e?$t(Mu,{onRequestClose:n,title:$t(Gu,null,$t(Pu,{size:24,viewBox:"0 0 32 32"}),$t(hn,null,(0,oe.__)("Fix mismatched URL","image-optimization")))},$t(Fu,null,$t(hn,{as:"h2"},(0,oe.__)("Select the case that applies to you","image-optimization")),$t(Du,null,$t(Bu,null,$t(hn,{as:"h3"},(0,oe.__)("Are you updating the URL?","image-optimization")),$t(hn,null,(0,oe.__)("Choose this option if you want to just switch to the new URL for the same site","image-optimization")),$t(Hu,{variant:"link",onClick:a},(0,oe.__)("Update connected URL","image-optimization"))),$t(Bu,null,$t(hn,{as:"h3"},(0,oe.__)("Are you creating a new site?","image-optimization")),$t(hn,null,(0,oe.__)("Choose this if you are connecting the plugin to a new site","image-optimization")),$t(Hu,{variant:"link",onClick:u},(0,oe.__)("Connect as a new site","image-optimization")))))):""},Uu=["isShown"];var qu=Ht("div",{target:"e1r0tp9s0"})("position:fixed;display:flex;justify-content:center;align-items:center;top:0;left:0;right:0;bottom:0;z-index:9999;background:",(function(t){return t.theme.palette.background.toast}),";opacity:.7;& svg{width:48px;height:48px;}"),Zu=function(t){var e=t.isShown,n=void 0!==e&&e,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<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,Uu);return!!n&&$t(qu,null,$t(mn.Spinner,r))};Zu.propTypes={isShown:Ut().bool};var $u=Zu,Vu=function(){var t=function(){var t=window.location;return new URLSearchParams(t.search).get("page")||null}();!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=Fe().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=ar().redirectToConnect,n=Fe().showToastNotification,o=function(){var t,r=(t=zu().mark((function t(){return zu().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){Cu(i,r,o,a,u,"next",t)}function u(t){Cu(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);var e=!1;return t===an.SETTINGS&&"connect"===new URLSearchParams(location.search).get("action")&&(e=!0),$t(re,null,$t(re.Header,null,$t(Da,null)),$t(re.Content,{fullWidth:!0},$t(Eu,{page:t}),$t(Wu,null),$t($u,{isShown:e}),$t(jr,{page:t}),$t(Pa,{page:t}),$t(Ma,null)))},Yu=Ht("div",{target:"ehbyabb1"})({name:"s5xdrg",styles:"display:flex;align-items:center"}),Xu=Ht("span",{target:"ehbyabb0"})("margin-inline-start:8px;color:",(function(t){return t.theme.palette.text.lightGrey}),";font-feature-settings:'clig' off,'liga' off;font-family:",(function(t){return t.theme.fonts.default}),";font-size:15px;font-style:normal;font-weight:700;line-height:130%;user-select:none;"),Ku=function(){return $t(Yu,null,$t(Pu,{size:32}),$t(Xu,null,function(){var t=window.location;return t.href.endsWith("/upload.php")&&!t.search}()?(0,oe.__)("Media Library","image-optimization"):(0,oe.__)("Image Optimizer","image-optimization")))},Qu=function(t){var e=t.size,n=t.props;return $t(mn.Icon,{icon:$t("svg",n,$t("path",{fillRule:"evenodd",d:"M8 2.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM1.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Zm6.123-3.793a1.984 1.984 0 0 1 1.316.186h.002c.404.214.724.558.91.976.188.418.232.886.126 1.332a2.061 2.061 0 0 1-.71 1.13c-.225.181-.482.31-.756.382v.454a.5.5 0 0 1-1 0v-.89a.5.5 0 0 1 .498-.5c.227 0 .45-.078.63-.224.18-.146.31-.35.365-.583a1.086 1.086 0 0 0-.065-.693 1.045 1.045 0 0 0-.464-.498.984.984 0 0 0-.652-.093 1.005 1.005 0 0 0-.572.345.5.5 0 0 1-.769-.639 2.004 2.004 0 0 1 1.141-.685ZM8 10.167a.5.5 0 0 1 .5.5v.026a.5.5 0 1 1-1 0v-.026a.5.5 0 0 1 .5-.5Z",clipRule:"evenodd"})),size:e})},Ju=Ht(mn.Button,{target:"e19jt8ef0"})("border-radius:4px;&.is-primary,&.is-primary:hover:not(:disabled){background-color:",(function(t){return t.theme.palette.primary.main}),";color:",(function(t){return t.theme.palette.text.primary}),";font-weight:500;}&.is-secondary{box-shadow:inset 0 0 0 1px ",(function(t){return t.theme.palette.primary.main}),";color:",(function(t){return t.theme.palette.text.primary}),";font-weight:500;}"),tc=function(){var t=ar(),e=t.redirectToConnect,n=t.sendActivationEvent,r=t.sendUrlMismatchEvent,o=Yn();return $n===o?$t(Ju,{variant:"secondary",onClick:r},(0,oe.__)("Fix mismatched URL","image-optimization")):qn===o?$t(Ju,{variant:"secondary",onClick:e},(0,oe.__)("Connect to start","image-optimization")):Zn===o?$t(Ju,{variant:"secondary",onClick:n},(0,oe.__)("Activate to start","image-optimization")):Wn===o?$t(Ju,{variant:"primary",href:cn,target:"_blank",rel:"noopener noreferrer"},(0,oe.__)("Renew Plan","image-optimization")):Vn!==o&&$t(Ju,{variant:"primary",href:cn,target:"_blank",rel:"noopener noreferrer"},(0,oe.__)("Upgrade Plan","image-optimization"))},ec=Ht("ul",{target:"e190q66r2"})({name:"1ktpmw2",styles:"display:flex;align-items:center;margin:0;@media screen and (max-width: 782px){flex-wrap:wrap;}"}),nc=Ht("li",{target:"e190q66r1"})({name:"10dw8fv",styles:"margin:0;&:not(:last-child){margin-inline-end:40px;@media screen and (max-width: 960px){margin-inline-end:10px;}}"}),rc=Ht(Dn,{target:"e190q66r0"})("&.is-link{color:",(function(t){return t.theme.palette.text.lightGrey}),";text-decoration:none;font-family:",(function(t){return t.theme.fonts.default}),";font-weight:500;line-height:150%;&>svg{margin-inline-end:6px;}}"),oc=function(){return $t("nav",null,$t(ec,null,$t(nc,{role:"menuitem"},$t(rc,{href:"https://go.elementor.com/io-panel-learn-more/",variant:"link",target:"_blank",rel:"noopener noreferrer"},$t(Qu,{size:16}),(0,oe.__)("Help","image-optimization"))),$t(nc,null,$t(tc,null))))},ic=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);}"),ac=function(){return $t(ic,{role:"navigation"},$t(Ku,null),$t(oc,null))},uc=(0,r.createContext)({}),cc=function(t){var e=t.children,n=Mo();return $t(uc.Provider,{value:{activationModalState:n}},e)};cc.propTypes={children:Ut().node};var lc,sc=document.getElementById("image-optimization-top-bar"),fc=document.getElementById("image-optimization-app"),pc=(null===(lc=window)||void 0===lc||null===(lc=lc.imageOptimizerAppSettings)||void 0===lc?void 0:lc.isDevelopment)?r.Fragment:r.StrictMode,dc=(0,r.createRoot)(sc),hc=(0,r.createRoot)(fc);dc.render($t(pc,null,$t((function(){return $t(Lt,{theme:At},$t(cc,null,$t(ac,null)))}),null))),hc.render($t(pc,null,$t((function(){return $t(Lt,{theme:At},$t(Ye,null,$t(Me,null,$t(Vu,null))))}),null)))},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<a.length;++g){var v=a[g];if(!(i[v]||r&&r[v]||m&&m[v]||u&&u[v])){var y=p(n,v);try{l(e,v,y)}catch(t){}}}}return e}},103:function(t,e){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,s=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case s:case f:case i:case u:case a:case d:return t;default:switch(t=t&&t.$$typeof){case l:case p:case g:case m:case c:return t;default:return e}}case o:return e}}}function _(t){return x(t)===f}e.AsyncMode=s,e.ConcurrentMode=f,e.ContextConsumer=l,e.ContextProvider=c,e.Element=r,e.ForwardRef=p,e.Fragment=i,e.Lazy=g,e.Memo=m,e.Portal=o,e.Profiler=u,e.StrictMode=a,e.Suspense=d,e.isAsyncMode=function(t){return _(t)||x(t)===s},e.isConcurrentMode=_,e.isContextConsumer=function(t){return x(t)===l},e.isContextProvider=function(t){return x(t)===c},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},e.isForwardRef=function(t){return x(t)===p},e.isFragment=function(t){return x(t)===i},e.isLazy=function(t){return x(t)===g},e.isMemo=function(t){return x(t)===m},e.isPortal=function(t){return x(t)===o},e.isProfiler=function(t){return x(t)===u},e.isStrictMode=function(t){return x(t)===a},e.isSuspense=function(t){return x(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===f||t===u||t===a||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===g||t.$$typeof===m||t.$$typeof===c||t.$$typeof===l||t.$$typeof===p||t.$$typeof===y||t.$$typeof===b||t.$$typeof===w||t.$$typeof===v)},e.typeOf=x},296:function(t,e,n){"use strict";t.exports=n(103)},703:function(t,e,n){"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,a){if(a!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},697:function(t,e,n){t.exports=n(703)()},414:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},217:function(t,e,n){!function(t,e){"use strict";function n(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 r(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function u(t){n(a,o,i,u,c,"next",t)}function c(t){n(a,o,i,u,c,"throw",t)}u(void 0)}))}}function o(){return(o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function i(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=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<t;n++)e[n]=arguments[n];return e.reduce((function(t,e){var n=e.style,r=e.className;return t=o({},t,{},i(e,["style","className"])),n&&(t.style=t.style?o({},t.style||{},{},n||{}):n),r&&(t.className=t.className?t.className+" "+r:r),""===t.className&&delete t.className,t}),{})}var p=function(t,e){return void 0===e&&(e={}),function(n){return void 0===n&&(n={}),[].concat(t,[n]).reduce((function(t,r){return function t(e,n,r){return"function"==typeof n?t({},n(e,r)):Array.isArray(n)?f.apply(void 0,[e].concat(n)):f(e,n)}(t,r,o({},e,{userProps:n}))}),{})}},d=function(t,e,n,r){return void 0===n&&(n={}),t.reduce((function(t,e){return e(t,n)}),e)},h=function(t,e,n){return void 0===n&&(n={}),t.forEach((function(t){t(e,n)}))};function m(t,e,n,r){t.findIndex((function(t){return t.pluginName===n})),e.forEach((function(e){t.findIndex((function(t){return t.pluginName===e}))}))}function g(t,e){return"function"==typeof t?t(e):t}function v(t){var n=e.useRef();return n.current=t,e.useCallback((function(){return n.current}),[])}var y="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function b(t,n){var r=e.useRef(!1);y((function(){r.current&&t(),r.current=!0}),n)}function w(t,e,n){return void 0===n&&(n={}),function(r,i){void 0===i&&(i={});var a="string"==typeof r?e[r]:r;if(void 0===a)throw console.info(e),new Error("Renderer Error ☝️");return x(a,o({},t,{column:e},n,{},i))}}function x(t,n){return function(t){return"function"==typeof t&&(e=Object.getPrototypeOf(t)).prototype&&e.prototype.isReactComponent;var e}(r=t)||"function"==typeof r||function(t){return"object"==typeof t&&"symbol"==typeof t.$$typeof&&["react.memo","react.forward_ref"].includes(t.$$typeof.description)}(r)?e.createElement(t,n):t;var r}function _(t,e,n){return void 0===n&&(n=0),t.map((function(t){return k(t=o({},t,{parent:e,depth:n})),t.columns&&(t.columns=_(t.columns,t,n+1)),t}))}function S(t){return C(t,"columns")}function k(t){var e=t.id,n=t.accessor,r=t.Header;if("string"==typeof n){e=e||n;var o=n.split(".");n=function(t){return function(t,e,n){if(!e)return t;var r,o="function"==typeof e?e:JSON.stringify(e),i=E.get(o)||function(){var t=function(t){return function t(e,n){if(void 0===n&&(n=[]),Array.isArray(e))for(var r=0;r<e.length;r+=1)t(e[r],n);else n.push(e);return n}(t).map((function(t){return String(t).replace(".","_")})).join(".").replace(A,".").replace(N,"").split(".")}(e);return E.set(o,t),t}();try{r=i.reduce((function(t,e){return t[e]}),t)}catch(t){}return void 0!==r?r:void 0}(t,o)}}if(!e&&"string"==typeof r&&r&&(e=r),!e&&t.columns)throw console.error(t),new Error('A column ID (or unique "Header" value) is required!');if(!e)throw console.error(t),new Error("A column ID (or string accessor) is required!");return Object.assign(t,{id:e,accessor:n}),t}function O(t,e){if(!e)throw new Error;return Object.assign(t,o({Header:l,Footer:l},s,{},e,{},t)),Object.assign(t,{originalWidth:t.width}),t}var E=new Map;function R(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0;r<e.length;r+=1)if(void 0!==e[r])return e[r]}function z(t){if("function"==typeof t)return t}function C(t,e){var n=[];return function t(r){r.forEach((function(r){r[e]?t(r[e]):n.push(r)}))}(t),n}function j(t,e){var n=e.manualExpandedKey,r=e.expanded,o=e.expandSubRows,i=void 0===o||o,a=[];return t.forEach((function(t){return function t(e,o){void 0===o&&(o=!0),e.isExpanded=e.original&&e.original[n]||r[e.id],e.canExpand=e.subRows&&!!e.subRows.length,o&&a.push(e),e.subRows&&e.subRows.length&&e.isExpanded&&e.subRows.forEach((function(e){return t(e,i)}))}(t)})),a}function L(t,e,n){return z(t)||e[t]||n[t]||n.text}function P(t,e,n){return t?t(e,n):void 0===e}function I(){throw new Error("React-Table: You have not called prepareRow(row) one or more rows you are attempting to render.")}var T=null,A=/\[/g,N=/\]/g,G=function(t){return o({role:"table"},t)},M=function(t){return o({role:"rowgroup"},t)},F=function(t,e){var n=e.column;return o({key:"header_"+n.id,colSpan:n.totalVisibleHeaderCount,role:"columnheader"},t)},D=function(t,e){var n=e.column;return o({key:"footer_"+n.id,colSpan:n.totalVisibleHeaderCount},t)},B=function(t,e){return o({key:"headerGroup_"+e.index,role:"row"},t)},H=function(t,e){return o({key:"footerGroup_"+e.index},t)},W=function(t,e){return o({key:"row_"+e.row.id,role:"row"},t)},U=function(t,e){var n=e.cell;return o({key:"cell_"+n.row.id+"_"+n.column.id,role:"cell"},t)};function q(){return{useOptions:[],stateReducers:[],useControlledState:[],columns:[],columnsDeps:[],allColumns:[],allColumnsDeps:[],accessValue:[],materializedColumns:[],materializedColumnsDeps:[],useInstanceAfterData:[],visibleColumns:[],visibleColumnsDeps:[],headerGroups:[],headerGroupsDeps:[],useInstanceBeforeDimensions:[],useInstance:[],prepareRow:[],getTableProps:[G],getTableBodyProps:[M],getHeaderGroupProps:[B],getFooterGroupProps:[H],getHeaderProps:[F],getFooterProps:[D],getRowProps:[W],getCellProps:[U],useFinalInstance:[]}}u.resetHiddenColumns="resetHiddenColumns",u.toggleHideColumn="toggleHideColumn",u.setHiddenColumns="setHiddenColumns",u.toggleHideAllColumns="toggleHideAllColumns";var Z=function(t){t.getToggleHiddenProps=[$],t.getToggleHideAllColumnsProps=[V],t.stateReducers.push(Y),t.useInstanceBeforeDimensions.push(X),t.headerGroupsDeps.push((function(t,e){var n=e.instance;return[].concat(t,[n.state.hiddenColumns])})),t.useInstance.push(K)};Z.pluginName="useColumnVisibility";var $=function(t,e){var n=e.column;return[t,{onChange:function(t){n.toggleHidden(!t.target.checked)},style:{cursor:"pointer"},checked:n.isVisible,title:"Toggle Column Visible"}]},V=function(t,e){var n=e.instance;return[t,{onChange:function(t){n.toggleHideAllColumns(!t.target.checked)},style:{cursor:"pointer"},checked:!n.allColumnsHidden&&!n.state.hiddenColumns.length,title:"Toggle All Columns Hidden",indeterminate:!n.allColumnsHidden&&n.state.hiddenColumns.length}]};function Y(t,e,n,r){if(e.type===u.init)return o({hiddenColumns:[]},t);if(e.type===u.resetHiddenColumns)return o({},t,{hiddenColumns:r.initialState.hiddenColumns||[]});if(e.type===u.toggleHideColumn){var i=(void 0!==e.value?e.value:!t.hiddenColumns.includes(e.columnId))?[].concat(t.hiddenColumns,[e.columnId]):t.hiddenColumns.filter((function(t){return t!==e.columnId}));return o({},t,{hiddenColumns:i})}return e.type===u.setHiddenColumns?o({},t,{hiddenColumns:g(e.value,t.hiddenColumns)}):e.type===u.toggleHideAllColumns?o({},t,{hiddenColumns:(void 0!==e.value?e.value:!t.hiddenColumns.length)?r.allColumns.map((function(t){return t.id})):[]}):void 0}function X(t){var n=t.headers,r=t.state.hiddenColumns;e.useRef(!1).current;var o=0;n.forEach((function(t){return o+=function t(e,n){e.isVisible=n&&!r.includes(e.id);var o=0;return e.headers&&e.headers.length?e.headers.forEach((function(n){return o+=t(n,e.isVisible)})):o=e.isVisible?1:0,e.totalVisibleHeaderCount=o,o}(t,!0)}))}function K(t){var n=t.columns,r=t.flatHeaders,o=t.dispatch,i=t.allColumns,a=t.getHooks,c=t.state.hiddenColumns,l=t.autoResetHiddenColumns,s=void 0===l||l,f=v(t),d=i.length===c.length,h=e.useCallback((function(t,e){return o({type:u.toggleHideColumn,columnId:t,value:e})}),[o]),m=e.useCallback((function(t){return o({type:u.setHiddenColumns,value:t})}),[o]),g=e.useCallback((function(t){return o({type:u.toggleHideAllColumns,value:t})}),[o]),y=p(a().getToggleHideAllColumnsProps,{instance:f()});r.forEach((function(t){t.toggleHidden=function(e){o({type:u.toggleHideColumn,columnId:t.id,value:e})},t.getToggleHiddenProps=p(a().getToggleHiddenProps,{instance:f(),column:t})}));var w=v(s);b((function(){w()&&o({type:u.resetHiddenColumns})}),[o,n]),Object.assign(t,{allColumnsHidden:d,toggleHideColumn:h,setHiddenColumns:m,toggleHideAllColumns:g,getToggleHideAllColumnsProps:y})}var Q={},J={},tt=function(t,e,n){return t},et=function(t,e){return t.subRows||[]},nt=function(t,e,n){return""+(n?[n.id,e].join("."):e)},rt=function(t){return t};function ot(t){var e=t.initialState,n=void 0===e?Q:e,r=t.defaultColumn,a=void 0===r?J:r,u=t.getSubRows,c=void 0===u?et:u,l=t.getRowId,s=void 0===l?nt:l,f=t.stateReducer,p=void 0===f?tt:f,d=t.useControlledState,h=void 0===d?rt:d;return o({},i(t,["initialState","defaultColumn","getSubRows","getRowId","stateReducer","useControlledState"]),{initialState:n,defaultColumn:a,getSubRows:c,getRowId:s,stateReducer:p,useControlledState:h})}function it(t,e){void 0===e&&(e=0);var n=0,r=0,o=0,i=0;return t.forEach((function(t){var a=t.headers;if(t.totalLeft=e,a&&a.length){var u=it(a,e),c=u[0],l=u[1],s=u[2],f=u[3];t.totalMinWidth=c,t.totalWidth=l,t.totalMaxWidth=s,t.totalFlexWidth=f}else t.totalMinWidth=t.minWidth,t.totalWidth=Math.min(Math.max(t.minWidth,t.width),t.maxWidth),t.totalMaxWidth=t.maxWidth,t.totalFlexWidth=t.canResize?t.totalWidth:0;t.isVisible&&(e+=t.totalWidth,n+=t.totalMinWidth,r+=t.totalWidth,o+=t.totalMaxWidth,i+=t.totalFlexWidth)})),[n,r,o,i]}function at(t){var e=t.data,n=t.rows,r=t.flatRows,o=t.rowsById,i=t.column,a=t.getRowId,u=t.getSubRows,c=t.accessValueHooks,l=t.getInstance;e.forEach((function(t,s){return function t(n,s,f,p,h){void 0===f&&(f=0);var m=n,g=a(n,s,p),v=o[g];if(v)v.subRows&&v.originalSubRows.forEach((function(e,n){return t(e,n,f+1,v)}));else if((v={id:g,original:m,index:s,depth:f,cells:[{}]}).cells.map=I,v.cells.filter=I,v.cells.forEach=I,v.cells[0].getCellProps=I,v.values={},h.push(v),r.push(v),o[g]=v,v.originalSubRows=u(n,s),v.originalSubRows){var y=[];v.originalSubRows.forEach((function(e,n){return t(e,n,f+1,v,y)})),v.subRows=y}i.accessor&&(v.values[i.id]=i.accessor(n,s,v,h,e)),v.values[i.id]=d(c,v.values[i.id],{row:v,column:i,instance:l()})}(t,s,0,void 0,n)}))}u.resetExpanded="resetExpanded",u.toggleRowExpanded="toggleRowExpanded",u.toggleAllRowsExpanded="toggleAllRowsExpanded";var ut=function(t){t.getToggleAllRowsExpandedProps=[ct],t.getToggleRowExpandedProps=[lt],t.stateReducers.push(st),t.useInstance.push(ft),t.prepareRow.push(pt)};ut.pluginName="useExpanded";var ct=function(t,e){var n=e.instance;return[t,{onClick:function(t){n.toggleAllRowsExpanded()},style:{cursor:"pointer"},title:"Toggle All Rows Expanded"}]},lt=function(t,e){var n=e.row;return[t,{onClick:function(){n.toggleRowExpanded()},style:{cursor:"pointer"},title:"Toggle Row Expanded"}]};function st(t,e,n,r){if(e.type===u.init)return o({expanded:{}},t);if(e.type===u.resetExpanded)return o({},t,{expanded:r.initialState.expanded||{}});if(e.type===u.toggleAllRowsExpanded){var c=e.value,l=r.rowsById,s=Object.keys(l).length===Object.keys(t.expanded).length;if(void 0!==c?c:!s){var f={};return Object.keys(l).forEach((function(t){f[t]=!0})),o({},t,{expanded:f})}return o({},t,{expanded:{}})}if(e.type===u.toggleRowExpanded){var p,d=e.id,h=e.value,m=t.expanded[d],g=void 0!==h?h:!m;if(!m&&g)return o({},t,{expanded:o({},t.expanded,(p={},p[d]=!0,p))});if(m&&!g){var v=t.expanded;return v[d],o({},t,{expanded:i(v,[d].map(a))})}return t}}function ft(t){var n=t.data,r=t.rows,o=t.rowsById,i=t.manualExpandedKey,a=void 0===i?"expanded":i,c=t.paginateExpandedRows,l=void 0===c||c,s=t.expandSubRows,f=void 0===s||s,d=t.autoResetExpanded,h=void 0===d||d,g=t.getHooks,y=t.plugins,w=t.state.expanded,x=t.dispatch;m(y,["useSortBy","useGroupBy","usePivotColumns","useGlobalFilter"],"useExpanded");var _=v(h),S=Boolean(Object.keys(o).length&&Object.keys(w).length);S&&Object.keys(o).some((function(t){return!w[t]}))&&(S=!1),b((function(){_()&&x({type:u.resetExpanded})}),[x,n]);var k=e.useCallback((function(t,e){x({type:u.toggleRowExpanded,id:t,value:e})}),[x]),O=e.useCallback((function(t){return x({type:u.toggleAllRowsExpanded,value:t})}),[x]),E=e.useMemo((function(){return l?j(r,{manualExpandedKey:a,expanded:w,expandSubRows:f}):r}),[l,r,a,w,f]),R=e.useMemo((function(){return function(t){var e=0;return Object.keys(t).forEach((function(t){var n=t.split(".");e=Math.max(e,n.length)})),e}(w)}),[w]),z=v(t),C=p(g().getToggleAllRowsExpandedProps,{instance:z()});Object.assign(t,{preExpandedRows:r,expandedRows:E,rows:E,expandedDepth:R,isAllRowsExpanded:S,toggleRowExpanded:k,toggleAllRowsExpanded:O,getToggleAllRowsExpandedProps:C})}function pt(t,e){var n=e.instance.getHooks,r=e.instance;t.toggleRowExpanded=function(e){return r.toggleRowExpanded(t.id,e)},t.getToggleRowExpandedProps=p(n().getToggleRowExpandedProps,{instance:r,row:t})}var dt=function(t,e,n){return t.filter((function(t){return e.some((function(e){var r=t.values[e];return String(r).toLowerCase().includes(String(n).toLowerCase())}))}))};dt.autoRemove=function(t){return!t};var ht=function(t,e,n){return t.filter((function(t){return e.some((function(e){var r=t.values[e];return void 0===r||String(r).toLowerCase()===String(n).toLowerCase()}))}))};ht.autoRemove=function(t){return!t};var mt=function(t,e,n){return t.filter((function(t){return e.some((function(e){var r=t.values[e];return void 0===r||String(r)===String(n)}))}))};mt.autoRemove=function(t){return!t};var gt=function(t,e,n){return t.filter((function(t){return e.some((function(e){return t.values[e].includes(n)}))}))};gt.autoRemove=function(t){return!t||!t.length};var vt=function(t,e,n){return t.filter((function(t){return e.some((function(e){var r=t.values[e];return r&&r.length&&n.every((function(t){return r.includes(t)}))}))}))};vt.autoRemove=function(t){return!t||!t.length};var yt=function(t,e,n){return t.filter((function(t){return e.some((function(e){var r=t.values[e];return r&&r.length&&n.some((function(t){return r.includes(t)}))}))}))};yt.autoRemove=function(t){return!t||!t.length};var bt=function(t,e,n){return t.filter((function(t){return e.some((function(e){var r=t.values[e];return n.includes(r)}))}))};bt.autoRemove=function(t){return!t||!t.length};var wt=function(t,e,n){return t.filter((function(t){return e.some((function(e){return t.values[e]===n}))}))};wt.autoRemove=function(t){return void 0===t};var xt=function(t,e,n){return t.filter((function(t){return e.some((function(e){return t.values[e]==n}))}))};xt.autoRemove=function(t){return null==t};var _t=function(t,e,n){var r=n||[],o=r[0],i=r[1];if((o="number"==typeof o?o:-1/0)>(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(zt),t.useInstance.push(Ct)};function zt(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 Ct(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=[],It={};u.resetGroupBy="resetGroupBy",u.setGroupBy="setGroupBy",u.toggleGroupBy="toggleGroupBy";var Tt=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(Gt),t.useInstance.push(Ft),t.prepareRow.push(Dt)};Tt.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 Gt(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 Mt={};function Ft(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?Mt: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 z=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:z(),header:t})}));var P=e.useMemo((function(){if(d||!w.length)return[r,i,a,Pt,It,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?C(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]),I=P[0],T=P[1],A=P[2],N=P[3],G=P[4],M=P[5],F=P[6],D=v(S);b((function(){D()&&x({type:u.resetGroupBy})}),[x,d?null:n]),Object.assign(t,{preGroupedRows:r,preGroupedFlatRow:i,preGroupedRowsById:a,groupedRows:I,groupedFlatRows:T,groupedRowsById:A,onlyGroupedFlatRows:N,onlyGroupedRowsById:G,nonGroupedFlatRows:M,nonGroupedRowsById:F,rows:I,flatRows:T,rowsById:A,toggleGroupBy:j,setGroupBy:L})}function Dt(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 C=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=z(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=C[0],L=C[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;o<e.length;o+=1){var i=e[o],a=!1===n[o]||"desc"===n[o],u=i(t,r);if(0!==u)return a?-u:u}return n[0]?t.index-r.index:r.index-t.index}))}u.resetPage="resetPage",u.gotoPage="gotoPage",u.setPageSize="setPageSize";var Qt=function(t){t.stateReducers.push(Jt),t.useInstance.push(te)};function Jt(t,e,n,r){if(e.type===u.init)return o({pageSize:10,pageIndex:0},t);if(e.type===u.resetPage)return o({},t,{pageIndex:r.initialState.pageIndex||0});if(e.type===u.gotoPage){var i=r.pageCount,a=r.page,c=g(e.pageIndex,t.pageIndex),l=!1;return c>t.pageIndex?l=-1===i?a.length>=t.pageSize:c<i:c<t.pageIndex&&(l=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 z=v(o);b((function(){z()&&O({type:u.resetPage})}),[O,R?null:E,x,_,S,k]);var C=R?l:Math.ceil(n.length/g),L=e.useMemo((function(){return C>0?[].concat(new Array(C)).fill(null).map((function(t,e){return e})):[]}),[C]),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]),I=y>0,T=-1===C?P.length>=g:y<C-1,A=e.useCallback((function(t){O({type:u.gotoPage,pageIndex:t})}),[O]),N=e.useCallback((function(){return A((function(t){return t-1}))}),[A]),G=e.useCallback((function(){return A((function(t){return t+1}))}),[A]),M=e.useCallback((function(t){O({type:u.setPageSize,pageSize:t})}),[O]);Object.assign(t,{pageOptions:L,pageCount:C,page:P,canPreviousPage:I,canNextPage:T,gotoPage:A,previousPage:N,nextPage:G,setPageSize:M})}Qt.pluginName="usePagination",u.resetPivot="resetPivot",u.togglePivot="togglePivot";var ee=function(t){t.getPivotToggleProps=[re],t.stateReducers.push(oe),t.useInstanceAfterData.push(ie),t.allColumns.push(ae),t.accessValue.push(ue),t.materializedColumns.push(ce),t.materializedColumnsDeps.push(le),t.visibleColumns.push(se),t.visibleColumnsDeps.push(fe),t.useInstance.push(pe),t.prepareRow.push(de)};ee.pluginName="usePivotColumns";var ne=[],re=function(t,e){var n=e.header;return[t,{onClick:n.canPivot?function(t){t.persist(),n.togglePivot()}:void 0,style:{cursor:n.canPivot?"pointer":void 0},title:"Toggle Pivot"}]};function oe(t,e,n,r){if(e.type===u.init)return o({pivotColumns:ne},t);if(e.type===u.resetPivot)return o({},t,{pivotColumns:r.initialState.pivotColumns||ne});if(e.type===u.togglePivot){var i=e.columnId,a=e.value,c=void 0!==a?a:!t.pivotColumns.includes(i);return o({},t,c?{pivotColumns:[].concat(t.pivotColumns,[i])}:{pivotColumns:t.pivotColumns.filter((function(t){return t!==i}))})}}function ie(t){t.allColumns.forEach((function(e){e.isPivotSource=t.state.pivotColumns.includes(e.id)}))}function ae(t,e){var n=e.instance;return t.forEach((function(t){t.isPivotSource=n.state.pivotColumns.includes(t.id),t.uniqueValues=new Set})),t}function ue(t,e){var n=e.column;return n.uniqueValues&&void 0!==t&&n.uniqueValues.add(t),t}function ce(t,e){var n=e.instance,r=n.allColumns,i=n.state;if(!i.pivotColumns.length||!i.groupBy||!i.groupBy.length)return t;var a=i.pivotColumns.map((function(t){return r.find((function(e){return e.id===t}))})).filter(Boolean),u=r.filter((function(t){return!t.isPivotSource&&!i.groupBy.includes(t.id)&&!i.pivotColumns.includes(t.id)})),c=S(function t(e,n,r){void 0===e&&(e=0),void 0===r&&(r=[]);var i=a[e];return i?Array.from(i.uniqueValues).sort().map((function(a){var u=o({},i,{Header:i.PivotHeader||"string"==typeof i.header?i.Header+": "+a:a,isPivotGroup:!0,parent:n,depth:e,id:n?n.id+"."+i.id+"."+a:i.id+"."+a,pivotValue:a});return u.columns=t(e+1,u,[].concat(r,[function(t){return t.values[i.id]===a}])),u})):u.map((function(t){return o({},t,{canPivot:!1,isPivoted:!0,parent:n,depth:e,id:""+(n?n.id+"."+t.id:t.id),accessor:function(e,n,o){if(r.every((function(t){return t(o)})))return o.values[t.id]}})}))}());return[].concat(t,c)}function le(t,e){var n=e.instance.state,r=n.pivotColumns,o=n.groupBy;return[].concat(t,[r,o])}function se(t,e){var n=e.instance.state;return t=t.filter((function(t){return!t.isPivotSource})),n.pivotColumns.length&&n.groupBy&&n.groupBy.length&&(t=t.filter((function(t){return t.isGrouped||t.isPivoted}))),t}function fe(t,e){var n=e.instance;return[].concat(t,[n.state.pivotColumns,n.state.groupBy])}function pe(t){var e=t.columns,n=t.allColumns,r=t.flatHeaders,o=t.getHooks,i=t.plugins,a=t.dispatch,c=t.autoResetPivot,l=void 0===c||c,s=t.manaulPivot,f=t.disablePivot,d=t.defaultCanPivot;m(i,["useGroupBy"],"usePivotColumns");var h=v(t);n.forEach((function(e){var n=e.accessor,r=e.defaultPivot,o=e.disablePivot;e.canPivot=n?R(e.canPivot,!0!==o&&void 0,!0!==f&&void 0,!0):R(e.canPivot,r,d,!1),e.canPivot&&(e.togglePivot=function(){return t.togglePivot(e.id)}),e.Aggregated=e.Aggregated||e.Cell})),r.forEach((function(t){t.getPivotToggleProps=p(o().getPivotToggleProps,{instance:h(),header:t})}));var g=v(l);b((function(){g()&&a({type:u.resetPivot})}),[a,s?null:e]),Object.assign(t,{togglePivot:function(t,e){a({type:u.togglePivot,columnId:t,value:e})}})}function de(t){t.allCells.forEach((function(t){t.isPivoted=t.column.isPivoted}))}u.resetSelectedRows="resetSelectedRows",u.toggleAllRowsSelected="toggleAllRowsSelected",u.toggleRowSelected="toggleRowSelected",u.toggleAllPageRowsSelected="toggleAllPageRowsSelected";var he=function(t){t.getToggleRowSelectedProps=[me],t.getToggleAllRowsSelectedProps=[ge],t.getToggleAllPageRowsSelectedProps=[ve],t.stateReducers.push(ye),t.useInstance.push(be),t.prepareRow.push(we)};he.pluginName="useRowSelect";var me=function(t,e){var n=e.instance,r=e.row,o=n.manualRowSelectedKey,i=void 0===o?"isSelected":o;return[t,{onChange:function(t){r.toggleRowSelected(t.target.checked)},style:{cursor:"pointer"},checked:!(!r.original||!r.original[i])||r.isSelected,title:"Toggle Row Selected",indeterminate:r.isSomeSelected}]},ge=function(t,e){var n=e.instance;return[t,{onChange:function(t){n.toggleAllRowsSelected(t.target.checked)},style:{cursor:"pointer"},checked:n.isAllRowsSelected,title:"Toggle All Rows Selected",indeterminate:Boolean(!n.isAllRowsSelected&&Object.keys(n.state.selectedRowIds).length)}]},ve=function(t,e){var n=e.instance;return[t,{onChange:function(t){n.toggleAllPageRowsSelected(t.target.checked)},style:{cursor:"pointer"},checked:n.isAllPageRowsSelected,title:"Toggle All Current Page Rows Selected",indeterminate:Boolean(!n.isAllPageRowsSelected&&n.page.some((function(t){var e=t.id;return n.state.selectedRowIds[e]})))}]};function ye(t,e,n,r){if(e.type===u.init)return o({selectedRowIds:{}},t);if(e.type===u.resetSelectedRows)return o({},t,{selectedRowIds:r.initialState.selectedRowIds||{}});if(e.type===u.toggleAllRowsSelected){var i=e.value,a=r.isAllRowsSelected,c=r.rowsById,l=r.nonGroupedRowsById,s=void 0===l?c:l,f=void 0!==i?i:!a,p=Object.assign({},t.selectedRowIds);return f?Object.keys(s).forEach((function(t){p[t]=!0})):Object.keys(s).forEach((function(t){delete p[t]})),o({},t,{selectedRowIds:p})}if(e.type===u.toggleRowSelected){var d=e.id,h=e.value,m=r.rowsById,g=r.selectSubRows,v=void 0===g||g,y=r.getSubRows,b=t.selectedRowIds[d],w=void 0!==h?h:!b;if(b===w)return t;var x=o({},t.selectedRowIds);return function t(e){var n=m[e];if(n&&(n.isGrouped||(w?x[e]=!0:delete x[e]),v&&y(n)))return y(n).forEach((function(e){return t(e.id)}))}(d),o({},t,{selectedRowIds:x})}if(e.type===u.toggleAllPageRowsSelected){var _=e.value,S=r.page,k=r.rowsById,O=r.selectSubRows,E=void 0===O||O,R=r.isAllPageRowsSelected,z=r.getSubRows,C=void 0!==_?_:!R,j=o({},t.selectedRowIds);return S.forEach((function(t){return function t(e){var n=k[e];if(n.isGrouped||(C?j[e]=!0:delete j[e]),E&&z(n))return z(n).forEach((function(e){return t(e.id)}))}(t.id)})),o({},t,{selectedRowIds:j})}return t}function be(t){var n=t.data,r=t.rows,o=t.getHooks,i=t.plugins,a=t.rowsById,c=t.nonGroupedRowsById,l=void 0===c?a:c,s=t.autoResetSelectedRows,f=void 0===s||s,d=t.state.selectedRowIds,h=t.selectSubRows,g=void 0===h||h,y=t.dispatch,w=t.page,x=t.getSubRows;m(i,["useFilters","useGroupBy","useSortBy","useExpanded","usePagination"],"useRowSelect");var _=e.useMemo((function(){var t=[];return r.forEach((function(e){var n=g?function t(e,n,r){if(n[e.id])return!0;var o=r(e);if(o&&o.length){var i=!0,a=!1;return o.forEach((function(e){a&&!i||(t(e,n,r)?a=!0:i=!1)})),!!i||!!a&&null}return!1}(e,d,x):!!d[e.id];e.isSelected=!!n,e.isSomeSelected=null===n,n&&t.push(e)})),t}),[r,g,d,x]),S=Boolean(Object.keys(l).length&&Object.keys(d).length),k=S;S&&Object.keys(l).some((function(t){return!d[t]}))&&(S=!1),S||w&&w.length&&w.some((function(t){var e=t.id;return!d[e]}))&&(k=!1);var O=v(f);b((function(){O()&&y({type:u.resetSelectedRows})}),[y,n]);var E=e.useCallback((function(t){return y({type:u.toggleAllRowsSelected,value:t})}),[y]),R=e.useCallback((function(t){return y({type:u.toggleAllPageRowsSelected,value:t})}),[y]),z=e.useCallback((function(t,e){return y({type:u.toggleRowSelected,id:t,value:e})}),[y]),C=v(t),j=p(o().getToggleAllRowsSelectedProps,{instance:C()}),L=p(o().getToggleAllPageRowsSelectedProps,{instance:C()});Object.assign(t,{selectedFlatRows:_,isAllRowsSelected:S,isAllPageRowsSelected:k,toggleRowSelected:z,toggleAllRowsSelected:E,getToggleAllRowsSelectedProps:j,getToggleAllPageRowsSelectedProps:L,toggleAllPageRowsSelected:R})}function we(t,e){var n=e.instance;t.toggleRowSelected=function(e){return n.toggleRowSelected(t.id,e)},t.getToggleRowSelectedProps=p(n.getHooks().getToggleRowSelectedProps,{instance:n,row:t})}var xe=function(t){return{}},_e=function(t){return{}};u.setRowState="setRowState",u.setCellState="setCellState",u.resetRowState="resetRowState";var Se=function(t){t.stateReducers.push(ke),t.useInstance.push(Oe),t.prepareRow.push(Ee)};function ke(t,e,n,r){var i=r.initialRowStateAccessor,a=void 0===i?xe:i,c=r.initialCellStateAccessor,l=void 0===c?_e:c,s=r.rowsById;if(e.type===u.init)return o({rowState:{}},t);if(e.type===u.resetRowState)return o({},t,{rowState:r.initialState.rowState||{}});if(e.type===u.setRowState){var f,p=e.rowId,d=e.value,h=void 0!==t.rowState[p]?t.rowState[p]:a(s[p]);return o({},t,{rowState:o({},t.rowState,(f={},f[p]=g(d,h),f))})}if(e.type===u.setCellState){var m,v,y,b,w,x=e.rowId,_=e.columnId,S=e.value,k=void 0!==t.rowState[x]?t.rowState[x]:a(s[x]),O=void 0!==(null==k||null==(m=k.cellState)?void 0:m[_])?k.cellState[_]:l(null==(v=s[x])||null==(y=v.cells)?void 0:y.find((function(t){return t.column.id===_})));return o({},t,{rowState:o({},t.rowState,(w={},w[x]=o({},k,{cellState:o({},k.cellState||{},(b={},b[_]=g(S,O),b))}),w))})}}function Oe(t){var n=t.autoResetRowState,r=void 0===n||n,o=t.data,i=t.dispatch,a=e.useCallback((function(t,e){return i({type:u.setRowState,rowId:t,value:e})}),[i]),c=e.useCallback((function(t,e,n){return i({type:u.setCellState,rowId:t,columnId:e,value:n})}),[i]),l=v(r);b((function(){l()&&i({type:u.resetRowState})}),[o]),Object.assign(t,{setRowState:a,setCellState:c})}function Ee(t,e){var n=e.instance,r=n.initialRowStateAccessor,o=void 0===r?xe:r,i=n.initialCellStateAccessor,a=void 0===i?_e:i,u=n.state.rowState;t&&(t.state=void 0!==u[t.id]?u[t.id]:o(t),t.setState=function(e){return n.setRowState(t.id,e)},t.cells.forEach((function(e){t.state.cellState||(t.state.cellState={}),e.state=void 0!==t.state.cellState[e.column.id]?t.state.cellState[e.column.id]:a(e),e.setState=function(r){return n.setCellState(t.id,e.column.id,r)}})))}Se.pluginName="useRowState",u.resetColumnOrder="resetColumnOrder",u.setColumnOrder="setColumnOrder";var Re=function(t){t.stateReducers.push(ze),t.visibleColumnsDeps.push((function(t,e){var n=e.instance;return[].concat(t,[n.state.columnOrder])})),t.visibleColumns.push(Ce),t.useInstance.push(je)};function ze(t,e,n,r){return e.type===u.init?o({columnOrder:[]},t):e.type===u.resetColumnOrder?o({},t,{columnOrder:r.initialState.columnOrder||[]}):e.type===u.setColumnOrder?o({},t,{columnOrder:g(e.columnOrder,t.columnOrder)}):void 0}function Ce(t,e){var n=e.instance.state.columnOrder;if(!n||!n.length)return t;for(var r=[].concat(n),o=[].concat(t),i=[],a=function(){var t=r.shift(),e=o.findIndex((function(e){return e.id===t}));e>-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(Ie),t.useInstance.push(Ae),t.useInstanceBeforeDimensions.push(Te)},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 T)return T;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 T=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 Ie(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 Te=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},Ge=function(t){t.getTableBodyProps.push(Me),t.getRowProps.push(Me),t.getHeaderGroupProps.push(Me),t.getFooterGroupProps.push(Me),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"})}]}))};Ge.pluginName="useAbsoluteLayout";var Me=function(t,e){return[t,{style:{position:"relative",width:e.instance.totalColumnsWidth+"px"}}]},Fe={display:"inline-block",boxSizing:"border-box"},De=function(t,e){return[t,{style:{display:"flex",width:e.instance.totalColumnsWidth+"px"}}]},Be=function(t){t.getRowProps.push(De),t.getHeaderGroupProps.push(De),t.getFooterGroupProps.push(De),t.getHeaderProps.push((function(t,e){var n=e.column;return[t,{style:o({},Fe,{width:n.totalWidth+"px"})}]})),t.getCellProps.push((function(t,e){var n=e.cell;return[t,{style:o({},Fe,{width:n.column.totalWidth+"px"})}]})),t.getFooterProps.push((function(t,e){var n=e.column;return[t,{style:o({},Fe,{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=Ge,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;u<e;u++)n[u]=c[u];return o.current.promise||(o.current.promise=new Promise((function(t,e){o.current.resolve=t,o.current.reject=e}))),o.current.timeout&&clearTimeout(o.current.timeout),o.current.timeout=setTimeout(r(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return delete o.current.timeout,t.prev=1,t.t0=o.current,t.next=5,i().apply(void 0,n);case 5:t.t1=t.sent,t.t0.resolve.call(t.t0,t.t1),t.next=12;break;case 9:t.prev=9,t.t2=t.catch(1),o.current.reject(t.t2);case 12:return t.prev=12,delete o.current.promise,t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[1,9,12,15]])}))),a()),t.abrupt("return",o.current.promise);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),[i,a])},t.useBlockLayout=Be,t.useColumnOrder=Re,t.useExpanded=ut,t.useFilters=kt,t.useFlexLayout=He,t.useGetLatest=v,t.useGlobalFilter=Rt,t.useGridLayout=Ve,t.useGroupBy=Tt,t.useMountedLayoutEffect=b,t.usePagination=Qt,t.useResizeColumns=Le,t.useRowSelect=he,t.useRowState=Se,t.useSortBy=$t,t.useTable=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t=ot(t),r=[Z].concat(r);var a=v(e.useRef({}).current);Object.assign(a(),o({},t,{plugins:r,hooks:q()})),r.filter(Boolean).forEach((function(t){t(a().hooks)}));var c=v(a().hooks);a().getHooks=c,delete a().hooks,Object.assign(a(),d(c().useOptions,ot(t)));var l=a(),s=l.data,f=l.columns,m=l.initialState,g=l.defaultColumn,y=l.getSubRows,b=l.getRowId,x=l.stateReducer,E=l.useControlledState,R=v(x),z=e.useCallback((function(t,e){if(!e.type)throw console.info({action:e}),new Error("Unknown Action 👆");return[].concat(c().stateReducers,Array.isArray(R())?R():[R()]).reduce((function(n,r){return r(n,e,t,a())||n}),t)}),[c,R,a]),C=e.useReducer(z,void 0,(function(){return z(m,{type:u.init})})),j=C[0],L=C[1],P=d([].concat(c().useControlledState,[E]),j,{instance:a()});Object.assign(a(),{state:P,dispatch:L});var I=e.useMemo((function(){return _(d(c().columns,f,{instance:a()}))}),[c,a,f].concat(d(c().columnsDeps,[],{instance:a()})));a().columns=I;var T=e.useMemo((function(){return d(c().allColumns,S(I),{instance:a()}).map(k)}),[I,c,a].concat(d(c().allColumnsDeps,[],{instance:a()})));a().allColumns=T;var A=e.useMemo((function(){for(var t=[],e=[],n={},r=[].concat(T);r.length;){var o=r.shift();at({data:s,rows:t,flatRows:e,rowsById:n,column:o,getRowId:b,getSubRows:y,accessValueHooks:c().accessValue,getInstance:a})}return[t,e,n]}),[T,s,b,y,c,a]),N=A[0],G=A[1],M=A[2];Object.assign(a(),{rows:N,initialRows:[].concat(N),flatRows:G,rowsById:M}),h(c().useInstanceAfterData,a());var F=e.useMemo((function(){return d(c().visibleColumns,T,{instance:a()}).map((function(t){return O(t,g)}))}),[c,T,a,g].concat(d(c().visibleColumnsDeps,[],{instance:a()})));T=e.useMemo((function(){var t=[].concat(F);return T.forEach((function(e){t.find((function(t){return t.id===e.id}))||t.push(e)})),t}),[T,F]),a().allColumns=T;var D=e.useMemo((function(){return d(c().headerGroups,function(t,e,n){void 0===n&&(n=function(){return{}});for(var r=[],i=t,a=0,u=function(){return a++},c=function(){var t={headers:[]},a=[],c=i.some((function(t){return t.parent}));i.forEach((function(r){var i,l=[].concat(a).reverse()[0];c&&(i=r.parent?o({},r.parent,{originalId:r.parent.id,id:r.parent.id+"_"+u(),headers:[r]},n(r)):O(o({originalId:r.id+"_placeholder",id:r.id+"_placeholder_"+u(),placeholderOf:r,headers:[r]},n(r)),e),l&&l.originalId===i.originalId?l.headers.push(r):a.push(i)),t.headers.push(r)})),r.push(t),i=a};i.length;)c();return r.reverse()}(F,g),a())}),[c,F,g,a].concat(d(c().headerGroupsDeps,[],{instance:a()})));a().headerGroups=D;var B=e.useMemo((function(){return D.length?D[0].headers:[]}),[D]);a().headers=B,a().flatHeaders=D.reduce((function(t,e){return[].concat(t,e.headers)}),[]),h(c().useInstanceBeforeDimensions,a());var H=F.filter((function(t){return t.isVisible})).map((function(t){return t.id})).sort().join("_");F=e.useMemo((function(){return F.filter((function(t){return t.isVisible}))}),[F,H]),a().visibleColumns=F;var W=it(B),U=W[0],$=W[1],V=W[2];return a().totalColumnsMinWidth=U,a().totalColumnsWidth=$,a().totalColumnsMaxWidth=V,h(c().useInstance,a()),[].concat(a().flatHeaders,a().allColumns).forEach((function(t){t.render=w(a(),t),t.getHeaderProps=p(c().getHeaderProps,{instance:a(),column:t}),t.getFooterProps=p(c().getFooterProps,{instance:a(),column:t})})),a().headerGroups=e.useMemo((function(){return D.filter((function(t,e){return t.headers=t.headers.filter((function(t){return t.headers?function t(e){return e.filter((function(e){return e.headers?t(e.headers):e.isVisible})).length}(t.headers):t.isVisible})),!!t.headers.length&&(t.getHeaderGroupProps=p(c().getHeaderGroupProps,{instance:a(),headerGroup:t,index:e}),t.getFooterGroupProps=p(c().getFooterGroupProps,{instance:a(),headerGroup:t,index:e}),!0)}))}),[D,a,c]),a().footerGroups=[].concat(a().headerGroups).reverse(),a().prepareRow=e.useCallback((function(t){t.getRowProps=p(c().getRowProps,{instance:a(),row:t}),t.allCells=T.map((function(e){var n=t.values[e.id],r={column:e,row:t,value:n};return r.getCellProps=p(c().getCellProps,{instance:a(),cell:r}),r.render=w(a(),e,{row:t,cell:r,value:n}),r})),t.cells=F.map((function(e){return t.allCells.find((function(t){return t.column.id===e.id}))})),h(c().prepareRow,t,{instance:a()})}),[c,a,T,F]),a().getTableProps=p(c().getTableProps,{instance:a()}),a().getTableBodyProps=p(c().getTableBodyProps,{instance:a()}),h(c().useFinalInstance,a()),a()},Object.defineProperty(t,"__esModule",{value:!0})}(e,n(196))},521:function(t,e,n){t.exports=n(217)},196:function(t){"use strict";t.exports=window.React}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t].call(i.exports,i,i.exports,r),i.exports}r.m=e,t=[],r.O=function(e,n,o,i){if(!n){var a=1/0;for(s=0;s<t.length;s++){n=t[s][0],o=t[s][1],i=t[s][2];for(var u=!0,c=0;c<n.length;c++)(!1&i||a>=i)&&Object.keys(r.O).every((function(t){return r.O[t](n[c])}))?n.splice(c--,1):(u=!1,i<a&&(a=i));if(u){t.splice(s--,1);var l=o();void 0!==l&&(e=l)}}return e}i=i||0;for(var s=t.length;s>0&&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<a.length;l++)i=a[l],r.o(t,i)&&t[i]&&t[i][0](),t[i]=0;return r.O(s)},n=self.webpackChunkimage_optimization=self.webpackChunkimage_optimization||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}();var o=r.O(void 0,[72],(function(){return r(282)}));o=r.O(o)}();
| ver. 1.4 |
Github
|
.
| PHP 7.4.3-4ubuntu2.24 | Генерация страницы: 0.02 |
proxy
|
phpinfo
|
Настройка