license-manager.js
40.9 KB
(()=>{var e={7390:(e,t,n)=>{"use strict";n.r(t),n.d(t,{disableBodyScroll:()=>v,clearAllBodyScrollLocks:()=>g,enableBodyScroll:()=>y});var o=!1;if("undefined"!=typeof window){var r={get passive(){o=!0}};window.addEventListener("testPassive",null,r),window.removeEventListener("testPassive",null,r)}var i="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),s=[],a=!1,c=-1,l=void 0,u=void 0,d=void 0,f=function(e){return s.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},p=function(e){var t=e||window.event;return!!f(t.target)||t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1)},h=function(){void 0!==d&&(document.body.style.paddingRight=d,d=void 0),void 0!==l&&(document.body.style.overflow=l,l=void 0)},m=function(){if(void 0!==u){var e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);document.body.style.position=u.position,document.body.style.top=u.top,document.body.style.left=u.left,window.scrollTo(t,e),u=void 0}},v=function(e,t){if(e){if(!s.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};s=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(s),[n]),i?window.requestAnimationFrame((function(){if(void 0===u){u={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var e=window,t=e.scrollY,n=e.scrollX,o=e.innerHeight;document.body.style.position="fixed",document.body.style.top=-t,document.body.style.left=-n,setTimeout((function(){return window.requestAnimationFrame((function(){var e=o-window.innerHeight;e&&t>=o&&(document.body.style.top=-(t+e))}))}),300)}})):function(e){if(void 0===d){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;if(t&&n>0){var o=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);d=document.body.style.paddingRight,document.body.style.paddingRight=o+n+"px"}}void 0===l&&(l=document.body.style.overflow,document.body.style.overflow="hidden")}(t),i&&(e.ontouchstart=function(e){1===e.targetTouches.length&&(c=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-c;!f(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?p(e):e.stopPropagation())}(t,e)},a||(document.addEventListener("touchmove",p,o?{passive:!1}:void 0),a=!0))}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},g=function(){i&&(s.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),a&&(document.removeEventListener("touchmove",p,o?{passive:!1}:void 0),a=!1),c=-1),i?m():h(),s=[]},y=function(e){e?(s=s.filter((function(t){return t.targetElement!==e})),i&&(e.ontouchstart=null,e.ontouchmove=null,a&&0===s.length&&(document.removeEventListener("touchmove",p,o?{passive:!1}:void 0),a=!1)),i?m():h()):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")}},9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var o=n(4867),r=n(6026),i=n(4372),s=n(5327),a=n(4097),c=n(4109),l=n(7985),u=n(7874),d=n(2648),f=n(644),p=n(205);e.exports=function(e){return new Promise((function(t,n){var h,m=e.data,v=e.headers,g=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}o.isFormData(m)&&o.isStandardBrowserEnv()&&delete v["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var E=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";v.Authorization="Basic "+btoa(E+":"+w)}var _=a(e.baseURL,e.url);function $(){if(b){var o="getAllResponseHeaders"in b?c(b.getAllResponseHeaders()):null,i={data:g&&"text"!==g&&"json"!==g?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:o,config:e,request:b};r((function(e){t(e),y()}),(function(e){n(e),y()}),i),b=null}}if(b.open(e.method.toUpperCase(),s(_,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,"onloadend"in b?b.onloadend=$:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout($)},b.onabort=function(){b&&(n(new d("Request aborted",d.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new d("Network Error",d.ERR_NETWORK,e,b,b)),b=null},b.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",o=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new d(t,o.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,b)),b=null},o.isStandardBrowserEnv()){var x=(e.withCredentials||l(_))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;x&&(v[e.xsrfHeaderName]=x)}"setRequestHeader"in b&&o.forEach(v,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete v[t]:b.setRequestHeader(t,e)})),o.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),g&&"json"!==g&&(b.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&b.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){b&&(n(!e||e&&e.type?new f:e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),m||(m=null);var S=p(_);S&&-1===["http","https","file"].indexOf(S)?n(new d("Unsupported protocol "+S+":",d.ERR_BAD_REQUEST,e)):b.send(m)}))}},1609:(e,t,n)=>{"use strict";var o=n(4867),r=n(1849),i=n(321),s=n(7185),a=function e(t){var n=new i(t),a=r(i.prototype.request,n);return o.extend(a,i.prototype,n),o.extend(a,n),a.create=function(n){return e(s(t,n))},a}(n(5546));a.Axios=i,a.CanceledError=n(644),a.CancelToken=n(4972),a.isCancel=n(6502),a.VERSION=n(7288).version,a.toFormData=n(7675),a.AxiosError=n(2648),a.Cancel=a.CanceledError,a.all=function(e){return Promise.all(e)},a.spread=n(8713),a.isAxiosError=n(6268),e.exports=a,e.exports.default=a},4972:(e,t,n)=>{"use strict";var o=n(644);function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,o=n._listeners.length;for(t=0;t<o;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,o=new Promise((function(e){n.subscribe(e),t=e})).then(e);return o.cancel=function(){n.unsubscribe(t)},o},e((function(e){n.reason||(n.reason=new o(e),t(n.reason))}))}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},r.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},r.source=function(){var e;return{token:new r((function(t){e=t})),cancel:e}},e.exports=r},644:(e,t,n)=>{"use strict";var o=n(2648);function r(e){o.call(this,null==e?"canceled":e,o.ERR_CANCELED),this.name="CanceledError"}n(4867).inherits(r,o,{__CANCEL__:!0}),e.exports=r},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var o=n(4867),r=n(5327),i=n(782),s=n(3572),a=n(7185),c=n(4097),l=n(4875),u=l.validators;function d(e){this.defaults=e,this.interceptors={request:new i,response:new i}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&l.assertOptions(n,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var o=[],r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));var i,c=[];if(this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)})),!r){var d=[s,void 0];for(Array.prototype.unshift.apply(d,o),d=d.concat(c),i=Promise.resolve(t);d.length;)i=i.then(d.shift(),d.shift());return i}for(var f=t;o.length;){var p=o.shift(),h=o.shift();try{f=p(f)}catch(e){h(e);break}}try{i=s(f)}catch(e){return Promise.reject(e)}for(;c.length;)i=i.then(c.shift(),c.shift());return i},d.prototype.getUri=function(e){e=a(this.defaults,e);var t=c(e.baseURL,e.url);return r(t,e.params,e.paramsSerializer)},o.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),o.forEach(["post","put","patch"],(function(e){function t(t){return function(n,o,r){return this.request(a(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:o}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),e.exports=d},2648:(e,t,n)=>{"use strict";var o=n(4867);function r(e,t,n,o,r){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r)}o.inherits(r,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var i=r.prototype,s={};["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"].forEach((function(e){s[e]={value:e}})),Object.defineProperties(r,s),Object.defineProperty(i,"isAxiosError",{value:!0}),r.from=function(e,t,n,s,a,c){var l=Object.create(i);return o.toFlatObject(e,l,(function(e){return e!==Error.prototype})),r.call(l,e.message,t,n,s,a),l.name=e.name,c&&Object.assign(l,c),l},e.exports=r},782:(e,t,n)=>{"use strict";var o=n(4867);function r(){this.handlers=[]}r.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=r},4097:(e,t,n)=>{"use strict";var o=n(1793),r=n(7303);e.exports=function(e,t){return e&&!o(t)?r(e,t):t}},3572:(e,t,n)=>{"use strict";var o=n(4867),r=n(8527),i=n(6502),s=n(5546),a=n(644);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=r.call(e,e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),o.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return c(e),t.data=r.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=r.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},7185:(e,t,n)=>{"use strict";var o=n(4867);e.exports=function(e,t){t=t||{};var n={};function r(e,t){return o.isPlainObject(e)&&o.isPlainObject(t)?o.merge(e,t):o.isPlainObject(t)?o.merge({},t):o.isArray(t)?t.slice():t}function i(n){return o.isUndefined(t[n])?o.isUndefined(e[n])?void 0:r(void 0,e[n]):r(e[n],t[n])}function s(e){if(!o.isUndefined(t[e]))return r(void 0,t[e])}function a(n){return o.isUndefined(t[n])?o.isUndefined(e[n])?void 0:r(void 0,e[n]):r(void 0,t[n])}function c(n){return n in t?r(e[n],t[n]):n in e?r(void 0,e[n]):void 0}var l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c};return o.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=l[e]||i,r=t(e);o.isUndefined(r)&&t!==c||(n[e]=r)})),n}},6026:(e,t,n)=>{"use strict";var o=n(2648);e.exports=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new o("Request failed with status code "+n.status,[o.ERR_BAD_REQUEST,o.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var o=n(4867),r=n(5546);e.exports=function(e,t,n){var i=this||r;return o.forEach(n,(function(n){e=n.call(i,e,t)})),e}},5546:(e,t,n)=>{"use strict";var o=n(4867),r=n(6016),i=n(2648),s=n(7874),a=n(7675),c={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,d={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=n(5448)),u),transformRequest:[function(e,t){if(r(t,"Accept"),r(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e))return e;if(o.isArrayBufferView(e))return e.buffer;if(o.isURLSearchParams(e))return l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,i=o.isObject(e),s=t&&t["Content-Type"];if((n=o.isFileList(e))||i&&"multipart/form-data"===s){var c=this.env&&this.env.FormData;return a(n?{"files[]":e}:e,c&&new c)}return i||"application/json"===s?(l(t,"application/json"),function(e,t,n){if(o.isString(e))try{return(0,JSON.parse)(e),o.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||r&&o.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw i.from(e,i.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:n(1623)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){d.headers[e]=o.merge(c)})),e.exports=d},7874:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7288:e=>{e.exports={version:"0.27.2"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),o=0;o<n.length;o++)n[o]=arguments[o];return e.apply(t,n)}}},5327:(e,t,n)=>{"use strict";var o=n(4867);function r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(o.isURLSearchParams(t))i=t.toString();else{var s=[];o.forEach(t,(function(e,t){null!=e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,(function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),s.push(r(t)+"="+r(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var o=n(4867);e.exports=o.isStandardBrowserEnv()?{write:function(e,t,n,r,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),o.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),o.isString(r)&&a.push("path="+r),o.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},6268:(e,t,n)=>{"use strict";var o=n(4867);e.exports=function(e){return o.isObject(e)&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var o=n(4867);e.exports=o.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var o=e;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=o.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var o=n(4867);e.exports=function(e,t){o.forEach(e,(function(n,o){o!==t&&o.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[o])}))}},1623:e=>{e.exports=null},4109:(e,t,n)=>{"use strict";var o=n(4867),r=["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"];e.exports=function(e){var t,n,i,s={};return e?(o.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=o.trim(e.substr(0,i)).toLowerCase(),n=o.trim(e.substr(i+1)),t){if(s[t]&&r.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},205:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},7675:(e,t,n)=>{"use strict";var o=n(4867);e.exports=function(e,t){t=t||new FormData;var n=[];function r(e){return null===e?"":o.isDate(e)?e.toISOString():o.isArrayBuffer(e)||o.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(i,s){if(o.isPlainObject(i)||o.isArray(i)){if(-1!==n.indexOf(i))throw Error("Circular reference detected in "+s);n.push(i),o.forEach(i,(function(n,i){if(!o.isUndefined(n)){var a,c=s?s+"."+i:i;if(n&&!s&&"object"==typeof n)if(o.endsWith(i,"{}"))n=JSON.stringify(n);else if(o.endsWith(i,"[]")&&(a=o.toArray(n)))return void a.forEach((function(e){!o.isUndefined(e)&&t.append(c,r(e))}));e(n,c)}})),n.pop()}else t.append(s,r(i))}(e),t}},4875:(e,t,n)=>{"use strict";var o=n(7288).version,r=n(2648),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var s={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+o+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,a){if(!1===e)throw new r(i(o," has been removed"+(t?" in "+t:"")),r.ERR_DEPRECATED);return t&&!s[o]&&(s[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new r("options must be an object",r.ERR_BAD_OPTION_VALUE);for(var o=Object.keys(e),i=o.length;i-- >0;){var s=o[i],a=t[s];if(a){var c=e[s],l=void 0===c||a(c,s,e);if(!0!==l)throw new r("option "+s+" must be "+l,r.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new r("Unknown option "+s,r.ERR_BAD_OPTION)}},validators:i}},4867:(e,t,n)=>{"use strict";var o,r=n(1849),i=Object.prototype.toString,s=(o=Object.create(null),function(e){var t=i.call(e);return o[t]||(o[t]=t.slice(8,-1).toLowerCase())});function a(e){return e=e.toLowerCase(),function(t){return s(t)===e}}function c(e){return Array.isArray(e)}function l(e){return void 0===e}var u=a("ArrayBuffer");function d(e){return null!==e&&"object"==typeof e}function f(e){if("object"!==s(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var p=a("Date"),h=a("File"),m=a("Blob"),v=a("FileList");function g(e){return"[object Function]"===i.call(e)}var y=a("URLSearchParams");function b(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),c(e))for(var n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}var E,w=(E="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return E&&e instanceof E});e.exports={isArray:c,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||i.call(e)===t||g(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:d,isPlainObject:f,isUndefined:l,isDate:p,isFile:h,isBlob:m,isFunction:g,isStream:function(e){return d(e)&&g(e.pipe)},isURLSearchParams:y,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:b,merge:function e(){var t={};function n(n,o){f(t[o])&&f(n)?t[o]=e(t[o],n):f(n)?t[o]=e({},n):c(n)?t[o]=n.slice():t[o]=n}for(var o=0,r=arguments.length;o<r;o++)b(arguments[o],n);return t},extend:function(e,t,n){return b(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,o){e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var o,r,i,s={};t=t||{};do{for(r=(o=Object.getOwnPropertyNames(e)).length;r-- >0;)s[i=o[r]]||(t[i]=e[i],s[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:a,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var o=e.indexOf(t,n);return-1!==o&&o===n},toArray:function(e){if(!e)return null;var t=e.length;if(l(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:w,isFileList:v}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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})},(()=>{"use strict";class e{constructor(e){this.element=e}static find(t){let n=document.querySelector(t);return null===n?null:new e(n)}static create(t){return new e(document.createElement(t))}getElement(){return this.element}addId(e){return this.element.id=e,this}toggleClass(e,t=null){return null===t?this.element.classList.contains(e)?this.removeClass(e):this.addClass(e):t?this.addClass(e):this.removeClasses(e)}addClass(e){return this.element.classList.add(e),this}addClasses(...e){return e.forEach((e=>this.addClass(e))),this}removeClasses(...e){return e.forEach((e=>this.removeClass(e))),this}removeClass(e){return this.element.classList.remove(e),this}setAttribute(e,t){return this.element.setAttribute(e,t),this}setAttributes(e){return Object.keys(e).forEach((t=>this.setAttribute(t,e[t]))),this}addHtml(e){return this.element.innerHTML=e,this}append(e){return this.element.appendChild(e),this}appendSelfTo(e){return e.append(this.element),this}prepend(e){return this.element.prepend(e),this}prependSelfTo(e){return e.prepend(this.element),this}css(e,t){return this.element.style[e]=t,this}insertAfter(e){var t;try{null===(t=this.element.parentElement)||void 0===t||t.insertBefore(e,this.element.nextElementSibling)}catch(e){console.error("Not able to insert element after current node",this.element)}}insertSelfBefore(e){var t;try{null===(t=e.parentElement)||void 0===t||t.insertBefore(this.element,e)}catch(e){console.error("Not able to insert element before current node",this.element)}return this}insertBefore(e){var t;try{null===(t=this.element.parentElement)||void 0===t||t.insertBefore(e,this.element)}catch(e){console.error("Not able to insert element before current node",this.element)}return this}addEventListener(e,t){return this.element.addEventListener(e,t),this}addEventListeners(e,t){return e.forEach((e=>this.addEventListener(e,t))),this}}function t(){}function o(e){return e()}function r(){return Object.create(null)}function i(e){e.forEach(o)}function s(e){return"function"==typeof e}function a(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let c;function l(e,t){return c||(c=document.createElement("a")),c.href=t,e===c.href}function u(e){return 0===Object.keys(e).length}function d(e,t,n,o){if(e){const r=f(e,t,n,o);return e[0](r)}}function f(e,t,n,o){return e[1]&&o?function(e,t){for(const n in t)e[n]=t[n];return e}(n.ctx.slice(),e[1](o(t))):n.ctx}function p(e,t,n,o){if(e[2]&&o){const r=e[2](o(n));if(void 0===t.dirty)return r;if("object"==typeof r){const e=[],n=Math.max(t.dirty.length,r.length);for(let o=0;o<n;o+=1)e[o]=t.dirty[o]|r[o];return e}return t.dirty|r}return t.dirty}function h(e,t,n,o,r,i){if(r){const s=f(t,n,o,i);e.p(s,r)}}function m(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let e=0;e<n;e++)t[e]=-1;return t}return-1}new Set;let v,g=!1;function y(e,t){e.appendChild(t)}function b(e,t,n){e.insertBefore(t,n||null)}function E(e){e.parentNode&&e.parentNode.removeChild(e)}function w(e){return document.createElement(e)}function _(e){return document.createTextNode(e)}function $(){return _(" ")}function x(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function S(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function C(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function O(e,t,n){e.classList[n?"add":"remove"](t)}function A(e){v=e}function R(){if(!v)throw new Error("Function called outside component initialization");return v}function T(e){R().$$.on_mount.push(e)}function N(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e.call(this,t)))}new Map;const k=[],P=[],L=[],j=[],B=Promise.resolve();let U=!1;function D(e){L.push(e)}const q=new Set;let F=0;function I(){const e=v;do{for(;F<k.length;){const e=k[F];F++,A(e),M(e.$$)}for(A(null),k.length=0,F=0;P.length;)P.pop()();for(let e=0;e<L.length;e+=1){const t=L[e];q.has(t)||(q.add(t),t())}L.length=0}while(k.length);for(;j.length;)j.pop()();U=!1,q.clear(),A(e)}function M(e){if(null!==e.fragment){e.update(),i(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(D)}}const H=new Set;let J,W;function z(){J={r:0,c:[],p:J}}function V(){J.r||i(J.c),J=J.p}function X(e,t){e&&e.i&&(H.delete(e),e.i(t))}function K(e,t,n,o){if(e&&e.o){if(H.has(e))return;H.add(e),J.c.push((()=>{H.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}else o&&o()}function Y(e,t,n,r){const{fragment:a,after_update:c}=e.$$;a&&a.m(t,n),r||D((()=>{const t=e.$$.on_mount.map(o).filter(s);e.$$.on_destroy?e.$$.on_destroy.push(...t):i(t),e.$$.on_mount=[]})),c.forEach(D)}function Q(e,t){const n=e.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function G(e,n,o,s,a,c,l,u=[-1]){const d=v;A(e);const f=e.$$={fragment:null,ctx:[],props:c,update:t,not_equal:a,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:r(),dirty:u,skip_bound:!1,root:n.target||d.$$.root};l&&l(f.root);let p=!1;if(f.ctx=o?o(e,n.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return f.ctx&&a(f.ctx[t],f.ctx[t]=r)&&(!f.skip_bound&&f.bound[t]&&f.bound[t](r),p&&function(e,t){-1===e.$$.dirty[0]&&(k.push(e),U||(U=!0,B.then(I)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],f.update(),p=!0,i(f.before_update),f.fragment=!!s&&s(f.ctx),n.target){if(n.hydrate){g=!0;const e=(h=n.target,Array.from(h.childNodes));f.fragment&&f.fragment.l(e),e.forEach(E)}else f.fragment&&f.fragment.c();n.intro&&X(e.$$.fragment),Y(e,n.target,n.anchor,n.customElement),g=!1,I()}var h;A(d)}"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global,new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),"function"==typeof HTMLElement&&(W=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(o).filter(s);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){Q(this,1),this.$destroy=t}$on(e,n){if(!s(n))return t;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{const e=o.indexOf(n);-1!==e&&o.splice(e,1)}}$set(e){this.$$set&&!u(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});class Z{$destroy(){Q(this,1),this.$destroy=t}$on(e,n){if(!s(n))return t;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{const e=o.indexOf(n);-1!==e&&o.splice(e,1)}}$set(e){this.$$set&&!u(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ee(e){let n,o,r,s,a,c,l,u,d,f,p,h,m;return{c(){n=w("div"),o=w("div"),r=w("div"),s=_(e[0]),a=$(),c=w("div"),l=w("button"),u=_(e[2]),d=$(),f=w("button"),p=_(e[1]),S(r,"class","ac-confirmation__modal__content"),S(l,"class","button"),S(f,"class","button button-primary"),S(c,"class","ac-confirmation__modal__footer"),S(o,"class","ac-confirmation__modal"),S(n,"class","ac-confirmation acu-mb-")},m(t,i){b(t,n,i),y(n,o),y(o,r),y(r,s),y(o,a),y(o,c),y(c,l),y(l,u),y(c,d),y(c,f),y(f,p),e[9](f),h||(m=[x(l,"click",e[5]),x(f,"click",e[4])],h=!0)},p(e,[t]){1&t&&C(s,e[0]),4&t&&C(u,e[2]),2&t&&C(p,e[1])},i:t,o:t,d(t){t&&E(n),e[9](null),h=!1,i(m)}}}function te(e,t,n){let o,{message:r}=t,{onConfirm:i}=t,{onClose:s}=t,{lastFocusElement:a}=t,{ok:c}=t,{cancel:l}=t;const u=()=>{a&&a.focus(),s()},d=e=>{"Escape"===e.key&&u()};var f;return T((()=>{document.addEventListener("keydown",d),o.focus()})),f=()=>{document.removeEventListener("keydown",d)},R().$$.on_destroy.push(f),e.$$set=e=>{"message"in e&&n(0,r=e.message),"onConfirm"in e&&n(6,i=e.onConfirm),"onClose"in e&&n(7,s=e.onClose),"lastFocusElement"in e&&n(8,a=e.lastFocusElement),"ok"in e&&n(1,c=e.ok),"cancel"in e&&n(2,l=e.cancel)},[r,c,l,o,()=>{i(),u()},u,i,s,a,function(e){P[e?"unshift":"push"]((()=>{o=e,n(3,o)}))}]}const ne=class extends Z{constructor(e){super(),G(this,e,te,ee,a,{message:0,onConfirm:6,onClose:7,lastFocusElement:8,ok:1,cancel:2})}},oe=()=>ac_global_translations;class re{constructor(e){this.config=e}create(){var e,t,n,o,r,i;let s=document.createElement("div");document.body.appendChild(s),this.component=new ne({target:s,props:{ok:null!==(n=null===(t=null===(e=this.config)||void 0===e?void 0:e.translation)||void 0===t?void 0:t.ok)&&void 0!==n?n:oe().confirmation.ok,cancel:null!==(i=null===(r=null===(o=this.config)||void 0===o?void 0:o.translation)||void 0===r?void 0:r.cancel)&&void 0!==i?i:oe().confirmation.cancel,message:this.config.message,onConfirm:this.config.confirm,lastFocusElement:this.config.lastFocus,onClose:()=>{this.component.$destroy(),s.remove()}}})}}const ie=e=>({}),se=e=>({}),ae=e=>({}),ce=e=>({}),le=e=>({}),ue=e=>({}),de=e=>({}),fe=e=>({}),pe=e=>({}),he=e=>({});function me(e){let t,n,o,r;return{c(){t=w("button"),n=w("span"),S(n,"class","dashicons dashicons-no-alt"),S(t,"class","ac-modal__dialog__close"),t.disabled=e[2]},m(i,s){b(i,t,s),y(t,n),o||(r=x(t,"click",e[6]),o=!0)},p(e,n){4&n&&(t.disabled=e[2])},d(e){e&&E(t),o=!1,r()}}}function ve(e){let t,n;const o=e[11].content,r=d(o,e,e[10],ue);return{c(){t=w("div"),r&&r.c(),S(t,"class","ac-modal__dialog__content"),O(t,"-p0",e[0])},m(e,o){b(e,t,o),r&&r.m(t,null),n=!0},p(e,i){r&&r.p&&(!n||1024&i)&&h(r,o,e,e[10],n?p(o,e[10],i,le):m(e[10]),ue),(!n||1&i)&&O(t,"-p0",e[0])},i(e){n||(X(r,e),n=!0)},o(e){K(r,e),n=!1},d(e){e&&E(t),r&&r.d(e)}}}function ge(e){let t,n;const o=e[11].footer,r=d(o,e,e[10],se);return{c(){t=w("div"),r&&r.c(),S(t,"class","ac-modal__dialog__footer")},m(e,o){b(e,t,o),r&&r.m(t,null),n=!0},p(e,t){r&&r.p&&(!n||1024&t)&&h(r,o,e,e[10],n?p(o,e[10],t,ie):m(e[10]),se)},i(e){n||(X(r,e),n=!0)},o(e){K(r,e),n=!1},d(e){e&&E(t),r&&r.d(e)}}}function ye(e){let t,n,o,r,s,a,c,l,u,f,v,g;const _=e[11].header,C=d(_,e,e[10],he);let A=!e[2]&&me(e);const R=e[11].before_content,T=d(R,e,e[10],fe);let N=e[7].content&&!e[1]&&ve(e);const k=e[11].after_content,P=d(k,e,e[10],ce);let L=e[7].footer&&ge(e);return{c(){t=w("div"),n=w("div"),o=w("div"),C&&C.c(),r=$(),A&&A.c(),s=$(),T&&T.c(),a=$(),N&&N.c(),c=$(),P&&P.c(),l=$(),L&&L.c(),S(o,"class","ac-modal__dialog__header"),S(n,"class","ac-modal__dialog"),S(t,"class",u="ac-modal "+e[3]),O(t,"-active",e[4])},m(i,u){var d;b(i,t,u),y(t,n),y(n,o),C&&C.m(o,null),y(o,r),A&&A.m(o,null),y(n,s),T&&T.m(n,null),y(n,a),N&&N.m(n,null),y(n,c),P&&P.m(n,null),y(n,l),L&&L.m(n,null),e[13](t),f=!0,v||(g=[x(n,"click",(d=e[12],function(e){return e.stopPropagation(),d.call(this,e)})),x(t,"click",e[6])],v=!0)},p(e,[r]){C&&C.p&&(!f||1024&r)&&h(C,_,e,e[10],f?p(_,e[10],r,pe):m(e[10]),he),e[2]?A&&(A.d(1),A=null):A?A.p(e,r):(A=me(e),A.c(),A.m(o,null)),T&&T.p&&(!f||1024&r)&&h(T,R,e,e[10],f?p(R,e[10],r,de):m(e[10]),fe),e[7].content&&!e[1]?N?(N.p(e,r),130&r&&X(N,1)):(N=ve(e),N.c(),X(N,1),N.m(n,c)):N&&(z(),K(N,1,1,(()=>{N=null})),V()),P&&P.p&&(!f||1024&r)&&h(P,k,e,e[10],f?p(k,e[10],r,ae):m(e[10]),ce),e[7].footer?L?(L.p(e,r),128&r&&X(L,1)):(L=ge(e),L.c(),X(L,1),L.m(n,null)):L&&(z(),K(L,1,1,(()=>{L=null})),V()),(!f||8&r&&u!==(u="ac-modal "+e[3]))&&S(t,"class",u),(!f||24&r)&&O(t,"-active",e[4])},i(e){f||(X(C,e),X(T,e),X(N),X(P,e),X(L),f=!0)},o(e){K(C,e),K(T,e),K(N),K(P,e),K(L),f=!1},d(n){n&&E(t),C&&C.d(n),A&&A.d(),T&&T.d(n),N&&N.d(),P&&P.d(n),L&&L.d(),e[13](null),v=!1,i(g)}}}function be(e,t,o){let{$$slots:r={},$$scope:i}=t;const s=function(e){const t={};for(const n in e)t[n]=!0;return t}(r),a=n(7390);let c,{contentNoPadding:l=!1}=t,{hideContent:u=!1}=t,{disableClose:d=!1}=t,{className:f=""}=t,{visible:p=!1}=t,{disableScroll:h=null}=t;const m=function(){const e=R();return(t,n,{cancelable:o=!1}={})=>{const r=e.$$.callbacks[t];if(r){const i=function(e,t,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(e,n,o,t),r}(t,n,{cancelable:o});return r.slice().forEach((t=>{t.call(e,i)})),!i.defaultPrevented}return!0}}(),v=()=>{h&&c&&a.enableBodyScroll(c)},g=()=>{d||(m("close"),v())};return T((()=>{document.addEventListener("keyup",(e=>{"Escape"===e.key&&g()})),h&&c&&a.disableBodyScroll(c,{})})),e.$$set=e=>{"contentNoPadding"in e&&o(0,l=e.contentNoPadding),"hideContent"in e&&o(1,u=e.hideContent),"disableClose"in e&&o(2,d=e.disableClose),"className"in e&&o(3,f=e.className),"visible"in e&&o(4,p=e.visible),"disableScroll"in e&&o(8,h=e.disableScroll),"$$scope"in e&&o(10,i=e.$$scope)},[l,u,d,f,p,c,g,s,h,v,i,r,function(t){N.call(this,e,t)},function(e){P[e?"unshift":"push"]((()=>{c=e,o(5,c)}))}]}const Ee=class extends Z{constructor(e){super(),G(this,e,be,ye,a,{contentNoPadding:0,hideContent:1,disableClose:2,className:3,visible:4,disableScroll:8,FreeScrollLock:9})}get FreeScrollLock(){return this.$$.ctx[9]}};function we(e){let t;return{c(){var e,n;t=w("span"),S(t,"class","spinner"),e=t,n="visibility",null==="visible"?e.style.removeProperty(n):e.style.setProperty(n,"visible","")},m(e,n){b(e,t,n)},d(e){e&&E(t)}}}function _e(e){let t,n,o,r,i,s,a=e[2]&&we();return{c(){t=w("div"),a&&a.c(),n=$(),o=w("iframe"),l(o.src,r=e[1])||S(o,"src",r),S(o,"width","100%"),S(o,"title","changelog"),S(t,"slot","content"),S(t,"class","-content")},m(r,c){b(r,t,c),a&&a.m(t,null),y(t,n),y(t,o),i||(s=x(o,"load",e[6]),i=!0)},p(e,i){e[2]?a||(a=we(),a.c(),a.m(t,n)):a&&(a.d(1),a=null),2&i&&!l(o.src,r=e[1])&&S(o,"src",r)},d(e){e&&E(t),a&&a.d(),i=!1,s()}}}function $e(e){let t,n,o;function r(t){e[7](t)}let i={contentNoPadding:!0,className:"changelog",$$slots:{content:[_e]},$$scope:{ctx:e}};return void 0!==e[0]&&(i.visible=e[0]),t=new Ee({props:i}),P.push((()=>function(e,t,n){const o=e.$$.props.visible;void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}(t,0,r))),t.$on("close",e[3]),{c(){var e;(e=t.$$.fragment)&&e.c()},m(e,n){Y(t,e,n),o=!0},p(e,[o]){const r={};var i;262&o&&(r.$$scope={dirty:o,ctx:e}),!n&&1&o&&(n=!0,r.visible=e[0],i=()=>n=!1,j.push(i)),t.$set(r)},i(e){o||(X(t.$$.fragment,e),o=!0)},o(e){K(t.$$.fragment,e),o=!1},d(e){Q(t,e)}}}function xe(e,t,n){let{changelogUrl:o}=t,{closeHandler:r=null}=t,{show:i=!0}=t,s=!0;return e.$$set=e=>{"changelogUrl"in e&&n(1,o=e.changelogUrl),"closeHandler"in e&&n(4,r=e.closeHandler),"show"in e&&n(0,i=e.show)},[i,o,s,()=>{n(0,i=!1),r&&r()},r,(e=!0)=>{n(0,i=e)},()=>n(2,s=!1),function(e){i=e,n(0,i)}]}const Se=class extends Z{constructor(e){super(),G(this,e,xe,$e,a,{changelogUrl:1,closeHandler:4,show:0,toggle:5})}get toggle(){return this.$$.ctx[5]}};class Ce{constructor(e){this.el=e,this.container=null,this.component=null,this.init()}getContainer(){null===this.container&&(this.container=document.createElement("div"),document.body.appendChild(this.container))}initComponent(){null===this.component&&null!==this.container&&(this.component=new Se({target:this.container,props:{changelogUrl:this.el.href}}))}init(){this.el.addEventListener("click",(e=>{var t;e.preventDefault(),this.getContainer(),this.initComponent(),null===(t=this.component)||void 0===t||t.toggle(!0)}))}}var Oe=n(9669),Ae=n.n(Oe);const Re=(e,t,n="")=>{if(!t||"object"!=typeof t||t instanceof Date||t instanceof File){const o=null==t?"":t;e.append(n,o)}else Object.keys(t).forEach((o=>{Re(e,t[o],n?`${n}[${o}]`:o)}))},Te=()=>null!==ACP_LICENSE_I18N&&void 0!==ACP_LICENSE_I18N?ACP_LICENSE_I18N:{};class Ne{constructor(e){this.element=e,this.initChangelog()}initChangelog(){this.element.querySelectorAll('[data-acp-comp="changelog"]').forEach((e=>new Ce(e)))}setLoading(){this.element.querySelectorAll(".acp-plugin-version-badge ").forEach((e=>e.remove())),this.element.querySelector("[data-loading]").innerHTML=`<span class="spinner"></span> ${Te().updating_plugin}`}finishUpdate(){this.element.querySelector("[data-loading]").innerHTML=`<em>${Te().plugin_up_to_date}</em>`}needUpdate(){var e;return"1"===(null!==(e=this.element.dataset.updateReady)&&void 0!==e?e:0)}update(e){var t,n,o;this.setLoading(),Ae().post(ajaxurl,((e,t=null)=>{let n=null!=t?t:new FormData;return Object.keys(e).forEach((t=>{Re(n,e[t],t)})),n})({plugin:null!==(t=this.element.dataset.updateBasename)&&void 0!==t?t:"",slug:null!==(n=this.element.dataset.updateSlug)&&void 0!==n?n:"",action:"update-plugin",_ajax_nonce:null!==(o=this.element.dataset.updateNonce)&&void 0!==o?o:""})).then((t=>{t.data.success&&this.finishUpdate(),e()}))}}class ke{constructor(e){this.element=e,this.initUpdates(),this.init()}initUpdates(){this.updates||(this.updates=[]),this.element.querySelectorAll(".acp-plugin-version-section").forEach((e=>this.updates.push(new Ne(e))))}updatePlugins(){let e=this.updates.filter((e=>e.needUpdate()));new Pe(e).run((()=>{let e=this.getUpdateButton();e&&(e.disabled=!1,e.querySelectorAll(".spinner").forEach((e=>e.remove()))),window.location.reload()}))}getUpdateButton(){return this.element.querySelector("[data-acp-update]")}init(){let e=this.getUpdateButton();e&&e.addEventListener("click",(()=>{e.disabled=!0,this.updatePlugins()}))}}class Pe{constructor(e){this.updates=e}run(e){return t=this,n=void 0,r=function*(){for(const e of this.updates)yield new Promise(((t,n)=>{e.update((()=>{t(!0)}))}));e()},new((o=void 0)||(o=Promise))((function(e,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(s,a)}c((r=r.apply(t,n||[])).next())}));var t,n,o,r}}const Le=Te(),je=(e,t)=>{t.disabled=""===e.value};document.addEventListener("DOMContentLoaded",(()=>{const t=document.querySelector("#licence_activation input[name=license]"),n=document.querySelector("#licence_activation button");t&&n&&(je(t,n),new e(t).addEventListeners(["keyup","input"],(()=>je(t,n))));const o=document.querySelector('#licence_activation button[value="acp-license-deactivate"]');o&&o.addEventListener("click",(function(t){t.preventDefault();const n=Le.license_removal+" "+Le.license_removal_explanation;new re({message:n,translation:Le.confirmation,confirm:()=>{const t=o.closest("form");t&&(t.appendChild(e.create("input").setAttributes({type:"hidden",name:"action",value:"acp-license-deactivate"}).getElement()),t.submit())}}).create()})),document.querySelectorAll(".ac-settings-box.-updates").forEach((e=>new ke(e)))}))})()})();