@frontfriend/sdk 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vite.js CHANGED
@@ -1,9 +1,24 @@
1
- var y=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var N=y((Ve,ie)=>{ie.exports={name:"@frontfriend/sdk",version:"1.2.0"}});var I=y((Ge,$)=>{var{name:se}=N();$.exports={PACKAGE_NAME:se}});var P=y((Ke,L)=>{var oe="https://app.frontfriend.dev",ce=".cache/frontfriend",ae={JS:["tokens.js","variables.js","semanticVariables.js","semanticDarkVariables.js","keyframes.js","animations.js","safelist.js","custom.js"],JSON:["fonts.json","icons.json","components-config.json","iconLibrary.json","version.json","versionMetadata.json","metadata.json","base.json","nativeTokens.json"]},le={FF_ID:"FF_ID",FF_API_URL:"FF_API_URL",FF_AUTH_TOKEN:"FF_AUTH_TOKEN",FF_MACHINE_TOKEN:"FRONTFRIEND_MACHINE_TOKEN"};function ue(n){if(!n)return null;try{let e=new URL(n);return e.hostname.startsWith("app.")?`${e.protocol}//${e.hostname.replace(/^app\./,"registry.")}`:null}catch{return null}}L.exports={DEFAULT_API_URL:oe,CACHE_DIR_NAME:ce,CACHE_TTL_DAYS:7,CACHE_TTL_MS:6048e5,CACHE_FILES:ae,ENV_VARS:le,deriveRegistryFromApiUrl:ue}});var q=y((We,M)=>{var g=class extends Error{constructor(e,t,r){super(e),this.name="APIError",this.statusCode=t,this.url=r,this.code=`API_${t}`}},j=class extends Error{constructor(e,t){super(e),this.name="CacheError",this.operation=t,this.code=`CACHE_${t.toUpperCase()}`}},x=class extends Error{constructor(e,t){super(e),this.name="ConfigError",this.field=t,this.code=t?`CONFIG_${String(t).toUpperCase()}`:"CONFIG_ERROR"}},A=class extends Error{constructor(e,t){super(e),this.name="ProcessingError",this.token=t,this.code="PROCESSING_ERROR"}};M.exports={APIError:g,CacheError:j,ConfigError:x,ProcessingError:A}});var U=y((Ye,H)=>{var l=require("fs");function fe(n){try{let e=l.readFileSync(n,"utf8");return JSON.parse(e)}catch(e){if(e.code==="ENOENT")return null;throw e}}function he(n){try{return l.readFileSync(n,"utf8").replace(/^\uFEFF/,"")}catch(e){if(e.code==="ENOENT")return null;throw e}}function me(n,e,t=2){let r=JSON.stringify(e,null,t);l.writeFileSync(n,r,"utf8")}function de(n,e){l.writeFileSync(n,e,"utf8")}function ye(n,e){if(e==null||typeof e=="object"&&Object.keys(e).length===0||Array.isArray(e)&&e.length===0){let r=`module.exports = ${Array.isArray(e)?"[]":"{}"};`;l.writeFileSync(n,r,"utf8")}else{let t=`module.exports = ${JSON.stringify(e,null,2)};`;l.writeFileSync(n,t,"utf8")}}function pe(n){return l.existsSync(n)}function Se(n){l.mkdirSync(n,{recursive:!0})}function Fe(n){l.rmSync(n,{recursive:!0,force:!0})}function we(n){l.rmSync(n,{force:!0})}function _e(n,e){l.mkdirSync(require("path").dirname(n),{recursive:!0,mode:448});let t=`${n}.${process.pid}.${Date.now()}.tmp`;try{l.writeFileSync(t,`${JSON.stringify(e,null,2)}
2
- `,{mode:384}),l.renameSync(t,n);try{l.chmodSync(n,384)}catch{}}finally{l.rmSync(t,{force:!0})}}async function Ce(n,e,t){l.mkdirSync(require("path").dirname(n),{recursive:!0,mode:448});let r=`${n}.lock`,s=Date.now()+2e4,i;for(;i===void 0;)try{i=l.openSync(r,"wx",384),l.writeFileSync(i,String(process.pid))}catch(a){if(a.code!=="EEXIST")throw a;try{let o=Number(l.readFileSync(r,"utf8"));if(Number.isInteger(o)&&o>0)try{process.kill(o,0)}catch(d){if(d.code==="ESRCH"){l.unlinkSync(r);continue}}}catch(o){if(o.code==="ENOENT")continue}if(Date.now()>=s)throw t();await new Promise(o=>setTimeout(o,50))}try{return await e()}finally{l.closeSync(i),l.unlinkSync(r)}}H.exports={writePrivateJsonFileAtomic:_e,withPrivateFileLock:Ce,readJsonFileSafe:fe,readFileSafe:he,writeJsonFile:me,writeTextFile:de,writeModuleExportsFile:ye,fileExists:pe,ensureDirectoryExists:Se,removeDirectory:Fe,removeFile:we}});var D=y((Be,J)=>{var Ee="classes.txt",ge="classes.css";J.exports={CLASSES_SOURCE_FILE:Ee,CSS_CLASSES_SOURCE_FILE:ge}});var B=y((Xe,Y)=>{var h=require("path"),{CACHE_DIR_NAME:je,CACHE_TTL_MS:xe,CACHE_FILES:V}=P(),{CacheError:v}=q(),{readJsonFileSafe:C,readFileSafe:Ae,writeJsonFile:G,writeTextFile:K,writeModuleExportsFile:W,fileExists:b,ensureDirectoryExists:De,removeDirectory:ve,removeFile:be}=U(),{CLASSES_SOURCE_FILE:Oe,CSS_CLASSES_SOURCE_FILE:Te}=D(),O=class n{constructor(e=process.cwd()){this.appRoot=e,this.cacheDir=h.join(e,"node_modules",je),this.metadataFile=h.join(this.cacheDir,"metadata.json"),this.maxAge=xe}getCacheDir(){return this.cacheDir}isLocalOnly(){return C(this.metadataFile)?.version==="local-components"}getIconLibrary(){let e=h.join(this.cacheDir,"iconLibrary.json");return b(e)?C(e):null}exists(){return b(this.cacheDir)}isValid(){if(!this.exists())return!1;try{let e=C(this.metadataFile);if(!e)return!1;let t=new Date(e.timestamp).getTime();return Date.now()-t<this.maxAge}catch{return!1}}load(){if(!this.exists())return null;try{let e={};for(let t of V.JS){let r=h.join(this.cacheDir,t);if(b(r)){let s=t.replace(".js","");try{let i=Ae(r);if(i!==null){let a={},o={exports:a};new Function("module","exports",i)(o,a),e[s]=o.exports}}catch(i){console.warn(`[Frontfriend] Failed to load ${t}: ${i.message}`),(i.message.includes("Unexpected token")||i.message.includes("Invalid character"))&&console.warn("[Frontfriend] This might be a BOM or encoding issue. Try deleting node_modules/.cache/frontfriend and running `npx frontfriend init` again.")}}}for(let t of V.JSON){let r=h.join(this.cacheDir,t),s=t.replace(".json",""),i=C(r);i!==null&&(e[s]=i)}return e["components-config"]&&(e.componentsConfig=e["components-config"],delete e["components-config"]),e.cls&&!e.safelist&&(e.safelist=e.cls,delete e.cls),e}catch(e){throw new v(`Failed to load cache: ${e.message}`,"read")}}save(e){try{De(this.cacheDir);let t={timestamp:new Date().toISOString(),version:e.metadata?.version||"2.0.0",ffId:e.metadata?.ffId},r=["tokens","variables","semanticVariables","semanticDarkVariables","keyframes","animations","safelist","custom"];for(let i of r)if(e[i]!==void 0){let a=h.join(this.cacheDir,`${i}.js`);W(a,e[i])}if(e.safelist&&Array.isArray(e.safelist)){let i=h.join(this.cacheDir,"safelist.js");W(i,e.safelist)}let s={fonts:e.fonts,icons:e.icons||e.iconSet,"components-config":e.componentsConfig,iconLibrary:e.iconLibrary,version:e.version,versionMetadata:e.versionMetadata,base:e.base,nativeTokens:e.nativeTokens};for(let[i,a]of Object.entries(s))if(a!==void 0){let o=h.join(this.cacheDir,`${i}.json`);G(o,a)}e.themeCSS!==void 0&&K(h.join(this.cacheDir,"theme.css"),e.themeCSS),e.classesContent!==void 0&&(K(h.join(this.cacheDir,Oe),e.classesContent),be(h.join(this.cacheDir,Te))),G(this.metadataFile,t)}catch(t){throw new v(`Failed to save cache: ${t.message}`,"write")}}saveAtomic(e,t=()=>{}){let r=require("node:fs"),{randomUUID:s}=require("node:crypto");r.mkdirSync(h.dirname(this.cacheDir),{recursive:!0});let i=`${this.cacheDir}.write-lock`,a;try{a=r.openSync(i,"wx")}catch(c){if(c.code!=="EEXIST")throw c;let u=Number(r.readFileSync(i,"utf8")),f=!0;if(u>0)try{process.kill(u,0)}catch(F){f=F.code!=="ESRCH"}if(f)throw new v("Another process is installing tokens. Retry after it completes.","write");r.unlinkSync(i),a=r.openSync(i,"wx")}let o=`${this.cacheDir}.previous`,d=`${this.cacheDir}.${s()}.pending`;try{r.writeFileSync(a,String(process.pid)),!r.existsSync(this.cacheDir)&&r.existsSync(o)&&r.renameSync(o,this.cacheDir);let c=new n(this.appRoot);c.cacheDir=d,c.metadataFile=h.join(d,"metadata.json"),c.save(e),r.existsSync(o)&&r.rmSync(o,{recursive:!0}),r.existsSync(this.cacheDir)&&r.renameSync(this.cacheDir,o);try{r.renameSync(d,this.cacheDir),t()}catch(u){throw r.rmSync(this.cacheDir,{recursive:!0,force:!0}),r.existsSync(o)&&r.renameSync(o,this.cacheDir),u}r.rmSync(o,{recursive:!0,force:!0})}finally{r.rmSync(d,{recursive:!0,force:!0}),r.closeSync(a),r.rmSync(i,{force:!0})}}clear(){this.exists()&&ve(this.cacheDir)}};Y.exports=O});var Z=y((ze,Q)=>{function p(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function T(n,e){if(!p(n)||!p(e))return e===void 0?n:e;let t={...n};for(let[r,s]of Object.entries(e))t[r]=r in t?T(t[r],s):s;return t}function R(n,e,t=[],r=[]){if(n===void 0||e===void 0)return r;if(!p(n)||!p(e))return r.push(t.join(".")),r;for(let s of Object.keys(n))s in e&&R(n[s],e[s],[...t,s],r);return r}function X(n){return p(n)&&("styles"in n||"behavior"in n)}function z(n,e="component"){if(!X(n)||!p(n.styles)||n.behavior!==void 0&&!p(n.behavior)||Object.keys(n).some(r=>!["styles","behavior"].includes(r)))throw new TypeError(`Component ${e} must use the styles/behavior envelope`);let t=R(n.styles,n.behavior,[e]);if(t.length>0)throw new Error(`Component config styles/behavior conflict at ${t.join(", ")}`);return T(n.styles||{},n.behavior||{})}function Re(n){if(!p(n))return n;let e=!1,t={};for(let[r,s]of Object.entries(n))t[r]=z(s,r),t[r]!==s&&(e=!0);return e?t:n}Q.exports={isPlainObject:p,deepMerge:T,findTreeConflicts:R,isComponentEnvelope:X,toRuntimeComponentConfig:z,toRuntimeComponentsConfig:Re}});var re=y((Qe,te)=>{var{toRuntimeComponentConfig:ke}=Z(),k='FrontFriend components configuration not found. Run "npx frontfriend init" or "npx frontfriend sync".',Ne="FrontFriend components configuration was not returned by the SaaS app. The cache was not updated.";function ee(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function ne(n,e=k){if(!ee(n)||Object.keys(n).length===0)throw new Error(e);for(let[t,r]of Object.entries(n))ke(r,t);return n}function $e(n){if(!n.exists())throw new Error(k);let e=n.load();return{componentsConfig:ne(e?.componentsConfig),icons:ee(e.icons)?e.icons:{}}}te.exports={CACHE_ERROR_MESSAGE:k,SAAS_ERROR_MESSAGE:Ne,assertComponentsConfig:ne,loadCachedComponents:$e}});var{PACKAGE_NAME:E}=I(),w=require("fs"),m=require("path"),Ie=B(),{loadCachedComponents:Le}=re(),{CLASSES_SOURCE_FILE:Pe}=D();function Me(n){return n.split(m.sep).join("/")}function qe(n,e){let t=Me(m.relative(m.dirname(n),e));return t.startsWith(".")||(t=`./${t}`),`@source "${t}";`}function He(n){let e=n.replace(/\/\*[\s\S]*?\*\//g,"");return/@tailwind\s+utilities\b/.test(e)||/@import\s+(?:url\(\s*)?["']tailwindcss(?:\/(?:index|utilities)(?:\.css)?)?["']/.test(e)||/@import\s+url\(\s*tailwindcss(?:\/(?:index|utilities)(?:\.css)?)?\s*\)/.test(e)}function Ue(n,e,t){let r=m.join(n,"metadata.json"),s=null,i=(a,o)=>{a.mtimeMs!==o.mtimeMs&&(clearTimeout(s),s=setTimeout(t,100))};return w.watchFile(r,{interval:e,persistent:!1},i),()=>{clearTimeout(s),w.unwatchFile(r,i)}}module.exports=function(e={}){let t=e.fixture===!0,r,s,i,a,o;function d(c){if(t)return a={componentsConfig:{fixture:{styles:{}}},icons:{}},a;let u=c||process.cwd(),f=new Ie(u);return s=typeof f.getCacheDir=="function"?f.getCacheDir():m.join(u,"node_modules",".cache","frontfriend"),a=Le(f),a}return{name:E.slice(1).replace("/","-"),enforce:"pre",config(c={}){let{componentsConfig:u,icons:f}=d(c.root||process.cwd());if(i=t?[m.join(__dirname,"src","theme.css"),m.join(__dirname,"..","src","theme.css"),m.join(__dirname,"theme.css")].find(S=>w.existsSync(S)):m.join(s,"theme.css"),!i)throw new Error("FrontFriend fixture theme.css not found.");let F=[`${E}/theme.css`,`${E}/theme`].map(S=>({find:S,replacement:i,...!w.existsSync(i)&&{customResolver(){throw new Error(`FrontFriend theme.css not found in ${s}. Run "npx frontfriend init" or "npx frontfriend sync" to generate the Tailwind v4 theme.`)}}})),_=m.join(__dirname,"browser.mjs");return{define:{__FF_CONFIG__:JSON.stringify(u),__FF_ICONS__:JSON.stringify(f)},resolve:{alias:[{find:new RegExp(`^${E}$`),replacement:_},...F]}}},configResolved(c){r=c,s=s||m.join(c?.root||process.cwd(),"node_modules",".cache","frontfriend")},configureServer(c){t||!s||(o?.(),o=Ue(s,e.cacheWatchInterval??500,()=>{let u="[FrontFriend Vite] Design System cache changed: reloading with the new tokens and component config.";c.config?.logger?.info?c.config.logger.info(u,{timestamp:!0}):console.log(u),typeof c.restart=="function"?Promise.resolve(c.restart()).catch(f=>console.error(`[FrontFriend Vite] Restart failed: ${f.message}`)):c.ws?.send({type:"full-reload"})}),c.httpServer?.once("close",()=>o?.()))},closeBundle(){o?.(),o=void 0},transform(c,u){let[f,F=""]=u.split("?");if(!f.endsWith(".css")||/(?:^|&)(?:url|raw|inline)(?:&|=|$)/.test(F)||t||!He(c))return null;let _=m.join(s||process.cwd(),Pe);if(!w.existsSync(_))return null;let S=qe(f,_);return c.includes(S)?null:{code:`${c}
1
+ var S=(r,i)=>()=>(i||r((i={exports:{}}).exports,i),i.exports);var gr=S((Pf,Ro)=>{Ro.exports={name:"@frontfriend/sdk",version:"1.2.1"}});var yr=S((Tf,vr)=>{var{name:Po}=gr();vr.exports={PACKAGE_NAME:Po}});var Ge=S((Lf,Er)=>{var To="https://app.frontfriend.dev",Lo=".cache/frontfriend",Oo={JS:["tokens.js","variables.js","semanticVariables.js","semanticDarkVariables.js","keyframes.js","animations.js","safelist.js","custom.js"],JSON:["fonts.json","icons.json","components-config.json","iconLibrary.json","version.json","versionMetadata.json","metadata.json","base.json","nativeTokens.json"]},Fo={FF_ID:"FF_ID",FF_API_URL:"FF_API_URL",FF_AUTH_TOKEN:"FF_AUTH_TOKEN",FF_MACHINE_TOKEN:"FRONTFRIEND_MACHINE_TOKEN"};function Vo(r){if(!r)return null;try{let i=new URL(r);return i.hostname.startsWith("app.")?`${i.protocol}//${i.hostname.replace(/^app\./,"registry.")}`:null}catch{return null}}Er.exports={DEFAULT_API_URL:To,CACHE_DIR_NAME:Lo,CACHE_TTL_DAYS:7,CACHE_TTL_MS:6048e5,CACHE_FILES:Oo,ENV_VARS:Fo,deriveRegistryFromApiUrl:Vo}});var Sr=S((Of,br)=>{var qt=class extends Error{constructor(i,n,o){super(i),this.name="APIError",this.statusCode=n,this.url=o,this.code=`API_${n}`}},jt=class extends Error{constructor(i,n){super(i),this.name="CacheError",this.operation=n,this.code=`CACHE_${n.toUpperCase()}`}},Bt=class extends Error{constructor(i,n){super(i),this.name="ConfigError",this.field=n,this.code=n?`CONFIG_${String(n).toUpperCase()}`:"CONFIG_ERROR"}},Ut=class extends Error{constructor(i,n){super(i),this.name="ProcessingError",this.token=n,this.code="PROCESSING_ERROR"}};br.exports={APIError:qt,CacheError:jt,ConfigError:Bt,ProcessingError:Ut}});var He=S((Ff,wr)=>{var j=require("fs");function Do(r){try{let i=j.readFileSync(r,"utf8");return JSON.parse(i)}catch(i){if(i.code==="ENOENT")return null;throw i}}function $o(r){try{return j.readFileSync(r,"utf8").replace(/^\uFEFF/,"")}catch(i){if(i.code==="ENOENT")return null;throw i}}function qo(r,i,n=2){let o=JSON.stringify(i,null,n);j.writeFileSync(r,o,"utf8")}function jo(r,i){j.writeFileSync(r,i,"utf8")}function Bo(r,i){if(i==null||typeof i=="object"&&Object.keys(i).length===0||Array.isArray(i)&&i.length===0){let o=`module.exports = ${Array.isArray(i)?"[]":"{}"};`;j.writeFileSync(r,o,"utf8")}else{let n=`module.exports = ${JSON.stringify(i,null,2)};`;j.writeFileSync(r,n,"utf8")}}function Uo(r){return j.existsSync(r)}function Mo(r){j.mkdirSync(r,{recursive:!0})}function Go(r){j.rmSync(r,{recursive:!0,force:!0})}function Ho(r){j.rmSync(r,{force:!0})}function Wo(r,i){j.mkdirSync(require("path").dirname(r),{recursive:!0,mode:448});let n=`${r}.${process.pid}.${Date.now()}.tmp`;try{j.writeFileSync(n,`${JSON.stringify(i,null,2)}
2
+ `,{mode:384}),j.renameSync(n,r);try{j.chmodSync(r,384)}catch{}}finally{j.rmSync(n,{force:!0})}}async function Xo(r,i,n){j.mkdirSync(require("path").dirname(r),{recursive:!0,mode:448});let o=`${r}.lock`,l=Date.now()+2e4,h;for(;h===void 0;)try{h=j.openSync(o,"wx",384),j.writeFileSync(h,String(process.pid))}catch(f){if(f.code!=="EEXIST")throw f;try{let m=Number(j.readFileSync(o,"utf8"));if(Number.isInteger(m)&&m>0)try{process.kill(m,0)}catch(v){if(v.code==="ESRCH"){j.unlinkSync(o);continue}}}catch(m){if(m.code==="ENOENT")continue}if(Date.now()>=l)throw n();await new Promise(m=>setTimeout(m,50))}try{return await i()}finally{j.closeSync(h),j.unlinkSync(o)}}wr.exports={writePrivateJsonFileAtomic:Wo,withPrivateFileLock:Xo,readJsonFileSafe:Do,readFileSafe:$o,writeJsonFile:qo,writeTextFile:jo,writeModuleExportsFile:Bo,fileExists:Uo,ensureDirectoryExists:Mo,removeDirectory:Go,removeFile:Ho}});var Mt=S((Vf,Cr)=>{var zo="classes.txt",Ko="classes.css";Cr.exports={CLASSES_SOURCE_FILE:zo,CSS_CLASSES_SOURCE_FILE:Ko}});var Rr=S((Df,Nr)=>{var Q=require("path"),{CACHE_DIR_NAME:Yo,CACHE_TTL_MS:Jo,CACHE_FILES:_r}=Ge(),{CacheError:Gt}=Sr(),{readJsonFileSafe:ht,readFileSafe:Qo,writeJsonFile:Ir,writeTextFile:kr,writeModuleExportsFile:Ar,fileExists:Ht,ensureDirectoryExists:Zo,removeDirectory:eu,removeFile:tu}=He(),{CLASSES_SOURCE_FILE:iu,CSS_CLASSES_SOURCE_FILE:ru}=Mt(),Wt=class r{constructor(i=process.cwd()){this.appRoot=i,this.cacheDir=Q.join(i,"node_modules",Yo),this.metadataFile=Q.join(this.cacheDir,"metadata.json"),this.maxAge=Jo}getCacheDir(){return this.cacheDir}isLocalOnly(){return ht(this.metadataFile)?.version==="local-components"}getIconLibrary(){let i=Q.join(this.cacheDir,"iconLibrary.json");return Ht(i)?ht(i):null}exists(){return Ht(this.cacheDir)}isValid(){if(!this.exists())return!1;try{let i=ht(this.metadataFile);if(!i)return!1;let n=new Date(i.timestamp).getTime();return Date.now()-n<this.maxAge}catch{return!1}}load(){if(!this.exists())return null;try{let i={};for(let n of _r.JS){let o=Q.join(this.cacheDir,n);if(Ht(o)){let l=n.replace(".js","");try{let h=Qo(o);if(h!==null){let f={},m={exports:f};new Function("module","exports",h)(m,f),i[l]=m.exports}}catch(h){console.warn(`[Frontfriend] Failed to load ${n}: ${h.message}`),(h.message.includes("Unexpected token")||h.message.includes("Invalid character"))&&console.warn("[Frontfriend] This might be a BOM or encoding issue. Try deleting node_modules/.cache/frontfriend and running `npx frontfriend init` again.")}}}for(let n of _r.JSON){let o=Q.join(this.cacheDir,n),l=n.replace(".json",""),h=ht(o);h!==null&&(i[l]=h)}return i["components-config"]&&(i.componentsConfig=i["components-config"],delete i["components-config"]),i.cls&&!i.safelist&&(i.safelist=i.cls,delete i.cls),i}catch(i){throw new Gt(`Failed to load cache: ${i.message}`,"read")}}save(i){try{Zo(this.cacheDir);let n={timestamp:new Date().toISOString(),version:i.metadata?.version||"2.0.0",ffId:i.metadata?.ffId},o=["tokens","variables","semanticVariables","semanticDarkVariables","keyframes","animations","safelist","custom"];for(let h of o)if(i[h]!==void 0){let f=Q.join(this.cacheDir,`${h}.js`);Ar(f,i[h])}if(i.safelist&&Array.isArray(i.safelist)){let h=Q.join(this.cacheDir,"safelist.js");Ar(h,i.safelist)}let l={fonts:i.fonts,icons:i.icons||i.iconSet,"components-config":i.componentsConfig,iconLibrary:i.iconLibrary,version:i.version,versionMetadata:i.versionMetadata,base:i.base,nativeTokens:i.nativeTokens};for(let[h,f]of Object.entries(l))if(f!==void 0){let m=Q.join(this.cacheDir,`${h}.json`);Ir(m,f)}i.themeCSS!==void 0&&kr(Q.join(this.cacheDir,"theme.css"),i.themeCSS),i.classesContent!==void 0&&(kr(Q.join(this.cacheDir,iu),i.classesContent),tu(Q.join(this.cacheDir,ru))),Ir(this.metadataFile,n)}catch(n){throw new Gt(`Failed to save cache: ${n.message}`,"write")}}saveAtomic(i,n=()=>{}){let o=require("node:fs"),{randomUUID:l}=require("node:crypto");o.mkdirSync(Q.dirname(this.cacheDir),{recursive:!0});let h=`${this.cacheDir}.write-lock`,f;try{f=o.openSync(h,"wx")}catch(x){if(x.code!=="EEXIST")throw x;let b=Number(o.readFileSync(h,"utf8")),y=!0;if(b>0)try{process.kill(b,0)}catch(A){y=A.code!=="ESRCH"}if(y)throw new Gt("Another process is installing tokens. Retry after it completes.","write");o.unlinkSync(h),f=o.openSync(h,"wx")}let m=`${this.cacheDir}.previous`,v=`${this.cacheDir}.${l()}.pending`;try{o.writeFileSync(f,String(process.pid)),!o.existsSync(this.cacheDir)&&o.existsSync(m)&&o.renameSync(m,this.cacheDir);let x=new r(this.appRoot);x.cacheDir=v,x.metadataFile=Q.join(v,"metadata.json"),x.save(i),o.existsSync(m)&&o.rmSync(m,{recursive:!0}),o.existsSync(this.cacheDir)&&o.renameSync(this.cacheDir,m);try{o.renameSync(v,this.cacheDir),n()}catch(b){throw o.rmSync(this.cacheDir,{recursive:!0,force:!0}),o.existsSync(m)&&o.renameSync(m,this.cacheDir),b}o.rmSync(m,{recursive:!0,force:!0})}finally{o.rmSync(v,{recursive:!0,force:!0}),o.closeSync(f),o.rmSync(h,{force:!0})}}clear(){this.exists()&&eu(this.cacheDir)}};Nr.exports=Wt});var Or=S(($f,Lr)=>{function pe(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)}function Xt(r,i){if(!pe(r)||!pe(i))return i===void 0?r:i;let n={...r};for(let[o,l]of Object.entries(i))n[o]=o in n?Xt(n[o],l):l;return n}function zt(r,i,n=[],o=[]){if(r===void 0||i===void 0)return o;if(!pe(r)||!pe(i))return o.push(n.join(".")),o;for(let l of Object.keys(r))l in i&&zt(r[l],i[l],[...n,l],o);return o}function Pr(r){return pe(r)&&("styles"in r||"behavior"in r)}function Tr(r,i="component"){if(!Pr(r)||!pe(r.styles)||r.behavior!==void 0&&!pe(r.behavior)||Object.keys(r).some(o=>!["styles","behavior"].includes(o)))throw new TypeError(`Component ${i} must use the styles/behavior envelope`);let n=zt(r.styles,r.behavior,[i]);if(n.length>0)throw new Error(`Component config styles/behavior conflict at ${n.join(", ")}`);return Xt(r.styles||{},r.behavior||{})}function su(r){if(!pe(r))return r;let i=!1,n={};for(let[o,l]of Object.entries(r))n[o]=Tr(l,o),n[o]!==l&&(i=!0);return i?n:r}Lr.exports={isPlainObject:pe,deepMerge:Xt,findTreeConflicts:zt,isComponentEnvelope:Pr,toRuntimeComponentConfig:Tr,toRuntimeComponentsConfig:su}});var qr=S((qf,$r)=>{$r.exports=Dr;Dr.sync=au;var Fr=require("fs");function nu(r,i){var n=i.pathExt!==void 0?i.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var o=0;o<n.length;o++){var l=n[o].toLowerCase();if(l&&r.substr(-l.length).toLowerCase()===l)return!0}return!1}function Vr(r,i,n){return!r.isSymbolicLink()&&!r.isFile()?!1:nu(i,n)}function Dr(r,i,n){Fr.stat(r,function(o,l){n(o,o?!1:Vr(l,r,i))})}function au(r,i){return Vr(Fr.statSync(r),r,i)}});var Gr=S((jf,Mr)=>{Mr.exports=Br;Br.sync=ou;var jr=require("fs");function Br(r,i,n){jr.stat(r,function(o,l){n(o,o?!1:Ur(l,i))})}function ou(r,i){return Ur(jr.statSync(r),i)}function Ur(r,i){return r.isFile()&&uu(r,i)}function uu(r,i){var n=r.mode,o=r.uid,l=r.gid,h=i.uid!==void 0?i.uid:process.getuid&&process.getuid(),f=i.gid!==void 0?i.gid:process.getgid&&process.getgid(),m=parseInt("100",8),v=parseInt("010",8),x=parseInt("001",8),b=m|v,y=n&x||n&v&&l===f||n&m&&o===h||n&b&&h===0;return y}});var Wr=S((Uf,Hr)=>{var Bf=require("fs"),lt;process.platform==="win32"||global.TESTING_WINDOWS?lt=qr():lt=Gr();Hr.exports=Kt;Kt.sync=cu;function Kt(r,i,n){if(typeof i=="function"&&(n=i,i={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(o,l){Kt(r,i||{},function(h,f){h?l(h):o(f)})})}lt(r,i||{},function(o,l){o&&(o.code==="EACCES"||i&&i.ignoreErrors)&&(o=null,l=!1),n(o,l)})}function cu(r,i){try{return lt.sync(r,i||{})}catch(n){if(i&&i.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var Zr=S((Mf,Qr)=>{var Pe=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Xr=require("path"),hu=Pe?";":":",zr=Wr(),Kr=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),Yr=(r,i)=>{let n=i.colon||hu,o=r.match(/\//)||Pe&&r.match(/\\/)?[""]:[...Pe?[process.cwd()]:[],...(i.path||process.env.PATH||"").split(n)],l=Pe?i.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",h=Pe?l.split(n):[""];return Pe&&r.indexOf(".")!==-1&&h[0]!==""&&h.unshift(""),{pathEnv:o,pathExt:h,pathExtExe:l}},Jr=(r,i,n)=>{typeof i=="function"&&(n=i,i={}),i||(i={});let{pathEnv:o,pathExt:l,pathExtExe:h}=Yr(r,i),f=[],m=x=>new Promise((b,y)=>{if(x===o.length)return i.all&&f.length?b(f):y(Kr(r));let A=o[x],w=/^".*"$/.test(A)?A.slice(1,-1):A,N=Xr.join(w,r),H=!w&&/^\.[\\\/]/.test(r)?r.slice(0,2)+N:N;b(v(H,x,0))}),v=(x,b,y)=>new Promise((A,w)=>{if(y===l.length)return A(m(b+1));let N=l[y];zr(x+N,{pathExt:h},(H,Y)=>{if(!H&&Y)if(i.all)f.push(x+N);else return A(x+N);return A(v(x,b,y+1))})});return n?m(0).then(x=>n(null,x),n):m(0)},lu=(r,i)=>{i=i||{};let{pathEnv:n,pathExt:o,pathExtExe:l}=Yr(r,i),h=[];for(let f=0;f<n.length;f++){let m=n[f],v=/^".*"$/.test(m)?m.slice(1,-1):m,x=Xr.join(v,r),b=!v&&/^\.[\\\/]/.test(r)?r.slice(0,2)+x:x;for(let y=0;y<o.length;y++){let A=b+o[y];try{if(zr.sync(A,{pathExt:l}))if(i.all)h.push(A);else return A}catch{}}}if(i.all&&h.length)return h;if(i.nothrow)return null;throw Kr(r)};Qr.exports=Jr;Jr.sync=lu});var ts=S((Gf,Yt)=>{"use strict";var es=(r={})=>{let i=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(i).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"};Yt.exports=es;Yt.exports.default=es});var ns=S((Hf,ss)=>{"use strict";var is=require("path"),fu=Zr(),pu=ts();function rs(r,i){let n=r.options.env||process.env,o=process.cwd(),l=r.options.cwd!=null,h=l&&process.chdir!==void 0&&!process.chdir.disabled;if(h)try{process.chdir(r.options.cwd)}catch{}let f;try{f=fu.sync(r.command,{path:n[pu({env:n})],pathExt:i?is.delimiter:void 0})}catch{}finally{h&&process.chdir(o)}return f&&(f=is.resolve(l?r.options.cwd:"",f)),f}function du(r){return rs(r)||rs(r,!0)}ss.exports=du});var as=S((Wf,Qt)=>{"use strict";var Jt=/([()\][%!^"`<>&|;, *?])/g;function mu(r){return r=r.replace(Jt,"^$1"),r}function xu(r,i){return r=`${r}`,r=r.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),r=r.replace(/(?=(\\+?)?)\1$/,"$1$1"),r=`"${r}"`,r=r.replace(Jt,"^$1"),i&&(r=r.replace(Jt,"^$1")),r}Qt.exports.command=mu;Qt.exports.argument=xu});var us=S((Xf,os)=>{"use strict";os.exports=/^#!(.*)/});var hs=S((zf,cs)=>{"use strict";var gu=us();cs.exports=(r="")=>{let i=r.match(gu);if(!i)return null;let[n,o]=i[0].replace(/#! ?/,"").split(" "),l=n.split("/").pop();return l==="env"?o:o?`${l} ${o}`:l}});var fs=S((Kf,ls)=>{"use strict";var Zt=require("fs"),vu=hs();function yu(r){let n=Buffer.alloc(150),o;try{o=Zt.openSync(r,"r"),Zt.readSync(o,n,0,150,0),Zt.closeSync(o)}catch{}return vu(n.toString())}ls.exports=yu});var xs=S((Yf,ms)=>{"use strict";var Eu=require("path"),ps=ns(),ds=as(),bu=fs(),Su=process.platform==="win32",wu=/\.(?:com|exe)$/i,Cu=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function _u(r){r.file=ps(r);let i=r.file&&bu(r.file);return i?(r.args.unshift(r.file),r.command=i,ps(r)):r.file}function Iu(r){if(!Su)return r;let i=_u(r),n=!wu.test(i);if(r.options.forceShell||n){let o=Cu.test(i);r.command=Eu.normalize(r.command),r.command=ds.command(r.command),r.args=r.args.map(h=>ds.argument(h,o));let l=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${l}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function ku(r,i,n){i&&!Array.isArray(i)&&(n=i,i=null),i=i?i.slice(0):[],n=Object.assign({},n);let o={command:r,args:i,options:n,file:void 0,original:{command:r,args:i}};return n.shell?o:Iu(o)}ms.exports=ku});var ys=S((Jf,vs)=>{"use strict";var ei=process.platform==="win32";function ti(r,i){return Object.assign(new Error(`${i} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${i} ${r.command}`,path:r.command,spawnargs:r.args})}function Au(r,i){if(!ei)return;let n=r.emit;r.emit=function(o,l){if(o==="exit"){let h=gs(l,i);if(h)return n.call(r,"error",h)}return n.apply(r,arguments)}}function gs(r,i){return ei&&r===1&&!i.file?ti(i.original,"spawn"):null}function Nu(r,i){return ei&&r===1&&!i.file?ti(i.original,"spawnSync"):null}vs.exports={hookChildProcess:Au,verifyENOENT:gs,verifyENOENTSync:Nu,notFoundError:ti}});var Ss=S((Qf,Te)=>{"use strict";var Es=require("child_process"),ii=xs(),ri=ys();function bs(r,i,n){let o=ii(r,i,n),l=Es.spawn(o.command,o.args,o.options);return ri.hookChildProcess(l,o),l}function Ru(r,i,n){let o=ii(r,i,n),l=Es.spawnSync(o.command,o.args,o.options);return l.error=l.error||ri.verifyENOENTSync(l.status,o),l}Te.exports=bs;Te.exports.spawn=bs;Te.exports.sync=Ru;Te.exports._parse=ii;Te.exports._enoent=ri});var Le=S((Zf,ws)=>{"use strict";var Pu="2.0.0",Tu=Number.MAX_SAFE_INTEGER||9007199254740991,Lu=16,Ou=250,Fu=["major","premajor","minor","preminor","patch","prepatch","prerelease"];ws.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Lu,MAX_SAFE_BUILD_LENGTH:Ou,MAX_SAFE_INTEGER:Tu,RELEASE_TYPES:Fu,SEMVER_SPEC_VERSION:Pu,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var We=S((ep,Cs)=>{"use strict";var Vu=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Cs.exports=Vu});var Oe=S((ue,_s)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:si,MAX_SAFE_BUILD_LENGTH:Du,MAX_LENGTH:$u}=Le(),qu=We();ue=_s.exports={};var ju=ue.re=[],Bu=ue.safeRe=[],C=ue.src=[],Uu=ue.safeSrc=[],_=ue.t={},Mu=0,ni="[a-zA-Z0-9-]",Gu=[["\\s",1],["\\d",$u],[ni,Du]],Hu=r=>{for(let[i,n]of Gu)r=r.split(`${i}*`).join(`${i}{0,${n}}`).split(`${i}+`).join(`${i}{1,${n}}`);return r},T=(r,i,n)=>{let o=Hu(i),l=Mu++;qu(r,l,i),_[r]=l,C[l]=i,Uu[l]=o,ju[l]=new RegExp(i,n?"g":void 0),Bu[l]=new RegExp(o,n?"g":void 0)};T("NUMERICIDENTIFIER","0|[1-9]\\d*");T("NUMERICIDENTIFIERLOOSE","\\d+");T("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${ni}*`);T("MAINVERSION",`(${C[_.NUMERICIDENTIFIER]})\\.(${C[_.NUMERICIDENTIFIER]})\\.(${C[_.NUMERICIDENTIFIER]})`);T("MAINVERSIONLOOSE",`(${C[_.NUMERICIDENTIFIERLOOSE]})\\.(${C[_.NUMERICIDENTIFIERLOOSE]})\\.(${C[_.NUMERICIDENTIFIERLOOSE]})`);T("PRERELEASEIDENTIFIER",`(?:${C[_.NONNUMERICIDENTIFIER]}|${C[_.NUMERICIDENTIFIER]})`);T("PRERELEASEIDENTIFIERLOOSE",`(?:${C[_.NONNUMERICIDENTIFIER]}|${C[_.NUMERICIDENTIFIERLOOSE]})`);T("PRERELEASE",`(?:-(${C[_.PRERELEASEIDENTIFIER]}(?:\\.${C[_.PRERELEASEIDENTIFIER]})*))`);T("PRERELEASELOOSE",`(?:-?(${C[_.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[_.PRERELEASEIDENTIFIERLOOSE]})*))`);T("BUILDIDENTIFIER",`${ni}+`);T("BUILD",`(?:\\+(${C[_.BUILDIDENTIFIER]}(?:\\.${C[_.BUILDIDENTIFIER]})*))`);T("FULLPLAIN",`v?${C[_.MAINVERSION]}${C[_.PRERELEASE]}?${C[_.BUILD]}?`);T("FULL",`^${C[_.FULLPLAIN]}$`);T("LOOSEPLAIN",`[v=\\s]*${C[_.MAINVERSIONLOOSE]}${C[_.PRERELEASELOOSE]}?${C[_.BUILD]}?`);T("LOOSE",`^${C[_.LOOSEPLAIN]}$`);T("GTLT","((?:<|>)?=?)");T("XRANGEIDENTIFIERLOOSE",`${C[_.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);T("XRANGEIDENTIFIER",`${C[_.NUMERICIDENTIFIER]}|x|X|\\*`);T("XRANGEPLAIN",`[v=\\s]*(${C[_.XRANGEIDENTIFIER]})(?:\\.(${C[_.XRANGEIDENTIFIER]})(?:\\.(${C[_.XRANGEIDENTIFIER]})(?:${C[_.PRERELEASE]})?${C[_.BUILD]}?)?)?`);T("XRANGEPLAINLOOSE",`[v=\\s]*(${C[_.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[_.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[_.XRANGEIDENTIFIERLOOSE]})(?:${C[_.PRERELEASELOOSE]})?${C[_.BUILD]}?)?)?`);T("XRANGE",`^${C[_.GTLT]}\\s*${C[_.XRANGEPLAIN]}$`);T("XRANGELOOSE",`^${C[_.GTLT]}\\s*${C[_.XRANGEPLAINLOOSE]}$`);T("COERCEPLAIN",`(^|[^\\d])(\\d{1,${si}})(?:\\.(\\d{1,${si}}))?(?:\\.(\\d{1,${si}}))?`);T("COERCE",`${C[_.COERCEPLAIN]}(?:$|[^\\d])`);T("COERCEFULL",C[_.COERCEPLAIN]+`(?:${C[_.PRERELEASE]})?(?:${C[_.BUILD]})?(?:$|[^\\d])`);T("COERCERTL",C[_.COERCE],!0);T("COERCERTLFULL",C[_.COERCEFULL],!0);T("LONETILDE","(?:~>?)");T("TILDETRIM",`(\\s*)${C[_.LONETILDE]}\\s+`,!0);ue.tildeTrimReplace="$1~";T("TILDE",`^${C[_.LONETILDE]}${C[_.XRANGEPLAIN]}$`);T("TILDELOOSE",`^${C[_.LONETILDE]}${C[_.XRANGEPLAINLOOSE]}$`);T("LONECARET","(?:\\^)");T("CARETTRIM",`(\\s*)${C[_.LONECARET]}\\s+`,!0);ue.caretTrimReplace="$1^";T("CARET",`^${C[_.LONECARET]}${C[_.XRANGEPLAIN]}$`);T("CARETLOOSE",`^${C[_.LONECARET]}${C[_.XRANGEPLAINLOOSE]}$`);T("COMPARATORLOOSE",`^${C[_.GTLT]}\\s*(${C[_.LOOSEPLAIN]})$|^$`);T("COMPARATOR",`^${C[_.GTLT]}\\s*(${C[_.FULLPLAIN]})$|^$`);T("COMPARATORTRIM",`(\\s*)${C[_.GTLT]}\\s*(${C[_.LOOSEPLAIN]}|${C[_.XRANGEPLAIN]})`,!0);ue.comparatorTrimReplace="$1$2$3";T("HYPHENRANGE",`^\\s*(${C[_.XRANGEPLAIN]})\\s+-\\s+(${C[_.XRANGEPLAIN]})\\s*$`);T("HYPHENRANGELOOSE",`^\\s*(${C[_.XRANGEPLAINLOOSE]})\\s+-\\s+(${C[_.XRANGEPLAINLOOSE]})\\s*$`);T("STAR","(<|>)?=?\\s*\\*");T("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");T("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var ft=S((tp,Is)=>{"use strict";var Wu=Object.freeze({loose:!0}),Xu=Object.freeze({}),zu=r=>r?typeof r!="object"?Wu:r:Xu;Is.exports=zu});var ai=S((ip,Ns)=>{"use strict";var ks=/^[0-9]+$/,As=(r,i)=>{if(typeof r=="number"&&typeof i=="number")return r===i?0:r<i?-1:1;let n=ks.test(r),o=ks.test(i);return n&&o&&(r=+r,i=+i),r===i?0:n&&!o?-1:o&&!n?1:r<i?-1:1},Ku=(r,i)=>As(i,r);Ns.exports={compareIdentifiers:As,rcompareIdentifiers:Ku}});var M=S((rp,Ps)=>{"use strict";var pt=We(),{MAX_LENGTH:Rs,MAX_SAFE_INTEGER:dt}=Le(),{safeRe:mt,t:xt}=Oe(),Yu=ft(),{compareIdentifiers:oi}=ai(),Ju=(r,i)=>{let n=i.split(".");if(n.length>r.length)return!1;for(let o=0;o<n.length;o++)if(oi(r[o],n[o])!==0)return!1;return!0},ui=class r{constructor(i,n){if(n=Yu(n),i instanceof r){if(i.loose===!!n.loose&&i.includePrerelease===!!n.includePrerelease)return i;i=i.version}else if(typeof i!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof i}".`);if(i.length>Rs)throw new TypeError(`version is longer than ${Rs} characters`);pt("SemVer",i,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let o=i.trim().match(n.loose?mt[xt.LOOSE]:mt[xt.FULL]);if(!o)throw new TypeError(`Invalid Version: ${i}`);if(this.raw=i,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>dt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>dt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>dt||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(l=>{if(/^[0-9]+$/.test(l)){let h=+l;if(h>=0&&h<dt)return h}return l}):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(i){if(pt("SemVer.compare",this.version,this.options,i),!(i instanceof r)){if(typeof i=="string"&&i===this.version)return 0;i=new r(i,this.options)}return i.version===this.version?0:this.compareMain(i)||this.comparePre(i)}compareMain(i){return i instanceof r||(i=new r(i,this.options)),this.major<i.major?-1:this.major>i.major?1:this.minor<i.minor?-1:this.minor>i.minor?1:this.patch<i.patch?-1:this.patch>i.patch?1:0}comparePre(i){if(i instanceof r||(i=new r(i,this.options)),this.prerelease.length&&!i.prerelease.length)return-1;if(!this.prerelease.length&&i.prerelease.length)return 1;if(!this.prerelease.length&&!i.prerelease.length)return 0;let n=0;do{let o=this.prerelease[n],l=i.prerelease[n];if(pt("prerelease compare",n,o,l),o===void 0&&l===void 0)return 0;if(l===void 0)return 1;if(o===void 0)return-1;if(o===l)continue;return oi(o,l)}while(++n)}compareBuild(i){i instanceof r||(i=new r(i,this.options));let n=0;do{let o=this.build[n],l=i.build[n];if(pt("build compare",n,o,l),o===void 0&&l===void 0)return 0;if(l===void 0)return 1;if(o===void 0)return-1;if(o===l)continue;return oi(o,l)}while(++n)}inc(i,n,o){if(i.startsWith("pre")){if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let l=`-${n}`.match(this.options.loose?mt[xt.PRERELEASELOOSE]:mt[xt.PRERELEASE]);if(!l||l[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(i){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,o),this.inc("pre",n,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,o),this.inc("pre",n,o);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let l=Number(o)?1:0;if(this.prerelease.length===0)this.prerelease=[l];else{let h=this.prerelease.length;for(;--h>=0;)typeof this.prerelease[h]=="number"&&(this.prerelease[h]++,h=-2);if(h===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(l)}}if(n){let h=[n,l];if(o===!1&&(h=[n]),Ju(this.prerelease,n)){let f=this.prerelease[n.split(".").length];isNaN(f)&&(this.prerelease=h)}else this.prerelease=h}break}default:throw new Error(`invalid increment argument: ${i}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Ps.exports=ui});var ge=S((sp,Ls)=>{"use strict";var Ts=M(),Qu=(r,i,n=!1)=>{if(r instanceof Ts)return r;try{return new Ts(r,i)}catch(o){if(!n)return null;throw o}};Ls.exports=Qu});var Fs=S((np,Os)=>{"use strict";var Zu=ge(),ec=(r,i)=>{let n=Zu(r,i);return n?n.version:null};Os.exports=ec});var Ds=S((ap,Vs)=>{"use strict";var tc=ge(),ic=(r,i)=>{let n=tc(r.trim().replace(/^[=v]+/,""),i);return n?n.version:null};Vs.exports=ic});var js=S((op,qs)=>{"use strict";var $s=M(),rc=(r,i,n,o,l)=>{typeof n=="string"&&(l=o,o=n,n=void 0);try{return new $s(r instanceof $s?r.version:r,n).inc(i,o,l).version}catch{return null}};qs.exports=rc});var Ms=S((up,Us)=>{"use strict";var Bs=ge(),sc=(r,i)=>{let n=Bs(r,null,!0),o=Bs(i,null,!0),l=n.compare(o);if(l===0)return null;let h=l>0,f=h?n:o,m=h?o:n,v=!!f.prerelease.length;if(!!m.prerelease.length&&!v){if(!m.patch&&!m.minor)return"major";if(m.compareMain(f)===0)return m.minor&&!m.patch?"minor":"patch"}let b=v?"pre":"";return n.major!==o.major?b+"major":n.minor!==o.minor?b+"minor":n.patch!==o.patch?b+"patch":"prerelease"};Us.exports=sc});var Hs=S((cp,Gs)=>{"use strict";var nc=M(),ac=(r,i)=>new nc(r,i).major;Gs.exports=ac});var Xs=S((hp,Ws)=>{"use strict";var oc=M(),uc=(r,i)=>new oc(r,i).minor;Ws.exports=uc});var Ks=S((lp,zs)=>{"use strict";var cc=M(),hc=(r,i)=>new cc(r,i).patch;zs.exports=hc});var Js=S((fp,Ys)=>{"use strict";var lc=ge(),fc=(r,i)=>{let n=lc(r,i);return n&&n.prerelease.length?n.prerelease:null};Ys.exports=fc});var re=S((pp,Zs)=>{"use strict";var Qs=M(),pc=(r,i,n)=>new Qs(r,n).compare(new Qs(i,n));Zs.exports=pc});var tn=S((dp,en)=>{"use strict";var dc=re(),mc=(r,i,n)=>dc(i,r,n);en.exports=mc});var sn=S((mp,rn)=>{"use strict";var xc=re(),gc=(r,i)=>xc(r,i,!0);rn.exports=gc});var gt=S((xp,an)=>{"use strict";var nn=M(),vc=(r,i,n)=>{let o=new nn(r,n),l=new nn(i,n);return o.compare(l)||o.compareBuild(l)};an.exports=vc});var un=S((gp,on)=>{"use strict";var yc=gt(),Ec=(r,i)=>r.sort((n,o)=>yc(n,o,i));on.exports=Ec});var hn=S((vp,cn)=>{"use strict";var bc=gt(),Sc=(r,i)=>r.sort((n,o)=>bc(o,n,i));cn.exports=Sc});var Xe=S((yp,ln)=>{"use strict";var wc=re(),Cc=(r,i,n)=>wc(r,i,n)>0;ln.exports=Cc});var vt=S((Ep,fn)=>{"use strict";var _c=re(),Ic=(r,i,n)=>_c(r,i,n)<0;fn.exports=Ic});var ci=S((bp,pn)=>{"use strict";var kc=re(),Ac=(r,i,n)=>kc(r,i,n)===0;pn.exports=Ac});var hi=S((Sp,dn)=>{"use strict";var Nc=re(),Rc=(r,i,n)=>Nc(r,i,n)!==0;dn.exports=Rc});var yt=S((wp,mn)=>{"use strict";var Pc=re(),Tc=(r,i,n)=>Pc(r,i,n)>=0;mn.exports=Tc});var Et=S((Cp,xn)=>{"use strict";var Lc=re(),Oc=(r,i,n)=>Lc(r,i,n)<=0;xn.exports=Oc});var li=S((_p,gn)=>{"use strict";var Fc=ci(),Vc=hi(),Dc=Xe(),$c=yt(),qc=vt(),jc=Et(),Bc=(r,i,n,o)=>{switch(i){case"===":return typeof r=="object"&&(r=r.version),typeof n=="object"&&(n=n.version),r===n;case"!==":return typeof r=="object"&&(r=r.version),typeof n=="object"&&(n=n.version),r!==n;case"":case"=":case"==":return Fc(r,n,o);case"!=":return Vc(r,n,o);case">":return Dc(r,n,o);case">=":return $c(r,n,o);case"<":return qc(r,n,o);case"<=":return jc(r,n,o);default:throw new TypeError(`Invalid operator: ${i}`)}};gn.exports=Bc});var yn=S((Ip,vn)=>{"use strict";var Uc=M(),Mc=ge(),{safeRe:bt,t:St}=Oe(),Gc=(r,i)=>{if(r instanceof Uc)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;i=i||{};let n=null;if(!i.rtl)n=r.match(i.includePrerelease?bt[St.COERCEFULL]:bt[St.COERCE]);else{let v=i.includePrerelease?bt[St.COERCERTLFULL]:bt[St.COERCERTL],x;for(;(x=v.exec(r))&&(!n||n.index+n[0].length!==r.length);)(!n||x.index+x[0].length!==n.index+n[0].length)&&(n=x),v.lastIndex=x.index+x[1].length+x[2].length;v.lastIndex=-1}if(n===null)return null;let o=n[2],l=n[3]||"0",h=n[4]||"0",f=i.includePrerelease&&n[5]?`-${n[5]}`:"",m=i.includePrerelease&&n[6]?`+${n[6]}`:"";return Mc(`${o}.${l}.${h}${f}${m}`,i)};vn.exports=Gc});var bn=S((kp,En)=>{"use strict";var Hc=ge(),Wc=Le(),Xc=M(),zc=(r,i,n)=>{if(!Wc.RELEASE_TYPES.includes(i))return null;let o=Kc(r,n);return o&&Yc(o,i)},Kc=(r,i)=>{let n=r instanceof Xc?r.version:r;return Hc(n,i)},Yc=(r,i)=>{if(Jc(i))return r.version;switch(r.prerelease=[],i){case"major":r.minor=0,r.patch=0;break;case"minor":r.patch=0;break}return r.format()},Jc=r=>r.startsWith("pre");En.exports=zc});var wn=S((Ap,Sn)=>{"use strict";var fi=class{constructor(){this.max=1e3,this.map=new Map}get(i){let n=this.map.get(i);if(n!==void 0)return this.map.delete(i),this.map.set(i,n),n}delete(i){return this.map.delete(i)}set(i,n){if(!this.delete(i)&&n!==void 0){if(this.map.size>=this.max){let l=this.map.keys().next().value;this.delete(l)}this.map.set(i,n)}return this}};Sn.exports=fi});var se=S((Np,kn)=>{"use strict";var Qc=/\s+/g,pi=class r{constructor(i,n){if(n=eh(n),i instanceof r)return i.loose===!!n.loose&&i.includePrerelease===!!n.includePrerelease?i:new r(i.raw,n);if(i instanceof di)return this.raw=i.value,this.set=[[i]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=i.trim().replace(Qc," "),this.set=this.raw.split("||").map(o=>this.parseRange(o.trim())).filter(o=>o.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let o=this.set[0];if(this.set=this.set.filter(l=>!_n(l[0])),this.set.length===0)this.set=[o];else if(this.set.length>1){for(let l of this.set)if(l.length===1&&ch(l[0])){this.set=[l];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let i=0;i<this.set.length;i++){i>0&&(this.formatted+="||");let n=this.set[i];for(let o=0;o<n.length;o++)o>0&&(this.formatted+=" "),this.formatted+=n[o].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(i){i=i.replace(uh,"");let o=((this.options.includePrerelease&&ah)|(this.options.loose&&oh))+":"+i,l=Cn.get(o);if(l)return l;let h=this.options.loose,f=h?K[G.HYPHENRANGELOOSE]:K[G.HYPHENRANGE];i=i.replace(f,Eh(this.options.includePrerelease)),$("hyphen replace",i),i=i.replace(K[G.COMPARATORTRIM],rh),$("comparator trim",i),i=i.replace(K[G.TILDETRIM],sh),$("tilde trim",i),i=i.replace(K[G.CARETTRIM],nh),$("caret trim",i);let m=i.split(" ").map(y=>hh(y,this.options)).join(" ").split(/\s+/).map(y=>yh(y,this.options));h&&(m=m.filter(y=>($("loose invalid filter",y,this.options),!!y.match(K[G.COMPARATORLOOSE])))),$("range list",m);let v=new Map,x=m.map(y=>new di(y,this.options));for(let y of x){if(_n(y))return[y];v.set(y.value,y)}v.size>1&&v.has("")&&v.delete("");let b=[...v.values()];return Cn.set(o,b),b}intersects(i,n){if(!(i instanceof r))throw new TypeError("a Range is required");return this.set.some(o=>In(o,n)&&i.set.some(l=>In(l,n)&&o.every(h=>l.every(f=>h.intersects(f,n)))))}test(i){if(!i)return!1;if(typeof i=="string")try{i=new th(i,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(bh(this.set[n],i,this.options))return!0;return!1}};kn.exports=pi;var Zc=wn(),Cn=new Zc,eh=ft(),di=ze(),$=We(),th=M(),{safeRe:K,src:ih,t:G,comparatorTrimReplace:rh,tildeTrimReplace:sh,caretTrimReplace:nh}=Oe(),{FLAG_INCLUDE_PRERELEASE:ah,FLAG_LOOSE:oh}=Le(),uh=new RegExp(ih[G.BUILD],"g"),_n=r=>r.value==="<0.0.0-0",ch=r=>r.value==="",In=(r,i)=>{let n=!0,o=r.slice(),l=o.pop();for(;n&&o.length;)n=o.every(h=>l.intersects(h,i)),l=o.pop();return n},hh=(r,i)=>(r=r.replace(K[G.BUILD],""),$("comp",r,i),r=dh(r,i),$("caret",r),r=fh(r,i),$("tildes",r),r=xh(r,i),$("xrange",r),r=vh(r,i),$("stars",r),r),B=r=>!r||r.toLowerCase()==="x"||r==="*",lh=(r,i,n)=>B(r)&&!B(i)||B(i)&&n&&!B(n),fh=(r,i)=>r.trim().split(/\s+/).map(n=>ph(n,i)).join(" "),ph=(r,i)=>{let n=i.loose?K[G.TILDELOOSE]:K[G.TILDE],o=i.includePrerelease?"-0":"";return r.replace(n,(l,h,f,m,v)=>{$("tilde",r,l,h,f,m,v);let x;return B(h)?x="":B(f)?x=`>=${h}.0.0${o} <${+h+1}.0.0-0`:B(m)?x=`>=${h}.${f}.0${o} <${h}.${+f+1}.0-0`:v?($("replaceTilde pr",v),x=`>=${h}.${f}.${m}-${v} <${h}.${+f+1}.0-0`):x=`>=${h}.${f}.${m} <${h}.${+f+1}.0-0`,$("tilde return",x),x})},dh=(r,i)=>r.trim().split(/\s+/).map(n=>mh(n,i)).join(" "),mh=(r,i)=>{$("caret",r,i);let n=i.loose?K[G.CARETLOOSE]:K[G.CARET],o=i.includePrerelease?"-0":"";return r.replace(n,(l,h,f,m,v)=>{$("caret",r,l,h,f,m,v);let x;return B(h)?x="":B(f)?x=`>=${h}.0.0${o} <${+h+1}.0.0-0`:B(m)?h==="0"?x=`>=${h}.${f}.0${o} <${h}.${+f+1}.0-0`:x=`>=${h}.${f}.0${o} <${+h+1}.0.0-0`:v?($("replaceCaret pr",v),h==="0"?f==="0"?x=`>=${h}.${f}.${m}-${v} <${h}.${f}.${+m+1}-0`:x=`>=${h}.${f}.${m}-${v} <${h}.${+f+1}.0-0`:x=`>=${h}.${f}.${m}-${v} <${+h+1}.0.0-0`):($("no pr"),h==="0"?f==="0"?x=`>=${h}.${f}.${m} <${h}.${f}.${+m+1}-0`:x=`>=${h}.${f}.${m} <${h}.${+f+1}.0-0`:x=`>=${h}.${f}.${m} <${+h+1}.0.0-0`),$("caret return",x),x})},xh=(r,i)=>($("replaceXRanges",r,i),r.split(/\s+/).map(n=>gh(n,i)).join(" ")),gh=(r,i)=>{r=r.trim();let n=i.loose?K[G.XRANGELOOSE]:K[G.XRANGE];return r.replace(n,(o,l,h,f,m,v)=>{if($("xRange",r,o,l,h,f,m,v),lh(h,f,m))return r;let x=B(h),b=x||B(f),y=b||B(m),A=y;return l==="="&&A&&(l=""),v=i.includePrerelease?"-0":"",x?l===">"||l==="<"?o="<0.0.0-0":o="*":l&&A?(b&&(f=0),m=0,l===">"?(l=">=",b?(h=+h+1,f=0,m=0):(f=+f+1,m=0)):l==="<="&&(l="<",b?h=+h+1:f=+f+1),l==="<"&&(v="-0"),o=`${l+h}.${f}.${m}${v}`):b?o=`>=${h}.0.0${v} <${+h+1}.0.0-0`:y&&(o=`>=${h}.${f}.0${v} <${h}.${+f+1}.0-0`),$("xRange return",o),o})},vh=(r,i)=>($("replaceStars",r,i),r.trim().replace(K[G.STAR],"")),yh=(r,i)=>($("replaceGTE0",r,i),r.trim().replace(K[i.includePrerelease?G.GTE0PRE:G.GTE0],"")),Eh=r=>(i,n,o,l,h,f,m,v,x,b,y,A)=>(B(o)?n="":B(l)?n=`>=${o}.0.0${r?"-0":""}`:B(h)?n=`>=${o}.${l}.0${r?"-0":""}`:f?n=`>=${n}`:n=`>=${n}${r?"-0":""}`,B(x)?v="":B(b)?v=`<${+x+1}.0.0-0`:B(y)?v=`<${x}.${+b+1}.0-0`:A?v=`<=${x}.${b}.${y}-${A}`:r?v=`<${x}.${b}.${+y+1}-0`:v=`<=${v}`,`${n} ${v}`.trim()),bh=(r,i,n)=>{for(let o=0;o<r.length;o++)if(!r[o].test(i))return!1;if(i.prerelease.length&&!n.includePrerelease){for(let o=0;o<r.length;o++)if($(r[o].semver),r[o].semver!==di.ANY&&r[o].semver.prerelease.length>0){let l=r[o].semver;if(l.major===i.major&&l.minor===i.minor&&l.patch===i.patch)return!0}return!1}return!0}});var ze=S((Rp,Ln)=>{"use strict";var Ke=Symbol("SemVer ANY"),gi=class r{static get ANY(){return Ke}constructor(i,n){if(n=An(n),i instanceof r){if(i.loose===!!n.loose)return i;i=i.value}i=i.trim().split(/\s+/).join(" "),xi("comparator",i,n),this.options=n,this.loose=!!n.loose,this.parse(i),this.semver===Ke?this.value="":this.value=this.operator+this.semver.version,xi("comp",this)}parse(i){let n=this.options.loose?Nn[Rn.COMPARATORLOOSE]:Nn[Rn.COMPARATOR],o=i.match(n);if(!o)throw new TypeError(`Invalid comparator: ${i}`);this.operator=o[1]!==void 0?o[1]:"",this.operator==="="&&(this.operator=""),o[2]?this.semver=new Pn(o[2],this.options.loose):this.semver=Ke}toString(){return this.value}test(i){if(xi("Comparator.test",i,this.options.loose),this.semver===Ke||i===Ke)return!0;if(typeof i=="string")try{i=new Pn(i,this.options)}catch{return!1}return mi(i,this.operator,this.semver,this.options)}intersects(i,n){if(!(i instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Tn(i.value,n).test(this.value):i.operator===""?i.value===""?!0:new Tn(this.value,n).test(i.semver):(n=An(n),n.includePrerelease&&(this.value==="<0.0.0-0"||i.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||i.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&i.operator.startsWith(">")||this.operator.startsWith("<")&&i.operator.startsWith("<")||this.semver.version===i.semver.version&&this.operator.includes("=")&&i.operator.includes("=")||mi(this.semver,"<",i.semver,n)&&this.operator.startsWith(">")&&i.operator.startsWith("<")||mi(this.semver,">",i.semver,n)&&this.operator.startsWith("<")&&i.operator.startsWith(">")))}};Ln.exports=gi;var An=ft(),{safeRe:Nn,t:Rn}=Oe(),mi=li(),xi=We(),Pn=M(),Tn=se()});var Ye=S((Pp,On)=>{"use strict";var Sh=se(),wh=(r,i,n)=>{try{i=new Sh(i,n)}catch{return!1}return i.test(r)};On.exports=wh});var Vn=S((Tp,Fn)=>{"use strict";var Ch=se(),_h=(r,i)=>new Ch(r,i).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));Fn.exports=_h});var $n=S((Lp,Dn)=>{"use strict";var Ih=M(),kh=se(),Ah=(r,i,n)=>{let o=null,l=null,h=null;try{h=new kh(i,n)}catch{return null}return r.forEach(f=>{h.test(f)&&(!o||l.compare(f)===-1)&&(o=f,l=new Ih(o,n))}),o};Dn.exports=Ah});var jn=S((Op,qn)=>{"use strict";var Nh=M(),Rh=se(),Ph=(r,i,n)=>{let o=null,l=null,h=null;try{h=new Rh(i,n)}catch{return null}return r.forEach(f=>{h.test(f)&&(!o||l.compare(f)===1)&&(o=f,l=new Nh(o,n))}),o};qn.exports=Ph});var Mn=S((Fp,Un)=>{"use strict";var vi=M(),Th=se(),Bn=Xe(),Lh=(r,i)=>{r=new Th(r,i);let n=new vi("0.0.0");if(r.test(n)||(n=new vi("0.0.0-0"),r.test(n)))return n;n=null;for(let o=0;o<r.set.length;++o){let l=r.set[o],h=null;l.forEach(f=>{let m=new vi(f.semver.version);switch(f.operator){case">":m.prerelease.length===0?m.patch++:m.prerelease.push(0),m.raw=m.format();case"":case">=":(!h||Bn(m,h))&&(h=m);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${f.operator}`)}}),h&&(!n||Bn(n,h))&&(n=h)}return n&&r.test(n)?n:null};Un.exports=Lh});var Hn=S((Vp,Gn)=>{"use strict";var Oh=se(),Fh=(r,i)=>{try{return new Oh(r,i).range||"*"}catch{return null}};Gn.exports=Fh});var wt=S((Dp,Kn)=>{"use strict";var Vh=M(),zn=ze(),{ANY:Dh}=zn,$h=se(),qh=Ye(),Wn=Xe(),Xn=vt(),jh=Et(),Bh=yt(),Uh=(r,i,n,o)=>{r=new Vh(r,o),i=new $h(i,o);let l,h,f,m,v;switch(n){case">":l=Wn,h=jh,f=Xn,m=">",v=">=";break;case"<":l=Xn,h=Bh,f=Wn,m="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(qh(r,i,o))return!1;for(let x=0;x<i.set.length;++x){let b=i.set[x],y=null,A=null;if(b.forEach(w=>{w.semver===Dh&&(w=new zn(">=0.0.0")),y=y||w,A=A||w,l(w.semver,y.semver,o)?y=w:f(w.semver,A.semver,o)&&(A=w)}),y.operator===m||y.operator===v||(!A.operator||A.operator===m)&&h(r,A.semver))return!1;if(A.operator===v&&f(r,A.semver))return!1}return!0};Kn.exports=Uh});var Jn=S(($p,Yn)=>{"use strict";var Mh=wt(),Gh=(r,i,n)=>Mh(r,i,">",n);Yn.exports=Gh});var Zn=S((qp,Qn)=>{"use strict";var Hh=wt(),Wh=(r,i,n)=>Hh(r,i,"<",n);Qn.exports=Wh});var ia=S((jp,ta)=>{"use strict";var ea=se(),Xh=(r,i,n)=>(r=new ea(r,n),i=new ea(i,n),r.intersects(i,n));ta.exports=Xh});var sa=S((Bp,ra)=>{"use strict";var zh=Ye(),Kh=re();ra.exports=(r,i,n)=>{let o=[],l=null,h=null,f=r.sort((b,y)=>Kh(b,y,n));for(let b of f)zh(b,i,n)?(h=b,l||(l=b)):(h&&o.push([l,h]),h=null,l=null);l&&o.push([l,null]);let m=[];for(let[b,y]of o)b===y?m.push(b):!y&&b===f[0]?m.push("*"):y?b===f[0]?m.push(`<=${y}`):m.push(`${b} - ${y}`):m.push(`>=${b}`);let v=m.join(" || "),x=typeof i.raw=="string"?i.raw:String(i);return v.length<x.length?v:i}});var ha=S((Up,ca)=>{"use strict";var na=se(),bi=ze(),{ANY:yi}=bi,Ei=Ye(),Si=re(),Yh=(r,i,n={})=>{if(r===i)return!0;r=new na(r,n),i=new na(i,n);let o=!1;e:for(let l of r.set){for(let h of i.set){let f=Qh(l,h,n);if(o=o||f!==null,f)continue e}if(o)return!1}return!0},Jh=[new bi(">=0.0.0-0")],aa=[new bi(">=0.0.0")],Qh=(r,i,n)=>{if(r===i)return!0;if(r.length===1&&r[0].semver===yi){if(i.length===1&&i[0].semver===yi)return!0;n.includePrerelease?r=Jh:r=aa}if(i.length===1&&i[0].semver===yi){if(n.includePrerelease)return!0;i=aa}let o=new Set,l,h;for(let w of r)w.operator===">"||w.operator===">="?l=oa(l,w,n):w.operator==="<"||w.operator==="<="?h=ua(h,w,n):o.add(w.semver);if(o.size>1)return null;let f;if(l&&h){if(f=Si(l.semver,h.semver,n),f>0)return null;if(f===0&&(l.operator!==">="||h.operator!=="<="))return null}for(let w of o){if(l&&!Ei(w,String(l),n)||h&&!Ei(w,String(h),n))return null;for(let N of i)if(!Ei(w,String(N),n))return!1;return!0}let m,v,x,b,y=h&&!n.includePrerelease&&h.semver.prerelease.length?h.semver:!1,A=l&&!n.includePrerelease&&l.semver.prerelease.length?l.semver:!1;y&&y.prerelease.length===1&&h.operator==="<"&&y.prerelease[0]===0&&(y=!1);for(let w of i){if(b=b||w.operator===">"||w.operator===">=",x=x||w.operator==="<"||w.operator==="<=",l){if(A&&w.semver.prerelease&&w.semver.prerelease.length&&w.semver.major===A.major&&w.semver.minor===A.minor&&w.semver.patch===A.patch&&(A=!1),w.operator===">"||w.operator===">="){if(m=oa(l,w,n),m===w&&m!==l)return!1}else if(l.operator===">="&&!w.test(l.semver))return!1}if(h){if(y&&w.semver.prerelease&&w.semver.prerelease.length&&w.semver.major===y.major&&w.semver.minor===y.minor&&w.semver.patch===y.patch&&(y=!1),w.operator==="<"||w.operator==="<="){if(v=ua(h,w,n),v===w&&v!==h)return!1}else if(h.operator==="<="&&!w.test(h.semver))return!1}if(!w.operator&&(h||l)&&f!==0)return!1}return!(l&&x&&!h&&f!==0||h&&b&&!l&&f!==0||A||y)},oa=(r,i,n)=>{if(!r)return i;let o=Si(r.semver,i.semver,n);return o>0?r:o<0||i.operator===">"&&r.operator===">="?i:r},ua=(r,i,n)=>{if(!r)return i;let o=Si(r.semver,i.semver,n);return o<0?r:o>0||i.operator==="<"&&r.operator==="<="?i:r};ca.exports=Yh});var da=S((Mp,pa)=>{"use strict";var wi=Oe(),la=Le(),Zh=M(),fa=ai(),el=ge(),tl=Fs(),il=Ds(),rl=js(),sl=Ms(),nl=Hs(),al=Xs(),ol=Ks(),ul=Js(),cl=re(),hl=tn(),ll=sn(),fl=gt(),pl=un(),dl=hn(),ml=Xe(),xl=vt(),gl=ci(),vl=hi(),yl=yt(),El=Et(),bl=li(),Sl=yn(),wl=bn(),Cl=ze(),_l=se(),Il=Ye(),kl=Vn(),Al=$n(),Nl=jn(),Rl=Mn(),Pl=Hn(),Tl=wt(),Ll=Jn(),Ol=Zn(),Fl=ia(),Vl=sa(),Dl=ha();pa.exports={parse:el,valid:tl,clean:il,inc:rl,diff:sl,major:nl,minor:al,patch:ol,prerelease:ul,compare:cl,rcompare:hl,compareLoose:ll,compareBuild:fl,sort:pl,rsort:dl,gt:ml,lt:xl,eq:gl,neq:vl,gte:yl,lte:El,cmp:bl,coerce:Sl,truncate:wl,Comparator:Cl,Range:_l,satisfies:Il,toComparators:kl,maxSatisfying:Al,minSatisfying:Nl,minVersion:Rl,validRange:Pl,outside:Tl,gtr:Ll,ltr:Ol,intersects:Fl,simplifyRange:Vl,subset:Dl,SemVer:Zh,re:wi.re,src:wi.src,tokens:wi.t,SEMVER_SPEC_VERSION:la.SEMVER_SPEC_VERSION,RELEASE_TYPES:la.RELEASE_TYPES,compareIdentifiers:fa.compareIdentifiers,rcompareIdentifiers:fa.rcompareIdentifiers}});var Ii=S((Gp,Ca)=>{var ve=require("fs"),ne=require("path"),xa=Ss(),we=da(),{DEFAULT_API_URL:$l}=Ge(),Ci=["dependencies","devDependencies","optionalDependencies","peerDependencies"];function ga(r){let i=new Map;for(let n of r){let o=typeof n=="string"&&n.match(/^((?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*)(?:@([^\r\n]+))?$/);if(!o)throw new Error(`Invalid npm dependency: ${String(n)}`);let[,l,h]=o,f=i.get(l);i.set(l,f&&h?ql(l,f,h):h||f)}return i}function ql(r,i,n){if(i===n)return i;let o=we.validRange(i),l=we.validRange(n);if(o&&l)try{if(we.subset(l,o))return n;if(we.subset(o,l))return i}catch{}throw new Error(`Conflicting registry versions for ${r}: ${i} and ${n}`)}function va(r,i){let n=typeof r=="string"&&we.validRange(r),o=we.validRange(i);if(!n||!o)return!1;try{return we.subset(n,o)}catch{return!1}}function ya(r,i){let n=ga(i);if(n.size===0)return;let o=ne.join(r,"package.json"),l=JSON.parse(ve.readFileSync(o,"utf8"));for(let[h,f]of n){let m=Ci.find(x=>Object.hasOwn(l[x]||{},h))||"dependencies";l[m]||={};let v=l[m][h];l[m][h]=f?va(v,f)?v:f:v||"latest"}ve.writeFileSync(o,`${JSON.stringify(l,null,2)}
3
+ `)}function Ct(r){let i=[["pnpm-lock.yaml","pnpm"],["yarn.lock","yarn"],["bun.lock","bun"],["bun.lockb","bun"],["package-lock.json","npm"],["npm-shrinkwrap.json","npm"]];for(let n=ne.resolve(r);;n=ne.dirname(n)){let o=ne.join(n,"package.json");if(ve.existsSync(o)){let l=JSON.parse(ve.readFileSync(o,"utf8")),h=String(l.packageManager||"").split("@")[0];if(["npm","pnpm","yarn","bun"].includes(h))return h}for(let[l,h]of i)if(ve.existsSync(ne.join(n,l)))return h;if(ne.dirname(n)===n)return"npm"}}var ma={npm:"npx",pnpm:"pnpm exec",yarn:"yarn",bun:"bunx"};function Ea(r,i=process.cwd()){let n;try{n=Ct(i)}catch{n="npm"}return`${ma[n]||ma.npm} frontfriend ${r}`}function jl(r,i=process.cwd()){let n=null;try{n=r?new URL(r).origin:null}catch{n=null}return Ea(n&&n!==new URL($l).origin?`login --api-url ${n}`:"login",i)}function _i(r,i){let n=ga(i);if(n.size===0)return[];let o=JSON.parse(ve.readFileSync(ne.join(r,"package.json"),"utf8")),l=[];for(let[h,f]of n){let m=Ci.find(v=>Object.hasOwn(o[v]||{},h));m&&(!f||va(o[m][h],f))||l.push(f?`${h}@${f}`:h)}return l}function ba(r,i){return[r==="npm"?"install":"add",...i]}function Bl(r){return/^[\w@/.:^~=+-]+$/.test(r)?r:`'${r.replace(/'/g,"'\\''")}'`}function Sa(r,i){let n=Ct(r);return[n,...ba(n,i)].map(Bl).join(" ")}function wa(r,i,{stdio:n="inherit"}={}){let o=_i(r,i);if(o.length===0)return;let l=Ct(r),h=xa.sync(l,ba(l,o),{cwd:r,stdio:n});if(h.error||h.status!==0)throw ya(r,i),h.error||new Error(`${l} dependency installation failed with status ${h.status}. Dependencies were saved; run ${l} install.`)}function Ul(r,i,{install:n=!0,stdio:o="inherit",log:l=console.log}={}){let h=_i(r,i);if(h.length===0)return{missing:h,command:null,installed:!1};let f=Sa(r,h);if(!n)return l(`\u{1F4E6} Component dependencies missing from package.json. Install them with:
4
+ ${f}`),{missing:h,command:f,installed:!1};l(`\u{1F4E6} Installing component dependencies: ${f}`);try{return wa(r,h,{stdio:o}),{missing:h,command:f,installed:!0}}catch(m){return l(`\u26A0\uFE0F Component dependencies were not installed: ${m.message}
5
+ Install them with:
6
+ ${f}`),{missing:h,command:f,installed:!1,error:m.message}}}function Ml(r,i){for(let n=ne.resolve(r);;n=ne.dirname(n)){if(ve.existsSync(ne.join(n,"node_modules",i,"package.json")))return!0;if(ne.dirname(n)===n)return!1}}function Gl(r,i,{install:n=!0,stdio:o="inherit",log:l=console.log}={}){let h=JSON.parse(ve.readFileSync(ne.join(r,"package.json"),"utf8"));if(!Ci.some(y=>Object.hasOwn(h[y]||{},i))||Ml(r,i))return{installed:!1,command:null};let m=Ct(r),v=`${m} install`;if(!n)return l(`\u{1F4E6} ${i} is in package.json but not installed. Install it with:
7
+ ${v}`),{installed:!1,command:v};l(`\u{1F4E6} Installing ${i}: ${v}`);let x=xa.sync(m,["install"],{cwd:r,stdio:o});if(!x.error&&x.status===0)return{installed:!0,command:v};let b=x.error?x.error.message:`${m} install failed with status ${x.status}`;return l(`\u26A0\uFE0F ${i} was not installed: ${b}
8
+ Install it with:
9
+ ${v}`),{installed:!1,command:v,error:b}}Ca.exports={cliCommand:Ea,loginCommand:jl,installDeclaredPackage:Gl,saveNpmDependencies:ya,installNpmDependencies:wa,installMissingNpmDependencies:Ul,missingNpmDependencies:_i,npmInstallCommand:Sa}});var Ai=S((Hp,Ta)=>{var{fileExists:Hl,readJsonFileSafe:Wl,removeFile:Xl,writePrivateJsonFileAtomic:zl,withPrivateFileLock:Kl}=He(),_a=require("path"),Yl=require("os"),Jl=require("https"),Ql=require("http"),{URL:de}=require("url"),{DEFAULT_API_URL:Ce}=Ge(),{cliCommand:Ia,loginCommand:Zl}=Ii(),ef=_a.join(Yl.homedir(),".frontfriend"),Ve=_a.join(ef,"credentials");function tf(){return Ve}function _t(){try{return Wl(Ve)}catch{return null}}function ka(r){try{let i=JSON.parse(Buffer.from(String(r).split(".")[1],"base64url").toString("utf8"));return typeof i.email=="string"?i.email:null}catch{return null}}function rf(){let r=_t();if(!r||!r.accessToken)return null;let i=Number(r.refreshExpiresAt)||0;return{email:ka(r.accessToken),apiUrl:r.ffApiUrl||null,expired:i>0&&i<Date.now()}}function Aa(r){zl(Ve,r)}function sf(){return Hl(Ve)?(Xl(Ve),!0):!1}function ki(r,i=60*1e3){return!r?.accessToken||!r.expiresAt||Date.now()+i>=r.expiresAt}function Fe(r,{apiUrl:i,login:n,next:o}={}){let l=o||`Run \`${n||Zl(i)}\` to sign in, then run the command again.`,h=new Error(`${r}. ${l}`);return h.code="FF_AUTH_REFRESH_FAILED",h}function Na(r,i,n){return new Promise((o,l)=>{let h=new de(r);if(h.protocol!=="https:"&&!(h.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(h.hostname))){l(new Error("Frontfriend API URLs require HTTPS except on localhost"));return}let f=h.protocol==="https:"?Jl:Ql,m=JSON.stringify(i||{}),v=f.request({hostname:h.hostname,port:h.port,path:`${h.pathname}${h.search}`,method:"POST",headers:{"content-type":"application/json","content-length":Buffer.byteLength(m),...n?{authorization:`Bearer ${n}`}:{}}},x=>{let b="";x.on("data",y=>{b+=y}),x.on("end",()=>{if(x.statusCode>=300&&x.statusCode<400){let A=x.headers.location?` to ${x.headers.location}`:"",w=new Error(`HTTP ${x.statusCode}: redirected${A}`);w.statusCode=x.statusCode,w.body=b,l(w);return}let y=null;try{y=b?JSON.parse(b):null}catch{let w=x.headers["content-type"]||"unknown content-type",N=new Error(`Expected JSON from FrontFriend API at ${r}, but received ${w} (HTTP ${x.statusCode}). Check FF_API_URL or pass --api-url with the FrontFriend app URL.`);if(N.statusCode=x.statusCode,N.body=b,x.statusCode>=400){l(N);return}l(N);return}if(x.statusCode>=400){let A=new Error(y?.error_description||y?.error||`HTTP ${x.statusCode}`);A.statusCode=x.statusCode,A.body=y,l(A);return}o(y)})});v.setTimeout(15e3,()=>v.destroy(Object.assign(new Error("Frontfriend API request timed out"),{code:"ETIMEDOUT"}))),v.on("error",l),v.write(m),v.end()})}function Ra(r,i){let n=new de(r?.ffApiUrl||Ce).origin,o=new de(i).origin;return Fe(`You are signed in to ${n}, but this command uses ${o}`,{login:Ia(`login --api-url ${o}`)})}async function nf(r){return Kl(Ve,r,()=>Fe("Another Frontfriend command is renewing your sign-in",{next:"Wait for it to finish, then run the command again."}))}async function Pa(r,i=Ce){return nf(async()=>{let n=_t();if(n&&new de(n.ffApiUrl||Ce).origin===new de(i).origin){if(!ki(n))return n;r=n}return af(r,i)})}async function af(r,i=Ce){if(new de(i).origin!==new de(r.ffApiUrl||Ce).origin)throw Ra(r,i);if(!r?.refreshToken||!r?.deviceId)throw Fe("Your Frontfriend sign-in has expired",{apiUrl:i});let n;try{n=await Na(`${i}/api/plugin/token`,{grant_type:"refresh_token",refresh_token:r.refreshToken,device_id:r.deviceId})}catch(l){throw Object.assign(Fe(l?.message?`Could not renew your Frontfriend sign-in (${l.message})`:"Could not renew your Frontfriend sign-in",{apiUrl:i}),{cause:l})}if(!n?.access_token||!n?.refresh_token)throw Fe("Could not renew your Frontfriend sign-in",{apiUrl:i});let o={accessToken:n.access_token,refreshToken:n.refresh_token,deviceId:n.device_id||r.deviceId,expiresAt:Date.now()+(n.expires_in||900)*1e3,refreshExpiresAt:Date.now()+(n.refresh_expires_in||604800)*1e3,ffApiUrl:i};return Aa(o),o}async function of(r={}){if(r.envToken)return r.envToken;if(!r.skipCredentials){let i=_t();if(i?.accessToken||i?.refreshToken){let n=r.baseURL||i.ffApiUrl||Ce;if(new de(n).origin!==new de(i.ffApiUrl||Ce).origin)throw Ra(i,n);return i.accessToken&&!ki(i)?i.accessToken:(await Pa(i,n)).accessToken}}return r.configuredToken?(r.silent||console.warn(`\u26A0\uFE0F auth-token in frontfriend.config.js is deprecated. Run \`${Ia("login")}\` to keep your sign-in outside the repository.`),r.configuredToken):null}Ta.exports={accountEmail:ka,signedInAccount:rf,getCredentialsPath:tf,readCredentials:_t,writeCredentials:Aa,deleteCredentials:sf,isExpired:ki,postJson:Na,refreshCredentials:Pa,resolveAuthToken:of,createAuthRefreshError:Fe}});var Fa=S((Wp,Oa)=>{var ce=require("path"),{fileExists:Ni}=He();function La(r,i=process.cwd()){let n=i;for(;n!==ce.parse(n).root;){let o=ce.join(n,r);if(Ni(o))return o;n=ce.dirname(n)}return null}function uf(r,i=process.cwd(),n=null){let o=[],l=i,h=10;for(let f=0;f<h;f++){o.push(ce.join(l,r)),f<3&&o.push(ce.join(l,"../".repeat(f+1)+r));let m=ce.dirname(l);if(m===l)break;l=m}o.push(ce.join(__dirname,"../../../",r));for(let f of o)if(Ni(f)&&(!n||n(f)))return f;return null}function cf(r,i=process.cwd()){let n=r.map(o=>ce.isAbsolute(o)?o:ce.join(i,o));for(let o of n)if(Ni(o))return o;return null}function hf(r=process.cwd()){let i=La("frontfriend.config.js",r);return i?ce.dirname(i):r}Oa.exports={findFileUpward:La,findDirectoryUpward:uf,findDirectoryWithPaths:cf,resolveProjectRoot:hf}});var Da=S((It,Va)=>{(function(r,i){typeof It=="object"&&typeof Va<"u"?i(It):typeof define=="function"&&define.amd?define(["exports"],i):(r=typeof globalThis<"u"?globalThis:r||self,i(r.acorn={}))})(It,function(r){"use strict";var i=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,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,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,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,199,7,137,9,54,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,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,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,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],n=[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,4,51,13,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,7,25,39,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,39,27,10,22,251,41,7,1,17,5,57,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,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,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,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,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,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,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,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],o="\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\u0897-\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-\u1ADD\u1AE0-\u1AEB\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",l="\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-\u088F\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\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\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-\u1C8A\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-\uA7DC\uA7F1-\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",h={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"},f="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",m={5:f,"5module":f+" export import",6:f+" const class extends export import super"},v=/^in(stanceof)?$/,x=new RegExp("["+l+"]"),b=new RegExp("["+l+o+"]");function y(e,t){for(var s=65536,a=0;a<t.length;a+=2){if(s+=t[a],s>e)return!1;if(s+=t[a+1],s>=e)return!0}return!1}function A(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&x.test(String.fromCharCode(e)):t===!1?!1:y(e,n)}function w(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&&b.test(String.fromCharCode(e)):t===!1?!1:y(e,n)||y(e,i)}var N=function(t,s){s===void 0&&(s={}),this.label=t,this.keyword=s.keyword,this.beforeExpr=!!s.beforeExpr,this.startsExpr=!!s.startsExpr,this.isLoop=!!s.isLoop,this.isAssign=!!s.isAssign,this.prefix=!!s.prefix,this.postfix=!!s.postfix,this.binop=s.binop||null,this.updateContext=null};function H(e,t){return new N(e,{beforeExpr:!0,binop:t})}var Y={beforeExpr:!0},J={startsExpr:!0},Qe={};function F(e,t){return t===void 0&&(t={}),t.keyword=e,Qe[e]=new N(e,t)}var u={num:new N("num",J),regexp:new N("regexp",J),string:new N("string",J),name:new N("name",J),privateId:new N("privateId",J),eof:new N("eof"),bracketL:new N("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new N("]"),braceL:new N("{",{beforeExpr:!0,startsExpr:!0}),braceR:new N("}"),parenL:new N("(",{beforeExpr:!0,startsExpr:!0}),parenR:new N(")"),comma:new N(",",Y),semi:new N(";",Y),colon:new N(":",Y),dot:new N("."),question:new N("?",Y),questionDot:new N("?."),arrow:new N("=>",Y),template:new N("template"),invalidTemplate:new N("invalidTemplate"),ellipsis:new N("...",Y),backQuote:new N("`",J),dollarBraceL:new N("${",{beforeExpr:!0,startsExpr:!0}),eq:new N("=",{beforeExpr:!0,isAssign:!0}),assign:new N("_=",{beforeExpr:!0,isAssign:!0}),incDec:new N("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new N("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:H("||",1),logicalAND:H("&&",2),bitwiseOR:H("|",3),bitwiseXOR:H("^",4),bitwiseAND:H("&",5),equality:H("==/!=/===/!==",6),relational:H("</>/<=/>=",7),bitShift:H("<</>>/>>>",8),plusMin:new N("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:H("%",10),star:H("*",10),slash:H("/",10),starstar:new N("**",{beforeExpr:!0}),coalesce:H("??",1),_break:F("break"),_case:F("case",Y),_catch:F("catch"),_continue:F("continue"),_debugger:F("debugger"),_default:F("default",Y),_do:F("do",{isLoop:!0,beforeExpr:!0}),_else:F("else",Y),_finally:F("finally"),_for:F("for",{isLoop:!0}),_function:F("function",J),_if:F("if"),_return:F("return",Y),_switch:F("switch"),_throw:F("throw",Y),_try:F("try"),_var:F("var"),_const:F("const"),_while:F("while",{isLoop:!0}),_with:F("with"),_new:F("new",{beforeExpr:!0,startsExpr:!0}),_this:F("this",J),_super:F("super",J),_class:F("class",J),_extends:F("extends",Y),_export:F("export"),_import:F("import",J),_null:F("null",J),_true:F("true",J),_false:F("false",J),_in:F("in",{beforeExpr:!0,binop:7}),_instanceof:F("instanceof",{beforeExpr:!0,binop:7}),_typeof:F("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:F("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:F("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},z=/\r\n?|\n|\u2028|\u2029/,Ti=new RegExp(z.source,"g");function ye(e){return e===10||e===13||e===8232||e===8233}function Li(e,t,s){s===void 0&&(s=e.length);for(var a=t;a<s;a++){var c=e.charCodeAt(a);if(ye(c))return a<s-1&&c===13&&e.charCodeAt(a+1)===10?a+2:a+1}return-1}var Nt=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,U=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Oi=Object.prototype,Ka=Oi.hasOwnProperty,Ya=Oi.toString,_e=Object.hasOwn||function(e,t){return Ka.call(e,t)},Fi=Array.isArray||function(e){return Ya.call(e)==="[object Array]"},Vi=Object.create(null);function me(e){return Vi[e]||(Vi[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function he(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var Ja=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Ie=function(t,s){this.line=t,this.column=s};Ie.prototype.offset=function(t){return new Ie(this.line,this.column+t)};var $e=function(t,s,a){this.start=s,this.end=a,t.sourceFile!==null&&(this.source=t.sourceFile)};function Rt(e,t){for(var s=1,a=0;;){var c=Li(e,a,t);if(c<0)return new Ie(s,t-a);++s,a=c}}var Ze={ecmaVersion:null,sourceType:"script",strict:!1,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},Di=!1;function Qa(e){var t={};for(var s in Ze)t[s]=e&&_e(e,s)?e[s]:Ze[s];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!Di&&typeof console=="object"&&console.warn&&(Di=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
10
+ 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),Fi(t.onToken)){var a=t.onToken;t.onToken=function(c){return a.push(c)}}if(Fi(t.onComment)&&(t.onComment=Za(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function Za(e,t){return function(s,a,c,p,d,g){var E={type:s?"Block":"Line",value:a,start:c,end:p};e.locations&&(E.loc=new $e(this,d,g)),e.ranges&&(E.range=[c,p]),t.push(E)}}var Ee=1,be=2,Pt=4,$i=8,Tt=16,qi=32,et=64,ji=128,Se=256,qe=512,Bi=1024,tt=Ee|be|Se;function Lt(e,t){return be|(e?Pt:0)|(t?$i:0)}var it=0,Ot=1,le=2,Ui=3,Mi=4,Gi=5,q=function(t,s,a){this.options=t=Qa(t),this.sourceFile=t.sourceFile,this.keywords=me(m[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var c="";t.allowReserved!==!0&&(c=h[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(c+=" await")),this.reservedWords=me(c);var p=(c?c+" ":"")+h.strict;this.reservedWordsStrict=me(p),this.reservedWordsStrictBind=me(p+" "+h.strictBind),this.input=String(s),this.containsEsc=!1,a?(this.pos=a,this.lineStart=this.input.lastIndexOf(`
11
+ `,a-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(z).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=u.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||t.strict===!0||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(this.options.sourceType==="commonjs"?be:Ee),this.regexpState=null,this.privateNameStack=[]},Z={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};q.prototype.parse=function(){var t=this,s=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(s)})},Z.inFunction.get=function(){return(this.currentVarScope().flags&be)>0},Z.inGenerator.get=function(){return(this.currentVarScope().flags&$i)>0},Z.inAsync.get=function(){return(this.currentVarScope().flags&Pt)>0},Z.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],s=t.flags;if(s&(Se|qe))return!1;if(s&be)return(s&Pt)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Z.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Ee)},Z.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&et)>0||this.options.allowSuperOutsideMethod},Z.allowDirectSuper.get=function(){return(this.currentThisScope().flags&ji)>0},Z.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Z.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],s=t.flags;if(s&(Se|qe)||s&be&&!(s&Tt))return!0}return!1},Z.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&Bi||!this.inModule&&t&Ee)},Z.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Se)>0},q.extend=function(){for(var t=[],s=arguments.length;s--;)t[s]=arguments[s];for(var a=this,c=0;c<t.length;c++)a=t[c](a);return a},q.parse=function(t,s){return new this(s,t).parse()},q.parseExpressionAt=function(t,s,a){var c=new this(a,t,s);return c.nextToken(),c.parseExpression()},q.tokenizer=function(t,s){return new this(s,t)},Object.defineProperties(q.prototype,Z);var W=q.prototype,eo=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;W.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){U.lastIndex=e,e+=U.exec(this.input)[0].length;var t=eo.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){U.lastIndex=e+t[0].length;var s=U.exec(this.input),a=s.index+s[0].length,c=this.input.charAt(a);return c===";"||c==="}"||z.test(s[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(c)||c==="!"&&this.input.charAt(a+1)==="=")}e+=t[0].length,U.lastIndex=e,e+=U.exec(this.input)[0].length,this.input[e]===";"&&e++}},W.eat=function(e){return this.type===e?(this.next(),!0):!1},W.isContextual=function(e){return this.type===u.name&&this.value===e&&!this.containsEsc},W.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},W.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}},W.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},W.canInsertSemicolon=function(){return this.type===u.eof||this.type===u.braceR||z.test(this.input.slice(this.lastTokEnd,this.start))},W.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},W.semicolon=function(){!this.eat(u.semi)&&!this.insertSemicolon()&&this.unexpected()},W.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},W.expect=function(e){this.eat(e)||this.unexpected()},W.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var rt=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};W.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var s=t?e.parenthesizedAssign:e.parenthesizedBind;s>-1&&this.raiseRecoverable(s,t?"Assigning to rvalue":"Parenthesized pattern")}},W.checkExpressionErrors=function(e,t){if(!e)return!1;var s=e.shorthandAssign,a=e.doubleProto;if(!t)return s>=0||a>=0;s>=0&&this.raise(s,"Shorthand property assignments are valid only in destructuring patterns"),a>=0&&this.raiseRecoverable(a,"Redefinition of __proto__ property")},W.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},W.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var k=q.prototype;k.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==u.eof;){var s=this.parseStatement(null,!0,t);e.body.push(s)}if(this.inModule)for(var a=0,c=Object.keys(this.undefinedExports);a<c.length;a+=1){var p=c[a];this.raiseRecoverable(this.undefinedExports[p].start,"Export '"+p+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var Ft={kind:"loop"},to={kind:"switch"};k.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;U.lastIndex=this.pos;var t=U.exec(this.input),s=this.pos+t[0].length,a=this.fullCharCodeAt(s);if(a===91||a===92)return!0;if(e)return!1;if(a===123)return!0;if(A(a)){var c=s;do s+=a<=65535?1:2;while(w(a=this.fullCharCodeAt(s)));if(a===92)return!0;var p=this.input.slice(c,s);if(!v.test(p))return!0}return!1},k.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;U.lastIndex=this.pos;var e=U.exec(this.input),t=this.pos+e[0].length,s;return!z.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(w(s=this.fullCharCodeAt(t+8))||s===92))},k.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;U.lastIndex=this.pos;var s=U.exec(this.input),a=this.pos+s[0].length;if(z.test(this.input.slice(this.pos,a)))return!1;if(e){var c=a+5,p;if(this.input.slice(a,c)!=="using"||c===this.input.length||w(p=this.fullCharCodeAt(c))||p===92)return!1;U.lastIndex=c;var d=U.exec(this.input);if(a=c+d[0].length,d&&z.test(this.input.slice(c,a)))return!1}var g=this.fullCharCodeAt(a);if(!A(g)&&g!==92)return!1;var E=a;do a+=g<=65535?1:2;while(w(g=this.fullCharCodeAt(a)));if(g===92)return!0;var R=this.input.slice(E,a);if(v.test(R))return!1;if(t&&!e&&R==="of"){U.lastIndex=a;var L=U.exec(this.input);if(a=a+L[0].length,this.input.charCodeAt(a)!==61||(g=this.input.charCodeAt(a+1))===61||g===62)return!1}return!0},k.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},k.isUsing=function(e){return this.isUsingKeyword(!1,e)},k.parseStatement=function(e,t,s){var a=this.type,c=this.startNode(),p;switch(this.isLet(e)&&(a=u._var,p="let"),a){case u._break:case u._continue:return this.parseBreakContinueStatement(c,a.keyword);case u._debugger:return this.parseDebuggerStatement(c);case u._do:return this.parseDoStatement(c);case u._for:return this.parseForStatement(c);case u._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(c,!1,!e);case u._class:return e&&this.unexpected(),this.parseClass(c,!0);case u._if:return this.parseIfStatement(c);case u._return:return this.parseReturnStatement(c);case u._switch:return this.parseSwitchStatement(c);case u._throw:return this.parseThrowStatement(c);case u._try:return this.parseTryStatement(c);case u._const:case u._var:return p=p||this.value,e&&p!=="var"&&this.unexpected(),this.parseVarStatement(c,p);case u._while:return this.parseWhileStatement(c);case u._with:return this.parseWithStatement(c);case u.braceL:return this.parseBlock(!0,c);case u.semi:return this.parseEmptyStatement(c);case u._export:case u._import:if(this.options.ecmaVersion>10&&a===u._import){U.lastIndex=this.pos;var d=U.exec(this.input),g=this.pos+d[0].length,E=this.input.charCodeAt(g);if(E===40||E===46)return this.parseExpressionStatement(c,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'")),a===u._import?this.parseImport(c):this.parseExport(c,s);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(c,!0,!e);var R=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(R)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),e&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),R==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(c,!1,R),this.semicolon(),this.finishNode(c,"VariableDeclaration");var L=this.value,D=this.parseExpression();return a===u.name&&D.type==="Identifier"&&this.eat(u.colon)?this.parseLabeledStatement(c,L,D,e):this.parseExpressionStatement(c,D)}},k.parseBreakContinueStatement=function(e,t){var s=t==="break";this.next(),this.eat(u.semi)||this.insertSemicolon()?e.label=null:this.type!==u.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var a=0;a<this.labels.length;++a){var c=this.labels[a];if((e.label==null||c.name===e.label.name)&&(c.kind!=null&&(s||c.kind==="loop")||e.label&&s))break}return a===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,s?"BreakStatement":"ContinueStatement")},k.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},k.parseDoStatement=function(e){return this.next(),this.labels.push(Ft),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(u._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(u.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},k.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Ft),this.enterScope(0),this.expect(u.parenL),this.type===u.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var s=this.isLet();if(this.type===u._var||this.type===u._const||s){var a=this.startNode(),c=s?"let":this.value;return this.next(),this.parseVar(a,!0,c),this.finishNode(a,"VariableDeclaration"),this.parseForAfterInit(e,a,t)}var p=this.isContextual("let"),d=!1,g=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(g){var E=this.startNode();return this.next(),g==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(E,!0,g),this.finishNode(E,"VariableDeclaration"),this.parseForAfterInit(e,E,t)}var R=this.containsEsc,L=new rt,D=this.start,X=t>-1?this.parseExprSubscripts(L,"await"):this.parseExpression(!0,L);return this.type===u._in||(d=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===u._in&&this.unexpected(t),e.await=!0):d&&this.options.ecmaVersion>=8&&(X.start===D&&!R&&X.type==="Identifier"&&X.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),p&&d&&this.raise(X.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(X,!1,L),this.checkLValPattern(X),this.parseForIn(e,X)):(this.checkExpressionErrors(L,!0),t>-1&&this.unexpected(t),this.parseFor(e,X))},k.parseForAfterInit=function(e,t,s){return(this.type===u._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.type===u._in?((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&s>-1&&this.unexpected(s)):this.options.ecmaVersion>=9&&(e.await=s>-1),this.parseForIn(e,t)):(s>-1&&this.unexpected(s),this.parseFor(e,t))},k.parseFunctionStatement=function(e,t,s){return this.next(),this.parseFunction(e,je|(s?0:Vt),!1,t)},k.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(u._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},k.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(u.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},k.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(u.braceL),this.labels.push(to),this.enterScope(Bi);for(var t,s=!1;this.type!==u.braceR;)if(this.type===u._case||this.type===u._default){var a=this.type===u._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),a?t.test=this.parseExpression():(s&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),s=!0,t.test=null),this.expect(u.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")},k.parseThrowStatement=function(e){return this.next(),z.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")};var io=[];k.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?qi:0),this.checkLValPattern(e,t?Mi:le),this.expect(u.parenR),e},k.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===u._catch){var t=this.startNode();this.next(),this.eat(u.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(u._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},k.parseVarStatement=function(e,t,s){return this.next(),this.parseVar(e,!1,t,s),this.semicolon(),this.finishNode(e,"VariableDeclaration")},k.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Ft),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},k.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")},k.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},k.parseLabeledStatement=function(e,t,s,a){for(var c=0,p=this.labels;c<p.length;c+=1){var d=p[c];d.name===t&&this.raise(s.start,"Label '"+t+"' is already declared")}for(var g=this.type.isLoop?"loop":this.type===u._switch?"switch":null,E=this.labels.length-1;E>=0;E--){var R=this.labels[E];if(R.statementStart===e.start)R.statementStart=this.start,R.kind=g;else break}return this.labels.push({name:t,kind:g,statementStart:this.start}),e.body=this.parseStatement(a?a.indexOf("label")===-1?a+"label":a:"label"),this.labels.pop(),e.label=s,this.finishNode(e,"LabeledStatement")},k.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},k.parseBlock=function(e,t,s){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(u.braceL),e&&this.enterScope(0);this.type!==u.braceR;){var a=this.parseStatement(null);t.body.push(a)}return s&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},k.parseFor=function(e,t){return e.init=t,this.expect(u.semi),e.test=this.type===u.semi?null:this.parseExpression(),this.expect(u.semi),e.update=this.type===u.parenR?null:this.parseExpression(),this.expect(u.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},k.parseForIn=function(e,t){var s=this.type===u._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!s||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(s?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=s?this.parseExpression():this.parseMaybeAssign(),this.expect(u.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,s?"ForInStatement":"ForOfStatement")},k.parseVar=function(e,t,s,a){for(e.declarations=[],e.kind=s;;){var c=this.startNode();if(this.parseVarId(c,s),this.eat(u.eq)?c.init=this.parseMaybeAssign(t):!a&&s==="const"&&!(this.type===u._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!a&&(s==="using"||s==="await using")&&this.options.ecmaVersion>=17&&this.type!==u._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+s+" declaration"):!a&&c.id.type!=="Identifier"&&!(t&&(this.type===u._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):c.init=null,e.declarations.push(this.finishNode(c,"VariableDeclarator")),!this.eat(u.comma))break}return e},k.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Ot:le,!1)};var je=1,Vt=2,Hi=4;k.parseFunction=function(e,t,s,a,c){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!a)&&(this.type===u.star&&t&Vt&&this.unexpected(),e.generator=this.eat(u.star)),this.options.ecmaVersion>=8&&(e.async=!!a),t&je&&(e.id=t&Hi&&this.type!==u.name?null:this.parseIdent(),e.id&&!(t&Vt)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Ot:le:Ui));var p=this.yieldPos,d=this.awaitPos,g=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Lt(e.async,e.generator)),t&je||(e.id=this.type===u.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,s,!1,c),this.yieldPos=p,this.awaitPos=d,this.awaitIdentPos=g,this.finishNode(e,t&je?"FunctionDeclaration":"FunctionExpression")},k.parseFunctionParams=function(e){this.expect(u.parenL),e.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},k.parseClass=function(e,t){this.next();var s=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var a=this.enterClassBody(),c=this.startNode(),p=!1;for(c.body=[],this.expect(u.braceL);this.type!==u.braceR;){var d=this.parseClassElement(e.superClass!==null);d&&(c.body.push(d),d.type==="MethodDefinition"&&d.kind==="constructor"?(p&&this.raiseRecoverable(d.start,"Duplicate constructor in the same class"),p=!0):d.key&&d.key.type==="PrivateIdentifier"&&ro(a,d)&&this.raiseRecoverable(d.key.start,"Identifier '#"+d.key.name+"' has already been declared"))}return this.strict=s,this.next(),e.body=this.finishNode(c,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},k.parseClassElement=function(e){if(this.eat(u.semi))return null;var t=this.options.ecmaVersion,s=this.startNode(),a="",c=!1,p=!1,d="method",g=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(u.braceL))return this.parseClassStaticBlock(s),s;this.isClassElementNameStart()||this.type===u.star?g=!0:a="static"}if(s.static=g,!a&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===u.star)&&!this.canInsertSemicolon()?p=!0:a="async"),!a&&(t>=9||!p)&&this.eat(u.star)&&(c=!0),!a&&!p&&!c){var E=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?d=E:a=E)}if(a?(s.computed=!1,s.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),s.key.name=a,this.finishNode(s.key,"Identifier")):this.parseClassElementName(s),t<13||this.type===u.parenL||d!=="method"||c||p){var R=!s.static&&st(s,"constructor"),L=R&&e;R&&d!=="method"&&this.raise(s.key.start,"Constructor can't have get/set modifier"),s.kind=R?"constructor":d,this.parseClassMethod(s,c,p,L)}else this.parseClassField(s);return s},k.isClassElementNameStart=function(){return this.type===u.name||this.type===u.privateId||this.type===u.num||this.type===u.string||this.type===u.bracketL||this.type.keyword},k.parseClassElementName=function(e){this.type===u.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)},k.parseClassMethod=function(e,t,s,a){var c=e.key;e.kind==="constructor"?(t&&this.raise(c.start,"Constructor can't be a generator"),s&&this.raise(c.start,"Constructor can't be an async method")):e.static&&st(e,"prototype")&&this.raise(c.start,"Classes may not have a static property named prototype");var p=e.value=this.parseMethod(t,s,a);return e.kind==="get"&&p.params.length!==0&&this.raiseRecoverable(p.start,"getter should have no params"),e.kind==="set"&&p.params.length!==1&&this.raiseRecoverable(p.start,"setter should have exactly one param"),e.kind==="set"&&p.params[0].type==="RestElement"&&this.raiseRecoverable(p.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},k.parseClassField=function(e){return st(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&st(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(u.eq)?(this.enterScope(qe|et),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},k.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(Se|et);this.type!==u.braceR;){var s=this.parseStatement(null);e.body.push(s)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},k.parseClassId=function(e,t){this.type===u.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,le,!1)):(t===!0&&this.unexpected(),e.id=null)},k.parseClassSuper=function(e){e.superClass=this.eat(u._extends)?this.parseExprSubscripts(null,!1):null},k.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},k.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,s=e.used;if(this.options.checkPrivateFields)for(var a=this.privateNameStack.length,c=a===0?null:this.privateNameStack[a-1],p=0;p<s.length;++p){var d=s[p];_e(t,d.name)||(c?c.used.push(d):this.raiseRecoverable(d.start,"Private field '#"+d.name+"' must be declared in an enclosing class"))}};function ro(e,t){var s=t.key.name,a=e[s],c="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(c=(t.static?"s":"i")+t.kind),a==="iget"&&c==="iset"||a==="iset"&&c==="iget"||a==="sget"&&c==="sset"||a==="sset"&&c==="sget"?(e[s]="true",!1):a?!0:(e[s]=c,!1)}function st(e,t){var s=e.computed,a=e.key;return!s&&(a.type==="Identifier"&&a.name===t||a.type==="Literal"&&a.value===t)}k.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==u.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},k.parseExport=function(e,t){if(this.next(),this.eat(u.star))return this.parseExportAllDeclaration(e,t);if(this.eat(u._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,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==u.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var s=0,a=e.specifiers;s<a.length;s+=1){var c=a[s];this.checkUnreserved(c.local),this.checkLocalExport(c.local),c.local.type==="Literal"&&this.raise(c.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},k.parseExportDeclaration=function(e){return this.parseStatement(null)},k.parseExportDefaultDeclaration=function(){var e;if(this.type===u._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,je|Hi,!1,e)}else if(this.type===u._class){var s=this.startNode();return this.parseClass(s,"nullableID")}else{var a=this.parseMaybeAssign();return this.semicolon(),a}},k.checkExport=function(e,t,s){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),_e(e,t)&&this.raiseRecoverable(s,"Duplicate export '"+t+"'"),e[t]=!0)},k.checkPatternExport=function(e,t){var s=t.type;if(s==="Identifier")this.checkExport(e,t,t.start);else if(s==="ObjectPattern")for(var a=0,c=t.properties;a<c.length;a+=1){var p=c[a];this.checkPatternExport(e,p)}else if(s==="ArrayPattern")for(var d=0,g=t.elements;d<g.length;d+=1){var E=g[d];E&&this.checkPatternExport(e,E)}else s==="Property"?this.checkPatternExport(e,t.value):s==="AssignmentPattern"?this.checkPatternExport(e,t.left):s==="RestElement"&&this.checkPatternExport(e,t.argument)},k.checkVariableExport=function(e,t){if(e)for(var s=0,a=t;s<a.length;s+=1){var c=a[s];this.checkPatternExport(e,c.id)}},k.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},k.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")},k.parseExportSpecifiers=function(e){var t=[],s=!0;for(this.expect(u.braceL);!this.eat(u.braceR);){if(s)s=!1;else if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break;t.push(this.parseExportSpecifier(e))}return t},k.parseImport=function(e){return this.next(),this.type===u.string?(e.specifiers=io,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===u.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},k.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,le),this.finishNode(e,"ImportSpecifier")},k.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,le),this.finishNode(e,"ImportDefaultSpecifier")},k.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,le),this.finishNode(e,"ImportNamespaceSpecifier")},k.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===u.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(u.comma)))return e;if(this.type===u.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(u.braceL);!this.eat(u.braceR);){if(t)t=!1;else if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break;e.push(this.parseImportSpecifier())}return e},k.parseWithClause=function(){var e=[];if(!this.eat(u._with))return e;this.expect(u.braceL);for(var t={},s=!0;!this.eat(u.braceR);){if(s)s=!1;else if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break;var a=this.parseImportAttribute(),c=a.key.type==="Identifier"?a.key.name:a.key.value;_e(t,c)&&this.raiseRecoverable(a.key.start,"Duplicate attribute key '"+c+"'"),t[c]=!0,e.push(a)}return e},k.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===u.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(u.colon),this.type!==u.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},k.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===u.string){var e=this.parseLiteral(this.value);return Ja.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},k.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},k.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var ee=q.prototype;ee.toAssignable=function(e,t,s){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",s&&this.checkPatternErrors(s,!0);for(var a=0,c=e.properties;a<c.length;a+=1){var p=c[a];this.toAssignable(p,t),p.type==="RestElement"&&(p.argument.type==="ArrayPattern"||p.argument.type==="ObjectPattern")&&this.raise(p.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",s&&this.checkPatternErrors(s,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,s);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else s&&this.checkPatternErrors(s,!0);return e},ee.toAssignableList=function(e,t){for(var s=e.length,a=0;a<s;a++){var c=e[a];c&&this.toAssignable(c,t)}if(s){var p=e[s-1];this.options.ecmaVersion===6&&t&&p&&p.type==="RestElement"&&p.argument.type!=="Identifier"&&this.unexpected(p.argument.start)}return e},ee.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},ee.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==u.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},ee.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case u.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(u.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case u.braceL:return this.parseObj(!0)}return this.parseIdent()},ee.parseBindingList=function(e,t,s,a){for(var c=[],p=!0;!this.eat(e);)if(p?p=!1:this.expect(u.comma),t&&this.type===u.comma)c.push(null);else{if(s&&this.afterTrailingComma(e))break;if(this.type===u.ellipsis){var d=this.parseRestBinding();this.parseBindingListItem(d),c.push(d),this.type===u.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else c.push(this.parseAssignableListItem(a))}return c},ee.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},ee.parseBindingListItem=function(e){return e},ee.parseMaybeDefault=function(e,t,s){if(s=s||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(u.eq))return s;var a=this.startNodeAt(e,t);return a.left=s,a.right=this.parseMaybeAssign(),this.finishNode(a,"AssignmentPattern")},ee.checkLValSimple=function(e,t,s){t===void 0&&(t=it);var a=t!==it;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(a?"Binding ":"Assigning to ")+e.name+" in strict mode"),a&&(t===le&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),s&&(_e(s,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),s[e.name]=!0),t!==Gi&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":a&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return a&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,s);default:this.raise(e.start,(a?"Binding":"Assigning to")+" rvalue")}},ee.checkLValPattern=function(e,t,s){switch(t===void 0&&(t=it),e.type){case"ObjectPattern":for(var a=0,c=e.properties;a<c.length;a+=1){var p=c[a];this.checkLValInnerPattern(p,t,s)}break;case"ArrayPattern":for(var d=0,g=e.elements;d<g.length;d+=1){var E=g[d];E&&this.checkLValInnerPattern(E,t,s)}break;default:this.checkLValSimple(e,t,s)}},ee.checkLValInnerPattern=function(e,t,s){switch(t===void 0&&(t=it),e.type){case"Property":this.checkLValInnerPattern(e.value,t,s);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,s);break;case"RestElement":this.checkLValPattern(e.argument,t,s);break;default:this.checkLValPattern(e,t,s)}};var te=function(t,s,a,c,p){this.token=t,this.isExpr=!!s,this.preserveSpace=!!a,this.override=c,this.generator=!!p},V={b_stat:new te("{",!1),b_expr:new te("{",!0),b_tmpl:new te("${",!1),p_stat:new te("(",!1),p_expr:new te("(",!0),q_tmpl:new te("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new te("function",!1),f_expr:new te("function",!0),f_expr_gen:new te("function",!0,!1,null,!0),f_gen:new te("function",!1,!1,null,!0)},ke=q.prototype;ke.initialContext=function(){return[V.b_stat]},ke.curContext=function(){return this.context[this.context.length-1]},ke.braceIsBlock=function(e){var t=this.curContext();return t===V.f_expr||t===V.f_stat?!0:e===u.colon&&(t===V.b_stat||t===V.b_expr)?!t.isExpr:e===u._return||e===u.name&&this.exprAllowed?z.test(this.input.slice(this.lastTokEnd,this.start)):e===u._else||e===u.semi||e===u.eof||e===u.parenR||e===u.arrow?!0:e===u.braceL?t===V.b_stat:e===u._var||e===u._const||e===u.name?!1:!this.exprAllowed},ke.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1},ke.updateContext=function(e){var t,s=this.type;s.keyword&&e===u.dot?this.exprAllowed=!1:(t=s.updateContext)?t.call(this,e):this.exprAllowed=s.beforeExpr},ke.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},u.parenR.updateContext=u.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===V.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},u.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?V.b_stat:V.b_expr),this.exprAllowed=!0},u.dollarBraceL.updateContext=function(){this.context.push(V.b_tmpl),this.exprAllowed=!0},u.parenL.updateContext=function(e){var t=e===u._if||e===u._for||e===u._with||e===u._while;this.context.push(t?V.p_stat:V.p_expr),this.exprAllowed=!0},u.incDec.updateContext=function(){},u._function.updateContext=u._class.updateContext=function(e){e.beforeExpr&&e!==u._else&&!(e===u.semi&&this.curContext()!==V.p_stat)&&!(e===u._return&&z.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===u.colon||e===u.braceL)&&this.curContext()===V.b_stat)?this.context.push(V.f_expr):this.context.push(V.f_stat),this.exprAllowed=!1},u.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},u.backQuote.updateContext=function(){this.curContext()===V.q_tmpl?this.context.pop():this.context.push(V.q_tmpl),this.exprAllowed=!1},u.star.updateContext=function(e){if(e===u._function){var t=this.context.length-1;this.context[t]===V.f_expr?this.context[t]=V.f_expr_gen:this.context[t]=V.f_gen}this.exprAllowed=!0},u.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==u.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var P=q.prototype;P.checkPropClash=function(e,t,s){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var a=e.key,c;switch(a.type){case"Identifier":c=a.name;break;case"Literal":c=String(a.value);break;default:return}var p=e.kind;if(this.options.ecmaVersion>=6){c==="__proto__"&&p==="init"&&(t.proto&&(s?s.doubleProto<0&&(s.doubleProto=a.start):this.raiseRecoverable(a.start,"Redefinition of __proto__ property")),t.proto=!0);return}c="$"+c;var d=t[c];if(d){var g;p==="init"?g=this.strict&&d.init||d.get||d.set:g=d.init||d[p],g&&this.raiseRecoverable(a.start,"Redefinition of property")}else d=t[c]={init:!1,get:!1,set:!1};d[p]=!0}},P.parseExpression=function(e,t){var s=this;return this.catchStackOverflow(function(){var a=s.start,c=s.startLoc,p=s.parseMaybeAssign(e,t);if(s.type===u.comma){var d=s.startNodeAt(a,c);for(d.expressions=[p];s.eat(u.comma);)d.expressions.push(s.parseMaybeAssign(e,t));return s.finishNode(d,"SequenceExpression")}return p})},P.parseMaybeAssign=function(e,t,s){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var a=!1,c=-1,p=-1,d=-1;t?(c=t.parenthesizedAssign,p=t.trailingComma,d=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new rt,a=!0);var g=this.start,E=this.startLoc;(this.type===u.parenL||this.type===u.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var R=this.parseMaybeConditional(e,t);if(s&&(R=s.call(this,R,g,E)),this.type.isAssign){var L=this.startNodeAt(g,E);return L.operator=this.value,this.type===u.eq&&(R=this.toAssignable(R,!1,t)),a||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=R.start&&(t.shorthandAssign=-1),this.type===u.eq?this.checkLValPattern(R):this.checkLValSimple(R),L.left=R,this.next(),L.right=this.parseMaybeAssign(e),d>-1&&(t.doubleProto=d),this.finishNode(L,"AssignmentExpression")}else a&&this.checkExpressionErrors(t,!0);return c>-1&&(t.parenthesizedAssign=c),p>-1&&(t.trailingComma=p),R},P.parseMaybeConditional=function(e,t){var s=this.start,a=this.startLoc,c=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return c;if(!(c.type==="ArrowFunctionExpression"&&c.start===s)&&this.eat(u.question)){var p=this.startNodeAt(s,a);return p.test=c,p.consequent=this.parseMaybeAssign(),this.expect(u.colon),p.alternate=this.parseMaybeAssign(e),this.finishNode(p,"ConditionalExpression")}return c},P.parseExprOps=function(e,t){var s=this.start,a=this.startLoc,c=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||c.start===s&&c.type==="ArrowFunctionExpression"?c:this.parseExprOp(c,s,a,-1,e)},P.parseExprOp=function(e,t,s,a,c){var p=this.type.binop;if(p!=null&&(!c||this.type!==u._in)&&p>a){var d=this.type===u.logicalOR||this.type===u.logicalAND,g=this.type===u.coalesce;g&&(p=u.logicalAND.binop);var E=this.value;this.next();var R=this.start,L=this.startLoc,D=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,c),R,L,p,c),X=this.buildBinary(t,s,e,D,E,d||g);return(d&&this.type===u.coalesce||g&&(this.type===u.logicalOR||this.type===u.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(X,t,s,a,c)}return e},P.buildBinary=function(e,t,s,a,c,p){a.type==="PrivateIdentifier"&&this.raise(a.start,"Private identifier can only be left side of binary expression");var d=this.startNodeAt(e,t);return d.left=s,d.operator=c,d.right=a,this.finishNode(d,p?"LogicalExpression":"BinaryExpression")},P.parseMaybeUnary=function(e,t,s,a){var c=this.start,p=this.startLoc,d;if(this.isContextual("await")&&this.canAwait)d=this.parseAwait(a),t=!0;else if(this.type.prefix){var g=this.startNode(),E=this.type===u.incDec;g.operator=this.value,g.prefix=!0,this.next(),g.argument=this.parseMaybeUnary(null,!0,E,a),this.checkExpressionErrors(e,!0),E?this.checkLValSimple(g.argument):this.strict&&g.operator==="delete"&&Wi(g.argument)?this.raiseRecoverable(g.start,"Deleting local variable in strict mode"):g.operator==="delete"&&Dt(g.argument)?this.raiseRecoverable(g.start,"Private fields can not be deleted"):t=!0,d=this.finishNode(g,E?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===u.privateId)(a||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),d=this.parsePrivateIdent(),this.type!==u._in&&this.unexpected();else{if(d=this.parseExprSubscripts(e,a),this.checkExpressionErrors(e))return d;for(;this.type.postfix&&!this.canInsertSemicolon();){var R=this.startNodeAt(c,p);R.operator=this.value,R.prefix=!1,R.argument=d,this.checkLValSimple(d),this.next(),d=this.finishNode(R,"UpdateExpression")}}if(!s&&this.eat(u.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(c,p,d,this.parseMaybeUnary(null,!1,!1,a),"**",!1);else return d};function Wi(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Wi(e.expression)}function Dt(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Dt(e.expression)||e.type==="ParenthesizedExpression"&&Dt(e.expression)}P.parseExprSubscripts=function(e,t){var s=this.start,a=this.startLoc,c=this.parseExprAtom(e,t);if(c.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return c;var p=this.parseSubscripts(c,s,a,!1,t);return e&&p.type==="MemberExpression"&&(e.parenthesizedAssign>=p.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=p.start&&(e.parenthesizedBind=-1),e.trailingComma>=p.start&&(e.trailingComma=-1)),p},P.parseSubscripts=function(e,t,s,a,c){for(var p=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,d=!1;;){var g=this.parseSubscript(e,t,s,a,p,d,c);if(g.optional&&(d=!0),g===e||g.type==="ArrowFunctionExpression"){if(d){var E=this.startNodeAt(t,s);E.expression=g,g=this.finishNode(E,"ChainExpression")}return g}e=g}},P.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(u.arrow)},P.parseSubscriptAsyncArrow=function(e,t,s,a){return this.parseArrowExpression(this.startNodeAt(e,t),s,!0,a)},P.parseSubscript=function(e,t,s,a,c,p,d){var g=this.options.ecmaVersion>=11,E=g&&this.eat(u.questionDot);a&&E&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var R=this.eat(u.bracketL);if(R||E&&this.type!==u.parenL&&this.type!==u.backQuote||this.eat(u.dot)){var L=this.startNodeAt(t,s);L.object=e,R?(L.property=this.parseExpression(),this.expect(u.bracketR)):this.type===u.privateId&&e.type!=="Super"?L.property=this.parsePrivateIdent():L.property=this.parseIdent(this.options.allowReserved!=="never"),L.computed=!!R,g&&(L.optional=E),e=this.finishNode(L,"MemberExpression")}else if(!a&&this.eat(u.parenL)){var D=new rt,X=this.yieldPos,Me=this.awaitPos,Ae=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var ct=this.parseExprList(u.parenR,this.options.ecmaVersion>=8,!1,D);if(c&&!E&&this.shouldParseAsyncArrow())return this.checkPatternErrors(D,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=X,this.awaitPos=Me,this.awaitIdentPos=Ae,this.parseSubscriptAsyncArrow(t,s,ct,d);this.checkExpressionErrors(D,!0),this.yieldPos=X||this.yieldPos,this.awaitPos=Me||this.awaitPos,this.awaitIdentPos=Ae||this.awaitIdentPos;var Ne=this.startNodeAt(t,s);Ne.callee=e,Ne.arguments=ct,g&&(Ne.optional=E),e=this.finishNode(Ne,"CallExpression")}else if(this.type===u.backQuote){(E||p)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Re=this.startNodeAt(t,s);Re.tag=e,Re.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(Re,"TaggedTemplateExpression")}return e},P.parseExprAtom=function(e,t,s){this.type===u.slash&&this.readRegexp();var a,c=this.potentialArrowAt===this.start;switch(this.type){case u._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),a=this.startNode(),this.next(),this.type===u.parenL&&!this.allowDirectSuper&&this.raise(a.start,"super() call outside constructor of a subclass"),this.type!==u.dot&&this.type!==u.bracketL&&this.type!==u.parenL&&this.unexpected(),this.finishNode(a,"Super");case u._this:return a=this.startNode(),this.next(),this.finishNode(a,"ThisExpression");case u.name:var p=this.start,d=this.startLoc,g=this.containsEsc,E=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!g&&E.name==="async"&&!this.canInsertSemicolon()&&this.eat(u._function))return this.overrideContext(V.f_expr),this.parseFunction(this.startNodeAt(p,d),0,!1,!0,t);if(c&&!this.canInsertSemicolon()){if(this.eat(u.arrow))return this.parseArrowExpression(this.startNodeAt(p,d),[E],!1,t);if(this.options.ecmaVersion>=8&&E.name==="async"&&this.type===u.name&&!g&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return E=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(u.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(p,d),[E],!0,t)}return E;case u.regexp:var R=this.value;return a=this.parseLiteral(R.value),a.regex={pattern:R.pattern,flags:R.flags},a;case u.num:case u.string:return this.parseLiteral(this.value);case u._null:case u._true:case u._false:return a=this.startNode(),a.value=this.type===u._null?null:this.type===u._true,a.raw=this.type.keyword,this.next(),this.finishNode(a,"Literal");case u.parenL:var L=this.start,D=this.parseParenAndDistinguishExpression(c,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(D)&&(e.parenthesizedAssign=L),e.parenthesizedBind<0&&(e.parenthesizedBind=L)),D;case u.bracketL:return a=this.startNode(),this.next(),a.elements=this.parseExprList(u.bracketR,!0,!0,e),this.finishNode(a,"ArrayExpression");case u.braceL:return this.overrideContext(V.b_expr),this.parseObj(!1,e);case u._function:return a=this.startNode(),this.next(),this.parseFunction(a,0);case u._class:return this.parseClass(this.startNode(),!1);case u._new:return this.parseNew();case u.backQuote:return this.parseTemplate();case u._import:return this.options.ecmaVersion>=11?this.parseExprImport(s):this.unexpected();default:return this.parseExprAtomDefault()}},P.parseExprAtomDefault=function(){this.unexpected()},P.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===u.parenL&&!e)return this.parseDynamicImport(t);if(this.type===u.dot){var s=this.startNodeAt(t.start,t.loc&&t.loc.start);return s.name="import",t.meta=this.finishNode(s,"Identifier"),this.parseImportMeta(t)}else this.unexpected()},P.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(u.parenR)?e.options=null:(this.expect(u.comma),this.afterTrailingComma(u.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(u.parenR)||(this.expect(u.comma),this.afterTrailingComma(u.parenR)||this.unexpected())));else if(!this.eat(u.parenR)){var t=this.start;this.eat(u.comma)&&this.eat(u.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},P.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")},P.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.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},P.parseParenExpression=function(){this.expect(u.parenL);var e=this.parseExpression();return this.expect(u.parenR),e},P.shouldParseArrow=function(e){return!this.canInsertSemicolon()},P.parseParenAndDistinguishExpression=function(e,t){var s=this.start,a=this.startLoc,c,p=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var d=this.start,g=this.startLoc,E=[],R=!0,L=!1,D=new rt,X=this.yieldPos,Me=this.awaitPos,Ae;for(this.yieldPos=0,this.awaitPos=0;this.type!==u.parenR;)if(R?R=!1:this.expect(u.comma),p&&this.afterTrailingComma(u.parenR,!0)){L=!0;break}else if(this.type===u.ellipsis){Ae=this.start,E.push(this.parseParenItem(this.parseRestBinding())),this.type===u.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else E.push(this.parseMaybeAssign(!1,D,this.parseParenItem));var ct=this.lastTokEnd,Ne=this.lastTokEndLoc;if(this.expect(u.parenR),e&&this.shouldParseArrow(E)&&this.eat(u.arrow))return this.checkPatternErrors(D,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=X,this.awaitPos=Me,this.parseParenArrowList(s,a,E,t);(!E.length||L)&&this.unexpected(this.lastTokStart),Ae&&this.unexpected(Ae),this.checkExpressionErrors(D,!0),this.yieldPos=X||this.yieldPos,this.awaitPos=Me||this.awaitPos,E.length>1?(c=this.startNodeAt(d,g),c.expressions=E,this.finishNodeAt(c,"SequenceExpression",ct,Ne)):c=E[0]}else c=this.parseParenExpression();if(this.options.preserveParens){var Re=this.startNodeAt(s,a);return Re.expression=c,this.finishNode(Re,"ParenthesizedExpression")}else return c},P.parseParenItem=function(e){return e},P.parseParenArrowList=function(e,t,s,a){return this.parseArrowExpression(this.startNodeAt(e,t),s,!1,a)};var so=[];P.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===u.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var s=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'"),s&&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 a=this.start,c=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),a,c,!0,!1),e.callee.type==="Super"&&this.raiseRecoverable(a,"Invalid use of 'super'"),this.eat(u.parenL)?e.arguments=this.parseExprList(u.parenR,this.options.ecmaVersion>=8,!1):e.arguments=so,this.finishNode(e,"NewExpression")},P.parseTemplateElement=function(e){var t=e.isTagged,s=this.startNode();return this.type===u.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),s.value={raw:this.value.replace(/\r\n?/g,`
12
+ `),cooked:null}):s.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
13
+ `),cooked:this.value},this.next(),s.tail=this.type===u.backQuote,this.finishNode(s,"TemplateElement")},P.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var s=this.startNode();this.next(),s.expressions=[];var a=this.parseTemplateElement({isTagged:t});for(s.quasis=[a];!a.tail;)this.type===u.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(u.dollarBraceL),s.expressions.push(this.parseExpression()),this.expect(u.braceR),s.quasis.push(a=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(s,"TemplateLiteral")},P.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===u.name||this.type===u.num||this.type===u.string||this.type===u.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===u.star)&&!z.test(this.input.slice(this.lastTokEnd,this.start))},P.parseObj=function(e,t){var s=this.startNode(),a=!0,c={};for(s.properties=[],this.next();!this.eat(u.braceR);){if(a)a=!1;else if(this.expect(u.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(u.braceR))break;var p=this.parseProperty(e,t);e||this.checkPropClash(p,c,t),s.properties.push(p)}return this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},P.parseProperty=function(e,t){var s=this.startNode(),a,c,p,d;if(this.options.ecmaVersion>=9&&this.eat(u.ellipsis))return e?(s.argument=this.parseIdent(!1),this.type===u.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(s,"RestElement")):(s.argument=this.parseMaybeAssign(!1,t),this.type===u.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(s,"SpreadElement"));this.options.ecmaVersion>=6&&(s.method=!1,s.shorthand=!1,(e||t)&&(p=this.start,d=this.startLoc),e||(a=this.eat(u.star)));var g=this.containsEsc;return this.parsePropertyName(s),!e&&!g&&this.options.ecmaVersion>=8&&!a&&this.isAsyncProp(s)?(c=!0,a=this.options.ecmaVersion>=9&&this.eat(u.star),this.parsePropertyName(s)):c=!1,this.parsePropertyValue(s,e,a,c,p,d,t,g),this.finishNode(s,"Property")},P.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var s=e.kind==="get"?0:1;if(e.value.params.length!==s){var a=e.value.start;e.kind==="get"?this.raiseRecoverable(a,"getter should have no params"):this.raiseRecoverable(a,"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")},P.parsePropertyValue=function(e,t,s,a,c,p,d,g){(s||a)&&this.type===u.colon&&this.unexpected(),this.eat(u.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,d),e.kind="init"):this.options.ecmaVersion>=6&&this.type===u.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(s,a),e.kind="init"):!t&&!g&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==u.comma&&this.type!==u.braceR&&this.type!==u.eq?((s||a)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((s||a)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=c),t?e.value=this.parseMaybeDefault(c,p,this.copyNode(e.key)):this.type===u.eq&&d?(d.shorthandAssign<0&&(d.shorthandAssign=this.start),e.value=this.parseMaybeDefault(c,p,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()},P.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(u.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(u.bracketR),e.key;e.computed=!1}return e.key=this.type===u.num||this.type===u.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},P.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},P.parseMethod=function(e,t,s){var a=this.startNode(),c=this.yieldPos,p=this.awaitPos,d=this.awaitIdentPos;return this.initFunction(a),this.options.ecmaVersion>=6&&(a.generator=e),this.options.ecmaVersion>=8&&(a.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Lt(t,a.generator)|et|(s?ji:0)),this.expect(u.parenL),a.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(a,!1,!0,!1),this.yieldPos=c,this.awaitPos=p,this.awaitIdentPos=d,this.finishNode(a,"FunctionExpression")},P.parseArrowExpression=function(e,t,s,a){var c=this.yieldPos,p=this.awaitPos,d=this.awaitIdentPos;return this.enterScope(Lt(s,!1)|Tt),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!s),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,a),this.yieldPos=c,this.awaitPos=p,this.awaitIdentPos=d,this.finishNode(e,"ArrowFunctionExpression")},P.parseFunctionBody=function(e,t,s,a){var c=t&&this.type!==u.braceL,p=this.strict,d=!1;if(c)e.body=this.parseMaybeAssign(a),e.expression=!0,this.checkParams(e,!1);else{var g=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!p||g)&&(d=this.strictDirective(this.end),d&&g&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var E=this.labels;this.labels=[],d&&(this.strict=!0),this.checkParams(e,!p&&!d&&!t&&!s&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Gi),e.body=this.parseBlock(!1,void 0,d&&!p),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=E}this.exitScope()},P.isSimpleParamList=function(e){for(var t=0,s=e;t<s.length;t+=1){var a=s[t];if(a.type!=="Identifier")return!1}return!0},P.checkParams=function(e,t){for(var s=Object.create(null),a=0,c=e.params;a<c.length;a+=1){var p=c[a];this.checkLValInnerPattern(p,Ot,t?null:s)}},P.parseExprList=function(e,t,s,a){for(var c=[],p=!0;!this.eat(e);){if(p)p=!1;else if(this.expect(u.comma),t&&this.afterTrailingComma(e))break;var d=void 0;s&&this.type===u.comma?d=null:this.type===u.ellipsis?(d=this.parseSpread(a),a&&this.type===u.comma&&a.trailingComma<0&&(a.trailingComma=this.start)):d=this.parseMaybeAssign(!1,a),c.push(d)}return c},P.checkUnreserved=function(e){var t=e.start,s=e.end,a=e.name;if(this.inGenerator&&a==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&a==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&tt)&&a==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(a==="arguments"||a==="await")&&this.raise(t,"Cannot use "+a+" in class static initialization block"),this.keywords.test(a)&&this.raise(t,"Unexpected keyword '"+a+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,s).indexOf("\\")!==-1)){var c=this.strict?this.reservedWordsStrict:this.reservedWords;c.test(a)&&(!this.inAsync&&a==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+a+"' is reserved"))}},P.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t},P.parseIdentNode=function(){var e=this.startNode();return this.type===u.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=u.name):this.unexpected(),e},P.parsePrivateIdent=function(){var e=this.startNode();return this.type===u.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},P.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===u.semi||this.canInsertSemicolon()||this.type!==u.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(u.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},P.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var nt=q.prototype;nt.raise=function(e,t){var s=Rt(this.input,e);t+=" ("+s.line+":"+s.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var a=new SyntaxError(t);throw a.pos=e,a.loc=s,a.raisedAt=this.pos,a},nt.raiseRecoverable=nt.raise,nt.curPosition=function(){if(this.options.locations)return new Ie(this.curLine,this.pos-this.lineStart)};var xe=q.prototype,no=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};xe.enterScope=function(e){this.scopeStack.push(new no(e))},xe.exitScope=function(){this.scopeStack.pop()},xe.treatFunctionsAsVarInScope=function(e){return e.flags&be||!this.inModule&&e.flags&Ee},xe.declareName=function(e,t,s){var a=!1;if(t===le){var c=this.currentScope();a=c.lexical.indexOf(e)>-1||c.functions.indexOf(e)>-1||c.var.indexOf(e)>-1,c.lexical.push(e),this.inModule&&c.flags&Ee&&delete this.undefinedExports[e]}else if(t===Mi){var p=this.currentScope();p.lexical.push(e)}else if(t===Ui){var d=this.currentScope();this.treatFunctionsAsVar?a=d.lexical.indexOf(e)>-1:a=d.lexical.indexOf(e)>-1||d.var.indexOf(e)>-1,d.functions.push(e)}else for(var g=this.scopeStack.length-1;g>=0;--g){var E=this.scopeStack[g];if(E.lexical.indexOf(e)>-1&&!(E.flags&qi&&E.lexical[0]===e)||!this.treatFunctionsAsVarInScope(E)&&E.functions.indexOf(e)>-1){a=!0;break}if(E.var.push(e),this.inModule&&E.flags&Ee&&delete this.undefinedExports[e],E.flags&tt)break}a&&this.raiseRecoverable(s,"Identifier '"+e+"' has already been declared")},xe.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},xe.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},xe.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(tt|qe|Se))return t}},xe.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(tt|qe|Se)&&!(t.flags&Tt))return t}};var Be=function(t,s,a){this.type="",this.start=s,this.end=0,t.options.locations&&(this.loc=new $e(t,a)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[s,0])},Ue=q.prototype;Ue.startNode=function(){return new Be(this,this.start,this.startLoc)},Ue.startNodeAt=function(e,t){return new Be(this,e,t)};function Xi(e,t,s,a){return e.type=t,e.end=s,this.options.locations&&(e.loc.end=a),this.options.ranges&&(e.range[1]=s),e}Ue.finishNode=function(e,t){return Xi.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Ue.finishNodeAt=function(e,t,s,a){return Xi.call(this,e,t,s,a)},Ue.copyNode=function(e){var t=new Be(this,e.start,this.startLoc);for(var s in e)t[s]=e[s];return t};var ao="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",zi="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",Ki=zi+" Extended_Pictographic",Yi=Ki,Ji=Yi+" EBase EComp EMod EPres ExtPict",Qi=Ji,oo=Qi,uo={9:zi,10:Ki,11:Yi,12:Ji,13:Qi,14:oo},co="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",ho={9:"",10:"",11:"",12:"",13:"",14:co},Zi="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",er="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",tr=er+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ir=tr+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",rr=ir+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",sr=rr+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",lo=sr+" "+ao,fo={9:er,10:tr,11:ir,12:rr,13:sr,14:lo},nr={};function po(e){var t=nr[e]={binary:me(uo[e]+" "+Zi),binaryOfStrings:me(ho[e]),nonBinary:{General_Category:me(Zi),Script:me(fo[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}for(var $t=0,ar=[9,10,11,12,13,14];$t<ar.length;$t+=1){var mo=ar[$t];po(mo)}var I=q.prototype,at=function(t,s){this.parent=t,this.base=s||this};at.prototype.separatedFrom=function(t){for(var s=this;s;s=s.parent)for(var a=t;a;a=a.parent)if(s.base===a.base&&s!==a)return!0;return!1},at.prototype.sibling=function(){return new at(this.parent,this.base)};var oe=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=nr[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=Object.create(null),this.backReferenceNames=[],this.branchID=null};oe.prototype.reset=function(t,s,a){var c=a.indexOf("v")!==-1,p=a.indexOf("u")!==-1;this.start=t|0,this.source=s+"",this.flags=a,c&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=p&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=p&&this.parser.options.ecmaVersion>=9)},oe.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},oe.prototype.at=function(t,s){s===void 0&&(s=!1);var a=this.source,c=a.length;if(t>=c)return-1;var p=a.charCodeAt(t);if(!(s||this.switchU)||p<=55295||p>=57344||t+1>=c)return p;var d=a.charCodeAt(t+1);return d>=56320&&d<=57343?(p<<10)+d-56613888:p},oe.prototype.nextIndex=function(t,s){s===void 0&&(s=!1);var a=this.source,c=a.length;if(t>=c)return c;var p=a.charCodeAt(t),d;return!(s||this.switchU)||p<=55295||p>=57344||t+1>=c||(d=a.charCodeAt(t+1))<56320||d>57343?t+1:t+2},oe.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)},oe.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},oe.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)},oe.prototype.eat=function(t,s){return s===void 0&&(s=!1),this.current(s)===t?(this.advance(s),!0):!1},oe.prototype.eatChars=function(t,s){s===void 0&&(s=!1);for(var a=this.pos,c=0,p=t;c<p.length;c+=1){var d=p[c],g=this.at(a,s);if(g===-1||g!==d)return!1;a=this.nextIndex(a,s)}return this.pos=a,!0},I.validateRegExpFlags=function(e){for(var t=e.validFlags,s=e.flags,a=!1,c=!1,p=0;p<s.length;p++){var d=s.charAt(p);t.indexOf(d)===-1&&this.raise(e.start,"Invalid regular expression flag"),s.indexOf(d,p+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),d==="u"&&(a=!0),d==="v"&&(c=!0)}this.options.ecmaVersion>=15&&a&&c&&this.raise(e.start,"Invalid regular expression flag")};function xo(e){for(var t in e)return!0;return!1}I.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&xo(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},I.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,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,s=e.backReferenceNames;t<s.length;t+=1){var a=s[t];e.groupNames[a]||e.raise("Invalid named capture referenced")}},I.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new at(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},I.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},I.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1},I.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var s=!1;if(this.options.ecmaVersion>=9&&(s=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!s,!0}return e.pos=t,!1},I.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},I.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},I.regexp_eatBracedQuantifier=function(e,t){var s=e.pos;if(e.eat(123)){var a=0,c=-1;if(this.regexp_eatDecimalDigits(e)&&(a=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(c=e.lastIntValue),e.eat(125)))return c!==-1&&c<a&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=s}return!1},I.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},I.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},I.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var s=this.regexp_eatModifiers(e),a=e.eat(45);if(s||a){for(var c=0;c<s.length;c++){var p=s.charAt(c);s.indexOf(p,c+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(a){var d=this.regexp_eatModifiers(e);!s&&!d&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var g=0;g<d.length;g++){var E=d.charAt(g);(d.indexOf(E,g+1)>-1||s.indexOf(E)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1},I.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=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},I.regexp_eatModifiers=function(e){for(var t="",s=0;(s=e.current())!==-1&&go(s);)t+=he(s),e.advance();return t};function go(e){return e===105||e===109||e===115}I.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)},I.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},I.regexp_eatSyntaxCharacter=function(e){var t=e.current();return or(t)?(e.lastIntValue=t,e.advance(),!0):!1};function or(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}I.regexp_eatPatternCharacters=function(e){for(var t=e.pos,s=0;(s=e.current())!==-1&&!or(s);)e.advance();return e.pos!==t},I.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},I.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,s=e.groupNames[e.lastStringValue];if(s)if(t)for(var a=0,c=s;a<c.length;a+=1){var p=c[a];p.separatedFrom(e.branchID)||e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");t?(s||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},I.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},I.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=he(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=he(e.lastIntValue);return!0}return!1},I.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,s=this.options.ecmaVersion>=11,a=e.current(s);return e.advance(s),a===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,s)&&(a=e.lastIntValue),vo(a)?(e.lastIntValue=a,!0):(e.pos=t,!1)};function vo(e){return A(e,!0)||e===36||e===95}I.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,s=this.options.ecmaVersion>=11,a=e.current(s);return e.advance(s),a===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,s)&&(a=e.lastIntValue),yo(a)?(e.lastIntValue=a,!0):(e.pos=t,!1)};function yo(e){return w(e,!0)||e===36||e===95||e===8204||e===8205}I.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)},I.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var s=e.lastIntValue;if(e.switchU)return s>e.maxBackReference&&(e.maxBackReference=s),!0;if(s<=e.numCapturingParens)return!0;e.pos=t}return!1},I.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},I.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)},I.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},I.regexp_eatZero=function(e){return e.current()===48&&!ot(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1},I.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},I.regexp_eatControlLetter=function(e){var t=e.current();return ur(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function ur(e){return e>=65&&e<=90||e>=97&&e<=122}I.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var s=e.pos,a=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var c=e.lastIntValue;if(a&&c>=55296&&c<=56319){var p=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var d=e.lastIntValue;if(d>=56320&&d<=57343)return e.lastIntValue=(c-55296)*1024+(d-56320)+65536,!0}e.pos=p,e.lastIntValue=c}return!0}if(a&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Eo(e.lastIntValue))return!0;a&&e.raise("Invalid unicode escape"),e.pos=s}return!1};function Eo(e){return e>=0&&e<=1114111}I.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},I.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};var cr=0,fe=1,ie=2;I.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(bo(t))return e.lastIntValue=-1,e.advance(),fe;var s=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((s=t===80)||t===112)){e.lastIntValue=-1,e.advance();var a;if(e.eat(123)&&(a=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return s&&a===ie&&e.raise("Invalid property name"),a;e.raise("Invalid property name")}return cr};function bo(e){return e===100||e===68||e===115||e===83||e===119||e===87}I.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var s=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var a=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,s,a),fe}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var c=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,c)}return cr},I.regexp_validateUnicodePropertyNameAndValue=function(e,t,s){_e(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(s)||e.raise("Invalid property value")},I.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return fe;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return ie;e.raise("Invalid property name")},I.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";hr(t=e.current());)e.lastStringValue+=he(t),e.advance();return e.lastStringValue!==""};function hr(e){return ur(e)||e===95}I.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";So(t=e.current());)e.lastStringValue+=he(t),e.advance();return e.lastStringValue!==""};function So(e){return hr(e)||ot(e)}I.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},I.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),s=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&s===ie&&e.raise("Negated character class may contain strings"),!0}return!1},I.regexp_classContents=function(e){return e.current()===93?fe:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),fe)},I.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var s=e.lastIntValue;e.switchU&&(t===-1||s===-1)&&e.raise("Invalid character class"),t!==-1&&s!==-1&&t>s&&e.raise("Range out of order in character class")}}},I.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var s=e.current();(s===99||pr(s))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var a=e.current();return a!==93?(e.lastIntValue=a,e.advance(),!0):!1},I.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)},I.regexp_classSetExpression=function(e){var t=fe,s;if(!this.regexp_eatClassSetRange(e))if(s=this.regexp_eatClassSetOperand(e)){s===ie&&(t=ie);for(var a=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(s=this.regexp_eatClassSetOperand(e))){s!==ie&&(t=fe);continue}e.raise("Invalid character in character class")}if(a!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(a!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(s=this.regexp_eatClassSetOperand(e),!s)return t;s===ie&&(t=ie)}},I.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var a=e.lastIntValue;return s!==-1&&a!==-1&&s>a&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},I.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?fe:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},I.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var s=e.eat(94),a=this.regexp_classContents(e);if(e.eat(93))return s&&a===ie&&e.raise("Negated character class may contain strings"),a;e.pos=t}if(e.eat(92)){var c=this.regexp_eatCharacterClassEscape(e);if(c)return c;e.pos=t}return null},I.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var s=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return s}else e.raise("Invalid escape");e.pos=t}return null},I.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===ie&&(t=ie);return t},I.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?fe:ie},I.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 s=e.current();return s<0||s===e.lookahead()&&wo(s)||Co(s)?!1:(e.advance(),e.lastIntValue=s,!0)};function wo(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 Co(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}I.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return _o(t)?(e.lastIntValue=t,e.advance(),!0):!1};function _o(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}I.regexp_eatClassControlLetter=function(e){var t=e.current();return ot(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},I.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},I.regexp_eatDecimalDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;ot(s=e.current());)e.lastIntValue=10*e.lastIntValue+(s-48),e.advance();return e.pos!==t};function ot(e){return e>=48&&e<=57}I.regexp_eatHexDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;lr(s=e.current());)e.lastIntValue=16*e.lastIntValue+fr(s),e.advance();return e.pos!==t};function lr(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function fr(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}I.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var s=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+s*8+e.lastIntValue:e.lastIntValue=t*8+s}else e.lastIntValue=t;return!0}return!1},I.regexp_eatOctalDigit=function(e){var t=e.current();return pr(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function pr(e){return e>=48&&e<=55}I.regexp_eatFixedHexDigits=function(e,t){var s=e.pos;e.lastIntValue=0;for(var a=0;a<t;++a){var c=e.current();if(!lr(c))return e.pos=s,!1;e.lastIntValue=16*e.lastIntValue+fr(c),e.advance()}return!0};var ut=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new $e(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},O=q.prototype;O.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new ut(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},O.getToken=function(){return this.next(),new ut(this)},typeof Symbol<"u"&&(O[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===u.eof,value:t}}}}),O.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(u.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())},O.readToken=function(e){return A(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},O.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var s=this.input.charCodeAt(e+1);return s<=56319||s>=57344?t:(t<<10)+s-56613888},O.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},O.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,s=this.input.indexOf("*/",this.pos+=2);if(s===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=s+2,this.options.locations)for(var a=void 0,c=t;(a=Li(this.input,c,this.pos))>-1;)++this.curLine,c=this.lineStart=a;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,s),t,this.pos,e,this.curPosition())},O.skipLineComment=function(e){for(var t=this.pos,s=this.options.onComment&&this.curPosition(),a=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!ye(a);)a=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,s,this.curPosition())},O.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&Nt.test(String.fromCharCode(e)))++this.pos;else break e}}},O.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var s=this.type;this.type=e,this.value=t,this.updateContext(s)},O.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(u.ellipsis)):(++this.pos,this.finishToken(u.dot))},O.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(u.assign,2):this.finishOp(u.slash,1)},O.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),s=1,a=e===42?u.star:u.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++s,a=u.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(u.assign,s+1):this.finishOp(a,s)},O.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61)return this.finishOp(u.assign,3)}return this.finishOp(e===124?u.logicalOR:u.logicalAND,2)}return t===61?this.finishOp(u.assign,2):this.finishOp(e===124?u.bitwiseOR:u.bitwiseAND,1)},O.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(u.assign,2):this.finishOp(u.bitwiseXOR,1)},O.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||z.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(u.incDec,2):t===61?this.finishOp(u.assign,2):this.finishOp(u.plusMin,1)},O.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),s=1;return t===e?(s=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+s)===61?this.finishOp(u.assign,s+1):this.finishOp(u.bitShift,s)):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&&(s=2),this.finishOp(u.relational,s))},O.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(u.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(u.arrow)):this.finishOp(e===61?u.eq:u.prefix,1)},O.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var s=this.input.charCodeAt(this.pos+2);if(s<48||s>57)return this.finishOp(u.questionDot,2)}if(t===63){if(e>=12){var a=this.input.charCodeAt(this.pos+2);if(a===61)return this.finishOp(u.assign,3)}return this.finishOp(u.coalesce,2)}}return this.finishOp(u.question,1)},O.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),A(t,!0)||t===92))return this.finishToken(u.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+he(t)+"'")},O.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(u.parenL);case 41:return++this.pos,this.finishToken(u.parenR);case 59:return++this.pos,this.finishToken(u.semi);case 44:return++this.pos,this.finishToken(u.comma);case 91:return++this.pos,this.finishToken(u.bracketL);case 93:return++this.pos,this.finishToken(u.bracketR);case 123:return++this.pos,this.finishToken(u.braceL);case 125:return++this.pos,this.finishToken(u.braceR);case 58:return++this.pos,this.finishToken(u.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(u.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(u.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+he(e)+"'")},O.finishOp=function(e,t){var s=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,s)},O.readRegexp=function(){for(var e,t,s=this.pos;;){this.pos>=this.input.length&&this.raise(s,"Unterminated regular expression");var a=this.input.charAt(this.pos);if(z.test(a)&&this.raise(s,"Unterminated regular expression"),e)e=!1;else{if(a==="[")t=!0;else if(a==="]"&&t)t=!1;else if(a==="/"&&!t)break;e=a==="\\"}++this.pos}var c=this.input.slice(s,this.pos);++this.pos;var p=this.pos,d=this.readWord1();this.containsEsc&&this.unexpected(p);var g=this.regexpState||(this.regexpState=new oe(this));g.reset(s,c,d),this.validateRegExpFlags(g),this.validateRegExpPattern(g);var E=null;try{E=new RegExp(c,d)}catch{}return this.finishToken(u.regexp,{pattern:c,flags:d,value:E})},O.readInt=function(e,t,s){for(var a=this.options.ecmaVersion>=12&&t===void 0,c=s&&this.input.charCodeAt(this.pos)===48,p=this.pos,d=0,g=0,E=0,R=t??1/0;E<R;++E,++this.pos){var L=this.input.charCodeAt(this.pos),D=void 0;if(a&&L===95){c&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),g===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),E===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),g=L;continue}if(L>=97?D=L-97+10:L>=65?D=L-65+10:L>=48&&L<=57?D=L-48:D=1/0,D>=e)break;g=L,d=d*e+D}return a&&g===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===p||t!=null&&this.pos-p!==t?null:d};function Io(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function dr(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}O.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var s=this.readInt(e);return s==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(s=dr(this.input.slice(t,this.pos)),++this.pos):A(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(u.num,s)},O.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var s=this.pos-t>=2&&this.input.charCodeAt(t)===48;s&&this.strict&&this.raise(t,"Invalid number");var a=this.input.charCodeAt(this.pos);if(!s&&!e&&this.options.ecmaVersion>=11&&a===110){var c=dr(this.input.slice(t,this.pos));return++this.pos,A(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(u.num,c)}s&&/[89]/.test(this.input.slice(t,this.pos))&&(s=!1),a===46&&!s&&(++this.pos,this.readInt(10),a=this.input.charCodeAt(this.pos)),(a===69||a===101)&&!s&&(a=this.input.charCodeAt(++this.pos),(a===43||a===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),A(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var p=Io(this.input.slice(t,this.pos),s);return this.finishToken(u.num,p)},O.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var s=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(s,"Code point out of bounds")}else t=this.readHexChar(4);return t},O.readString=function(e){for(var t="",s=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var a=this.input.charCodeAt(this.pos);if(a===e)break;a===92?(t+=this.input.slice(s,this.pos),t+=this.readEscapedChar(!1),s=this.pos):a===8232||a===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(ye(a)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(s,this.pos++),this.finishToken(u.string,t)};var mr={};O.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===mr)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},O.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw mr;this.raise(e,t)},O.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var s=this.input.charCodeAt(this.pos);if(s===96||s===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===u.template||this.type===u.invalidTemplate)?s===36?(this.pos+=2,this.finishToken(u.dollarBraceL)):(++this.pos,this.finishToken(u.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(u.template,e));if(s===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(ye(s)){switch(e+=this.input.slice(t,this.pos),++this.pos,s){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
14
+ `;break;default:e+=String.fromCharCode(s);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},O.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(u.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
15
+ `&&++this.pos;case`
16
+ `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")},O.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
17
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return he(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var s=this.pos-1;this.invalidStringToken(s,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var a=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],c=parseInt(a,8);return c>255&&(a=a.slice(0,-1),c=parseInt(a,8)),this.pos+=a.length-1,t=this.input.charCodeAt(this.pos),(a!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-a.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(c)}return ye(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}},O.readHexChar=function(e){var t=this.pos,s=this.readInt(16,e);return s===null&&this.invalidStringToken(t,"Bad character escape sequence"),s},O.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,s=this.pos,a=this.options.ecmaVersion>=6;this.pos<this.input.length;){var c=this.fullCharCodeAtPos();if(w(c,a))this.pos+=c<=65535?1:2;else if(c===92){this.containsEsc=!0,e+=this.input.slice(s,this.pos);var p=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var d=this.readCodePoint();(t?A:w)(d,a)||this.invalidStringToken(p,"Invalid Unicode escape"),e+=he(d),s=this.pos}else break;t=!1}return e+this.input.slice(s,this.pos)},O.readWord=function(){var e=this.readWord1(),t=u.name;return this.keywords.test(e)&&(t=Qe[e]),this.finishToken(t,e)};var xr="8.17.0";q.acorn={Parser:q,version:xr,defaultOptions:Ze,Position:Ie,SourceLocation:$e,getLineInfo:Rt,Node:Be,TokenType:N,tokTypes:u,keywordTypes:Qe,TokContext:te,tokContexts:V,isIdentifierChar:w,isIdentifierStart:A,Token:ut,isNewLine:ye,lineBreak:z,lineBreakG:Ti,nonASCIIwhitespace:Nt};function ko(e,t){return q.parse(e,t)}function Ao(e,t,s){return q.parseExpressionAt(e,t,s)}function No(e,t){return q.tokenizer(e,t)}r.Node=Be,r.Parser=q,r.Position=Ie,r.SourceLocation=$e,r.TokContext=te,r.Token=ut,r.TokenType=N,r.defaultOptions=Ze,r.getLineInfo=Rt,r.isIdentifierChar=w,r.isIdentifierStart=A,r.isNewLine=ye,r.keywordTypes=Qe,r.lineBreak=z,r.lineBreakG=Ti,r.nonASCIIwhitespace=Nt,r.parse=ko,r.parseExpressionAt=Ao,r.tokContexts=V,r.tokTypes=u,r.tokenizer=No,r.version=xr})});var Ba=S((Xp,ja)=>{var{parse:lf}=Da();function De(){let r=new Error("Configuration reads require a data-only object export. Remove executable statements from frontfriend.config.js.");return r.code="FRONTFRIEND_CONFIG_VALIDATION",r}function qa(r){if(r.type!=="Property"||r.computed||r.method||r.kind!=="init")throw De();let i=r.key.type==="Identifier"?r.key.name:r.key.value;if(typeof i!="string"||["__proto__","constructor","prototype"].includes(i))throw De();return i}function $a(r){if(r.type==="ExportDefaultDeclaration")return r.declaration;let i=r.type==="ExpressionStatement"?r.expression:null;return i?.type==="AssignmentExpression"&&i.operator==="="&&i.left.type==="MemberExpression"&&!i.left.computed&&i.left.object.name==="module"&&i.left.property.name==="exports"?i.right:null}function ff(r,i){if(r.type!=="VariableDeclaration"||r.declarations.length!==1)return null;let[n]=r.declarations;return n.id.type!=="Identifier"||i?.type!=="Identifier"||i.name!==n.id.name?null:n.init}function pf(r){let n=lf(r,{ecmaVersion:"latest",sourceType:"module"}).body.filter(h=>h.type!=="EmptyStatement"&&!h.directive),o=n.length===1?$a(n[0]):n.length===2?ff(n[0],$a(n[1])):null;if(o?.type!=="ObjectExpression")throw De();function l(h,f=0){if(f>64)throw De();if(h.type==="Literal"&&(h.value===null||["string","number","boolean"].includes(typeof h.value)))return h.value;if(h.type==="ArrayExpression")return h.elements.map(m=>{if(!m)throw De();return l(m,f+1)});if(h.type==="ObjectExpression")return Object.fromEntries(h.properties.map(m=>[qa(m),l(m.value,f+1)]));if(h.type==="UnaryExpression"&&["-","+"].includes(h.operator)&&h.argument.type==="Literal"&&typeof h.argument.value=="number")return h.operator==="-"?-h.argument.value:h.argument.value;if(h.type==="TemplateLiteral"&&h.expressions.length===0)return h.quasis[0].value.cooked;if(h.type==="MemberExpression"&&!h.computed&&h.object.type==="MemberExpression"&&!h.object.computed&&h.object.object.name==="process"&&h.object.property.name==="env")return process.env[h.property.name];if(h.type==="LogicalExpression"&&["||","??"].includes(h.operator)){let m=l(h.left,f+1);return h.operator==="||"?m||l(h.right,f+1):m??l(h.right,f+1)}throw De()}return{config:l(o),expression:o}}ja.exports={parseStaticConfig:pf,propertyName:qa}});var Ga=S((zp,Ma)=>{var{DEFAULT_API_URL:df}=Ge();function mf(){try{return Ai().readCredentials()?.ffApiUrl||null}catch{return null}}function Ua(r=process.cwd()){try{let{findFileUpward:i}=Fa(),{parseStaticConfig:n}=Ba(),{readFileSafe:o}=He(),l=i("frontfriend.config.js",r);return l?n(o(l)).config:null}catch{return null}}function xf({flag:r,config:i,startDir:n,env:o=process.env,loginUrl:l=mf}={}){i===void 0&&!r&&(i=Ua(n));let h=r||i?.["api-url"]||i?.apiUrl||o.FF_API_URL||(typeof l=="function"?l():l)||df;return String(h).replace(/\/+$/,"")}Ma.exports={resolveApiUrl:xf,nearestConfig:Ua}});var za=S((Kp,Xa)=>{var{toRuntimeComponentConfig:gf}=Or(),Ha='FrontFriend components configuration not found. Run "npx frontfriend init" or "npx frontfriend sync".',vf="FrontFriend components configuration was not returned by the SaaS app. The cache was not updated.";function Ri(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)}function Wa(r,i=Ha){if(!Ri(r)||Object.keys(r).length===0)throw new Error(i);for(let[n,o]of Object.entries(r))gf(o,n);return r}var kt=class extends Error{constructor(i){super(i),this.name="Frontfriend",this.code="FF_SETUP_REQUIRED",this.stack=`${this.name}: ${i}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.stack}};function yf(){try{let r=Ai().signedInAccount();return!!(r&&!r.expired)}catch{return!1}}function Ef(r=process.cwd()){let{cliCommand:i,loginCommand:n}=Ii(),o=`\`${i("init",r)}\``,l="The design system is not installed in this project yet.";if(yf())return`${l} Run ${o}, then start the app again.`;let h;try{h=Ga().resolveApiUrl({startDir:r})}catch{h=void 0}return`${l} Sign in with \`${n(h,r)}\`, run ${o}, then start the app again.`}function Pi(r){return new kt(Ef(r))}function bf(r){let i=r.appRoot||process.cwd();if(!r.exists())throw Pi(i);let n=r.load(),o=n?.componentsConfig;if(!Ri(o)||Object.keys(o).length===0)throw Pi(i);return{componentsConfig:Wa(o),icons:Ri(n.icons)?n.icons:{}}}Xa.exports={CACHE_ERROR_MESSAGE:Ha,SAAS_ERROR_MESSAGE:vf,assertComponentsConfig:Wa,loadCachedComponents:bf,SetupRequiredError:kt,setupRequiredError:Pi}});var{PACKAGE_NAME:At}=yr(),Je=require("fs"),ae=require("path"),Sf=Rr(),{loadCachedComponents:wf,setupRequiredError:Cf}=za(),{CLASSES_SOURCE_FILE:_f}=Mt();function If(r){return r.split(ae.sep).join("/")}function kf(r,i){let n=If(ae.relative(ae.dirname(r),i));return n.startsWith(".")||(n=`./${n}`),`@source "${n}";`}function Af(r){let i=r.replace(/\/\*[\s\S]*?\*\//g,"");return/@tailwind\s+utilities\b/.test(i)||/@import\s+(?:url\(\s*)?["']tailwindcss(?:\/(?:index|utilities)(?:\.css)?)?["']/.test(i)||/@import\s+url\(\s*tailwindcss(?:\/(?:index|utilities)(?:\.css)?)?\s*\)/.test(i)}function Nf(r,i,n){let o=ae.join(r,"metadata.json"),l=null,h=(f,m)=>{f.mtimeMs!==m.mtimeMs&&(clearTimeout(l),l=setTimeout(n,100))};return Je.watchFile(o,{interval:i,persistent:!1},h),()=>{clearTimeout(l),Je.unwatchFile(o,h)}}module.exports=function(i={}){let n=i.fixture===!0,o,l,h,f,m;function v(x){if(n)return f={componentsConfig:{fixture:{styles:{}}},icons:{}},f;let b=x||process.cwd(),y=new Sf(b);return l=typeof y.getCacheDir=="function"?y.getCacheDir():ae.join(b,"node_modules",".cache","frontfriend"),f=wf(y),f}return{name:At.slice(1).replace("/","-"),enforce:"pre",config(x={}){let{componentsConfig:b,icons:y}=v(x.root||process.cwd());if(h=n?[ae.join(__dirname,"src","theme.css"),ae.join(__dirname,"..","src","theme.css"),ae.join(__dirname,"theme.css")].find(N=>Je.existsSync(N)):ae.join(l,"theme.css"),!h)throw new Error("FrontFriend fixture theme.css not found.");let A=[`${At}/theme.css`,`${At}/theme`].map(N=>({find:N,replacement:h,...!Je.existsSync(h)&&{customResolver(){throw Cf(x.root||process.cwd())}}})),w=ae.join(__dirname,"browser.mjs");return{define:{__FF_CONFIG__:JSON.stringify(b),__FF_ICONS__:JSON.stringify(y)},resolve:{alias:[{find:new RegExp(`^${At}$`),replacement:w},...A]}}},configResolved(x){o=x,l=l||ae.join(x?.root||process.cwd(),"node_modules",".cache","frontfriend")},configureServer(x){n||!l||(m?.(),m=Nf(l,i.cacheWatchInterval??500,()=>{let b="[FrontFriend Vite] Design System cache changed: reloading with the new tokens and component config.";x.config?.logger?.info?x.config.logger.info(b,{timestamp:!0}):console.log(b),typeof x.restart=="function"?Promise.resolve(x.restart()).catch(y=>console.error(`[FrontFriend Vite] Restart failed: ${y.message}`)):x.ws?.send({type:"full-reload"})}),x.httpServer?.once("close",()=>m?.()))},closeBundle(){m?.(),m=void 0},transform(x,b){let[y,A=""]=b.split("?");if(!y.endsWith(".css")||/(?:^|&)(?:url|raw|inline)(?:&|=|$)/.test(A)||n||!Af(x))return null;let w=ae.join(l||process.cwd(),_f);if(!Je.existsSync(w))return null;let N=kf(y,w);return x.includes(N)?null:{code:`${x}
3
18
 
4
19
  /* Frontfriend Tailwind v4 registry source */
5
- ${S}
6
- `,map:null}},load(c){if(c!=="virtual:frontfriend-config")return null;let{componentsConfig:u,icons:f}=a||d(r?.root||process.cwd());return r?.command==="serve"&&console.log("[FrontFriend Vite] Injected configuration and icons into build"),`
7
- globalThis.__FF_CONFIG__ = ${JSON.stringify(u)};
8
- globalThis.__FF_ICONS__ = ${JSON.stringify(f)};
20
+ ${N}
21
+ `,map:null}},load(x){if(x!=="virtual:frontfriend-config")return null;let{componentsConfig:b,icons:y}=f||v(o?.root||process.cwd());return o?.command==="serve"&&console.log("[FrontFriend Vite] Injected configuration and icons into build"),`
22
+ globalThis.__FF_CONFIG__ = ${JSON.stringify(b)};
23
+ globalThis.__FF_ICONS__ = ${JSON.stringify(y)};
9
24
  `}}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontfriend/sdk",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Frontfriend SDK: design contracts, tokens, components, CLI and MCP integrations",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/types/index.d.ts",