@frontfriend/sdk 1.3.1 → 1.4.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/THIRD_PARTY_NOTICES +2 -0
- package/dist/cli.js +175 -180
- package/dist/lib/core/adoption.js +1 -1
- package/dist/lib/core/api-client.js +8 -8
- package/dist/lib/core/application-adoption.js +17 -17
- package/dist/lib/core/cache-manager.js +1 -1
- package/dist/lib/core/cached-components-config.js +11 -11
- package/dist/lib/core/credentials.js +7 -7
- package/dist/lib/core/nativeSource.js +2 -2
- package/dist/lib/core/token-artifact-client.js +10 -10
- package/dist/mcp.cjs +673 -121
- package/dist/next.js +11 -11
- package/dist/package.json +1 -1
- package/dist/vite.js +14 -14
- package/package.json +2 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var w=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);var
|
|
2
|
-
`,{mode:384}),B.renameSync(n,i);try{B.chmodSync(i,384)}catch{}}finally{B.rmSync(n,{force:!0})}}async function vo(i,r,n){B.mkdirSync(require("path").dirname(i),{recursive:!0,mode:448});let u=`${i}.lock`,h=Date.now()+2e4,l;for(;l===void 0;)try{l=B.openSync(u,"wx",384),B.writeFileSync(l,String(process.pid))}catch(d){if(d.code!=="EEXIST")throw d;try{let m=Number(B.readFileSync(u,"utf8"));if(Number.isInteger(m)&&m>0)try{process.kill(m,0)}catch(y){if(y.code==="ESRCH"){B.unlinkSync(u);continue}}}catch(m){if(m.code==="ENOENT")continue}if(Date.now()>=h)throw n();await new Promise(m=>setTimeout(m,50))}try{return await r()}finally{B.closeSync(l),B.unlinkSync(u)}}lr.exports={writePrivateJsonFileAtomic:go,withPrivateFileLock:vo,readJsonFileSafe:oo,readFileSafe:uo,writeJsonFile:co,writeTextFile:ho,writeModuleExportsFile:lo,fileExists:fo,ensureDirectoryExists:po,removeDirectory:mo,removeFile:xo}});var at=w((Wl,fr)=>{var yo="https://app.frontfriend.dev",Eo=".cache/frontfriend",bo={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"]},So={FF_ID:"FF_ID",FF_API_URL:"FF_API_URL",FF_AUTH_TOKEN:"FF_AUTH_TOKEN",FF_MACHINE_TOKEN:"FRONTFRIEND_MACHINE_TOKEN"};function wo(i){if(!i)return null;try{let r=new URL(i);return r.hostname.startsWith("app.")?`${r.protocol}//${r.hostname.replace(/^app\./,"registry.")}`:null}catch{return null}}fr.exports={DEFAULT_API_URL:yo,CACHE_DIR_NAME:Eo,CACHE_TTL_DAYS:7,CACHE_TTL_MS:6048e5,CACHE_FILES:bo,ENV_VARS:So,deriveRegistryFromApiUrl:wo}});var gr=w((zl,xr)=>{xr.exports=mr;mr.sync=_o;var pr=require("fs");function Co(i,r){var n=r.pathExt!==void 0?r.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var u=0;u<n.length;u++){var h=n[u].toLowerCase();if(h&&i.substr(-h.length).toLowerCase()===h)return!0}return!1}function dr(i,r,n){return!i.isSymbolicLink()&&!i.isFile()?!1:Co(r,n)}function mr(i,r,n){pr.stat(i,function(u,h){n(u,u?!1:dr(h,i,r))})}function _o(i,r){return dr(pr.statSync(i),i,r)}});var Sr=w((Xl,br)=>{br.exports=yr;yr.sync=Io;var vr=require("fs");function yr(i,r,n){vr.stat(i,function(u,h){n(u,u?!1:Er(h,r))})}function Io(i,r){return Er(vr.statSync(i),r)}function Er(i,r){return i.isFile()&&ko(i,r)}function ko(i,r){var n=i.mode,u=i.uid,h=i.gid,l=r.uid!==void 0?r.uid:process.getuid&&process.getuid(),d=r.gid!==void 0?r.gid:process.getgid&&process.getgid(),m=parseInt("100",8),y=parseInt("010",8),x=parseInt("001",8),A=m|y,v=n&x||n&y&&h===d||n&m&&u===l||n&A&&l===0;return v}});var Cr=w((Yl,wr)=>{var Kl=require("fs"),ot;process.platform==="win32"||global.TESTING_WINDOWS?ot=gr():ot=Sr();wr.exports=Dt;Dt.sync=Ao;function Dt(i,r,n){if(typeof r=="function"&&(n=r,r={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(u,h){Dt(i,r||{},function(l,d){l?h(l):u(d)})})}ot(i,r||{},function(u,h){u&&(u.code==="EACCES"||r&&r.ignoreErrors)&&(u=null,h=!1),n(u,h)})}function Ao(i,r){try{return ot.sync(i,r||{})}catch(n){if(r&&r.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var Pr=w((Ql,Rr)=>{var Ne=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",_r=require("path"),No=Ne?";":":",Ir=Cr(),kr=i=>Object.assign(new Error(`not found: ${i}`),{code:"ENOENT"}),Ar=(i,r)=>{let n=r.colon||No,u=i.match(/\//)||Ne&&i.match(/\\/)?[""]:[...Ne?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(n)],h=Ne?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",l=Ne?h.split(n):[""];return Ne&&i.indexOf(".")!==-1&&l[0]!==""&&l.unshift(""),{pathEnv:u,pathExt:l,pathExtExe:h}},Nr=(i,r,n)=>{typeof r=="function"&&(n=r,r={}),r||(r={});let{pathEnv:u,pathExt:h,pathExtExe:l}=Ar(i,r),d=[],m=x=>new Promise((A,v)=>{if(x===u.length)return r.all&&d.length?A(d):v(kr(i));let S=u[x],E=/^".*"$/.test(S)?S.slice(1,-1):S,N=_r.join(E,i),j=!E&&/^\.[\\\/]/.test(i)?i.slice(0,2)+N:N;A(y(j,x,0))}),y=(x,A,v)=>new Promise((S,E)=>{if(v===h.length)return S(m(A+1));let N=h[v];Ir(x+N,{pathExt:l},(j,Y)=>{if(!j&&Y)if(r.all)d.push(x+N);else return S(x+N);return S(y(x,A,v+1))})});return n?m(0).then(x=>n(null,x),n):m(0)},Ro=(i,r)=>{r=r||{};let{pathEnv:n,pathExt:u,pathExtExe:h}=Ar(i,r),l=[];for(let d=0;d<n.length;d++){let m=n[d],y=/^".*"$/.test(m)?m.slice(1,-1):m,x=_r.join(y,i),A=!y&&/^\.[\\\/]/.test(i)?i.slice(0,2)+x:x;for(let v=0;v<u.length;v++){let S=A+u[v];try{if(Ir.sync(S,{pathExt:h}))if(r.all)l.push(S);else return S}catch{}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw kr(i)};Rr.exports=Nr;Nr.sync=Ro});var Lr=w((Jl,qt)=>{"use strict";var Tr=(i={})=>{let r=i.env||process.env;return(i.platform||process.platform)!=="win32"?"PATH":Object.keys(r).reverse().find(u=>u.toUpperCase()==="PATH")||"Path"};qt.exports=Tr;qt.exports.default=Tr});var $r=w((Zl,Fr)=>{"use strict";var Or=require("path"),Po=Pr(),To=Lr();function Vr(i,r){let n=i.options.env||process.env,u=process.cwd(),h=i.options.cwd!=null,l=h&&process.chdir!==void 0&&!process.chdir.disabled;if(l)try{process.chdir(i.options.cwd)}catch{}let d;try{d=Po.sync(i.command,{path:n[To({env:n})],pathExt:r?Or.delimiter:void 0})}catch{}finally{l&&process.chdir(u)}return d&&(d=Or.resolve(h?i.options.cwd:"",d)),d}function Lo(i){return Vr(i)||Vr(i,!0)}Fr.exports=Lo});var Dr=w((ef,jt)=>{"use strict";var Bt=/([()\][%!^"`<>&|;, *?])/g;function Oo(i){return i=i.replace(Bt,"^$1"),i}function Vo(i,r){return i=`${i}`,i=i.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),i=i.replace(/(?=(\\+?)?)\1$/,"$1$1"),i=`"${i}"`,i=i.replace(Bt,"^$1"),r&&(i=i.replace(Bt,"^$1")),i}jt.exports.command=Oo;jt.exports.argument=Vo});var Br=w((tf,qr)=>{"use strict";qr.exports=/^#!(.*)/});var Ur=w((rf,jr)=>{"use strict";var Fo=Br();jr.exports=(i="")=>{let r=i.match(Fo);if(!r)return null;let[n,u]=r[0].replace(/#! ?/,"").split(" "),h=n.split("/").pop();return h==="env"?u:u?`${h} ${u}`:h}});var Gr=w((sf,Mr)=>{"use strict";var Ut=require("fs"),$o=Ur();function Do(i){let n=Buffer.alloc(150),u;try{u=Ut.openSync(i,"r"),Ut.readSync(u,n,0,150,0),Ut.closeSync(u)}catch{}return $o(n.toString())}Mr.exports=Do});var Xr=w((nf,zr)=>{"use strict";var qo=require("path"),Hr=$r(),Wr=Dr(),Bo=Gr(),jo=process.platform==="win32",Uo=/\.(?:com|exe)$/i,Mo=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Go(i){i.file=Hr(i);let r=i.file&&Bo(i.file);return r?(i.args.unshift(i.file),i.command=r,Hr(i)):i.file}function Ho(i){if(!jo)return i;let r=Go(i),n=!Uo.test(r);if(i.options.forceShell||n){let u=Mo.test(r);i.command=qo.normalize(i.command),i.command=Wr.command(i.command),i.args=i.args.map(l=>Wr.argument(l,u));let h=[i.command].concat(i.args).join(" ");i.args=["/d","/s","/c",`"${h}"`],i.command=process.env.comspec||"cmd.exe",i.options.windowsVerbatimArguments=!0}return i}function Wo(i,r,n){r&&!Array.isArray(r)&&(n=r,r=null),r=r?r.slice(0):[],n=Object.assign({},n);let u={command:i,args:r,options:n,file:void 0,original:{command:i,args:r}};return n.shell?u:Ho(u)}zr.exports=Wo});var Qr=w((af,Yr)=>{"use strict";var Mt=process.platform==="win32";function Gt(i,r){return Object.assign(new Error(`${r} ${i.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${r} ${i.command}`,path:i.command,spawnargs:i.args})}function zo(i,r){if(!Mt)return;let n=i.emit;i.emit=function(u,h){if(u==="exit"){let l=Kr(h,r);if(l)return n.call(i,"error",l)}return n.apply(i,arguments)}}function Kr(i,r){return Mt&&i===1&&!r.file?Gt(r.original,"spawn"):null}function Xo(i,r){return Mt&&i===1&&!r.file?Gt(r.original,"spawnSync"):null}Yr.exports={hookChildProcess:zo,verifyENOENT:Kr,verifyENOENTSync:Xo,notFoundError:Gt}});var es=w((of,Re)=>{"use strict";var Jr=require("child_process"),Ht=Xr(),Wt=Qr();function Zr(i,r,n){let u=Ht(i,r,n),h=Jr.spawn(u.command,u.args,u.options);return Wt.hookChildProcess(h,u),h}function Ko(i,r,n){let u=Ht(i,r,n),h=Jr.spawnSync(u.command,u.args,u.options);return h.error=h.error||Wt.verifyENOENTSync(h.status,u),h}Re.exports=Zr;Re.exports.spawn=Zr;Re.exports.sync=Ko;Re.exports._parse=Ht;Re.exports._enoent=Wt});var Pe=w((uf,ts)=>{"use strict";var Yo="2.0.0",Qo=Number.MAX_SAFE_INTEGER||9007199254740991,Jo=16,Zo=250,eu=["major","premajor","minor","preminor","patch","prepatch","prerelease"];ts.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Jo,MAX_SAFE_BUILD_LENGTH:Zo,MAX_SAFE_INTEGER:Qo,RELEASE_TYPES:eu,SEMVER_SPEC_VERSION:Yo,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ue=w((cf,is)=>{"use strict";var tu=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{};is.exports=tu});var Te=w((oe,rs)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:zt,MAX_SAFE_BUILD_LENGTH:iu,MAX_LENGTH:ru}=Pe(),su=Ue();oe=rs.exports={};var nu=oe.re=[],au=oe.safeRe=[],C=oe.src=[],ou=oe.safeSrc=[],_=oe.t={},uu=0,Xt="[a-zA-Z0-9-]",cu=[["\\s",1],["\\d",ru],[Xt,iu]],hu=i=>{for(let[r,n]of cu)i=i.split(`${r}*`).join(`${r}{0,${n}}`).split(`${r}+`).join(`${r}{1,${n}}`);return i},T=(i,r,n)=>{let u=hu(r),h=uu++;su(i,h,r),_[i]=h,C[h]=r,ou[h]=u,nu[h]=new RegExp(r,n?"g":void 0),au[h]=new RegExp(u,n?"g":void 0)};T("NUMERICIDENTIFIER","0|[1-9]\\d*");T("NUMERICIDENTIFIERLOOSE","\\d+");T("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Xt}*`);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",`${Xt}+`);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,${zt}})(?:\\.(\\d{1,${zt}}))?(?:\\.(\\d{1,${zt}}))?`);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);oe.tildeTrimReplace="$1~";T("TILDE",`^${C[_.LONETILDE]}${C[_.XRANGEPLAIN]}$`);T("TILDELOOSE",`^${C[_.LONETILDE]}${C[_.XRANGEPLAINLOOSE]}$`);T("LONECARET","(?:\\^)");T("CARETTRIM",`(\\s*)${C[_.LONECARET]}\\s+`,!0);oe.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);oe.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 ut=w((hf,ss)=>{"use strict";var lu=Object.freeze({loose:!0}),fu=Object.freeze({}),pu=i=>i?typeof i!="object"?lu:i:fu;ss.exports=pu});var Kt=w((lf,os)=>{"use strict";var ns=/^[0-9]+$/,as=(i,r)=>{if(typeof i=="number"&&typeof r=="number")return i===r?0:i<r?-1:1;let n=ns.test(i),u=ns.test(r);return n&&u&&(i=+i,r=+r),i===r?0:n&&!u?-1:u&&!n?1:i<r?-1:1},du=(i,r)=>as(r,i);os.exports={compareIdentifiers:as,rcompareIdentifiers:du}});var G=w((ff,cs)=>{"use strict";var ct=Ue(),{MAX_LENGTH:us,MAX_SAFE_INTEGER:ht}=Pe(),{safeRe:lt,t:ft}=Te(),mu=ut(),{compareIdentifiers:Yt}=Kt(),xu=(i,r)=>{let n=r.split(".");if(n.length>i.length)return!1;for(let u=0;u<n.length;u++)if(Yt(i[u],n[u])!==0)return!1;return!0},Qt=class i{constructor(r,n){if(n=mu(n),r instanceof i){if(r.loose===!!n.loose&&r.includePrerelease===!!n.includePrerelease)return r;r=r.version}else if(typeof r!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof r}".`);if(r.length>us)throw new TypeError(`version is longer than ${us} characters`);ct("SemVer",r,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let u=r.trim().match(n.loose?lt[ft.LOOSE]:lt[ft.FULL]);if(!u)throw new TypeError(`Invalid Version: ${r}`);if(this.raw=r,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>ht||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ht||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ht||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map(h=>{if(/^[0-9]+$/.test(h)){let l=+h;if(l>=0&&l<ht)return l}return h}):this.prerelease=[],this.build=u[5]?u[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(r){if(ct("SemVer.compare",this.version,this.options,r),!(r instanceof i)){if(typeof r=="string"&&r===this.version)return 0;r=new i(r,this.options)}return r.version===this.version?0:this.compareMain(r)||this.comparePre(r)}compareMain(r){return r instanceof i||(r=new i(r,this.options)),this.major<r.major?-1:this.major>r.major?1:this.minor<r.minor?-1:this.minor>r.minor?1:this.patch<r.patch?-1:this.patch>r.patch?1:0}comparePre(r){if(r instanceof i||(r=new i(r,this.options)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;let n=0;do{let u=this.prerelease[n],h=r.prerelease[n];if(ct("prerelease compare",n,u,h),u===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(u===void 0)return-1;if(u===h)continue;return Yt(u,h)}while(++n)}compareBuild(r){r instanceof i||(r=new i(r,this.options));let n=0;do{let u=this.build[n],h=r.build[n];if(ct("build compare",n,u,h),u===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(u===void 0)return-1;if(u===h)continue;return Yt(u,h)}while(++n)}inc(r,n,u){if(r.startsWith("pre")){if(!n&&u===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let h=`-${n}`.match(this.options.loose?lt[ft.PRERELEASELOOSE]:lt[ft.PRERELEASE]);if(!h||h[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,u);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,u);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,u),this.inc("pre",n,u);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,u),this.inc("pre",n,u);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 h=Number(u)?1:0;if(this.prerelease.length===0)this.prerelease=[h];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(n===this.prerelease.join(".")&&u===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(h)}}if(n){let l=[n,h];if(u===!1&&(l=[n]),xu(this.prerelease,n)){let d=this.prerelease[n.split(".").length];isNaN(d)&&(this.prerelease=l)}else this.prerelease=l}break}default:throw new Error(`invalid increment argument: ${r}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};cs.exports=Qt});var xe=w((pf,ls)=>{"use strict";var hs=G(),gu=(i,r,n=!1)=>{if(i instanceof hs)return i;try{return new hs(i,r)}catch(u){if(!n)return null;throw u}};ls.exports=gu});var ps=w((df,fs)=>{"use strict";var vu=xe(),yu=(i,r)=>{let n=vu(i,r);return n?n.version:null};fs.exports=yu});var ms=w((mf,ds)=>{"use strict";var Eu=xe(),bu=(i,r)=>{let n=Eu(i.trim().replace(/^[=v]+/,""),r);return n?n.version:null};ds.exports=bu});var vs=w((xf,gs)=>{"use strict";var xs=G(),Su=(i,r,n,u,h)=>{typeof n=="string"&&(h=u,u=n,n=void 0);try{return new xs(i instanceof xs?i.version:i,n).inc(r,u,h).version}catch{return null}};gs.exports=Su});var bs=w((gf,Es)=>{"use strict";var ys=xe(),wu=(i,r)=>{let n=ys(i,null,!0),u=ys(r,null,!0),h=n.compare(u);if(h===0)return null;let l=h>0,d=l?n:u,m=l?u:n,y=!!d.prerelease.length;if(!!m.prerelease.length&&!y){if(!m.patch&&!m.minor)return"major";if(m.compareMain(d)===0)return m.minor&&!m.patch?"minor":"patch"}let A=y?"pre":"";return n.major!==u.major?A+"major":n.minor!==u.minor?A+"minor":n.patch!==u.patch?A+"patch":"prerelease"};Es.exports=wu});var ws=w((vf,Ss)=>{"use strict";var Cu=G(),_u=(i,r)=>new Cu(i,r).major;Ss.exports=_u});var _s=w((yf,Cs)=>{"use strict";var Iu=G(),ku=(i,r)=>new Iu(i,r).minor;Cs.exports=ku});var ks=w((Ef,Is)=>{"use strict";var Au=G(),Nu=(i,r)=>new Au(i,r).patch;Is.exports=Nu});var Ns=w((bf,As)=>{"use strict";var Ru=xe(),Pu=(i,r)=>{let n=Ru(i,r);return n&&n.prerelease.length?n.prerelease:null};As.exports=Pu});var ie=w((Sf,Ps)=>{"use strict";var Rs=G(),Tu=(i,r,n)=>new Rs(i,n).compare(new Rs(r,n));Ps.exports=Tu});var Ls=w((wf,Ts)=>{"use strict";var Lu=ie(),Ou=(i,r,n)=>Lu(r,i,n);Ts.exports=Ou});var Vs=w((Cf,Os)=>{"use strict";var Vu=ie(),Fu=(i,r)=>Vu(i,r,!0);Os.exports=Fu});var pt=w((_f,$s)=>{"use strict";var Fs=G(),$u=(i,r,n)=>{let u=new Fs(i,n),h=new Fs(r,n);return u.compare(h)||u.compareBuild(h)};$s.exports=$u});var qs=w((If,Ds)=>{"use strict";var Du=pt(),qu=(i,r)=>i.sort((n,u)=>Du(n,u,r));Ds.exports=qu});var js=w((kf,Bs)=>{"use strict";var Bu=pt(),ju=(i,r)=>i.sort((n,u)=>Bu(u,n,r));Bs.exports=ju});var Me=w((Af,Us)=>{"use strict";var Uu=ie(),Mu=(i,r,n)=>Uu(i,r,n)>0;Us.exports=Mu});var dt=w((Nf,Ms)=>{"use strict";var Gu=ie(),Hu=(i,r,n)=>Gu(i,r,n)<0;Ms.exports=Hu});var Jt=w((Rf,Gs)=>{"use strict";var Wu=ie(),zu=(i,r,n)=>Wu(i,r,n)===0;Gs.exports=zu});var Zt=w((Pf,Hs)=>{"use strict";var Xu=ie(),Ku=(i,r,n)=>Xu(i,r,n)!==0;Hs.exports=Ku});var mt=w((Tf,Ws)=>{"use strict";var Yu=ie(),Qu=(i,r,n)=>Yu(i,r,n)>=0;Ws.exports=Qu});var xt=w((Lf,zs)=>{"use strict";var Ju=ie(),Zu=(i,r,n)=>Ju(i,r,n)<=0;zs.exports=Zu});var ei=w((Of,Xs)=>{"use strict";var ec=Jt(),tc=Zt(),ic=Me(),rc=mt(),sc=dt(),nc=xt(),ac=(i,r,n,u)=>{switch(r){case"===":return typeof i=="object"&&(i=i.version),typeof n=="object"&&(n=n.version),i===n;case"!==":return typeof i=="object"&&(i=i.version),typeof n=="object"&&(n=n.version),i!==n;case"":case"=":case"==":return ec(i,n,u);case"!=":return tc(i,n,u);case">":return ic(i,n,u);case">=":return rc(i,n,u);case"<":return sc(i,n,u);case"<=":return nc(i,n,u);default:throw new TypeError(`Invalid operator: ${r}`)}};Xs.exports=ac});var Ys=w((Vf,Ks)=>{"use strict";var oc=G(),uc=xe(),{safeRe:gt,t:vt}=Te(),cc=(i,r)=>{if(i instanceof oc)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;r=r||{};let n=null;if(!r.rtl)n=i.match(r.includePrerelease?gt[vt.COERCEFULL]:gt[vt.COERCE]);else{let y=r.includePrerelease?gt[vt.COERCERTLFULL]:gt[vt.COERCERTL],x;for(;(x=y.exec(i))&&(!n||n.index+n[0].length!==i.length);)(!n||x.index+x[0].length!==n.index+n[0].length)&&(n=x),y.lastIndex=x.index+x[1].length+x[2].length;y.lastIndex=-1}if(n===null)return null;let u=n[2],h=n[3]||"0",l=n[4]||"0",d=r.includePrerelease&&n[5]?`-${n[5]}`:"",m=r.includePrerelease&&n[6]?`+${n[6]}`:"";return uc(`${u}.${h}.${l}${d}${m}`,r)};Ks.exports=cc});var Js=w((Ff,Qs)=>{"use strict";var hc=xe(),lc=Pe(),fc=G(),pc=(i,r,n)=>{if(!lc.RELEASE_TYPES.includes(r))return null;let u=dc(i,n);return u&&mc(u,r)},dc=(i,r)=>{let n=i instanceof fc?i.version:i;return hc(n,r)},mc=(i,r)=>{if(xc(r))return i.version;switch(i.prerelease=[],r){case"major":i.minor=0,i.patch=0;break;case"minor":i.patch=0;break}return i.format()},xc=i=>i.startsWith("pre");Qs.exports=pc});var en=w(($f,Zs)=>{"use strict";var ti=class{constructor(){this.max=1e3,this.map=new Map}get(r){let n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){let h=this.map.keys().next().value;this.delete(h)}this.map.set(r,n)}return this}};Zs.exports=ti});var re=w((Df,nn)=>{"use strict";var gc=/\s+/g,ii=class i{constructor(r,n){if(n=yc(n),r instanceof i)return r.loose===!!n.loose&&r.includePrerelease===!!n.includePrerelease?r:new i(r.raw,n);if(r instanceof ri)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=r.trim().replace(gc," "),this.set=this.raw.split("||").map(u=>this.parseRange(u.trim())).filter(u=>u.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let u=this.set[0];if(this.set=this.set.filter(h=>!rn(h[0])),this.set.length===0)this.set=[u];else if(this.set.length>1){for(let h of this.set)if(h.length===1&&Ac(h[0])){this.set=[h];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let r=0;r<this.set.length;r++){r>0&&(this.formatted+="||");let n=this.set[r];for(let u=0;u<n.length;u++)u>0&&(this.formatted+=" "),this.formatted+=n[u].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(r){r=r.replace(kc,"");let u=((this.options.includePrerelease&&_c)|(this.options.loose&&Ic))+":"+r,h=tn.get(u);if(h)return h;let l=this.options.loose,d=l?K[H.HYPHENRANGELOOSE]:K[H.HYPHENRANGE];r=r.replace(d,qc(this.options.includePrerelease)),D("hyphen replace",r),r=r.replace(K[H.COMPARATORTRIM],Sc),D("comparator trim",r),r=r.replace(K[H.TILDETRIM],wc),D("tilde trim",r),r=r.replace(K[H.CARETTRIM],Cc),D("caret trim",r);let m=r.split(" ").map(v=>Nc(v,this.options)).join(" ").split(/\s+/).map(v=>Dc(v,this.options));l&&(m=m.filter(v=>(D("loose invalid filter",v,this.options),!!v.match(K[H.COMPARATORLOOSE])))),D("range list",m);let y=new Map,x=m.map(v=>new ri(v,this.options));for(let v of x){if(rn(v))return[v];y.set(v.value,v)}y.size>1&&y.has("")&&y.delete("");let A=[...y.values()];return tn.set(u,A),A}intersects(r,n){if(!(r instanceof i))throw new TypeError("a Range is required");return this.set.some(u=>sn(u,n)&&r.set.some(h=>sn(h,n)&&u.every(l=>h.every(d=>l.intersects(d,n)))))}test(r){if(!r)return!1;if(typeof r=="string")try{r=new Ec(r,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(Bc(this.set[n],r,this.options))return!0;return!1}};nn.exports=ii;var vc=en(),tn=new vc,yc=ut(),ri=Ge(),D=Ue(),Ec=G(),{safeRe:K,src:bc,t:H,comparatorTrimReplace:Sc,tildeTrimReplace:wc,caretTrimReplace:Cc}=Te(),{FLAG_INCLUDE_PRERELEASE:_c,FLAG_LOOSE:Ic}=Pe(),kc=new RegExp(bc[H.BUILD],"g"),rn=i=>i.value==="<0.0.0-0",Ac=i=>i.value==="",sn=(i,r)=>{let n=!0,u=i.slice(),h=u.pop();for(;n&&u.length;)n=u.every(l=>h.intersects(l,r)),h=u.pop();return n},Nc=(i,r)=>(i=i.replace(K[H.BUILD],""),D("comp",i,r),i=Lc(i,r),D("caret",i),i=Pc(i,r),D("tildes",i),i=Vc(i,r),D("xrange",i),i=$c(i,r),D("stars",i),i),U=i=>!i||i.toLowerCase()==="x"||i==="*",Rc=(i,r,n)=>U(i)&&!U(r)||U(r)&&n&&!U(n),Pc=(i,r)=>i.trim().split(/\s+/).map(n=>Tc(n,r)).join(" "),Tc=(i,r)=>{let n=r.loose?K[H.TILDELOOSE]:K[H.TILDE],u=r.includePrerelease?"-0":"";return i.replace(n,(h,l,d,m,y)=>{D("tilde",i,h,l,d,m,y);let x;return U(l)?x="":U(d)?x=`>=${l}.0.0${u} <${+l+1}.0.0-0`:U(m)?x=`>=${l}.${d}.0${u} <${l}.${+d+1}.0-0`:y?(D("replaceTilde pr",y),x=`>=${l}.${d}.${m}-${y} <${l}.${+d+1}.0-0`):x=`>=${l}.${d}.${m} <${l}.${+d+1}.0-0`,D("tilde return",x),x})},Lc=(i,r)=>i.trim().split(/\s+/).map(n=>Oc(n,r)).join(" "),Oc=(i,r)=>{D("caret",i,r);let n=r.loose?K[H.CARETLOOSE]:K[H.CARET],u=r.includePrerelease?"-0":"";return i.replace(n,(h,l,d,m,y)=>{D("caret",i,h,l,d,m,y);let x;return U(l)?x="":U(d)?x=`>=${l}.0.0${u} <${+l+1}.0.0-0`:U(m)?l==="0"?x=`>=${l}.${d}.0${u} <${l}.${+d+1}.0-0`:x=`>=${l}.${d}.0${u} <${+l+1}.0.0-0`:y?(D("replaceCaret pr",y),l==="0"?d==="0"?x=`>=${l}.${d}.${m}-${y} <${l}.${d}.${+m+1}-0`:x=`>=${l}.${d}.${m}-${y} <${l}.${+d+1}.0-0`:x=`>=${l}.${d}.${m}-${y} <${+l+1}.0.0-0`):(D("no pr"),l==="0"?d==="0"?x=`>=${l}.${d}.${m} <${l}.${d}.${+m+1}-0`:x=`>=${l}.${d}.${m} <${l}.${+d+1}.0-0`:x=`>=${l}.${d}.${m} <${+l+1}.0.0-0`),D("caret return",x),x})},Vc=(i,r)=>(D("replaceXRanges",i,r),i.split(/\s+/).map(n=>Fc(n,r)).join(" ")),Fc=(i,r)=>{i=i.trim();let n=r.loose?K[H.XRANGELOOSE]:K[H.XRANGE];return i.replace(n,(u,h,l,d,m,y)=>{if(D("xRange",i,u,h,l,d,m,y),Rc(l,d,m))return i;let x=U(l),A=x||U(d),v=A||U(m),S=v;return h==="="&&S&&(h=""),y=r.includePrerelease?"-0":"",x?h===">"||h==="<"?u="<0.0.0-0":u="*":h&&S?(A&&(d=0),m=0,h===">"?(h=">=",A?(l=+l+1,d=0,m=0):(d=+d+1,m=0)):h==="<="&&(h="<",A?l=+l+1:d=+d+1),h==="<"&&(y="-0"),u=`${h+l}.${d}.${m}${y}`):A?u=`>=${l}.0.0${y} <${+l+1}.0.0-0`:v&&(u=`>=${l}.${d}.0${y} <${l}.${+d+1}.0-0`),D("xRange return",u),u})},$c=(i,r)=>(D("replaceStars",i,r),i.trim().replace(K[H.STAR],"")),Dc=(i,r)=>(D("replaceGTE0",i,r),i.trim().replace(K[r.includePrerelease?H.GTE0PRE:H.GTE0],"")),qc=i=>(r,n,u,h,l,d,m,y,x,A,v,S)=>(U(u)?n="":U(h)?n=`>=${u}.0.0${i?"-0":""}`:U(l)?n=`>=${u}.${h}.0${i?"-0":""}`:d?n=`>=${n}`:n=`>=${n}${i?"-0":""}`,U(x)?y="":U(A)?y=`<${+x+1}.0.0-0`:U(v)?y=`<${x}.${+A+1}.0-0`:S?y=`<=${x}.${A}.${v}-${S}`:i?y=`<${x}.${A}.${+v+1}-0`:y=`<=${y}`,`${n} ${y}`.trim()),Bc=(i,r,n)=>{for(let u=0;u<i.length;u++)if(!i[u].test(r))return!1;if(r.prerelease.length&&!n.includePrerelease){for(let u=0;u<i.length;u++)if(D(i[u].semver),i[u].semver!==ri.ANY&&i[u].semver.prerelease.length>0){let h=i[u].semver;if(h.major===r.major&&h.minor===r.minor&&h.patch===r.patch)return!0}return!1}return!0}});var Ge=w((qf,ln)=>{"use strict";var He=Symbol("SemVer ANY"),ai=class i{static get ANY(){return He}constructor(r,n){if(n=an(n),r instanceof i){if(r.loose===!!n.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),ni("comparator",r,n),this.options=n,this.loose=!!n.loose,this.parse(r),this.semver===He?this.value="":this.value=this.operator+this.semver.version,ni("comp",this)}parse(r){let n=this.options.loose?on[un.COMPARATORLOOSE]:on[un.COMPARATOR],u=r.match(n);if(!u)throw new TypeError(`Invalid comparator: ${r}`);this.operator=u[1]!==void 0?u[1]:"",this.operator==="="&&(this.operator=""),u[2]?this.semver=new cn(u[2],this.options.loose):this.semver=He}toString(){return this.value}test(r){if(ni("Comparator.test",r,this.options.loose),this.semver===He||r===He)return!0;if(typeof r=="string")try{r=new cn(r,this.options)}catch{return!1}return si(r,this.operator,this.semver,this.options)}intersects(r,n){if(!(r instanceof i))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new hn(r.value,n).test(this.value):r.operator===""?r.value===""?!0:new hn(this.value,n).test(r.semver):(n=an(n),n.includePrerelease&&(this.value==="<0.0.0-0"||r.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||r.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&r.operator.startsWith(">")||this.operator.startsWith("<")&&r.operator.startsWith("<")||this.semver.version===r.semver.version&&this.operator.includes("=")&&r.operator.includes("=")||si(this.semver,"<",r.semver,n)&&this.operator.startsWith(">")&&r.operator.startsWith("<")||si(this.semver,">",r.semver,n)&&this.operator.startsWith("<")&&r.operator.startsWith(">")))}};ln.exports=ai;var an=ut(),{safeRe:on,t:un}=Te(),si=ei(),ni=Ue(),cn=G(),hn=re()});var We=w((Bf,fn)=>{"use strict";var jc=re(),Uc=(i,r,n)=>{try{r=new jc(r,n)}catch{return!1}return r.test(i)};fn.exports=Uc});var dn=w((jf,pn)=>{"use strict";var Mc=re(),Gc=(i,r)=>new Mc(i,r).set.map(n=>n.map(u=>u.value).join(" ").trim().split(" "));pn.exports=Gc});var xn=w((Uf,mn)=>{"use strict";var Hc=G(),Wc=re(),zc=(i,r,n)=>{let u=null,h=null,l=null;try{l=new Wc(r,n)}catch{return null}return i.forEach(d=>{l.test(d)&&(!u||h.compare(d)===-1)&&(u=d,h=new Hc(u,n))}),u};mn.exports=zc});var vn=w((Mf,gn)=>{"use strict";var Xc=G(),Kc=re(),Yc=(i,r,n)=>{let u=null,h=null,l=null;try{l=new Kc(r,n)}catch{return null}return i.forEach(d=>{l.test(d)&&(!u||h.compare(d)===1)&&(u=d,h=new Xc(u,n))}),u};gn.exports=Yc});var bn=w((Gf,En)=>{"use strict";var oi=G(),Qc=re(),yn=Me(),Jc=(i,r)=>{i=new Qc(i,r);let n=new oi("0.0.0");if(i.test(n)||(n=new oi("0.0.0-0"),i.test(n)))return n;n=null;for(let u=0;u<i.set.length;++u){let h=i.set[u],l=null;h.forEach(d=>{let m=new oi(d.semver.version);switch(d.operator){case">":m.prerelease.length===0?m.patch++:m.prerelease.push(0),m.raw=m.format();case"":case">=":(!l||yn(m,l))&&(l=m);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${d.operator}`)}}),l&&(!n||yn(n,l))&&(n=l)}return n&&i.test(n)?n:null};En.exports=Jc});var wn=w((Hf,Sn)=>{"use strict";var Zc=re(),eh=(i,r)=>{try{return new Zc(i,r).range||"*"}catch{return null}};Sn.exports=eh});var yt=w((Wf,kn)=>{"use strict";var th=G(),In=Ge(),{ANY:ih}=In,rh=re(),sh=We(),Cn=Me(),_n=dt(),nh=xt(),ah=mt(),oh=(i,r,n,u)=>{i=new th(i,u),r=new rh(r,u);let h,l,d,m,y;switch(n){case">":h=Cn,l=nh,d=_n,m=">",y=">=";break;case"<":h=_n,l=ah,d=Cn,m="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(sh(i,r,u))return!1;for(let x=0;x<r.set.length;++x){let A=r.set[x],v=null,S=null;if(A.forEach(E=>{E.semver===ih&&(E=new In(">=0.0.0")),v=v||E,S=S||E,h(E.semver,v.semver,u)?v=E:d(E.semver,S.semver,u)&&(S=E)}),v.operator===m||v.operator===y||(!S.operator||S.operator===m)&&l(i,S.semver))return!1;if(S.operator===y&&d(i,S.semver))return!1}return!0};kn.exports=oh});var Nn=w((zf,An)=>{"use strict";var uh=yt(),ch=(i,r,n)=>uh(i,r,">",n);An.exports=ch});var Pn=w((Xf,Rn)=>{"use strict";var hh=yt(),lh=(i,r,n)=>hh(i,r,"<",n);Rn.exports=lh});var On=w((Kf,Ln)=>{"use strict";var Tn=re(),fh=(i,r,n)=>(i=new Tn(i,n),r=new Tn(r,n),i.intersects(r,n));Ln.exports=fh});var Fn=w((Yf,Vn)=>{"use strict";var ph=We(),dh=ie();Vn.exports=(i,r,n)=>{let u=[],h=null,l=null,d=i.sort((A,v)=>dh(A,v,n));for(let A of d)ph(A,r,n)?(l=A,h||(h=A)):(l&&u.push([h,l]),l=null,h=null);h&&u.push([h,null]);let m=[];for(let[A,v]of u)A===v?m.push(A):!v&&A===d[0]?m.push("*"):v?A===d[0]?m.push(`<=${v}`):m.push(`${A} - ${v}`):m.push(`>=${A}`);let y=m.join(" || "),x=typeof r.raw=="string"?r.raw:String(r);return y.length<x.length?y:r}});var Un=w((Qf,jn)=>{"use strict";var $n=re(),hi=Ge(),{ANY:ui}=hi,ci=We(),li=ie(),mh=(i,r,n={})=>{if(i===r)return!0;i=new $n(i,n),r=new $n(r,n);let u=!1;e:for(let h of i.set){for(let l of r.set){let d=gh(h,l,n);if(u=u||d!==null,d)continue e}if(u)return!1}return!0},xh=[new hi(">=0.0.0-0")],Dn=[new hi(">=0.0.0")],gh=(i,r,n)=>{if(i===r)return!0;if(i.length===1&&i[0].semver===ui){if(r.length===1&&r[0].semver===ui)return!0;n.includePrerelease?i=xh:i=Dn}if(r.length===1&&r[0].semver===ui){if(n.includePrerelease)return!0;r=Dn}let u=new Set,h,l;for(let E of i)E.operator===">"||E.operator===">="?h=qn(h,E,n):E.operator==="<"||E.operator==="<="?l=Bn(l,E,n):u.add(E.semver);if(u.size>1)return null;let d;if(h&&l){if(d=li(h.semver,l.semver,n),d>0)return null;if(d===0&&(h.operator!==">="||l.operator!=="<="))return null}for(let E of u){if(h&&!ci(E,String(h),n)||l&&!ci(E,String(l),n))return null;for(let N of r)if(!ci(E,String(N),n))return!1;return!0}let m,y,x,A,v=l&&!n.includePrerelease&&l.semver.prerelease.length?l.semver:!1,S=h&&!n.includePrerelease&&h.semver.prerelease.length?h.semver:!1;v&&v.prerelease.length===1&&l.operator==="<"&&v.prerelease[0]===0&&(v=!1);for(let E of r){if(A=A||E.operator===">"||E.operator===">=",x=x||E.operator==="<"||E.operator==="<=",h){if(S&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===S.major&&E.semver.minor===S.minor&&E.semver.patch===S.patch&&(S=!1),E.operator===">"||E.operator===">="){if(m=qn(h,E,n),m===E&&m!==h)return!1}else if(h.operator===">="&&!E.test(h.semver))return!1}if(l){if(v&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===v.major&&E.semver.minor===v.minor&&E.semver.patch===v.patch&&(v=!1),E.operator==="<"||E.operator==="<="){if(y=Bn(l,E,n),y===E&&y!==l)return!1}else if(l.operator==="<="&&!E.test(l.semver))return!1}if(!E.operator&&(l||h)&&d!==0)return!1}return!(h&&x&&!l&&d!==0||l&&A&&!h&&d!==0||S||v)},qn=(i,r,n)=>{if(!i)return r;let u=li(i.semver,r.semver,n);return u>0?i:u<0||r.operator===">"&&i.operator===">="?r:i},Bn=(i,r,n)=>{if(!i)return r;let u=li(i.semver,r.semver,n);return u<0?i:u>0||r.operator==="<"&&i.operator==="<="?r:i};jn.exports=mh});var Wn=w((Jf,Hn)=>{"use strict";var fi=Te(),Mn=Pe(),vh=G(),Gn=Kt(),yh=xe(),Eh=ps(),bh=ms(),Sh=vs(),wh=bs(),Ch=ws(),_h=_s(),Ih=ks(),kh=Ns(),Ah=ie(),Nh=Ls(),Rh=Vs(),Ph=pt(),Th=qs(),Lh=js(),Oh=Me(),Vh=dt(),Fh=Jt(),$h=Zt(),Dh=mt(),qh=xt(),Bh=ei(),jh=Ys(),Uh=Js(),Mh=Ge(),Gh=re(),Hh=We(),Wh=dn(),zh=xn(),Xh=vn(),Kh=bn(),Yh=wn(),Qh=yt(),Jh=Nn(),Zh=Pn(),el=On(),tl=Fn(),il=Un();Hn.exports={parse:yh,valid:Eh,clean:bh,inc:Sh,diff:wh,major:Ch,minor:_h,patch:Ih,prerelease:kh,compare:Ah,rcompare:Nh,compareLoose:Rh,compareBuild:Ph,sort:Th,rsort:Lh,gt:Oh,lt:Vh,eq:Fh,neq:$h,gte:Dh,lte:qh,cmp:Bh,coerce:jh,truncate:Uh,Comparator:Mh,Range:Gh,satisfies:Hh,toComparators:Wh,maxSatisfying:zh,minSatisfying:Xh,minVersion:Kh,validRange:Yh,outside:Qh,gtr:Jh,ltr:Zh,intersects:el,simplifyRange:tl,subset:il,SemVer:vh,re:fi.re,src:fi.src,tokens:fi.t,SEMVER_SPEC_VERSION:Mn.SEMVER_SPEC_VERSION,RELEASE_TYPES:Mn.RELEASE_TYPES,compareIdentifiers:Gn.compareIdentifiers,rcompareIdentifiers:Gn.rcompareIdentifiers}});var xi=w((Zf,ra)=>{var ge=require("fs"),se=require("path"),Xn=es(),ne=Wn(),{DEFAULT_API_URL:rl}=at(),Kn=["dependencies","devDependencies","optionalDependencies","peerDependencies"];function pi(i){let r=typeof i=="string"&&i.match(/^((?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*)(?:@([^\r\n]+))?$/);if(!r)throw new Error(`Invalid npm dependency: ${String(i)}`);return{name:r[1],version:r[2]}}function di(i){let r=new Map;for(let n of i){let{name:u,version:h}=pi(n),l=r.get(u);r.set(u,l&&h?Yn(u,l,h):h||l)}return r}function Yn(i,r,n){if(r===n)return r;let u=ne.validRange(r),h=ne.validRange(n);if(u&&h)try{if(ne.subset(h,u))return n;if(ne.subset(u,h))return r}catch{}throw new Error(`Conflicting registry versions for ${i}: ${r} and ${n}`)}function sl(i,r){let n=typeof i=="string"&&ne.validRange(i),u=ne.validRange(r);if(!n||!u)return!1;try{return ne.subset(n,u)}catch{return!1}}function bt(i,r){if(sl(i,r))return"satisfied";let n=typeof i=="string"&&ne.validRange(i),u=ne.validRange(r);if(!n||!u)return"incomparable";try{let h=ne.minVersion(n),l=ne.minVersion(u);return!h||!l?"incomparable":ne.lt(h,l)?"lower":"newer"}catch{return"incomparable"}}function Et(i,r){let n=Kn.find(u=>Object.hasOwn(i[u]||{},r));return n?{section:n,existing:i[n][r]}:null}function Qn(i,r){let n=di(r);if(n.size===0)return;let u=se.join(i,"package.json"),h=JSON.parse(ge.readFileSync(u,"utf8"));for(let[l,d]of n){let m=Et(h,l),y=m?.section||"dependencies";h[y]||={};let x=m?.existing;h[y][l]=x===void 0?d||"latest":d&&bt(x,d)==="lower"?d:x}ge.writeFileSync(u,`${JSON.stringify(h,null,2)}
|
|
3
|
-
`)}function St(i){let r=[["pnpm-lock.yaml","pnpm"],["yarn.lock","yarn"],["bun.lock","bun"],["bun.lockb","bun"],["package-lock.json","npm"],["npm-shrinkwrap.json","npm"]];for(let n=se.resolve(i);;n=se.dirname(n)){let u=se.join(n,"package.json");if(ge.existsSync(u)){let h=JSON.parse(ge.readFileSync(u,"utf8")),l=String(h.packageManager||"").split("@")[0];if(["npm","pnpm","yarn","bun"].includes(l))return l}for(let[h,l]of r)if(ge.existsSync(se.join(n,h)))return l;if(se.dirname(n)===n)return"npm"}}var
|
|
4
|
-
${d}`),{missing:l,command:d,installed:!1};h(`\u{1F4E6} Installing component dependencies: ${d}`);try{return
|
|
1
|
+
var w=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);var lr=w((Yl,hr)=>{function fe(i){return i!==null&&typeof i=="object"&&!Array.isArray(i)}function Ft(i,r){if(!fe(i)||!fe(r))return r===void 0?i:r;let n={...i};for(let[u,h]of Object.entries(r))n[u]=u in n?Ft(n[u],h):h;return n}function $t(i,r,n=[],u=[]){if(i===void 0||r===void 0)return u;if(!fe(i)||!fe(r))return u.push(n.join(".")),u;for(let h of Object.keys(i))h in r&&$t(i[h],r[h],[...n,h],u);return u}function ur(i){return fe(i)&&("styles"in i||"behavior"in i)}function cr(i,r="component"){if(!ur(i)||!fe(i.styles)||i.behavior!==void 0&&!fe(i.behavior)||Object.keys(i).some(u=>!["styles","behavior"].includes(u)))throw new TypeError(`Component ${r} must use the styles/behavior envelope`);let n=$t(i.styles,i.behavior,[r]);if(n.length>0)throw new Error(`Component config styles/behavior conflict at ${n.join(", ")}`);return Ft(i.styles||{},i.behavior||{})}function lo(i){if(!fe(i))return i;let r=!1,n={};for(let[u,h]of Object.entries(i))n[u]=cr(h,u),n[u]!==h&&(r=!0);return r?n:i}hr.exports={isPlainObject:fe,deepMerge:Ft,findTreeConflicts:$t,isComponentEnvelope:ur,toRuntimeComponentConfig:cr,toRuntimeComponentsConfig:lo}});var mr=w((Ql,dr)=>{"use strict";var fr="https://app.v4.frontfriend.dev",pr="https://app.frontfriend.dev";function fo(i){if(new URL(i).origin===fr)throw Object.assign(new Error(`The API origin ${fr} has moved to ${pr}. Update api-url in frontfriend.config.js and the agent installation, then run frontfriend login --api-url ${pr}. Credentials were not sent or forwarded.`),{code:"FF_API_ORIGIN_RETIRED"})}dr.exports={assertCurrentApiOrigin:fo}});var nt=w((Jl,xr)=>{var B=require("fs");function po(i){try{let r=B.readFileSync(i,"utf8");return JSON.parse(r)}catch(r){if(r.code==="ENOENT")return null;throw r}}function mo(i){try{return B.readFileSync(i,"utf8").replace(/^\uFEFF/,"")}catch(r){if(r.code==="ENOENT")return null;throw r}}function xo(i,r,n=2){let u=JSON.stringify(r,null,n);B.writeFileSync(i,u,"utf8")}function go(i,r){B.writeFileSync(i,r,"utf8")}function vo(i,r){if(r==null||typeof r=="object"&&Object.keys(r).length===0||Array.isArray(r)&&r.length===0){let u=`module.exports = ${Array.isArray(r)?"[]":"{}"};`;B.writeFileSync(i,u,"utf8")}else{let n=`module.exports = ${JSON.stringify(r,null,2)};`;B.writeFileSync(i,n,"utf8")}}function yo(i){return B.existsSync(i)}function Eo(i){B.mkdirSync(i,{recursive:!0})}function bo(i){B.rmSync(i,{recursive:!0,force:!0})}function So(i){B.rmSync(i,{force:!0})}function wo(i,r){B.mkdirSync(require("path").dirname(i),{recursive:!0,mode:448});let n=`${i}.${process.pid}.${Date.now()}.tmp`;try{B.writeFileSync(n,`${JSON.stringify(r,null,2)}
|
|
2
|
+
`,{mode:384}),B.renameSync(n,i);try{B.chmodSync(i,384)}catch{}}finally{B.rmSync(n,{force:!0})}}async function Co(i,r,n){B.mkdirSync(require("path").dirname(i),{recursive:!0,mode:448});let u=`${i}.lock`,h=Date.now()+2e4,l;for(;l===void 0;)try{l=B.openSync(u,"wx",384),B.writeFileSync(l,String(process.pid))}catch(d){if(d.code!=="EEXIST")throw d;try{let m=Number(B.readFileSync(u,"utf8"));if(Number.isInteger(m)&&m>0)try{process.kill(m,0)}catch(y){if(y.code==="ESRCH"){B.unlinkSync(u);continue}}}catch(m){if(m.code==="ENOENT")continue}if(Date.now()>=h)throw n();await new Promise(m=>setTimeout(m,50))}try{return await r()}finally{B.closeSync(l),B.unlinkSync(u)}}xr.exports={writePrivateJsonFileAtomic:wo,withPrivateFileLock:Co,readJsonFileSafe:po,readFileSafe:mo,writeJsonFile:xo,writeTextFile:go,writeModuleExportsFile:vo,fileExists:yo,ensureDirectoryExists:Eo,removeDirectory:bo,removeFile:So}});var at=w((Zl,gr)=>{var _o="https://app.frontfriend.dev",Io=".cache/frontfriend",ko={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"]},Ao={FF_ID:"FF_ID",FF_API_URL:"FF_API_URL",FF_AUTH_TOKEN:"FF_AUTH_TOKEN",FF_MACHINE_TOKEN:"FRONTFRIEND_MACHINE_TOKEN"};function No(i){if(!i)return null;try{let r=new URL(i);return r.hostname.startsWith("app.")?`${r.protocol}//${r.hostname.replace(/^app\./,"registry.")}`:null}catch{return null}}gr.exports={DEFAULT_API_URL:_o,CACHE_DIR_NAME:Io,CACHE_TTL_DAYS:7,CACHE_TTL_MS:6048e5,CACHE_FILES:ko,ENV_VARS:Ao,deriveRegistryFromApiUrl:No}});var Sr=w((ef,br)=>{br.exports=Er;Er.sync=Po;var vr=require("fs");function Ro(i,r){var n=r.pathExt!==void 0?r.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var u=0;u<n.length;u++){var h=n[u].toLowerCase();if(h&&i.substr(-h.length).toLowerCase()===h)return!0}return!1}function yr(i,r,n){return!i.isSymbolicLink()&&!i.isFile()?!1:Ro(r,n)}function Er(i,r,n){vr.stat(i,function(u,h){n(u,u?!1:yr(h,i,r))})}function Po(i,r){return yr(vr.statSync(i),i,r)}});var kr=w((tf,Ir)=>{Ir.exports=Cr;Cr.sync=To;var wr=require("fs");function Cr(i,r,n){wr.stat(i,function(u,h){n(u,u?!1:_r(h,r))})}function To(i,r){return _r(wr.statSync(i),r)}function _r(i,r){return i.isFile()&&Lo(i,r)}function Lo(i,r){var n=i.mode,u=i.uid,h=i.gid,l=r.uid!==void 0?r.uid:process.getuid&&process.getuid(),d=r.gid!==void 0?r.gid:process.getgid&&process.getgid(),m=parseInt("100",8),y=parseInt("010",8),x=parseInt("001",8),A=m|y,v=n&x||n&y&&h===d||n&m&&u===l||n&A&&l===0;return v}});var Nr=w((sf,Ar)=>{var rf=require("fs"),ot;process.platform==="win32"||global.TESTING_WINDOWS?ot=Sr():ot=kr();Ar.exports=Dt;Dt.sync=Oo;function Dt(i,r,n){if(typeof r=="function"&&(n=r,r={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(u,h){Dt(i,r||{},function(l,d){l?h(l):u(d)})})}ot(i,r||{},function(u,h){u&&(u.code==="EACCES"||r&&r.ignoreErrors)&&(u=null,h=!1),n(u,h)})}function Oo(i,r){try{return ot.sync(i,r||{})}catch(n){if(r&&r.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var Fr=w((nf,Vr)=>{var Ne=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Rr=require("path"),Vo=Ne?";":":",Pr=Nr(),Tr=i=>Object.assign(new Error(`not found: ${i}`),{code:"ENOENT"}),Lr=(i,r)=>{let n=r.colon||Vo,u=i.match(/\//)||Ne&&i.match(/\\/)?[""]:[...Ne?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(n)],h=Ne?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",l=Ne?h.split(n):[""];return Ne&&i.indexOf(".")!==-1&&l[0]!==""&&l.unshift(""),{pathEnv:u,pathExt:l,pathExtExe:h}},Or=(i,r,n)=>{typeof r=="function"&&(n=r,r={}),r||(r={});let{pathEnv:u,pathExt:h,pathExtExe:l}=Lr(i,r),d=[],m=x=>new Promise((A,v)=>{if(x===u.length)return r.all&&d.length?A(d):v(Tr(i));let S=u[x],E=/^".*"$/.test(S)?S.slice(1,-1):S,N=Rr.join(E,i),j=!E&&/^\.[\\\/]/.test(i)?i.slice(0,2)+N:N;A(y(j,x,0))}),y=(x,A,v)=>new Promise((S,E)=>{if(v===h.length)return S(m(A+1));let N=h[v];Pr(x+N,{pathExt:l},(j,Y)=>{if(!j&&Y)if(r.all)d.push(x+N);else return S(x+N);return S(y(x,A,v+1))})});return n?m(0).then(x=>n(null,x),n):m(0)},Fo=(i,r)=>{r=r||{};let{pathEnv:n,pathExt:u,pathExtExe:h}=Lr(i,r),l=[];for(let d=0;d<n.length;d++){let m=n[d],y=/^".*"$/.test(m)?m.slice(1,-1):m,x=Rr.join(y,i),A=!y&&/^\.[\\\/]/.test(i)?i.slice(0,2)+x:x;for(let v=0;v<u.length;v++){let S=A+u[v];try{if(Pr.sync(S,{pathExt:h}))if(r.all)l.push(S);else return S}catch{}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw Tr(i)};Vr.exports=Or;Or.sync=Fo});var Dr=w((af,qt)=>{"use strict";var $r=(i={})=>{let r=i.env||process.env;return(i.platform||process.platform)!=="win32"?"PATH":Object.keys(r).reverse().find(u=>u.toUpperCase()==="PATH")||"Path"};qt.exports=$r;qt.exports.default=$r});var Ur=w((of,jr)=>{"use strict";var qr=require("path"),$o=Fr(),Do=Dr();function Br(i,r){let n=i.options.env||process.env,u=process.cwd(),h=i.options.cwd!=null,l=h&&process.chdir!==void 0&&!process.chdir.disabled;if(l)try{process.chdir(i.options.cwd)}catch{}let d;try{d=$o.sync(i.command,{path:n[Do({env:n})],pathExt:r?qr.delimiter:void 0})}catch{}finally{l&&process.chdir(u)}return d&&(d=qr.resolve(h?i.options.cwd:"",d)),d}function qo(i){return Br(i)||Br(i,!0)}jr.exports=qo});var Mr=w((uf,jt)=>{"use strict";var Bt=/([()\][%!^"`<>&|;, *?])/g;function Bo(i){return i=i.replace(Bt,"^$1"),i}function jo(i,r){return i=`${i}`,i=i.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),i=i.replace(/(?=(\\+?)?)\1$/,"$1$1"),i=`"${i}"`,i=i.replace(Bt,"^$1"),r&&(i=i.replace(Bt,"^$1")),i}jt.exports.command=Bo;jt.exports.argument=jo});var Hr=w((cf,Gr)=>{"use strict";Gr.exports=/^#!(.*)/});var zr=w((hf,Wr)=>{"use strict";var Uo=Hr();Wr.exports=(i="")=>{let r=i.match(Uo);if(!r)return null;let[n,u]=r[0].replace(/#! ?/,"").split(" "),h=n.split("/").pop();return h==="env"?u:u?`${h} ${u}`:h}});var Kr=w((lf,Xr)=>{"use strict";var Ut=require("fs"),Mo=zr();function Go(i){let n=Buffer.alloc(150),u;try{u=Ut.openSync(i,"r"),Ut.readSync(u,n,0,150,0),Ut.closeSync(u)}catch{}return Mo(n.toString())}Xr.exports=Go});var Zr=w((ff,Jr)=>{"use strict";var Ho=require("path"),Yr=Ur(),Qr=Mr(),Wo=Kr(),zo=process.platform==="win32",Xo=/\.(?:com|exe)$/i,Ko=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Yo(i){i.file=Yr(i);let r=i.file&&Wo(i.file);return r?(i.args.unshift(i.file),i.command=r,Yr(i)):i.file}function Qo(i){if(!zo)return i;let r=Yo(i),n=!Xo.test(r);if(i.options.forceShell||n){let u=Ko.test(r);i.command=Ho.normalize(i.command),i.command=Qr.command(i.command),i.args=i.args.map(l=>Qr.argument(l,u));let h=[i.command].concat(i.args).join(" ");i.args=["/d","/s","/c",`"${h}"`],i.command=process.env.comspec||"cmd.exe",i.options.windowsVerbatimArguments=!0}return i}function Jo(i,r,n){r&&!Array.isArray(r)&&(n=r,r=null),r=r?r.slice(0):[],n=Object.assign({},n);let u={command:i,args:r,options:n,file:void 0,original:{command:i,args:r}};return n.shell?u:Qo(u)}Jr.exports=Jo});var is=w((pf,ts)=>{"use strict";var Mt=process.platform==="win32";function Gt(i,r){return Object.assign(new Error(`${r} ${i.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${r} ${i.command}`,path:i.command,spawnargs:i.args})}function Zo(i,r){if(!Mt)return;let n=i.emit;i.emit=function(u,h){if(u==="exit"){let l=es(h,r);if(l)return n.call(i,"error",l)}return n.apply(i,arguments)}}function es(i,r){return Mt&&i===1&&!r.file?Gt(r.original,"spawn"):null}function eu(i,r){return Mt&&i===1&&!r.file?Gt(r.original,"spawnSync"):null}ts.exports={hookChildProcess:Zo,verifyENOENT:es,verifyENOENTSync:eu,notFoundError:Gt}});var ns=w((df,Re)=>{"use strict";var rs=require("child_process"),Ht=Zr(),Wt=is();function ss(i,r,n){let u=Ht(i,r,n),h=rs.spawn(u.command,u.args,u.options);return Wt.hookChildProcess(h,u),h}function tu(i,r,n){let u=Ht(i,r,n),h=rs.spawnSync(u.command,u.args,u.options);return h.error=h.error||Wt.verifyENOENTSync(h.status,u),h}Re.exports=ss;Re.exports.spawn=ss;Re.exports.sync=tu;Re.exports._parse=Ht;Re.exports._enoent=Wt});var Pe=w((mf,as)=>{"use strict";var iu="2.0.0",ru=Number.MAX_SAFE_INTEGER||9007199254740991,su=16,nu=250,au=["major","premajor","minor","preminor","patch","prepatch","prerelease"];as.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:su,MAX_SAFE_BUILD_LENGTH:nu,MAX_SAFE_INTEGER:ru,RELEASE_TYPES:au,SEMVER_SPEC_VERSION:iu,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ue=w((xf,os)=>{"use strict";var ou=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{};os.exports=ou});var Te=w((oe,us)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:zt,MAX_SAFE_BUILD_LENGTH:uu,MAX_LENGTH:cu}=Pe(),hu=Ue();oe=us.exports={};var lu=oe.re=[],fu=oe.safeRe=[],C=oe.src=[],pu=oe.safeSrc=[],_=oe.t={},du=0,Xt="[a-zA-Z0-9-]",mu=[["\\s",1],["\\d",cu],[Xt,uu]],xu=i=>{for(let[r,n]of mu)i=i.split(`${r}*`).join(`${r}{0,${n}}`).split(`${r}+`).join(`${r}{1,${n}}`);return i},T=(i,r,n)=>{let u=xu(r),h=du++;hu(i,h,r),_[i]=h,C[h]=r,pu[h]=u,lu[h]=new RegExp(r,n?"g":void 0),fu[h]=new RegExp(u,n?"g":void 0)};T("NUMERICIDENTIFIER","0|[1-9]\\d*");T("NUMERICIDENTIFIERLOOSE","\\d+");T("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Xt}*`);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",`${Xt}+`);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,${zt}})(?:\\.(\\d{1,${zt}}))?(?:\\.(\\d{1,${zt}}))?`);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);oe.tildeTrimReplace="$1~";T("TILDE",`^${C[_.LONETILDE]}${C[_.XRANGEPLAIN]}$`);T("TILDELOOSE",`^${C[_.LONETILDE]}${C[_.XRANGEPLAINLOOSE]}$`);T("LONECARET","(?:\\^)");T("CARETTRIM",`(\\s*)${C[_.LONECARET]}\\s+`,!0);oe.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);oe.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 ut=w((gf,cs)=>{"use strict";var gu=Object.freeze({loose:!0}),vu=Object.freeze({}),yu=i=>i?typeof i!="object"?gu:i:vu;cs.exports=yu});var Kt=w((vf,fs)=>{"use strict";var hs=/^[0-9]+$/,ls=(i,r)=>{if(typeof i=="number"&&typeof r=="number")return i===r?0:i<r?-1:1;let n=hs.test(i),u=hs.test(r);return n&&u&&(i=+i,r=+r),i===r?0:n&&!u?-1:u&&!n?1:i<r?-1:1},Eu=(i,r)=>ls(r,i);fs.exports={compareIdentifiers:ls,rcompareIdentifiers:Eu}});var G=w((yf,ds)=>{"use strict";var ct=Ue(),{MAX_LENGTH:ps,MAX_SAFE_INTEGER:ht}=Pe(),{safeRe:lt,t:ft}=Te(),bu=ut(),{compareIdentifiers:Yt}=Kt(),Su=(i,r)=>{let n=r.split(".");if(n.length>i.length)return!1;for(let u=0;u<n.length;u++)if(Yt(i[u],n[u])!==0)return!1;return!0},Qt=class i{constructor(r,n){if(n=bu(n),r instanceof i){if(r.loose===!!n.loose&&r.includePrerelease===!!n.includePrerelease)return r;r=r.version}else if(typeof r!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof r}".`);if(r.length>ps)throw new TypeError(`version is longer than ${ps} characters`);ct("SemVer",r,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let u=r.trim().match(n.loose?lt[ft.LOOSE]:lt[ft.FULL]);if(!u)throw new TypeError(`Invalid Version: ${r}`);if(this.raw=r,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>ht||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ht||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ht||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map(h=>{if(/^[0-9]+$/.test(h)){let l=+h;if(l>=0&&l<ht)return l}return h}):this.prerelease=[],this.build=u[5]?u[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(r){if(ct("SemVer.compare",this.version,this.options,r),!(r instanceof i)){if(typeof r=="string"&&r===this.version)return 0;r=new i(r,this.options)}return r.version===this.version?0:this.compareMain(r)||this.comparePre(r)}compareMain(r){return r instanceof i||(r=new i(r,this.options)),this.major<r.major?-1:this.major>r.major?1:this.minor<r.minor?-1:this.minor>r.minor?1:this.patch<r.patch?-1:this.patch>r.patch?1:0}comparePre(r){if(r instanceof i||(r=new i(r,this.options)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;let n=0;do{let u=this.prerelease[n],h=r.prerelease[n];if(ct("prerelease compare",n,u,h),u===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(u===void 0)return-1;if(u===h)continue;return Yt(u,h)}while(++n)}compareBuild(r){r instanceof i||(r=new i(r,this.options));let n=0;do{let u=this.build[n],h=r.build[n];if(ct("build compare",n,u,h),u===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(u===void 0)return-1;if(u===h)continue;return Yt(u,h)}while(++n)}inc(r,n,u){if(r.startsWith("pre")){if(!n&&u===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let h=`-${n}`.match(this.options.loose?lt[ft.PRERELEASELOOSE]:lt[ft.PRERELEASE]);if(!h||h[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,u);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,u);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,u),this.inc("pre",n,u);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,u),this.inc("pre",n,u);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 h=Number(u)?1:0;if(this.prerelease.length===0)this.prerelease=[h];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(n===this.prerelease.join(".")&&u===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(h)}}if(n){let l=[n,h];if(u===!1&&(l=[n]),Su(this.prerelease,n)){let d=this.prerelease[n.split(".").length];isNaN(d)&&(this.prerelease=l)}else this.prerelease=l}break}default:throw new Error(`invalid increment argument: ${r}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};ds.exports=Qt});var xe=w((Ef,xs)=>{"use strict";var ms=G(),wu=(i,r,n=!1)=>{if(i instanceof ms)return i;try{return new ms(i,r)}catch(u){if(!n)return null;throw u}};xs.exports=wu});var vs=w((bf,gs)=>{"use strict";var Cu=xe(),_u=(i,r)=>{let n=Cu(i,r);return n?n.version:null};gs.exports=_u});var Es=w((Sf,ys)=>{"use strict";var Iu=xe(),ku=(i,r)=>{let n=Iu(i.trim().replace(/^[=v]+/,""),r);return n?n.version:null};ys.exports=ku});var ws=w((wf,Ss)=>{"use strict";var bs=G(),Au=(i,r,n,u,h)=>{typeof n=="string"&&(h=u,u=n,n=void 0);try{return new bs(i instanceof bs?i.version:i,n).inc(r,u,h).version}catch{return null}};Ss.exports=Au});var Is=w((Cf,_s)=>{"use strict";var Cs=xe(),Nu=(i,r)=>{let n=Cs(i,null,!0),u=Cs(r,null,!0),h=n.compare(u);if(h===0)return null;let l=h>0,d=l?n:u,m=l?u:n,y=!!d.prerelease.length;if(!!m.prerelease.length&&!y){if(!m.patch&&!m.minor)return"major";if(m.compareMain(d)===0)return m.minor&&!m.patch?"minor":"patch"}let A=y?"pre":"";return n.major!==u.major?A+"major":n.minor!==u.minor?A+"minor":n.patch!==u.patch?A+"patch":"prerelease"};_s.exports=Nu});var As=w((_f,ks)=>{"use strict";var Ru=G(),Pu=(i,r)=>new Ru(i,r).major;ks.exports=Pu});var Rs=w((If,Ns)=>{"use strict";var Tu=G(),Lu=(i,r)=>new Tu(i,r).minor;Ns.exports=Lu});var Ts=w((kf,Ps)=>{"use strict";var Ou=G(),Vu=(i,r)=>new Ou(i,r).patch;Ps.exports=Vu});var Os=w((Af,Ls)=>{"use strict";var Fu=xe(),$u=(i,r)=>{let n=Fu(i,r);return n&&n.prerelease.length?n.prerelease:null};Ls.exports=$u});var ie=w((Nf,Fs)=>{"use strict";var Vs=G(),Du=(i,r,n)=>new Vs(i,n).compare(new Vs(r,n));Fs.exports=Du});var Ds=w((Rf,$s)=>{"use strict";var qu=ie(),Bu=(i,r,n)=>qu(r,i,n);$s.exports=Bu});var Bs=w((Pf,qs)=>{"use strict";var ju=ie(),Uu=(i,r)=>ju(i,r,!0);qs.exports=Uu});var pt=w((Tf,Us)=>{"use strict";var js=G(),Mu=(i,r,n)=>{let u=new js(i,n),h=new js(r,n);return u.compare(h)||u.compareBuild(h)};Us.exports=Mu});var Gs=w((Lf,Ms)=>{"use strict";var Gu=pt(),Hu=(i,r)=>i.sort((n,u)=>Gu(n,u,r));Ms.exports=Hu});var Ws=w((Of,Hs)=>{"use strict";var Wu=pt(),zu=(i,r)=>i.sort((n,u)=>Wu(u,n,r));Hs.exports=zu});var Me=w((Vf,zs)=>{"use strict";var Xu=ie(),Ku=(i,r,n)=>Xu(i,r,n)>0;zs.exports=Ku});var dt=w((Ff,Xs)=>{"use strict";var Yu=ie(),Qu=(i,r,n)=>Yu(i,r,n)<0;Xs.exports=Qu});var Jt=w(($f,Ks)=>{"use strict";var Ju=ie(),Zu=(i,r,n)=>Ju(i,r,n)===0;Ks.exports=Zu});var Zt=w((Df,Ys)=>{"use strict";var ec=ie(),tc=(i,r,n)=>ec(i,r,n)!==0;Ys.exports=tc});var mt=w((qf,Qs)=>{"use strict";var ic=ie(),rc=(i,r,n)=>ic(i,r,n)>=0;Qs.exports=rc});var xt=w((Bf,Js)=>{"use strict";var sc=ie(),nc=(i,r,n)=>sc(i,r,n)<=0;Js.exports=nc});var ei=w((jf,Zs)=>{"use strict";var ac=Jt(),oc=Zt(),uc=Me(),cc=mt(),hc=dt(),lc=xt(),fc=(i,r,n,u)=>{switch(r){case"===":return typeof i=="object"&&(i=i.version),typeof n=="object"&&(n=n.version),i===n;case"!==":return typeof i=="object"&&(i=i.version),typeof n=="object"&&(n=n.version),i!==n;case"":case"=":case"==":return ac(i,n,u);case"!=":return oc(i,n,u);case">":return uc(i,n,u);case">=":return cc(i,n,u);case"<":return hc(i,n,u);case"<=":return lc(i,n,u);default:throw new TypeError(`Invalid operator: ${r}`)}};Zs.exports=fc});var tn=w((Uf,en)=>{"use strict";var pc=G(),dc=xe(),{safeRe:gt,t:vt}=Te(),mc=(i,r)=>{if(i instanceof pc)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;r=r||{};let n=null;if(!r.rtl)n=i.match(r.includePrerelease?gt[vt.COERCEFULL]:gt[vt.COERCE]);else{let y=r.includePrerelease?gt[vt.COERCERTLFULL]:gt[vt.COERCERTL],x;for(;(x=y.exec(i))&&(!n||n.index+n[0].length!==i.length);)(!n||x.index+x[0].length!==n.index+n[0].length)&&(n=x),y.lastIndex=x.index+x[1].length+x[2].length;y.lastIndex=-1}if(n===null)return null;let u=n[2],h=n[3]||"0",l=n[4]||"0",d=r.includePrerelease&&n[5]?`-${n[5]}`:"",m=r.includePrerelease&&n[6]?`+${n[6]}`:"";return dc(`${u}.${h}.${l}${d}${m}`,r)};en.exports=mc});var sn=w((Mf,rn)=>{"use strict";var xc=xe(),gc=Pe(),vc=G(),yc=(i,r,n)=>{if(!gc.RELEASE_TYPES.includes(r))return null;let u=Ec(i,n);return u&&bc(u,r)},Ec=(i,r)=>{let n=i instanceof vc?i.version:i;return xc(n,r)},bc=(i,r)=>{if(Sc(r))return i.version;switch(i.prerelease=[],r){case"major":i.minor=0,i.patch=0;break;case"minor":i.patch=0;break}return i.format()},Sc=i=>i.startsWith("pre");rn.exports=yc});var an=w((Gf,nn)=>{"use strict";var ti=class{constructor(){this.max=1e3,this.map=new Map}get(r){let n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){let h=this.map.keys().next().value;this.delete(h)}this.map.set(r,n)}return this}};nn.exports=ti});var re=w((Hf,hn)=>{"use strict";var wc=/\s+/g,ii=class i{constructor(r,n){if(n=_c(n),r instanceof i)return r.loose===!!n.loose&&r.includePrerelease===!!n.includePrerelease?r:new i(r.raw,n);if(r instanceof ri)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=r.trim().replace(wc," "),this.set=this.raw.split("||").map(u=>this.parseRange(u.trim())).filter(u=>u.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let u=this.set[0];if(this.set=this.set.filter(h=>!un(h[0])),this.set.length===0)this.set=[u];else if(this.set.length>1){for(let h of this.set)if(h.length===1&&Oc(h[0])){this.set=[h];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let r=0;r<this.set.length;r++){r>0&&(this.formatted+="||");let n=this.set[r];for(let u=0;u<n.length;u++)u>0&&(this.formatted+=" "),this.formatted+=n[u].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(r){r=r.replace(Lc,"");let u=((this.options.includePrerelease&&Pc)|(this.options.loose&&Tc))+":"+r,h=on.get(u);if(h)return h;let l=this.options.loose,d=l?K[H.HYPHENRANGELOOSE]:K[H.HYPHENRANGE];r=r.replace(d,Hc(this.options.includePrerelease)),D("hyphen replace",r),r=r.replace(K[H.COMPARATORTRIM],Ac),D("comparator trim",r),r=r.replace(K[H.TILDETRIM],Nc),D("tilde trim",r),r=r.replace(K[H.CARETTRIM],Rc),D("caret trim",r);let m=r.split(" ").map(v=>Vc(v,this.options)).join(" ").split(/\s+/).map(v=>Gc(v,this.options));l&&(m=m.filter(v=>(D("loose invalid filter",v,this.options),!!v.match(K[H.COMPARATORLOOSE])))),D("range list",m);let y=new Map,x=m.map(v=>new ri(v,this.options));for(let v of x){if(un(v))return[v];y.set(v.value,v)}y.size>1&&y.has("")&&y.delete("");let A=[...y.values()];return on.set(u,A),A}intersects(r,n){if(!(r instanceof i))throw new TypeError("a Range is required");return this.set.some(u=>cn(u,n)&&r.set.some(h=>cn(h,n)&&u.every(l=>h.every(d=>l.intersects(d,n)))))}test(r){if(!r)return!1;if(typeof r=="string")try{r=new Ic(r,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(Wc(this.set[n],r,this.options))return!0;return!1}};hn.exports=ii;var Cc=an(),on=new Cc,_c=ut(),ri=Ge(),D=Ue(),Ic=G(),{safeRe:K,src:kc,t:H,comparatorTrimReplace:Ac,tildeTrimReplace:Nc,caretTrimReplace:Rc}=Te(),{FLAG_INCLUDE_PRERELEASE:Pc,FLAG_LOOSE:Tc}=Pe(),Lc=new RegExp(kc[H.BUILD],"g"),un=i=>i.value==="<0.0.0-0",Oc=i=>i.value==="",cn=(i,r)=>{let n=!0,u=i.slice(),h=u.pop();for(;n&&u.length;)n=u.every(l=>h.intersects(l,r)),h=u.pop();return n},Vc=(i,r)=>(i=i.replace(K[H.BUILD],""),D("comp",i,r),i=qc(i,r),D("caret",i),i=$c(i,r),D("tildes",i),i=jc(i,r),D("xrange",i),i=Mc(i,r),D("stars",i),i),U=i=>!i||i.toLowerCase()==="x"||i==="*",Fc=(i,r,n)=>U(i)&&!U(r)||U(r)&&n&&!U(n),$c=(i,r)=>i.trim().split(/\s+/).map(n=>Dc(n,r)).join(" "),Dc=(i,r)=>{let n=r.loose?K[H.TILDELOOSE]:K[H.TILDE],u=r.includePrerelease?"-0":"";return i.replace(n,(h,l,d,m,y)=>{D("tilde",i,h,l,d,m,y);let x;return U(l)?x="":U(d)?x=`>=${l}.0.0${u} <${+l+1}.0.0-0`:U(m)?x=`>=${l}.${d}.0${u} <${l}.${+d+1}.0-0`:y?(D("replaceTilde pr",y),x=`>=${l}.${d}.${m}-${y} <${l}.${+d+1}.0-0`):x=`>=${l}.${d}.${m} <${l}.${+d+1}.0-0`,D("tilde return",x),x})},qc=(i,r)=>i.trim().split(/\s+/).map(n=>Bc(n,r)).join(" "),Bc=(i,r)=>{D("caret",i,r);let n=r.loose?K[H.CARETLOOSE]:K[H.CARET],u=r.includePrerelease?"-0":"";return i.replace(n,(h,l,d,m,y)=>{D("caret",i,h,l,d,m,y);let x;return U(l)?x="":U(d)?x=`>=${l}.0.0${u} <${+l+1}.0.0-0`:U(m)?l==="0"?x=`>=${l}.${d}.0${u} <${l}.${+d+1}.0-0`:x=`>=${l}.${d}.0${u} <${+l+1}.0.0-0`:y?(D("replaceCaret pr",y),l==="0"?d==="0"?x=`>=${l}.${d}.${m}-${y} <${l}.${d}.${+m+1}-0`:x=`>=${l}.${d}.${m}-${y} <${l}.${+d+1}.0-0`:x=`>=${l}.${d}.${m}-${y} <${+l+1}.0.0-0`):(D("no pr"),l==="0"?d==="0"?x=`>=${l}.${d}.${m} <${l}.${d}.${+m+1}-0`:x=`>=${l}.${d}.${m} <${l}.${+d+1}.0-0`:x=`>=${l}.${d}.${m} <${+l+1}.0.0-0`),D("caret return",x),x})},jc=(i,r)=>(D("replaceXRanges",i,r),i.split(/\s+/).map(n=>Uc(n,r)).join(" ")),Uc=(i,r)=>{i=i.trim();let n=r.loose?K[H.XRANGELOOSE]:K[H.XRANGE];return i.replace(n,(u,h,l,d,m,y)=>{if(D("xRange",i,u,h,l,d,m,y),Fc(l,d,m))return i;let x=U(l),A=x||U(d),v=A||U(m),S=v;return h==="="&&S&&(h=""),y=r.includePrerelease?"-0":"",x?h===">"||h==="<"?u="<0.0.0-0":u="*":h&&S?(A&&(d=0),m=0,h===">"?(h=">=",A?(l=+l+1,d=0,m=0):(d=+d+1,m=0)):h==="<="&&(h="<",A?l=+l+1:d=+d+1),h==="<"&&(y="-0"),u=`${h+l}.${d}.${m}${y}`):A?u=`>=${l}.0.0${y} <${+l+1}.0.0-0`:v&&(u=`>=${l}.${d}.0${y} <${l}.${+d+1}.0-0`),D("xRange return",u),u})},Mc=(i,r)=>(D("replaceStars",i,r),i.trim().replace(K[H.STAR],"")),Gc=(i,r)=>(D("replaceGTE0",i,r),i.trim().replace(K[r.includePrerelease?H.GTE0PRE:H.GTE0],"")),Hc=i=>(r,n,u,h,l,d,m,y,x,A,v,S)=>(U(u)?n="":U(h)?n=`>=${u}.0.0${i?"-0":""}`:U(l)?n=`>=${u}.${h}.0${i?"-0":""}`:d?n=`>=${n}`:n=`>=${n}${i?"-0":""}`,U(x)?y="":U(A)?y=`<${+x+1}.0.0-0`:U(v)?y=`<${x}.${+A+1}.0-0`:S?y=`<=${x}.${A}.${v}-${S}`:i?y=`<${x}.${A}.${+v+1}-0`:y=`<=${y}`,`${n} ${y}`.trim()),Wc=(i,r,n)=>{for(let u=0;u<i.length;u++)if(!i[u].test(r))return!1;if(r.prerelease.length&&!n.includePrerelease){for(let u=0;u<i.length;u++)if(D(i[u].semver),i[u].semver!==ri.ANY&&i[u].semver.prerelease.length>0){let h=i[u].semver;if(h.major===r.major&&h.minor===r.minor&&h.patch===r.patch)return!0}return!1}return!0}});var Ge=w((Wf,xn)=>{"use strict";var He=Symbol("SemVer ANY"),ai=class i{static get ANY(){return He}constructor(r,n){if(n=ln(n),r instanceof i){if(r.loose===!!n.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),ni("comparator",r,n),this.options=n,this.loose=!!n.loose,this.parse(r),this.semver===He?this.value="":this.value=this.operator+this.semver.version,ni("comp",this)}parse(r){let n=this.options.loose?fn[pn.COMPARATORLOOSE]:fn[pn.COMPARATOR],u=r.match(n);if(!u)throw new TypeError(`Invalid comparator: ${r}`);this.operator=u[1]!==void 0?u[1]:"",this.operator==="="&&(this.operator=""),u[2]?this.semver=new dn(u[2],this.options.loose):this.semver=He}toString(){return this.value}test(r){if(ni("Comparator.test",r,this.options.loose),this.semver===He||r===He)return!0;if(typeof r=="string")try{r=new dn(r,this.options)}catch{return!1}return si(r,this.operator,this.semver,this.options)}intersects(r,n){if(!(r instanceof i))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new mn(r.value,n).test(this.value):r.operator===""?r.value===""?!0:new mn(this.value,n).test(r.semver):(n=ln(n),n.includePrerelease&&(this.value==="<0.0.0-0"||r.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||r.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&r.operator.startsWith(">")||this.operator.startsWith("<")&&r.operator.startsWith("<")||this.semver.version===r.semver.version&&this.operator.includes("=")&&r.operator.includes("=")||si(this.semver,"<",r.semver,n)&&this.operator.startsWith(">")&&r.operator.startsWith("<")||si(this.semver,">",r.semver,n)&&this.operator.startsWith("<")&&r.operator.startsWith(">")))}};xn.exports=ai;var ln=ut(),{safeRe:fn,t:pn}=Te(),si=ei(),ni=Ue(),dn=G(),mn=re()});var We=w((zf,gn)=>{"use strict";var zc=re(),Xc=(i,r,n)=>{try{r=new zc(r,n)}catch{return!1}return r.test(i)};gn.exports=Xc});var yn=w((Xf,vn)=>{"use strict";var Kc=re(),Yc=(i,r)=>new Kc(i,r).set.map(n=>n.map(u=>u.value).join(" ").trim().split(" "));vn.exports=Yc});var bn=w((Kf,En)=>{"use strict";var Qc=G(),Jc=re(),Zc=(i,r,n)=>{let u=null,h=null,l=null;try{l=new Jc(r,n)}catch{return null}return i.forEach(d=>{l.test(d)&&(!u||h.compare(d)===-1)&&(u=d,h=new Qc(u,n))}),u};En.exports=Zc});var wn=w((Yf,Sn)=>{"use strict";var eh=G(),th=re(),ih=(i,r,n)=>{let u=null,h=null,l=null;try{l=new th(r,n)}catch{return null}return i.forEach(d=>{l.test(d)&&(!u||h.compare(d)===1)&&(u=d,h=new eh(u,n))}),u};Sn.exports=ih});var In=w((Qf,_n)=>{"use strict";var oi=G(),rh=re(),Cn=Me(),sh=(i,r)=>{i=new rh(i,r);let n=new oi("0.0.0");if(i.test(n)||(n=new oi("0.0.0-0"),i.test(n)))return n;n=null;for(let u=0;u<i.set.length;++u){let h=i.set[u],l=null;h.forEach(d=>{let m=new oi(d.semver.version);switch(d.operator){case">":m.prerelease.length===0?m.patch++:m.prerelease.push(0),m.raw=m.format();case"":case">=":(!l||Cn(m,l))&&(l=m);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${d.operator}`)}}),l&&(!n||Cn(n,l))&&(n=l)}return n&&i.test(n)?n:null};_n.exports=sh});var An=w((Jf,kn)=>{"use strict";var nh=re(),ah=(i,r)=>{try{return new nh(i,r).range||"*"}catch{return null}};kn.exports=ah});var yt=w((Zf,Tn)=>{"use strict";var oh=G(),Pn=Ge(),{ANY:uh}=Pn,ch=re(),hh=We(),Nn=Me(),Rn=dt(),lh=xt(),fh=mt(),ph=(i,r,n,u)=>{i=new oh(i,u),r=new ch(r,u);let h,l,d,m,y;switch(n){case">":h=Nn,l=lh,d=Rn,m=">",y=">=";break;case"<":h=Rn,l=fh,d=Nn,m="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(hh(i,r,u))return!1;for(let x=0;x<r.set.length;++x){let A=r.set[x],v=null,S=null;if(A.forEach(E=>{E.semver===uh&&(E=new Pn(">=0.0.0")),v=v||E,S=S||E,h(E.semver,v.semver,u)?v=E:d(E.semver,S.semver,u)&&(S=E)}),v.operator===m||v.operator===y||(!S.operator||S.operator===m)&&l(i,S.semver))return!1;if(S.operator===y&&d(i,S.semver))return!1}return!0};Tn.exports=ph});var On=w((ep,Ln)=>{"use strict";var dh=yt(),mh=(i,r,n)=>dh(i,r,">",n);Ln.exports=mh});var Fn=w((tp,Vn)=>{"use strict";var xh=yt(),gh=(i,r,n)=>xh(i,r,"<",n);Vn.exports=gh});var qn=w((ip,Dn)=>{"use strict";var $n=re(),vh=(i,r,n)=>(i=new $n(i,n),r=new $n(r,n),i.intersects(r,n));Dn.exports=vh});var jn=w((rp,Bn)=>{"use strict";var yh=We(),Eh=ie();Bn.exports=(i,r,n)=>{let u=[],h=null,l=null,d=i.sort((A,v)=>Eh(A,v,n));for(let A of d)yh(A,r,n)?(l=A,h||(h=A)):(l&&u.push([h,l]),l=null,h=null);h&&u.push([h,null]);let m=[];for(let[A,v]of u)A===v?m.push(A):!v&&A===d[0]?m.push("*"):v?A===d[0]?m.push(`<=${v}`):m.push(`${A} - ${v}`):m.push(`>=${A}`);let y=m.join(" || "),x=typeof r.raw=="string"?r.raw:String(r);return y.length<x.length?y:r}});var zn=w((sp,Wn)=>{"use strict";var Un=re(),hi=Ge(),{ANY:ui}=hi,ci=We(),li=ie(),bh=(i,r,n={})=>{if(i===r)return!0;i=new Un(i,n),r=new Un(r,n);let u=!1;e:for(let h of i.set){for(let l of r.set){let d=wh(h,l,n);if(u=u||d!==null,d)continue e}if(u)return!1}return!0},Sh=[new hi(">=0.0.0-0")],Mn=[new hi(">=0.0.0")],wh=(i,r,n)=>{if(i===r)return!0;if(i.length===1&&i[0].semver===ui){if(r.length===1&&r[0].semver===ui)return!0;n.includePrerelease?i=Sh:i=Mn}if(r.length===1&&r[0].semver===ui){if(n.includePrerelease)return!0;r=Mn}let u=new Set,h,l;for(let E of i)E.operator===">"||E.operator===">="?h=Gn(h,E,n):E.operator==="<"||E.operator==="<="?l=Hn(l,E,n):u.add(E.semver);if(u.size>1)return null;let d;if(h&&l){if(d=li(h.semver,l.semver,n),d>0)return null;if(d===0&&(h.operator!==">="||l.operator!=="<="))return null}for(let E of u){if(h&&!ci(E,String(h),n)||l&&!ci(E,String(l),n))return null;for(let N of r)if(!ci(E,String(N),n))return!1;return!0}let m,y,x,A,v=l&&!n.includePrerelease&&l.semver.prerelease.length?l.semver:!1,S=h&&!n.includePrerelease&&h.semver.prerelease.length?h.semver:!1;v&&v.prerelease.length===1&&l.operator==="<"&&v.prerelease[0]===0&&(v=!1);for(let E of r){if(A=A||E.operator===">"||E.operator===">=",x=x||E.operator==="<"||E.operator==="<=",h){if(S&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===S.major&&E.semver.minor===S.minor&&E.semver.patch===S.patch&&(S=!1),E.operator===">"||E.operator===">="){if(m=Gn(h,E,n),m===E&&m!==h)return!1}else if(h.operator===">="&&!E.test(h.semver))return!1}if(l){if(v&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===v.major&&E.semver.minor===v.minor&&E.semver.patch===v.patch&&(v=!1),E.operator==="<"||E.operator==="<="){if(y=Hn(l,E,n),y===E&&y!==l)return!1}else if(l.operator==="<="&&!E.test(l.semver))return!1}if(!E.operator&&(l||h)&&d!==0)return!1}return!(h&&x&&!l&&d!==0||l&&A&&!h&&d!==0||S||v)},Gn=(i,r,n)=>{if(!i)return r;let u=li(i.semver,r.semver,n);return u>0?i:u<0||r.operator===">"&&i.operator===">="?r:i},Hn=(i,r,n)=>{if(!i)return r;let u=li(i.semver,r.semver,n);return u<0?i:u>0||r.operator==="<"&&i.operator==="<="?r:i};Wn.exports=bh});var Qn=w((np,Yn)=>{"use strict";var fi=Te(),Xn=Pe(),Ch=G(),Kn=Kt(),_h=xe(),Ih=vs(),kh=Es(),Ah=ws(),Nh=Is(),Rh=As(),Ph=Rs(),Th=Ts(),Lh=Os(),Oh=ie(),Vh=Ds(),Fh=Bs(),$h=pt(),Dh=Gs(),qh=Ws(),Bh=Me(),jh=dt(),Uh=Jt(),Mh=Zt(),Gh=mt(),Hh=xt(),Wh=ei(),zh=tn(),Xh=sn(),Kh=Ge(),Yh=re(),Qh=We(),Jh=yn(),Zh=bn(),el=wn(),tl=In(),il=An(),rl=yt(),sl=On(),nl=Fn(),al=qn(),ol=jn(),ul=zn();Yn.exports={parse:_h,valid:Ih,clean:kh,inc:Ah,diff:Nh,major:Rh,minor:Ph,patch:Th,prerelease:Lh,compare:Oh,rcompare:Vh,compareLoose:Fh,compareBuild:$h,sort:Dh,rsort:qh,gt:Bh,lt:jh,eq:Uh,neq:Mh,gte:Gh,lte:Hh,cmp:Wh,coerce:zh,truncate:Xh,Comparator:Kh,Range:Yh,satisfies:Qh,toComparators:Jh,maxSatisfying:Zh,minSatisfying:el,minVersion:tl,validRange:il,outside:rl,gtr:sl,ltr:nl,intersects:al,simplifyRange:ol,subset:ul,SemVer:Ch,re:fi.re,src:fi.src,tokens:fi.t,SEMVER_SPEC_VERSION:Xn.SEMVER_SPEC_VERSION,RELEASE_TYPES:Xn.RELEASE_TYPES,compareIdentifiers:Kn.compareIdentifiers,rcompareIdentifiers:Kn.rcompareIdentifiers}});var gi=w((ap,oa)=>{var ge=require("fs"),se=require("path"),Zn=ns(),ne=Qn(),{DEFAULT_API_URL:cl}=at(),ea=["dependencies","devDependencies","optionalDependencies","peerDependencies"];function pi(i){let r=typeof i=="string"&&i.match(/^((?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*)(?:@([^\r\n]+))?$/);if(!r)throw new Error(`Invalid npm dependency: ${String(i)}`);return{name:r[1],version:r[2]}}function mi(i){let r=new Map;for(let n of i){let{name:u,version:h}=pi(n),l=r.get(u);r.set(u,l&&h?ta(u,l,h):h||l)}return r}function ta(i,r,n){if(r===n)return r;let u=ne.validRange(r),h=ne.validRange(n);if(u&&h)try{if(ne.subset(h,u))return n;if(ne.subset(u,h))return r}catch{}throw new Error(`Conflicting registry versions for ${i}: ${r} and ${n}`)}function hl(i,r){let n=typeof i=="string"&&ne.validRange(i),u=ne.validRange(r);if(!n||!u)return!1;try{return ne.subset(n,u)}catch{return!1}}function bt(i,r){if(hl(i,r))return"satisfied";let n=typeof i=="string"&&ne.validRange(i),u=ne.validRange(r);if(!n||!u)return"incomparable";try{let h=ne.minVersion(n),l=ne.minVersion(u);return!h||!l?"incomparable":ne.lt(h,l)?"lower":"newer"}catch{return"incomparable"}}function Et(i,r){let n=ea.find(u=>Object.hasOwn(i[u]||{},r));return n?{section:n,existing:i[n][r]}:null}function ia(i,r){let n=mi(r);if(n.size===0)return;let u=se.join(i,"package.json"),h=JSON.parse(ge.readFileSync(u,"utf8"));for(let[l,d]of n){let m=Et(h,l),y=m?.section||"dependencies";h[y]||={};let x=m?.existing;h[y][l]=x===void 0?d||"latest":d&&bt(x,d)==="lower"?d:x}ge.writeFileSync(u,`${JSON.stringify(h,null,2)}
|
|
3
|
+
`)}function St(i){let r=[["pnpm-lock.yaml","pnpm"],["yarn.lock","yarn"],["bun.lock","bun"],["bun.lockb","bun"],["package-lock.json","npm"],["npm-shrinkwrap.json","npm"]];for(let n=se.resolve(i);;n=se.dirname(n)){let u=se.join(n,"package.json");if(ge.existsSync(u)){let h=JSON.parse(ge.readFileSync(u,"utf8")),l=String(h.packageManager||"").split("@")[0];if(["npm","pnpm","yarn","bun"].includes(l))return l}for(let[h,l]of r)if(ge.existsSync(se.join(n,h)))return l;if(se.dirname(n)===n)return"npm"}}var Jn={npm:"npx",pnpm:"pnpm exec",yarn:"yarn",bun:"bunx"};function di(i,r=process.cwd()){let n;try{n=St(r)}catch{n="npm"}return`${Jn[n]||Jn.npm} frontfriend ${i}`}function ll(i,r=process.cwd()){let n=null;try{if(n=i?new URL(i).origin:null,n==="https://app.v4.frontfriend.dev")return di("login --api-url https://app.frontfriend.dev",r)}catch{n=null}return di(n&&n!==new URL(cl).origin?`login --api-url ${n}`:"login",r)}function ra(i){return JSON.parse(ge.readFileSync(se.join(i,"package.json"),"utf8"))}function xi(i,r){let n=mi(r);if(n.size===0)return[];let u=ra(i),h=[];for(let[l,d]of n){let m=Et(u,l);m&&(!d||bt(m.existing,d)!=="lower")||h.push(d?`${l}@${d}`:l)}return h}function fl(i,r){let n=r.filter(v=>v.required),u=mi(n.flatMap(v=>v.dependencies)),h=(v,S)=>S.filter(E=>E.dependencies.some(N=>pi(N).name===v)).map(E=>E.component).filter(Boolean),l=r.filter(v=>!v.required);if(u.size===0&&l.length===0)return{missing:[],kept:[],repair:[]};let d=ra(i),m=[],y=[];for(let[v,S]of u){let E=Et(d,v);if(!E){m.push(S?`${v}@${S}`:v);continue}if(!S)continue;let N=bt(E.existing,S);N==="lower"?m.push(`${v}@${S}`):N!=="satisfied"&&y.push({name:v,current:E.existing,declared:S,components:h(v,n)})}let x=new Map;for(let v of l.flatMap(S=>S.dependencies)){let{name:S,version:E}=pi(v);if(u.has(S)||Et(d,S))continue;let N=x.get(S),j=E||N?.version;if(N?.version&&E&&N.version!==E)try{j=ta(S,N.version,E)}catch{j=N.version}x.set(S,{version:j})}let A=[...x].map(([v,{version:S}])=>({request:S?`${v}@${S}`:v,components:h(v,l)}));return{missing:m,kept:y,repair:A}}function sa(i,r){return[i==="npm"?"install":"add",...r]}function pl(i){return/^[\w@/.:^~=+-]+$/.test(i)?i:`'${i.replace(/'/g,"'\\''")}'`}function na(i,r){let n=St(i);return[n,...sa(n,r)].map(pl).join(" ")}function aa(i,r,{stdio:n="inherit"}={}){let u=xi(i,r);if(u.length===0)return;let h=St(i),l=Zn.sync(h,sa(h,u),{cwd:i,stdio:n});if(l.error||l.status!==0)throw ia(i,r),l.error||new Error(`${h} dependency installation failed with status ${l.status}. Dependencies were saved; run ${h} install.`)}function dl(i,r,{install:n=!0,stdio:u="inherit",log:h=console.log}={}){let l=xi(i,r);if(l.length===0)return{missing:l,command:null,installed:!1};let d=na(i,l);if(!n)return h(`\u{1F4E6} Component dependencies missing from package.json. Install them with:
|
|
4
|
+
${d}`),{missing:l,command:d,installed:!1};h(`\u{1F4E6} Installing component dependencies: ${d}`);try{return aa(i,l,{stdio:u}),{missing:l,command:d,installed:!0}}catch(m){return h(`\u26A0\uFE0F Component dependencies were not installed: ${m.message}
|
|
5
5
|
Install them with:
|
|
6
|
-
${d}`),{missing:l,command:d,installed:!1,error:m.message}}}function
|
|
7
|
-
${y}`),{installed:!1,command:y};h(`\u{1F4E6} Installing ${r}: ${y}`);let x=
|
|
6
|
+
${d}`),{missing:l,command:d,installed:!1,error:m.message}}}function ml(i,r){for(let n=se.resolve(i);;n=se.dirname(n)){if(ge.existsSync(se.join(n,"node_modules",r,"package.json")))return!0;if(se.dirname(n)===n)return!1}}function xl(i,r,{install:n=!0,stdio:u="inherit",log:h=console.log}={}){let l=JSON.parse(ge.readFileSync(se.join(i,"package.json"),"utf8"));if(!ea.some(v=>Object.hasOwn(l[v]||{},r))||ml(i,r))return{installed:!1,command:null};let m=St(i),y=`${m} install`;if(!n)return h(`\u{1F4E6} ${r} is in package.json but not installed. Install it with:
|
|
7
|
+
${y}`),{installed:!1,command:y};h(`\u{1F4E6} Installing ${r}: ${y}`);let x=Zn.sync(m,["install"],{cwd:i,stdio:u});if(!x.error&&x.status===0)return{installed:!0,command:y};let A=x.error?x.error.message:`${m} install failed with status ${x.status}`;return h(`\u26A0\uFE0F ${r} was not installed: ${A}
|
|
8
8
|
Install it with:
|
|
9
|
-
${y}`),{installed:!1,command:y,error:A}}ra.exports={cliCommand:Jn,loginCommand:nl,installDeclaredPackage:hl,saveNpmDependencies:Qn,installNpmDependencies:ia,installMissingNpmDependencies:ul,missingNpmDependencies:mi,npmInstallCommand:ta,planNpmDependencies:al,requirementStatus:bt}});var vi=w((ep,la)=>{var{fileExists:ll,readJsonFileSafe:fl,removeFile:pl,writePrivateJsonFileAtomic:dl,withPrivateFileLock:ml}=nt(),sa=require("path"),xl=require("os"),gl=require("https"),vl=require("http"),{URL:pe}=require("url"),{DEFAULT_API_URL:Se}=at(),{cliCommand:na,loginCommand:yl}=xi(),El=sa.join(xl.homedir(),".frontfriend"),Oe=sa.join(El,"credentials");function bl(){return Oe}function wt(){try{return fl(Oe)}catch{return null}}function aa(i){try{let r=JSON.parse(Buffer.from(String(i).split(".")[1],"base64url").toString("utf8"));return typeof r.email=="string"?r.email:null}catch{return null}}function Sl(){let i=wt();if(!i||!i.accessToken)return null;let r=Number(i.refreshExpiresAt)||0;return{email:aa(i.accessToken),apiUrl:i.ffApiUrl||null,expired:r>0&&r<Date.now()}}function oa(i){dl(Oe,i)}function wl(){return ll(Oe)?(pl(Oe),!0):!1}function gi(i,r=60*1e3){return!i?.accessToken||!i.expiresAt||Date.now()+r>=i.expiresAt}function Le(i,{apiUrl:r,login:n,next:u}={}){let h=u||`Run \`${n||yl(r)}\` to sign in, then run the command again.`,l=new Error(`${i}. ${h}`);return l.code="FF_AUTH_REFRESH_FAILED",l}function ua(i,r,n){return new Promise((u,h)=>{let l=new pe(i);if(l.protocol!=="https:"&&!(l.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(l.hostname))){h(new Error("Frontfriend API URLs require HTTPS except on localhost"));return}let d=l.protocol==="https:"?gl:vl,m=JSON.stringify(r||{}),y=d.request({hostname:l.hostname,port:l.port,path:`${l.pathname}${l.search}`,method:"POST",headers:{"content-type":"application/json","content-length":Buffer.byteLength(m),...n?{authorization:`Bearer ${n}`}:{}}},x=>{let A="";x.on("data",v=>{A+=v}),x.on("end",()=>{if(x.statusCode>=300&&x.statusCode<400){let S=x.headers.location?` to ${x.headers.location}`:"",E=new Error(`HTTP ${x.statusCode}: redirected${S}`);E.statusCode=x.statusCode,E.body=A,h(E);return}let v=null;try{v=A?JSON.parse(A):null}catch{let E=x.headers["content-type"]||"unknown content-type",N=new Error(`Expected JSON from FrontFriend API at ${i}, but received ${E} (HTTP ${x.statusCode}). Check FF_API_URL or pass --api-url with the FrontFriend app URL.`);if(N.statusCode=x.statusCode,N.body=A,x.statusCode>=400){h(N);return}h(N);return}if(x.statusCode>=400){let S=new Error(v?.error_description||v?.error||`HTTP ${x.statusCode}`);S.statusCode=x.statusCode,S.body=v,h(S);return}u(v)})});y.setTimeout(15e3,()=>y.destroy(Object.assign(new Error("Frontfriend API request timed out"),{code:"ETIMEDOUT"}))),y.on("error",h),y.write(m),y.end()})}function ca(i,r){let n=new pe(i?.ffApiUrl||Se).origin,u=new pe(r).origin;return Le(`You are signed in to ${n}, but this command uses ${u}`,{login:na(`login --api-url ${u}`)})}async function Cl(i){return ml(Oe,i,()=>Le("Another Frontfriend command is renewing your sign-in",{next:"Wait for it to finish, then run the command again."}))}async function ha(i,r=Se){return Cl(async()=>{let n=wt();if(n&&new pe(n.ffApiUrl||Se).origin===new pe(r).origin){if(!gi(n))return n;i=n}return _l(i,r)})}async function _l(i,r=Se){if(new pe(r).origin!==new pe(i.ffApiUrl||Se).origin)throw ca(i,r);if(!i?.refreshToken||!i?.deviceId)throw Le("Your Frontfriend sign-in has expired",{apiUrl:r});let n;try{n=await ua(`${r}/api/plugin/token`,{grant_type:"refresh_token",refresh_token:i.refreshToken,device_id:i.deviceId})}catch(h){throw Object.assign(Le(h?.message?`Could not renew your Frontfriend sign-in (${h.message})`:"Could not renew your Frontfriend sign-in",{apiUrl:r}),{cause:h})}if(!n?.access_token||!n?.refresh_token)throw Le("Could not renew your Frontfriend sign-in",{apiUrl:r});let u={accessToken:n.access_token,refreshToken:n.refresh_token,deviceId:n.device_id||i.deviceId,expiresAt:Date.now()+(n.expires_in||900)*1e3,refreshExpiresAt:Date.now()+(n.refresh_expires_in||604800)*1e3,ffApiUrl:r};return oa(u),u}var Il="ffm_";function kl(i){return typeof i=="string"&&i.startsWith(Il)}async function Al(i={}){if(i.envToken)return i.envToken;if(!i.skipCredentials){let r=wt();if(r?.accessToken||r?.refreshToken){let n=i.baseURL||r.ffApiUrl||Se;if(new pe(n).origin!==new pe(r.ffApiUrl||Se).origin)throw ca(r,n);return r.accessToken&&!gi(r)?r.accessToken:(await ha(r,n)).accessToken}}return i.configuredToken?(i.silent||console.warn(`\u26A0\uFE0F auth-token in frontfriend.config.js is deprecated. Run \`${na("login")}\` to keep your sign-in outside the repository.`),i.configuredToken):null}la.exports={isMachineCredential:kl,accountEmail:aa,signedInAccount:Sl,getCredentialsPath:bl,readCredentials:wt,writeCredentials:oa,deleteCredentials:wl,isExpired:gi,postJson:ua,refreshCredentials:ha,resolveAuthToken:Al,createAuthRefreshError:Le}});var da=w((tp,pa)=>{var ue=require("path"),{fileExists:yi}=nt();function fa(i,r=process.cwd()){let n=r;for(;n!==ue.parse(n).root;){let u=ue.join(n,i);if(yi(u))return u;n=ue.dirname(n)}return null}function Nl(i,r=process.cwd(),n=null){let u=[],h=r,l=10;for(let d=0;d<l;d++){u.push(ue.join(h,i)),d<3&&u.push(ue.join(h,"../".repeat(d+1)+i));let m=ue.dirname(h);if(m===h)break;h=m}u.push(ue.join(__dirname,"../../../",i));for(let d of u)if(yi(d)&&(!n||n(d)))return d;return null}function Rl(i,r=process.cwd()){let n=i.map(u=>ue.isAbsolute(u)?u:ue.join(r,u));for(let u of n)if(yi(u))return u;return null}function Pl(i=process.cwd()){let r=fa("frontfriend.config.js",i);return r?ue.dirname(r):i}pa.exports={findFileUpward:fa,findDirectoryUpward:Nl,findDirectoryWithPaths:Rl,resolveProjectRoot:Pl}});var xa=w((Ct,ma)=>{(function(i,r){typeof Ct=="object"&&typeof ma<"u"?r(Ct):typeof define=="function"&&define.amd?define(["exports"],r):(i=typeof globalThis<"u"?globalThis:i||self,r(i.acorn={}))})(Ct,function(i){"use strict";var r=[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],u="\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",h="\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",l={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"},d="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:d,"5module":d+" export import",6:d+" const class extends export import super"},y=/^in(stanceof)?$/,x=new RegExp("["+h+"]"),A=new RegExp("["+h+u+"]");function v(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 S(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:v(e,n)}function E(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&&A.test(String.fromCharCode(e)):t===!1?!1:v(e,n)||v(e,r)}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 j(e,t){return new N(e,{beforeExpr:!0,binop:t})}var Y={beforeExpr:!0},Q={startsExpr:!0},ze={};function V(e,t){return t===void 0&&(t={}),t.keyword=e,ze[e]=new N(e,t)}var o={num:new N("num",Q),regexp:new N("regexp",Q),string:new N("string",Q),name:new N("name",Q),privateId:new N("privateId",Q),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("`",Q),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:j("||",1),logicalAND:j("&&",2),bitwiseOR:j("|",3),bitwiseXOR:j("^",4),bitwiseAND:j("&",5),equality:j("==/!=/===/!==",6),relational:j("</>/<=/>=",7),bitShift:j("<</>>/>>>",8),plusMin:new N("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:j("%",10),star:j("*",10),slash:j("/",10),starstar:new N("**",{beforeExpr:!0}),coalesce:j("??",1),_break:V("break"),_case:V("case",Y),_catch:V("catch"),_continue:V("continue"),_debugger:V("debugger"),_default:V("default",Y),_do:V("do",{isLoop:!0,beforeExpr:!0}),_else:V("else",Y),_finally:V("finally"),_for:V("for",{isLoop:!0}),_function:V("function",Q),_if:V("if"),_return:V("return",Y),_switch:V("switch"),_throw:V("throw",Y),_try:V("try"),_var:V("var"),_const:V("const"),_while:V("while",{isLoop:!0}),_with:V("with"),_new:V("new",{beforeExpr:!0,startsExpr:!0}),_this:V("this",Q),_super:V("super",Q),_class:V("class",Q),_extends:V("extends",Y),_export:V("export"),_import:V("import",Q),_null:V("null",Q),_true:V("true",Q),_false:V("false",Q),_in:V("in",{beforeExpr:!0,binop:7}),_instanceof:V("instanceof",{beforeExpr:!0,binop:7}),_typeof:V("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:V("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:V("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},X=/\r\n?|\n|\u2028|\u2029/,Si=new RegExp(X.source,"g");function ve(e){return e===10||e===13||e===8232||e===8233}function wi(e,t,s){s===void 0&&(s=e.length);for(var a=t;a<s;a++){var c=e.charCodeAt(a);if(ve(c))return a<s-1&&c===13&&e.charCodeAt(a+1)===10?a+2:a+1}return-1}var It=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,M=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ci=Object.prototype,Ia=Ci.hasOwnProperty,ka=Ci.toString,we=Object.hasOwn||function(e,t){return Ia.call(e,t)},_i=Array.isArray||function(e){return ka.call(e)==="[object Array]"},Ii=Object.create(null);function de(e){return Ii[e]||(Ii[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function ce(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var Aa=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Ce=function(t,s){this.line=t,this.column=s};Ce.prototype.offset=function(t){return new Ce(this.line,this.column+t)};var Fe=function(t,s,a){this.start=s,this.end=a,t.sourceFile!==null&&(this.source=t.sourceFile)};function kt(e,t){for(var s=1,a=0;;){var c=wi(e,a,t);if(c<0)return new Ce(s,t-a);++s,a=c}}var Xe={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},ki=!1;function Na(e){var t={};for(var s in Xe)t[s]=e&&we(e,s)?e[s]:Xe[s];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!ki&&typeof console=="object"&&console.warn&&(ki=!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),
|
|
11
|
-
`,a-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(X).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=o.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||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"?Ee:ye),this.regexpState=null,this.privateNameStack=[]},J={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)})},J.inFunction.get=function(){return(this.currentVarScope().flags&Ee)>0},J.inGenerator.get=function(){return(this.currentVarScope().flags&Ai)>0},J.inAsync.get=function(){return(this.currentVarScope().flags&At)>0},J.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],s=t.flags;if(s&(be|$e))return!1;if(s&Ee)return(s&At)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},J.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&ye)},J.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&Ke)>0||this.options.allowSuperOutsideMethod},J.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Ri)>0},J.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},J.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],s=t.flags;if(s&(be|$e)||s&Ee&&!(s&Nt))return!0}return!1},J.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&Pi||!this.inModule&&t&ye)},J.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&be)>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,J);var W=q.prototype,Pa=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;W.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){M.lastIndex=e,e+=M.exec(this.input)[0].length;var t=Pa.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){M.lastIndex=e+t[0].length;var s=M.exec(this.input),a=s.index+s[0].length,c=this.input.charAt(a);return c===";"||c==="}"||X.test(s[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(c)||c==="!"&&this.input.charAt(a+1)==="=")}e+=t[0].length,M.lastIndex=e,e+=M.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===o.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===o.eof||this.type===o.braceR||X.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(o.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 Je=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!==o.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 f=c[a];this.raiseRecoverable(this.undefinedExports[f].start,"Export '"+f+"' 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 Tt={kind:"loop"},Ta={kind:"switch"};k.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;M.lastIndex=this.pos;var t=M.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(S(a)){var c=s;do s+=a<=65535?1:2;while(E(a=this.fullCharCodeAt(s)));if(a===92)return!0;var f=this.input.slice(c,s);if(!y.test(f))return!0}return!1},k.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;M.lastIndex=this.pos;var e=M.exec(this.input),t=this.pos+e[0].length,s;return!X.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(E(s=this.fullCharCodeAt(t+8))||s===92))},k.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;M.lastIndex=this.pos;var s=M.exec(this.input),a=this.pos+s[0].length;if(X.test(this.input.slice(this.pos,a)))return!1;if(e){var c=a+5,f;if(this.input.slice(a,c)!=="using"||c===this.input.length||E(f=this.fullCharCodeAt(c))||f===92)return!1;M.lastIndex=c;var p=M.exec(this.input);if(a=c+p[0].length,p&&X.test(this.input.slice(c,a)))return!1}var g=this.fullCharCodeAt(a);if(!S(g)&&g!==92)return!1;var b=a;do a+=g<=65535?1:2;while(E(g=this.fullCharCodeAt(a)));if(g===92)return!0;var R=this.input.slice(b,a);if(y.test(R))return!1;if(t&&!e&&R==="of"){M.lastIndex=a;var L=M.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(),f;switch(this.isLet(e)&&(a=o._var,f="let"),a){case o._break:case o._continue:return this.parseBreakContinueStatement(c,a.keyword);case o._debugger:return this.parseDebuggerStatement(c);case o._do:return this.parseDoStatement(c);case o._for:return this.parseForStatement(c);case o._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(c,!1,!e);case o._class:return e&&this.unexpected(),this.parseClass(c,!0);case o._if:return this.parseIfStatement(c);case o._return:return this.parseReturnStatement(c);case o._switch:return this.parseSwitchStatement(c);case o._throw:return this.parseThrowStatement(c);case o._try:return this.parseTryStatement(c);case o._const:case o._var:return f=f||this.value,e&&f!=="var"&&this.unexpected(),this.parseVarStatement(c,f);case o._while:return this.parseWhileStatement(c);case o._with:return this.parseWithStatement(c);case o.braceL:return this.parseBlock(!0,c);case o.semi:return this.parseEmptyStatement(c);case o._export:case o._import:if(this.options.ecmaVersion>10&&a===o._import){M.lastIndex=this.pos;var p=M.exec(this.input),g=this.pos+p[0].length,b=this.input.charCodeAt(g);if(b===40||b===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===o._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,$=this.parseExpression();return a===o.name&&$.type==="Identifier"&&this.eat(o.colon)?this.parseLabeledStatement(c,L,$,e):this.parseExpressionStatement(c,$)}},k.parseBreakContinueStatement=function(e,t){var s=t==="break";this.next(),this.eat(o.semi)||this.insertSemicolon()?e.label=null:this.type!==o.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var 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(Tt),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(o._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(o.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(Tt),this.enterScope(0),this.expect(o.parenL),this.type===o.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var s=this.isLet();if(this.type===o._var||this.type===o._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 f=this.isContextual("let"),p=!1,g=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(g){var b=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(b,!0,g),this.finishNode(b,"VariableDeclaration"),this.parseForAfterInit(e,b,t)}var R=this.containsEsc,L=new Je,$=this.start,z=t>-1?this.parseExprSubscripts(L,"await"):this.parseExpression(!0,L);return this.type===o._in||(p=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===o._in&&this.unexpected(t),e.await=!0):p&&this.options.ecmaVersion>=8&&(z.start===$&&!R&&z.type==="Identifier"&&z.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),f&&p&&this.raise(z.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(z,!1,L),this.checkLValPattern(z),this.parseForIn(e,z)):(this.checkExpressionErrors(L,!0),t>-1&&this.unexpected(t),this.parseFor(e,z))},k.parseForAfterInit=function(e,t,s){return(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.type===o._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,De|(s?0:Lt),!1,t)},k.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(o._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},k.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(o.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},k.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(o.braceL),this.labels.push(Ta),this.enterScope(Pi);for(var t,s=!1;this.type!==o.braceR;)if(this.type===o._case||this.type===o._default){var a=this.type===o._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(o.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},k.parseThrowStatement=function(e){return this.next(),X.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 La=[];k.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Ni:0),this.checkLValPattern(e,t?Li:he),this.expect(o.parenR),e},k.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===o._catch){var t=this.startNode();this.next(),this.eat(o.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(o._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},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(Tt),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,f=this.labels;c<f.length;c+=1){var p=f[c];p.name===t&&this.raise(s.start,"Label '"+t+"' is already declared")}for(var g=this.type.isLoop?"loop":this.type===o._switch?"switch":null,b=this.labels.length-1;b>=0;b--){var R=this.labels[b];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(o.braceL),e&&this.enterScope(0);this.type!==o.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(o.semi),e.test=this.type===o.semi?null:this.parseExpression(),this.expect(o.semi),e.update=this.type===o.parenR?null:this.parseExpression(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},k.parseForIn=function(e,t){var s=this.type===o._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(o.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(o.eq)?c.init=this.parseMaybeAssign(t):!a&&s==="const"&&!(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!a&&(s==="using"||s==="await using")&&this.options.ecmaVersion>=17&&this.type!==o._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+s+" declaration"):!a&&c.id.type!=="Identifier"&&!(t&&(this.type===o._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(o.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"?Pt:he,!1)};var De=1,Lt=2,Vi=4;k.parseFunction=function(e,t,s,a,c){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!a)&&(this.type===o.star&&t&Lt&&this.unexpected(),e.generator=this.eat(o.star)),this.options.ecmaVersion>=8&&(e.async=!!a),t&De&&(e.id=t&Vi&&this.type!==o.name?null:this.parseIdent(),e.id&&!(t&Lt)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Pt:he:Ti));var f=this.yieldPos,p=this.awaitPos,g=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Rt(e.async,e.generator)),t&De||(e.id=this.type===o.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,s,!1,c),this.yieldPos=f,this.awaitPos=p,this.awaitIdentPos=g,this.finishNode(e,t&De?"FunctionDeclaration":"FunctionExpression")},k.parseFunctionParams=function(e){this.expect(o.parenL),e.params=this.parseBindingList(o.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(),f=!1;for(c.body=[],this.expect(o.braceL);this.type!==o.braceR;){var p=this.parseClassElement(e.superClass!==null);p&&(c.body.push(p),p.type==="MethodDefinition"&&p.kind==="constructor"?(f&&this.raiseRecoverable(p.start,"Duplicate constructor in the same class"),f=!0):p.key&&p.key.type==="PrivateIdentifier"&&Oa(a,p)&&this.raiseRecoverable(p.key.start,"Identifier '#"+p.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(o.semi))return null;var t=this.options.ecmaVersion,s=this.startNode(),a="",c=!1,f=!1,p="method",g=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(o.braceL))return this.parseClassStaticBlock(s),s;this.isClassElementNameStart()||this.type===o.star?g=!0:a="static"}if(s.static=g,!a&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===o.star)&&!this.canInsertSemicolon()?f=!0:a="async"),!a&&(t>=9||!f)&&this.eat(o.star)&&(c=!0),!a&&!f&&!c){var b=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?p=b:a=b)}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===o.parenL||p!=="method"||c||f){var R=!s.static&&Ze(s,"constructor"),L=R&&e;R&&p!=="method"&&this.raise(s.key.start,"Constructor can't have get/set modifier"),s.kind=R?"constructor":p,this.parseClassMethod(s,c,f,L)}else this.parseClassField(s);return s},k.isClassElementNameStart=function(){return this.type===o.name||this.type===o.privateId||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword},k.parseClassElementName=function(e){this.type===o.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},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&&Ze(e,"prototype")&&this.raise(c.start,"Classes may not have a static property named prototype");var f=e.value=this.parseMethod(t,s,a);return e.kind==="get"&&f.params.length!==0&&this.raiseRecoverable(f.start,"getter should have no params"),e.kind==="set"&&f.params.length!==1&&this.raiseRecoverable(f.start,"setter should have exactly one param"),e.kind==="set"&&f.params[0].type==="RestElement"&&this.raiseRecoverable(f.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},k.parseClassField=function(e){return Ze(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Ze(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(o.eq)?(this.enterScope($e|Ke),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(be|Ke);this.type!==o.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===o.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,he,!1)):(t===!0&&this.unexpected(),e.id=null)},k.parseClassSuper=function(e){e.superClass=this.eat(o._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],f=0;f<s.length;++f){var p=s[f];we(t,p.name)||(c?c.used.push(p):this.raiseRecoverable(p.start,"Private field '#"+p.name+"' must be declared in an enclosing class"))}};function Oa(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 Ze(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!==o.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(o.star))return this.parseExportAllDeclaration(e,t);if(this.eat(o._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==o.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===o._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,De|Vi,!1,e)}else if(this.type===o._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),we(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 f=c[a];this.checkPatternExport(e,f)}else if(s==="ArrayPattern")for(var p=0,g=t.elements;p<g.length;p+=1){var b=g[p];b&&this.checkPatternExport(e,b)}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(o.braceL);!this.eat(o.braceR);){if(s)s=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;t.push(this.parseExportSpecifier(e))}return t},k.parseImport=function(e){return this.next(),this.type===o.string?(e.specifiers=La,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===o.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,he),this.finishNode(e,"ImportSpecifier")},k.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,he),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,he),this.finishNode(e,"ImportNamespaceSpecifier")},k.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===o.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(o.comma)))return e;if(this.type===o.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(o.braceL);!this.eat(o.braceR);){if(t)t=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;e.push(this.parseImportSpecifier())}return e},k.parseWithClause=function(){var e=[];if(!this.eat(o._with))return e;this.expect(o.braceL);for(var t={},s=!0;!this.eat(o.braceR);){if(s)s=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;var a=this.parseImportAttribute(),c=a.key.type==="Identifier"?a.key.name:a.key.value;we(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===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(o.colon),this.type!==o.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},k.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===o.string){var e=this.parseLiteral(this.value);return Aa.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 Z=q.prototype;Z.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 f=c[a];this.toAssignable(f,t),f.type==="RestElement"&&(f.argument.type==="ArrayPattern"||f.argument.type==="ObjectPattern")&&this.raise(f.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},Z.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 f=e[s-1];this.options.ecmaVersion===6&&t&&f&&f.type==="RestElement"&&f.argument.type!=="Identifier"&&this.unexpected(f.argument.start)}return e},Z.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},Z.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==o.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},Z.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case o.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(o.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case o.braceL:return this.parseObj(!0)}return this.parseIdent()},Z.parseBindingList=function(e,t,s,a){for(var c=[],f=!0;!this.eat(e);)if(f?f=!1:this.expect(o.comma),t&&this.type===o.comma)c.push(null);else{if(s&&this.afterTrailingComma(e))break;if(this.type===o.ellipsis){var p=this.parseRestBinding();this.parseBindingListItem(p),c.push(p),this.type===o.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},Z.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},Z.parseBindingListItem=function(e){return e},Z.parseMaybeDefault=function(e,t,s){if(s=s||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(o.eq))return s;var a=this.startNodeAt(e,t);return a.left=s,a.right=this.parseMaybeAssign(),this.finishNode(a,"AssignmentPattern")},Z.checkLValSimple=function(e,t,s){t===void 0&&(t=Qe);var a=t!==Qe;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===he&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),s&&(we(s,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),s[e.name]=!0),t!==Oi&&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")}},Z.checkLValPattern=function(e,t,s){switch(t===void 0&&(t=Qe),e.type){case"ObjectPattern":for(var a=0,c=e.properties;a<c.length;a+=1){var f=c[a];this.checkLValInnerPattern(f,t,s)}break;case"ArrayPattern":for(var p=0,g=e.elements;p<g.length;p+=1){var b=g[p];b&&this.checkLValInnerPattern(b,t,s)}break;default:this.checkLValSimple(e,t,s)}},Z.checkLValInnerPattern=function(e,t,s){switch(t===void 0&&(t=Qe),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 ee=function(t,s,a,c,f){this.token=t,this.isExpr=!!s,this.preserveSpace=!!a,this.override=c,this.generator=!!f},F={b_stat:new ee("{",!1),b_expr:new ee("{",!0),b_tmpl:new ee("${",!1),p_stat:new ee("(",!1),p_expr:new ee("(",!0),q_tmpl:new ee("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new ee("function",!1),f_expr:new ee("function",!0),f_expr_gen:new ee("function",!0,!1,null,!0),f_gen:new ee("function",!1,!1,null,!0)},_e=q.prototype;_e.initialContext=function(){return[F.b_stat]},_e.curContext=function(){return this.context[this.context.length-1]},_e.braceIsBlock=function(e){var t=this.curContext();return t===F.f_expr||t===F.f_stat?!0:e===o.colon&&(t===F.b_stat||t===F.b_expr)?!t.isExpr:e===o._return||e===o.name&&this.exprAllowed?X.test(this.input.slice(this.lastTokEnd,this.start)):e===o._else||e===o.semi||e===o.eof||e===o.parenR||e===o.arrow?!0:e===o.braceL?t===F.b_stat:e===o._var||e===o._const||e===o.name?!1:!this.exprAllowed},_e.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},_e.updateContext=function(e){var t,s=this.type;s.keyword&&e===o.dot?this.exprAllowed=!1:(t=s.updateContext)?t.call(this,e):this.exprAllowed=s.beforeExpr},_e.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},o.parenR.updateContext=o.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===F.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},o.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?F.b_stat:F.b_expr),this.exprAllowed=!0},o.dollarBraceL.updateContext=function(){this.context.push(F.b_tmpl),this.exprAllowed=!0},o.parenL.updateContext=function(e){var t=e===o._if||e===o._for||e===o._with||e===o._while;this.context.push(t?F.p_stat:F.p_expr),this.exprAllowed=!0},o.incDec.updateContext=function(){},o._function.updateContext=o._class.updateContext=function(e){e.beforeExpr&&e!==o._else&&!(e===o.semi&&this.curContext()!==F.p_stat)&&!(e===o._return&&X.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===o.colon||e===o.braceL)&&this.curContext()===F.b_stat)?this.context.push(F.f_expr):this.context.push(F.f_stat),this.exprAllowed=!1},o.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},o.backQuote.updateContext=function(){this.curContext()===F.q_tmpl?this.context.pop():this.context.push(F.q_tmpl),this.exprAllowed=!1},o.star.updateContext=function(e){if(e===o._function){var t=this.context.length-1;this.context[t]===F.f_expr?this.context[t]=F.f_expr_gen:this.context[t]=F.f_gen}this.exprAllowed=!0},o.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==o.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 f=e.kind;if(this.options.ecmaVersion>=6){c==="__proto__"&&f==="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 p=t[c];if(p){var g;f==="init"?g=this.strict&&p.init||p.get||p.set:g=p.init||p[f],g&&this.raiseRecoverable(a.start,"Redefinition of property")}else p=t[c]={init:!1,get:!1,set:!1};p[f]=!0}},P.parseExpression=function(e,t){var s=this;return this.catchStackOverflow(function(){var a=s.start,c=s.startLoc,f=s.parseMaybeAssign(e,t);if(s.type===o.comma){var p=s.startNodeAt(a,c);for(p.expressions=[f];s.eat(o.comma);)p.expressions.push(s.parseMaybeAssign(e,t));return s.finishNode(p,"SequenceExpression")}return f})},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,f=-1,p=-1;t?(c=t.parenthesizedAssign,f=t.trailingComma,p=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Je,a=!0);var g=this.start,b=this.startLoc;(this.type===o.parenL||this.type===o.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var R=this.parseMaybeConditional(e,t);if(s&&(R=s.call(this,R,g,b)),this.type.isAssign){var L=this.startNodeAt(g,b);return L.operator=this.value,this.type===o.eq&&(R=this.toAssignable(R,!1,t)),a||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=R.start&&(t.shorthandAssign=-1),this.type===o.eq?this.checkLValPattern(R):this.checkLValSimple(R),L.left=R,this.next(),L.right=this.parseMaybeAssign(e),p>-1&&(t.doubleProto=p),this.finishNode(L,"AssignmentExpression")}else a&&this.checkExpressionErrors(t,!0);return c>-1&&(t.parenthesizedAssign=c),f>-1&&(t.trailingComma=f),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(o.question)){var f=this.startNodeAt(s,a);return f.test=c,f.consequent=this.parseMaybeAssign(),this.expect(o.colon),f.alternate=this.parseMaybeAssign(e),this.finishNode(f,"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 f=this.type.binop;if(f!=null&&(!c||this.type!==o._in)&&f>a){var p=this.type===o.logicalOR||this.type===o.logicalAND,g=this.type===o.coalesce;g&&(f=o.logicalAND.binop);var b=this.value;this.next();var R=this.start,L=this.startLoc,$=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,c),R,L,f,c),z=this.buildBinary(t,s,e,$,b,p||g);return(p&&this.type===o.coalesce||g&&(this.type===o.logicalOR||this.type===o.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(z,t,s,a,c)}return e},P.buildBinary=function(e,t,s,a,c,f){a.type==="PrivateIdentifier"&&this.raise(a.start,"Private identifier can only be left side of binary expression");var p=this.startNodeAt(e,t);return p.left=s,p.operator=c,p.right=a,this.finishNode(p,f?"LogicalExpression":"BinaryExpression")},P.parseMaybeUnary=function(e,t,s,a){var c=this.start,f=this.startLoc,p;if(this.isContextual("await")&&this.canAwait)p=this.parseAwait(a),t=!0;else if(this.type.prefix){var g=this.startNode(),b=this.type===o.incDec;g.operator=this.value,g.prefix=!0,this.next(),g.argument=this.parseMaybeUnary(null,!0,b,a),this.checkExpressionErrors(e,!0),b?this.checkLValSimple(g.argument):this.strict&&g.operator==="delete"&&Fi(g.argument)?this.raiseRecoverable(g.start,"Deleting local variable in strict mode"):g.operator==="delete"&&Ot(g.argument)?this.raiseRecoverable(g.start,"Private fields can not be deleted"):t=!0,p=this.finishNode(g,b?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===o.privateId)(a||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),p=this.parsePrivateIdent(),this.type!==o._in&&this.unexpected();else{if(p=this.parseExprSubscripts(e,a),this.checkExpressionErrors(e))return p;for(;this.type.postfix&&!this.canInsertSemicolon();){var R=this.startNodeAt(c,f);R.operator=this.value,R.prefix=!1,R.argument=p,this.checkLValSimple(p),this.next(),p=this.finishNode(R,"UpdateExpression")}}if(!s&&this.eat(o.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(c,f,p,this.parseMaybeUnary(null,!1,!1,a),"**",!1);else return p};function Fi(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Fi(e.expression)}function Ot(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Ot(e.expression)||e.type==="ParenthesizedExpression"&&Ot(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 f=this.parseSubscripts(c,s,a,!1,t);return e&&f.type==="MemberExpression"&&(e.parenthesizedAssign>=f.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=f.start&&(e.parenthesizedBind=-1),e.trailingComma>=f.start&&(e.trailingComma=-1)),f},P.parseSubscripts=function(e,t,s,a,c){for(var f=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,p=!1;;){var g=this.parseSubscript(e,t,s,a,f,p,c);if(g.optional&&(p=!0),g===e||g.type==="ArrowFunctionExpression"){if(p){var b=this.startNodeAt(t,s);b.expression=g,g=this.finishNode(b,"ChainExpression")}return g}e=g}},P.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(o.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,f,p){var g=this.options.ecmaVersion>=11,b=g&&this.eat(o.questionDot);a&&b&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var R=this.eat(o.bracketL);if(R||b&&this.type!==o.parenL&&this.type!==o.backQuote||this.eat(o.dot)){var L=this.startNodeAt(t,s);L.object=e,R?(L.property=this.parseExpression(),this.expect(o.bracketR)):this.type===o.privateId&&e.type!=="Super"?L.property=this.parsePrivateIdent():L.property=this.parseIdent(this.options.allowReserved!=="never"),L.computed=!!R,g&&(L.optional=b),e=this.finishNode(L,"MemberExpression")}else if(!a&&this.eat(o.parenL)){var $=new Je,z=this.yieldPos,je=this.awaitPos,Ie=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var st=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1,$);if(c&&!b&&this.shouldParseAsyncArrow())return this.checkPatternErrors($,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=z,this.awaitPos=je,this.awaitIdentPos=Ie,this.parseSubscriptAsyncArrow(t,s,st,p);this.checkExpressionErrors($,!0),this.yieldPos=z||this.yieldPos,this.awaitPos=je||this.awaitPos,this.awaitIdentPos=Ie||this.awaitIdentPos;var ke=this.startNodeAt(t,s);ke.callee=e,ke.arguments=st,g&&(ke.optional=b),e=this.finishNode(ke,"CallExpression")}else if(this.type===o.backQuote){(b||f)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Ae=this.startNodeAt(t,s);Ae.tag=e,Ae.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(Ae,"TaggedTemplateExpression")}return e},P.parseExprAtom=function(e,t,s){this.type===o.slash&&this.readRegexp();var a,c=this.potentialArrowAt===this.start;switch(this.type){case o._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),a=this.startNode(),this.next(),this.type===o.parenL&&!this.allowDirectSuper&&this.raise(a.start,"super() call outside constructor of a subclass"),this.type!==o.dot&&this.type!==o.bracketL&&this.type!==o.parenL&&this.unexpected(),this.finishNode(a,"Super");case o._this:return a=this.startNode(),this.next(),this.finishNode(a,"ThisExpression");case o.name:var f=this.start,p=this.startLoc,g=this.containsEsc,b=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!g&&b.name==="async"&&!this.canInsertSemicolon()&&this.eat(o._function))return this.overrideContext(F.f_expr),this.parseFunction(this.startNodeAt(f,p),0,!1,!0,t);if(c&&!this.canInsertSemicolon()){if(this.eat(o.arrow))return this.parseArrowExpression(this.startNodeAt(f,p),[b],!1,t);if(this.options.ecmaVersion>=8&&b.name==="async"&&this.type===o.name&&!g&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return b=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(o.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(f,p),[b],!0,t)}return b;case o.regexp:var R=this.value;return a=this.parseLiteral(R.value),a.regex={pattern:R.pattern,flags:R.flags},a;case o.num:case o.string:return this.parseLiteral(this.value);case o._null:case o._true:case o._false:return a=this.startNode(),a.value=this.type===o._null?null:this.type===o._true,a.raw=this.type.keyword,this.next(),this.finishNode(a,"Literal");case o.parenL:var L=this.start,$=this.parseParenAndDistinguishExpression(c,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget($)&&(e.parenthesizedAssign=L),e.parenthesizedBind<0&&(e.parenthesizedBind=L)),$;case o.bracketL:return a=this.startNode(),this.next(),a.elements=this.parseExprList(o.bracketR,!0,!0,e),this.finishNode(a,"ArrayExpression");case o.braceL:return this.overrideContext(F.b_expr),this.parseObj(!1,e);case o._function:return a=this.startNode(),this.next(),this.parseFunction(a,0);case o._class:return this.parseClass(this.startNode(),!1);case o._new:return this.parseNew();case o.backQuote:return this.parseTemplate();case o._import:return this.options.ecmaVersion>=11?this.parseExprImport(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===o.parenL&&!e)return this.parseDynamicImport(t);if(this.type===o.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(o.parenR)?e.options=null:(this.expect(o.comma),this.afterTrailingComma(o.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(o.parenR)||(this.expect(o.comma),this.afterTrailingComma(o.parenR)||this.unexpected())));else if(!this.eat(o.parenR)){var t=this.start;this.eat(o.comma)&&this.eat(o.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},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(o.parenL);var e=this.parseExpression();return this.expect(o.parenR),e},P.shouldParseArrow=function(e){return!this.canInsertSemicolon()},P.parseParenAndDistinguishExpression=function(e,t){var s=this.start,a=this.startLoc,c,f=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var p=this.start,g=this.startLoc,b=[],R=!0,L=!1,$=new Je,z=this.yieldPos,je=this.awaitPos,Ie;for(this.yieldPos=0,this.awaitPos=0;this.type!==o.parenR;)if(R?R=!1:this.expect(o.comma),f&&this.afterTrailingComma(o.parenR,!0)){L=!0;break}else if(this.type===o.ellipsis){Ie=this.start,b.push(this.parseParenItem(this.parseRestBinding())),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else b.push(this.parseMaybeAssign(!1,$,this.parseParenItem));var st=this.lastTokEnd,ke=this.lastTokEndLoc;if(this.expect(o.parenR),e&&this.shouldParseArrow(b)&&this.eat(o.arrow))return this.checkPatternErrors($,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=z,this.awaitPos=je,this.parseParenArrowList(s,a,b,t);(!b.length||L)&&this.unexpected(this.lastTokStart),Ie&&this.unexpected(Ie),this.checkExpressionErrors($,!0),this.yieldPos=z||this.yieldPos,this.awaitPos=je||this.awaitPos,b.length>1?(c=this.startNodeAt(p,g),c.expressions=b,this.finishNodeAt(c,"SequenceExpression",st,ke)):c=b[0]}else c=this.parseParenExpression();if(this.options.preserveParens){var Ae=this.startNodeAt(s,a);return Ae.expression=c,this.finishNode(Ae,"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 Va=[];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===o.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var 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(o.parenL)?e.arguments=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Va,this.finishNode(e,"NewExpression")},P.parseTemplateElement=function(e){var t=e.isTagged,s=this.startNode();return this.type===o.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),s.value={raw:this.value.replace(/\r\n?/g,`
|
|
9
|
+
${y}`),{installed:!1,command:y,error:A}}oa.exports={cliCommand:di,loginCommand:ll,installDeclaredPackage:xl,saveNpmDependencies:ia,installNpmDependencies:aa,installMissingNpmDependencies:dl,missingNpmDependencies:xi,npmInstallCommand:na,planNpmDependencies:fl,requirementStatus:bt}});var yi=w((op,xa)=>{var{assertCurrentApiOrigin:ua}=mr(),{fileExists:gl,readJsonFileSafe:vl,removeFile:yl,writePrivateJsonFileAtomic:El,withPrivateFileLock:bl}=nt(),ca=require("path"),Sl=require("os"),wl=require("https"),Cl=require("http"),{URL:pe}=require("url"),{DEFAULT_API_URL:Se}=at(),{cliCommand:ha,loginCommand:_l}=gi(),Il=ca.join(Sl.homedir(),".frontfriend"),Oe=ca.join(Il,"credentials");function kl(){return Oe}function wt(){try{return vl(Oe)}catch{return null}}function la(i){try{let r=JSON.parse(Buffer.from(String(i).split(".")[1],"base64url").toString("utf8"));return typeof r.email=="string"?r.email:null}catch{return null}}function Al(){let i=wt();if(!i||!i.accessToken)return null;let r=Number(i.refreshExpiresAt)||0;return{email:la(i.accessToken),apiUrl:i.ffApiUrl||null,expired:r>0&&r<Date.now()}}function fa(i){El(Oe,i)}function Nl(){return gl(Oe)?(yl(Oe),!0):!1}function vi(i,r=60*1e3){return!i?.accessToken||!i.expiresAt||Date.now()+r>=i.expiresAt}function Le(i,{apiUrl:r,login:n,next:u}={}){let h=u||`Run \`${n||_l(r)}\` to sign in, then run the command again.`,l=new Error(`${i}. ${h}`);return l.code="FF_AUTH_REFRESH_FAILED",l}function pa(i,r,n){return ua(i),new Promise((u,h)=>{let l=new pe(i);if(l.protocol!=="https:"&&!(l.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(l.hostname))){h(new Error("Frontfriend API URLs require HTTPS except on localhost"));return}let d=l.protocol==="https:"?wl:Cl,m=JSON.stringify(r||{}),y=d.request({hostname:l.hostname,port:l.port,path:`${l.pathname}${l.search}`,method:"POST",headers:{"content-type":"application/json","content-length":Buffer.byteLength(m),...n?{authorization:`Bearer ${n}`}:{}}},x=>{let A="";x.on("data",v=>{A+=v}),x.on("end",()=>{if(x.statusCode>=300&&x.statusCode<400){let S=x.headers.location?` to ${x.headers.location}`:"",E=new Error(`HTTP ${x.statusCode}: redirected${S}`);E.statusCode=x.statusCode,E.body=A,h(E);return}let v=null;try{v=A?JSON.parse(A):null}catch{let E=x.headers["content-type"]||"unknown content-type",N=new Error(`Expected JSON from FrontFriend API at ${i}, but received ${E} (HTTP ${x.statusCode}). Check FF_API_URL or pass --api-url with the FrontFriend app URL.`);if(N.statusCode=x.statusCode,N.body=A,x.statusCode>=400){h(N);return}h(N);return}if(x.statusCode>=400){let S=new Error(v?.error_description||v?.error||`HTTP ${x.statusCode}`);S.statusCode=x.statusCode,S.body=v,h(S);return}u(v)})});y.setTimeout(15e3,()=>y.destroy(Object.assign(new Error("Frontfriend API request timed out"),{code:"ETIMEDOUT"}))),y.on("error",h),y.write(m),y.end()})}function da(i,r){let n=new pe(i?.ffApiUrl||Se).origin,u=new pe(r).origin;return Le(`You are signed in to ${n}, but this command uses ${u}`,{login:ha(`login --api-url ${u}`)})}async function Rl(i){return bl(Oe,i,()=>Le("Another Frontfriend command is renewing your sign-in",{next:"Wait for it to finish, then run the command again."}))}async function ma(i,r=Se){return Rl(async()=>{let n=wt();if(n&&new pe(n.ffApiUrl||Se).origin===new pe(r).origin){if(!vi(n))return n;i=n}return Pl(i,r)})}async function Pl(i,r=Se){if(new pe(r).origin!==new pe(i.ffApiUrl||Se).origin)throw da(i,r);if(!i?.refreshToken||!i?.deviceId)throw Le("Your Frontfriend sign-in has expired",{apiUrl:r});let n;try{n=await pa(`${r}/api/plugin/token`,{grant_type:"refresh_token",refresh_token:i.refreshToken,device_id:i.deviceId})}catch(h){throw Object.assign(Le(h?.message?`Could not renew your Frontfriend sign-in (${h.message})`:"Could not renew your Frontfriend sign-in",{apiUrl:r}),{cause:h})}if(!n?.access_token||!n?.refresh_token)throw Le("Could not renew your Frontfriend sign-in",{apiUrl:r});let u={accessToken:n.access_token,refreshToken:n.refresh_token,deviceId:n.device_id||i.deviceId,expiresAt:Date.now()+(n.expires_in||900)*1e3,refreshExpiresAt:Date.now()+(n.refresh_expires_in||604800)*1e3,ffApiUrl:r};return fa(u),u}var Tl="ffm_";function Ll(i){return typeof i=="string"&&i.startsWith(Tl)}async function Ol(i={}){if(i.baseURL&&ua(i.baseURL),i.envToken)return i.envToken;if(!i.skipCredentials){let r=wt();if(r?.accessToken||r?.refreshToken){let n=i.baseURL||r.ffApiUrl||Se;if(new pe(n).origin!==new pe(r.ffApiUrl||Se).origin)throw da(r,n);return r.accessToken&&!vi(r)?r.accessToken:(await ma(r,n)).accessToken}}return i.configuredToken?(i.silent||console.warn(`\u26A0\uFE0F auth-token in frontfriend.config.js is deprecated. Run \`${ha("login")}\` to keep your sign-in outside the repository.`),i.configuredToken):null}xa.exports={isMachineCredential:Ll,accountEmail:la,signedInAccount:Al,getCredentialsPath:kl,readCredentials:wt,writeCredentials:fa,deleteCredentials:Nl,isExpired:vi,postJson:pa,refreshCredentials:ma,resolveAuthToken:Ol,createAuthRefreshError:Le}});var ya=w((up,va)=>{var ue=require("path"),{fileExists:Ei}=nt();function ga(i,r=process.cwd()){let n=r;for(;n!==ue.parse(n).root;){let u=ue.join(n,i);if(Ei(u))return u;n=ue.dirname(n)}return null}function Vl(i,r=process.cwd(),n=null){let u=[],h=r,l=10;for(let d=0;d<l;d++){u.push(ue.join(h,i)),d<3&&u.push(ue.join(h,"../".repeat(d+1)+i));let m=ue.dirname(h);if(m===h)break;h=m}u.push(ue.join(__dirname,"../../../",i));for(let d of u)if(Ei(d)&&(!n||n(d)))return d;return null}function Fl(i,r=process.cwd()){let n=i.map(u=>ue.isAbsolute(u)?u:ue.join(r,u));for(let u of n)if(Ei(u))return u;return null}function $l(i=process.cwd()){let r=ga("frontfriend.config.js",i);return r?ue.dirname(r):i}va.exports={findFileUpward:ga,findDirectoryUpward:Vl,findDirectoryWithPaths:Fl,resolveProjectRoot:$l}});var ba=w((Ct,Ea)=>{(function(i,r){typeof Ct=="object"&&typeof Ea<"u"?r(Ct):typeof define=="function"&&define.amd?define(["exports"],r):(i=typeof globalThis<"u"?globalThis:i||self,r(i.acorn={}))})(Ct,function(i){"use strict";var r=[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],u="\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",h="\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",l={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"},d="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:d,"5module":d+" export import",6:d+" const class extends export import super"},y=/^in(stanceof)?$/,x=new RegExp("["+h+"]"),A=new RegExp("["+h+u+"]");function v(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 S(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:v(e,n)}function E(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&&A.test(String.fromCharCode(e)):t===!1?!1:v(e,n)||v(e,r)}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 j(e,t){return new N(e,{beforeExpr:!0,binop:t})}var Y={beforeExpr:!0},Q={startsExpr:!0},ze={};function V(e,t){return t===void 0&&(t={}),t.keyword=e,ze[e]=new N(e,t)}var o={num:new N("num",Q),regexp:new N("regexp",Q),string:new N("string",Q),name:new N("name",Q),privateId:new N("privateId",Q),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("`",Q),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:j("||",1),logicalAND:j("&&",2),bitwiseOR:j("|",3),bitwiseXOR:j("^",4),bitwiseAND:j("&",5),equality:j("==/!=/===/!==",6),relational:j("</>/<=/>=",7),bitShift:j("<</>>/>>>",8),plusMin:new N("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:j("%",10),star:j("*",10),slash:j("/",10),starstar:new N("**",{beforeExpr:!0}),coalesce:j("??",1),_break:V("break"),_case:V("case",Y),_catch:V("catch"),_continue:V("continue"),_debugger:V("debugger"),_default:V("default",Y),_do:V("do",{isLoop:!0,beforeExpr:!0}),_else:V("else",Y),_finally:V("finally"),_for:V("for",{isLoop:!0}),_function:V("function",Q),_if:V("if"),_return:V("return",Y),_switch:V("switch"),_throw:V("throw",Y),_try:V("try"),_var:V("var"),_const:V("const"),_while:V("while",{isLoop:!0}),_with:V("with"),_new:V("new",{beforeExpr:!0,startsExpr:!0}),_this:V("this",Q),_super:V("super",Q),_class:V("class",Q),_extends:V("extends",Y),_export:V("export"),_import:V("import",Q),_null:V("null",Q),_true:V("true",Q),_false:V("false",Q),_in:V("in",{beforeExpr:!0,binop:7}),_instanceof:V("instanceof",{beforeExpr:!0,binop:7}),_typeof:V("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:V("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:V("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},X=/\r\n?|\n|\u2028|\u2029/,wi=new RegExp(X.source,"g");function ve(e){return e===10||e===13||e===8232||e===8233}function Ci(e,t,s){s===void 0&&(s=e.length);for(var a=t;a<s;a++){var c=e.charCodeAt(a);if(ve(c))return a<s-1&&c===13&&e.charCodeAt(a+1)===10?a+2:a+1}return-1}var It=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,M=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,_i=Object.prototype,Pa=_i.hasOwnProperty,Ta=_i.toString,we=Object.hasOwn||function(e,t){return Pa.call(e,t)},Ii=Array.isArray||function(e){return Ta.call(e)==="[object Array]"},ki=Object.create(null);function de(e){return ki[e]||(ki[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function ce(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var La=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Ce=function(t,s){this.line=t,this.column=s};Ce.prototype.offset=function(t){return new Ce(this.line,this.column+t)};var Fe=function(t,s,a){this.start=s,this.end=a,t.sourceFile!==null&&(this.source=t.sourceFile)};function kt(e,t){for(var s=1,a=0;;){var c=Ci(e,a,t);if(c<0)return new Ce(s,t-a);++s,a=c}}var Xe={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},Ai=!1;function Oa(e){var t={};for(var s in Xe)t[s]=e&&we(e,s)?e[s]:Xe[s];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!Ai&&typeof console=="object"&&console.warn&&(Ai=!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),Ii(t.onToken)){var a=t.onToken;t.onToken=function(c){return a.push(c)}}if(Ii(t.onComment)&&(t.onComment=Va(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function Va(e,t){return function(s,a,c,f,p,g){var b={type:s?"Block":"Line",value:a,start:c,end:f};e.locations&&(b.loc=new Fe(this,p,g)),e.ranges&&(b.range=[c,f]),t.push(b)}}var ye=1,Ee=2,At=4,Ni=8,Nt=16,Ri=32,Ke=64,Pi=128,be=256,$e=512,Ti=1024,Ye=ye|Ee|be;function Rt(e,t){return Ee|(e?At:0)|(t?Ni:0)}var Qe=0,Pt=1,he=2,Li=3,Oi=4,Vi=5,q=function(t,s,a){this.options=t=Oa(t),this.sourceFile=t.sourceFile,this.keywords=de(m[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var c="";t.allowReserved!==!0&&(c=l[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(c+=" await")),this.reservedWords=de(c);var f=(c?c+" ":"")+l.strict;this.reservedWordsStrict=de(f),this.reservedWordsStrictBind=de(f+" "+l.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(X).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=o.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||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"?Ee:ye),this.regexpState=null,this.privateNameStack=[]},J={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)})},J.inFunction.get=function(){return(this.currentVarScope().flags&Ee)>0},J.inGenerator.get=function(){return(this.currentVarScope().flags&Ni)>0},J.inAsync.get=function(){return(this.currentVarScope().flags&At)>0},J.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],s=t.flags;if(s&(be|$e))return!1;if(s&Ee)return(s&At)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},J.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&ye)},J.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&Ke)>0||this.options.allowSuperOutsideMethod},J.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Pi)>0},J.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},J.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],s=t.flags;if(s&(be|$e)||s&Ee&&!(s&Nt))return!0}return!1},J.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&Ti||!this.inModule&&t&ye)},J.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&be)>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,J);var W=q.prototype,Fa=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;W.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){M.lastIndex=e,e+=M.exec(this.input)[0].length;var t=Fa.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){M.lastIndex=e+t[0].length;var s=M.exec(this.input),a=s.index+s[0].length,c=this.input.charAt(a);return c===";"||c==="}"||X.test(s[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(c)||c==="!"&&this.input.charAt(a+1)==="=")}e+=t[0].length,M.lastIndex=e,e+=M.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===o.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===o.eof||this.type===o.braceR||X.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(o.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 Je=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!==o.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 f=c[a];this.raiseRecoverable(this.undefinedExports[f].start,"Export '"+f+"' 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 Tt={kind:"loop"},$a={kind:"switch"};k.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;M.lastIndex=this.pos;var t=M.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(S(a)){var c=s;do s+=a<=65535?1:2;while(E(a=this.fullCharCodeAt(s)));if(a===92)return!0;var f=this.input.slice(c,s);if(!y.test(f))return!0}return!1},k.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;M.lastIndex=this.pos;var e=M.exec(this.input),t=this.pos+e[0].length,s;return!X.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(E(s=this.fullCharCodeAt(t+8))||s===92))},k.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;M.lastIndex=this.pos;var s=M.exec(this.input),a=this.pos+s[0].length;if(X.test(this.input.slice(this.pos,a)))return!1;if(e){var c=a+5,f;if(this.input.slice(a,c)!=="using"||c===this.input.length||E(f=this.fullCharCodeAt(c))||f===92)return!1;M.lastIndex=c;var p=M.exec(this.input);if(a=c+p[0].length,p&&X.test(this.input.slice(c,a)))return!1}var g=this.fullCharCodeAt(a);if(!S(g)&&g!==92)return!1;var b=a;do a+=g<=65535?1:2;while(E(g=this.fullCharCodeAt(a)));if(g===92)return!0;var R=this.input.slice(b,a);if(y.test(R))return!1;if(t&&!e&&R==="of"){M.lastIndex=a;var L=M.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(),f;switch(this.isLet(e)&&(a=o._var,f="let"),a){case o._break:case o._continue:return this.parseBreakContinueStatement(c,a.keyword);case o._debugger:return this.parseDebuggerStatement(c);case o._do:return this.parseDoStatement(c);case o._for:return this.parseForStatement(c);case o._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(c,!1,!e);case o._class:return e&&this.unexpected(),this.parseClass(c,!0);case o._if:return this.parseIfStatement(c);case o._return:return this.parseReturnStatement(c);case o._switch:return this.parseSwitchStatement(c);case o._throw:return this.parseThrowStatement(c);case o._try:return this.parseTryStatement(c);case o._const:case o._var:return f=f||this.value,e&&f!=="var"&&this.unexpected(),this.parseVarStatement(c,f);case o._while:return this.parseWhileStatement(c);case o._with:return this.parseWithStatement(c);case o.braceL:return this.parseBlock(!0,c);case o.semi:return this.parseEmptyStatement(c);case o._export:case o._import:if(this.options.ecmaVersion>10&&a===o._import){M.lastIndex=this.pos;var p=M.exec(this.input),g=this.pos+p[0].length,b=this.input.charCodeAt(g);if(b===40||b===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===o._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,$=this.parseExpression();return a===o.name&&$.type==="Identifier"&&this.eat(o.colon)?this.parseLabeledStatement(c,L,$,e):this.parseExpressionStatement(c,$)}},k.parseBreakContinueStatement=function(e,t){var s=t==="break";this.next(),this.eat(o.semi)||this.insertSemicolon()?e.label=null:this.type!==o.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var 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(Tt),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(o._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(o.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(Tt),this.enterScope(0),this.expect(o.parenL),this.type===o.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var s=this.isLet();if(this.type===o._var||this.type===o._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 f=this.isContextual("let"),p=!1,g=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(g){var b=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(b,!0,g),this.finishNode(b,"VariableDeclaration"),this.parseForAfterInit(e,b,t)}var R=this.containsEsc,L=new Je,$=this.start,z=t>-1?this.parseExprSubscripts(L,"await"):this.parseExpression(!0,L);return this.type===o._in||(p=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===o._in&&this.unexpected(t),e.await=!0):p&&this.options.ecmaVersion>=8&&(z.start===$&&!R&&z.type==="Identifier"&&z.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),f&&p&&this.raise(z.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(z,!1,L),this.checkLValPattern(z),this.parseForIn(e,z)):(this.checkExpressionErrors(L,!0),t>-1&&this.unexpected(t),this.parseFor(e,z))},k.parseForAfterInit=function(e,t,s){return(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.type===o._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,De|(s?0:Lt),!1,t)},k.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(o._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},k.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(o.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},k.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(o.braceL),this.labels.push($a),this.enterScope(Ti);for(var t,s=!1;this.type!==o.braceR;)if(this.type===o._case||this.type===o._default){var a=this.type===o._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(o.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},k.parseThrowStatement=function(e){return this.next(),X.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 Da=[];k.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Ri:0),this.checkLValPattern(e,t?Oi:he),this.expect(o.parenR),e},k.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===o._catch){var t=this.startNode();this.next(),this.eat(o.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(o._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},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(Tt),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,f=this.labels;c<f.length;c+=1){var p=f[c];p.name===t&&this.raise(s.start,"Label '"+t+"' is already declared")}for(var g=this.type.isLoop?"loop":this.type===o._switch?"switch":null,b=this.labels.length-1;b>=0;b--){var R=this.labels[b];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(o.braceL),e&&this.enterScope(0);this.type!==o.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(o.semi),e.test=this.type===o.semi?null:this.parseExpression(),this.expect(o.semi),e.update=this.type===o.parenR?null:this.parseExpression(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},k.parseForIn=function(e,t){var s=this.type===o._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(o.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(o.eq)?c.init=this.parseMaybeAssign(t):!a&&s==="const"&&!(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!a&&(s==="using"||s==="await using")&&this.options.ecmaVersion>=17&&this.type!==o._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+s+" declaration"):!a&&c.id.type!=="Identifier"&&!(t&&(this.type===o._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(o.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"?Pt:he,!1)};var De=1,Lt=2,Fi=4;k.parseFunction=function(e,t,s,a,c){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!a)&&(this.type===o.star&&t&Lt&&this.unexpected(),e.generator=this.eat(o.star)),this.options.ecmaVersion>=8&&(e.async=!!a),t&De&&(e.id=t&Fi&&this.type!==o.name?null:this.parseIdent(),e.id&&!(t&Lt)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Pt:he:Li));var f=this.yieldPos,p=this.awaitPos,g=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Rt(e.async,e.generator)),t&De||(e.id=this.type===o.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,s,!1,c),this.yieldPos=f,this.awaitPos=p,this.awaitIdentPos=g,this.finishNode(e,t&De?"FunctionDeclaration":"FunctionExpression")},k.parseFunctionParams=function(e){this.expect(o.parenL),e.params=this.parseBindingList(o.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(),f=!1;for(c.body=[],this.expect(o.braceL);this.type!==o.braceR;){var p=this.parseClassElement(e.superClass!==null);p&&(c.body.push(p),p.type==="MethodDefinition"&&p.kind==="constructor"?(f&&this.raiseRecoverable(p.start,"Duplicate constructor in the same class"),f=!0):p.key&&p.key.type==="PrivateIdentifier"&&qa(a,p)&&this.raiseRecoverable(p.key.start,"Identifier '#"+p.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(o.semi))return null;var t=this.options.ecmaVersion,s=this.startNode(),a="",c=!1,f=!1,p="method",g=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(o.braceL))return this.parseClassStaticBlock(s),s;this.isClassElementNameStart()||this.type===o.star?g=!0:a="static"}if(s.static=g,!a&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===o.star)&&!this.canInsertSemicolon()?f=!0:a="async"),!a&&(t>=9||!f)&&this.eat(o.star)&&(c=!0),!a&&!f&&!c){var b=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?p=b:a=b)}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===o.parenL||p!=="method"||c||f){var R=!s.static&&Ze(s,"constructor"),L=R&&e;R&&p!=="method"&&this.raise(s.key.start,"Constructor can't have get/set modifier"),s.kind=R?"constructor":p,this.parseClassMethod(s,c,f,L)}else this.parseClassField(s);return s},k.isClassElementNameStart=function(){return this.type===o.name||this.type===o.privateId||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword},k.parseClassElementName=function(e){this.type===o.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},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&&Ze(e,"prototype")&&this.raise(c.start,"Classes may not have a static property named prototype");var f=e.value=this.parseMethod(t,s,a);return e.kind==="get"&&f.params.length!==0&&this.raiseRecoverable(f.start,"getter should have no params"),e.kind==="set"&&f.params.length!==1&&this.raiseRecoverable(f.start,"setter should have exactly one param"),e.kind==="set"&&f.params[0].type==="RestElement"&&this.raiseRecoverable(f.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},k.parseClassField=function(e){return Ze(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Ze(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(o.eq)?(this.enterScope($e|Ke),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(be|Ke);this.type!==o.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===o.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,he,!1)):(t===!0&&this.unexpected(),e.id=null)},k.parseClassSuper=function(e){e.superClass=this.eat(o._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],f=0;f<s.length;++f){var p=s[f];we(t,p.name)||(c?c.used.push(p):this.raiseRecoverable(p.start,"Private field '#"+p.name+"' must be declared in an enclosing class"))}};function qa(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 Ze(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!==o.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(o.star))return this.parseExportAllDeclaration(e,t);if(this.eat(o._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==o.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===o._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,De|Fi,!1,e)}else if(this.type===o._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),we(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 f=c[a];this.checkPatternExport(e,f)}else if(s==="ArrayPattern")for(var p=0,g=t.elements;p<g.length;p+=1){var b=g[p];b&&this.checkPatternExport(e,b)}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(o.braceL);!this.eat(o.braceR);){if(s)s=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;t.push(this.parseExportSpecifier(e))}return t},k.parseImport=function(e){return this.next(),this.type===o.string?(e.specifiers=Da,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===o.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,he),this.finishNode(e,"ImportSpecifier")},k.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,he),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,he),this.finishNode(e,"ImportNamespaceSpecifier")},k.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===o.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(o.comma)))return e;if(this.type===o.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(o.braceL);!this.eat(o.braceR);){if(t)t=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;e.push(this.parseImportSpecifier())}return e},k.parseWithClause=function(){var e=[];if(!this.eat(o._with))return e;this.expect(o.braceL);for(var t={},s=!0;!this.eat(o.braceR);){if(s)s=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;var a=this.parseImportAttribute(),c=a.key.type==="Identifier"?a.key.name:a.key.value;we(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===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(o.colon),this.type!==o.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},k.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===o.string){var e=this.parseLiteral(this.value);return La.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 Z=q.prototype;Z.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 f=c[a];this.toAssignable(f,t),f.type==="RestElement"&&(f.argument.type==="ArrayPattern"||f.argument.type==="ObjectPattern")&&this.raise(f.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},Z.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 f=e[s-1];this.options.ecmaVersion===6&&t&&f&&f.type==="RestElement"&&f.argument.type!=="Identifier"&&this.unexpected(f.argument.start)}return e},Z.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},Z.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==o.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},Z.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case o.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(o.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case o.braceL:return this.parseObj(!0)}return this.parseIdent()},Z.parseBindingList=function(e,t,s,a){for(var c=[],f=!0;!this.eat(e);)if(f?f=!1:this.expect(o.comma),t&&this.type===o.comma)c.push(null);else{if(s&&this.afterTrailingComma(e))break;if(this.type===o.ellipsis){var p=this.parseRestBinding();this.parseBindingListItem(p),c.push(p),this.type===o.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},Z.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},Z.parseBindingListItem=function(e){return e},Z.parseMaybeDefault=function(e,t,s){if(s=s||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(o.eq))return s;var a=this.startNodeAt(e,t);return a.left=s,a.right=this.parseMaybeAssign(),this.finishNode(a,"AssignmentPattern")},Z.checkLValSimple=function(e,t,s){t===void 0&&(t=Qe);var a=t!==Qe;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===he&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),s&&(we(s,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),s[e.name]=!0),t!==Vi&&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")}},Z.checkLValPattern=function(e,t,s){switch(t===void 0&&(t=Qe),e.type){case"ObjectPattern":for(var a=0,c=e.properties;a<c.length;a+=1){var f=c[a];this.checkLValInnerPattern(f,t,s)}break;case"ArrayPattern":for(var p=0,g=e.elements;p<g.length;p+=1){var b=g[p];b&&this.checkLValInnerPattern(b,t,s)}break;default:this.checkLValSimple(e,t,s)}},Z.checkLValInnerPattern=function(e,t,s){switch(t===void 0&&(t=Qe),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 ee=function(t,s,a,c,f){this.token=t,this.isExpr=!!s,this.preserveSpace=!!a,this.override=c,this.generator=!!f},F={b_stat:new ee("{",!1),b_expr:new ee("{",!0),b_tmpl:new ee("${",!1),p_stat:new ee("(",!1),p_expr:new ee("(",!0),q_tmpl:new ee("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new ee("function",!1),f_expr:new ee("function",!0),f_expr_gen:new ee("function",!0,!1,null,!0),f_gen:new ee("function",!1,!1,null,!0)},_e=q.prototype;_e.initialContext=function(){return[F.b_stat]},_e.curContext=function(){return this.context[this.context.length-1]},_e.braceIsBlock=function(e){var t=this.curContext();return t===F.f_expr||t===F.f_stat?!0:e===o.colon&&(t===F.b_stat||t===F.b_expr)?!t.isExpr:e===o._return||e===o.name&&this.exprAllowed?X.test(this.input.slice(this.lastTokEnd,this.start)):e===o._else||e===o.semi||e===o.eof||e===o.parenR||e===o.arrow?!0:e===o.braceL?t===F.b_stat:e===o._var||e===o._const||e===o.name?!1:!this.exprAllowed},_e.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},_e.updateContext=function(e){var t,s=this.type;s.keyword&&e===o.dot?this.exprAllowed=!1:(t=s.updateContext)?t.call(this,e):this.exprAllowed=s.beforeExpr},_e.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},o.parenR.updateContext=o.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===F.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},o.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?F.b_stat:F.b_expr),this.exprAllowed=!0},o.dollarBraceL.updateContext=function(){this.context.push(F.b_tmpl),this.exprAllowed=!0},o.parenL.updateContext=function(e){var t=e===o._if||e===o._for||e===o._with||e===o._while;this.context.push(t?F.p_stat:F.p_expr),this.exprAllowed=!0},o.incDec.updateContext=function(){},o._function.updateContext=o._class.updateContext=function(e){e.beforeExpr&&e!==o._else&&!(e===o.semi&&this.curContext()!==F.p_stat)&&!(e===o._return&&X.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===o.colon||e===o.braceL)&&this.curContext()===F.b_stat)?this.context.push(F.f_expr):this.context.push(F.f_stat),this.exprAllowed=!1},o.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},o.backQuote.updateContext=function(){this.curContext()===F.q_tmpl?this.context.pop():this.context.push(F.q_tmpl),this.exprAllowed=!1},o.star.updateContext=function(e){if(e===o._function){var t=this.context.length-1;this.context[t]===F.f_expr?this.context[t]=F.f_expr_gen:this.context[t]=F.f_gen}this.exprAllowed=!0},o.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==o.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 f=e.kind;if(this.options.ecmaVersion>=6){c==="__proto__"&&f==="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 p=t[c];if(p){var g;f==="init"?g=this.strict&&p.init||p.get||p.set:g=p.init||p[f],g&&this.raiseRecoverable(a.start,"Redefinition of property")}else p=t[c]={init:!1,get:!1,set:!1};p[f]=!0}},P.parseExpression=function(e,t){var s=this;return this.catchStackOverflow(function(){var a=s.start,c=s.startLoc,f=s.parseMaybeAssign(e,t);if(s.type===o.comma){var p=s.startNodeAt(a,c);for(p.expressions=[f];s.eat(o.comma);)p.expressions.push(s.parseMaybeAssign(e,t));return s.finishNode(p,"SequenceExpression")}return f})},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,f=-1,p=-1;t?(c=t.parenthesizedAssign,f=t.trailingComma,p=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Je,a=!0);var g=this.start,b=this.startLoc;(this.type===o.parenL||this.type===o.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var R=this.parseMaybeConditional(e,t);if(s&&(R=s.call(this,R,g,b)),this.type.isAssign){var L=this.startNodeAt(g,b);return L.operator=this.value,this.type===o.eq&&(R=this.toAssignable(R,!1,t)),a||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=R.start&&(t.shorthandAssign=-1),this.type===o.eq?this.checkLValPattern(R):this.checkLValSimple(R),L.left=R,this.next(),L.right=this.parseMaybeAssign(e),p>-1&&(t.doubleProto=p),this.finishNode(L,"AssignmentExpression")}else a&&this.checkExpressionErrors(t,!0);return c>-1&&(t.parenthesizedAssign=c),f>-1&&(t.trailingComma=f),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(o.question)){var f=this.startNodeAt(s,a);return f.test=c,f.consequent=this.parseMaybeAssign(),this.expect(o.colon),f.alternate=this.parseMaybeAssign(e),this.finishNode(f,"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 f=this.type.binop;if(f!=null&&(!c||this.type!==o._in)&&f>a){var p=this.type===o.logicalOR||this.type===o.logicalAND,g=this.type===o.coalesce;g&&(f=o.logicalAND.binop);var b=this.value;this.next();var R=this.start,L=this.startLoc,$=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,c),R,L,f,c),z=this.buildBinary(t,s,e,$,b,p||g);return(p&&this.type===o.coalesce||g&&(this.type===o.logicalOR||this.type===o.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(z,t,s,a,c)}return e},P.buildBinary=function(e,t,s,a,c,f){a.type==="PrivateIdentifier"&&this.raise(a.start,"Private identifier can only be left side of binary expression");var p=this.startNodeAt(e,t);return p.left=s,p.operator=c,p.right=a,this.finishNode(p,f?"LogicalExpression":"BinaryExpression")},P.parseMaybeUnary=function(e,t,s,a){var c=this.start,f=this.startLoc,p;if(this.isContextual("await")&&this.canAwait)p=this.parseAwait(a),t=!0;else if(this.type.prefix){var g=this.startNode(),b=this.type===o.incDec;g.operator=this.value,g.prefix=!0,this.next(),g.argument=this.parseMaybeUnary(null,!0,b,a),this.checkExpressionErrors(e,!0),b?this.checkLValSimple(g.argument):this.strict&&g.operator==="delete"&&$i(g.argument)?this.raiseRecoverable(g.start,"Deleting local variable in strict mode"):g.operator==="delete"&&Ot(g.argument)?this.raiseRecoverable(g.start,"Private fields can not be deleted"):t=!0,p=this.finishNode(g,b?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===o.privateId)(a||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),p=this.parsePrivateIdent(),this.type!==o._in&&this.unexpected();else{if(p=this.parseExprSubscripts(e,a),this.checkExpressionErrors(e))return p;for(;this.type.postfix&&!this.canInsertSemicolon();){var R=this.startNodeAt(c,f);R.operator=this.value,R.prefix=!1,R.argument=p,this.checkLValSimple(p),this.next(),p=this.finishNode(R,"UpdateExpression")}}if(!s&&this.eat(o.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(c,f,p,this.parseMaybeUnary(null,!1,!1,a),"**",!1);else return p};function $i(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&$i(e.expression)}function Ot(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Ot(e.expression)||e.type==="ParenthesizedExpression"&&Ot(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 f=this.parseSubscripts(c,s,a,!1,t);return e&&f.type==="MemberExpression"&&(e.parenthesizedAssign>=f.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=f.start&&(e.parenthesizedBind=-1),e.trailingComma>=f.start&&(e.trailingComma=-1)),f},P.parseSubscripts=function(e,t,s,a,c){for(var f=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,p=!1;;){var g=this.parseSubscript(e,t,s,a,f,p,c);if(g.optional&&(p=!0),g===e||g.type==="ArrowFunctionExpression"){if(p){var b=this.startNodeAt(t,s);b.expression=g,g=this.finishNode(b,"ChainExpression")}return g}e=g}},P.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(o.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,f,p){var g=this.options.ecmaVersion>=11,b=g&&this.eat(o.questionDot);a&&b&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var R=this.eat(o.bracketL);if(R||b&&this.type!==o.parenL&&this.type!==o.backQuote||this.eat(o.dot)){var L=this.startNodeAt(t,s);L.object=e,R?(L.property=this.parseExpression(),this.expect(o.bracketR)):this.type===o.privateId&&e.type!=="Super"?L.property=this.parsePrivateIdent():L.property=this.parseIdent(this.options.allowReserved!=="never"),L.computed=!!R,g&&(L.optional=b),e=this.finishNode(L,"MemberExpression")}else if(!a&&this.eat(o.parenL)){var $=new Je,z=this.yieldPos,je=this.awaitPos,Ie=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var st=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1,$);if(c&&!b&&this.shouldParseAsyncArrow())return this.checkPatternErrors($,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=z,this.awaitPos=je,this.awaitIdentPos=Ie,this.parseSubscriptAsyncArrow(t,s,st,p);this.checkExpressionErrors($,!0),this.yieldPos=z||this.yieldPos,this.awaitPos=je||this.awaitPos,this.awaitIdentPos=Ie||this.awaitIdentPos;var ke=this.startNodeAt(t,s);ke.callee=e,ke.arguments=st,g&&(ke.optional=b),e=this.finishNode(ke,"CallExpression")}else if(this.type===o.backQuote){(b||f)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Ae=this.startNodeAt(t,s);Ae.tag=e,Ae.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(Ae,"TaggedTemplateExpression")}return e},P.parseExprAtom=function(e,t,s){this.type===o.slash&&this.readRegexp();var a,c=this.potentialArrowAt===this.start;switch(this.type){case o._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),a=this.startNode(),this.next(),this.type===o.parenL&&!this.allowDirectSuper&&this.raise(a.start,"super() call outside constructor of a subclass"),this.type!==o.dot&&this.type!==o.bracketL&&this.type!==o.parenL&&this.unexpected(),this.finishNode(a,"Super");case o._this:return a=this.startNode(),this.next(),this.finishNode(a,"ThisExpression");case o.name:var f=this.start,p=this.startLoc,g=this.containsEsc,b=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!g&&b.name==="async"&&!this.canInsertSemicolon()&&this.eat(o._function))return this.overrideContext(F.f_expr),this.parseFunction(this.startNodeAt(f,p),0,!1,!0,t);if(c&&!this.canInsertSemicolon()){if(this.eat(o.arrow))return this.parseArrowExpression(this.startNodeAt(f,p),[b],!1,t);if(this.options.ecmaVersion>=8&&b.name==="async"&&this.type===o.name&&!g&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return b=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(o.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(f,p),[b],!0,t)}return b;case o.regexp:var R=this.value;return a=this.parseLiteral(R.value),a.regex={pattern:R.pattern,flags:R.flags},a;case o.num:case o.string:return this.parseLiteral(this.value);case o._null:case o._true:case o._false:return a=this.startNode(),a.value=this.type===o._null?null:this.type===o._true,a.raw=this.type.keyword,this.next(),this.finishNode(a,"Literal");case o.parenL:var L=this.start,$=this.parseParenAndDistinguishExpression(c,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget($)&&(e.parenthesizedAssign=L),e.parenthesizedBind<0&&(e.parenthesizedBind=L)),$;case o.bracketL:return a=this.startNode(),this.next(),a.elements=this.parseExprList(o.bracketR,!0,!0,e),this.finishNode(a,"ArrayExpression");case o.braceL:return this.overrideContext(F.b_expr),this.parseObj(!1,e);case o._function:return a=this.startNode(),this.next(),this.parseFunction(a,0);case o._class:return this.parseClass(this.startNode(),!1);case o._new:return this.parseNew();case o.backQuote:return this.parseTemplate();case o._import:return this.options.ecmaVersion>=11?this.parseExprImport(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===o.parenL&&!e)return this.parseDynamicImport(t);if(this.type===o.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(o.parenR)?e.options=null:(this.expect(o.comma),this.afterTrailingComma(o.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(o.parenR)||(this.expect(o.comma),this.afterTrailingComma(o.parenR)||this.unexpected())));else if(!this.eat(o.parenR)){var t=this.start;this.eat(o.comma)&&this.eat(o.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},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(o.parenL);var e=this.parseExpression();return this.expect(o.parenR),e},P.shouldParseArrow=function(e){return!this.canInsertSemicolon()},P.parseParenAndDistinguishExpression=function(e,t){var s=this.start,a=this.startLoc,c,f=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var p=this.start,g=this.startLoc,b=[],R=!0,L=!1,$=new Je,z=this.yieldPos,je=this.awaitPos,Ie;for(this.yieldPos=0,this.awaitPos=0;this.type!==o.parenR;)if(R?R=!1:this.expect(o.comma),f&&this.afterTrailingComma(o.parenR,!0)){L=!0;break}else if(this.type===o.ellipsis){Ie=this.start,b.push(this.parseParenItem(this.parseRestBinding())),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else b.push(this.parseMaybeAssign(!1,$,this.parseParenItem));var st=this.lastTokEnd,ke=this.lastTokEndLoc;if(this.expect(o.parenR),e&&this.shouldParseArrow(b)&&this.eat(o.arrow))return this.checkPatternErrors($,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=z,this.awaitPos=je,this.parseParenArrowList(s,a,b,t);(!b.length||L)&&this.unexpected(this.lastTokStart),Ie&&this.unexpected(Ie),this.checkExpressionErrors($,!0),this.yieldPos=z||this.yieldPos,this.awaitPos=je||this.awaitPos,b.length>1?(c=this.startNodeAt(p,g),c.expressions=b,this.finishNodeAt(c,"SequenceExpression",st,ke)):c=b[0]}else c=this.parseParenExpression();if(this.options.preserveParens){var Ae=this.startNodeAt(s,a);return Ae.expression=c,this.finishNode(Ae,"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 Ba=[];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===o.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var 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(o.parenL)?e.arguments=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Ba,this.finishNode(e,"NewExpression")},P.parseTemplateElement=function(e){var t=e.isTagged,s=this.startNode();return this.type===o.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),s.value={raw:this.value.replace(/\r\n?/g,`
|
|
12
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===o.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===o.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(o.dollarBraceL),s.expressions.push(this.parseExpression()),this.expect(o.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===o.name||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===o.star)&&!X.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(o.braceR);){if(a)a=!1;else if(this.expect(o.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(o.braceR))break;var f=this.parseProperty(e,t);e||this.checkPropClash(f,c,t),s.properties.push(f)}return this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},P.parseProperty=function(e,t){var s=this.startNode(),a,c,f,p;if(this.options.ecmaVersion>=9&&this.eat(o.ellipsis))return e?(s.argument=this.parseIdent(!1),this.type===o.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===o.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)&&(f=this.start,p=this.startLoc),e||(a=this.eat(o.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(o.star),this.parsePropertyName(s)):c=!1,this.parsePropertyValue(s,e,a,c,f,p,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,f,p,g){(s||a)&&this.type===o.colon&&this.unexpected(),this.eat(o.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,p),e.kind="init"):this.options.ecmaVersion>=6&&this.type===o.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!==o.comma&&this.type!==o.braceR&&this.type!==o.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,f,this.copyNode(e.key)):this.type===o.eq&&p?(p.shorthandAssign<0&&(p.shorthandAssign=this.start),e.value=this.parseMaybeDefault(c,f,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(o.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(o.bracketR),e.key;e.computed=!1}return e.key=this.type===o.num||this.type===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},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,f=this.awaitPos,p=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(Rt(t,a.generator)|Ke|(s?Ri:0)),this.expect(o.parenL),a.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(a,!1,!0,!1),this.yieldPos=c,this.awaitPos=f,this.awaitIdentPos=p,this.finishNode(a,"FunctionExpression")},P.parseArrowExpression=function(e,t,s,a){var c=this.yieldPos,f=this.awaitPos,p=this.awaitIdentPos;return this.enterScope(Rt(s,!1)|Nt),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=f,this.awaitIdentPos=p,this.finishNode(e,"ArrowFunctionExpression")},P.parseFunctionBody=function(e,t,s,a){var c=t&&this.type!==o.braceL,f=this.strict,p=!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);(!f||g)&&(p=this.strictDirective(this.end),p&&g&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var b=this.labels;this.labels=[],p&&(this.strict=!0),this.checkParams(e,!f&&!p&&!t&&!s&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Oi),e.body=this.parseBlock(!1,void 0,p&&!f),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=b}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 f=c[a];this.checkLValInnerPattern(f,Pt,t?null:s)}},P.parseExprList=function(e,t,s,a){for(var c=[],f=!0;!this.eat(e);){if(f)f=!1;else if(this.expect(o.comma),t&&this.afterTrailingComma(e))break;var p=void 0;s&&this.type===o.comma?p=null:this.type===o.ellipsis?(p=this.parseSpread(a),a&&this.type===o.comma&&a.trailingComma<0&&(a.trailingComma=this.start)):p=this.parseMaybeAssign(!1,a),c.push(p)}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&Ye)&&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===o.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=o.name):this.unexpected(),e},P.parsePrivateIdent=function(){var e=this.startNode();return this.type===o.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===o.semi||this.canInsertSemicolon()||this.type!==o.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(o.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 et=q.prototype;et.raise=function(e,t){var s=kt(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},et.raiseRecoverable=et.raise,et.curPosition=function(){if(this.options.locations)return new Ce(this.curLine,this.pos-this.lineStart)};var me=q.prototype,Fa=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};me.enterScope=function(e){this.scopeStack.push(new Fa(e))},me.exitScope=function(){this.scopeStack.pop()},me.treatFunctionsAsVarInScope=function(e){return e.flags&Ee||!this.inModule&&e.flags&ye},me.declareName=function(e,t,s){var a=!1;if(t===he){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&ye&&delete this.undefinedExports[e]}else if(t===Li){var f=this.currentScope();f.lexical.push(e)}else if(t===Ti){var p=this.currentScope();this.treatFunctionsAsVar?a=p.lexical.indexOf(e)>-1:a=p.lexical.indexOf(e)>-1||p.var.indexOf(e)>-1,p.functions.push(e)}else for(var g=this.scopeStack.length-1;g>=0;--g){var b=this.scopeStack[g];if(b.lexical.indexOf(e)>-1&&!(b.flags&Ni&&b.lexical[0]===e)||!this.treatFunctionsAsVarInScope(b)&&b.functions.indexOf(e)>-1){a=!0;break}if(b.var.push(e),this.inModule&&b.flags&ye&&delete this.undefinedExports[e],b.flags&Ye)break}a&&this.raiseRecoverable(s,"Identifier '"+e+"' has already been declared")},me.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},me.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},me.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Ye|$e|be))return t}},me.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Ye|$e|be)&&!(t.flags&Nt))return t}};var qe=function(t,s,a){this.type="",this.start=s,this.end=0,t.options.locations&&(this.loc=new Fe(t,a)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[s,0])},Be=q.prototype;Be.startNode=function(){return new qe(this,this.start,this.startLoc)},Be.startNodeAt=function(e,t){return new qe(this,e,t)};function $i(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}Be.finishNode=function(e,t){return $i.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Be.finishNodeAt=function(e,t,s,a){return $i.call(this,e,t,s,a)},Be.copyNode=function(e){var t=new qe(this,e.start,this.startLoc);for(var s in e)t[s]=e[s];return t};var $a="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",Di="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",qi=Di+" Extended_Pictographic",Bi=qi,ji=Bi+" EBase EComp EMod EPres ExtPict",Ui=ji,Da=Ui,qa={9:Di,10:qi,11:Bi,12:ji,13:Ui,14:Da},Ba="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",ja={9:"",10:"",11:"",12:"",13:"",14:Ba},Mi="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",Gi="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",Hi=Gi+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Wi=Hi+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",zi=Wi+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Xi=zi+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ua=Xi+" "+$a,Ma={9:Gi,10:Hi,11:Wi,12:zi,13:Xi,14:Ua},Ki={};function Ga(e){var t=Ki[e]={binary:de(qa[e]+" "+Mi),binaryOfStrings:de(ja[e]),nonBinary:{General_Category:de(Mi),Script:de(Ma[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 Vt=0,Yi=[9,10,11,12,13,14];Vt<Yi.length;Vt+=1){var Ha=Yi[Vt];Ga(Ha)}var I=q.prototype,tt=function(t,s){this.parent=t,this.base=s||this};tt.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},tt.prototype.sibling=function(){return new tt(this.parent,this.base)};var ae=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=Ki[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};ae.prototype.reset=function(t,s,a){var c=a.indexOf("v")!==-1,f=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=f&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=f&&this.parser.options.ecmaVersion>=9)},ae.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},ae.prototype.at=function(t,s){s===void 0&&(s=!1);var a=this.source,c=a.length;if(t>=c)return-1;var f=a.charCodeAt(t);if(!(s||this.switchU)||f<=55295||f>=57344||t+1>=c)return f;var p=a.charCodeAt(t+1);return p>=56320&&p<=57343?(f<<10)+p-56613888:f},ae.prototype.nextIndex=function(t,s){s===void 0&&(s=!1);var a=this.source,c=a.length;if(t>=c)return c;var f=a.charCodeAt(t),p;return!(s||this.switchU)||f<=55295||f>=57344||t+1>=c||(p=a.charCodeAt(t+1))<56320||p>57343?t+1:t+2},ae.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)},ae.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},ae.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)},ae.prototype.eat=function(t,s){return s===void 0&&(s=!1),this.current(s)===t?(this.advance(s),!0):!1},ae.prototype.eatChars=function(t,s){s===void 0&&(s=!1);for(var a=this.pos,c=0,f=t;c<f.length;c+=1){var p=f[c],g=this.at(a,s);if(g===-1||g!==p)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,f=0;f<s.length;f++){var p=s.charAt(f);t.indexOf(p)===-1&&this.raise(e.start,"Invalid regular expression flag"),s.indexOf(p,f+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),p==="u"&&(a=!0),p==="v"&&(c=!0)}this.options.ecmaVersion>=15&&a&&c&&this.raise(e.start,"Invalid regular expression flag")};function Wa(e){for(var t in e)return!0;return!1}I.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Wa(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 tt(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 f=s.charAt(c);s.indexOf(f,c+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(a){var p=this.regexp_eatModifiers(e);!s&&!p&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var g=0;g<p.length;g++){var b=p.charAt(g);(p.indexOf(b,g+1)>-1||s.indexOf(b)>-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&&za(s);)t+=ce(s),e.advance();return t};function za(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 Qi(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Qi(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&&!Qi(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 f=c[a];f.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+=ce(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ce(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),Xa(a)?(e.lastIntValue=a,!0):(e.pos=t,!1)};function Xa(e){return S(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),Ka(a)?(e.lastIntValue=a,!0):(e.pos=t,!1)};function Ka(e){return E(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&&!it(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 Ji(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Ji(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 f=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var p=e.lastIntValue;if(p>=56320&&p<=57343)return e.lastIntValue=(c-55296)*1024+(p-56320)+65536,!0}e.pos=f,e.lastIntValue=c}return!0}if(a&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Ya(e.lastIntValue))return!0;a&&e.raise("Invalid unicode escape"),e.pos=s}return!1};function Ya(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 Zi=0,le=1,te=2;I.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Qa(t))return e.lastIntValue=-1,e.advance(),le;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===te&&e.raise("Invalid property name"),a;e.raise("Invalid property name")}return Zi};function Qa(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),le}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var c=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,c)}return Zi},I.regexp_validateUnicodePropertyNameAndValue=function(e,t,s){we(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 le;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return te;e.raise("Invalid property name")},I.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";er(t=e.current());)e.lastStringValue+=ce(t),e.advance();return e.lastStringValue!==""};function er(e){return Ji(e)||e===95}I.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Ja(t=e.current());)e.lastStringValue+=ce(t),e.advance();return e.lastStringValue!==""};function Ja(e){return er(e)||it(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===te&&e.raise("Negated character class may contain strings"),!0}return!1},I.regexp_classContents=function(e){return e.current()===93?le:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),le)},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||rr(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=le,s;if(!this.regexp_eatClassSetRange(e))if(s=this.regexp_eatClassSetOperand(e)){s===te&&(t=te);for(var a=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(s=this.regexp_eatClassSetOperand(e))){s!==te&&(t=le);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===te&&(t=te)}},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)?le: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===te&&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)===te&&(t=te);return t},I.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?le:te},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()&&Za(s)||eo(s)?!1:(e.advance(),e.lastIntValue=s,!0)};function Za(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 eo(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 to(t)?(e.lastIntValue=t,e.advance(),!0):!1};function to(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 it(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;it(s=e.current());)e.lastIntValue=10*e.lastIntValue+(s-48),e.advance();return e.pos!==t};function it(e){return e>=48&&e<=57}I.regexp_eatHexDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;tr(s=e.current());)e.lastIntValue=16*e.lastIntValue+ir(s),e.advance();return e.pos!==t};function tr(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function ir(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 rr(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function rr(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(!tr(c))return e.pos=s,!1;e.lastIntValue=16*e.lastIntValue+ir(c),e.advance()}return!0};var rt=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Fe(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 rt(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 rt(this)},typeof Symbol<"u"&&(O[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===o.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(o.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())},O.readToken=function(e){return S(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=wi(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&&!ve(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&&It.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(o.ellipsis)):(++this.pos,this.finishToken(o.dot))},O.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(o.assign,2):this.finishOp(o.slash,1)},O.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),s=1,a=e===42?o.star:o.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++s,a=o.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(o.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(o.assign,3)}return this.finishOp(e===124?o.logicalOR:o.logicalAND,2)}return t===61?this.finishOp(o.assign,2):this.finishOp(e===124?o.bitwiseOR:o.bitwiseAND,1)},O.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(o.assign,2):this.finishOp(o.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||X.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(o.incDec,2):t===61?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)},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(o.assign,s+1):this.finishOp(o.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(o.relational,s))},O.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(o.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(o.arrow)):this.finishOp(e===61?o.eq:o.prefix,1)},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(o.questionDot,2)}if(t===63){if(e>=12){var a=this.input.charCodeAt(this.pos+2);if(a===61)return this.finishOp(o.assign,3)}return this.finishOp(o.coalesce,2)}}return this.finishOp(o.question,1)},O.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),S(t,!0)||t===92))return this.finishToken(o.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+ce(t)+"'")},O.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(o.parenL);case 41:return++this.pos,this.finishToken(o.parenR);case 59:return++this.pos,this.finishToken(o.semi);case 44:return++this.pos,this.finishToken(o.comma);case 91:return++this.pos,this.finishToken(o.bracketL);case 93:return++this.pos,this.finishToken(o.bracketR);case 123:return++this.pos,this.finishToken(o.braceL);case 125:return++this.pos,this.finishToken(o.braceR);case 58:return++this.pos,this.finishToken(o.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(o.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(o.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+ce(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(X.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 f=this.pos,p=this.readWord1();this.containsEsc&&this.unexpected(f);var g=this.regexpState||(this.regexpState=new ae(this));g.reset(s,c,p),this.validateRegExpFlags(g),this.validateRegExpPattern(g);var b=null;try{b=new RegExp(c,p)}catch{}return this.finishToken(o.regexp,{pattern:c,flags:p,value:b})},O.readInt=function(e,t,s){for(var a=this.options.ecmaVersion>=12&&t===void 0,c=s&&this.input.charCodeAt(this.pos)===48,f=this.pos,p=0,g=0,b=0,R=t??1/0;b<R;++b,++this.pos){var L=this.input.charCodeAt(this.pos),$=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"),b===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),g=L;continue}if(L>=97?$=L-97+10:L>=65?$=L-65+10:L>=48&&L<=57?$=L-48:$=1/0,$>=e)break;g=L,p=p*e+$}return a&&g===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===f||t!=null&&this.pos-f!==t?null:p};function io(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function sr(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=sr(this.input.slice(t,this.pos)),++this.pos):S(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.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=sr(this.input.slice(t,this.pos));return++this.pos,S(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.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")),S(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var f=io(this.input.slice(t,this.pos),s);return this.finishToken(o.num,f)},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)):(ve(a)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(s,this.pos++),this.finishToken(o.string,t)};var nr={};O.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===nr)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},O.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw nr;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===o.template||this.type===o.invalidTemplate)?s===36?(this.pos+=2,this.finishToken(o.dollarBraceL)):(++this.pos,this.finishToken(o.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(o.template,e));if(s===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(ve(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+=`
|
|
13
|
+
`),cooked:this.value},this.next(),s.tail=this.type===o.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===o.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(o.dollarBraceL),s.expressions.push(this.parseExpression()),this.expect(o.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===o.name||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===o.star)&&!X.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(o.braceR);){if(a)a=!1;else if(this.expect(o.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(o.braceR))break;var f=this.parseProperty(e,t);e||this.checkPropClash(f,c,t),s.properties.push(f)}return this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},P.parseProperty=function(e,t){var s=this.startNode(),a,c,f,p;if(this.options.ecmaVersion>=9&&this.eat(o.ellipsis))return e?(s.argument=this.parseIdent(!1),this.type===o.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===o.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)&&(f=this.start,p=this.startLoc),e||(a=this.eat(o.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(o.star),this.parsePropertyName(s)):c=!1,this.parsePropertyValue(s,e,a,c,f,p,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,f,p,g){(s||a)&&this.type===o.colon&&this.unexpected(),this.eat(o.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,p),e.kind="init"):this.options.ecmaVersion>=6&&this.type===o.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!==o.comma&&this.type!==o.braceR&&this.type!==o.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,f,this.copyNode(e.key)):this.type===o.eq&&p?(p.shorthandAssign<0&&(p.shorthandAssign=this.start),e.value=this.parseMaybeDefault(c,f,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(o.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(o.bracketR),e.key;e.computed=!1}return e.key=this.type===o.num||this.type===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},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,f=this.awaitPos,p=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(Rt(t,a.generator)|Ke|(s?Pi:0)),this.expect(o.parenL),a.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(a,!1,!0,!1),this.yieldPos=c,this.awaitPos=f,this.awaitIdentPos=p,this.finishNode(a,"FunctionExpression")},P.parseArrowExpression=function(e,t,s,a){var c=this.yieldPos,f=this.awaitPos,p=this.awaitIdentPos;return this.enterScope(Rt(s,!1)|Nt),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=f,this.awaitIdentPos=p,this.finishNode(e,"ArrowFunctionExpression")},P.parseFunctionBody=function(e,t,s,a){var c=t&&this.type!==o.braceL,f=this.strict,p=!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);(!f||g)&&(p=this.strictDirective(this.end),p&&g&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var b=this.labels;this.labels=[],p&&(this.strict=!0),this.checkParams(e,!f&&!p&&!t&&!s&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Vi),e.body=this.parseBlock(!1,void 0,p&&!f),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=b}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 f=c[a];this.checkLValInnerPattern(f,Pt,t?null:s)}},P.parseExprList=function(e,t,s,a){for(var c=[],f=!0;!this.eat(e);){if(f)f=!1;else if(this.expect(o.comma),t&&this.afterTrailingComma(e))break;var p=void 0;s&&this.type===o.comma?p=null:this.type===o.ellipsis?(p=this.parseSpread(a),a&&this.type===o.comma&&a.trailingComma<0&&(a.trailingComma=this.start)):p=this.parseMaybeAssign(!1,a),c.push(p)}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&Ye)&&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===o.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=o.name):this.unexpected(),e},P.parsePrivateIdent=function(){var e=this.startNode();return this.type===o.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===o.semi||this.canInsertSemicolon()||this.type!==o.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(o.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 et=q.prototype;et.raise=function(e,t){var s=kt(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},et.raiseRecoverable=et.raise,et.curPosition=function(){if(this.options.locations)return new Ce(this.curLine,this.pos-this.lineStart)};var me=q.prototype,ja=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};me.enterScope=function(e){this.scopeStack.push(new ja(e))},me.exitScope=function(){this.scopeStack.pop()},me.treatFunctionsAsVarInScope=function(e){return e.flags&Ee||!this.inModule&&e.flags&ye},me.declareName=function(e,t,s){var a=!1;if(t===he){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&ye&&delete this.undefinedExports[e]}else if(t===Oi){var f=this.currentScope();f.lexical.push(e)}else if(t===Li){var p=this.currentScope();this.treatFunctionsAsVar?a=p.lexical.indexOf(e)>-1:a=p.lexical.indexOf(e)>-1||p.var.indexOf(e)>-1,p.functions.push(e)}else for(var g=this.scopeStack.length-1;g>=0;--g){var b=this.scopeStack[g];if(b.lexical.indexOf(e)>-1&&!(b.flags&Ri&&b.lexical[0]===e)||!this.treatFunctionsAsVarInScope(b)&&b.functions.indexOf(e)>-1){a=!0;break}if(b.var.push(e),this.inModule&&b.flags&ye&&delete this.undefinedExports[e],b.flags&Ye)break}a&&this.raiseRecoverable(s,"Identifier '"+e+"' has already been declared")},me.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},me.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},me.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Ye|$e|be))return t}},me.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Ye|$e|be)&&!(t.flags&Nt))return t}};var qe=function(t,s,a){this.type="",this.start=s,this.end=0,t.options.locations&&(this.loc=new Fe(t,a)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[s,0])},Be=q.prototype;Be.startNode=function(){return new qe(this,this.start,this.startLoc)},Be.startNodeAt=function(e,t){return new qe(this,e,t)};function Di(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}Be.finishNode=function(e,t){return Di.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Be.finishNodeAt=function(e,t,s,a){return Di.call(this,e,t,s,a)},Be.copyNode=function(e){var t=new qe(this,e.start,this.startLoc);for(var s in e)t[s]=e[s];return t};var Ua="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",qi="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",Bi=qi+" Extended_Pictographic",ji=Bi,Ui=ji+" EBase EComp EMod EPres ExtPict",Mi=Ui,Ma=Mi,Ga={9:qi,10:Bi,11:ji,12:Ui,13:Mi,14:Ma},Ha="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Wa={9:"",10:"",11:"",12:"",13:"",14:Ha},Gi="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",Hi="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",Wi=Hi+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",zi=Wi+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Xi=zi+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Ki=Xi+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",za=Ki+" "+Ua,Xa={9:Hi,10:Wi,11:zi,12:Xi,13:Ki,14:za},Yi={};function Ka(e){var t=Yi[e]={binary:de(Ga[e]+" "+Gi),binaryOfStrings:de(Wa[e]),nonBinary:{General_Category:de(Gi),Script:de(Xa[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 Vt=0,Qi=[9,10,11,12,13,14];Vt<Qi.length;Vt+=1){var Ya=Qi[Vt];Ka(Ya)}var I=q.prototype,tt=function(t,s){this.parent=t,this.base=s||this};tt.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},tt.prototype.sibling=function(){return new tt(this.parent,this.base)};var ae=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=Yi[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};ae.prototype.reset=function(t,s,a){var c=a.indexOf("v")!==-1,f=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=f&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=f&&this.parser.options.ecmaVersion>=9)},ae.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},ae.prototype.at=function(t,s){s===void 0&&(s=!1);var a=this.source,c=a.length;if(t>=c)return-1;var f=a.charCodeAt(t);if(!(s||this.switchU)||f<=55295||f>=57344||t+1>=c)return f;var p=a.charCodeAt(t+1);return p>=56320&&p<=57343?(f<<10)+p-56613888:f},ae.prototype.nextIndex=function(t,s){s===void 0&&(s=!1);var a=this.source,c=a.length;if(t>=c)return c;var f=a.charCodeAt(t),p;return!(s||this.switchU)||f<=55295||f>=57344||t+1>=c||(p=a.charCodeAt(t+1))<56320||p>57343?t+1:t+2},ae.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)},ae.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},ae.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)},ae.prototype.eat=function(t,s){return s===void 0&&(s=!1),this.current(s)===t?(this.advance(s),!0):!1},ae.prototype.eatChars=function(t,s){s===void 0&&(s=!1);for(var a=this.pos,c=0,f=t;c<f.length;c+=1){var p=f[c],g=this.at(a,s);if(g===-1||g!==p)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,f=0;f<s.length;f++){var p=s.charAt(f);t.indexOf(p)===-1&&this.raise(e.start,"Invalid regular expression flag"),s.indexOf(p,f+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),p==="u"&&(a=!0),p==="v"&&(c=!0)}this.options.ecmaVersion>=15&&a&&c&&this.raise(e.start,"Invalid regular expression flag")};function Qa(e){for(var t in e)return!0;return!1}I.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Qa(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 tt(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 f=s.charAt(c);s.indexOf(f,c+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(a){var p=this.regexp_eatModifiers(e);!s&&!p&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var g=0;g<p.length;g++){var b=p.charAt(g);(p.indexOf(b,g+1)>-1||s.indexOf(b)>-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&&Ja(s);)t+=ce(s),e.advance();return t};function Ja(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 Ji(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Ji(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&&!Ji(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 f=c[a];f.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+=ce(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ce(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),Za(a)?(e.lastIntValue=a,!0):(e.pos=t,!1)};function Za(e){return S(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),eo(a)?(e.lastIntValue=a,!0):(e.pos=t,!1)};function eo(e){return E(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&&!it(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 Zi(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Zi(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 f=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var p=e.lastIntValue;if(p>=56320&&p<=57343)return e.lastIntValue=(c-55296)*1024+(p-56320)+65536,!0}e.pos=f,e.lastIntValue=c}return!0}if(a&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&to(e.lastIntValue))return!0;a&&e.raise("Invalid unicode escape"),e.pos=s}return!1};function to(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 er=0,le=1,te=2;I.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(io(t))return e.lastIntValue=-1,e.advance(),le;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===te&&e.raise("Invalid property name"),a;e.raise("Invalid property name")}return er};function io(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),le}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var c=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,c)}return er},I.regexp_validateUnicodePropertyNameAndValue=function(e,t,s){we(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 le;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return te;e.raise("Invalid property name")},I.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";tr(t=e.current());)e.lastStringValue+=ce(t),e.advance();return e.lastStringValue!==""};function tr(e){return Zi(e)||e===95}I.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";ro(t=e.current());)e.lastStringValue+=ce(t),e.advance();return e.lastStringValue!==""};function ro(e){return tr(e)||it(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===te&&e.raise("Negated character class may contain strings"),!0}return!1},I.regexp_classContents=function(e){return e.current()===93?le:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),le)},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||sr(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=le,s;if(!this.regexp_eatClassSetRange(e))if(s=this.regexp_eatClassSetOperand(e)){s===te&&(t=te);for(var a=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(s=this.regexp_eatClassSetOperand(e))){s!==te&&(t=le);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===te&&(t=te)}},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)?le: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===te&&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)===te&&(t=te);return t},I.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?le:te},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()&&so(s)||no(s)?!1:(e.advance(),e.lastIntValue=s,!0)};function so(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 no(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 ao(t)?(e.lastIntValue=t,e.advance(),!0):!1};function ao(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 it(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;it(s=e.current());)e.lastIntValue=10*e.lastIntValue+(s-48),e.advance();return e.pos!==t};function it(e){return e>=48&&e<=57}I.regexp_eatHexDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;ir(s=e.current());)e.lastIntValue=16*e.lastIntValue+rr(s),e.advance();return e.pos!==t};function ir(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function rr(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 sr(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function sr(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(!ir(c))return e.pos=s,!1;e.lastIntValue=16*e.lastIntValue+rr(c),e.advance()}return!0};var rt=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Fe(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 rt(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 rt(this)},typeof Symbol<"u"&&(O[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===o.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(o.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())},O.readToken=function(e){return S(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=Ci(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&&!ve(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&&It.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(o.ellipsis)):(++this.pos,this.finishToken(o.dot))},O.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(o.assign,2):this.finishOp(o.slash,1)},O.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),s=1,a=e===42?o.star:o.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++s,a=o.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(o.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(o.assign,3)}return this.finishOp(e===124?o.logicalOR:o.logicalAND,2)}return t===61?this.finishOp(o.assign,2):this.finishOp(e===124?o.bitwiseOR:o.bitwiseAND,1)},O.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(o.assign,2):this.finishOp(o.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||X.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(o.incDec,2):t===61?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)},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(o.assign,s+1):this.finishOp(o.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(o.relational,s))},O.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(o.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(o.arrow)):this.finishOp(e===61?o.eq:o.prefix,1)},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(o.questionDot,2)}if(t===63){if(e>=12){var a=this.input.charCodeAt(this.pos+2);if(a===61)return this.finishOp(o.assign,3)}return this.finishOp(o.coalesce,2)}}return this.finishOp(o.question,1)},O.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),S(t,!0)||t===92))return this.finishToken(o.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+ce(t)+"'")},O.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(o.parenL);case 41:return++this.pos,this.finishToken(o.parenR);case 59:return++this.pos,this.finishToken(o.semi);case 44:return++this.pos,this.finishToken(o.comma);case 91:return++this.pos,this.finishToken(o.bracketL);case 93:return++this.pos,this.finishToken(o.bracketR);case 123:return++this.pos,this.finishToken(o.braceL);case 125:return++this.pos,this.finishToken(o.braceR);case 58:return++this.pos,this.finishToken(o.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(o.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(o.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+ce(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(X.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 f=this.pos,p=this.readWord1();this.containsEsc&&this.unexpected(f);var g=this.regexpState||(this.regexpState=new ae(this));g.reset(s,c,p),this.validateRegExpFlags(g),this.validateRegExpPattern(g);var b=null;try{b=new RegExp(c,p)}catch{}return this.finishToken(o.regexp,{pattern:c,flags:p,value:b})},O.readInt=function(e,t,s){for(var a=this.options.ecmaVersion>=12&&t===void 0,c=s&&this.input.charCodeAt(this.pos)===48,f=this.pos,p=0,g=0,b=0,R=t??1/0;b<R;++b,++this.pos){var L=this.input.charCodeAt(this.pos),$=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"),b===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),g=L;continue}if(L>=97?$=L-97+10:L>=65?$=L-65+10:L>=48&&L<=57?$=L-48:$=1/0,$>=e)break;g=L,p=p*e+$}return a&&g===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===f||t!=null&&this.pos-f!==t?null:p};function oo(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function nr(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=nr(this.input.slice(t,this.pos)),++this.pos):S(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.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=nr(this.input.slice(t,this.pos));return++this.pos,S(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.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")),S(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var f=oo(this.input.slice(t,this.pos),s);return this.finishToken(o.num,f)},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)):(ve(a)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(s,this.pos++),this.finishToken(o.string,t)};var ar={};O.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===ar)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},O.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ar;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===o.template||this.type===o.invalidTemplate)?s===36?(this.pos+=2,this.finishToken(o.dollarBraceL)):(++this.pos,this.finishToken(o.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(o.template,e));if(s===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(ve(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
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(o.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
|
15
15
|
`&&++this.pos;case`
|
|
16
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 ce(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 ve(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(E(c,a))this.pos+=c<=65535?1:2;else if(c===92){this.containsEsc=!0,e+=this.input.slice(s,this.pos);var f=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var p=this.readCodePoint();(t?S:E)(p,a)||this.invalidStringToken(f,"Invalid Unicode escape"),e+=ce(p),s=this.pos}else break;t=!1}return e+this.input.slice(s,this.pos)},O.readWord=function(){var e=this.readWord1(),t=o.name;return this.keywords.test(e)&&(t=ze[e]),this.finishToken(t,e)};var
|
|
17
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return ce(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 ve(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(E(c,a))this.pos+=c<=65535?1:2;else if(c===92){this.containsEsc=!0,e+=this.input.slice(s,this.pos);var f=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var p=this.readCodePoint();(t?S:E)(p,a)||this.invalidStringToken(f,"Invalid Unicode escape"),e+=ce(p),s=this.pos}else break;t=!1}return e+this.input.slice(s,this.pos)},O.readWord=function(){var e=this.readWord1(),t=o.name;return this.keywords.test(e)&&(t=ze[e]),this.finishToken(t,e)};var or="8.17.0";q.acorn={Parser:q,version:or,defaultOptions:Xe,Position:Ce,SourceLocation:Fe,getLineInfo:kt,Node:qe,TokenType:N,tokTypes:o,keywordTypes:ze,TokContext:ee,tokContexts:F,isIdentifierChar:E,isIdentifierStart:S,Token:rt,isNewLine:ve,lineBreak:X,lineBreakG:wi,nonASCIIwhitespace:It};function uo(e,t){return q.parse(e,t)}function co(e,t,s){return q.parseExpressionAt(e,t,s)}function ho(e,t){return q.tokenizer(e,t)}i.Node=qe,i.Parser=q,i.Position=Ce,i.SourceLocation=Fe,i.TokContext=ee,i.Token=rt,i.TokenType=N,i.defaultOptions=Xe,i.getLineInfo=kt,i.isIdentifierChar=E,i.isIdentifierStart=S,i.isNewLine=ve,i.keywordTypes=ze,i.lineBreak=X,i.lineBreakG=wi,i.nonASCIIwhitespace=It,i.parse=uo,i.parseExpressionAt=co,i.tokContexts=F,i.tokTypes=o,i.tokenizer=ho,i.version=or})});var _a=w((cp,Ca)=>{var{parse:Dl}=ba();function Ve(){let i=new Error("Configuration reads require a data-only object export. Remove executable statements from frontfriend.config.js.");return i.code="FRONTFRIEND_CONFIG_VALIDATION",i}function wa(i){if(i.type!=="Property"||i.computed||i.method||i.kind!=="init")throw Ve();let r=i.key.type==="Identifier"?i.key.name:i.key.value;if(typeof r!="string"||["__proto__","constructor","prototype"].includes(r))throw Ve();return r}function Sa(i){if(i.type==="ExportDefaultDeclaration")return i.declaration;let r=i.type==="ExpressionStatement"?i.expression:null;return r?.type==="AssignmentExpression"&&r.operator==="="&&r.left.type==="MemberExpression"&&!r.left.computed&&r.left.object.name==="module"&&r.left.property.name==="exports"?r.right:null}function ql(i,r){if(i.type!=="VariableDeclaration"||i.declarations.length!==1)return null;let[n]=i.declarations;return n.id.type!=="Identifier"||r?.type!=="Identifier"||r.name!==n.id.name?null:n.init}function Bl(i){let n=Dl(i,{ecmaVersion:"latest",sourceType:"module"}).body.filter(l=>l.type!=="EmptyStatement"&&!l.directive),u=n.length===1?Sa(n[0]):n.length===2?ql(n[0],Sa(n[1])):null;if(u?.type!=="ObjectExpression")throw Ve();function h(l,d=0){if(d>64)throw Ve();if(l.type==="Literal"&&(l.value===null||["string","number","boolean"].includes(typeof l.value)))return l.value;if(l.type==="ArrayExpression")return l.elements.map(m=>{if(!m)throw Ve();return h(m,d+1)});if(l.type==="ObjectExpression")return Object.fromEntries(l.properties.map(m=>[wa(m),h(m.value,d+1)]));if(l.type==="UnaryExpression"&&["-","+"].includes(l.operator)&&l.argument.type==="Literal"&&typeof l.argument.value=="number")return l.operator==="-"?-l.argument.value:l.argument.value;if(l.type==="TemplateLiteral"&&l.expressions.length===0)return l.quasis[0].value.cooked;if(l.type==="MemberExpression"&&!l.computed&&l.object.type==="MemberExpression"&&!l.object.computed&&l.object.object.name==="process"&&l.object.property.name==="env")return process.env[l.property.name];if(l.type==="LogicalExpression"&&["||","??"].includes(l.operator)){let m=h(l.left,d+1);return l.operator==="||"?m||h(l.right,d+1):m??h(l.right,d+1)}throw Ve()}return{config:h(u),expression:u}}Ca.exports={parseStaticConfig:Bl,propertyName:wa}});var Aa=w((hp,ka)=>{var{DEFAULT_API_URL:jl}=at();function Ul(){try{return yi().readCredentials()?.ffApiUrl||null}catch{return null}}function Ia(i=process.cwd()){try{let{findFileUpward:r}=ya(),{parseStaticConfig:n}=_a(),{readFileSafe:u}=nt(),h=r("frontfriend.config.js",i);return h?n(u(h)).config:null}catch{return null}}function Ml({flag:i,config:r,startDir:n,env:u=process.env,loginUrl:h=Ul}={}){r===void 0&&!i&&(r=Ia(n));let l=i||r?.["api-url"]||r?.apiUrl||u.FF_API_URL||(typeof h=="function"?h():h)||jl;return String(l).replace(/\/+$/,"")}ka.exports={resolveApiUrl:Ml,nearestConfig:Ia}});var{toRuntimeComponentConfig:Gl}=lr(),Na='FrontFriend components configuration not found. Run "npx frontfriend init" or "npx frontfriend sync".',Hl="FrontFriend components configuration was not returned by the SaaS app. The cache was not updated.";function bi(i){return i!==null&&typeof i=="object"&&!Array.isArray(i)}function Ra(i,r=Na){if(!bi(i)||Object.keys(i).length===0)throw new Error(r);for(let[n,u]of Object.entries(i))Gl(u,n);return i}var _t=class extends Error{constructor(r){super(r),this.name="Frontfriend",this.code="FF_SETUP_REQUIRED",this.stack=`${this.name}: ${r}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.stack}};function Wl(){try{let i=yi().signedInAccount();return!!(i&&!i.expired)}catch{return!1}}function zl(i=process.cwd()){let{cliCommand:r,loginCommand:n}=gi(),u=`\`${r("init",i)}\``,h="The design system is not installed in this project yet.";if(Wl())return`${h} Run ${u}, then start the app again.`;let l;try{l=Aa().resolveApiUrl({startDir:i})}catch{l=void 0}return`${h} Sign in with \`${n(l,i)}\`, run ${u}, then start the app again.`}function Si(i){return new _t(zl(i))}function Xl(i){let r=i.appRoot||process.cwd();if(!i.exists())throw Si(r);let n=i.load(),u=n?.componentsConfig;if(!bi(u)||Object.keys(u).length===0)throw Si(r);return{componentsConfig:Ra(u),icons:bi(n.icons)?n.icons:{}}}module.exports={CACHE_ERROR_MESSAGE:Na,SAAS_ERROR_MESSAGE:Hl,assertComponentsConfig:Ra,loadCachedComponents:Xl,SetupRequiredError:_t,setupRequiredError:Si};
|