diff --git a/scripts/vendor-dependencies.mjs b/scripts/vendor-dependencies.mjs index 7c23af6..453554c 100644 --- a/scripts/vendor-dependencies.mjs +++ b/scripts/vendor-dependencies.mjs @@ -37,11 +37,6 @@ const dependencies = { version: "0.58.5", exports: ["presetUno"], }), - ...esmBundle({ - name: "@unocss/preset-icons", - version: "0.58.5", - exports: ["presetIcons"], - }), "@unocss-preflight-tailwind.css": "https://esm.sh/@unocss/reset@0.58.5/tailwind.css", "coloris.min.js": diff --git a/src/api/state.js b/src/api/state.js index 1d59487..74737ae 100644 --- a/src/api/state.js +++ b/src/api/state.js @@ -37,29 +37,29 @@ const sleep = async (ms) => { // supports inter-mod communication if so // required. caution should be used in // naming keys to avoid conflicts -const _state = {}, - _subscribers = [], +const _subscribers = [], + dumpState = () => (document.__enhancerState ??= {}), + getKeysFromState = (keys) => keys.map((key) => dumpState()[key]), setState = (state) => { - Object.assign(_state, state); + Object.assign(dumpState(), state); const updates = Object.keys(state); _subscribers .filter(([keys]) => updates.some((key) => keys.includes(key))) - .forEach(([keys, callback]) => callback(keys.map((key) => _state[key]))); + .forEach(([keys, callback]) => callback(getKeysFromState(keys))); }, // useState(["keyA", "keyB"]) => returns [valueA, valueB] // useState(["keyA", "keyB"], callback) => registers callback // to be triggered after each update to either keyA or keyB, // with [valueA, valueB] passed to the callback's first arg useState = (keys, callback) => { - const state = keys.map((key) => _state[key]); + const state = getKeysFromState(keys); if (callback) { callback = debounce(callback); _subscribers.push([keys, callback]); callback(state); } return state; - }, - dumpState = () => _state; + }; Object.assign((globalThis.__enhancerApi ??= {}), { sleep, diff --git a/src/api/system.js b/src/api/system.js index 62e1bc8..cd85c96 100644 --- a/src/api/system.js +++ b/src/api/system.js @@ -7,11 +7,7 @@ "use strict"; const IS_ELECTRON = typeof module !== "undefined", - IS_RENDERER = IS_ELECTRON && process.type === "renderer", - API_LOADED = new Promise((res, rej) => { - (globalThis.__enhancerApi ??= {}).__isReady = res; - }), - whenReady = (callback) => API_LOADED.then(callback); + IS_RENDERER = IS_ELECTRON && process.type === "renderer"; // expected values: 'linux', 'win32', 'darwin' (== macos), 'firefox' // and 'chromium' (inc. chromium-based browsers like edge and brave) @@ -160,5 +156,4 @@ Object.assign((globalThis.__enhancerApi ??= {}), { readJson, initDatabase, reloadApp, - whenReady, }); diff --git a/src/extensions/titlebar/tabs.cjs b/src/extensions/titlebar/tabs.cjs index 98ccc32..98eab78 100644 --- a/src/extensions/titlebar/tabs.cjs +++ b/src/extensions/titlebar/tabs.cjs @@ -6,9 +6,8 @@ "use strict"; -module.exports = async ({ whenReady }, db) => { - const api = await whenReady(), - { html, addMutationListener } = api, +module.exports = async (api, db) => { + const { html, addMutationListener } = api, { enhancerUrl, onMessage, sendMessage } = api, titlebarStyle = await db.get("titlebarStyle"); diff --git a/src/init.js b/src/init.js index 31da384..34baf0a 100644 --- a/src/init.js +++ b/src/init.js @@ -16,16 +16,21 @@ const isElectron = () => { if (isElectron()) { require("./api/system.js"); require("./api/registry.js"); + const { enhancerUrl } = globalThis.__enhancerApi, - { getMods, isEnabled, modDatabase } = globalThis.__enhancerApi; + { getMods, isEnabled, modDatabase } = globalThis.__enhancerApi, + API_LOADED = new Promise((res, rej) => { + const onReady = globalThis.__enhancerReady; + globalThis.__enhancerReady = () => (onReady?.(), res()); + }); module.exports = async (target, __exports, __eval) => { + const __getApi = () => globalThis.__enhancerApi; if (target === ".webpack/main/index") require("./worker.js"); else { // expose globalThis.__enhancerApi to scripts - const { contextBridge } = require("electron"), - __getEnhancerApi = () => globalThis.__enhancerApi; - contextBridge.exposeInMainWorld("__getEnhancerApi", __getEnhancerApi); + const { contextBridge } = require("electron"); + contextBridge.exposeInMainWorld("__getEnhancerApi", __getApi); // load clientStyles, clientScripts document.addEventListener("readystatechange", () => { @@ -44,7 +49,7 @@ if (isElectron()) { for (let [scriptTarget, script] of mod.electronScripts ?? []) { if (target !== scriptTarget) continue; script = require(`./${mod._src}/${script}`); - script(globalThis.__enhancerApi, db, __exports, __eval); + API_LOADED.then(() => script(__getApi(), db, __exports, __eval)); } } }; diff --git a/src/load.mjs b/src/load.mjs index 0ddc583..54abe05 100644 --- a/src/load.mjs +++ b/src/load.mjs @@ -17,8 +17,12 @@ export default (async () => { pageLoaded = /(^\/$)|((-|\/)[0-9a-f]{32}((\?.+)|$))/.test(location.pathname), IS_MENU = location.href.startsWith(enhancerUrl("core/menu/index.html")), IS_TABS = /\/app\/\.webpack\/renderer\/(draggable_)?tabs\/index.html$/.test(location.href), - IS_ELECTRON = ['linux', 'win32', 'darwin'].includes(platform); - if (IS_TABS) globalThis.IS_TABS = true; + IS_ELECTRON = ['linux', 'win32', 'darwin'].includes(platform), + API_LOADED = new Promise((res, rej) => { + const onReady = globalThis.__enhancerReady; + globalThis.__enhancerReady = () => (onReady?.(), res()); + }); + globalThis.IS_TABS = IS_TABS; if (!IS_MENU && !IS_TABS) { if (!signedIn || !pageLoaded) return; @@ -42,16 +46,16 @@ export default (async () => { await Promise.all([ IS_ELECTRON || import(enhancerUrl("common/registry.js")), - (IS_ELECTRON && IS_MENU) || import(enhancerUrl("api/state.js")), import(enhancerUrl("api/interface.mjs")), + import(enhancerUrl("api/state.js")), ]); - globalThis.__enhancerApi.__isReady(globalThis.__enhancerApi); const { getMods, isEnabled, modDatabase } = globalThis.__enhancerApi; for (const mod of await getMods()) { if (!(await isEnabled(mod.id))) continue; - const isTheme = mod._src.startsWith("themes/"); - if (IS_MENU && !(mod._src === "core" || isTheme)) continue; + const isCore = mod._src === "core", + isTheme = mod._src.startsWith("themes/"); + if (IS_MENU && !(isCore || isTheme)) continue; // clientStyles for (let stylesheet of mod.clientStyles ?? []) { @@ -65,10 +69,18 @@ export default (async () => { if (IS_MENU || IS_TABS) continue; const db = await modDatabase(mod.id); for (let script of mod.clientScripts ?? []) { - script = await import(enhancerUrl(`${mod._src}/${script}`)); - script.default(globalThis.__enhancerApi, db); + // execute mod scripts after core has + // loaded and api is ready to use + Promise.resolve(isCore || API_LOADED) + .then(() => import(enhancerUrl(`${mod._src}/${script}`))) + .then((script) => script.default(globalThis.__enhancerApi, db)) + .then(() => !isCore || globalThis.__enhancerReady?.()); } } - if (IS_MENU) console.log("notion-enhancer: ready"); + if (IS_MENU || IS_TABS) globalThis.__enhancerReady?.(); + return API_LOADED.then(() => { + if (IS_MENU) console.log("notion-enhancer: ready"); + return globalThis.__enhancerApi; + }); })(); diff --git a/src/vendor/@unocss-preset-icons.mjs b/src/vendor/@unocss-preset-icons.mjs deleted file mode 100644 index d3f4612..0000000 --- a/src/vendor/@unocss-preset-icons.mjs +++ /dev/null @@ -1,26 +0,0 @@ -/* esm.sh - esbuild bundle(@unocss/preset-icons@0.58.5) es2022 production */ -(()=>{var a=typeof Reflect=="object"?Reflect:null,g=a&&typeof a.apply=="function"?a.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)},p;a&&typeof a.ownKeys=="function"?p=a.ownKeys:Object.getOwnPropertySymbols?p=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:p=function(e){return Object.getOwnPropertyNames(e)};function D(n){console&&console.warn&&console.warn(n)}var w=Number.isNaN||function(e){return e!==e};function s(){L.call(this)}s.EventEmitter=s;s.prototype._events=void 0;s.prototype._eventsCount=0;s.prototype._maxListeners=void 0;var y=10;function d(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return y},set:function(n){if(typeof n!="number"||n<0||w(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");y=n}});function L(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}s.init=L;s.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||w(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function b(n){return n._maxListeners===void 0?s.defaultMaxListeners:n._maxListeners}s.prototype.getMaxListeners=function(){return b(this)};s.prototype.emit=function(e){for(var t=[],r=1;r0&&(o=t[0]),o instanceof Error)throw o;var c=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw c.context=o,c}var l=u[e];if(l===void 0)return!1;if(typeof l=="function")g(l,this,t);else for(var m=l.length,M=x(l,m),r=0;r0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=n,c.type=e,c.count=o.length,D(c)}return n}s.prototype.addListener=function(e,t){return _(this,e,t,!1)};s.prototype.on=s.prototype.addListener;s.prototype.prependListener=function(e,t){return _(this,e,t,!0)};function R(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function E(n,e,t){var r={fired:!1,wrapFn:void 0,target:n,type:e,listener:t},i=R.bind(r);return i.listener=t,r.wrapFn=i,i}s.prototype.once=function(e,t){return d(t),this.on(e,E(this,e,t)),this};s.prototype.prependOnceListener=function(e,t){return d(t),this.prependListener(e,E(this,e,t)),this};s.prototype.removeListener=function(e,t){var r,i,u,o,c;if(d(t),i=this._events,i===void 0)return this;if(r=i[e],r===void 0)return this;if(r===t||r.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if(typeof r!="function"){for(u=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){c=r[o].listener,u=o;break}if(u<0)return this;u===0?r.shift():N(r,u),r.length===1&&(i[e]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",e,c||t)}return this};s.prototype.off=s.prototype.removeListener;s.prototype.removeAllListeners=function(e){var t,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[e]),this;if(arguments.length===0){var u=Object.keys(r),o;for(i=0;i=0;i--)this.removeListener(e,t[i]);return this};function O(n,e,t){var r=n._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?P(i):x(i,i.length)}s.prototype.listeners=function(e){return O(this,e,!0)};s.prototype.rawListeners=function(e){return O(this,e,!1)};function C(n,e){return typeof n.listenerCount=="function"?n.listenerCount(e):s.prototype.listenerCount.call(n,e)}s.listenerCount=C;s.prototype.listenerCount=function(n){var e=this._events;if(e!==void 0){var t=e[n];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0};s.prototype.eventNames=function(){return this._eventsCount>0?p(this._events):[]};function x(n,e){for(var t=new Array(e),r=0;r{throw new Error("process.emitWarning is not supported")};binding=()=>{throw new Error("process.binding is not supported")};cwd=()=>{throw new Error("process.cwd is not supported")};chdir=e=>{throw new Error("process.chdir is not supported")};umask=()=>18;nextTick=(e,...t)=>queueMicrotask(()=>e(...t));hrtime=v;constructor(){super()}},f=new h;if(typeof Deno<"u"){f.name="deno",f.browser=!1,f.pid=Deno.pid,f.cwd=()=>Deno.cwd(),f.chdir=e=>Deno.chdir(e),f.arch=Deno.build.arch,f.platform=Deno.build.os,f.version="v18.12.1",f.versions={node:"18.12.1",uv:"1.43.0",zlib:"1.2.11",brotli:"1.0.9",ares:"1.18.1",modules:"108",nghttp2:"1.47.0",napi:"8",llhttp:"6.0.10",openssl:"3.0.7+quic",cldr:"41.0",icu:"71.1",tz:"2022b",unicode:"14.0",ngtcp2:"0.8.1",nghttp3:"0.7.0",...Deno.version},f.env=new Proxy({},{get(e,t){return Deno.env.get(String(t))},ownKeys:()=>Reflect.ownKeys(Deno.env.toObject()),getOwnPropertyDescriptor:(e,t)=>{let r=Deno.env.toObject();if(t in Deno.env.toObject()){let i={enumerable:!0,configurable:!0};return typeof t=="string"&&(i.value=r[t]),i}},set(e,t,r){return Deno.env.set(String(t),String(r)),r}});let n=["","",...Deno.args];Object.defineProperty(n,"0",{get:Deno.execPath}),Object.defineProperty(n,"1",{get:()=>Deno.mainModule.startsWith("file:")?new URL(Deno.mainModule).pathname:join(Deno.cwd(),"$deno$node.js")}),f.argv=n}else{let n="/";f.cwd=()=>n,f.chdir=e=>n=e}var j=f;globalThis.__Process$=j;})(); -(()=>{var Lt=Object.create,q=Object.defineProperty,_t=Object.getOwnPropertyDescriptor,xt=Object.getOwnPropertyNames,Ct=Object.getPrototypeOf,Mt=Object.prototype.hasOwnProperty,W=(p,a)=>()=>(a||p((a={exports:{}}).exports,a),a.exports),Pt=(p,a)=>{for(var s in a)q(p,s,{get:a[s],enumerable:!0})},V=(p,a,s,S)=>{if(a&&typeof a=="object"||typeof a=="function")for(let b of xt(a))!Mt.call(p,b)&&b!==s&&q(p,b,{get:()=>a[b],enumerable:!(S=_t(a,b))||S.enumerable});return p},$t=(p,a,s)=>(V(p,a,"default"),s&&V(s,a,"default")),st=(p,a,s)=>(s=p!=null?Lt(Ct(p)):{},V(a||!p||!p.__esModule?q(s,"default",{value:p,enumerable:!0}):s,p)),Nt=W(p=>{"use strict";p.byteLength=T,p.toByteArray=$,p.fromByteArray=P;var a=[],s=[],S=typeof Uint8Array<"u"?Uint8Array:Array,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(B=0,c=b.length;B0)throw new Error("Invalid string. Length must be a multiple of 4");var w=h.indexOf("=");w===-1&&(w=l);var A=w===l?0:4-w%4;return[w,A]}function T(h){var l=f(h),w=l[0],A=l[1];return(w+A)*3/4-A}function L(h,l,w){return(l+w)*3/4-w}function $(h){var l,w=f(h),A=w[0],_=w[1],E=new S(L(h,A,_)),x=0,M=_>0?A-4:A,O;for(O=0;O>16&255,E[x++]=l>>8&255,E[x++]=l&255;return _===2&&(l=s[h.charCodeAt(O)]<<2|s[h.charCodeAt(O+1)]>>4,E[x++]=l&255),_===1&&(l=s[h.charCodeAt(O)]<<10|s[h.charCodeAt(O+1)]<<4|s[h.charCodeAt(O+2)]>>2,E[x++]=l>>8&255,E[x++]=l&255),E}function m(h){return a[h>>18&63]+a[h>>12&63]+a[h>>6&63]+a[h&63]}function U(h,l,w){for(var A,_=[],E=l;EM?M:x+E));return A===1?(l=h[w-1],_.push(a[l>>2]+a[l<<4&63]+"==")):A===2&&(l=(h[w-2]<<8)+h[w-1],_.push(a[l>>10]+a[l>>4&63]+a[l<<2&63]+"=")),_.join("")}}),jt=W(p=>{p.read=function(a,s,S,b,B){var c,f,T=B*8-b-1,L=(1<>1,m=-7,U=S?B-1:0,P=S?-1:1,h=a[s+U];for(U+=P,c=h&(1<<-m)-1,h>>=-m,m+=T;m>0;c=c*256+a[s+U],U+=P,m-=8);for(f=c&(1<<-m)-1,c>>=-m,m+=b;m>0;f=f*256+a[s+U],U+=P,m-=8);if(c===0)c=1-$;else{if(c===L)return f?NaN:(h?-1:1)*(1/0);f=f+Math.pow(2,b),c=c-$}return(h?-1:1)*f*Math.pow(2,c-b)},p.write=function(a,s,S,b,B,c){var f,T,L,$=c*8-B-1,m=(1<<$)-1,U=m>>1,P=B===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=b?0:c-1,l=b?1:-1,w=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(T=isNaN(s)?1:0,f=m):(f=Math.floor(Math.log(s)/Math.LN2),s*(L=Math.pow(2,-f))<1&&(f--,L*=2),f+U>=1?s+=P/L:s+=P*Math.pow(2,1-U),s*L>=2&&(f++,L/=2),f+U>=m?(T=0,f=m):f+U>=1?(T=(s*L-1)*Math.pow(2,B),f=f+U):(T=s*Math.pow(2,U-1)*Math.pow(2,B),f=0));B>=8;a[S+h]=T&255,h+=l,T/=256,B-=8);for(f=f<0;a[S+h]=f&255,h+=l,f/=256,$-=8);a[S+h-l]|=w*128}}),ht=W(p=>{"use strict";var a=Nt(),s=jt(),S=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;p.Buffer=f,p.SlowBuffer=_,p.INSPECT_MAX_BYTES=50;var b=2147483647;p.kMaxLength=b,f.TYPED_ARRAY_SUPPORT=B(),!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function B(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function c(t){if(t>b)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,f.prototype),e}function f(t,e,n){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return m(t)}return T(t,e,n)}f.poolSize=8192;function T(t,e,n){if(typeof t=="string")return U(t,e);if(ArrayBuffer.isView(t))return h(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(N(t,ArrayBuffer)||t&&N(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(N(t,SharedArrayBuffer)||t&&N(t.buffer,SharedArrayBuffer)))return l(t,e,n);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let r=t.valueOf&&t.valueOf();if(r!=null&&r!==t)return f.from(r,e,n);let o=w(t);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return f.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}f.from=function(t,e,n){return T(t,e,n)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array);function L(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function $(t,e,n){return L(t),t<=0?c(t):e!==void 0?typeof n=="string"?c(t).fill(e,n):c(t).fill(e):c(t)}f.alloc=function(t,e,n){return $(t,e,n)};function m(t){return L(t),c(t<0?0:A(t)|0)}f.allocUnsafe=function(t){return m(t)},f.allocUnsafeSlow=function(t){return m(t)};function U(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!f.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let n=E(t,e)|0,r=c(n),o=r.write(t,e);return o!==n&&(r=r.slice(0,o)),r}function P(t){let e=t.length<0?0:A(t.length)|0,n=c(e);for(let r=0;r=b)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+b.toString(16)+" bytes");return t|0}function _(t){return+t!=t&&(t=0),f.alloc(+t)}f.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==f.prototype},f.compare=function(t,e){if(N(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),N(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(t)||!f.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,r=e.length;for(let o=0,i=Math.min(n,r);or.length?(f.isBuffer(i)||(i=f.from(i)),i.copy(r,o)):Uint8Array.prototype.set.call(r,i,o);else if(f.isBuffer(i))i.copy(r,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=i.length}return r};function E(t,e){if(f.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||N(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let n=t.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return it(t).length;default:if(o)return r?-1:G(t).length;e=(""+e).toLowerCase(),o=!0}}f.byteLength=E;function x(t,e,n){let r=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,e>>>=0,n<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return Et(this,e,n);case"utf8":case"utf-8":return H(this,e,n);case"ascii":return Bt(this,e,n);case"latin1":case"binary":return mt(this,e,n);case"base64":return dt(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vt(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}f.prototype._isBuffer=!0;function M(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}f.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;ee&&(t+=" ... "),""},S&&(f.prototype[S]=f.prototype.inspect),f.prototype.compare=function(t,e,n,r,o){if(N(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),r===void 0&&(r=0),o===void 0&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,o>>>=0,this===t)return 0;let i=o-r,u=n-e,g=Math.min(i,u),R=this.slice(r,o),d=t.slice(e,n);for(let y=0;y2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,X(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0)if(o)n=0;else return-1;if(typeof e=="string"&&(e=f.from(e,r)),f.isBuffer(e))return e.length===0?-1:Z(t,e,n,r,o);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):Z(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function Z(t,e,n,r,o){let i=1,u=t.length,g=e.length;if(r!==void 0&&(r=String(r).toLowerCase(),r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(t.length<2||e.length<2)return-1;i=2,u/=2,g/=2,n/=2}function R(y,v){return i===1?y[v]:y.readUInt16BE(v*i)}let d;if(o){let y=-1;for(d=n;du&&(n=u-g),d=n;d>=0;d--){let y=!0;for(let v=0;vo&&(r=o)):r=o;let i=e.length;r>i/2&&(r=i/2);let u;for(u=0;u>>0,isFinite(n)?(n=n>>>0,r===void 0&&(r="utf8")):(r=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return pt(this,t,e,n);case"utf8":case"utf-8":return ct(this,t,e,n);case"ascii":case"latin1":case"binary":return gt(this,t,e,n);case"base64":return yt(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wt(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function dt(t,e,n){return e===0&&n===t.length?a.fromByteArray(t):a.fromByteArray(t.slice(e,n))}function H(t,e,n){n=Math.min(t.length,n);let r=[],o=e;for(;o239?4:i>223?3:i>191?2:1;if(o+g<=n){let R,d,y,v;switch(g){case 1:i<128&&(u=i);break;case 2:R=t[o+1],(R&192)===128&&(v=(i&31)<<6|R&63,v>127&&(u=v));break;case 3:R=t[o+1],d=t[o+2],(R&192)===128&&(d&192)===128&&(v=(i&15)<<12|(R&63)<<6|d&63,v>2047&&(v<55296||v>57343)&&(u=v));break;case 4:R=t[o+1],d=t[o+2],y=t[o+3],(R&192)===128&&(d&192)===128&&(y&192)===128&&(v=(i&15)<<18|(R&63)<<12|(d&63)<<6|y&63,v>65535&&v<1114112&&(u=v))}}u===null?(u=65533,g=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|u&1023),r.push(u),o+=g}return bt(r)}var K=4096;function bt(t){let e=t.length;if(e<=K)return String.fromCharCode.apply(String,t);let n="",r=0;for(;rr)&&(n=r);let o="";for(let i=e;in&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),en)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(t,e,n){t=t>>>0,e=e>>>0,n||I(t,e,this.length);let r=this[t],o=1,i=0;for(;++i>>0,e=e>>>0,n||I(t,e,this.length);let r=this[t+--e],o=1;for(;e>0&&(o*=256);)r+=this[t+--e]*o;return r},f.prototype.readUint8=f.prototype.readUInt8=function(t,e){return t=t>>>0,e||I(t,1,this.length),this[t]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(t,e){return t=t>>>0,e||I(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(t,e){return t=t>>>0,e||I(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(t,e){return t=t>>>0,e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(t,e){return t=t>>>0,e||I(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readBigUInt64LE=j(function(t){t=t>>>0,F(t,"offset");let e=this[t],n=this[t+7];(e===void 0||n===void 0)&&D(t,this.length-8);let r=e+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,o=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(r)+(BigInt(o)<>>0,F(t,"offset");let e=this[t],n=this[t+7];(e===void 0||n===void 0)&&D(t,this.length-8);let r=e*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],o=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(r)<>>0,e=e>>>0,n||I(t,e,this.length);let r=this[t],o=1,i=0;for(;++i=o&&(r-=Math.pow(2,8*e)),r},f.prototype.readIntBE=function(t,e,n){t=t>>>0,e=e>>>0,n||I(t,e,this.length);let r=e,o=1,i=this[t+--r];for(;r>0&&(o*=256);)i+=this[t+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},f.prototype.readInt8=function(t,e){return t=t>>>0,e||I(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},f.prototype.readInt16LE=function(t,e){t=t>>>0,e||I(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n},f.prototype.readInt16BE=function(t,e){t=t>>>0,e||I(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n},f.prototype.readInt32LE=function(t,e){return t=t>>>0,e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t=t>>>0,e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readBigInt64LE=j(function(t){t=t>>>0,F(t,"offset");let e=this[t],n=this[t+7];(e===void 0||n===void 0)&&D(t,this.length-8);let r=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(r)<>>0,F(t,"offset");let e=this[t],n=this[t+7];(e===void 0||n===void 0)&&D(t,this.length-8);let r=(e<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(r)<>>0,e||I(t,4,this.length),s.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t=t>>>0,e||I(t,4,this.length),s.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t=t>>>0,e||I(t,8,this.length),s.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t=t>>>0,e||I(t,8,this.length),s.read(this,t,!1,52,8)};function C(t,e,n,r,o,i){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e=e>>>0,n=n>>>0,!r){let u=Math.pow(2,8*n)-1;C(this,t,e,n,u,0)}let o=1,i=0;for(this[e]=t&255;++i>>0,n=n>>>0,!r){let u=Math.pow(2,8*n)-1;C(this,t,e,n,u,0)}let o=n-1,i=1;for(this[e+o]=t&255;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},f.prototype.writeUint8=f.prototype.writeUInt8=function(t,e,n){return t=+t,e=e>>>0,n||C(this,t,e,1,255,0),this[e]=t&255,e+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||C(this,t,e,2,65535,0),this[e]=t&255,this[e+1]=t>>>8,e+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||C(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=t&255,e+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||C(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255,e+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||C(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4};function Q(t,e,n,r,o){ft(e,r,o,t,n,7);let i=Number(e&BigInt(4294967295));t[n++]=i,i=i>>8,t[n++]=i,i=i>>8,t[n++]=i,i=i>>8,t[n++]=i;let u=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=u,u=u>>8,t[n++]=u,u=u>>8,t[n++]=u,u=u>>8,t[n++]=u,n}function tt(t,e,n,r,o){ft(e,r,o,t,n,7);let i=Number(e&BigInt(4294967295));t[n+7]=i,i=i>>8,t[n+6]=i,i=i>>8,t[n+5]=i,i=i>>8,t[n+4]=i;let u=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=u,u=u>>8,t[n+2]=u,u=u>>8,t[n+1]=u,u=u>>8,t[n]=u,n+8}f.prototype.writeBigUInt64LE=j(function(t,e=0){return Q(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=j(function(t,e=0){return tt(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e=e>>>0,!r){let g=Math.pow(2,8*n-1);C(this,t,e,n,g-1,-g)}let o=0,i=1,u=0;for(this[e]=t&255;++o>0)-u&255;return e+n},f.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e=e>>>0,!r){let g=Math.pow(2,8*n-1);C(this,t,e,n,g-1,-g)}let o=n-1,i=1,u=0;for(this[e+o]=t&255;--o>=0&&(i*=256);)t<0&&u===0&&this[e+o+1]!==0&&(u=1),this[e+o]=(t/i>>0)-u&255;return e+n},f.prototype.writeInt8=function(t,e,n){return t=+t,e=e>>>0,n||C(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=t&255,e+1},f.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||C(this,t,e,2,32767,-32768),this[e]=t&255,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||C(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=t&255,e+2},f.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||C(this,t,e,4,2147483647,-2147483648),this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4},f.prototype.writeBigInt64LE=j(function(t,e=0){return Q(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=j(function(t,e=0){return tt(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function et(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function nt(t,e,n,r,o){return e=+e,n=n>>>0,o||et(t,e,n,4,34028234663852886e22,-34028234663852886e22),s.write(t,e,n,r,23,4),n+4}f.prototype.writeFloatLE=function(t,e,n){return nt(this,t,e,!0,n)},f.prototype.writeFloatBE=function(t,e,n){return nt(this,t,e,!1,n)};function rt(t,e,n,r,o){return e=+e,n=n>>>0,o||et(t,e,n,8,17976931348623157e292,-17976931348623157e292),s.write(t,e,n,r,52,8),n+8}f.prototype.writeDoubleLE=function(t,e,n){return rt(this,t,e,!0,n)},f.prototype.writeDoubleBE=function(t,e,n){return rt(this,t,e,!1,n)},f.prototype.copy=function(t,e,n,r){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!r&&r!==0&&(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let o;if(typeof t=="number")for(o=e;o2**32?o=ot(String(n)):typeof n=="bigint"&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=ot(o)),o+="n"),r+=` It must be ${e}. Received ${o}`,r},RangeError);function ot(t){let e="",n=t.length,r=t[0]==="-"?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function At(t,e,n){F(e,"offset"),(t[e]===void 0||t[e+n]===void 0)&&D(e,t.length-(n+1))}function ft(t,e,n,r,o,i){if(t>n||t3?e===0||e===BigInt(0)?g=`>= 0${u} and < 2${u} ** ${(i+1)*8}${u}`:g=`>= -(2${u} ** ${(i+1)*8-1}${u}) and < 2 ** ${(i+1)*8-1}${u}`:g=`>= ${e}${u} and <= ${n}${u}`,new k.ERR_OUT_OF_RANGE("value",g,t)}At(r,o,i)}function F(t,e){if(typeof t!="number")throw new k.ERR_INVALID_ARG_TYPE(e,"number",t)}function D(t,e,n){throw Math.floor(t)!==t?(F(t,n),new k.ERR_OUT_OF_RANGE(n||"offset","an integer",t)):e<0?new k.ERR_BUFFER_OUT_OF_BOUNDS:new k.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}var It=/[^+/0-9A-Za-z-_]/g;function Ut(t){if(t=t.split("=")[0],t=t.trim().replace(It,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function G(t,e){e=e||1/0;let n,r=t.length,o=null,i=[];for(let u=0;u55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}else if(u+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,n&63|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return i}function Rt(t){let e=[];for(let n=0;n>8,o=n%256,i.push(o),i.push(r);return i}function it(t){return a.toByteArray(Ut(t))}function Y(t,e,n,r){let o;for(o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function N(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function X(t){return t!==t}var Ot=function(){let t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){let r=n*16;for(let o=0;o<16;++o)e[r+o]=t[n]+t[o]}return e}();function j(t){return typeof BigInt>"u"?St:t}function St(){throw new Error("BigInt not supported")}}),at={};Pt(at,{Buffer:()=>J,INSPECT_MAX_BYTES:()=>Ft,SlowBuffer:()=>kt,default:()=>zt,kMaxLength:()=>Dt});var lt=st(ht());$t(at,st(ht()));var{Buffer:J,SlowBuffer:kt,INSPECT_MAX_BYTES:Ft,kMaxLength:Dt}=lt,{default:ut,...Yt}=lt,zt=ut!==void 0?ut:Yt;globalThis.__Buffer$=J;})(); -/*! Bundled license information: - -ieee754/index.js: - (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) - -buffer/index.js: - (*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - *) -*/ -var __global$ = globalThis || (typeof window !== "undefined" ? window : self); -var rn=Object.create;var ut=Object.defineProperty;var sn=Object.getOwnPropertyDescriptor;var nn=Object.getOwnPropertyNames;var an=Object.getPrototypeOf,on=Object.prototype.hasOwnProperty;var L=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,i)=>(typeof require<"u"?require:t)[i]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var P=(e,t)=>()=>(e&&(t=e(e=0)),t);var ct=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),un=(e,t)=>{for(var i in t)ut(e,i,{get:t[i],enumerable:!0})},cn=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of nn(t))!on.call(e,s)&&s!==i&&ut(e,s,{get:()=>t[s],enumerable:!(r=sn(t,s))||r.enumerable});return e};var oe=(e,t,i)=>(i=e!=null?rn(an(e)):{},cn(t||!e||!e.__esModule?ut(i,"default",{value:e,enumerable:!0}):i,e));function Sn(e){return encodeURI(""+e).replace(wn,"|")}function ft(e){return Sn(typeof e=="string"?e:JSON.stringify(e)).replace(pt,"%2B").replace(_n,"+").replace(mn,"%23").replace(gn,"%26").replace(bn,"`").replace(vn,"^").replace(xn,"%2F")}function lt(e){return ft(e).replace(yn,"%3D")}function xi(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function Cn(e){return xi(e.replace(pt," "))}function En(e){return xi(e.replace(pt," "))}function In(e=""){let t={};e[0]==="?"&&(e=e.slice(1));for(let i of e.split("&")){let r=i.match(/([^=]+)=?(.*)/)||[];if(r.length<2)continue;let s=Cn(r[1]);if(s==="__proto__"||s==="constructor")continue;let n=En(r[2]||"");t[s]===void 0?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]}return t}function kn(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(i=>`${lt(e)}=${ft(i)}`).join("&"):`${lt(e)}=${ft(t)}`:lt(e)}function Pn(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>kn(t,e[t])).filter(Boolean).join("&")}function yi(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?An.test(e):Nn.test(e)||(t.acceptRelative?Rn.test(e):!1)}function ht(e="",t){return t?Tn.test(e):e.endsWith("/")}function Ln(e="",t){if(!t)return(ht(e)?e.slice(0,-1):e)||"/";if(!ht(e,!0))return e||"/";let i=e,r="",s=e.indexOf("#");s>=0&&(i=e.slice(0,s),r=e.slice(s));let[n,...a]=i.split("?");return(n.slice(0,-1)||"/")+(a.length>0?`?${a.join("?")}`:"")+r}function Fn(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(ht(e,!0))return e||"/";let i=e,r="",s=e.indexOf("#");if(s>=0&&(i=e.slice(0,s),r=e.slice(s),!i))return r;let[n,...a]=i.split("?");return n+"/"+(a.length>0?`?${a.join("?")}`:"")+r}function vi(e,t){if(Vn(t)||yi(e))return e;let i=Ln(t);return e.startsWith(i)?e:dt(i,e)}function bi(e,t){let i=_i(e),r={...In(i.search),...t};return i.search=Pn(r),$n(i)}function Vn(e){return!e||e==="/"}function Dn(e){return e&&e!=="/"}function dt(e,...t){let i=e||"";for(let r of t.filter(s=>Dn(s)))if(i){let s=r.replace(On,"");i=Fn(i)+s}else i=r;return i}function _i(e="",t){let i=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(i){let[,h,d=""]=i;return{protocol:h.toLowerCase(),pathname:d,href:h+d,auth:"",host:"",search:"",hash:""}}if(!yi(e,{acceptRelative:!0}))return t?_i(t+e):gi(e);let[,r="",s,n=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,a="",u=""]=n.match(/([^#/?]*)(.*)?/)||[],{pathname:l,search:f,hash:c}=gi(u.replace(/\/(?=[A-Za-z]:)/,""));return{protocol:r.toLowerCase(),auth:s?s.slice(0,Math.max(0,s.length-1)):"",host:a,pathname:l,search:f,hash:c,[wi]:!r}}function gi(e=""){let[t="",i="",r=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:i,hash:r}}function $n(e){let t=e.pathname||"",i=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",r=e.hash||"",s=e.auth?e.auth+"@":"",n=e.host||"";return(e.protocol||e[wi]?(e.protocol||"")+"//":"")+s+n+t+i+r}var Ju,mn,gn,xn,yn,pt,vn,bn,wn,_n,An,Nn,Rn,Tn,On,wi,mt=P(()=>{Ju=String.fromCharCode,mn=/#/g,gn=/&/g,xn=/\//g,yn=/=/g,pt=/\+/g,vn=/%5e/gi,bn=/%60/gi,wn=/%7c/gi,_n=/%20/gi;An=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,Nn=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,Rn=/^([/\\]\s*){2,}[^/\\]/,Tn=/\/$|\/\?|\/#/,On=/^\.?\//;wi=Symbol.for("ufo:protocolRelative")});var Ca,ue,St,ji,je=P(()=>{Ca=Object.freeze({left:0,top:0,width:16,height:16}),ue=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),St=Object.freeze({...Ca,...ue}),ji=Object.freeze({...St,body:"",hidden:!1})});var Ea,Me,Ct=P(()=>{je();Ea=Object.freeze({width:null,height:null}),Me=Object.freeze({...Ea,...ue})});function Et(e,t,i){if(t===1)return e;if(i=i||100,typeof e=="number")return Math.ceil(e*t*i)/i;if(typeof e!="string")return e;let r=e.split(Ia);if(r===null||!r.length)return e;let s=[],n=r.shift(),a=ka.test(n);for(;;){if(a){let u=parseFloat(n);isNaN(u)?s.push(n):s.push(Math.ceil(u*t*i)/i)}else s.push(n);if(n=r.shift(),n===void 0)return s.join("");a=!a}}var Ia,ka,Mi=P(()=>{Ia=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ka=/^-?[0-9.]*[0-9]+[0-9.]*$/g});function Pa(e,t="defs"){let i="",r=e.indexOf("<"+t);for(;r>=0;){let s=e.indexOf(">",r),n=e.indexOf("",n);if(a===-1)break;i+=e.slice(s+1,n).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:i,content:e}}function Aa(e,t){return e?""+e+""+t:t}function Bi(e,t,i){let r=Pa(e);return Aa(r.defs,t+r.content+i)}var Ui=P(()=>{});function qi(e,t){let i={...St,...e},r={...Me,...t},s={left:i.left,top:i.top,width:i.width,height:i.height},n=i.body;[i,r].forEach(p=>{let m=[],A=p.hFlip,k=p.vFlip,N=p.rotate;A?k?N+=2:(m.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),m.push("scale(-1 1)"),s.top=s.left=0):k&&(m.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),m.push("scale(1 -1)"),s.top=s.left=0);let I;switch(N<0&&(N-=Math.floor(N/4)*4),N=N%4,N){case 1:I=s.height/2+s.top,m.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:m.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:I=s.width/2+s.left,m.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}N%2===1&&(s.left!==s.top&&(I=s.left,s.left=s.top,s.top=I),s.width!==s.height&&(I=s.width,s.width=s.height,s.height=I)),m.length&&(n=Bi(n,'',""))});let a=r.width,u=r.height,l=s.width,f=s.height,c,h;a===null?(h=u===null?"1em":u==="auto"?f:u,c=Et(h,l/f)):(c=a==="auto"?l:a,h=u===null?Et(c,f/l):u==="auto"?f:u);let d={},y=(p,m)=>{_e(m)||(d[p]=m.toString())};y("width",c),y("height",h);let b=[s.left,s.top,l,f];return d.viewBox=b.join(" "),{attributes:d,viewBox:b,body:n}}var _e,It=P(()=>{je();Ct();Mi();Ui();_e=e=>e==="unset"||e==="undefined"||e==="none"});function Gi(e,t){let i={};!e.hFlip!=!t.hFlip&&(i.hFlip=!0),!e.vFlip!=!t.vFlip&&(i.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(i.rotate=r),i}var Wi=P(()=>{});function kt(e,t){let i=Gi(e,t);for(let r in ji)r in ue?r in e&&!(r in i)&&(i[r]=ue[r]):r in t?i[r]=t[r]:r in e&&(i[r]=e[r]);return i}var zi=P(()=>{je();Wi()});function Hi(e,t){let i=e.icons,r=e.aliases||Object.create(null),s=Object.create(null);function n(a){if(i[a])return s[a]=[];if(!(a in s)){s[a]=null;let u=r[a]&&r[a].parent,l=u&&n(u);l&&(s[a]=[u].concat(l))}return s[a]}return(t||Object.keys(i).concat(Object.keys(r))).forEach(n),s}var Ki=P(()=>{});function Yi(e,t,i){let r=e.icons,s=e.aliases||Object.create(null),n={};function a(u){n=kt(r[u]||s[u],n)}return a(t),i.forEach(a),kt(e,n)}function Xi(e,t){if(e.icons[t])return Yi(e,t,[]);let i=Hi(e,[t])[t];return i?Yi(e,t,i):null}var Qi=P(()=>{zi();Ki()});function Ta(e,t,i){let r=e.slice(0,e.indexOf(">")),s=(n,a)=>{let u=a.exec(r),l=u!=null,f=t[n];return!f&&!_e(f)&&(typeof i=="number"?i>0&&(t[n]=`${i}em`):u&&(t[n]=u[1])),l};return[s("width",Na),s("height",Ra)]}async function Be(e,t,i,r,s,n){let{scale:a,addXmlNs:u=!1}=r??{},{additionalProps:l={},iconCustomizer:f}=r?.customizations??{},c=await s?.()??{};await f?.(t,i,c),Object.keys(l).forEach(p=>{let m=l[p];m!=null&&(c[p]=m)}),n?.(c);let[h,d]=Ta(e,c,a);u&&(!e.includes("xmlns=")&&!c.xmlns&&(c.xmlns="http://www.w3.org/2000/svg"),!e.includes("xmlns:xlink=")&&e.includes("xlink:")&&!c["xmlns:xlink"]&&(c["xmlns:xlink"]="http://www.w3.org/1999/xlink"));let y=Object.keys(c).map(p=>p==="width"&&h||p==="height"&&d?null:`${p}="${c[p]}"`).filter(p=>p!=null);if(y.length&&(e=e.replace(Pt,`{let m=c[p];m!=null&&(b[p]=m)}),typeof c.width<"u"&&c.width!==null&&(b.width=c.width),typeof c.height<"u"&&c.height!==null&&(b.height=c.height)),e}function Ji(e){return[e,e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.replace(/([a-z])(\d+)/g,"$1-$2")]}var Na,Ra,Pt,Ue=P(()=>{It();Na=/\swidth\s*=\s*["']([\w.]+)["']/,Ra=/\sheight\s*=\s*["']([\w.]+)["']/,Pt=/{$.formatArgs=La;$.save=Fa;$.load=Va;$.useColors=Oa;$.storage=Da();$.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();$.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Oa(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function La(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+qe.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let i=0,r=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(i++,s==="%c"&&(r=i))}),e.splice(r,0,t)}$.log=console.debug||console.log||(()=>{});function Fa(e){try{e?$.storage.setItem("debug",e):$.storage.removeItem("debug")}catch{}}function Va(){let e;try{e=$.storage.getItem("debug")}catch{}return!e&&typeof __Process$<"u"&&"env"in __Process$&&(e=__Process$.env.DEBUG),e}function Da(){try{return localStorage}catch{}}qe.exports=L("./common")($);var{formatters:$a}=qe.exports;$a.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});async function Ge(e,t,i,r){let s,{customize:n}=r?.customizations??{};for(let a of i)if(s=Xi(e,a),s){ja(`${t}:${a}`);let u={...Me};typeof n=="function"&&(u=n(u));let{attributes:{width:l,height:f,...c},body:h}=qi(s,u),d=r?.scale;return await Be(`${h}`,t,a,r,()=>({...c}),y=>{let b=(p,m)=>{let A=y[p],k;if(!_e(A)){if(A)return;typeof d=="number"?d&&(k=`${d}em`):k=m}k?y[p]=k:delete y[p]};b("width",l),b("height",f)})}}var Zi,ja,At=P(()=>{It();Qi();Ue();Zi=oe(Se(),1);Ct();ja=(0,Zi.default)("@iconify-loader:icon")});function Ot(e,t){for(var i=65536,r=0;re)return!1;if(i+=t[r+1],i>=e)return!0}return!1}function X(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Ga.test(String.fromCharCode(e)):t===!1?!1:Ot(e,nr)}function ce(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Wa.test(String.fromCharCode(e)):t===!1?!1:Ot(e,nr)||Ot(e,Ma)}function j(e,t){return new C(e,{beforeExpr:!0,binop:t})}function S(e,t){return t===void 0&&(t={}),t.keyword=e,Vt[e]=new C(e,t)}function le(e){return e===10||e===13||e===8232||e===8233}function or(e,t,i){i===void 0&&(i=e.length);for(var r=t;r>10)+55296,(e&1023)+56320))}function lr(e,t){for(var i=1,r=0;;){var s=or(e,r,t);if(s<0)return new Ee(i,t-r);++i,r=s}}function Xa(e){var t={};for(var i in Lt)t[i]=e&&ke(e,i)?e[i]:Lt[i];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!ir&&typeof console=="object"&&console.warn&&(ir=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. -Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),er(t.onToken)){var r=t.onToken;t.onToken=function(s){return r.push(s)}}return er(t.onComment)&&(t.onComment=Qa(t,t.onComment)),t}function Qa(e,t){return function(i,r,s,n,a,u){var l={type:i?"Block":"Line",value:r,start:s,end:n};e.locations&&(l.loc=new Ye(this,a,u)),e.ranges&&(l.range=[s,n]),t.push(l)}}function Mt(e,t){return fe|(e?Dt:0)|(t?fr:0)}function to(e,t){var i=t.key.name,r=e[i],s="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(s=(t.static?"s":"i")+t.kind),r==="iget"&&s==="iset"||r==="iset"&&s==="iget"||r==="sget"&&s==="sset"||r==="sset"&&s==="sget"?(e[i]="true",!1):r?!0:(e[i]=s,!1)}function He(e,t){var i=e.computed,r=e.key;return!i&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}function vr(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&vr(e.expression)}function br(e,t,i,r){return e.type=t,e.end=i,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=i),e}function lo(e){var t=Rr[e]={binary:Z(no[e]+" "+rr),binaryOfStrings:Z(oo[e]),nonBinary:{General_Category:Z(rr),Script:Z(co[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}function Tr(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}function fo(e){return X(e,!0)||e===36||e===95}function ho(e){return ce(e,!0)||e===36||e===95||e===8204||e===8205}function Or(e){return e>=65&&e<=90||e>=97&&e<=122}function po(e){return e>=0&&e<=1114111}function mo(e){return e===100||e===68||e===115||e===83||e===119||e===87}function Fr(e){return Or(e)||e===95}function go(e){return Fr(e)||Je(e)}function xo(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function yo(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}function vo(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}function Je(e){return e>=48&&e<=57}function Vr(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Dr(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}function $r(e){return e>=48&&e<=55}function bo(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function jr(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}var Ma,nr,Ba,ar,Nt,Rt,Ua,qa,Ga,Wa,C,M,V,Vt,o,q,za,ur,B,cr,Ha,Ka,ke,er,tr,Ya,Ee,Ye,Lt,ir,Ie,fe,Dt,fr,hr,pr,$t,dr,Pe,jt,ze,Bt,J,mr,gr,xr,O,H,F,Ja,Xe,x,Ut,Za,eo,Ce,Ft,yr,G,W,R,he,v,io,Ke,te,ro,Qe,Ae,wr,_r,Sr,Cr,Er,so,no,ao,oo,rr,Ir,kr,Pr,Ar,Nr,uo,co,Rr,sr,We,Tt,g,K,Lr,Q,U,qt,_,Mr,wo,Br=P(()=>{Ma=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],nr=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Ba="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",ar="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Nt={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Rt="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Ua={5:Rt,"5module":Rt+" export import",6:Rt+" const class extends export import super"},qa=/^in(stanceof)?$/,Ga=new RegExp("["+ar+"]"),Wa=new RegExp("["+ar+Ba+"]");C=function(t,i){i===void 0&&(i={}),this.label=t,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=i.binop||null,this.updateContext=null};M={beforeExpr:!0},V={startsExpr:!0},Vt={};o={num:new C("num",V),regexp:new C("regexp",V),string:new C("string",V),name:new C("name",V),privateId:new C("privateId",V),eof:new C("eof"),bracketL:new C("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new C("]"),braceL:new C("{",{beforeExpr:!0,startsExpr:!0}),braceR:new C("}"),parenL:new C("(",{beforeExpr:!0,startsExpr:!0}),parenR:new C(")"),comma:new C(",",M),semi:new C(";",M),colon:new C(":",M),dot:new C("."),question:new C("?",M),questionDot:new C("?."),arrow:new C("=>",M),template:new C("template"),invalidTemplate:new C("invalidTemplate"),ellipsis:new C("...",M),backQuote:new C("`",V),dollarBraceL:new C("${",{beforeExpr:!0,startsExpr:!0}),eq:new C("=",{beforeExpr:!0,isAssign:!0}),assign:new C("_=",{beforeExpr:!0,isAssign:!0}),incDec:new C("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new C("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:j("||",1),logicalAND:j("&&",2),bitwiseOR:j("|",3),bitwiseXOR:j("^",4),bitwiseAND:j("&",5),equality:j("==/!=/===/!==",6),relational:j("/<=/>=",7),bitShift:j("<>/>>>",8),plusMin:new C("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:j("%",10),star:j("*",10),slash:j("/",10),starstar:new C("**",{beforeExpr:!0}),coalesce:j("??",1),_break:S("break"),_case:S("case",M),_catch:S("catch"),_continue:S("continue"),_debugger:S("debugger"),_default:S("default",M),_do:S("do",{isLoop:!0,beforeExpr:!0}),_else:S("else",M),_finally:S("finally"),_for:S("for",{isLoop:!0}),_function:S("function",V),_if:S("if"),_return:S("return",M),_switch:S("switch"),_throw:S("throw",M),_try:S("try"),_var:S("var"),_const:S("const"),_while:S("while",{isLoop:!0}),_with:S("with"),_new:S("new",{beforeExpr:!0,startsExpr:!0}),_this:S("this",V),_super:S("super",V),_class:S("class",V),_extends:S("extends",M),_export:S("export"),_import:S("import",V),_null:S("null",V),_true:S("true",V),_false:S("false",V),_in:S("in",{beforeExpr:!0,binop:7}),_instanceof:S("instanceof",{beforeExpr:!0,binop:7}),_typeof:S("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:S("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:S("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},q=/\r\n?|\n|\u2028|\u2029/,za=new RegExp(q.source,"g");ur=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,B=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,cr=Object.prototype,Ha=cr.hasOwnProperty,Ka=cr.toString,ke=Object.hasOwn||function(e,t){return Ha.call(e,t)},er=Array.isArray||function(e){return Ka.call(e)==="[object Array]"},tr=Object.create(null);Ya=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Ee=function(t,i){this.line=t,this.column=i};Ee.prototype.offset=function(t){return new Ee(this.line,this.column+t)};Ye=function(t,i,r){this.start=i,this.end=r,t.sourceFile!==null&&(this.source=t.sourceFile)};Lt={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},ir=!1;Ie=1,fe=2,Dt=4,fr=8,hr=16,pr=32,$t=64,dr=128,Pe=256,jt=Ie|fe|Pe;ze=0,Bt=1,J=2,mr=3,gr=4,xr=5,O=function(t,i,r){this.options=t=Xa(t),this.sourceFile=t.sourceFile,this.keywords=Z(Ua[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var s="";t.allowReserved!==!0&&(s=Nt[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(s+=" await")),this.reservedWords=Z(s);var n=(s?s+" ":"")+Nt.strict;this.reservedWordsStrict=Z(n),this.reservedWordsStrictBind=Z(n+" "+Nt.strictBind),this.input=String(i),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf(` -`,r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(q).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=o.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Ie),this.regexpState=null,this.privateNameStack=[]},H={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};O.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};H.inFunction.get=function(){return(this.currentVarScope().flags&fe)>0};H.inGenerator.get=function(){return(this.currentVarScope().flags&fr)>0&&!this.currentVarScope().inClassFieldInit};H.inAsync.get=function(){return(this.currentVarScope().flags&Dt)>0&&!this.currentVarScope().inClassFieldInit};H.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&Pe)return!1;if(t.flags&fe)return(t.flags&Dt)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};H.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&$t)>0||i||this.options.allowSuperOutsideMethod};H.allowDirectSuper.get=function(){return(this.currentThisScope().flags&dr)>0};H.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};H.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&(fe|Pe))>0||i};H.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Pe)>0};O.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var r=this,s=0;s=,?^&]/.test(s)||s==="!"&&this.input.charAt(r+1)==="=")}e+=t[0].length,B.lastIndex=e,e+=B.exec(this.input)[0].length,this.input[e]===";"&&e++}};F.eat=function(e){return this.type===e?(this.next(),!0):!1};F.isContextual=function(e){return this.type===o.name&&this.value===e&&!this.containsEsc};F.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};F.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};F.canInsertSemicolon=function(){return this.type===o.eof||this.type===o.braceR||q.test(this.input.slice(this.lastTokEnd,this.start))};F.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};F.semicolon=function(){!this.eat(o.semi)&&!this.insertSemicolon()&&this.unexpected()};F.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};F.expect=function(e){this.eat(e)||this.unexpected()};F.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};Xe=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};F.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};F.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,r=e.doubleProto;if(!t)return i>=0||r>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")};F.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&r<56320)return!0;if(X(r,!0)){for(var s=i+1;ce(r=this.input.charCodeAt(s),!0);)++s;if(r===92||r>55295&&r<56320)return!0;var n=this.input.slice(i,s);if(!qa.test(n))return!0}return!1};x.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;B.lastIndex=this.pos;var e=B.exec(this.input),t=this.pos+e[0].length,i;return!q.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(ce(i=this.input.charCodeAt(t+8))||i>55295&&i<56320))};x.parseStatement=function(e,t,i){var r=this.type,s=this.startNode(),n;switch(this.isLet(e)&&(r=o._var,n="let"),r){case o._break:case o._continue:return this.parseBreakContinueStatement(s,r.keyword);case o._debugger:return this.parseDebuggerStatement(s);case o._do:return this.parseDoStatement(s);case o._for:return this.parseForStatement(s);case o._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case o._class:return e&&this.unexpected(),this.parseClass(s,!0);case o._if:return this.parseIfStatement(s);case o._return:return this.parseReturnStatement(s);case o._switch:return this.parseSwitchStatement(s);case o._throw:return this.parseThrowStatement(s);case o._try:return this.parseTryStatement(s);case o._const:case o._var:return n=n||this.value,e&&n!=="var"&&this.unexpected(),this.parseVarStatement(s,n);case o._while:return this.parseWhileStatement(s);case o._with:return this.parseWithStatement(s);case o.braceL:return this.parseBlock(!0,s);case o.semi:return this.parseEmptyStatement(s);case o._export:case o._import:if(this.options.ecmaVersion>10&&r===o._import){B.lastIndex=this.pos;var a=B.exec(this.input),u=this.pos+a[0].length,l=this.input.charCodeAt(u);if(l===40||l===46)return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===o._import?this.parseImport(s):this.parseExport(s,i);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var f=this.value,c=this.parseExpression();return r===o.name&&c.type==="Identifier"&&this.eat(o.colon)?this.parseLabeledStatement(s,f,c,e):this.parseExpressionStatement(s,c)}};x.parseBreakContinueStatement=function(e,t){var i=t==="break";this.next(),this.eat(o.semi)||this.insertSemicolon()?e.label=null:this.type!==o.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r=6?this.eat(o.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};x.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Ut),this.enterScope(0),this.expect(o.parenL),this.type===o.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var i=this.isLet();if(this.type===o._var||this.type===o._const||i){var r=this.startNode(),s=i?"let":this.value;return this.next(),this.parseVar(r,!0,s),this.finishNode(r,"VariableDeclaration"),(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&r.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===o._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,r)):(t>-1&&this.unexpected(t),this.parseFor(e,r))}var n=this.isContextual("let"),a=!1,u=new Xe,l=this.parseExpression(t>-1?"await":!0,u);return this.type===o._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===o._in?t>-1&&this.unexpected(t):e.await=t>-1),n&&a&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,u),this.checkLValPattern(l),this.parseForIn(e,l)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,l))};x.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,Ce|(i?0:Ft),!1,t)};x.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(o._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};x.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(o.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};x.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(o.braceL),this.labels.push(Za),this.enterScope(0);for(var t,i=!1;this.type!==o.braceR;)if(this.type===o._case||this.type===o._default){var r=this.type===o._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(o.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};x.parseThrowStatement=function(e){return this.next(),q.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};eo=[];x.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?pr:0),this.checkLValPattern(e,t?gr:J),this.expect(o.parenR),e};x.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===o._catch){var t=this.startNode();this.next(),this.eat(o.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(o._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};x.parseVarStatement=function(e,t,i){return this.next(),this.parseVar(e,!1,t,i),this.semicolon(),this.finishNode(e,"VariableDeclaration")};x.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Ut),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};x.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};x.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};x.parseLabeledStatement=function(e,t,i,r){for(var s=0,n=this.labels;s=0;l--){var f=this.labels[l];if(f.statementStart===e.start)f.statementStart=this.start,f.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")};x.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};x.parseBlock=function(e,t,i){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(o.braceL),e&&this.enterScope(0);this.type!==o.braceR;){var r=this.parseStatement(null);t.body.push(r)}return i&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};x.parseFor=function(e,t){return e.init=t,this.expect(o.semi),e.test=this.type===o.semi?null:this.parseExpression(),this.expect(o.semi),e.update=this.type===o.parenR?null:this.parseExpression(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};x.parseForIn=function(e,t){var i=this.type===o._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")};x.parseVar=function(e,t,i,r){for(e.declarations=[],e.kind=i;;){var s=this.startNode();if(this.parseVarId(s,i),this.eat(o.eq)?s.init=this.parseMaybeAssign(t):!r&&i==="const"&&!(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!r&&s.id.type!=="Identifier"&&!(t&&(this.type===o._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):s.init=null,e.declarations.push(this.finishNode(s,"VariableDeclarator")),!this.eat(o.comma))break}return e};x.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Bt:J,!1)};Ce=1,Ft=2,yr=4;x.parseFunction=function(e,t,i,r,s){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===o.star&&t&Ft&&this.unexpected(),e.generator=this.eat(o.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&Ce&&(e.id=t&yr&&this.type!==o.name?null:this.parseIdent(),e.id&&!(t&Ft)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Bt:J:mr));var n=this.yieldPos,a=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Mt(e.async,e.generator)),t&Ce||(e.id=this.type===o.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,!1,s),this.yieldPos=n,this.awaitPos=a,this.awaitIdentPos=u,this.finishNode(e,t&Ce?"FunctionDeclaration":"FunctionExpression")};x.parseFunctionParams=function(e){this.expect(o.parenL),e.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};x.parseClass=function(e,t){this.next();var i=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),s=this.startNode(),n=!1;for(s.body=[],this.expect(o.braceL);this.type!==o.braceR;){var a=this.parseClassElement(e.superClass!==null);a&&(s.body.push(a),a.type==="MethodDefinition"&&a.kind==="constructor"?(n&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),n=!0):a.key&&a.key.type==="PrivateIdentifier"&&to(r,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=i,this.next(),e.body=this.finishNode(s,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};x.parseClassElement=function(e){if(this.eat(o.semi))return null;var t=this.options.ecmaVersion,i=this.startNode(),r="",s=!1,n=!1,a="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(o.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===o.star?u=!0:r="static"}if(i.static=u,!r&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===o.star)&&!this.canInsertSemicolon()?n=!0:r="async"),!r&&(t>=9||!n)&&this.eat(o.star)&&(s=!0),!r&&!n&&!s){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=l:r=l)}if(r?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=r,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===o.parenL||a!=="method"||s||n){var f=!i.static&&He(i,"constructor"),c=f&&e;f&&a!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=f?"constructor":a,this.parseClassMethod(i,s,n,c)}else this.parseClassField(i);return i};x.isClassElementNameStart=function(){return this.type===o.name||this.type===o.privateId||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword};x.parseClassElementName=function(e){this.type===o.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};x.parseClassMethod=function(e,t,i,r){var s=e.key;e.kind==="constructor"?(t&&this.raise(s.start,"Constructor can't be a generator"),i&&this.raise(s.start,"Constructor can't be an async method")):e.static&&He(e,"prototype")&&this.raise(s.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,i,r);return e.kind==="get"&&n.params.length!==0&&this.raiseRecoverable(n.start,"getter should have no params"),e.kind==="set"&&n.params.length!==1&&this.raiseRecoverable(n.start,"setter should have exactly one param"),e.kind==="set"&&n.params[0].type==="RestElement"&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};x.parseClassField=function(e){if(He(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&He(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(o.eq)){var t=this.currentThisScope(),i=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=i}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};x.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(Pe|$t);this.type!==o.braceR;){var i=this.parseStatement(null);e.body.push(i)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};x.parseClassId=function(e,t){this.type===o.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,J,!1)):(t===!0&&this.unexpected(),e.id=null)};x.parseClassSuper=function(e){e.superClass=this.eat(o._extends)?this.parseExprSubscripts(null,!1):null};x.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};x.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,i=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,s=r===0?null:this.privateNameStack[r-1],n=0;n=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==o.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};x.parseExport=function(e,t){if(this.next(),this.eat(o.star))return this.parseExportAllDeclaration(e,t);if(this.eat(o._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==o.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var i=0,r=e.specifiers;i=13&&this.type===o.string){var e=this.parseLiteral(this.value);return Ya.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};x.adaptDirectivePrologue=function(e){for(var t=0;t=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};G=O.prototype;G.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var r=0,s=e.properties;r=8&&!u&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(o._function))return this.overrideContext(R.f_expr),this.parseFunction(this.startNodeAt(n,a),0,!1,!0,t);if(s&&!this.canInsertSemicolon()){if(this.eat(o.arrow))return this.parseArrowExpression(this.startNodeAt(n,a),[l],!1,t);if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===o.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return l=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(o.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,a),[l],!0,t)}return l;case o.regexp:var f=this.value;return r=this.parseLiteral(f.value),r.regex={pattern:f.pattern,flags:f.flags},r;case o.num:case o.string:return this.parseLiteral(this.value);case o._null:case o._true:case o._false:return r=this.startNode(),r.value=this.type===o._null?null:this.type===o._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case o.parenL:var c=this.start,h=this.parseParenAndDistinguishExpression(s,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(h)&&(e.parenthesizedAssign=c),e.parenthesizedBind<0&&(e.parenthesizedBind=c)),h;case o.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(o.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case o.braceL:return this.overrideContext(R.b_expr),this.parseObj(!1,e);case o._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case o._class:return this.parseClass(this.startNode(),!1);case o._new:return this.parseNew();case o.backQuote:return this.parseTemplate();case o._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}};v.parseExprAtomDefault=function(){this.unexpected()};v.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===o.parenL&&!e)return this.parseDynamicImport(t);if(this.type===o.dot){var i=this.startNodeAt(t.start,t.loc&&t.loc.start);return i.name="import",t.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};v.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(o.parenR)){var t=this.start;this.eat(o.comma)&&this.eat(o.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};v.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};v.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};v.parseParenExpression=function(){this.expect(o.parenL);var e=this.parseExpression();return this.expect(o.parenR),e};v.shouldParseArrow=function(e){return!this.canInsertSemicolon()};v.parseParenAndDistinguishExpression=function(e,t){var i=this.start,r=this.startLoc,s,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,u=this.startLoc,l=[],f=!0,c=!1,h=new Xe,d=this.yieldPos,y=this.awaitPos,b;for(this.yieldPos=0,this.awaitPos=0;this.type!==o.parenR;)if(f?f=!1:this.expect(o.comma),n&&this.afterTrailingComma(o.parenR,!0)){c=!0;break}else if(this.type===o.ellipsis){b=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else l.push(this.parseMaybeAssign(!1,h,this.parseParenItem));var p=this.lastTokEnd,m=this.lastTokEndLoc;if(this.expect(o.parenR),e&&this.shouldParseArrow(l)&&this.eat(o.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=y,this.parseParenArrowList(i,r,l,t);(!l.length||c)&&this.unexpected(this.lastTokStart),b&&this.unexpected(b),this.checkExpressionErrors(h,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=y||this.awaitPos,l.length>1?(s=this.startNodeAt(a,u),s.expressions=l,this.finishNodeAt(s,"SequenceExpression",p,m)):s=l[0]}else s=this.parseParenExpression();if(this.options.preserveParens){var A=this.startNodeAt(i,r);return A.expression=s,this.finishNode(A,"ParenthesizedExpression")}else return s};v.parseParenItem=function(e){return e};v.parseParenArrowList=function(e,t,i,r){return this.parseArrowExpression(this.startNodeAt(e,t),i,!1,r)};io=[];v.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===o.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var i=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,s=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,s,!0,!1),this.eat(o.parenL)?e.arguments=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1):e.arguments=io,this.finishNode(e,"NewExpression")};v.parseTemplateElement=function(e){var t=e.isTagged,i=this.startNode();return this.type===o.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value,cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` -`),cooked:this.value},this.next(),i.tail=this.type===o.backQuote,this.finishNode(i,"TemplateElement")};v.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(i.quasis=[r];!r.tail;)this.type===o.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(o.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(o.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};v.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===o.name||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===o.star)&&!q.test(this.input.slice(this.lastTokEnd,this.start))};v.parseObj=function(e,t){var i=this.startNode(),r=!0,s={};for(i.properties=[],this.next();!this.eat(o.braceR);){if(r)r=!1;else if(this.expect(o.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(o.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,s,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};v.parseProperty=function(e,t){var i=this.startNode(),r,s,n,a;if(this.options.ecmaVersion>=9&&this.eat(o.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===o.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(n=this.start,a=this.startLoc),e||(r=this.eat(o.star)));var u=this.containsEsc;return this.parsePropertyName(i),!e&&!u&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(i)?(s=!0,r=this.options.ecmaVersion>=9&&this.eat(o.star),this.parsePropertyName(i)):s=!1,this.parsePropertyValue(i,e,r,s,n,a,t,u),this.finishNode(i,"Property")};v.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var i=e.value.start;e.kind==="get"?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};v.parsePropertyValue=function(e,t,i,r,s,n,a,u){(i||r)&&this.type===o.colon&&this.unexpected(),this.eat(o.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===o.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(i,r)):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==o.comma&&this.type!==o.braceR&&this.type!==o.eq?((i||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=s),e.kind="init",t?e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key)):this.type===o.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};v.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(o.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(o.bracketR),e.key;e.computed=!1}return e.key=this.type===o.num||this.type===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};v.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};v.parseMethod=function(e,t,i){var r=this.startNode(),s=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Mt(t,r.generator)|$t|(i?dr:0)),this.expect(o.parenL),r.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=a,this.finishNode(r,"FunctionExpression")};v.parseArrowExpression=function(e,t,i,r){var s=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(Mt(i,!1)|hr),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")};v.parseFunctionBody=function(e,t,i,r){var s=t&&this.type!==o.braceL,n=this.strict,a=!1;if(s)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!n||u)&&(a=this.strictDirective(this.end),a&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var l=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!n&&!a&&!t&&!i&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,xr),e.body=this.parseBlock(!1,void 0,a&&!n),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()};v.isSimpleParamList=function(e){for(var t=0,i=e;t-1||s.functions.indexOf(e)>-1||s.var.indexOf(e)>-1,s.lexical.push(e),this.inModule&&s.flags&Ie&&delete this.undefinedExports[e]}else if(t===gr){var n=this.currentScope();n.lexical.push(e)}else if(t===mr){var a=this.currentScope();this.treatFunctionsAsVar?r=a.lexical.indexOf(e)>-1:r=a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var u=this.scopeStack.length-1;u>=0;--u){var l=this.scopeStack[u];if(l.lexical.indexOf(e)>-1&&!(l.flags&pr&&l.lexical[0]===e)||!this.treatFunctionsAsVarInScope(l)&&l.functions.indexOf(e)>-1){r=!0;break}if(l.var.push(e),this.inModule&&l.flags&Ie&&delete this.undefinedExports[e],l.flags&jt)break}r&&this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")};te.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};te.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};te.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&jt)return t}};te.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&jt&&!(t.flags&hr))return t}};Qe=function(t,i,r){this.type="",this.start=i,this.end=0,t.options.locations&&(this.loc=new Ye(t,r)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[i,0])},Ae=O.prototype;Ae.startNode=function(){return new Qe(this,this.start,this.startLoc)};Ae.startNodeAt=function(e,t){return new Qe(this,e,t)};Ae.finishNode=function(e,t){return br.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Ae.finishNodeAt=function(e,t,i,r){return br.call(this,e,t,i,r)};Ae.copyNode=function(e){var t=new Qe(this,e.start,this.startLoc);for(var i in e)t[i]=e[i];return t};wr="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",_r=wr+" Extended_Pictographic",Sr=_r,Cr=Sr+" EBase EComp EMod EPres ExtPict",Er=Cr,so=Er,no={9:wr,10:_r,11:Sr,12:Cr,13:Er,14:so},ao="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",oo={9:"",10:"",11:"",12:"",13:"",14:ao},rr="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Ir="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",kr=Ir+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Pr=kr+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Ar=Pr+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Nr=Ar+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",uo=Nr+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",co={9:Ir,10:kr,11:Pr,12:Ar,13:Nr,14:uo},Rr={};for(We=0,Tt=[9,10,11,12,13,14];We=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Rr[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};K.prototype.reset=function(t,i,r){var s=r.indexOf("v")!==-1,n=r.indexOf("u")!==-1;this.start=t|0,this.source=i+"",this.flags=r,s&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)};K.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};K.prototype.at=function(t,i){i===void 0&&(i=!1);var r=this.source,s=r.length;if(t>=s)return-1;var n=r.charCodeAt(t);if(!(i||this.switchU)||n<=55295||n>=57344||t+1>=s)return n;var a=r.charCodeAt(t+1);return a>=56320&&a<=57343?(n<<10)+a-56613888:n};K.prototype.nextIndex=function(t,i){i===void 0&&(i=!1);var r=this.source,s=r.length;if(t>=s)return s;var n=r.charCodeAt(t),a;return!(i||this.switchU)||n<=55295||n>=57344||t+1>=s||(a=r.charCodeAt(t+1))<56320||a>57343?t+1:t+2};K.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};K.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};K.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};K.prototype.eat=function(t,i){return i===void 0&&(i=!1),this.current(i)===t?(this.advance(i),!0):!1};K.prototype.eatChars=function(t,i){i===void 0&&(i=!1);for(var r=this.pos,s=0,n=t;s-1&&this.raise(e.start,"Duplicate regular expression flag"),a==="u"&&(r=!0),a==="v"&&(s=!0)}this.options.ecmaVersion>=15&&r&&s&&this.raise(e.start,"Invalid regular expression flag")};g.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))};g.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,i=e.backReferenceNames;t=9&&(i=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!i,!0}return e.pos=t,!1};g.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};g.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};g.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var r=0,s=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue),e.eat(125)))return s!==-1&&s=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};g.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};g.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};g.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Tr(t)?(e.lastIntValue=t,e.advance(),!0):!1};g.regexp_eatPatternCharacters=function(e){for(var t=e.pos,i=0;(i=e.current())!==-1&&!Tr(i);)e.advance();return e.pos!==t};g.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};g.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};g.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};g.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=ee(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ee(e.lastIntValue);return!0}return!1};g.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),fo(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};g.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),ho(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};g.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};g.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var i=e.lastIntValue;if(e.switchU)return i>e.maxBackReference&&(e.maxBackReference=i),!0;if(i<=e.numCapturingParens)return!0;e.pos=t}return!1};g.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};g.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};g.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};g.regexp_eatZero=function(e){return e.current()===48&&!Je(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};g.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};g.regexp_eatControlLetter=function(e){var t=e.current();return Or(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};g.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var i=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(r&&s>=55296&&s<=56319){var n=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=(s-55296)*1024+(a-56320)+65536,!0}e.pos=n,e.lastIntValue=s}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&po(e.lastIntValue))return!0;r&&e.raise("Invalid unicode escape"),e.pos=i}return!1};g.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};g.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};Lr=0,Q=1,U=2;g.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(mo(t))return e.lastIntValue=-1,e.advance(),Q;var i=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((i=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return i&&r===U&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return Lr};g.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var i=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,i,r),Q}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,s)}return Lr};g.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){ke(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(i)||e.raise("Invalid property value")};g.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Q;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return U;e.raise("Invalid property name")};g.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Fr(t=e.current());)e.lastStringValue+=ee(t),e.advance();return e.lastStringValue!==""};g.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";go(t=e.current());)e.lastStringValue+=ee(t),e.advance();return e.lastStringValue!==""};g.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};g.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),i=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&i===U&&e.raise("Negated character class may contain strings"),!0}return!1};g.regexp_classContents=function(e){return e.current()===93?Q:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Q)};g.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var i=e.lastIntValue;e.switchU&&(t===-1||i===-1)&&e.raise("Invalid character class"),t!==-1&&i!==-1&&t>i&&e.raise("Range out of order in character class")}}};g.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var i=e.current();(i===99||$r(i))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return r!==93?(e.lastIntValue=r,e.advance(),!0):!1};g.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};g.regexp_classSetExpression=function(e){var t=Q,i;if(!this.regexp_eatClassSetRange(e))if(i=this.regexp_eatClassSetOperand(e)){i===U&&(t=U);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(i=this.regexp_eatClassSetOperand(e))){i!==U&&(t=Q);continue}e.raise("Invalid character in character class")}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(i=this.regexp_eatClassSetOperand(e),!i)return t;i===U&&(t=U)}};g.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return i!==-1&&r!==-1&&i>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};g.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?Q:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};g.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var i=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return i&&r===U&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var s=this.regexp_eatCharacterClassEscape(e);if(s)return s;e.pos=t}return null};g.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var i=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return i}else e.raise("Invalid escape");e.pos=t}return null};g.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===U&&(t=U);return t};g.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?Q:U};g.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var i=e.current();return i<0||i===e.lookahead()&&xo(i)||yo(i)?!1:(e.advance(),e.lastIntValue=i,!0)};g.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return vo(t)?(e.lastIntValue=t,e.advance(),!0):!1};g.regexp_eatClassControlLetter=function(e){var t=e.current();return Je(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};g.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};g.regexp_eatDecimalDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Je(i=e.current());)e.lastIntValue=10*e.lastIntValue+(i-48),e.advance();return e.pos!==t};g.regexp_eatHexDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Vr(i=e.current());)e.lastIntValue=16*e.lastIntValue+Dr(i),e.advance();return e.pos!==t};g.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var i=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+i*8+e.lastIntValue:e.lastIntValue=t*8+i}else e.lastIntValue=t;return!0}return!1};g.regexp_eatOctalDigit=function(e){var t=e.current();return $r(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};g.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var r=0;r=this.input.length)return this.finishToken(o.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};_.readToken=function(e){return X(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};_.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};_.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var r=void 0,s=t;(r=or(this.input,s,this.pos))>-1;)++this.curLine,s=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())};_.skipLineComment=function(e){for(var t=this.pos,i=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&ur.test(String.fromCharCode(e)))++this.pos;else break e}}};_.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=e,this.value=t,this.updateContext(i)};_.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(o.ellipsis)):(++this.pos,this.finishToken(o.dot))};_.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(o.assign,2):this.finishOp(o.slash,1)};_.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),i=1,r=e===42?o.star:o.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++i,r=o.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(o.assign,i+1):this.finishOp(r,i)};_.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(o.assign,3)}return this.finishOp(e===124?o.logicalOR:o.logicalAND,2)}return t===61?this.finishOp(o.assign,2):this.finishOp(e===124?o.bitwiseOR:o.bitwiseAND,1)};_.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(o.assign,2):this.finishOp(o.bitwiseXOR,1)};_.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||q.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(o.incDec,2):t===61?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)};_.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),i=1;return t===e?(i=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+i)===61?this.finishOp(o.assign,i+1):this.finishOp(o.bitShift,i)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(i=2),this.finishOp(o.relational,i))};_.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(o.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(o.arrow)):this.finishOp(e===61?o.eq:o.prefix,1)};_.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(o.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(o.assign,3)}return this.finishOp(o.coalesce,2)}}return this.finishOp(o.question,1)};_.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),X(t,!0)||t===92))return this.finishToken(o.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+ee(t)+"'")};_.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(o.parenL);case 41:return++this.pos,this.finishToken(o.parenR);case 59:return++this.pos,this.finishToken(o.semi);case 44:return++this.pos,this.finishToken(o.comma);case 91:return++this.pos,this.finishToken(o.bracketL);case 93:return++this.pos,this.finishToken(o.bracketR);case 123:return++this.pos,this.finishToken(o.braceL);case 125:return++this.pos,this.finishToken(o.braceR);case 58:return++this.pos,this.finishToken(o.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(o.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(o.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+ee(e)+"'")};_.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,i)};_.readRegexp=function(){for(var e,t,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(q.test(r)&&this.raise(i,"Unterminated regular expression"),e)e=!1;else{if(r==="[")t=!0;else if(r==="]"&&t)t=!1;else if(r==="/"&&!t)break;e=r==="\\"}++this.pos}var s=this.input.slice(i,this.pos);++this.pos;var n=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(n);var u=this.regexpState||(this.regexpState=new K(this));u.reset(i,s,a),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var l=null;try{l=new RegExp(s,a)}catch{}return this.finishToken(o.regexp,{pattern:s,flags:a,value:l})};_.readInt=function(e,t,i){for(var r=this.options.ecmaVersion>=12&&t===void 0,s=i&&this.input.charCodeAt(this.pos)===48,n=this.pos,a=0,u=0,l=0,f=t??1/0;l=97?h=c-97+10:c>=65?h=c-65+10:c>=48&&c<=57?h=c-48:h=1/0,h>=e)break;u=c,a=a*e+h}return r&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===n||t!=null&&this.pos-n!==t?null:a};_.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var i=this.readInt(e);return i==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(i=jr(this.input.slice(t,this.pos)),++this.pos):X(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,i)};_.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var i=this.pos-t>=2&&this.input.charCodeAt(t)===48;i&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&r===110){var s=jr(this.input.slice(t,this.pos));return++this.pos,X(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,s)}i&&/[89]/.test(this.input.slice(t,this.pos))&&(i=!1),r===46&&!i&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!i&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),X(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var n=bo(this.input.slice(t,this.pos),i);return this.finishToken(o.num,n)};_.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var i=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(i,"Code point out of bounds")}else t=this.readHexChar(4);return t};_.readString=function(e){for(var t="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(i,this.pos),t+=this.readEscapedChar(!1),i=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(le(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(i,this.pos++),this.finishToken(o.string,t)};Mr={};_.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Mr)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};_.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Mr;this.raise(e,t)};_.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(i===96||i===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===o.template||this.type===o.invalidTemplate)?i===36?(this.pos+=2,this.finishToken(o.dollarBraceL)):(++this.pos,this.finishToken(o.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(o.template,e));if(i===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(le(i)){switch(e+=this.input.slice(t,this.pos),++this.pos,i){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=` -`;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};_.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],s=parseInt(r,8);return s>255&&(r=r.slice(0,-1),s=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(s)}return le(t)?"":String.fromCharCode(t)}};_.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};_.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,r=this.options.ecmaVersion>=6;this.pos{_o=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Gt=function(e){return _o.test(e)}});var qr=P(()=>{Ur()});import{builtinModules as rs,createRequire as sl}from"/error.js?type=unsupported-node-builtin-module&name=module&importer=@unocss/preset-icons@0.58.5";import Eo,{realpathSync as Kt,statSync as ss,Stats as Io,promises as al,existsSync as ko}from"/v135/node_fs.js";import{fileURLToPath as E,URL as T,pathToFileURL as pe}from"/v135/url@0.11.3/es2022/url.mjs";import ie from"/v135/assert@2.1.0/es2022/assert.mjs";import ne from"/v135/node_process.js";import Zt,{dirname as pl}from"/v135/path-browserify@1.0.1/es2022/path-browserify.mjs";import Po from"/error.js?type=unsupported-node-builtin-module&name=v8&importer=@unocss/preset-icons@0.58.5";import{format as Ao,inspect as Yt}from"/v135/util@0.12.5/es2022/util.mjs";function Xt(e){return e.replace(/\\/g,"/")}function as(e,...t){try{return Promise.resolve(e(...t)).catch(i=>Gr(i))}catch(i){return Gr(i)}}function Gr(e){let t=new Error(e);return t.code=e.code,Error.captureStackTrace(t,as),Promise.reject(t)}function No(e){return e!==null&&typeof e=="object"}function Wt(e,t="and"){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`}function z(e,t,i){return os.set(e,t),Fo(i,e)}function Fo(e,t){return i;function i(...r){let s=Error.stackTraceLimit;Qt()&&(Error.stackTraceLimit=0);let n=new e;Qt()&&(Error.stackTraceLimit=s);let a=$o(t,r,n);return Object.defineProperties(n,{message:{value:a,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),Do(n),n.code=t,n}}function Qt(){try{if(Po.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return e===void 0?Object.isExtensible(Error):Ro.call(e,"writable")&&e.writable!==void 0?e.writable:e.set!==void 0}function Vo(e){let t=Lo+e.name;return Object.defineProperty(e,"name",{value:t}),e}function $o(e,t,i){let r=os.get(e);if(ie(r!==void 0,"expected `message` to be found"),typeof r=="function")return ie(r.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${r.length}).`),Reflect.apply(r,i,t);let s=/%[dfijoOs]/g,n=0;for(;s.exec(r)!==null;)n++;return ie(n===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${n}).`),t.length===0?r:(t.unshift(r),Reflect.apply(Ao,null,t))}function jo(e){if(e==null)return String(e);if(typeof e=="function"&&e.name)return`function ${e.name}`;if(typeof e=="object")return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${Yt(e,{depth:-1})}`;let t=Yt(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}function Uo(e,{base:t,specifier:i}){let r=zr.get(e);if(r)return r;let s;try{s=Eo.readFileSync(Zt.toNamespacedPath(e),"utf8")}catch(a){let u=a;if(u.code!=="ENOENT")throw u}let n={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(s!==void 0){let a;try{a=JSON.parse(s)}catch(u){let l=u,f=new Mo(e,(t?`"${i}" from `:"")+E(t||i),l.message);throw f.cause=l,f}n.exists=!0,Ne.call(a,"name")&&typeof a.name=="string"&&(n.name=a.name),Ne.call(a,"main")&&typeof a.main=="string"&&(n.main=a.main),Ne.call(a,"exports")&&(n.exports=a.exports),Ne.call(a,"imports")&&(n.imports=a.imports),Ne.call(a,"type")&&(a.type==="commonjs"||a.type==="module")&&(n.type=a.type)}return zr.set(e,n),n}function ei(e){let t=new T("package.json",e);for(;!t.pathname.endsWith("node_modules/package.json");){let s=us.read(E(t),{specifier:e});if(s.exists)return s;let n=t;if(t=new T("../package.json",t),t.pathname===n.pathname)break}return{pjsonPath:E(t),exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0}}function Hr(e){return ei(e).type}function zo(e){return e&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e)?"module":e==="application/json"?"json":null}function Ho(e){let{1:t}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return zo(t)}function Ko(e){let t=e.pathname,i=t.length;for(;i--;){let r=t.codePointAt(i);if(r===47)return"";if(r===46)return t.codePointAt(i-1)===47?"":t.slice(i)}return""}function Yo(e,t,i){let r=Ko(e);if(r===".js"){let a=Hr(e);return a!=="none"?a:"commonjs"}if(r===""){let a=Hr(e);return a==="none"||a==="commonjs"?"commonjs":"module"}let s=Wo[r];if(s)return s;if(i)return;let n=E(e);throw new qo(r,n)}function Yr(){}function Xo(e,t){let i=e.protocol;return Go.call(Kr,i)&&Kr[i](e,t,!0)||null}function Zr(e,t,i,r,s,n,a){if(ne.noDeprecation)return;let u=E(r),l=ru.exec(a?e:t)!==null;ne.emitWarning(`Use of deprecated ${l?"double slash":"leading or trailing slash matching"} resolving "${e}" for module request "${t}" ${t===i?"":`matched to "${i}" `}in the "${s?"imports":"exports"}" field module resolution of the package at ${u}${n?` imported from ${E(n)}`:""}.`,"DeprecationWarning","DEP0166")}function es(e,t,i,r){if(ne.noDeprecation||Xo(e,{parentURL:i.href})!=="module")return;let n=E(e.href),a=E(new T(".",t)),u=E(i);r?Zt.resolve(a,r)!==n&&ne.emitWarning(`Package ${a} has a "main" field set to "${r}", excluding the full filename and extension to the resolved file at "${n.slice(a.length)}", imported from ${u}. - Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):ne.emitWarning(`No "main" or "exports" field defined in the package.json for ${a} resolving the main entry point "${n.slice(a.length)}", imported from ${u}. -Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function fs(e){try{return ss(e)}catch{return new Io}}function zt(e){let t=ss(e,{throwIfNoEntry:!1}),i=t?t.isFile():void 0;return i??!1}function su(e,t,i){let r;if(t.main!==void 0){if(r=new T(t.main,e),zt(r))return r;let a=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],u=-1;for(;++ut):e+t;return ps(y,r,l)}}throw Re(i,e,r,a,s)}if(Xr.exec(e.slice(2))!==null)if(Qr.exec(e.slice(2))===null){if(!u){let d=n?i.replace("*",()=>t):i+t,y=n?Ze.call(et,e,()=>t):e;Zr(y,d,i,r,a,s,!0)}}else throw Re(i,e,r,a,s);let f=new T(e,r),c=f.pathname,h=new T(".",r).pathname;if(!c.startsWith(h))throw Re(i,e,r,a,s);if(t==="")return f;if(Xr.exec(t)!==null){let d=n?i.replace("*",()=>t):i+t;if(Qr.exec(t)===null){if(!u){let y=n?Ze.call(et,e,()=>t):e;Zr(y,d,i,r,a,s,!1)}}else ou(d,i,r,a,s)}return n?new T(Ze.call(et,f.href,()=>t)):new T(t,f)}function cu(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function de(e,t,i,r,s,n,a,u,l){if(typeof t=="string")return uu(t,i,r,e,s,n,a,u,l);if(Array.isArray(t)){let f=t;if(f.length===0)return null;let c,h=-1;for(;++h=c.length&&t.endsWith(d)&&hs(a,c)===1&&c.lastIndexOf("*")===h&&(a=c,u=t.slice(h,t.length-d.length))}}if(a){let c=n[a],h=de(e,c,u,a,r,!0,!1,t.endsWith("/"),s);if(h==null)throw Ht(t,e,r);return h}throw Ht(t,e,r)}function hs(e,t){let i=e.indexOf("*"),r=t.indexOf("*"),s=i===-1?e.length:i+1,n=r===-1?t.length:r+1;return s>n?-1:n>s||i===-1?1:r===-1||e.length>t.length?-1:t.length>e.length?1:0}function hu(e,t,i){if(e==="#"||e.startsWith("#/")||e.endsWith("/")){let n="is not a valid internal imports specifier name";throw new tt(e,n,E(t))}let r,s=ei(t);if(s.exists){r=pe(s.pjsonPath);let n=s.imports;if(n)if(ls.call(n,e)&&!e.includes("*")){let a=de(r,n[e],"",e,t,!1,!0,!1,i);if(a!=null)return a}else{let a="",u="",l=Object.getOwnPropertyNames(n),f=-1;for(;++f=c.length&&e.endsWith(d)&&hs(a,c)===1&&c.lastIndexOf("*")===h&&(a=c,u=e.slice(h,e.length-d.length))}}if(a){let c=n[a],h=de(r,c,u,a,t,!0,!0,!1,i);if(h!=null)return h}}}throw au(e,r,t)}function pu(e,t){let i=e.indexOf("/"),r=!0,s=!1;e[0]==="@"&&(s=!0,i===-1||e.length===0?r=!1:i=e.indexOf("/",i+1));let n=i===-1?e:e.slice(0,i);if(tu.exec(n)!==null&&(r=!1),!r)throw new tt(e,"is not a valid package name",E(t));let a="."+(i===-1?"":e.slice(i));return{packageName:n,packageSubpath:a,isScoped:s}}function ps(e,t,i){if(rs.includes(e))return new T("node:"+e);let{packageName:r,packageSubpath:s,isScoped:n}=pu(e,t),a=ei(t);if(a.exists){let c=pe(a.pjsonPath);if(a.name===r&&a.exports!==void 0&&a.exports!==null)return ts(c,s,a,t,i)}let u=new T("./node_modules/"+r+"/package.json",t),l=E(u),f;do{if(!fs(l.slice(0,-13)).isDirectory()){f=l,u=new T((n?"../../../../node_modules/":"../../../node_modules/")+r+"/package.json",u),l=E(u);continue}let h=us.read(l,{base:t,specifier:e});return h.exports!==void 0&&h.exports!==null?ts(u,s,h,t,i):s==="."?su(u,h,t):new T(s,u)}while(l.length!==f.length);throw new ti(r,E(t),!1)}function du(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function mu(e){return e===""?!1:e[0]==="/"?!0:du(e)}function gu(e,t,i,r){let s=t.protocol,n=s==="http:"||s==="https:",a;if(mu(e))a=new T(e,t);else if(!n&&e[0]==="#")a=hu(e,t,i);else try{a=new T(e)}catch{n||(a=ps(e,t,i))}return ie(a!==void 0,"expected to be defined"),a.protocol!=="file:"?a:nu(a,t,r)}function Jt(e){return typeof e=="string"&&!e.startsWith("file://")?Xt(e):Xt(E(e))}function xu(e){return typeof e!="string"&&(e=e.toString()),/(node|data|http|https|file):/.test(e)?e:ns.has(e)?"node:"+e:"file://"+encodeURI(Xt(e))}function is(e,t,i){try{return gu(e,t,i)}catch(r){if(!wu.has(r.code))throw r}}function _u(e,t={}){if(/(node|data|http|https):/.test(e))return e;if(ns.has(e))return"node:"+e;if(Gt(e)&&ko(e)){let u=Kt(Jt(e));return pe(u).toString()}let i=t.conditions?new Set(t.conditions):yu,r=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(u=>new URL(xu(u.toString())));r.length===0&&r.push(vu);let s=[...r];for(let u of r)u.protocol==="file:"&&s.push(new URL("./",u),new URL(dt(u.pathname,"_index.js"),u),new URL("node_modules",u));let n;for(let u of s){if(n=is(e,u,i),n)break;for(let l of["","/index"]){for(let f of t.extensions||bu)if(n=is(e+l+f,u,i),n)break;if(n)break}if(n)break}if(!n){let u=new Error(`Cannot find module ${e} imported from ${s.join(", ")}`);throw u.code="ERR_MODULE_NOT_FOUND",u}let a=Kt(Jt(n));return pe(a).toString()}function Su(e,t){return _u(e,t)}function ii(e,t){return Jt(Su(e,t))}function me(e,t){return as(ii,e,t)}function ds(e,t={}){if(!No(e)||!("default"in e))return e;let i=e.default;if(i==null)return e;if(typeof i!="object")return t.preferNamespace?e:i;for(let r in e)if(r==="default")try{r in i||Object.defineProperty(i,r,{enumerable:!1,configurable:!1,get(){return i}})}catch{}else try{r in i||Object.defineProperty(i,r,{enumerable:!0,configurable:!0,get(){return e[r]}})}catch{}return i}var ns,Ro,To,Oo,D,os,Lo,Wr,Do,Ne,Mo,zr,Bo,us,qo,Go,Wo,Kr,Ze,gl,tt,cs,Qo,ti,Jo,Zo,eu,ls,Xr,Qr,tu,et,iu,Jr,ru,yu,vu,bu,wu,ri=P(()=>{Br();mt();qr();ns=new Set(rs);Ro={}.hasOwnProperty,To=/^([A-Z][a-z\d]*)+$/,Oo=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),D={};os=new Map,Lo="__node_internal_";D.ERR_INVALID_ARG_TYPE=z("ERR_INVALID_ARG_TYPE",(e,t,i)=>{ie(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let r="The ";if(e.endsWith(" argument"))r+=`${e} `;else{let u=e.includes(".")?"property":"argument";r+=`"${e}" ${u} `}r+="must be ";let s=[],n=[],a=[];for(let u of t)ie(typeof u=="string","All expected entries have to be of type string"),Oo.has(u)?s.push(u.toLowerCase()):To.exec(u)===null?(ie(u!=="object",'The value "object" should be written as "Object"'),a.push(u)):n.push(u);if(n.length>0){let u=s.indexOf("object");u!==-1&&(s.slice(u,1),n.push("Object"))}return s.length>0&&(r+=`${s.length>1?"one of type":"of type"} ${Wt(s,"or")}`,(n.length>0||a.length>0)&&(r+=" or ")),n.length>0&&(r+=`an instance of ${Wt(n,"or")}`,a.length>0&&(r+=" or ")),a.length>0&&(a.length>1?r+=`one of ${Wt(a,"or")}`:(a[0].toLowerCase()!==a[0]&&(r+="an "),r+=`${a[0]}`)),r+=`. Received ${jo(i)}`,r},TypeError);D.ERR_INVALID_MODULE_SPECIFIER=z("ERR_INVALID_MODULE_SPECIFIER",(e,t,i=void 0)=>`Invalid module "${e}" ${t}${i?` imported from ${i}`:""}`,TypeError);D.ERR_INVALID_PACKAGE_CONFIG=z("ERR_INVALID_PACKAGE_CONFIG",(e,t,i)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${i?`. ${i}`:""}`,Error);D.ERR_INVALID_PACKAGE_TARGET=z("ERR_INVALID_PACKAGE_TARGET",(e,t,i,r=!1,s=void 0)=>{let n=typeof i=="string"&&!r&&i.length>0&&!i.startsWith("./");return t==="."?(ie(r===!1),`Invalid "exports" main target ${JSON.stringify(i)} defined in the package config ${e}package.json${s?` imported from ${s}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${r?"imports":"exports"}" target ${JSON.stringify(i)} defined for '${t}' in the package config ${e}package.json${s?` imported from ${s}`:""}${n?'; targets must start with "./"':""}`},Error);D.ERR_MODULE_NOT_FOUND=z("ERR_MODULE_NOT_FOUND",(e,t,i=!1)=>`Cannot find ${i?"module":"package"} '${e}' imported from ${t}`,Error);D.ERR_NETWORK_IMPORT_DISALLOWED=z("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error);D.ERR_PACKAGE_IMPORT_NOT_DEFINED=z("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,i)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:""} imported from ${i}`,TypeError);D.ERR_PACKAGE_PATH_NOT_EXPORTED=z("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,i=void 0)=>t==="."?`No "exports" main defined in ${e}package.json${i?` imported from ${i}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${i?` imported from ${i}`:""}`,Error);D.ERR_UNSUPPORTED_DIR_IMPORT=z("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error);D.ERR_UNKNOWN_FILE_EXTENSION=z("ERR_UNKNOWN_FILE_EXTENSION",(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError);D.ERR_INVALID_ARG_VALUE=z("ERR_INVALID_ARG_VALUE",(e,t,i="is invalid")=>{let r=Yt(t);return r.length>128&&(r=`${r.slice(0,128)}...`),`The ${e.includes(".")?"property":"argument"} '${e}' ${i}. Received ${r}`},TypeError);Do=Vo(function(e){let t=Qt();return t&&(Wr=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(e),t&&(Error.stackTraceLimit=Wr),e});Ne={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:Mo}=D,zr=new Map,Bo={read:Uo},us=Bo;({ERR_UNKNOWN_FILE_EXTENSION:qo}=D),Go={}.hasOwnProperty,Wo={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"};Kr={__proto__:null,"data:":Ho,"file:":Yo,"http:":Yr,"https:":Yr,"node:"(){return"builtin"}};Ze=RegExp.prototype[Symbol.replace],{ERR_NETWORK_IMPORT_DISALLOWED:gl,ERR_INVALID_MODULE_SPECIFIER:tt,ERR_INVALID_PACKAGE_CONFIG:cs,ERR_INVALID_PACKAGE_TARGET:Qo,ERR_MODULE_NOT_FOUND:ti,ERR_PACKAGE_IMPORT_NOT_DEFINED:Jo,ERR_PACKAGE_PATH_NOT_EXPORTED:Zo,ERR_UNSUPPORTED_DIR_IMPORT:eu}=D,ls={}.hasOwnProperty,Xr=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,Qr=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,tu=/^\.|%|\\/,et=/\*/g,iu=/%2f|%5c/i,Jr=new Set,ru=/[/\\]{2}/;yu=new Set(["node","import"]),vu=pe(__Process$.cwd()),bu=[".mjs",".cjs",".js",".json"],wu=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"])});import vl,{dirname as bl,win32 as Cu,join as wl}from"/v135/path-browserify@1.0.1/es2022/path-browserify.mjs";import Sl,{promises as Cl}from"/v135/node_fs.js";import Il from"/error.js?type=unsupported-node-builtin-module&name=fs/promises&importer=@unocss/preset-icons@0.58.5";import Eu from"/v135/node_process.js";import{fileURLToPath as Nl}from"/v135/url@0.11.3/es2022/url.mjs";function gs(e,t={}){(t.platform==="auto"||!t.platform)&&(t.platform=Eu.platform==="win32"?"win32":"posix");let i=ii(e,{url:t.paths});return t.platform==="win32"?Cu.normalize(i):i}async function xs(e){let t=await import(e);return t&&ds(t)}function ys(e,t={}){return!!Iu(e,t)}function Iu(e,t={}){try{return gs(`${e}/package.json`,t)}catch{}try{return gs(e,t)}catch(i){return i.code!=="MODULE_NOT_FOUND"&&i.code!=="ERR_MODULE_NOT_FOUND"&&console.error(i),!1}}var si,ms,Rl,vs=P(()=>{ri();si=class{value;next;constructor(t){this.value=t}},ms=class{#e;#t;#i;constructor(){this.clear()}enqueue(t){let i=new si(t);this.#e?(this.#t.next=i,this.#t=i):(this.#e=i,this.#t=i),this.#i++}dequeue(){let t=this.#e;if(t)return this.#e=this.#e.next,this.#i--,t.value}clear(){this.#e=void 0,this.#t=void 0,this.#i=0}get size(){return this.#i}*[Symbol.iterator](){let t=this.#e;for(;t;)yield t.value,t=t.next}},Rl=Symbol("findUpStop")});var ws=ct((Ol,ge)=>{"use strict";var re=L("path"),it=L("locate-path"),bs=L("path-exists"),ni=Symbol("findUp.stop");ge.exports=async(e,t={})=>{let i=re.resolve(t.cwd||""),{root:r}=re.parse(i),s=[].concat(e),n=async a=>{if(typeof e!="function")return it(s,a);let u=await e(a.cwd);return typeof u=="string"?it([u],a):u};for(;;){let a=await n({...t,cwd:i});if(a===ni)return;if(a)return re.resolve(i,a);if(i===r)return;i=re.dirname(i)}};ge.exports.sync=(e,t={})=>{let i=re.resolve(t.cwd||""),{root:r}=re.parse(i),s=[].concat(e),n=a=>{if(typeof e!="function")return it.sync(s,a);let u=e(a.cwd);return typeof u=="string"?it.sync([u],a):u};for(;;){let a=n({...t,cwd:i});if(a===ni)return;if(a)return re.resolve(i,a);if(i===r)return;i=re.dirname(i)}};ge.exports.exists=bs;ge.exports.sync.exists=bs.sync;ge.exports.stop=ni});var Ps=ct((Ll,xe)=>{"use strict";var ku=L("path"),ai=L("child_process"),Pu=L("cross-spawn"),Au=L("strip-final-newline"),Nu=L("npm-run-path"),Ru=L("onetime"),rt=L("./lib/error"),Ss=L("./lib/stdio"),{spawnedKill:Tu,spawnedCancel:Ou,setupTimeout:Lu,validateTimeout:Fu,setExitHandler:Vu}=L("./lib/kill"),{handleInput:Du,getSpawnedResult:$u,makeAllStream:ju,validateInputSync:Mu}=L("./lib/stream"),{mergePromise:_s,getSpawnedPromise:Bu}=L("./lib/promise"),{joinCommand:Cs,parseCommand:Es,getEscapedCommand:Is}=L("./lib/command"),Uu=1e3*1e3*100,qu=({env:e,extendEnv:t,preferLocal:i,localDir:r,execPath:s})=>{let n=t?{...__Process$.env,...e}:e;return i?Nu.env({env:n,cwd:r,execPath:s}):n},ks=(e,t,i={})=>{let r=Pu._parse(e,t,i);return e=r.command,t=r.args,i=r.options,i={maxBuffer:Uu,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:i.cwd||__Process$.cwd(),execPath:__Process$.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...i},i.env=qu(i),i.stdio=Ss(i),__Process$.platform==="win32"&&ku.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:i,parsed:r}},Te=(e,t,i)=>typeof t!="string"&&!__Buffer$.isBuffer(t)?i===void 0?void 0:"":e.stripFinalNewline?Au(t):t,st=(e,t,i)=>{let r=ks(e,t,i),s=Cs(e,t),n=Is(e,t);Fu(r.options);let a;try{a=ai.spawn(r.file,r.args,r.options)}catch(y){let b=new ai.ChildProcess,p=Promise.reject(rt({error:y,stdout:"",stderr:"",all:"",command:s,escapedCommand:n,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return _s(b,p)}let u=Bu(a),l=Lu(a,r.options,u),f=Vu(a,r.options,l),c={isCanceled:!1};a.kill=Tu.bind(null,a.kill.bind(a)),a.cancel=Ou.bind(null,a,c);let d=Ru(async()=>{let[{error:y,exitCode:b,signal:p,timedOut:m},A,k,N]=await $u(a,r.options,f),I=Te(r.options,A),Y=Te(r.options,k),se=Te(r.options,N);if(y||b!==0||p!==null){let we=rt({error:y,exitCode:b,signal:p,stdout:I,stderr:Y,all:se,command:s,escapedCommand:n,parsed:r,timedOut:m,isCanceled:c.isCanceled,killed:a.killed});if(!r.options.reject)return we;throw we}return{command:s,escapedCommand:n,exitCode:0,stdout:I,stderr:Y,all:se,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return Du(a,r.options.input),a.all=ju(a,r.options),_s(a,d)};xe.exports=st;xe.exports.sync=(e,t,i)=>{let r=ks(e,t,i),s=Cs(e,t),n=Is(e,t);Mu(r.options);let a;try{a=ai.spawnSync(r.file,r.args,r.options)}catch(f){throw rt({error:f,stdout:"",stderr:"",all:"",command:s,escapedCommand:n,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}let u=Te(r.options,a.stdout,a.error),l=Te(r.options,a.stderr,a.error);if(a.error||a.status!==0||a.signal!==null){let f=rt({stdout:u,stderr:l,error:a.error,signal:a.signal,exitCode:a.status,command:s,escapedCommand:n,parsed:r,timedOut:a.error&&a.error.code==="ETIMEDOUT",isCanceled:!1,killed:a.signal!==null});if(!r.options.reject)return f;throw f}return{command:s,escapedCommand:n,exitCode:0,stdout:u,stderr:l,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};xe.exports.command=(e,t)=>{let[i,...r]=Es(e);return st(i,r,t)};xe.exports.commandSync=(e,t)=>{let[i,...r]=Es(e);return st.sync(i,r,t)};xe.exports.node=(e,t,i={})=>{t&&!Array.isArray(t)&&typeof t=="object"&&(i=t,t=[]);let r=Ss.node(i),s=__Process$.execArgv.filter(u=>!u.startsWith("--inspect")),{nodePath:n=__Process$.execPath,nodeOptions:a=s}=i;return st(n,[...a,e,...Array.isArray(t)?t:[]],{...i,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})}});import As from"/v135/node_fs.js";import Ns from"/v135/path-browserify@1.0.1/es2022/path-browserify.mjs";async function Wu(e=__Process$.cwd()){let t=null,i=await(0,oi.default)(Object.keys(Rs),{cwd:e}),r;if(i?r=Ns.resolve(i,"../package.json"):r=await(0,oi.default)("package.json",{cwd:e}),r&&As.existsSync(r))try{let s=JSON.parse(As.readFileSync(r,"utf8"));if(typeof s.packageManager=="string"){let[n,a]=s.packageManager.split("@");n==="yarn"&&parseInt(a)>1?t="yarn@berry":n==="pnpm"&&parseInt(a)<7?t="pnpm@6":n in Gu?t=n:console.warn("[ni] Unknown packageManager:",s.packageManager)}}catch{}return!t&&i&&(t=Rs[Ns.basename(i)]),t}async function Os(e,t={}){let i=t.packageManager||await Wu(t.cwd)||"npm",[r]=i.split("@");Array.isArray(e)||(e=[e]);let s=t.additionalArgs||[];return t.preferOffline&&(i==="yarn@berry"?s.unshift("--cached"):s.unshift("--prefer-offline")),(0,Ts.default)(r,[r==="yarn"?"add":"install",t.dev?"-D":"",...s,...e].filter(Boolean),{stdio:t.silent?"ignore":"inherit",cwd:t.cwd})}var oi,Ts,Gu,Rs,Ls=P(()=>{oi=oe(ws(),1),Ts=oe(Ps(),1),Gu=["pnpm","yarn","npm","pnpm@6","yarn@berry","bun"],Rs={"bun.lockb":"bun","pnpm-lock.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"}});function ci(e,t){return new Promise(i=>setTimeout(async()=>{await t?.(),i()},e))}var ui,Fs,$l,Vs=P(()=>{ui=class{value;next;constructor(t){this.value=t}},Fs=class{#e;#t;#i;constructor(){this.clear()}enqueue(t){let i=new ui(t);this.#e?(this.#t.next=i,this.#t=i):(this.#e=i,this.#t=i),this.#i++}dequeue(){let t=this.#e;if(t)return this.#e=this.#e.next,this.#i--,t.value}clear(){this.#e=void 0,this.#t=void 0,this.#i=0}get size(){return this.#i}*[Symbol.iterator](){let t=this.#e;for(;t;)yield t.value,t=t.next}},$l=Symbol("p-void")});function w(e,t,i){i===void 0&&(i=1);var r="\x1B["+e+"m",s="\x1B["+t+"m",n=new RegExp("\\x1b\\["+t+"m","g");return function(a){return js.enabled&&js.supportLevel>=i?r+(""+a).replace(n,r)+s:""+a}}var ae,ye,Fe,ve,Oe,Ds,$s,Le,nt,js,Ml,Bl,Ul,ql,Gl,Wl,zl,Hl,Kl,Yl,Xl,Ms,Ql,Jl,Bs,Zl,ef,tf,rf,sf,nf,af,of,uf,cf,lf,ff,hf,pf,df,mf,gf,xf,yf,vf,bf,wf,_f,Sf,Cf,Ve=P(()=>{ae=!0,ye=typeof self<"u"?self:typeof window<"u"?window:typeof __global$<"u"?__global$:{},Fe=0;ye.process&&ye.process.env&&ye.process.stdout&&(ve=ye.process.env,Oe=ve.FORCE_COLOR,Ds=ve.NODE_DISABLE_COLORS,$s=ve.NO_COLOR,Le=ve.TERM,nt=ve.COLORTERM,Ds||$s||Oe==="0"?ae=!1:Oe==="1"||Oe==="2"||Oe==="3"?ae=!0:Le==="dumb"?ae=!1:"CI"in ye.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(function(e){return e in ye.process.env})?ae=!0:ae=__Process$.stdout.isTTY,ae&&(__Process$.platform==="win32"||nt&&(nt==="truecolor"||nt==="24bit")?Fe=3:Le&&(Le.endsWith("-256color")||Le.endsWith("256"))?Fe=2:Fe=1));js={enabled:ae,supportLevel:Fe};Ml=w(0,0),Bl=w(1,22),Ul=w(2,22),ql=w(3,23),Gl=w(4,24),Wl=w(7,27),zl=w(8,28),Hl=w(9,29),Kl=w(30,39),Yl=w(31,39),Xl=w(32,39),Ms=w(33,39),Ql=w(34,39),Jl=w(35,39),Bs=w(36,39),Zl=w(97,39),ef=w(90,39),tf=w(37,39),rf=w(91,39),sf=w(92,39),nf=w(93,39),af=w(94,39),of=w(95,39),uf=w(96,39),cf=w(40,49),lf=w(41,49),ff=w(42,49),hf=w(43,49),pf=w(44,49),df=w(45,49),mf=w(46,49),gf=w(107,49),xf=w(100,49),yf=w(101,49),vf=w(102,49),bf=w(103,49),wf=w(104,49),_f=w(105,49),Sf=w(106,49),Cf=w(47,49)});function at(e){Us.has(e)||(Us.add(e),console.warn(Ms(`[@iconify-loader] ${e}`)))}var Us,li=P(()=>{Ve();Us=new Set});async function fi(e,t){return be&&await be,ot[e]||(console.log(Bs(`Installing ${e}...`)),typeof t=="function"?ot[e]=be=t(e).then(()=>ci(300)).finally(()=>{be=void 0}):ot[e]=be=Os(e,{dev:!0,preferOffline:!0}).then(()=>ci(300)).catch(i=>{at(`Failed to install ${e}`),console.error(i)}).finally(()=>{be=void 0})),ot[e]}var be,ot,qs=P(()=>{Ls();Vs();Ve();li();ot={}});import{promises as Gs}from"/v135/node_fs.js";async function zs(e,t=!1,i="@iconify-json",r=__Process$.cwd()){return await hi[e]||(hi[e]=s()),hi[e];async function s(){let n=i.length===0?e:`${i}/${e}`,a=await me(`${n}/icons.json`,{url:r}).catch(()=>{});if(i==="@iconify-json"?(!a&&Ws&&(a=await me(`@iconify/json/json/${e}.json`,{url:r}).catch(()=>{})),!a&&!Ws&&t&&(await fi(n,t),a=await me(`${n}/icons.json`,{url:r}).catch(()=>{}))):!a&&t&&(await fi(n,t),a=await me(`${n}/icons.json`,{url:r}).catch(()=>{})),!a){let l=await me(n,{url:r}).catch(()=>{});if(l?.match(/^[a-z]:/i)&&(l=`file:///${l}`.replace(/\\/g,"/")),l){let{icons:f}=await xs(l);if(f)return f}}let u;try{u=a?await Gs.lstat(a):void 0}catch{return}if(u?.isFile())return JSON.parse(await Gs.readFile(a,"utf8"))}}var hi,Ws,Hs=P(()=>{vs();qs();ri();Ve();hi={},Ws=ys("@iconify/json")});function Ks(e){return e.replace(/(['"])\s*\n\s*([^>\\/\s])/g,"$1 $2").replace(/(["';{}><])\s*\n\s*/g,"$1").replace(/\s*\n\s*/g," ").replace(/\s+"/g,'"').replace(/="\s+/g,'="').replace(/(\s)+\/>/g,"/>").trim()}var Ys=P(()=>{});async function pi(e,t,i,r){let s;zu(`${t}:${i}`);try{if(typeof e=="function")s=await e(i);else{let n=e[i];s=typeof n=="function"?await n():n}}catch(n){console.warn(`Failed to load custom icon "${i}" in "${t}":`,n);return}if(s){let n=s.indexOf("0&&(s=s.slice(n));let{transform:a}=r?.customizations??{};return s=typeof a=="function"?await a(s,t,i):s,s.startsWith("{Xs=oe(Se(),1);Ue();Ys();zu=(0,Xs.default)("@iconify-loader:custom")});var Wf,Js,Zs=P(()=>{Qs();At();Wf=oe(Se(),1),Js=async(e,t,i)=>{let r=i?.customCollections?.[e];if(r)if(typeof r=="function"){let s;try{s=await r(t)}catch(n){console.warn(`Failed to load custom icon "${t}" in "${e}":`,n);return}if(s){if(typeof s=="string")return await pi(()=>s,e,t,i);if("icons"in s){let n=[t,t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.replace(/([a-z])(\d+)/g,"$1-$2")];return await Ge(s,e,n,i)}}}else return await pi(r,e,t,i)}});var en={};un(en,{loadNodeIcon:()=>Hu});import"/v135/node_fs.js";var Jf,Hu,tn=P(()=>{At();Hs();li();Zs();Ue();Jf=oe(Se(),1);Ve();Hu=async(e,t,i)=>{let r=await Js(e,t,i);if(r)return r;let s=await zs(e,i?.autoInstall,void 0,i?.cwd);return s&&(r=await Ge(s,e,Ji(t),i)),!r&&i?.warn&&at(`failed to load ${i.warn} icon`),r}});var ln=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,fn=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,hn=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function pn(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){dn(e);return}return t}function dn(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function mi(e,t={}){if(typeof e!="string")return e;let i=e.trim();if(e[0]==='"'&&e.at(-1)==='"'&&!e.includes("\\"))return i.slice(1,-1);if(i.length<=9){let r=i.toLowerCase();if(r==="true")return!0;if(r==="false")return!1;if(r==="undefined")return;if(r==="null")return null;if(r==="nan")return Number.NaN;if(r==="infinity")return Number.POSITIVE_INFINITY;if(r==="-infinity")return Number.NEGATIVE_INFINITY}if(!hn.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(ln.test(e)||fn.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,pn)}return JSON.parse(e)}catch(r){if(t.strict)throw r;return e}}mt();var gt=class extends Error{constructor(t,i){super(t,i),this.name="FetchError",i?.cause&&!this.cause&&(this.cause=i.cause)}};function jn(e){let t=e.error?.message||e.error?.toString()||"",i=e.request?.method||e.options?.method||"GET",r=e.request?.url||String(e.request)||"/",s=`[${i}] ${JSON.stringify(r)}`,n=e.response?`${e.response.status} ${e.response.statusText}`:"",a=`${s}: ${n}${t?` ${t}`:""}`,u=new gt(a,e.error?{cause:e.error}:void 0);for(let l of["request","options","response"])Object.defineProperty(u,l,{get(){return e[l]}});for(let[l,f]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(u,l,{get(){return e.response&&e.response[f]}});return u}var Mn=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function Si(e="GET"){return Mn.has(e.toUpperCase())}function Bn(e){if(e===void 0)return!1;let t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}var Un=new Set(["image/svg","application/xml","application/xhtml","application/html"]),qn=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Gn(e=""){if(!e)return"json";let t=e.split(";").shift()||"";return qn.test(t)?"json":Un.has(t)||t.startsWith("text/")?"text":"blob"}function Wn(e,t,i=globalThis.Headers){let r={...t,...e};if(t?.params&&e?.params&&(r.params={...t?.params,...e?.params}),t?.query&&e?.query&&(r.query={...t?.query,...e?.query}),t?.headers&&e?.headers){r.headers=new i(t?.headers||{});for(let[s,n]of new i(e?.headers||{}))r.headers.set(s,n)}return r}var zn=new Set([408,409,425,429,500,502,503,504]),Hn=new Set([101,204,205,304]);function xt(e={}){let{fetch:t=globalThis.fetch,Headers:i=globalThis.Headers,AbortController:r=globalThis.AbortController}=e;async function s(u){let l=u.error&&u.error.name==="AbortError"&&!u.options.timeout||!1;if(u.options.retry!==!1&&!l){let c;typeof u.options.retry=="number"?c=u.options.retry:c=Si(u.options.method)?0:1;let h=u.response&&u.response.status||500;if(c>0&&(Array.isArray(u.options.retryStatusCodes)?u.options.retryStatusCodes.includes(h):zn.has(h))){let d=u.options.retryDelay||0;return d>0&&await new Promise(y=>setTimeout(y,d)),n(u.request,{...u.options,retry:c-1,timeout:u.options.timeout})}}let f=jn(u);throw Error.captureStackTrace&&Error.captureStackTrace(f,n),f}let n=async function(l,f={}){let c={request:l,options:Wn(f,e.defaults,i),response:void 0,error:void 0};if(c.options.method=c.options.method?.toUpperCase(),c.options.onRequest&&await c.options.onRequest(c),typeof c.request=="string"&&(c.options.baseURL&&(c.request=vi(c.request,c.options.baseURL)),(c.options.query||c.options.params)&&(c.request=bi(c.request,{...c.options.params,...c.options.query}))),c.options.body&&Si(c.options.method)&&(Bn(c.options.body)?(c.options.body=typeof c.options.body=="string"?c.options.body:JSON.stringify(c.options.body),c.options.headers=new i(c.options.headers||{}),c.options.headers.has("content-type")||c.options.headers.set("content-type","application/json"),c.options.headers.has("accept")||c.options.headers.set("accept","application/json")):("pipeTo"in c.options.body&&typeof c.options.body.pipeTo=="function"||typeof c.options.body.pipe=="function")&&("duplex"in c.options||(c.options.duplex="half"))),!c.options.signal&&c.options.timeout){let d=new r;setTimeout(()=>d.abort(),c.options.timeout),c.options.signal=d.signal}try{c.response=await t(c.request,c.options)}catch(d){return c.error=d,c.options.onRequestError&&await c.options.onRequestError(c),await s(c)}if(c.response.body&&!Hn.has(c.response.status)&&c.options.method!=="HEAD"){let d=(c.options.parseResponse?"json":c.options.responseType)||Gn(c.response.headers.get("content-type")||"");switch(d){case"json":{let y=await c.response.text(),b=c.options.parseResponse||mi;c.response._data=b(y);break}case"stream":{c.response._data=c.response.body;break}default:c.response._data=await c.response[d]()}}return c.options.onResponse&&await c.options.onResponse(c),!c.options.ignoreResponseError&&c.response.status>=400&&c.response.status<600?(c.options.onResponseError&&await c.options.onResponseError(c),await s(c)):c.response},a=async function(l,f){return(await n(l,f))._data};return a.raw=n,a.native=(...u)=>t(...u),a.create=(u={})=>xt({...e,defaults:{...e.defaults,...u}}),a}var yt=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof __global$<"u")return __global$;throw new Error("unable to locate global object")}(),Kn=yt.fetch||(()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!"))),Yn=yt.Headers,Xn=yt.AbortController,Qn=xt({fetch:Kn,Headers:Yn,AbortController:Xn}),Ci=Qn;var Ei=new Set;function Ii(e){Ei.has(e)||(console.warn("[unocss]",e),Ei.add(e))}var Jn="default",Zn="preflights",ea="shortcuts",ta="imports",ac={[ta]:-200,[Zn]:-100,[ea]:-10,[Jn]:0};var ia=Object.freeze({left:0,top:0,width:16,height:16}),$e=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ri=Object.freeze({...ia,...$e}),ra=Object.freeze({...Ri,body:"",hidden:!1}),sa=Object.freeze({width:null,height:null}),Ti=Object.freeze({...sa,...$e});function na(e,t){let i={};!e.hFlip!=!t.hFlip&&(i.hFlip=!0),!e.vFlip!=!t.vFlip&&(i.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(i.rotate=r),i}function ki(e,t){let i=na(e,t);for(let r in ra)r in $e?r in e&&!(r in i)&&(i[r]=$e[r]):r in t?i[r]=t[r]:r in e&&(i[r]=e[r]);return i}function aa(e,t){let i=e.icons,r=e.aliases||Object.create(null),s=Object.create(null);function n(a){if(i[a])return s[a]=[];if(!(a in s)){s[a]=null;let u=r[a]&&r[a].parent,l=u&&n(u);l&&(s[a]=[u].concat(l))}return s[a]}return(t||Object.keys(i).concat(Object.keys(r))).forEach(n),s}function Pi(e,t,i){let r=e.icons,s=e.aliases||Object.create(null),n={};function a(u){n=ki(r[u]||s[u],n)}return a(t),i.forEach(a),ki(e,n)}function oa(e,t){if(e.icons[t])return Pi(e,t,[]);let i=aa(e,[t])[t];return i?Pi(e,t,i):null}var ua=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ca=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ai(e,t,i){if(t===1)return e;if(i=i||100,typeof e=="number")return Math.ceil(e*t*i)/i;if(typeof e!="string")return e;let r=e.split(ua);if(r===null||!r.length)return e;let s=[],n=r.shift(),a=ca.test(n);for(;;){if(a){let u=parseFloat(n);isNaN(u)?s.push(n):s.push(Math.ceil(u*t*i)/i)}else s.push(n);if(n=r.shift(),n===void 0)return s.join("");a=!a}}function la(e,t="defs"){let i="",r=e.indexOf("<"+t);for(;r>=0;){let s=e.indexOf(">",r),n=e.indexOf("",n);if(a===-1)break;i+=e.slice(s+1,n).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:i,content:e}}function fa(e,t){return e?""+e+""+t:t}function ha(e,t,i){let r=la(e);return fa(r.defs,t+r.content+i)}var bt=e=>e==="unset"||e==="undefined"||e==="none";function pa(e,t){let i={...Ri,...e},r={...Ti,...t},s={left:i.left,top:i.top,width:i.width,height:i.height},n=i.body;[i,r].forEach(p=>{let m=[],A=p.hFlip,k=p.vFlip,N=p.rotate;A?k?N+=2:(m.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),m.push("scale(-1 1)"),s.top=s.left=0):k&&(m.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),m.push("scale(1 -1)"),s.top=s.left=0);let I;switch(N<0&&(N-=Math.floor(N/4)*4),N=N%4,N){case 1:I=s.height/2+s.top,m.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:m.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:I=s.width/2+s.left,m.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}N%2===1&&(s.left!==s.top&&(I=s.left,s.left=s.top,s.top=I),s.width!==s.height&&(I=s.width,s.width=s.height,s.height=I)),m.length&&(n=ha(n,'',""))});let a=r.width,u=r.height,l=s.width,f=s.height,c,h;a===null?(h=u===null?"1em":u==="auto"?f:u,c=Ai(h,l/f)):(c=a==="auto"?l:a,h=u===null?Ai(c,f/l):u==="auto"?f:u);let d={},y=(p,m)=>{bt(m)||(d[p]=m.toString())};y("width",c),y("height",h);let b=[s.left,s.top,l,f];return d.viewBox=b.join(" "),{attributes:d,viewBox:b,body:n}}function da(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function ma(e){let t=e.startsWith("")?e.replace("",""):e;return!t.includes(" xmlns:xlink=")&&t.includes(" xlink:")&&(t=t.replace("\\/\s])/g,"$1 $2").replace(/(["';{}><])\s*\n\s*/g,"$1").replace(/\s*\n\s*/g," ").replace(/\s+"/g,'"').replace(/="\s+/g,'="').replace(/(\s)+\/>/g,"/>").trim()}var xa=/\swidth\s*=\s*["']([\w.]+)["']/,ya=/\sheight\s*=\s*["']([\w.]+)["']/,vt=/")),s=(n,a)=>{let u=a.exec(r),l=u!=null,f=t[n];return!f&&!bt(f)&&(typeof i=="number"?i>0&&(t[n]=`${i}em`):u&&(t[n]=u[1])),l};return[s("width",xa),s("height",ya)]}async function Oi(e,t,i,r,s,n){let{scale:a,addXmlNs:u=!1}=r??{},{additionalProps:l={},iconCustomizer:f}=r?.customizations??{},c=await s?.()??{};await f?.(t,i,c),Object.keys(l).forEach(p=>{let m=l[p];m!=null&&(c[p]=m)}),n?.(c);let[h,d]=va(e,c,a);u&&(!e.includes("xmlns=")&&!c.xmlns&&(c.xmlns="http://www.w3.org/2000/svg"),!e.includes("xmlns:xlink=")&&e.includes("xlink:")&&!c["xmlns:xlink"]&&(c["xmlns:xlink"]="http://www.w3.org/1999/xlink"));let y=Object.keys(c).map(p=>p==="width"&&h||p==="height"&&d?null:`${p}="${c[p]}"`).filter(p=>p!=null);if(y.length&&(e=e.replace(vt,`{let m=c[p];m!=null&&(b[p]=m)}),typeof c.width<"u"&&c.width!==null&&(b.width=c.width),typeof c.height<"u"&&c.height!==null&&(b.height=c.height)),e}async function Ni(e,t,i,r){let s;try{if(typeof e=="function")s=await e(i);else{let n=e[i];s=typeof n=="function"?await n():n}}catch(n){console.warn(`Failed to load custom icon "${i}" in "${t}":`,n);return}if(s){let n=s.indexOf("0&&(s=s.slice(n));let{transform:a}=r?.customizations??{};return s=typeof a=="function"?await a(s,t,i):s,s.startsWith("${h}`,t,a,r,()=>({...c}),y=>{let b=(p,m)=>{let A=y[p],k;if(!bt(A)){if(A)return;typeof d=="number"?d&&(k=`${d}em`):k=m}k?y[p]=k:delete y[p]};b("width",l),b("height",f)})}}var wt=async(e,t,i)=>{let r=i?.customCollections?.[e];if(r)if(typeof r=="function"){let s;try{s=await r(t)}catch(n){console.warn(`Failed to load custom icon "${t}" in "${e}":`,n);return}if(s){if(typeof s=="string")return await Ni(()=>s,e,t,i);if("icons"in s){let n=[t,t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.replace(/([a-z])(\d+)/g,"$1-$2")];return await Li(s,e,n,i)}}}else return await Ni(r,e,t,i)};function ba(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wa=["academicons","akar-icons","ant-design","arcticons","basil","bi","bitcoin-icons","bpmn","brandico","bx","bxl","bxs","bytesize","carbon","cbi","charm","ci","cib","cif","cil","circle-flags","circum","clarity","codicon","covid","cryptocurrency-color","cryptocurrency","dashicons","devicon-line","devicon-original","devicon-plain","devicon","ei","el","emblemicons","emojione-monotone","emojione-v1","emojione","entypo-social","entypo","eos-icons","ep","et","eva","f7","fa-brands","fa-regular","fa-solid","fa","fa6-brands","fa6-regular","fa6-solid","fad","fe","feather","file-icons","flag","flagpack","flat-color-icons","flat-ui","flowbite","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","geo","gg","gis","gravity-ui","gridicons","grommet-icons","guidance","healthicons","heroicons-outline","heroicons-solid","heroicons","humbleicons","ic","icomoon-free","icon-park-outline","icon-park-solid","icon-park-twotone","icon-park","iconamoon","iconoir","icons8","il","ion","iwwa","jam","la","lets-icons","line-md","logos","ls","lucide","majesticons","maki","map","material-symbols-light","material-symbols","mdi-light","mdi","medical-icon","memory","meteocons","mi","mingcute","mono-icons","mynaui","nimbus","nonicons","noto-v1","noto","octicon","oi","ooui","openmoji","oui","pajamas","pepicons-pencil","pepicons-pop","pepicons-print","pepicons","ph","pixelarticons","prime","ps","quill","radix-icons","raphael","ri","si-glyph","simple-icons","simple-line-icons","skill-icons","solar","streamline-emojis","streamline","subway","svg-spinners","system-uicons","tabler","tdesign","teenyicons","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","vaadin","vs","vscode-icons","websymbol","whh","wi","wpf","zmdi","zondicons"],_a=ba(wa),Sa=3;function Fi(e){return(t={})=>{let{scale:i=1,mode:r="auto",prefix:s="i-",warn:n=!1,collections:a,extraProperties:u={},customizations:l={},autoInstall:f=!1,collectionsNodeResolvePath:c,layer:h="icons",unit:d}=t,y=_t(),b={addXmlNs:!0,scale:i,customCollections:a,autoInstall:f,cwd:c,warn:void 0,customizations:{...l,additionalProps:{...u},trimCustomSvg:!0,async iconCustomizer(m,A,k){await l.iconCustomizer?.(m,A,k),d&&(k.width||(k.width=`${i}${d}`),k.height||(k.height=`${i}${d}`))}}},p;return{name:"@unocss/preset-icons",enforce:"pre",options:t,layers:{icons:-30},rules:[[/^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,async([m,A,k=r])=>{let N="",I="",Y;p=p||await e(t);let se={};if(A.includes(":"))[N,I]=A.split(":"),Y=await p(N,I,{...b,usedProps:se});else{let di=A.split(/-/g);for(let De=Sa;De>=1&&(N=di.slice(0,De).join("-"),I=di.slice(De).join("-"),Y=await p(N,I,{...b,usedProps:se}),!Y);De--);}if(!Y){n&&!y.isESLint&&Ii(`failed to load icon "${m}"`);return}let we=`url("data:image/svg+xml;utf8,${ma(Y)}")`;return k==="auto"&&(k=Y.includes("currentColor")?"mask":"bg"),k==="mask"?{"--un-icon":we,"-webkit-mask":"var(--un-icon) no-repeat",mask:"var(--un-icon) no-repeat","-webkit-mask-size":"100% 100%","mask-size":"100% 100%","background-color":"currentColor",color:"inherit",...se}:{background:`${we} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...se}},{layer:h,prefix:s}]]}}}function Vi(e){return async(...t)=>{for(let i of e){if(!i)continue;let r=await i(...t);if(r)return r}}}function Di(e,t){let i=new Map;function r(s){if(_a.includes(s))return i.has(s)||i.set(s,e(`${t}@iconify-json/${s}/icons.json`)),i.get(s)}return async(s,n,a)=>{let u=await wt(s,n,a);if(u)return u;let l=await r(s);if(l){let f=[n,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),n.replace(/([a-z])(\d+)/g,"$1-$2")];u=await Li(l,s,f,a)}return u}}function _t(){let e=typeof __Process$<"u"&&__Process$.stdout&&!__Process$.versions.deno,t=e&&!!__Process$.env.VSCODE_CWD,i=e&&!!__Process$.env.ESLINT;return{isNode:e,isVSCode:t,isESLint:i}}function $i(e){return Di(Ci,e)}async function Ku(){try{return await Promise.resolve().then(()=>(tn(),en)).then(e=>e?.loadNodeIcon)}catch{}try{return L("@iconify/utils/lib/loader/node-loader.cjs").loadNodeIcon}catch{}}var Yu=Fi(async e=>{let{cdn:t}=e,i=[],{isNode:r,isVSCode:s,isESLint:n}=_t();if(r&&!s&&!n){let a=await Ku();a!==void 0&&i.push(a)}return t&&i.push($i(t)),i.push(wt),Vi(i)});export{Yu as presetIcons}; -//# sourceMappingURL=preset-icons.bundle.mjs.map \ No newline at end of file diff --git a/src/worker.js b/src/worker.js index 2547da5..9d0d253 100644 --- a/src/worker.js +++ b/src/worker.js @@ -176,3 +176,4 @@ if (IS_ELECTRON) { } Object.assign((globalThis.__enhancerApi ??= {}), { queryDatabase }); +globalThis.__enhancerReady?.();