D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
psa
/
admin
/
htdocs
/
modules
/
performance-booster
/
dist
/
Filename :
index.js
back
Copy
/*! For license information please see index.js.LICENSE.txt */ define((()=>(()=>{var e={5981:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(272),s=n.n(r),o=n(2609),i=n.n(o)()(s());i.push([e.id,"/* Copyright 1999-2025. WebPros International GmbH. All rights reserved. */\n.performance-booster-highlight-cli {\n padding: 0 5px 0 5px;\n}\n\n.performance-booster-highlight-cli:hover {\n background-color: #8080804a;\n cursor: pointer;\n}\n\n[data-type=ext-db-settings-drawer] .pul-section-item__title { min-width: 250px; }\n.db-settings-buttons { margin-bottom: 21px; }\n","",{version:3,sources:["webpack://./index.css"],names:[],mappings:"AAAA,0EAA0E;AAC1E;IACI,oBAAoB;AACxB;;AAEA;IACI,2BAA2B;IAC3B,eAAe;AACnB;;AAEA,8DAA8D,gBAAgB,EAAE;AAChF,uBAAuB,mBAAmB,EAAE",sourcesContent:["/* Copyright 1999-2025. WebPros International GmbH. All rights reserved. */\n.performance-booster-highlight-cli {\n padding: 0 5px 0 5px;\n}\n\n.performance-booster-highlight-cli:hover {\n background-color: #8080804a;\n cursor: pointer;\n}\n\n[data-type=ext-db-settings-drawer] .pul-section-item__title { min-width: 250px; }\n.db-settings-buttons { margin-bottom: 21px; }\n"],sourceRoot:""}]);const a=i},2609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,s,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(i[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&i[u[0]]||(void 0!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),s&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=s):u[4]="".concat(s)),t.push(u))}},t}},272:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),o="/*# ".concat(s," */");return[t].concat([o]).join("\n")}return[t].join("\n")}},6062:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},i=[],a=0;a<e.length;a++){var l=e[a],c=r.base?l[0]+r.base:l[0],u=o[c]||0,d="".concat(c," ").concat(u);o[c]=u+1;var p=n(d),m={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(m);else{var h=s(m,r);r.byIndex=a,t.splice(a,0,{identifier:d,updater:h,references:1})}i.push(d)}return i}function s(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,s){var o=r(e=e||[],s=s||{});return function(e){e=e||[];for(var i=0;i<o.length;i++){var a=n(o[i]);t[a].references--}for(var l=r(e,s),c=0;c<o.length;c++){var u=n(o[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}o=l}}},6793:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},1173:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},7892:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},4036:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var s=void 0!==n.layer;s&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,s&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},2464:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},3467:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>es});var r={};n.r(r),n.d(r,{hasBrowserEnv:()=>ge,hasStandardBrowserEnv:()=>ye,hasStandardBrowserWebWorkerEnv:()=>xe,navigator:()=>be,origin:()=>ve});var s=n(2857);const o=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(s.Heading,{children:(0,s.jsx)(s.Skeleton,{width:200})}),(0,s.jsx)(s.SkeletonText,{lines:5}),(0,s.jsx)(s.List,{style:{marginTop:"2rem"},columns:Array.from({length:4}).fill({title:(0,s.jsx)(s.SkeletonText,{lines:1}),render:()=>(0,s.jsx)(s.SkeletonText,{lines:1})}),data:Array.from({length:2}).fill(0)})]});var i;!function(e){e.OPTIMIZED="OPTIMIZED",e.OUTDATED="OUTDATED",e.FAILED="FAILED",e.NOT_OPTIMIZED="NOT_OPTIMIZED"}(i||(i={}));const a=e=>{switch(e){case i.OPTIMIZED:case i.OUTDATED:return"success";case i.FAILED:return"warning";case i.NOT_OPTIMIZED:default:return"inactive"}},l=e=>{switch(e){case i.OPTIMIZED:return"check-mark-circle-filled";case i.OUTDATED:return"check-mark-circle";case i.FAILED:return"triangle-exclamation-mark-filled";case i.NOT_OPTIMIZED:default:return}},c=({status:e,isApplying:t,errors:n})=>t?(0,s.jsx)(s.SkeletonText,{lines:1,lineProps:{width:24}}):e&&e!==i.NOT_OPTIMIZED?(0,s.jsx)(s.Status,{icon:{name:l(e)},intent:a(e),children:[i.FAILED,i.OUTDATED].includes(e)?(0,s.jsx)(s.Popover,{intent:i.FAILED?"danger":"warning",placement:"bottom",target:(0,s.jsx)("span",{style:{borderBottom:"1px dashed"},children:(0,s.jsx)(s.Translate,{content:`optimization.status.${e}`})}),children:n}):(0,s.jsx)(s.Translate,{content:`optimization.status.${e}`})}):null;function u(e,t){return function(){return e.apply(t,arguments)}}const{toString:d}=Object.prototype,{getPrototypeOf:p}=Object,m=(h=Object.create(null),e=>{const t=d.call(e);return h[t]||(h[t]=t.slice(8,-1).toLowerCase())});var h;const f=e=>(e=e.toLowerCase(),t=>m(t)===e),g=e=>t=>typeof t===e,{isArray:b}=Array,y=g("undefined"),x=f("ArrayBuffer"),v=g("string"),j=g("function"),w=g("number"),T=e=>null!==e&&"object"==typeof e,E=e=>{if("object"!==m(e))return!1;const t=p(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},S=f("Date"),O=f("File"),A=f("Blob"),C=f("FileList"),R=f("URLSearchParams"),[k,P,_,L]=["ReadableStream","Request","Response","Headers"].map(f);function I(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,s;if("object"!=typeof e&&(e=[e]),b(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let i;for(r=0;r<o;r++)i=s[r],t.call(null,e[i],i,e)}}function D(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,s=n.length;for(;s-- >0;)if(r=n[s],t===r.toLowerCase())return r;return null}const z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,N=e=>!y(e)&&e!==z,U=(B="undefined"!=typeof Uint8Array&&p(Uint8Array),e=>B&&e instanceof B);var B;const F=f("HTMLFormElement"),M=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),q=f("RegExp"),$=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};I(n,((n,s)=>{let o;!1!==(o=t(n,s,e))&&(r[s]=o||n)})),Object.defineProperties(e,r)},W=f("AsyncFunction"),V=(H="function"==typeof setImmediate,J=j(z.postMessage),H?setImmediate:J?(Z=`axios@${Math.random()}`,K=[],z.addEventListener("message",(({source:e,data:t})=>{e===z&&t===Z&&K.length&&K.shift()()}),!1),e=>{K.push(e),z.postMessage(Z,"*")}):e=>setTimeout(e));var H,J,Z,K;const G="undefined"!=typeof queueMicrotask?queueMicrotask.bind(z):"undefined"!=typeof process&&process.nextTick||V,X={isArray:b,isArrayBuffer:x,isBuffer:function(e){return null!==e&&!y(e)&&null!==e.constructor&&!y(e.constructor)&&j(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||j(e.append)&&("formdata"===(t=m(e))||"object"===t&&j(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&x(e.buffer),t},isString:v,isNumber:w,isBoolean:e=>!0===e||!1===e,isObject:T,isPlainObject:E,isReadableStream:k,isRequest:P,isResponse:_,isHeaders:L,isUndefined:y,isDate:S,isFile:O,isBlob:A,isRegExp:q,isFunction:j,isStream:e=>T(e)&&j(e.pipe),isURLSearchParams:R,isTypedArray:U,isFileList:C,forEach:I,merge:function e(){const{caseless:t}=N(this)&&this||{},n={},r=(r,s)=>{const o=t&&D(n,s)||s;E(n[o])&&E(r)?n[o]=e(n[o],r):E(r)?n[o]=e({},r):b(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&I(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(I(t,((t,r)=>{n&&j(t)?e[r]=u(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],r&&!r(i,e,t)||a[i]||(t[i]=e[i],a[i]=!0);e=!1!==n&&p(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:m,kindOfTest:f,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(b(e))return e;let t=e.length;if(!w(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:F,hasOwnProperty:M,hasOwnProp:M,reduceDescriptors:$,freezeMethods:e=>{$(e,((t,n)=>{if(j(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];j(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return b(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:D,global:z,isContextDefined:N,isSpecCompliantForm:function(e){return!!(e&&j(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(T(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const s=b(e)?[]:{};return I(e,((e,t)=>{const o=n(e,r+1);!y(o)&&(s[t]=o)})),t[r]=void 0,s}}return e};return n(e,0)},isAsyncFn:W,isThenable:e=>e&&(T(e)||j(e))&&j(e.then)&&j(e.catch),setImmediate:V,asap:G};function Q(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}X.inherits(Q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:X.toJSONObject(this.config),code:this.code,status:this.status}}});const Y=Q.prototype,ee={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{ee[e]={value:e}})),Object.defineProperties(Q,ee),Object.defineProperty(Y,"isAxiosError",{value:!0}),Q.from=(e,t,n,r,s,o)=>{const i=Object.create(Y);return X.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Q.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const te=Q;function ne(e){return X.isPlainObject(e)||X.isArray(e)}function re(e){return X.endsWith(e,"[]")?e.slice(0,-2):e}function se(e,t,n){return e?e.concat(t).map((function(e,t){return e=re(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const oe=X.toFlatObject(X,{},null,(function(e){return/^is[A-Z]/.test(e)})),ie=function(e,t,n){if(!X.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=X.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!X.isUndefined(t[e])}))).metaTokens,s=n.visitor||c,o=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&X.isSpecCompliantForm(t);if(!X.isFunction(s))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(X.isDate(e))return e.toISOString();if(!a&&X.isBlob(e))throw new te("Blob is not supported. Use a Buffer instead.");return X.isArrayBuffer(e)||X.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,s){let a=e;if(e&&!s&&"object"==typeof e)if(X.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(X.isArray(e)&&function(e){return X.isArray(e)&&!e.some(ne)}(e)||(X.isFileList(e)||X.endsWith(n,"[]"))&&(a=X.toArray(e)))return n=re(n),a.forEach((function(e,r){!X.isUndefined(e)&&null!==e&&t.append(!0===i?se([n],r,o):null===i?n:n+"[]",l(e))})),!1;return!!ne(e)||(t.append(se(s,n,o),l(e)),!1)}const u=[],d=Object.assign(oe,{defaultVisitor:c,convertValue:l,isVisitable:ne});if(!X.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!X.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),X.forEach(n,(function(n,o){!0===(!(X.isUndefined(n)||null===n)&&s.call(t,n,X.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])})),u.pop()}}(e),t};function ae(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function le(e,t){this._pairs=[],e&&ie(e,this,t)}const ce=le.prototype;ce.append=function(e,t){this._pairs.push([e,t])},ce.toString=function(e){const t=e?function(t){return e.call(this,t,ae)}:ae;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ue=le;function de(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function pe(e,t,n){if(!t)return e;const r=n&&n.encode||de;X.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(o=s?s(t,n):X.isURLSearchParams(t)?t.toString():new ue(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const me=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){X.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},he={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ue,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ge="undefined"!=typeof window&&"undefined"!=typeof document,be="object"==typeof navigator&&navigator||void 0,ye=ge&&(!be||["ReactNative","NativeScript","NS"].indexOf(be.product)<0),xe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ve=ge&&window.location.href||"http://localhost",je={...r,...fe},we=function(e){function t(e,n,r,s){let o=e[s++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),a=s>=e.length;return o=!o&&X.isArray(r)?r.length:o,a?(X.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!i):(r[o]&&X.isObject(r[o])||(r[o]=[]),t(e,n,r[o],s)&&X.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}(r[o])),!i)}if(X.isFormData(e)&&X.isFunction(e.entries)){const n={};return X.forEachEntry(e,((e,r)=>{t(function(e){return X.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},Te={transitional:he,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=X.isObject(e);if(s&&X.isHTMLForm(e)&&(e=new FormData(e)),X.isFormData(e))return r?JSON.stringify(we(e)):e;if(X.isArrayBuffer(e)||X.isBuffer(e)||X.isStream(e)||X.isFile(e)||X.isBlob(e)||X.isReadableStream(e))return e;if(X.isArrayBufferView(e))return e.buffer;if(X.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ie(e,new je.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return je.isNode&&X.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=X.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ie(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),function(e,t,n){if(X.isString(e))try{return(0,JSON.parse)(e),X.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Te.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(X.isResponse(e)||X.isReadableStream(e))return e;if(e&&X.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw te.from(e,te.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:je.classes.FormData,Blob:je.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};X.forEach(["delete","get","head","post","put","patch"],(e=>{Te.headers[e]={}}));const Ee=Te,Se=X.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Oe=Symbol("internals");function Ae(e){return e&&String(e).trim().toLowerCase()}function Ce(e){return!1===e||null==e?e:X.isArray(e)?e.map(Ce):String(e)}function Re(e,t,n,r,s){return X.isFunction(r)?r.call(this,t,n):(s&&(t=n),X.isString(t)?X.isString(r)?-1!==t.indexOf(r):X.isRegExp(r)?r.test(t):void 0:void 0)}class ke{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(e,t,n){const s=Ae(t);if(!s)throw new Error("header name must be a non-empty string");const o=X.findKey(r,s);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=Ce(e))}const o=(e,t)=>X.forEach(e,((e,n)=>s(e,n,t)));if(X.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(X.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,r,s;return e&&e.split("\n").forEach((function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),r=e.substring(s+1).trim(),!n||t[n]&&Se[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(X.isHeaders(e))for(const[t,r]of e.entries())s(r,t,n);else null!=e&&s(t,e,n);return this}get(e,t){if(e=Ae(e)){const n=X.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(X.isFunction(t))return t.call(this,e,n);if(X.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ae(e)){const n=X.findKey(this,e);return!(!n||void 0===this[n]||t&&!Re(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function s(e){if(e=Ae(e)){const s=X.findKey(n,e);!s||t&&!Re(0,n[s],s,t)||(delete n[s],r=!0)}}return X.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];e&&!Re(0,this[s],s,e,!0)||(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return X.forEach(this,((r,s)=>{const o=X.findKey(n,s);if(o)return t[o]=Ce(r),void delete t[s];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(s):String(s).trim();i!==s&&delete t[s],t[i]=Ce(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return X.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&X.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Oe]=this[Oe]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Ae(e);t[r]||(function(e,t){const n=X.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,s){return this[r].call(this,t,e,n,s)},configurable:!0})}))}(n,e),t[r]=!0)}return X.isArray(e)?e.forEach(r):r(e),this}}ke.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.reduceDescriptors(ke.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),X.freezeMethods(ke);const Pe=ke;function _e(e,t){const n=this||Ee,r=t||n,s=Pe.from(r.headers);let o=r.data;return X.forEach(e,(function(e){o=e.call(n,o,s.normalize(),t?t.status:void 0)})),s.normalize(),o}function Le(e){return!(!e||!e.__CANCEL__)}function Ie(e,t,n){te.call(this,null==e?"canceled":e,te.ERR_CANCELED,t,n),this.name="CanceledError"}X.inherits(Ie,te,{__CANCEL__:!0});const De=Ie;function ze(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new te("Request failed with status code "+n.status,[te.ERR_BAD_REQUEST,te.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Ne=(e,t,n=3)=>{let r=0;const s=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s,o=0,i=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=r[i];s||(s=l),n[o]=a,r[o]=l;let u=i,d=0;for(;u!==o;)d+=n[u++],u%=e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-s<t)return;const p=c&&l-c;return p?Math.round(1e3*d/p):void 0}}(50,250);return function(e,t){let n,r,s=0,o=1e3/t;const i=(t,o=Date.now())=>{s=o,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-s;a>=o?i(e,t):(n=e,r||(r=setTimeout((()=>{r=null,i(n)}),o-a)))},()=>n&&i(n)]}((n=>{const o=n.loaded,i=n.lengthComputable?n.total:void 0,a=o-r,l=s(a);r=o,e({loaded:o,total:i,progress:i?o/i:void 0,bytes:a,rate:l||void 0,estimated:l&&i&&o<=i?(i-o)/l:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})}),n)},Ue=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Be=e=>(...t)=>X.asap((()=>e(...t))),Fe=je.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,je.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(je.origin),je.navigator&&/(msie|trident)/i.test(je.navigator.userAgent)):()=>!0,Me=je.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];X.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),X.isString(r)&&i.push("path="+r),X.isString(s)&&i.push("domain="+s),!0===o&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function qe(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const $e=e=>e instanceof Pe?{...e}:e;function We(e,t){t=t||{};const n={};function r(e,t,n,r){return X.isPlainObject(e)&&X.isPlainObject(t)?X.merge.call({caseless:r},e,t):X.isPlainObject(t)?X.merge({},t):X.isArray(t)?t.slice():t}function s(e,t,n,s){return X.isUndefined(t)?X.isUndefined(e)?void 0:r(void 0,e,0,s):r(e,t,0,s)}function o(e,t){if(!X.isUndefined(t))return r(void 0,t)}function i(e,t){return X.isUndefined(t)?X.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,s,o){return o in t?r(n,s):o in e?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t,n)=>s($e(e),$e(t),0,!0)};return X.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=l[r]||s,i=o(e[r],t[r],r);X.isUndefined(i)&&o!==a||(n[r]=i)})),n}const Ve=e=>{const t=We({},e);let n,{data:r,withXSRFToken:s,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:l}=t;if(t.headers=a=Pe.from(a),t.url=pe(qe(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),X.isFormData(r))if(je.hasStandardBrowserEnv||je.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(je.hasStandardBrowserEnv&&(s&&X.isFunction(s)&&(s=s(t)),s||!1!==s&&Fe(t.url))){const e=o&&i&&Me.read(i);e&&a.set(o,e)}return t},He="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Ve(e);let s=r.data;const o=Pe.from(r.headers).normalize();let i,a,l,c,u,{responseType:d,onUploadProgress:p,onDownloadProgress:m}=r;function h(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let f=new XMLHttpRequest;function g(){if(!f)return;const r=Pe.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());ze((function(e){t(e),h()}),(function(e){n(e),h()}),{data:d&&"text"!==d&&"json"!==d?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(g)},f.onabort=function(){f&&(n(new te("Request aborted",te.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new te("Network Error",te.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||he;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new te(t,s.clarifyTimeoutError?te.ETIMEDOUT:te.ECONNABORTED,e,f)),f=null},void 0===s&&o.setContentType(null),"setRequestHeader"in f&&X.forEach(o.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),X.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),d&&"json"!==d&&(f.responseType=r.responseType),m&&([l,u]=Ne(m,!0),f.addEventListener("progress",l)),p&&f.upload&&([a,c]=Ne(p),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(i=t=>{f&&(n(!t||t.type?new De(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===je.protocols.indexOf(b)?n(new te("Unsupported protocol "+b+":",te.ERR_BAD_REQUEST,e)):f.send(s||null)}))},Je=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const s=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof te?t:new De(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,s(new te(`timeout ${t} of ms exceeded`,te.ETIMEDOUT))}),t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)})),e=null)};e.forEach((e=>e.addEventListener("abort",s)));const{signal:a}=r;return a.unsubscribe=()=>X.asap(i),a}},Ze=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,s=0;for(;s<n;)r=s+t,yield e.slice(s,r),s=r},Ke=(e,t,n,r)=>{const s=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*Ze(n,t)}(e,t);let o,i=0,a=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await s.next();if(t)return a(),void e.close();let o=r.byteLength;if(n){let e=i+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),s.return())},{highWaterMark:2})},Ge="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Xe=Ge&&"function"==typeof ReadableStream,Qe=Ge&&("function"==typeof TextEncoder?(Ye=new TextEncoder,e=>Ye.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Ye;const et=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},tt=Xe&&et((()=>{let e=!1;const t=new Request(je.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),nt=Xe&&et((()=>X.isReadableStream(new Response("").body))),rt={stream:nt&&(e=>e.body)};var st;Ge&&(st=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!rt[e]&&(rt[e]=X.isFunction(st[e])?t=>t[e]():(t,n)=>{throw new te(`Response type '${e}' is not supported`,te.ERR_NOT_SUPPORT,n)})})));const ot=Ge&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:p}=Ve(e);c=c?(c+"").toLowerCase():"text";let m,h=Je([s,o&&o.toAbortSignal()],i);const f=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(l&&tt&&"get"!==n&&"head"!==n&&0!==(g=await(async(e,t)=>{const n=X.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(X.isBlob(e))return e.size;if(X.isSpecCompliantForm(e)){const t=new Request(je.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return X.isArrayBufferView(e)||X.isArrayBuffer(e)?e.byteLength:(X.isURLSearchParams(e)&&(e+=""),X.isString(e)?(await Qe(e)).byteLength:void 0)})(t):n})(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(X.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Ue(g,Ne(Be(l)));r=Ke(n.body,65536,e,t)}}X.isString(d)||(d=d?"include":"omit");const s="credentials"in Request.prototype;m=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:s?d:void 0});let o=await fetch(m);const i=nt&&("stream"===c||"response"===c);if(nt&&(a||i&&f)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=X.toFiniteNumber(o.headers.get("content-length")),[n,r]=a&&Ue(t,Ne(Be(a),!0))||[];o=new Response(Ke(o.body,65536,n,(()=>{r&&r(),f&&f()})),e)}c=c||"text";let b=await rt[X.findKey(rt,c)||"text"](o,e);return!i&&f&&f(),await new Promise(((t,n)=>{ze(t,n,{data:b,headers:Pe.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:m})}))}catch(t){if(f&&f(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new te("Network Error",te.ERR_NETWORK,e,m),{cause:t.cause||t});throw te.from(t,t&&t.code,e,m)}}),it={http:null,xhr:He,fetch:ot};X.forEach(it,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const at=e=>`- ${e}`,lt=e=>X.isFunction(e)||null===e||!1===e,ct=e=>{e=X.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o<t;o++){let t;if(n=e[o],r=n,!lt(n)&&(r=it[(t=String(n)).toLowerCase()],void 0===r))throw new te(`Unknown adapter '${t}'`);if(r)break;s[t||"#"+o]=r}if(!r){const e=Object.entries(s).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(at).join("\n"):" "+at(e[0]):"as no adapter specified";throw new te("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function ut(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new De(null,e)}function dt(e){return ut(e),e.headers=Pe.from(e.headers),e.data=_e.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ct(e.adapter||Ee.adapter)(e).then((function(t){return ut(e),t.data=_e.call(e,e.transformResponse,t),t.headers=Pe.from(t.headers),t}),(function(t){return Le(t)||(ut(e),t&&t.response&&(t.response.data=_e.call(e,e.transformResponse,t.response),t.response.headers=Pe.from(t.response.headers))),Promise.reject(t)}))}const pt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{pt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const mt={};pt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,o)=>{if(!1===e)throw new te(r(s," has been removed"+(t?" in "+t:"")),te.ERR_DEPRECATED);return t&&!mt[s]&&(mt[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,o)}},pt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const ht={assertOptions:function(e,t,n){if("object"!=typeof e)throw new te("options must be an object",te.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const t=e[o],n=void 0===t||i(t,o,e);if(!0!==n)throw new te("option "+o+" must be "+n,te.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new te("Unknown option "+o,te.ERR_BAD_OPTION)}},validators:pt},ft=ht.validators;class gt{constructor(e){this.defaults=e,this.interceptors={request:new me,response:new me}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=We(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;void 0!==n&&ht.assertOptions(n,{silentJSONParsing:ft.transitional(ft.boolean),forcedJSONParsing:ft.transitional(ft.boolean),clarifyTimeoutError:ft.transitional(ft.boolean)},!1),null!=r&&(X.isFunction(r)?t.paramsSerializer={serialize:r}:ht.assertOptions(r,{encode:ft.function,serialize:ft.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ht.assertOptions(t,{baseUrl:ft.spelling("baseURL"),withXsrfToken:ft.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&X.merge(s.common,s[t.method]);s&&X.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete s[e]})),t.headers=Pe.concat(o,s);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!a){const e=[dt.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=i.length;let p=t;for(d=0;d<u;){const e=i[d++],t=i[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{c=dt.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return pe(qe((e=We(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}X.forEach(["delete","get","head","options"],(function(e){gt.prototype[e]=function(t,n){return this.request(We(n||{},{method:e,url:t,data:(n||{}).data}))}})),X.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,s){return this.request(We(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}gt.prototype[e]=t(),gt.prototype[e+"Form"]=t(!0)}));const bt=gt;class yt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,s){n.reason||(n.reason=new De(e,r,s),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new yt((function(t){e=t})),cancel:e}}}const xt=yt,vt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vt).forEach((([e,t])=>{vt[t]=e}));const jt=vt,wt=function e(t){const n=new bt(t),r=u(bt.prototype.request,n);return X.extend(r,bt.prototype,n,{allOwnKeys:!0}),X.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(We(t,n))},r}(Ee);wt.Axios=bt,wt.CanceledError=De,wt.CancelToken=xt,wt.isCancel=Le,wt.VERSION="1.8.4",wt.toFormData=ie,wt.AxiosError=te,wt.Cancel=wt.CanceledError,wt.all=function(e){return Promise.all(e)},wt.spread=function(e){return function(t){return e.apply(null,t)}},wt.isAxiosError=function(e){return X.isObject(e)&&!0===e.isAxiosError},wt.mergeConfig=We,wt.AxiosHeaders=Pe,wt.formToJSON=e=>we(X.isHTMLForm(e)?new FormData(e):e),wt.getAdapter=ct,wt.HttpStatusCode=jt,wt.default=wt;const Tt=wt;Tt.interceptors.response.use((e=>e.data),(e=>401===e.response?.status?(window.location.reload(),new Promise((()=>{}))):Promise.reject(e)));const Et="/api/modules/performance-booster",St=e=>{const t={};for(const[n,r]of Object.entries(e))t[n]=String(r);return new URLSearchParams(t)},Ot=(e,{query:t,...n}={})=>Tt.get(`${Et}/${e}?${t??""}`,n),At=(e,t)=>Tt.post(`${Et}/${e}`,t),Ct=(e,t)=>{const n=(0,s.useRef)(new Set);(0,s.useEffect)((()=>{if("Jsw"in window){const r=(e,t)=>{e?.(t),n.current.add(t.id)},s=s=>{t.uniq&&n.current.has(s.id)||s.type===`ext-performance-booster-${e}`&&(t.onError&&"error"===s.status&&r(t.onError,s),t.onComplete&&"done"===s.status&&r(t.onComplete,s))};return Jsw.Observer.append(s,"plesk:taskComplete"),()=>Jsw.Observer.remove(s,"plesk:taskComplete")}}),[e,t])},Rt=()=>(0,s.jsxs)(s.Popover,{target:(0,s.jsx)(s.Icon,{name:"info-circle-filled",intent:"info"}),placement:"left",children:[(0,s.jsx)(s.Paragraph,{children:(0,s.jsx)(s.Translate,{content:"speedup.description.explainTtfb"})}),(0,s.jsx)(s.Paragraph,{children:(0,s.jsx)(s.Translate,{content:"speedup.description.externalMeasurement",params:{link:(0,s.jsx)(s.Link,{href:"https://gtmetrix.com/",target:"_blank",children:"GTmetrix"})}})})]}),kt=(0,s.createContext)({dbSettingsGuiEnabled:!1,optimizations:{},stages:{},showSpeedupColumn:!0,excludedSpeedupStages:[]}),Pt=()=>(0,s.useContext)(kt),_t=e=>{const{excludedSpeedupStages:t}=Pt();return!!e.optimizations.find((e=>e?.stages.find((e=>!t.includes(e.guid)&&e.status===i.OPTIMIZED))))},Lt=(0,s.createContext)({measure:{isMeasuring:!1,domainId:null},setMeasure:()=>{}}),It=({children:e})=>{const[t,n]=(0,s.useState)({isMeasuring:!1,domainId:null}),r=(0,s.useMemo)((()=>({measure:t,setMeasure:n})),[t]);return(0,s.jsx)(Lt.Provider,{value:r,children:e})},Dt=()=>(0,s.useContext)(Lt),{Axios:zt,AxiosError:Nt,CanceledError:Ut,isCancel:Bt,CancelToken:Ft,VERSION:Mt,all:qt,Cancel:$t,isAxiosError:Wt,spread:Vt,toFormData:Ht,AxiosHeaders:Jt,HttpStatusCode:Zt,formToJSON:Kt,getAdapter:Gt,mergeConfig:Xt}=Tt,Qt=({title:e,children:t,loading:n,skeleton:r=(0,s.jsx)(s.SkeletonText,{lines:1,lineProps:{width:24}})})=>(0,s.jsxs)(s.Paragraph,{children:[(0,s.jsxs)(s.Text,{bold:!0,children:[e,": "]}),n?r:t]}),Yt=()=>(0,s.jsxs)(s.Paragraph,{children:[(0,s.jsx)(s.Icon,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"})," ",(0,s.jsx)(s.Translate,{content:"speedup.measure.warning"})]}),en=({ttfbOptimizationsPercent:e,ttfbWithoutOptimizations:t,ttfbOptimizationDifferenceMs:n,ttfbThreshold:r})=>{const o=Boolean(e&&t>r);return(0,s.jsxs)(s.Fragment,{children:[e?(0,s.jsxs)(s.Fragment,{children:[n," ",(0,s.jsx)(s.Translate,{content:"speedup.ms"})]}):null,o?" (":null,t>r||!e?`${e}%`:null,o?")":null]})},tn=({domain:e})=>{const{measure:t,setMeasure:n}=Dt(),{domainId:r,ttfbWithoutOptimizations:o,ttfbWithOptimizations:i,ttfbOptimizationsPercent:a,ttfbOptimizationDifferenceMs:l,ttfbThreshold:c,lastMeasureDate:u}=e,d=_t(e),p=r===t.domainId;if(!p&&!d)return null;const m=async({domainId:e})=>{n({isMeasuring:!0,domainId:e});try{await(({domainId:e})=>At(`domains/${e}/measure`))({domainId:e})}catch(e){if(!Wt(e))throw e}};if(!(p||o&&i))return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(s.Paragraph,{children:(0,s.jsx)(s.Translate,{content:"speedup.measure.unmeasuredDescription"})}),(0,s.jsx)(s.Paragraph,{children:(0,s.jsx)(s.Translate,{content:"speedup.measure.unmeasuredStartMeasure",params:{link:(0,s.jsx)(s.Tooltip,{title:t.isMeasuring&&!p?(0,s.jsx)(s.Translate,{content:"speedup.measure.inProgress"}):(0,s.jsx)(s.Translate,{content:"speedup.measure.startMeasure"}),children:(0,s.jsx)(s.Link,{disabled:t.isMeasuring,onClick:()=>{m({domainId:r})},children:(0,s.jsx)(s.Translate,{content:"speedup.measure.unmeasuredStartMeasure_link_text"})})})}})}),(0,s.jsx)(Yt,{})]});const h=(0,s.jsx)(en,{ttfbOptimizationsPercent:a,ttfbOptimizationDifferenceMs:l,ttfbThreshold:c,ttfbWithoutOptimizations:o});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(s.Paragraph,{children:(0,s.jsx)(s.Translate,{content:"speedup.measure.measuredDescription"})}),(0,s.jsx)(Qt,{title:(0,s.jsx)(s.Translate,{content:"speedup.measure.lastRun"}),loading:p,skeleton:(0,s.jsx)(s.SkeletonText,{lines:1,lineProps:{width:180}}),children:new Date(u).toLocaleString(document.documentElement.lang??"en")}),(0,s.jsxs)(Qt,{title:(0,s.jsx)(s.Translate,{content:"speedup.measure.ttfbWithoutOptimizations"}),loading:p,children:[o," ",(0,s.jsx)(s.Translate,{content:"speedup.ms"})]}),(0,s.jsxs)(Qt,{title:(0,s.jsx)(s.Translate,{content:"speedup.measure.ttfbWithOptimizations"}),loading:p,children:[i," ",(0,s.jsx)(s.Translate,{content:"speedup.ms"})]}),(0,s.jsxs)(Qt,{title:(0,s.jsx)(s.Translate,{content:"domainsList.speedup"}),loading:p,skeleton:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(s.SkeletonText,{lines:1,lineProps:{width:45}}),(0,s.jsx)(s.Button,{ghost:!0,state:"loading"})]}),children:[(0,s.jsx)(s.Text,{intent:a>0?"success":"muted",children:h}),(0,s.jsx)(s.Button,{ghost:!0,icon:"refresh",disabled:t.isMeasuring,onClick:()=>{m({domainId:r})},tooltip:(0,s.jsx)(s.Translate,{content:"speedup.measure.startMeasure"}),style:{marginTop:"-6px",marginBottom:"-6px"}}),t.isMeasuring&&!p&&(0,s.jsxs)(s.Fragment,{children:[" (",(0,s.jsx)(s.Translate,{content:"speedup.measure.inProgress"}),") "]})]}),(0,s.jsx)(Yt,{})]})},nn=({ttfbOptimizationsPercent:e,ttfbWithoutOptimizations:t,ttfbOptimizationDifferenceMs:n,ttfbThreshold:r})=>{const o=Boolean(e&&t>r);return(0,s.jsxs)(s.Fragment,{children:[e?(0,s.jsxs)(s.Fragment,{children:[n," ",(0,s.jsx)(s.Translate,{content:"speedup.ms"})]}):null,o?" (":null,t>r||!e?`${e}%`:null,o?")":null]})},rn=({domain:e})=>{const{name:t,domainId:n,ttfbWithoutOptimizations:r,ttfbWithOptimizations:o,ttfbOptimizationsPercent:i,ttfbOptimizationDifferenceMs:a,ttfbThreshold:l}=e,{measure:c}=Dt(),u=_t(e),d=n===c.domainId;if(!d&&!u)return null;const p=(0,s.jsx)(tn,{domain:e});if(!(d||r&&o))return(0,s.jsx)(s.Popover,{target:(0,s.jsx)(s.Link,{children:(0,s.jsx)(s.Translate,{content:"speedup.tryItLink"})}),title:(0,s.jsx)(s.Translate,{content:"speedup.measure.unmeasuredTitle",params:{domainName:t}}),placement:"bottom",children:p});const m=(0,s.jsx)(nn,{ttfbOptimizationsPercent:i,ttfbOptimizationDifferenceMs:a,ttfbThreshold:l,ttfbWithoutOptimizations:r});return(0,s.jsx)(s.Popover,{title:(0,s.jsx)(s.Translate,{content:"speedup.measure.measuredTitle",params:{domainName:t}}),target:(0,s.jsx)(s.Link,{children:d?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(s.Translate,{content:"speedup.measure.measuring"}),(0,s.jsx)(s.Button,{ghost:!0,state:"loading",style:{marginTop:"-6px",marginBottom:"-6px"}})]}):(0,s.jsx)(s.Translate,{content:"speedup.measure.measureDescription",params:{result:m}})}),placement:"bottom",children:p})},sn=({onSelect:e})=>{const[t,n]=(0,s.useState)([]),[r,a]=(0,s.useState)({sortColumn:"domain",sortDirection:"ASC"}),{measure:l,setMeasure:u}=Dt(),[d,p]=(0,s.useState)(1),[m,h]=(0,s.useState)(25),[f,g]=(0,s.useState)(null),[b,y]=(0,s.useState)(!1),x="all"===m?1:Math.ceil((f??0)/m),{optimizations:v}=Pt(),j=(0,s.useCallback)((async()=>{try{const t=await(e={sort:r.sortColumn,order:r.sortDirection,page:d,itemsPerPage:m},Ot("domains/",{query:St(e)}));n(t.domains),g(t.total);const s=t.domains.find((e=>e.isMeasuring));u({isMeasuring:!!s,domainId:s?.domainId||null})}catch(e){if(!Wt(e))throw e}var e}),[n,u,d,m,r]);(0,s.useEffect)((()=>{j()}),[j]),Ct("applystages",{uniq:!0,onComplete:()=>j(),onError:()=>j()}),Ct("measuredomainspeed",{uniq:!0,onComplete:()=>j(),onError:()=>j()}),Ct("syncdomainstages",{uniq:!0,onComplete:()=>{j(),y(!1)},onError:()=>{j(),y(!1)}});const{showSpeedupColumn:w}=Pt(),T=(0,s.useMemo)((()=>{const t=[];for(const e of Object.values(v))e.sortName&&t.push({key:e.sortName,sortable:!0,width:"200px",align:"left",title:(0,s.jsx)(s.Translate,{id:`domainsList-sort-${e.sortName}`,content:`domainsList.${e.sortName}`}),render:({optimizations:t,isApplying:n})=>{const r=t.find((t=>t.name===e.name));let o=i.NOT_OPTIMIZED;r?.stages.find((e=>e.status===i.FAILED))?o=i.FAILED:r?.stages.find((e=>e.status===i.OPTIMIZED))&&(o=i.OPTIMIZED);const a=r?.stages.flatMap((e=>e.errors)).join("\n");return(0,s.jsx)(c,{status:o||i.NOT_OPTIMIZED,isApplying:n,errors:a??""})}});return w&&t.push({key:"measurement",width:"200px",align:"left",title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(s.Translate,{id:"domainsList-sort-speedup",content:"domainsList.speedup"})," ",(0,s.jsx)(Rt,{})]}),render:e=>(0,s.jsx)(rn,{domain:e})}),[{type:"title",key:"domain",width:"350px",sortable:!0,truncate:!0,title:(0,s.jsx)(s.Translate,{id:"domainsList-sort-name",content:"domainsList.name"}),render:({domainId:t,name:n,isApplying:r})=>{if(l.isMeasuring){const e=(0,s.jsx)(s.Translate,{content:"domainsList.measurementInProgress"});return(0,s.jsx)(s.Tooltip,{title:e,children:(0,s.jsx)(s.Link,{disabled:!0,children:n})})}return r?(0,s.jsx)(s.Link,{disabled:!0,children:n}):(0,s.jsx)(s.Link,{id:`domainsList-name-${t}`,onClick:()=>e(t),children:n})}},...t]}),[w,v,e,l.isMeasuring]);return null===f?(0,s.jsx)(o,{}):(0,s.jsxs)(s.Section,{title:(0,s.jsx)(s.Translate,{content:"domainsList.section-title"}),children:[(0,s.jsx)(s.Status,{icon:{size:"32"},intent:"info",children:(0,s.jsxs)(s.Paragraph,{children:[(0,s.jsx)(s.Translate,{content:"hints.sectionDescription"}),(0,s.jsx)("br",{}),(0,s.jsx)(s.Translate,{content:"hints.measurePerformance"}),(0,s.jsx)("br",{}),(0,s.jsx)(s.Translate,{content:"hints.revertChanges"})]})}),(0,s.jsx)(s.List,{data:t,columns:T,sortColumn:r?.sortColumn,sortDirection:r?.sortDirection,onSortChange:a,totalRows:f,pagination:(0,s.jsx)(s.Pagination,{current:d,total:x,onSelect:e=>{p(e)},itemsPerPage:m,onItemsPerPageChange:e=>{p(1),h(e)}}),toolbar:(0,s.jsx)(s.Toolbar,{children:(0,s.jsx)(s.ToolbarGroup,{title:(0,s.jsx)(s.Translate,{content:"domainsList.resync"}),children:(0,s.jsx)(s.Button,{state:b?"loading":void 0,tooltip:(0,s.jsx)(s.Translate,{content:"domainsList.refreshList"}),icon:"refresh",onClick:async()=>{y(!0);try{await At("stages/resync")}catch(e){if(!Wt(e))throw e}},children:(0,s.jsx)(s.Translate,{content:"domainsList.resync"})})})})})]})};function on(){return on=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},on.apply(this,arguments)}var an;!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(an||(an={}));const ln="popstate";function cn(e,t){if(!1===e||null==e)throw new Error(t)}function un(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function dn(e,t){return{usr:e.state,key:e.key,idx:t}}function pn(e,t,n,r){return void 0===n&&(n=null),on({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?hn(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function mn(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function hn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var fn;function gn(e,t,n){void 0===n&&(n="/");let r=kn(("string"==typeof t?hn(t):t).pathname||"/",n);if(null==r)return null;let s=bn(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(s);let o=null;for(let e=0;null==o&&e<s.length;++e)o=An(s[e],Rn(r));return o}function bn(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let s=(e,s,o)=>{let i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:s,route:e};i.relativePath.startsWith("/")&&(cn(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let a=In([r,i.relativePath]),l=n.concat(i);e.children&&e.children.length>0&&(cn(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),bn(e.children,t,l,a)),(null!=e.path||e.index)&&t.push({path:a,score:On(a,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of yn(e.path))s(e,t,n);else s(e,t)})),t}function yn(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return s?[o,""]:[o];let i=yn(r.join("/")),a=[];return a.push(...i.map((e=>""===e?o:[o,e].join("/")))),s&&a.push(...i),a.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(fn||(fn={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const xn=/^:\w+$/,vn=3,jn=2,wn=1,Tn=10,En=-2,Sn=e=>"*"===e;function On(e,t){let n=e.split("/"),r=n.length;return n.some(Sn)&&(r+=En),t&&(r+=jn),n.filter((e=>!Sn(e))).reduce(((e,t)=>e+(xn.test(t)?vn:""===t?wn:Tn)),r)}function An(e,t){let{routesMeta:n}=e,r={},s="/",o=[];for(let e=0;e<n.length;++e){let i=n[e],a=e===n.length-1,l="/"===s?t:t.slice(s.length)||"/",c=Cn({path:i.relativePath,caseSensitive:i.caseSensitive,end:a},l);if(!c)return null;Object.assign(r,c.params);let u=i.route;o.push({params:r,pathname:In([s,c.pathname]),pathnameBase:Dn(In([s,c.pathnameBase])),route:u}),"/"!==c.pathnameBase&&(s=In([s,c.pathnameBase]))}return o}function Cn(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),un("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((e,t)=>(r.push(t),"/([^\\/]+)")));return e.endsWith("*")?(r.push("*"),s+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":""!==e&&"/"!==e&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce(((e,t,n)=>{if("*"===t){let e=a[n]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return un(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(a[n]||"",t),e}),{}),pathname:o,pathnameBase:i,pattern:e}}function Rn(e){try{return decodeURI(e)}catch(t){return un(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function kn(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Pn(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function _n(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function Ln(e,t,n,r){let s;void 0===r&&(r=!1),"string"==typeof e?s=hn(e):(s=on({},e),cn(!s.pathname||!s.pathname.includes("?"),Pn("?","pathname","search",s)),cn(!s.pathname||!s.pathname.includes("#"),Pn("#","pathname","hash",s)),cn(!s.search||!s.search.includes("#"),Pn("#","search","hash",s)));let o,i=""===e||""===s.pathname,a=i?"/":s.pathname;if(r||null==a)o=n;else{let e=t.length-1;if(a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;s.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:s=""}="string"==typeof e?hn(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:zn(r),hash:Nn(s)}}(s,o),c=a&&"/"!==a&&a.endsWith("/"),u=(i||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}const In=e=>e.join("/").replace(/\/\/+/g,"/"),Dn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),zn=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Nn=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const Un=["post","put","patch","delete"],Bn=(new Set(Un),["get",...Un]);function Fn(){return Fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fn.apply(this,arguments)}new Set(Bn),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const Mn=s.createContext(null),qn=s.createContext(null),$n=s.createContext(null),Wn=s.createContext(null),Vn=s.createContext({outlet:null,matches:[],isDataRoute:!1}),Hn=s.createContext(null);function Jn(){return null!=s.useContext(Wn)}function Zn(){return Jn()||cn(!1),s.useContext(Wn).location}function Kn(e){s.useContext($n).static||s.useLayoutEffect(e)}function Gn(){let{isDataRoute:e}=s.useContext(Vn);return e?function(){let{router:e}=function(e){let t=s.useContext(Mn);return t||cn(!1),t}(rr.UseNavigateStable),t=or(sr.UseNavigateStable),n=s.useRef(!1);Kn((()=>{n.current=!0}));let r=s.useCallback((function(r,s){void 0===s&&(s={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,Fn({fromRouteId:t},s)))}),[e,t]);return r}():function(){Jn()||cn(!1);let e=s.useContext(Mn),{basename:t,navigator:n}=s.useContext($n),{matches:r}=s.useContext(Vn),{pathname:o}=Zn(),i=JSON.stringify(_n(r).map((e=>e.pathnameBase))),a=s.useRef(!1);Kn((()=>{a.current=!0}));let l=s.useCallback((function(r,s){if(void 0===s&&(s={}),!a.current)return;if("number"==typeof r)return void n.go(r);let l=Ln(r,JSON.parse(i),o,"path"===s.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:In([t,l.pathname])),(s.replace?n.replace:n.push)(l,s.state,s)}),[t,n,i,o,e]);return l}()}const Xn=s.createContext(null);function Qn(e,t,n){Jn()||cn(!1);let{navigator:r}=s.useContext($n),{matches:o}=s.useContext(Vn),i=o[o.length-1],a=i?i.params:{},l=(i&&i.pathname,i?i.pathnameBase:"/");i&&i.route;let c,u=Zn();if(t){var d;let e="string"==typeof t?hn(t):t;"/"===l||(null==(d=e.pathname)?void 0:d.startsWith(l))||cn(!1),c=e}else c=u;let p=c.pathname||"/",m=gn(e,{pathname:"/"===l?p:p.slice(l.length)||"/"}),h=function(e,t,n){var r;if(void 0===t&&(t=[]),void 0===n&&(n=null),null==e){var o;if(null==(o=n)||!o.errors)return null;e=n.matches}let i=e,a=null==(r=n)?void 0:r.errors;if(null!=a){let e=i.findIndex((e=>e.route.id&&(null==a?void 0:a[e.route.id])));e>=0||cn(!1),i=i.slice(0,Math.min(i.length,e+1))}return i.reduceRight(((e,r,o)=>{let l=r.route.id?null==a?void 0:a[r.route.id]:null,c=null;n&&(c=r.route.errorElement||er);let u=t.concat(i.slice(0,o+1)),d=()=>{let t;return t=l?c:r.route.Component?s.createElement(r.route.Component,null):r.route.element?r.route.element:e,s.createElement(nr,{match:r,routeContext:{outlet:e,matches:u,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?s.createElement(tr,{location:n.location,revalidation:n.revalidation,component:c,error:l,children:d(),routeContext:{outlet:null,matches:u,isDataRoute:!0}}):d()}),null)}(m&&m.map((e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:In([l,r.encodeLocation?r.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:In([l,r.encodeLocation?r.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),o,n);return t&&h?s.createElement(Wn.Provider,{value:{location:Fn({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:an.Pop}},h):h}function Yn(){let e=function(){var e;let t=s.useContext(Hn),n=function(e){let t=s.useContext(qn);return t||cn(!1),t}(sr.UseRouteError),r=or(sr.UseRouteError);return t||(null==(e=n.errors)?void 0:e[r])}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return s.createElement(s.Fragment,null,s.createElement("h2",null,"Unexpected Application Error!"),s.createElement("h3",{style:{fontStyle:"italic"}},t),n?s.createElement("pre",{style:r},n):null,null)}const er=s.createElement(Yn,null);class tr extends s.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?s.createElement(Vn.Provider,{value:this.props.routeContext},s.createElement(Hn.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function nr(e){let{routeContext:t,match:n,children:r}=e,o=s.useContext(Mn);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),s.createElement(Vn.Provider,{value:t},r)}var rr=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(rr||{}),sr=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(sr||{});function or(e){let t=function(e){let t=s.useContext(Vn);return t||cn(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||cn(!1),n.route.id}function ir(e){let{to:t,replace:n,state:r,relative:o}=e;Jn()||cn(!1);let{matches:i}=s.useContext(Vn),{pathname:a}=Zn(),l=Gn(),c=Ln(t,_n(i).map((e=>e.pathnameBase)),a,"path"===o),u=JSON.stringify(c);return s.useEffect((()=>l(JSON.parse(u),{replace:n,state:r,relative:o})),[l,u,o,n,r]),null}function ar(e){return function(e){let t=s.useContext(Vn).outlet;return t?s.createElement(Xn.Provider,{value:e},t):t}(e.context)}function lr(e){cn(!1)}function cr(e){let{basename:t="/",children:n=null,location:r,navigationType:o=an.Pop,navigator:i,static:a=!1}=e;Jn()&&cn(!1);let l=t.replace(/^\/*/,"/"),c=s.useMemo((()=>({basename:l,navigator:i,static:a})),[l,i,a]);"string"==typeof r&&(r=hn(r));let{pathname:u="/",search:d="",hash:p="",state:m=null,key:h="default"}=r,f=s.useMemo((()=>{let e=kn(u,l);return null==e?null:{location:{pathname:e,search:d,hash:p,state:m,key:h},navigationType:o}}),[l,u,d,p,m,h,o]);return null==f?null:s.createElement($n.Provider,{value:c},s.createElement(Wn.Provider,{children:n,value:f}))}function ur(e){let{children:t,location:n}=e;return Qn(dr(t),n)}function dr(e,t){void 0===t&&(t=[]);let n=[];return s.Children.forEach(e,((e,r)=>{if(!s.isValidElement(e))return;let o=[...t,r];if(e.type===s.Fragment)return void n.push.apply(n,dr(e.props.children,o));e.type!==lr&&cn(!1),e.props.index&&e.props.children&&cn(!1);let i={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=dr(e.props.children,o)),n.push(i)})),n}s.startTransition,new Promise((()=>{})),s.Component;const pr=()=>{const e=Gn();return(0,s.jsx)(sn,{onSelect:t=>e(`domain?site_id=${t}`)})};var mr;!function(e){e[e.SIZE=0]="SIZE",e[e.TABLES=1]="TABLES",e[e.OPERATIONS=2]="OPERATIONS",e[e.PLAIN=3]="PLAIN"}(mr||(mr={}));const hr={innodb_flush_log_at_trx_commit:{type:3,documentationLink:{mariadb:"https://mariadb.com/kb/en/innodb-system-variables/#innodb_flush_log_at_trx_commit",mysql:"https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit"}},innodb_flush_neighbors:{type:3,documentationLink:{mariadb:"https://mariadb.com/kb/en/innodb-system-variables/#innodb_flush_neighbors",mysql:"https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_flush_neighbors"}},innodb_io_capacity:{type:2,documentationLink:{mariadb:"https://mariadb.com/kb/en/innodb-system-variables/#innodb_io_capacity",mysql:"https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_io_capacity"}},innodb_random_read_ahead:{type:3,documentationLink:{mariadb:"https://mariadb.com/kb/en/innodb-system-variables/#innodb_random_read_ahead",mysql:"https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_random_read_ahead"}},innodb_buffer_pool_size:{type:0,documentationLink:{mariadb:"https://mariadb.com/kb/en/innodb-system-variables/#innodb_buffer_pool_size",mysql:"https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_buffer_pool_size"}},table_open_cache:{type:1,documentationLink:{mariadb:"https://mariadb.com/kb/en/server-system-variables/#table_open_cache",mysql:"https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_table_open_cache"}},innodb_log_file_size:{type:0,documentationLink:{mariadb:"https://mariadb.com/kb/en/innodb-system-variables/#innodb_log_file_size",mysql:"https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_log_file_size"}},innodb_flush_method:{type:3,documentationLink:{mariadb:"https://mariadb.com/kb/en/innodb-system-variables/#innodb_flush_method",mysql:"https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_flush_method"}}},fr=e=>Number(e)>=1e4?Number(e).toLocaleString("en-US").replace(","," "):e.toString(),gr=({row:e,isMysql:t})=>{const n=hr[e.name]??{type:3},r=t?n.documentationLink?.mysql:n.documentationLink?.mariadb;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(s.Text,{nowrap:!0,children:e.name})," ",(0,s.jsx)(s.Popover,{title:e.name,placement:"top",target:(0,s.jsx)(s.Icon,{name:"question-mark-circle",intent:"inactive"}),children:(0,s.jsxs)(s.Paragraph,{children:[(0,s.jsx)(s.Translate,{content:`db-settings.option-descriptions.${e.name}`}),r&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("br",{}),(0,s.jsx)(s.Link,{href:r,target:"_blank",children:(0,s.jsx)(s.Translate,{content:t?"db-settings.mysql-documentation-link":"db-settings.mariadb-documentation-link"})})]})]})})]})},br=({row:e,getValue:t,setValue:n})=>(0,s.jsxs)(s.Select,{disabled:e.disabled,value:t(),onChange:n,"data-cy":e.name,children:[e.oldValue&&(0,s.jsx)(s.SelectOption,{value:"oldValue",label:"Old Value",children:(0,s.jsx)(s.Media,{image:(0,s.jsx)(s.Icon,{name:"reload",size:"16",flipHorizontal:!0}),children:(0,s.jsx)(yr,{row:e,element:"oldValue"})})}),(""===e.oldValue||e.currentValue!==e.optimalValue)&&(0,s.jsx)(s.SelectOption,{value:"currentValue",label:"Current value",children:(0,s.jsx)(yr,{row:e,element:"currentValue"})}),(0,s.jsx)(s.SelectOption,{value:"optimalValue",label:"Optimal value",children:(0,s.jsx)(s.Media,{image:(0,s.jsx)(s.Icon,{name:"check-mark-circle-filled",size:"16",intent:"success"}),children:(0,s.jsx)(yr,{row:e,element:"optimalValue"})})})]}),yr=({row:e,element:t})=>{const n=hr[e.name]??{type:3};let r,o=e[t]?.toString();const i=o;o&&(1===n.type&&(r=(0,s.jsx)(s.Translate,{content:"db-settings.tables"}),o=fr(o)),2===n.type&&(r=(0,s.jsx)(s.Translate,{content:"db-settings.operations"}),o=fr(o)),0===n.type&&([o,r]=(e=>{"string"==typeof e&&(e=parseInt(e,10));let t=0;for(;e>=1024;)e/=1024,t++;return[e.toFixed(t>0?1:0),["b","kb","mb","gb","tb"][t]]})(o),r=(0,s.jsx)(s.Translate,{content:`db-settings.size-units.${r}`})));const a=(0,s.jsxs)("div",{children:[(0,s.jsx)(s.Text,{children:o}),r&&(0,s.jsxs)(s.Fragment,{children:[" ",(0,s.jsx)(s.Text,{intent:"muted",fontSize:"sm",children:r})]})]});return 0===n.type?(0,s.jsx)(s.Popover,{target:a,placement:"top",children:(0,s.jsxs)("span",{children:[`${i} `,(0,s.jsx)(s.Translate,{content:"db-settings.size-units.b"})]})}):a},xr=(0,s.createContext)({addToast:()=>{}});let vr=0;const jr=({children:e})=>{const[t,n]=(0,s.useState)([]),r=(0,s.useCallback)((e=>{n((t=>[{key:""+vr++,...e},...t]))}),[]),o=(0,s.useMemo)((()=>({addToast:r})),[r]);return(0,s.jsxs)(xr.Provider,{value:o,children:[(0,s.jsx)(s.Toaster,{toasts:t,onToastClose:e=>(e=>{n((t=>t.filter((t=>t.key!==e))))})(e)}),e]})},wr="plesk ext performance-booster db:revert-settings",Tr=()=>{const[e,t]=(0,s.useState)(!1),[n,r]=(0,s.useState)(),[i,a]=(0,s.useState)(!1),[l,c]=(0,s.useState)([]),[u,d]=(0,s.useState)(!1),[p,m]=(0,s.useState)(""),[h,f]=(0,s.useState)(!1),[g,b]=(0,s.useState)(!1),[y,x]=(0,s.useState)(),[v,j]=(0,s.useState)(),[w,T]=(0,s.useState)({}),{addToast:E}=(0,s.useContext)(xr),S=(0,s.useCallback)((async()=>{a(!0);try{const e=await Ot("db-settings/");c(e.settings),d(e.isMysql),m(e.dbVersion),f(e.isOptimized),b(e.hasAdditionalDbOptimization),x(e.supported),j(e.error)}catch(e){if(Wt(e))return void j(e.message);throw e}finally{a(!1)}}),[]),O=e=>{window?.Jsw?.UAT?.dispatchAction("CLICK",{dataset:{type:`database-server-optimization-${e}`}})};if((0,s.useEffect)((()=>{S()}),[S]),(0,s.useEffect)((()=>{const e={};l.forEach((t=>{e[t.name]=t.selected?"optimalValue":"currentValue"})),T(e)}),[l,e]),void 0!==v)return(0,s.jsx)(s.Status,{icon:{size:"32"},intent:"danger",children:(0,s.jsx)(s.Text,{children:v})});const A=e=>{const t={};l.forEach((n=>{t[n.name]=e?"optimalValue":n.oldValue?"oldValue":"currentValue"})),T(t)},C=e=>"innodb_buffer_pool_size"!==e.name?t=>{T((n=>({...n,[e.name]:t})))}:e=>{T((t=>({...t,innodb_buffer_pool_size:e,innodb_log_file_size:e})))},R=e=>{if("innodb_log_file_size"===e.name)return(0,s.jsx)(s.Translate,{content:"db-settings.value-descriptions.innodb_log_file_size"})};return i?(0,s.jsx)(o,{}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(s.Section,{title:(0,s.jsx)(s.Translate,{content:"db-settings.section-title"}),children:!1===y?(0,s.jsx)(s.Translate,{content:"db-settings.not-supported",params:{dbVersion:p}}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(s.Status,{icon:{size:"32"},intent:"info",children:(0,s.jsxs)(s.Paragraph,{children:[(0,s.jsx)(s.Translate,{content:"db-settings.info"}),(0,s.jsx)("br",{}),(0,s.jsxs)("b",{children:[(0,s.jsx)(s.Translate,{content:"db-settings.note"})," "]}),(0,s.jsx)(s.Translate,{content:"db-settings.info-note",params:{command:(0,s.jsx)(s.Tooltip,{title:(0,s.jsx)(s.Translate,{content:"db-settings.copy-cli-command"}),children:(0,s.jsxs)("span",{className:"performance-booster-highlight-cli",onClick:()=>{(0,s.copyToClipboard)(wr),E({intent:"success",message:(0,s.jsx)(s.Translate,{content:"db-settings.copied-cli-command"})})},children:[(0,s.jsx)(s.Text,{intent:"danger",style:{fontFamily:"monospace"},children:wr})," ",(0,s.jsx)(s.Icon,{name:"copy",size:"12"})]})})}})]})}),(0,s.jsx)(s.List,{data:[{dbVersion:p,isOptimized:h,hasAdditionalDbOptimization:g}],columns:[{key:"dbVersion",title:(0,s.jsx)(s.Translate,{content:"db-settings.server-name"})},{key:"isOptimized",title:(0,s.jsx)(s.Translate,{content:"db-settings.status"}),render:({isOptimized:e,hasAdditionalDbOptimization:t})=>(0,s.jsxs)(s.Status,{id:"performance-booster-server-wide-db-status",intent:e?"success":"warning",children:[(0,s.jsx)(s.Translate,{content:e?"db-settings.optimized":"db-settings.not-optimized"}),t&&(0,s.jsx)(s.Translate,{content:"db-settings.additional-optimized"})]})},{key:"link",render:({isOptimized:e})=>(0,s.jsx)(s.Link,{id:"performance-booster-server-wide-db-drawer",onClick:()=>{O("show"),t(!0)},children:(0,s.jsx)(s.Translate,{content:e?"db-settings.link-report-optimized":"db-settings.link-report-not-optimized"})})}]})]})}),l&&(0,s.jsxs)(s.Drawer,{"data-type":"ext-db-settings-drawer",title:(0,s.jsx)(s.Translate,{content:"db-settings.report-title"}),size:"md",placement:"right",isOpen:e,onClose:()=>t(!1),form:{applyButton:!1,submitButton:{id:"performance-booster-server-wide-db-apply",children:(0,s.jsx)(s.Translate,{content:"db-settings.apply-btn"})},state:n,values:w,onSubmit:async e=>{r("submit"),O("apply");const n=Object.entries(e).filter((([,e])=>"optimalValue"===e)).map((([e])=>e));try{const e=await(s=n,At("db-settings/apply",{settings:s}));if(e.error)return void j(e.error)}catch(e){if(Wt(e))return void j(e.message);throw e}var s;r(void 0),t(!1),S()}},children:[(0,s.jsxs)("div",{className:"db-settings-buttons",children:[(0,s.jsx)(s.Button,{icon:"check-mark-circle",onClick:()=>A(!0),children:(0,s.jsx)(s.Translate,{content:"db-settings.optimize-all"})})," ",(0,s.jsx)(s.Button,{icon:"arrow-back",onClick:()=>A(!1),children:(0,s.jsx)(s.Translate,{content:"db-settings.revert-all"})})]}),l.map((e=>(0,s.jsx)(s.FormField,{name:e.name,label:(0,s.jsx)(gr,{row:e,isMysql:u}),description:R(e),children:t=>(0,s.jsx)(br,{row:e,...t,setValue:C(e)})},e.name)))]})]})},Er=({tab:e="domains"})=>{const t=Pt(),n=Gn();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(s.Heading,{level:1,children:(0,s.jsx)(s.Translate,{content:"moduleHeader"})}),(0,s.jsxs)(s.Tabs,{active:"serverwide"===e?2:1,children:[(0,s.jsx)(s.Tab,{id:"performance-booster-tab-domains",title:(0,s.jsx)(s.Translate,{content:"tabs.domains"}),onActivate:()=>n("/domains"),children:(0,s.jsx)(pr,{})},"domains"),t.dbSettingsGuiEnabled&&(0,s.jsx)(s.Tab,{id:"performance-booster-tab-server-wide",title:(0,s.jsx)(s.Translate,{content:"tabs.server-wide"}),onActivate:()=>n("/serverwide"),children:(0,s.jsx)(Tr,{})},"server-wide")]}),(0,s.jsx)(ar,{})]})};function Sr(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Or=s.startTransition;function Ar(e){let{basename:t,children:n,future:r,window:o}=e,i=s.useRef();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),function(e,t,n,r){void 0===r&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,a=an.Pop,l=null,c=u();function u(){return(i.state||{idx:null}).idx}function d(){a=an.Pop;let e=u(),t=null==e?null:e-c;c=e,l&&l({action:a,location:m.location,delta:t})}function p(e){let t="null"!==s.location.origin?s.location.origin:s.location.href,n="string"==typeof e?e:mn(e);return cn(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==c&&(c=0,i.replaceState(on({},i.state,{idx:c}),""));let m={get action(){return a},get location(){return e(s,i)},listen(e){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(ln,d),l=e,()=>{s.removeEventListener(ln,d),l=null}},createHref:e=>t(s,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){a=an.Push;let r=pn(m.location,e,t);n&&n(r,e),c=u()+1;let d=dn(r,c),p=m.createHref(r);try{i.pushState(d,"",p)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;s.location.assign(p)}o&&l&&l({action:a,location:m.location,delta:1})},replace:function(e,t){a=an.Replace;let r=pn(m.location,e,t);n&&n(r,e),c=u();let s=dn(r,c),d=m.createHref(r);i.replaceState(s,"",d),o&&l&&l({action:a,location:m.location,delta:0})},go:e=>i.go(e)};return m}((function(e,t){let{pathname:n,search:r,hash:s}=e.location;return pn("",{pathname:n,search:r,hash:s},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:mn(t)}),null,e)}({window:o,v5Compat:!0}));let a=i.current,[l,c]=s.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},d=s.useCallback((e=>{u&&Or?Or((()=>c(e))):c(e)}),[c,u]);return s.useLayoutEffect((()=>a.listen(d)),[a,d]),s.createElement(cr,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a})}var Cr,Rr;"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"}(Cr||(Cr={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Rr||(Rr={}));const kr=e=>4*e+"px",Pr=({children:e,data:t,label:n,description:r,...o})=>{const[i,a]=(0,s.useState)(!1);let l=`show-details-can-optimize-${t.name}`;return t.version&&t.conflicts&&t.conflicts.length>0?l=`show-details-cannot-optimize-${t.name}`:t.version&&t.conflicts&&t.conflicts.length>0&&(l=`show-details-cannot-revert-${t.name}`),(0,s.jsxs)("div",{style:{marginBottom:kr(3)},children:[(0,s.jsx)(s.FormFieldCheckbox,{...o,label:(0,s.jsxs)(s.Fragment,{children:[n,r&&(0,s.jsx)("div",{children:(0,s.jsxs)(s.Hint,{children:[r," ",t.details&&(0,s.jsx)("a",{"data-action":l,onClick:e=>{e.preventDefault(),a((e=>!e))},children:(0,s.jsx)(s.Translate,{content:"optimization.viewSource"})})]})})]}),style:{marginBottom:0}}),t.details&&i&&(0,s.jsx)("div",{style:{marginTop:kr(2),marginBottom:kr(2),border:"1px solid #eee"},children:(0,s.jsx)(s.CodeEditor,{readOnly:!0,mode:"text/x-sh",children:t.details})}),t.conflicts&&(e=>{if(Array.isArray(e)&&!e.length)return null;const t=e=>{switch(e.type){case"link":return(0,s.jsx)("a",{href:e.value,target:"_blank",rel:"noreferrer",children:(0,s.jsx)(s.Icon,{name:"info-circle-filled",intent:"info"})});case"installer-link":return(0,s.jsx)("a",{href:e.value,children:(0,s.jsx)(s.Translate,{content:"conflicts.InstallComponents"})});default:return null}};return e.map((e=>(0,s.jsx)(s.Hint,{style:{display:"block",marginLeft:kr(7),marginBottom:kr(2)},children:(0,s.jsxs)(s.Text,{intent:"warning",style:{whiteSpace:"pre-wrap"},children:[(0,s.jsx)(s.Translate,{content:e.message,params:e.context})," ",e.options&&e.options.map(t)]})})))})(t.conflicts),t.errors&&!(t.conflicts&&t.conflicts.length>0)&&(0,s.jsx)(s.Hint,{style:{display:"block",marginLeft:kr(7),marginBottom:kr(2)},children:(0,s.jsx)(s.Text,{intent:"danger",children:(0,s.jsx)(s.Translate,{content:"optimization.lastAttemptFailed",params:{error:t.errors}})})})]})},_r=({domainId:e,optimization:t,disabledOptimizations:n})=>{const{stages:r}=Pt(),o=t.stages.map((n=>((e,t,n,r)=>(0,s.jsx)(Pr,{id:`optimization-stage-${e.guid}-domain-${n}`,disabled:0!==(e?.conflicts?.length??0),name:`${r}[${e.guid}]`,label:(0,s.jsx)(s.Translate,{content:`optimization.optimize-${t.rawName}`,params:t.translationContext}),description:(0,s.jsx)(s.Translate,{content:`optimization.optimize-${t.rawName}-hint`}),data:{...t,...e}},`optimization-section-${n}-${e.guid}`))(n,r[n.guid],e,t.name)));return t.stages.length<2?o[0]:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(s.FormFieldCheckbox,{id:`optimization-section-group-${t.name}-domain-${e}`,disabled:n.includes(t.name),name:`${t.name}[masterCheckbox]`,label:(0,s.jsx)(s.Translate,{content:`optimization.group.${t.name}`})}),(0,s.jsx)("div",{style:{marginLeft:(4,"16px")},children:o})]})},Lr=({domain:e,onTaskComplete:t})=>{const{measure:n}=Dt(),r=_t(e),o=e.domainId===n.domainId;return Ct("measuredomainspeed",{uniq:!0,onComplete:t}),o||r?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(s.Heading,{level:3,children:[(0,s.jsx)(s.Translate,{style:{verticalAlign:"middle"},content:"optimization.measurement-title"})," ",(0,s.jsx)(Rt,{})]}),(0,s.jsx)(tn,{domain:e})]}):null},Ir="masterCheckbox",Dr=(0,s.jsx)(s.Form,{applyButton:!1,cancelButton:{children:(0,s.jsx)(s.Translate,{content:"optimization.cancel"})},submitButton:{children:(0,s.jsx)(s.Translate,{content:"optimization.apply"})},children:(0,s.jsx)(s.Columns,{vertical:!0,style:{gap:"1rem"},children:Array.from({length:3}).map(((e,t)=>(0,s.jsx)(s.Media,{image:(0,s.jsx)(s.Skeleton,{width:"20"}),children:(0,s.jsx)(s.SkeletonText,{})},t)))})}),zr=({domainId:e,onClose:t})=>{const{measure:n,setMeasure:r}=Dt(),[o,a]=(0,s.useState)(null),[l,c]=(0,s.useState)(null),[u,d]=(0,s.useState)(null),[p,m]=(0,s.useState)(!1),{stages:h}=Pt(),f=!!(u?.optimizations??[]).find((e=>e.stages.find((e=>0===e?.conflicts?.length&&e.status!==i.OPTIMIZED)))),g=(0,s.useMemo)((()=>(u?.optimizations??[]).filter((e=>void 0===e.stages.find((e=>0===(e.conflicts?.length??0))))).map((e=>e.name))),[u]),b=(0,s.useMemo)((()=>(u?.optimizations??[]).flatMap((e=>e.stages)).filter((e=>0!==(e.conflicts?.length??0))).map((e=>e.guid))),[u]),y=async(e,t)=>{try{const{domain:s,isMeasuring:o}=await(({domainId:e},t={})=>Ot(`domains/${e}`,t))({domainId:e},{signal:t});d(s);const l={};for(const e of s.optimizations){l[e.name]={[Ir]:!!e.stages.find((e=>e.status===i.OPTIMIZED))};for(const t of e.stages)l[e.name][t.guid]=t.status===i.OPTIMIZED}n.isMeasuring!==o&&r({domainId:s.isMeasuring?s.domainId:null,isMeasuring:o}),a(l),c(l)}catch(e){"AbortError"!==e.name&&console.error(e)}};(0,s.useEffect)((()=>{const t=new AbortController;return e?y(e,t.signal):(a(null),d(null)),()=>t.abort()}),[e]);const x=(e,t)=>{const n=t?"enable":"disable";window?.Jsw?.UAT?.dispatchAction("CLICK",{dataset:{type:`checkbox-optimization-${e}-${n}`}})};return(0,s.jsx)(s.Drawer,{"data-type":"ext-optimization-drawer",placement:"right",size:"md",title:u?.name?(0,s.jsx)(s.Translate,{content:"optimization.title",params:{domain:u?.name}}):(0,s.jsx)(s.Skeleton,{maxWidth:400}),isOpen:!!e,onClose:t,form:u&&o?(0,s.jsxs)(s.Form,{applyButton:!1,cancelButton:{id:"btn-cancel",name:"cancel",children:(0,s.jsx)(s.Translate,{content:"optimization.cancel"})},submitButton:{id:"btn-apply",name:"apply",children:(0,s.jsx)(s.Translate,{content:"optimization.apply"})},onSubmit:async n=>{if(!e||!u)return;if(JSON.stringify(l)===JSON.stringify(n))return void t();m(!0);const r={domainGuids:[u.guid],enableOptimizations:{},disableOptimizations:{}};for(const[e,t]of Object.entries(n))e in r.enableOptimizations||(r.enableOptimizations[e]=[],r.disableOptimizations[e]=[]),Object.entries(t).forEach((([t,n])=>{t!==Ir&&(n?r.enableOptimizations[e].push(t):r.disableOptimizations[e].push(t))}));try{await(e=>At("domains/",e))(r),t()}catch(e){console.error(e)}finally{m(!1)}},state:p?"submit":void 0,values:o,onFieldChange:(e,t)=>{if(null===o)return;const[n,r]=e.split("[",2).map((e=>e.replaceAll(/[\[\]]/g,"")));if(g.includes(n))return;let i=(0,s.setIn)(o,e,t);if(e.includes(Ir))return Object.keys(i[n]).forEach((e=>{b.includes(e)||(i=(0,s.setIn)(i,`${n}[${e}]`,t))})),x(n,t),void a(i);if(x(h[r].name,t),void 0!==i[n][Ir]){const e=void 0!==Object.entries(i[n]).find((([e,t])=>e!==Ir&&!0===t));i=(0,s.setIn)(i,`${n}[${Ir}]`,e)}a(i)},children:[(0,s.jsx)(s.Alert,{intent:"warning",children:(0,s.jsx)(s.Translate,{content:"optimization.warning"})}),f&&(0,s.jsx)(s.Alert,{intent:"info",children:(0,s.jsx)(s.Translate,{content:"hints.measurePerformance"})}),(0,s.jsx)(s.Heading,{level:3,children:(0,s.jsx)(s.Translate,{content:"optimization.boost-title"})}),u.optimizations.map((t=>(0,s.jsx)(_r,{domainId:e??0,optimization:t,disabledOptimizations:g},`optimization-section-${e}-${t.name}`))),(0,s.jsx)(Lr,{domain:u,onTaskComplete:()=>y(e)})]}):Dr})},Nr=()=>{const[e]=function(e){let t=s.useRef(Sr(e)),n=s.useRef(!1),r=Zn(),o=s.useMemo((()=>function(e,t){let n=Sr(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(r.search,n.current?null:t.current)),[r.search]),i=Gn(),a=s.useCallback(((e,t)=>{const r=Sr("function"==typeof e?e(o):e);n.current=!0,i("?"+r,t)}),[i,o]);return[o,a]}(),t=e.get("site_id"),n=Gn();return(0,s.jsx)(zr,{onClose:()=>n(".."),domainId:t?parseInt(t):null})},Ur=()=>(0,s.jsxs)(ur,{children:[(0,s.jsx)(lr,{path:"/domains",element:(0,s.jsx)(Er,{}),children:(0,s.jsx)(lr,{path:"domain",element:(0,s.jsx)(Nr,{})})}),(0,s.jsx)(lr,{path:"/serverwide",element:(0,s.jsx)(Er,{tab:"serverwide"})}),(0,s.jsx)(lr,{path:"*",element:(0,s.jsx)(ir,{to:"/domains"})})]}),Br=({locale:e,config:t,baseUrl:n})=>{const r=(0,s.useMemo)((()=>({...t,baseUrl:n})),[n,t]);return(0,s.jsx)(kt.Provider,{value:r,children:(0,s.jsx)(s.LocaleProvider,{messages:e,children:(0,s.jsx)(It,{children:(0,s.jsx)(jr,{children:(0,s.jsx)(Ar,{basename:r.baseUrl,children:(0,s.jsx)(Ur,{})})})})})})};var Fr=n(6062),Mr=n.n(Fr),qr=n(4036),$r=n.n(qr),Wr=n(6793),Vr=n.n(Wr),Hr=n(7892),Jr=n.n(Hr),Zr=n(1173),Kr=n.n(Zr),Gr=n(2464),Xr=n.n(Gr),Qr=n(5981),Yr={};Yr.styleTagTransform=Xr(),Yr.setAttributes=Jr(),Yr.insert=Vr().bind(null,"head"),Yr.domAPI=$r(),Yr.insertStyleElement=Kr(),Mr()(Qr.Z,Yr),Qr.Z&&Qr.Z.locals&&Qr.Z.locals;const es=e=>{(0,s.render)((0,s.jsx)(Br,{...e}),document.getElementById(e.moduleId))}},2857:e=>{e.exports=window.PleskUiLibrary,e.exports.default=window.PleskUiLibrary}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var o=t[r]={id:r,exports:{}};return e[r](o,o.exports,n),o.exports}return n.m=e,n.c=t,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{n.S={};var e={},t={};n.I=(r,s)=>{s||(s=[]);var o=t[r];if(o||(o=t[r]={}),!(s.indexOf(o)>=0)){if(s.push(o),e[r])return e[r];n.o(n.S,r)||(n.S[r]={}),n.S[r];var i=[];return e[r]=i.length?Promise.all(i).then((()=>e[r]=1)):1}}})(),n.nc=void 0,n(3467)})())); //# sourceMappingURL=index.js.map