/home/vianto5/hidalgoresidences.mx/wp-content/plugins/code-snippets/dist
NameSizeModeActions
editor-themes/-0755rm
77309b6c62059751c2c4.svg7650644editdlrm
admin-bar.css28800644editdlrm
admin-bar.js131910644editdlrm
admin-bar.js.LICENSE.txt1630644editdlrm
edit-rtl.css220420644editdlrm
edit.css586090644editdlrm
edit.js2188370644editdlrm
edit.js.LICENSE.txt5240644editdlrm
editor.js1333610644editdlrm
editor.js.LICENSE.txt2850644editdlrm
import.css301860644editdlrm
import.js979730644editdlrm
import.js.LICENSE.txt2850644editdlrm
manage-rtl.css175130644editdlrm
manage.css681640644editdlrm
manage.js1738270644editdlrm
manage.js.LICENSE.txt2850644editdlrm
mce.js44160644editdlrm
menu.css10610644editdlrm
prism.css85900644editdlrm
prism.js535370644editdlrm
prism.js.LICENSE.txt1930644editdlrm
settings.css289310644editdlrm
settings.js345400644editdlrm
settings.js.LICENSE.txt2850644editdlrm
welcome.css266310644editdlrm
welcome.js233840644editdlrm
welcome.js.LICENSE.txt1210644editdlrm
Edit: /home/vianto5/hidalgoresidences.mx/wp-content/plugins/code-snippets/dist/manage.js (173827B)
/*! For license information please see manage.js.LICENSE.txt */ (()=>{var e={5172(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},6993(e,t,n){var r=n(5546);function s(){var t,n,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.toStringTag||"@@toStringTag";function c(e,s,o,i){var a=s&&s.prototype instanceof u?s:u,c=Object.create(a.prototype);return r(c,"_invoke",function(e,r,s){var o,i,a,c=0,u=s||[],d=!1,p={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,i=0,a=t,p.n=n,l}};function f(e,r){for(i=e,a=r,n=0;!d&&c&&!s&&n3?(s=h===r)&&(a=o[(i=o[4])?5:(i=3,3)],o[4]=o[5]=t):o[0]<=f&&((s=e<2&&fr||r>h)&&(o[4]=e,o[5]=r,p.n=h,i=0))}if(s||e>1)return l;throw d=!0,r}return function(s,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&f(u,h),i=u,a=h;(n=i<2?t:a)||!d;){o||(i?i<3?(i>1&&(p.n=-1),f(i,a)):p.n=a:p.v=a);try{if(c=2,o){if(i||(s="next"),n=o[s]){if(!(n=n.call(o,a)))throw TypeError("iterator result is not an object");if(!n.done)return n;a=n.value,i<2&&(i=0)}else 1===i&&(n=o.return)&&n.call(o),i<2&&(a=TypeError("The iterator does not provide a '"+s+"' method"),i=1);o=t}else if((n=(d=p.n<0)?a:e.call(r,p))!==l)break}catch(e){o=t,i=1,a=e}finally{c=1}}return{value:n,done:d}}}(e,o,i),!0),c}var l={};function u(){}function d(){}function p(){}n=Object.getPrototypeOf;var f=[][i]?n(n([][i]())):(r(n={},i,function(){return this}),n),h=p.prototype=u.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,r(e,a,"GeneratorFunction")),e.prototype=Object.create(h),e}return d.prototype=p,r(h,"constructor",p),r(p,"constructor",d),d.displayName="GeneratorFunction",r(p,a,"GeneratorFunction"),r(h),r(h,a,"Generator"),r(h,i,function(){return this}),r(h,"toString",function(){return"[object Generator]"}),(e.exports=s=function(){return{w:c,m}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},5869(e,t,n){var r=n(887);e.exports=function(e,t,n,s,o){var i=r(e,t,n,s,o);return i.next().then(function(e){return e.done?e.value:i.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887(e,t,n){var r=n(6993),s=n(1791);e.exports=function(e,t,n,o,i){return new s(r().w(e,t,n,o),i||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},1791(e,t,n){var r=n(5172),s=n(5546);e.exports=function e(t,n){function o(e,s,i,a){try{var c=t[e](s),l=c.value;return l instanceof r?n.resolve(l.v).then(function(e){o("next",e,i,a)},function(e){o("throw",e,i,a)}):n.resolve(l).then(function(e){c.value=e,i(c)},function(e){return o("throw",e,i,a)})}catch(e){a(e)}}var i;this.next||(s(e.prototype),s(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),s(this,"_invoke",function(e,t,r){function s(){return new n(function(t,n){o(e,r,t,n)})}return i=i?i.then(s,s):s()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},5546(e){function t(n,r,s,o){var i=Object.defineProperty;try{i({},"",{})}catch(n){i=0}e.exports=t=function(e,n,r,s){function o(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?i?i(e,n,{value:r,enumerable:!s,configurable:!s,writable:!s}):e[n]=r:(o("next",0),o("throw",1),o("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,s,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4373(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4633(e,t,n){var r=n(5172),s=n(6993),o=n(5869),i=n(887),a=n(1791),c=n(4373),l=n(579);function u(){"use strict";var t=s(),n=t.m(u),d=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function p(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var f={throw:1,return:2,break:3,continue:3};function h(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,f[e],t)},delegateYield:function(e,s,o){return t.resultName=s,n(r.d,l(e),o)},finish:function(e){return n(r.f,e)}},n=function(e,n,s){r.p=t.prev,r.n=t.next;try{return e(n,s)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=u=function(){return{wrap:function(e,n,r,s){return t.w(h(e),n,r,s&&s.reverse())},isGeneratorFunction:p,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:a,async:function(e,t,n,r,s){return(p(t)?i:o)(h(e),t,n,r,s)},keys:c,values:l}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=u,e.exports.__esModule=!0,e.exports.default=e.exports},579(e,t,n){var r=n(3738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},3738(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4756(e,t,n){var r=n(4633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},6942(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function s(){for(var e="",t=0;t{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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),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";var e={};function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nvt,hasStandardBrowserEnv:()=>yt,hasStandardBrowserWebWorkerEnv:()=>jt,navigator:()=>gt,origin:()=>wt});const o=window.React,i=window.wp.i18n,a=window.wp.element;function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}const l=window.wp.url;var u=function(e){var t;return null!==(t=new URLSearchParams(window.location.search).get(e))&&void 0!==t?t:void 0},d=function(e){if("URLSearchParams"in window){for(var t=new URLSearchParams(window.location.search),n=0,r=Object.entries(e);nCode Snippets Pro","code-snippets"),{span:(0,g.jsx)("span",{})})}),(0,g.jsx)("p",{children:(0,a.createInterpolateElement)((0,i.__)("With Code Snippets Pro you can connect your WordPress sites to the code snippets cloud platform and be able to backup, synchronise, collaborate, and deploy your snippets from one central location.","code-snippets"),{strong:(0,g.jsx)("strong",{})})}),(0,g.jsx)("a",{href:"https://codesnippets.pro/pricing/",className:"button button-primary button-large",rel:"noreferrer",target:"_blank",children:(0,i.__)("Explore Code Snippets Pro","code-snippets")}),(0,g.jsx)("p",{children:(0,i.__)("Here's what else you get with Pro:","code-snippets")}),(0,g.jsxs)("ul",{children:[(0,g.jsx)("li",{children:(0,i.__)("Create, explain and verify snippets with AI","code-snippets")}),(0,g.jsx)("li",{children:(0,i.__)("Control when snippets run with Conditions","code-snippets")}),(0,g.jsx)("li",{children:(0,i.__)("CSS stylesheet snippets","code-snippets")}),(0,g.jsx)("li",{children:(0,i.__)("Minified JavaScript snippets","code-snippets")}),(0,g.jsx)("li",{children:(0,i.__)("Editor blocks and Elementor widgets","code-snippets")}),(0,g.jsx)("li",{children:(0,i.__)("Cloud sync and backup","code-snippets")}),(0,g.jsx)("li",{children:(0,i.__)("Cloud share and deploy","code-snippets")}),(0,g.jsx)("li",{children:(0,i.__)("Cloud bundles and teams","code-snippets")}),(0,g.jsx)("li",{children:(0,i.__)("WP-CLI commands","code-snippets")}),(0,g.jsx)("li",{children:(0,i.__)("And much more!","code-snippets")})]})]})},G=function(){return(0,g.jsx)("div",{className:"code-snippets-upsell code-snippets-upsell-page",children:(0,g.jsx)(z,{})})};function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function J(e){for(var t=1;t{const t=de.call(e);return be[t]||(be[t]=t.slice(8,-1).toLowerCase())});var be;const ve=e=>(e=e.toLowerCase(),t=>me(t)===e),ge=e=>t=>typeof t===e,{isArray:ye}=Array,je=ge("undefined");function we(e){return null!==e&&!je(e)&&null!==e.constructor&&!je(e.constructor)&&_e(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const xe=ve("ArrayBuffer"),Oe=ge("string"),_e=ge("function"),Se=ge("number"),Pe=e=>null!==e&&"object"==typeof e,Ne=e=>{if("object"!==me(e))return!1;const t=pe(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||he in e||fe in e)},Ee=ve("Date"),Ce=ve("File"),ke=ve("Blob"),De=ve("FileList"),Re=ve("URLSearchParams"),[Ae,Te,Ie,Le]=["ReadableStream","Request","Response","Headers"].map(ve);function Fe(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,s;if("object"!=typeof e&&(e=[e]),ye(e))for(r=0,s=e.length;r0;)if(r=n[s],t===r.toLowerCase())return r;return null}const Ue="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,Be=e=>!je(e)&&e!==Ue,Ve=(qe="undefined"!=typeof Uint8Array&&pe(Uint8Array),e=>qe&&e instanceof qe);var qe;const We=ve("HTMLFormElement"),He=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ke=ve("RegExp"),ze=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Fe(n,(n,s)=>{let o;!1!==(o=t(n,s,e))&&(r[s]=o||n)}),Object.defineProperties(e,r)},Ge=ve("AsyncFunction"),$e=(Je="function"==typeof setImmediate,Qe=_e(Ue.postMessage),Je?setImmediate:Qe?(Xe=`axios@${Math.random()}`,Ye=[],Ue.addEventListener("message",({source:e,data:t})=>{e===Ue&&t===Xe&&Ye.length&&Ye.shift()()},!1),e=>{Ye.push(e),Ue.postMessage(Xe,"*")}):e=>setTimeout(e));var Je,Qe,Xe,Ye;const Ze="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Ue):"undefined"!=typeof process&&process.nextTick||$e,et={isArray:ye,isArrayBuffer:xe,isBuffer:we,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||_e(e.append)&&("formdata"===(t=me(e))||"object"===t&&_e(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&xe(e.buffer),t},isString:Oe,isNumber:Se,isBoolean:e=>!0===e||!1===e,isObject:Pe,isPlainObject:Ne,isEmptyObject:e=>{if(!Pe(e)||we(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Ae,isRequest:Te,isResponse:Ie,isHeaders:Le,isUndefined:je,isDate:Ee,isFile:Ce,isBlob:ke,isRegExp:Ke,isFunction:_e,isStream:e=>Pe(e)&&_e(e.pipe),isURLSearchParams:Re,isTypedArray:Ve,isFileList:De,forEach:Fe,merge:function e(){const{caseless:t,skipUndefined:n}=Be(this)&&this||{},r={},s=(s,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const i=t&&Me(r,o)||o;Ne(r[i])&&Ne(s)?r[i]=e(r[i],s):Ne(s)?r[i]=e({},s):ye(s)?r[i]=s.slice():n&&je(s)||(r[i]=s)};for(let e=0,t=arguments.length;e(Fe(t,(t,r)=>{n&&_e(t)?Object.defineProperty(e,r,{value:ue(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{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),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),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&&pe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:me,kindOfTest:ve,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(ye(e))return e;let t=e.length;if(!Se(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[fe]).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:We,hasOwnProperty:He,hasOwnProp:He,reduceDescriptors:ze,freezeMethods:e=>{ze(e,(t,n)=>{if(_e(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];_e(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 ye(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:Me,global:Ue,isContextDefined:Be,isSpecCompliantForm:function(e){return!!(e&&_e(e.append)&&"FormData"===e[he]&&e[fe])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Pe(e)){if(t.indexOf(e)>=0)return;if(we(e))return e;if(!("toJSON"in e)){t[r]=e;const s=ye(e)?[]:{};return Fe(e,(e,t)=>{const o=n(e,r+1);!je(o)&&(s[t]=o)}),t[r]=void 0,s}}return e};return n(e,0)},isAsyncFn:Ge,isThenable:e=>e&&(Pe(e)||_e(e))&&_e(e.then)&&_e(e.catch),setImmediate:$e,asap:Ze,isIterable:e=>null!=e&&_e(e[fe])};class tt extends Error{static from(e,t,n,r,s,o){const i=new tt(e.message,t||e.code,n,r,s);return i.cause=e,i.name=e.name,o&&Object.assign(i,o),i}constructor(e,t,n,r,s){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status)}toJSON(){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:et.toJSONObject(this.config),code:this.code,status:this.status}}}tt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",tt.ERR_BAD_OPTION="ERR_BAD_OPTION",tt.ECONNABORTED="ECONNABORTED",tt.ETIMEDOUT="ETIMEDOUT",tt.ERR_NETWORK="ERR_NETWORK",tt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",tt.ERR_DEPRECATED="ERR_DEPRECATED",tt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",tt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",tt.ERR_CANCELED="ERR_CANCELED",tt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",tt.ERR_INVALID_URL="ERR_INVALID_URL";const nt=tt;function rt(e){return et.isPlainObject(e)||et.isArray(e)}function st(e){return et.endsWith(e,"[]")?e.slice(0,-2):e}function ot(e,t,n){return e?e.concat(t).map(function(e,t){return e=st(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const it=et.toFlatObject(et,{},null,function(e){return/^is[A-Z]/.test(e)}),at=function(e,t,n){if(!et.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=et.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!et.isUndefined(t[e])})).metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&et.isSpecCompliantForm(t);if(!et.isFunction(s))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(et.isDate(e))return e.toISOString();if(et.isBoolean(e))return e.toString();if(!a&&et.isBlob(e))throw new nt("Blob is not supported. Use a Buffer instead.");return et.isArrayBuffer(e)||et.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,s){let a=e;if(e&&!s&&"object"==typeof e)if(et.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(et.isArray(e)&&function(e){return et.isArray(e)&&!e.some(rt)}(e)||(et.isFileList(e)||et.endsWith(n,"[]"))&&(a=et.toArray(e)))return n=st(n),a.forEach(function(e,r){!et.isUndefined(e)&&null!==e&&t.append(!0===i?ot([n],r,o):null===i?n:n+"[]",c(e))}),!1;return!!rt(e)||(t.append(ot(s,n,o),c(e)),!1)}const u=[],d=Object.assign(it,{defaultVisitor:l,convertValue:c,isVisitable:rt});if(!et.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!et.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),et.forEach(n,function(n,o){!0===(!(et.isUndefined(n)||null===n)&&s.call(t,n,et.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])}),u.pop()}}(e),t};function ct(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function lt(e,t){this._pairs=[],e&&at(e,this,t)}const ut=lt.prototype;ut.append=function(e,t){this._pairs.push([e,t])},ut.toString=function(e){const t=e?function(t){return e.call(this,t,ct)}:ct;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const dt=lt;function pt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ft(e,t,n){if(!t)return e;const r=n&&n.encode||pt,s=et.isFunction(n)?{serialize:n}:n,o=s&&s.serialize;let i;if(i=o?o(t,s):et.isURLSearchParams(t)?t.toString():new dt(t,s).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const ht=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){et.forEach(this.handlers,function(t){null!==t&&e(t)})}},mt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},bt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:dt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},vt="undefined"!=typeof window&&"undefined"!=typeof document,gt="object"==typeof navigator&&navigator||void 0,yt=vt&&(!gt||["ReactNative","NativeScript","NS"].indexOf(gt.product)<0),jt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,wt=vt&&window.location.href||"http://localhost",xt={...e,...bt},Ot=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&&et.isArray(r)?r.length:o,a?(et.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!i):(r[o]&&et.isObject(r[o])||(r[o]=[]),t(e,n,r[o],s)&&et.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{t(function(e){return et.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null},_t={transitional:mt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=et.isObject(e);if(s&&et.isHTMLForm(e)&&(e=new FormData(e)),et.isFormData(e))return r?JSON.stringify(Ot(e)):e;if(et.isArrayBuffer(e)||et.isBuffer(e)||et.isStream(e)||et.isFile(e)||et.isBlob(e)||et.isReadableStream(e))return e;if(et.isArrayBufferView(e))return e.buffer;if(et.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 at(e,new xt.classes.URLSearchParams,{visitor:function(e,t,n,r){return xt.isNode&&et.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=et.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return at(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),function(e){if(et.isString(e))try{return(0,JSON.parse)(e),et.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||_t.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(et.isResponse(e)||et.isReadableStream(e))return e;if(e&&et.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw nt.from(e,nt.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:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};et.forEach(["delete","get","head","post","put","patch"],e=>{_t.headers[e]={}});const St=_t,Pt=et.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"]),Nt=Symbol("internals");function Et(e){return e&&String(e).trim().toLowerCase()}function Ct(e){return!1===e||null==e?e:et.isArray(e)?e.map(Ct):String(e)}function kt(e,t,n,r,s){return et.isFunction(r)?r.call(this,t,n):(s&&(t=n),et.isString(t)?et.isString(r)?-1!==t.indexOf(r):et.isRegExp(r)?r.test(t):void 0:void 0)}class Dt{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(e,t,n){const s=Et(t);if(!s)throw new Error("header name must be a non-empty string");const o=et.findKey(r,s);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=Ct(e))}const o=(e,t)=>et.forEach(e,(e,n)=>s(e,n,t));if(et.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(et.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]&&Pt[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(et.isObject(e)&&et.isIterable(e)){let n,r,s={};for(const t of e){if(!et.isArray(t))throw TypeError("Object iterator must return a key-value pair");s[r=t[0]]=(n=s[r])?et.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(s,t)}else null!=e&&s(t,e,n);return this}get(e,t){if(e=Et(e)){const n=et.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(et.isFunction(t))return t.call(this,e,n);if(et.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Et(e)){const n=et.findKey(this,e);return!(!n||void 0===this[n]||t&&!kt(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function s(e){if(e=Et(e)){const s=et.findKey(n,e);!s||t&&!kt(0,n[s],s,t)||(delete n[s],r=!0)}}return et.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&&!kt(0,this[s],s,e,!0)||(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return et.forEach(this,(r,s)=>{const o=et.findKey(n,s);if(o)return t[o]=Ct(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]=Ct(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return et.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&et.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")}getSetCookie(){return this.get("set-cookie")||[]}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[Nt]=this[Nt]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Et(e);t[r]||(function(e,t){const n=et.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 et.isArray(e)?e.forEach(r):r(e),this}}Dt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),et.reduceDescriptors(Dt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),et.freezeMethods(Dt);const Rt=Dt;function At(e,t){const n=this||St,r=t||n,s=Rt.from(r.headers);let o=r.data;return et.forEach(e,function(e){o=e.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Tt(e){return!(!e||!e.__CANCEL__)}const It=class extends nt{constructor(e,t,n){super(null==e?"canceled":e,nt.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Lt(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new nt("Request failed with status code "+n.status,[nt.ERR_BAD_REQUEST,nt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Ft=(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 c=Date.now(),l=r[i];s||(s=c),n[o]=a,r[o]=c;let u=i,d=0;for(;u!==o;)d+=n[u++],u%=e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-s{s=o,n=null,r&&(clearTimeout(r),r=null),e(...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,c=s(a);r=o,e({loaded:o,total:i,progress:i?o/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&o<=i?(i-o)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},Mt=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ut=e=>(...t)=>et.asap(()=>e(...t)),Bt=xt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,xt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(xt.origin),xt.navigator&&/(msie|trident)/i.test(xt.navigator.userAgent)):()=>!0,Vt=xt.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];et.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),et.isString(r)&&a.push(`path=${r}`),et.isString(s)&&a.push(`domain=${s}`),!0===o&&a.push("secure"),et.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function qt(e,t,n){let r=!("string"==typeof(s=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s));var s;return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Wt=e=>e instanceof Rt?{...e}:e;function Ht(e,t){t=t||{};const n={};function r(e,t,n,r){return et.isPlainObject(e)&&et.isPlainObject(t)?et.merge.call({caseless:r},e,t):et.isPlainObject(t)?et.merge({},t):et.isArray(t)?t.slice():t}function s(e,t,n,s){return et.isUndefined(t)?et.isUndefined(e)?void 0:r(void 0,e,0,s):r(e,t,0,s)}function o(e,t){if(!et.isUndefined(t))return r(void 0,t)}function i(e,t){return et.isUndefined(t)?et.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 c={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(Wt(e),Wt(t),0,!0)};return et.forEach(Object.keys({...e,...t}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const o=et.hasOwnProp(c,r)?c[r]:s,i=o(e[r],t[r],r);et.isUndefined(i)&&o!==a||(n[r]=i)}),n}const Kt=e=>{const t=Ht({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;if(t.headers=i=Rt.from(i),t.url=ft(qt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),et.isFormData(n))if(xt.hasStandardBrowserEnv||xt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(et.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&i.set(e,n)})}if(xt.hasStandardBrowserEnv&&(r&&et.isFunction(r)&&(r=r(t)),r||!1!==r&&Bt(t.url))){const e=s&&o&&Vt.read(o);e&&i.set(s,e)}return t},zt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Kt(e);let s=r.data;const o=Rt.from(r.headers).normalize();let i,a,c,l,u,{responseType:d,onUploadProgress:p,onDownloadProgress:f}=r;function h(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function b(){if(!m)return;const r=Rt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Lt(function(e){t(e),h()},function(e){n(e),h()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=b:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(b)},m.onabort=function(){m&&(n(new nt("Request aborted",nt.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=t&&t.message?t.message:"Network Error",s=new nt(r,nt.ERR_NETWORK,e,m);s.event=t||null,n(s),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||mt;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new nt(t,s.clarifyTimeoutError?nt.ETIMEDOUT:nt.ECONNABORTED,e,m)),m=null},void 0===s&&o.setContentType(null),"setRequestHeader"in m&&et.forEach(o.toJSON(),function(e,t){m.setRequestHeader(t,e)}),et.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),f&&([c,u]=Ft(f,!0),m.addEventListener("progress",c)),p&&m.upload&&([a,l]=Ft(p),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new It(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);v&&-1===xt.protocols.indexOf(v)?n(new nt("Unsupported protocol "+v+":",nt.ERR_BAD_REQUEST,e)):m.send(s||null)})},Gt=(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 nt?t:new It(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,s(new nt(`timeout of ${t}ms exceeded`,nt.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=()=>et.asap(i),a}},$t=function*(e,t){let n=e.byteLength;if(!t||n{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*$t(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})},{isFunction:Qt}=et,Xt=(({Request:e,Response:t})=>({Request:e,Response:t}))(et.global),{ReadableStream:Yt,TextEncoder:Zt}=et.global,en=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},tn=e=>{e=et.merge.call({skipUndefined:!0},Xt,e);const{fetch:t,Request:n,Response:r}=e,s=t?Qt(t):"function"==typeof fetch,o=Qt(n),i=Qt(r);if(!s)return!1;const a=s&&Qt(Yt),c=s&&("function"==typeof Zt?(l=new Zt,e=>l.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var l;const u=o&&a&&en(()=>{let e=!1;const t=new n(xt.origin,{body:new Yt,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=i&&a&&en(()=>et.isReadableStream(new r("").body)),p={stream:d&&(e=>e.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!p[e]&&(p[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new nt(`Response type '${e}' is not supported`,nt.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:s,method:i,data:a,signal:l,cancelToken:f,timeout:h,onDownloadProgress:m,onUploadProgress:b,responseType:v,headers:g,withCredentials:y="same-origin",fetchOptions:j}=Kt(e),w=t||fetch;v=v?(v+"").toLowerCase():"text";let x=Gt([l,f&&f.toAbortSignal()],h),O=null;const _=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let S;try{if(b&&u&&"get"!==i&&"head"!==i&&0!==(S=await(async(e,t)=>{const r=et.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(et.isBlob(e))return e.size;if(et.isSpecCompliantForm(e)){const t=new n(xt.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return et.isArrayBufferView(e)||et.isArrayBuffer(e)?e.byteLength:(et.isURLSearchParams(e)&&(e+=""),et.isString(e)?(await c(e)).byteLength:void 0)})(t):r})(g,a))){let e,t=new n(s,{method:"POST",body:a,duplex:"half"});if(et.isFormData(a)&&(e=t.headers.get("content-type"))&&g.setContentType(e),t.body){const[e,n]=Mt(S,Ft(Ut(b)));a=Jt(t.body,65536,e,n)}}et.isString(y)||(y=y?"include":"omit");const t=o&&"credentials"in n.prototype,l={...j,signal:x,method:i.toUpperCase(),headers:g.normalize().toJSON(),body:a,duplex:"half",credentials:t?y:void 0};O=o&&new n(s,l);let f=await(o?w(O,j):w(s,l));const h=d&&("stream"===v||"response"===v);if(d&&(m||h&&_)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=f[t]});const t=et.toFiniteNumber(f.headers.get("content-length")),[n,s]=m&&Mt(t,Ft(Ut(m),!0))||[];f=new r(Jt(f.body,65536,n,()=>{s&&s(),_&&_()}),e)}v=v||"text";let P=await p[et.findKey(p,v)||"text"](f,e);return!h&&_&&_(),await new Promise((t,n)=>{Lt(t,n,{data:P,headers:Rt.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:O})})}catch(t){if(_&&_(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new nt("Network Error",nt.ERR_NETWORK,e,O,t&&t.response),{cause:t.cause||t});throw nt.from(t,t&&t.code,e,O,t&&t.response)}}},nn=new Map,rn=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i,a,c=o.length,l=nn;for(;c--;)i=o[c],a=l.get(i),void 0===a&&l.set(i,a=c?new Map:tn(t)),l=a;return a},sn=(rn(),{http:null,xhr:zt,fetch:{get:rn}});et.forEach(sn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const on=e=>`- ${e}`,an=e=>et.isFunction(e)||null===e||!1===e,cn=function(e,t){e=et.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(on).join("\n"):" "+on(e[0]):"as no adapter specified";throw new nt("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return s};function ln(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new It(null,e)}function un(e){return ln(e),e.headers=Rt.from(e.headers),e.data=At.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),cn(e.adapter||St.adapter,e)(e).then(function(t){return ln(e),t.data=At.call(e,e.transformResponse,t),t.headers=Rt.from(t.headers),t},function(t){return Tt(t)||(ln(e),t&&t.response&&(t.response.data=At.call(e,e.transformResponse,t.response),t.response.headers=Rt.from(t.response.headers))),Promise.reject(t)})}const dn="1.13.5",pn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{pn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const fn={};pn.transitional=function(e,t,n){function r(e,t){return"[Axios v"+dn+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,o)=>{if(!1===e)throw new nt(r(s," has been removed"+(t?" in "+t:"")),nt.ERR_DEPRECATED);return t&&!fn[s]&&(fn[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)}},pn.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const hn={assertOptions:function(e,t,n){if("object"!=typeof e)throw new nt("options must be an object",nt.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 nt("option "+o+" must be "+n,nt.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new nt("Unknown option "+o,nt.ERR_BAD_OPTION)}},validators:pn},mn=hn.validators;class bn{constructor(e){this.defaults=e||{},this.interceptors={request:new ht,response:new ht}}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=Ht(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;void 0!==n&&hn.assertOptions(n,{silentJSONParsing:mn.transitional(mn.boolean),forcedJSONParsing:mn.transitional(mn.boolean),clarifyTimeoutError:mn.transitional(mn.boolean),legacyInterceptorReqResOrdering:mn.transitional(mn.boolean)},!1),null!=r&&(et.isFunction(r)?t.paramsSerializer={serialize:r}:hn.assertOptions(r,{encode:mn.function,serialize:mn.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),hn.assertOptions(t,{baseUrl:mn.spelling("baseURL"),withXsrfToken:mn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&et.merge(s.common,s[t.method]);s&&et.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=Rt.concat(o,s);const i=[];let a=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const n=t.transitional||mt;n&&n.legacyInterceptorReqResOrdering?i.unshift(e.fulfilled,e.rejected):i.push(e.fulfilled,e.rejected)});const c=[];let l;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let u,d=0;if(!a){const e=[un.bind(this),void 0];for(e.unshift(...i),e.push(...c),u=e.length,l=Promise.resolve(t);d{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 It(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 gn(function(t){e=t}),cancel:e}}}const yn=gn,jn={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(jn).forEach(([e,t])=>{jn[t]=e});const wn=jn,xn=function e(t){const n=new vn(t),r=ue(vn.prototype.request,n);return et.extend(r,vn.prototype,n,{allOwnKeys:!0}),et.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ht(t,n))},r}(St);xn.Axios=vn,xn.CanceledError=It,xn.CancelToken=yn,xn.isCancel=Tt,xn.VERSION=dn,xn.toFormData=at,xn.AxiosError=nt,xn.Cancel=xn.CanceledError,xn.all=function(e){return Promise.all(e)},xn.spread=function(e){return function(t){return e.apply(null,t)}},xn.isAxiosError=function(e){return et.isObject(e)&&!0===e.isAxiosError},xn.mergeConfig=Ht,xn.AxiosHeaders=Rt,xn.formToJSON=e=>Ot(et.isHTMLForm(e)?new FormData(e):e),xn.getAdapter=cn,xn.HttpStatusCode=wn,xn.default=xn;const On=xn,_n=window.ReactDOM;var Sn,Pn,Nn,En,Cn,kn,Dn,Rn,An=function(e){var t=(0,o.createContext)(void 0);return[t,function(){var n=(0,o.useContext)(t);if(void 0===n)throw Error("".concat(e," can only be used within a corresponding context provider."));return n}]},Tn=function(e,t){return t.includes(e.charAt(e.length-1))?e.slice(0,-1):e},In=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:150;return e.length>t?"".concat(e.slice(0,t)).concat((0,i._x)("…","truncated text","code-snippets")):e},Ln=function(e){var t,n=(new DOMParser).parseFromString(e,"text/html");return n.body.querySelectorAll("script,style").forEach(function(e){return e.remove()}),n.body.querySelectorAll("p,div,li,br,h1,h2,h3,h4,h5,h6,tr,td,th,ul,ol,blockquote,table,pre,hr,dl,dt,dd,section,article,header,footer,figure,figcaption,address,aside,nav,main,fieldset,form,details,summary,dialog,hgroup,caption").forEach(function(e){return e.after(n.createTextNode(" "))}),(null!==(t=n.body.textContent)&&void 0!==t?t:"").replace(/\s+/g," ").trim()},Fn=function(e){return Tn(null!=e?e:"","/")},Mn={snippets:Fn(null===(Sn=window.CODE_SNIPPETS)||void 0===Sn?void 0:Sn.restAPI.snippets),recentlyActive:Fn(null===(Pn=window.CODE_SNIPPETS)||void 0===Pn?void 0:Pn.restAPI.recentlyActive),preferences:Fn(null===(Nn=window.CODE_SNIPPETS)||void 0===Nn?void 0:Nn.restAPI.preferences),importPlugins:Fn(null===(En=window.CODE_SNIPPETS)||void 0===En?void 0:En.restAPI.importPlugins),importFiles:Fn(null===(Cn=window.CODE_SNIPPETS)||void 0===Cn?void 0:Cn.restAPI.importFiles),cloud:{snippets:Fn(null===(kn=window.CODE_SNIPPETS)||void 0===kn?void 0:kn.restAPI.cloud.snippets)}},Un={headers:{"X-WP-Nonce":null===(Dn=window.CODE_SNIPPETS)||void 0===Dn?void 0:Dn.restAPI.nonce,"Access-Control":null===(Rn=window.CODE_SNIPPETS)||void 0===Rn?void 0:Rn.restAPI.cloud.token}},Bn=function(){var e=ae(le().mark(function e(t,n,r,s){var o,i,a;return le().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(o=window.CODE_SNIPPETS)||void 0===o||!o.debug){e.next=9;break}return(i=console).debug.apply(i,["".concat(t," ").concat(n)].concat(oe(s?[s]:[]))),e.next=4,r;case 4:return a=e.sent,console.debug("Response",a),e.abrupt("return",a);case 9:return e.next=11,r;case 11:return e.abrupt("return",e.sent);case 12:case"end":return e.stop()}},e)}));return function(t,n,r,s){return e.apply(this,arguments)}}(),Vn=s(An("useRestAPI"),2),qn=Vn[0],Wn=Vn[1],Hn=function(e){var t=e.children,n=(0,o.useMemo)(function(){return On.create(Un)},[]),r=(0,o.useMemo)(function(){return function(e){return{getResponse:function(t){return Bn("GET",t,e.get(t))},get:function(t){return Bn("GET",t,e.get(t)).then(function(e){return e.data})},post:function(t,n,r){return Bn("POST",t,e.post(t,n,r),n).then(function(e){return e.data})},del:function(t){return Bn("DELETE",t,e.delete(t)).then(function(e){return e.data})},put:function(t,n){return Bn("PUT",t,e.put(t,n),n).then(function(e){return e.data})}}}(n)},[n]),s={api:r,axiosInstance:n};return(0,g.jsx)(qn.Provider,{value:s,children:t})},Kn=function(e){console.error(e)},zn=function(){var e=Wn().api,t=(0,o.useState)(function(){var e,t;return null!==(e=null===(t=window.CODE_SNIPPETS)||void 0===t?void 0:t.snippetView)&&void 0!==e?e:"table"}),n=s(t,2),r=n[0],i=n[1];return{snippetView:r,setSnippetView:(0,o.useCallback)(function(t){i(t),e.post("".concat(Mn.preferences,"/snippet-view"),{view:t}).catch(Kn)},[e])}},Gn="snippets-screen-meta-slot",$n=function(e){var t=e.hidden,n=void 0!==t&&t;return(0,o.useEffect)(function(){var e=document.getElementById(Gn),t=document.getElementById("screen-meta"),n=document.getElementById("screen-meta-links");if(e&&t&&n){var r=t.parentElement;return e.append(t,n),function(){null==r||r.prepend(t,n)}}},[]),(0,g.jsx)("div",{id:Gn,className:"snippets-screen-meta-slot",hidden:n})};function Jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qn(e){for(var t=1;t1,s=!n||t.scrollLeft<=1,o=!n||t.scrollLeft+t.clientWidth>=t.scrollWidth-1;r(function(e){return e.atStart===s&&e.atEnd===o?e:{atStart:s,atEnd:o}})}},[]);return(0,o.useEffect)(function(){var t,n=e.current;if(n){i(),n.addEventListener("scroll",i,{passive:!0});var r=new ResizeObserver(i);return r.observe(n),r.observe(null!==(t=n.firstElementChild)&&void 0!==t?t:n),function(){n.removeEventListener("scroll",i),r.disconnect()}}},[i]),Qn(Qn({},n),{},{scrollRef:e})};function Yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}(t);try{for(s.s();!(e=s.n()).done;){var o,i=e.value;void 0===i.group?n.push(i):r.set(i.group,[].concat(oe(null!==(o=r.get(i.group))&&void 0!==o?o:[]),[i]))}}catch(e){s.e(e)}finally{s.f()}return[n,Array.from(r.entries())]},[t]),2),r=n[0],i=n[1];return(0,g.jsxs)(g.Fragment,{children:[r.map(function(e){return(0,g.jsx)("option",{value:e.key,children:e.label},e.key)}),i.map(function(e){var t=s(e,2),n=t[0],r=t[1];return(0,g.jsx)("optgroup",{label:n,children:r.map(function(e){return(0,g.jsx)("option",{value:e.label,children:e.label},e.label)})},n)})]})},ws=function(e){var t=e.which,n=e.actions,r=e.selectedAction,s=e.setSelectedAction,o=e.label;return(0,g.jsxs)("select",{name:"action".concat("bottom"===t?"-2":""),id:"bulk-action-selector-".concat(t),value:r,onChange:function(e){var t=e.target.value;t&&"-1"!==t?function(e,t){return t.some(function(t){return t.key===e})}(t,n)&&s(t):s(void 0)},children:[(0,g.jsx)("option",{value:"-1",children:o}),(0,g.jsx)(js,{actions:n})]})},xs=function(e){var t=e.which,n=e.actions,r=e.selected,a=e.doAction,c=e.onActionSuccess,l=e.disabled,u=e.selectLabel,d=s((0,o.useState)(),2),p=d[0],f=d[1],h=s((0,o.useState)(!1),2),m=h[0],b=h[1];return(0,g.jsxs)("div",{className:"alignleft actions bulkactions",children:[(0,g.jsx)("label",{htmlFor:"bulk-action-selector-".concat(t),className:"screen-reader-text",children:(0,i.__)("Select bulk action","code-snippets")}),(0,g.jsx)(ws,{which:t,actions:n,selectedAction:p,setSelectedAction:f,label:null!=u?u:(0,i.__)("Bulk actions","code-snippets")}),(0,g.jsx)(Xr,{id:"doaction".concat("bottom"===t?"-2":""),name:"bulk_action",text:(0,i.__)("Apply","code-snippets"),className:"action",disabled:!!l||m||!p,onClick:function(e){e.preventDefault(),p&&(b(!0),a(p,r).then(function(){null==c||c()}).catch(Kn).finally(function(){return b(!1)}))}}),m?(0,g.jsx)(H.Spinner,{}):null]})},Os=function(e){var t=e.keys,n=e.selected,r=e.setSelected;return(0,g.jsxs)("label",{className:"tablenav-select-all",children:[(0,g.jsx)("input",{type:"checkbox",checked:0active.","code-snippets"),{strong:(0,g.jsx)("strong",{})})}),(0,g.jsx)("p",{children:(0,i.__)("Moving it to the trash will also deactivate it.","code-snippets")})]})},uo=function(){return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("p",{style:{marginBlockStart:0},children:(0,a.createInterpolateElement)((0,i.__)("The snippet will be permanently deleted.","code-snippets"),{strong:(0,g.jsx)("strong",{})})}),(0,g.jsx)("p",{children:(0,i.__)("This action cannot be undone.","code-snippets")})]})},po=function(e){var t=e.snippet,n=e.isDialogOpen,r=e.setIsDialogOpen,s=e.makeDeleteRequest;return(0,g.jsx)(co,{open:n,title:(0,i.__)("Are you sure?","code-snippets"),confirmLabel:t.trashed?(0,i.__)("Delete","code-snippets"):(0,i.__)("Trash","code-snippets"),confirmButtonClassName:"is-destructive",onCancel:function(){return r(!1)},onConfirm:function(){r(!1),s()},children:t.trashed?(0,g.jsx)(uo,{}):(0,g.jsx)(lo,{})})},fo=function(e){var t=e.snippet,n=e.setIsWorking,r=e.onSuccess,i=e.onError,a=Js(),c=s((0,o.useState)(!1),2),l=c[0],u=c[1],d=function(){var e=ae(le().mark(function e(){return le().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return null==n||n(!0),e.prev=1,e.next=4,a.delete(t);case 4:return e.next=6,null==r?void 0:r();case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),null==i||i(e.t0);case 11:return e.prev=11,null==n||n(!1),e.finish(11);case 14:case"end":return e.stop()}},e,null,[[1,8,11,14]])}));return function(){return e.apply(this,arguments)}}(),p=function(){var e=ae(le().mark(function e(){return le().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.active&&!t.trashed){e.next=4;break}u(!0),e.next=6;break;case 4:return e.next=6,d();case 6:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();return{requestDelete:p,deleteDialogProps:{snippet:t,isDialogOpen:l,setIsDialogOpen:u,makeDeleteRequest:d}}};function ho(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mo(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}(e);try{for(r.s();!(t=r.n()).done;){var s=t.value;if(s.name===n)return s}}catch(e){r.e(e)}finally{r.f()}return e[0]}(Zo)}),2),t=e[0],n=e[1],r=zn(),a=r.snippetView,c=r.setSnippetView,l=Or().searchResults;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(Zn,{className:"community-cloud-nav",ariaLabel:(0,i.__)("Community Cloud types","code-snippets"),tabs:Zo,getTabCount:function(e){return"snippets"===e.name?null==l?void 0:l.totalItems:void 0},currentTab:t,setCurrentTab:function(e){d(h({},"tab",e.name)),n(e)}}),(0,g.jsx)($n,{hidden:"bundles"===t.name}),(!t.pro||N())&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:"snippets-page-header",children:(0,g.jsx)("h1",{children:(0,i.sprintf)((0,i.__)("Community Cloud: %s","code-snippets"),t.label)})}),(0,g.jsx)("hr",{className:"wp-header-end"}),(0,g.jsx)("p",{className:"snippets-page-description",children:(0,i.__)("Search the community cloud and download user-shared snippets directly to your site.","code-snippets")})]}),function(){switch(t.name){case"snippets":return(0,g.jsx)(Yo,{snippetView:a,setSnippetView:c});case"bundles":return(0,g.jsx)(G,{})}}()]})},ti=function(){return(0,g.jsx)(Hn,{children:(0,g.jsx)(lr,{children:(0,g.jsx)(_r,{children:(0,g.jsx)(ei,{})})})})};function ni(e,t){return ni=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ni(e,t)}function ri(){ri=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,s){var o=RegExp(e,r);return t.set(o,s||t.get(e)),ni(o,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce(function(t,n){var s=r[n];if("number"==typeof s)t[n]=e[s];else{for(var o=0;void 0===e[s[o]]&&o+1]+)(>|$)/g,function(e,t,n){if(""===n)return e;var r=o[t];return Array.isArray(r)?"$"+r.join("$"):"number"==typeof r?"$"+r:""}))}if("function"==typeof s){var i=this;return e[Symbol.replace].call(this,n,function(){var e=arguments;return"object"!=c(e[e.length-1])&&(e=[].slice.call(e)).push(r(e,i)),s.apply(this,e)})}return e[Symbol.replace].call(this,n,s)},ri.apply(this,arguments)}var si=["all","active","inactive","recently_active","locked","unlocked","trashed"],oi="all",ii=s(An("useSnippetsFilters"),2),ai=ii[0],ci=ii[1],li=function(e){var t=e.children,n=s((0,o.useState)(function(){return u("tag")}),2),r=n[0],i=n[1],a=s((0,o.useState)(function(){return u("s")}),2),c=a[0],l=a[1],p=s((0,o.useState)(function(){var e=u("type");return function(e){return Sr.includes(e)}(e)?e:void 0}),2),f=p[0],h=p[1],m=s((0,o.useState)(function(){var e=u("status");return function(e){return si.includes(e)}(e)?e:oi}),2),b=m[0],v=m[1],y=s((0,o.useMemo)(function(){return r=null!=(n=null==(e=c)?void 0:e.trim().match(ri(/@line:(\d+)/,{line:1})))&&null!==(t=n.groups)&&void 0!==t&&t.line?parseInt(n.groups.line,10):void 0,n&&r?[null==e?void 0:e.replace(n[0],"").trim(),r]:[e,void 0];var e,t,n,r},[c]),2),j=y[0],w=y[1],x={currentTag:r,currentType:f,searchQuery:c,currentStatus:b,searchQueryText:j,searchLineNumber:w,setCurrentType:(0,o.useCallback)(function(e){h(e),d({type:e})},[]),setCurrentStatus:(0,o.useCallback)(function(e){v(e),d({status:oi===e?"":e})},[]),setCurrentTag:(0,o.useCallback)(function(e){i(e),d({tag:e})},[]),setSearchQuery:(0,o.useCallback)(function(e){l(e),d({s:e})},[])};return(0,g.jsx)(ai.Provider,{value:x,children:t})},ui=function(e,t,n){var r;null!==(r=e.get(t))&&void 0!==r&&r.push(n)||e.set(t,[n])},di=s(An("useFilteredSnippets"),2),pi=di[0],fi=di[1],hi=function(e){var t=e.children,n=Zs().snippetsList,r=ci(),s=r.currentType,i=r.currentTag,a=r.searchLineNumber,c=r.searchQueryText,l=(0,o.useMemo)(function(){var e,t;return null!==(e=null!=n?n:null===(t=window.CODE_SNIPPETS_MANAGE)||void 0===t||null===(t=t.snippetsList)||void 0===t?void 0:t.map(Dr))&&void 0!==e?e:[]},[n]),u=(0,o.useMemo)(function(){var e=["name","desc","code","tags"],t=null==c?void 0:c.toLowerCase().trim();return l.filter(function(n){return(!s||Mr(n)===s)&&!(i&&!n.tags.includes(i))&&(!t||(void 0!==a?null===(r=n.code.split("\n")[a])||void 0===r?void 0:r.includes(t):e.some(function(e){return("tags"===e?n.tags.join(" "):n[e]).toLowerCase().includes(t)})));var r})},[l,i,s,c,a]),d=(0,o.useMemo)(function(){return function(e){return e.reduce(function(e,t){return t.active&&ui(e,t.conditionId,t),e},new Map)}(l)},[l]),p=(0,o.useMemo)(function(){return function(e,t){return e.reduce(function(e,n){return n.trashed?ui(e,"trashed",n):(ui(e,"all",n),ui(e,Kr(n,t)?"active":"inactive",n),ui(e,n.locked?"locked":"unlocked",n),n.lastActive&&ui(e,"recently_active",n)),e},new Map)}(u,d)},[u,d]),f={snippetsByStatus:p,activeByCondition:d};return(0,g.jsx)(pi.Provider,{value:f,children:t})};function mi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bi(e){for(var t=1;ta?"asc"===n?1:-1:0})}(t,d,y),{currentPage:h,totalPages:r})},[t,d,y,h,r]);return(0,g.jsx)(ki,Pi({getKey:n,totalItems:t.length,totalPages:r,visibleItems:w,pageSearchParam:a,sortColumn:d,sortDirection:y,currentPage:h,setSortColumn:p,setSortDirection:j,setCurrentPage:b},c))},ki=function(e){var t=e.getKey,n=e.actions,r=e.columns,i=e.noItems,a=e.doAction,c=e.disabled,l=void 0!==c&&c,u=e.totalItems,d=e.totalPages,p=e.currentPage,f=e.beforeTable,h=e.endTableNav,b=e.rowClassName,v=e.visibleItems,y=e.sortDirection,j=void 0===y?"asc":y,w=e.extraTableNav,x=e.selectAllControl,O=e.setCurrentPage,_=e.pageSearchParam,S=m(e,_i),P=s((0,o.useState)(function(){return new Set}),2),N=P[0],E=P[1];return(0,g.jsxs)(Ss,{totalItems:u,selected:Ni(v,t,N),selectAllKeys:x?v.map(t):void 0,actions:n,doAction:a,extraTableNav:w,endTableNav:h,disabled:l,currentPage:p,totalPages:d,pageSearchParam:_,setSelected:E,setCurrentPage:O,children:[f,(0,g.jsx)(Ei,Pi(Pi({items:v},S),{},{getKey:t,columns:r,selected:N,setSelected:E,sortDirection:j,children:(0,g.jsx)(wi,{items:v,getKey:t,columns:r,noItems:i,rowClassName:b,selected:N,setSelected:E})}))]})};function Di(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ri(e){for(var t=1;twindow.innerHeight&&(null!==(s=null==i?void 0:i.top)&&void 0!==s?s:0)>o.height);var a=r.current.querySelector("button:not(:disabled)");(null!=a?a:r.current).focus()}else c(!1)},[t,n,r]),a}(h);return function(e){var t=e.isOpen,n=e.setIsOpen,r=e.closeMenu,s=e.containerRef,i=e.popoverRef;(0,o.useEffect)(function(){if(t){var e=function(e){var t;e.target instanceof Node&&(null===(t=s.current)||void 0===t||!t.contains(e.target))&&n(!1)},o=function(e){var t;e.target instanceof Node&&(null===(t=s.current)||void 0===t||!t.contains(e.target))&&n(!1)},a=function(e){return function(e,t){var n=t.closeMenu,r=t.popoverRef;if("Escape"===e.key)return e.preventDefault(),void n();if(r.current){var s=document.activeElement;if(!(s instanceof HTMLElement&&(s.isContentEditable||s.matches("input, select, textarea")))){var o=Array.from(r.current.querySelectorAll(Ti)),i=s instanceof HTMLElement?o.indexOf(s):-1;0=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}function Da(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nCODE_SNIPPETS_SAFE_MODE constant from wp-config.php file to turn off safe mode.","code-snippets"),{code:(0,g.jsx)("code",{})}),"\n",(0,g.jsx)("a",{href:"https://codesnippets.pro/doc/safe-mode",target:"_blank",rel:"noreferrer",children:(0,i.__)("Read more","code-snippets")})]})}):null},Ka=function(){var e=zn(),t=e.snippetView,n=e.setSnippetView,r=ci().currentType,s=function(){var e,t=Zs().snippetsList,n=(0,o.useMemo)(function(){return null==t?void 0:t.filter(function(e){return!e.trashed})},[t]),r=(0,o.useMemo)(function(){return null==n?void 0:n.reduce(function(e,t){var n,r=Mr(t);return e.set(r,(null!==(n=e.get(r))&&void 0!==n?n:0)+1)},new Map)},[n]),s=null===(e=window.CODE_SNIPPETS_MANAGE)||void 0===e?void 0:e.typeCounts;return{getCount:(0,o.useCallback)(function(e){var t;return n?e?null!==(t=null==r?void 0:r.get(e))&&void 0!==t?t:0:n.length:null==s?void 0:s[null!=e?e:"all"]},[n,r,s])}}(),a=s.getCount,c=Xn(),l=c.atStart,u=c.atEnd,d=c.scrollRef;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:v()("snippet-type-nav-wrapper",{"has-scroll-start":!l,"has-scroll-end":!u}),children:(0,g.jsx)("nav",{ref:d,className:"snippet-type-nav","aria-label":(0,i.__)("Snippet types","code-snippets"),children:(0,g.jsxs)("ul",{children:[(0,g.jsx)(Wa,{count:a()}),Sr.map(function(e){return(0,g.jsx)(Wa,{type:e,count:a(e)},e)})]})})}),(0,g.jsx)($n,{}),(0,g.jsxs)("div",{className:"snippets-page-header",children:[(0,g.jsx)("h1",{children:(0,i.sprintf)((0,i.__)("Local Snippets: %s","code-snippets"),r?Ir[r]:(0,i.__)("All Snippets","code-snippets"))}),(0,g.jsx)("a",{href:Br(r),className:"button button-primary",children:(0,i.__)("Add Snippet","code-snippets")})]}),(0,g.jsx)("hr",{className:"wp-header-end"}),(0,g.jsx)(Ha,{}),r&&!N()&&Hr(r)?(0,g.jsx)(G,{}):(0,g.jsx)(hi,{children:(0,g.jsx)(qa,{snippetView:t,setSnippetView:n})})]})},za=function(){return(0,g.jsx)(Hn,{children:(0,g.jsx)(Qs,{children:(0,g.jsx)(eo,{children:(0,g.jsx)(li,{children:(0,g.jsx)(Ka,{})})})})})},Ga=function(){var e=s((0,o.useState)(function(){var e=u("result");return d({result:void 0}),e&&function(e){if("deleted"===e)return(0,i.__)("Snippet deleted.","code-snippets")}(e)}),2),t=e[0],n=e[1];return t?(0,g.jsx)(S,{className:"code-snippets-notice",onDismiss:function(){n(void 0)},type:"success",children:(0,g.jsx)("p",{children:(0,a.createInterpolateElement)(t,{strong:(0,g.jsx)("strong",{})})})}):null},$a=function(e){switch(e.subpage){case"snippets":return(0,g.jsx)(za,{});case"cloud-community":return(0,g.jsx)(ti,{});case"blueprints":case"cloud-library":return(0,g.jsx)(G,{})}};Ra="manage-snippets-container",Aa=function(){var e=(0,o.useMemo)(function(){var e,t,n;return null!==(t=Q,e=(n=u("subpage"))&&function(e){return t.includes(e)}(n)?n:void 0)&&void 0!==e?e:Q[0]},[]);return(0,o.useEffect)(function(){var t,n,r,s;"snippets"===e&&(r=null==(n=document.getElementById("adv-settings"))?void 0:n.querySelector("fieldset.table-options-prefs"),s=Array.from(null!==(t=null==n?void 0:n.querySelectorAll("fieldset.metabox-prefs"))&&void 0!==t?t:[]).find(function(e){return!e.classList.contains("table-options-prefs")}),n&&r&&s&&n.insertBefore(r,s))},[e]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(se,{}),(0,g.jsx)(Ga,{}),(0,g.jsx)($a,{subpage:e})]})},(Ta=document.getElementById(Ra))?(0,_n.createRoot)(Ta).render((0,g.jsx)(Aa,{})):console.error("Could not find element #".concat(Ra,"."))})()})();