@fastgpt-plugin/cli 0.1.0-alpha.4 → 0.1.0-alpha.5
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/{context-DoVwxr5H-CUnaSkDS.js → context-DoVwxr5H-B6IEtQ3M.js} +1 -1
- package/dist/{dist-VVGwW47P.js → dist-Bvnjjx3Q.js} +1 -1
- package/dist/{dist-B1Eszat4.js → dist-mM4pkTG1.js} +13 -12
- package/dist/index.js +63 -98
- package/dist/{resolver-o20sdYK5-Dnq-MmKm.js → resolver-o20sdYK5-D5TGopbk.js} +1 -1
- package/dist/{tsc-BKODjeoq.js → tsc-By9Scnlt.js} +1 -1
- package/package.json +6 -5
package/dist/index.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import e,{builtinModules as t,createRequire as n,isBuiltin as r}from"node:module";import i,{delimiter as a,dirname as o,isAbsolute as s,join as c,normalize as l,parse as u,resolve as d,sep as f}from"node:path";import{formatWithOptions as p,inspect as m,promisify as h,stripVTControlCharacters as g,styleText as _}from"node:util";import v,{cwd as
|
|
2
|
+
import e,{builtinModules as t,createRequire as n,isBuiltin as r}from"node:module";import i,{delimiter as a,dirname as o,isAbsolute as s,join as c,normalize as l,parse as u,resolve as d,sep as f}from"node:path";import{formatWithOptions as p,inspect as m,promisify as h,stripVTControlCharacters as g,styleText as _}from"node:util";import v,{cwd as ee,env as y}from"node:process";import*as b from"node:tty";import{isatty as x}from"node:tty";import{spawn as te}from"node:child_process";import S,{existsSync as ne,readFileSync as re,writeFileSync as ie}from"node:fs";import C,{access as ae,chmod as w,cp as oe,mkdtemp as T,readFile as se,rm as ce,stat as E,writeFile as D}from"node:fs/promises";import{AsyncLocalStorage as le,AsyncResource as ue}from"node:async_hooks";import*as de from"node:readline";import O from"node:readline";import*as k from"fs";import A from"fs";import j,{tmpdir as fe}from"node:os";import{createHash as pe}from"node:crypto";import{fileURLToPath as me,pathToFileURL as M}from"node:url";import he,{basename as ge,dirname as N,normalize as P,posix as _e,relative as ve,resolve as ye,sep as be}from"path";import{fileURLToPath as xe}from"url";import{createRequire as Se}from"module";import{Buffer as Ce}from"node:buffer";import{brotliCompress as we,gzip as Te}from"node:zlib";import{Worker as Ee,isMainThread as De}from"node:worker_threads";import{PassThrough as Oe}from"node:stream";var ke=Object.create,Ae=Object.defineProperty,je=Object.getOwnPropertyDescriptor,Me=Object.getOwnPropertyNames,Ne=Object.getPrototypeOf,Pe=Object.prototype.hasOwnProperty,Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ie=(e,t)=>{let n={};for(var r in e)Ae(n,r,{get:e[r],enumerable:!0});return t&&Ae(n,Symbol.toStringTag,{value:`Module`}),n},Le=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Me(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Pe.call(e,s)&&s!==n&&Ae(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=je(t,s))||r.enumerable});return e},Re=(e,t,n)=>(n=e==null?{}:ke(Ne(e)),Le(t||!e||!e.__esModule?Ae(n,`default`,{value:e,enumerable:!0}):n,e)),ze=n(import.meta.url),Be=`@fastgpt-plugin/cli`,Ve=`0.1.0-alpha.5`;const He=Be,Ue=Ve,We=`This is a FastGPT plugin`,Ge=i.join(import.meta.dirname,`../templates`),Ke={silent:-1/0,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:1/0},qe={silent:{level:-1},fatal:{level:Ke.fatal},error:{level:Ke.error},warn:{level:Ke.warn},log:{level:Ke.log},info:{level:Ke.info},success:{level:Ke.success},fail:{level:Ke.fail},ready:{level:Ke.info},start:{level:Ke.info},box:{level:Ke.info},debug:{level:Ke.debug},trace:{level:Ke.trace},verbose:{level:Ke.verbose}};function Je(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Ye(e,t,n=`.`,r){if(!Je(t))return Ye(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:Je(a)&&Je(i[t])?i[t]=Ye(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function Xe(e){return(...t)=>t.reduce((t,n)=>Ye(t,n,``,e),{})}const Ze=Xe();function Qe(e){return Object.prototype.toString.call(e)===`[object Object]`}function $e(e){return!(!Qe(e)||!e.message&&!e.args||e.stack)}let et=!1;const tt=[];var nt=class e{options;_lastLog;_mockFn;constructor(e={}){let t=e.types||qe;for(let n in this.options=Ze({...e,defaults:{...e.defaults},level:rt(e.level,t),reporters:[...e.reporters||[]]},{types:qe,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}}),t){let e={type:n,...this.options.defaults,...t[n]};this[n]=this._wrapLogFn(e),this[n].raw=this._wrapLogFn(e,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(e){this.options.level=rt(e,this.options.types,this.options.level)}prompt(e,t){if(!this.options.prompt)throw Error(`prompt is not supported!`);return this.options.prompt(e,t)}create(t){let n=new e({...this.options,...t});return this._mockFn&&n.mockTypes(this._mockFn),n}withDefaults(e){return this.create({...this.options,defaults:{...this.options.defaults,...e}})}withTag(e){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+`:`+e:e})}addReporter(e){return this.options.reporters.push(e),this}removeReporter(e){if(e){let t=this.options.reporters.indexOf(e);if(t!==-1)return this.options.reporters.splice(t,1)}else this.options.reporters.splice(0);return this}setReporters(e){return this.options.reporters=Array.isArray(e)?e:[e],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let e in this.options.types)console[`__`+e]||(console[`__`+e]=console[e]),console[e]=this[e].raw}restoreConsole(){for(let e in this.options.types)console[`__`+e]&&(console[e]=console[`__`+e],delete console[`__`+e])}wrapStd(){this._wrapStream(this.options.stdout,`log`),this._wrapStream(this.options.stderr,`log`)}_wrapStream(e,t){e&&(e.__write||=e.write,e.write=e=>{this[t].raw(String(e).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(e){e&&e.__write&&(e.write=e.__write,delete e.__write)}pauseLogs(){et=!0}resumeLogs(){et=!1;let e=tt.splice(0);for(let t of e)t[0]._logFn(t[1],t[2])}mockTypes(e){let t=e||this.options.mockFn;if(this._mockFn=t,typeof t==`function`)for(let e in this.options.types)this[e]=t(e,this.options.types[e])||this[e],this[e].raw=this[e]}_wrapLogFn(e,t){return(...n)=>{if(et){tt.push([this,e,n,t]);return}return this._logFn(e,n,t)}}_logFn(e,t,n){if((e.level||0)>this.level)return!1;let r={date:new Date,args:[],...e,level:rt(e.level,this.options.types)};!n&&t.length===1&&$e(t[0])?Object.assign(r,t[0]):r.args=[...t],r.message&&(r.args.unshift(r.message),delete r.message),r.additional&&(Array.isArray(r.additional)||(r.additional=r.additional.split(`
|
|
3
3
|
`)),r.args.push(`
|
|
4
4
|
`+r.additional.join(`
|
|
5
|
-
`)),delete r.additional),r.type=typeof r.type==`string`?r.type.toLowerCase():`log`,r.tag=typeof r.tag==`string`?r.tag:``;let i=(e=!1)=>{let t=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&t>0){let e=[...this._lastLog.object.args];t>1&&e.push(`(repeated ${t} times)`),this._log({...this._lastLog.object,args:e}),this._lastLog.count=1}e&&(this._lastLog.object=r,this._log(r))};clearTimeout(this._lastLog.timeout);let a=this._lastLog.time&&r.date?r.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=r.date,a<this.options.throttle)try{let e=JSON.stringify([r.type,r.tag,r.args]),t=this._lastLog.serialized===e;if(this._lastLog.serialized=e,t&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin)){this._lastLog.timeout=setTimeout(i,this.options.throttle);return}}catch{}i(!0)}_log(e){for(let t of this.options.reporters)t.log(e,{options:this.options})}};function
|
|
5
|
+
`)),delete r.additional),r.type=typeof r.type==`string`?r.type.toLowerCase():`log`,r.tag=typeof r.tag==`string`?r.tag:``;let i=(e=!1)=>{let t=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&t>0){let e=[...this._lastLog.object.args];t>1&&e.push(`(repeated ${t} times)`),this._log({...this._lastLog.object,args:e}),this._lastLog.count=1}e&&(this._lastLog.object=r,this._log(r))};clearTimeout(this._lastLog.timeout);let a=this._lastLog.time&&r.date?r.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=r.date,a<this.options.throttle)try{let e=JSON.stringify([r.type,r.tag,r.args]),t=this._lastLog.serialized===e;if(this._lastLog.serialized=e,t&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin)){this._lastLog.timeout=setTimeout(i,this.options.throttle);return}}catch{}i(!0)}_log(e){for(let t of this.options.reporters)t.log(e,{options:this.options})}};function rt(e,t={},n=3){return e===void 0?n:typeof e==`number`?e:t[e]&&t[e].level!==void 0?t[e].level:n}nt.prototype.add=nt.prototype.addReporter,nt.prototype.remove=nt.prototype.removeReporter,nt.prototype.clear=nt.prototype.removeReporter,nt.prototype.withScope=nt.prototype.withTag,nt.prototype.mock=nt.prototype.mockTypes,nt.prototype.pause=nt.prototype.pauseLogs,nt.prototype.resume=nt.prototype.resumeLogs;function it(e={}){return new nt(e)}function at(e,t){let n=process.cwd()+f;return e.split(`
|
|
6
6
|
`).splice(t.split(`
|
|
7
|
-
`).length).map(e=>e.trim().replace(`file://`,``).replace(n,``))}function
|
|
7
|
+
`).length).map(e=>e.trim().replace(`file://`,``).replace(n,``))}function ot(e,t){return(t.__write||t.write).call(t,e)}const st=e=>e?`[${e}]`:``;var ct=class{formatStack(e,t,n){let r=` `.repeat((n?.errorLevel||0)+1);return r+at(e,t).join(`
|
|
8
8
|
${r}`)}formatError(e,t){let n=e.message??p(t,e),r=e.stack?this.formatStack(e.stack,n,t):``,i=t?.errorLevel||0,a=i>0?`${` `.repeat(i)}[cause]: `:``,o=e.cause?`
|
|
9
9
|
|
|
10
10
|
`+this.formatError(e.cause,{...t,errorLevel:i+1}):``;return a+n+`
|
|
11
11
|
`+r+o}formatArgs(e,t){return p(t,...e.map(e=>e&&typeof e.stack==`string`?this.formatError(e,t):e))}formatDate(e,t){return t.date?e.toLocaleTimeString():``}filterAndJoin(e){return e.filter(Boolean).join(` `)}formatLogObj(e,t){let n=this.formatArgs(e.args,t);return e.type===`box`?`
|
|
12
|
-
`+[
|
|
12
|
+
`+[st(e.tag),e.title&&e.title,...n.split(`
|
|
13
13
|
`)].filter(Boolean).map(e=>` > `+e).join(`
|
|
14
14
|
`)+`
|
|
15
|
-
`:this.filterAndJoin([
|
|
16
|
-
`,e.level<2?t.options.stderr||process.stderr:t.options.stdout||process.stdout)}};const{env:
|
|
17
|
-
`),i=[],a=
|
|
18
|
-
`)}const wt=Object.create(null),Tt=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?wt:globalThis),Et=new Proxy(wt,{get(e,t){return Tt()[t]??wt[t]},has(e,t){return t in Tt()||t in wt},set(e,t,n){let r=Tt(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=Tt(!0);return delete n[t],!0},ownKeys(){let e=Tt(!0);return Object.keys(e)}}),Dt=typeof process<`u`&&process.env&&process.env.NODE_ENV||``,Ot=[[`APPVEYOR`],[`AWS_AMPLIFY`,`AWS_APP_ID`,{ci:!0}],[`AZURE_PIPELINES`,`SYSTEM_TEAMFOUNDATIONCOLLECTIONURI`],[`AZURE_STATIC`,`INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN`],[`APPCIRCLE`,`AC_APPCIRCLE`],[`BAMBOO`,`bamboo_planKey`],[`BITBUCKET`,`BITBUCKET_COMMIT`],[`BITRISE`,`BITRISE_IO`],[`BUDDY`,`BUDDY_WORKSPACE_ID`],[`BUILDKITE`],[`CIRCLE`,`CIRCLECI`],[`CIRRUS`,`CIRRUS_CI`],[`CLOUDFLARE_PAGES`,`CF_PAGES`,{ci:!0}],[`CODEBUILD`,`CODEBUILD_BUILD_ARN`],[`CODEFRESH`,`CF_BUILD_ID`],[`DRONE`],[`DRONE`,`DRONE_BUILD_EVENT`],[`DSARI`],[`GITHUB_ACTIONS`],[`GITLAB`,`GITLAB_CI`],[`GITLAB`,`CI_MERGE_REQUEST_ID`],[`GOCD`,`GO_PIPELINE_LABEL`],[`LAYERCI`],[`HUDSON`,`HUDSON_URL`],[`JENKINS`,`JENKINS_URL`],[`MAGNUM`],[`NETLIFY`],[`NETLIFY`,`NETLIFY_LOCAL`,{ci:!1}],[`NEVERCODE`],[`RENDER`],[`SAIL`,`SAILCI`],[`SEMAPHORE`],[`SCREWDRIVER`],[`SHIPPABLE`],[`SOLANO`,`TDDIUM`],[`STRIDER`],[`TEAMCITY`,`TEAMCITY_VERSION`],[`TRAVIS`],[`VERCEL`,`NOW_BUILDER`],[`VERCEL`,`VERCEL`,{ci:!1}],[`VERCEL`,`VERCEL_ENV`,{ci:!1}],[`APPCENTER`,`APPCENTER_BUILD_ID`],[`CODESANDBOX`,`CODESANDBOX_SSE`,{ci:!1}],[`CODESANDBOX`,`CODESANDBOX_HOST`,{ci:!1}],[`STACKBLITZ`],[`STORMKIT`],[`CLEAVR`],[`ZEABUR`],[`CODESPHERE`,`CODESPHERE_APP_ID`,{ci:!0}],[`RAILWAY`,`RAILWAY_PROJECT_ID`],[`RAILWAY`,`RAILWAY_SERVICE_ID`],[`DENO-DEPLOY`,`DENO_DEPLOYMENT_ID`],[`FIREBASE_APP_HOSTING`,`FIREBASE_APP_HOSTING`,{ci:!0}]];function kt(){if(globalThis.process?.env)for(let e of Ot){let t=e[1]||e[0];if(globalThis.process?.env[t])return{name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL===`/bin/jsh`&&globalThis.process?.versions?.webcontainer?{name:`stackblitz`,ci:!1}:{name:``,ci:!1}}const At=kt();At.name;function jt(e){return e?e!==`false`:!1}const Mt=globalThis.process?.platform||``,Nt=jt(Et.CI)||At.ci!==!1,Pt=jt(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),Ft=jt(Et.DEBUG),It=Dt===`test`||jt(Et.TEST);Et.MINIMAL;const Lt=/^win/i.test(Mt);!jt(Et.NO_COLOR)&&(jt(Et.FORCE_COLOR)||(Pt||Lt)&&Et.TERM);const Rt=(globalThis.process?.versions?.node||``).replace(/^v/,``)||null;Number(Rt?.split(`.`)[0]);const zt=globalThis.process||Object.create(null),Bt={versions:{}};new Proxy(zt,{get(e,t){if(t===`env`)return Et;if(t in e)return e[t];if(t in Bt)return Bt[t]}});const Vt=globalThis.process?.release?.name===`node`,Ht=!!globalThis.Bun||!!globalThis.process?.versions?.bun,Ut=!!globalThis.Deno,Wt=!!globalThis.fastly,Gt=!!globalThis.Netlify,Kt=!!globalThis.EdgeRuntime,qt=globalThis.navigator?.userAgent===`Cloudflare-Workers`,Jt=[[Gt,`netlify`],[Kt,`edge-light`],[qt,`workerd`],[Wt,`fastly`],[Ut,`deno`],[Ht,`bun`],[Vt,`node`]];function Yt(){let e=Jt.find(e=>e[0]);if(e)return{name:e[1]}}Yt()?.name;function Xt({onlyFirst:e=!1}={}){let t=[`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))`,`(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))`].join(`|`);return new RegExp(t,e?void 0:`g`)}const U=Xt();function Zt(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(U,``)}function Qt(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function $t(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function en(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function tn(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function nn(e,{ambiguousAsWide:t=!1}={}){return tn(e),$t(e)||en(e)||t&&Qt(e)?2:1}const rn=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,an=globalThis.Intl?.Segmenter?new Intl.Segmenter:{segment:e=>e.split(``)},on=/^\p{Default_Ignorable_Code_Point}$/u;function sn(e,t={}){if(typeof e!=`string`||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=Zt(e)),e.length===0)return 0;let i=0,a={ambiguousAsWide:!n};for(let{segment:t}of an.segment(e)){let e=t.codePointAt(0);if(!(e<=31||e>=127&&e<=159)&&!(e>=8203&&e<=8207||e===65279)&&!(e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071)&&!(e>=55296&&e<=57343)&&!(e>=65024&&e<=65039)&&!on.test(t)){if(rn().test(t)){i+=2;continue}i+=nn(e,a)}}return i}function cn(){let{env:e}=v,{TERM:t,TERM_PROGRAM:n}=e;return v.platform===`win32`?!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask===`{cmd::Cmder}`||n===`Terminus-Sublime`||n===`vscode`||t===`xterm-256color`||t===`alacritty`||t===`rxvt-unicode`||t===`rxvt-unicode-256color`||e.TERMINAL_EMULATOR===`JetBrains-JediTerm`:t!==`linux`}const ln={info:`cyan`,fail:`red`,success:`green`,ready:`green`,start:`magenta`},un={0:`red`,1:`yellow`},dn=cn(),fn=(e,t)=>dn?e:t,pn={error:fn(`✖`,`×`),fatal:fn(`✖`,`×`),ready:fn(`✔`,`√`),warn:fn(`⚠`,`‼`),info:fn(`ℹ`,`i`),success:fn(`✔`,`√`),debug:fn(`⚙`,`D`),trace:fn(`→`,`→`),fail:fn(`✖`,`×`),start:fn(`◐`,`o`),log:``};function mn(e){return typeof Intl!=`object`||!Intl.Segmenter?bt(e).length:sn(e)}var hn=class extends et{formatStack(e,t,n){let r=` `.repeat((n?.errorLevel||0)+1);return`
|
|
19
|
-
${r}`+
|
|
20
|
-
${r}`)}formatType(e,t,n){let r=
|
|
21
|
-
`);if(e.type===`box`)return
|
|
15
|
+
`:this.filterAndJoin([st(e.type),st(e.tag),n])}log(e,t){return ot(this.formatLogObj(e,{columns:t.options.stdout.columns||0,...t.options.formatOptions})+`
|
|
16
|
+
`,e.level<2?t.options.stderr||process.stderr:t.options.stdout||process.stdout)}};const{env:lt={},argv:ut=[],platform:dt=``}=typeof process>`u`?{}:process,ft=`NO_COLOR`in lt||ut.includes(`--no-color`),pt=`FORCE_COLOR`in lt||ut.includes(`--color`),mt=dt===`win32`,ht=lt.TERM===`dumb`,gt=b&&b.isatty&&b.isatty(1)&<.TERM&&!ht,_t=`CI`in lt&&(`GITHUB_ACTIONS`in lt||`GITLAB_CI`in lt||`CIRCLECI`in lt),vt=!ft&&(pt||mt&&!ht||gt||_t);function yt(e,t,n,r,i=t.slice(0,Math.max(0,e))+r,a=t.slice(Math.max(0,e+n.length)),o=a.indexOf(n)){return i+(o<0?a:yt(o,a,n,r))}function bt(e,t,n,r,i){return e<0?n+t+r:n+yt(e,t,r,i)+r}function xt(e,t,n=e,r=e.length+1){return i=>i||!(i===``||i===void 0)?bt((``+i).indexOf(t,r),i,e,t,n):``}function F(e,t,n){return xt(`\x1B[${e}m`,`\x1B[${t}m`,n)}const St={reset:F(0,0),bold:F(1,22,`\x1B[22m\x1B[1m`),dim:F(2,22,`\x1B[22m\x1B[2m`),italic:F(3,23),underline:F(4,24),inverse:F(7,27),hidden:F(8,28),strikethrough:F(9,29),black:F(30,39),red:F(31,39),green:F(32,39),yellow:F(33,39),blue:F(34,39),magenta:F(35,39),cyan:F(36,39),white:F(37,39),gray:F(90,39),bgBlack:F(40,49),bgRed:F(41,49),bgGreen:F(42,49),bgYellow:F(43,49),bgBlue:F(44,49),bgMagenta:F(45,49),bgCyan:F(46,49),bgWhite:F(47,49),blackBright:F(90,39),redBright:F(91,39),greenBright:F(92,39),yellowBright:F(93,39),blueBright:F(94,39),magentaBright:F(95,39),cyanBright:F(96,39),whiteBright:F(97,39),bgBlackBright:F(100,49),bgRedBright:F(101,49),bgGreenBright:F(102,49),bgYellowBright:F(103,49),bgBlueBright:F(104,49),bgMagentaBright:F(105,49),bgCyanBright:F(106,49),bgWhiteBright:F(107,49)};function Ct(e=vt){return e?St:Object.fromEntries(Object.keys(St).map(e=>[e,String]))}const wt=Ct();function Tt(e,t=`reset`){return wt[e]||wt[t]}const Et=[String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join(`|`);function Dt(e){return e.replace(new RegExp(Et,`g`),``)}const Ot={solid:{tl:`┌`,tr:`┐`,bl:`└`,br:`┘`,h:`─`,v:`│`},double:{tl:`╔`,tr:`╗`,bl:`╚`,br:`╝`,h:`═`,v:`║`},doubleSingle:{tl:`╓`,tr:`╖`,bl:`╙`,br:`╜`,h:`─`,v:`║`},doubleSingleRounded:{tl:`╭`,tr:`╮`,bl:`╰`,br:`╯`,h:`─`,v:`║`},singleThick:{tl:`┏`,tr:`┓`,bl:`┗`,br:`┛`,h:`━`,v:`┃`},singleDouble:{tl:`╒`,tr:`╕`,bl:`╘`,br:`╛`,h:`═`,v:`│`},singleDoubleRounded:{tl:`╭`,tr:`╮`,bl:`╰`,br:`╯`,h:`═`,v:`│`},rounded:{tl:`╭`,tr:`╮`,bl:`╰`,br:`╯`,h:`─`,v:`│`}},kt={borderColor:`white`,borderStyle:`rounded`,valign:`center`,padding:2,marginLeft:1,marginTop:1,marginBottom:1};function At(e,t={}){let n={...t,style:{...kt,...t.style}},r=e.split(`
|
|
17
|
+
`),i=[],a=Tt(n.style.borderColor),o={...typeof n.style.borderStyle==`string`?Ot[n.style.borderStyle]||Ot.solid:n.style.borderStyle};if(a)for(let e in o)o[e]=a(o[e]);let s=n.style.padding%2==0?n.style.padding:n.style.padding+1,c=r.length+s,l=Math.max(...r.map(e=>Dt(e).length),n.title?Dt(n.title).length:0)+s,u=l+s,d=n.style.marginLeft>0?` `.repeat(n.style.marginLeft):``;if(n.style.marginTop>0&&i.push(``.repeat(n.style.marginTop)),n.title){let e=a?a(n.title):n.title,t=o.h.repeat(Math.floor((l-Dt(n.title).length)/2)),r=o.h.repeat(l-Dt(n.title).length-Dt(t).length+s);i.push(`${d}${o.tl}${t}${e}${r}${o.tr}`)}else i.push(`${d}${o.tl}${o.h.repeat(u)}${o.tr}`);let f=n.style.valign===`center`?Math.floor((c-r.length)/2):n.style.valign===`top`?c-r.length-s:c-r.length;for(let e=0;e<c;e++)if(e<f||e>=f+r.length)i.push(`${d}${o.v}${` `.repeat(u)}${o.v}`);else{let t=r[e-f],n=` `.repeat(s),a=` `.repeat(l-Dt(t).length);i.push(`${d}${o.v}${n}${t}${a}${o.v}`)}return i.push(`${d}${o.bl}${o.h.repeat(u)}${o.br}`),n.style.marginBottom>0&&i.push(``.repeat(n.style.marginBottom)),i.join(`
|
|
18
|
+
`)}const jt=Object.create(null),Mt=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?jt:globalThis),Nt=new Proxy(jt,{get(e,t){return Mt()[t]??jt[t]},has(e,t){return t in Mt()||t in jt},set(e,t,n){let r=Mt(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=Mt(!0);return delete n[t],!0},ownKeys(){let e=Mt(!0);return Object.keys(e)}}),Pt=typeof process<`u`&&process.env&&process.env.NODE_ENV||``,Ft=[[`APPVEYOR`],[`AWS_AMPLIFY`,`AWS_APP_ID`,{ci:!0}],[`AZURE_PIPELINES`,`SYSTEM_TEAMFOUNDATIONCOLLECTIONURI`],[`AZURE_STATIC`,`INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN`],[`APPCIRCLE`,`AC_APPCIRCLE`],[`BAMBOO`,`bamboo_planKey`],[`BITBUCKET`,`BITBUCKET_COMMIT`],[`BITRISE`,`BITRISE_IO`],[`BUDDY`,`BUDDY_WORKSPACE_ID`],[`BUILDKITE`],[`CIRCLE`,`CIRCLECI`],[`CIRRUS`,`CIRRUS_CI`],[`CLOUDFLARE_PAGES`,`CF_PAGES`,{ci:!0}],[`CODEBUILD`,`CODEBUILD_BUILD_ARN`],[`CODEFRESH`,`CF_BUILD_ID`],[`DRONE`],[`DRONE`,`DRONE_BUILD_EVENT`],[`DSARI`],[`GITHUB_ACTIONS`],[`GITLAB`,`GITLAB_CI`],[`GITLAB`,`CI_MERGE_REQUEST_ID`],[`GOCD`,`GO_PIPELINE_LABEL`],[`LAYERCI`],[`HUDSON`,`HUDSON_URL`],[`JENKINS`,`JENKINS_URL`],[`MAGNUM`],[`NETLIFY`],[`NETLIFY`,`NETLIFY_LOCAL`,{ci:!1}],[`NEVERCODE`],[`RENDER`],[`SAIL`,`SAILCI`],[`SEMAPHORE`],[`SCREWDRIVER`],[`SHIPPABLE`],[`SOLANO`,`TDDIUM`],[`STRIDER`],[`TEAMCITY`,`TEAMCITY_VERSION`],[`TRAVIS`],[`VERCEL`,`NOW_BUILDER`],[`VERCEL`,`VERCEL`,{ci:!1}],[`VERCEL`,`VERCEL_ENV`,{ci:!1}],[`APPCENTER`,`APPCENTER_BUILD_ID`],[`CODESANDBOX`,`CODESANDBOX_SSE`,{ci:!1}],[`CODESANDBOX`,`CODESANDBOX_HOST`,{ci:!1}],[`STACKBLITZ`],[`STORMKIT`],[`CLEAVR`],[`ZEABUR`],[`CODESPHERE`,`CODESPHERE_APP_ID`,{ci:!0}],[`RAILWAY`,`RAILWAY_PROJECT_ID`],[`RAILWAY`,`RAILWAY_SERVICE_ID`],[`DENO-DEPLOY`,`DENO_DEPLOYMENT_ID`],[`FIREBASE_APP_HOSTING`,`FIREBASE_APP_HOSTING`,{ci:!0}]];function It(){if(globalThis.process?.env)for(let e of Ft){let t=e[1]||e[0];if(globalThis.process?.env[t])return{name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL===`/bin/jsh`&&globalThis.process?.versions?.webcontainer?{name:`stackblitz`,ci:!1}:{name:``,ci:!1}}const Lt=It();Lt.name;function Rt(e){return e?e!==`false`:!1}const zt=globalThis.process?.platform||``,Bt=Rt(Nt.CI)||Lt.ci!==!1,Vt=Rt(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),Ht=Rt(Nt.DEBUG),Ut=Pt===`test`||Rt(Nt.TEST);Nt.MINIMAL;const Wt=/^win/i.test(zt);!Rt(Nt.NO_COLOR)&&(Rt(Nt.FORCE_COLOR)||(Vt||Wt)&&Nt.TERM);const Gt=(globalThis.process?.versions?.node||``).replace(/^v/,``)||null;Number(Gt?.split(`.`)[0]);const Kt=globalThis.process||Object.create(null),qt={versions:{}};new Proxy(Kt,{get(e,t){if(t===`env`)return Nt;if(t in e)return e[t];if(t in qt)return qt[t]}});const Jt=globalThis.process?.release?.name===`node`,Yt=!!globalThis.Bun||!!globalThis.process?.versions?.bun,Xt=!!globalThis.Deno,Zt=!!globalThis.fastly,Qt=!!globalThis.Netlify,$t=!!globalThis.EdgeRuntime,en=globalThis.navigator?.userAgent===`Cloudflare-Workers`,tn=[[Qt,`netlify`],[$t,`edge-light`],[en,`workerd`],[Zt,`fastly`],[Xt,`deno`],[Yt,`bun`],[Jt,`node`]];function nn(){let e=tn.find(e=>e[0]);if(e)return{name:e[1]}}nn()?.name;function rn({onlyFirst:e=!1}={}){let t=[`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))`,`(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))`].join(`|`);return new RegExp(t,e?void 0:`g`)}const an=rn();function on(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(an,``)}function sn(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function cn(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function ln(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function un(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function dn(e,{ambiguousAsWide:t=!1}={}){return un(e),cn(e)||ln(e)||t&&sn(e)?2:1}const fn=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,pn=globalThis.Intl?.Segmenter?new Intl.Segmenter:{segment:e=>e.split(``)},mn=/^\p{Default_Ignorable_Code_Point}$/u;function hn(e,t={}){if(typeof e!=`string`||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=on(e)),e.length===0)return 0;let i=0,a={ambiguousAsWide:!n};for(let{segment:t}of pn.segment(e)){let e=t.codePointAt(0);if(!(e<=31||e>=127&&e<=159)&&!(e>=8203&&e<=8207||e===65279)&&!(e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071)&&!(e>=55296&&e<=57343)&&!(e>=65024&&e<=65039)&&!mn.test(t)){if(fn().test(t)){i+=2;continue}i+=dn(e,a)}}return i}function gn(){let{env:e}=v,{TERM:t,TERM_PROGRAM:n}=e;return v.platform===`win32`?!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask===`{cmd::Cmder}`||n===`Terminus-Sublime`||n===`vscode`||t===`xterm-256color`||t===`alacritty`||t===`rxvt-unicode`||t===`rxvt-unicode-256color`||e.TERMINAL_EMULATOR===`JetBrains-JediTerm`:t!==`linux`}const _n={info:`cyan`,fail:`red`,success:`green`,ready:`green`,start:`magenta`},vn={0:`red`,1:`yellow`},yn=gn(),bn=(e,t)=>yn?e:t,xn={error:bn(`✖`,`×`),fatal:bn(`✖`,`×`),ready:bn(`✔`,`√`),warn:bn(`⚠`,`‼`),info:bn(`ℹ`,`i`),success:bn(`✔`,`√`),debug:bn(`⚙`,`D`),trace:bn(`→`,`→`),fail:bn(`✖`,`×`),start:bn(`◐`,`o`),log:``};function Sn(e){return typeof Intl!=`object`||!Intl.Segmenter?Dt(e).length:hn(e)}var Cn=class extends ct{formatStack(e,t,n){let r=` `.repeat((n?.errorLevel||0)+1);return`
|
|
19
|
+
${r}`+at(e,t).map(e=>` `+e.replace(/^at +/,e=>wt.gray(e)).replace(/\((.+)\)/,(e,t)=>`(${wt.cyan(t)})`)).join(`
|
|
20
|
+
${r}`)}formatType(e,t,n){let r=_n[e.type]||vn[e.level]||`gray`;if(t)return En(r)(wt.black(` ${e.type.toUpperCase()} `));let i=typeof xn[e.type]==`string`?xn[e.type]:e.icon||e.type;return i?Tn(r)(i):``}formatLogObj(e,t){let[n,...r]=this.formatArgs(e.args,t).split(`
|
|
21
|
+
`);if(e.type===`box`)return At(wn(n+(r.length>0?`
|
|
22
22
|
`+r.join(`
|
|
23
|
-
`):``)),{title:e.title?
|
|
23
|
+
`):``)),{title:e.title?wn(e.title):void 0,style:e.style});let i=this.formatDate(e.date,t),a=i&&wt.gray(i),o=e.badge??e.level<2,s=this.formatType(e,o,t),c=e.tag?wt.gray(e.tag):``,l,u=this.filterAndJoin([s,wn(n)]),d=this.filterAndJoin(t.columns?[c,a]:[c]),f=(t.columns||0)-Sn(u)-Sn(d)-2;if(l=f>0&&(t.columns||0)>=80?u+` `.repeat(f)+d:(d?`${wt.gray(`[${d}]`)} `:``)+u,l+=wn(r.length>0?`
|
|
24
24
|
`+r.join(`
|
|
25
25
|
`):``),e.type===`trace`){let t=Error(`Trace: `+e.message);l+=this.formatStack(t.stack||``,t.message)}return o?`
|
|
26
26
|
`+l+`
|
|
27
|
-
`:l}};function
|
|
27
|
+
`:l}};function wn(e){return e.replace(/`([^`]+)`/gm,(e,t)=>wt.cyan(t)).replace(/\s+_([^_]+)_\s+/gm,(e,t)=>` ${wt.underline(t)} `)}function Tn(e=`white`){return wt[e]||wt.white}function En(e=`bgWhite`){return wt[`bg${e[0].toUpperCase()}${e.slice(1)}`]||wt.bgWhite}function Dn(e={}){let t=On();return process.env.CONSOLA_LEVEL&&(t=Number.parseInt(process.env.CONSOLA_LEVEL)??t),it({level:t,defaults:{level:t},stdout:process.stdout,stderr:process.stderr,prompt:(...e)=>import(`./prompt-ob7l3SPy.js`).then(t=>t.prompt(...e)),reporters:e.reporters||[e.fancy??!(Bt||Ut)?new Cn:new ct],...e})}function On(){return Ht?Ke.debug:Ut?Ke.warn:Ke.info}const kn=Dn().withTag(He);var An=Fe((e=>{var t=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},n=class extends t{constructor(e){super(1,`commander.invalidArgument`,e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};e.CommanderError=t,e.InvalidArgumentError=n})),jn=Fe((e=>{let{InvalidArgumentError:t}=An();var n=class{constructor(e,t){switch(this.description=t||``,this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case`<`:this.required=!0,this._name=e.slice(1,-1);break;case`[`:this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith(`...`)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,n):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function r(e){let t=e.name()+(e.variadic===!0?`...`:``);return e.required?`<`+t+`>`:`[`+t+`]`}e.Argument=n,e.humanReadableArgName=r})),Mn=Fe((e=>{let{humanReadableArgName:t}=jn();var n=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(e=>!e._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((e,t)=>e.name().localeCompare(t.name())),t}compareOptions(e,t){let n=e=>e.short?e.short.replace(/^-/,``):e.long.replace(/^--/,``);return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(e=>!e.hidden),n=e._getHelpOption();if(n&&!n.hidden){let r=n.short&&e._findOption(n.short),i=n.long&&e._findOption(n.long);!r&&!i?t.push(n):n.long&&!i?t.push(e.createOption(n.long,n.description)):n.short&&!r&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let e=n.options.filter(e=>!e.hidden);t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||``}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(e=>t(e)).join(` `);return e._name+(e._aliases[0]?`|`+e._aliases[0]:``)+(e.options.length?` [options]`:``)+(n?` `+n:``)}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+`|`+e._aliases[0]);let n=``;for(let t=e.parent;t;t=t.parent)n=t.name()+` `+n;return n+t+` `+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==`boolean`)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return t.length===0?[]:[n.styleTitle(e),...t,``]}groupItems(e,t,n){let r=new Map;return e.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[])}),t.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[]),r.get(t).push(e)}),r}formatHelp(e,t){let n=t.padWidth(e,t),r=t.helpWidth??80;function i(e,r){return t.formatItem(e,n,r,t)}let a=[`${t.styleTitle(`Usage:`)} ${t.styleUsage(t.commandUsage(e))}`,``],o=t.commandDescription(e);o.length>0&&(a=a.concat([t.boxWrap(t.styleCommandDescription(o),r),``]));let s=t.visibleArguments(e).map(e=>i(t.styleArgumentTerm(t.argumentTerm(e)),t.styleArgumentDescription(t.argumentDescription(e))));if(a=a.concat(this.formatItemList(`Arguments:`,s,t)),this.groupItems(e.options,t.visibleOptions(e),e=>e.helpGroupHeading??`Options:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),t.showGlobalOptions){let n=t.visibleGlobalOptions(e).map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(`Global Options:`,n,t))}return this.groupItems(e.commands,t.visibleCommands(e),e=>e.helpGroup()||`Commands:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleSubcommandTerm(t.subcommandTerm(e)),t.styleSubcommandDescription(t.subcommandDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),a.join(`
|
|
28
28
|
`)}displayWidth(e){return r(e).length}styleTitle(e){return e}styleUsage(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e===`[command]`?this.styleSubcommandText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleCommandText(e)).join(` `)}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleSubcommandText(e)).join(` `)}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,r){let i=` `.repeat(2);if(!n)return i+e;let a=e.padEnd(t+e.length-r.displayWidth(e)),o=(this.helpWidth??80)-t-2-2,s;return s=o<this.minWidthToWrap||r.preformatted(n)?n:r.boxWrap(n,o).replace(/\n/g,`
|
|
29
29
|
`+` `.repeat(t+2)),i+a+` `.repeat(2)+s.replace(/\n/g,`\n${i}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,i=[];return n.forEach(e=>{let n=e.match(r);if(n===null){i.push(``);return}let a=[n.shift()],o=this.displayWidth(a[0]);n.forEach(e=>{let n=this.displayWidth(e);if(o+n<=t){a.push(e),o+=n;return}i.push(a.join(``));let r=e.trimStart();a=[r],o=this.displayWidth(r)}),i.push(a.join(``))}),i.join(`
|
|
30
|
-
`)}};function r(e){return e.replace(/\x1b\[\d*(;\d*)*m/g,``)}e.Help=n,e.stripColor=r})),
|
|
30
|
+
`)}};function r(e){return e.replace(/\x1b\[\d*(;\d*)*m/g,``)}e.Help=n,e.stripColor=r})),Nn=Fe((e=>{let{InvalidArgumentError:t}=An();var n=class{constructor(e,t){this.flags=e,this.description=t||``,this.required=e.includes(`<`),this.optional=e.includes(`[`),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=a(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith(`--no-`)),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e==`string`&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,n):e},this}name(){return this.long?this.long.replace(/^--/,``):this.short.replace(/^-/,``)}attributeName(){return this.negate?i(this.name().replace(/^no-/,``)):i(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},r=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)}),this.negativeOptions.forEach((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let r=this.negativeOptions.get(n).presetArg,i=r===void 0?!1:r;return t.negate===(i===e)}};function i(e){return e.split(`-`).reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function a(e){let t,n,r=/^-[^-]$/,i=/^--[^-]/,a=e.split(/[ |,]+/).concat(`guard`);if(r.test(a[0])&&(t=a.shift()),i.test(a[0])&&(n=a.shift()),!t&&r.test(a[0])&&(t=a.shift()),!t&&i.test(a[0])&&(t=n,n=a.shift()),a[0].startsWith(`-`)){let t=a[0],n=`option creation failed due to '${t}' in option flags '${e}'`;throw/^-[^-][^-]/.test(t)?Error(`${n}
|
|
31
31
|
- a short flag is a single dash and a single character
|
|
32
32
|
- either use a single dash and a single character (for a short flag)
|
|
33
33
|
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(t)?Error(`${n}
|
|
34
34
|
- too many short flags`):i.test(t)?Error(`${n}
|
|
35
35
|
- too many long flags`):Error(`${n}
|
|
36
|
-
- unrecognised flag format`)}if(t===void 0&&n===void 0)throw Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:n}}e.Option=n,e.DualOptions=r})),
|
|
36
|
+
- unrecognised flag format`)}if(t===void 0&&n===void 0)throw Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:n}}e.Option=n,e.DualOptions=r})),Pn=Fe((e=>{function t(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let n=[];for(let t=0;t<=e.length;t++)n[t]=[t];for(let e=0;e<=t.length;e++)n[0][e]=e;for(let r=1;r<=t.length;r++)for(let i=1;i<=e.length;i++){let a=1;a=e[i-1]===t[r-1]?0:1,n[i][r]=Math.min(n[i-1][r]+1,n[i][r-1]+1,n[i-1][r-1]+a),i>1&&r>1&&e[i-1]===t[r-2]&&e[i-2]===t[r-1]&&(n[i][r]=Math.min(n[i][r],n[i-2][r-2]+1))}return n[e.length][t.length]}function n(e,n){if(!n||n.length===0)return``;n=Array.from(new Set(n));let r=e.startsWith(`--`);r&&(e=e.slice(2),n=n.map(e=>e.slice(2)));let i=[],a=3;return n.forEach(n=>{if(n.length<=1)return;let r=t(e,n),o=Math.max(e.length,n.length);(o-r)/o>.4&&(r<a?(a=r,i=[n]):r===a&&i.push(n))}),i.sort((e,t)=>e.localeCompare(t)),r&&(i=i.map(e=>`--${e}`)),i.length>1?`\n(Did you mean one of ${i.join(`, `)}?)`:i.length===1?`\n(Did you mean ${i[0]}?)`:``}e.suggestSimilar=n})),Fn=Fe((e=>{let t=ze(`node:events`).EventEmitter,n=ze(`node:child_process`),r=ze(`node:path`),i=ze(`node:fs`),a=ze(`node:process`),{Argument:o,humanReadableArgName:s}=jn(),{CommanderError:c}=An(),{Help:l,stripColor:u}=Mn(),{Option:d,DualOptions:f}=Nn(),{suggestSimilar:p}=Pn();var m=class e extends t{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||``,this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description=``,this._summary=``,this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:e=>a.stdout.write(e),writeErr:e=>a.stderr.write(e),outputError:(e,t)=>t(e),getOutHelpWidth:()=>a.stdout.isTTY?a.stdout.columns:void 0,getErrHelpWidth:()=>a.stderr.isTTY?a.stderr.columns:void 0,getOutHasColors:()=>g()??(a.stdout.isTTY&&a.stdout.hasColors?.()),getErrHasColors:()=>g()??(a.stderr.isTTY&&a.stderr.hasColors?.()),stripColor:e=>u(e)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let r=t,i=n;typeof r==`object`&&r&&(i=r,r=null),i||={};let[,a,o]=e.match(/([^ ]+) *(.*)/),s=this.createCommand(a);return r&&(s.description(r),s._executableHandler=!0),i.isDefault&&(this._defaultCommandName=s._name),s._hidden=!!(i.noHelp||i.hidden),s._executableFile=i.executableFile||null,o&&s.arguments(o),this._registerCommand(s),s.parent=this,s.copyInheritedSettings(this),r?this:s}createCommand(t){return new e(t)}createHelp(){return Object.assign(new l,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!=`string`&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw Error(`Command passed to .addCommand() must have a name
|
|
37
37
|
- specify the name in Command constructor or using .name()`);return t||={},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new o(e,t)}argument(e,t,n,r){let i=this.createArgument(e,t);return typeof n==`function`?i.default(r).argParser(n):i.default(n),this.addArgument(i),this}arguments(e){return e.trim().split(/ +/).forEach(e=>{this.argument(e)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e==`boolean`)return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let[,n,r]=(e??`help [command]`).match(/([^ ]+) *(.*)/),i=t??`display help for command`,a=this.createCommand(n);return a.helpOption(!1),r&&a.arguments(r),i&&a.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||t)&&this._initCommandGroup(a),this}addHelpCommand(e,t){return typeof e==`object`?(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this):(this.helpCommand(e,t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand(`help`))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=[`preSubcommand`,`preAction`,`postAction`];if(!n.includes(e))throw Error(`Unexpected value for event passed to hook : '${e}'.
|
|
38
38
|
Expecting one of '${n.join(`', '`)}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=e=>{if(e.code!==`commander.executeSubCommandAsync`)throw e},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new c(e,t,n)),a.exit(e)}action(e){return this._actionHandler=t=>{let n=this.registeredArguments.length,r=t.slice(0,n);return this._storeOptionsAsProperties?r[n]=this:r[n]=this.opts(),r.push(this),e.apply(this,r)},this}createOption(e,t){return new d(e,t)}_callParseArg(e,t,n,r){try{return e.parseArg(t,n)}catch(e){if(e.code===`commander.invalidArgument`){let t=`${r} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
|
|
39
39
|
- already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=e=>[e.name()].concat(e.aliases()),n=t(e).find(e=>this._findCommand(e));if(n){let r=t(this._findCommand(n)).join(`|`),i=t(e).join(`|`);throw Error(`cannot add command '${i}' as already have command '${r}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let t=e.long.replace(/^--no-/,`--`);this._findOption(t)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,`default`)}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,`default`);let r=(t,r,i)=>{t==null&&e.presetArg!==void 0&&(t=e.presetArg);let a=this.getOptionValue(n);t!==null&&e.parseArg?t=this._callParseArg(e,t,a,r):t!==null&&e.variadic&&(t=e._collectValue(t,a)),t??=e.negate?!1:e.isBoolean()||e.optional?!0:``,this.setOptionValueWithSource(n,t,i)};return this.on(`option:`+t,t=>{r(t,`error: option '${e.flags}' argument '${t}' is invalid.`,`cli`)}),e.envVar&&this.on(`optionEnv:`+t,t=>{r(t,`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`,`env`)}),this}_optionEx(e,t,n,r,i){if(typeof t==`object`&&t instanceof d)throw Error(`To add an Option object use addOption() instead of option() or requiredOption()`);let a=this.createOption(t,n);if(a.makeOptionMandatory(!!e.mandatory),typeof r==`function`)a.default(i).argParser(r);else if(r instanceof RegExp){let e=r;r=(t,n)=>{let r=e.exec(t);return r?r[0]:n},a.default(i).argParser(r)}else a.default(r);return this.addOption(a)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:!0},e,t,n,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw Error(`call .storeOptionsAsProperties() before adding options`);if(Object.keys(this._optionValues).length)throw Error(`call .storeOptionsAsProperties() before setting option values`);return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw Error(`first parameter to parse must be array or undefined`);if(t||={},e===void 0&&t.from===void 0){a.versions?.electron&&(t.from=`electron`);let e=a.execArgv??[];(e.includes(`-e`)||e.includes(`--eval`)||e.includes(`-p`)||e.includes(`--print`))&&(t.from=`eval`)}e===void 0&&(e=a.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case`node`:this._scriptPath=e[1],n=e.slice(2);break;case`electron`:a.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case`user`:n=e.slice(0);break;case`eval`:n=e.slice(1);break;default:throw Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||`program`,n}parse(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
@@ -42,101 +42,66 @@ Expecting one of '${n.join(`', '`)}'`);return this._lifeCycleHooks[e]?this._life
|
|
|
42
42
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
43
43
|
- ${t?`searched for local subcommand relative to directory '${t}'`:`no directory for search for local subcommand, use .executableDir() to supply a custom directory`}`;throw Error(r)}_executeSubCommand(e,t){t=t.slice();let o=!1,s=[`.js`,`.ts`,`.tsx`,`.mjs`,`.cjs`];function l(e,t){let n=r.resolve(e,t);if(i.existsSync(n))return n;if(s.includes(r.extname(t)))return;let a=s.find(e=>i.existsSync(`${n}${e}`));if(a)return`${n}${a}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let u=e._executableFile||`${this._name}-${e._name}`,d=this._executableDir||``;if(this._scriptPath){let e;try{e=i.realpathSync(this._scriptPath)}catch{e=this._scriptPath}d=r.resolve(r.dirname(e),d)}if(d){let t=l(d,u);if(!t&&!e._executableFile&&this._scriptPath){let n=r.basename(this._scriptPath,r.extname(this._scriptPath));n!==this._name&&(t=l(d,`${n}-${e._name}`))}u=t||u}o=s.includes(r.extname(u));let f;a.platform===`win32`?(this._checkForMissingExecutable(u,d,e._name),t.unshift(u),t=h(a.execArgv).concat(t),f=n.spawn(a.execPath,t,{stdio:`inherit`})):o?(t.unshift(u),t=h(a.execArgv).concat(t),f=n.spawn(a.argv[0],t,{stdio:`inherit`})):f=n.spawn(u,t,{stdio:`inherit`}),f.killed||[`SIGUSR1`,`SIGUSR2`,`SIGTERM`,`SIGINT`,`SIGHUP`].forEach(e=>{a.on(e,()=>{f.killed===!1&&f.exitCode===null&&f.kill(e)})});let p=this._exitCallback;f.on(`close`,e=>{e??=1,p?p(new c(e,`commander.executeSubCommandAsync`,`(close)`)):a.exit(e)}),f.on(`error`,t=>{if(t.code===`ENOENT`)this._checkForMissingExecutable(u,d,e._name);else if(t.code===`EACCES`)throw Error(`'${u}' not executable`);if(!p)a.exit(1);else{let e=new c(1,`commander.executeSubCommandAsync`,`(error)`);e.nestedError=t,p(e)}}),this.runningCommand=f}_dispatchSubcommand(e,t,n){let r=this._findCommand(e);r||this.help({error:!0}),r._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,r,`preSubcommand`),i=this._chainOrCall(i,()=>{if(r._executableHandler)this._executeSubCommand(r,t.concat(n));else return r._parseCommand(t,n)}),i}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??`--help`])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(e,t,n)=>{let r=t;if(t!==null&&e.parseArg){let i=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;r=this._callParseArg(e,t,n,i)}return r};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,r)=>{let i=n.defaultValue;n.variadic?r<this.args.length?(i=this.args.slice(r),n.parseArg&&(i=i.reduce((t,r)=>e(n,r,t),n.defaultValue))):i===void 0&&(i=[]):r<this.args.length&&(i=this.args[r],n.parseArg&&(i=e(n,i,n.defaultValue))),t[r]=i}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&typeof e.then==`function`?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,r=[];return this._getCommandAndAncestors().reverse().filter(e=>e._lifeCycleHooks[t]!==void 0).forEach(e=>{e._lifeCycleHooks[t].forEach(t=>{r.push({hookedCommand:e,callback:t})})}),t===`postAction`&&r.reverse(),r.forEach(e=>{n=this._chainOrCall(n,()=>e.callback(e.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let r=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(e=>{r=this._chainOrCall(r,()=>e(this,t))}),r}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let n;return n=this._chainOrCallHooks(n,`preAction`),n=this._chainOrCall(n,()=>this._actionHandler(this.processedArgs)),this.parent&&(n=this._chainOrCall(n,()=>{this.parent.emit(i,e,t)})),n=this._chainOrCallHooks(n,`postAction`),n}if(this.parent?.listenerCount(i))r(),this._processArguments(),this.parent.emit(i,e,t);else if(e.length){if(this._findCommand(`*`))return this._dispatchSubcommand(`*`,e,t);this.listenerCount(`command:*`)?this.emit(`command:*`,e,t):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(e=>{let t=e.attributeName();return this.getOptionValue(t)===void 0?!1:this.getOptionValueSource(t)!==`default`});e.filter(e=>e.conflictsWith.length>0).forEach(t=>{let n=e.find(e=>t.conflictsWith.includes(e.attributeName()));n&&this._conflictingOption(t,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],r=t;function i(e){return e.length>1&&e[0]===`-`}let a=e=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(e)?!this._getCommandAndAncestors().some(e=>e.options.map(e=>e.short).some(e=>/^-\d$/.test(e))):!1,o=null,s=null,c=0;for(;c<e.length||s;){let l=s??e[c++];if(s=null,l===`--`){r===n&&r.push(l),r.push(...e.slice(c));break}if(o&&(!i(l)||a(l))){this.emit(`option:${o.name()}`,l);continue}if(o=null,i(l)){let t=this._findOption(l);if(t){if(t.required){let n=e[c++];n===void 0&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,n)}else if(t.optional){let n=null;c<e.length&&(!i(e[c])||a(e[c]))&&(n=e[c++]),this.emit(`option:${t.name()}`,n)}else this.emit(`option:${t.name()}`);o=t.variadic?t:null;continue}}if(l.length>2&&l[0]===`-`&&l[1]!==`-`){let e=this._findOption(`-${l[1]}`);if(e){e.required||e.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${e.name()}`,l.slice(2)):(this.emit(`option:${e.name()}`),s=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){let e=l.indexOf(`=`),t=this._findOption(l.slice(0,e));if(t&&(t.required||t.optional)){this.emit(`option:${t.name()}`,l.slice(e+1));continue}}if(r===t&&i(l)&&!(this.commands.length===0&&a(l))&&(r=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(l)){t.push(l),n.push(...e.slice(c));break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){t.push(l,...e.slice(c));break}else if(this._defaultCommandName){n.push(l,...e.slice(c));break}}if(this._passThroughOptions){r.push(l,...e.slice(c));break}r.push(l)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==`string`?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
44
44
|
`),this.outputHelp({error:!0}));let n=t||{},r=n.exitCode||1,i=n.code||`commander.error`;this._exit(r,i,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in a.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||[`default`,`config`,`env`].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,a.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new f(this.options),t=e=>this.getOptionValue(e)!==void 0&&![`default`,`implied`].includes(this.getOptionValueSource(e));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(e=>{Object.keys(e.implied).filter(e=>!t(e)).forEach(t=>{this.setOptionValueWithSource(t,e.implied[t],`implied`)})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:`commander.missingArgument`})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:`commander.optionMissingArgument`})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:`commander.missingMandatoryOptionValue`})}_conflictingOption(e,t){let n=e=>{let t=e.attributeName(),n=this.getOptionValue(t),r=this.options.find(e=>e.negate&&t===e.attributeName()),i=this.options.find(e=>!e.negate&&t===e.attributeName());return r&&(r.presetArg===void 0&&n===!1||r.presetArg!==void 0&&n===r.presetArg)?r:i||e},r=e=>{let t=n(e),r=t.attributeName();return this.getOptionValueSource(r)===`env`?`environment variable '${t.envVar}'`:`option '${t.flags}'`},i=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(i,{code:`commander.conflictingOption`})}unknownOption(e){if(this._allowUnknownOption)return;let t=``;if(e.startsWith(`--`)&&this._showSuggestionAfterError){let n=[],r=this;do{let e=r.createHelp().visibleOptions(r).filter(e=>e.long).map(e=>e.long);n=n.concat(e),r=r.parent}while(r&&!r._enablePositionalOptions);t=p(e,n)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:`commander.unknownOption`})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?``:`s`,r=`error: too many arguments${this.parent?` for '${this.name()}'`:``}. Expected ${t} argument${n} but got ${e.length}.`;this.error(r,{code:`commander.excessArguments`})}unknownCommand(){let e=this.args[0],t=``;if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(e=>{n.push(e.name()),e.alias()&&n.push(e.alias())}),t=p(e,n)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:`commander.unknownCommand`})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t||=`-V, --version`,n||=`output the version number`;let r=this.createOption(t,n);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on(`option:`+r.name(),()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,`commander.version`,e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw Error(`Command alias can't be the same as its name`);let n=this.parent?._findCommand(e);if(n){let t=[n.name()].concat(n.aliases()).join(`|`);throw Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(e=>this.alias(e)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let e=this.registeredArguments.map(e=>s(e));return[].concat(this.options.length||this._helpOption!==null?`[options]`:[],this.commands.length?`[command]`:[],this.registeredArguments.length?e:[]).join(` `)}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??``:(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??``:(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??``:(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=r.basename(e,r.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let r=t.formatHelp(this,t);return n.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(e){e||={};let t=!!e.error,n,r,i;return t?(n=e=>this._outputConfiguration.writeErr(e),r=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(n=e=>this._outputConfiguration.writeOut(e),r=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:t,write:e=>(r||(e=this._outputConfiguration.stripColor(e)),n(e)),hasColors:r,helpWidth:i}}outputHelp(e){let t;typeof e==`function`&&(t=e,e=void 0);let n=this._getOutputContext(e),r={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(e=>e.emit(`beforeAllHelp`,r)),this.emit(`beforeHelp`,r);let i=this.helpInformation({error:n.error});if(t&&(i=t(i),typeof i!=`string`&&!Buffer.isBuffer(i)))throw Error(`outputHelp callback must return a string or a Buffer`);n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit(`afterHelp`,r),this._getCommandAndAncestors().forEach(e=>e.emit(`afterAllHelp`,r))}helpOption(e,t){return typeof e==`boolean`?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??`-h, --help`,t??`display help for command`),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(a.exitCode??0);t===0&&e&&typeof e!=`function`&&e.error&&(t=1),this._exit(t,`commander.help`,`(outputHelp)`)}addHelpText(e,t){let n=[`beforeAll`,`before`,`after`,`afterAll`];if(!n.includes(e))throw Error(`Unexpected value for position to addHelpText.
|
|
45
|
-
Expecting one of '${n.join(`', '`)}'`);let r=`${e}Help`;return this.on(r,e=>{let n;n=typeof t==`function`?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,`commander.helpDisplayed`,`(outputHelp)`))}};function h(e){return e.map(e=>{if(!e.startsWith(`--inspect`))return e;let t,n=`127.0.0.1`,r=`9229`,i;return(i=e.match(/^(--inspect(-brk)?)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],r=i[4]):(t=i[1],/^\d+$/.test(i[3])?r=i[3]:n=i[3]):t=i[1],t&&r!==`0`?`${t}=${n}:${parseInt(r)+1}`:e})}function g(){if(a.env.NO_COLOR||a.env.FORCE_COLOR===`0`||a.env.FORCE_COLOR===`false`)return!1;if(a.env.FORCE_COLOR||a.env.CLICOLOR_FORCE!==void 0)return!0}e.Command=m,e.useColor=g}));const{program:On,createCommand:kn,createArgument:An,createOption:jn,CommanderError:Mn,InvalidArgumentError:Nn,InvalidOptionArgumentError:Pn,Command:Fn,Argument:In,Option:Ln,Help:Rn}=je(V((e=>{let{Argument:t}=Cn(),{Command:n}=Dn(),{CommanderError:r,InvalidArgumentError:i}=Sn(),{Help:a}=wn(),{Option:o}=Tn();e.program=new n,e.createCommand=e=>new n(e),e.createOption=(e,t)=>new o(e,t),e.createArgument=(e,n)=>new t(e,n),e.Command=n,e.Option=o,e.Argument=t,e.Help=a,e.CommanderError=r,e.InvalidArgumentError=i,e.InvalidOptionArgumentError=i}))(),1).default;var zn=class{};const Bn=(e,t=[])=>e.name===`up`||t.includes(`vim`)&&e.name===`k`||t.includes(`emacs`)&&e.ctrl&&e.name===`p`,Vn=(e,t=[])=>e.name===`down`||t.includes(`vim`)&&e.name===`j`||t.includes(`emacs`)&&e.ctrl&&e.name===`n`,Hn=e=>e.name===`backspace`,Un=e=>e.name===`tab`,Wn=e=>`1234567890`.includes(e.name),Gn=e=>e.name===`enter`||e.name===`return`;var Kn=class extends Error{name=`AbortPromptError`;message=`Prompt was aborted`;constructor(e){super(),this.cause=e?.cause}},qn=class extends Error{name=`CancelPromptError`;message=`Prompt was canceled`},Jn=class extends Error{name=`ExitPromptError`},Yn=class extends Error{name=`HookError`},Xn=class extends Error{name=`ValidationError`};const Zn=new re;function Qn(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function $n(e,t){let n=Qn(e);return Zn.run(n,()=>{function e(e){n.handleChange=()=>{n.index=0,e()},n.handleChange()}return t(e)})}function er(){let e=Zn.getStore();if(!e)throw new Yn(`[Inquirer] Hook functions can only be called from within a prompt`);return e}function tr(){return er().rl}function nr(e){return P.bind((...t)=>{let n=er(),r=!1,i=n.handleChange;n.handleChange=()=>{r=!0};let a=e(...t);return r&&i(),n.handleChange=i,a})}function rr(e){let t=er(),{index:n}=t,r=e({get(){return t.hooks[n]},set(e){t.hooks[n]=e},initialized:n in t.hooks});return t.index++,r}function ir(){er().handleChange()}const ar={queue(e){let t=er(),{index:n}=t;t.hooksEffect.push(()=>{t.hooksCleanup[n]?.();let r=e(tr());if(r!=null&&typeof r!=`function`)throw new Xn(`useEffect return value must be a cleanup function or nothing.`);t.hooksCleanup[n]=r})},run(){let e=er();nr(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){let e=er();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function or(e){return rr(t=>{let n=P.bind(function(e){t.get()!==e&&(t.set(e),ir())});if(t.initialized)return[t.get(),n];let r=typeof e==`function`?e():e;return t.set(r),[r,n]})}function sr(e,t){rr(n=>{let r=n.get();(!Array.isArray(r)||t.some((e,t)=>!Object.is(e,r[t])))&&ar.queue(e),n.set(t)})}function cr(){return v.platform===`win32`?!!v.env.WT_SESSION||!!v.env.TERMINUS_SUBLIME||v.env.ConEmuTask===`{cmd::Cmder}`||v.env.TERM_PROGRAM===`Terminus-Sublime`||v.env.TERM_PROGRAM===`vscode`||v.env.TERM===`xterm-256color`||v.env.TERM===`alacritty`||v.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:v.env.TERM!==`linux`}const lr={circleQuestionMark:`(?)`,questionMarkPrefix:`(?)`,square:`█`,squareDarkShade:`▓`,squareMediumShade:`▒`,squareLightShade:`░`,squareTop:`▀`,squareBottom:`▄`,squareLeft:`▌`,squareRight:`▐`,squareCenter:`■`,bullet:`●`,dot:`․`,ellipsis:`…`,pointerSmall:`›`,triangleUp:`▲`,triangleUpSmall:`▴`,triangleDown:`▼`,triangleDownSmall:`▾`,triangleLeftSmall:`◂`,triangleRightSmall:`▸`,home:`⌂`,heart:`♥`,musicNote:`♪`,musicNoteBeamed:`♫`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,arrowLeftRight:`↔`,arrowUpDown:`↕`,almostEqual:`≈`,notEqual:`≠`,lessOrEqual:`≤`,greaterOrEqual:`≥`,identical:`≡`,infinity:`∞`,subscriptZero:`₀`,subscriptOne:`₁`,subscriptTwo:`₂`,subscriptThree:`₃`,subscriptFour:`₄`,subscriptFive:`₅`,subscriptSix:`₆`,subscriptSeven:`₇`,subscriptEight:`₈`,subscriptNine:`₉`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneEighth:`⅛`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`,line:`─`,lineBold:`━`,lineDouble:`═`,lineDashed0:`┄`,lineDashed1:`┅`,lineDashed2:`┈`,lineDashed3:`┉`,lineDashed4:`╌`,lineDashed5:`╍`,lineDashed6:`╴`,lineDashed7:`╶`,lineDashed8:`╸`,lineDashed9:`╺`,lineDashed10:`╼`,lineDashed11:`╾`,lineDashed12:`−`,lineDashed13:`–`,lineDashed14:`‐`,lineDashed15:`⁃`,lineVertical:`│`,lineVerticalBold:`┃`,lineVerticalDouble:`║`,lineVerticalDashed0:`┆`,lineVerticalDashed1:`┇`,lineVerticalDashed2:`┊`,lineVerticalDashed3:`┋`,lineVerticalDashed4:`╎`,lineVerticalDashed5:`╏`,lineVerticalDashed6:`╵`,lineVerticalDashed7:`╷`,lineVerticalDashed8:`╹`,lineVerticalDashed9:`╻`,lineVerticalDashed10:`╽`,lineVerticalDashed11:`╿`,lineDownLeft:`┐`,lineDownLeftArc:`╮`,lineDownBoldLeftBold:`┓`,lineDownBoldLeft:`┒`,lineDownLeftBold:`┑`,lineDownDoubleLeftDouble:`╗`,lineDownDoubleLeft:`╖`,lineDownLeftDouble:`╕`,lineDownRight:`┌`,lineDownRightArc:`╭`,lineDownBoldRightBold:`┏`,lineDownBoldRight:`┎`,lineDownRightBold:`┍`,lineDownDoubleRightDouble:`╔`,lineDownDoubleRight:`╓`,lineDownRightDouble:`╒`,lineUpLeft:`┘`,lineUpLeftArc:`╯`,lineUpBoldLeftBold:`┛`,lineUpBoldLeft:`┚`,lineUpLeftBold:`┙`,lineUpDoubleLeftDouble:`╝`,lineUpDoubleLeft:`╜`,lineUpLeftDouble:`╛`,lineUpRight:`└`,lineUpRightArc:`╰`,lineUpBoldRightBold:`┗`,lineUpBoldRight:`┖`,lineUpRightBold:`┕`,lineUpDoubleRightDouble:`╚`,lineUpDoubleRight:`╙`,lineUpRightDouble:`╘`,lineUpDownLeft:`┤`,lineUpBoldDownBoldLeftBold:`┫`,lineUpBoldDownBoldLeft:`┨`,lineUpDownLeftBold:`┥`,lineUpBoldDownLeftBold:`┩`,lineUpDownBoldLeftBold:`┪`,lineUpDownBoldLeft:`┧`,lineUpBoldDownLeft:`┦`,lineUpDoubleDownDoubleLeftDouble:`╣`,lineUpDoubleDownDoubleLeft:`╢`,lineUpDownLeftDouble:`╡`,lineUpDownRight:`├`,lineUpBoldDownBoldRightBold:`┣`,lineUpBoldDownBoldRight:`┠`,lineUpDownRightBold:`┝`,lineUpBoldDownRightBold:`┡`,lineUpDownBoldRightBold:`┢`,lineUpDownBoldRight:`┟`,lineUpBoldDownRight:`┞`,lineUpDoubleDownDoubleRightDouble:`╠`,lineUpDoubleDownDoubleRight:`╟`,lineUpDownRightDouble:`╞`,lineDownLeftRight:`┬`,lineDownBoldLeftBoldRightBold:`┳`,lineDownLeftBoldRightBold:`┯`,lineDownBoldLeftRight:`┰`,lineDownBoldLeftBoldRight:`┱`,lineDownBoldLeftRightBold:`┲`,lineDownLeftRightBold:`┮`,lineDownLeftBoldRight:`┭`,lineDownDoubleLeftDoubleRightDouble:`╦`,lineDownDoubleLeftRight:`╥`,lineDownLeftDoubleRightDouble:`╤`,lineUpLeftRight:`┴`,lineUpBoldLeftBoldRightBold:`┻`,lineUpLeftBoldRightBold:`┷`,lineUpBoldLeftRight:`┸`,lineUpBoldLeftBoldRight:`┹`,lineUpBoldLeftRightBold:`┺`,lineUpLeftRightBold:`┶`,lineUpLeftBoldRight:`┵`,lineUpDoubleLeftDoubleRightDouble:`╩`,lineUpDoubleLeftRight:`╨`,lineUpLeftDoubleRightDouble:`╧`,lineUpDownLeftRight:`┼`,lineUpBoldDownBoldLeftBoldRightBold:`╋`,lineUpDownBoldLeftBoldRightBold:`╈`,lineUpBoldDownLeftBoldRightBold:`╇`,lineUpBoldDownBoldLeftRightBold:`╊`,lineUpBoldDownBoldLeftBoldRight:`╉`,lineUpBoldDownLeftRight:`╀`,lineUpDownBoldLeftRight:`╁`,lineUpDownLeftBoldRight:`┽`,lineUpDownLeftRightBold:`┾`,lineUpBoldDownBoldLeftRight:`╂`,lineUpDownLeftBoldRightBold:`┿`,lineUpBoldDownLeftBoldRight:`╃`,lineUpBoldDownLeftRightBold:`╄`,lineUpDownBoldLeftBoldRight:`╅`,lineUpDownBoldLeftRightBold:`╆`,lineUpDoubleDownDoubleLeftDoubleRightDouble:`╬`,lineUpDoubleDownDoubleLeftRight:`╫`,lineUpDownLeftDoubleRightDouble:`╪`,lineCross:`╳`,lineBackslash:`╲`,lineSlash:`╱`},ur={tick:`✔`,info:`ℹ`,warning:`⚠`,cross:`✘`,squareSmall:`◻`,squareSmallFilled:`◼`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,pointer:`❯`,triangleUpOutline:`△`,triangleLeft:`◀`,triangleRight:`▶`,lozenge:`◆`,lozengeOutline:`◇`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,star:`★`,play:`▶`,nodejs:`⬢`,oneSeventh:`⅐`,oneNinth:`⅑`,oneTenth:`⅒`},dr={tick:`√`,info:`i`,warning:`‼`,cross:`×`,squareSmall:`□`,squareSmallFilled:`■`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,pointer:`>`,triangleUpOutline:`∆`,triangleLeft:`◄`,triangleRight:`►`,lozenge:`♦`,lozengeOutline:`◊`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,star:`✶`,play:`►`,nodejs:`♦`,oneSeventh:`1/7`,oneNinth:`1/9`,oneTenth:`1/10`},fr={...lr,...ur},pr={...lr,...dr};var mr=cr()?fr:pr;Object.entries(ur);const hr={prefix:{idle:_(`blue`,`?`),done:_(`green`,mr.tick)},spinner:{interval:80,frames:[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`].map(e=>_(`yellow`,e))},style:{answer:e=>_(`cyan`,e),message:e=>_(`bold`,e),error:e=>_(`red`,`> ${e}`),defaultAnswer:e=>_(`dim`,`(${e})`),help:e=>_(`dim`,e),highlight:e=>_(`cyan`,e),key:e=>_(`cyan`,_(`bold`,`<${e}>`))}};function gr(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function _r(...e){let t={};for(let n of e)for(let[e,r]of Object.entries(n)){let n=t[e];t[e]=gr(n)&&gr(r)?_r(n,r):r}return t}function vr(...e){return _r(hr,...e.filter(e=>e!=null))}function yr({status:e=`idle`,theme:t}){let[n,r]=or(!1),[i,a]=or(0),{prefix:o,spinner:s}=vr(t);return sr(()=>{if(e===`loading`){let e,t=-1,n=setTimeout(()=>{r(!0),e=setInterval(()=>{t+=1,a(t%s.frames.length)},s.interval)},300);return()=>{clearTimeout(n),clearInterval(e)}}else r(!1)},[e]),n?s.frames[i]:typeof o==`string`?o:o[e===`loading`?`idle`:e]??o.idle}function br(e,t){return rr(n=>{let r=n.get();if(!r||r.dependencies.length!==t.length||r.dependencies.some((e,n)=>e!==t[n])){let r=e();return n.set({value:r,dependencies:t}),r}return r.value})}function xr(e){return or({current:e})[0]}function Sr(e){let t=xr(e);t.current=e,sr(e=>{let n=!1,r=nr((r,i)=>{n||t.current(i,e)});return e.input.on(`keypress`,r),()=>{n=!0,e.input.removeListener(`keypress`,r)}},[])}var Cr=V(((e,t)=>{t.exports=r;function n(e){let t={defaultWidth:0,output:process.stdout,tty:Me(`tty`)};return e?(Object.keys(t).forEach(function(n){e[n]||(e[n]=t[n])}),e):t}function r(e){let t=n(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let e=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(e)&&e!==0)return e}return t.defaultWidth}}));function wr({onlyFirst:e=!1}={}){return RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`,e?void 0:`g`)}const Tr=wr();function Er(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Tr,``)}function Dr(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function Or(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function kr(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function Ar(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function jr(e,{ambiguousAsWide:t=!1}={}){return Ar(e),Or(e)||kr(e)||t&&Dr(e)?2:1}var Mr=je(V(((e,t)=>{t.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g}))(),1);const Nr=new Intl.Segmenter,Pr=/^\p{Default_Ignorable_Code_Point}$/u;function Fr(e,t={}){if(typeof e!=`string`||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=Er(e)),e.length===0)return 0;let i=0,a={ambiguousAsWide:!n};for(let{segment:t}of Nr.segment(e)){let e=t.codePointAt(0);if(!(e<=31||e>=127&&e<=159)&&!(e>=8203&&e<=8207||e===65279)&&!(e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071)&&!(e>=55296&&e<=57343)&&!(e>=65024&&e<=65039)&&!Pr.test(t)){if((0,Mr.default)().test(t)){i+=2;continue}i+=jr(e,a)}}return i}const Ir=(e=0)=>t=>`\u001B[${t+e}m`,Lr=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,Rr=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,zr={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(zr.modifier);const Br=Object.keys(zr.color),Vr=Object.keys(zr.bgColor);[...Br,...Vr];function Hr(){let e=new Map;for(let[t,n]of Object.entries(zr)){for(let[t,r]of Object.entries(n))zr[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=zr[t],e.set(r[0],r[1]);Object.defineProperty(zr,t,{value:n,enumerable:!1})}return Object.defineProperty(zr,`codes`,{value:e,enumerable:!1}),zr.color.close=`\x1B[39m`,zr.bgColor.close=`\x1B[49m`,zr.color.ansi=Ir(),zr.color.ansi256=Lr(),zr.color.ansi16m=Rr(),zr.bgColor.ansi=Ir(10),zr.bgColor.ansi256=Lr(10),zr.bgColor.ansi16m=Rr(10),Object.defineProperties(zr,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>zr.rgbToAnsi256(...zr.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>zr.ansi256ToAnsi(zr.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>zr.ansi256ToAnsi(zr.hexToAnsi256(e)),enumerable:!1}}),zr}var Ur=Hr();const Wr=new Set([`\x1B`,``]),Gr=`]8;;`,Kr=e=>`${Wr.values().next().value}[${e}m`,qr=e=>`${Wr.values().next().value}${Gr}${e}`,Jr=e=>e.split(` `).map(e=>Fr(e)),Yr=(e,t,n)=>{let r=[...t],i=!1,a=!1,o=Fr(Er(e.at(-1)));for(let[t,s]of r.entries()){let c=Fr(s);if(o+c<=n?e[e.length-1]+=s:(e.push(s),o=0),Wr.has(s)&&(i=!0,a=r.slice(t+1,t+1+4).join(``)===Gr),i){a?s===`\x07`&&(i=!1,a=!1):s===`m`&&(i=!1);continue}o+=c,o===n&&t<r.length-1&&(e.push(``),o=0)}!o&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Xr=e=>{let t=e.split(` `),n=t.length;for(;n>0&&!(Fr(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Zr=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=Jr(e),s=[``];for(let[r,i]of e.split(` `).entries()){n.trim!==!1&&(s[s.length-1]=s.at(-1).trimStart());let e=Fr(s.at(-1));if(r!==0&&(e>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),e=0),(e>0||n.trim===!1)&&(s[s.length-1]+=` `,e++)),n.hard&&o[r]>t){let n=t-e,a=1+Math.floor((o[r]-n-1)/t);Math.floor((o[r]-1)/t)<a&&s.push(``),Yr(s,i,t);continue}if(e+o[r]>t&&e>0&&o[r]>0){if(n.wordWrap===!1&&e<t){Yr(s,i,t);continue}s.push(``)}if(e+o[r]>t&&n.wordWrap===!1){Yr(s,i,t);continue}s[s.length-1]+=i}n.trim!==!1&&(s=s.map(e=>Xr(e)));let c=s.join(`
|
|
46
|
-
`),l=[...c],u=0;for(let[e,t]of l.entries()){if(r+=t,
|
|
47
|
-
`?(a&&(r+=
|
|
48
|
-
`&&(i&&n&&(r+=
|
|
45
|
+
Expecting one of '${n.join(`', '`)}'`);let r=`${e}Help`;return this.on(r,e=>{let n;n=typeof t==`function`?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,`commander.helpDisplayed`,`(outputHelp)`))}};function h(e){return e.map(e=>{if(!e.startsWith(`--inspect`))return e;let t,n=`127.0.0.1`,r=`9229`,i;return(i=e.match(/^(--inspect(-brk)?)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],r=i[4]):(t=i[1],/^\d+$/.test(i[3])?r=i[3]:n=i[3]):t=i[1],t&&r!==`0`?`${t}=${n}:${parseInt(r)+1}`:e})}function g(){if(a.env.NO_COLOR||a.env.FORCE_COLOR===`0`||a.env.FORCE_COLOR===`false`)return!1;if(a.env.FORCE_COLOR||a.env.CLICOLOR_FORCE!==void 0)return!0}e.Command=m,e.useColor=g}));const{program:In,createCommand:Ln,createArgument:Rn,createOption:zn,CommanderError:Bn,InvalidArgumentError:Vn,InvalidOptionArgumentError:Hn,Command:Un,Argument:Wn,Option:Gn,Help:Kn}=Re(Fe((e=>{let{Argument:t}=jn(),{Command:n}=Fn(),{CommanderError:r,InvalidArgumentError:i}=An(),{Help:a}=Mn(),{Option:o}=Nn();e.program=new n,e.createCommand=e=>new n(e),e.createOption=(e,t)=>new o(e,t),e.createArgument=(e,n)=>new t(e,n),e.Command=n,e.Option=o,e.Argument=t,e.Help=a,e.CommanderError=r,e.InvalidArgumentError=i,e.InvalidOptionArgumentError=i}))(),1).default;var qn=class{};const Jn=(e,t=[])=>e.name===`up`||t.includes(`vim`)&&e.name===`k`||t.includes(`emacs`)&&e.ctrl&&e.name===`p`,Yn=(e,t=[])=>e.name===`down`||t.includes(`vim`)&&e.name===`j`||t.includes(`emacs`)&&e.ctrl&&e.name===`n`,Xn=e=>e.name===`backspace`,Zn=e=>e.name===`tab`,Qn=e=>`1234567890`.includes(e.name),$n=e=>e.name===`enter`||e.name===`return`;var er=class extends Error{name=`AbortPromptError`;message=`Prompt was aborted`;constructor(e){super(),this.cause=e?.cause}},tr=class extends Error{name=`CancelPromptError`;message=`Prompt was canceled`},nr=class extends Error{name=`ExitPromptError`},rr=class extends Error{name=`HookError`},ir=class extends Error{name=`ValidationError`};const ar=new le;function or(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function sr(e,t){let n=or(e);return ar.run(n,()=>{function e(e){n.handleChange=()=>{n.index=0,e()},n.handleChange()}return t(e)})}function cr(){let e=ar.getStore();if(!e)throw new rr(`[Inquirer] Hook functions can only be called from within a prompt`);return e}function lr(){return cr().rl}function ur(e){return ue.bind((...t)=>{let n=cr(),r=!1,i=n.handleChange;n.handleChange=()=>{r=!0};let a=e(...t);return r&&i(),n.handleChange=i,a})}function dr(e){let t=cr(),{index:n}=t,r=e({get(){return t.hooks[n]},set(e){t.hooks[n]=e},initialized:n in t.hooks});return t.index++,r}function fr(){cr().handleChange()}const pr={queue(e){let t=cr(),{index:n}=t;t.hooksEffect.push(()=>{t.hooksCleanup[n]?.();let r=e(lr());if(r!=null&&typeof r!=`function`)throw new ir(`useEffect return value must be a cleanup function or nothing.`);t.hooksCleanup[n]=r})},run(){let e=cr();ur(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){let e=cr();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function mr(e){return dr(t=>{let n=ue.bind(function(e){t.get()!==e&&(t.set(e),fr())});if(t.initialized)return[t.get(),n];let r=typeof e==`function`?e():e;return t.set(r),[r,n]})}function hr(e,t){dr(n=>{let r=n.get();(!Array.isArray(r)||t.some((e,t)=>!Object.is(e,r[t])))&&pr.queue(e),n.set(t)})}function gr(){return v.platform===`win32`?!!v.env.WT_SESSION||!!v.env.TERMINUS_SUBLIME||v.env.ConEmuTask===`{cmd::Cmder}`||v.env.TERM_PROGRAM===`Terminus-Sublime`||v.env.TERM_PROGRAM===`vscode`||v.env.TERM===`xterm-256color`||v.env.TERM===`alacritty`||v.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:v.env.TERM!==`linux`}const _r={circleQuestionMark:`(?)`,questionMarkPrefix:`(?)`,square:`█`,squareDarkShade:`▓`,squareMediumShade:`▒`,squareLightShade:`░`,squareTop:`▀`,squareBottom:`▄`,squareLeft:`▌`,squareRight:`▐`,squareCenter:`■`,bullet:`●`,dot:`․`,ellipsis:`…`,pointerSmall:`›`,triangleUp:`▲`,triangleUpSmall:`▴`,triangleDown:`▼`,triangleDownSmall:`▾`,triangleLeftSmall:`◂`,triangleRightSmall:`▸`,home:`⌂`,heart:`♥`,musicNote:`♪`,musicNoteBeamed:`♫`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,arrowLeftRight:`↔`,arrowUpDown:`↕`,almostEqual:`≈`,notEqual:`≠`,lessOrEqual:`≤`,greaterOrEqual:`≥`,identical:`≡`,infinity:`∞`,subscriptZero:`₀`,subscriptOne:`₁`,subscriptTwo:`₂`,subscriptThree:`₃`,subscriptFour:`₄`,subscriptFive:`₅`,subscriptSix:`₆`,subscriptSeven:`₇`,subscriptEight:`₈`,subscriptNine:`₉`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneEighth:`⅛`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`,line:`─`,lineBold:`━`,lineDouble:`═`,lineDashed0:`┄`,lineDashed1:`┅`,lineDashed2:`┈`,lineDashed3:`┉`,lineDashed4:`╌`,lineDashed5:`╍`,lineDashed6:`╴`,lineDashed7:`╶`,lineDashed8:`╸`,lineDashed9:`╺`,lineDashed10:`╼`,lineDashed11:`╾`,lineDashed12:`−`,lineDashed13:`–`,lineDashed14:`‐`,lineDashed15:`⁃`,lineVertical:`│`,lineVerticalBold:`┃`,lineVerticalDouble:`║`,lineVerticalDashed0:`┆`,lineVerticalDashed1:`┇`,lineVerticalDashed2:`┊`,lineVerticalDashed3:`┋`,lineVerticalDashed4:`╎`,lineVerticalDashed5:`╏`,lineVerticalDashed6:`╵`,lineVerticalDashed7:`╷`,lineVerticalDashed8:`╹`,lineVerticalDashed9:`╻`,lineVerticalDashed10:`╽`,lineVerticalDashed11:`╿`,lineDownLeft:`┐`,lineDownLeftArc:`╮`,lineDownBoldLeftBold:`┓`,lineDownBoldLeft:`┒`,lineDownLeftBold:`┑`,lineDownDoubleLeftDouble:`╗`,lineDownDoubleLeft:`╖`,lineDownLeftDouble:`╕`,lineDownRight:`┌`,lineDownRightArc:`╭`,lineDownBoldRightBold:`┏`,lineDownBoldRight:`┎`,lineDownRightBold:`┍`,lineDownDoubleRightDouble:`╔`,lineDownDoubleRight:`╓`,lineDownRightDouble:`╒`,lineUpLeft:`┘`,lineUpLeftArc:`╯`,lineUpBoldLeftBold:`┛`,lineUpBoldLeft:`┚`,lineUpLeftBold:`┙`,lineUpDoubleLeftDouble:`╝`,lineUpDoubleLeft:`╜`,lineUpLeftDouble:`╛`,lineUpRight:`└`,lineUpRightArc:`╰`,lineUpBoldRightBold:`┗`,lineUpBoldRight:`┖`,lineUpRightBold:`┕`,lineUpDoubleRightDouble:`╚`,lineUpDoubleRight:`╙`,lineUpRightDouble:`╘`,lineUpDownLeft:`┤`,lineUpBoldDownBoldLeftBold:`┫`,lineUpBoldDownBoldLeft:`┨`,lineUpDownLeftBold:`┥`,lineUpBoldDownLeftBold:`┩`,lineUpDownBoldLeftBold:`┪`,lineUpDownBoldLeft:`┧`,lineUpBoldDownLeft:`┦`,lineUpDoubleDownDoubleLeftDouble:`╣`,lineUpDoubleDownDoubleLeft:`╢`,lineUpDownLeftDouble:`╡`,lineUpDownRight:`├`,lineUpBoldDownBoldRightBold:`┣`,lineUpBoldDownBoldRight:`┠`,lineUpDownRightBold:`┝`,lineUpBoldDownRightBold:`┡`,lineUpDownBoldRightBold:`┢`,lineUpDownBoldRight:`┟`,lineUpBoldDownRight:`┞`,lineUpDoubleDownDoubleRightDouble:`╠`,lineUpDoubleDownDoubleRight:`╟`,lineUpDownRightDouble:`╞`,lineDownLeftRight:`┬`,lineDownBoldLeftBoldRightBold:`┳`,lineDownLeftBoldRightBold:`┯`,lineDownBoldLeftRight:`┰`,lineDownBoldLeftBoldRight:`┱`,lineDownBoldLeftRightBold:`┲`,lineDownLeftRightBold:`┮`,lineDownLeftBoldRight:`┭`,lineDownDoubleLeftDoubleRightDouble:`╦`,lineDownDoubleLeftRight:`╥`,lineDownLeftDoubleRightDouble:`╤`,lineUpLeftRight:`┴`,lineUpBoldLeftBoldRightBold:`┻`,lineUpLeftBoldRightBold:`┷`,lineUpBoldLeftRight:`┸`,lineUpBoldLeftBoldRight:`┹`,lineUpBoldLeftRightBold:`┺`,lineUpLeftRightBold:`┶`,lineUpLeftBoldRight:`┵`,lineUpDoubleLeftDoubleRightDouble:`╩`,lineUpDoubleLeftRight:`╨`,lineUpLeftDoubleRightDouble:`╧`,lineUpDownLeftRight:`┼`,lineUpBoldDownBoldLeftBoldRightBold:`╋`,lineUpDownBoldLeftBoldRightBold:`╈`,lineUpBoldDownLeftBoldRightBold:`╇`,lineUpBoldDownBoldLeftRightBold:`╊`,lineUpBoldDownBoldLeftBoldRight:`╉`,lineUpBoldDownLeftRight:`╀`,lineUpDownBoldLeftRight:`╁`,lineUpDownLeftBoldRight:`┽`,lineUpDownLeftRightBold:`┾`,lineUpBoldDownBoldLeftRight:`╂`,lineUpDownLeftBoldRightBold:`┿`,lineUpBoldDownLeftBoldRight:`╃`,lineUpBoldDownLeftRightBold:`╄`,lineUpDownBoldLeftBoldRight:`╅`,lineUpDownBoldLeftRightBold:`╆`,lineUpDoubleDownDoubleLeftDoubleRightDouble:`╬`,lineUpDoubleDownDoubleLeftRight:`╫`,lineUpDownLeftDoubleRightDouble:`╪`,lineCross:`╳`,lineBackslash:`╲`,lineSlash:`╱`},vr={tick:`✔`,info:`ℹ`,warning:`⚠`,cross:`✘`,squareSmall:`◻`,squareSmallFilled:`◼`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,pointer:`❯`,triangleUpOutline:`△`,triangleLeft:`◀`,triangleRight:`▶`,lozenge:`◆`,lozengeOutline:`◇`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,star:`★`,play:`▶`,nodejs:`⬢`,oneSeventh:`⅐`,oneNinth:`⅑`,oneTenth:`⅒`},yr={tick:`√`,info:`i`,warning:`‼`,cross:`×`,squareSmall:`□`,squareSmallFilled:`■`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,pointer:`>`,triangleUpOutline:`∆`,triangleLeft:`◄`,triangleRight:`►`,lozenge:`♦`,lozengeOutline:`◊`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,star:`✶`,play:`►`,nodejs:`♦`,oneSeventh:`1/7`,oneNinth:`1/9`,oneTenth:`1/10`},br={..._r,...vr},xr={..._r,...yr};var Sr=gr()?br:xr;Object.entries(vr);const Cr={prefix:{idle:_(`blue`,`?`),done:_(`green`,Sr.tick)},spinner:{interval:80,frames:[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`].map(e=>_(`yellow`,e))},style:{answer:e=>_(`cyan`,e),message:e=>_(`bold`,e),error:e=>_(`red`,`> ${e}`),defaultAnswer:e=>_(`dim`,`(${e})`),help:e=>_(`dim`,e),highlight:e=>_(`cyan`,e),key:e=>_(`cyan`,_(`bold`,`<${e}>`))}};function wr(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Tr(...e){let t={};for(let n of e)for(let[e,r]of Object.entries(n)){let n=t[e];t[e]=wr(n)&&wr(r)?Tr(n,r):r}return t}function Er(...e){return Tr(Cr,...e.filter(e=>e!=null))}function Dr({status:e=`idle`,theme:t}){let[n,r]=mr(!1),[i,a]=mr(0),{prefix:o,spinner:s}=Er(t);return hr(()=>{if(e===`loading`){let e,t=-1,n=setTimeout(()=>{r(!0),e=setInterval(()=>{t+=1,a(t%s.frames.length)},s.interval)},300);return()=>{clearTimeout(n),clearInterval(e)}}else r(!1)},[e]),n?s.frames[i]:typeof o==`string`?o:o[e===`loading`?`idle`:e]??o.idle}function Or(e,t){return dr(n=>{let r=n.get();if(!r||r.dependencies.length!==t.length||r.dependencies.some((e,n)=>e!==t[n])){let r=e();return n.set({value:r,dependencies:t}),r}return r.value})}function kr(e){return mr({current:e})[0]}function Ar(e){let t=kr(e);t.current=e,hr(e=>{let n=!1,r=ur((r,i)=>{n||t.current(i,e)});return e.input.on(`keypress`,r),()=>{n=!0,e.input.removeListener(`keypress`,r)}},[])}var jr=Fe(((e,t)=>{t.exports=r;function n(e){let t={defaultWidth:0,output:process.stdout,tty:ze(`tty`)};return e?(Object.keys(t).forEach(function(n){e[n]||(e[n]=t[n])}),e):t}function r(e){let t=n(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let e=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(e)&&e!==0)return e}return t.defaultWidth}}));function Mr({onlyFirst:e=!1}={}){return RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`,e?void 0:`g`)}const Nr=Mr();function Pr(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Nr,``)}function Fr(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function Ir(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Lr(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function Rr(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function zr(e,{ambiguousAsWide:t=!1}={}){return Rr(e),Ir(e)||Lr(e)||t&&Fr(e)?2:1}var Br=Re(Fe(((e,t)=>{t.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g}))(),1);const Vr=new Intl.Segmenter,Hr=/^\p{Default_Ignorable_Code_Point}$/u;function Ur(e,t={}){if(typeof e!=`string`||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=Pr(e)),e.length===0)return 0;let i=0,a={ambiguousAsWide:!n};for(let{segment:t}of Vr.segment(e)){let e=t.codePointAt(0);if(!(e<=31||e>=127&&e<=159)&&!(e>=8203&&e<=8207||e===65279)&&!(e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071)&&!(e>=55296&&e<=57343)&&!(e>=65024&&e<=65039)&&!Hr.test(t)){if((0,Br.default)().test(t)){i+=2;continue}i+=zr(e,a)}}return i}const Wr=(e=0)=>t=>`\u001B[${t+e}m`,Gr=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,Kr=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,qr={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(qr.modifier);const Jr=Object.keys(qr.color),Yr=Object.keys(qr.bgColor);[...Jr,...Yr];function Xr(){let e=new Map;for(let[t,n]of Object.entries(qr)){for(let[t,r]of Object.entries(n))qr[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=qr[t],e.set(r[0],r[1]);Object.defineProperty(qr,t,{value:n,enumerable:!1})}return Object.defineProperty(qr,`codes`,{value:e,enumerable:!1}),qr.color.close=`\x1B[39m`,qr.bgColor.close=`\x1B[49m`,qr.color.ansi=Wr(),qr.color.ansi256=Gr(),qr.color.ansi16m=Kr(),qr.bgColor.ansi=Wr(10),qr.bgColor.ansi256=Gr(10),qr.bgColor.ansi16m=Kr(10),Object.defineProperties(qr,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>qr.rgbToAnsi256(...qr.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>qr.ansi256ToAnsi(qr.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>qr.ansi256ToAnsi(qr.hexToAnsi256(e)),enumerable:!1}}),qr}var Zr=Xr();const Qr=new Set([`\x1B`,``]),$r=`]8;;`,ei=e=>`${Qr.values().next().value}[${e}m`,ti=e=>`${Qr.values().next().value}${$r}${e}`,ni=e=>e.split(` `).map(e=>Ur(e)),ri=(e,t,n)=>{let r=[...t],i=!1,a=!1,o=Ur(Pr(e.at(-1)));for(let[t,s]of r.entries()){let c=Ur(s);if(o+c<=n?e[e.length-1]+=s:(e.push(s),o=0),Qr.has(s)&&(i=!0,a=r.slice(t+1,t+1+4).join(``)===$r),i){a?s===`\x07`&&(i=!1,a=!1):s===`m`&&(i=!1);continue}o+=c,o===n&&t<r.length-1&&(e.push(``),o=0)}!o&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},ii=e=>{let t=e.split(` `),n=t.length;for(;n>0&&!(Ur(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},ai=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=ni(e),s=[``];for(let[r,i]of e.split(` `).entries()){n.trim!==!1&&(s[s.length-1]=s.at(-1).trimStart());let e=Ur(s.at(-1));if(r!==0&&(e>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),e=0),(e>0||n.trim===!1)&&(s[s.length-1]+=` `,e++)),n.hard&&o[r]>t){let n=t-e,a=1+Math.floor((o[r]-n-1)/t);Math.floor((o[r]-1)/t)<a&&s.push(``),ri(s,i,t);continue}if(e+o[r]>t&&e>0&&o[r]>0){if(n.wordWrap===!1&&e<t){ri(s,i,t);continue}s.push(``)}if(e+o[r]>t&&n.wordWrap===!1){ri(s,i,t);continue}s[s.length-1]+=i}n.trim!==!1&&(s=s.map(e=>ii(e)));let c=s.join(`
|
|
46
|
+
`),l=[...c],u=0;for(let[e,t]of l.entries()){if(r+=t,Qr.has(t)){let{groups:e}=RegExp(`(?:\\[(?<code>\\d+)m|\\${$r}(?<uri>.*))`).exec(c.slice(u))||{groups:{}};if(e.code!==void 0){let t=Number.parseFloat(e.code);i=t===39?void 0:t}else e.uri!==void 0&&(a=e.uri.length===0?void 0:e.uri)}let n=Zr.codes.get(Number(i));l[e+1]===`
|
|
47
|
+
`?(a&&(r+=ti(``)),i&&n&&(r+=ei(n))):t===`
|
|
48
|
+
`&&(i&&n&&(r+=ei(i)),a&&(r+=ti(a))),u+=t.length}return r};function oi(e,t,n){return String(e).normalize().replaceAll(`\r
|
|
49
49
|
`,`
|
|
50
50
|
`).split(`
|
|
51
|
-
`).map(e=>
|
|
52
|
-
`)}var
|
|
53
|
-
`).flatMap(e=>
|
|
51
|
+
`).map(e=>ai(e,t,n)).join(`
|
|
52
|
+
`)}var si=Re(jr(),1);function ci(e,t){return e.split(`
|
|
53
|
+
`).flatMap(e=>oi(e,t,{trim:!1,hard:!0}).split(`
|
|
54
54
|
`).map(e=>e.trimEnd())).join(`
|
|
55
|
-
`)}function
|
|
56
|
-
`)),c=s.reduce((e,t)=>e+t.length,0),l=e=>s[e]??[],u=
|
|
57
|
-
`)}var
|
|
58
|
-
`).length,
|
|
59
|
-
`).pop()??``;var
|
|
55
|
+
`)}function li(){return(0,si.default)({defaultWidth:80,output:lr().output})}function ui({active:e,renderedItems:t,pageSize:n,loop:r}){let i=kr({lastPointer:e,lastActive:void 0}),{lastPointer:a,lastActive:o}=i.current,s=Math.floor(n/2),c=t.reduce((e,t)=>e+t.length,0),l=t.slice(0,e).reduce((e,t)=>e+t.length,0),u=l;if(c>n)if(r)u=a,o!=null&&o<e&&e-o<n&&(u=Math.min(s,Math.abs(e-o)===1?Math.min(a+(t[o]?.length??0),Math.max(l,a)):a+e-o));else{let r=t.slice(e).reduce((e,t)=>e+t.length,0);u=r<n-s?n-r:Math.min(l,s)}return i.current.lastPointer=u,i.current.lastActive=e,u}function di({items:e,active:t,renderItem:n,pageSize:r,loop:i=!0}){let a=li(),o=t=>(t%e.length+e.length)%e.length,s=e.map((e,r)=>e==null?[]:ci(n({item:e,index:r,isActive:r===t}),a).split(`
|
|
56
|
+
`)),c=s.reduce((e,t)=>e+t.length,0),l=e=>s[e]??[],u=ui({active:t,renderedItems:s,pageSize:r,loop:i}),d=l(t).slice(0,r),f=u+d.length<=r?u:r-d.length,p=Array.from({length:r});p.splice(f,d.length,...d);let m=new Set([t]),h=f+d.length,g=o(t+1);for(;h<r&&!m.has(g)&&(i&&c>r?g!==t:g>t);){let e=l(g).slice(0,r-h);p.splice(h,e.length,...e),m.add(g),h+=e.length,g=o(g+1)}for(h=f-1,g=o(t-1);h>=0&&!m.has(g)&&(i&&c>r?g!==t:g<t);){let e=l(g),t=e.slice(Math.max(0,e.length-h-1));p.splice(h-t.length+1,t.length,...t),m.add(g),h-=t.length,g=o(g-1)}return p.filter(e=>typeof e==`string`).join(`
|
|
57
|
+
`)}var fi=Fe(((e,t)=>{let n=ze(`stream`);t.exports=class extends n{#e=null;constructor(e={}){super(e),this.writable=this.readable=!0,this.muted=!1,this.on(`pipe`,this._onpipe),this.replace=e.replace,this._prompt=e.prompt||null,this._hadControl=!1}#t(e,t){return this._dest?this._dest[e]:this._src?this._src[e]:t}#n(e,...t){typeof this._dest?.[e]==`function`&&this._dest[e](...t),typeof this._src?.[e]==`function`&&this._src[e](...t)}get isTTY(){return this.#e===null?this.#t(`isTTY`,!1):this.#e}set isTTY(e){this.#e=e}get rows(){return this.#t(`rows`)}get columns(){return this.#t(`columns`)}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(e){this._src=e}pipe(e,t){return this._dest=e,super.pipe(e,t)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(e){if(this.muted){if(!this.replace)return!0;if(e.match(/^\u001b/))return e.indexOf(this._prompt)===0&&(e=e.slice(this._prompt.length),e=e.replace(/./g,this.replace),e=this._prompt+e),this._hadControl=!0,this.emit(`data`,e);this._prompt&&this._hadControl&&e.indexOf(this._prompt)===0&&(this._hadControl=!1,this.emit(`data`,this._prompt),e=e.slice(this._prompt.length)),e=e.toString().replace(/./g,this.replace)}this.emit(`data`,e)}end(e){this.muted&&(e=e&&this.replace?e.toString().replace(/./g,this.replace):null),e&&this.emit(`data`,e),this.emit(`end`)}destroy(...e){return this.#n(`destroy`,...e)}destroySoon(...e){return this.#n(`destroySoon`,...e)}close(...e){return this.#n(`close`,...e)}}}));const pi=[];pi.push(`SIGHUP`,`SIGINT`,`SIGTERM`),process.platform!==`win32`&&pi.push(`SIGALRM`,`SIGABRT`,`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&pi.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`);const mi=e=>!!e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`,hi=Symbol.for(`signal-exit emitter`),gi=globalThis,_i=Object.defineProperty.bind(Object);var vi=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(gi[hi])return gi[hi];_i(gi,hi,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let n=this.listeners[e],r=n.indexOf(t);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(let i of this.listeners[e])r=i(t,n)===!0||r;return e===`exit`&&(r=this.emit(`afterExit`,t,n)||r),r}},yi=class{};const bi=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});var xi=class extends yi{onExit(){return()=>{}}load(){}unload(){}},Si=class extends yi{#e=Ci.platform===`win32`?`SIGINT`:`SIGHUP`;#t=new vi;#n;#r;#i;#a={};#o=!1;constructor(e){super(),this.#n=e,this.#a={};for(let t of pi)this.#a[t]=()=>{let n=this.#n.listeners(t),{count:r}=this.#t,i=e;if(typeof i.__signal_exit_emitter__==`object`&&typeof i.__signal_exit_emitter__.count==`number`&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let n=this.#t.emit(`exit`,null,t),r=t===`SIGHUP`?this.#e:t;n||e.kill(e.pid,r)}};this.#i=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!mi(this.#n))return()=>{};this.#o===!1&&this.load();let n=t?.alwaysLast?`afterExit`:`exit`;return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(let e of pi)try{let t=this.#a[e];t&&this.#n.on(e,t)}catch{}this.#n.emit=(e,...t)=>this.#c(e,...t),this.#n.reallyExit=e=>this.#s(e)}}unload(){this.#o&&(this.#o=!1,pi.forEach(e=>{let t=this.#a[e];if(!t)throw Error(`Listener not defined for signal: `+e);try{this.#n.removeListener(e,t)}catch{}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#i,--this.#t.count)}#s(e){return mi(this.#n)?(this.#n.exitCode=e||0,this.#t.emit(`exit`,this.#n.exitCode,null),this.#i.call(this.#n,this.#n.exitCode)):0}#c(e,...t){let n=this.#r;if(e===`exit`&&mi(this.#n)){typeof t[0]==`number`&&(this.#n.exitCode=t[0]);let r=n.call(this.#n,e,...t);return this.#t.emit(`exit`,this.#n.exitCode,null),r}else return n.call(this.#n,e,...t)}};const Ci=globalThis.process,{onExit:wi,load:Ti,unload:Ei}=bi(mi(Ci)?new Si(Ci):new xi),Di=(e=1)=>e>0?`[${e}A`:``,Oi=(e=1)=>e>0?`[${e}B`:``,ki=(e,t)=>typeof t==`number`&&!Number.isNaN(t)?`[${t+1};${e+1}H`:`[${e+1}G`,Ai=`\x1B[2K`,ji=e=>e>0?(Ai+Di(1)).repeat(e-1)+Ai+`\x1B[G`:``,Mi=e=>e.split(`
|
|
58
|
+
`).length,Ni=e=>e.split(`
|
|
59
|
+
`).pop()??``;var Pi=class{height=0;extraLinesUnderPrompt=0;cursorPos;rl;constructor(e){this.rl=e,this.cursorPos=e.getCursorPos()}write(e){this.rl.output.unmute(),this.rl.output.write(e),this.rl.output.mute()}render(e,t=``){let n=g(Ni(e)),r=n;this.rl.line.length>0&&(r=r.slice(0,-this.rl.line.length)),this.rl.setPrompt(r),this.cursorPos=this.rl.getCursorPos();let i=li();e=ci(e,i),t=ci(t,i),n.length%i===0&&(e+=`
|
|
60
60
|
`);let a=e+(t?`
|
|
61
|
-
`+t:``),o=Math.floor(n.length/i)-this.cursorPos.rows+(t?
|
|
62
|
-
`,t+=`\x1B[?25h`,this.write(t),this.rl.close()}},
|
|
63
|
-
`).trimEnd()}[?25l`})};async function
|
|
64
|
-
`)?o.replace(/(\r?\n)/g,l+`$1`+c):o)+l},a=t,s=n;return e&&(a=e.o+t,s=n+e.c),o(r,i),r.p={open:t,close:n,o:a,c:s,p:e},r.open=a,r.close=s,r},v=new function e(t=m){let n={Ansis:e,level:t,isSupported:()=>c,strip:e=>e.replace(/[][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,``),extend(e){for(let t in e){let n=e[t],i=(typeof n)[0];i===`s`?(r(t,
|
|
65
|
-
`.repeat(e):``;console.info(t),
|
|
66
|
-
`).join(`\n${a}`),t.push(`${i}m+${this.humanize(e)}\u001B[0m`)}else t[0]=`${
|
|
67
|
-
`).map(e=>e.trim()).join(` `)},O(e){return this.inspectOpts.colors=this.useColors,m(e,this.inspectOpts)}},inspectOpts:Ao,log:Po,humanize:So};function Io(e,t){let n=(t&&t.color)??bo(ko,e);return wo(e,Object.assign(Fo,{color:n},t))}Do(process.env.DEBUG||``);var Lo=ge(import.meta.url);function Ro(e){let t=B(e);return t.length>1&&t[t.length-1]===me&&(t=t.substring(0,t.length-1)),t}const zo=/[\\/]/g;function Bo(e,t){return e.replace(zo,t)}const Vo=/^[a-z]:[\\/]$/i;function Ho(e){return e===`/`||Vo.test(e)}function Uo(e,t){let{resolvePaths:n,normalizePath:r,pathSeparator:i}=t,a=process.platform===`win32`&&e.includes(`/`)||e.startsWith(`.`);return n&&(e=pe(e)),(r||a)&&(e=Ro(e)),e===`.`?``:Bo(e[e.length-1]===i?e:e+i,i)}function Wo(e,t){return t+e}function Go(e,t){return function(n,r){return r.startsWith(e)?r.slice(e.length)+n:Bo(fe(e,r),t.pathSeparator)+t.pathSeparator+n}}function Ko(e){return e}function qo(e,t,n){return t+e+n}function Jo(e,t){let{relativePaths:n,includeBasePath:r}=t;return n&&e?Go(e,t):r?Wo:Ko}function Yo(e){return function(t,n){n.push(t.substring(e.length)||`.`)}}function Xo(e){return function(t,n,r){let i=t.substring(e.length)||`.`;r.every(e=>e(i,!0))&&n.push(i)}}const Zo=(e,t)=>{t.push(e||`.`)},Qo=(e,t,n)=>{let r=e||`.`;n.every(e=>e(r,!0))&&t.push(r)},$o=()=>{};function es(e,t){let{includeDirs:n,filters:r,relativePaths:i}=t;return n?i?r&&r.length?Xo(e):Yo(e):r&&r.length?Qo:Zo:$o}const ts=(e,t,n,r)=>{r.every(t=>t(e,!1))&&n.files++},ns=(e,t,n,r)=>{r.every(t=>t(e,!1))&&t.push(e)},rs=(e,t,n,r)=>{n.files++},is=(e,t)=>{t.push(e)},as=()=>{};function os(e){let{excludeFiles:t,filters:n,onlyCounts:r}=e;return t?as:n&&n.length?r?ts:ns:r?rs:is}const ss=e=>e,cs=()=>[``].slice(0,0);function ls(e){return e.group?cs:ss}const us=(e,t,n)=>{e.push({directory:t,files:n,dir:t})},ds=()=>{};function fs(e){return e.group?us:ds}const ps=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue(),i.realpath(e,(o,s)=>{if(o)return r.dequeue(a?null:o,t);i.stat(s,(i,o)=>{if(i)return r.dequeue(a?null:i,t);if(o.isDirectory()&&gs(e,s,t))return r.dequeue(null,t);n(o,s),r.dequeue(null,t)})})},ms=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue();try{let r=i.realpathSync(e),a=i.statSync(r);if(a.isDirectory()&&gs(e,r,t))return;n(a,r)}catch(e){if(!a)throw e}};function hs(e,t){return!e.resolveSymlinks||e.excludeSymlinks?null:t?ms:ps}function gs(e,t,n){if(n.options.useRealPaths)return _s(t,n);let r=ue(e),i=1;for(;r!==n.root&&i<2;){let e=n.symlinks.get(r);e&&(e===t||e.startsWith(t)||t.startsWith(e))?i++:r=ue(r)}return n.symlinks.set(e,t),i>1}function _s(e,t){return t.visited.includes(e+t.options.pathSeparator)}const vs=e=>e.counts,ys=e=>e.groups,bs=e=>e.paths,xs=e=>e.paths.slice(0,e.options.maxFiles),Ss=(e,t,n)=>(Es(t,n,e.counts,e.options.suppressErrors),null),Cs=(e,t,n)=>(Es(t,n,e.paths,e.options.suppressErrors),null),ws=(e,t,n)=>(Es(t,n,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),Ts=(e,t,n)=>(Es(t,n,e.groups,e.options.suppressErrors),null);function Es(e,t,n,r){t(e&&!r?e:null,n)}function Ds(e,t){let{onlyCounts:n,group:r,maxFiles:i}=e;return n?t?vs:Ss:r?t?ys:Ts:i?t?xs:ws:t?bs:Cs}const Os={withFileTypes:!0},ks=(e,t,n,r,i)=>{if(e.queue.enqueue(),r<0)return e.queue.dequeue(null,e);let{fs:a}=e;e.visited.push(t),e.counts.directories++,a.readdir(t||`.`,Os,(t,a=[])=>{i(a,n,r),e.queue.dequeue(e.options.suppressErrors?null:t,e)})},As=(e,t,n,r,i)=>{let{fs:a}=e;if(r<0)return;e.visited.push(t),e.counts.directories++;let o=[];try{o=a.readdirSync(t||`.`,Os)}catch(t){if(!e.options.suppressErrors)throw t}i(o,n,r)};function js(e){return e?As:ks}var Ms=class{count=0;constructor(e){this.onQueueEmpty=e}enqueue(){return this.count++,this.count}dequeue(e,t){this.onQueueEmpty&&(--this.count<=0||e)&&(this.onQueueEmpty(e,t),e&&(t.controller.abort(),this.onQueueEmpty=void 0))}},Ns=class{_files=0;_directories=0;set files(e){this._files=e}get files(){return this._files}set directories(e){this._directories=e}get directories(){return this._directories}get dirs(){return this._directories}},Ps=class{aborted=!1;abort(){this.aborted=!0}},Fs=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,n){this.isSynchronous=!n,this.callbackInvoker=Ds(t,this.isSynchronous),this.root=Uo(e,t),this.state={root:Ho(this.root)?this.root:this.root.slice(0,-1),paths:[``].slice(0,0),groups:[],counts:new Ns,options:t,queue:new Ms((e,t)=>this.callbackInvoker(t,e,n)),symlinks:new Map,visited:[``].slice(0,0),controller:new Ps,fs:t.fs||L},this.joinPath=Jo(this.root,t),this.pushDirectory=es(this.root,t),this.pushFile=os(t),this.getArray=ls(t),this.groupFiles=fs(t),this.resolveSymlink=hs(t,this.isSynchronous),this.walkDirectory=js(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,n)=>{let{paths:r,options:{filters:i,resolveSymlinks:a,excludeSymlinks:o,exclude:s,maxFiles:c,signal:l,useRealPaths:u,pathSeparator:d},controller:f}=this.state;if(f.aborted||l&&l.aborted||c&&r.length>c)return;let p=this.getArray(this.state.paths);for(let c=0;c<e.length;++c){let l=e[c];if(l.isFile()||l.isSymbolicLink()&&!a&&!o){let e=this.joinPath(l.name,t);this.pushFile(e,p,this.state.counts,i)}else if(l.isDirectory()){let e=qo(l.name,t,this.state.options.pathSeparator);if(s&&s(l.name,e))continue;this.pushDirectory(e,r,i),this.walkDirectory(this.state,e,e,n-1,this.walk)}else if(this.resolveSymlink&&l.isSymbolicLink()){let e=Wo(l.name,t);this.resolveSymlink(e,this.state,(t,r)=>{if(t.isDirectory()){if(r=Uo(r,this.state.options),s&&s(l.name,u?r:e+d))return;this.walkDirectory(this.state,r,u?r:e+d,n-1,this.walk)}else{r=u?r:e;let t=le(r),n=Uo(ue(r),this.state.options);r=this.joinPath(t,n),this.pushFile(r,p,this.state.counts,i)}})}}this.groupFiles(this.state.groups,t,p)}};function Is(e,t){return new Promise((n,r)=>{Ls(e,t,(e,t)=>{if(e)return r(e);n(t)})})}function Ls(e,t,n){new Fs(e,t,n).start()}function Rs(e,t){return new Fs(e,t).start()}var zs=class{constructor(e,t){this.root=e,this.options=t}withPromise(){return Is(this.root,this.options)}withCallback(e){Ls(this.root,this.options,e)}sync(){return Rs(this.root,this.options)}};let Bs=null;try{Lo.resolve(`picomatch`),Bs=Lo(`picomatch`)}catch{}var Vs=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:me,filters:[]};globFunction;constructor(e){this.options={...this.options,...e},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(e){return this.options.pathSeparator=e,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(e){return this.options.maxDepth=e,this}withMaxFiles(e){return this.options.maxFiles=e,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:e=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=e,this.withFullPaths()}withAbortSignal(e){return this.options.signal=e,this}normalize(){return this.options.normalizePath=!0,this}filter(e){return this.options.filters.push(e),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(e){return this.options.exclude=e,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(e){return new zs(e||`.`,this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new zs(e||`.`,this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){let n=this.globFunction||Bs;if(!n)throw Error(`Please specify a glob function to use glob matching.`);var r=this.globCache[e.join(`\0`)];return r||(r=n(e,...t),this.globCache[e.join(`\0`)]=r),this.options.filters.push(e=>r(e)),this}},Hs=V(((e,t)=>{let n=`[^\\\\/]`,r=`[^/]`,i=`(?:\\/|$)`,a=`(?:^|\\/)`,o=`\\.{1,2}${i}`,s={DOT_LITERAL:`\\.`,PLUS_LITERAL:`\\+`,QMARK_LITERAL:`\\?`,SLASH_LITERAL:`\\/`,ONE_CHAR:`(?=.)`,QMARK:r,END_ANCHOR:i,DOTS_SLASH:o,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!${a}${o})`,NO_DOT_SLASH:`(?!\\.{0,1}${i})`,NO_DOTS_SLASH:`(?!${o})`,QMARK_NO_DOT:`[^.\\/]`,STAR:`${r}*?`,START_ANCHOR:a,SEP:`/`},c={...s,SLASH_LITERAL:`[\\\\/]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`\\.{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!\\.{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!\\.{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:`[^.\\\\/]`,START_ANCHOR:`(?:^|[\\\\/])`,END_ANCHOR:`(?:[\\\\/]|$)`,SEP:`\\`};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:{alnum:`a-zA-Z0-9`,alpha:`a-zA-Z`,ascii:`\\x00-\\x7F`,blank:` \\t`,cntrl:`\\x00-\\x1F\\x7F`,digit:`0-9`,graph:`\\x21-\\x7E`,lower:`a-z`,print:`\\x20-\\x7E `,punct:`\\-!"#$%&'()\\*+,./:;<=>?@[\\]^_\`{|}~`,space:` \\t\\r\\n\\v\\f`,upper:`A-Z`,word:`A-Za-z0-9_`,xdigit:`A-Fa-f0-9`},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":`*`,"**/**":`**`,"**/**/**":`**`},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:`negate`,open:`(?:(?!(?:`,close:`))${e.STAR})`},"?":{type:`qmark`,open:`(?:`,close:`)?`},"+":{type:`plus`,open:`(?:`,close:`)+`},"*":{type:`star`,open:`(?:`,close:`)*`},"@":{type:`at`,open:`(?:`,close:`)`}}},globChars(e){return e===!0?c:s}}})),Us=V((e=>{let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=Hs();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,`\\$1`),e.toPosixSlashes=e=>e.replace(t,`/`),e.isWindows=()=>{if(typeof navigator<`u`&&navigator.platform){let e=navigator.platform.toLowerCase();return e===`win32`||e===`windows`}return typeof process<`u`&&process.platform?process.platform===`win32`:!1},e.removeBackslashes=e=>e.replace(n,e=>e===`\\`?``:e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return i===-1?t:t[i-1]===`\\`?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:`/`),r=n[n.length-1];return r===``?n[n.length-2]:r}})),Ws=V(((e,t)=>{let n=Us(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:_}=Hs(),v=e=>e===l||e===a,y=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let b=t||{},x=e.length-1,S=b.parts===!0||b.scanToEnd===!0,C=[],w=[],T=[],E=e,D=-1,O=0,k=0,A=!1,ee=!1,j=!1,te=!1,ne=!1,M=!1,N=!1,re=!1,P=!1,F=!1,I=0,L,R,z={value:``,depth:0,isGlob:!1},ie=()=>D>=x,ae=()=>E.charCodeAt(D+1),oe=()=>(L=R,E.charCodeAt(++D));for(;D<x;){R=oe();let e;if(R===a){N=z.backslashes=!0,R=oe(),R===u&&(M=!0);continue}if(M===!0||R===u){for(I++;ie()!==!0&&(R=oe());){if(R===a){N=z.backslashes=!0,oe();continue}if(R===u){I++;continue}if(M!==!0&&R===s&&(R=oe())===s){if(A=z.isBrace=!0,j=z.isGlob=!0,F=!0,S===!0)continue;break}if(M!==!0&&R===o){if(A=z.isBrace=!0,j=z.isGlob=!0,F=!0,S===!0)continue;break}if(R===h&&(I--,I===0)){M=!1,A=z.isBrace=!0,F=!0;break}}if(S===!0)continue;break}if(R===l){if(C.push(D),w.push(z),z={value:``,depth:0,isGlob:!1},F===!0)continue;if(L===s&&D===O+1){O+=2;continue}k=D+1;continue}if(b.noext!==!0&&(R===p||R===i||R===r||R===m||R===c)&&ae()===d){if(j=z.isGlob=!0,te=z.isExtglob=!0,F=!0,R===c&&D===O&&(P=!0),S===!0){for(;ie()!==!0&&(R=oe());){if(R===a){N=z.backslashes=!0,R=oe();continue}if(R===g){j=z.isGlob=!0,F=!0;break}}continue}break}if(R===r){if(L===r&&(ne=z.isGlobstar=!0),j=z.isGlob=!0,F=!0,S===!0)continue;break}if(R===m){if(j=z.isGlob=!0,F=!0,S===!0)continue;break}if(R===f){for(;ie()!==!0&&(e=oe());){if(e===a){N=z.backslashes=!0,oe();continue}if(e===_){ee=z.isBracket=!0,j=z.isGlob=!0,F=!0;break}}if(S===!0)continue;break}if(b.nonegate!==!0&&R===c&&D===O){re=z.negated=!0,O++;continue}if(b.noparen!==!0&&R===d){if(j=z.isGlob=!0,S===!0){for(;ie()!==!0&&(R=oe());){if(R===d){N=z.backslashes=!0,R=oe();continue}if(R===g){F=!0;break}}continue}break}if(j===!0){if(F=!0,S===!0)continue;break}}b.noext===!0&&(te=!1,j=!1);let se=E,ce=``,le=``;O>0&&(ce=E.slice(0,O),E=E.slice(O),k-=O),se&&j===!0&&k>0?(se=E.slice(0,k),le=E.slice(k)):j===!0?(se=``,le=E):se=E,se&&se!==``&&se!==`/`&&se!==E&&v(se.charCodeAt(se.length-1))&&(se=se.slice(0,-1)),b.unescape===!0&&(le&&=n.removeBackslashes(le),se&&N===!0&&(se=n.removeBackslashes(se)));let ue={prefix:ce,input:e,start:O,base:se,glob:le,isBrace:A,isBracket:ee,isGlob:j,isExtglob:te,isGlobstar:ne,negated:re,negatedExtglob:P};if(b.tokens===!0&&(ue.maxDepth=0,v(R)||w.push(z),ue.tokens=w),b.parts===!0||b.tokens===!0){let t;for(let n=0;n<C.length;n++){let r=t?t+1:O,i=C[n],a=e.slice(r,i);b.tokens&&(n===0&&O!==0?(w[n].isPrefix=!0,w[n].value=ce):w[n].value=a,y(w[n]),ue.maxDepth+=w[n].depth),(n!==0||a!==``)&&T.push(a),t=i}if(t&&t+1<e.length){let n=e.slice(t+1);T.push(n),b.tokens&&(w[w.length-1].value=n,y(w[w.length-1]),ue.maxDepth+=w[w.length-1].depth)}ue.slashes=C,ue.parts=T}return ue}})),Gs=V(((e,t)=>{let n=Hs(),r=Us(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,l=(e,t)=>{if(typeof t.expandRange==`function`)return t.expandRange(...e,t);e.sort();let n=`[${e.join(`-`)}]`;try{new RegExp(n)}catch{return e.map(e=>r.escapeRegex(e)).join(`..`)}return n},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let f={...t},p=typeof f.maxLength==`number`?Math.min(i,f.maxLength):i,m=e.length;if(m>p)throw SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${p}`);let h={type:`bos`,value:``,output:f.prepend||``},g=[h],_=f.capture?``:`?:`,v=n.globChars(f.windows),y=n.extglobChars(v),{DOT_LITERAL:b,PLUS_LITERAL:x,SLASH_LITERAL:S,ONE_CHAR:C,DOTS_SLASH:w,NO_DOT:T,NO_DOT_SLASH:E,NO_DOTS_SLASH:D,QMARK:O,QMARK_NO_DOT:k,STAR:A,START_ANCHOR:ee}=v,j=e=>`(${_}(?:(?!${ee}${e.dot?w:b}).)*?)`,te=f.dot?``:T,ne=f.dot?O:k,M=f.bash===!0?j(f):A;f.capture&&(M=`(${M})`),typeof f.noext==`boolean`&&(f.noextglob=f.noext);let N={input:e,index:-1,start:0,dot:f.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};e=r.removePrefix(e,N),m=e.length;let re=[],P=[],F=[],I=h,L,R=()=>N.index===m-1,z=N.peek=(t=1)=>e[N.index+t],ie=N.advance=()=>e[++N.index]||``,ae=()=>e.slice(N.index+1),oe=(e=``,t=0)=>{N.consumed+=e,N.index+=t},se=e=>{N.output+=e.output==null?e.value:e.output,oe(e.value)},ce=()=>{let e=1;for(;z()===`!`&&(z(2)!==`(`||z(3)===`?`);)ie(),N.start++,e++;return e%2==0?!1:(N.negated=!0,N.start++,!0)},le=e=>{N[e]++,F.push(e)},ue=e=>{N[e]--,F.pop()},B=e=>{if(I.type===`globstar`){let t=N.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||re.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(N.output=N.output.slice(0,-I.output.length),I.type=`star`,I.value=`*`,I.output=M,N.output+=I.output)}if(re.length&&e.type!==`paren`&&(re[re.length-1].inner+=e.value),(e.value||e.output)&&se(e),I&&I.type===`text`&&e.type===`text`){I.output=(I.output||I.value)+e.value,I.value+=e.value;return}e.prev=I,g.push(e),I=e},de=(e,t)=>{let n={...y[t],conditions:1,inner:``};n.prev=I,n.parens=N.parens,n.output=N.output;let r=(f.capture?`(`:``)+n.open;le(`parens`),B({type:e,value:t,output:N.output?``:C}),B({type:`paren`,extglob:!0,value:ie(),output:r}),re.push(n)},fe=e=>{let n=e.close+(f.capture?`)`:``),r;if(e.type===`negate`){let i=M;e.inner&&e.inner.length>1&&e.inner.includes(`/`)&&(i=j(f)),(i!==M||R()||/^\)+$/.test(ae()))&&(n=e.close=`)$))${i}`),e.inner.includes(`*`)&&(r=ae())&&/^\.[^\\/.]+$/.test(r)&&(n=e.close=`)${d(r,{...t,fastpaths:!1}).output})${i})`),e.prev.type===`bos`&&(N.negatedExtglob=!0)}B({type:`paren`,extglob:!0,value:L,output:n}),ue(`parens`)};if(f.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(s,(e,t,r,i,a,o)=>i===`\\`?(n=!0,e):i===`?`?t?t+i+(a?O.repeat(a.length):``):o===0?ne+(a?O.repeat(a.length):``):O.repeat(r.length):i===`.`?b.repeat(r.length):i===`*`?t?t+i+(a?M:``):M:t?e:`\\${e}`);return n===!0&&(i=f.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&f.contains===!0?(N.output=e,N):(N.output=r.wrapOutput(i,N,t),N)}for(;!R();){if(L=ie(),L===`\0`)continue;if(L===`\\`){let e=z();if(e===`/`&&f.bash!==!0||e===`.`||e===`;`)continue;if(!e){L+=`\\`,B({type:`text`,value:L});continue}let t=/^\\+/.exec(ae()),n=0;if(t&&t[0].length>2&&(n=t[0].length,N.index+=n,n%2!=0&&(L+=`\\`)),f.unescape===!0?L=ie():L+=ie(),N.brackets===0){B({type:`text`,value:L});continue}}if(N.brackets>0&&(L!==`]`||I.value===`[`||I.value===`[^`)){if(f.posix!==!1&&L===`:`){let e=I.value.slice(1);if(e.includes(`[`)&&(I.posix=!0,e.includes(`:`))){let e=I.value.lastIndexOf(`[`),t=I.value.slice(0,e),n=a[I.value.slice(e+2)];if(n){I.value=t+n,N.backtrack=!0,ie(),!h.output&&g.indexOf(I)===1&&(h.output=C);continue}}}(L===`[`&&z()!==`:`||L===`-`&&z()===`]`)&&(L=`\\${L}`),L===`]`&&(I.value===`[`||I.value===`[^`)&&(L=`\\${L}`),f.posix===!0&&L===`!`&&I.value===`[`&&(L=`^`),I.value+=L,se({value:L});continue}if(N.quotes===1&&L!==`"`){L=r.escapeRegex(L),I.value+=L,se({value:L});continue}if(L===`"`){N.quotes=N.quotes===1?0:1,f.keepQuotes===!0&&B({type:`text`,value:L});continue}if(L===`(`){le(`parens`),B({type:`paren`,value:L});continue}if(L===`)`){if(N.parens===0&&f.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=re[re.length-1];if(e&&N.parens===e.parens+1){fe(re.pop());continue}B({type:`paren`,value:L,output:N.parens?`)`:`\\)`}),ue(`parens`);continue}if(L===`[`){if(f.nobracket===!0||!ae().includes(`]`)){if(f.nobracket!==!0&&f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));L=`\\${L}`}else le(`brackets`);B({type:`bracket`,value:L});continue}if(L===`]`){if(f.nobracket===!0||I&&I.type===`bracket`&&I.value.length===1){B({type:`text`,value:L,output:`\\${L}`});continue}if(N.brackets===0){if(f.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));B({type:`text`,value:L,output:`\\${L}`});continue}ue(`brackets`);let e=I.value.slice(1);if(I.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(L=`/${L}`),I.value+=L,se({value:L}),f.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(I.value);if(N.output=N.output.slice(0,-I.value.length),f.literalBrackets===!0){N.output+=t,I.value=t;continue}I.value=`(${_}${t}|${I.value})`,N.output+=I.value;continue}if(L===`{`&&f.nobrace!==!0){le(`braces`);let e={type:`brace`,value:L,output:`(`,outputIndex:N.output.length,tokensIndex:N.tokens.length};P.push(e),B(e);continue}if(L===`}`){let e=P[P.length-1];if(f.nobrace===!0||!e){B({type:`text`,value:L,output:L});continue}let t=`)`;if(e.dots===!0){let e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=l(n,f),N.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=N.output.slice(0,e.outputIndex),r=N.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,L=t=`\\}`,N.output=n;for(let e of r)N.output+=e.output||e.value}B({type:`brace`,value:L,output:t}),ue(`braces`),P.pop();continue}if(L===`|`){re.length>0&&re[re.length-1].conditions++,B({type:`text`,value:L});continue}if(L===`,`){let e=L,t=P[P.length-1];t&&F[F.length-1]===`braces`&&(t.comma=!0,e=`|`),B({type:`comma`,value:L,output:e});continue}if(L===`/`){if(I.type===`dot`&&N.index===N.start+1){N.start=N.index+1,N.consumed=``,N.output=``,g.pop(),I=h;continue}B({type:`slash`,value:L,output:S});continue}if(L===`.`){if(N.braces>0&&I.type===`dot`){I.value===`.`&&(I.output=b);let e=P[P.length-1];I.type=`dots`,I.output+=L,I.value+=L,e.dots=!0;continue}if(N.braces+N.parens===0&&I.type!==`bos`&&I.type!==`slash`){B({type:`text`,value:L,output:b});continue}B({type:`dot`,value:L,output:b});continue}if(L===`?`){if(!(I&&I.value===`(`)&&f.noextglob!==!0&&z()===`(`&&z(2)!==`?`){de(`qmark`,L);continue}if(I&&I.type===`paren`){let e=z(),t=L;(I.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(ae()))&&(t=`\\${L}`),B({type:`text`,value:L,output:t});continue}if(f.dot!==!0&&(I.type===`slash`||I.type===`bos`)){B({type:`qmark`,value:L,output:k});continue}B({type:`qmark`,value:L,output:O});continue}if(L===`!`){if(f.noextglob!==!0&&z()===`(`&&(z(2)!==`?`||!/[!=<:]/.test(z(3)))){de(`negate`,L);continue}if(f.nonegate!==!0&&N.index===0){ce();continue}}if(L===`+`){if(f.noextglob!==!0&&z()===`(`&&z(2)!==`?`){de(`plus`,L);continue}if(I&&I.value===`(`||f.regex===!1){B({type:`plus`,value:L,output:x});continue}if(I&&(I.type===`bracket`||I.type===`paren`||I.type===`brace`)||N.parens>0){B({type:`plus`,value:L});continue}B({type:`plus`,value:x});continue}if(L===`@`){if(f.noextglob!==!0&&z()===`(`&&z(2)!==`?`){B({type:`at`,extglob:!0,value:L,output:``});continue}B({type:`text`,value:L});continue}if(L!==`*`){(L===`$`||L===`^`)&&(L=`\\${L}`);let e=o.exec(ae());e&&(L+=e[0],N.index+=e[0].length),B({type:`text`,value:L});continue}if(I&&(I.type===`globstar`||I.star===!0)){I.type=`star`,I.star=!0,I.value+=L,I.output=M,N.backtrack=!0,N.globstar=!0,oe(L);continue}let t=ae();if(f.noextglob!==!0&&/^\([^?]/.test(t)){de(`star`,L);continue}if(I.type===`star`){if(f.noglobstar===!0){oe(L);continue}let n=I.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(f.bash===!0&&(!i||t[0]&&t[0]!==`/`)){B({type:`star`,value:L,output:``});continue}let o=N.braces>0&&(n.type===`comma`||n.type===`brace`),s=re.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){B({type:`star`,value:L,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[N.index+4];if(n&&n!==`/`)break;t=t.slice(3),oe(`/**`,3)}if(n.type===`bos`&&R()){I.type=`globstar`,I.value+=L,I.output=j(f),N.output=I.output,N.globstar=!0,oe(L);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&R()){N.output=N.output.slice(0,-(n.output+I.output).length),n.output=`(?:${n.output}`,I.type=`globstar`,I.output=j(f)+(f.strictSlashes?`)`:`|$)`),I.value+=L,N.globstar=!0,N.output+=n.output+I.output,oe(L);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;N.output=N.output.slice(0,-(n.output+I.output).length),n.output=`(?:${n.output}`,I.type=`globstar`,I.output=`${j(f)}${S}|${S}${e})`,I.value+=L,N.output+=n.output+I.output,N.globstar=!0,oe(L+ie()),B({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){I.type=`globstar`,I.value+=L,I.output=`(?:^|${S}|${j(f)}${S})`,N.output=I.output,N.globstar=!0,oe(L+ie()),B({type:`slash`,value:`/`,output:``});continue}N.output=N.output.slice(0,-I.output.length),I.type=`globstar`,I.output=j(f),I.value+=L,N.output+=I.output,N.globstar=!0,oe(L);continue}let n={type:`star`,value:L,output:M};if(f.bash===!0){n.output=`.*?`,(I.type===`bos`||I.type===`slash`)&&(n.output=te+n.output),B(n);continue}if(I&&(I.type===`bracket`||I.type===`paren`)&&f.regex===!0){n.output=L,B(n);continue}(N.index===N.start||I.type===`slash`||I.type===`dot`)&&(I.type===`dot`?(N.output+=E,I.output+=E):f.dot===!0?(N.output+=D,I.output+=D):(N.output+=te,I.output+=te),z()!==`*`&&(N.output+=C,I.output+=C)),B(n)}for(;N.brackets>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));N.output=r.escapeLast(N.output,`[`),ue(`brackets`)}for(;N.parens>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));N.output=r.escapeLast(N.output,`(`),ue(`parens`)}for(;N.braces>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));N.output=r.escapeLast(N.output,`{`),ue(`braces`)}if(f.strictSlashes!==!0&&(I.type===`star`||I.type===`bracket`)&&B({type:`maybe_slash`,value:``,output:`${S}?`}),N.backtrack===!0){N.output=``;for(let e of N.tokens)N.output+=e.output==null?e.value:e.output,e.suffix&&(N.output+=e.suffix)}return N};d.fastpaths=(e,t)=>{let a={...t},o=typeof a.maxLength==`number`?Math.min(i,a.maxLength):i,s=e.length;if(s>o)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);e=c[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:_}=n.globChars(a.windows),v=a.dot?m:p,y=a.dot?h:p,b=a.capture?``:`?:`,x={negated:!1,prefix:``},S=a.bash===!0?`.*?`:g;a.capture&&(S=`(${S})`);let C=e=>e.noglobstar===!0?S:`(${b}(?:(?!${_}${e.dot?f:l}).)*?)`,w=e=>{switch(e){case`*`:return`${v}${d}${S}`;case`.*`:return`${l}${d}${S}`;case`*.*`:return`${v}${S}${l}${d}${S}`;case`*/*`:return`${v}${S}${u}${d}${y}${S}`;case`**`:return v+C(a);case`**/*`:return`(?:${v}${C(a)}${u})?${y}${d}${S}`;case`**/*.*`:return`(?:${v}${C(a)}${u})?${y}${S}${l}${d}${S}`;case`**/.*`:return`(?:${v}${C(a)}${u})?${l}${d}${S}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=w(t[1]);return n?n+l+t[2]:void 0}}},T=w(r.removePrefix(e,x));return T&&a.strictSlashes!==!0&&(T+=`${u}?`),T},t.exports=d})),Ks=V(((e,t)=>{let n=Ws(),r=Gs(),i=Us(),a=Hs(),o=e=>e&&typeof e==`object`&&!Array.isArray(e),s=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>s(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=o(e)&&e.tokens&&e.input;if(e===``||typeof e!=`string`&&!r)throw TypeError(`Expected pattern to be a non-empty string`);let i=t||{},a=i.windows,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),l=c.state;delete c.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=s(i.ignore,e,n)}let d=(n,r=!1)=>{let{isMatch:o,match:d,output:f}=s.test(n,c,t,{glob:e,posix:a}),p={glob:e,state:l,regex:c,posix:a,input:n,output:f,match:d,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):u(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),r?p:!0)};return n&&(d.state=l),d};s.test=(e,t,n,{glob:r,posix:a}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let o=n||{},c=o.format||(a?i.toPosixSlashes:null),l=e===r,u=l&&c?c(e):e;return l===!1&&(u=c?c(e):e,l=u===r),(l===!1||o.capture===!0)&&(l=o.matchBase===!0||o.basename===!0?s.matchBase(e,t,n,a):t.exec(u)),{isMatch:!!l,match:l,output:u}},s.matchBase=(e,t,n)=>(t instanceof RegExp?t:s.makeRe(t,n)).test(i.basename(e)),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):r(e,{...t,fastpaths:!1}),s.scan=(e,t)=>n(e,t),s.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,c=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let l=s.toRegex(c,t);return r===!0&&(l.state=e),l},s.makeRe=(e,t={},n=!1,i=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(a.output=r.fastpaths(e,t)),a.output||(a=r(e,t)),s.compileRe(a,t,n,i)},s.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?`i`:``))}catch(e){if(t&&t.debug===!0)throw e;return/$^/}},s.constants=a,t.exports=s})),qs=je(V(((e,t)=>{let n=Ks(),r=Us();function i(e,t,i=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:r.isWindows()}),n(e,t,i)}Object.assign(i,n),t.exports=i}))(),1);const Js=Array.isArray,Ys=process.platform===`win32`,Xs=/^(\/?\.\.)+$/;function Zs(e,t={}){let n=e.length,r=Array(n),i=Array(n),a=!t.noglobstar;for(let a=0;a<n;a++){let n=rc(e[a]);r[a]=n;let o=n.length,s=Array(o);for(let e=0;e<o;e++)s[e]=(0,qs.default)(n[e],t);i[a]=s}return t=>{let n=t.split(`/`);if(n[0]===`..`&&Xs.test(t))return!0;for(let t=0;t<e.length;t++){let e=r[t],o=i[t],s=n.length,c=Math.min(s,e.length),l=0;for(;l<c;){let t=e[l];if(t.includes(`/`))return!0;if(!o[l](n[l]))break;if(a&&t===`**`)return!0;l++}if(l===s)return!0}return!1}}const Qs=/^[A-Z]:\/$/i,$s=Ys?e=>Qs.test(e):e=>e===`/`;function ec(e,t,n){if(e===t||t.startsWith(`${e}/`)){if(n){let t=$s(e)?e.length:e.length+1;return(e,n)=>e.slice(t,n?-1:void 0)||`.`}let r=t.slice(e.length+1);return r?(e,t)=>{if(e===`.`)return r;let n=`${r}/${e}`;return t?n.slice(0,-1):n}:(e,t)=>t&&e!==`.`?e.slice(0,-1):e}return n?t=>de.relative(e,t)||`.`:n=>de.relative(e,`${t}/${n}`)||`.`}function tc(e,t){if(t.startsWith(`${e}/`)){let n=t.slice(e.length+1);return e=>`${n}/${e}`}return n=>{let r=de.relative(e,`${t}/${n}`);return n.endsWith(`/`)&&r!==``?`${r}/`:r||`.`}}const nc={parts:!0};function rc(e){let t=qs.default.scan(e,nc);return t.parts?.length?t.parts:[e]}const ic=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,ac=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,oc=Ys?e=>e.replace(ac,`\\$&`):e=>e.replace(ic,`\\$&`);function sc(e,t){if(t?.caseSensitiveMatch===!1)return!0;let n=qs.default.scan(e);return n.isGlob||n.negated}function cc(...e){console.log(`[tinyglobby ${new Date().toLocaleTimeString(`es`)}]`,...e)}const lc=/^(\/?\.\.)+/,uc=/\\(?=[()[\]{}!*+?@|])/g,dc=/\\/g;function fc(e,t,n,r,i){let a=e;e.endsWith(`/`)&&(a=e.slice(0,-1)),!a.endsWith(`*`)&&t&&(a+=`/**`);let o=oc(n);a=ce.isAbsolute(a.replace(uc,``))?de.relative(o,a):de.normalize(a);let s=lc.exec(a),c=rc(a);if(s?.[0]){let e=(s[0].length+1)/3,t=0,i=o.split(`/`);for(;t<e&&c[t+e]===i[i.length+t-e];)a=a.slice(0,(e-t-1)*3)+a.slice((e-t)*3+c[t+e].length+1)||`.`,t++;let l=de.join(n,s[0].slice(t*3));!l.startsWith(`.`)&&r.root.length>l.length&&(r.root=l,r.depthOffset=-e+t)}if(!i&&r.depthOffset>=0){r.commonPath??=c;let e=[],t=Math.min(r.commonPath.length,c.length);for(let n=0;n<t;n++){let t=c[n];if(t===`**`&&!c[n+1]){e.pop();break}if(t!==r.commonPath[n]||sc(t)||n===c.length-1)break;e.push(t)}r.depthOffset=e.length,r.commonPath=e,r.root=e.length>0?de.join(n,...e):n}return a}function pc({patterns:e=[`**/*`],ignore:t=[],expandDirectories:n=!0},r,i){typeof e==`string`&&(e=[e]),typeof t==`string`&&(t=[t]);let a=[],o=[];for(let e of t)e&&(e[0]!==`!`||e[1]===`(`)&&o.push(fc(e,n,r,i,!0));for(let t of e)t&&(t[0]!==`!`||t[1]===`(`?a.push(fc(t,n,r,i,!1)):(t[1]!==`!`||t[2]===`(`)&&o.push(fc(t.slice(1),n,r,i,!0)));return{match:a,ignore:o}}function mc(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];e[n]=t(r)}return e}function hc(e){return e?e instanceof URL?he(e).replace(dc,`/`):ce.resolve(e).replace(dc,`/`):process.cwd().replace(dc,`/`)}function gc(e,t={}){let n=process.env.TINYGLOBBY_DEBUG?{...t,debug:!0}:t,r=hc(n.cwd);if(n.debug&&cc(`globbing with:`,{patterns:e,options:n,cwd:r}),Array.isArray(e)&&e.length===0)return[{sync:()=>[],withPromise:async()=>[]},!1];let i={root:r,commonPath:null,depthOffset:0},a=pc({...n,patterns:e},r,i);n.debug&&cc(`internal processing patterns:`,a);let o={dot:n.dot,nobrace:n.braceExpansion===!1,nocase:n.caseSensitiveMatch===!1,noextglob:n.extglob===!1,noglobstar:n.globstar===!1,posix:!0},s=(0,qs.default)(a.match,{...o,ignore:a.ignore}),c=(0,qs.default)(a.ignore,o),l=Zs(a.match,o),u=ec(r,i.root,n.absolute),d=n.absolute?u:ec(r,i.root,!0),f={filters:[n.debug?(e,t)=>{let n=u(e,t),r=s(n);return r&&cc(`matched ${n}`),r}:(e,t)=>s(u(e,t))],exclude:n.debug?(e,t)=>{let n=d(t,!0),r=n!==`.`&&!l(n)||c(n);return cc(r?`skipped ${t}`:`crawling ${t}`),r}:(e,t)=>{let n=d(t,!0);return n!==`.`&&!l(n)||c(n)},fs:n.fs?{readdir:n.fs.readdir||R.readdir,readdirSync:n.fs.readdirSync||R.readdirSync,realpath:n.fs.realpath||R.realpath,realpathSync:n.fs.realpathSync||R.realpathSync,stat:n.fs.stat||R.stat,statSync:n.fs.statSync||R.statSync}:void 0,pathSeparator:`/`,relativePaths:!0,resolveSymlinks:!0,signal:n.signal};n.deep!==void 0&&(f.maxDepth=Math.round(n.deep-i.depthOffset)),n.absolute&&(f.relativePaths=!1,f.resolvePaths=!0,f.includeBasePath=!0),n.followSymbolicLinks===!1&&(f.resolveSymlinks=!1,f.excludeSymlinks=!0),n.onlyDirectories?(f.excludeFiles=!0,f.includeDirs=!0):n.onlyFiles===!1&&(f.includeDirs=!0),i.root=i.root.replace(dc,``);let p=i.root;n.debug&&cc(`internal properties:`,i);let m=r!==p&&!n.absolute&&tc(r,i.root);return[new Vs(f).crawl(p),m]}async function _c(e,t){if(e&&t?.patterns)throw Error(`Cannot pass patterns as both an argument and an option`);let n=Js(e)||typeof e==`string`,r=n?t:e,[i,a]=gc(n?e:e.patterns,r);return a?mc(await i.withPromise(),a):i.withPromise()}const vc=/\.([cm]?)jsx?$/,yc=/\.([cm]?)tsx?$/,bc=/\.d\.([cm]?)ts$/,xc=/\.d\.([cm]?)ts\.map$/,Sc=/[\\/]node_modules[\\/]/,Cc=/\.css$/,wc=/\.vue$/,Tc=/\.json$/;function Ec(e){return e.replace(vc,`.d.$1ts`)}function Dc(e){return e.replace(wc,`.vue.ts`).replace(yc,`.d.$1ts`).replace(vc,`.d.$1ts`).replace(Tc,`.json.d.ts`)}function Oc(e,t){return e.replace(bc,`.$1${t}`)}function kc(e,t){return typeof e==`function`?e(t):e}function Ac(e,t){return e.replaceAll(`[name]`,t)}function jc(e,t){return s(e)?e:d(t||`.`,e)}function Mc(e,t){let{last:n,cwd:r}=t||{},i=jc(e,r),a=jc(n||`/`,r),s,c=[];for(;s!==a&&(c.push(i),i=o(s=i),i!==s););return c}function Nc(e,t){let n,r;for(n of Mc(t&&t.cwd||``,t))if(r=c(n,e),T(r))return r}function Pc(e){return Nc(`package.json`,e)}var Fc=n(import.meta.url);const Ic=!!e.registerHooks,Lc=/[/\\]node_modules[/\\]/;let Rc;function zc({skipNodeModules:t}={}){if(v.versions.bun)throw Error(`init is unnecessary in Bun, use clearRequireCache() instead.`);if(!Ic)throw Error(`import-without-cache requires Node.js v22.15.0 or higher.`);if(Rc)return Rc;let n=e.registerHooks({resolve(e,n,r){let i=n.importAttributes?.cache===`no`;e.startsWith(`no-cache://`)&&(e=e.slice(11),i=!0);let a=r(e,n);if(t&&Lc.test(a.url)||!a.url.startsWith(`file://`))return a;let o=Vc(n.parentURL);return!i&&!o||(a.url=Hc(a.url,o||crypto.randomUUID())),a},load(e,t,n){return Uc(t),n(e,t)}});return Rc=()=>{n.deregister(),Rc=void 0}}function Bc(){for(let e of Object.keys(Fc.cache))delete Fc.cache[e]}function Vc(e){if(e)return new URL(e).searchParams.get(`no-cache`)??void 0}function Hc(e,t){let n=new URL(e);return n.searchParams.set(`no-cache`,t),n.toString()}function Uc(e){if(!e.importAttributes?.cache)return;let t=Object.assign(Object.create(null),e.importAttributes);delete t.cache,e.importAttributes=t,Object.freeze(e.importAttributes)}const Wc=Symbol.for(`quansync.getIsAsync`);var Gc=class extends Error{constructor(e=`Unexpected promise in sync context`){super(e),this.name=`QuansyncError`}};function Kc(e){return e&&typeof e==`object`&&typeof e.then==`function`}function qc(e){return e&&typeof e==`object`&&typeof e[Symbol.iterator]==`function`&&`__quansync`in e}function Jc(e){let t=function*(...t){return(yield Wc)?yield e.async.apply(this,t):e.sync.apply(this,t)};function n(...n){let r=t.apply(this,n);return r.then=(...t)=>e.async.apply(this,n).then(...t),r.__quansync=!0,r}return n.sync=e.sync,n.async=e.async,n}function Yc(e){return Jc({async:()=>Promise.resolve(e),sync:()=>{if(Kc(e))throw new Gc;return e}})}function Xc(e,t){if(e===Wc)return t;if(qc(e))return t?$c(e):Qc(e);if(!t&&Kc(e))throw new Gc;return e}const Zc=e=>e;function Qc(e,t=Zc){let n=e.next();for(;!n.done;)try{n=e.next(Xc(t(n.value,!1)))}catch(t){n=e.throw(t)}return Xc(n.value)}async function $c(e,t=Zc){let n=e.next();for(;!n.done;)try{n=e.next(await Xc(t(n.value,!0),!0))}catch(t){n=e.throw(t)}return n.value}function el(e,t){return Jc({name:e.name,async(...n){return $c(e.apply(this,n),t?.onYield)},sync(...n){return Qc(e.apply(this,n),t?.onYield)}})}function tl(e,t){return Kc(e)?Yc(e):typeof e==`function`?el(e,t):Jc(e)}tl({async:()=>Promise.resolve(!0),sync:()=>!1});const nl=tl;tl({sync:w.readFileSync,async:w.promises.readFile}),tl({sync:w.writeFileSync,async:w.promises.writeFile}),tl({sync:w.unlinkSync,async:w.promises.unlink}),tl({sync:w.accessSync,async:w.promises.access});const rl=tl({sync:w.statSync,async:w.promises.stat}),il=tl({sync:w.lstatSync,async:w.promises.lstat});tl({sync:w.copyFileSync,async:w.promises.copyFile}),tl({sync:w.rmSync,async:w.promises.rm}),tl({sync:w.mkdirSync,async:w.promises.mkdir}),tl({sync:w.renameSync,async:w.promises.rename}),tl({sync:w.readdirSync,async:w.promises.readdir}),tl({sync:w.realpathSync,async:w.promises.realpath}),tl({sync:w.readlinkSync,async:w.promises.readlink}),tl({sync:w.symlinkSync,async:w.promises.symlink}),tl({sync:w.chownSync,async:w.promises.chown}),tl({sync:w.lchownSync,async:w.promises.lchown}),tl({sync:w.chmodSync,async:w.promises.chmod}),tl({sync:w.utimesSync,async:w.promises.utimes}),tl({sync:w.lutimesSync,async:w.promises.lutimes}),tl({sync:w.mkdtempSync,async:w.promises.mkdtemp});const al=nl(function*(e,t){try{return(yield(t?rl:il)(e)).isFile()}catch{return!1}}),ol=nl(function*(e,t={}){let{cwd:n=v.cwd(),stopAt:r=u(n).root,multiple:i=!1,allowSymlinks:a=!0}=t,s=n,c=[];for(;s&&s!==r;){for(let t of e){let e=d(s,t);if((yield al(e,a))&&(c.push(e),!i))return c}let t=o(s);if(t===s)break;s=t}return c}),sl=nl(function*(e,t){try{let n=yield t.parser(e);return n?{config:n,source:e}:void 0}catch(e){if(t.skipOnError)return;throw e}});function cl(e){let{cwd:t=v.cwd(),multiple:n,sources:r}=e,i=[],a,o=nl(function*(){a??=[],a.length=0;for(let i of r){let{extensions:r}=i,o=yield ol(i.files.flatMap(e=>r?.length?r.map(t=>t?`${e}.${t}`:e):[e]),{cwd:t,stopAt:e.stopAt,multiple:n});a.push([i,o])}return a.flatMap(e=>e[1])});return{load:nl(function*(e=!1){(a==null||e)&&(yield o());for(let[e,t]of a)if(t.length)if(n)for(let n of t){let t=yield sl(n,e);t&&i.push(t)}else{let n=yield sl(t[0],e);if(n)return[n]}return i}),findConfigs:o}}const ll=n(import.meta.url),ul=ll(`picomatch`),dl=ll(`semver/ranges/min-version.js`),fl=e=>e in b&&b[e]!==`0`&&b[e]!==`false`;var pl=fl(`CI`)||fl(`CONTINUOUS_INTEGRATION`);const ml=Io(`tsdown:clean`),hl=/[/\\]$/;async function gl(e){let t=new Set;for(let n of e){if(n.devtools&&(n.devtools.clean??!0)&&n.clean.push(`node_modules/.rolldown`),!n.clean.length)continue;let e=await _c(n.clean,{cwd:n.cwd,absolute:!0,onlyFiles:!1,dot:!0}),r=n.outDir.replace(hl,``);for(let n of e)n.replace(hl,``)!==r&&t.add(n)}t.size&&(eo.info(`Cleaning ${t.size} files`),await Promise.all([...t].map(async e=>{ml(`Removing`,e),await lo(e)})),ml(`Removed %d files`,t.size))}function _l(e,t,n){if(e===!0?e=[Ua(t)]:e||=[],e.some(e=>i.resolve(e)===n))throw Error(`Cannot clean the current working directory. Please specify a different path to clean option.`);return e}async function vl(e,t){await Promise.all(t.map(async t=>{let n=i.resolve(e,t.fileName);ml(`Removing chunk file`,n),await lo(n)}))}const yl=`style.css`;function bl(e={}){return{splitting:e.splitting??!0,fileName:e.fileName??yl}}async function xl(e,t,n,r,a){if(!t||Object.keys(t).length===0){let e=i.resolve(n,`src/index.ts`);if(await so(e))t={index:e};else throw Error(`${a} No input files, try "tsdown <your-file>" or create src/index.ts`)}let o=await Sl(t,n),s=Object.values(o);if(s.length===0)throw Error(`${a} Cannot find entry: ${JSON.stringify(t)}`);return e.info(a,`entry: ${r(s.map(e=>i.relative(n,e)).join(`, `))}`),o}function Sl(e,t){return typeof e==`string`&&(e=[e]),Array.isArray(e)?wl(e,t):Cl(e,t)}async function Cl(e,t){return Object.fromEntries((await Promise.all(Object.entries(e).map(async([e,n])=>{if(!e.includes(`*`)){if(Array.isArray(n))throw TypeError(`Object entry "${e}" cannot have an array value when the key is not a glob pattern.`);return[[e,n]]}let r=Ba(n),a=await _c(r,{cwd:t,expandDirectories:!1});if(!a.length)throw Error(`Cannot find files for entry key "${e}" with patterns: ${JSON.stringify(r)}`);let o;for(let t of r){if(t.startsWith(`!`))continue;let n=ul.scan(t).base;if(o===void 0)o=n;else if(o!==n)throw Error(`When using object entry with glob pattern key "${e}", all value glob patterns must have the same base directory.`)}if(o===void 0)throw Error(`Cannot determine base directory for value glob patterns of key "${e}".`);return a.map(n=>[Ua(e.replaceAll(`*`,po(i.relative(o,n)))),i.resolve(t,n)])}))).flat())}async function wl(e,t){let n=[],r=[];for(let t of e)typeof t==`string`?n.push(t):r.push(t);let a=n.some(e=>sc(e)),o;o=a?(await _c(n,{cwd:t,expandDirectories:!1,absolute:!0})).map(e=>i.resolve(e)):n;let s=fo(...o),c=Object.fromEntries(o.map(e=>[Ua(po(i.relative(s,e))),e]));return Object.assign({},c,...await Promise.all(r.map(e=>Cl(e,t))))}async function Tl(e,t){let{pkg:n}=e,{publishExports:r,...i}=await Dl(n,t,e),a={...n,...i,packageJsonPath:void 0};r&&(a.publishConfig||={},a.publishConfig.exports=r);let o=E(n.packageJsonPath,`utf8`),s=JSON.stringify(a,null,ho(o));o.endsWith(`
|
|
61
|
+
`+t:``),o=Math.floor(n.length/i)-this.cursorPos.rows+(t?Mi(t):0);o>0&&(a+=Di(o)),a+=ki(this.cursorPos.cols),this.write(Oi(this.extraLinesUnderPrompt)+ji(this.height)+a),this.extraLinesUnderPrompt=o,this.height=Mi(a)}checkCursorPos(){let e=this.rl.getCursorPos();e.cols!==this.cursorPos.cols&&(this.write(ki(e.cols)),this.cursorPos=e)}done({clearContent:e}){this.rl.setPrompt(``);let t=Oi(this.extraLinesUnderPrompt);t+=e?ji(this.height):`
|
|
62
|
+
`,t+=`\x1B[?25h`,this.write(t),this.rl.close()}},Fi=class extends Promise{static withResolver(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}},Ii=Re(fi(),1);function Li(){let e=Error.prepareStackTrace,t=[];try{Error.prepareStackTrace=(e,n)=>{let r=n.slice(1);return t=r,r},Error().stack}catch{return t}return Error.prepareStackTrace=e,t}function Ri(e){let t=Li();return(n,r={})=>{let{input:i=process.stdin,signal:a}=r,o=new Set,s=new Ii.default;s.pipe(r.output??process.stdout);let c=de.createInterface({terminal:!0,input:i,output:s}),l=new Pi(c),{promise:u,resolve:d,reject:f}=Fi.withResolver(),p=()=>f(new tr);if(a){let e=()=>f(new er({cause:a.reason}));if(a.aborted)return e(),Object.assign(u,{cancel:p});a.addEventListener(`abort`,e),o.add(()=>a.removeEventListener(`abort`,e))}o.add(wi((e,t)=>{f(new nr(`User force closed the prompt with ${e} ${t}`))}));let m=()=>f(new nr(`User force closed the prompt with SIGINT`));c.on(`SIGINT`,m),o.add(()=>c.removeListener(`SIGINT`,m));let h=()=>l.checkCursorPos();return c.input.on(`keypress`,h),o.add(()=>c.input.removeListener(`keypress`,h)),sr(c,i=>{let a=ue.bind(()=>pr.clearAll());return c.on(`close`,a),o.add(()=>c.removeListener(`close`,a)),i(()=>{try{let r=e(n,e=>{setImmediate(()=>d(e))});if(r===void 0){let e=t[1]?.getFileName();throw Error(`Prompt functions must return a string.\n at ${e}`)}let[i,a]=typeof r==`string`?[r]:r;l.render(i,a),pr.run()}catch(e){f(e)}}),Object.assign(u.then(e=>(pr.clearAll(),e),e=>{throw pr.clearAll(),e}).finally(()=>{o.forEach(e=>e()),l.done({clearContent:!!r.clearPromptOnDone}),s.end()}).then(()=>u),{cancel:p})})}}var zi=class{separator=_(`dim`,Array.from({length:15}).join(Sr.line));type=`separator`;constructor(e){e&&(this.separator=e)}static isSeparator(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`separator`)}};const Bi={validationFailureMode:`keep`};var Vi=Ri((e,t)=>{let{prefill:n=`tab`}=e,r=Er(Bi,e.theme),[i,a]=mr(`idle`),[o=``,s]=mr(e.default),[c,l]=mr(),[u,d]=mr(``),f=Dr({status:i,theme:r});async function p(t){let{required:n,pattern:r,patternError:i=`Invalid input`}=e;return n&&!t?`You must provide a value`:r&&!r.test(t)?i:typeof e.validate==`function`?await e.validate(t)||`You must provide a valid value`:!0}Ar(async(e,n)=>{if(i===`idle`)if($n(e)){let e=u||o;a(`loading`);let i=await p(e);i===!0?(d(e),a(`done`),t(e)):(r.validationFailureMode===`clear`?d(``):n.write(u),l(i),a(`idle`))}else Xn(e)&&!u?s(void 0):Zn(e)&&!u?(s(void 0),n.clearLine(0),n.write(o),d(o)):(d(n.line),l(void 0))}),hr(e=>{n===`editable`&&o&&(e.write(o),d(o))},[]);let m=r.style.message(e.message,i),h=u;typeof e.transformer==`function`?h=e.transformer(u,{isFinal:i===`done`}):i===`done`&&(h=r.style.answer(u));let g;o&&i!==`done`&&!u&&(g=r.style.defaultAnswer(o));let _=``;return c&&(_=r.style.error(c)),[[f,m,g,h].filter(e=>e!==void 0).join(` `),_]});const Hi={icon:{cursor:Sr.pointer},style:{disabled:e=>_(`dim`,`- ${e}`),description:e=>_(`cyan`,e),keysHelpTip:e=>e.map(([e,t])=>`${_(`bold`,e)} ${_(`dim`,t)}`).join(_(`dim`,` • `))},indexMode:`hidden`,keybindings:[]};function Ui(e){return!zi.isSeparator(e)&&!e.disabled}function Wi(e){return e.map(e=>{if(zi.isSeparator(e))return e;if(typeof e!=`object`||!e||!(`value`in e)){let t=String(e);return{value:e,name:t,short:t,disabled:!1}}let t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(n.description=e.description),n})}const Gi={input:Vi,select:Ri((e,t)=>{let{loop:n=!0,pageSize:r=7}=e,i=Er(Hi,e.theme),{keybindings:a}=i,[o,s]=mr(`idle`),c=Dr({status:o,theme:i}),l=kr(),u=!a.includes(`vim`),d=Or(()=>Wi(e.choices),[e.choices]),f=Or(()=>{let e=d.findIndex(Ui),t=d.findLastIndex(Ui);if(e===-1)throw new ir(`[select prompt] No selectable choices. All choices are disabled.`);return{first:e,last:t}},[d]),p=Or(()=>`default`in e?d.findIndex(t=>Ui(t)&&t.value===e.default):-1,[e.default,d]),[m,h]=mr(p===-1?f.first:p),g=d[m];Ar((e,r)=>{if(clearTimeout(l.current),$n(e))s(`done`),t(g.value);else if(Jn(e,a)||Yn(e,a)){if(r.clearLine(0),n||Jn(e,a)&&m!==f.first||Yn(e,a)&&m!==f.last){let t=Jn(e,a)?-1:1,n=m;do n=(n+t+d.length)%d.length;while(!Ui(d[n]));h(n)}}else if(Qn(e)&&!Number.isNaN(Number(r.line))){let e=Number(r.line)-1,t=-1,n=d.findIndex(n=>zi.isSeparator(n)?!1:(t++,t===e)),i=d[n];i!=null&&Ui(i)&&h(n),l.current=setTimeout(()=>{r.clearLine(0)},700)}else if(Xn(e))r.clearLine(0);else if(u){let e=r.line.toLowerCase(),t=d.findIndex(t=>zi.isSeparator(t)||!Ui(t)?!1:t.name.toLowerCase().startsWith(e));t!==-1&&h(t),l.current=setTimeout(()=>{r.clearLine(0)},700)}}),hr(()=>()=>{clearTimeout(l.current)},[]);let _=i.style.message(e.message,o),v=i.style.keysHelpTip([[`↑↓`,`navigate`],[`⏎`,`select`]]),ee=0,y=di({items:d,active:m,renderItem({item:e,isActive:t,index:n}){if(zi.isSeparator(e))return ee++,` ${e.separator}`;let r=i.indexMode===`number`?`${n+1-ee}. `:``;if(e.disabled){let t=typeof e.disabled==`string`?e.disabled:`(disabled)`;return i.style.disabled(`${r}${e.name} ${t}`)}return(t?i.style.highlight:e=>e)(`${t?i.icon.cursor:` `} ${r}${e.name}`)},pageSize:r,loop:n});if(o===`done`)return[c,_,i.style.answer(g.short)].filter(Boolean).join(` `);let{description:b}=g;return`${[[c,_].filter(Boolean).join(` `),y,` `,b?i.style.description(b):``,v].filter(Boolean).join(`
|
|
63
|
+
`).trimEnd()}[?25l`})};async function Ki(e,t){return e.input({...t,validate:e=>!e||e.trim().length===0?`请输入有效的内容`:!0})}var qi=class{deps;constructor(e=Gi){this.deps=e}async run(e){let t=(()=>{if(e.typeFlag)return e.typeFlag===`tool-suite`?`tool-suite`:`tool`})();if(e.nameArg&&t&&e.descriptionFlag!==void 0)return{name:e.nameArg,cwd:e.cwd,type:t,description:e.descriptionFlag};let n=e.nameArg??await(async()=>await Ki(this.deps,{message:`插件名称`,default:`./packages/my-tool`}))(),r=t??await(async()=>await this.deps.select({message:`选择插件类型`,choices:[{name:`单工具`,value:`tool`,description:`创建一个独立的工具`},{name:`工具集`,value:`tool-suite`,description:`创建一个包含多个子工具的工具集`}]}))(),i=e.descriptionFlag??await(async()=>await Ki(this.deps,{message:`插件描述`,default:We}))();return{name:n,cwd:e.cwd,type:r,description:i}}};const Ji=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function Yi(e){return Array.from(e.match(Ji)??[])}function Xi(e){return Yi(e).map(e=>e.toLowerCase()).join(`-`)}var Zi=class extends qn{register(e){e.command(`create`).description(`创建新的 FastGPT 插件项目`).argument(`[name]`,`插件名称`).option(`-t, --type <type>`,`插件类型: 单工具 | 工具集`).option(`-d, --description <desc>`,`插件描述`).option(`--cwd <path>`,`工作目录`,process.cwd()).action(async(e,t)=>{let n=await new qi().run({nameArg:e,typeFlag:t.type,descriptionFlag:t.description,cwd:t.cwd});await this.run(n)})}async run(e){let t=i.resolve(e.cwd,e.name),n=i.join(Ge,e.type===`tool-suite`?`tool-suite`:`tool`),r=await this.collectTemplateFiles(n),a=e.description??We;await this.ensureDir(t);for(let o of r){let r=i.join(n,o),s=i.join(t,o);await this.ensureDir(i.dirname(s));let c=await C.readFile(r,`utf-8`),l=this.applyPlaceholders(c,e.name,a);await C.writeFile(s,l,`utf-8`)}kn.success(`创建插件项目: ${e.name} (${e.type})`,{cwd:e.cwd})}applyPlaceholders(e,t,n){return t=i.basename(t),t=Xi(t),e.replace(/\{\{name\}\}/g,t).replace(/\{\{description\}\}/g,n)}async collectTemplateFiles(e){let t=[],n=async r=>{let a=await C.readdir(r,{withFileTypes:!0});for(let o of a){let a=i.join(r,o.name);if(o.isDirectory())await n(a);else{let n=i.relative(e,a).replace(/\\/g,`/`);t.push(n)}}};return await n(e),t.sort()}async ensureDir(e){await C.mkdir(e,{recursive:!0})}};const{Ansis:Qi,fg:$i,bg:ea,rgb:ta,bgRgb:na,hex:ra,bgHex:ia,reset:aa,inverse:oa,hidden:sa,visible:ca,bold:la,dim:ua,italic:da,underline:fa,strikethrough:pa,black:ma,red:ha,green:ga,yellow:_a,blue:va,magenta:ya,cyan:ba,white:xa,gray:Sa,redBright:Ca,greenBright:wa,yellowBright:Ta,blueBright:Ea,magentaBright:Da,cyanBright:Oa,whiteBright:ka,bgBlack:Aa,bgRed:ja,bgGreen:Ma,bgYellow:Na,bgBlue:Pa,bgMagenta:Fa,bgCyan:Ia,bgWhite:La,bgGray:Ra,bgRedBright:za,bgGreenBright:Ba,bgYellowBright:Va,bgBlueBright:Ha,bgMagentaBright:Ua,bgCyanBright:Wa,bgWhiteBright:Ga}=Re(Fe(((e,t)=>{let n,r,i,{defineProperty:a,setPrototypeOf:o,create:s,keys:c}=Object,{round:l,max:u}=Math,d=e=>{let t=/([a-f\d]{3,6})/i.exec(e)?.[1],n=t?.length,r=parseInt(6^n?3^n?`0`:t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:t,16);return[r>>16&255,r>>8&255,255&r]},f=(e,t,n)=>e^t||t^n?16+36*l(e/51)+6*l(t/51)+l(n/51):8>e?16:e>248?231:l(24*(e-8)/247)+232,p=e=>{let t,n,r,i,a;return 8>e?30+e:16>e?e-8+90:(232>e?(a=(e-=16)%36,t=(e/36|0)/5,n=(a/6|0)/5,r=a%6/5):t=n=r=(10*(e-232)+8)/255,i=2*u(t,n,r),i?30+(l(r)<<2|l(n)<<1|l(t))+(2^i?0:60):30)},m=(()=>{let e=e=>a.some((t=>e.test(t))),t=globalThis,i=t.process??{},a=i.argv??[],o=i.env??{},s=-1;try{n=`,`+c(o).join(`,`)}catch{o={},s=0}let l=`FORCE_COLOR`,u={false:0,0:0,1:1,2:2,3:3}[o[l]]??-1,d=l in o&&u||e(/^--color=?(true|always)?$/);return d&&(s=u),~s||(s=((e,t,i)=>(r=e.TERM,{"24bit":3,truecolor:3,ansi256:2,ansi:1}[e.COLORTERM]||(e.CI?/,GITHUB/.test(n)?3:1:t&&r!==`dumb`?i?3:/-256/.test(r)?2:1:0)))(o,!!o.PM2_HOME||o.NEXT_RUNTIME?.includes(`edge`)||!!i.stdout?.isTTY,i.platform===`win32`)),!u||o.NO_COLOR||e(/^--(no-color|color=(false|never))$/)?0:t.window?.chrome||d&&!s?3:s})(),h={open:``,close:``},g={},_=({p:e},{open:t,close:n})=>{let r=(e,...i)=>{if(!e){if(t&&t===n)return t;if((e??``)===``)return``}let a,o=e.raw?String.raw({raw:e},...i):``+e,s=r.p,c=s.o,l=s.c;if(o.includes(`\x1B`))for(;s;s=s.p){let{open:e,close:t}=s,n=t.length,r=``,i=0;if(n)for(;~(a=o.indexOf(t,i));i=a+n)r+=o.slice(i,a)+e;o=r+o.slice(i)}return c+(o.includes(`
|
|
64
|
+
`)?o.replace(/(\r?\n)/g,l+`$1`+c):o)+l},a=t,s=n;return e&&(a=e.o+t,s=n+e.c),o(r,i),r.p={open:t,close:n,o:a,c:s,p:e},r.open=a,r.close=s,r},v=new function e(t=m){let n={Ansis:e,level:t,isSupported:()=>c,strip:e=>e.replace(/[][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,``),extend(e){for(let t in e){let n=e[t],i=(typeof n)[0];i===`s`?(r(t,b(...d(n))),r(ie(t),x(...d(n)))):r(t,n,i===`f`)}return i=s({},g),o(n,i),n}},r=(e,t,n)=>{g[e]={get(){let r=n?(...e)=>_(this,t(...e)):_(this,t);return a(this,e,{value:r}),r}}},c=t>0,l=(e,t)=>c?{open:`[${e}m`,close:`[${t}m`}:h,u=e=>t=>e(...d(t)),v=(e,t)=>(n,r,i)=>l(`${e}8;2;${n};${r};${i}`,t),ee=(e,t)=>(n,r,i)=>l(((e,t,n)=>p(f(e,t,n)))(n,r,i)+e,t),y=e=>(t,n,r)=>e(f(t,n,r)),b=v(3,39),x=v(4,49),te=e=>l(`38;5;`+e,39),S=e=>l(`48;5;`+e,49);t===2?(b=y(te),x=y(S)):t===1&&(b=ee(0,39),x=ee(10,49),te=e=>l(p(e),39),S=e=>l(p(e)+10,49));let ne,re={fg:te,bg:S,rgb:b,bgRgb:x,hex:u(b),bgHex:u(x),visible:h,reset:l(0,0),bold:l(1,22),dim:l(2,22),italic:l(3,23),underline:l(4,24),inverse:l(7,27),hidden:l(8,28),strikethrough:l(9,29)},ie=e=>`bg`+e[0].toUpperCase()+e.slice(1),C=`Bright`;return`black,red,green,yellow,blue,magenta,cyan,white,gray`.split(`,`).map(((e,t)=>{ne=ie(e),8>t?(re[e+C]=l(90+t,39),re[ne+C]=l(100+t,49)):t=60,re[e]=l(30+t,39),re[ne]=l(40+t,49)})),n.extend(re)};t.exports=v,v.default=v}))(),1).default,Ka=n(import.meta.url)(`picomatch`);var qa=n(import.meta.url);function Ja(e,t){return Array.isArray(e)?e:e==null?t?[t]:[]:[e]}function Ya(e){return e.flatMap(e=>e.split(`,`))}function Xa(e){return typeof e==`string`&&e.length>2&&e[0]===`/`&&e.at(-1)===`/`?new RegExp(e.slice(1,-1)):e}function Za(e){return e.replaceAll(`\\`,`/`)}const Qa=e=>e;function $a(e,t){return t.some(t=>t instanceof RegExp?(t.lastIndex=0,t.test(e)):e===t||Ka(t)(e))}function eo(e){try{return import.meta.resolve(e),!0}catch{}return!1}async function to(e,t){let n;t&&(n=M(qa.resolve(e,{paths:t})).href);try{return await import(n||e)}catch(t){throw Error(`Failed to import module "${e}". Please ensure it is installed.`,{cause:t})}}function no(){let e;return{promise:new Promise(t=>{e=t}),resolve:e}}const ro={silent:0,error:1,warn:2,info:3};function io(e){return e.filter(e=>e!==void 0&&e!==!1).join(` `)}function ao(){let e=v.stdout.rows-2,t=e>0?`
|
|
65
|
+
`.repeat(e):``;console.info(t),O.cursorTo(v.stdout,0,0),O.clearScreenDown(v.stdout)}const oo=new Set;function so(e=`info`,{customLogger:t,console:n=globalThis.console,failOnWarn:r=!1,allowClearScreen:i=!0}={}){if(t)return t;function a(e,t){ro[s.level]<ro[e]||n[e===`info`?`log`:e](t)}let o=i&&v.stdout.isTTY&&!v.env.CI?ao:()=>{},s={level:e,info(...e){a(`info`,`${va`ℹ`} ${io(e)}`)},warn(...e){if(r)return this.error(...e);let t=io(e);oo.add(t),a(`warn`,`\n${Na` WARN `} ${t}\n`)},warnOnce(...e){let t=io(e);if(!oo.has(t)){if(r)return this.error(...e);oo.add(t),a(`warn`,`\n${Na` WARN `} ${t}\n`)}},error(...e){a(`error`,`\n${ja` ERROR `} ${io(e)}\n`),v.exitCode=1},success(...e){a(`info`,`${ga`✔`} ${io(e)}`)},clearScreen(e){ro[s.level]>=ro[e]&&o()}};return s}const co=so();function lo(e,t){if(t)return e(`[${t}]`)}function uo(e){let t=e===`es`?va:e===`cjs`?_a:Qa,n;switch(e){case`es`:n=`ESM`;break;default:n=e.toUpperCase();break}return t(`[${n}]`)}const fo=new Map;function po(e=`default`){if(fo.has(e))return fo.get(e);let t;if(e===`default`)t=va;else{let n=0;for(let t=0;t<e.length;t++)n=e.charCodeAt(t)+((n<<5)-n);t=ta(...mo(n%360,35,55))}return fo.set(e,t),t}function mo(e,t,n){e%=360,e/=360,t/=100,n/=100;let r,i,a;if(t===0)r=i=a=n;else{let o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;r=ho(s,o,e+1/3),i=ho(s,o,e),a=ho(s,o,e-1/3)}return[Math.max(0,Math.round(r*255)),Math.max(0,Math.round(i*255)),Math.max(0,Math.round(a*255))]}function ho(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function go(e){return ae(e).then(()=>!0,()=>!1)}function _o(e){return E(e).catch(()=>null)}function vo(e){return ce(e,{force:!0,recursive:!0}).catch(()=>{})}function yo(e,t){return oe(e,t,{recursive:!0,force:!0})}function bo(...e){if(e.length===0)return``;if(e.length===1)return i.dirname(e[0]);e=e.map(i.normalize);let[t,...n]=e,r=t.split(i.sep);for(let e of n){let t=e.split(i.sep,r.length),n=0;for(let e of t)if(e===r[n])n+=1;else{r=r.slice(0,n);break}r=r.slice(0,n)}return r.length<=1&&r[0]===``?i.sep+r[0]:r.join(i.sep)}function xo(e){let t=i.extname(e);return t.length?e.slice(0,-t.length):e}function So(e){if(e!==1/0)return`${(e/1e3).toFixed(2)} kB`}function Co(e){let t=e.split(/\r?\n/);for(let e of t){let t=e.match(/^(\s+)\S/);if(t)return t[1].includes(` `)?` `:t[1].length}return 2}function wo(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function To(e,t,n=`.`,r){if(!wo(t))return To(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:wo(a)&&wo(i[t])?i[t]=To(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function Eo(e){return(...t)=>t.reduce((t,n)=>To(t,n,``,e),{})}function Do(e){return e instanceof Error?e.stack||e.message:e}function Oo(e,t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e[Math.abs(n)%e.length]}function ko(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]===`*`))t[r]===`*`?(i=r,a=n,r++):(n++,r++);else if(i!==-1)r=i+1,a++,n=a;else return!1;for(;r<t.length&&t[r]===`*`;)r++;return r===t.length}function Ao(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${e}ms`}let jo=``;function Mo(e,t){let n,r,i,a,o=(...e)=>{if(!o.enabled)return;let r=Date.now(),i=r-(n||r);n=r,e[0]=Do(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-z%])/gi,(n,r)=>{if(n===`%%`)return`%`;a++;let i=t.formatters[r];if(typeof i==`function`){let t=e[a];n=i.call(o,t),e.splice(a,1),a--}return n}),t.formatArgs.call(o,i,e),o.log(...e)};return o.extend=function(e,t=`:`){return Mo(this.namespace+t+e,{useColors:this.useColors,color:this.color,formatArgs:this.formatArgs,formatters:this.formatters,inspectOpts:this.inspectOpts,log:this.log,humanize:this.humanize})},Object.assign(o,t),o.namespace=e,Object.defineProperty(o,`enabled`,{enumerable:!0,configurable:!1,get:()=>r??(i!==jo&&(i=jo,a=Io(e)),a),set:e=>{r=e}}),o}let No=[],Po=[];function Fo(e){jo=e,No=[],Po=[];let t=jo.trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?Po.push(e.slice(1)):No.push(e)}function Io(e){for(let t of Po)if(ko(e,t))return!1;for(let t of No)if(ko(e,t))return!0;return!1}const Lo=process.stderr.getColorDepth&&process.stderr.getColorDepth()>2?[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]:[6,2,3,4,5,1],Ro=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.slice(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t],i=typeof r==`string`&&r.toLowerCase();return r=r===`null`?null:i===`yes`||i===`on`||i===`true`||i===`enabled`?!0:i===`no`||i===`off`||i===`false`||i===`disabled`?!1:Number(r),e[n]=r,e},{});function zo(){return`colors`in Ro?!!Ro.colors:x(process.stderr.fd)}function Bo(){return Ro.hideDate?``:`${new Date().toISOString()} `}function Vo(e,t){let{namespace:n,useColors:r}=this;if(r){let r=this.color,i=`\u001B[3${r<8?r:`8;5;${r}`}`,a=` ${i};1m${n} \u001B[0m`;t[0]=a+t[0].split(`
|
|
66
|
+
`).join(`\n${a}`),t.push(`${i}m+${this.humanize(e)}\u001B[0m`)}else t[0]=`${Bo()}${n} ${t[0]}`}function Ho(...e){process.stderr.write(`${p(this.inspectOpts,...e)}\n`)}const Uo={useColors:zo(),formatArgs:Vo,formatters:{o(e){return this.inspectOpts.colors=this.useColors,m(e,this.inspectOpts).split(`
|
|
67
|
+
`).map(e=>e.trim()).join(` `)},O(e){return this.inspectOpts.colors=this.useColors,m(e,this.inspectOpts)}},inspectOpts:Ro,log:Ho,humanize:Ao};function Wo(e,t){let n=(t&&t.color)??Oo(Lo,e);return Mo(e,Object.assign(Uo,{color:n},t))}Fo(process.env.DEBUG||``);var Go=Se(import.meta.url);function Ko(e){let t=P(e);return t.length>1&&t[t.length-1]===be&&(t=t.substring(0,t.length-1)),t}const qo=/[\\/]/g;function Jo(e,t){return e.replace(qo,t)}const Yo=/^[a-z]:[\\/]$/i;function Xo(e){return e===`/`||Yo.test(e)}function Zo(e,t){let{resolvePaths:n,normalizePath:r,pathSeparator:i}=t,a=process.platform===`win32`&&e.includes(`/`)||e.startsWith(`.`);return n&&(e=ye(e)),(r||a)&&(e=Ko(e)),e===`.`?``:Jo(e[e.length-1]===i?e:e+i,i)}function Qo(e,t){return t+e}function $o(e,t){return function(n,r){return r.startsWith(e)?r.slice(e.length)+n:Jo(ve(e,r),t.pathSeparator)+t.pathSeparator+n}}function es(e){return e}function ts(e,t,n){return t+e+n}function ns(e,t){let{relativePaths:n,includeBasePath:r}=t;return n&&e?$o(e,t):r?Qo:es}function rs(e){return function(t,n){n.push(t.substring(e.length)||`.`)}}function is(e){return function(t,n,r){let i=t.substring(e.length)||`.`;r.every(e=>e(i,!0))&&n.push(i)}}const as=(e,t)=>{t.push(e||`.`)},os=(e,t,n)=>{let r=e||`.`;n.every(e=>e(r,!0))&&t.push(r)},ss=()=>{};function cs(e,t){let{includeDirs:n,filters:r,relativePaths:i}=t;return n?i?r&&r.length?is(e):rs(e):r&&r.length?os:as:ss}const ls=(e,t,n,r)=>{r.every(t=>t(e,!1))&&n.files++},us=(e,t,n,r)=>{r.every(t=>t(e,!1))&&t.push(e)},ds=(e,t,n,r)=>{n.files++},fs=(e,t)=>{t.push(e)},ps=()=>{};function ms(e){let{excludeFiles:t,filters:n,onlyCounts:r}=e;return t?ps:n&&n.length?r?ls:us:r?ds:fs}const hs=e=>e,gs=()=>[``].slice(0,0);function _s(e){return e.group?gs:hs}const vs=(e,t,n)=>{e.push({directory:t,files:n,dir:t})},ys=()=>{};function bs(e){return e.group?vs:ys}const xs=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue(),i.realpath(e,(o,s)=>{if(o)return r.dequeue(a?null:o,t);i.stat(s,(i,o)=>{if(i)return r.dequeue(a?null:i,t);if(o.isDirectory()&&ws(e,s,t))return r.dequeue(null,t);n(o,s),r.dequeue(null,t)})})},Ss=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue();try{let r=i.realpathSync(e),a=i.statSync(r);if(a.isDirectory()&&ws(e,r,t))return;n(a,r)}catch(e){if(!a)throw e}};function Cs(e,t){return!e.resolveSymlinks||e.excludeSymlinks?null:t?Ss:xs}function ws(e,t,n){if(n.options.useRealPaths)return Ts(t,n);let r=N(e),i=1;for(;r!==n.root&&i<2;){let e=n.symlinks.get(r);e&&(e===t||e.startsWith(t)||t.startsWith(e))?i++:r=N(r)}return n.symlinks.set(e,t),i>1}function Ts(e,t){return t.visited.includes(e+t.options.pathSeparator)}const Es=e=>e.counts,Ds=e=>e.groups,Os=e=>e.paths,ks=e=>e.paths.slice(0,e.options.maxFiles),As=(e,t,n)=>(Ps(t,n,e.counts,e.options.suppressErrors),null),js=(e,t,n)=>(Ps(t,n,e.paths,e.options.suppressErrors),null),Ms=(e,t,n)=>(Ps(t,n,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),Ns=(e,t,n)=>(Ps(t,n,e.groups,e.options.suppressErrors),null);function Ps(e,t,n,r){t(e&&!r?e:null,n)}function Fs(e,t){let{onlyCounts:n,group:r,maxFiles:i}=e;return n?t?Es:As:r?t?Ds:Ns:i?t?ks:Ms:t?Os:js}const Is={withFileTypes:!0},Ls=(e,t,n,r,i)=>{if(e.queue.enqueue(),r<0)return e.queue.dequeue(null,e);let{fs:a}=e;e.visited.push(t),e.counts.directories++,a.readdir(t||`.`,Is,(t,a=[])=>{i(a,n,r),e.queue.dequeue(e.options.suppressErrors?null:t,e)})},Rs=(e,t,n,r,i)=>{let{fs:a}=e;if(r<0)return;e.visited.push(t),e.counts.directories++;let o=[];try{o=a.readdirSync(t||`.`,Is)}catch(t){if(!e.options.suppressErrors)throw t}i(o,n,r)};function zs(e){return e?Rs:Ls}var Bs=class{count=0;constructor(e){this.onQueueEmpty=e}enqueue(){return this.count++,this.count}dequeue(e,t){this.onQueueEmpty&&(--this.count<=0||e)&&(this.onQueueEmpty(e,t),e&&(t.controller.abort(),this.onQueueEmpty=void 0))}},Vs=class{_files=0;_directories=0;set files(e){this._files=e}get files(){return this._files}set directories(e){this._directories=e}get directories(){return this._directories}get dirs(){return this._directories}},Hs=class{aborted=!1;abort(){this.aborted=!0}},Us=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,n){this.isSynchronous=!n,this.callbackInvoker=Fs(t,this.isSynchronous),this.root=Zo(e,t),this.state={root:Xo(this.root)?this.root:this.root.slice(0,-1),paths:[``].slice(0,0),groups:[],counts:new Vs,options:t,queue:new Bs((e,t)=>this.callbackInvoker(t,e,n)),symlinks:new Map,visited:[``].slice(0,0),controller:new Hs,fs:t.fs||k},this.joinPath=ns(this.root,t),this.pushDirectory=cs(this.root,t),this.pushFile=ms(t),this.getArray=_s(t),this.groupFiles=bs(t),this.resolveSymlink=Cs(t,this.isSynchronous),this.walkDirectory=zs(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,n)=>{let{paths:r,options:{filters:i,resolveSymlinks:a,excludeSymlinks:o,exclude:s,maxFiles:c,signal:l,useRealPaths:u,pathSeparator:d},controller:f}=this.state;if(f.aborted||l&&l.aborted||c&&r.length>c)return;let p=this.getArray(this.state.paths);for(let c=0;c<e.length;++c){let l=e[c];if(l.isFile()||l.isSymbolicLink()&&!a&&!o){let e=this.joinPath(l.name,t);this.pushFile(e,p,this.state.counts,i)}else if(l.isDirectory()){let e=ts(l.name,t,this.state.options.pathSeparator);if(s&&s(l.name,e))continue;this.pushDirectory(e,r,i),this.walkDirectory(this.state,e,e,n-1,this.walk)}else if(this.resolveSymlink&&l.isSymbolicLink()){let e=Qo(l.name,t);this.resolveSymlink(e,this.state,(t,r)=>{if(t.isDirectory()){if(r=Zo(r,this.state.options),s&&s(l.name,u?r:e+d))return;this.walkDirectory(this.state,r,u?r:e+d,n-1,this.walk)}else{r=u?r:e;let t=ge(r),n=Zo(N(r),this.state.options);r=this.joinPath(t,n),this.pushFile(r,p,this.state.counts,i)}})}}this.groupFiles(this.state.groups,t,p)}};function Ws(e,t){return new Promise((n,r)=>{Gs(e,t,(e,t)=>{if(e)return r(e);n(t)})})}function Gs(e,t,n){new Us(e,t,n).start()}function Ks(e,t){return new Us(e,t).start()}var qs=class{constructor(e,t){this.root=e,this.options=t}withPromise(){return Ws(this.root,this.options)}withCallback(e){Gs(this.root,this.options,e)}sync(){return Ks(this.root,this.options)}};let Js=null;try{Go.resolve(`picomatch`),Js=Go(`picomatch`)}catch{}var Ys=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:be,filters:[]};globFunction;constructor(e){this.options={...this.options,...e},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(e){return this.options.pathSeparator=e,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(e){return this.options.maxDepth=e,this}withMaxFiles(e){return this.options.maxFiles=e,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:e=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=e,this.withFullPaths()}withAbortSignal(e){return this.options.signal=e,this}normalize(){return this.options.normalizePath=!0,this}filter(e){return this.options.filters.push(e),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(e){return this.options.exclude=e,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(e){return new qs(e||`.`,this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new qs(e||`.`,this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){let n=this.globFunction||Js;if(!n)throw Error(`Please specify a glob function to use glob matching.`);var r=this.globCache[e.join(`\0`)];return r||(r=n(e,...t),this.globCache[e.join(`\0`)]=r),this.options.filters.push(e=>r(e)),this}},Xs=Fe(((e,t)=>{let n=`[^\\\\/]`,r=`[^/]`,i=`(?:\\/|$)`,a=`(?:^|\\/)`,o=`\\.{1,2}${i}`,s={DOT_LITERAL:`\\.`,PLUS_LITERAL:`\\+`,QMARK_LITERAL:`\\?`,SLASH_LITERAL:`\\/`,ONE_CHAR:`(?=.)`,QMARK:r,END_ANCHOR:i,DOTS_SLASH:o,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!${a}${o})`,NO_DOT_SLASH:`(?!\\.{0,1}${i})`,NO_DOTS_SLASH:`(?!${o})`,QMARK_NO_DOT:`[^.\\/]`,STAR:`${r}*?`,START_ANCHOR:a,SEP:`/`},c={...s,SLASH_LITERAL:`[\\\\/]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`\\.{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!\\.{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!\\.{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:`[^.\\\\/]`,START_ANCHOR:`(?:^|[\\\\/])`,END_ANCHOR:`(?:[\\\\/]|$)`,SEP:`\\`};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:{alnum:`a-zA-Z0-9`,alpha:`a-zA-Z`,ascii:`\\x00-\\x7F`,blank:` \\t`,cntrl:`\\x00-\\x1F\\x7F`,digit:`0-9`,graph:`\\x21-\\x7E`,lower:`a-z`,print:`\\x20-\\x7E `,punct:`\\-!"#$%&'()\\*+,./:;<=>?@[\\]^_\`{|}~`,space:` \\t\\r\\n\\v\\f`,upper:`A-Z`,word:`A-Za-z0-9_`,xdigit:`A-Fa-f0-9`},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":`*`,"**/**":`**`,"**/**/**":`**`},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:`negate`,open:`(?:(?!(?:`,close:`))${e.STAR})`},"?":{type:`qmark`,open:`(?:`,close:`)?`},"+":{type:`plus`,open:`(?:`,close:`)+`},"*":{type:`star`,open:`(?:`,close:`)*`},"@":{type:`at`,open:`(?:`,close:`)`}}},globChars(e){return e===!0?c:s}}})),Zs=Fe((e=>{let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=Xs();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,`\\$1`),e.toPosixSlashes=e=>e.replace(t,`/`),e.isWindows=()=>{if(typeof navigator<`u`&&navigator.platform){let e=navigator.platform.toLowerCase();return e===`win32`||e===`windows`}return typeof process<`u`&&process.platform?process.platform===`win32`:!1},e.removeBackslashes=e=>e.replace(n,e=>e===`\\`?``:e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return i===-1?t:t[i-1]===`\\`?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:`/`),r=n[n.length-1];return r===``?n[n.length-2]:r}})),Qs=Fe(((e,t)=>{let n=Zs(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:_}=Xs(),v=e=>e===l||e===a,ee=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let y=t||{},b=e.length-1,x=y.parts===!0||y.scanToEnd===!0,te=[],S=[],ne=[],re=e,ie=-1,C=0,ae=0,w=!1,oe=!1,T=!1,se=!1,ce=!1,E=!1,D=!1,le=!1,ue=!1,de=!1,O=0,k,A,j={value:``,depth:0,isGlob:!1},fe=()=>ie>=b,pe=()=>re.charCodeAt(ie+1),me=()=>(k=A,re.charCodeAt(++ie));for(;ie<b;){A=me();let e;if(A===a){D=j.backslashes=!0,A=me(),A===u&&(E=!0);continue}if(E===!0||A===u){for(O++;fe()!==!0&&(A=me());){if(A===a){D=j.backslashes=!0,me();continue}if(A===u){O++;continue}if(E!==!0&&A===s&&(A=me())===s){if(w=j.isBrace=!0,T=j.isGlob=!0,de=!0,x===!0)continue;break}if(E!==!0&&A===o){if(w=j.isBrace=!0,T=j.isGlob=!0,de=!0,x===!0)continue;break}if(A===h&&(O--,O===0)){E=!1,w=j.isBrace=!0,de=!0;break}}if(x===!0)continue;break}if(A===l){if(te.push(ie),S.push(j),j={value:``,depth:0,isGlob:!1},de===!0)continue;if(k===s&&ie===C+1){C+=2;continue}ae=ie+1;continue}if(y.noext!==!0&&(A===p||A===i||A===r||A===m||A===c)&&pe()===d){if(T=j.isGlob=!0,se=j.isExtglob=!0,de=!0,A===c&&ie===C&&(ue=!0),x===!0){for(;fe()!==!0&&(A=me());){if(A===a){D=j.backslashes=!0,A=me();continue}if(A===g){T=j.isGlob=!0,de=!0;break}}continue}break}if(A===r){if(k===r&&(ce=j.isGlobstar=!0),T=j.isGlob=!0,de=!0,x===!0)continue;break}if(A===m){if(T=j.isGlob=!0,de=!0,x===!0)continue;break}if(A===f){for(;fe()!==!0&&(e=me());){if(e===a){D=j.backslashes=!0,me();continue}if(e===_){oe=j.isBracket=!0,T=j.isGlob=!0,de=!0;break}}if(x===!0)continue;break}if(y.nonegate!==!0&&A===c&&ie===C){le=j.negated=!0,C++;continue}if(y.noparen!==!0&&A===d){if(T=j.isGlob=!0,x===!0){for(;fe()!==!0&&(A=me());){if(A===d){D=j.backslashes=!0,A=me();continue}if(A===g){de=!0;break}}continue}break}if(T===!0){if(de=!0,x===!0)continue;break}}y.noext===!0&&(se=!1,T=!1);let M=re,he=``,ge=``;C>0&&(he=re.slice(0,C),re=re.slice(C),ae-=C),M&&T===!0&&ae>0?(M=re.slice(0,ae),ge=re.slice(ae)):T===!0?(M=``,ge=re):M=re,M&&M!==``&&M!==`/`&&M!==re&&v(M.charCodeAt(M.length-1))&&(M=M.slice(0,-1)),y.unescape===!0&&(ge&&=n.removeBackslashes(ge),M&&D===!0&&(M=n.removeBackslashes(M)));let N={prefix:he,input:e,start:C,base:M,glob:ge,isBrace:w,isBracket:oe,isGlob:T,isExtglob:se,isGlobstar:ce,negated:le,negatedExtglob:ue};if(y.tokens===!0&&(N.maxDepth=0,v(A)||S.push(j),N.tokens=S),y.parts===!0||y.tokens===!0){let t;for(let n=0;n<te.length;n++){let r=t?t+1:C,i=te[n],a=e.slice(r,i);y.tokens&&(n===0&&C!==0?(S[n].isPrefix=!0,S[n].value=he):S[n].value=a,ee(S[n]),N.maxDepth+=S[n].depth),(n!==0||a!==``)&&ne.push(a),t=i}if(t&&t+1<e.length){let n=e.slice(t+1);ne.push(n),y.tokens&&(S[S.length-1].value=n,ee(S[S.length-1]),N.maxDepth+=S[S.length-1].depth)}N.slashes=te,N.parts=ne}return N}})),$s=Fe(((e,t)=>{let n=Xs(),r=Zs(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,l=(e,t)=>{if(typeof t.expandRange==`function`)return t.expandRange(...e,t);e.sort();let n=`[${e.join(`-`)}]`;try{new RegExp(n)}catch{return e.map(e=>r.escapeRegex(e)).join(`..`)}return n},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let f={...t},p=typeof f.maxLength==`number`?Math.min(i,f.maxLength):i,m=e.length;if(m>p)throw SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${p}`);let h={type:`bos`,value:``,output:f.prepend||``},g=[h],_=f.capture?``:`?:`,v=n.globChars(f.windows),ee=n.extglobChars(v),{DOT_LITERAL:y,PLUS_LITERAL:b,SLASH_LITERAL:x,ONE_CHAR:te,DOTS_SLASH:S,NO_DOT:ne,NO_DOT_SLASH:re,NO_DOTS_SLASH:ie,QMARK:C,QMARK_NO_DOT:ae,STAR:w,START_ANCHOR:oe}=v,T=e=>`(${_}(?:(?!${oe}${e.dot?S:y}).)*?)`,se=f.dot?``:ne,ce=f.dot?C:ae,E=f.bash===!0?T(f):w;f.capture&&(E=`(${E})`),typeof f.noext==`boolean`&&(f.noextglob=f.noext);let D={input:e,index:-1,start:0,dot:f.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};e=r.removePrefix(e,D),m=e.length;let le=[],ue=[],de=[],O=h,k,A=()=>D.index===m-1,j=D.peek=(t=1)=>e[D.index+t],fe=D.advance=()=>e[++D.index]||``,pe=()=>e.slice(D.index+1),me=(e=``,t=0)=>{D.consumed+=e,D.index+=t},M=e=>{D.output+=e.output==null?e.value:e.output,me(e.value)},he=()=>{let e=1;for(;j()===`!`&&(j(2)!==`(`||j(3)===`?`);)fe(),D.start++,e++;return e%2==0?!1:(D.negated=!0,D.start++,!0)},ge=e=>{D[e]++,de.push(e)},N=e=>{D[e]--,de.pop()},P=e=>{if(O.type===`globstar`){let t=D.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||le.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(D.output=D.output.slice(0,-O.output.length),O.type=`star`,O.value=`*`,O.output=E,D.output+=O.output)}if(le.length&&e.type!==`paren`&&(le[le.length-1].inner+=e.value),(e.value||e.output)&&M(e),O&&O.type===`text`&&e.type===`text`){O.output=(O.output||O.value)+e.value,O.value+=e.value;return}e.prev=O,g.push(e),O=e},_e=(e,t)=>{let n={...ee[t],conditions:1,inner:``};n.prev=O,n.parens=D.parens,n.output=D.output;let r=(f.capture?`(`:``)+n.open;ge(`parens`),P({type:e,value:t,output:D.output?``:te}),P({type:`paren`,extglob:!0,value:fe(),output:r}),le.push(n)},ve=e=>{let n=e.close+(f.capture?`)`:``),r;if(e.type===`negate`){let i=E;e.inner&&e.inner.length>1&&e.inner.includes(`/`)&&(i=T(f)),(i!==E||A()||/^\)+$/.test(pe()))&&(n=e.close=`)$))${i}`),e.inner.includes(`*`)&&(r=pe())&&/^\.[^\\/.]+$/.test(r)&&(n=e.close=`)${d(r,{...t,fastpaths:!1}).output})${i})`),e.prev.type===`bos`&&(D.negatedExtglob=!0)}P({type:`paren`,extglob:!0,value:k,output:n}),N(`parens`)};if(f.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(s,(e,t,r,i,a,o)=>i===`\\`?(n=!0,e):i===`?`?t?t+i+(a?C.repeat(a.length):``):o===0?ce+(a?C.repeat(a.length):``):C.repeat(r.length):i===`.`?y.repeat(r.length):i===`*`?t?t+i+(a?E:``):E:t?e:`\\${e}`);return n===!0&&(i=f.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&f.contains===!0?(D.output=e,D):(D.output=r.wrapOutput(i,D,t),D)}for(;!A();){if(k=fe(),k===`\0`)continue;if(k===`\\`){let e=j();if(e===`/`&&f.bash!==!0||e===`.`||e===`;`)continue;if(!e){k+=`\\`,P({type:`text`,value:k});continue}let t=/^\\+/.exec(pe()),n=0;if(t&&t[0].length>2&&(n=t[0].length,D.index+=n,n%2!=0&&(k+=`\\`)),f.unescape===!0?k=fe():k+=fe(),D.brackets===0){P({type:`text`,value:k});continue}}if(D.brackets>0&&(k!==`]`||O.value===`[`||O.value===`[^`)){if(f.posix!==!1&&k===`:`){let e=O.value.slice(1);if(e.includes(`[`)&&(O.posix=!0,e.includes(`:`))){let e=O.value.lastIndexOf(`[`),t=O.value.slice(0,e),n=a[O.value.slice(e+2)];if(n){O.value=t+n,D.backtrack=!0,fe(),!h.output&&g.indexOf(O)===1&&(h.output=te);continue}}}(k===`[`&&j()!==`:`||k===`-`&&j()===`]`)&&(k=`\\${k}`),k===`]`&&(O.value===`[`||O.value===`[^`)&&(k=`\\${k}`),f.posix===!0&&k===`!`&&O.value===`[`&&(k=`^`),O.value+=k,M({value:k});continue}if(D.quotes===1&&k!==`"`){k=r.escapeRegex(k),O.value+=k,M({value:k});continue}if(k===`"`){D.quotes=D.quotes===1?0:1,f.keepQuotes===!0&&P({type:`text`,value:k});continue}if(k===`(`){ge(`parens`),P({type:`paren`,value:k});continue}if(k===`)`){if(D.parens===0&&f.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=le[le.length-1];if(e&&D.parens===e.parens+1){ve(le.pop());continue}P({type:`paren`,value:k,output:D.parens?`)`:`\\)`}),N(`parens`);continue}if(k===`[`){if(f.nobracket===!0||!pe().includes(`]`)){if(f.nobracket!==!0&&f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));k=`\\${k}`}else ge(`brackets`);P({type:`bracket`,value:k});continue}if(k===`]`){if(f.nobracket===!0||O&&O.type===`bracket`&&O.value.length===1){P({type:`text`,value:k,output:`\\${k}`});continue}if(D.brackets===0){if(f.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));P({type:`text`,value:k,output:`\\${k}`});continue}N(`brackets`);let e=O.value.slice(1);if(O.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(k=`/${k}`),O.value+=k,M({value:k}),f.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(O.value);if(D.output=D.output.slice(0,-O.value.length),f.literalBrackets===!0){D.output+=t,O.value=t;continue}O.value=`(${_}${t}|${O.value})`,D.output+=O.value;continue}if(k===`{`&&f.nobrace!==!0){ge(`braces`);let e={type:`brace`,value:k,output:`(`,outputIndex:D.output.length,tokensIndex:D.tokens.length};ue.push(e),P(e);continue}if(k===`}`){let e=ue[ue.length-1];if(f.nobrace===!0||!e){P({type:`text`,value:k,output:k});continue}let t=`)`;if(e.dots===!0){let e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=l(n,f),D.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=D.output.slice(0,e.outputIndex),r=D.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,k=t=`\\}`,D.output=n;for(let e of r)D.output+=e.output||e.value}P({type:`brace`,value:k,output:t}),N(`braces`),ue.pop();continue}if(k===`|`){le.length>0&&le[le.length-1].conditions++,P({type:`text`,value:k});continue}if(k===`,`){let e=k,t=ue[ue.length-1];t&&de[de.length-1]===`braces`&&(t.comma=!0,e=`|`),P({type:`comma`,value:k,output:e});continue}if(k===`/`){if(O.type===`dot`&&D.index===D.start+1){D.start=D.index+1,D.consumed=``,D.output=``,g.pop(),O=h;continue}P({type:`slash`,value:k,output:x});continue}if(k===`.`){if(D.braces>0&&O.type===`dot`){O.value===`.`&&(O.output=y);let e=ue[ue.length-1];O.type=`dots`,O.output+=k,O.value+=k,e.dots=!0;continue}if(D.braces+D.parens===0&&O.type!==`bos`&&O.type!==`slash`){P({type:`text`,value:k,output:y});continue}P({type:`dot`,value:k,output:y});continue}if(k===`?`){if(!(O&&O.value===`(`)&&f.noextglob!==!0&&j()===`(`&&j(2)!==`?`){_e(`qmark`,k);continue}if(O&&O.type===`paren`){let e=j(),t=k;(O.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(pe()))&&(t=`\\${k}`),P({type:`text`,value:k,output:t});continue}if(f.dot!==!0&&(O.type===`slash`||O.type===`bos`)){P({type:`qmark`,value:k,output:ae});continue}P({type:`qmark`,value:k,output:C});continue}if(k===`!`){if(f.noextglob!==!0&&j()===`(`&&(j(2)!==`?`||!/[!=<:]/.test(j(3)))){_e(`negate`,k);continue}if(f.nonegate!==!0&&D.index===0){he();continue}}if(k===`+`){if(f.noextglob!==!0&&j()===`(`&&j(2)!==`?`){_e(`plus`,k);continue}if(O&&O.value===`(`||f.regex===!1){P({type:`plus`,value:k,output:b});continue}if(O&&(O.type===`bracket`||O.type===`paren`||O.type===`brace`)||D.parens>0){P({type:`plus`,value:k});continue}P({type:`plus`,value:b});continue}if(k===`@`){if(f.noextglob!==!0&&j()===`(`&&j(2)!==`?`){P({type:`at`,extglob:!0,value:k,output:``});continue}P({type:`text`,value:k});continue}if(k!==`*`){(k===`$`||k===`^`)&&(k=`\\${k}`);let e=o.exec(pe());e&&(k+=e[0],D.index+=e[0].length),P({type:`text`,value:k});continue}if(O&&(O.type===`globstar`||O.star===!0)){O.type=`star`,O.star=!0,O.value+=k,O.output=E,D.backtrack=!0,D.globstar=!0,me(k);continue}let t=pe();if(f.noextglob!==!0&&/^\([^?]/.test(t)){_e(`star`,k);continue}if(O.type===`star`){if(f.noglobstar===!0){me(k);continue}let n=O.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(f.bash===!0&&(!i||t[0]&&t[0]!==`/`)){P({type:`star`,value:k,output:``});continue}let o=D.braces>0&&(n.type===`comma`||n.type===`brace`),s=le.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){P({type:`star`,value:k,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[D.index+4];if(n&&n!==`/`)break;t=t.slice(3),me(`/**`,3)}if(n.type===`bos`&&A()){O.type=`globstar`,O.value+=k,O.output=T(f),D.output=O.output,D.globstar=!0,me(k);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&A()){D.output=D.output.slice(0,-(n.output+O.output).length),n.output=`(?:${n.output}`,O.type=`globstar`,O.output=T(f)+(f.strictSlashes?`)`:`|$)`),O.value+=k,D.globstar=!0,D.output+=n.output+O.output,me(k);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;D.output=D.output.slice(0,-(n.output+O.output).length),n.output=`(?:${n.output}`,O.type=`globstar`,O.output=`${T(f)}${x}|${x}${e})`,O.value+=k,D.output+=n.output+O.output,D.globstar=!0,me(k+fe()),P({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){O.type=`globstar`,O.value+=k,O.output=`(?:^|${x}|${T(f)}${x})`,D.output=O.output,D.globstar=!0,me(k+fe()),P({type:`slash`,value:`/`,output:``});continue}D.output=D.output.slice(0,-O.output.length),O.type=`globstar`,O.output=T(f),O.value+=k,D.output+=O.output,D.globstar=!0,me(k);continue}let n={type:`star`,value:k,output:E};if(f.bash===!0){n.output=`.*?`,(O.type===`bos`||O.type===`slash`)&&(n.output=se+n.output),P(n);continue}if(O&&(O.type===`bracket`||O.type===`paren`)&&f.regex===!0){n.output=k,P(n);continue}(D.index===D.start||O.type===`slash`||O.type===`dot`)&&(O.type===`dot`?(D.output+=re,O.output+=re):f.dot===!0?(D.output+=ie,O.output+=ie):(D.output+=se,O.output+=se),j()!==`*`&&(D.output+=te,O.output+=te)),P(n)}for(;D.brackets>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));D.output=r.escapeLast(D.output,`[`),N(`brackets`)}for(;D.parens>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));D.output=r.escapeLast(D.output,`(`),N(`parens`)}for(;D.braces>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));D.output=r.escapeLast(D.output,`{`),N(`braces`)}if(f.strictSlashes!==!0&&(O.type===`star`||O.type===`bracket`)&&P({type:`maybe_slash`,value:``,output:`${x}?`}),D.backtrack===!0){D.output=``;for(let e of D.tokens)D.output+=e.output==null?e.value:e.output,e.suffix&&(D.output+=e.suffix)}return D};d.fastpaths=(e,t)=>{let a={...t},o=typeof a.maxLength==`number`?Math.min(i,a.maxLength):i,s=e.length;if(s>o)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);e=c[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:_}=n.globChars(a.windows),v=a.dot?m:p,ee=a.dot?h:p,y=a.capture?``:`?:`,b={negated:!1,prefix:``},x=a.bash===!0?`.*?`:g;a.capture&&(x=`(${x})`);let te=e=>e.noglobstar===!0?x:`(${y}(?:(?!${_}${e.dot?f:l}).)*?)`,S=e=>{switch(e){case`*`:return`${v}${d}${x}`;case`.*`:return`${l}${d}${x}`;case`*.*`:return`${v}${x}${l}${d}${x}`;case`*/*`:return`${v}${x}${u}${d}${ee}${x}`;case`**`:return v+te(a);case`**/*`:return`(?:${v}${te(a)}${u})?${ee}${d}${x}`;case`**/*.*`:return`(?:${v}${te(a)}${u})?${ee}${x}${l}${d}${x}`;case`**/.*`:return`(?:${v}${te(a)}${u})?${l}${d}${x}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=S(t[1]);return n?n+l+t[2]:void 0}}},ne=S(r.removePrefix(e,b));return ne&&a.strictSlashes!==!0&&(ne+=`${u}?`),ne},t.exports=d})),ec=Fe(((e,t)=>{let n=Qs(),r=$s(),i=Zs(),a=Xs(),o=e=>e&&typeof e==`object`&&!Array.isArray(e),s=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>s(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=o(e)&&e.tokens&&e.input;if(e===``||typeof e!=`string`&&!r)throw TypeError(`Expected pattern to be a non-empty string`);let i=t||{},a=i.windows,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),l=c.state;delete c.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=s(i.ignore,e,n)}let d=(n,r=!1)=>{let{isMatch:o,match:d,output:f}=s.test(n,c,t,{glob:e,posix:a}),p={glob:e,state:l,regex:c,posix:a,input:n,output:f,match:d,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):u(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),r?p:!0)};return n&&(d.state=l),d};s.test=(e,t,n,{glob:r,posix:a}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let o=n||{},c=o.format||(a?i.toPosixSlashes:null),l=e===r,u=l&&c?c(e):e;return l===!1&&(u=c?c(e):e,l=u===r),(l===!1||o.capture===!0)&&(l=o.matchBase===!0||o.basename===!0?s.matchBase(e,t,n,a):t.exec(u)),{isMatch:!!l,match:l,output:u}},s.matchBase=(e,t,n)=>(t instanceof RegExp?t:s.makeRe(t,n)).test(i.basename(e)),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):r(e,{...t,fastpaths:!1}),s.scan=(e,t)=>n(e,t),s.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,c=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let l=s.toRegex(c,t);return r===!0&&(l.state=e),l},s.makeRe=(e,t={},n=!1,i=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(a.output=r.fastpaths(e,t)),a.output||(a=r(e,t)),s.compileRe(a,t,n,i)},s.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?`i`:``))}catch(e){if(t&&t.debug===!0)throw e;return/$^/}},s.constants=a,t.exports=s})),tc=Re(Fe(((e,t)=>{let n=ec(),r=Zs();function i(e,t,i=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:r.isWindows()}),n(e,t,i)}Object.assign(i,n),t.exports=i}))(),1);const nc=Array.isArray,rc=process.platform===`win32`,ic=/^(\/?\.\.)+$/;function ac(e,t={}){let n=e.length,r=Array(n),i=Array(n),a=!t.noglobstar;for(let a=0;a<n;a++){let n=dc(e[a]);r[a]=n;let o=n.length,s=Array(o);for(let e=0;e<o;e++)s[e]=(0,tc.default)(n[e],t);i[a]=s}return t=>{let n=t.split(`/`);if(n[0]===`..`&&ic.test(t))return!0;for(let t=0;t<e.length;t++){let e=r[t],o=i[t],s=n.length,c=Math.min(s,e.length),l=0;for(;l<c;){let t=e[l];if(t.includes(`/`))return!0;if(!o[l](n[l]))break;if(a&&t===`**`)return!0;l++}if(l===s)return!0}return!1}}const oc=/^[A-Z]:\/$/i,sc=rc?e=>oc.test(e):e=>e===`/`;function cc(e,t,n){if(e===t||t.startsWith(`${e}/`)){if(n){let t=sc(e)?e.length:e.length+1;return(e,n)=>e.slice(t,n?-1:void 0)||`.`}let r=t.slice(e.length+1);return r?(e,t)=>{if(e===`.`)return r;let n=`${r}/${e}`;return t?n.slice(0,-1):n}:(e,t)=>t&&e!==`.`?e.slice(0,-1):e}return n?t=>_e.relative(e,t)||`.`:n=>_e.relative(e,`${t}/${n}`)||`.`}function lc(e,t){if(t.startsWith(`${e}/`)){let n=t.slice(e.length+1);return e=>`${n}/${e}`}return n=>{let r=_e.relative(e,`${t}/${n}`);return n.endsWith(`/`)&&r!==``?`${r}/`:r||`.`}}const uc={parts:!0};function dc(e){let t=tc.default.scan(e,uc);return t.parts?.length?t.parts:[e]}const fc=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,pc=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,mc=rc?e=>e.replace(pc,`\\$&`):e=>e.replace(fc,`\\$&`);function hc(e,t){if(t?.caseSensitiveMatch===!1)return!0;let n=tc.default.scan(e);return n.isGlob||n.negated}function gc(...e){console.log(`[tinyglobby ${new Date().toLocaleTimeString(`es`)}]`,...e)}const _c=/^(\/?\.\.)+/,vc=/\\(?=[()[\]{}!*+?@|])/g,yc=/\\/g;function bc(e,t,n,r,i){let a=e;e.endsWith(`/`)&&(a=e.slice(0,-1)),!a.endsWith(`*`)&&t&&(a+=`/**`);let o=mc(n);a=he.isAbsolute(a.replace(vc,``))?_e.relative(o,a):_e.normalize(a);let s=_c.exec(a),c=dc(a);if(s?.[0]){let e=(s[0].length+1)/3,t=0,i=o.split(`/`);for(;t<e&&c[t+e]===i[i.length+t-e];)a=a.slice(0,(e-t-1)*3)+a.slice((e-t)*3+c[t+e].length+1)||`.`,t++;let l=_e.join(n,s[0].slice(t*3));!l.startsWith(`.`)&&r.root.length>l.length&&(r.root=l,r.depthOffset=-e+t)}if(!i&&r.depthOffset>=0){r.commonPath??=c;let e=[],t=Math.min(r.commonPath.length,c.length);for(let n=0;n<t;n++){let t=c[n];if(t===`**`&&!c[n+1]){e.pop();break}if(t!==r.commonPath[n]||hc(t)||n===c.length-1)break;e.push(t)}r.depthOffset=e.length,r.commonPath=e,r.root=e.length>0?_e.join(n,...e):n}return a}function xc({patterns:e=[`**/*`],ignore:t=[],expandDirectories:n=!0},r,i){typeof e==`string`&&(e=[e]),typeof t==`string`&&(t=[t]);let a=[],o=[];for(let e of t)e&&(e[0]!==`!`||e[1]===`(`)&&o.push(bc(e,n,r,i,!0));for(let t of e)t&&(t[0]!==`!`||t[1]===`(`?a.push(bc(t,n,r,i,!1)):(t[1]!==`!`||t[2]===`(`)&&o.push(bc(t.slice(1),n,r,i,!0)));return{match:a,ignore:o}}function Sc(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];e[n]=t(r)}return e}function Cc(e){return e?e instanceof URL?xe(e).replace(yc,`/`):he.resolve(e).replace(yc,`/`):process.cwd().replace(yc,`/`)}function wc(e,t={}){let n=process.env.TINYGLOBBY_DEBUG?{...t,debug:!0}:t,r=Cc(n.cwd);if(n.debug&&gc(`globbing with:`,{patterns:e,options:n,cwd:r}),Array.isArray(e)&&e.length===0)return[{sync:()=>[],withPromise:async()=>[]},!1];let i={root:r,commonPath:null,depthOffset:0},a=xc({...n,patterns:e},r,i);n.debug&&gc(`internal processing patterns:`,a);let o={dot:n.dot,nobrace:n.braceExpansion===!1,nocase:n.caseSensitiveMatch===!1,noextglob:n.extglob===!1,noglobstar:n.globstar===!1,posix:!0},s=(0,tc.default)(a.match,{...o,ignore:a.ignore}),c=(0,tc.default)(a.ignore,o),l=ac(a.match,o),u=cc(r,i.root,n.absolute),d=n.absolute?u:cc(r,i.root,!0),f={filters:[n.debug?(e,t)=>{let n=u(e,t),r=s(n);return r&&gc(`matched ${n}`),r}:(e,t)=>s(u(e,t))],exclude:n.debug?(e,t)=>{let n=d(t,!0),r=n!==`.`&&!l(n)||c(n);return gc(r?`skipped ${t}`:`crawling ${t}`),r}:(e,t)=>{let n=d(t,!0);return n!==`.`&&!l(n)||c(n)},fs:n.fs?{readdir:n.fs.readdir||A.readdir,readdirSync:n.fs.readdirSync||A.readdirSync,realpath:n.fs.realpath||A.realpath,realpathSync:n.fs.realpathSync||A.realpathSync,stat:n.fs.stat||A.stat,statSync:n.fs.statSync||A.statSync}:void 0,pathSeparator:`/`,relativePaths:!0,resolveSymlinks:!0,signal:n.signal};n.deep!==void 0&&(f.maxDepth=Math.round(n.deep-i.depthOffset)),n.absolute&&(f.relativePaths=!1,f.resolvePaths=!0,f.includeBasePath=!0),n.followSymbolicLinks===!1&&(f.resolveSymlinks=!1,f.excludeSymlinks=!0),n.onlyDirectories?(f.excludeFiles=!0,f.includeDirs=!0):n.onlyFiles===!1&&(f.includeDirs=!0),i.root=i.root.replace(yc,``);let p=i.root;n.debug&&gc(`internal properties:`,i);let m=r!==p&&!n.absolute&&lc(r,i.root);return[new Ys(f).crawl(p),m]}async function Tc(e,t){if(e&&t?.patterns)throw Error(`Cannot pass patterns as both an argument and an option`);let n=nc(e)||typeof e==`string`,r=n?t:e,[i,a]=wc(n?e:e.patterns,r);return a?Sc(await i.withPromise(),a):i.withPromise()}const Ec=/\.([cm]?)jsx?$/,Dc=/\.([cm]?)tsx?$/,Oc=/\.d\.([cm]?)ts$/,kc=/\.d\.([cm]?)ts\.map$/,Ac=/[\\/]node_modules[\\/]/,jc=/\.css$/,Mc=/\.vue$/,Nc=/\.json$/;function Pc(e){return e.replace(Ec,`.d.$1ts`)}function Fc(e){return e.replace(Mc,`.vue.ts`).replace(Dc,`.d.$1ts`).replace(Ec,`.d.$1ts`).replace(Nc,`.json.d.ts`)}function Ic(e,t){return e.replace(Oc,`.$1${t}`)}function Lc(e,t){return typeof e==`function`?e(t):e}function Rc(e,t){return e.replaceAll(`[name]`,t)}function zc(e,t){return s(e)?e:d(t||`.`,e)}function Bc(e,t){let{last:n,cwd:r}=t||{},i=zc(e,r),a=zc(n||`/`,r),s,c=[];for(;s!==a&&(c.push(i),i=o(s=i),i!==s););return c}function Vc(e,t){let n,r;for(n of Bc(t&&t.cwd||``,t))if(r=c(n,e),ne(r))return r}function Hc(e){return Vc(`package.json`,e)}var Uc=n(import.meta.url);const Wc=!!e.registerHooks,Gc=/[/\\]node_modules[/\\]/;let Kc;function qc({skipNodeModules:t}={}){if(v.versions.bun)throw Error(`init is unnecessary in Bun, use clearRequireCache() instead.`);if(!Wc)throw Error(`import-without-cache requires Node.js v22.15.0 or higher.`);if(Kc)return Kc;let n=e.registerHooks({resolve(e,n,r){let i=n.importAttributes?.cache===`no`;e.startsWith(`no-cache://`)&&(e=e.slice(11),i=!0);let a=r(e,n);if(t&&Gc.test(a.url)||!a.url.startsWith(`file://`))return a;let o=Yc(n.parentURL);return!i&&!o||(a.url=Xc(a.url,o||crypto.randomUUID())),a},load(e,t,n){return Zc(t),n(e,t)}});return Kc=()=>{n.deregister(),Kc=void 0}}function Jc(){for(let e of Object.keys(Uc.cache))delete Uc.cache[e]}function Yc(e){if(e)return new URL(e).searchParams.get(`no-cache`)??void 0}function Xc(e,t){let n=new URL(e);return n.searchParams.set(`no-cache`,t),n.toString()}function Zc(e){if(!e.importAttributes?.cache)return;let t=Object.assign(Object.create(null),e.importAttributes);delete t.cache,e.importAttributes=t,Object.freeze(e.importAttributes)}const Qc=Symbol.for(`quansync.getIsAsync`);var $c=class extends Error{constructor(e=`Unexpected promise in sync context`){super(e),this.name=`QuansyncError`}};function el(e){return e&&typeof e==`object`&&typeof e.then==`function`}function tl(e){return e&&typeof e==`object`&&typeof e[Symbol.iterator]==`function`&&`__quansync`in e}function nl(e){let t=function*(...t){return(yield Qc)?yield e.async.apply(this,t):e.sync.apply(this,t)};function n(...n){let r=t.apply(this,n);return r.then=(...t)=>e.async.apply(this,n).then(...t),r.__quansync=!0,r}return n.sync=e.sync,n.async=e.async,n}function rl(e){return nl({async:()=>Promise.resolve(e),sync:()=>{if(el(e))throw new $c;return e}})}function il(e,t){if(e===Qc)return t;if(tl(e))return t?sl(e):ol(e);if(!t&&el(e))throw new $c;return e}const al=e=>e;function ol(e,t=al){let n=e.next();for(;!n.done;)try{n=e.next(il(t(n.value,!1)))}catch(t){n=e.throw(t)}return il(n.value)}async function sl(e,t=al){let n=e.next();for(;!n.done;)try{n=e.next(await il(t(n.value,!0),!0))}catch(t){n=e.throw(t)}return n.value}function cl(e,t){return nl({name:e.name,async(...n){return sl(e.apply(this,n),t?.onYield)},sync(...n){return ol(e.apply(this,n),t?.onYield)}})}function ll(e,t){return el(e)?rl(e):typeof e==`function`?cl(e,t):nl(e)}ll({async:()=>Promise.resolve(!0),sync:()=>!1});const ul=ll;ll({sync:S.readFileSync,async:S.promises.readFile}),ll({sync:S.writeFileSync,async:S.promises.writeFile}),ll({sync:S.unlinkSync,async:S.promises.unlink}),ll({sync:S.accessSync,async:S.promises.access});const dl=ll({sync:S.statSync,async:S.promises.stat}),fl=ll({sync:S.lstatSync,async:S.promises.lstat});ll({sync:S.copyFileSync,async:S.promises.copyFile}),ll({sync:S.rmSync,async:S.promises.rm}),ll({sync:S.mkdirSync,async:S.promises.mkdir}),ll({sync:S.renameSync,async:S.promises.rename}),ll({sync:S.readdirSync,async:S.promises.readdir}),ll({sync:S.realpathSync,async:S.promises.realpath}),ll({sync:S.readlinkSync,async:S.promises.readlink}),ll({sync:S.symlinkSync,async:S.promises.symlink}),ll({sync:S.chownSync,async:S.promises.chown}),ll({sync:S.lchownSync,async:S.promises.lchown}),ll({sync:S.chmodSync,async:S.promises.chmod}),ll({sync:S.utimesSync,async:S.promises.utimes}),ll({sync:S.lutimesSync,async:S.promises.lutimes}),ll({sync:S.mkdtempSync,async:S.promises.mkdtemp});const pl=ul(function*(e,t){try{return(yield(t?dl:fl)(e)).isFile()}catch{return!1}}),ml=ul(function*(e,t={}){let{cwd:n=v.cwd(),stopAt:r=u(n).root,multiple:i=!1,allowSymlinks:a=!0}=t,s=n,c=[];for(;s&&s!==r;){for(let t of e){let e=d(s,t);if((yield pl(e,a))&&(c.push(e),!i))return c}let t=o(s);if(t===s)break;s=t}return c}),hl=ul(function*(e,t){try{let n=yield t.parser(e);return n?{config:n,source:e}:void 0}catch(e){if(t.skipOnError)return;throw e}});function gl(e){let{cwd:t=v.cwd(),multiple:n,sources:r}=e,i=[],a,o=ul(function*(){a??=[],a.length=0;for(let i of r){let{extensions:r}=i,o=yield ml(i.files.flatMap(e=>r?.length?r.map(t=>t?`${e}.${t}`:e):[e]),{cwd:t,stopAt:e.stopAt,multiple:n});a.push([i,o])}return a.flatMap(e=>e[1])});return{load:ul(function*(e=!1){(a==null||e)&&(yield o());for(let[e,t]of a)if(t.length)if(n)for(let n of t){let t=yield hl(n,e);t&&i.push(t)}else{let n=yield hl(t[0],e);if(n)return[n]}return i}),findConfigs:o}}const _l=n(import.meta.url),vl=_l(`picomatch`),yl=_l(`semver/ranges/min-version.js`),bl=e=>e in y&&y[e]!==`0`&&y[e]!==`false`;var xl=bl(`CI`)||bl(`CONTINUOUS_INTEGRATION`);const Sl=Wo(`tsdown:clean`),Cl=/[/\\]$/;async function wl(e){let t=new Set;for(let n of e){if(n.devtools&&(n.devtools.clean??!0)&&n.clean.push(`node_modules/.rolldown`),!n.clean.length)continue;let e=await Tc(n.clean,{cwd:n.cwd,absolute:!0,onlyFiles:!1,dot:!0}),r=n.outDir.replace(Cl,``);for(let n of e)n.replace(Cl,``)!==r&&t.add(n)}t.size&&(co.info(`Cleaning ${t.size} files`),await Promise.all([...t].map(async e=>{Sl(`Removing`,e),await vo(e)})),Sl(`Removed %d files`,t.size))}function Tl(e,t,n){if(e===!0?e=[Za(t)]:e||=[],e.some(e=>i.resolve(e)===n))throw Error(`Cannot clean the current working directory. Please specify a different path to clean option.`);return e}async function El(e,t){await Promise.all(t.map(async t=>{let n=i.resolve(e,t.fileName);Sl(`Removing chunk file`,n),await vo(n)}))}const Dl=`style.css`;function Ol(e={}){return{splitting:e.splitting??!0,fileName:e.fileName??Dl}}async function kl(e,t,n,r,a){if(!t||Object.keys(t).length===0){let e=i.resolve(n,`src/index.ts`);if(await go(e))t={index:e};else throw Error(`${a} No input files, try "tsdown <your-file>" or create src/index.ts`)}let o=await Al(t,n),s=Object.values(o);if(s.length===0)throw Error(`${a} Cannot find entry: ${JSON.stringify(t)}`);return e.info(a,`entry: ${r(s.map(e=>i.relative(n,e)).join(`, `))}`),o}function Al(e,t){return typeof e==`string`&&(e=[e]),Array.isArray(e)?Ml(e,t):jl(e,t)}async function jl(e,t){return Object.fromEntries((await Promise.all(Object.entries(e).map(async([e,n])=>{if(!e.includes(`*`)){if(Array.isArray(n))throw TypeError(`Object entry "${e}" cannot have an array value when the key is not a glob pattern.`);return[[e,n]]}let r=Ja(n),a=await Tc(r,{cwd:t,expandDirectories:!1});if(!a.length)throw Error(`Cannot find files for entry key "${e}" with patterns: ${JSON.stringify(r)}`);let o;for(let t of r){if(t.startsWith(`!`))continue;let n=vl.scan(t).base;if(o===void 0)o=n;else if(o!==n)throw Error(`When using object entry with glob pattern key "${e}", all value glob patterns must have the same base directory.`)}if(o===void 0)throw Error(`Cannot determine base directory for value glob patterns of key "${e}".`);return a.map(n=>[Za(e.replaceAll(`*`,xo(i.relative(o,n)))),i.resolve(t,n)])}))).flat())}async function Ml(e,t){let n=[],r=[];for(let t of e)typeof t==`string`?n.push(t):r.push(t);let a=n.some(e=>hc(e)),o;o=a?(await Tc(n,{cwd:t,expandDirectories:!1,absolute:!0})).map(e=>i.resolve(e)):n;let s=bo(...o),c=Object.fromEntries(o.map(e=>[Za(xo(i.relative(s,e))),e]));return Object.assign({},c,...await Promise.all(r.map(e=>jl(e,t))))}async function Nl(e,t){let{pkg:n}=e,{publishExports:r,...i}=await Fl(n,t,e),a={...n,...i,packageJsonPath:void 0};r&&(a.publishConfig||={},a.publishConfig.exports=r);let o=re(n.packageJsonPath,`utf8`),s=JSON.stringify(a,null,Co(o));o.endsWith(`
|
|
68
68
|
`)&&(s+=`
|
|
69
|
-
`),s!==o&&
|
|
70
|
-
Example: export default defineConfig(() => [...])`);return{configs:l.map(e=>({...e,cwd:e.cwd?i.resolve(n,e.cwd):n})),file:u}}const
|
|
69
|
+
`),s!==o&&ie(n.packageJsonPath,s,`utf8`)}function Pl(e,t){return t?.length?$a(e,t):!1}async function Fl(e,t,n){let{exports:{devExports:r,all:a,packageJson:o=!0,exclude:s,customExports:c,legacy:l},css:u,logger:d}=n,f=i.dirname(e.packageJsonPath),p,m,h,g,_=new Map,v=Object.keys(t);!v.includes(`cjs`)&&!v.includes(`es`)&&d.warn(`No CJS or ESM formats found in chunks for package ${e.name}`);let ee=v.length===1&&v[0]===`es`;l??=!ee;for(let[e,n]of Object.entries(t)){if(e!==`es`&&e!==`cjs`)continue;let t=n.filter(e=>{if(e.type!==`chunk`||!e.isEntry)return!1;let[t]=Bl(e);return!Pl(t,s)}),r=t.filter(e=>!Oc.test(e.fileName)).length===1;for(let n of t){let[t,a,o]=Bl(n),s=r||t===`index`,c=Vl(f,n.outDir,a);s?(t=`.`,e===`cjs`?o?h=c:p=c:e===`es`&&(o?g=c:m=c)):t=t.endsWith(`/index`)?`./${t.slice(0,-6)}`:`./${t}`;let l=_.get(t);l||(l={},_.set(t,l)),o||(l[e]=c,n.facadeModuleId&&!l.src&&(l.src=`./${Za(i.relative(f,n.facadeModuleId))}`))}}let y=Array.from(_.entries()).toSorted(([e],[t])=>e===`index`?-1:e.localeCompare(t)),b=Object.fromEntries(y.map(([e,t])=>[e,Il(r,t)]));Ll(b,a,o),Rl(b,t,u,f),c&&(b=await c(b,{pkg:e,chunks:t,isPublish:!1}));let x;return r&&(x=Object.fromEntries(y.map(([e,t])=>[e,Il(!1,t)])),Ll(x,a,o),Rl(x,t,u,f),c&&(x=await c(x,{pkg:e,chunks:t,isPublish:!0}))),{main:l?p||m||e.main:void 0,module:l?m||e.module:void 0,types:l&&(h||g)||e.types,exports:b,publishExports:x}}function Il(e,{src:t,es:n,cjs:r}){if(e===!0)return t;let i,a=n&&r;return!a&&!e?i=r||n:(i={},typeof e==`string`&&(i[e]=t),r&&(i[a?`require`:`default`]=r),n&&(i[a?`import`:`default`]=n)),i}function Ll(e,t,n){t?e[`./*`]=`./*`:n&&(e[`./package.json`]=`./package.json`)}function Rl(e,t,{splitting:n},r){if(!n){for(let n of Object.values(t))for(let t of n)if(t.type===`asset`&&jc.test(t.fileName)){let n=Za(t.fileName);e[`./${n}`]=Vl(r,t.outDir,n);return}}}function zl(e){let t=e?.exports;if(!t)return!1;if(typeof t==`object`&&t&&!Array.isArray(t)){if(`types`in t)return!0;if(`.`in t){let e=t[`.`];if(typeof e==`object`&&e&&`types`in e)return!0}}return!1}function Bl(e){let t=Za(e.fileName),n=xo(t),r=n.endsWith(`.d`);return r&&(n=n.slice(0,-2)),[n,t,r]}function Vl(e,t,n){let r=Za(i.relative(e,t));return`${r?`./${r}`:`.`}/${n}`}function Hl(e,t,n,r,i){if(t===!1)return;if(t==null){let e=Ul(r);if(e)t=e;else return}if(typeof t==`number`)throw TypeError(`Invalid target: ${t}`);let a=Ya(Ja(t));return a.length&&e.info(i,`target${a.length>1?`s`:``}: ${n(a.join(`, `))}`),a}function Ul(e){let t=e?.engines?.node;if(!t)return;let n=yl(t);if(n&&n.version!==`0.0.0`)return`node${n.version}`}function Wl(e,t=`tsconfig.json`){return Vc(t,{cwd:e})||!1}async function Gl(e,t,n,r,a){let o=t;if(t!==!1){if(t===!0||t==null)t=Wl(n),o&&!t&&e.warn(`No tsconfig found in ${va(n)}`);else{let r=i.resolve(n,t),a=await _o(r);a?.isFile()?t=r:a?.isDirectory()?(t=Wl(r),t||e.warn(`No tsconfig found in ${va(r)}`)):(t=Wl(n,t),t||e.warn(`tsconfig ${va(o)} doesn't exist`))}t&&e.info(a,`tsconfig: ${r(i.relative(n,t))}`)}return t}const Kl=Wo(`tsdown:package`);async function ql(e){let t=Hc({cwd:e});if(!t)return;Kl(`Reading package.json:`,t);let n=await se(t,`utf8`);return{...JSON.parse(n),packageJsonPath:t}}function Jl(e){if(e?.type){if(![`module`,`commonjs`].includes(e.type))throw Error(`Invalid package.json type: ${e.type}`);return e.type}}function Yl(e){switch(e){case`es`:case`esm`:case`module`:return`es`;case`cjs`:case`commonjs`:return`cjs`;default:return e}}const Xl=Wo(`tsdown:config:file`);async function Zl(e,t,n){let r=ru(n);Xl(`Loading Vite config via loader: `,r);let i=iu(r),[a]=await gl({sources:[{files:[`${e}.config`],extensions:[`js`,`mjs`,`ts`,`cjs`,`mts`,`cts`],parser:i}],cwd:t}).load(!0);if(!a)return;let{config:o,source:s}=a;co.info(`Using Vite config: ${fa(s)}`);let c=await o;return typeof c==`function`?c({command:`build`,mode:`production`}):c}const Ql=`tsdown.config`;async function $l(e,t){let n=e.cwd||v.cwd(),r=!1,{config:a}=e;if(a===!1)return{configs:[{}]};if(typeof a==`string`){let e=await _o(a);if(e){let t=i.resolve(a);e.isFile()?(r=!0,a=t,n=i.dirname(a)):e.isDirectory()&&(n=t)}}let o=ru(e.configLoader);Xl(`Using config loader:`,o);let s=iu(o),[c]=await gl({sources:r?[{files:[a],extensions:[],parser:s}]:[{files:[Ql],extensions:[`ts`,`mts`,`cts`,`js`,`mjs`,`cjs`,`json`],parser:s},{files:[`package.json`],parser:s}],cwd:n,stopAt:t&&i.dirname(t)}).load(!0),l=[],u;if(c&&({config:l,source:u}=c,co.info(`config file: ${fa(u)}`,o===`native`?``:`(${o})`),l=await l,typeof l==`function`&&(l=await l(e,{ci:xl}))),l=Ja(l),l.length===0&&l.push({}),l.some(e=>typeof e==`function`))throw Error(`Function should not be nested within multiple tsdown configurations. It must be at the top level.
|
|
70
|
+
Example: export default defineConfig(() => [...])`);return{configs:l.map(e=>({...e,cwd:e.cwd?i.resolve(n,e.cwd):n})),file:u}}const eu=!!v.versions.bun,tu=v.features.typescript||v.versions.deno,nu=eu||tu&&Wc?`native`:`unrun`;function ru(e=`auto`){return e===`auto`?nu:e===`native`?`native`:`unrun`}function iu(e){return async t=>{let n=i.basename(t),r=n===`package.json`;if(n===Ql||r||n.endsWith(`.json`)){let e=await se(t,`utf8`),n=JSON.parse(e);return r?n?.tsdown:n}return e===`native`?au(t):ou(t)}}async function au(e){let t=M(e),n=Object.create(null);Wc?(n.cache=`no`,qc({skipNodeModules:!0})):eu||t.searchParams.set(`no-cache`,crypto.randomUUID());let r=await import(t.href,{with:n}).catch(e=>{throw e?.message?.includes?.(`Cannot find module`)?Error(`Failed to load the config file. Try setting the --config-loader CLI flag to \`unrun\`.\n\n${e.message}`,{cause:e}):e});return r.default||r}async function ou(e){let{unrun:t}=await import(`./dist-Bvnjjx3Q.js`),{module:n}=await t({path:M(e).href});return n}const su=Wo(`tsdown:config:options`),cu=v.getBuiltinModule(`node:util`).parseEnv;async function lu(e,t){let{entry:n,format:r=[`es`],plugins:a=[],clean:o=!0,logLevel:s=`info`,failOnWarn:c=`ci-only`,customLogger:l,treeshake:u=!0,platform:d=`node`,outDir:f=`dist`,sourcemap:p=!1,dts:m,unused:h=!1,watch:g=!1,ignoreWatch:_,shims:ee=!1,skipNodeModulesBundle:y=!1,publint:b=!1,attw:x=!1,fromVite:te,alias:S,tsconfig:ne,report:re=!0,target:ie,env:C={},envFile:ae,envPrefix:w=`TSDOWN_`,copy:oe,publicDir:T,hash:ce=!0,cwd:E=v.cwd(),name:D,workspace:le,external:ue,noExternal:de,exports:O=!1,bundle:k,unbundle:A=typeof k==`boolean`?!k:!1,removeNodeProtocol:j,nodeProtocol:fe,cjsDefault:pe=!0,globImport:me=!0,inlineOnly:M,css:he,fixedExtension:ge=d===`node`,devtools:N=!1,write:P=!0}=e,_e=await ql(E);le&&(D||=_e?.name);let ve=po(D),ye=lo(ve,D);if(!hu(t.filter,E,D))return su(`[filter] skipping config %s`,E),[];let be=so(s,{customLogger:l,failOnWarn:pu(c,!0)});if(typeof k==`boolean`&&be.warn("`bundle` option is deprecated. Use `unbundle` instead."),j){if(fe)throw TypeError("`removeNodeProtocol` is deprecated. Please only use `nodeProtocol` instead.");be.warn('`removeNodeProtocol` is deprecated. Use `nodeProtocol: "strip"` instead.')}fe??=j?`strip`:!1,f=i.resolve(E,f),o=Tl(o,f,E);let xe=await kl(be,n,E,ve,ye);if(m??=!!(_e?.types||_e?.typings||zl(_e)),ie=Hl(be,ie,ve,_e,ye),ne=await Gl(be,ne,E,ve,ye),typeof ue==`string`&&(ue=Xa(ue)),typeof de==`string`&&(de=Xa(de)),b=pu(b,{}),x=pu(x,{}),O=pu(O,{}),h=pu(h,{}),re=pu(re,{}),m=pu(m,{}),!_e){if(O)throw Error("`package.json` not found, cannot write exports");b&&be.warn(ye,`publint is enabled but package.json is not found`),x&&be.warn(ye,`attw is enabled but package.json is not found`)}if(T){if(oe)throw TypeError("`publicDir` is deprecated. Cannot be used with `copy`");be.warn(`${va`publicDir`} is deprecated. Use ${va`copy`} instead.`)}w=Ja(w),w.includes(``)&&be.warn("`envPrefix` includes an empty string; filtering is disabled. All environment variables from the env file and process.env will be injected into the build. Ensure this is intended to avoid accidental leakage of sensitive information.");let Se=uu(v.env,w);if(ae){if(!cu)throw Error(`Your runtime does not support 'util.parseEnv()'. Please upgrade to Node.js v20.12.0 or later.`);let e=i.resolve(E,ae);be.info(ye,`env file: ${ve(e)}`),C={...uu(cu(await se(e,`utf8`)),w),...Se,...C}}else C={...Se,...C};if(su(`Environment variables: %O`,C),te){let e=await Zl(te===!0?`vite`:te,E,t.configLoader);if(e){let t=e.resolve?.alias;if(Array.isArray(t))throw TypeError(`Unsupported resolve.alias in Vite config. Use object instead of array`);t&&(S={...S,...t}),e.plugins&&(a=[e.plugins,a])}}if(_=Ja(_).map(e=>(e=Xa(e),typeof e==`string`?i.resolve(E,e):e)),de!=null&&typeof de!=`function`){let e=Ja(de);de=t=>$a(t,e)}M!=null&&M!==!1&&(M=Ja(M)),N=pu(N,{}),N&&(g?(N.ui&&be.warn(`Devtools UI is not supported in watch mode, disabling it.`),N.ui=!1):N.ui??=!!eo(`@vitejs/devtools/cli`));let Ce={...e,alias:S,attw:x,cjsDefault:pe,clean:o,copy:T||oe,css:Ol(he),cwd:E,devtools:N,dts:m,entry:xe,env:C,exports:O,external:ue,fixedExtension:ge,globImport:me,hash:ce,ignoreWatch:_,inlineOnly:M,logger:be,name:D,nameLabel:ye,nodeProtocol:fe,noExternal:de,outDir:f,pkg:_e,platform:d,plugins:a,publint:b,report:re,shims:ee,skipNodeModulesBundle:y,sourcemap:p,target:ie,treeshake:u,tsconfig:ne,unbundle:A,unused:h,watch:g,write:P},we=typeof r==`object`&&!Array.isArray(r);return(we?Object.keys(r):Ya(Ja(r,`es`))).map((e,t)=>{let n=t===0,i=we?r[e]:void 0;return{...Ce,copy:n?Ce.copy:void 0,onSuccess:n?Ce.onSuccess:void 0,format:Yl(e),...i}})}function uu(e,t){let n={};for(let[r,i]of Object.entries(e))i!=null&&t.some(e=>r.startsWith(e))&&(n[r]=i);return n}const du=Eo((e,t,n)=>{if(Array.isArray(e[t])&&Array.isArray(n))return e[t]=n,!0});async function fu(e,t,n){let r=typeof t==`function`?await t(e,...n):t;return r?du(r,e):e}function pu(e,t){return typeof e==`object`&&e?mu(e.enabled??!0)?e:!1:mu(e)?t:!1}function mu(e){return e===`ci-only`?!!xl:e===`local-only`?!xl:e}function hu(e,t,n){if(!e)return!0;let r=i.relative(v.cwd(),t);return r===``&&(r=`.`),e instanceof RegExp?n&&e.test(n)||e.test(r):Ja(e).some(e=>n&&n===e||r===e)}var gu=`0.20.1`;function _u(e){return Array.isArray(e)?e:[e]}function vu(e){throw e?Error(`unimplemented: ${e}`):Error(`unimplemented`)}function yu(e){throw e?Error(`unreachable: ${e}`):Error(`unreachable`)}function bu(e){throw Error(`UNSUPPORTED: ${e}`)}function xu(...e){}var Su=class{kind;args;constructor(...e){if(e.length===0)throw Error("`And` expects at least one operand");this.args=e,this.kind=`and`}},Cu=class{kind;pattern;params;constructor(e,t){this.pattern=e,this.kind=`id`,this.params=t??{cleanUrl:!1}}},wu=class{kind;pattern;params;constructor(e,t){this.pattern=e,this.kind=`importerId`,this.params=t??{cleanUrl:!1}}},Tu=class{kind;expr;constructor(e){this.expr=e,this.kind=`include`}};function Eu(...e){return new Su(...e)}function Du(e,t){return new Cu(e,t)}function Ou(e,t){return new wu(e,t)}function ku(e){return new Tu(e)}const Au=i.resolve(import.meta.dirname,`..`,`esm-shims.js`);function ju(e,t){if(e===`es`&&t===`node`)return{__dirname:[Au,`__dirname`],__filename:[Au,`__filename`]}}const Mu=Wo(`tsdown:dep`);function Nu({pkg:e,noExternal:t,inlineOnly:n,skipNodeModulesBundle:i,logger:a,nameLabel:o}){let s=e&&Array.from(Pu(e));return{name:`tsdown:external`,resolveId:{filter:[ku(Eu(Du(/^[^.]/),Ou(/./)))],async handler(e,t,n){if(n.isEntry)return;let i=await c(this,e,t,n),a=r(e);if(Mu(`shouldExternal: %o = %o`,e,i),i===!0||i===`absolute`)return{id:e,external:i,moduleSideEffects:a?!1:void 0}}},generateBundle:n===!1?void 0:{order:`post`,handler(e,t){let r=new Set,i=new Map;for(let e of Object.values(t))if(e.type!==`asset`)for(let t of e.moduleIds){if(!Ac.test(t))continue;let e=Za(t).split(`/node_modules/`).at(-1)?.split(`/`);if(!e)continue;let n;n=e[0][0]===`@`?`${e[0]}/${e[1]}`:e[0],r.add(n);let a=this.getModuleInfo(t);a&&i.set(n,new Set([...a.importers,...i.get(n)||[]]))}if(Mu(`found deps in bundle: %o`,r),n){let e=Array.from(r).filter(e=>!$a(e,n)).map(e=>`${_a(e)} is located in ${va`node_modules`} but is not included in ${va`inlineOnly`} option.\nTo fix this, either add it to ${va`inlineOnly`}, declare it as a production or peer dependency in your package.json, or externalize it manually.\nImported by\n${[...i.get(e)||[]].map(e=>`- ${fa(e)}`).join(`
|
|
71
71
|
`)}`);e.length&&this.error(e.join(`
|
|
72
72
|
|
|
73
|
-
`))}else r.size&&a.warn(o,`Consider adding ${
|
|
74
|
-
`)}`)}}};async function c(e,n,r,a){if(n===Su)return!1;if(t?.(n,r))return`no-external`;if(i){let t=await e.resolve(n,r,a);if(t&&(t.external||Sc.test(t.id)))return!0}return!!(s&&(s.includes(n)||s.some(e=>n.startsWith(`${e}/`))))}}function Eu(e){return new Set([...Object.keys(e.dependencies||{}),...Object.keys(e.peerDependencies||{})])}function Du(e){let n=t.filter(e=>!e.startsWith(`node:`));return{name:`tsdown:node-protocol`,resolveId:{order:`pre`,filter:{id:e===`strip`?RegExp(`^node:(${n.join(`|`)})$`):RegExp(`^(${n.join(`|`)})$`)},handler:e===`strip`?e=>({id:e.slice(5),external:!0,moduleSideEffects:!1}):e=>({id:`node:${e}`,external:!0,moduleSideEffects:!1})}}}const Ou=Io(`tsdown:report`),ku=h(ve),Au=h(ye),ju={gzip:!0,brotli:!1,maxCompressSize:1e6};function Mu(e,t,n,r,a,o){let s={...ju,...e};return{name:`tsdown:report`,async writeBundle(e,c){let l=i.relative(n,e.file?i.resolve(n,e.file,`..`):i.resolve(n,e.dir)),u=[];for(let e of Object.values(c)){let t=await Nu(s,e);u.push(t)}let d=Math.max(...u.map(e=>e.filename.length)),f=Math.max(...u.map(e=>e.rawText.length)),p=Math.max(...u.map(e=>e.gzipText==null?0:e.gzipText.length)),m=Math.max(...u.map(e=>e.brotliText==null?0:e.brotliText.length)),h=0;for(let e of u)e.rawText=e.rawText.padStart(f),e.gzipText=e.gzipText?.padStart(p),e.brotliText=e.brotliText?.padStart(m),h+=e.raw;u.sort((e,t)=>e.dts===t.dts?e.isEntry===t.isEntry?t.raw-e.raw:e.isEntry?-1:1:e.dts?1:-1);let g=o&&no(r?`cjs`:e.format);for(let e of u){let n=e.dts?ca:Wa,r=i.normalize(e.filename);t.info(a,g,na(l+i.sep)+n((e.isEntry?ta:Wa)(r)),` `.repeat(d-e.filename.length),na(e.rawText),s.gzip&&e.gzipText&&na`│ gzip: ${e.gzipText}`,s.brotli&&e.brotliText&&na`│ brotli: ${e.brotliText}`)}let _=mo(h);t.info(a,g,`${u.length} files, total: ${_}`)}}}async function Nu(e,t){Ou(`Calculating size for`,t.fileName);let n=t.type===`chunk`?t.code:t.source,r=_e.byteLength(n,`utf8`);Ou(`[size]`,t.fileName,r);let i=1/0,a=1/0;return r>e.maxCompressSize?Ou(t.fileName,`file size exceeds limit, skip gzip/brotli`):(e.gzip&&(i=(await Au(n)).length,Ou(`[gzip]`,t.fileName,i)),e.brotli&&(a=(await ku(n)).length,Ou(`[brotli]`,t.fileName,a))),{filename:t.fileName,dts:bc.test(t.fileName),isEntry:t.type===`chunk`&&t.isEntry,raw:r,rawText:mo(r),gzip:i,gzipText:mo(i),brotli:a,brotliText:mo(a)}}const Pu=/^#!.*/;function Fu(e,t,n,r){return{name:`tsdown:shebang`,async writeBundle(a,o){for(let s of Object.values(o)){if(s.type!==`chunk`||!s.isEntry||!Pu.test(s.code))continue;let o=i.resolve(t,a.file||i.join(a.dir,s.fileName));await so(o)&&(e.info(n,r&&no(a.format),`Granting execute permission to ${ia(i.relative(t,o))}`),await A(o,493))}}}}function Iu(e,t){return e.map(e=>(e.outDir=t,e))}const Lu=/[\\/](?:tsdown\.config.*|package\.json|tsconfig\.json)$/;function Ru(e,{config:t,chunks:n}){return{name:`tsdown:watch`,options:t.ignoreWatch.length?e=>{e.watch||={},e.watch.exclude=Ba(e.watch.exclude),e.watch.exclude.push(...t.ignoreWatch)}:void 0,buildStart(){t.tsconfig&&this.addWatchFile(t.tsconfig);for(let t of e)this.addWatchFile(t);if(typeof t.watch!=`boolean`)for(let e of Va(Ba(t.watch)))this.addWatchFile(e);t.pkg&&this.addWatchFile(t.pkg.packageJsonPath)},generateBundle:{order:`post`,handler(e,r){n.push(...Iu(Object.values(r),t.outDir))}}}}var zu=Object.create,Bu=Object.defineProperty,Vu=Object.getOwnPropertyDescriptor,Hu=Object.getOwnPropertyNames,Uu=Object.getPrototypeOf,Wu=Object.prototype.hasOwnProperty,Gu=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ku=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Hu(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Wu.call(e,s)&&s!==n&&Bu(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Vu(t,s))||r.enumerable});return e},qu=(e,t,n)=>(n=e==null?{}:zu(Uu(e)),Ku(t||!e||!e.__esModule?Bu(n,`default`,{value:e,enumerable:!0}):n,e)),W=n(import.meta.url),Ju=Gu(((e,t)=>{let n=W(`node:fs`),r=W(`node:child_process`),i=JSON.parse(n.readFileSync(W.resolve(`rolldown/package.json`),`utf-8`)).version,a=`/tmp/rolldown-${i}`,o=`${a}/node_modules/@rolldown/binding-wasm32-wasi/rolldown-binding.wasi.cjs`;if(!n.existsSync(o)){let e=`@rolldown/binding-wasm32-wasi@${i}`;n.rmSync(a,{recursive:!0,force:!0}),n.mkdirSync(a,{recursive:!0}),console.log(`[rolldown] Downloading ${e} on WebContainer...`),r.execFileSync(`pnpm`,[`i`,e],{cwd:a,stdio:`inherit`})}t.exports=W(o)})),Yu=Gu(((e,t)=>{let{readFileSync:n}=W(`node:fs`),r=null,i=[],a=()=>{let e=!1;return process.platform===`linux`&&(e=s(),e===null&&(e=c()),e===null&&(e=l())),e},o=e=>e.includes(`libc.musl-`)||e.includes(`ld-musl-`),s=()=>{try{return n(`/usr/bin/ldd`,`utf-8`).includes(`musl`)}catch{return null}},c=()=>{let e=null;return typeof process.report?.getReport==`function`&&(process.report.excludeNetwork=!0,e=process.report.getReport()),e?e.header&&e.header.glibcVersionRuntime?!1:!!(Array.isArray(e.sharedObjects)&&e.sharedObjects.some(o)):null},l=()=>{try{return W(`child_process`).execSync(`ldd --version`,{encoding:`utf8`}).includes(`musl`)}catch{return!1}};function u(){if(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)try{return W(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)}catch(e){i.push(e)}else if(process.platform===`android`)if(process.arch===`arm64`){try{return W(`./rolldown-binding.android-arm64.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-android-arm64`),t=W(`@rolldown/binding-android-arm64/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`arm`){try{return W(`./rolldown-binding.android-arm-eabi.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-android-arm-eabi`),t=W(`@rolldown/binding-android-arm-eabi/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else i.push(Error(`Unsupported architecture on Android ${process.arch}`));else if(process.platform===`win32`)if(process.arch===`x64`)if(process.config?.variables?.shlib_suffix===`dll.a`||process.config?.variables?.node_target_type===`shared_library`){try{return W(`./rolldown-binding.win32-x64-gnu.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-win32-x64-gnu`),t=W(`@rolldown/binding-win32-x64-gnu/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else{try{return W(`./rolldown-binding.win32-x64-msvc.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-win32-x64-msvc`),t=W(`@rolldown/binding-win32-x64-msvc/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`ia32`){try{return W(`./rolldown-binding.win32-ia32-msvc.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-win32-ia32-msvc`),t=W(`@rolldown/binding-win32-ia32-msvc/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`arm64`){try{return W(`./rolldown-binding.win32-arm64-msvc.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-win32-arm64-msvc`),t=W(`@rolldown/binding-win32-arm64-msvc/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else i.push(Error(`Unsupported architecture on Windows: ${process.arch}`));else if(process.platform===`darwin`){try{return W(`./rolldown-binding.darwin-universal.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-darwin-universal`),t=W(`@rolldown/binding-darwin-universal/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}if(process.arch===`x64`){try{return W(`./rolldown-binding.darwin-x64.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-darwin-x64`),t=W(`@rolldown/binding-darwin-x64/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`arm64`){try{return W(`./rolldown-binding.darwin-arm64.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-darwin-arm64`),t=W(`@rolldown/binding-darwin-arm64/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else i.push(Error(`Unsupported architecture on macOS: ${process.arch}`))}else if(process.platform===`freebsd`)if(process.arch===`x64`){try{return W(`./rolldown-binding.freebsd-x64.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-freebsd-x64`),t=W(`@rolldown/binding-freebsd-x64/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`arm64`){try{return W(`./rolldown-binding.freebsd-arm64.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-freebsd-arm64`),t=W(`@rolldown/binding-freebsd-arm64/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else i.push(Error(`Unsupported architecture on FreeBSD: ${process.arch}`));else if(process.platform===`linux`)if(process.arch===`x64`)if(a()){try{return W(`./rolldown-binding.linux-x64-musl.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-linux-x64-musl`),t=W(`@rolldown/binding-linux-x64-musl/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else{try{return W(`../rolldown-binding.linux-x64-gnu.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-linux-x64-gnu`),t=W(`@rolldown/binding-linux-x64-gnu/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`arm64`)if(a()){try{return W(`./rolldown-binding.linux-arm64-musl.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-linux-arm64-musl`),t=W(`@rolldown/binding-linux-arm64-musl/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else{try{return W(`./rolldown-binding.linux-arm64-gnu.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-linux-arm64-gnu`),t=W(`@rolldown/binding-linux-arm64-gnu/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`arm`)if(a()){try{return W(`./rolldown-binding.linux-arm-musleabihf.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-linux-arm-musleabihf`),t=W(`@rolldown/binding-linux-arm-musleabihf/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else{try{return W(`./rolldown-binding.linux-arm-gnueabihf.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-linux-arm-gnueabihf`),t=W(`@rolldown/binding-linux-arm-gnueabihf/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`loong64`)if(a()){try{return W(`./rolldown-binding.linux-loong64-musl.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-linux-loong64-musl`),t=W(`@rolldown/binding-linux-loong64-musl/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else{try{return W(`./rolldown-binding.linux-loong64-gnu.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-linux-loong64-gnu`),t=W(`@rolldown/binding-linux-loong64-gnu/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`riscv64`)if(a()){try{return W(`./rolldown-binding.linux-riscv64-musl.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-linux-riscv64-musl`),t=W(`@rolldown/binding-linux-riscv64-musl/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else{try{return W(`./rolldown-binding.linux-riscv64-gnu.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-linux-riscv64-gnu`),t=W(`@rolldown/binding-linux-riscv64-gnu/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`ppc64`){try{return W(`./rolldown-binding.linux-ppc64-gnu.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-linux-ppc64-gnu`),t=W(`@rolldown/binding-linux-ppc64-gnu/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`s390x`){try{return W(`./rolldown-binding.linux-s390x-gnu.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-linux-s390x-gnu`),t=W(`@rolldown/binding-linux-s390x-gnu/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else i.push(Error(`Unsupported architecture on Linux: ${process.arch}`));else if(process.platform===`openharmony`)if(process.arch===`arm64`){try{return W(`./rolldown-binding.openharmony-arm64.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-openharmony-arm64`),t=W(`@rolldown/binding-openharmony-arm64/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`x64`){try{return W(`./rolldown-binding.openharmony-x64.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-openharmony-x64`),t=W(`@rolldown/binding-openharmony-x64/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`arm`){try{return W(`./rolldown-binding.openharmony-arm.node`)}catch(e){i.push(e)}try{let e=W(`@rolldown/binding-openharmony-arm`),t=W(`@rolldown/binding-openharmony-arm/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else i.push(Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));else i.push(Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))}if(r=u(),!r||process.env.NAPI_RS_FORCE_WASI){let e=null,t=null;try{e=W(`../rolldown-binding.wasi.cjs`),r=e}catch(e){process.env.NAPI_RS_FORCE_WASI&&(t=e)}if(!r||process.env.NAPI_RS_FORCE_WASI)try{e=W(`@rolldown/binding-wasm32-wasi`),r=e}catch(e){process.env.NAPI_RS_FORCE_WASI&&(t?t.cause=e:t=e,i.push(e))}if(process.env.NAPI_RS_FORCE_WASI===`error`&&!e){let e=Error(`WASI binding not found and NAPI_RS_FORCE_WASI is set to error`);throw e.cause=t,e}}if(!r&&globalThis.process?.versions?.webcontainer)try{r=Ju()}catch(e){i.push(e)}if(!r)throw i.length>0?Error("Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.",{cause:i.reduce((e,t)=>(t.cause=e,t))}):Error(`Failed to load native binding`);t.exports=r,t.exports.minify=r.minify,t.exports.minifySync=r.minifySync,t.exports.Severity=r.Severity,t.exports.ParseResult=r.ParseResult,t.exports.ExportExportNameKind=r.ExportExportNameKind,t.exports.ExportImportNameKind=r.ExportImportNameKind,t.exports.ExportLocalNameKind=r.ExportLocalNameKind,t.exports.ImportNameKind=r.ImportNameKind,t.exports.parse=r.parse,t.exports.parseSync=r.parseSync,t.exports.rawTransferSupported=r.rawTransferSupported,t.exports.ResolverFactory=r.ResolverFactory,t.exports.EnforceExtension=r.EnforceExtension,t.exports.ModuleType=r.ModuleType,t.exports.sync=r.sync,t.exports.HelperMode=r.HelperMode,t.exports.isolatedDeclaration=r.isolatedDeclaration,t.exports.isolatedDeclarationSync=r.isolatedDeclarationSync,t.exports.moduleRunnerTransform=r.moduleRunnerTransform,t.exports.moduleRunnerTransformSync=r.moduleRunnerTransformSync,t.exports.transform=r.transform,t.exports.transformSync=r.transformSync,t.exports.BindingBundleEndEventData=r.BindingBundleEndEventData,t.exports.BindingBundleErrorEventData=r.BindingBundleErrorEventData,t.exports.BindingBundler=r.BindingBundler,t.exports.BindingCallableBuiltinPlugin=r.BindingCallableBuiltinPlugin,t.exports.BindingChunkingContext=r.BindingChunkingContext,t.exports.BindingDecodedMap=r.BindingDecodedMap,t.exports.BindingDevEngine=r.BindingDevEngine,t.exports.BindingMagicString=r.BindingMagicString,t.exports.BindingModuleInfo=r.BindingModuleInfo,t.exports.BindingNormalizedOptions=r.BindingNormalizedOptions,t.exports.BindingOutputAsset=r.BindingOutputAsset,t.exports.BindingOutputChunk=r.BindingOutputChunk,t.exports.BindingPluginContext=r.BindingPluginContext,t.exports.BindingRenderedChunk=r.BindingRenderedChunk,t.exports.BindingRenderedChunkMeta=r.BindingRenderedChunkMeta,t.exports.BindingRenderedModule=r.BindingRenderedModule,t.exports.BindingSourceMap=r.BindingSourceMap,t.exports.BindingTransformPluginContext=r.BindingTransformPluginContext,t.exports.BindingWatcher=r.BindingWatcher,t.exports.BindingWatcherBundler=r.BindingWatcherBundler,t.exports.BindingWatcherChangeData=r.BindingWatcherChangeData,t.exports.BindingWatcherEvent=r.BindingWatcherEvent,t.exports.ParallelJsPluginRegistry=r.ParallelJsPluginRegistry,t.exports.ScheduledBuild=r.ScheduledBuild,t.exports.TraceSubscriberGuard=r.TraceSubscriberGuard,t.exports.BindingAttachDebugInfo=r.BindingAttachDebugInfo,t.exports.BindingBuiltinPluginName=r.BindingBuiltinPluginName,t.exports.BindingChunkModuleOrderBy=r.BindingChunkModuleOrderBy,t.exports.BindingLogLevel=r.BindingLogLevel,t.exports.BindingPluginOrder=r.BindingPluginOrder,t.exports.BindingPropertyReadSideEffects=r.BindingPropertyReadSideEffects,t.exports.BindingPropertyWriteSideEffects=r.BindingPropertyWriteSideEffects,t.exports.BindingRebuildStrategy=r.BindingRebuildStrategy,t.exports.createTokioRuntime=r.createTokioRuntime,t.exports.FilterTokenKind=r.FilterTokenKind,t.exports.initTraceSubscriber=r.initTraceSubscriber,t.exports.registerPlugins=r.registerPlugins,t.exports.shutdownAsyncRuntime=r.shutdownAsyncRuntime,t.exports.startAsyncRuntime=r.startAsyncRuntime}));function Xu(e){let t=``;for(;e--;)t+=` `;return t}function Zu(e){return e.replace(/^\t+/,e=>e.split(` `).join(` `))}function Qu(e,t,n){let r=e.split(`
|
|
75
|
-
`);if(t>r.length)return``;let i=Math.max(
|
|
76
|
-
`)}function
|
|
77
|
-
`).map((e,t)=>{let n=i+e.length+1,r={start:i,end:n,line:t};return i=n,r}),o=0;function s(t,i){if(typeof t==`string`&&(t=e.indexOf(t,i??0)),t===-1)return;let s=a[o],c=t>=s.end?1:-1;for(;s;){if(
|
|
73
|
+
`))}else r.size&&a.warn(o,`Consider adding ${va`inlineOnly`} option to avoid unintended bundling of dependencies, or set ${va`inlineOnly: false`} to disable this warning.\nDetected dependencies in bundle:\n${Array.from(r).map(e=>`- ${_a(e)}`).join(`
|
|
74
|
+
`)}`)}}};async function c(e,n,r,a){if(n===Au)return!1;if(t?.(n,r))return`no-external`;if(i){let t=await e.resolve(n,r,a);if(t&&(t.external||Ac.test(t.id)))return!0}return!!(s&&(s.includes(n)||s.some(e=>n.startsWith(`${e}/`))))}}function Pu(e){return new Set([...Object.keys(e.dependencies||{}),...Object.keys(e.peerDependencies||{})])}function Fu(e){let n=t.filter(e=>!e.startsWith(`node:`));return{name:`tsdown:node-protocol`,resolveId:{order:`pre`,filter:{id:e===`strip`?RegExp(`^node:(${n.join(`|`)})$`):RegExp(`^(${n.join(`|`)})$`)},handler:e===`strip`?e=>({id:e.slice(5),external:!0,moduleSideEffects:!1}):e=>({id:`node:${e}`,external:!0,moduleSideEffects:!1})}}}const Iu=Wo(`tsdown:report`),Lu=h(we),Ru=h(Te),zu={gzip:!0,brotli:!1,maxCompressSize:1e6};function Bu(e,t,n,r,a,o){let s={...zu,...e};return{name:`tsdown:report`,async writeBundle(e,c){let l=i.relative(n,e.file?i.resolve(n,e.file,`..`):i.resolve(n,e.dir)),u=[];for(let e of Object.values(c)){let t=await Vu(s,e);u.push(t)}let d=Math.max(...u.map(e=>e.filename.length)),f=Math.max(...u.map(e=>e.rawText.length)),p=Math.max(...u.map(e=>e.gzipText==null?0:e.gzipText.length)),m=Math.max(...u.map(e=>e.brotliText==null?0:e.brotliText.length)),h=0;for(let e of u)e.rawText=e.rawText.padStart(f),e.gzipText=e.gzipText?.padStart(p),e.brotliText=e.brotliText?.padStart(m),h+=e.raw;u.sort((e,t)=>e.dts===t.dts?e.isEntry===t.isEntry?t.raw-e.raw:e.isEntry?-1:1:e.dts?1:-1);let g=o&&uo(r?`cjs`:e.format);for(let e of u){let n=e.dts?ga:Qa,r=i.normalize(e.filename);t.info(a,g,ua(l+i.sep)+n((e.isEntry?la:Qa)(r)),` `.repeat(d-e.filename.length),ua(e.rawText),s.gzip&&e.gzipText&&ua`│ gzip: ${e.gzipText}`,s.brotli&&e.brotliText&&ua`│ brotli: ${e.brotliText}`)}let _=So(h);t.info(a,g,`${u.length} files, total: ${_}`)}}}async function Vu(e,t){Iu(`Calculating size for`,t.fileName);let n=t.type===`chunk`?t.code:t.source,r=Ce.byteLength(n,`utf8`);Iu(`[size]`,t.fileName,r);let i=1/0,a=1/0;return r>e.maxCompressSize?Iu(t.fileName,`file size exceeds limit, skip gzip/brotli`):(e.gzip&&(i=(await Ru(n)).length,Iu(`[gzip]`,t.fileName,i)),e.brotli&&(a=(await Lu(n)).length,Iu(`[brotli]`,t.fileName,a))),{filename:t.fileName,dts:Oc.test(t.fileName),isEntry:t.type===`chunk`&&t.isEntry,raw:r,rawText:So(r),gzip:i,gzipText:So(i),brotli:a,brotliText:So(a)}}const Hu=/^#!.*/;function Uu(e,t,n,r){return{name:`tsdown:shebang`,async writeBundle(a,o){for(let s of Object.values(o)){if(s.type!==`chunk`||!s.isEntry||!Hu.test(s.code))continue;let o=i.resolve(t,a.file||i.join(a.dir,s.fileName));await go(o)&&(e.info(n,r&&uo(a.format),`Granting execute permission to ${fa(i.relative(t,o))}`),await w(o,493))}}}}function Wu(e,t){return e.map(e=>(e.outDir=t,e))}const Gu=/[\\/](?:tsdown\.config.*|package\.json|tsconfig\.json)$/;function Ku(e,{config:t,chunks:n}){return{name:`tsdown:watch`,options:t.ignoreWatch.length?e=>{e.watch||={},e.watch.exclude=Ja(e.watch.exclude),e.watch.exclude.push(...t.ignoreWatch)}:void 0,buildStart(){t.tsconfig&&this.addWatchFile(t.tsconfig);for(let t of e)this.addWatchFile(t);if(typeof t.watch!=`boolean`)for(let e of Ya(Ja(t.watch)))this.addWatchFile(e);t.pkg&&this.addWatchFile(t.pkg.packageJsonPath)},generateBundle:{order:`post`,handler(e,r){n.push(...Wu(Object.values(r),t.outDir))}}}}var qu=Object.create,Ju=Object.defineProperty,Yu=Object.getOwnPropertyDescriptor,Xu=Object.getOwnPropertyNames,Zu=Object.getPrototypeOf,Qu=Object.prototype.hasOwnProperty,$u=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ed=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Xu(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Qu.call(e,s)&&s!==n&&Ju(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Yu(t,s))||r.enumerable});return e},td=(e,t,n)=>(n=e==null?{}:qu(Zu(e)),ed(t||!e||!e.__esModule?Ju(n,`default`,{value:e,enumerable:!0}):n,e)),I=n(import.meta.url),nd=$u(((e,t)=>{let n=I(`node:fs`),r=I(`node:child_process`),i=JSON.parse(n.readFileSync(I.resolve(`rolldown/package.json`),`utf-8`)).version,a=`/tmp/rolldown-${i}`,o=`${a}/node_modules/@rolldown/binding-wasm32-wasi/rolldown-binding.wasi.cjs`;if(!n.existsSync(o)){let e=`@rolldown/binding-wasm32-wasi@${i}`;n.rmSync(a,{recursive:!0,force:!0}),n.mkdirSync(a,{recursive:!0}),console.log(`[rolldown] Downloading ${e} on WebContainer...`),r.execFileSync(`pnpm`,[`i`,e],{cwd:a,stdio:`inherit`})}t.exports=I(o)})),rd=$u(((e,t)=>{let{readFileSync:n}=I(`node:fs`),r=null,i=[],a=()=>{let e=!1;return process.platform===`linux`&&(e=s(),e===null&&(e=c()),e===null&&(e=l())),e},o=e=>e.includes(`libc.musl-`)||e.includes(`ld-musl-`),s=()=>{try{return n(`/usr/bin/ldd`,`utf-8`).includes(`musl`)}catch{return null}},c=()=>{let e=null;return typeof process.report?.getReport==`function`&&(process.report.excludeNetwork=!0,e=process.report.getReport()),e?e.header&&e.header.glibcVersionRuntime?!1:!!(Array.isArray(e.sharedObjects)&&e.sharedObjects.some(o)):null},l=()=>{try{return I(`child_process`).execSync(`ldd --version`,{encoding:`utf8`}).includes(`musl`)}catch{return!1}};function u(){if(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)try{return I(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)}catch(e){i.push(e)}else if(process.platform===`android`)if(process.arch===`arm64`){try{return I(`./rolldown-binding.android-arm64.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-android-arm64`),t=I(`@rolldown/binding-android-arm64/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`arm`){try{return I(`./rolldown-binding.android-arm-eabi.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-android-arm-eabi`),t=I(`@rolldown/binding-android-arm-eabi/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else i.push(Error(`Unsupported architecture on Android ${process.arch}`));else if(process.platform===`win32`)if(process.arch===`x64`)if(process.config?.variables?.shlib_suffix===`dll.a`||process.config?.variables?.node_target_type===`shared_library`){try{return I(`./rolldown-binding.win32-x64-gnu.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-win32-x64-gnu`),t=I(`@rolldown/binding-win32-x64-gnu/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else{try{return I(`./rolldown-binding.win32-x64-msvc.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-win32-x64-msvc`),t=I(`@rolldown/binding-win32-x64-msvc/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`ia32`){try{return I(`./rolldown-binding.win32-ia32-msvc.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-win32-ia32-msvc`),t=I(`@rolldown/binding-win32-ia32-msvc/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`arm64`){try{return I(`./rolldown-binding.win32-arm64-msvc.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-win32-arm64-msvc`),t=I(`@rolldown/binding-win32-arm64-msvc/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else i.push(Error(`Unsupported architecture on Windows: ${process.arch}`));else if(process.platform===`darwin`){try{return I(`./rolldown-binding.darwin-universal.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-darwin-universal`),t=I(`@rolldown/binding-darwin-universal/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}if(process.arch===`x64`){try{return I(`./rolldown-binding.darwin-x64.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-darwin-x64`),t=I(`@rolldown/binding-darwin-x64/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`arm64`){try{return I(`./rolldown-binding.darwin-arm64.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-darwin-arm64`),t=I(`@rolldown/binding-darwin-arm64/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else i.push(Error(`Unsupported architecture on macOS: ${process.arch}`))}else if(process.platform===`freebsd`)if(process.arch===`x64`){try{return I(`./rolldown-binding.freebsd-x64.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-freebsd-x64`),t=I(`@rolldown/binding-freebsd-x64/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`arm64`){try{return I(`./rolldown-binding.freebsd-arm64.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-freebsd-arm64`),t=I(`@rolldown/binding-freebsd-arm64/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else i.push(Error(`Unsupported architecture on FreeBSD: ${process.arch}`));else if(process.platform===`linux`)if(process.arch===`x64`)if(a()){try{return I(`./rolldown-binding.linux-x64-musl.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-linux-x64-musl`),t=I(`@rolldown/binding-linux-x64-musl/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else{try{return I(`../rolldown-binding.linux-x64-gnu.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-linux-x64-gnu`),t=I(`@rolldown/binding-linux-x64-gnu/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`arm64`)if(a()){try{return I(`./rolldown-binding.linux-arm64-musl.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-linux-arm64-musl`),t=I(`@rolldown/binding-linux-arm64-musl/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else{try{return I(`./rolldown-binding.linux-arm64-gnu.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-linux-arm64-gnu`),t=I(`@rolldown/binding-linux-arm64-gnu/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`arm`)if(a()){try{return I(`./rolldown-binding.linux-arm-musleabihf.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-linux-arm-musleabihf`),t=I(`@rolldown/binding-linux-arm-musleabihf/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else{try{return I(`./rolldown-binding.linux-arm-gnueabihf.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-linux-arm-gnueabihf`),t=I(`@rolldown/binding-linux-arm-gnueabihf/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`loong64`)if(a()){try{return I(`./rolldown-binding.linux-loong64-musl.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-linux-loong64-musl`),t=I(`@rolldown/binding-linux-loong64-musl/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else{try{return I(`./rolldown-binding.linux-loong64-gnu.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-linux-loong64-gnu`),t=I(`@rolldown/binding-linux-loong64-gnu/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`riscv64`)if(a()){try{return I(`./rolldown-binding.linux-riscv64-musl.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-linux-riscv64-musl`),t=I(`@rolldown/binding-linux-riscv64-musl/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else{try{return I(`./rolldown-binding.linux-riscv64-gnu.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-linux-riscv64-gnu`),t=I(`@rolldown/binding-linux-riscv64-gnu/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`ppc64`){try{return I(`./rolldown-binding.linux-ppc64-gnu.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-linux-ppc64-gnu`),t=I(`@rolldown/binding-linux-ppc64-gnu/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`s390x`){try{return I(`./rolldown-binding.linux-s390x-gnu.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-linux-s390x-gnu`),t=I(`@rolldown/binding-linux-s390x-gnu/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else i.push(Error(`Unsupported architecture on Linux: ${process.arch}`));else if(process.platform===`openharmony`)if(process.arch===`arm64`){try{return I(`./rolldown-binding.openharmony-arm64.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-openharmony-arm64`),t=I(`@rolldown/binding-openharmony-arm64/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`x64`){try{return I(`./rolldown-binding.openharmony-x64.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-openharmony-x64`),t=I(`@rolldown/binding-openharmony-x64/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else if(process.arch===`arm`){try{return I(`./rolldown-binding.openharmony-arm.node`)}catch(e){i.push(e)}try{let e=I(`@rolldown/binding-openharmony-arm`),t=I(`@rolldown/binding-openharmony-arm/package.json`).version;if(t!==`1.0.0-rc.1`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 1.0.0-rc.1 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){i.push(e)}}else i.push(Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));else i.push(Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))}if(r=u(),!r||process.env.NAPI_RS_FORCE_WASI){let e=null,t=null;try{e=I(`../rolldown-binding.wasi.cjs`),r=e}catch(e){process.env.NAPI_RS_FORCE_WASI&&(t=e)}if(!r||process.env.NAPI_RS_FORCE_WASI)try{e=I(`@rolldown/binding-wasm32-wasi`),r=e}catch(e){process.env.NAPI_RS_FORCE_WASI&&(t?t.cause=e:t=e,i.push(e))}if(process.env.NAPI_RS_FORCE_WASI===`error`&&!e){let e=Error(`WASI binding not found and NAPI_RS_FORCE_WASI is set to error`);throw e.cause=t,e}}if(!r&&globalThis.process?.versions?.webcontainer)try{r=nd()}catch(e){i.push(e)}if(!r)throw i.length>0?Error("Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.",{cause:i.reduce((e,t)=>(t.cause=e,t))}):Error(`Failed to load native binding`);t.exports=r,t.exports.minify=r.minify,t.exports.minifySync=r.minifySync,t.exports.Severity=r.Severity,t.exports.ParseResult=r.ParseResult,t.exports.ExportExportNameKind=r.ExportExportNameKind,t.exports.ExportImportNameKind=r.ExportImportNameKind,t.exports.ExportLocalNameKind=r.ExportLocalNameKind,t.exports.ImportNameKind=r.ImportNameKind,t.exports.parse=r.parse,t.exports.parseSync=r.parseSync,t.exports.rawTransferSupported=r.rawTransferSupported,t.exports.ResolverFactory=r.ResolverFactory,t.exports.EnforceExtension=r.EnforceExtension,t.exports.ModuleType=r.ModuleType,t.exports.sync=r.sync,t.exports.HelperMode=r.HelperMode,t.exports.isolatedDeclaration=r.isolatedDeclaration,t.exports.isolatedDeclarationSync=r.isolatedDeclarationSync,t.exports.moduleRunnerTransform=r.moduleRunnerTransform,t.exports.moduleRunnerTransformSync=r.moduleRunnerTransformSync,t.exports.transform=r.transform,t.exports.transformSync=r.transformSync,t.exports.BindingBundleEndEventData=r.BindingBundleEndEventData,t.exports.BindingBundleErrorEventData=r.BindingBundleErrorEventData,t.exports.BindingBundler=r.BindingBundler,t.exports.BindingCallableBuiltinPlugin=r.BindingCallableBuiltinPlugin,t.exports.BindingChunkingContext=r.BindingChunkingContext,t.exports.BindingDecodedMap=r.BindingDecodedMap,t.exports.BindingDevEngine=r.BindingDevEngine,t.exports.BindingMagicString=r.BindingMagicString,t.exports.BindingModuleInfo=r.BindingModuleInfo,t.exports.BindingNormalizedOptions=r.BindingNormalizedOptions,t.exports.BindingOutputAsset=r.BindingOutputAsset,t.exports.BindingOutputChunk=r.BindingOutputChunk,t.exports.BindingPluginContext=r.BindingPluginContext,t.exports.BindingRenderedChunk=r.BindingRenderedChunk,t.exports.BindingRenderedChunkMeta=r.BindingRenderedChunkMeta,t.exports.BindingRenderedModule=r.BindingRenderedModule,t.exports.BindingSourceMap=r.BindingSourceMap,t.exports.BindingTransformPluginContext=r.BindingTransformPluginContext,t.exports.BindingWatcher=r.BindingWatcher,t.exports.BindingWatcherBundler=r.BindingWatcherBundler,t.exports.BindingWatcherChangeData=r.BindingWatcherChangeData,t.exports.BindingWatcherEvent=r.BindingWatcherEvent,t.exports.ParallelJsPluginRegistry=r.ParallelJsPluginRegistry,t.exports.ScheduledBuild=r.ScheduledBuild,t.exports.TraceSubscriberGuard=r.TraceSubscriberGuard,t.exports.BindingAttachDebugInfo=r.BindingAttachDebugInfo,t.exports.BindingBuiltinPluginName=r.BindingBuiltinPluginName,t.exports.BindingChunkModuleOrderBy=r.BindingChunkModuleOrderBy,t.exports.BindingLogLevel=r.BindingLogLevel,t.exports.BindingPluginOrder=r.BindingPluginOrder,t.exports.BindingPropertyReadSideEffects=r.BindingPropertyReadSideEffects,t.exports.BindingPropertyWriteSideEffects=r.BindingPropertyWriteSideEffects,t.exports.BindingRebuildStrategy=r.BindingRebuildStrategy,t.exports.createTokioRuntime=r.createTokioRuntime,t.exports.FilterTokenKind=r.FilterTokenKind,t.exports.initTraceSubscriber=r.initTraceSubscriber,t.exports.registerPlugins=r.registerPlugins,t.exports.shutdownAsyncRuntime=r.shutdownAsyncRuntime,t.exports.startAsyncRuntime=r.startAsyncRuntime}));function id(e){let t=``;for(;e--;)t+=` `;return t}function ad(e){return e.replace(/^\t+/,e=>e.split(` `).join(` `))}function od(e,t,n){let r=e.split(`
|
|
75
|
+
`);if(t>r.length)return``;let i=Math.max(ad(r[t-1].slice(0,n)).length+10+3,120),a=Math.max(0,t-3),o=Math.min(t+2,r.length);for(r=r.slice(a,o);!/\S/.test(r[r.length-1]);)r.pop(),--o;let s=String(o).length;return r.map((e,r)=>{let o=a+r+1===t,c=String(r+a+1);for(;c.length<s;)c=` ${c}`;let l=ad(e);if(l.length>i&&(l=`${l.slice(0,i-3)}...`),o){let t=id(s+2+ad(e.slice(0,n)).length)+`^`;return`${c}: ${l}\n${t}`}return`${c}: ${l}`}).join(`
|
|
76
|
+
`)}function sd(e,t){return e.start<=t&&t<e.end}function cd(e,t={}){let{offsetLine:n=0,offsetColumn:r=0}=t,i=0,a=e.split(`
|
|
77
|
+
`).map((e,t)=>{let n=i+e.length+1,r={start:i,end:n,line:t};return i=n,r}),o=0;function s(t,i){if(typeof t==`string`&&(t=e.indexOf(t,i??0)),t===-1)return;let s=a[o],c=t>=s.end?1:-1;for(;s;){if(sd(s,t))return{line:n+s.line,column:r+t-s.start,character:t};o+=c,s=a[o]}}return s}function ld(e,t,n){return cd(e,n)(t,n&&n.startIndex)}function ud(e,t,n){return{code:`PARSE_ERROR`,id:t,message:e,pos:n}}function dd(e){return{code:`INVALID_LOG_POSITION`,message:`Plugin "${e}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`}}function fd(e,t){return{code:`INPUT_HOOK_IN_OUTPUT_PLUGIN`,message:`The "${t}" hook used by the output plugin ${e} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}}function pd(e,t){return{code:`CYCLE_LOADING`,message:`Found the module "${t}" cycle loading at ${e} plugin, it maybe blocking fetching modules.`}}function md(){return{code:`MULTIPLY_NOTIFY_OPTION`,message:`Found multiply notify option at watch options, using first one to start notify watcher.`}}function hd(e,t,{hook:n,id:r}={}){try{let i=e.code;!e.pluginCode&&i!=null&&(typeof i!=`string`||!i.startsWith(`PLUGIN_`))&&(e.pluginCode=i),e.code=`PLUGIN_ERROR`,e.plugin=t,n&&(e.hook=n),r&&(e.id=r)}catch{}finally{return e}}function gd(e){throw e instanceof Error||(e=Object.assign(Error(e.message),e),Object.defineProperty(e,`name`,{value:`RollupError`,writable:!0})),e}function _d(e,t,n,r){if(typeof t==`object`){let{line:n,column:i}=t;e.loc={column:i,file:r,line:n}}else{e.pos=t;let i=ld(n,t,{offsetLine:1});if(!i)return;let{line:a,column:o}=i;e.loc={column:o,file:r,line:a}}if(e.frame===void 0){let{line:t,column:r}=e.loc;e.frame=od(n,t,r)}}rd();var vd=class{enforce;constructor(e,t){this.name=e,this._options=t}};function yd(e){return{__name:e.name,options:e._options}}function bd(e,t){let{isOutputOptionsForLegacyChunks:n,...r}=e._options;return{__name:e.name,options:{...r,isLegacy:n?e=>n(t.getOutputOptions(e)):void 0}}}function xd(e){if(e)return Sd(e)?e:[e]}function Sd(e){return Array.isArray(e)}function Cd(e){let t,n,r,i;return{get program(){return t||=wd(e.program),t},get module(){return n||=e.module,n},get comments(){return r||=e.comments,r},get errors(){return i||=e.errors,i}}}function wd(e){let{node:t,fixes:n}=JSON.parse(e);for(let e of n)Td(t,e);return t}function Td(e,t){let n=e;for(let e of t)n=n[e];if(n.bigint)n.value=BigInt(n.bigint);else try{n.value=RegExp(n.regex.pattern,n.regex.flags)}catch{}}var Ed=td(rd(),1);function Dd(e,t,n){return Cd((0,Ed.parseSync)(e,t,n))}function Od(e,t,n){return e.errors.length>0?kd(t,n,e.errors):e.program}function kd(e,t,n){let r=`Parse failed with ${n.length} error${n.length<2?``:`s`}:\n`,i=n[0]?.labels?.[0]?.start;for(let e=0;e<n.length;e++){if(e>=5){r+=`
|
|
78
78
|
...`;break}let i=n[e];r+=i.message+`
|
|
79
|
-
`+i.labels.map(e=>{let n=
|
|
80
|
-
`)}let a=
|
|
81
|
-
`,e>=5){n+=`...`;break}n+=
|
|
82
|
-
`);let r=`${e.name??`Error`}: ${e.message}`;return t+=r,e.frame&&(t=
|
|
79
|
+
`+i.labels.map(e=>{let n=ld(t,e.start,{offsetLine:1});if(n)return od(t,n.line,n.column)}).filter(Boolean).join(`
|
|
80
|
+
`)}let a=ud(r,e,i);return i!==void 0&&e&&_d(a,i,t,e),gd(a)}const Ad={lang:`js`,preserveParens:!1};function jd(e,t,n){return Od(Dd(n??`file.js`,e,{...Ad,...t}),n,e)}var Md=class{kind;args;constructor(...e){if(e.length===0)throw Error("`And` expects at least one operand");this.args=e,this.kind=`and`}},Nd=class{kind;args;constructor(...e){if(e.length===0)throw Error("`Or` expects at least one operand");this.args=e,this.kind=`or`}},Pd=class{kind;pattern;params;constructor(e,t){this.pattern=e,this.kind=`id`,this.params=t??{cleanUrl:!1}}},Fd=class{kind;pattern;constructor(e){this.pattern=e,this.kind=`moduleType`}},Id=class{kind;pattern;constructor(e){this.pattern=e,this.kind=`code`}},Ld=class{kind;expr;constructor(e){this.expr=e,this.kind=`include`}},Rd=class{kind;expr;constructor(e){this.expr=e,this.kind=`exclude`}};function zd(...e){return new Md(...e)}function Bd(...e){return new Nd(...e)}function Vd(e,t){return new Pd(e,t)}function Hd(e){return new Fd(e)}function Ud(e){return new Id(e)}function Wd(e){return new Ld(e)}function Gd(e){return new Rd(e)}const Kd=`1.0.0-rc.1`,qd=`warn`,Jd=`info`,Yd=`debug`,Xd={[Yd]:0,[Jd]:1,[qd]:2,silent:3},Zd=e=>typeof e==`string`?{message:e}:typeof e==`function`?Zd(e()):e;function Qd(e,t,n,r,i){return Xd[e]<Xd[i]?xu:(i,a)=>{a!=null&&n(qd,dd(r)),i=Zd(i),i.code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=t,i.plugin=r,n(e,i)}}function $d(e){if(typeof e==`function`||typeof e==`string`)return{handler:e,options:{},meta:{}};if(typeof e==`object`&&e){let{handler:t,order:n,...r}=e;return{handler:t,options:r,meta:{order:n}}}yu(`Invalid hook type`)}var ef=class{info;warn;debug;meta;constructor(e,t,n,r,i){this.pluginName=n,this.hookName=i,this.debug=Qd(Yd,`PLUGIN_LOG`,e,n,t),this.info=Qd(Jd,`PLUGIN_LOG`,e,n,t),this.warn=Qd(qd,`PLUGIN_WARNING`,e,n,t),this.meta={rollupVersion:`4.23.0`,rolldownVersion:Kd,watchMode:r}}error(e){return gd(hd(Zd(e),this.pluginName,{hook:this.hookName}))}};const tf=Symbol(`__lazy_fields__`);var nf=class{constructor(){rf(this)}};function rf(e){let t=e.constructor[tf];if(t)for(let[n,r]of t.entries()){let t,i=!1;Object.defineProperty(e,n,{get(){return i||=(t=r.call(this),!0),t},enumerable:!0,configurable:!0})}}function af(e){let t=e.constructor[tf];return t?new Set(t.keys()):new Set}function L(e,t,n){e.constructor[tf]||(e.constructor[tf]=new Map);let r=n.get;return e.constructor[tf].set(t,r),{enumerable:!1,configurable:!0}}function of(e){return e.inner}function sf(e){return{inner:e}}function R(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var cf=class extends nf{type=`asset`;constructor(e){super(),this.bindingAsset=e}get fileName(){return this.bindingAsset.getFileName()}get originalFileName(){return this.bindingAsset.getOriginalFileName()||null}get originalFileNames(){return this.bindingAsset.getOriginalFileNames()}get name(){return this.bindingAsset.getName()??void 0}get names(){return this.bindingAsset.getNames()}get source(){return of(this.bindingAsset.getSource())}__rolldown_external_memory_handle__(e){return e&&this.#e(),this.bindingAsset.dropInner()}#e(){for(let e of af(this))this[e]}};R([L],cf.prototype,`fileName`,null),R([L],cf.prototype,`originalFileName`,null),R([L],cf.prototype,`originalFileNames`,null),R([L],cf.prototype,`name`,null),R([L],cf.prototype,`names`,null),R([L],cf.prototype,`source`,null);function lf(e){return{get code(){return e.code},get renderedLength(){return e.code?.length||0},get renderedExports(){return e.renderedExports}}}function uf(e){let t=null;return{type:`chunk`,get name(){return e.name},get isEntry(){return e.isEntry},get isDynamicEntry(){return e.isDynamicEntry},get facadeModuleId(){return e.facadeModuleId},get moduleIds(){return e.moduleIds},get exports(){return e.exports},get fileName(){return e.fileName},get imports(){return e.imports},get dynamicImports(){return e.dynamicImports},get modules(){return t||=df(e.modules),t}}}function df(e){let t={};for(let n=0;n<e.values.length;n++){let r=e.keys[n],i=e.values[n];t[r]=lf(i)}return t}var ff=class extends nf{type=`chunk`;constructor(e){super(),this.bindingChunk=e}get fileName(){return this.bindingChunk.getFileName()}get name(){return this.bindingChunk.getName()}get exports(){return this.bindingChunk.getExports()}get isEntry(){return this.bindingChunk.getIsEntry()}get facadeModuleId(){return this.bindingChunk.getFacadeModuleId()||null}get isDynamicEntry(){return this.bindingChunk.getIsDynamicEntry()}get sourcemapFileName(){return this.bindingChunk.getSourcemapFileName()||null}get preliminaryFileName(){return this.bindingChunk.getPreliminaryFileName()}get code(){return this.bindingChunk.getCode()}get modules(){return df(this.bindingChunk.getModules())}get imports(){return this.bindingChunk.getImports()}get dynamicImports(){return this.bindingChunk.getDynamicImports()}get moduleIds(){return this.bindingChunk.getModuleIds()}get map(){let e=this.bindingChunk.getMap();return e?mf(e):null}__rolldown_external_memory_handle__(e){return e&&this.#e(),this.bindingChunk.dropInner()}#e(){for(let e of af(this))this[e]}};R([L],ff.prototype,`fileName`,null),R([L],ff.prototype,`name`,null),R([L],ff.prototype,`exports`,null),R([L],ff.prototype,`isEntry`,null),R([L],ff.prototype,`facadeModuleId`,null),R([L],ff.prototype,`isDynamicEntry`,null),R([L],ff.prototype,`sourcemapFileName`,null),R([L],ff.prototype,`preliminaryFileName`,null),R([L],ff.prototype,`code`,null),R([L],ff.prototype,`modules`,null),R([L],ff.prototype,`imports`,null),R([L],ff.prototype,`dynamicImports`,null),R([L],ff.prototype,`moduleIds`,null),R([L],ff.prototype,`map`,null);function pf(e){if(e!=null)return{inner:typeof e==`string`?e:{file:e.file??void 0,mappings:e.mappings,sourceRoot:`sourceRoot`in e?e.sourceRoot??void 0:void 0,sources:e.sources?.map(e=>e??void 0),sourcesContent:e.sourcesContent?.map(e=>e??void 0),names:e.names,x_google_ignoreList:e.x_google_ignoreList,debugId:`debugId`in e?e.debugId:void 0}}}function mf(e){let t={...JSON.parse(e),toString(){return JSON.stringify(t)},toUrl(){return`data:application/json;charset=utf-8;base64,${Buffer.from(t.toString(),`utf-8`).toString(`base64`)}`}};return t}function hf(e){return new ff(e)}function gf(e,t){let n={type:`chunk`,get code(){return e.getCode()},fileName:e.getFileName(),name:e.getName(),get modules(){return df(e.getModules())},get imports(){return e.getImports()},get dynamicImports(){return e.getDynamicImports()},exports:e.getExports(),isEntry:e.getIsEntry(),facadeModuleId:e.getFacadeModuleId()||null,isDynamicEntry:e.getIsDynamicEntry(),get moduleIds(){return e.getModuleIds()},get map(){let t=e.getMap();return t?mf(t):null},sourcemapFileName:e.getSourcemapFileName()||null,preliminaryFileName:e.getPreliminaryFileName()},r={};return new Proxy(n,{get(e,t){if(t in r)return r[t];let n=e[t];return r[t]=n,n},set(n,i,a){return r[i]=a,t.updated.add(e.getFileName()),!0},has(e,t){return t in r?!0:t in e}})}function _f(e){return new cf(e)}function vf(e,t){let n={type:`asset`,fileName:e.getFileName(),originalFileName:e.getOriginalFileName()||null,originalFileNames:e.getOriginalFileNames(),get source(){return of(e.getSource())},name:e.getName()??void 0,names:e.getNames()},r={};return new Proxy(n,{get(e,t){if(t in r)return r[t];let n=e[t];return r[t]=n,n},set(n,i,a){return r[i]=a,t.updated.add(e.getFileName()),!0}})}function yf(e){let{chunks:t,assets:n}=e;return{output:[...t.map(e=>hf(e)),...n.map(e=>_f(e))]}}function bf(e,t){let{chunks:n,assets:r}=e;return{output:[...n.map(e=>gf(e,t)),...r.map(e=>vf(e,t))]}}function xf(e,t,n){let r=Object.fromEntries(bf(t,n).output.map(e=>[e.fileName,e]));return new Proxy(r,{set(t,n,r,i){let a=Error.stackTraceLimit;Error.stackTraceLimit=2;let o=`This plugin assigns to bundle variable. This is discouraged by Rollup and is not supported by Rolldown. This will be ignored. https://rollupjs.org/plugin-development/#generatebundle:~:text=DANGER,this.emitFile.`,s=Error(o).stack??o;return Error.stackTraceLimit=a,e.warn({message:s,code:`UNSUPPORTED_BUNDLE_ASSIGNMENT`}),!0},deleteProperty(e,t){return typeof t==`string`&&n.deleted.add(t),!0}})}function Sf(e,t){let n={};for(let r in t){if(e.deleted.has(r)||!e.updated.has(r))continue;let i=t[r];i.type===`asset`?n[r]={filename:i.fileName,originalFileNames:i.originalFileNames,source:sf(i.source),names:i.names}:n[r]={code:i.code,filename:i.fileName,name:i.name,isEntry:i.isEntry,exports:i.exports,modules:{},imports:i.imports,dynamicImports:i.dynamicImports,facadeModuleId:i.facadeModuleId||void 0,isDynamicEntry:i.isDynamicEntry,moduleIds:i.moduleIds,map:pf(i.map),sourcemapFilename:i.sourcemapFileName||void 0,preliminaryFilename:i.preliminaryFileName}}return{changes:n,deleted:e.deleted}}var Cf=td(rd(),1);function wf(e){if(typeof e==`object`&&e&&`isBindingErrors`in e&&e.isBindingErrors)throw Ef(e.errors);return e}function Tf(e){return e.type===`JsError`?e.field0:Object.assign(Error(),{code:e.field0.kind,kind:e.field0.kind,message:e.field0.message,id:e.field0.id,exporter:e.field0.exporter,loc:e.field0.loc,pos:e.field0.pos,stack:void 0})}function Ef(e){let t=e.map(Tf),n=`Build failed with ${t.length} error${t.length<2?``:`s`}:\n`;for(let e=0;e<t.length;e++){if(n+=`
|
|
81
|
+
`,e>=5){n+=`...`;break}n+=Df(t[e])}let r=Error(n);return Object.defineProperty(r,`errors`,{configurable:!0,enumerable:!0,get:()=>t,set:e=>Object.defineProperty(r,`errors`,{configurable:!0,enumerable:!0,value:e})}),r}function Df(e){if(Object.hasOwn(e,`kind`))return e.message;let t=``;e.plugin&&(t+=`[plugin ${e.plugin}]`);let n=e.id??e.loc?.file;n&&(t+=` `+n,e.loc&&(t+=`:${e.loc.line}:${e.loc.column}`)),t&&(t+=`
|
|
82
|
+
`);let r=`${e.name??`Error`}: ${e.message}`;return t+=r,e.frame&&(t=Of(t,e.frame)),e.stack&&(t=Of(t,e.stack.replace(r,``))),e.cause&&(t=Of(t,`Caused by:`),t=Of(t,Df(e.cause).split(`
|
|
83
83
|
`).map(e=>` `+e).join(`
|
|
84
|
-
`))),t}function
|
|
85
|
-
`+t.replace(/^\n+/,``)}function xf(e,t){return{get ast(){return fu(`ModuleInfo#ast`)},get code(){return e.code},id:e.id,importers:e.importers,dynamicImporters:e.dynamicImporters,importedIds:e.importedIds,dynamicallyImportedIds:e.dynamicallyImportedIds,exports:e.exports,isEntry:e.isEntry,...t}}function Sf(e){return!e||e.length===0||!e[0]}function Cf(e,t,n){if(!n)return;let r=typeof n==`object`?n:JSON.parse(n);return Sf(r.sourcesContent)&&(r.sourcesContent=[t]),(Sf(r.sources)||r.sources&&r.sources.length===1&&r.sources[0]!==e)&&(r.sources=[e]),r}function wf(e,t,n){let r=n=>e(n,...t);return n===void 0?r:Object.assign(r,{lazy:n,lazyArgs:t})}function Tf(e,t,n){let r=e.length-t.length;if(r===0)return e(...t);if(r===1)return wf(e,t,n);throw Error(`Wrong number of arguments`)}function Ef(...e){return Tf(Df,e)}const Df=(e,t)=>{let n=[[],[]];for(let[r,i]of e.entries())t(i,r,e)?n[0].push(i):n[1].push(i);return n};function Of(e,t){if(typeof e==`string`||e instanceof RegExp)return[Id(kf(t,e))];if(Array.isArray(e))return e.map(e=>Id(kf(t,e)));let n=[];return e.exclude&&n.push(...lu(e.exclude).map(e=>Ld(kf(t,e)))),e.include&&n.push(...lu(e.include).map(e=>Id(kf(t,e)))),n}function kf(e,t){return e===`code`?Fd(t):Nd(t)}function Af(e){if(!e)return;if(Array.isArray(e))return e;let{id:t,code:n,moduleType:r}=e,i=[],a=[],o=[],s=[],c=[];t&&([a,o]=Ef(Of(t,`id`)??[],e=>e.kind===`include`)),n&&([s,c]=Ef(Of(n,`code`)??[],e=>e.kind===`include`)),i.push(...o),i.push(...c);let l=[];if(r){let e=Array.isArray(r)?r:r.include??[];l.push(Md(...e.map(e=>Pd(e))))}return a.length&&l.push(Md(...a.map(e=>e.expr))),s.length&&l.push(Md(...s.map(e=>e.expr))),l.length&&i.push(Id(jd(...l))),i}function jf(e,t){let n=Of(t,e),r=[];return n&&(r=n.map(Mf)),r.length>0?{value:r}:void 0}function Mf(e){let t=[];return Ff(e,t),t}function Nf(e){switch(e.kind){case`and`:case`or`:return e.args.some(Nf);case`not`:case`include`:case`exclude`:return Nf(e.expr);case`importerId`:return!0;default:return!1}}function Pf(e,t){if(e?.some(Nf))throw Error(`The \`importerId\` filter can only be used with the \`resolveId\` hook, but it was used with the \`${t}\` hook.`)}function Ff(e,t){switch(e.kind){case`and`:{let n=e.args;for(let e=n.length-1;e>=0;e--)Ff(n[e],t);t.push({kind:`And`,payload:n.length});break}case`or`:{let n=e.args;for(let e=n.length-1;e>=0;e--)Ff(n[e],t);t.push({kind:`Or`,payload:n.length});break}case`not`:Ff(e.expr,t),t.push({kind:`Not`});break;case`id`:t.push({kind:`Id`,payload:e.pattern}),e.params.cleanUrl&&t.push({kind:`CleanUrl`});break;case`importerId`:t.push({kind:`ImporterId`,payload:e.pattern}),e.params.cleanUrl&&t.push({kind:`CleanUrl`});break;case`moduleType`:t.push({kind:`ModuleType`,payload:e.pattern});break;case`code`:t.push({kind:`Code`,payload:e.pattern});break;case`include`:Ff(e.expr,t),t.push({kind:`Include`});break;case`exclude`:Ff(e.expr,t),t.push({kind:`Exclude`});break;case`query`:t.push({kind:`QueryKey`,payload:e.key}),t.push({kind:`QueryValue`,payload:e.pattern});break;default:throw Error(`Unknown filter expression: ${e}`)}}function If(e){if(e)return Array.isArray(e)?{value:e.map(Mf)}:e.id?jf(`id`,e.id):void 0}function Lf(e){if(e)return Array.isArray(e)?(Pf(e,`load`),{value:e.map(Mf)}):e.id?jf(`id`,e.id):void 0}function Rf(e){if(!e)return;let t=Af(e);Pf(t,`transform`);let n=[];return t&&(n=t.map(Mf)),{value:n.length>0?n:void 0}}function zf(e){if(e)return Array.isArray(e)?(Pf(e,`renderChunk`),{value:e.map(Mf)}):e.code?jf(`code`,e.code):void 0}function Bf(e){return{order:Vf(e.order)}}function Vf(e){switch(e){case`post`:return hf.BindingPluginOrder.Post;case`pre`:return hf.BindingPluginOrder.Pre;case null:case void 0:return;default:throw Error(`Unknown plugin order: ${e}`)}}const Hf={appendFile:O.appendFile,copyFile:O.copyFile,mkdir:O.mkdir,mkdtemp:O.mkdtemp,readdir:O.readdir,readFile:O.readFile,realpath:O.realpath,rename:O.rename,rmdir:O.rmdir,stat:O.stat,lstat:O.lstat,unlink:O.unlink,writeFile:O.writeFile};var Uf=class extends Kd{fs=Hf;getModuleInfo;constructor(e,t,n,r,i,a,o,s){super(i,a,n.name,o),this.outputOptions=e,this.context=t,this.data=r,this.onLog=i,this.currentLoadingModule=s,this.getModuleInfo=e=>this.data.getModuleInfo(e,t)}async load(e){let t=e.id;t===this.currentLoadingModule&&this.onLog(zd,ad(this.pluginName,this.currentLoadingModule));let n=this.data.getModuleInfo(t,this.context);if(n&&n.code!==null)return n;let r={meta:e.meta||{},moduleSideEffects:e.moduleSideEffects||null,invalidate:!1};this.data.updateModuleOption(t,r);let i=this.data.loadModulePromiseMap.get(t);return i||(i=this.context.load(t,e.moduleSideEffects??void 0,e.packageJsonPath??void 0).catch(()=>{this.data.loadModulePromiseMap.delete(t)}),this.data.loadModulePromiseMap.set(t,i)),await i,this.data.getModuleInfo(t,this.context)}async resolve(e,t,n){let r;n!=null&&(r=this.data.saveResolveOptions(n));let i=Object.entries(n?.custom??{}).reduce((e,[t,n])=>(t.startsWith(`vite:`)&&((e??={})[t]=n),e),void 0),a=await this.context.resolve(e,t,{importKind:n?.kind,custom:r,isEntry:n?.isEntry,skipSelf:n?.skipSelf,vitePluginCustom:i});if(r!=null&&this.data.removeSavedResolveOptions(r),a==null)return null;let o=this.data.getModuleOption(a.id)||{};return{...a,external:a.external===`relative`?du(`The PluginContext resolve result external couldn't be 'relative'`):a.external,...o,moduleSideEffects:o.moduleSideEffects??a.moduleSideEffects??null,packageJsonPath:a.packageJsonPath}}emitFile=e=>{if(e.type===`prebuilt-chunk`)return this.context.emitPrebuiltChunk({fileName:e.fileName,code:e.code,exports:e.exports,map:af(e.map),sourcemapFileName:e.sourcemapFileName});if(e.type===`chunk`)return this.context.emitChunk({preserveEntrySignatures:Pp(e.preserveSignature),...e});let t=e.fileName||typeof this.outputOptions.sanitizeFileName!=`function`?void 0:this.outputOptions.sanitizeFileName(e.name||`asset`),n=e.fileName?void 0:this.getAssetFileNames(e);return this.context.emitFile({...e,originalFileName:e.originalFileName||void 0,source:Qd(e.source)},n,t)};getAssetFileNames(e){if(typeof this.outputOptions.assetFileNames==`function`)return this.outputOptions.assetFileNames({type:`asset`,name:e.name,names:e.name?[e.name]:[],originalFileName:e.originalFileName,originalFileNames:e.originalFileName?[e.originalFileName]:[],source:e.source})}getFileName(e){return this.context.getFileName(e)}getModuleIds(){return this.data.getModuleIds(this.context)}addWatchFile(e){this.context.addWatchFile(e)}parse(e,t){return Cd(e,t)}},Wf=class extends Uf{constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r,s,c,l,a),this.inner=i,this.moduleId=a,this.moduleSource=o;let u=e=>(t,n)=>{t=Ud(t),n&&ld(t,n,o,a),t.id=a,t.hook=`transform`,e(t)};this.debug=u(this.debug),this.warn=u(this.warn),this.info=u(this.info)}error(e,t){return typeof e==`string`&&(e={message:e}),t&&ld(e,t,this.moduleSource,this.moduleId),e.id=this.moduleId,e.hook=`transform`,cd(sd(Ud(e),this.pluginName))}getCombinedSourcemap(){return JSON.parse(this.inner.getCombinedSourcemap())}addWatchFile(e){this.inner.addWatchFile(e)}sendMagicString(e){this.inner.sendMagicString(e)}};function Gf(e){let t=e.plugin.buildStart;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async(t,r)=>{await n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),e.pluginContextData.getInputOptions(r))},meta:Bf(r)}}function Kf(e){let t=e.plugin.buildEnd;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async(t,r)=>{await n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),r?vf(r):void 0)},meta:Bf(r)}}function qf(e){let t=e.plugin.resolveId;if(!t)return{};let{handler:n,meta:r,options:i}=Gd(t);return{plugin:async(t,r,i,a)=>{let o=a.custom==null?void 0:e.pluginContextData.getSavedResolveOptions(a.custom),s=await n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),r,i??void 0,{...a,custom:o?.custom});if(s==null)return;if(s===!1)return{id:r,external:!0,normalizeExternalId:!0};if(typeof s==`string`)return{id:s,normalizeExternalId:!1};let c=e.pluginContextData.updateModuleOption(s.id,{meta:s.meta||{},moduleSideEffects:s.moduleSideEffects??null,invalidate:!1});return{id:s.id,external:s.external,normalizeExternalId:!1,moduleSideEffects:c.moduleSideEffects??void 0,packageJsonPath:s.packageJsonPath}},meta:Bf(r),filter:If(i.filter)}}function Jf(e){let t=e.plugin.resolveDynamicImport;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async(t,r,i)=>{let a=await n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),r,i??void 0);if(a==null)return;if(a===!1)return{id:r,external:!0};if(typeof a==`string`)return{id:a};let o={id:a.id,external:a.external,packageJsonPath:a.packageJsonPath};return a.moduleSideEffects!==null&&(o.moduleSideEffects=a.moduleSideEffects),e.pluginContextData.updateModuleOption(a.id,{meta:a.meta||{},moduleSideEffects:a.moduleSideEffects||null,invalidate:!1}),o},meta:Bf(r)}}function Yf(e){let t=e.plugin.transform;if(!t)return{};let{handler:n,meta:r,options:i}=Gd(t);return{plugin:async(t,r,i,a)=>{let o,s;Object.defineProperties(a,{magicString:{get(){return o||(o=new hf.BindingMagicString(r),o)}},ast:{get(){if(s)return s;let e=`js`;switch(a.moduleType){case`js`:case`jsx`:case`ts`:case`tsx`:e=a.moduleType;break;default:break}return s=Cd(r,{astType:a.moduleType.includes(`ts`)?`ts`:`js`,lang:e}),s}}});let c=new Wf(e.outputOptions,t.inner(),e.plugin,e.pluginContextData,t,i,r,e.onLog,e.logLevel,e.watchMode),l=await n.call(c,r,i,a);if(l==null)return;if(typeof l==`string`)return{code:l};let u=e.pluginContextData.updateModuleOption(i,{meta:l.meta??{},moduleSideEffects:l.moduleSideEffects??null,invalidate:!1}),d,f=l.map;if(typeof l.code==`string`)d=l.code;else if(l.code instanceof hf.BindingMagicString){let e=l.code;d=e.toString();let n=t.sendMagicString(e);n!=null&&(f=n)}return{code:d,map:af(Cf(i,r,f)),moduleSideEffects:u.moduleSideEffects??void 0,moduleType:l.moduleType}},meta:Bf(r),filter:Rf(i.filter)}}function Xf(e){let t=e.plugin.load;if(!t)return{};let{handler:n,meta:r,options:i}=Gd(t);return{plugin:async(t,r)=>{let i=await n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode,r),r);if(i==null)return;if(typeof i==`string`)return{code:i};let a=e.pluginContextData.updateModuleOption(r,{meta:i.meta||{},moduleSideEffects:i.moduleSideEffects??null,invalidate:!1}),o=Zf(i,r);return{code:i.code,map:af(o),moduleType:i.moduleType,moduleSideEffects:a.moduleSideEffects??void 0}},meta:Bf(r),filter:Lf(i.filter)}}function Zf(e,t){if(!e.map)return;let n=typeof e.map==`object`?e.map:JSON.parse(e.map);if(!Sf(n.sources)){let e=i.dirname(t)||`.`,r=n.sourceRoot||`.`;n.sources=n.sources.map(t=>i.resolve(e,r,t))}return n}function Qf(e){let t=e.plugin.moduleParsed;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async(t,r)=>{await n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),xf(r,e.pluginContextData.getModuleOption(r.id)))},meta:Bf(r)}}function $f(e){let t=e.plugin.renderStart;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async(t,r)=>{n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),e.pluginContextData.getOutputOptions(r),e.pluginContextData.getInputOptions(r))},meta:Bf(r)}}function ep(e){let t=e.plugin.renderChunk;if(!t)return{};let{handler:n,meta:r,options:i}=Gd(t);return{plugin:async(t,r,i,a,o)=>{e.pluginContextData.getRenderChunkMeta()??e.pluginContextData.setRenderChunkMeta({chunks:Object.fromEntries(Object.entries(o.chunks).map(([e,t])=>[e,tf(t)]))});let s=e.pluginContextData.getRenderChunkMeta(),c;e.options.experimental?.nativeMagicString&&Object.defineProperty(s,`magicString`,{get(){return c||(c=new hf.BindingMagicString(r),c)},configurable:!0});let l=await n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),r,tf(i),e.pluginContextData.getOutputOptions(a),s);if(l!=null){if(l instanceof hf.BindingMagicString){let e=l.toString(),t=l.generateMap();return{code:e,map:af({file:t.file,mappings:t.mappings,names:t.names,sources:t.sources,sourcesContent:t.sourcesContent.map(e=>e??null)})}}if(typeof l==`string`)return{code:l};if(l.code instanceof hf.BindingMagicString){let e=l.code,t=e.toString();if(l.map===null)return{code:t};if(l.map===void 0){let n=e.generateMap();return{code:t,map:af({file:n.file,mappings:n.mappings,names:n.names,sources:n.sources,sourcesContent:n.sourcesContent.map(e=>e??null)})}}return{code:t,map:af(l.map)}}return l.map?{code:l.code,map:af(l.map)}:{code:l.code}}},meta:Bf(r),filter:zf(i.filter)}}function tp(e){let t=e.plugin.augmentChunkHash;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async(t,r)=>n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),tf(r)),meta:Bf(r)}}function np(e){let t=e.plugin.renderError;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async(t,r)=>{n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),vf(r))},meta:Bf(r)}}function rp(e){let t=e.plugin.generateBundle;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async(t,r,i,a)=>{let o={updated:new Set,deleted:new Set},s=new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),c=pf(s,gf(r),o);return await n.call(s,e.pluginContextData.getOutputOptions(a),c,i),mf(o,c)},meta:Bf(r)}}function ip(e){let t=e.plugin.writeBundle;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async(t,r,i)=>{let a={updated:new Set,deleted:new Set},o=new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),s=pf(o,gf(r),a);return await n.call(o,e.pluginContextData.getOutputOptions(i),s),mf(a,s)},meta:Bf(r)}}function ap(e){let t=e.plugin.closeBundle;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async(t,r)=>{await n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),r?vf(r):void 0)},meta:Bf(r)}}function op(e){let t=e.plugin.banner;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async(t,r)=>typeof n==`string`?n:n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),tf(r)),meta:Bf(r)}}function sp(e){let t=e.plugin.footer;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async(t,r)=>typeof n==`string`?n:n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),tf(r)),meta:Bf(r)}}function cp(e){let t=e.plugin.intro;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async(t,r)=>typeof n==`string`?n:n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),tf(r)),meta:Bf(r)}}function lp(e){let t=e.plugin.outro;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async(t,r)=>typeof n==`string`?n:n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),tf(r)),meta:Bf(r)}}function up(e){let t=e.plugin.watchChange;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async(t,r,i)=>{await n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),r,{event:i})},meta:Bf(r)}}function dp(e){let t=e.plugin.closeWatcher;if(!t)return{};let{handler:n,meta:r}=Gd(t);return{plugin:async t=>{await n.call(new Uf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode))},meta:Bf(r)}}let fp=function(e){return e[e.buildStart=1]=`buildStart`,e[e.resolveId=2]=`resolveId`,e[e.resolveDynamicImport=4]=`resolveDynamicImport`,e[e.load=8]=`load`,e[e.transform=16]=`transform`,e[e.moduleParsed=32]=`moduleParsed`,e[e.buildEnd=64]=`buildEnd`,e[e.renderStart=128]=`renderStart`,e[e.renderError=256]=`renderError`,e[e.renderChunk=512]=`renderChunk`,e[e.augmentChunkHash=1024]=`augmentChunkHash`,e[e.generateBundle=2048]=`generateBundle`,e[e.writeBundle=4096]=`writeBundle`,e[e.closeBundle=8192]=`closeBundle`,e[e.watchChange=16384]=`watchChange`,e[e.closeWatcher=32768]=`closeWatcher`,e[e.transformAst=65536]=`transformAst`,e[e.banner=131072]=`banner`,e[e.footer=262144]=`footer`,e[e.intro=524288]=`intro`,e[e.outro=1048576]=`outro`,e}({});var pp=class{bitflag=BigInt(0);constructor(){}union(e){this.bitflag|=BigInt(e)}inner(){return Number(this.bitflag)}};function mp(e){let t=new pp;return e.buildStart&&t.union(fp.buildStart),e.resolveId&&t.union(fp.resolveId),e.resolveDynamicImport&&t.union(fp.resolveDynamicImport),e.load&&t.union(fp.load),e.transform&&t.union(fp.transform),e.moduleParsed&&t.union(fp.moduleParsed),e.buildEnd&&t.union(fp.buildEnd),e.renderStart&&t.union(fp.renderStart),e.renderError&&t.union(fp.renderError),e.renderChunk&&t.union(fp.renderChunk),e.augmentChunkHash&&t.union(fp.augmentChunkHash),e.generateBundle&&t.union(fp.generateBundle),e.writeBundle&&t.union(fp.writeBundle),e.closeBundle&&t.union(fp.closeBundle),e.watchChange&&t.union(fp.watchChange),e.closeWatcher&&t.union(fp.closeWatcher),e.banner&&t.union(fp.banner),e.footer&&t.union(fp.footer),e.intro&&t.union(fp.intro),e.outro&&t.union(fp.outro),t}function hp(e,t,n,r,i,a,o,s){let c={plugin:e,options:t,outputOptions:n,pluginContextData:r,onLog:a,logLevel:o,watchMode:s,normalizedOutputPlugins:i},{plugin:l,meta:u}=Gf(c),{plugin:d,meta:f,filter:p}=qf(c),{plugin:m,meta:h}=Jf(c),{plugin:g,meta:_}=Kf(c),{plugin:v,meta:y,filter:b}=Yf(c),{plugin:x,meta:S}=Qf(c),{plugin:C,meta:w,filter:T}=Xf(c),{plugin:E,meta:D,filter:O}=ep(c),{plugin:k,meta:A}=tp(c),{plugin:ee,meta:j}=$f(c),{plugin:te,meta:ne}=np(c),{plugin:M,meta:N}=rp(c),{plugin:re,meta:P}=ip(c),{plugin:F,meta:I}=ap(c),{plugin:L,meta:R}=op(c),{plugin:z,meta:ie}=sp(c),{plugin:ae,meta:oe}=cp(c),{plugin:se,meta:ce}=lp(c),{plugin:le,meta:ue}=up(c),{plugin:B,meta:de}=dp(c),fe=mp(e).inner();return gp({name:e.name,buildStart:l,buildStartMeta:u,resolveId:d,resolveIdMeta:f,resolveIdFilter:p,resolveDynamicImport:m,resolveDynamicImportMeta:h,buildEnd:g,buildEndMeta:_,transform:v,transformMeta:y,transformFilter:b,moduleParsed:x,moduleParsedMeta:S,load:C,loadMeta:w,loadFilter:T,renderChunk:E,renderChunkMeta:D,renderChunkFilter:O,augmentChunkHash:k,augmentChunkHashMeta:A,renderStart:ee,renderStartMeta:j,renderError:te,renderErrorMeta:ne,generateBundle:M,generateBundleMeta:N,writeBundle:re,writeBundleMeta:P,closeBundle:F,closeBundleMeta:I,banner:L,bannerMeta:R,footer:z,footerMeta:ie,intro:ae,introMeta:oe,outro:se,outroMeta:ce,watchChange:le,watchChangeMeta:ue,closeWatcher:B,closeWatcherMeta:de,hookUsage:fe})}function gp(e){for(let t of[`buildStart`,`resolveId`,`resolveDynamicImport`,`buildEnd`,`transform`,`moduleParsed`,`load`,`renderChunk`,`augmentChunkHash`,`renderStart`,`renderError`,`generateBundle`,`writeBundle`,`closeBundle`,`banner`,`footer`,`intro`,`outro`,`watchChange`,`closeWatcher`]){let n=e[t];n&&(e[t]=async(...r)=>{try{return await n(...r)}catch(n){return cd(sd(n,e.name,{hook:t,id:t===`transform`?r[2]:void 0}))}})}return e}var _p=class extends Jd{inner;constructor(e,t){super(),this.onLog=t,this.inner=e}get shimMissingExports(){return this.inner.shimMissingExports}get input(){return this.inner.input}get cwd(){return this.inner.cwd}get platform(){return this.inner.platform}get context(){return this.inner.context}};K([G],_p.prototype,`shimMissingExports`,null),K([G],_p.prototype,`input`,null),K([G],_p.prototype,`cwd`,null),K([G],_p.prototype,`platform`,null),K([G],_p.prototype,`context`,null);var vp=class extends Jd{constructor(e,t,n){super(),this.inner=e,this.outputOptions=t,this.normalizedOutputPlugins=n}get dir(){return this.inner.dir??void 0}get entryFileNames(){return this.inner.entryFilenames||this.outputOptions.entryFileNames}get chunkFileNames(){return this.inner.chunkFilenames||this.outputOptions.chunkFileNames}get assetFileNames(){return this.inner.assetFilenames||this.outputOptions.assetFileNames}get format(){return this.inner.format}get exports(){return this.inner.exports}get sourcemap(){return this.inner.sourcemap}get sourcemapBaseUrl(){return this.inner.sourcemapBaseUrl??void 0}get cssEntryFileNames(){return this.inner.cssEntryFilenames||this.outputOptions.cssEntryFileNames}get cssChunkFileNames(){return this.inner.cssChunkFilenames||this.outputOptions.cssChunkFileNames}get shimMissingExports(){return this.inner.shimMissingExports}get name(){return this.inner.name??void 0}get file(){return this.inner.file??void 0}get codeSplitting(){return this.inner.codeSplitting}get inlineDynamicImports(){return!this.inner.codeSplitting}get dynamicImportInCjs(){return this.inner.dynamicImportInCjs}get externalLiveBindings(){return this.inner.externalLiveBindings}get banner(){return yp(this.outputOptions.banner)}get footer(){return yp(this.outputOptions.footer)}get postBanner(){return yp(this.outputOptions.postBanner)}get postFooter(){return yp(this.outputOptions.postFooter)}get intro(){return yp(this.outputOptions.intro)}get outro(){return yp(this.outputOptions.outro)}get esModule(){return this.inner.esModule}get extend(){return this.inner.extend}get globals(){return this.inner.globals||this.outputOptions.globals}get paths(){return this.outputOptions.paths}get hashCharacters(){return this.inner.hashCharacters}get sourcemapDebugIds(){return this.inner.sourcemapDebugIds}get sourcemapIgnoreList(){return this.outputOptions.sourcemapIgnoreList}get sourcemapPathTransform(){return this.outputOptions.sourcemapPathTransform}get minify(){let e=this.inner.minify;return typeof e==`object`&&e&&(delete e.codegen,delete e.module,delete e.sourcemap),e}get legalComments(){return this.inner.legalComments}get polyfillRequire(){return this.inner.polyfillRequire}get plugins(){return this.normalizedOutputPlugins}get preserveModules(){return this.inner.preserveModules}get preserveModulesRoot(){return this.inner.preserveModulesRoot}get virtualDirname(){return this.inner.virtualDirname}get topLevelVar(){return this.inner.topLevelVar??!1}get minifyInternalExports(){return this.inner.minifyInternalExports??!1}};K([G],vp.prototype,`dir`,null),K([G],vp.prototype,`entryFileNames`,null),K([G],vp.prototype,`chunkFileNames`,null),K([G],vp.prototype,`assetFileNames`,null),K([G],vp.prototype,`format`,null),K([G],vp.prototype,`exports`,null),K([G],vp.prototype,`sourcemap`,null),K([G],vp.prototype,`sourcemapBaseUrl`,null),K([G],vp.prototype,`cssEntryFileNames`,null),K([G],vp.prototype,`cssChunkFileNames`,null),K([G],vp.prototype,`shimMissingExports`,null),K([G],vp.prototype,`name`,null),K([G],vp.prototype,`file`,null),K([G],vp.prototype,`codeSplitting`,null),K([G],vp.prototype,`inlineDynamicImports`,null),K([G],vp.prototype,`dynamicImportInCjs`,null),K([G],vp.prototype,`externalLiveBindings`,null),K([G],vp.prototype,`banner`,null),K([G],vp.prototype,`footer`,null),K([G],vp.prototype,`postBanner`,null),K([G],vp.prototype,`postFooter`,null),K([G],vp.prototype,`intro`,null),K([G],vp.prototype,`outro`,null),K([G],vp.prototype,`esModule`,null),K([G],vp.prototype,`extend`,null),K([G],vp.prototype,`globals`,null),K([G],vp.prototype,`paths`,null),K([G],vp.prototype,`hashCharacters`,null),K([G],vp.prototype,`sourcemapDebugIds`,null),K([G],vp.prototype,`sourcemapIgnoreList`,null),K([G],vp.prototype,`sourcemapPathTransform`,null),K([G],vp.prototype,`minify`,null),K([G],vp.prototype,`legalComments`,null),K([G],vp.prototype,`polyfillRequire`,null),K([G],vp.prototype,`plugins`,null),K([G],vp.prototype,`preserveModules`,null),K([G],vp.prototype,`preserveModulesRoot`,null),K([G],vp.prototype,`virtualDirname`,null),K([G],vp.prototype,`topLevelVar`,null),K([G],vp.prototype,`minifyInternalExports`,null);function yp(e){return typeof e==`function`?e:()=>e||``}var bp=class{moduleOptionMap=new Map;resolveOptionsMap=new Map;loadModulePromiseMap=new Map;renderedChunkMeta=null;normalizedInputOptions=null;normalizedOutputOptions=null;constructor(e,t,n){this.onLog=e,this.outputOptions=t,this.normalizedOutputPlugins=n}updateModuleOption(e,t){let n=this.moduleOptionMap.get(e);if(n)t.moduleSideEffects!=null&&(n.moduleSideEffects=t.moduleSideEffects),t.meta!=null&&Object.assign(n.meta,t.meta),t.invalidate!=null&&(n.invalidate=t.invalidate);else return this.moduleOptionMap.set(e,t),t;return n}getModuleOption(e){let t=this.moduleOptionMap.get(e);if(!t){let t={moduleSideEffects:null,meta:{}};return this.moduleOptionMap.set(e,t),t}return t}getModuleInfo(e,t){let n=t.getModuleInfo(e);if(n){let t=xf(n,this.getModuleOption(e));return this.proxyModuleInfo(e,t)}return null}proxyModuleInfo(e,t){let n=t.moduleSideEffects;return Object.defineProperty(t,`moduleSideEffects`,{get(){return n},set:r=>{this.updateModuleOption(e,{moduleSideEffects:r,meta:t.meta,invalidate:!0}),n=r}}),t}getModuleIds(e){return e.getModuleIds().values()}saveResolveOptions(e){let t=this.resolveOptionsMap.size;return this.resolveOptionsMap.set(t,e),t}getSavedResolveOptions(e){return this.resolveOptionsMap.get(e)}removeSavedResolveOptions(e){this.resolveOptionsMap.delete(e)}setRenderChunkMeta(e){this.renderedChunkMeta=e}getRenderChunkMeta(){return this.renderedChunkMeta}getInputOptions(e){return this.normalizedInputOptions??=new _p(e,this.onLog),this.normalizedInputOptions}getOutputOptions(e){return this.normalizedOutputOptions??=new vp(e,this.outputOptions,this.normalizedOutputPlugins),this.normalizedOutputOptions}clear(){this.renderedChunkMeta=null,this.loadModulePromiseMap.clear()}};function xp(e){let t=e.transform,n=t?.define?Object.entries(t.define):void 0,r=t?.inject,i=t?.dropLabels,a;if(t){let{define:e,inject:n,dropLabels:r,...i}=t;Object.keys(i).length>0&&(i.jsx===!1&&(i.jsx=`disable`),a=i)}return{define:n,inject:r,dropLabels:i,oxcTransformOptions:a}}function Sp(e,t,n,r,i,a,o){let s=new bp(i,n,r),c=e.map(e=>{if(!(`_parallel`in e)){if(e instanceof ud)switch(e.name){case`builtin:vite-manifest`:return fd(e,s);default:return dd(e)}return hp(e,t,n,s,r,i,a,o)}}),l=xp(t);return{input:Ap(t.input),plugins:c,cwd:t.cwd??process.cwd(),external:Tp(t.external),resolve:Dp(t.resolve),platform:t.platform,shimMissingExports:t.shimMissingExports,logLevel:kp(a),onLog:async(e,t)=>i(e,t),treeshake:Mp(t.treeshake),moduleTypes:t.moduleTypes,define:l.define,inject:Op(l.inject),experimental:Ep(t.experimental),profilerNames:n.generatedCode?.profilerNames,transform:l.oxcTransformOptions,watch:jp(t.watch),dropLabels:l.dropLabels,keepNames:n.keepNames,checks:t.checks,deferSyncScanData:()=>{let e=[];return s.moduleOptionMap.forEach((t,n)=>{t.invalidate&&e.push({id:n,sideEffects:t.moduleSideEffects??void 0})}),e},makeAbsoluteExternalsRelative:Np(t.makeAbsoluteExternalsRelative),devtools:t.devtools,invalidateJsSideCache:s.clear.bind(s),preserveEntrySignatures:Pp(t.preserveEntrySignatures),optimization:t.optimization,context:t.context,tsconfig:t.resolve?.tsconfigFilename??t.tsconfig}}function Cp(e){if(e)return typeof e==`boolean`?e?{}:void 0:e}function wp(e){switch(e){case void 0:return;case`full`:return hf.BindingAttachDebugInfo.Full;case`simple`:return hf.BindingAttachDebugInfo.Simple;case`none`:return hf.BindingAttachDebugInfo.None}}function Tp(e){if(e)return typeof e==`function`?(t,n,r)=>t.startsWith(`\0`)?!1:e(t,n,r)??!1:lu(e)}function Ep(e){let t=hf.BindingChunkModuleOrderBy.ExecOrder;if(e?.chunkModulesOrder)switch(e.chunkModulesOrder){case`exec-order`:t=hf.BindingChunkModuleOrderBy.ExecOrder;break;case`module-id`:t=hf.BindingChunkModuleOrderBy.ModuleId;break;default:throw Error(`Unexpected chunkModulesOrder: ${e.chunkModulesOrder}`)}return{viteMode:e?.viteMode,resolveNewUrlToAsset:e?.resolveNewUrlToAsset,devMode:Cp(e?.devMode),attachDebugInfo:wp(e?.attachDebugInfo),chunkModulesOrder:t,chunkImportMap:e?.chunkImportMap,onDemandWrapping:e?.onDemandWrapping,incrementalBuild:e?.incrementalBuild,nativeMagicString:e?.nativeMagicString,chunkOptimization:e?.chunkOptimization}}function Dp(e){let t=typeof process==`object`&&!!process.versions?.pnp;if(e){let{alias:n,extensionAlias:r,...i}=e;return{alias:n?Object.entries(n).map(([e,t])=>({find:e,replacements:t===!1?[void 0]:lu(t)})):void 0,extensionAlias:r?Object.entries(r).map(([e,t])=>({target:e,replacements:t})):void 0,yarnPnp:t,...i}}else return{yarnPnp:t}}function Op(e){if(e)return Object.entries(e).map(([e,t])=>Array.isArray(t)?t[1]===`*`?{tagNamespace:!0,alias:e,from:t[0]}:{tagNamed:!0,alias:e,from:t[0],imported:t[1]}:{tagNamed:!0,imported:`default`,alias:e,from:t})}function kp(e){switch(e){case`silent`:return hf.BindingLogLevel.Silent;case`debug`:return hf.BindingLogLevel.Debug;case`warn`:return hf.BindingLogLevel.Warn;case`info`:return hf.BindingLogLevel.Info;default:throw Error(`Unexpected log level: ${e}`)}}function Ap(e){return e===void 0?[]:typeof e==`string`?[{import:e}]:Array.isArray(e)?e.map(e=>({import:e})):Object.entries(e).map(([e,t])=>({name:e,import:t}))}function jp(e){if(e)return{buildDelay:e.buildDelay,skipWrite:e.skipWrite,include:pd(e.include),exclude:pd(e.exclude),onInvalidate:(...t)=>e.onInvalidate?.(...t)}}function Mp(e){if(e===!1)return;if(e===!0||e===void 0)return{moduleSideEffects:!0};let t={moduleSideEffects:!0,annotations:e.annotations,manualPureFunctions:e.manualPureFunctions,unknownGlobalSideEffects:e.unknownGlobalSideEffects,invalidImportSideEffects:e.invalidImportSideEffects,commonjs:e.commonjs};switch(e.propertyReadSideEffects){case`always`:t.propertyReadSideEffects=hf.BindingPropertyReadSideEffects.Always;break;case!1:t.propertyReadSideEffects=hf.BindingPropertyReadSideEffects.False;break;default:}switch(e.propertyWriteSideEffects){case`always`:t.propertyWriteSideEffects=hf.BindingPropertyWriteSideEffects.Always;break;case!1:t.propertyWriteSideEffects=hf.BindingPropertyWriteSideEffects.False;break;default:}return e.moduleSideEffects===void 0?t.moduleSideEffects=!0:e.moduleSideEffects===`no-external`?t.moduleSideEffects=[{external:!0,sideEffects:!1},{external:!1,sideEffects:!0}]:t.moduleSideEffects=e.moduleSideEffects,t}function Np(e){if(e===`ifRelativeSource`)return{type:`IfRelativeSource`};if(typeof e==`boolean`)return{type:`Bool`,field0:e}}function Pp(e){if(e!=null)return typeof e==`string`?{type:`String`,field0:e}:{type:`Bool`,field0:e}}function Fp(e,t,n,r){let i=Hd[n],a=(n,o,s=new Set)=>{if(!(Hd[n]<i)){for(let t of Zp(`onLog`,e)){if(s.has(t))continue;let{onLog:e}=t;if(e){let c=e=>Hd[e]<i?()=>{}:n=>a(e,Ud(n),new Set(s).add(t));if((`handler`in e?e.handler:e).call({debug:c(Vd),error:e=>cd(Ud(e)),info:c(Bd),meta:{rollupVersion:`4.23.0`,rolldownVersion:Rd,watchMode:r},warn:c(zd),pluginName:t.name||`unknown`},n,o)===!1)return}}t(n,o)}};return a}const Ip=(e,t,n=zp)=>{let{onwarn:r,onLog:i}=e,a=Lp(n,r);if(i){let e=Hd[t];return(t,n)=>i(t,Rp(n),(t,n)=>{if(t===`error`)return cd(Ud(n));Hd[t]>=e&&a(t,Ud(n))})}return a},Lp=(e,t)=>t?(n,r)=>{n===zd?t(Rp(r),t=>e(zd,Ud(t))):e(n,r)}:e,Rp=e=>(Object.defineProperty(e,`toString`,{value:()=>Bp(e),writable:!0}),e),zp=(e,t)=>{let n=Bp(t);switch(e){case zd:return console.warn(n);case Vd:return console.debug(n);default:return console.info(n)}},Bp=e=>{let t=``;return e.plugin&&(t+=`(${e.plugin} plugin) `),e.loc&&(t+=`${Vp(e.loc.file)} (${e.loc.line}:${e.loc.column}) `),t+e.message};function Vp(e){return i.isAbsolute(e)?i.relative(i.resolve(),e):e}const Hp=[`options`,`buildStart`,`resolveId`,`load`,`transform`,`moduleParsed`,`buildEnd`,`onLog`,`resolveDynamicImport`,`closeBundle`,`closeWatcher`,`watchChange`],Up=[`augmentChunkHash`,`outputOptions`,`renderChunk`,`renderStart`,`renderError`,`writeBundle`,`generateBundle`],Wp=[...Hp,...Up,`footer`,`banner`,`intro`,`outro`];Wp[0],Wp[0],Wp[1],Wp[1],Wp[2],Wp[2],Wp[3],Wp[3],Wp[4],Wp[4],Wp[5],Wp[5],Wp[6],Wp[6],Wp[7],Wp[7],Wp[8],Wp[8],Wp[9],Wp[9],Wp[10],Wp[10],Wp[11],Wp[11],Wp[12],Wp[12],Wp[13],Wp[13],Wp[14],Wp[14],Wp[15],Wp[15],Wp[16],Wp[16],Wp[17],Wp[17],Wp[18],Wp[18],Wp[19],Wp[19],Wp[20],Wp[20],Wp[21],Wp[21],Wp[22],Wp[22];async function Gp(e){do e=(await Promise.all(e)).flat(1/0);while(e.some(e=>e?.then));return e}const Kp=async e=>(await Gp([e])).filter(Boolean);function qp(e,t){for(let n of e)for(let e of Hp)e in n&&(delete n[e],t(zd,id(n.name,e)));return e}function Jp(e,t){for(let[n,r]of e.entries())`_parallel`in r||r instanceof ud||(r.name||=`${t}${n+1}`);return e}var Yp=class{static async callOptionsHook(e,t=!1){let n=e.logLevel||Bd,r=Zp(`options`,Xp(await Kp(e.plugins))),i=Fp(r,Ip(e,n),n,t);for(let a of r){let r=a.name||`unknown`,o=a.options;if(o){let{handler:a}=Gd(o),s=await a.call(new Kd(i,n,r,t,`onLog`),e);s&&(e=s)}}return e}static callOutputOptionsHook(e,t,n,r,i){let a=Zp(`outputOptions`,Xp(e));for(let e of a){let a=e.name||`unknown`,o=e.outputOptions;if(o){let{handler:e}=Gd(o),s=e.call(new Kd(n,r,a,i),t);s&&(t=s)}}return t}};function Xp(e){return e.filter(e=>{if(e&&!(`_parallel`in e)&&!(e instanceof ud))return e})}function Zp(e,t){let n=[],r=[],i=[];for(let a of t){let t=a[e];if(t){if(typeof t==`object`){if(t.order===`pre`){n.push(a);continue}if(t.order===`post`){i.push(a);continue}}r.push(a)}}return[...n,...r,...i]}function Qp(e){return{lang:e?.lang??void 0,message:e?.message,abortEarly:e?.abortEarly??void 0,abortPipeEarly:e?.abortPipeEarly??void 0}}function $p(e){return(void 0)?.get(e)}function em(e){return(void 0)?.get(e)}function tm(e,t){return(void 0)?.get(e)?.get(t)}function nm(e){let t=typeof e;return t===`string`?`"${e}"`:t===`number`||t===`bigint`||t===`boolean`?`${e}`:t===`object`||t===`function`?(e&&Object.getPrototypeOf(e)?.constructor?.name)??`null`:t}function rm(e,t,n,r,i){let a=i&&`input`in i?i.input:n.value,o=i?.expected??e.expects??null,s=i?.received??nm(a),c={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:`R`}eceived ${s}`,requirement:e.requirement,path:i?.path,issues:i?.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},l=e.kind===`schema`,u=i?.message??e.message??tm(e.reference,c.lang)??(l?em(c.lang):null)??r.message??$p(c.lang);u!==void 0&&(c.message=typeof u==`function`?u(c):u),l&&(n.typed=!1),n.issues?n.issues.push(c):n.issues=[c]}function im(e){return{version:1,vendor:`valibot`,validate(t){return e[`~run`]({value:t},Qp())}}}function am(e,t){return Object.hasOwn(e,t)&&t!==`__proto__`&&t!==`prototype`&&t!==`constructor`}function om(e,t){let n=[...new Set(e)];return n.length>1?`(${n.join(` ${t} `)})`:n[0]??`never`}var sm=class extends Error{constructor(e){super(e[0].message),this.name=`ValiError`,this.issues=e}};function cm(e){return{kind:`transformation`,type:`args`,reference:cm,async:!1,schema:e,"~run"(e,t){let n=e.value;return e.value=(...e)=>{let r=this.schema[`~run`]({value:e},t);if(r.issues)throw new sm(r.issues);return n(...r.value)},e}}}function lm(){return{kind:`transformation`,type:`await`,reference:lm,async:!0,async"~run"(e){return e.value=await e.value,e}}}function q(e){return{kind:`metadata`,type:`description`,reference:q,description:e}}function um(e){return{kind:`transformation`,type:`returns`,reference:um,async:!1,schema:e,"~run"(e,t){let n=e.value;return e.value=(...e)=>{let r=this.schema[`~run`]({value:n(...e)},t);if(r.issues)throw new sm(r.issues);return r.value},e}}}function dm(e){return{kind:`transformation`,type:`returns`,reference:dm,async:!1,schema:e,"~run"(e,t){let n=e.value;return e.value=async(...e)=>{let r=await this.schema[`~run`]({value:await n(...e)},t);if(r.issues)throw new sm(r.issues);return r.value},e}}}function fm(e,t,n){return typeof e.fallback==`function`?e.fallback(t,n):e.fallback}function pm(e,t,n){return typeof e.default==`function`?e.default(t,n):e.default}function mm(){return{kind:`schema`,type:`any`,reference:mm,expects:`any`,async:!1,get"~standard"(){return im(this)},"~run"(e){return e.typed=!0,e}}}function hm(e,t){return{kind:`schema`,type:`array`,reference:hm,expects:`Array`,async:!1,item:e,message:t,get"~standard"(){return im(this)},"~run"(e,t){let n=e.value;if(Array.isArray(n)){e.typed=!0,e.value=[];for(let r=0;r<n.length;r++){let i=n[r],a=this.item[`~run`]({value:i},t);if(a.issues){let o={type:`array`,origin:`value`,input:n,key:r,value:i};for(let t of a.issues)t.path?t.path.unshift(o):t.path=[o],e.issues?.push(t);if(e.issues||=a.issues,t.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}}else rm(this,`type`,e,t);return e}}}function J(e){return{kind:`schema`,type:`boolean`,reference:J,expects:`boolean`,async:!1,message:e,get"~standard"(){return im(this)},"~run"(e,t){return typeof e.value==`boolean`?e.typed=!0:rm(this,`type`,e,t),e}}}function gm(e,t){return{kind:`schema`,type:`custom`,reference:gm,expects:`unknown`,async:!1,check:e,message:t,get"~standard"(){return im(this)},"~run"(e,t){return this.check(e.value)?e.typed=!0:rm(this,`type`,e,t),e}}}function _m(e){return{kind:`schema`,type:`function`,reference:_m,expects:`Function`,async:!1,message:e,get"~standard"(){return im(this)},"~run"(e,t){return typeof e.value==`function`?e.typed=!0:rm(this,`type`,e,t),e}}}function vm(e,t){return{kind:`schema`,type:`instance`,reference:vm,expects:e.name,async:!1,class:e,message:t,get"~standard"(){return im(this)},"~run"(e,t){return e.value instanceof this.class?e.typed=!0:rm(this,`type`,e,t),e}}}function Y(e,t){return{kind:`schema`,type:`literal`,reference:Y,expects:nm(e),async:!1,literal:e,message:t,get"~standard"(){return im(this)},"~run"(e,t){return e.value===this.literal?e.typed=!0:rm(this,`type`,e,t),e}}}function ym(e,t){return{kind:`schema`,type:`loose_object`,reference:ym,expects:`Object`,async:!1,entries:e,message:t,get"~standard"(){return im(this)},"~run"(e,t){let n=e.value;if(n&&typeof n==`object`){for(let r in e.typed=!0,e.value={},this.entries){let i=this.entries[r];if(r in n||(i.type===`exact_optional`||i.type===`optional`||i.type===`nullish`)&&i.default!==void 0){let a=r in n?n[r]:pm(i),o=i[`~run`]({value:a},t);if(o.issues){let i={type:`object`,origin:`value`,input:n,key:r,value:a};for(let t of o.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||=o.issues,t.abortEarly){e.typed=!1;break}}o.typed||(e.typed=!1),e.value[r]=o.value}else if(i.fallback!==void 0)e.value[r]=fm(i);else if(i.type!==`exact_optional`&&i.type!==`optional`&&i.type!==`nullish`&&(rm(this,`key`,e,t,{input:void 0,expected:`"${r}"`,path:[{type:`object`,origin:`key`,input:n,key:r,value:n[r]}]}),t.abortEarly))break}if(!e.issues||!t.abortEarly)for(let t in n)am(n,t)&&!(t in this.entries)&&(e.value[t]=n[t])}else rm(this,`type`,e,t);return e}}}function bm(e){return{kind:`schema`,type:`never`,reference:bm,expects:`never`,async:!1,message:e,get"~standard"(){return im(this)},"~run"(e,t){return rm(this,`type`,e,t),e}}}function xm(e,t){return{kind:`schema`,type:`nullish`,reference:xm,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return im(this)},"~run"(e,t){return(e.value===null||e.value===void 0)&&(this.default!==void 0&&(e.value=pm(this,e,t)),e.value===null||e.value===void 0)?(e.typed=!0,e):this.wrapped[`~run`](e,t)}}}function Sm(e){return{kind:`schema`,type:`number`,reference:Sm,expects:`number`,async:!1,message:e,get"~standard"(){return im(this)},"~run"(e,t){return typeof e.value==`number`&&!isNaN(e.value)?e.typed=!0:rm(this,`type`,e,t),e}}}function Cm(e,t){return{kind:`schema`,type:`object`,reference:Cm,expects:`Object`,async:!1,entries:e,message:t,get"~standard"(){return im(this)},"~run"(e,t){let n=e.value;if(n&&typeof n==`object`)for(let r in e.typed=!0,e.value={},this.entries){let i=this.entries[r];if(r in n||(i.type===`exact_optional`||i.type===`optional`||i.type===`nullish`)&&i.default!==void 0){let a=r in n?n[r]:pm(i),o=i[`~run`]({value:a},t);if(o.issues){let i={type:`object`,origin:`value`,input:n,key:r,value:a};for(let t of o.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||=o.issues,t.abortEarly){e.typed=!1;break}}o.typed||(e.typed=!1),e.value[r]=o.value}else if(i.fallback!==void 0)e.value[r]=fm(i);else if(i.type!==`exact_optional`&&i.type!==`optional`&&i.type!==`nullish`&&(rm(this,`key`,e,t,{input:void 0,expected:`"${r}"`,path:[{type:`object`,origin:`key`,input:n,key:r,value:n[r]}]}),t.abortEarly))break}else rm(this,`type`,e,t);return e}}}function X(e,t){return{kind:`schema`,type:`optional`,reference:X,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return im(this)},"~run"(e,t){return e.value===void 0&&(this.default!==void 0&&(e.value=pm(this,e,t)),e.value===void 0)?(e.typed=!0,e):this.wrapped[`~run`](e,t)}}}function wm(e){return{kind:`schema`,type:`promise`,reference:wm,expects:`Promise`,async:!1,message:e,get"~standard"(){return im(this)},"~run"(e,t){return e.value instanceof Promise?e.typed=!0:rm(this,`type`,e,t),e}}}function Tm(e,t,n){return{kind:`schema`,type:`record`,reference:Tm,expects:`Object`,async:!1,key:e,value:t,message:n,get"~standard"(){return im(this)},"~run"(e,t){let n=e.value;if(n&&typeof n==`object`){for(let r in e.typed=!0,e.value={},n)if(am(n,r)){let i=n[r],a=this.key[`~run`]({value:r},t);if(a.issues){let o={type:`object`,origin:`key`,input:n,key:r,value:i};for(let t of a.issues)t.path=[o],e.issues?.push(t);if(e.issues||=a.issues,t.abortEarly){e.typed=!1;break}}let o=this.value[`~run`]({value:i},t);if(o.issues){let a={type:`object`,origin:`value`,input:n,key:r,value:i};for(let t of o.issues)t.path?t.path.unshift(a):t.path=[a],e.issues?.push(t);if(e.issues||=o.issues,t.abortEarly){e.typed=!1;break}}(!a.typed||!o.typed)&&(e.typed=!1),a.typed&&(e.value[a.value]=o.value)}}else rm(this,`type`,e,t);return e}}}function Em(e,t){return{kind:`schema`,type:`strict_object`,reference:Em,expects:`Object`,async:!1,entries:e,message:t,get"~standard"(){return im(this)},"~run"(e,t){let n=e.value;if(n&&typeof n==`object`){for(let r in e.typed=!0,e.value={},this.entries){let i=this.entries[r];if(r in n||(i.type===`exact_optional`||i.type===`optional`||i.type===`nullish`)&&i.default!==void 0){let a=r in n?n[r]:pm(i),o=i[`~run`]({value:a},t);if(o.issues){let i={type:`object`,origin:`value`,input:n,key:r,value:a};for(let t of o.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||=o.issues,t.abortEarly){e.typed=!1;break}}o.typed||(e.typed=!1),e.value[r]=o.value}else if(i.fallback!==void 0)e.value[r]=fm(i);else if(i.type!==`exact_optional`&&i.type!==`optional`&&i.type!==`nullish`&&(rm(this,`key`,e,t,{input:void 0,expected:`"${r}"`,path:[{type:`object`,origin:`key`,input:n,key:r,value:n[r]}]}),t.abortEarly))break}if(!e.issues||!t.abortEarly){for(let r in n)if(!(r in this.entries)){rm(this,`key`,e,t,{input:r,expected:`never`,path:[{type:`object`,origin:`key`,input:n,key:r,value:n[r]}]});break}}}else rm(this,`type`,e,t);return e}}}function Z(e){return{kind:`schema`,type:`string`,reference:Z,expects:`string`,async:!1,message:e,get"~standard"(){return im(this)},"~run"(e,t){return typeof e.value==`string`?e.typed=!0:rm(this,`type`,e,t),e}}}function Dm(e,t){return{kind:`schema`,type:`tuple`,reference:Dm,expects:`Array`,async:!1,items:e,message:t,get"~standard"(){return im(this)},"~run"(e,t){let n=e.value;if(Array.isArray(n)){e.typed=!0,e.value=[];for(let r=0;r<this.items.length;r++){let i=n[r],a=this.items[r][`~run`]({value:i},t);if(a.issues){let o={type:`array`,origin:`value`,input:n,key:r,value:i};for(let t of a.issues)t.path?t.path.unshift(o):t.path=[o],e.issues?.push(t);if(e.issues||=a.issues,t.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}}else rm(this,`type`,e,t);return e}}}function Om(e){return{kind:`schema`,type:`undefined`,reference:Om,expects:`undefined`,async:!1,message:e,get"~standard"(){return im(this)},"~run"(e,t){return e.value===void 0?e.typed=!0:rm(this,`type`,e,t),e}}}function km(e){let t;if(e)for(let n of e)t?t.push(...n.issues):t=n.issues;return t}function Q(e,t){return{kind:`schema`,type:`union`,reference:Q,expects:om(e.map(e=>e.expects),`|`),async:!1,options:e,message:t,get"~standard"(){return im(this)},"~run"(e,t){let n,r,i;for(let a of this.options){let o=a[`~run`]({value:e.value},t);if(o.typed)if(o.issues)r?r.push(o):r=[o];else{n=o;break}else i?i.push(o):i=[o]}if(n)return n;if(r){if(r.length===1)return r[0];rm(this,`type`,e,t,{issues:km(r)}),e.typed=!0}else if(i?.length===1)return i[0];else rm(this,`type`,e,t,{issues:km(i)});return e}}}function Am(e,t){return{kind:`schema`,type:`union`,reference:Am,expects:om(e.map(e=>e.expects),`|`),async:!0,options:e,message:t,get"~standard"(){return im(this)},async"~run"(e,t){let n,r,i;for(let a of this.options){let o=await a[`~run`]({value:e.value},t);if(o.typed)if(o.issues)r?r.push(o):r=[o];else{n=o;break}else i?i.push(o):i=[o]}if(n)return n;if(r){if(r.length===1)return r[0];rm(this,`type`,e,t,{issues:km(r)}),e.typed=!0}else if(i?.length===1)return i[0];else rm(this,`type`,e,t,{issues:km(i)});return e}}}function jm(e){return{kind:`schema`,type:`void`,reference:jm,expects:`void`,async:!1,message:e,get"~standard"(){return im(this)},"~run"(e,t){return e.value===void 0?e.typed=!0:rm(this,`type`,e,t),e}}}function Mm(e,t){let n={...e.entries};for(let e of t)delete n[e];return{...e,entries:n,get"~standard"(){return im(this)}}}function Nm(e,t){let n={};for(let r in e.entries)n[r]=!t||t.includes(r)?X(e.entries[r]):e.entries[r];return{...e,entries:n,get"~standard"(){return im(this)}}}function $(...e){return{...e[0],pipe:e,get"~standard"(){return im(this)},"~run"(t,n){for(let r of e)if(r.kind!==`metadata`){if(t.issues&&(r.kind===`schema`||r.kind===`transformation`)){t.typed=!1;break}(!t.issues||!n.abortEarly&&!n.abortPipeEarly)&&(t=r[`~run`](t,n))}return t}}}function Pm(...e){return{...e[0],pipe:e,async:!0,get"~standard"(){return im(this)},async"~run"(t,n){for(let r of e)if(r.kind!==`metadata`){if(t.issues&&(r.kind===`schema`||r.kind===`transformation`)){t.typed=!1;break}(!t.issues||!n.abortEarly&&!n.abortPipeEarly)&&(t=await r[`~run`](t,n))}return t}}}function Fm(e,t,n){let r=e[`~run`]({value:t},Qp(n));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}function Im(...e){return _(...e)}const Lm=Q([Z(),vm(RegExp)]);function Rm(){return _m()}const zm=Q([Y(`debug`),Y(`info`),Y(`warn`)]),Bm=Q([zm,Y(`silent`)]),Vm=Q([zm,Y(`error`)]),Hm=mm(),Um=Q([Hm,Z()]),Wm=Q([Z(),hm(Z()),Tm(Z(),Z())]),Gm=$(Rm(),cm(Dm([Z(),X(Z()),J()])),um(xm(J()))),Km=Q([Lm,hm(Lm),Gm]),qm=Tm(Z(),Q([Y(`asset`),Y(`base64`),Y(`binary`),Y(`css`),Y(`dataurl`),Y(`empty`),Y(`js`),Y(`json`),Y(`jsx`),Y(`text`),Y(`ts`),Y(`tsx`)])),Jm=Cm({assumptions:X(Cm({ignoreFunctionLength:X(J()),noDocumentAll:X(J()),objectRestNoSymbols:X(J()),pureGetters:X(J()),setPublicClassFields:X(J())})),typescript:X(Cm({jsxPragma:X(Z()),jsxPragmaFrag:X(Z()),onlyRemoveTypeImports:X(J()),allowNamespaces:X(J()),allowDeclareFields:X(J()),declaration:X(Cm({stripInternal:X(J()),sourcemap:X(J())})),rewriteImportExtensions:X(Q([Y(`rewrite`),Y(`remove`),J()]))})),helpers:X(Cm({mode:X(Q([Y(`Runtime`),Y(`External`)]))})),decorators:X(Cm({legacy:X(J()),emitDecoratorMetadata:X(J())})),jsx:X(Q([Y(!1),Y(`preserve`),Y(`react`),Y(`react-jsx`),Em({runtime:$(X(Q([Y(`classic`),Y(`automatic`)])),q(`Which runtime to use`)),development:$(X(J()),q(`Development specific information`)),throwIfNamespace:$(X(J()),q(`Toggles whether to throw an error when a tag name uses an XML namespace`)),importSource:$(X(Z()),q(`Import the factory of element and fragment if mode is classic`)),pragma:$(X(Z()),q(`Jsx element transformation`)),pragmaFrag:$(X(Z()),q(`Jsx fragment transformation`)),refresh:$(X(J()),q(`Enable react fast refresh`))})])),target:$(X(Q([Z(),hm(Z())])),q(`The JavaScript target environment`)),define:$(X(Tm(Z(),Z())),q(`Define global variables (syntax: key=value,key2=value2)`)),inject:$(X(Tm(Z(),Q([Z(),Dm([Z(),Z()])]))),q(`Inject import statements on demand`)),dropLabels:$(X(hm(Z())),q(`Remove labeled statements with these label names`))}),Ym=Em({chokidar:X(bm(`The "watch.chokidar" option is deprecated, please use "watch.notify" instead of it`)),exclude:X(Q([Lm,hm(Lm)])),include:X(Q([Lm,hm(Lm)])),notify:$(X(Em({compareContents:X(J()),pollInterval:X(Sm())})),q(`Notify options`)),skipWrite:$(X(J()),q(`Skip the bundle.write() step`)),buildDelay:$(X(Sm()),q(`Throttle watch rebuilds`)),clearScreen:$(X(J()),q(`Whether to clear the screen when a rebuild is triggered`)),onInvalidate:$(X($(_m(),cm(Dm([Z()])))),q(`An optional function that will be called immediately every time a module changes that is part of the build.`))}),Xm=Em({circularDependency:$(X(J()),q(`Whether to emit warnings when detecting circular dependency`)),eval:$(X(J()),q("Whether to emit warnings when detecting uses of direct `eval`s")),missingGlobalName:$(X(J()),q("Whether to emit warnings when the `output.globals` option is missing when needed")),missingNameOptionForIifeExport:$(X(J()),q("Whether to emit warnings when the `output.name` option is missing when needed")),mixedExports:$(X(J()),q(`Whether to emit warnings when the way to export values is ambiguous`)),unresolvedEntry:$(X(J()),q(`Whether to emit warnings when an entrypoint cannot be resolved`)),unresolvedImport:$(X(J()),q(`Whether to emit warnings when an import cannot be resolved`)),filenameConflict:$(X(J()),q(`Whether to emit warnings when files generated have the same name with different contents`)),commonJsVariableInEsm:$(X(J()),q(`Whether to emit warnings when a CommonJS variable is used in an ES module`)),importIsUndefined:$(X(J()),q(`Whether to emit warnings when an imported variable is not exported`)),emptyImportMeta:$(X(J()),q("Whether to emit warnings when `import.meta` is not supported with the output format and is replaced with an empty object (`{}`)")),toleratedTransform:$(X(J()),q(`Whether to emit warnings when detecting tolerated transform`)),cannotCallNamespace:$(X(J()),q(`Whether to emit warnings when a namespace is called as a function`)),configurationFieldConflict:$(X(J()),q(`Whether to emit warnings when a config value is overridden by another config value with a higher priority`)),preferBuiltinFeature:$(X(J()),q(`Whether to emit warnings when a plugin that is covered by a built-in feature is used`)),couldNotCleanDirectory:$(X(J()),q(`Whether to emit warnings when Rolldown could not clean the output directory`)),pluginTimings:$(X(J()),q(`Whether to emit warnings when plugins take significant time during the build process`))}),Zm=Em({compress:X(Q([J(),Em({target:X(Q([Y(`esnext`),Y(`es2015`),Y(`es2016`),Y(`es2017`),Y(`es2018`),Y(`es2019`),Y(`es2020`),Y(`es2021`),Y(`es2022`),Y(`es2023`),Y(`es2024`)])),dropConsole:X(J()),dropDebugger:X(J()),keepNames:X(Em({function:J(),class:J()})),unused:X(Q([J(),Y(`keep_assign`)]))})])),mangle:X(Q([J(),Em({toplevel:X(J()),keepNames:X(Q([J(),Em({function:J(),class:J()})])),debug:X(J())})])),codegen:X(Q([J(),Em({removeWhitespace:X(J())})]))}),Qm=Em({alias:X(Tm(Z(),Q([Y(!1),Z(),hm(Z())]))),aliasFields:X(hm(hm(Z()))),conditionNames:X(hm(Z())),extensionAlias:X(Tm(Z(),hm(Z()))),exportsFields:X(hm(hm(Z()))),extensions:X(hm(Z())),mainFields:X(hm(Z())),mainFiles:X(hm(Z())),modules:X(hm(Z())),symlinks:X(J()),yarnPnp:X(J())}),$m=Q([J(),ym({annotations:X(J()),manualPureFunctions:X(hm(Z())),unknownGlobalSideEffects:X(J()),invalidImportSideEffects:X(J()),commonjs:X(J()),propertyReadSideEffects:X(Q([Y(!1),Y(`always`)])),propertyWriteSideEffects:X(Q([Y(!1),Y(`always`)]))})]),eh=Em({inlineConst:$(X(Q([J(),Em({mode:X(Q([Y(`all`),Y(`smart`)])),pass:X(Sm())})])),q(`Enable crossmodule constant inlining`)),pifeForModuleWrappers:$(X(J()),q(`Use PIFE pattern for module wrappers`))}),th=$(Rm(),cm(Dm([Vm,Um]))),nh=$(Rm(),cm(Dm([zm,Hm,th]))),rh=$(Rm(),cm(Dm([Hm,$(Rm(),cm(Dm([Q([Um,$(Rm(),um(Um))])])))]))),ih=Q([J(),Em({port:X(Sm()),host:X(Z()),implement:X(Z()),lazy:X(J())})]),ah=Em({input:X(Wm),plugins:X(gm(()=>!0)),external:X(Km),makeAbsoluteExternalsRelative:X(Q([J(),Y(`ifRelativeSource`)])),resolve:X(Qm),cwd:$(X(Z()),q(`Current working directory`)),platform:$(X(Q([Y(`browser`),Y(`neutral`),Y(`node`)])),q(`Platform for which the code should be generated (node, ${Im(`underline`,`browser`)}, neutral)`)),shimMissingExports:$(X(J()),q(`Create shim variables for missing exports`)),treeshake:X($m),optimization:X(eh),logLevel:$(X(Bm),q(`Log level (${Im(`dim`,`silent`)}, ${Im([`underline`,`gray`],`info`)}, debug, ${Im(`yellow`,`warn`)})`)),onLog:X(nh),onwarn:X(rh),moduleTypes:$(X(qm),q(`Module types for customized extensions`)),experimental:X(Em({enableComposingJsPlugins:X(J()),viteMode:X(J()),resolveNewUrlToAsset:X(J()),strictExecutionOrder:X(J()),onDemandWrapping:X(J()),incrementalBuild:X(J()),devMode:X(ih),attachDebugInfo:X(Q([Y(`none`),Y(`simple`),Y(`full`)])),chunkModulesOrder:X(Q([Y(`module-id`),Y(`exec-order`)])),chunkImportMap:X(Q([J(),Cm({baseUrl:X(Z()),fileName:X(Z())})])),nativeMagicString:X(J()),chunkOptimization:X(J())})),transform:X(Jm),watch:X(Q([Ym,Y(!1)])),checks:X(Xm),devtools:$(X(Cm({sessionId:$(X(Z()),q(`Used to name the build.`))})),q(`Enable debug mode. Emit debug information to disk. This might slow down the build process significantly.`)),preserveEntrySignatures:$(X(Q([Y(`strict`),Y(`allow-extension`),Y(`exports-only`),Y(!1)]))),tsconfig:$(X(Q([J(),Z()])),q(`Path to the tsconfig.json file.`))}),oh=Em({input:$(X(hm(Z())),q(`Entry file`)),external:$(X(hm(Z())),q("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),treeshake:$(X(J()),q(`enable treeshaking`)),makeAbsoluteExternalsRelative:$(X(J()),q(`Prevent normalization of external imports`)),preserveEntrySignatures:$(X(Y(!1)),q(`Avoid facade chunks for entry points`)),context:$(X(Z()),q("The entity top-level `this` represents."))}),sh=Mm(Em({...ah.entries,...oh.entries}),[`plugins`,`onwarn`,`onLog`,`resolve`,`experimental`,`watch`]),ch=Q([Y(`es`),Y(`cjs`),Y(`esm`),Y(`module`),Y(`commonjs`),Y(`iife`),Y(`umd`)]),lh=$(Rm(),cm(Dm([gm(()=>!0)])),dm(Am([Z(),Pm(wm(),lm(),Z())]))),uh=$(Rm(),cm(Dm([gm(()=>!0)])),um(Z())),dh=Q([Z(),uh]),fh=$(Rm(),cm(Dm([gm(()=>!0)])),um(Z())),ph=Q([Z(),fh]),mh=$(Rm(),cm(Dm([Z()])),um(Z())),hh=Q([J(),mh]),gh=$(Rm(),cm(Dm([Z()])),um(Z())),_h=$(Rm(),cm(Dm([Z()])),um(Z())),vh=$(Rm(),cm(Dm([Z(),Cm({})])),um(xm(Z()))),yh=$(Rm(),cm(Dm([Z(),Cm({})])),um(xm(Z()))),bh=$(Rm(),cm(Dm([Z()])),um(Q([J(),jm(),Om()]))),xh=Em({includeDependenciesRecursively:X(J()),minSize:X(Sm()),maxSize:X(Sm()),minModuleSize:X(Sm()),maxModuleSize:X(Sm()),minShareCount:X(Sm()),groups:X(hm(Em({name:Q([Z(),yh]),test:X(Q([Lm,bh])),priority:X(Sm()),minSize:X(Sm()),minShareCount:X(Sm()),maxSize:X(Sm()),minModuleSize:X(Sm()),maxModuleSize:X(Sm())})))}),Sh=Em({symbols:$(X(J()),q(`Whether to use Symbol.toStringTag for namespace objects`)),preset:Q([Y(`es5`),Y(`es2015`)]),profilerNames:$(X(J()),q(`Whether to add readable names to internal variables for profiling purposes`))}),Ch=Em({dir:$(X(Z()),q("Output directory, defaults to `dist` if `file` is not set")),file:$(X(Z()),q(`Single output file`)),exports:$(X(Q([Y(`auto`),Y(`named`),Y(`default`),Y(`none`)])),q(`Specify a export mode (${Im(`underline`,`auto`)}, named, default, none)`)),hashCharacters:$(X(Q([Y(`base64`),Y(`base36`),Y(`hex`)])),q(`Use the specified character set for file hashes`)),format:$(X(ch),q(`Output format of the generated bundle (supports ${Im(`underline`,`esm`)}, cjs, and iife)`)),sourcemap:$(X(Q([J(),Y(`inline`),Y(`hidden`)])),q(`Generate sourcemap (\`-s inline\` for inline, or ${Im(`bold`,"pass the `-s` on the last argument if you want to generate `.map` file")})`)),sourcemapBaseUrl:$(X(Z()),q(`Base URL used to prefix sourcemap paths`)),sourcemapDebugIds:$(X(J()),q(`Inject sourcemap debug IDs`)),sourcemapIgnoreList:X(Q([J(),gm(()=>!0),Lm])),sourcemapPathTransform:X(gm(()=>!0)),banner:X(Q([Z(),lh])),footer:X(Q([Z(),lh])),postBanner:X(Q([Z(),lh])),postFooter:X(Q([Z(),lh])),intro:X(Q([Z(),lh])),outro:X(Q([Z(),lh])),extend:$(X(J()),q(`Extend global variable defined by name in IIFE / UMD formats`)),esModule:X(Q([J(),Y(`if-default-prop`)])),assetFileNames:X(ph),entryFileNames:X(dh),chunkFileNames:X(dh),cssEntryFileNames:X(dh),cssChunkFileNames:X(dh),sanitizeFileName:X(hh),minify:$(X(Q([J(),Y(`dce-only`),Zm])),q(`Minify the bundled file`)),name:$(X(Z()),q(`Name for UMD / IIFE format outputs`)),globals:$(X(Q([Tm(Z(),Z()),gh])),q("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),paths:$(X(Q([Tm(Z(),Z()),_h])),q(`Maps external module IDs to paths`)),generatedCode:$(X(Nm(Sh)),q(`Generated code options`)),externalLiveBindings:$(X(J()),q(`external live bindings`)),inlineDynamicImports:$(X(J()),q(`Inline dynamic imports`)),dynamicImportInCjs:$(X(J()),q(`Dynamic import in CJS output`)),manualChunks:X(vh),codeSplitting:X(Q([J(),xh])),advancedChunks:X(xh),legalComments:$(X(Q([Y(`none`),Y(`inline`)])),q(`Control comments in the output`)),plugins:X(gm(()=>!0)),polyfillRequire:$(X(J()),q(`Disable require polyfill injection`)),hoistTransitiveImports:X(Y(!1)),preserveModules:$(X(J()),q(`Preserve module structure`)),preserveModulesRoot:$(X(Z()),q(`Put preserved modules under this path at root level`)),virtualDirname:X(Z()),minifyInternalExports:$(X(J()),q(`Minify internal exports`)),topLevelVar:$(X(J()),q("Rewrite top-level declarations to use `var`.")),cleanDir:$(X(J()),q(`Clean output directory before emitting output`)),keepNames:$(X(J()),q(`Keep function and class names after bundling`))}),wh=(e,t)=>`Code to insert the ${Im(`bold`,e)} of the bundled file (${Im(`bold`,t)} the wrapper function)`,Th=Em({assetFileNames:$(X(Z()),q(`Name pattern for asset files`)),entryFileNames:$(X(Z()),q(`Name pattern for emitted entry chunks`)),chunkFileNames:$(X(Z()),q(`Name pattern for emitted secondary chunks`)),cssEntryFileNames:$(X(Z()),q(`Name pattern for emitted css entry chunks`)),cssChunkFileNames:$(X(Z()),q(`Name pattern for emitted css secondary chunks`)),sanitizeFileName:$(X(J()),q(`Sanitize file name`)),banner:$(X(Z()),q(wh(`top`,`outside`))),footer:$(X(Z()),q(wh(`bottom`,`outside`))),postBanner:$(X(Z()),q("A string to prepend to the top of each chunk. Applied after the `renderChunk` hook and minification")),postFooter:$(X(Z()),q("A string to append to the bottom of each chunk. Applied after the `renderChunk` hook and minification")),intro:$(X(Z()),q(wh(`top`,`inside`))),outro:$(X(Z()),q(wh(`bottom`,`inside`))),esModule:$(X(J()),q("Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)")),globals:$(X(Tm(Z(),Z())),q("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),codeSplitting:$(X(Q([J(),Em({minSize:$(X(Sm()),q(`Minimum size of the chunk`)),minShareCount:$(X(Sm()),q(`Minimum share count of the chunk`))})])),q(`Code splitting options (true, false, or object)`)),advancedChunks:$(X(Em({minSize:$(X(Sm()),q(`Minimum size of the chunk`)),minShareCount:$(X(Sm()),q(`Minimum share count of the chunk`))})),q(`Deprecated: use codeSplitting instead`)),minify:$(X(J()),q(`Minify the bundled file`))}),Eh=Mm(Em({...Ch.entries,...Th.entries}),[`sourcemapIgnoreList`,`sourcemapPathTransform`,`plugins`,`hoistTransitiveImports`]);({...sh.entries,...Eh.entries});const Dh={output:{ignored:!0},"resolve.tsconfigFilename":{issueMsg:"It is deprecated. Please use the top-level `tsconfig` option instead."}},Oh={};function kh(e,t){if(typeof t!=`object`)throw Error(`Invalid ${e} options. Expected an Object but received ${JSON.stringify(t)}.`);if(globalThis.process?.env?.ROLLUP_TEST)return;let n=Fm(e===`input`?ah:Ch,t);if(!n.success){let t=n.issues.map(t=>{let n=t.message,r=t.path.map(e=>e.key);if(t.type===`union`){let e=t.issues?.find(e=>!(e.type!==t.received&&e.input===t.input));e&&(e.path&&r.push(e.path.map(e=>e.key)),n=e.message)}let i=r.join(`.`),a=e===`input`?Dh[i]:Oh[i];return a&&a.ignored?``:`- For the "${i}". ${a?.issueMsg||n+`.`} ${a?.help?`\n Help: ${a.help}`:``}`}).filter(Boolean);t.length&&console.warn(`\x1b[33mWarning: Invalid ${e} options (${t.length} issue${t.length===1?``:`s`} found)\n${t.join(`
|
|
86
|
-
`)}\x1b[0m`)}}var Ah=class extends Jd{constructor(e){super(),this.bindingOutputs=e}get output(){return df(this.bindingOutputs).output}__rolldown_external_memory_handle__(e){let t=this.output.map(t=>t.__rolldown_external_memory_handle__(e));if(!t.every(e=>e.freed)){let e=t.filter(e=>!e.freed).map(e=>e.reason).filter(Boolean);return{freed:!1,reason:`Failed to free ${e.length} item(s): ${e.join(`; `)}`}}return{freed:!0}}};K([G],Ah.prototype,`output`,null);var jh=class{constructor(e){this.context=e}getModuleInfo(e){let t=this.context.getModuleInfo(e);return t?xf(t,{moduleSideEffects:null,meta:{}}):null}};function Mh(e){let{dir:t,format:n,exports:r,hashCharacters:i,sourcemap:a,sourcemapBaseUrl:o,sourcemapDebugIds:s,sourcemapIgnoreList:c,sourcemapPathTransform:l,name:u,assetFileNames:d,entryFileNames:f,chunkFileNames:p,cssEntryFileNames:m,cssChunkFileNames:h,banner:g,footer:_,postBanner:v,postFooter:y,intro:b,outro:x,esModule:S,globals:C,paths:w,generatedCode:T,file:E,sanitizeFileName:D,preserveModules:O,virtualDirname:k,legalComments:A,preserveModulesRoot:ee,manualChunks:j,topLevelVar:te,cleanDir:ne,strictExecutionOrder:M}=e,{inlineDynamicImports:N,advancedChunks:re}=Lh(e.codeSplitting,e.inlineDynamicImports,e.advancedChunks,j);return{dir:t,file:E??void 0,format:Ph(n),exports:r,hashCharacters:i,sourcemap:Fh(a),sourcemapBaseUrl:o,sourcemapDebugIds:s,sourcemapIgnoreList:c??/node_modules/,sourcemapPathTransform:l,banner:Nh(g),footer:Nh(_),postBanner:Nh(v),postFooter:Nh(y),intro:Nh(b),outro:Nh(x),extend:e.extend,globals:C,paths:w,generatedCode:T,esModule:S,name:u,assetFileNames:Ih(d),entryFileNames:f,chunkFileNames:p,cssEntryFileNames:m,cssChunkFileNames:h,plugins:[],minify:e.minify,externalLiveBindings:e.externalLiveBindings,inlineDynamicImports:N,dynamicImportInCjs:e.dynamicImportInCjs,manualCodeSplitting:re,polyfillRequire:e.polyfillRequire,sanitizeFileName:D,preserveModules:O,virtualDirname:k,legalComments:A,preserveModulesRoot:ee,topLevelVar:te,minifyInternalExports:e.minifyInternalExports,cleanDir:ne,strictExecutionOrder:M}}function Nh(e){if(!(e==null||e===``))return typeof e==`function`?async t=>e(tf(t)):e}function Ph(e){switch(e){case void 0:case`es`:case`esm`:case`module`:return`es`;case`cjs`:case`commonjs`:return`cjs`;case`iife`:return`iife`;case`umd`:return`umd`;default:uu(`output.format: ${e}`)}}function Fh(e){switch(e){case!0:return`file`;case`inline`:return`inline`;case!1:case void 0:return;case`hidden`:return`hidden`;default:throw Error(`unknown sourcemap: ${e}`)}}function Ih(e){return typeof e==`function`?t=>e({name:t.name,names:t.names,originalFileName:t.originalFileName,originalFileNames:t.originalFileNames,source:Zd(t.source),type:`asset`}):e}function Lh(e,t,n,r){let i,a;if(e===!1){if(t!=null&&console.warn("`inlineDynamicImports` option is ignored because `codeSplitting: false` is set."),r!=null)throw Error(`Invalid configuration: "output.manualChunks" cannot be used when "output.codeSplitting" is set to false.`);return n!=null&&console.warn("`advancedChunks` option is ignored because `codeSplitting` is set to `false`."),{inlineDynamicImports:!0,advancedChunks:void 0}}else e===!0?t!=null&&console.warn("`inlineDynamicImports` option is ignored because `codeSplitting: true` is set."):e==null?t!=null&&(console.warn("`inlineDynamicImports` option is deprecated, please use `codeSplitting: false` instead."),i=t):(a=e,t!=null&&console.warn("`inlineDynamicImports` option is ignored because the `codeSplitting` option is specified."));if(i===!0&&r!=null)throw Error(`Invalid value "true" for option "output.inlineDynamicImports" - this option is not supported for "output.manualChunks".`);a==null?n!=null&&(console.warn("`advancedChunks` option is deprecated, please use `codeSplitting` instead."),a=n):n!=null&&console.warn("`advancedChunks` option is ignored because the `codeSplitting` option is specified."),r!=null&&a!=null?console.warn("`manualChunks` option is ignored because the `codeSplitting` option is specified."):r!=null&&(a={groups:[{name(e,t){return r(e,{getModuleInfo:e=>t.getModuleInfo(e)})}}]});let o;if(a!=null){let{groups:e,...t}=a;o={...t,groups:e?.map(e=>{let{name:t,...n}=e;return{...n,name:typeof t==`function`?(e,n)=>t(e,new jh(n)):t}})}}return{inlineDynamicImports:i,advancedChunks:o}}var Rh=qu(Yu(),1);async function zh(e){let t=[];for(let[n,r]of e.entries())if(`_parallel`in r){let{fileUrl:e,options:i}=r._parallel;t.push({index:n,fileUrl:e,options:i})}if(t.length<=0)return;let n=Hh(),r=new Rh.ParallelJsPluginRegistry(n),i=r.id,a=await Bh(i,n,t);return{registry:r,stopWorkers:async()=>{await Promise.all(a.map(e=>e.terminate()))}}}function Bh(e,t,n){return Promise.all(Array.from({length:t},(t,r)=>Vh(e,n,r)))}async function Vh(e,t,n){let r=import.meta.resolve(`#parallel-plugin-worker`),i={registryId:e,pluginInfos:t,threadNumber:n},a;try{return a=new be(new URL(r),{workerData:i}),a.unref(),await new Promise((e,t)=>{a.once(`message`,async n=>{n.type===`error`?t(n.error):e()})}),a}catch(e){throw a?.terminate(),e}}const Hh=()=>{let e=1;try{e=z.availableParallelism()}catch{let t=z.cpus();Array.isArray(t)&&t.length>0&&(e=t.length)}return Math.min(e,8)};async function Uh(e,t,n){let r=await Kp(e.plugins),i=await Kp(t.plugins),a=e.logLevel||Bd,o=Fp(Xp(r),Ip(e,a),a,n);t=Yp.callOutputOptionsHook([...r,...i],t,o,a,n);let s=await Kp(t.plugins),c=[...Jp(r,`at position `),...qp(Jp(s,`at output position `),o)],l=await zh(c);e.experimental?.strictExecutionOrder!==void 0&&console.warn("`experimental.strictExecutionOrder` has been stabilized and moved to `output.strictExecutionOrder`. Please update your configuration.");try{return{bundlerOptions:{inputOptions:Sp(c,e,t,s,o,a,n),outputOptions:Mh(t),parallelPluginsRegistry:l?.registry},inputOptions:e,onLog:o,stopWorkers:l?.stopWorkers}}catch(e){throw await l?.stopWorkers(),e}}Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);var Wh=class e{#e;#t;#n;static asyncRuntimeShutdown=!1;constructor(e){this.#e=e,this.#t=new Rh.BindingBundler}get closed(){return this.#t.closed}async generate(e={}){return this.#r(!1,e)}async write(e={}){return this.#r(!0,e)}async close(){await this.#n?.(),await this.#t.close(),(0,Rh.shutdownAsyncRuntime)(),e.asyncRuntimeShutdown=!0,this.#n=void 0}async[Symbol.asyncDispose](){await this.close()}get watchFiles(){return Promise.resolve(this.#t.getWatchFiles())}async#r(t,n){kh(`output`,n),await this.#n?.();let r=await Uh(this.#e,n,!1);e.asyncRuntimeShutdown&&(0,Rh.startAsyncRuntime)();try{this.#n=r.stopWorkers;let e;return e=t?await this.#t.write(r.bundlerOptions):await this.#t.generate(r.bundlerOptions),new Ah(gf(e))}catch(e){throw await r.stopWorkers?.(),e}}};const Gh=[];Gh.push(`SIGHUP`,`SIGINT`,`SIGTERM`),process.platform!==`win32`&&Gh.push(`SIGALRM`,`SIGABRT`,`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&Gh.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`);const Kh=e=>!!e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`,qh=Symbol.for(`signal-exit emitter`),Jh=globalThis,Yh=Object.defineProperty.bind(Object);var Xh=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Jh[qh])return Jh[qh];Yh(Jh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let n=this.listeners[e],r=n.indexOf(t);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(let i of this.listeners[e])r=i(t,n)===!0||r;return e===`exit`&&(r=this.emit(`afterExit`,t,n)||r),r}},Zh=class{};const Qh=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});var $h=class extends Zh{onExit(){return()=>{}}load(){}unload(){}},eg=class extends Zh{#e=tg.platform===`win32`?`SIGINT`:`SIGHUP`;#t=new Xh;#n;#r;#i;#a={};#o=!1;constructor(e){super(),this.#n=e,this.#a={};for(let t of Gh)this.#a[t]=()=>{let n=this.#n.listeners(t),{count:r}=this.#t,i=e;if(typeof i.__signal_exit_emitter__==`object`&&typeof i.__signal_exit_emitter__.count==`number`&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let n=this.#t.emit(`exit`,null,t),r=t===`SIGHUP`?this.#e:t;n||e.kill(e.pid,r)}};this.#i=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!Kh(this.#n))return()=>{};this.#o===!1&&this.load();let n=t?.alwaysLast?`afterExit`:`exit`;return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(let e of Gh)try{let t=this.#a[e];t&&this.#n.on(e,t)}catch{}this.#n.emit=(e,...t)=>this.#c(e,...t),this.#n.reallyExit=e=>this.#s(e)}}unload(){this.#o&&(this.#o=!1,Gh.forEach(e=>{let t=this.#a[e];if(!t)throw Error(`Listener not defined for signal: `+e);try{this.#n.removeListener(e,t)}catch{}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#i,--this.#t.count)}#s(e){return Kh(this.#n)?(this.#n.exitCode=e||0,this.#t.emit(`exit`,this.#n.exitCode,null),this.#i.call(this.#n,this.#n.exitCode)):0}#c(e,...t){let n=this.#r;if(e===`exit`&&Kh(this.#n)){typeof t[0]==`number`&&(this.#n.exitCode=t[0]);let r=n.call(this.#n,e,...t);return this.#t.emit(`exit`,this.#n.exitCode,null),r}else return n.call(this.#n,e,...t)}};const tg=globalThis.process,{onExit:ng,load:rg,unload:ig}=Qh(Kh(tg)?new eg(tg):new $h);function ag(...e){if(typeof process==`object`&&process.versions.webcontainer){process.on(`exit`,t=>{e[0](t,null)});return}ng(...e)}var og=qu(Yu()),sg=class{listeners=new Map;timer;constructor(){this.timer=setInterval(()=>{},1e9)}on(e,t){let n=this.listeners.get(e);return n?n.push(t):this.listeners.set(e,[t]),this}off(e,t){let n=this.listeners.get(e);if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}return this}clear(e){this.listeners.has(e)&&this.listeners.delete(e)}async onEvent(e){let t=this.listeners.get(e.eventKind());if(t)switch(e.eventKind()){case`close`:case`restart`:for(let e of t)await e();break;case`event`:for(let n of t){let t=e.bundleEventKind();switch(t){case`BUNDLE_END`:let{duration:r,output:i,result:a}=e.bundleEndData();await n({code:`BUNDLE_END`,duration:r,output:[i],result:a});break;case`ERROR`:let o=e.bundleErrorData();await n({code:`ERROR`,error:vf(o.error),result:o.result});break;default:await n({code:t});break}}break;case`change`:for(let n of t){let{path:t,kind:r}=e.watchChangeData();await n(t,{event:r})}break;default:throw Error(`Unknown event: ${e}`)}}async close(){clearInterval(this.timer)}},cg=class{closed;inner;emitter;stopWorkers;constructor(e,t,n){this.closed=!1,this.inner=t,this.emitter=e;let r=e.close.bind(e);e.close=async()=>{await this.close(),r()},this.stopWorkers=n}async close(){if(!this.closed){this.closed=!0;for(let e of this.stopWorkers)await e?.();await this.inner.close(),(0,og.shutdownAsyncRuntime)()}}start(){process.nextTick(()=>this.inner.start(this.emitter.onEvent.bind(this.emitter)))}};async function lg(e,t){let n=lu(t),r=await Promise.all(n.map(e=>lu(e.output||{}).map(async t=>Uh(await Yp.callOptionsHook(e,!0),t,!0))).flat()),i=ug(r);new cg(e,new og.BindingWatcher(r.map(e=>e.bundlerOptions),i),r.map(e=>e.stopWorkers)).start()}function ug(e){let t;for(let n of e)if(n.inputOptions.watch){let e=n.inputOptions.watch.notify;if(e){if(t)return n.onLog(zd,od()),t;t=e}}}const dg=e=>{let t=new sg;return lg(t,e),t},fg=async e=>(kh(`input`,e),new Wh(await Yp.callOptionsHook(e)));var pg=qu(Yu(),1);if(xe){let e=(0,pg.initTraceSubscriber)();ag(()=>{e?.close()})}async function mg(e){if(Array.isArray(e))return Promise.all(e.map(e=>mg(e)));{let{output:t,write:n=!0,...r}=e,i=await fg(r);try{return n?await i.write(t):await i.generate(t)}finally{await i.close()}}}pg.BindingMagicString;function hg(e,t={},n){for(let r in e){let i=e[r],a=n?`${n}:${r}`:r;typeof i==`object`&&i?hg(i,t,a):typeof i==`function`&&(t[a]=i)}return t}const gg=(()=>{if(console.createTask)return console.createTask;let e={run:e=>e()};return()=>e})();function _g(e,t,n,r){for(let i=n;i<e.length;i+=1)try{let n=r?r.run(()=>e[i](...t)):e[i](...t);if(n instanceof Promise)return n.then(()=>_g(e,t,i+1,r))}catch(e){return Promise.reject(e)}}function vg(e,t,n){if(e.length>0)return _g(e,t,0,gg(n))}function yg(e,t,n){if(e.length>0){let r=gg(n);return Promise.all(e.map(e=>r.run(()=>e(...t))))}}function bg(e,t){for(let n of[...e])n(t)}var xg=class{_hooks;_before;_after;_deprecatedHooks;_deprecatedMessages;constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,t,n={}){if(!e||typeof t!=`function`)return()=>{};let r=e,i;for(;this._deprecatedHooks[e];)i=this._deprecatedHooks[e],e=i.to;if(i&&!n.allowDeprecated){let e=i.message;e||=`${r} hook has been deprecated`+(i.to?`, please use ${i.to}`:``),this._deprecatedMessages||=new Set,this._deprecatedMessages.has(e)||(console.warn(e),this._deprecatedMessages.add(e))}if(!t.name)try{Object.defineProperty(t,`name`,{get:()=>`_`+e.replace(/\W+/g,`_`)+`_hook_cb`,configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(t),()=>{t&&=(this.removeHook(e,t),void 0)}}hookOnce(e,t){let n,r=(...e)=>(typeof n==`function`&&n(),n=void 0,r=void 0,t(...e));return n=this.hook(e,r),n}removeHook(e,t){let n=this._hooks[e];if(n){let r=n.indexOf(t);r!==-1&&n.splice(r,1),n.length===0&&(this._hooks[e]=void 0)}}deprecateHook(e,t){this._deprecatedHooks[e]=typeof t==`string`?{to:t}:t;let n=this._hooks[e]||[];this._hooks[e]=void 0;for(let t of n)this.hook(e,t)}deprecateHooks(e){for(let t in e)this.deprecateHook(t,e[t])}addHooks(e){let t=hg(e),n=Object.keys(t).map(e=>this.hook(e,t[e]));return()=>{for(let e of n)e();n.length=0}}removeHooks(e){let t=hg(e);for(let e in t)this.removeHook(e,t[e])}removeAllHooks(){this._hooks={}}callHook(e,...t){return this.callHookWith(vg,e,t)}callHookParallel(e,...t){return this.callHookWith(yg,e,t)}callHookWith(e,t,n){let r=this._before||this._after?{name:t,args:n,context:{}}:void 0;this._before&&bg(this._before,r);let i=e(this._hooks[t]?[...this._hooks[t]]:[],n,t);return i instanceof Promise?i.finally(()=>{this._after&&r&&bg(this._after,r)}):(this._after&&r&&bg(this._after,r),i)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){let t=this._before.indexOf(e);t!==-1&&this._before.splice(t,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){let t=this._after.indexOf(e);t!==-1&&this._after.splice(t,1)}}}},Sg=Object.create,Cg=Object.defineProperty,wg=Object.getOwnPropertyDescriptor,Tg=Object.getOwnPropertyNames,Eg=Object.getPrototypeOf,Dg=Object.prototype.hasOwnProperty,Og=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),kg=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Tg(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Dg.call(e,s)&&s!==n&&Cg(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=wg(t,s))||r.enumerable});return e},Ag=(e,t,n)=>(n=e==null?{}:Sg(Eg(e)),kg(t||!e||!e.__esModule?Cg(n,`default`,{value:e,enumerable:!0}):n,e)),jg=ge(import.meta.url);const Mg=/^path$/i,Ng={key:`PATH`,value:``};function Pg(e){for(let t in e){if(!Object.prototype.hasOwnProperty.call(e,t)||!Mg.test(t))continue;let n=e[t];return n?{key:t,value:n}:Ng}return Ng}function Fg(e,t){let n=t.value.split(a),r=e,i;do n.push(d(r,`node_modules`,`.bin`)),i=r,r=o(r);while(r!==i);return{key:t.key,value:n.join(a)}}function Ig(e,t){let n={...process.env,...t},r=Fg(e,Pg(n));return n[r.key]=r.value,n}const Lg=e=>{let t=e.length,n=new Se,r=()=>{--t===0&&n.emit(`end`)};for(let t of e)t.pipe(n,{end:!1}),t.on(`end`,r);return n};var Rg=Og((e,t)=>{t.exports=a,a.sync=o;var n=jg(`fs`);function r(e,t){var n=t.pathExt===void 0?process.env.PATHEXT:t.pathExt;if(!n||(n=n.split(`;`),n.indexOf(``)!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function i(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:r(t,n)}function a(e,t,r){n.stat(e,function(n,a){r(n,n?!1:i(a,e,t))})}function o(e,t){return i(n.statSync(e),e,t)}}),zg=Og((e,t)=>{t.exports=r,r.sync=i;var n=jg(`fs`);function r(e,t,r){n.stat(e,function(e,n){r(e,e?!1:a(n,t))})}function i(e,t){return a(n.statSync(e),t)}function a(e,t){return e.isFile()&&o(e,t)}function o(e,t){var n=e.mode,r=e.uid,i=e.gid,a=t.uid===void 0?process.getuid&&process.getuid():t.uid,o=t.gid===void 0?process.getgid&&process.getgid():t.gid,s=64,c=8,l=1,u=s|c;return n&l||n&c&&i===o||n&s&&r===a||n&u&&a===0}}),Bg=Og((e,t)=>{jg(`fs`);var n=process.platform===`win32`||global.TESTING_WINDOWS?Rg():zg();t.exports=r,r.sync=i;function r(e,t,i){if(typeof t==`function`&&(i=t,t={}),!i){if(typeof Promise!=`function`)throw TypeError(`callback not provided`);return new Promise(function(n,i){r(e,t||{},function(e,t){e?i(e):n(t)})})}n(e,t||{},function(e,n){e&&(e.code===`EACCES`||t&&t.ignoreErrors)&&(e=null,n=!1),i(e,n)})}function i(e,t){try{return n.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code===`EACCES`)return!1;throw e}}}),Vg=Og((e,t)=>{let n=process.platform===`win32`||process.env.OSTYPE===`cygwin`||process.env.OSTYPE===`msys`,r=jg(`path`),i=n?`;`:`:`,a=Bg(),o=e=>Object.assign(Error(`not found: ${e}`),{code:`ENOENT`}),s=(e,t)=>{let r=t.colon||i,a=e.match(/\//)||n&&e.match(/\\/)?[``]:[...n?[process.cwd()]:[],...(t.path||process.env.PATH||``).split(r)],o=n?t.pathExt||process.env.PATHEXT||`.EXE;.CMD;.BAT;.COM`:``,s=n?o.split(r):[``];return n&&e.indexOf(`.`)!==-1&&s[0]!==``&&s.unshift(``),{pathEnv:a,pathExt:s,pathExtExe:o}},c=(e,t,n)=>{typeof t==`function`&&(n=t,t={}),t||={};let{pathEnv:i,pathExt:c,pathExtExe:l}=s(e,t),u=[],d=n=>new Promise((a,s)=>{if(n===i.length)return t.all&&u.length?a(u):s(o(e));let c=i[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=r.join(l,e);a(f(!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d,n,0))}),f=(e,n,r)=>new Promise((i,o)=>{if(r===c.length)return i(d(n+1));let s=c[r];a(e+s,{pathExt:l},(a,o)=>{if(!a&&o)if(t.all)u.push(e+s);else return i(e+s);return i(f(e,n,r+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};t.exports=c,c.sync=(e,t)=>{t||={};let{pathEnv:n,pathExt:i,pathExtExe:c}=s(e,t),l=[];for(let o=0;o<n.length;o++){let s=n[o],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=r.join(u,e),f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<i.length;e++){let n=f+i[e];try{if(a.sync(n,{pathExt:c}))if(t.all)l.push(n);else return n}catch{}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw o(e)}}),Hg=Og((e,t)=>{let n=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`};t.exports=n,t.exports.default=n}),Ug=Og((e,t)=>{let n=jg(`path`),r=Vg(),i=Hg();function a(e,t){let a=e.options.env||process.env,o=process.cwd(),s=e.options.cwd!=null,c=s&&process.chdir!==void 0&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch{}let l;try{l=r.sync(e.command,{path:a[i({env:a})],pathExt:t?n.delimiter:void 0})}catch{}finally{c&&process.chdir(o)}return l&&=n.resolve(s?e.options.cwd:``,l),l}function o(e){return a(e)||a(e,!0)}t.exports=o}),Wg=Og((e,t)=>{let n=/([()\][%!^"`<>&|;, *?])/g;function r(e){return e=e.replace(n,`^$1`),e}function i(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,`$1$1\\"`),e=e.replace(/(\\*)$/,`$1$1`),e=`"${e}"`,e=e.replace(n,`^$1`),t&&(e=e.replace(n,`^$1`)),e}t.exports.command=r,t.exports.argument=i}),Gg=Og((e,t)=>{t.exports=/^#!(.*)/}),Kg=Og((e,t)=>{let n=Gg();t.exports=(e=``)=>{let t=e.match(n);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,``).split(` `),a=r.split(`/`).pop();return a===`env`?i:i?`${a} ${i}`:a}}),qg=Og((e,t)=>{let n=jg(`fs`),r=Kg();function i(e){let t=Buffer.alloc(150),i;try{i=n.openSync(e,`r`),n.readSync(i,t,0,150,0),n.closeSync(i)}catch{}return r(t.toString())}t.exports=i}),Jg=Og((e,t)=>{let n=jg(`path`),r=Ug(),i=Wg(),a=qg(),o=process.platform===`win32`,s=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(e){e.file=r(e);let t=e.file&&a(e.file);return t?(e.args.unshift(e.file),e.command=t,r(e)):e.file}function u(e){if(!o)return e;let t=l(e),r=!s.test(t);if(e.options.forceShell||r){let r=c.test(t);e.command=n.normalize(e.command),e.command=i.command(e.command),e.args=e.args.map(e=>i.argument(e,r)),e.args=[`/d`,`/s`,`/c`,`"${[e.command].concat(e.args).join(` `)}"`],e.command=process.env.comspec||`cmd.exe`,e.options.windowsVerbatimArguments=!0}return e}function d(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:u(r)}t.exports=d}),Yg=Og((e,t)=>{let n=process.platform===`win32`;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:`ENOENT`,errno:`ENOENT`,syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,t){if(!n)return;let r=e.emit;e.emit=function(n,i){if(n===`exit`){let n=a(i,t,`spawn`);if(n)return r.call(e,`error`,n)}return r.apply(e,arguments)}}function a(e,t){return n&&e===1&&!t.file?r(t.original,`spawn`):null}function o(e,t){return n&&e===1&&!t.file?r(t.original,`spawnSync`):null}t.exports={hookChildProcess:i,verifyENOENT:a,verifyENOENTSync:o,notFoundError:r}}),Xg=Ag(Og((e,t)=>{let n=jg(`child_process`),r=Jg(),i=Yg();function a(e,t,a){let o=r(e,t,a),s=n.spawn(o.command,o.args,o.options);return i.hookChildProcess(s,o),s}function o(e,t,a){let o=r(e,t,a),s=n.spawnSync(o.command,o.args,o.options);return s.error=s.error||i.verifyENOENTSync(s.status,o),s}t.exports=a,t.exports.spawn=a,t.exports.sync=o,t.exports._parse=r,t.exports._enoent=i})(),1),Zg=class extends Error{result;output;get exitCode(){if(this.result.exitCode!==null)return this.result.exitCode}constructor(e,t){super(`Process exited with non-zero status (${e.exitCode})`),this.result=e,this.output=t}};const Qg={timeout:void 0,persist:!1},$g={windowsHide:!0};function e_(e,t){return{command:l(e),args:t??[]}}function t_(e){let t=new AbortController;for(let n of e){if(n.aborted)return t.abort(),n;n.addEventListener(`abort`,()=>{t.abort(n.reason)},{signal:t.signal})}return t.signal}async function n_(e){let t=``;for await(let n of e)t+=n.toString();return t}var r_=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}constructor(e,t,n){this._options={...Qg,...n},this._command=e,this._args=t??[],this._processClosed=new Promise(e=>{this._resolveClose=e})}kill(e){return this._process?.kill(e)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(e,t,n){return i_(e,t,{...n,stdin:this})}async*[Symbol.asyncIterator](){let e=this._process;if(!e)return;let t=[];this._streamErr&&t.push(this._streamErr),this._streamOut&&t.push(this._streamOut);let n=Lg(t),r=I.createInterface({input:n});for await(let e of r)yield e.toString();if(await this._processClosed,e.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new Zg(this)}async _waitForOutput(){let e=this._process;if(!e)throw Error(`No process was started`);let[t,n]=await Promise.all([this._streamOut?n_(this._streamOut):``,this._streamErr?n_(this._streamErr):``]);if(await this._processClosed,this._options?.stdin&&await this._options.stdin,e.removeAllListeners(),this._thrownError)throw this._thrownError;let r={stderr:n,stdout:t,exitCode:this.exitCode};if(this._options.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new Zg(this,r);return r}then(e,t){return this._waitForOutput().then(e,t)}_streamOut;_streamErr;spawn(){let e=y(),t=this._options,n={...$g,...t.nodeOptions},r=[];this._resetState(),t.timeout!==void 0&&r.push(AbortSignal.timeout(t.timeout)),t.signal!==void 0&&r.push(t.signal),t.persist===!0&&(n.detached=!0),r.length>0&&(n.signal=t_(r)),n.env=Ig(e,n.env);let{command:i,args:a}=e_(this._command,this._args),o=(0,Xg._parse)(i,a,n),s=C(o.command,o.args,o.options);if(s.stderr&&(this._streamErr=s.stderr),s.stdout&&(this._streamOut=s.stdout),this._process=s,s.once(`error`,this._onError),s.once(`close`,this._onClose),t.stdin!==void 0&&s.stdin&&t.stdin.process){let{stdout:e}=t.stdin.process;e&&e.pipe(s.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(e=>{this._resolveClose=e}),this._thrownError=void 0}_onError=e=>{if(e.name===`AbortError`&&(!(e.cause instanceof Error)||e.cause.name!==`TimeoutError`)){this._aborted=!0;return}this._thrownError=e};_onClose=()=>{this._resolveClose&&this._resolveClose()}};const i_=(e,t,n)=>{let r=new r_(e,t,n);return r.spawn(),r};function a_(e){return new ud(`builtin:vite-import-glob`,e)}var o_=qu(Yu(),1);o_.BindingRebuildStrategy;var s_=o_.ResolverFactory;o_.createTokioRuntime,o_.isolatedDeclaration;var c_=o_.isolatedDeclarationSync;o_.minify,o_.minifySync,o_.moduleRunnerTransform,o_.transform,o_.transformSync;const l_=n(import.meta.url),u_=l_(`semver/functions/coerce.js`),d_=l_(`semver/functions/satisfies.js`),f_=l_(`tree-kill`),p_=Io(`tsdown:config:workspace`),m_=[`**/node_modules/**`,`**/dist/**`,`**/test?(s)/**`,`**/t?(e)mp/**`];async function h_(e,t){let n={...e,...t},r=n.cwd||v.cwd(),{workspace:a}=n;if(!a)return{configs:[n],files:[]};a===!0?a={}:(typeof a==`string`||Array.isArray(a))&&(a={include:a});let{include:o=`auto`,exclude:s=m_,config:c}=a;if(o=o===`auto`?(await _c(`**/package.json`,{ignore:s,cwd:r,expandDirectories:!1})).filter(e=>e!==`package.json`).map(e=>Ua(i.resolve(r,e,`..`))):(await _c(o,{ignore:s,cwd:r,onlyDirectories:!0,absolute:!0,expandDirectories:!1})).map(e=>Ua(i.resolve(e))),o.length===0)throw Error(`No workspace packages found, please check your config`);let l=[];return{configs:(await Promise.all(o.map(async e=>{p_(`loading workspace config %s`,e);let{configs:r,file:i}=await Gl({...t,config:c,cwd:e},e);return i?(p_(`loaded workspace config file %s`,i),l.push(i)):p_(`no workspace config file found in %s`,e),r.map(e=>({...n,...e}))}))).flat(),files:l}}const g_=Io(`tsdown:config`);async function __(e){g_(`inline config %O`,e),e.cwd&&=i.resolve(e.cwd);let{configs:t,file:n}=await Gl(e),r=[];n?(r.push(n),g_(`loaded root user config file %s`,n),g_(`root user configs %O`,t)):g_(`no root user config file found`);let a=(await Promise.all(t.map(async t=>{let{configs:n,files:i}=await h_(t,e);return g_(`workspace configs %O`,n),i&&r.push(...i),(await Promise.all(n.filter(e=>!e.workspace||e.entry).map(t=>tu(t,e)))).flat().filter(e=>!!e)}))).flat();if(g_(`resolved configs %O`,a),a.length===0)throw Error(`No valid configuration found.`);return{configs:a,files:r}}function v_(e){!e.target||!(e.checks?.legacyCjs??!0)||!e.format.includes(`cjs`)||e.target.some(e=>{let t=u_(e.split(`node`)[1]);return t&&d_(t,`^20.19.0 || >=22.12.0`)})&&e.logger.warnOnce(`We recommend using the ESM format instead of CommonJS.
|
|
84
|
+
`))),t}function Of(e,t){return e.replace(/\n+$/,``)+`
|
|
85
|
+
`+t.replace(/^\n+/,``)}function kf(e,t){return{get ast(){return bu(`ModuleInfo#ast`)},get code(){return e.code},id:e.id,importers:e.importers,dynamicImporters:e.dynamicImporters,importedIds:e.importedIds,dynamicallyImportedIds:e.dynamicallyImportedIds,exports:e.exports,isEntry:e.isEntry,...t}}function Af(e){return!e||e.length===0||!e[0]}function jf(e,t,n){if(!n)return;let r=typeof n==`object`?n:JSON.parse(n);return Af(r.sourcesContent)&&(r.sourcesContent=[t]),(Af(r.sources)||r.sources&&r.sources.length===1&&r.sources[0]!==e)&&(r.sources=[e]),r}function Mf(e,t,n){let r=n=>e(n,...t);return n===void 0?r:Object.assign(r,{lazy:n,lazyArgs:t})}function Nf(e,t,n){let r=e.length-t.length;if(r===0)return e(...t);if(r===1)return Mf(e,t,n);throw Error(`Wrong number of arguments`)}function Pf(...e){return Nf(Ff,e)}const Ff=(e,t)=>{let n=[[],[]];for(let[r,i]of e.entries())t(i,r,e)?n[0].push(i):n[1].push(i);return n};function If(e,t){if(typeof e==`string`||e instanceof RegExp)return[Wd(Lf(t,e))];if(Array.isArray(e))return e.map(e=>Wd(Lf(t,e)));let n=[];return e.exclude&&n.push(..._u(e.exclude).map(e=>Gd(Lf(t,e)))),e.include&&n.push(..._u(e.include).map(e=>Wd(Lf(t,e)))),n}function Lf(e,t){return e===`code`?Ud(t):Vd(t)}function Rf(e){if(!e)return;if(Array.isArray(e))return e;let{id:t,code:n,moduleType:r}=e,i=[],a=[],o=[],s=[],c=[];t&&([a,o]=Pf(If(t,`id`)??[],e=>e.kind===`include`)),n&&([s,c]=Pf(If(n,`code`)??[],e=>e.kind===`include`)),i.push(...o),i.push(...c);let l=[];if(r){let e=Array.isArray(r)?r:r.include??[];l.push(Bd(...e.map(e=>Hd(e))))}return a.length&&l.push(Bd(...a.map(e=>e.expr))),s.length&&l.push(Bd(...s.map(e=>e.expr))),l.length&&i.push(Wd(zd(...l))),i}function zf(e,t){let n=If(t,e),r=[];return n&&(r=n.map(Bf)),r.length>0?{value:r}:void 0}function Bf(e){let t=[];return Uf(e,t),t}function Vf(e){switch(e.kind){case`and`:case`or`:return e.args.some(Vf);case`not`:case`include`:case`exclude`:return Vf(e.expr);case`importerId`:return!0;default:return!1}}function Hf(e,t){if(e?.some(Vf))throw Error(`The \`importerId\` filter can only be used with the \`resolveId\` hook, but it was used with the \`${t}\` hook.`)}function Uf(e,t){switch(e.kind){case`and`:{let n=e.args;for(let e=n.length-1;e>=0;e--)Uf(n[e],t);t.push({kind:`And`,payload:n.length});break}case`or`:{let n=e.args;for(let e=n.length-1;e>=0;e--)Uf(n[e],t);t.push({kind:`Or`,payload:n.length});break}case`not`:Uf(e.expr,t),t.push({kind:`Not`});break;case`id`:t.push({kind:`Id`,payload:e.pattern}),e.params.cleanUrl&&t.push({kind:`CleanUrl`});break;case`importerId`:t.push({kind:`ImporterId`,payload:e.pattern}),e.params.cleanUrl&&t.push({kind:`CleanUrl`});break;case`moduleType`:t.push({kind:`ModuleType`,payload:e.pattern});break;case`code`:t.push({kind:`Code`,payload:e.pattern});break;case`include`:Uf(e.expr,t),t.push({kind:`Include`});break;case`exclude`:Uf(e.expr,t),t.push({kind:`Exclude`});break;case`query`:t.push({kind:`QueryKey`,payload:e.key}),t.push({kind:`QueryValue`,payload:e.pattern});break;default:throw Error(`Unknown filter expression: ${e}`)}}function Wf(e){if(e)return Array.isArray(e)?{value:e.map(Bf)}:e.id?zf(`id`,e.id):void 0}function Gf(e){if(e)return Array.isArray(e)?(Hf(e,`load`),{value:e.map(Bf)}):e.id?zf(`id`,e.id):void 0}function Kf(e){if(!e)return;let t=Rf(e);Hf(t,`transform`);let n=[];return t&&(n=t.map(Bf)),{value:n.length>0?n:void 0}}function qf(e){if(e)return Array.isArray(e)?(Hf(e,`renderChunk`),{value:e.map(Bf)}):e.code?zf(`code`,e.code):void 0}function Jf(e){return{order:Yf(e.order)}}function Yf(e){switch(e){case`post`:return Cf.BindingPluginOrder.Post;case`pre`:return Cf.BindingPluginOrder.Pre;case null:case void 0:return;default:throw Error(`Unknown plugin order: ${e}`)}}const Xf={appendFile:C.appendFile,copyFile:C.copyFile,mkdir:C.mkdir,mkdtemp:C.mkdtemp,readdir:C.readdir,readFile:C.readFile,realpath:C.realpath,rename:C.rename,rmdir:C.rmdir,stat:C.stat,lstat:C.lstat,unlink:C.unlink,writeFile:C.writeFile};var Zf=class extends ef{fs=Xf;getModuleInfo;constructor(e,t,n,r,i,a,o,s){super(i,a,n.name,o),this.outputOptions=e,this.context=t,this.data=r,this.onLog=i,this.currentLoadingModule=s,this.getModuleInfo=e=>this.data.getModuleInfo(e,t)}async load(e){let t=e.id;t===this.currentLoadingModule&&this.onLog(qd,pd(this.pluginName,this.currentLoadingModule));let n=this.data.getModuleInfo(t,this.context);if(n&&n.code!==null)return n;let r={meta:e.meta||{},moduleSideEffects:e.moduleSideEffects||null,invalidate:!1};this.data.updateModuleOption(t,r);let i=this.data.loadModulePromiseMap.get(t);return i||(i=this.context.load(t,e.moduleSideEffects??void 0,e.packageJsonPath??void 0).catch(()=>{this.data.loadModulePromiseMap.delete(t)}),this.data.loadModulePromiseMap.set(t,i)),await i,this.data.getModuleInfo(t,this.context)}async resolve(e,t,n){let r;n!=null&&(r=this.data.saveResolveOptions(n));let i=Object.entries(n?.custom??{}).reduce((e,[t,n])=>(t.startsWith(`vite:`)&&((e??={})[t]=n),e),void 0),a=await this.context.resolve(e,t,{importKind:n?.kind,custom:r,isEntry:n?.isEntry,skipSelf:n?.skipSelf,vitePluginCustom:i});if(r!=null&&this.data.removeSavedResolveOptions(r),a==null)return null;let o=this.data.getModuleOption(a.id)||{};return{...a,external:a.external===`relative`?yu(`The PluginContext resolve result external couldn't be 'relative'`):a.external,...o,moduleSideEffects:o.moduleSideEffects??a.moduleSideEffects??null,packageJsonPath:a.packageJsonPath}}emitFile=e=>{if(e.type===`prebuilt-chunk`)return this.context.emitPrebuiltChunk({fileName:e.fileName,code:e.code,exports:e.exports,map:pf(e.map),sourcemapFileName:e.sourcemapFileName});if(e.type===`chunk`)return this.context.emitChunk({preserveEntrySignatures:Vp(e.preserveSignature),...e});let t=e.fileName||typeof this.outputOptions.sanitizeFileName!=`function`?void 0:this.outputOptions.sanitizeFileName(e.name||`asset`),n=e.fileName?void 0:this.getAssetFileNames(e);return this.context.emitFile({...e,originalFileName:e.originalFileName||void 0,source:sf(e.source)},n,t)};getAssetFileNames(e){if(typeof this.outputOptions.assetFileNames==`function`)return this.outputOptions.assetFileNames({type:`asset`,name:e.name,names:e.name?[e.name]:[],originalFileName:e.originalFileName,originalFileNames:e.originalFileName?[e.originalFileName]:[],source:e.source})}getFileName(e){return this.context.getFileName(e)}getModuleIds(){return this.data.getModuleIds(this.context)}addWatchFile(e){this.context.addWatchFile(e)}parse(e,t){return jd(e,t)}},Qf=class extends Zf{constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r,s,c,l,a),this.inner=i,this.moduleId=a,this.moduleSource=o;let u=e=>(t,n)=>{t=Zd(t),n&&_d(t,n,o,a),t.id=a,t.hook=`transform`,e(t)};this.debug=u(this.debug),this.warn=u(this.warn),this.info=u(this.info)}error(e,t){return typeof e==`string`&&(e={message:e}),t&&_d(e,t,this.moduleSource,this.moduleId),e.id=this.moduleId,e.hook=`transform`,gd(hd(Zd(e),this.pluginName))}getCombinedSourcemap(){return JSON.parse(this.inner.getCombinedSourcemap())}addWatchFile(e){this.inner.addWatchFile(e)}sendMagicString(e){this.inner.sendMagicString(e)}};function $f(e){let t=e.plugin.buildStart;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async(t,r)=>{await n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),e.pluginContextData.getInputOptions(r))},meta:Jf(r)}}function ep(e){let t=e.plugin.buildEnd;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async(t,r)=>{await n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),r?Ef(r):void 0)},meta:Jf(r)}}function tp(e){let t=e.plugin.resolveId;if(!t)return{};let{handler:n,meta:r,options:i}=$d(t);return{plugin:async(t,r,i,a)=>{let o=a.custom==null?void 0:e.pluginContextData.getSavedResolveOptions(a.custom),s=await n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),r,i??void 0,{...a,custom:o?.custom});if(s==null)return;if(s===!1)return{id:r,external:!0,normalizeExternalId:!0};if(typeof s==`string`)return{id:s,normalizeExternalId:!1};let c=e.pluginContextData.updateModuleOption(s.id,{meta:s.meta||{},moduleSideEffects:s.moduleSideEffects??null,invalidate:!1});return{id:s.id,external:s.external,normalizeExternalId:!1,moduleSideEffects:c.moduleSideEffects??void 0,packageJsonPath:s.packageJsonPath}},meta:Jf(r),filter:Wf(i.filter)}}function np(e){let t=e.plugin.resolveDynamicImport;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async(t,r,i)=>{let a=await n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),r,i??void 0);if(a==null)return;if(a===!1)return{id:r,external:!0};if(typeof a==`string`)return{id:a};let o={id:a.id,external:a.external,packageJsonPath:a.packageJsonPath};return a.moduleSideEffects!==null&&(o.moduleSideEffects=a.moduleSideEffects),e.pluginContextData.updateModuleOption(a.id,{meta:a.meta||{},moduleSideEffects:a.moduleSideEffects||null,invalidate:!1}),o},meta:Jf(r)}}function rp(e){let t=e.plugin.transform;if(!t)return{};let{handler:n,meta:r,options:i}=$d(t);return{plugin:async(t,r,i,a)=>{let o,s;Object.defineProperties(a,{magicString:{get(){return o||(o=new Cf.BindingMagicString(r),o)}},ast:{get(){if(s)return s;let e=`js`;switch(a.moduleType){case`js`:case`jsx`:case`ts`:case`tsx`:e=a.moduleType;break;default:break}return s=jd(r,{astType:a.moduleType.includes(`ts`)?`ts`:`js`,lang:e}),s}}});let c=new Qf(e.outputOptions,t.inner(),e.plugin,e.pluginContextData,t,i,r,e.onLog,e.logLevel,e.watchMode),l=await n.call(c,r,i,a);if(l==null)return;if(typeof l==`string`)return{code:l};let u=e.pluginContextData.updateModuleOption(i,{meta:l.meta??{},moduleSideEffects:l.moduleSideEffects??null,invalidate:!1}),d,f=l.map;if(typeof l.code==`string`)d=l.code;else if(l.code instanceof Cf.BindingMagicString){let e=l.code;d=e.toString();let n=t.sendMagicString(e);n!=null&&(f=n)}return{code:d,map:pf(jf(i,r,f)),moduleSideEffects:u.moduleSideEffects??void 0,moduleType:l.moduleType}},meta:Jf(r),filter:Kf(i.filter)}}function ip(e){let t=e.plugin.load;if(!t)return{};let{handler:n,meta:r,options:i}=$d(t);return{plugin:async(t,r)=>{let i=await n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode,r),r);if(i==null)return;if(typeof i==`string`)return{code:i};let a=e.pluginContextData.updateModuleOption(r,{meta:i.meta||{},moduleSideEffects:i.moduleSideEffects??null,invalidate:!1}),o=ap(i,r);return{code:i.code,map:pf(o),moduleType:i.moduleType,moduleSideEffects:a.moduleSideEffects??void 0}},meta:Jf(r),filter:Gf(i.filter)}}function ap(e,t){if(!e.map)return;let n=typeof e.map==`object`?e.map:JSON.parse(e.map);if(!Af(n.sources)){let e=i.dirname(t)||`.`,r=n.sourceRoot||`.`;n.sources=n.sources.map(t=>i.resolve(e,r,t))}return n}function op(e){let t=e.plugin.moduleParsed;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async(t,r)=>{await n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),kf(r,e.pluginContextData.getModuleOption(r.id)))},meta:Jf(r)}}function sp(e){let t=e.plugin.renderStart;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async(t,r)=>{n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),e.pluginContextData.getOutputOptions(r),e.pluginContextData.getInputOptions(r))},meta:Jf(r)}}function cp(e){let t=e.plugin.renderChunk;if(!t)return{};let{handler:n,meta:r,options:i}=$d(t);return{plugin:async(t,r,i,a,o)=>{e.pluginContextData.getRenderChunkMeta()??e.pluginContextData.setRenderChunkMeta({chunks:Object.fromEntries(Object.entries(o.chunks).map(([e,t])=>[e,uf(t)]))});let s=e.pluginContextData.getRenderChunkMeta(),c;e.options.experimental?.nativeMagicString&&Object.defineProperty(s,`magicString`,{get(){return c||(c=new Cf.BindingMagicString(r),c)},configurable:!0});let l=await n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),r,uf(i),e.pluginContextData.getOutputOptions(a),s);if(l!=null){if(l instanceof Cf.BindingMagicString){let e=l.toString(),t=l.generateMap();return{code:e,map:pf({file:t.file,mappings:t.mappings,names:t.names,sources:t.sources,sourcesContent:t.sourcesContent.map(e=>e??null)})}}if(typeof l==`string`)return{code:l};if(l.code instanceof Cf.BindingMagicString){let e=l.code,t=e.toString();if(l.map===null)return{code:t};if(l.map===void 0){let n=e.generateMap();return{code:t,map:pf({file:n.file,mappings:n.mappings,names:n.names,sources:n.sources,sourcesContent:n.sourcesContent.map(e=>e??null)})}}return{code:t,map:pf(l.map)}}return l.map?{code:l.code,map:pf(l.map)}:{code:l.code}}},meta:Jf(r),filter:qf(i.filter)}}function lp(e){let t=e.plugin.augmentChunkHash;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async(t,r)=>n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),uf(r)),meta:Jf(r)}}function up(e){let t=e.plugin.renderError;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async(t,r)=>{n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),Ef(r))},meta:Jf(r)}}function dp(e){let t=e.plugin.generateBundle;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async(t,r,i,a)=>{let o={updated:new Set,deleted:new Set},s=new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),c=xf(s,wf(r),o);return await n.call(s,e.pluginContextData.getOutputOptions(a),c,i),Sf(o,c)},meta:Jf(r)}}function fp(e){let t=e.plugin.writeBundle;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async(t,r,i)=>{let a={updated:new Set,deleted:new Set},o=new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),s=xf(o,wf(r),a);return await n.call(o,e.pluginContextData.getOutputOptions(i),s),Sf(a,s)},meta:Jf(r)}}function pp(e){let t=e.plugin.closeBundle;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async(t,r)=>{await n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),r?Ef(r):void 0)},meta:Jf(r)}}function mp(e){let t=e.plugin.banner;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async(t,r)=>typeof n==`string`?n:n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),uf(r)),meta:Jf(r)}}function hp(e){let t=e.plugin.footer;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async(t,r)=>typeof n==`string`?n:n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),uf(r)),meta:Jf(r)}}function gp(e){let t=e.plugin.intro;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async(t,r)=>typeof n==`string`?n:n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),uf(r)),meta:Jf(r)}}function _p(e){let t=e.plugin.outro;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async(t,r)=>typeof n==`string`?n:n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),uf(r)),meta:Jf(r)}}function vp(e){let t=e.plugin.watchChange;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async(t,r,i)=>{await n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode),r,{event:i})},meta:Jf(r)}}function yp(e){let t=e.plugin.closeWatcher;if(!t)return{};let{handler:n,meta:r}=$d(t);return{plugin:async t=>{await n.call(new Zf(e.outputOptions,t,e.plugin,e.pluginContextData,e.onLog,e.logLevel,e.watchMode))},meta:Jf(r)}}let bp=function(e){return e[e.buildStart=1]=`buildStart`,e[e.resolveId=2]=`resolveId`,e[e.resolveDynamicImport=4]=`resolveDynamicImport`,e[e.load=8]=`load`,e[e.transform=16]=`transform`,e[e.moduleParsed=32]=`moduleParsed`,e[e.buildEnd=64]=`buildEnd`,e[e.renderStart=128]=`renderStart`,e[e.renderError=256]=`renderError`,e[e.renderChunk=512]=`renderChunk`,e[e.augmentChunkHash=1024]=`augmentChunkHash`,e[e.generateBundle=2048]=`generateBundle`,e[e.writeBundle=4096]=`writeBundle`,e[e.closeBundle=8192]=`closeBundle`,e[e.watchChange=16384]=`watchChange`,e[e.closeWatcher=32768]=`closeWatcher`,e[e.transformAst=65536]=`transformAst`,e[e.banner=131072]=`banner`,e[e.footer=262144]=`footer`,e[e.intro=524288]=`intro`,e[e.outro=1048576]=`outro`,e}({});var xp=class{bitflag=BigInt(0);constructor(){}union(e){this.bitflag|=BigInt(e)}inner(){return Number(this.bitflag)}};function Sp(e){let t=new xp;return e.buildStart&&t.union(bp.buildStart),e.resolveId&&t.union(bp.resolveId),e.resolveDynamicImport&&t.union(bp.resolveDynamicImport),e.load&&t.union(bp.load),e.transform&&t.union(bp.transform),e.moduleParsed&&t.union(bp.moduleParsed),e.buildEnd&&t.union(bp.buildEnd),e.renderStart&&t.union(bp.renderStart),e.renderError&&t.union(bp.renderError),e.renderChunk&&t.union(bp.renderChunk),e.augmentChunkHash&&t.union(bp.augmentChunkHash),e.generateBundle&&t.union(bp.generateBundle),e.writeBundle&&t.union(bp.writeBundle),e.closeBundle&&t.union(bp.closeBundle),e.watchChange&&t.union(bp.watchChange),e.closeWatcher&&t.union(bp.closeWatcher),e.banner&&t.union(bp.banner),e.footer&&t.union(bp.footer),e.intro&&t.union(bp.intro),e.outro&&t.union(bp.outro),t}function Cp(e,t,n,r,i,a,o,s){let c={plugin:e,options:t,outputOptions:n,pluginContextData:r,onLog:a,logLevel:o,watchMode:s,normalizedOutputPlugins:i},{plugin:l,meta:u}=$f(c),{plugin:d,meta:f,filter:p}=tp(c),{plugin:m,meta:h}=np(c),{plugin:g,meta:_}=ep(c),{plugin:v,meta:ee,filter:y}=rp(c),{plugin:b,meta:x}=op(c),{plugin:te,meta:S,filter:ne}=ip(c),{plugin:re,meta:ie,filter:C}=cp(c),{plugin:ae,meta:w}=lp(c),{plugin:oe,meta:T}=sp(c),{plugin:se,meta:ce}=up(c),{plugin:E,meta:D}=dp(c),{plugin:le,meta:ue}=fp(c),{plugin:de,meta:O}=pp(c),{plugin:k,meta:A}=mp(c),{plugin:j,meta:fe}=hp(c),{plugin:pe,meta:me}=gp(c),{plugin:M,meta:he}=_p(c),{plugin:ge,meta:N}=vp(c),{plugin:P,meta:_e}=yp(c),ve=Sp(e).inner();return wp({name:e.name,buildStart:l,buildStartMeta:u,resolveId:d,resolveIdMeta:f,resolveIdFilter:p,resolveDynamicImport:m,resolveDynamicImportMeta:h,buildEnd:g,buildEndMeta:_,transform:v,transformMeta:ee,transformFilter:y,moduleParsed:b,moduleParsedMeta:x,load:te,loadMeta:S,loadFilter:ne,renderChunk:re,renderChunkMeta:ie,renderChunkFilter:C,augmentChunkHash:ae,augmentChunkHashMeta:w,renderStart:oe,renderStartMeta:T,renderError:se,renderErrorMeta:ce,generateBundle:E,generateBundleMeta:D,writeBundle:le,writeBundleMeta:ue,closeBundle:de,closeBundleMeta:O,banner:k,bannerMeta:A,footer:j,footerMeta:fe,intro:pe,introMeta:me,outro:M,outroMeta:he,watchChange:ge,watchChangeMeta:N,closeWatcher:P,closeWatcherMeta:_e,hookUsage:ve})}function wp(e){for(let t of[`buildStart`,`resolveId`,`resolveDynamicImport`,`buildEnd`,`transform`,`moduleParsed`,`load`,`renderChunk`,`augmentChunkHash`,`renderStart`,`renderError`,`generateBundle`,`writeBundle`,`closeBundle`,`banner`,`footer`,`intro`,`outro`,`watchChange`,`closeWatcher`]){let n=e[t];n&&(e[t]=async(...r)=>{try{return await n(...r)}catch(n){return gd(hd(n,e.name,{hook:t,id:t===`transform`?r[2]:void 0}))}})}return e}var Tp=class extends nf{inner;constructor(e,t){super(),this.onLog=t,this.inner=e}get shimMissingExports(){return this.inner.shimMissingExports}get input(){return this.inner.input}get cwd(){return this.inner.cwd}get platform(){return this.inner.platform}get context(){return this.inner.context}};R([L],Tp.prototype,`shimMissingExports`,null),R([L],Tp.prototype,`input`,null),R([L],Tp.prototype,`cwd`,null),R([L],Tp.prototype,`platform`,null),R([L],Tp.prototype,`context`,null);var z=class extends nf{constructor(e,t,n){super(),this.inner=e,this.outputOptions=t,this.normalizedOutputPlugins=n}get dir(){return this.inner.dir??void 0}get entryFileNames(){return this.inner.entryFilenames||this.outputOptions.entryFileNames}get chunkFileNames(){return this.inner.chunkFilenames||this.outputOptions.chunkFileNames}get assetFileNames(){return this.inner.assetFilenames||this.outputOptions.assetFileNames}get format(){return this.inner.format}get exports(){return this.inner.exports}get sourcemap(){return this.inner.sourcemap}get sourcemapBaseUrl(){return this.inner.sourcemapBaseUrl??void 0}get cssEntryFileNames(){return this.inner.cssEntryFilenames||this.outputOptions.cssEntryFileNames}get cssChunkFileNames(){return this.inner.cssChunkFilenames||this.outputOptions.cssChunkFileNames}get shimMissingExports(){return this.inner.shimMissingExports}get name(){return this.inner.name??void 0}get file(){return this.inner.file??void 0}get codeSplitting(){return this.inner.codeSplitting}get inlineDynamicImports(){return!this.inner.codeSplitting}get dynamicImportInCjs(){return this.inner.dynamicImportInCjs}get externalLiveBindings(){return this.inner.externalLiveBindings}get banner(){return Ep(this.outputOptions.banner)}get footer(){return Ep(this.outputOptions.footer)}get postBanner(){return Ep(this.outputOptions.postBanner)}get postFooter(){return Ep(this.outputOptions.postFooter)}get intro(){return Ep(this.outputOptions.intro)}get outro(){return Ep(this.outputOptions.outro)}get esModule(){return this.inner.esModule}get extend(){return this.inner.extend}get globals(){return this.inner.globals||this.outputOptions.globals}get paths(){return this.outputOptions.paths}get hashCharacters(){return this.inner.hashCharacters}get sourcemapDebugIds(){return this.inner.sourcemapDebugIds}get sourcemapIgnoreList(){return this.outputOptions.sourcemapIgnoreList}get sourcemapPathTransform(){return this.outputOptions.sourcemapPathTransform}get minify(){let e=this.inner.minify;return typeof e==`object`&&e&&(delete e.codegen,delete e.module,delete e.sourcemap),e}get legalComments(){return this.inner.legalComments}get polyfillRequire(){return this.inner.polyfillRequire}get plugins(){return this.normalizedOutputPlugins}get preserveModules(){return this.inner.preserveModules}get preserveModulesRoot(){return this.inner.preserveModulesRoot}get virtualDirname(){return this.inner.virtualDirname}get topLevelVar(){return this.inner.topLevelVar??!1}get minifyInternalExports(){return this.inner.minifyInternalExports??!1}};R([L],z.prototype,`dir`,null),R([L],z.prototype,`entryFileNames`,null),R([L],z.prototype,`chunkFileNames`,null),R([L],z.prototype,`assetFileNames`,null),R([L],z.prototype,`format`,null),R([L],z.prototype,`exports`,null),R([L],z.prototype,`sourcemap`,null),R([L],z.prototype,`sourcemapBaseUrl`,null),R([L],z.prototype,`cssEntryFileNames`,null),R([L],z.prototype,`cssChunkFileNames`,null),R([L],z.prototype,`shimMissingExports`,null),R([L],z.prototype,`name`,null),R([L],z.prototype,`file`,null),R([L],z.prototype,`codeSplitting`,null),R([L],z.prototype,`inlineDynamicImports`,null),R([L],z.prototype,`dynamicImportInCjs`,null),R([L],z.prototype,`externalLiveBindings`,null),R([L],z.prototype,`banner`,null),R([L],z.prototype,`footer`,null),R([L],z.prototype,`postBanner`,null),R([L],z.prototype,`postFooter`,null),R([L],z.prototype,`intro`,null),R([L],z.prototype,`outro`,null),R([L],z.prototype,`esModule`,null),R([L],z.prototype,`extend`,null),R([L],z.prototype,`globals`,null),R([L],z.prototype,`paths`,null),R([L],z.prototype,`hashCharacters`,null),R([L],z.prototype,`sourcemapDebugIds`,null),R([L],z.prototype,`sourcemapIgnoreList`,null),R([L],z.prototype,`sourcemapPathTransform`,null),R([L],z.prototype,`minify`,null),R([L],z.prototype,`legalComments`,null),R([L],z.prototype,`polyfillRequire`,null),R([L],z.prototype,`plugins`,null),R([L],z.prototype,`preserveModules`,null),R([L],z.prototype,`preserveModulesRoot`,null),R([L],z.prototype,`virtualDirname`,null),R([L],z.prototype,`topLevelVar`,null),R([L],z.prototype,`minifyInternalExports`,null);function Ep(e){return typeof e==`function`?e:()=>e||``}var Dp=class{moduleOptionMap=new Map;resolveOptionsMap=new Map;loadModulePromiseMap=new Map;renderedChunkMeta=null;normalizedInputOptions=null;normalizedOutputOptions=null;constructor(e,t,n){this.onLog=e,this.outputOptions=t,this.normalizedOutputPlugins=n}updateModuleOption(e,t){let n=this.moduleOptionMap.get(e);if(n)t.moduleSideEffects!=null&&(n.moduleSideEffects=t.moduleSideEffects),t.meta!=null&&Object.assign(n.meta,t.meta),t.invalidate!=null&&(n.invalidate=t.invalidate);else return this.moduleOptionMap.set(e,t),t;return n}getModuleOption(e){let t=this.moduleOptionMap.get(e);if(!t){let t={moduleSideEffects:null,meta:{}};return this.moduleOptionMap.set(e,t),t}return t}getModuleInfo(e,t){let n=t.getModuleInfo(e);if(n){let t=kf(n,this.getModuleOption(e));return this.proxyModuleInfo(e,t)}return null}proxyModuleInfo(e,t){let n=t.moduleSideEffects;return Object.defineProperty(t,`moduleSideEffects`,{get(){return n},set:r=>{this.updateModuleOption(e,{moduleSideEffects:r,meta:t.meta,invalidate:!0}),n=r}}),t}getModuleIds(e){return e.getModuleIds().values()}saveResolveOptions(e){let t=this.resolveOptionsMap.size;return this.resolveOptionsMap.set(t,e),t}getSavedResolveOptions(e){return this.resolveOptionsMap.get(e)}removeSavedResolveOptions(e){this.resolveOptionsMap.delete(e)}setRenderChunkMeta(e){this.renderedChunkMeta=e}getRenderChunkMeta(){return this.renderedChunkMeta}getInputOptions(e){return this.normalizedInputOptions??=new Tp(e,this.onLog),this.normalizedInputOptions}getOutputOptions(e){return this.normalizedOutputOptions??=new z(e,this.outputOptions,this.normalizedOutputPlugins),this.normalizedOutputOptions}clear(){this.renderedChunkMeta=null,this.loadModulePromiseMap.clear()}};function Op(e){let t=e.transform,n=t?.define?Object.entries(t.define):void 0,r=t?.inject,i=t?.dropLabels,a;if(t){let{define:e,inject:n,dropLabels:r,...i}=t;Object.keys(i).length>0&&(i.jsx===!1&&(i.jsx=`disable`),a=i)}return{define:n,inject:r,dropLabels:i,oxcTransformOptions:a}}function kp(e,t,n,r,i,a,o){let s=new Dp(i,n,r),c=e.map(e=>{if(!(`_parallel`in e)){if(e instanceof vd)switch(e.name){case`builtin:vite-manifest`:return bd(e,s);default:return yd(e)}return Cp(e,t,n,s,r,i,a,o)}}),l=Op(t);return{input:Lp(t.input),plugins:c,cwd:t.cwd??process.cwd(),external:Mp(t.external),resolve:Pp(t.resolve),platform:t.platform,shimMissingExports:t.shimMissingExports,logLevel:Ip(a),onLog:async(e,t)=>i(e,t),treeshake:zp(t.treeshake),moduleTypes:t.moduleTypes,define:l.define,inject:Fp(l.inject),experimental:Np(t.experimental),profilerNames:n.generatedCode?.profilerNames,transform:l.oxcTransformOptions,watch:Rp(t.watch),dropLabels:l.dropLabels,keepNames:n.keepNames,checks:t.checks,deferSyncScanData:()=>{let e=[];return s.moduleOptionMap.forEach((t,n)=>{t.invalidate&&e.push({id:n,sideEffects:t.moduleSideEffects??void 0})}),e},makeAbsoluteExternalsRelative:Bp(t.makeAbsoluteExternalsRelative),devtools:t.devtools,invalidateJsSideCache:s.clear.bind(s),preserveEntrySignatures:Vp(t.preserveEntrySignatures),optimization:t.optimization,context:t.context,tsconfig:t.resolve?.tsconfigFilename??t.tsconfig}}function Ap(e){if(e)return typeof e==`boolean`?e?{}:void 0:e}function jp(e){switch(e){case void 0:return;case`full`:return Cf.BindingAttachDebugInfo.Full;case`simple`:return Cf.BindingAttachDebugInfo.Simple;case`none`:return Cf.BindingAttachDebugInfo.None}}function Mp(e){if(e)return typeof e==`function`?(t,n,r)=>t.startsWith(`\0`)?!1:e(t,n,r)??!1:_u(e)}function Np(e){let t=Cf.BindingChunkModuleOrderBy.ExecOrder;if(e?.chunkModulesOrder)switch(e.chunkModulesOrder){case`exec-order`:t=Cf.BindingChunkModuleOrderBy.ExecOrder;break;case`module-id`:t=Cf.BindingChunkModuleOrderBy.ModuleId;break;default:throw Error(`Unexpected chunkModulesOrder: ${e.chunkModulesOrder}`)}return{viteMode:e?.viteMode,resolveNewUrlToAsset:e?.resolveNewUrlToAsset,devMode:Ap(e?.devMode),attachDebugInfo:jp(e?.attachDebugInfo),chunkModulesOrder:t,chunkImportMap:e?.chunkImportMap,onDemandWrapping:e?.onDemandWrapping,incrementalBuild:e?.incrementalBuild,nativeMagicString:e?.nativeMagicString,chunkOptimization:e?.chunkOptimization}}function Pp(e){let t=typeof process==`object`&&!!process.versions?.pnp;if(e){let{alias:n,extensionAlias:r,...i}=e;return{alias:n?Object.entries(n).map(([e,t])=>({find:e,replacements:t===!1?[void 0]:_u(t)})):void 0,extensionAlias:r?Object.entries(r).map(([e,t])=>({target:e,replacements:t})):void 0,yarnPnp:t,...i}}else return{yarnPnp:t}}function Fp(e){if(e)return Object.entries(e).map(([e,t])=>Array.isArray(t)?t[1]===`*`?{tagNamespace:!0,alias:e,from:t[0]}:{tagNamed:!0,alias:e,from:t[0],imported:t[1]}:{tagNamed:!0,imported:`default`,alias:e,from:t})}function Ip(e){switch(e){case`silent`:return Cf.BindingLogLevel.Silent;case`debug`:return Cf.BindingLogLevel.Debug;case`warn`:return Cf.BindingLogLevel.Warn;case`info`:return Cf.BindingLogLevel.Info;default:throw Error(`Unexpected log level: ${e}`)}}function Lp(e){return e===void 0?[]:typeof e==`string`?[{import:e}]:Array.isArray(e)?e.map(e=>({import:e})):Object.entries(e).map(([e,t])=>({name:e,import:t}))}function Rp(e){if(e)return{buildDelay:e.buildDelay,skipWrite:e.skipWrite,include:xd(e.include),exclude:xd(e.exclude),onInvalidate:(...t)=>e.onInvalidate?.(...t)}}function zp(e){if(e===!1)return;if(e===!0||e===void 0)return{moduleSideEffects:!0};let t={moduleSideEffects:!0,annotations:e.annotations,manualPureFunctions:e.manualPureFunctions,unknownGlobalSideEffects:e.unknownGlobalSideEffects,invalidImportSideEffects:e.invalidImportSideEffects,commonjs:e.commonjs};switch(e.propertyReadSideEffects){case`always`:t.propertyReadSideEffects=Cf.BindingPropertyReadSideEffects.Always;break;case!1:t.propertyReadSideEffects=Cf.BindingPropertyReadSideEffects.False;break;default:}switch(e.propertyWriteSideEffects){case`always`:t.propertyWriteSideEffects=Cf.BindingPropertyWriteSideEffects.Always;break;case!1:t.propertyWriteSideEffects=Cf.BindingPropertyWriteSideEffects.False;break;default:}return e.moduleSideEffects===void 0?t.moduleSideEffects=!0:e.moduleSideEffects===`no-external`?t.moduleSideEffects=[{external:!0,sideEffects:!1},{external:!1,sideEffects:!0}]:t.moduleSideEffects=e.moduleSideEffects,t}function Bp(e){if(e===`ifRelativeSource`)return{type:`IfRelativeSource`};if(typeof e==`boolean`)return{type:`Bool`,field0:e}}function Vp(e){if(e!=null)return typeof e==`string`?{type:`String`,field0:e}:{type:`Bool`,field0:e}}function Hp(e,t,n,r){let i=Xd[n],a=(n,o,s=new Set)=>{if(!(Xd[n]<i)){for(let t of rm(`onLog`,e)){if(s.has(t))continue;let{onLog:e}=t;if(e){let c=e=>Xd[e]<i?()=>{}:n=>a(e,Zd(n),new Set(s).add(t));if((`handler`in e?e.handler:e).call({debug:c(Yd),error:e=>gd(Zd(e)),info:c(Jd),meta:{rollupVersion:`4.23.0`,rolldownVersion:Kd,watchMode:r},warn:c(qd),pluginName:t.name||`unknown`},n,o)===!1)return}}t(n,o)}};return a}const Up=(e,t,n=Kp)=>{let{onwarn:r,onLog:i}=e,a=Wp(n,r);if(i){let e=Xd[t];return(t,n)=>i(t,Gp(n),(t,n)=>{if(t===`error`)return gd(Zd(n));Xd[t]>=e&&a(t,Zd(n))})}return a},Wp=(e,t)=>t?(n,r)=>{n===qd?t(Gp(r),t=>e(qd,Zd(t))):e(n,r)}:e,Gp=e=>(Object.defineProperty(e,`toString`,{value:()=>qp(e),writable:!0}),e),Kp=(e,t)=>{let n=qp(t);switch(e){case qd:return console.warn(n);case Yd:return console.debug(n);default:return console.info(n)}},qp=e=>{let t=``;return e.plugin&&(t+=`(${e.plugin} plugin) `),e.loc&&(t+=`${Jp(e.loc.file)} (${e.loc.line}:${e.loc.column}) `),t+e.message};function Jp(e){return i.isAbsolute(e)?i.relative(i.resolve(),e):e}const Yp=[`options`,`buildStart`,`resolveId`,`load`,`transform`,`moduleParsed`,`buildEnd`,`onLog`,`resolveDynamicImport`,`closeBundle`,`closeWatcher`,`watchChange`],Xp=[`augmentChunkHash`,`outputOptions`,`renderChunk`,`renderStart`,`renderError`,`writeBundle`,`generateBundle`],B=[...Yp,...Xp,`footer`,`banner`,`intro`,`outro`];B[0],B[0],B[1],B[1],B[2],B[2],B[3],B[3],B[4],B[4],B[5],B[5],B[6],B[6],B[7],B[7],B[8],B[8],B[9],B[9],B[10],B[10],B[11],B[11],B[12],B[12],B[13],B[13],B[14],B[14],B[15],B[15],B[16],B[16],B[17],B[17],B[18],B[18],B[19],B[19],B[20],B[20],B[21],B[21],B[22],B[22];async function Zp(e){do e=(await Promise.all(e)).flat(1/0);while(e.some(e=>e?.then));return e}const Qp=async e=>(await Zp([e])).filter(Boolean);function $p(e,t){for(let n of e)for(let e of Yp)e in n&&(delete n[e],t(qd,fd(n.name,e)));return e}function em(e,t){for(let[n,r]of e.entries())`_parallel`in r||r instanceof vd||(r.name||=`${t}${n+1}`);return e}var tm=class{static async callOptionsHook(e,t=!1){let n=e.logLevel||Jd,r=rm(`options`,nm(await Qp(e.plugins))),i=Hp(r,Up(e,n),n,t);for(let a of r){let r=a.name||`unknown`,o=a.options;if(o){let{handler:a}=$d(o),s=await a.call(new ef(i,n,r,t,`onLog`),e);s&&(e=s)}}return e}static callOutputOptionsHook(e,t,n,r,i){let a=rm(`outputOptions`,nm(e));for(let e of a){let a=e.name||`unknown`,o=e.outputOptions;if(o){let{handler:e}=$d(o),s=e.call(new ef(n,r,a,i),t);s&&(t=s)}}return t}};function nm(e){return e.filter(e=>{if(e&&!(`_parallel`in e)&&!(e instanceof vd))return e})}function rm(e,t){let n=[],r=[],i=[];for(let a of t){let t=a[e];if(t){if(typeof t==`object`){if(t.order===`pre`){n.push(a);continue}if(t.order===`post`){i.push(a);continue}}r.push(a)}}return[...n,...r,...i]}function im(e){return{lang:e?.lang??void 0,message:e?.message,abortEarly:e?.abortEarly??void 0,abortPipeEarly:e?.abortPipeEarly??void 0}}function am(e){return(void 0)?.get(e)}function om(e){return(void 0)?.get(e)}function sm(e,t){return(void 0)?.get(e)?.get(t)}function cm(e){let t=typeof e;return t===`string`?`"${e}"`:t===`number`||t===`bigint`||t===`boolean`?`${e}`:t===`object`||t===`function`?(e&&Object.getPrototypeOf(e)?.constructor?.name)??`null`:t}function lm(e,t,n,r,i){let a=i&&`input`in i?i.input:n.value,o=i?.expected??e.expects??null,s=i?.received??cm(a),c={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:`R`}eceived ${s}`,requirement:e.requirement,path:i?.path,issues:i?.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},l=e.kind===`schema`,u=i?.message??e.message??sm(e.reference,c.lang)??(l?om(c.lang):null)??r.message??am(c.lang);u!==void 0&&(c.message=typeof u==`function`?u(c):u),l&&(n.typed=!1),n.issues?n.issues.push(c):n.issues=[c]}function V(e){return{version:1,vendor:`valibot`,validate(t){return e[`~run`]({value:t},im())}}}function um(e,t){return Object.hasOwn(e,t)&&t!==`__proto__`&&t!==`prototype`&&t!==`constructor`}function dm(e,t){let n=[...new Set(e)];return n.length>1?`(${n.join(` ${t} `)})`:n[0]??`never`}var fm=class extends Error{constructor(e){super(e[0].message),this.name=`ValiError`,this.issues=e}};function pm(e){return{kind:`transformation`,type:`args`,reference:pm,async:!1,schema:e,"~run"(e,t){let n=e.value;return e.value=(...e)=>{let r=this.schema[`~run`]({value:e},t);if(r.issues)throw new fm(r.issues);return n(...r.value)},e}}}function mm(){return{kind:`transformation`,type:`await`,reference:mm,async:!0,async"~run"(e){return e.value=await e.value,e}}}function H(e){return{kind:`metadata`,type:`description`,reference:H,description:e}}function hm(e){return{kind:`transformation`,type:`returns`,reference:hm,async:!1,schema:e,"~run"(e,t){let n=e.value;return e.value=(...e)=>{let r=this.schema[`~run`]({value:n(...e)},t);if(r.issues)throw new fm(r.issues);return r.value},e}}}function gm(e){return{kind:`transformation`,type:`returns`,reference:gm,async:!1,schema:e,"~run"(e,t){let n=e.value;return e.value=async(...e)=>{let r=await this.schema[`~run`]({value:await n(...e)},t);if(r.issues)throw new fm(r.issues);return r.value},e}}}function _m(e,t,n){return typeof e.fallback==`function`?e.fallback(t,n):e.fallback}function vm(e,t,n){return typeof e.default==`function`?e.default(t,n):e.default}function ym(){return{kind:`schema`,type:`any`,reference:ym,expects:`any`,async:!1,get"~standard"(){return V(this)},"~run"(e){return e.typed=!0,e}}}function bm(e,t){return{kind:`schema`,type:`array`,reference:bm,expects:`Array`,async:!1,item:e,message:t,get"~standard"(){return V(this)},"~run"(e,t){let n=e.value;if(Array.isArray(n)){e.typed=!0,e.value=[];for(let r=0;r<n.length;r++){let i=n[r],a=this.item[`~run`]({value:i},t);if(a.issues){let o={type:`array`,origin:`value`,input:n,key:r,value:i};for(let t of a.issues)t.path?t.path.unshift(o):t.path=[o],e.issues?.push(t);if(e.issues||=a.issues,t.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}}else lm(this,`type`,e,t);return e}}}function U(e){return{kind:`schema`,type:`boolean`,reference:U,expects:`boolean`,async:!1,message:e,get"~standard"(){return V(this)},"~run"(e,t){return typeof e.value==`boolean`?e.typed=!0:lm(this,`type`,e,t),e}}}function xm(e,t){return{kind:`schema`,type:`custom`,reference:xm,expects:`unknown`,async:!1,check:e,message:t,get"~standard"(){return V(this)},"~run"(e,t){return this.check(e.value)?e.typed=!0:lm(this,`type`,e,t),e}}}function Sm(e){return{kind:`schema`,type:`function`,reference:Sm,expects:`Function`,async:!1,message:e,get"~standard"(){return V(this)},"~run"(e,t){return typeof e.value==`function`?e.typed=!0:lm(this,`type`,e,t),e}}}function Cm(e,t){return{kind:`schema`,type:`instance`,reference:Cm,expects:e.name,async:!1,class:e,message:t,get"~standard"(){return V(this)},"~run"(e,t){return e.value instanceof this.class?e.typed=!0:lm(this,`type`,e,t),e}}}function W(e,t){return{kind:`schema`,type:`literal`,reference:W,expects:cm(e),async:!1,literal:e,message:t,get"~standard"(){return V(this)},"~run"(e,t){return e.value===this.literal?e.typed=!0:lm(this,`type`,e,t),e}}}function wm(e,t){return{kind:`schema`,type:`loose_object`,reference:wm,expects:`Object`,async:!1,entries:e,message:t,get"~standard"(){return V(this)},"~run"(e,t){let n=e.value;if(n&&typeof n==`object`){for(let r in e.typed=!0,e.value={},this.entries){let i=this.entries[r];if(r in n||(i.type===`exact_optional`||i.type===`optional`||i.type===`nullish`)&&i.default!==void 0){let a=r in n?n[r]:vm(i),o=i[`~run`]({value:a},t);if(o.issues){let i={type:`object`,origin:`value`,input:n,key:r,value:a};for(let t of o.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||=o.issues,t.abortEarly){e.typed=!1;break}}o.typed||(e.typed=!1),e.value[r]=o.value}else if(i.fallback!==void 0)e.value[r]=_m(i);else if(i.type!==`exact_optional`&&i.type!==`optional`&&i.type!==`nullish`&&(lm(this,`key`,e,t,{input:void 0,expected:`"${r}"`,path:[{type:`object`,origin:`key`,input:n,key:r,value:n[r]}]}),t.abortEarly))break}if(!e.issues||!t.abortEarly)for(let t in n)um(n,t)&&!(t in this.entries)&&(e.value[t]=n[t])}else lm(this,`type`,e,t);return e}}}function Tm(e){return{kind:`schema`,type:`never`,reference:Tm,expects:`never`,async:!1,message:e,get"~standard"(){return V(this)},"~run"(e,t){return lm(this,`type`,e,t),e}}}function Em(e,t){return{kind:`schema`,type:`nullish`,reference:Em,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return V(this)},"~run"(e,t){return(e.value===null||e.value===void 0)&&(this.default!==void 0&&(e.value=vm(this,e,t)),e.value===null||e.value===void 0)?(e.typed=!0,e):this.wrapped[`~run`](e,t)}}}function Dm(e){return{kind:`schema`,type:`number`,reference:Dm,expects:`number`,async:!1,message:e,get"~standard"(){return V(this)},"~run"(e,t){return typeof e.value==`number`&&!isNaN(e.value)?e.typed=!0:lm(this,`type`,e,t),e}}}function Om(e,t){return{kind:`schema`,type:`object`,reference:Om,expects:`Object`,async:!1,entries:e,message:t,get"~standard"(){return V(this)},"~run"(e,t){let n=e.value;if(n&&typeof n==`object`)for(let r in e.typed=!0,e.value={},this.entries){let i=this.entries[r];if(r in n||(i.type===`exact_optional`||i.type===`optional`||i.type===`nullish`)&&i.default!==void 0){let a=r in n?n[r]:vm(i),o=i[`~run`]({value:a},t);if(o.issues){let i={type:`object`,origin:`value`,input:n,key:r,value:a};for(let t of o.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||=o.issues,t.abortEarly){e.typed=!1;break}}o.typed||(e.typed=!1),e.value[r]=o.value}else if(i.fallback!==void 0)e.value[r]=_m(i);else if(i.type!==`exact_optional`&&i.type!==`optional`&&i.type!==`nullish`&&(lm(this,`key`,e,t,{input:void 0,expected:`"${r}"`,path:[{type:`object`,origin:`key`,input:n,key:r,value:n[r]}]}),t.abortEarly))break}else lm(this,`type`,e,t);return e}}}function G(e,t){return{kind:`schema`,type:`optional`,reference:G,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return V(this)},"~run"(e,t){return e.value===void 0&&(this.default!==void 0&&(e.value=vm(this,e,t)),e.value===void 0)?(e.typed=!0,e):this.wrapped[`~run`](e,t)}}}function km(e){return{kind:`schema`,type:`promise`,reference:km,expects:`Promise`,async:!1,message:e,get"~standard"(){return V(this)},"~run"(e,t){return e.value instanceof Promise?e.typed=!0:lm(this,`type`,e,t),e}}}function Am(e,t,n){return{kind:`schema`,type:`record`,reference:Am,expects:`Object`,async:!1,key:e,value:t,message:n,get"~standard"(){return V(this)},"~run"(e,t){let n=e.value;if(n&&typeof n==`object`){for(let r in e.typed=!0,e.value={},n)if(um(n,r)){let i=n[r],a=this.key[`~run`]({value:r},t);if(a.issues){let o={type:`object`,origin:`key`,input:n,key:r,value:i};for(let t of a.issues)t.path=[o],e.issues?.push(t);if(e.issues||=a.issues,t.abortEarly){e.typed=!1;break}}let o=this.value[`~run`]({value:i},t);if(o.issues){let a={type:`object`,origin:`value`,input:n,key:r,value:i};for(let t of o.issues)t.path?t.path.unshift(a):t.path=[a],e.issues?.push(t);if(e.issues||=o.issues,t.abortEarly){e.typed=!1;break}}(!a.typed||!o.typed)&&(e.typed=!1),a.typed&&(e.value[a.value]=o.value)}}else lm(this,`type`,e,t);return e}}}function K(e,t){return{kind:`schema`,type:`strict_object`,reference:K,expects:`Object`,async:!1,entries:e,message:t,get"~standard"(){return V(this)},"~run"(e,t){let n=e.value;if(n&&typeof n==`object`){for(let r in e.typed=!0,e.value={},this.entries){let i=this.entries[r];if(r in n||(i.type===`exact_optional`||i.type===`optional`||i.type===`nullish`)&&i.default!==void 0){let a=r in n?n[r]:vm(i),o=i[`~run`]({value:a},t);if(o.issues){let i={type:`object`,origin:`value`,input:n,key:r,value:a};for(let t of o.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||=o.issues,t.abortEarly){e.typed=!1;break}}o.typed||(e.typed=!1),e.value[r]=o.value}else if(i.fallback!==void 0)e.value[r]=_m(i);else if(i.type!==`exact_optional`&&i.type!==`optional`&&i.type!==`nullish`&&(lm(this,`key`,e,t,{input:void 0,expected:`"${r}"`,path:[{type:`object`,origin:`key`,input:n,key:r,value:n[r]}]}),t.abortEarly))break}if(!e.issues||!t.abortEarly){for(let r in n)if(!(r in this.entries)){lm(this,`key`,e,t,{input:r,expected:`never`,path:[{type:`object`,origin:`key`,input:n,key:r,value:n[r]}]});break}}}else lm(this,`type`,e,t);return e}}}function q(e){return{kind:`schema`,type:`string`,reference:q,expects:`string`,async:!1,message:e,get"~standard"(){return V(this)},"~run"(e,t){return typeof e.value==`string`?e.typed=!0:lm(this,`type`,e,t),e}}}function jm(e,t){return{kind:`schema`,type:`tuple`,reference:jm,expects:`Array`,async:!1,items:e,message:t,get"~standard"(){return V(this)},"~run"(e,t){let n=e.value;if(Array.isArray(n)){e.typed=!0,e.value=[];for(let r=0;r<this.items.length;r++){let i=n[r],a=this.items[r][`~run`]({value:i},t);if(a.issues){let o={type:`array`,origin:`value`,input:n,key:r,value:i};for(let t of a.issues)t.path?t.path.unshift(o):t.path=[o],e.issues?.push(t);if(e.issues||=a.issues,t.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}}else lm(this,`type`,e,t);return e}}}function Mm(e){return{kind:`schema`,type:`undefined`,reference:Mm,expects:`undefined`,async:!1,message:e,get"~standard"(){return V(this)},"~run"(e,t){return e.value===void 0?e.typed=!0:lm(this,`type`,e,t),e}}}function Nm(e){let t;if(e)for(let n of e)t?t.push(...n.issues):t=n.issues;return t}function J(e,t){return{kind:`schema`,type:`union`,reference:J,expects:dm(e.map(e=>e.expects),`|`),async:!1,options:e,message:t,get"~standard"(){return V(this)},"~run"(e,t){let n,r,i;for(let a of this.options){let o=a[`~run`]({value:e.value},t);if(o.typed)if(o.issues)r?r.push(o):r=[o];else{n=o;break}else i?i.push(o):i=[o]}if(n)return n;if(r){if(r.length===1)return r[0];lm(this,`type`,e,t,{issues:Nm(r)}),e.typed=!0}else if(i?.length===1)return i[0];else lm(this,`type`,e,t,{issues:Nm(i)});return e}}}function Pm(e,t){return{kind:`schema`,type:`union`,reference:Pm,expects:dm(e.map(e=>e.expects),`|`),async:!0,options:e,message:t,get"~standard"(){return V(this)},async"~run"(e,t){let n,r,i;for(let a of this.options){let o=await a[`~run`]({value:e.value},t);if(o.typed)if(o.issues)r?r.push(o):r=[o];else{n=o;break}else i?i.push(o):i=[o]}if(n)return n;if(r){if(r.length===1)return r[0];lm(this,`type`,e,t,{issues:Nm(r)}),e.typed=!0}else if(i?.length===1)return i[0];else lm(this,`type`,e,t,{issues:Nm(i)});return e}}}function Fm(e){return{kind:`schema`,type:`void`,reference:Fm,expects:`void`,async:!1,message:e,get"~standard"(){return V(this)},"~run"(e,t){return e.value===void 0?e.typed=!0:lm(this,`type`,e,t),e}}}function Im(e,t){let n={...e.entries};for(let e of t)delete n[e];return{...e,entries:n,get"~standard"(){return V(this)}}}function Lm(e,t){let n={};for(let r in e.entries)n[r]=!t||t.includes(r)?G(e.entries[r]):e.entries[r];return{...e,entries:n,get"~standard"(){return V(this)}}}function Y(...e){return{...e[0],pipe:e,get"~standard"(){return V(this)},"~run"(t,n){for(let r of e)if(r.kind!==`metadata`){if(t.issues&&(r.kind===`schema`||r.kind===`transformation`)){t.typed=!1;break}(!t.issues||!n.abortEarly&&!n.abortPipeEarly)&&(t=r[`~run`](t,n))}return t}}}function Rm(...e){return{...e[0],pipe:e,async:!0,get"~standard"(){return V(this)},async"~run"(t,n){for(let r of e)if(r.kind!==`metadata`){if(t.issues&&(r.kind===`schema`||r.kind===`transformation`)){t.typed=!1;break}(!t.issues||!n.abortEarly&&!n.abortPipeEarly)&&(t=await r[`~run`](t,n))}return t}}}function zm(e,t,n){let r=e[`~run`]({value:t},im(n));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}function Bm(...e){return _(...e)}const Vm=J([q(),Cm(RegExp)]);function Hm(){return Sm()}const Um=J([W(`debug`),W(`info`),W(`warn`)]),Wm=J([Um,W(`silent`)]),Gm=J([Um,W(`error`)]),Km=ym(),qm=J([Km,q()]),Jm=J([q(),bm(q()),Am(q(),q())]),Ym=Y(Hm(),pm(jm([q(),G(q()),U()])),hm(Em(U()))),Xm=J([Vm,bm(Vm),Ym]),Zm=Am(q(),J([W(`asset`),W(`base64`),W(`binary`),W(`css`),W(`dataurl`),W(`empty`),W(`js`),W(`json`),W(`jsx`),W(`text`),W(`ts`),W(`tsx`)])),Qm=Om({assumptions:G(Om({ignoreFunctionLength:G(U()),noDocumentAll:G(U()),objectRestNoSymbols:G(U()),pureGetters:G(U()),setPublicClassFields:G(U())})),typescript:G(Om({jsxPragma:G(q()),jsxPragmaFrag:G(q()),onlyRemoveTypeImports:G(U()),allowNamespaces:G(U()),allowDeclareFields:G(U()),declaration:G(Om({stripInternal:G(U()),sourcemap:G(U())})),rewriteImportExtensions:G(J([W(`rewrite`),W(`remove`),U()]))})),helpers:G(Om({mode:G(J([W(`Runtime`),W(`External`)]))})),decorators:G(Om({legacy:G(U()),emitDecoratorMetadata:G(U())})),jsx:G(J([W(!1),W(`preserve`),W(`react`),W(`react-jsx`),K({runtime:Y(G(J([W(`classic`),W(`automatic`)])),H(`Which runtime to use`)),development:Y(G(U()),H(`Development specific information`)),throwIfNamespace:Y(G(U()),H(`Toggles whether to throw an error when a tag name uses an XML namespace`)),importSource:Y(G(q()),H(`Import the factory of element and fragment if mode is classic`)),pragma:Y(G(q()),H(`Jsx element transformation`)),pragmaFrag:Y(G(q()),H(`Jsx fragment transformation`)),refresh:Y(G(U()),H(`Enable react fast refresh`))})])),target:Y(G(J([q(),bm(q())])),H(`The JavaScript target environment`)),define:Y(G(Am(q(),q())),H(`Define global variables (syntax: key=value,key2=value2)`)),inject:Y(G(Am(q(),J([q(),jm([q(),q()])]))),H(`Inject import statements on demand`)),dropLabels:Y(G(bm(q())),H(`Remove labeled statements with these label names`))}),$m=K({chokidar:G(Tm(`The "watch.chokidar" option is deprecated, please use "watch.notify" instead of it`)),exclude:G(J([Vm,bm(Vm)])),include:G(J([Vm,bm(Vm)])),notify:Y(G(K({compareContents:G(U()),pollInterval:G(Dm())})),H(`Notify options`)),skipWrite:Y(G(U()),H(`Skip the bundle.write() step`)),buildDelay:Y(G(Dm()),H(`Throttle watch rebuilds`)),clearScreen:Y(G(U()),H(`Whether to clear the screen when a rebuild is triggered`)),onInvalidate:Y(G(Y(Sm(),pm(jm([q()])))),H(`An optional function that will be called immediately every time a module changes that is part of the build.`))}),eh=K({circularDependency:Y(G(U()),H(`Whether to emit warnings when detecting circular dependency`)),eval:Y(G(U()),H("Whether to emit warnings when detecting uses of direct `eval`s")),missingGlobalName:Y(G(U()),H("Whether to emit warnings when the `output.globals` option is missing when needed")),missingNameOptionForIifeExport:Y(G(U()),H("Whether to emit warnings when the `output.name` option is missing when needed")),mixedExports:Y(G(U()),H(`Whether to emit warnings when the way to export values is ambiguous`)),unresolvedEntry:Y(G(U()),H(`Whether to emit warnings when an entrypoint cannot be resolved`)),unresolvedImport:Y(G(U()),H(`Whether to emit warnings when an import cannot be resolved`)),filenameConflict:Y(G(U()),H(`Whether to emit warnings when files generated have the same name with different contents`)),commonJsVariableInEsm:Y(G(U()),H(`Whether to emit warnings when a CommonJS variable is used in an ES module`)),importIsUndefined:Y(G(U()),H(`Whether to emit warnings when an imported variable is not exported`)),emptyImportMeta:Y(G(U()),H("Whether to emit warnings when `import.meta` is not supported with the output format and is replaced with an empty object (`{}`)")),toleratedTransform:Y(G(U()),H(`Whether to emit warnings when detecting tolerated transform`)),cannotCallNamespace:Y(G(U()),H(`Whether to emit warnings when a namespace is called as a function`)),configurationFieldConflict:Y(G(U()),H(`Whether to emit warnings when a config value is overridden by another config value with a higher priority`)),preferBuiltinFeature:Y(G(U()),H(`Whether to emit warnings when a plugin that is covered by a built-in feature is used`)),couldNotCleanDirectory:Y(G(U()),H(`Whether to emit warnings when Rolldown could not clean the output directory`)),pluginTimings:Y(G(U()),H(`Whether to emit warnings when plugins take significant time during the build process`))}),th=K({compress:G(J([U(),K({target:G(J([W(`esnext`),W(`es2015`),W(`es2016`),W(`es2017`),W(`es2018`),W(`es2019`),W(`es2020`),W(`es2021`),W(`es2022`),W(`es2023`),W(`es2024`)])),dropConsole:G(U()),dropDebugger:G(U()),keepNames:G(K({function:U(),class:U()})),unused:G(J([U(),W(`keep_assign`)]))})])),mangle:G(J([U(),K({toplevel:G(U()),keepNames:G(J([U(),K({function:U(),class:U()})])),debug:G(U())})])),codegen:G(J([U(),K({removeWhitespace:G(U())})]))}),nh=K({alias:G(Am(q(),J([W(!1),q(),bm(q())]))),aliasFields:G(bm(bm(q()))),conditionNames:G(bm(q())),extensionAlias:G(Am(q(),bm(q()))),exportsFields:G(bm(bm(q()))),extensions:G(bm(q())),mainFields:G(bm(q())),mainFiles:G(bm(q())),modules:G(bm(q())),symlinks:G(U()),yarnPnp:G(U())}),rh=J([U(),wm({annotations:G(U()),manualPureFunctions:G(bm(q())),unknownGlobalSideEffects:G(U()),invalidImportSideEffects:G(U()),commonjs:G(U()),propertyReadSideEffects:G(J([W(!1),W(`always`)])),propertyWriteSideEffects:G(J([W(!1),W(`always`)]))})]),ih=K({inlineConst:Y(G(J([U(),K({mode:G(J([W(`all`),W(`smart`)])),pass:G(Dm())})])),H(`Enable crossmodule constant inlining`)),pifeForModuleWrappers:Y(G(U()),H(`Use PIFE pattern for module wrappers`))}),ah=Y(Hm(),pm(jm([Gm,qm]))),oh=Y(Hm(),pm(jm([Um,Km,ah]))),sh=Y(Hm(),pm(jm([Km,Y(Hm(),pm(jm([J([qm,Y(Hm(),hm(qm))])])))]))),ch=J([U(),K({port:G(Dm()),host:G(q()),implement:G(q()),lazy:G(U())})]),lh=K({input:G(Jm),plugins:G(xm(()=>!0)),external:G(Xm),makeAbsoluteExternalsRelative:G(J([U(),W(`ifRelativeSource`)])),resolve:G(nh),cwd:Y(G(q()),H(`Current working directory`)),platform:Y(G(J([W(`browser`),W(`neutral`),W(`node`)])),H(`Platform for which the code should be generated (node, ${Bm(`underline`,`browser`)}, neutral)`)),shimMissingExports:Y(G(U()),H(`Create shim variables for missing exports`)),treeshake:G(rh),optimization:G(ih),logLevel:Y(G(Wm),H(`Log level (${Bm(`dim`,`silent`)}, ${Bm([`underline`,`gray`],`info`)}, debug, ${Bm(`yellow`,`warn`)})`)),onLog:G(oh),onwarn:G(sh),moduleTypes:Y(G(Zm),H(`Module types for customized extensions`)),experimental:G(K({enableComposingJsPlugins:G(U()),viteMode:G(U()),resolveNewUrlToAsset:G(U()),strictExecutionOrder:G(U()),onDemandWrapping:G(U()),incrementalBuild:G(U()),devMode:G(ch),attachDebugInfo:G(J([W(`none`),W(`simple`),W(`full`)])),chunkModulesOrder:G(J([W(`module-id`),W(`exec-order`)])),chunkImportMap:G(J([U(),Om({baseUrl:G(q()),fileName:G(q())})])),nativeMagicString:G(U()),chunkOptimization:G(U())})),transform:G(Qm),watch:G(J([$m,W(!1)])),checks:G(eh),devtools:Y(G(Om({sessionId:Y(G(q()),H(`Used to name the build.`))})),H(`Enable debug mode. Emit debug information to disk. This might slow down the build process significantly.`)),preserveEntrySignatures:Y(G(J([W(`strict`),W(`allow-extension`),W(`exports-only`),W(!1)]))),tsconfig:Y(G(J([U(),q()])),H(`Path to the tsconfig.json file.`))}),uh=K({input:Y(G(bm(q())),H(`Entry file`)),external:Y(G(bm(q())),H("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),treeshake:Y(G(U()),H(`enable treeshaking`)),makeAbsoluteExternalsRelative:Y(G(U()),H(`Prevent normalization of external imports`)),preserveEntrySignatures:Y(G(W(!1)),H(`Avoid facade chunks for entry points`)),context:Y(G(q()),H("The entity top-level `this` represents."))}),dh=Im(K({...lh.entries,...uh.entries}),[`plugins`,`onwarn`,`onLog`,`resolve`,`experimental`,`watch`]),fh=J([W(`es`),W(`cjs`),W(`esm`),W(`module`),W(`commonjs`),W(`iife`),W(`umd`)]),ph=Y(Hm(),pm(jm([xm(()=>!0)])),gm(Pm([q(),Rm(km(),mm(),q())]))),mh=Y(Hm(),pm(jm([xm(()=>!0)])),hm(q())),hh=J([q(),mh]),gh=Y(Hm(),pm(jm([xm(()=>!0)])),hm(q())),_h=J([q(),gh]),vh=Y(Hm(),pm(jm([q()])),hm(q())),yh=J([U(),vh]),bh=Y(Hm(),pm(jm([q()])),hm(q())),xh=Y(Hm(),pm(jm([q()])),hm(q())),Sh=Y(Hm(),pm(jm([q(),Om({})])),hm(Em(q()))),Ch=Y(Hm(),pm(jm([q(),Om({})])),hm(Em(q()))),wh=Y(Hm(),pm(jm([q()])),hm(J([U(),Fm(),Mm()]))),Th=K({includeDependenciesRecursively:G(U()),minSize:G(Dm()),maxSize:G(Dm()),minModuleSize:G(Dm()),maxModuleSize:G(Dm()),minShareCount:G(Dm()),groups:G(bm(K({name:J([q(),Ch]),test:G(J([Vm,wh])),priority:G(Dm()),minSize:G(Dm()),minShareCount:G(Dm()),maxSize:G(Dm()),minModuleSize:G(Dm()),maxModuleSize:G(Dm())})))}),Eh=K({symbols:Y(G(U()),H(`Whether to use Symbol.toStringTag for namespace objects`)),preset:J([W(`es5`),W(`es2015`)]),profilerNames:Y(G(U()),H(`Whether to add readable names to internal variables for profiling purposes`))}),Dh=K({dir:Y(G(q()),H("Output directory, defaults to `dist` if `file` is not set")),file:Y(G(q()),H(`Single output file`)),exports:Y(G(J([W(`auto`),W(`named`),W(`default`),W(`none`)])),H(`Specify a export mode (${Bm(`underline`,`auto`)}, named, default, none)`)),hashCharacters:Y(G(J([W(`base64`),W(`base36`),W(`hex`)])),H(`Use the specified character set for file hashes`)),format:Y(G(fh),H(`Output format of the generated bundle (supports ${Bm(`underline`,`esm`)}, cjs, and iife)`)),sourcemap:Y(G(J([U(),W(`inline`),W(`hidden`)])),H(`Generate sourcemap (\`-s inline\` for inline, or ${Bm(`bold`,"pass the `-s` on the last argument if you want to generate `.map` file")})`)),sourcemapBaseUrl:Y(G(q()),H(`Base URL used to prefix sourcemap paths`)),sourcemapDebugIds:Y(G(U()),H(`Inject sourcemap debug IDs`)),sourcemapIgnoreList:G(J([U(),xm(()=>!0),Vm])),sourcemapPathTransform:G(xm(()=>!0)),banner:G(J([q(),ph])),footer:G(J([q(),ph])),postBanner:G(J([q(),ph])),postFooter:G(J([q(),ph])),intro:G(J([q(),ph])),outro:G(J([q(),ph])),extend:Y(G(U()),H(`Extend global variable defined by name in IIFE / UMD formats`)),esModule:G(J([U(),W(`if-default-prop`)])),assetFileNames:G(_h),entryFileNames:G(hh),chunkFileNames:G(hh),cssEntryFileNames:G(hh),cssChunkFileNames:G(hh),sanitizeFileName:G(yh),minify:Y(G(J([U(),W(`dce-only`),th])),H(`Minify the bundled file`)),name:Y(G(q()),H(`Name for UMD / IIFE format outputs`)),globals:Y(G(J([Am(q(),q()),bh])),H("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),paths:Y(G(J([Am(q(),q()),xh])),H(`Maps external module IDs to paths`)),generatedCode:Y(G(Lm(Eh)),H(`Generated code options`)),externalLiveBindings:Y(G(U()),H(`external live bindings`)),inlineDynamicImports:Y(G(U()),H(`Inline dynamic imports`)),dynamicImportInCjs:Y(G(U()),H(`Dynamic import in CJS output`)),manualChunks:G(Sh),codeSplitting:G(J([U(),Th])),advancedChunks:G(Th),legalComments:Y(G(J([W(`none`),W(`inline`)])),H(`Control comments in the output`)),plugins:G(xm(()=>!0)),polyfillRequire:Y(G(U()),H(`Disable require polyfill injection`)),hoistTransitiveImports:G(W(!1)),preserveModules:Y(G(U()),H(`Preserve module structure`)),preserveModulesRoot:Y(G(q()),H(`Put preserved modules under this path at root level`)),virtualDirname:G(q()),minifyInternalExports:Y(G(U()),H(`Minify internal exports`)),topLevelVar:Y(G(U()),H("Rewrite top-level declarations to use `var`.")),cleanDir:Y(G(U()),H(`Clean output directory before emitting output`)),keepNames:Y(G(U()),H(`Keep function and class names after bundling`))}),Oh=(e,t)=>`Code to insert the ${Bm(`bold`,e)} of the bundled file (${Bm(`bold`,t)} the wrapper function)`,kh=K({assetFileNames:Y(G(q()),H(`Name pattern for asset files`)),entryFileNames:Y(G(q()),H(`Name pattern for emitted entry chunks`)),chunkFileNames:Y(G(q()),H(`Name pattern for emitted secondary chunks`)),cssEntryFileNames:Y(G(q()),H(`Name pattern for emitted css entry chunks`)),cssChunkFileNames:Y(G(q()),H(`Name pattern for emitted css secondary chunks`)),sanitizeFileName:Y(G(U()),H(`Sanitize file name`)),banner:Y(G(q()),H(Oh(`top`,`outside`))),footer:Y(G(q()),H(Oh(`bottom`,`outside`))),postBanner:Y(G(q()),H("A string to prepend to the top of each chunk. Applied after the `renderChunk` hook and minification")),postFooter:Y(G(q()),H("A string to append to the bottom of each chunk. Applied after the `renderChunk` hook and minification")),intro:Y(G(q()),H(Oh(`top`,`inside`))),outro:Y(G(q()),H(Oh(`bottom`,`inside`))),esModule:Y(G(U()),H("Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)")),globals:Y(G(Am(q(),q())),H("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),codeSplitting:Y(G(J([U(),K({minSize:Y(G(Dm()),H(`Minimum size of the chunk`)),minShareCount:Y(G(Dm()),H(`Minimum share count of the chunk`))})])),H(`Code splitting options (true, false, or object)`)),advancedChunks:Y(G(K({minSize:Y(G(Dm()),H(`Minimum size of the chunk`)),minShareCount:Y(G(Dm()),H(`Minimum share count of the chunk`))})),H(`Deprecated: use codeSplitting instead`)),minify:Y(G(U()),H(`Minify the bundled file`))}),Ah=Im(K({...Dh.entries,...kh.entries}),[`sourcemapIgnoreList`,`sourcemapPathTransform`,`plugins`,`hoistTransitiveImports`]);({...dh.entries,...Ah.entries});const jh={output:{ignored:!0},"resolve.tsconfigFilename":{issueMsg:"It is deprecated. Please use the top-level `tsconfig` option instead."}},Mh={};function Nh(e,t){if(typeof t!=`object`)throw Error(`Invalid ${e} options. Expected an Object but received ${JSON.stringify(t)}.`);if(globalThis.process?.env?.ROLLUP_TEST)return;let n=zm(e===`input`?lh:Dh,t);if(!n.success){let t=n.issues.map(t=>{let n=t.message,r=t.path.map(e=>e.key);if(t.type===`union`){let e=t.issues?.find(e=>!(e.type!==t.received&&e.input===t.input));e&&(e.path&&r.push(e.path.map(e=>e.key)),n=e.message)}let i=r.join(`.`),a=e===`input`?jh[i]:Mh[i];return a&&a.ignored?``:`- For the "${i}". ${a?.issueMsg||n+`.`} ${a?.help?`\n Help: ${a.help}`:``}`}).filter(Boolean);t.length&&console.warn(`\x1b[33mWarning: Invalid ${e} options (${t.length} issue${t.length===1?``:`s`} found)\n${t.join(`
|
|
86
|
+
`)}\x1b[0m`)}}var Ph=class extends nf{constructor(e){super(),this.bindingOutputs=e}get output(){return yf(this.bindingOutputs).output}__rolldown_external_memory_handle__(e){let t=this.output.map(t=>t.__rolldown_external_memory_handle__(e));if(!t.every(e=>e.freed)){let e=t.filter(e=>!e.freed).map(e=>e.reason).filter(Boolean);return{freed:!1,reason:`Failed to free ${e.length} item(s): ${e.join(`; `)}`}}return{freed:!0}}};R([L],Ph.prototype,`output`,null);var Fh=class{constructor(e){this.context=e}getModuleInfo(e){let t=this.context.getModuleInfo(e);return t?kf(t,{moduleSideEffects:null,meta:{}}):null}};function Ih(e){let{dir:t,format:n,exports:r,hashCharacters:i,sourcemap:a,sourcemapBaseUrl:o,sourcemapDebugIds:s,sourcemapIgnoreList:c,sourcemapPathTransform:l,name:u,assetFileNames:d,entryFileNames:f,chunkFileNames:p,cssEntryFileNames:m,cssChunkFileNames:h,banner:g,footer:_,postBanner:v,postFooter:ee,intro:y,outro:b,esModule:x,globals:te,paths:S,generatedCode:ne,file:re,sanitizeFileName:ie,preserveModules:C,virtualDirname:ae,legalComments:w,preserveModulesRoot:oe,manualChunks:T,topLevelVar:se,cleanDir:ce,strictExecutionOrder:E}=e,{inlineDynamicImports:D,advancedChunks:le}=Vh(e.codeSplitting,e.inlineDynamicImports,e.advancedChunks,T);return{dir:t,file:re??void 0,format:Rh(n),exports:r,hashCharacters:i,sourcemap:zh(a),sourcemapBaseUrl:o,sourcemapDebugIds:s,sourcemapIgnoreList:c??/node_modules/,sourcemapPathTransform:l,banner:Lh(g),footer:Lh(_),postBanner:Lh(v),postFooter:Lh(ee),intro:Lh(y),outro:Lh(b),extend:e.extend,globals:te,paths:S,generatedCode:ne,esModule:x,name:u,assetFileNames:Bh(d),entryFileNames:f,chunkFileNames:p,cssEntryFileNames:m,cssChunkFileNames:h,plugins:[],minify:e.minify,externalLiveBindings:e.externalLiveBindings,inlineDynamicImports:D,dynamicImportInCjs:e.dynamicImportInCjs,manualCodeSplitting:le,polyfillRequire:e.polyfillRequire,sanitizeFileName:ie,preserveModules:C,virtualDirname:ae,legalComments:w,preserveModulesRoot:oe,topLevelVar:se,minifyInternalExports:e.minifyInternalExports,cleanDir:ce,strictExecutionOrder:E}}function Lh(e){if(!(e==null||e===``))return typeof e==`function`?async t=>e(uf(t)):e}function Rh(e){switch(e){case void 0:case`es`:case`esm`:case`module`:return`es`;case`cjs`:case`commonjs`:return`cjs`;case`iife`:return`iife`;case`umd`:return`umd`;default:vu(`output.format: ${e}`)}}function zh(e){switch(e){case!0:return`file`;case`inline`:return`inline`;case!1:case void 0:return;case`hidden`:return`hidden`;default:throw Error(`unknown sourcemap: ${e}`)}}function Bh(e){return typeof e==`function`?t=>e({name:t.name,names:t.names,originalFileName:t.originalFileName,originalFileNames:t.originalFileNames,source:of(t.source),type:`asset`}):e}function Vh(e,t,n,r){let i,a;if(e===!1){if(t!=null&&console.warn("`inlineDynamicImports` option is ignored because `codeSplitting: false` is set."),r!=null)throw Error(`Invalid configuration: "output.manualChunks" cannot be used when "output.codeSplitting" is set to false.`);return n!=null&&console.warn("`advancedChunks` option is ignored because `codeSplitting` is set to `false`."),{inlineDynamicImports:!0,advancedChunks:void 0}}else e===!0?t!=null&&console.warn("`inlineDynamicImports` option is ignored because `codeSplitting: true` is set."):e==null?t!=null&&(console.warn("`inlineDynamicImports` option is deprecated, please use `codeSplitting: false` instead."),i=t):(a=e,t!=null&&console.warn("`inlineDynamicImports` option is ignored because the `codeSplitting` option is specified."));if(i===!0&&r!=null)throw Error(`Invalid value "true" for option "output.inlineDynamicImports" - this option is not supported for "output.manualChunks".`);a==null?n!=null&&(console.warn("`advancedChunks` option is deprecated, please use `codeSplitting` instead."),a=n):n!=null&&console.warn("`advancedChunks` option is ignored because the `codeSplitting` option is specified."),r!=null&&a!=null?console.warn("`manualChunks` option is ignored because the `codeSplitting` option is specified."):r!=null&&(a={groups:[{name(e,t){return r(e,{getModuleInfo:e=>t.getModuleInfo(e)})}}]});let o;if(a!=null){let{groups:e,...t}=a;o={...t,groups:e?.map(e=>{let{name:t,...n}=e;return{...n,name:typeof t==`function`?(e,n)=>t(e,new Fh(n)):t}})}}return{inlineDynamicImports:i,advancedChunks:o}}var Hh=td(rd(),1);async function Uh(e){let t=[];for(let[n,r]of e.entries())if(`_parallel`in r){let{fileUrl:e,options:i}=r._parallel;t.push({index:n,fileUrl:e,options:i})}if(t.length<=0)return;let n=Kh(),r=new Hh.ParallelJsPluginRegistry(n),i=r.id,a=await Wh(i,n,t);return{registry:r,stopWorkers:async()=>{await Promise.all(a.map(e=>e.terminate()))}}}function Wh(e,t,n){return Promise.all(Array.from({length:t},(t,r)=>Gh(e,n,r)))}async function Gh(e,t,n){let r=import.meta.resolve(`#parallel-plugin-worker`),i={registryId:e,pluginInfos:t,threadNumber:n},a;try{return a=new Ee(new URL(r),{workerData:i}),a.unref(),await new Promise((e,t)=>{a.once(`message`,async n=>{n.type===`error`?t(n.error):e()})}),a}catch(e){throw a?.terminate(),e}}const Kh=()=>{let e=1;try{e=j.availableParallelism()}catch{let t=j.cpus();Array.isArray(t)&&t.length>0&&(e=t.length)}return Math.min(e,8)};async function qh(e,t,n){let r=await Qp(e.plugins),i=await Qp(t.plugins),a=e.logLevel||Jd,o=Hp(nm(r),Up(e,a),a,n);t=tm.callOutputOptionsHook([...r,...i],t,o,a,n);let s=await Qp(t.plugins),c=[...em(r,`at position `),...$p(em(s,`at output position `),o)],l=await Uh(c);e.experimental?.strictExecutionOrder!==void 0&&console.warn("`experimental.strictExecutionOrder` has been stabilized and moved to `output.strictExecutionOrder`. Please update your configuration.");try{return{bundlerOptions:{inputOptions:kp(c,e,t,s,o,a,n),outputOptions:Ih(t),parallelPluginsRegistry:l?.registry},inputOptions:e,onLog:o,stopWorkers:l?.stopWorkers}}catch(e){throw await l?.stopWorkers(),e}}Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);var Jh=class e{#e;#t;#n;static asyncRuntimeShutdown=!1;constructor(e){this.#e=e,this.#t=new Hh.BindingBundler}get closed(){return this.#t.closed}async generate(e={}){return this.#r(!1,e)}async write(e={}){return this.#r(!0,e)}async close(){await this.#n?.(),await this.#t.close(),(0,Hh.shutdownAsyncRuntime)(),e.asyncRuntimeShutdown=!0,this.#n=void 0}async[Symbol.asyncDispose](){await this.close()}get watchFiles(){return Promise.resolve(this.#t.getWatchFiles())}async#r(t,n){Nh(`output`,n),await this.#n?.();let r=await qh(this.#e,n,!1);e.asyncRuntimeShutdown&&(0,Hh.startAsyncRuntime)();try{this.#n=r.stopWorkers;let e;return e=t?await this.#t.write(r.bundlerOptions):await this.#t.generate(r.bundlerOptions),new Ph(wf(e))}catch(e){throw await r.stopWorkers?.(),e}}};const Yh=[];Yh.push(`SIGHUP`,`SIGINT`,`SIGTERM`),process.platform!==`win32`&&Yh.push(`SIGALRM`,`SIGABRT`,`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&Yh.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`);const Xh=e=>!!e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`,Zh=Symbol.for(`signal-exit emitter`),Qh=globalThis,$h=Object.defineProperty.bind(Object);var eg=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Qh[Zh])return Qh[Zh];$h(Qh,Zh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let n=this.listeners[e],r=n.indexOf(t);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(let i of this.listeners[e])r=i(t,n)===!0||r;return e===`exit`&&(r=this.emit(`afterExit`,t,n)||r),r}},tg=class{};const ng=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});var rg=class extends tg{onExit(){return()=>{}}load(){}unload(){}},ig=class extends tg{#e=ag.platform===`win32`?`SIGINT`:`SIGHUP`;#t=new eg;#n;#r;#i;#a={};#o=!1;constructor(e){super(),this.#n=e,this.#a={};for(let t of Yh)this.#a[t]=()=>{let n=this.#n.listeners(t),{count:r}=this.#t,i=e;if(typeof i.__signal_exit_emitter__==`object`&&typeof i.__signal_exit_emitter__.count==`number`&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let n=this.#t.emit(`exit`,null,t),r=t===`SIGHUP`?this.#e:t;n||e.kill(e.pid,r)}};this.#i=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!Xh(this.#n))return()=>{};this.#o===!1&&this.load();let n=t?.alwaysLast?`afterExit`:`exit`;return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(let e of Yh)try{let t=this.#a[e];t&&this.#n.on(e,t)}catch{}this.#n.emit=(e,...t)=>this.#c(e,...t),this.#n.reallyExit=e=>this.#s(e)}}unload(){this.#o&&(this.#o=!1,Yh.forEach(e=>{let t=this.#a[e];if(!t)throw Error(`Listener not defined for signal: `+e);try{this.#n.removeListener(e,t)}catch{}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#i,--this.#t.count)}#s(e){return Xh(this.#n)?(this.#n.exitCode=e||0,this.#t.emit(`exit`,this.#n.exitCode,null),this.#i.call(this.#n,this.#n.exitCode)):0}#c(e,...t){let n=this.#r;if(e===`exit`&&Xh(this.#n)){typeof t[0]==`number`&&(this.#n.exitCode=t[0]);let r=n.call(this.#n,e,...t);return this.#t.emit(`exit`,this.#n.exitCode,null),r}else return n.call(this.#n,e,...t)}};const ag=globalThis.process,{onExit:og,load:sg,unload:cg}=ng(Xh(ag)?new ig(ag):new rg);function lg(...e){if(typeof process==`object`&&process.versions.webcontainer){process.on(`exit`,t=>{e[0](t,null)});return}og(...e)}var ug=td(rd()),dg=class{listeners=new Map;timer;constructor(){this.timer=setInterval(()=>{},1e9)}on(e,t){let n=this.listeners.get(e);return n?n.push(t):this.listeners.set(e,[t]),this}off(e,t){let n=this.listeners.get(e);if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}return this}clear(e){this.listeners.has(e)&&this.listeners.delete(e)}async onEvent(e){let t=this.listeners.get(e.eventKind());if(t)switch(e.eventKind()){case`close`:case`restart`:for(let e of t)await e();break;case`event`:for(let n of t){let t=e.bundleEventKind();switch(t){case`BUNDLE_END`:let{duration:r,output:i,result:a}=e.bundleEndData();await n({code:`BUNDLE_END`,duration:r,output:[i],result:a});break;case`ERROR`:let o=e.bundleErrorData();await n({code:`ERROR`,error:Ef(o.error),result:o.result});break;default:await n({code:t});break}}break;case`change`:for(let n of t){let{path:t,kind:r}=e.watchChangeData();await n(t,{event:r})}break;default:throw Error(`Unknown event: ${e}`)}}async close(){clearInterval(this.timer)}},fg=class{closed;inner;emitter;stopWorkers;constructor(e,t,n){this.closed=!1,this.inner=t,this.emitter=e;let r=e.close.bind(e);e.close=async()=>{await this.close(),r()},this.stopWorkers=n}async close(){if(!this.closed){this.closed=!0;for(let e of this.stopWorkers)await e?.();await this.inner.close(),(0,ug.shutdownAsyncRuntime)()}}start(){process.nextTick(()=>this.inner.start(this.emitter.onEvent.bind(this.emitter)))}};async function pg(e,t){let n=_u(t),r=await Promise.all(n.map(e=>_u(e.output||{}).map(async t=>qh(await tm.callOptionsHook(e,!0),t,!0))).flat()),i=mg(r);new fg(e,new ug.BindingWatcher(r.map(e=>e.bundlerOptions),i),r.map(e=>e.stopWorkers)).start()}function mg(e){let t;for(let n of e)if(n.inputOptions.watch){let e=n.inputOptions.watch.notify;if(e){if(t)return n.onLog(qd,md()),t;t=e}}}const hg=e=>{let t=new dg;return pg(t,e),t},gg=async e=>(Nh(`input`,e),new Jh(await tm.callOptionsHook(e)));var _g=td(rd(),1);if(De){let e=(0,_g.initTraceSubscriber)();lg(()=>{e?.close()})}async function vg(e){if(Array.isArray(e))return Promise.all(e.map(e=>vg(e)));{let{output:t,write:n=!0,...r}=e,i=await gg(r);try{return n?await i.write(t):await i.generate(t)}finally{await i.close()}}}_g.BindingMagicString;function yg(e,t={},n){for(let r in e){let i=e[r],a=n?`${n}:${r}`:r;typeof i==`object`&&i?yg(i,t,a):typeof i==`function`&&(t[a]=i)}return t}const bg=(()=>{if(console.createTask)return console.createTask;let e={run:e=>e()};return()=>e})();function xg(e,t,n,r){for(let i=n;i<e.length;i+=1)try{let n=r?r.run(()=>e[i](...t)):e[i](...t);if(n instanceof Promise)return n.then(()=>xg(e,t,i+1,r))}catch(e){return Promise.reject(e)}}function Sg(e,t,n){if(e.length>0)return xg(e,t,0,bg(n))}function Cg(e,t,n){if(e.length>0){let r=bg(n);return Promise.all(e.map(e=>r.run(()=>e(...t))))}}function wg(e,t){for(let n of[...e])n(t)}var Tg=class{_hooks;_before;_after;_deprecatedHooks;_deprecatedMessages;constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,t,n={}){if(!e||typeof t!=`function`)return()=>{};let r=e,i;for(;this._deprecatedHooks[e];)i=this._deprecatedHooks[e],e=i.to;if(i&&!n.allowDeprecated){let e=i.message;e||=`${r} hook has been deprecated`+(i.to?`, please use ${i.to}`:``),this._deprecatedMessages||=new Set,this._deprecatedMessages.has(e)||(console.warn(e),this._deprecatedMessages.add(e))}if(!t.name)try{Object.defineProperty(t,`name`,{get:()=>`_`+e.replace(/\W+/g,`_`)+`_hook_cb`,configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(t),()=>{t&&=(this.removeHook(e,t),void 0)}}hookOnce(e,t){let n,r=(...e)=>(typeof n==`function`&&n(),n=void 0,r=void 0,t(...e));return n=this.hook(e,r),n}removeHook(e,t){let n=this._hooks[e];if(n){let r=n.indexOf(t);r!==-1&&n.splice(r,1),n.length===0&&(this._hooks[e]=void 0)}}deprecateHook(e,t){this._deprecatedHooks[e]=typeof t==`string`?{to:t}:t;let n=this._hooks[e]||[];this._hooks[e]=void 0;for(let t of n)this.hook(e,t)}deprecateHooks(e){for(let t in e)this.deprecateHook(t,e[t])}addHooks(e){let t=yg(e),n=Object.keys(t).map(e=>this.hook(e,t[e]));return()=>{for(let e of n)e();n.length=0}}removeHooks(e){let t=yg(e);for(let e in t)this.removeHook(e,t[e])}removeAllHooks(){this._hooks={}}callHook(e,...t){return this.callHookWith(Sg,e,t)}callHookParallel(e,...t){return this.callHookWith(Cg,e,t)}callHookWith(e,t,n){let r=this._before||this._after?{name:t,args:n,context:{}}:void 0;this._before&&wg(this._before,r);let i=e(this._hooks[t]?[...this._hooks[t]]:[],n,t);return i instanceof Promise?i.finally(()=>{this._after&&r&&wg(this._after,r)}):(this._after&&r&&wg(this._after,r),i)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){let t=this._before.indexOf(e);t!==-1&&this._before.splice(t,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){let t=this._after.indexOf(e);t!==-1&&this._after.splice(t,1)}}}},Eg=Object.create,Dg=Object.defineProperty,Og=Object.getOwnPropertyDescriptor,kg=Object.getOwnPropertyNames,Ag=Object.getPrototypeOf,jg=Object.prototype.hasOwnProperty,Mg=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ng=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=kg(t),a=0,o=i.length,s;a<o;a++)s=i[a],!jg.call(e,s)&&s!==n&&Dg(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Og(t,s))||r.enumerable});return e},Pg=(e,t,n)=>(n=e==null?{}:Eg(Ag(e)),Ng(t||!e||!e.__esModule?Dg(n,`default`,{value:e,enumerable:!0}):n,e)),Fg=Se(import.meta.url);const Ig=/^path$/i,Lg={key:`PATH`,value:``};function Rg(e){for(let t in e){if(!Object.prototype.hasOwnProperty.call(e,t)||!Ig.test(t))continue;let n=e[t];return n?{key:t,value:n}:Lg}return Lg}function zg(e,t){let n=t.value.split(a),r=e,i;do n.push(d(r,`node_modules`,`.bin`)),i=r,r=o(r);while(r!==i);return{key:t.key,value:n.join(a)}}function Bg(e,t){let n={...process.env,...t},r=zg(e,Rg(n));return n[r.key]=r.value,n}const Vg=e=>{let t=e.length,n=new Oe,r=()=>{--t===0&&n.emit(`end`)};for(let t of e)t.pipe(n,{end:!1}),t.on(`end`,r);return n};var Hg=Mg((e,t)=>{t.exports=a,a.sync=o;var n=Fg(`fs`);function r(e,t){var n=t.pathExt===void 0?process.env.PATHEXT:t.pathExt;if(!n||(n=n.split(`;`),n.indexOf(``)!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function i(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:r(t,n)}function a(e,t,r){n.stat(e,function(n,a){r(n,n?!1:i(a,e,t))})}function o(e,t){return i(n.statSync(e),e,t)}}),Ug=Mg((e,t)=>{t.exports=r,r.sync=i;var n=Fg(`fs`);function r(e,t,r){n.stat(e,function(e,n){r(e,e?!1:a(n,t))})}function i(e,t){return a(n.statSync(e),t)}function a(e,t){return e.isFile()&&o(e,t)}function o(e,t){var n=e.mode,r=e.uid,i=e.gid,a=t.uid===void 0?process.getuid&&process.getuid():t.uid,o=t.gid===void 0?process.getgid&&process.getgid():t.gid,s=64,c=8,l=1,u=s|c;return n&l||n&c&&i===o||n&s&&r===a||n&u&&a===0}}),Wg=Mg((e,t)=>{Fg(`fs`);var n=process.platform===`win32`||global.TESTING_WINDOWS?Hg():Ug();t.exports=r,r.sync=i;function r(e,t,i){if(typeof t==`function`&&(i=t,t={}),!i){if(typeof Promise!=`function`)throw TypeError(`callback not provided`);return new Promise(function(n,i){r(e,t||{},function(e,t){e?i(e):n(t)})})}n(e,t||{},function(e,n){e&&(e.code===`EACCES`||t&&t.ignoreErrors)&&(e=null,n=!1),i(e,n)})}function i(e,t){try{return n.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code===`EACCES`)return!1;throw e}}}),Gg=Mg((e,t)=>{let n=process.platform===`win32`||process.env.OSTYPE===`cygwin`||process.env.OSTYPE===`msys`,r=Fg(`path`),i=n?`;`:`:`,a=Wg(),o=e=>Object.assign(Error(`not found: ${e}`),{code:`ENOENT`}),s=(e,t)=>{let r=t.colon||i,a=e.match(/\//)||n&&e.match(/\\/)?[``]:[...n?[process.cwd()]:[],...(t.path||process.env.PATH||``).split(r)],o=n?t.pathExt||process.env.PATHEXT||`.EXE;.CMD;.BAT;.COM`:``,s=n?o.split(r):[``];return n&&e.indexOf(`.`)!==-1&&s[0]!==``&&s.unshift(``),{pathEnv:a,pathExt:s,pathExtExe:o}},c=(e,t,n)=>{typeof t==`function`&&(n=t,t={}),t||={};let{pathEnv:i,pathExt:c,pathExtExe:l}=s(e,t),u=[],d=n=>new Promise((a,s)=>{if(n===i.length)return t.all&&u.length?a(u):s(o(e));let c=i[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=r.join(l,e);a(f(!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d,n,0))}),f=(e,n,r)=>new Promise((i,o)=>{if(r===c.length)return i(d(n+1));let s=c[r];a(e+s,{pathExt:l},(a,o)=>{if(!a&&o)if(t.all)u.push(e+s);else return i(e+s);return i(f(e,n,r+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};t.exports=c,c.sync=(e,t)=>{t||={};let{pathEnv:n,pathExt:i,pathExtExe:c}=s(e,t),l=[];for(let o=0;o<n.length;o++){let s=n[o],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=r.join(u,e),f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<i.length;e++){let n=f+i[e];try{if(a.sync(n,{pathExt:c}))if(t.all)l.push(n);else return n}catch{}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw o(e)}}),Kg=Mg((e,t)=>{let n=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`};t.exports=n,t.exports.default=n}),qg=Mg((e,t)=>{let n=Fg(`path`),r=Gg(),i=Kg();function a(e,t){let a=e.options.env||process.env,o=process.cwd(),s=e.options.cwd!=null,c=s&&process.chdir!==void 0&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch{}let l;try{l=r.sync(e.command,{path:a[i({env:a})],pathExt:t?n.delimiter:void 0})}catch{}finally{c&&process.chdir(o)}return l&&=n.resolve(s?e.options.cwd:``,l),l}function o(e){return a(e)||a(e,!0)}t.exports=o}),Jg=Mg((e,t)=>{let n=/([()\][%!^"`<>&|;, *?])/g;function r(e){return e=e.replace(n,`^$1`),e}function i(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,`$1$1\\"`),e=e.replace(/(\\*)$/,`$1$1`),e=`"${e}"`,e=e.replace(n,`^$1`),t&&(e=e.replace(n,`^$1`)),e}t.exports.command=r,t.exports.argument=i}),Yg=Mg((e,t)=>{t.exports=/^#!(.*)/}),Xg=Mg((e,t)=>{let n=Yg();t.exports=(e=``)=>{let t=e.match(n);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,``).split(` `),a=r.split(`/`).pop();return a===`env`?i:i?`${a} ${i}`:a}}),Zg=Mg((e,t)=>{let n=Fg(`fs`),r=Xg();function i(e){let t=Buffer.alloc(150),i;try{i=n.openSync(e,`r`),n.readSync(i,t,0,150,0),n.closeSync(i)}catch{}return r(t.toString())}t.exports=i}),Qg=Mg((e,t)=>{let n=Fg(`path`),r=qg(),i=Jg(),a=Zg(),o=process.platform===`win32`,s=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(e){e.file=r(e);let t=e.file&&a(e.file);return t?(e.args.unshift(e.file),e.command=t,r(e)):e.file}function u(e){if(!o)return e;let t=l(e),r=!s.test(t);if(e.options.forceShell||r){let r=c.test(t);e.command=n.normalize(e.command),e.command=i.command(e.command),e.args=e.args.map(e=>i.argument(e,r)),e.args=[`/d`,`/s`,`/c`,`"${[e.command].concat(e.args).join(` `)}"`],e.command=process.env.comspec||`cmd.exe`,e.options.windowsVerbatimArguments=!0}return e}function d(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:u(r)}t.exports=d}),$g=Mg((e,t)=>{let n=process.platform===`win32`;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:`ENOENT`,errno:`ENOENT`,syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,t){if(!n)return;let r=e.emit;e.emit=function(n,i){if(n===`exit`){let n=a(i,t,`spawn`);if(n)return r.call(e,`error`,n)}return r.apply(e,arguments)}}function a(e,t){return n&&e===1&&!t.file?r(t.original,`spawn`):null}function o(e,t){return n&&e===1&&!t.file?r(t.original,`spawnSync`):null}t.exports={hookChildProcess:i,verifyENOENT:a,verifyENOENTSync:o,notFoundError:r}}),e_=Pg(Mg((e,t)=>{let n=Fg(`child_process`),r=Qg(),i=$g();function a(e,t,a){let o=r(e,t,a),s=n.spawn(o.command,o.args,o.options);return i.hookChildProcess(s,o),s}function o(e,t,a){let o=r(e,t,a),s=n.spawnSync(o.command,o.args,o.options);return s.error=s.error||i.verifyENOENTSync(s.status,o),s}t.exports=a,t.exports.spawn=a,t.exports.sync=o,t.exports._parse=r,t.exports._enoent=i})(),1),t_=class extends Error{result;output;get exitCode(){if(this.result.exitCode!==null)return this.result.exitCode}constructor(e,t){super(`Process exited with non-zero status (${e.exitCode})`),this.result=e,this.output=t}};const n_={timeout:void 0,persist:!1},r_={windowsHide:!0};function i_(e,t){return{command:l(e),args:t??[]}}function a_(e){let t=new AbortController;for(let n of e){if(n.aborted)return t.abort(),n;n.addEventListener(`abort`,()=>{t.abort(n.reason)},{signal:t.signal})}return t.signal}async function o_(e){let t=``;for await(let n of e)t+=n.toString();return t}var s_=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}constructor(e,t,n){this._options={...n_,...n},this._command=e,this._args=t??[],this._processClosed=new Promise(e=>{this._resolveClose=e})}kill(e){return this._process?.kill(e)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(e,t,n){return c_(e,t,{...n,stdin:this})}async*[Symbol.asyncIterator](){let e=this._process;if(!e)return;let t=[];this._streamErr&&t.push(this._streamErr),this._streamOut&&t.push(this._streamOut);let n=Vg(t),r=O.createInterface({input:n});for await(let e of r)yield e.toString();if(await this._processClosed,e.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new t_(this)}async _waitForOutput(){let e=this._process;if(!e)throw Error(`No process was started`);let[t,n]=await Promise.all([this._streamOut?o_(this._streamOut):``,this._streamErr?o_(this._streamErr):``]);if(await this._processClosed,this._options?.stdin&&await this._options.stdin,e.removeAllListeners(),this._thrownError)throw this._thrownError;let r={stderr:n,stdout:t,exitCode:this.exitCode};if(this._options.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new t_(this,r);return r}then(e,t){return this._waitForOutput().then(e,t)}_streamOut;_streamErr;spawn(){let e=ee(),t=this._options,n={...r_,...t.nodeOptions},r=[];this._resetState(),t.timeout!==void 0&&r.push(AbortSignal.timeout(t.timeout)),t.signal!==void 0&&r.push(t.signal),t.persist===!0&&(n.detached=!0),r.length>0&&(n.signal=a_(r)),n.env=Bg(e,n.env);let{command:i,args:a}=i_(this._command,this._args),o=(0,e_._parse)(i,a,n),s=te(o.command,o.args,o.options);if(s.stderr&&(this._streamErr=s.stderr),s.stdout&&(this._streamOut=s.stdout),this._process=s,s.once(`error`,this._onError),s.once(`close`,this._onClose),t.stdin!==void 0&&s.stdin&&t.stdin.process){let{stdout:e}=t.stdin.process;e&&e.pipe(s.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(e=>{this._resolveClose=e}),this._thrownError=void 0}_onError=e=>{if(e.name===`AbortError`&&(!(e.cause instanceof Error)||e.cause.name!==`TimeoutError`)){this._aborted=!0;return}this._thrownError=e};_onClose=()=>{this._resolveClose&&this._resolveClose()}};const c_=(e,t,n)=>{let r=new s_(e,t,n);return r.spawn(),r};function l_(e){return new vd(`builtin:vite-import-glob`,e)}var u_=td(rd(),1);u_.BindingRebuildStrategy;var d_=u_.ResolverFactory;u_.createTokioRuntime,u_.isolatedDeclaration;var f_=u_.isolatedDeclarationSync;u_.minify,u_.minifySync,u_.moduleRunnerTransform,u_.transform,u_.transformSync;const p_=n(import.meta.url),m_=p_(`semver/functions/coerce.js`),h_=p_(`semver/functions/satisfies.js`),g_=p_(`tree-kill`),__=Wo(`tsdown:config:workspace`),v_=[`**/node_modules/**`,`**/dist/**`,`**/test?(s)/**`,`**/t?(e)mp/**`];async function y_(e,t){let n={...e,...t},r=n.cwd||v.cwd(),{workspace:a}=n;if(!a)return{configs:[n],files:[]};a===!0?a={}:(typeof a==`string`||Array.isArray(a))&&(a={include:a});let{include:o=`auto`,exclude:s=v_,config:c}=a;if(o=o===`auto`?(await Tc(`**/package.json`,{ignore:s,cwd:r,expandDirectories:!1})).filter(e=>e!==`package.json`).map(e=>Za(i.resolve(r,e,`..`))):(await Tc(o,{ignore:s,cwd:r,onlyDirectories:!0,absolute:!0,expandDirectories:!1})).map(e=>Za(i.resolve(e))),o.length===0)throw Error(`No workspace packages found, please check your config`);let l=[];return{configs:(await Promise.all(o.map(async e=>{__(`loading workspace config %s`,e);let{configs:r,file:i}=await $l({...t,config:c,cwd:e},e);return i?(__(`loaded workspace config file %s`,i),l.push(i)):__(`no workspace config file found in %s`,e),r.map(e=>({...n,...e}))}))).flat(),files:l}}const b_=Wo(`tsdown:config`);async function x_(e){b_(`inline config %O`,e),e.cwd&&=i.resolve(e.cwd);let{configs:t,file:n}=await $l(e),r=[];n?(r.push(n),b_(`loaded root user config file %s`,n),b_(`root user configs %O`,t)):b_(`no root user config file found`);let a=(await Promise.all(t.map(async t=>{let{configs:n,files:i}=await y_(t,e);return b_(`workspace configs %O`,n),i&&r.push(...i),(await Promise.all(n.filter(e=>!e.workspace||e.entry).map(t=>lu(t,e)))).flat().filter(e=>!!e)}))).flat();if(b_(`resolved configs %O`,a),a.length===0)throw Error(`No valid configuration found.`);return{configs:a,files:r}}function S_(e){!e.target||!(e.checks?.legacyCjs??!0)||!e.format.includes(`cjs`)||e.target.some(e=>{let t=m_(e.split(`node`)[1]);return t&&h_(t,`^20.19.0 || >=22.12.0`)})&&e.logger.warnOnce(`We recommend using the ESM format instead of CommonJS.
|
|
87
87
|
The ESM format is compatible with modern platforms and runtimes, and most new libraries are now distributed only in ESM format.
|
|
88
|
-
Learn more at https://nodejs.org/en/learn/modules/publishing-a-package#how-did-we-get-here`)}async function
|
|
89
|
-
`)}`)}else d=`Package has no types`;d?e.logger[n](e.nameLabel,
|
|
90
|
-
`)}`);let e={};for(let t of r.bundles)t.config.exports&&(e[t.config.format]||=[],e[t.config.format].push(...t.chunks));await
|
|
88
|
+
Learn more at https://nodejs.org/en/learn/modules/publishing-a-package#how-did-we-get-here`)}async function C_(e){if(!e.copy)return;let t=typeof e.copy==`function`?await e.copy(e):e.copy,n=(await Promise.all(Ja(t).map(async t=>{typeof t==`string`&&(t={from:[t]});let n=Ja(t.from);return n.some(e=>hc(e))&&(n=await Tc(n,{cwd:e.cwd,onlyFiles:!0,expandDirectories:!1})),n.map(e=>r({...t,from:e}))}))).flat();if(!n.length){e.logger.warn(e.nameLabel,`No files matched for copying.`);return}await Promise.all(n.map(({from:t,to:n,verbose:r})=>(r&&e.logger.info(e.nameLabel,`Copying files from ${i.relative(e.cwd,t)} to ${i.relative(e.cwd,n)}`),yo(t,n))));function r(t){let{flatten:n=!0,rename:r}=t,a=i.resolve(e.cwd,t.from),o=t.to?i.resolve(e.cwd,t.to):e.outDir,{base:s,dir:c}=i.parse(i.relative(e.cwd,a)),l=n||!n&&!c?o:c.replace(c.split(i.sep)[0],o),u=i.join(l,r?w_(s,r,a):s);return{...t,from:a,to:u}}}function w_(e,t,n){let r=i.parse(e);return typeof t==`string`?t:t(r.name,r.ext.replace(`.`,``),n)}async function T_(e){let{start:t}=await to(`@vitejs/devtools/cli-commands`);await t({host:`127.0.0.1`,open:!0,...typeof e.ui==`object`?e.ui:{}})}async function E_(e){let t=new Tg;return typeof e.hooks==`object`?t.addHooks(e.hooks):typeof e.hooks==`function`&&await e.hooks(t),{hooks:t,context:{options:e,hooks:t}}}function D_(e){if(!e.onSuccess)return;let t=new AbortController;if(typeof e.onSuccess==`string`){let n=c_(e.onSuccess,[],{nodeOptions:{shell:!0,stdio:`inherit`}});n.then(({exitCode:e})=>{e&&(v.exitCode=e)}),t.signal.addEventListener(`abort`,()=>{typeof n.pid==`number`&&g_(n.pid)})}else e.onSuccess(e,t.signal);return t}const O_=Wo(`tsdown:attw`),k_=ua`[attw]`,A_={NoResolution:`no-resolution`,UntypedResolution:`untyped-resolution`,FalseCJS:`false-cjs`,FalseESM:`false-esm`,CJSResolvesToESM:`cjs-resolves-to-esm`,FallbackCondition:`fallback-condition`,CJSOnlyExportsDefault:`cjs-only-exports-default`,NamedExports:`named-exports`,FalseExportDefault:`false-export-default`,MissingExportEquals:`missing-export-equals`,UnexpectedModuleSyntax:`unexpected-module-syntax`,InternalResolutionError:`internal-resolution-error`},j_={strict:[],node16:[`node10`],"esm-only":[`node10`,`node16-cjs`]};async function M_(e){if(!e.attw)return;if(!e.pkg){e.logger.warn(`attw is enabled but package.json is not found`);return}let{profile:t=`strict`,level:n=`warn`,ignoreRules:r=[],...a}=e.attw,o=r.filter(e=>!Object.values(A_).includes(e));o.length&&e.logger.warn(`attw config option 'ignoreRules' contains invalid value '${o.join(`, `)}'.`);let s=performance.now();O_(`Running attw check`);let c=await T(i.join(fe(),`tsdown-attw-`)),l=await to(`@arethetypeswrong/core`,e.attw.resolvePaths),u;try{let{stdout:t}=await c_(`npm`,[`pack`,`--json`,`--ignore-scripts`,`--pack-destination`,c],{nodeOptions:{cwd:e.cwd}}),n=JSON.parse(t);if(!Array.isArray(n)||!n[0]?.filename)throw Error(`Invalid npm pack output format`);let r=await se(i.join(c,n[0].filename)),o=l.createPackageFromTarballData(r);u=await l.checkPackage(o,a)}catch(t){e.logger.error(`ATTW check failed:`,t);return}finally{await vo(c)}let d;if(u.types){let e=u.problems.filter(e=>r.includes(A_[e.kind])?!1:`resolutionKind`in e?!j_[t]?.includes(e.resolutionKind):!0);e.length&&(d=`problems found:\n${e.map(e=>N_(u.packageName,e)).join(`
|
|
89
|
+
`)}`)}else d=`Package has no types`;d?e.logger[n](e.nameLabel,k_,d):e.logger.success(e.nameLabel,k_,`No problems found`,ua`(${Math.round(performance.now()-s)}ms)`)}function N_(e,t){let n=`resolutionKind`in t?` (${t.resolutionKind})`:``,r=`entrypoint`in t?` at ${Za(i.join(e,t.entrypoint))}`:``;switch(t.kind){case`NoResolution`:return` ❌ No resolution${n}${r}`;case`UntypedResolution`:return` ⚠️ Untyped resolution${n}${r}`;case`FalseESM`:return` 🔄 False ESM: Types indicate ESM (${t.typesModuleKind}) but implementation is CJS (${t.implementationModuleKind})\n Types: ${t.typesFileName} | Implementation: ${t.implementationFileName}`;case`FalseCJS`:return` 🔄 False CJS: Types indicate CJS (${t.typesModuleKind}) but implementation is ESM (${t.implementationModuleKind})\n Types: ${t.typesFileName} | Implementation: ${t.implementationFileName}`;case`CJSResolvesToESM`:return` ⚡ CJS resolves to ESM${n}${r}`;case`NamedExports`:{let e=t.missing?.length>0?` Missing: ${t.missing.join(`, `)}`:``;return` 📤 Named exports problem${t.isMissingAllNamed?` (all named exports missing)`:``}${e}\n Types: ${t.typesFileName} | Implementation: ${t.implementationFileName}`}case`FallbackCondition`:return` 🎯 Fallback condition used${n}${r}`;case`FalseExportDefault`:return` 🎭 False export default\n Types: ${t.typesFileName} | Implementation: ${t.implementationFileName}`;case`MissingExportEquals`:return` 📝 Missing export equals\n Types: ${t.typesFileName} | Implementation: ${t.implementationFileName}`;case`InternalResolutionError`:return` 💥 Internal resolution error in ${t.fileName} (${t.resolutionOption})\n Module: ${t.moduleSpecifier} | Mode: ${t.resolutionMode}`;case`UnexpectedModuleSyntax`:return` 📋 Unexpected module syntax in ${t.fileName}\n Expected: ${t.moduleKind} | Found: ${t.syntax===99?`ESM`:`CJS`}`;case`CJSOnlyExportsDefault`:return` 🏷️ CJS only exports default in ${t.fileName}`;default:return` ❓ Unknown problem: ${JSON.stringify(t)}`}}const P_=Wo(`tsdown:publint`),F_=ua`[publint]`;async function I_(e){if(!e.publint)return;if(!e.pkg){e.logger.warn(e.nameLabel,`publint is enabled but package.json is not found`);return}let t=performance.now();P_(`Running publint`);let{publint:n}=await to(`publint`,e.publint.resolvePaths),{formatMessage:r}=await to(`publint/utils`,e.publint.resolvePaths),{messages:a}=await n({...e.publint,pkgDir:i.dirname(e.pkg.packageJsonPath)});if(P_(`Found %d issues`,a.length),!a.length){e.logger.success(e.nameLabel,F_,`No issues found`,ua`(${Math.round(performance.now()-t)}ms)`);return}for(let t of a){let n=r(t,e.pkg),i={error:`error`,warning:`warn`,suggestion:`info`}[t.type];e.logger[i](e.nameLabel,F_,n)}}function L_(e){let t={};for(let n of e){let e=n.pkg?.packageJsonPath;if(e){if(!t[e]){let{promise:n,resolve:r}=no();t[e]={promise:n,resolve:r,count:0,formats:new Set,bundles:[]}}t[e].count++,t[e].formats.add(n.format)}}return t}async function R_(e,t){let n=t.config.pkg;if(!n)return;let r=e[n.packageJsonPath];if(r.bundles.push(t),r.bundles.length<r.count)return r.promise;let i=r.bundles.map(({config:e})=>e),a=z_(i,`exports`);if(a.length){if(a.length>1)throw Error(`Conflicting exports options for package at ${n.packageJsonPath}. Please merge them:\n${a.map(e=>`- ${p({colors:!0},e.exports)}`).join(`
|
|
90
|
+
`)}`);let e={};for(let t of r.bundles)t.config.exports&&(e[t.config.format]||=[],e[t.config.format].push(...t.chunks));await Nl(a[0],e)}let o=z_(i,`publint`),s=z_(i,`attw`);(o.length>1||s.length>1)&&o[1].logger.warn(`Multiple publint or attw configurations found for package at ${n.packageJsonPath}. Consider merging them for better consistency and performance.`),await Promise.all([...o.map(e=>I_(e)),...s.map(e=>M_(e))]),r.resolve()}function z_(e,t){let n=e.filter(e=>e[t]);if(!n.length)return[];let r=new Set,i=n.filter(e=>!Object.keys(e[t]).length||r.has(e[t])?!1:(r.add(e[t]),!0));return i.length===0?[n[0]]:i}function B_(e){let t,n=[...e.join(` `).toLowerCase().matchAll(V_)];for(let e of n){let n=H_[e[1]];if(!n)continue;let r=e[2],i=U_(r);i!=null&&(t||={},t[n]=i)}return t}const V_=/([a-z]+)(\d+(?:\.\d+)*)/g,H_={chrome:`chrome`,edge:`edge`,firefox:`firefox`,ie:`ie`,ios:`ios_saf`,opera:`opera`,safari:`safari`};function U_(e){let[t,n=0,r=0]=e.split(`-`)[0].split(`.`).map(e=>Number.parseInt(e,10));return Number.isNaN(t)||Number.isNaN(n)||Number.isNaN(r)?null:t<<16|n<<8|r}async function W_(e){let t=await import(`unplugin-lightningcss/rolldown`).catch(()=>void 0);if(!t)return;let n=e.target&&B_(e.target);if(n)return t.default({options:{targets:n}})}function G_(e){let{splitting:t,fileName:n}=e.css;if(!t)return{name:`tsdown:css:splitting`,generateBundle(e,t){let r=Object.values(t),i=new Map;for(let e of r)e.type===`asset`&&typeof e.source==`string`&&jc.test(n)&&i.set(e.fileName,e.source);if(!i.size)return;let a=new Map;for(let e of r)if(e.type===`chunk`){for(let t of e.moduleIds)if(jc.test(t)){a.has(e.fileName)||a.set(e.fileName,[]);break}}for(let e of i.keys()){let t=Y_(e);for(let n of a.keys())if(X_(n)===t||n.startsWith(`${t}-`)){a.get(n).push(e);break}}let o=``,s=new Set,c=new Set;function l(e){if(!e||e.type!==`chunk`||s.has(e))return;s.add(e),e.imports.forEach(e=>{l(t[e])}),e.dynamicImports.forEach(e=>{c.add(e)});let n=a.get(e.fileName);if(n&&n.length>0)for(let e of n)o+=i.get(e)??``}for(let e of r)e.type===`chunk`&&e.isEntry&&l(e);for(let e of c)l(t[e]);if(o){for(let e of i.keys())delete t[e];this.emitFile({type:`asset`,source:o,fileName:n,originalFileName:Dl})}}}}const K_=/-[\w-]+\.css$/,q_=/-[\w-]+\.(m?js|cjs)$/,J_=/\.(m?js|cjs)$/;function Y_(e){return e.replace(K_,``).replace(jc,``)}function X_(e){return e.replace(q_,``).replace(J_,``)}function Z_(e,t,n){switch(t){case`es`:return!n&&e===`module`?`js`:`mjs`;case`cjs`:return n||e===`module`?`cjs`:`js`;default:return`js`}}function Q_({outExtensions:e,fixedExtension:t,pkg:n,hash:r},i,a){let o=Jl(n),s,c;if(e){let{js:t,dts:n}=e({options:i,format:a,pkgType:o})||{};s=t,c=n}s??=`.${Z_(o,a,t)}`;let l=a===`iife`||a===`umd`?`.${a}`:``;return[$_(`[name]${l}`,s,c),$_(`[name]${l}${r?`-[hash]`:``}`,s,c)]}function $_(e,t,n){return n===void 0?`${e}${t}`:r=>`${e}${r.name.endsWith(`.d`)?n:t}`}function ev(e,t){if(e)return n=>{if(typeof e==`function`&&(e=e({format:t,fileName:n.fileName})),typeof e==`string`)return e;switch(!0){case Ec.test(n.fileName):return e?.js||``;case jc.test(n.fileName):return e?.css||``;case Oc.test(n.fileName):return e?.dts||``;default:return``}}}const tv=Wo(`tsdown:rolldown`);async function nv(e,t,n,r,i=!1,a){let o=await rv(e,t,n,r,i,a),s=await iv(o,e,t,i),c={...o,output:s,write:e.write};return tv(`rolldown config with format "%s" %O`,i?`cjs dts`:t,c),c}async function rv(e,t,n,r,i,a){let{alias:o,checks:{legacyCjs:s,...c}={},cjsDefault:l,cwd:u,devtools:d,dts:f,entry:p,env:m,external:h,globImport:g,loader:_,logger:v,nameLabel:ee,nodeProtocol:y,platform:b,plugins:x,report:te,shims:S,target:ne,treeshake:re,tsconfig:ie,unused:C,watch:ae}=e,w=[];if(y&&w.push(Fu(y)),(e.pkg||e.skipNodeModulesBundle)&&w.push(Nu(e)),f){let{dts:e}=await import(`./dist-mM4pkTG1.js`),n={tsconfig:ie,...f};t===`es`?w.push(e(n)):i&&w.push(e({...n,emitDtsOnly:!0,cjsDefault:l}))}if(!i){if(C){let{Unused:e}=await to(`unplugin-unused`);w.push(e.rolldown({root:u,...C}))}ne&&w.push(await W_({target:ne}));let t=G_(e);t&&w.push(t),w.push(Uu(v,u,ee,a)),g&&w.push(l_({root:u}))}te&&ro[v.level]>=3&&w.push(Bu(te,v,u,i,ee,a)),ae&&w.push(Ku(n,r)),i||w.push(x);let oe={...e.define,...Object.keys(m).reduce((e,t)=>{let n=JSON.stringify(m[t]);return e[`process.env.${t}`]=n,e[`import.meta.env.${t}`]=n,e},Object.create(null))},T=S&&!i?ju(t,b):void 0;return await fu({input:p,cwd:u,external:h,resolve:{alias:o},tsconfig:ie||void 0,treeshake:re,platform:i||t===`cjs`?`node`:b,transform:{target:ne,define:oe,inject:T},plugins:w,moduleTypes:_,logLevel:v.level===`error`?`silent`:v.level,onLog:l?(e,t,n)=>{t.code!==`MIXED_EXPORT`&&n(e,t)}:void 0,devtools:d||void 0,checks:c},e.inputOptions,[t,{cjsDts:i}])}async function iv(e,t,n,r){let{banner:i,cjsDefault:a,entry:o,footer:s,minify:c,outDir:l,sourcemap:u,unbundle:d}=t,[f,p]=Q_(t,e,n);return await fu({format:r?`es`:n,name:t.globalName,sourcemap:u,dir:l,exports:a?`auto`:`named`,minify:!r&&c,entryFileNames:f,chunkFileNames:p,preserveModules:d,preserveModulesRoot:d?bo(...Object.values(o)):void 0,postBanner:ev(i,n),postFooter:ev(s,n)},t.outputOptions,[n,{cjsDts:r}])}async function av(){if(tv.enabled)return await T(i.join(fe(),`tsdown-config-`))}async function ov(e,t,n,r){let a=i.join(e,`rolldown.config.${n}.js`);sv(r.plugins);let o=p({depth:null,maxArrayLength:null,maxStringLength:null},r);await D(a,`/*
|
|
91
91
|
Auto-generated rolldown config for tsdown debug purposes
|
|
92
|
-
tsdown v${
|
|
92
|
+
tsdown v${gu}, rolldown v${Kd}
|
|
93
93
|
Generated on ${new Date().toISOString()}
|
|
94
94
|
Package name: ${t||`not specified`}
|
|
95
95
|
*/
|
|
96
96
|
|
|
97
|
-
export default ${o}\n`),Z_(`Wrote debug rolldown config for "%s" (%s) -> %s`,t||`default name`,n,a)}function rv(e){if(Array.isArray(e))for(let t of e)rv(t);else typeof e==`object`&&e&&`name`in e&&(e[m.custom]=function(t,n,r){return`_options`in e?r({name:e.name,options:e._options},n):`"rolldown plugin: ${e.name}"`})}function iv(e){let t=!1;async function n(n){if(t)return;n=n.trim().toLowerCase();let r=[{key:`r`,description:`reload config and rebuild`,action(){e()}},{key:`c`,description:`clear console`,action(){console.clear()}},{key:`q`,description:`quit`,action(){v.exit(0)}}];if(n===`h`){let e=new Set;eo.info(` Shortcuts`);for(let t of r)e.has(t.key)||(e.add(t.key),t.action!=null&&eo.info(na` press `+ta`${t.key} + enter`+na` to ${t.description}`));return}let i=r.find(e=>e.key===n);i&&(t=!0,await i.action(),t=!1)}let r=I.createInterface({input:v.stdin});return r.on(`line`,n),()=>r.close()}const av=Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`);async function ov(e={}){eo.level=e.logLevel||`info`;let{configs:t,files:n}=await __(e);return sv(t,n,()=>ov(e))}async function sv(e,t,n){let r,i=()=>r||=gl(e),a=[],o=!1;async function s(){o||(o=!0,await Promise.all(a.map(e=>e())),Bc(),n())}let c=N_(e);function l(e){return P_(c,e)}eo.info(`Build start`);let u=await Promise.all(e.map(e=>cv(e,t,e.pkg?c[e.pkg.packageJsonPath].formats.size>1:!0,i,s,l))),d=e.find(e=>e.devtools&&e.devtools.ui);if(e.some(e=>e.watch)){a.push(iv(s));for(let e of u)a.push(e[av])}else d&&x_(d.devtools);return u}async function cv(e,t,n,r,i,a){let{format:o,dts:s,watch:c,logger:l,outDir:u}=e,{hooks:d,context:f}=await S_(e);v_(e);let p=performance.now();await d.callHook(`build:prepare`,f),await r();let m=await tv(),h=[],g,_,v=!1,y={chunks:h,config:e,async[av](){_?.abort(),await g?.close()}},b=await S();if(c)g=dg(b),x(g);else{let e=await mg(b);for(let{output:t}of e)h.push(...Iu(t,u))}return c||(l.success(e.nameLabel,`Build complete in ${ca(`${Math.round(performance.now()-p)}ms`)}`),await C()),y;function x(n){let r=[],a=!1;n.on(`change`,(e,n)=>{n.event===`update`&&r.push(e),(t.includes(e)||Lu.test(e))&&(eo.info(`Reload config: ${e}, restarting...`),i())}),n.on(`event`,async t=>{switch(t.code){case`START`:e.clean.length&&await vl(e.outDir,h),h.length=0,a=!1;break;case`END`:a||await C();break;case`BUNDLE_START`:r.length&&(l.clearScreen(`info`),l.info(`Found ${ta(r.join(`, `))} changed, rebuilding...`)),r.length=0;break;case`BUNDLE_END`:await t.result.close(),l.success(e.nameLabel,`Rebuilt in ${t.duration}ms.`);break;case`ERROR`:await t.result.close(),l.error(t.error),a=!0;break}})}async function S(){let r=await Q_(e,o,t,y,!1,n);await d.callHook(`build:before`,{...f,buildOptions:r}),m&&await nv(m,e.name,o,r);let i=[r];return o===`cjs`&&s&&i.push(await Q_(e,o,t,y,!0,n)),i}async function C(){await y_(e),v||await a(y),await d.callHook(`build:done`,{...f,chunks:h}),v=!0,_?.abort(),_=C_(e)}}Io(`tsdown:debug`);var lv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var n=class{constructor(e,t,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=t,this.index=n}},r=class{constructor(e,t){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=t}};function i(e,t){let{line:r,column:i,index:a}=e;return new n(r,i+t,a+t)}let a=`BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED`;var o={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:a},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:a}};let s={ArrayPattern:`array destructuring pattern`,AssignmentExpression:`assignment expression`,AssignmentPattern:`assignment expression`,ArrowFunctionExpression:`arrow function expression`,ConditionalExpression:`conditional expression`,CatchClause:`catch clause`,ForOfStatement:`for-of statement`,ForInStatement:`for-in statement`,ForStatement:`for-loop`,FormalParameters:`function parameter list`,Identifier:`identifier`,ImportSpecifier:`import specifier`,ImportDefaultSpecifier:`import default specifier`,ImportNamespaceSpecifier:`import namespace specifier`,ObjectPattern:`object destructuring pattern`,ParenthesizedExpression:`parenthesized expression`,RestElement:`rest element`,UpdateExpression:{true:`prefix operation`,false:`postfix operation`},VariableDeclarator:`variable declaration`,YieldExpression:`yield expression`},c=e=>e.type===`UpdateExpression`?s.UpdateExpression[`${e.prefix}`]:s[e.type];var l={AccessorIsGenerator:({kind:e})=>`A ${e}ter cannot be a generator.`,ArgumentsInClass:`'arguments' is only allowed in functions and class methods.`,AsyncFunctionInSingleStatementContext:`Async functions can only be declared at the top level or inside a block.`,AwaitBindingIdentifier:`Can not use 'await' as identifier inside an async function.`,AwaitBindingIdentifierInStaticBlock:`Can not use 'await' as identifier inside a static block.`,AwaitExpressionFormalParameter:`'await' is not allowed in async function parameters.`,AwaitUsingNotInAsyncContext:`'await using' is only allowed within async functions and at the top levels of modules.`,AwaitNotInAsyncContext:`'await' is only allowed within async functions and at the top levels of modules.`,BadGetterArity:`A 'get' accessor must not have any formal parameters.`,BadSetterArity:`A 'set' accessor must have exactly one formal parameter.`,BadSetterRestParameter:`A 'set' accessor function argument must not be a rest parameter.`,ConstructorClassField:`Classes may not have a field named 'constructor'.`,ConstructorClassPrivateField:`Classes may not have a private field named '#constructor'.`,ConstructorIsAccessor:`Class constructor may not be an accessor.`,ConstructorIsAsync:`Constructor can't be an async function.`,ConstructorIsGenerator:`Constructor can't be a generator.`,DeclarationMissingInitializer:({kind:e})=>`Missing initializer in ${e} declaration.`,DecoratorArgumentsOutsideParentheses:`Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.`,DecoratorBeforeExport:`Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.`,DecoratorsBeforeAfterExport:`Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.`,DecoratorConstructor:`Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?`,DecoratorExportClass:`Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.`,DecoratorSemicolon:`Decorators must not be followed by a semicolon.`,DecoratorStaticBlock:`Decorators can't be used with a static block.`,DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:`Deleting a private field is not allowed.`,DestructureNamedImport:`ES2015 named imports do not destructure. Use another statement for destructuring after the import.`,DuplicateConstructor:`Duplicate constructor in the same class.`,DuplicateDefaultExport:`Only one default export allowed per module.`,DuplicateExport:({exportName:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:`Redefinition of __proto__ property.`,DuplicateRegExpFlags:`Duplicate regular expression flag.`,ElementAfterRest:`Rest element must be last element.`,EscapedCharNotAnIdentifier:`Invalid Unicode escape.`,ExportBindingIsString:({localName:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:`'from' is not allowed as an identifier after 'export default'.`,ForInOfLoopInitializer:({type:e})=>`'${e===`ForInStatement`?`for-in`:`for-of`}' loop variable declaration may not have an initializer.`,ForInUsing:`For-in loop may not start with 'using' declaration.`,ForOfAsync:`The left-hand side of a for-of loop may not be 'async'.`,ForOfLet:`The left-hand side of a for-of loop may not start with 'let'.`,GeneratorInSingleStatementContext:`Generators can only be declared at the top level or inside a block.`,IllegalBreakContinue:({type:e})=>`Unsyntactic ${e===`BreakStatement`?`break`:`continue`}.`,IllegalLanguageModeDirective:`Illegal 'use strict' directive in function with non-simple parameter list.`,IllegalReturn:`'return' outside of function.`,ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:`Cannot use new with import(...).`,ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:`The 'u' and 'v' regular expression flags cannot be enabled at the same time.`,InvalidBigIntLiteral:`Invalid BigIntLiteral.`,InvalidCodePoint:`Code point out of bounds.`,InvalidCoverDiscardElement:`'void' must be followed by an expression when not used in a binding position.`,InvalidCoverInitializedName:`Invalid shorthand property initializer.`,InvalidDecimal:`Invalid decimal.`,InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:`Bad character escape sequence.`,InvalidEscapeSequenceTemplate:`Invalid escape sequence in template.`,InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${c(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${c(e)}.`,InvalidLhsOptionalChaining:({ancestor:e})=>`Invalid optional chaining in the left-hand side of ${c(e)}.`,InvalidNumber:`Invalid number.`,InvalidOrMissingExponent:`Floating-point numbers require a valid exponent after the 'e'.`,InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:`Invalid parenthesized assignment pattern.`,InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} is not defined.`,InvalidPropertyBindingPattern:`Binding member expression.`,InvalidRecordProperty:`Only properties and spread elements are allowed in record definitions.`,InvalidRestAssignmentPattern:`Invalid rest operator's argument.`,LabelRedeclaration:({labelName:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:`'let' is disallowed as a lexically bound name.`,LineTerminatorBeforeArrow:`No line break is allowed before '=>'.`,MalformedRegExpFlags:`Invalid regular expression flag.`,MissingClassName:`A class name is required.`,MissingEqInAssignment:`Only '=' operator can be used for specifying default value.`,MissingSemicolon:`Missing semicolon.`,MissingPlugin:({missingPlugin:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map(e=>JSON.stringify(e)).join(`, `)}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map(e=>JSON.stringify(e)).join(`, `)}.`,MissingUnicodeEscape:`Expecting Unicode escape sequence \\uXXXX.`,MixingCoalesceWithLogical:`Nullish coalescing operator(??) requires parens when mixing with logical operators.`,ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:`Only string literals are allowed as module attribute values.`,ModuleAttributesWithDuplicateKeys:({key:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' is not defined.`,MultipleDefaultsInSwitch:`Multiple default clauses.`,NewlineAfterThrow:`Illegal newline after throw.`,NoCatchOrFinally:`Missing catch or finally clause.`,NumberIdentifier:`Identifier directly after number.`,NumericSeparatorInEscapeSequence:`Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.`,ObsoleteAwaitStar:`'await*' has been removed from the async functions proposal. Use Promise.all() instead.`,OptionalChainingNoNew:`Constructors in/after an Optional Chain are not allowed.`,OptionalChainingNoTemplate:`Tagged Template Literals are not allowed in optionalChain.`,OverrideOnConstructor:`'override' modifier cannot appear on a constructor declaration.`,ParamDupe:`Argument name clash.`,PatternHasAccessor:`Object pattern can't contain getter or setter.`,PatternHasMethod:`Object pattern can't contain methods.`,PrivateInExpectedIn:({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RecordExpressionBarIncorrectEndSyntaxType:`Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,RecordExpressionBarIncorrectStartSyntaxType:`Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,RecordExpressionHashIncorrectStartSyntaxType:`Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.`,RecordNoProto:`'__proto__' is not allowed in Record expressions.`,RestTrailingComma:`Unexpected trailing comma after rest element.`,SloppyFunction:`In non-strict mode code, functions can only be declared at top level or inside a block.`,SloppyFunctionAnnexB:`In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.`,SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:`Classes may not have static property named prototype.`,SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:`Private fields can't be accessed on super.`,TrailingDecorator:`Decorators must be attached to a class element.`,TupleExpressionBarIncorrectEndSyntaxType:`Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,TupleExpressionBarIncorrectStartSyntaxType:`Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,TupleExpressionHashIncorrectStartSyntaxType:`Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.`,UnexpectedArgumentPlaceholder:`Unexpected argument placeholder.`,UnexpectedAwaitAfterPipelineBody:`Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.`,UnexpectedDigitAfterHash:`Unexpected digit after hash token.`,UnexpectedImportExport:`'import' and 'export' may only appear at the top level.`,UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,UnexpectedLeadingDecorator:`Leading decorators must be attached to a class declaration.`,UnexpectedLexicalDeclaration:`Lexical declaration cannot appear in a single-statement context.`,UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:`A numeric separator is only allowed between two digits.`,UnexpectedPrivateField:`Unexpected private name.`,UnexpectedReservedWord:({reservedWord:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:`'super' is only allowed in object methods and classes.`,UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:``}${e?`, expected "${e}"`:``}`,UnexpectedTokenUnaryExponentiation:`Illegal expression. Wrap left hand side or entire exponentiation in parentheses.`,UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:`Unexpected void binding.`,UnsupportedBind:`Binding should be performed on object property.`,UnsupportedDecoratorExport:`A decorated export must export a class declaration.`,UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,UnsupportedParameterDecorator:`Decorators cannot be used to decorate parameters.`,UnsupportedPropertyDecorator:`Decorators cannot be used to decorate object literal properties.`,UnsupportedSuper:`'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).`,UnterminatedComment:`Unterminated comment.`,UnterminatedRegExp:`Unterminated regular expression.`,UnterminatedString:`Unterminated string constant.`,UnterminatedTemplate:`Unterminated template.`,UsingDeclarationExport:`Using declaration cannot be exported.`,UsingDeclarationHasBindingPattern:`Using declaration cannot have destructuring patterns.`,VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:`A void binding may not have an initializer.`,YieldBindingIdentifier:`Can not use 'yield' as identifier inside a generator.`,YieldInParameter:`Yield expression is not allowed in formal parameters.`,YieldNotInGeneratorFunction:`'yield' is only allowed within generator functions.`,ZeroDigitNumericSeparator:`Numeric separator can not be used after leading 0.`},u={StrictDelete:`Deleting local variable in strict mode.`,StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' in strict mode.`,StrictFunction:`In strict mode code, functions can only be declared at top level or inside a block.`,StrictNumericEscape:`The only valid numeric escape in strict mode is '\\0'.`,StrictOctalLiteral:`Legacy octal literals are not allowed in strict mode.`,StrictWith:`'with' in strict mode.`},d={ParseExpressionEmptyInput:`Unexpected parseExpression() input: The input is empty or contains only comments.`,ParseExpressionExpectsEOF:({unexpected:e})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(e)}\`.`};let f=new Set([`ArrowFunctionExpression`,`AssignmentExpression`,`ConditionalExpression`,`YieldExpression`]);var p=Object.assign({PipeBodyIsTighter:`Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.`,PipeTopicRequiresHackPipes:`Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.`,PipeTopicUnbound:`Topic reference is unbound; it must be inside a pipe body.`,PipeTopicUnconfiguredToken:({token:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:`Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.`,PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${c({type:e})}; please wrap it in parentheses.`},{PipelineBodyNoArrow:`Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.`,PipelineBodySequenceExpression:`Pipeline body may not be a comma-separated sequence expression.`,PipelineHeadSequenceExpression:`Pipeline head should not be a comma-separated sequence expression.`,PipelineTopicUnused:`Pipeline is in topic style but does not use topic reference.`,PrimaryTopicNotAllowed:`Topic reference was used in a lexical context without topic binding.`,PrimaryTopicRequiresSmartPipeline:`Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.`});let m=[`message`];function h(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:n})}function g({toMessage:e,code:t,reasonCode:r,syntaxPlugin:i}){let a=r===`MissingPlugin`||r===`MissingOneOfPlugins`,o={AccessorCannotDeclareThisParameter:`AccesorCannotDeclareThisParameter`,AccessorCannotHaveTypeParameters:`AccesorCannotHaveTypeParameters`,ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:`ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference`,SetAccessorCannotHaveOptionalParameter:`SetAccesorCannotHaveOptionalParameter`,SetAccessorCannotHaveRestParameter:`SetAccesorCannotHaveRestParameter`,SetAccessorCannotHaveReturnType:`SetAccesorCannotHaveReturnType`};return o[r]&&(r=o[r]),function o(s,c){let l=SyntaxError();return l.code=t,l.reasonCode=r,l.loc=s,l.pos=s.index,l.syntaxPlugin=i,a&&(l.missingPlugin=c.missingPlugin),h(l,`clone`,function(e={}){let{line:t,column:r,index:i}=e.loc??s;return o(new n(t,r,i),Object.assign({},c,e.details))}),h(l,`details`,c),Object.defineProperty(l,`message`,{configurable:!0,get(){let t=`${e(c)} (${s.line}:${s.column})`;return this.message=t,t},set(e){Object.defineProperty(this,`message`,{value:e,writable:!0})}}),l}}function _(e,n){if(Array.isArray(e))return t=>_(t,e[0]);let r={};for(let i of Object.keys(e)){let a=e[i],o=typeof a==`string`?{message:()=>a}:typeof a==`function`?{message:a}:a,{message:s}=o,c=t(o,m),l=typeof s==`string`?()=>s:s;r[i]=g(Object.assign({code:`BABEL_PARSER_SYNTAX_ERROR`,reasonCode:i,toMessage:l},n?{syntaxPlugin:n}:{},c))}return r}let v=Object.assign({},_(o),_(l),_(u),_(d),_`pipelineOperator`(p));function y(){return{sourceType:`script`,sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function b(e){let t=y();if(e==null)return t;if(e.annexB!=null&&e.annexB!==!1)throw Error("The `annexB` option can only be set to `false`.");for(let n of Object.keys(t))e[n]!=null&&(t[n]=e[n]);if(t.startLine===1)e.startIndex==null&&t.startColumn>0?t.startIndex=t.startColumn:e.startColumn==null&&t.startIndex>0&&(t.startColumn=t.startIndex);else if((e.startColumn==null||e.startIndex==null)&&e.startIndex!=null)throw Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(t.sourceType===`commonjs`){if(e.allowAwaitOutsideFunction!=null)throw Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(e.allowReturnOutsideFunction!=null)throw Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(e.allowNewTargetOutsideFunction!=null)throw Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return t}let{defineProperty:x}=Object,S=(e,t)=>{e&&x(e,t,{enumerable:!1,value:e[t]})};function C(e){return S(e.loc.start,`index`),S(e.loc.end,`index`),e}var w=e=>class extends e{parse(){let e=C(super.parse());return this.optionFlags&256&&(e.tokens=e.tokens.map(C)),e}parseRegExpLiteral({pattern:e,flags:t}){let n=null;try{n=new RegExp(e,t)}catch{}let r=this.estreeParseLiteral(n);return r.regex={pattern:e,flags:t},r}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}let n=this.estreeParseLiteral(t);return n.bigint=String(n.value||e),n}parseDecimalLiteral(e){let t=this.estreeParseLiteral(null);return t.decimal=String(t.value||e),t}estreeParseLiteral(e){return this.parseLiteral(e,`Literal`)}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}estreeParseChainExpression(e,t){let n=this.startNodeAtNode(e);return n.expression=e,this.finishNodeAt(n,`ChainExpression`,t)}directiveToStmt(e){let t=e.value;delete e.value,this.castNodeTo(t,`Literal`),t.raw=t.extra.raw,t.value=t.extra.expressionValue;let n=this.castNodeTo(e,`ExpressionStatement`);return n.expression=t,n.directive=t.extra.rawValue,delete t.extra,n}fillOptionalPropertiesForTSESLint(e){}cloneEstreeStringLiteral(e){let{start:t,end:n,loc:r,range:i,raw:a,value:o}=e,s=Object.create(e.constructor.prototype);return s.type=`Literal`,s.start=t,s.end=n,s.loc=r,s.range=i,s.raw=a,s.value=o,s}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return e.type===`ExpressionStatement`&&e.expression.type===`Literal`&&typeof e.expression.value==`string`&&!((t=e.expression.extra)!=null&&t.parenthesized)}parseBlockBody(e,t,n,r,i){super.parseBlockBody(e,t,n,r,i),e.body=e.directives.map(e=>this.directiveToStmt(e)).concat(e.body),delete e.directives}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption(`estree`,`classFeatures`)?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let t=super.getPrivateNameSV(e);return delete e.id,e.name=t,this.castNodeTo(e,`PrivateIdentifier`)}isPrivateName(e){return this.getPluginOption(`estree`,`classFeatures`)?e.type===`PrivateIdentifier`:super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption(`estree`,`classFeatures`)?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){let n=super.parseLiteral(e,t);return n.raw=n.extra.raw,delete n.extra,n}parseFunctionBody(e,t,n=!1){super.parseFunctionBody(e,t,n),e.expression=e.body.type!==`BlockStatement`}parseMethod(e,t,n,r,i,a,o=!1){let s=this.startNode();s.kind=e.kind,s=super.parseMethod(s,t,n,r,i,a,o),delete s.kind;let{typeParameters:c}=e;return c&&(delete e.typeParameters,s.typeParameters=c,this.resetStartLocationFromNode(s,c)),e.value=this.castNodeTo(s,`FunctionExpression`),a===`ClassPrivateMethod`&&(e.computed=!1),a===`ObjectMethod`?(e.kind===`method`&&(e.kind=`init`),e.shorthand=!1,this.finishNode(e,`Property`)):this.finishNode(e,`MethodDefinition`)}nameIsConstructor(e){return e.type===`Literal`?e.value===`constructor`:super.nameIsConstructor(e)}parseClassProperty(...e){let t=super.parseClassProperty(...e);return this.getPluginOption(`estree`,`classFeatures`)&&this.castNodeTo(t,`PropertyDefinition`),t}parseClassPrivateProperty(...e){let t=super.parseClassPrivateProperty(...e);return this.getPluginOption(`estree`,`classFeatures`)?(this.castNodeTo(t,`PropertyDefinition`),t.computed=!1,t):t}parseClassAccessorProperty(e){let t=super.parseClassAccessorProperty(e);return this.getPluginOption(`estree`,`classFeatures`)&&(t.abstract&&this.hasPlugin(`typescript`)?(delete t.abstract,this.castNodeTo(t,`TSAbstractAccessorProperty`)):this.castNodeTo(t,`AccessorProperty`)),t}parseObjectProperty(e,t,n,r){let i=super.parseObjectProperty(e,t,n,r);return i&&(i.kind=`init`,this.castNodeTo(i,`Property`)),i}finishObjectProperty(e){return e.kind=`init`,this.finishNode(e,`Property`)}isValidLVal(e,t,n,r){return e===`Property`?`value`:super.isValidLVal(e,t,n,r)}isAssignable(e,t){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(e!=null&&this.isObjectProperty(e)){let{key:n,value:r}=e;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.loc.start),this.toAssignable(r,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,n){e.type===`Property`&&(e.kind===`get`||e.kind===`set`)?this.raise(v.PatternHasAccessor,e.key):e.type===`Property`&&e.method?this.raise(v.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,t,n)}finishCallExpression(e,t){let n=super.finishCallExpression(e,t);return n.callee.type===`Import`?(this.castNodeTo(n,`ImportExpression`),n.source=n.arguments[0],n.options=n.arguments[1]??null,n.attributes=n.arguments[1]??null,delete n.arguments,delete n.callee):n.type===`OptionalCallExpression`?this.castNodeTo(n,`CallExpression`):n.optional=!1,n}toReferencedArguments(e){e.type!==`ImportExpression`&&super.toReferencedArguments(e)}parseExport(e,t){let n=this.state.lastTokStartLoc,r=super.parseExport(e,t);switch(r.type){case`ExportAllDeclaration`:r.exported=null;break;case`ExportNamedDeclaration`:r.specifiers.length===1&&r.specifiers[0].type===`ExportNamespaceSpecifier`&&(this.castNodeTo(r,`ExportAllDeclaration`),r.exported=r.specifiers[0].exported,delete r.specifiers);case`ExportDefaultDeclaration`:{let{declaration:e}=r;e?.type===`ClassDeclaration`&&e.decorators?.length>0&&e.start===r.start&&this.resetStartLocation(r,n)}break}return r}stopParseSubscript(e,t){let n=super.stopParseSubscript(e,t);return t.optionalChainMember?this.estreeParseChainExpression(n,e.loc.end):n}parseMember(e,t,n,r,i){let a=super.parseMember(e,t,n,r,i);return a.type===`OptionalMemberExpression`?this.castNodeTo(a,`MemberExpression`):a.optional=!1,a}isOptionalMemberExpression(e){return e.type===`ChainExpression`?e.expression.type===`MemberExpression`:super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type===`ChainExpression`&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type===`Property`&&e.kind===`init`&&!e.method}isObjectMethod(e){return e.type===`Property`&&(e.method||e.kind===`get`||e.kind===`set`)}castNodeTo(e,t){let n=super.castNodeTo(e,t);return this.fillOptionalPropertiesForTSESLint(n),n}cloneIdentifier(e){let t=super.cloneIdentifier(e);return this.fillOptionalPropertiesForTSESLint(t),t}cloneStringLiteral(e){return e.type===`Literal`?this.cloneEstreeStringLiteral(e):super.cloneStringLiteral(e)}finishNodeAt(e,t,n){return C(super.finishNodeAt(e,t,n))}finishNode(e,t){let n=super.finishNode(e,t);return this.fillOptionalPropertiesForTSESLint(n),n}resetStartLocation(e,t){super.resetStartLocation(e,t),C(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),C(e)}},T=class{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}};let E={brace:new T(`{`),j_oTag:new T(`<tag`),j_cTag:new T(`</tag`),j_expr:new T(`<tag>...</tag>`,!0)};E.template=new T("`",!0);var D=class{constructor(e,t={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop==null?null:t.binop,this.updateContext=null}};let O=new Map;function k(e,t={}){t.keyword=e;let n=P(e,t);return O.set(e,n),n}function A(e,t){return P(e,{beforeExpr:!0,binop:t})}let ee=-1,j=[],te=[],ne=[],M=[],N=[],re=[];function P(e,t={}){return++ee,te.push(e),ne.push(t.binop??-1),M.push(t.beforeExpr??!1),N.push(t.startsExpr??!1),re.push(t.prefix??!1),j.push(new D(e,t)),ee}function F(e,t={}){return++ee,O.set(e,ee),te.push(e),ne.push(t.binop??-1),M.push(t.beforeExpr??!1),N.push(t.startsExpr??!1),re.push(t.prefix??!1),j.push(new D(`name`,t)),ee}let I={bracketL:P(`[`,{beforeExpr:!0,startsExpr:!0}),bracketHashL:P(`#[`,{beforeExpr:!0,startsExpr:!0}),bracketBarL:P(`[|`,{beforeExpr:!0,startsExpr:!0}),bracketR:P(`]`),bracketBarR:P(`|]`),braceL:P(`{`,{beforeExpr:!0,startsExpr:!0}),braceBarL:P(`{|`,{beforeExpr:!0,startsExpr:!0}),braceHashL:P(`#{`,{beforeExpr:!0,startsExpr:!0}),braceR:P(`}`),braceBarR:P(`|}`),parenL:P(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:P(`)`),comma:P(`,`,{beforeExpr:!0}),semi:P(`;`,{beforeExpr:!0}),colon:P(`:`,{beforeExpr:!0}),doubleColon:P(`::`,{beforeExpr:!0}),dot:P(`.`),question:P(`?`,{beforeExpr:!0}),questionDot:P(`?.`),arrow:P(`=>`,{beforeExpr:!0}),template:P(`template`),ellipsis:P(`...`,{beforeExpr:!0}),backQuote:P("`",{startsExpr:!0}),dollarBraceL:P("${",{beforeExpr:!0,startsExpr:!0}),templateTail:P("...`",{startsExpr:!0}),templateNonTail:P("...${",{beforeExpr:!0,startsExpr:!0}),at:P(`@`),hash:P(`#`,{startsExpr:!0}),interpreterDirective:P(`#!...`),eq:P(`=`,{beforeExpr:!0,isAssign:!0}),assign:P(`_=`,{beforeExpr:!0,isAssign:!0}),slashAssign:P(`_=`,{beforeExpr:!0,isAssign:!0}),xorAssign:P(`_=`,{beforeExpr:!0,isAssign:!0}),moduloAssign:P(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:P(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),bang:P(`!`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),tilde:P(`~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),doubleCaret:P(`^^`,{startsExpr:!0}),doubleAt:P(`@@`,{startsExpr:!0}),pipeline:A(`|>`,0),nullishCoalescing:A(`??`,1),logicalOR:A(`||`,1),logicalAND:A(`&&`,2),bitwiseOR:A(`|`,3),bitwiseXOR:A(`^`,4),bitwiseAND:A(`&`,5),equality:A(`==/!=/===/!==`,6),lt:A(`</>/<=/>=`,7),gt:A(`</>/<=/>=`,7),relational:A(`</>/<=/>=`,7),bitShift:A(`<</>>/>>>`,8),bitShiftL:A(`<</>>/>>>`,8),bitShiftR:A(`<</>>/>>>`,8),plusMin:P(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:P(`%`,{binop:10,startsExpr:!0}),star:P(`*`,{binop:10}),slash:A(`/`,10),exponent:P(`**`,{beforeExpr:!0,binop:11,rightAssociative:!0}),_in:k(`in`,{beforeExpr:!0,binop:7}),_instanceof:k(`instanceof`,{beforeExpr:!0,binop:7}),_break:k(`break`),_case:k(`case`,{beforeExpr:!0}),_catch:k(`catch`),_continue:k(`continue`),_debugger:k(`debugger`),_default:k(`default`,{beforeExpr:!0}),_else:k(`else`,{beforeExpr:!0}),_finally:k(`finally`),_function:k(`function`,{startsExpr:!0}),_if:k(`if`),_return:k(`return`,{beforeExpr:!0}),_switch:k(`switch`),_throw:k(`throw`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_try:k(`try`),_var:k(`var`),_const:k(`const`),_with:k(`with`),_new:k(`new`,{beforeExpr:!0,startsExpr:!0}),_this:k(`this`,{startsExpr:!0}),_super:k(`super`,{startsExpr:!0}),_class:k(`class`,{startsExpr:!0}),_extends:k(`extends`,{beforeExpr:!0}),_export:k(`export`),_import:k(`import`,{startsExpr:!0}),_null:k(`null`,{startsExpr:!0}),_true:k(`true`,{startsExpr:!0}),_false:k(`false`,{startsExpr:!0}),_typeof:k(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:k(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:k(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_do:k(`do`,{isLoop:!0,beforeExpr:!0}),_for:k(`for`,{isLoop:!0}),_while:k(`while`,{isLoop:!0}),_as:F(`as`,{startsExpr:!0}),_assert:F(`assert`,{startsExpr:!0}),_async:F(`async`,{startsExpr:!0}),_await:F(`await`,{startsExpr:!0}),_defer:F(`defer`,{startsExpr:!0}),_from:F(`from`,{startsExpr:!0}),_get:F(`get`,{startsExpr:!0}),_let:F(`let`,{startsExpr:!0}),_meta:F(`meta`,{startsExpr:!0}),_of:F(`of`,{startsExpr:!0}),_sent:F(`sent`,{startsExpr:!0}),_set:F(`set`,{startsExpr:!0}),_source:F(`source`,{startsExpr:!0}),_static:F(`static`,{startsExpr:!0}),_using:F(`using`,{startsExpr:!0}),_yield:F(`yield`,{startsExpr:!0}),_asserts:F(`asserts`,{startsExpr:!0}),_checks:F(`checks`,{startsExpr:!0}),_exports:F(`exports`,{startsExpr:!0}),_global:F(`global`,{startsExpr:!0}),_implements:F(`implements`,{startsExpr:!0}),_intrinsic:F(`intrinsic`,{startsExpr:!0}),_infer:F(`infer`,{startsExpr:!0}),_is:F(`is`,{startsExpr:!0}),_mixins:F(`mixins`,{startsExpr:!0}),_proto:F(`proto`,{startsExpr:!0}),_require:F(`require`,{startsExpr:!0}),_satisfies:F(`satisfies`,{startsExpr:!0}),_keyof:F(`keyof`,{startsExpr:!0}),_readonly:F(`readonly`,{startsExpr:!0}),_unique:F(`unique`,{startsExpr:!0}),_abstract:F(`abstract`,{startsExpr:!0}),_declare:F(`declare`,{startsExpr:!0}),_enum:F(`enum`,{startsExpr:!0}),_module:F(`module`,{startsExpr:!0}),_namespace:F(`namespace`,{startsExpr:!0}),_interface:F(`interface`,{startsExpr:!0}),_type:F(`type`,{startsExpr:!0}),_opaque:F(`opaque`,{startsExpr:!0}),name:P(`name`,{startsExpr:!0}),placeholder:P(`%%`,{startsExpr:!0}),string:P(`string`,{startsExpr:!0}),num:P(`num`,{startsExpr:!0}),bigint:P(`bigint`,{startsExpr:!0}),decimal:P(`decimal`,{startsExpr:!0}),regexp:P(`regexp`,{startsExpr:!0}),privateName:P(`#name`,{startsExpr:!0}),eof:P(`eof`),jsxName:P(`jsxName`),jsxText:P(`jsxText`,{beforeExpr:!0}),jsxTagStart:P(`jsxTagStart`,{startsExpr:!0}),jsxTagEnd:P(`jsxTagEnd`)};function L(e){return e>=93&&e<=133}function R(e){return e<=92}function z(e){return e>=58&&e<=133}function ie(e){return e>=58&&e<=137}function ae(e){return M[e]}function oe(e){return N[e]}function se(e){return e>=29&&e<=33}function ce(e){return e>=129&&e<=131}function le(e){return e>=90&&e<=92}function ue(e){return e>=58&&e<=92}function B(e){return e>=39&&e<=59}function de(e){return e===34}function fe(e){return re[e]}function pe(e){return e>=121&&e<=123}function me(e){return e>=124&&e<=130}function he(e){return te[e]}function ge(e){return ne[e]}function _e(e){return e===57}function ve(e){return e>=24&&e<=25}function ye(e){return j[e]}j[8].updateContext=e=>{e.pop()},j[5].updateContext=j[7].updateContext=j[23].updateContext=e=>{e.push(E.brace)},j[22].updateContext=e=>{e[e.length-1]===E.template?e.pop():e.push(E.template)},j[143].updateContext=e=>{e.push(E.j_expr,E.j_oTag)};let be=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,xe=`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`,Se=RegExp(`[`+be+`]`),Ce=RegExp(`[`+be+xe+`]`);be=xe=null;let we=[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],Te=[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];function Ee(e,t){let n=65536;for(let r=0,i=t.length;r<i;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function De(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Se.test(String.fromCharCode(e)):Ee(e,we)}function Oe(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Ce.test(String.fromCharCode(e)):Ee(e,we)||Ee(e,Te)}let V={keyword:`break.case.catch.continue.debugger.default.do.else.finally.for.function.if.return.switch.throw.try.var.const.while.with.new.this.super.class.extends.export.import.null.true.false.in.instanceof.typeof.void.delete`.split(`.`),strict:[`implements`,`interface`,`let`,`package`,`private`,`protected`,`public`,`static`,`yield`],strictBind:[`eval`,`arguments`]},ke=new Set(V.keyword),Ae=new Set(V.strict),je=new Set(V.strictBind);function Me(e,t){return t&&e===`await`||e===`enum`}function Ne(e,t){return Me(e,t)||Ae.has(e)}function Pe(e){return je.has(e)}function Fe(e,t){return Ne(e,t)||Pe(e)}function Ie(e){return ke.has(e)}function Le(e,t,n){return e===64&&t===64&&De(n)}let Re=new Set(`break.case.catch.continue.debugger.default.do.else.finally.for.function.if.return.switch.throw.try.var.const.while.with.new.this.super.class.extends.export.import.null.true.false.in.instanceof.typeof.void.delete.implements.interface.let.package.private.protected.public.static.yield.eval.arguments.enum.await`.split(`.`));function ze(e){return Re.has(e)}var Be=class{constructor(e){this.flags=0,this.names=new Map,this.firstLexicalName=``,this.flags=e}},Ve=class{constructor(e,t){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=t}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&64)>0&&(e&2)==0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&128)return!0;if(t&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new Be(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,t,n){let r=this.currentScope();if(t&8||t&16){this.checkRedeclarationInScope(r,e,t,n);let i=r.names.get(e)||0;t&16?i|=4:(r.firstLexicalName||=e,i|=2),r.names.set(e,i),t&8&&this.maybeExportDefined(r,e)}else if(t&4)for(let i=this.scopeStack.length-1;i>=0&&(r=this.scopeStack[i],this.checkRedeclarationInScope(r,e,t,n),r.names.set(e,(r.names.get(e)||0)|1),this.maybeExportDefined(r,e),!(r.flags&1667));--i);this.parser.inModule&&r.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,n,r){this.isRedeclaredInScope(e,t,n)&&this.parser.raise(v.VarRedeclaration,r,{identifierName:t})}isRedeclaredInScope(e,t,n){if(!(n&1))return!1;if(n&8)return e.names.has(t);let r=e.names.get(t)||0;return n&16?(r&2)>0||!this.treatFunctionsAsVarInScope(e)&&(r&1)>0:(r&2)>0&&!(e.flags&8&&e.firstLexicalName===t)||!this.treatFunctionsAsVarInScope(e)&&(r&4)>0}checkLocalExport(e){let{name:t}=e;this.scopeStack[0].names.has(t)||this.undefinedExports.set(t,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&1667)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&1731&&!(t&4))return t}}},He=class extends Be{constructor(...e){super(...e),this.declareFunctions=new Set}},Ue=class extends Ve{createScope(e){return new He(e)}declareName(e,t,n){let r=this.currentScope();if(t&2048){this.checkRedeclarationInScope(r,e,t,n),this.maybeExportDefined(r,e),r.declareFunctions.add(e);return}super.declareName(e,t,n)}isRedeclaredInScope(e,t,n){if(super.isRedeclaredInScope(e,t,n))return!0;if(n&2048&&!e.declareFunctions.has(t)){let n=e.names.get(t);return(n&4)>0||(n&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}};let We=new Set([`_`,`any`,`bool`,`boolean`,`empty`,`extends`,`false`,`interface`,`mixed`,`null`,`number`,`static`,`string`,`true`,`typeof`,`void`]),H=_`flow`({AmbiguousConditionalArrow:`Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.`,AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:e})=>`Cannot overwrite reserved type ${e}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:n})=>`Enum \`${e}\` has type \`${n}\`, so the initializer of \`${t}\` needs to be a ${n} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:t,suggestion:n})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${n}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:`Explicit inexact syntax cannot appear inside an explicit exact object type.`,InexactInsideNonObject:`Explicit inexact syntax cannot appear in class or interface definitions.`,InexactVariance:`Explicit inexact syntax cannot have variance.`,InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:`Type parameter declaration needs a default, since a preceding type parameter declaration has a default.`,NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:`Cannot have a flow comment inside another flow comment.`,PatternIsOptional:Object.assign({message:`A binding pattern parameter cannot be optional in an implementation signature.`},{reasonCode:`OptionalBindingPattern`}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:`Spread properties cannot have variance.`,ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:`The type cast expression is expected to be wrapped with parenthesis.`,UnexpectedExplicitInexactInObject:`Explicit inexact syntax must appear at the end of an inexact object.`,UnexpectedReservedType:({reservedType:e})=>`Unexpected reserved type ${e}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:`Spread operator cannot appear in class or interface definitions.`,UnexpectedSubtractionOperand:`Unexpected token, expected "number" or "bigint".`,UnexpectedTokenAfterTypeParameter:`Expected an arrow function after this type parameter declaration.`,UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:`Only declares and type imports are allowed inside declare module.`,UnterminatedFlowComment:`Unterminated flow-comment.`});function Ge(e){return e.type===`DeclareExportAllDeclaration`||e.type===`DeclareExportDeclaration`&&(!e.declaration||e.declaration.type!==`TypeAlias`&&e.declaration.type!==`InterfaceDeclaration`)}function Ke(e){return e.importKind===`type`||e.importKind===`typeof`}let qe={const:`declare export var`,let:`declare export var`,type:`export type`,interface:`export interface`};function Je(e,t){let n=[],r=[];for(let i=0;i<e.length;i++)(t(e[i],i,e)?n:r).push(e[i]);return[n,r]}let Ye=/\*?\s*@((?:no)?flow)\b/;var Xe=e=>class extends e{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return Ue}shouldParseTypes(){return this.getPluginOption(`flow`,`all`)||this.flowPragma===`flow`}finishToken(e,t){e!==134&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(this.flowPragma===void 0){let t=Ye.exec(e.value);if(t)if(t[1]===`flow`)this.flowPragma=`flow`;else if(t[1]===`noflow`)this.flowPragma=`noflow`;else throw Error(`Unexpected flow pragma`)}super.addComment(e)}flowParseTypeInitialiser(e){let t=this.state.inType;this.state.inType=!0,this.expect(e||14);let n=this.flowParseType();return this.state.inType=t,n}flowParsePredicate(){let e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>t.index+1&&this.raise(H.UnexpectedSpaceBetweenModuloChecks,t),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,`DeclaredPredicate`)):this.finishNode(e,`InferredPredicate`)}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let t=null,n=null;return this.match(54)?(this.state.inType=e,n=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(n=this.flowParsePredicate())),[t,n]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,`DeclareClass`)}flowParseDeclareFunction(e){this.next();let t=e.id=this.parseIdentifier(),n=this.startNode(),r=this.startNode();this.match(47)?n.typeParameters=this.flowParseTypeParameterDeclaration():n.typeParameters=null,this.expect(10);let i=this.flowParseFunctionTypeParams();return n.params=i.params,n.rest=i.rest,n.this=i._this,this.expect(11),[n.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.typeAnnotation=this.finishNode(n,`FunctionTypeAnnotation`),t.typeAnnotation=this.finishNode(r,`TypeAnnotation`),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,`DeclareFunction`)}flowParseDeclare(e,t){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(H.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,t);throw this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,`DeclareVariable`)}flowParseDeclareModule(e){this.scope.enter(0),this.match(134)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let t=e.body=this.startNode(),n=t.body=[];for(this.expect(5);!this.match(8);){let e=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(H.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),n.push(super.parseImport(e))):(this.expectContextual(125,H.UnsupportedStatementInDeclareModule),n.push(this.flowParseDeclare(e,!0)))}this.scope.exit(),this.expect(8),this.finishNode(t,`BlockStatement`);let r=null,i=!1;return n.forEach(e=>{Ge(e)?(r===`CommonJS`&&this.raise(H.AmbiguousDeclareModuleKind,e),r=`ES`):e.type===`DeclareModuleExports`&&(i&&this.raise(H.DuplicateDeclareModuleExports,e),r===`ES`&&this.raise(H.AmbiguousDeclareModuleKind,e),r=`CommonJS`,i=!0)}),e.kind=r||`CommonJS`,this.finishNode(e,`DeclareModule`)}flowParseDeclareExportDeclaration(e,t){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,`DeclareExportDeclaration`);if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!t){let e=this.state.value;throw this.raise(H.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:e,suggestion:qe[e]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,`DeclareExportDeclaration`);if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type===`ExportNamedDeclaration`?(e.default=!1,delete e.exportKind,this.castNodeTo(e,`DeclareExportDeclaration`)):this.castNodeTo(e,`DeclareExportAllDeclaration`);throw this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,`DeclareModuleExports`)}flowParseDeclareTypeAlias(e){this.next();let t=this.flowParseTypeAlias(e);return this.castNodeTo(t,`DeclareTypeAlias`),t}flowParseDeclareOpaqueType(e){this.next();let t=this.flowParseOpaqueType(e,!0);return this.castNodeTo(t,`DeclareOpaqueType`),t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,`DeclareInterface`)}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!t&&this.eat(12));if(t){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,`InterfaceExtends`)}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,`InterfaceDeclaration`)}checkNotUnderscore(e){e===`_`&&this.raise(H.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,t,n){We.has(e)&&this.raise(n?H.AssignReservedType:H.UnexpectedReservedType,t,{reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,`TypeAlias`)}flowParseOpaqueType(e,t){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,`OpaqueType`)}flowParseTypeParameter(e=!1){let t=this.state.startLoc,n=this.startNode(),r=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return n.name=i.name,n.variance=r,n.bound=i.typeAnnotation,this.match(29)?(this.eat(29),n.default=this.flowParseType()):e&&this.raise(H.MissingTypeParamDefault,t),this.finishNode(n,`TypeParameter`)}flowParseTypeParameterDeclaration(){let e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let n=!1;do{let e=this.flowParseTypeParameter(n);t.params.push(e),e.default&&(n=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,`TypeParameterDeclaration`)}flowInTopLevelContext(e){if(this.curContext()!==E.brace){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}else return e()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let e=this.startNode(),t=this.state.inType;return this.state.inType=!0,e.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let t=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=t}),this.state.inType=t,!this.state.inType&&this.curContext()===E.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,`TypeParameterInstantiation`)}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return null;let e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=t,this.finishNode(e,`TypeParameterInstantiation`)}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,`InterfaceTypeAnnotation`)}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,n){return e.static=t,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=n,this.finishNode(e,`ObjectTypeIndexer`)}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,`ObjectTypeInternalSlot`)}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,`FunctionTypeAnnotation`)}flowParseObjectTypeCallProperty(e,t){let n=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(n),this.finishNode(e,`ObjectTypeCallProperty`)}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:n,allowProto:r,allowInexact:i}){let a=this.state.inType;this.state.inType=!0;let o=this.startNode();o.callProperties=[],o.properties=[],o.indexers=[],o.internalSlots=[];let s,c,l=!1;for(t&&this.match(6)?(this.expect(6),s=9,c=!0):(this.expect(5),s=8,c=!1),o.exact=c;!this.match(s);){let t=!1,a=null,s=null,u=this.startNode();if(r&&this.isContextual(118)){let t=this.lookahead();t.type!==14&&t.type!==17&&(this.next(),a=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let e=this.lookahead();e.type!==14&&e.type!==17&&(this.next(),t=!0)}let d=this.flowParseVariance();if(this.eat(0))a!=null&&this.unexpected(a),this.eat(0)?(d&&this.unexpected(d.loc.start),o.internalSlots.push(this.flowParseObjectTypeInternalSlot(u,t))):o.indexers.push(this.flowParseObjectTypeIndexer(u,t,d));else if(this.match(10)||this.match(47))a!=null&&this.unexpected(a),d&&this.unexpected(d.loc.start),o.callProperties.push(this.flowParseObjectTypeCallProperty(u,t));else{let e=`init`;(this.isContextual(99)||this.isContextual(104))&&ie(this.lookahead().type)&&(e=this.state.value,this.next());let r=this.flowParseObjectTypeProperty(u,t,a,d,e,n,i??!c);r===null?(l=!0,s=this.state.lastTokStartLoc):o.properties.push(r)}this.flowObjectTypeSemicolon(),s&&!this.match(8)&&!this.match(9)&&this.raise(H.UnexpectedExplicitInexactInObject,s)}this.expect(s),n&&(o.inexact=l);let u=this.finishNode(o,`ObjectTypeAnnotation`);return this.state.inType=a,u}flowParseObjectTypeProperty(e,t,n,r,i,a,o){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(a?o||this.raise(H.InexactInsideExact,this.state.lastTokStartLoc):this.raise(H.InexactInsideNonObject,this.state.lastTokStartLoc),r&&this.raise(H.InexactVariance,r),null):(a||this.raise(H.UnexpectedSpreadType,this.state.lastTokStartLoc),n!=null&&this.unexpected(n),r&&this.raise(H.SpreadVariance,r),e.argument=this.flowParseType(),this.finishNode(e,`ObjectTypeSpreadProperty`));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=n!=null,e.kind=i;let o=!1;return this.match(47)||this.match(10)?(e.method=!0,n!=null&&this.unexpected(n),r&&this.unexpected(r.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(i===`get`||i===`set`)&&this.flowCheckGetterSetterParams(e),!a&&e.key.name===`constructor`&&e.value.this&&this.raise(H.ThisParamBannedInConstructor,e.value.this)):(i!==`init`&&this.unexpected(),e.method=!1,this.eat(17)&&(o=!0),e.value=this.flowParseTypeInitialiser(),e.variance=r),e.optional=o,this.finishNode(e,`ObjectTypeProperty`)}}flowCheckGetterSetterParams(e){let t=e.kind===`get`?0:1,n=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind===`get`?H.GetterMayNotHaveThisParam:H.SetterMayNotHaveThisParam,e.value.this),n!==t&&this.raise(e.kind===`get`?v.BadGetterArity:v.BadSetterArity,e),e.kind===`set`&&e.value.rest&&this.raise(v.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){e??=this.state.startLoc;let n=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let t=this.startNodeAt(e);t.qualification=n,t.id=this.flowParseRestrictedIdentifier(!0),n=this.finishNode(t,`QualifiedTypeIdentifier`)}return n}flowParseGenericType(e,t){let n=this.startNodeAt(e);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,`GenericTypeAnnotation`)}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,`TypeofTypeAnnotation`)}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,`TupleTypeAnnotation`)}flowParseFunctionTypeParam(e){let t=null,n=!1,r=null,i=this.startNode(),a=this.lookahead(),o=this.state.type===78;return a.type===14||a.type===17?(o&&!e&&this.raise(H.ThisParamMustBeFirst,i),t=this.parseIdentifier(o),this.eat(17)&&(n=!0,o&&this.raise(H.ThisParamMayNotBeOptional,i)),r=this.flowParseTypeInitialiser()):r=this.flowParseType(),i.name=t,i.optional=n,i.typeAnnotation=r,this.finishNode(i,`FunctionTypeParam`)}reinterpretTypeAsFunctionTypeParam(e){let t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,`FunctionTypeParam`)}flowParseFunctionTypeParams(e=[]){let t=null,n=null;for(this.match(78)&&(n=this.flowParseFunctionTypeParam(!0),n.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this:n}}flowIdentToTypeAnnotation(e,t,n){switch(n.name){case`any`:return this.finishNode(t,`AnyTypeAnnotation`);case`bool`:case`boolean`:return this.finishNode(t,`BooleanTypeAnnotation`);case`mixed`:return this.finishNode(t,`MixedTypeAnnotation`);case`empty`:return this.finishNode(t,`EmptyTypeAnnotation`);case`number`:return this.finishNode(t,`NumberTypeAnnotation`);case`string`:return this.finishNode(t,`StringTypeAnnotation`);case`symbol`:return this.finishNode(t,`SymbolTypeAnnotation`);default:return this.checkNotUnderscore(n.name),this.flowParseGenericType(e,n)}}flowParsePrimaryType(){let e=this.state.startLoc,t=this.startNode(),n,r,i=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,r=this.flowParseTupleType(),this.state.noAnonFunctionType=a,r;case 47:{let e=this.startNode();return e.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),n=this.flowParseFunctionTypeParams(),e.params=n.params,e.rest=n.rest,e.this=n._this,this.expect(11),this.expect(19),e.returnType=this.flowParseType(),this.finishNode(e,`FunctionTypeAnnotation`)}case 10:{let e=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(L(this.state.type)||this.match(78)){let e=this.lookahead().type;i=e!==17&&e!==14}else i=!0;if(i){if(this.state.noAnonFunctionType=!1,r=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),r;this.eat(12)}return n=r?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(r)]):this.flowParseFunctionTypeParams(),e.params=n.params,e.rest=n.rest,e.this=n._this,this.expect(11),this.expect(19),e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,`FunctionTypeAnnotation`)}case 134:return this.parseLiteral(this.state.value,`StringLiteralTypeAnnotation`);case 85:case 86:return t.value=this.match(85),this.next(),this.finishNode(t,`BooleanLiteralTypeAnnotation`);case 53:if(this.state.value===`-`){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,`NumberLiteralTypeAnnotation`,t);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,`BigIntLiteralTypeAnnotation`,t);throw this.raise(H.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 135:return this.parseLiteral(this.state.value,`NumberLiteralTypeAnnotation`);case 136:return this.parseLiteral(this.state.value,`BigIntLiteralTypeAnnotation`);case 88:return this.next(),this.finishNode(t,`VoidTypeAnnotation`);case 84:return this.next(),this.finishNode(t,`NullLiteralTypeAnnotation`);case 78:return this.next(),this.finishNode(t,`ThisTypeAnnotation`);case 55:return this.next(),this.finishNode(t,`ExistsTypeAnnotation`);case 87:return this.flowParseTypeofType();default:if(ue(this.state.type)){let e=he(this.state.type);return this.next(),super.createIdentifier(t,e)}else if(L(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,t,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,t=this.flowParsePrimaryType(),n=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let r=this.startNodeAt(e),i=this.eat(18);n||=i,this.expect(0),!i&&this.match(3)?(r.elementType=t,this.next(),t=this.finishNode(r,`ArrayTypeAnnotation`)):(r.objectType=t,r.indexType=this.flowParseType(),this.expect(3),n?(r.optional=i,t=this.finishNode(r,`OptionalIndexedAccessType`)):t=this.finishNode(r,`IndexedAccessType`))}return t}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,`NullableTypeAnnotation`)):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,`FunctionTypeAnnotation`)}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return e.types.length===1?t:this.finishNode(e,`IntersectionTypeAnnotation`)}flowParseUnionType(){let e=this.startNode();this.eat(43);let t=this.flowParseIntersectionType();for(e.types=[t];this.eat(43);)e.types.push(this.flowParseIntersectionType());return e.types.length===1?t:this.finishNode(e,`UnionTypeAnnotation`)}flowParseType(){let e=this.state.inType;this.state.inType=!0;let t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value===`_`){let e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}else return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,`TypeAnnotation`)}flowParseTypeAnnotatableIdentifier(e){let t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),this.state.value===`+`?e.kind=`plus`:e.kind=`minus`,this.next(),this.finishNode(e,`Variance`)):e}parseFunctionBody(e,t,n=!1){if(t){this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,n));return}super.parseFunctionBody(e,!1,n)}parseFunctionBodyAndFinish(e,t,n=!1){if(this.match(14)){let t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,`TypeAnnotation`):null}return super.parseFunctionBodyAndFinish(e,t,n)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){if(z(this.lookahead().type)){let e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}let t=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(t)&&(this.flowPragma=null),t}parseExpressionStatement(e,t,n){if(t.type===`Identifier`){if(t.name===`declare`){if(this.match(80)||L(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(L(this.state.type)){if(t.name===`interface`)return this.flowParseInterface(e);if(t.name===`type`)return this.flowParseTypeAlias(e);if(t.name===`opaque`)return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,t,n)}shouldParseExportDeclaration(){let{type:e}=this.state;return e===126||ce(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return e===126||ce(e)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,n){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let t=this.lookaheadCharCode();if(t===44||t===61||t===58||t===41)return this.setOptionalParametersError(n),e}this.expect(17);let r=this.state.clone(),i=this.state.noArrowAt,a=this.startNodeAt(t),{consequent:o,failed:s}=this.tryParseConditionalConsequent(),[c,l]=this.getArrowLikeExpressions(o);if(s||l.length>0){let e=[...i];if(l.length>0){this.state=r,this.state.noArrowAt=e;for(let t=0;t<l.length;t++)e.push(l[t].start);({consequent:o,failed:s}=this.tryParseConditionalConsequent()),[c,l]=this.getArrowLikeExpressions(o)}s&&c.length>1&&this.raise(H.AmbiguousConditionalArrow,r.startLoc),s&&c.length===1&&(this.state=r,e.push(c[0].start),this.state.noArrowAt=e,{consequent:o,failed:s}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(o,!0),this.state.noArrowAt=i,this.expect(14),a.test=e,a.consequent=o,a.alternate=this.forwardNoArrowParamsConversionAt(a,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(a,`ConditionalExpression`)}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){let n=[e],r=[];for(;n.length!==0;){let e=n.pop();e.type===`ArrowFunctionExpression`&&e.body.type!==`BlockStatement`?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):r.push(e),n.push(e.body)):e.type===`ConditionalExpression`&&(n.push(e.consequent),n.push(e.alternate))}return t?(r.forEach(e=>this.finishArrowValidation(e)),[r,[]]):Je(r,e=>e.params.every(e=>this.isAssignable(e,!0)))}finishArrowValidation(e){this.toAssignableList(e.params,e.extra?.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let n;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),n=t(),this.state.noArrowParamsConversionAt.pop()):n=t(),n}parseParenItem(e,t){let n=super.parseParenItem(e,t);if(this.eat(17)&&(n.optional=!0,this.resetEndLocation(e)),this.match(14)){let e=this.startNodeAt(t);return e.expression=n,e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,`TypeCastExpression`)}return n}assertModuleNodeAllowed(e){e.type===`ImportDeclaration`&&(e.importKind===`type`||e.importKind===`typeof`)||e.type===`ExportNamedDeclaration`&&e.exportKind===`type`||e.type===`ExportAllDeclaration`&&e.exportKind===`type`||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind=`type`;let t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}else if(this.isContextual(131)){e.exportKind=`type`;let t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}else if(this.isContextual(129)){e.exportKind=`type`;let t=this.startNode();return this.next(),this.flowParseInterface(t)}else if(this.isContextual(126)){e.exportKind=`value`;let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind=`type`,this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:t}=this.state,n=super.maybeParseExportNamespaceSpecifier(e);return n&&e.exportKind===`type`&&this.unexpected(t),n}parseClassId(e,t,n){super.parseClassId(e,t,n),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,n){let{startLoc:r}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,n),t.declare&&(t.type!==`ClassProperty`&&t.type!==`ClassPrivateProperty`&&t.type!==`PropertyDefinition`?this.raise(H.DeclareClassElement,r):t.value&&this.raise(H.DeclareClassFieldInitializer,t.value))}isIterator(e){return e===`iterator`||e===`asyncIterator`}readIterator(){let e=super.readWord1(),t=`@@`+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(v.InvalidIdentifier,this.state.curPosition(),{identifierName:t}),this.finishToken(132,t)}getTokenFromCode(e){let t=this.input.charCodeAt(this.state.pos+1);e===123&&t===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?t===46?this.finishOp(18,2):this.finishOp(17,1):Le(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,t){return e.type===`TypeCastExpression`?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){!t&&e.type===`AssignmentExpression`&&e.left.type===`TypeCastExpression`&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,n){for(let t=0;t<e.length;t++){let n=e[t];n?.type===`TypeCastExpression`&&(e[t]=this.typeCastToParameter(n))}super.toAssignableList(e,t,n)}toReferencedList(e,t){for(let r=0;r<e.length;r++){var n;let i=e[r];i&&i.type===`TypeCastExpression`&&!((n=i.extra)!=null&&n.parenthesized)&&(e.length>1||!t)&&this.raise(H.TypeCastInPattern,i.typeAnnotation)}return e}parseArrayLike(e,t,n){let r=super.parseArrayLike(e,t,n);return n!=null&&!this.state.maybeInArrowParameters&&this.toReferencedList(r.elements),r}isValidLVal(e,t,n,r){return e===`TypeCastExpression`||super.isValidLVal(e,t,n,r)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,n,r,i,a){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,n,r,i,a),t.params&&i){let e=t.params;e.length>0&&this.isThisParam(e[0])&&this.raise(H.ThisParamBannedInConstructor,t)}else if(t.type===`MethodDefinition`&&i&&t.value.params){let e=t.value.params;e.length>0&&this.isThisParam(e[0])&&this.raise(H.ThisParamBannedInConstructor,t)}}pushClassPrivateMethod(e,t,n,r){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,n,r)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let t=e.implements=[];do{let e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,t.push(this.finishNode(e,`ClassImplements`))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let t=this.getObjectOrClassMethodParams(e);if(t.length>0){let n=t[0];this.isThisParam(n)&&e.kind===`get`?this.raise(H.GetterMayNotHaveThisParam,n):this.isThisParam(n)&&this.raise(H.SetterMayNotHaveThisParam,n)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,n,r,i,a,o){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let s;this.match(47)&&!a&&(s=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let c=super.parseObjPropValue(e,t,n,r,i,a,o);return s&&((c.value||c).typeParameters=s),c}parseFunctionParamType(e){return this.eat(17)&&(e.type!==`Identifier`&&this.raise(H.PatternIsOptional,e),this.isThisParam(e)&&this.raise(H.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(H.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(H.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,t){let n=super.parseMaybeDefault(e,t);return n.type===`AssignmentPattern`&&n.typeAnnotation&&n.right.start<n.typeAnnotation.start&&this.raise(H.TypeBeforeInitializer,n.typeAnnotation),n}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!==`value`&&this.raise(H.ImportReflectionHasImportType,e.specifiers[0].loc.start)}parseImportSpecifierLocal(e,t,n){t.local=Ke(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,n))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){if(!e)return!0;let t=this.lookaheadCharCode();return t===123||t===42}return!e&&this.isContextual(87)}applyImportPhase(e,t,n,r){if(super.applyImportPhase(e,t,n,r),t){if(!n&&this.match(65))return;e.exportKind=n===`type`?n:`value`}else n===`type`&&this.match(55)&&this.unexpected(),e.importKind=n===`type`||n===`typeof`?n:`value`}parseImportSpecifier(e,t,n,r,i){let a=e.imported,o=null;a.type===`Identifier`&&(a.name===`type`?o=`type`:a.name===`typeof`&&(o=`typeof`));let s=!1;if(this.isContextual(93)&&!this.isLookaheadContextual(`as`)){let t=this.parseIdentifier(!0);o!==null&&!z(this.state.type)?(e.imported=t,e.importKind=o,e.local=this.cloneIdentifier(t)):(e.imported=a,e.importKind=null,e.local=this.parseIdentifier())}else{if(o!==null&&z(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=o;else{if(t)throw this.raise(v.ImportBindingIsString,e,{importName:a.value});e.imported=a,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(s=!0,e.local=this.cloneIdentifier(e.imported))}let c=Ke(e);return n&&c&&this.raise(H.ImportTypeShorthandOnlyInPureImport,e),(n||c)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),s&&!n&&!c&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,`ImportSpecifier`)}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(e,t){let n=e.kind;n!==`get`&&n!==`set`&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){let t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=t}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var n;let r=null,i;if(this.hasPlugin(`jsx`)&&(this.match(143)||this.match(47))){if(r=this.state.clone(),i=this.tryParse(()=>super.parseMaybeAssign(e,t),r),!i.error)return i.node;let{context:n}=this.state,a=n[n.length-1];(a===E.j_oTag||a===E.j_expr)&&n.pop()}if((n=i)!=null&&n.error||this.match(47)){var a,o;r||=this.state.clone();let n,s=this.tryParse(r=>{var i;n=this.flowParseTypeParameterDeclaration();let a=this.forwardNoArrowParamsConversionAt(n,()=>{let r=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(r,n),r});(i=a.extra)!=null&&i.parenthesized&&r();let o=this.maybeUnwrapTypeCastExpression(a);return o.type!==`ArrowFunctionExpression`&&r(),o.typeParameters=n,this.resetStartLocationFromNode(o,n),a},r),c=null;if(s.node&&this.maybeUnwrapTypeCastExpression(s.node).type===`ArrowFunctionExpression`){if(!s.error&&!s.aborted)return s.node.async&&this.raise(H.UnexpectedTypeParameterBeforeAsyncArrowFunction,n),s.node;c=s.node}if((a=i)!=null&&a.node)return this.state=i.failState,i.node;if(c)return this.state=s.failState,c;throw(o=i)!=null&&o.thrown?i.error:s.thrown?s.error:this.raise(H.UnexpectedTokenAfterTypeParameter,n)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(()=>{let t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let n=this.startNode();return[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),n});if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,`TypeAnnotation`):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,n,r=!0){if(!(n&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start)))){for(let t=0;t<e.params.length;t++)this.isThisParam(e.params[t])&&t>0&&this.raise(H.ThisParamMustBeFirst,e.params[t]);super.checkParams(e,t,n,r)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(e,t,n){if(e.type===`Identifier`&&e.name===`async`&&this.state.noArrowAt.includes(t.index)){this.next();let n=this.startNodeAt(t);n.callee=e,n.arguments=super.parseCallExpressionArguments(),e=this.finishNode(n,`CallExpression`)}else if(e.type===`Identifier`&&e.name===`async`&&this.match(47)){let r=this.state.clone(),i=this.tryParse(e=>this.parseAsyncArrowWithTypeParameters(t)||e(),r);if(!i.error&&!i.aborted)return i.node;let a=this.tryParse(()=>super.parseSubscripts(e,t,n),r);if(a.node&&!a.error)return a.node;if(i.node)return this.state=i.failState,i.node;if(a.node)return this.state=a.failState,a.node;throw i.error||a.error}return super.parseSubscripts(e,t,n)}parseSubscript(e,t,n,r){if(this.match(18)&&this.isLookaheadToken_lt()){if(r.optionalChainMember=!0,n)return r.stop=!0,e;this.next();let i=this.startNodeAt(t);return i.callee=e,i.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),i.arguments=this.parseCallExpressionArguments(),i.optional=!0,this.finishCallExpression(i,!0)}else if(!n&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let n=this.startNodeAt(t);n.callee=e;let i=this.tryParse(()=>(n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),n.arguments=super.parseCallExpressionArguments(),r.optionalChainMember&&(n.optional=!1),this.finishCallExpression(n,r.optionalChainMember)));if(i.node)return i.error&&(this.state=i.failState),i.node}return super.parseSubscript(e,t,n,r)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(47)&&(t=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){let t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){let t=this.input.charCodeAt(this.state.pos+1);if(e===42&&t===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(e===124&&t===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,t){let n=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(H.UnterminatedFlowComment,this.state.curPosition()),n}skipBlockComment(){if(this.hasPlugin(`flowComments`)&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(H.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?`*-/`:`*/`)}skipFlowComment(){let{pos:e}=this.state,t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;let n=this.input.charCodeAt(t+e),r=this.input.charCodeAt(t+e+1);return n===58&&r===58?t+2:this.input.slice(t+e,t+e+12)===`flow-include`?t+12:n===58&&r!==58?t:!1}hasFlowCommentCompletion(){if(this.input.indexOf(`*/`,this.state.pos)===-1)throw this.raise(v.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:n}){this.raise(H.EnumBooleanMemberNotInitialized,e,{memberName:n,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?t.explicitType===`symbol`?H.EnumInvalidMemberInitializerSymbolType:H.EnumInvalidMemberInitializerPrimaryType:H.EnumInvalidMemberInitializerUnknownType,e,t)}flowEnumErrorNumberMemberNotInitialized(e,t){this.raise(H.EnumNumberMemberNotInitialized,e,t)}flowEnumErrorStringMemberInconsistentlyInitialized(e,t){this.raise(H.EnumStringMemberInconsistentlyInitialized,e,t)}flowEnumMemberInit(){let e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let n=this.parseNumericLiteral(this.state.value);return t()?{type:`number`,loc:n.loc.start,value:n}:{type:`invalid`,loc:e}}case 134:{let n=this.parseStringLiteral(this.state.value);return t()?{type:`string`,loc:n.loc.start,value:n}:{type:`invalid`,loc:e}}case 85:case 86:{let n=this.parseBooleanLiteral(this.match(85));return t()?{type:`boolean`,loc:n.loc.start,value:n}:{type:`invalid`,loc:e}}default:return{type:`invalid`,loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(29)?this.flowEnumMemberInit():{type:`none`,loc:e}}}flowEnumCheckExplicitTypeMismatch(e,t,n){let{explicitType:r}=t;r!==null&&r!==n&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){let n=new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},i=!1;for(;!this.match(8);){if(this.eat(21)){i=!0;break}let a=this.startNode(),{id:o,init:s}=this.flowEnumMemberRaw(),c=o.name;if(c===``)continue;/^[a-z]/.test(c)&&this.raise(H.EnumInvalidMemberName,o,{memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),n.has(c)&&this.raise(H.EnumDuplicateMemberName,o,{memberName:c,enumName:e}),n.add(c);let l={enumName:e,explicitType:t,memberName:c};switch(a.id=o,s.type){case`boolean`:this.flowEnumCheckExplicitTypeMismatch(s.loc,l,`boolean`),a.init=s.value,r.booleanMembers.push(this.finishNode(a,`EnumBooleanMember`));break;case`number`:this.flowEnumCheckExplicitTypeMismatch(s.loc,l,`number`),a.init=s.value,r.numberMembers.push(this.finishNode(a,`EnumNumberMember`));break;case`string`:this.flowEnumCheckExplicitTypeMismatch(s.loc,l,`string`),a.init=s.value,r.stringMembers.push(this.finishNode(a,`EnumStringMember`));break;case`invalid`:throw this.flowEnumErrorInvalidMemberInitializer(s.loc,l);case`none`:switch(t){case`boolean`:this.flowEnumErrorBooleanMemberNotInitialized(s.loc,l);break;case`number`:this.flowEnumErrorNumberMemberNotInitialized(s.loc,l);break;default:r.defaultedMembers.push(this.finishNode(a,`EnumDefaultedMember`))}}this.match(8)||this.expect(12)}return{members:r,hasUnknownMembers:i}}flowEnumStringMembers(e,t,{enumName:n}){if(e.length===0)return t;if(t.length===0)return e;if(t.length>e.length){for(let t of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(t,{enumName:n});return t}else{for(let e of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(e,{enumName:n});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!L(this.state.type))throw this.raise(H.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:t}=this.state;return this.next(),t!==`boolean`&&t!==`number`&&t!==`string`&&t!==`symbol`&&this.raise(H.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){let n=t.name,r=t.loc.start,i=this.flowEnumParseExplicitType({enumName:n});this.expect(5);let{members:a,hasUnknownMembers:o}=this.flowEnumMembers({enumName:n,explicitType:i});switch(e.hasUnknownMembers=o,i){case`boolean`:return e.explicitType=!0,e.members=a.booleanMembers,this.expect(8),this.finishNode(e,`EnumBooleanBody`);case`number`:return e.explicitType=!0,e.members=a.numberMembers,this.expect(8),this.finishNode(e,`EnumNumberBody`);case`string`:return e.explicitType=!0,e.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(e,`EnumStringBody`);case`symbol`:return e.members=a.defaultedMembers,this.expect(8),this.finishNode(e,`EnumSymbolBody`);default:{let t=()=>(e.members=[],this.expect(8),this.finishNode(e,`EnumStringBody`));e.explicitType=!1;let i=a.booleanMembers.length,o=a.numberMembers.length,s=a.stringMembers.length,c=a.defaultedMembers.length;if(!i&&!o&&!s&&!c)return t();if(!i&&!o)return e.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(e,`EnumStringBody`);if(!o&&!s&&i>=c){for(let e of a.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.loc.start,{enumName:n,memberName:e.id.name});return e.members=a.booleanMembers,this.expect(8),this.finishNode(e,`EnumBooleanBody`)}else if(!i&&!s&&o>=c){for(let e of a.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.loc.start,{enumName:n,memberName:e.id.name});return e.members=a.numberMembers,this.expect(8),this.finishNode(e,`EnumNumberBody`)}else return this.raise(H.EnumInconsistentMemberValues,r,{enumName:n}),t()}}}flowParseEnumDeclaration(e){let t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,`EnumDeclaration`)}jsxParseOpeningElementAfterName(e){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(e.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(e)}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let t=this.input.charCodeAt(e+1);return t!==60&&t!==61}return!1}reScan_lt_gt(){let{type:e}=this.state;e===47?(--this.state.pos,this.readToken_lt()):e===48&&(--this.state.pos,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return e===51?(this.state.pos-=2,this.finishOp(47,1),47):e}maybeUnwrapTypeCastExpression(e){return e.type===`TypeCastExpression`?e.expression:e}};let Ze={__proto__:null,quot:`"`,amp:`&`,apos:`'`,lt:`<`,gt:`>`,nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,fnof:`ƒ`,circ:`ˆ`,tilde:`˜`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,bull:`•`,hellip:`…`,permil:`‰`,prime:`′`,Prime:`″`,lsaquo:`‹`,rsaquo:`›`,oline:`‾`,frasl:`⁄`,euro:`€`,image:`ℑ`,weierp:`℘`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`},Qe=RegExp(`\\r\\n|[\\r\\n\\u2028\\u2029]`,`g`);function $e(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function et(e,t,n){for(let r=t;r<n;r++)if($e(e.charCodeAt(r)))return!0;return!1}let tt=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,nt=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function rt(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}let it=_`jsx`({AttributeIsEmpty:`JSX attributes must only be assigned a non-empty expression.`,MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,MissingClosingTagFragment:`Expected corresponding JSX closing tag for <>.`,UnexpectedSequenceExpression:`Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?`,UnexpectedToken:({unexpected:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,UnsupportedJsxValue:`JSX value should be either an expression or a quoted JSX text.`,UnterminatedJsxContent:`Unterminated JSX contents.`,UnwrappedAdjacentJSXElements:`Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?`});function at(e){return e?e.type===`JSXOpeningFragment`||e.type===`JSXClosingFragment`:!1}function ot(e){if(e.type===`JSXIdentifier`)return e.name;if(e.type===`JSXNamespacedName`)return e.namespace.name+`:`+e.name.name;if(e.type===`JSXMemberExpression`)return ot(e.object)+`.`+ot(e.property);throw Error(`Node had unexpected type: `+e.type)}var st=e=>class extends e{jsxReadToken(){let e=``,t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(it.UnterminatedJsxContent,this.state.startLoc);let n=this.input.charCodeAt(this.state.pos);switch(n){case 60:case 123:if(this.state.pos===this.state.start){n===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(n);return}e+=this.input.slice(t,this.state.pos),this.finishToken(142,e);return;case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:$e(n)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let t=this.input.charCodeAt(this.state.pos),n;return++this.state.pos,t===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,n=e?`
|
|
98
|
-
|
|
99
|
-
`):n=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,n}jsxReadString(e){let t=``,n=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(v.UnterminatedString,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);if(r===e)break;r===38?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadEntity(),n=this.state.pos):$e(r)?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadNewLine(!1),n=this.state.pos):++this.state.pos}t+=this.input.slice(n,this.state.pos++),this.finishToken(134,t)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let e=10;this.codePointAtPos(this.state.pos)===120&&(e=16,++this.state.pos);let t=this.readInt(e,void 0,!1,`bail`);if(t!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(t)}else{let t=0,n=!1;for(;t++<10&&this.state.pos<this.length&&!(n=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(n){let t=Ze[this.input.slice(e,this.state.pos)];if(++this.state.pos,t)return t}}return this.state.pos=e,`&`}jsxReadWord(){let e,t=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(Oe(e)||e===45);this.finishToken(141,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(141)?e.name=this.state.value:ue(this.state.type)?e.name=he(this.state.type):this.unexpected(),this.next(),this.finishNode(e,`JSXIdentifier`)}jsxParseNamespacedName(){let e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(14))return t;let n=this.startNodeAt(e);return n.namespace=t,n.name=this.jsxParseIdentifier(),this.finishNode(n,`JSXNamespacedName`)}jsxParseElementName(){let e=this.state.startLoc,t=this.jsxParseNamespacedName();if(t.type===`JSXNamespacedName`)return t;for(;this.eat(16);){let n=this.startNodeAt(e);n.object=t,n.property=this.jsxParseIdentifier(),t=this.finishNode(n,`JSXMemberExpression`)}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(E.brace),this.next(),e=this.jsxParseExpressionContainer(e,E.j_oTag),e.expression.type===`JSXEmptyExpression`&&this.raise(it.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(it.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,`JSXEmptyExpression`,this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(E.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,`JSXSpreadChild`)}jsxParseExpressionContainer(e,t){return this.match(8)?e.expression=this.jsxParseEmptyExpression():e.expression=this.parseExpression(),this.setContext(t),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,`JSXExpressionContainer`)}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(E.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(E.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,`JSXSpreadAttribute`)):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,`JSXAttribute`))}jsxParseOpeningElementAt(e){let t=this.startNodeAt(e);return this.eat(144)?this.finishNode(t,`JSXOpeningFragment`):(t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t))}jsxParseOpeningElementAfterName(e){let t=[];for(;!this.match(56)&&!this.match(144);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(56),this.expect(144),this.finishNode(e,`JSXOpeningElement`)}jsxParseClosingElementAt(e){let t=this.startNodeAt(e);return this.eat(144)?this.finishNode(t,`JSXClosingFragment`):(t.name=this.jsxParseElementName(),this.expect(144),this.finishNode(t,`JSXClosingElement`))}jsxParseElementAt(e){let t=this.startNodeAt(e),n=[],r=this.jsxParseOpeningElementAt(e),i=null;if(!r.selfClosing){contents:for(;;)switch(this.state.type){case 143:if(e=this.state.startLoc,this.next(),this.eat(56)){i=this.jsxParseClosingElementAt(e);break contents}n.push(this.jsxParseElementAt(e));break;case 142:n.push(this.parseLiteral(this.state.value,`JSXText`));break;case 5:{let e=this.startNode();this.setContext(E.brace),this.next(),this.match(21)?n.push(this.jsxParseSpreadChild(e)):n.push(this.jsxParseExpressionContainer(e,E.j_expr));break}default:this.unexpected()}at(r)&&!at(i)&&i!==null?this.raise(it.MissingClosingTagFragment,i):(!at(r)&&at(i)||!at(r)&&!at(i)&&ot(i.name)!==ot(r.name))&&this.raise(it.MissingClosingTagElement,i,{openingTagName:ot(r.name)})}if(at(r)?(t.openingFragment=r,t.closingFragment=i):(t.openingElement=r,t.closingElement=i),t.children=n,this.match(47))throw this.raise(it.UnwrappedAdjacentJSXElements,this.state.startLoc);return at(r)?this.finishNode(t,`JSXFragment`):this.finishNode(t,`JSXElement`)}jsxParseElement(){let e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){let{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){let t=this.curContext();if(t===E.j_expr){this.jsxReadToken();return}if(t===E.j_oTag||t===E.j_cTag){if(De(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(144);return}if((e===34||e===39)&&t===E.j_oTag){this.jsxReadString(e);return}}if(e===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(e)}updateContext(e){let{context:t,type:n}=this.state;if(n===56&&e===143)t.splice(-2,2,E.j_cTag),this.state.canStartJSXElement=!1;else if(n===143)t.push(E.j_oTag);else if(n===144){let n=t[t.length-1];n===E.j_oTag&&e===56||n===E.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===E.j_expr):(this.setContext(E.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=ae(n)}},ct=class extends Be{constructor(...e){super(...e),this.tsNames=new Map}},lt=class extends Ve{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new ct(e)}enter(e){e===1024&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return e===1024&&this.importsStack.pop(),e}hasImport(e,t){let n=this.importsStack.length;if(this.importsStack[n-1].has(e))return!0;if(!t&&n>1){for(let t=0;t<n-1;t++)if(this.importsStack[t].has(e))return!0}return!1}declareName(e,t,n){if(t&4096){this.hasImport(e,!0)&&this.parser.raise(v.VarRedeclaration,n,{identifierName:e}),this.importsStack[this.importsStack.length-1].add(e);return}let r=this.currentScope(),i=r.tsNames.get(e)||0;if(t&1024){this.maybeExportDefined(r,e),r.tsNames.set(e,i|16);return}super.declareName(e,t,n),t&2&&(t&1||(this.checkRedeclarationInScope(r,e,t,n),this.maybeExportDefined(r,e)),i|=1),t&256&&(i|=2),t&512&&(i|=4),t&128&&(i|=8),i&&r.tsNames.set(e,i)}isRedeclaredInScope(e,t,n){let r=e.tsNames.get(t);return(r&2)>0?n&256?!!(n&512)!=(r&4)>0:!0:n&128&&(r&8)>0?e.names.get(t)&2?!!(n&1):!1:n&2&&(r&1)>0?!0:super.isRedeclaredInScope(e,t,n)}checkLocalExport(e){let{name:t}=e;if(this.hasImport(t))return;let n=this.scopeStack.length;for(let e=n-1;e>=0;e--){let n=this.scopeStack[e].tsNames.get(t);if((n&1)>0||(n&16)>0)return}super.checkLocalExport(e)}},ut=class{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function dt(e,t){return(e?2:0)|(t?1:0)}var ft=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if(typeof e==`string`)return this.plugins.has(e);{let[t,n]=e;if(!this.hasPlugin(t))return!1;let r=this.plugins.get(t);for(let e of Object.keys(n))if(r?.[e]!==n[e])return!1;return!0}}getPluginOption(e,t){return this.plugins.get(e)?.[t]}};function pt(e,t){e.trailingComments===void 0?e.trailingComments=t:e.trailingComments.unshift(...t)}function mt(e,t){e.leadingComments===void 0?e.leadingComments=t:e.leadingComments.unshift(...t)}function ht(e,t){e.innerComments===void 0?e.innerComments=t:e.innerComments.unshift(...t)}function gt(e,t,n){let r=null,i=t.length;for(;r===null&&i>0;)r=t[--i];r===null||r.start>n.start?ht(e,n.comments):pt(r,n.comments)}var _t=class extends ft{addComment(e){this.filename&&(e.loc.filename=this.filename);let{commentsLen:t}=this.state;this.comments.length!==t&&(this.comments.length=t),this.comments.push(e),this.state.commentsLen++}processComment(e){let{commentStack:t}=this.state,n=t.length;if(n===0)return;let r=n-1,i=t[r];i.start===e.end&&(i.leadingNode=e,r--);let{start:a}=e;for(;r>=0;r--){let n=t[r],i=n.end;if(i>a)n.containingNode=e,this.finalizeComment(n),t.splice(r,1);else{i===a&&(n.trailingNode=e);break}}}finalizeComment(e){let{comments:t}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&pt(e.leadingNode,t),e.trailingNode!==null&&mt(e.trailingNode,t);else{let n=e.containingNode,r=e.start;if(this.input.charCodeAt(this.offsetToSourcePos(r)-1)===44)switch(n.type){case`ObjectExpression`:case`ObjectPattern`:gt(n,n.properties,e);break;case`CallExpression`:case`OptionalCallExpression`:gt(n,n.arguments,e);break;case`ImportExpression`:gt(n,[n.source,n.options??null],e);break;case`FunctionDeclaration`:case`FunctionExpression`:case`ArrowFunctionExpression`:case`ObjectMethod`:case`ClassMethod`:case`ClassPrivateMethod`:gt(n,n.params,e);break;case`ArrayExpression`:case`ArrayPattern`:gt(n,n.elements,e);break;case`ExportNamedDeclaration`:case`ImportDeclaration`:gt(n,n.specifiers,e);break;case`TSEnumDeclaration`:gt(n,n.members,e);break;case`TSEnumBody`:gt(n,n.members,e);break;default:if(n.type===`RecordExpression`){gt(n,n.properties,e);break}if(n.type===`TupleExpression`){gt(n,n.elements,e);break}ht(n,t)}else ht(n,t)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:t}=this.state,{length:n}=t;if(n===0)return;let r=t[n-1];r.leadingNode===e&&(r.leadingNode=null)}takeSurroundingComments(e,t,n){let{commentStack:r}=this.state,i=r.length;if(i===0)return;let a=i-1;for(;a>=0;a--){let i=r[a],o=i.end;if(i.start===n)i.leadingNode=e;else if(o===t)i.trailingNode=e;else if(o<t)break}}},vt=class e{constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[E.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}init({strictMode:e,sourceType:t,startIndex:r,startLine:i,startColumn:a}){this.strict=e===!1?!1:e===!0?!0:t===`module`,this.startIndex=r,this.curLine=i,this.lineStart=-a,this.startLoc=this.endLoc=new n(i,a,r)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}curPosition(){return new n(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let t=new e;return t.flags=this.flags,t.startIndex=this.startIndex,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}},yt=function(e){return e>=48&&e<=57};let bt={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},xt={bin:e=>e===48||e===49,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function St(e,t,n,r,i,a){let o=n,s=r,c=i,l=``,u=null,d=n,{length:f}=t;for(;;){if(n>=f){a.unterminated(o,s,c),l+=t.slice(d,n);break}let p=t.charCodeAt(n);if(Ct(e,p,t,n)){l+=t.slice(d,n);break}if(p===92){l+=t.slice(d,n);let o=wt(t,n,r,i,e===`template`,a);o.ch===null&&!u?u={pos:n,lineStart:r,curLine:i}:l+=o.ch,{pos:n,lineStart:r,curLine:i}=o,d=n}else p===8232||p===8233?(++n,++i,r=n):p===10||p===13?e===`template`?(l+=t.slice(d,n)+`
|
|
100
|
-
|
|
101
|
-
`);case 114:return s(`\r`);case 120:{let i;return{code:i,pos:t}=Tt(e,t,n,r,2,!1,o,a),s(i===null?null:String.fromCharCode(i))}case 117:{let i;return{code:i,pos:t}=Dt(e,t,n,r,o,a),s(i===null?null:String.fromCodePoint(i))}case 116:return s(` `);case 98:return s(`\b`);case 118:return s(`\v`);case 102:return s(`\f`);case 13:e.charCodeAt(t)===10&&++t;case 10:n=t,++r;case 8232:case 8233:return s(``);case 56:case 57:if(i)return s(null);a.strictNumericEscape(t-1,n,r);default:if(c>=48&&c<=55){let o=t-1,c=/^[0-7]+/.exec(e.slice(o,t+2))[0],l=parseInt(c,8);l>255&&(c=c.slice(0,-1),l=parseInt(c,8)),t+=c.length-1;let u=e.charCodeAt(t);if(c!==`0`||u===56||u===57){if(i)return s(null);a.strictNumericEscape(o,n,r)}return s(String.fromCharCode(l))}return s(String.fromCharCode(c))}}function Tt(e,t,n,r,i,a,o,s){let c=t,l;return{n:l,pos:t}=Et(e,t,n,r,16,i,a,!1,s,!o),l===null&&(o?s.invalidEscapeSequence(c,n,r):t=c-1),{code:l,pos:t}}function Et(e,t,n,r,i,a,o,s,c,l){let u=t,d=i===16?bt.hex:bt.decBinOct,f=i===16?xt.hex:i===10?xt.dec:i===8?xt.oct:xt.bin,p=!1,m=0;for(let u=0,h=a??1/0;u<h;++u){let a=e.charCodeAt(t),u;if(a===95&&s!==`bail`){let i=e.charCodeAt(t-1),a=e.charCodeAt(t+1);if(!s){if(l)return{n:null,pos:t};c.numericSeparatorInEscapeSequence(t,n,r)}else if(Number.isNaN(a)||!f(a)||d.has(i)||d.has(a)){if(l)return{n:null,pos:t};c.unexpectedNumericSeparator(t,n,r)}++t;continue}if(u=a>=97?a-97+10:a>=65?a-65+10:yt(a)?a-48:1/0,u>=i){if(u<=9&&l)return{n:null,pos:t};if(u<=9&&c.invalidDigit(t,n,r,i))u=0;else if(o)u=0,p=!0;else break}++t,m=m*i+u}return t===u||a!=null&&t-u!==a||p?{n:null,pos:t}:{n:m,pos:t}}function Dt(e,t,n,r,i,a){let o=e.charCodeAt(t),s;if(o===123){if(++t,{code:s,pos:t}=Tt(e,t,n,r,e.indexOf(`}`,t)-t,!0,i,a),++t,s!==null&&s>1114111)if(i)a.invalidCodePoint(t,n,r);else return{code:null,pos:t}}else ({code:s,pos:t}=Tt(e,t,n,r,4,!1,i,a));return{code:s,pos:t}}function Ot(e,t,r){return new n(r,e-t,e)}let kt=new Set([103,109,115,105,121,117,100,118]);var At=class{constructor(e){let t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new r(e.startLoc,e.endLoc)}},jt=class extends _t{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(e,t,n,r)=>this.optionFlags&2048?(this.raise(v.InvalidDigit,Ot(e,t,n),{radix:r}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(v.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(v.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(v.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(v.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(e,t,n)=>{this.recordStrictModeErrors(v.StrictNumericEscape,Ot(e,t,n))},unterminated:(e,t,n)=>{throw this.raise(v.UnterminatedString,Ot(e-1,t,n))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(v.StrictNumericEscape),unterminated:(e,t,n)=>{throw this.raise(v.UnterminatedTemplate,Ot(e,t,n))}}),this.state=new vt,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new At(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return tt.lastIndex=e,tt.test(this.input)?tt.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return nt.lastIndex=e,nt.test(this.input)?nt.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if((t&64512)==55296&&++e<this.input.length){let n=this.input.charCodeAt(e);(n&64512)==56320&&(t=65536+((t&1023)<<10)+(n&1023))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([e,t])=>this.raise(e,t)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let n=this.state.pos,i=this.input.indexOf(e,n+2);if(i===-1)throw this.raise(v.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+e.length,Qe.lastIndex=n+2;Qe.test(this.input)&&Qe.lastIndex<=i;)++this.state.curLine,this.state.lineStart=Qe.lastIndex;if(this.isLookahead)return;let a={type:`CommentBlock`,value:this.input.slice(n+2,i),start:this.sourceToOffsetPos(n),end:this.sourceToOffsetPos(i+e.length),loc:new r(t,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(a),a}skipLineComment(e){let t=this.state.pos,n;this.isLookahead||(n=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!$e(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let a=this.state.pos,o={type:`CommentLine`,value:this.input.slice(t+e,a),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(a),loc:new r(n,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(o),o}skipSpace(){let e=this.state.pos,t=this.optionFlags&4096?[]:null;loop:for(;this.state.pos<this.length;){let n=this.input.charCodeAt(this.state.pos);switch(n){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let e=this.skipBlockComment(`*/`);e!==void 0&&(this.addComment(e),t?.push(e));break}case 47:{let e=this.skipLineComment(2);e!==void 0&&(this.addComment(e),t?.push(e));break}default:break loop}break;default:if(rt(n))++this.state.pos;else if(n===45&&!this.inModule&&this.optionFlags&8192){let n=this.state.pos;if(this.input.charCodeAt(n+1)===45&&this.input.charCodeAt(n+2)===62&&(e===0||this.state.lineStart>e)){let e=this.skipLineComment(3);e!==void 0&&(this.addComment(e),t?.push(e))}else break loop}else if(n===60&&!this.inModule&&this.optionFlags&8192){let e=this.state.pos;if(this.input.charCodeAt(e+1)===33&&this.input.charCodeAt(e+2)===45&&this.input.charCodeAt(e+3)===45){let e=this.skipLineComment(4);e!==void 0&&(this.addComment(e),t?.push(e))}else break loop}else break loop}}if(t?.length>0){let n=this.state.pos,r={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(n),comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let n=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(n)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(v.UnexpectedDigitAfterHash,this.state.curPosition());if(t===123||t===91&&this.hasPlugin(`recordAndTuple`)){if(this.expectPlugin(`recordAndTuple`),this.getPluginOption(`recordAndTuple`,`syntaxType`)===`bar`)throw this.raise(t===123?v.RecordExpressionHashIncorrectStartSyntaxType:v.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,t===123?this.finishToken(7):this.finishToken(1)}else De(t)?(++this.state.pos,this.finishToken(139,this.readWord1(t))):t===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57){this.readNumber(!0);return}e===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(e!==33)return!1;let t=this.state.pos;for(this.state.pos+=1;!$e(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);let n=this.input.slice(t+2,this.state.pos);return this.finishToken(28,n),!0}readToken_mult_modulo(e){let t=e===42?55:54,n=1,r=this.input.charCodeAt(this.state.pos+1);e===42&&r===42&&(n++,r=this.input.charCodeAt(this.state.pos+2),t=57),r===61&&!this.state.inType&&(n++,t=e===37?33:30),this.finishOp(t,n)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===e){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(e===124?41:42,2);return}if(e===124){if(t===62){this.finishOp(39,2);return}if(this.hasPlugin(`recordAndTuple`)&&t===125){if(this.getPluginOption(`recordAndTuple`,`syntaxType`)!==`bar`)throw this.raise(v.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin(`recordAndTuple`)&&t===93){if(this.getPluginOption(`recordAndTuple`,`syntaxType`)!==`bar`)throw this.raise(v.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(t===61){this.finishOp(30,2);return}this.finishOp(e===124?43:45,1)}readToken_caret(){let e=this.input.charCodeAt(this.state.pos+1);e===61&&!this.state.inType?this.finishOp(32,2):e===94&&this.hasPlugin([`pipelineOperator`,{proposal:`hack`,topicToken:`^^`}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin([`pipelineOperator`,{proposal:`hack`,topicToken:`@@`}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===e){this.finishOp(34,2);return}t===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(t===60){if(this.input.charCodeAt(e+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(t===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(t===62){let t=this.input.charCodeAt(e+2)===62?3:2;if(this.input.charCodeAt(e+t)===61){this.finishOp(30,t+1);return}this.finishOp(52,t);return}if(t===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(e===61&&t===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(e===61?29:35,1)}readToken_question(){let e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);e===63?t===61?this.finishOp(30,3):this.finishOp(40,2):e===46&&!(t>=48&&t<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(e){switch(e){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin(`recordAndTuple`)&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption(`recordAndTuple`,`syntaxType`)!==`bar`)throw this.raise(v.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else ++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin(`recordAndTuple`)&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption(`recordAndTuple`,`syntaxType`)!==`bar`)throw this.raise(v.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else ++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin(`functionBind`)&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(e);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(e);return;case 124:case 38:this.readToken_pipe_amp(e);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(e);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(e);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(De(e)){this.readWord(e);return}}throw this.raise(v.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,t){let n=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,n)}readRegexp(){let e=this.state.startLoc,t=this.state.start+1,n,r,{pos:a}=this.state;for(;;++a){if(a>=this.length)throw this.raise(v.UnterminatedRegExp,i(e,1));let t=this.input.charCodeAt(a);if($e(t))throw this.raise(v.UnterminatedRegExp,i(e,1));if(n)n=!1;else{if(t===91)r=!0;else if(t===93&&r)r=!1;else if(t===47&&!r)break;n=t===92}}let o=this.input.slice(t,a);++a;let s=``,c=()=>i(e,a+2-t);for(;a<this.length;){let e=this.codePointAtPos(a),t=String.fromCharCode(e);if(kt.has(e))e===118?s.includes(`u`)&&this.raise(v.IncompatibleRegExpUVFlags,c()):e===117&&s.includes(`v`)&&this.raise(v.IncompatibleRegExpUVFlags,c()),s.includes(t)&&this.raise(v.DuplicateRegExpFlags,c());else if(Oe(e)||e===92)this.raise(v.MalformedRegExpFlags,c());else break;++a,s+=t}this.state.pos=a,this.finishToken(138,{pattern:o,flags:s})}readInt(e,t,n=!1,r=!0){let{n:i,pos:a}=Et(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,n,r,this.errorHandlers_readInt,!1);return this.state.pos=a,i}readRadixNumber(e){let t=this.state.pos,n=this.state.curPosition(),r=!1;this.state.pos+=2;let a=this.readInt(e);a??this.raise(v.InvalidDigit,i(n,2),{radix:e});let o=this.input.charCodeAt(this.state.pos);if(o===110)++this.state.pos,r=!0;else if(o===109)throw this.raise(v.InvalidDecimal,n);if(De(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,this.state.curPosition());if(r){let e=this.input.slice(t,this.state.pos).replace(/[_n]/g,``);this.finishToken(136,e);return}this.finishToken(135,a)}readNumber(e){let t=this.state.pos,n=this.state.curPosition(),r=!1,a=!1,o=!1,s=!1;!e&&this.readInt(10)===null&&this.raise(v.InvalidNumber,this.state.curPosition());let c=this.state.pos-t>=2&&this.input.charCodeAt(t)===48;if(c){let e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(v.StrictOctalLiteral,n),!this.state.strict){let t=e.indexOf(`_`);t>0&&this.raise(v.ZeroDigitNumericSeparator,i(n,t))}s=c&&!/[89]/.test(e)}let l=this.input.charCodeAt(this.state.pos);if(l===46&&!s&&(++this.state.pos,this.readInt(10),r=!0,l=this.input.charCodeAt(this.state.pos)),(l===69||l===101)&&!s&&(l=this.input.charCodeAt(++this.state.pos),(l===43||l===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(v.InvalidOrMissingExponent,n),r=!0,o=!0,l=this.input.charCodeAt(this.state.pos)),l===110&&((r||c)&&this.raise(v.InvalidBigIntLiteral,n),++this.state.pos,a=!0),l===109){this.expectPlugin(`decimal`,this.state.curPosition()),(o||c)&&this.raise(v.InvalidDecimal,n),++this.state.pos;var u=!0}if(De(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,this.state.curPosition());let d=this.input.slice(t,this.state.pos).replace(/[_mn]/g,``);if(a){this.finishToken(136,d);return}if(u){this.finishToken(137,d);return}let f=s?parseInt(d,8):parseFloat(d);this.finishToken(135,f)}readCodePoint(e){let{code:t,pos:n}=Dt(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=n,t}readString(e){let{str:t,pos:n,curLine:r,lineStart:i}=St(e===34?`double`:`single`,this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=n+1,this.state.lineStart=i,this.state.curLine=r,this.finishToken(134,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:t,firstInvalidLoc:r,pos:i,curLine:a,lineStart:o}=St(`template`,this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=o,this.state.curLine=a,r&&(this.state.firstInvalidTemplateEscapePos=new n(r.curLine,r.pos-r.lineStart,this.sourceToOffsetPos(r.pos))),this.input.codePointAt(i)===96?this.finishToken(24,r?null:e+t+"`"):(this.state.pos++,this.finishToken(25,r?null:e+t+"${"))}recordStrictModeErrors(e,t){let n=t.index;this.state.strict&&!this.state.strictErrors.has(n)?this.raise(e,t):this.state.strictErrors.set(n,[e,t])}readWord1(e){this.state.containsEsc=!1;let t=``,n=this.state.pos,r=this.state.pos;for(e!==void 0&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){let e=this.codePointAtPos(this.state.pos);if(Oe(e))this.state.pos+=e<=65535?1:2;else if(e===92){this.state.containsEsc=!0,t+=this.input.slice(r,this.state.pos);let e=this.state.curPosition(),i=this.state.pos===n?De:Oe;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(v.MissingUnicodeEscape,this.state.curPosition()),r=this.state.pos-1;continue}++this.state.pos;let a=this.readCodePoint(!0);a!==null&&(i(a)||this.raise(v.EscapedCharNotAnIdentifier,e),t+=String.fromCodePoint(a)),r=this.state.pos}else break}return t+this.input.slice(r,this.state.pos)}readWord(e){let t=this.readWord1(e),n=O.get(t);n===void 0?this.finishToken(132,t):this.finishToken(n,he(n))}checkKeywordEscapes(){let{type:e}=this.state;ue(e)&&this.state.containsEsc&&this.raise(v.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:he(e)})}raise(e,t,r={}){let i=e(t instanceof n?t:t.loc.start,r);if(!(this.optionFlags&2048))throw i;return this.isLookahead||this.state.errors.push(i),i}raiseOverwrite(e,t,r={}){let i=t instanceof n?t:t.loc.start,a=i.index,o=this.state.errors;for(let t=o.length-1;t>=0;t--){let n=o[t];if(n.loc.index===a)return o[t]=e(i,r);if(n.loc.index<a)break}return this.raise(e,t,r)}updateContext(e){}unexpected(e,t){throw this.raise(v.UnexpectedToken,e??this.state.startLoc,{expected:t?he(t):null})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(v.MissingPlugin,t??this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(e=>this.hasPlugin(e)))throw this.raise(v.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(t,n,r)=>{this.raise(e,Ot(t,n,r))}}},Mt=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},Nt=class{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Mt)}exit(){let e=this.stack.pop(),t=this.current();for(let[n,r]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(n)||t.undefinedPrivateNames.set(n,r):this.parser.raise(v.InvalidPrivateFieldResolution,r,{identifierName:n})}declarePrivateName(e,t,n){let{privateNames:r,loneAccessors:i,undefinedPrivateNames:a}=this.current(),o=r.has(e);if(t&3){let n=o&&i.get(e);if(n){let r=n&4,a=t&4;o=(n&3)==(t&3)||r!==a,o||i.delete(e)}else o||i.set(e,t)}o&&this.parser.raise(v.PrivateNameRedeclaration,n,{identifierName:e}),r.add(e),a.delete(e)}usePrivateName(e,t){let n;for(n of this.stack)if(n.privateNames.has(e))return;n?n.undefinedPrivateNames.set(e,t):this.parser.raise(v.InvalidPrivateFieldResolution,t,{identifierName:e})}},Pt=class{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},Ft=class extends Pt{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,t){let n=t.index;this.declarationErrors.set(n,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}},It=class{constructor(e){this.parser=void 0,this.stack=[new Pt],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){let n=t.loc.start,{stack:r}=this,i=r.length-1,a=r[i];for(;!a.isCertainlyParameterDeclaration();){if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(e,n);else return;a=r[--i]}this.parser.raise(e,n)}recordArrowParameterBindingError(e,t){let{stack:n}=this,r=n[n.length-1],i=t.loc.start;if(r.isCertainlyParameterDeclaration())this.parser.raise(e,i);else if(r.canBeArrowParameterDeclaration())r.recordDeclarationError(e,i);else return}recordAsyncArrowParametersError(e){let{stack:t}=this,n=t.length-1,r=t[n];for(;r.canBeArrowParameterDeclaration();)r.type===2&&r.recordDeclarationError(v.AwaitBindingIdentifier,e),r=t[--n]}validateAsPattern(){let{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors(([t,n])=>{this.parser.raise(t,n);let r=e.length-2,i=e[r];for(;i.canBeArrowParameterDeclaration();)i.clearDeclarationError(n.index),i=e[--r]})}};function Lt(){return new Pt(3)}function Rt(){return new Ft(1)}function zt(){return new Ft(2)}function Bt(){return new Pt}var Vt=class extends jt{addExtra(e,t,n,r=!0){if(!e)return;let{extra:i}=e;i??(i={},e.extra=i),r?i[t]=n:Object.defineProperty(i,t,{enumerable:r,value:n})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){if(this.input.startsWith(t,e)){let n=this.input.charCodeAt(e+t.length);return!(Oe(n)||(n&64512)==55296)}return!1}isLookaheadContextual(e){let t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return this.isContextual(e)?(this.next(),!0):!1}expectContextual(e,t){if(!this.eatContextual(e)){if(t!=null)throw this.raise(t,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return et(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return et(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(v.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){let n={node:null};try{let r=e((e=null)=>{throw n.node=e,n});if(this.state.errors.length>t.errors.length){let e=this.state;return this.state=t,this.state.tokensLength=e.tokensLength,{node:r,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){let r=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:r};if(e===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:r};throw e}}checkExpressionErrors(e,t){if(!e)return!1;let{shorthandAssignLoc:n,doubleProtoLoc:r,privateKeyLoc:i,optionalParametersLoc:a,voidPatternLoc:o}=e,s=!!n||!!r||!!a||!!i||!!o;if(!t)return s;n!=null&&this.raise(v.InvalidCoverInitializedName,n),r!=null&&this.raise(v.DuplicateProto,r),i!=null&&this.raise(v.UnexpectedPrivateField,i),a!=null&&this.unexpected(a),o!=null&&this.raise(v.InvalidCoverDiscardElement,o)}isLiteralPropertyName(){return ie(this.state.type)}isPrivateName(e){return e.type===`PrivateName`}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return(e.type===`MemberExpression`||e.type===`OptionalMemberExpression`)&&this.isPrivateName(e.property)}isObjectProperty(e){return e.type===`ObjectProperty`}isObjectMethod(e){return e.type===`ObjectMethod`}initializeScopes(e=this.options.sourceType===`module`){let t=this.state.labels;this.state.labels=[];let n=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let r=this.inModule;this.inModule=e;let i=this.scope;this.scope=new(this.getScopeHandler())(this,e);let a=this.prodParam;this.prodParam=new ut;let o=this.classScope;this.classScope=new Nt(this);let s=this.expressionScope;return this.expressionScope=new It(this),()=>{this.state.labels=t,this.exportedIdentifiers=n,this.inModule=r,this.scope=i,this.prodParam=a,this.classScope=o,this.expressionScope=s}}enterInitialScopes(){let e=0;(this.inModule||this.optionFlags&1)&&(e|=2),this.optionFlags&32&&(e|=1);let t=!this.inModule&&this.options.sourceType===`commonjs`;(t||this.optionFlags&2)&&(e|=4),this.prodParam.enter(e);let n=t?514:1;this.optionFlags&4&&(n|=512),this.scope.enter(n)}checkDestructuringPrivate(e){let{privateKeyLoc:t}=e;t!==null&&this.expectPlugin(`destructuringPrivate`,t)}},Ht=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null,this.voidPatternLoc=null}},Ut=class{constructor(e,t,n){this.type=``,this.start=t,this.end=0,this.loc=new r(n),e?.optionFlags&128&&(this.range=[t,0]),e!=null&&e.filename&&(this.loc.filename=e.filename)}};let Wt=Ut.prototype;Wt.__clone=function(){let e=new Ut(void 0,this.start,this.loc.start),t=Object.keys(this);for(let n=0,r=t.length;n<r;n++){let r=t[n];r!==`leadingComments`&&r!==`trailingComments`&&r!==`innerComments`&&(e[r]=this[r])}return e};var Gt=class extends Vt{startNode(){let e=this.state.startLoc;return new Ut(this,e.index,e)}startNodeAt(e){return new Ut(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,n){return e.type=t,e.end=n.index,e.loc.end=n,this.optionFlags&128&&(e.range[1]=n.index),this.optionFlags&4096&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,this.optionFlags&128&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,this.optionFlags&128&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}castNodeTo(e,t){return e.type=t,e}cloneIdentifier(e){let{type:t,start:n,end:r,loc:i,range:a,name:o}=e,s=Object.create(Wt);return s.type=t,s.start=n,s.end=r,s.loc=i,s.range=a,s.name=o,e.extra&&(s.extra=e.extra),s}cloneStringLiteral(e){let{type:t,start:n,end:r,loc:i,range:a,extra:o}=e,s=Object.create(Wt);return s.type=t,s.start=n,s.end=r,s.loc=i,s.range=a,s.extra=o,s.value=e.value,s}};let Kt=e=>e.type===`ParenthesizedExpression`?Kt(e.expression):e;var qt=class extends Gt{toAssignable(e,t=!1){var n;let r;switch((e.type===`ParenthesizedExpression`||(n=e.extra)!=null&&n.parenthesized)&&(r=Kt(e),t?r.type===`Identifier`?this.expressionScope.recordArrowParameterBindingError(v.InvalidParenthesizedAssignment,e):r.type!==`CallExpression`&&r.type!==`MemberExpression`&&!this.isOptionalMemberExpression(r)&&this.raise(v.InvalidParenthesizedAssignment,e):this.raise(v.InvalidParenthesizedAssignment,e)),e.type){case`Identifier`:case`ObjectPattern`:case`ArrayPattern`:case`AssignmentPattern`:case`RestElement`:case`VoidPattern`:break;case`ObjectExpression`:this.castNodeTo(e,`ObjectPattern`);for(let n=0,r=e.properties.length,a=r-1;n<r;n++){var i;let r=e.properties[n],o=n===a;this.toAssignableObjectExpressionProp(r,o,t),o&&r.type===`RestElement`&&(i=e.extra)!=null&&i.trailingCommaLoc&&this.raise(v.RestTrailingComma,e.extra.trailingCommaLoc)}break;case`ObjectProperty`:{let{key:n,value:r}=e;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.loc.start),this.toAssignable(r,t);break}case`SpreadElement`:throw Error(`Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.`);case`ArrayExpression`:this.castNodeTo(e,`ArrayPattern`),this.toAssignableList(e.elements,e.extra?.trailingCommaLoc,t);break;case`AssignmentExpression`:e.operator!==`=`&&this.raise(v.MissingEqInAssignment,e.left.loc.end),this.castNodeTo(e,`AssignmentPattern`),delete e.operator,e.left.type===`VoidPattern`&&this.raise(v.VoidPatternInitializer,e.left),this.toAssignable(e.left,t);break;case`ParenthesizedExpression`:this.toAssignable(r,t);break}}toAssignableObjectExpressionProp(e,t,n){if(e.type===`ObjectMethod`)this.raise(e.kind===`get`||e.kind===`set`?v.PatternHasAccessor:v.PatternHasMethod,e.key);else if(e.type===`SpreadElement`){this.castNodeTo(e,`RestElement`);let r=e.argument;this.checkToRestConversion(r,!1),this.toAssignable(r,n),t||this.raise(v.RestTrailingComma,e)}else this.toAssignable(e,n)}toAssignableList(e,t,n){let r=e.length-1;for(let i=0;i<=r;i++){let a=e[i];a&&(this.toAssignableListItem(e,i,n),a.type===`RestElement`&&(i<r?this.raise(v.RestTrailingComma,a):t&&this.raise(v.RestTrailingComma,t)))}}toAssignableListItem(e,t,n){let r=e[t];if(r.type===`SpreadElement`){this.castNodeTo(r,`RestElement`);let e=r.argument;this.checkToRestConversion(e,!0),this.toAssignable(e,n)}else this.toAssignable(r,n)}isAssignable(e,t){switch(e.type){case`Identifier`:case`ObjectPattern`:case`ArrayPattern`:case`AssignmentPattern`:case`RestElement`:case`VoidPattern`:return!0;case`ObjectExpression`:{let t=e.properties.length-1;return e.properties.every((e,n)=>e.type!==`ObjectMethod`&&(n===t||e.type!==`SpreadElement`)&&this.isAssignable(e))}case`ObjectProperty`:return this.isAssignable(e.value);case`SpreadElement`:return this.isAssignable(e.argument);case`ArrayExpression`:return e.elements.every(e=>e===null||this.isAssignable(e));case`AssignmentExpression`:return e.operator===`=`;case`ParenthesizedExpression`:return this.isAssignable(e.expression);case`MemberExpression`:case`OptionalMemberExpression`:return!t;default:return!1}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(let t of e)t?.type===`ArrayExpression`&&this.toReferencedListDeep(t.elements)}parseSpread(e){let t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(t,`SpreadElement`)}parseRestBinding(){let e=this.startNode();this.next();let t=this.parseBindingAtom();return t.type===`VoidPattern`&&this.raise(v.UnexpectedVoidPattern,t),e.argument=t,this.finishNode(e,`RestElement`)}parseBindingAtom(){switch(this.state.type){case 0:{let e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,`ArrayPattern`)}case 5:return this.parseObjectLike(8,!0);case 88:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(e,t,n){let r=n&1,i=[],a=!0;for(;!this.eat(e);)if(a?a=!1:this.expect(12),r&&this.match(12))i.push(null);else if(this.eat(e))break;else if(this.match(21)){let r=this.parseRestBinding();if((this.hasPlugin(`flow`)||n&2)&&(r=this.parseFunctionParamType(r)),i.push(r),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{let e=[];if(n&2)for(this.match(26)&&this.hasPlugin(`decorators`)&&this.raise(v.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());i.push(this.parseBindingElement(n,e))}return i}parseBindingRestProperty(e){return this.next(),this.hasPlugin(`discardBinding`)&&this.match(88)?(e.argument=this.parseVoidPattern(null),this.raise(v.UnexpectedVoidPattern,e.argument)):e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,`RestElement`)}parseBindingProperty(){let{type:e,startLoc:t}=this.state;if(e===21)return this.parseBindingRestProperty(this.startNode());let n=this.startNode();return e===139?(this.expectPlugin(`destructuringPrivate`,t),this.classScope.usePrivateName(this.state.value,t),n.key=this.parsePrivateName()):this.parsePropertyName(n),n.method=!1,this.parseObjPropValue(n,t,!1,!1,!0,!1)}parseBindingElement(e,t){let n=this.parseMaybeDefault();return(this.hasPlugin(`flow`)||e&2)&&this.parseFunctionParamType(n),t.length&&(n.decorators=t,this.resetStartLocationFromNode(n,t[0])),this.parseMaybeDefault(n.loc.start,n)}parseFunctionParamType(e){return e}parseMaybeDefault(e,t){if(e??=this.state.startLoc,t??=this.parseBindingAtom(),!this.eat(29))return t;let n=this.startNodeAt(e);return t.type===`VoidPattern`&&this.raise(v.VoidPatternInitializer,t),n.left=t,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,`AssignmentPattern`)}isValidLVal(e,t,n,r){switch(e){case`AssignmentPattern`:return`left`;case`RestElement`:return`argument`;case`ObjectProperty`:return`value`;case`ParenthesizedExpression`:return`expression`;case`ArrayPattern`:return`elements`;case`ObjectPattern`:return`properties`;case`VoidPattern`:return!0;case`CallExpression`:if(!t&&!this.state.strict&&this.optionFlags&8192)return!0}return!1}isOptionalMemberExpression(e){return e.type===`OptionalMemberExpression`}checkLVal(e,t,n=64,r=!1,i=!1,a=!1,o=!1){var s;let c=e.type;if(this.isObjectMethod(e))return;let l=this.isOptionalMemberExpression(e);if(l||c===`MemberExpression`){l&&(this.expectPlugin(`optionalChainingAssign`,e.loc.start),t.type!==`AssignmentExpression`&&this.raise(v.InvalidLhsOptionalChaining,e,{ancestor:t})),n!==64&&this.raise(v.InvalidPropertyBindingPattern,e);return}if(c===`Identifier`){this.checkIdentifier(e,n,i);let{name:t}=e;r&&(r.has(t)?this.raise(v.ParamDupe,e):r.add(t));return}else c===`VoidPattern`&&t.type===`CatchClause`&&this.raise(v.VoidPatternCatchClauseParam,e);let u=Kt(e);o||=u.type===`CallExpression`&&(u.callee.type===`Import`||u.callee.type===`Super`);let d=this.isValidLVal(c,o,!(a||(s=e.extra)!=null&&s.parenthesized)&&t.type===`AssignmentExpression`,n);if(d===!0)return;if(d===!1){let r=n===64?v.InvalidLhs:v.InvalidLhsBinding;this.raise(r,e,{ancestor:t});return}let f,p;typeof d==`string`?(f=d,p=c===`ParenthesizedExpression`):[f,p]=d;let m=c===`ArrayPattern`||c===`ObjectPattern`?{type:c}:t,h=e[f];if(Array.isArray(h))for(let e of h)e&&this.checkLVal(e,m,n,r,i,p,!0);else h&&this.checkLVal(h,m,n,r,i,p,o)}checkIdentifier(e,t,n=!1){this.state.strict&&(n?Fe(e.name,this.inModule):Pe(e.name))&&(t===64?this.raise(v.StrictEvalArguments,e,{referenceName:e.name}):this.raise(v.StrictEvalArgumentsBinding,e,{bindingName:e.name})),t&8192&&e.name===`let`&&this.raise(v.LetInLexicalBinding,e),t&64||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.loc.start)}checkToRestConversion(e,t){switch(e.type){case`ParenthesizedExpression`:this.checkToRestConversion(e.expression,t);break;case`Identifier`:case`MemberExpression`:break;case`ArrayExpression`:case`ObjectExpression`:if(t)break;default:this.raise(v.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return this.match(12)?(this.raise(this.lookaheadCharCode()===e?v.RestTrailingComma:v.ElementAfterRest,this.state.startLoc),!0):!1}};let Jt=/in(?:stanceof)?|as|satisfies/y;function Yt(e){if(e==null)throw Error(`Unexpected ${e} value.`);return e}function Xt(e){if(!e)throw Error(`Assert fail`)}let U=_`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:`An 'accessor' property cannot be declared optional.`,AccessorCannotDeclareThisParameter:`'get' and 'set' accessors cannot declare 'this' parameters.`,AccessorCannotHaveTypeParameters:`An accessor cannot have type parameters.`,ClassMethodHasDeclare:`Class methods cannot have the 'declare' modifier.`,ClassMethodHasReadonly:`Class methods cannot have the 'readonly' modifier.`,ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:`A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.`,ConstructorHasTypeParameters:`Type parameters cannot appear on a constructor declaration.`,DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:`Initializers are not allowed in ambient contexts.`,DeclareFunctionHasImplementation:`An implementation cannot be declared in ambient contexts.`,DuplicateAccessibilityModifier:({modifier:e})=>`Accessibility modifier already seen: '${e}'.`,DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:`Type argument list cannot be empty.`,EmptyTypeParameters:`Type parameter list cannot be empty.`,ExpectedAmbientAfterExportDeclare:`'export declare' must be followed by an ambient declaration.`,ImportAliasHasImportType:`An import alias can not use 'import type'.`,ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:`Index signatures cannot have the 'abstract' modifier.`,IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:`Index signatures cannot have the 'declare' modifier.`,IndexSignatureHasOverride:`'override' modifier cannot appear on an index signature.`,IndexSignatureHasStatic:`Index signatures cannot have the 'static' modifier.`,InitializerNotAllowedInAmbientContext:`Initializers are not allowed in ambient contexts.`,InvalidHeritageClauseType:({token:e})=>`'${e}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:e=>`'${e}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:e=>`'${e}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:`Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.`,InvalidTupleMemberLabel:`Tuple members must be labeled with a simple identifier.`,MissingInterfaceName:`'interface' declarations must be followed by an identifier.`,NonAbstractClassHasAbstractMethod:`Abstract methods can only appear within an abstract class.`,NonClassMethodPropertyHasAbstractModifier:`'abstract' modifier can only appear on a class, method, or property declaration.`,OptionalTypeBeforeRequired:`A required element cannot follow an optional element.`,OverrideNotInSubClass:`This member cannot have an 'override' modifier because its containing class does not extend another class.`,PatternIsOptional:`A binding pattern parameter cannot be optional in an implementation signature.`,PrivateElementHasAbstract:`Private elements cannot have the 'abstract' modifier.`,PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:`'readonly' modifier can only appear on a property declaration or index signature.`,ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:`A 'set' accessor cannot have an optional parameter.`,SetAccessorCannotHaveRestParameter:`A 'set' accessor cannot have rest parameter.`,SetAccessorCannotHaveReturnType:`A 'set' accessor cannot have a return type annotation.`,SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:`Static class blocks cannot have any modifier.`,TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:`A type-only import can specify a default import or named bindings, but not both.`,TypeModifierIsUsedInTypeExports:`The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.`,TypeModifierIsUsedInTypeImports:`The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.`,UnexpectedParameterModifier:`A parameter property is only allowed in a constructor implementation.`,UnexpectedReadonly:`'readonly' type modifier is only permitted on array and tuple literal types.`,UnexpectedTypeAnnotation:`Did not expect a type annotation here.`,UnexpectedTypeCastInParameter:`Unexpected type cast in parameter position.`,UnsupportedImportTypeArgument:`Argument in a type import must be a string literal.`,UnsupportedParameterPropertyKind:`A parameter property may not be declared using a binding pattern.`,UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`,UsingDeclarationInAmbientContext:e=>`'${e}' declarations are not allowed in ambient contexts.`});function Zt(e){switch(e){case`any`:return`TSAnyKeyword`;case`boolean`:return`TSBooleanKeyword`;case`bigint`:return`TSBigIntKeyword`;case`never`:return`TSNeverKeyword`;case`number`:return`TSNumberKeyword`;case`object`:return`TSObjectKeyword`;case`string`:return`TSStringKeyword`;case`symbol`:return`TSSymbolKeyword`;case`undefined`:return`TSUndefinedKeyword`;case`unknown`:return`TSUnknownKeyword`;default:return}}function Qt(e){return e===`private`||e===`public`||e===`protected`}function $t(e){return e===`in`||e===`out`}var en=e=>class extends e{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:[`in`,`out`],disallowedModifiers:[`const`,`public`,`private`,`protected`,`readonly`,`declare`,`abstract`,`override`],errorTemplate:U.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:[`const`],disallowedModifiers:[`in`,`out`],errorTemplate:U.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:[`in`,`out`,`const`],disallowedModifiers:[`public`,`private`,`protected`,`readonly`,`declare`,`abstract`,`override`],errorTemplate:U.InvalidModifierOnTypeParameter})}getScopeHandler(){return lt}tsIsIdentifier(){return L(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(e,t,n){if(!L(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let r=this.state.value;if(e.includes(r)){if(n&&this.match(106)||t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:n,errorTemplate:r=U.InvalidModifierOnTypeMember},i){let a=(e,t,n,r)=>{t===n&&i[r]&&this.raise(U.InvalidModifiersOrder,e,{orderedModifiers:[n,r]})},o=(e,t,n,r)=>{(i[n]&&t===r||i[r]&&t===n)&&this.raise(U.IncompatibleModifiers,e,{modifiers:[n,r]})};for(;;){let{startLoc:s}=this.state,c=this.tsParseModifier(e.concat(t??[]),n,i.static);if(!c)break;Qt(c)?i.accessibility?this.raise(U.DuplicateAccessibilityModifier,s,{modifier:c}):(a(s,c,c,`override`),a(s,c,c,`static`),a(s,c,c,`readonly`),i.accessibility=c):$t(c)?(i[c]&&this.raise(U.DuplicateModifier,s,{modifier:c}),i[c]=!0,a(s,c,`in`,`out`)):(hasOwnProperty.call(i,c)?this.raise(U.DuplicateModifier,s,{modifier:c}):(a(s,c,`static`,`readonly`),a(s,c,`static`,`override`),a(s,c,`override`,`readonly`),a(s,c,`abstract`,`override`),o(s,c,`declare`,`override`),o(s,c,`static`,`abstract`)),i[c]=!0),t!=null&&t.includes(c)&&this.raise(r,s,{modifier:c})}}tsIsListTerminator(e){switch(e){case`EnumMembers`:case`TypeMembers`:return this.match(8);case`HeritageClauseElement`:return this.match(5);case`TupleElementTypes`:return this.match(3);case`TypeParametersOrArguments`:return this.match(48)}}tsParseList(e,t){let n=[];for(;!this.tsIsListTerminator(e);)n.push(t());return n}tsParseDelimitedList(e,t,n){return Yt(this.tsParseDelimitedListWorker(e,t,!0,n))}tsParseDelimitedListWorker(e,t,n,r){let i=[],a=-1;for(;!this.tsIsListTerminator(e);){a=-1;let r=t();if(r==null)return;if(i.push(r),this.eat(12)){a=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;n&&this.expect(12);return}return r&&(r.value=a),i}tsParseBracketedList(e,t,n,r,i){r||(n?this.expect(0):this.expect(47));let a=this.tsParseDelimitedList(e,t,i);return n?this.expect(3):this.expect(48),a}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(134)?e.argument=this.parseStringLiteral(this.state.value):(this.raise(U.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom()),this.eat(12)?e.options=this.tsParseImportTypeOptions():e.options=null,this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName(3)),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,`TSImportType`)}tsParseImportTypeOptions(){let e=this.startNode();this.expect(5);let t=this.startNode();return this.isContextual(76)?(t.method=!1,t.key=this.parseIdentifier(!0),t.computed=!1,t.shorthand=!1):this.unexpected(null,76),this.expect(14),t.value=this.tsParseImportTypeWithPropertyValue(),e.properties=[this.finishObjectProperty(t)],this.eat(12),this.expect(8),this.finishNode(e,`ObjectExpression`)}tsParseImportTypeWithPropertyValue(){let e=this.startNode(),t=[];for(this.expect(5);!this.match(8);){let e=this.state.type;L(e)||e===134?t.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return e.properties=t,this.next(),this.finishNode(e,`ObjectExpression`)}tsParseEntityName(e){let t;if(e&1&&this.match(78))if(e&2)t=this.parseIdentifier(!0);else{let e=this.startNode();this.next(),t=this.finishNode(e,`ThisExpression`)}else t=this.parseIdentifier(!!(e&1));for(;this.eat(16);){let n=this.startNodeAtNode(t);n.left=t,n.right=this.parseIdentifier(!!(e&1)),t=this.finishNode(n,`TSQualifiedName`)}return t}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,`TSTypeReference`)}tsParseThisTypePredicate(e){this.next();let t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,`TSTypePredicate`)}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,`TSThisType`)}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,`TSTypeQuery`)}tsParseTypeParameter(e){let t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,`TSTypeParameter`)}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let t=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let n={value:-1};return t.params=this.tsParseBracketedList(`TypeParametersOrArguments`,this.tsParseTypeParameter.bind(this,e),!1,!0,n),t.params.length===0&&this.raise(U.EmptyTypeParameters,t),n.value!==-1&&this.addExtra(t,`trailingComma`,n.value),this.finishNode(t,`TSTypeParameterDeclaration`)}tsFillSignature(e,t){let n=e===19;t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t.parameters=this.tsParseBindingListForSignature(),(n||this.match(e))&&(t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let t of e){let{type:e}=t;(e===`AssignmentPattern`||e===`TSParameterProperty`)&&this.raise(U.UnsupportedSignatureParameterKind,t,{type:e})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),L(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];let n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(e,`TSIndexSignature`)}tsParsePropertyOrMethodSignature(e,t){if(this.eat(17)&&(e.optional=!0),this.match(10)||this.match(47)){t&&this.raise(U.ReadonlyForMethodSignature,e);let n=e;n.kind&&this.match(47)&&this.raise(U.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon();let r=`parameters`,i=`typeAnnotation`;if(n.kind===`get`)n[r].length>0&&(this.raise(v.BadGetterArity,this.state.curPosition()),this.isThisParam(n[r][0])&&this.raise(U.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(n.kind===`set`){if(n[r].length!==1)this.raise(v.BadSetterArity,this.state.curPosition());else{let e=n[r][0];this.isThisParam(e)&&this.raise(U.AccessorCannotDeclareThisParameter,this.state.curPosition()),e.type===`Identifier`&&e.optional&&this.raise(U.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),e.type===`RestElement`&&this.raise(U.SetAccessorCannotHaveRestParameter,this.state.curPosition())}n[i]&&this.raise(U.SetAccessorCannotHaveReturnType,n[i])}else n.kind=`method`;return this.finishNode(n,`TSMethodSignature`)}else{let n=e;t&&(n.readonly=!0);let r=this.tsTryParseTypeAnnotation();return r&&(n.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(n,`TSPropertySignature`)}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember(`TSCallSignatureDeclaration`,e);if(this.match(77)){let t=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember(`TSConstructSignatureDeclaration`,e):(e.key=this.createIdentifier(t,`new`),this.tsParsePropertyOrMethodSignature(e,!1))}return this.tsParseModifiers({allowedModifiers:[`readonly`],disallowedModifiers:[`declare`,`abstract`,`private`,`protected`,`public`,`static`,`override`]},e),this.tsTryParseIndexSignature(e)||(super.parsePropertyName(e),!e.computed&&e.key.type===`Identifier`&&(e.key.name===`get`||e.key.name===`set`)&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e),!this.match(10)&&!this.match(47)&&this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,`TSTypeLiteral`)}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList(`TypeMembers`,this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let e=this.startNode();this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0);let t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsExpectThenParseType(58),e.typeParameter=this.finishNode(t,`TSTypeParameter`),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,`TSMappedType`)}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList(`TupleElementTypes`,this.tsParseTupleElementType.bind(this),!0,!1);let t=!1;return e.elementTypes.forEach(e=>{let{type:n}=e;t&&n!==`TSRestType`&&n!==`TSOptionalType`&&!(n===`TSNamedTupleMember`&&e.optional)&&this.raise(U.OptionalTypeBeforeRequired,e),t||=n===`TSNamedTupleMember`&&e.optional||n===`TSOptionalType`}),this.finishNode(e,`TSTupleType`)}tsParseTupleElementType(){let e=this.state.startLoc,t=this.eat(21),{startLoc:n}=this.state,r,i,a,o,s=z(this.state.type)?this.lookaheadCharCode():null;if(s===58)r=!0,a=!1,i=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(s===63){a=!0;let e=this.state.value,t=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(r=!0,i=this.createIdentifier(this.startNodeAt(n),e),this.expect(17),this.expect(14),o=this.tsParseType()):(r=!1,o=t,this.expect(17))}else o=this.tsParseType(),a=this.eat(17),r=this.eat(14);if(r){let e;i?(e=this.startNodeAt(n),e.optional=a,e.label=i,e.elementType=o,this.eat(17)&&(e.optional=!0,this.raise(U.TupleOptionalAfterType,this.state.lastTokStartLoc))):(e=this.startNodeAt(n),e.optional=a,this.raise(U.InvalidTupleMemberLabel,o),e.label=o,e.elementType=this.tsParseType()),o=this.finishNode(e,`TSNamedTupleMember`)}else if(a){let e=this.startNodeAt(n);e.typeAnnotation=o,o=this.finishNode(e,`TSOptionalType`)}if(t){let t=this.startNodeAt(e);t.typeAnnotation=o,o=this.finishNode(t,`TSRestType`)}return o}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,`TSParenthesizedType`)}tsParseFunctionOrConstructorType(e,t){let n=this.startNode();return e===`TSConstructorType`&&(n.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,n)),this.finishNode(n,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,`TSLiteralType`)}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,`TSLiteralType`)}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value===`-`){let e=this.startNode(),t=this.lookahead();return t.type!==135&&t.type!==136&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,`TSLiteralType`)}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(L(e)||e===88||e===84){let t=e===88?`TSVoidKeyword`:e===84?`TSNullKeyword`:Zt(this.state.value);if(t!==void 0&&this.lookaheadCharCode()!==46){let e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:e}=this.state,t=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let n=this.startNodeAt(e);n.elementType=t,this.expect(3),t=this.finishNode(n,`TSArrayType`)}else{let n=this.startNodeAt(e);n.objectType=t,n.indexType=this.tsParseType(),this.expect(3),t=this.finishNode(n,`TSIndexedAccessType`)}return t}tsParseTypeOperator(){let e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),t===`readonly`&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,`TSTypeOperator`)}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case`TSTupleType`:case`TSArrayType`:return;default:this.raise(U.UnexpectedReadonly,e)}}tsParseInferType(){let e=this.startNode();this.expectContextual(115);let t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(t,`TSTypeParameter`),this.finishNode(e,`TSInferType`)}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return pe(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,t,n){let r=this.startNode(),i=this.eat(n),a=[];do a.push(t());while(this.eat(n));return a.length===1&&!i?a[0]:(r.types=a,this.finishNode(r,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType(`TSIntersectionType`,this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType(`TSUnionType`,this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(L(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,t=e.length;try{return super.parseBindingList(3,93,1),e.length===t}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let t=this.startNode();this.expect(e);let n=this.startNode(),r=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(r&&this.match(78)){let e=this.tsParseThisTypeOrThisTypePredicate();return e.type===`TSThisType`?(n.parameterName=e,n.asserts=!0,n.typeAnnotation=null,e=this.finishNode(n,`TSTypePredicate`)):(this.resetStartLocationFromNode(e,n),e.asserts=!0),t.typeAnnotation=e,this.finishNode(t,`TSTypeAnnotation`)}let i=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!i)return r?(n.parameterName=this.parseIdentifier(),n.asserts=r,n.typeAnnotation=null,t.typeAnnotation=this.finishNode(n,`TSTypePredicate`),this.finishNode(t,`TSTypeAnnotation`)):this.tsParseTypeAnnotation(!1,t);let a=this.tsParseTypeAnnotation(!1);return n.parameterName=i,n.typeAnnotation=a,n.asserts=r,t.typeAnnotation=this.finishNode(n,`TSTypePredicate`),this.finishNode(t,`TSTypeAnnotation`)})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let e=this.state.containsEsc;return this.next(),!L(this.state.type)&&!this.match(78)?!1:(e&&this.raise(v.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:`asserts`}),!0)}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),t.typeAnnotation=this.tsParseType()}),this.finishNode(t,`TSTypeAnnotation`)}tsParseType(){Xt(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),t.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),t.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(t,`TSConditionalType`)}isAbstractConstructorSignature(){return this.isContextual(124)&&this.isLookaheadContextual(`new`)}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType(`TSFunctionType`):this.match(77)?this.tsParseFunctionOrConstructorType(`TSConstructorType`):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType(`TSConstructorType`,!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption(`typescript`,`disallowAmbiguousJSXLike`)&&this.raise(U.ReservedTypeAssertion,this.state.startLoc);let e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,`TSTypeAssertion`)}tsParseHeritageClause(e){let t=this.state.startLoc,n=this.tsParseDelimitedList(`HeritageClauseElement`,()=>{let e=this.startNode();return e.expression=this.tsParseEntityName(3),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,`TSExpressionWithTypeArguments`)});return n.length||this.raise(U.EmptyHeritageClauseType,t,{token:e}),n}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),t.declare&&(e.declare=!0),L(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(U.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause(`extends`));let n=this.startNode();return n.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(n,`TSInterfaceBody`),this.finishNode(e,`TSInterfaceDeclaration`)}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookaheadCharCode()!==46){let e=this.startNode();return this.next(),this.finishNode(e,`TSIntrinsicKeyword`)}return this.tsParseType()}),this.semicolon(),this.finishNode(e,`TSTypeAliasDeclaration`)}tsInTopLevelContext(e){if(this.curContext()!==E.brace){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}else return e()}tsInType(e){let t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,`TSEnumMember`)}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList(`EnumMembers`,this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,`TSEnumDeclaration`)}tsParseEnumBody(){let e=this.startNode();return this.expect(5),e.members=this.tsParseDelimitedList(`EnumMembers`,this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,`TSEnumBody`)}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,`TSModuleBlock`)}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){let t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,!0),e.body=t}else this.scope.enter(1024),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,`TSModuleDeclaration`)}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.kind=`global`,e.global=!0,e.id=this.parseIdentifier()):this.match(134)?(e.kind=`module`,e.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(1024),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,`TSModuleDeclaration`)}tsParseImportEqualsDeclaration(e,t,n){e.isExport=n||!1,e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let r=this.tsParseModuleReference();return e.importKind===`type`&&r.type!==`TSExternalModuleReference`&&this.raise(U.ImportAliasHasImportType,r),e.moduleReference=r,this.semicolon(),this.finishNode(e,`TSImportEqualsDeclaration`)}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,`TSExternalModuleReference`)}tsLookAhead(e){let t=this.state.clone(),n=e();return this.state=t,n}tsTryParseAndCatch(e){let t=this.tryParse(t=>e()||t());if(!(t.aborted||!t.node))return t.error&&(this.state=t.failState),t.node}tsTryParse(e){let t=this.state.clone(),n=e();if(n!==void 0&&n!==!1)return n;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t=this.state.type;return this.tsInAmbientContext(()=>{switch(t){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 100:if(this.state.containsEsc)return;case 75:case 74:return!this.match(75)||!this.isLookaheadContextual(`enum`)?(e.declare=!0,this.parseVarStatement(e,this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 107:if(this.isUsing())return this.raise(U.InvalidModifierOnUsingDeclaration,this.state.startLoc,`declare`),e.declare=!0,this.parseVarStatement(e,`using`,!0);break;case 96:if(this.isAwaitUsing())return this.raise(U.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,`declare`),e.declare=!0,this.next(),this.parseVarStatement(e,`await using`,!0);break;case 129:{let t=this.tsParseInterfaceDeclaration(e,{declare:!0});if(t)return t}default:if(L(t))return this.tsParseDeclaration(e,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(e,t,n,r){switch(t){case 124:if(this.tsCheckLineTerminator(n)&&(this.match(80)||L(this.state.type)))return this.tsParseAbstractDeclaration(e,r);break;case 127:if(this.tsCheckLineTerminator(n)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(e);if(L(this.state.type))return e.kind=`module`,this.tsParseModuleOrNamespaceDeclaration(e)}break;case 128:if(this.tsCheckLineTerminator(n)&&L(this.state.type))return e.kind=`namespace`,this.tsParseModuleOrNamespaceDeclaration(e);break;case 130:if(this.tsCheckLineTerminator(n)&&L(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let t=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let n=this.tsTryParseAndCatch(()=>{let t=this.startNodeAt(e);return t.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(t),t.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),t});if(this.state.maybeInArrowParameters=t,n)return super.parseArrowExpression(n,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList(`TypeParametersOrArguments`,this.tsParseType.bind(this))))),e.params.length===0?this.raise(U.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===E.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,`TSTypeParameterInstantiation`)}tsIsDeclarationStart(){return me(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(e,t){let n=t.length?t[0].loc.start:this.state.startLoc,r={};this.tsParseModifiers({allowedModifiers:[`public`,`private`,`protected`,`override`,`readonly`]},r);let i=r.accessibility,a=r.override,o=r.readonly;!(e&4)&&(i||o||a)&&this.raise(U.UnexpectedParameterModifier,n);let s=this.parseMaybeDefault();e&2&&this.parseFunctionParamType(s);let c=this.parseMaybeDefault(s.loc.start,s);if(i||o||a){let e=this.startNodeAt(n);return t.length&&(e.decorators=t),i&&(e.accessibility=i),o&&(e.readonly=o),a&&(e.override=a),c.type!==`Identifier`&&c.type!==`AssignmentPattern`&&this.raise(U.UnsupportedParameterPropertyKind,e),e.parameter=c,this.finishNode(e,`TSParameterProperty`)}return t.length&&(s.decorators=t),c}isSimpleParameter(e){return e.type===`TSParameterProperty`&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let t of e.params)t.type!==`Identifier`&&t.optional&&!this.state.isAmbientContext&&this.raise(U.PatternIsOptional,t)}setArrowFunctionParameters(e,t,n){super.setArrowFunctionParameters(e,t,n),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,n=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let r=t===`FunctionDeclaration`?`TSDeclareFunction`:t===`ClassMethod`||t===`ClassPrivateMethod`?`TSDeclareMethod`:void 0;return r&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,r):r===`TSDeclareFunction`&&this.state.isAmbientContext&&(this.raise(U.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,r,n):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,n))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(e=>{e?.type===`TSTypeCastExpression`&&this.raise(U.UnexpectedTypeAnnotation,e.typeAnnotation)})}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,n){let r=super.parseArrayLike(e,t,n);return r.type===`ArrayExpression`&&this.tsCheckForInvalidTypeCasts(r.elements),r}parseSubscript(e,t,n,r){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let n=this.startNodeAt(t);return n.expression=e,this.finishNode(n,`TSNonNullExpression`)}let i=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(n)return r.stop=!0,e;r.optionalChainMember=i=!0,this.next()}if(this.match(47)||this.match(51)){let a,o=this.tsTryParseAndCatch(()=>{if(!n&&this.atPossibleAsyncArrow(e)){let e=this.tsTryParseGenericAsyncArrowFunction(t);if(e)return r.stop=!0,e}let o=this.tsParseTypeArgumentsInExpression();if(!o)return;if(i&&!this.match(10)){a=this.state.curPosition();return}if(ve(this.state.type)){let n=super.parseTaggedTemplateExpression(e,t,r);return n.typeParameters=o,n}if(!n&&this.eat(10)){let n=this.startNodeAt(t);return n.callee=e,n.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(n.arguments),n.typeParameters=o,r.optionalChainMember&&(n.optional=i),this.finishCallExpression(n,r.optionalChainMember)}let s=this.state.type;if(s===48||s===52||s!==10&&s!==93&&s!==120&&oe(s)&&!this.hasPrecedingLineBreak())return;let c=this.startNodeAt(t);return c.expression=e,c.typeParameters=o,this.finishNode(c,`TSInstantiationExpression`)});if(a&&this.unexpected(a,10),o)return o.type===`TSInstantiationExpression`&&((this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(U.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(16)&&!this.match(18)&&(o.expression=super.stopParseSubscript(e,r))),o}return super.parseSubscript(e,t,n,r)}parseNewCallee(e){var t;super.parseNewCallee(e);let{callee:n}=e;n.type===`TSInstantiationExpression`&&!((t=n.extra)!=null&&t.parenthesized)&&(e.typeParameters=n.typeParameters,e.callee=n.expression)}parseExprOp(e,t,n){let r;if(ge(58)>n&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(r=this.isContextual(120)))){let i=this.startNodeAt(t);return i.expression=e,i.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(r&&this.raise(v.UnexpectedKeyword,this.state.startLoc,{keyword:`const`}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(i,r?`TSSatisfiesExpression`:`TSAsExpression`),this.reScan_lt_gt(),this.parseExprOp(i,t,n)}return super.parseExprOp(e,t,n)}checkReservedWord(e,t,n,r){this.state.isAmbientContext||super.checkReservedWord(e,t,n,r)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!==`value`&&this.raise(U.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){let t=this.lookaheadCharCode();return e?t===123||t===42:t!==61}return!e&&this.isContextual(87)}applyImportPhase(e,t,n,r){super.applyImportPhase(e,t,n,r),t?e.exportKind=n===`type`?`type`:`value`:e.importKind=n===`type`||n===`typeof`?n:`value`}parseImport(e){if(this.match(134))return e.importKind=`value`,super.parseImport(e);let t;if(L(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind=`value`,this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let n=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,n);t=super.parseImportSpecifiersAndAfter(e,n)}else t=super.parseImport(e);return t.importKind===`type`&&t.specifiers.length>1&&t.specifiers[0].type===`ImportDefaultSpecifier`&&this.raise(U.TypeImportCannotSpecifyDefaultAndNamed,t),t}parseExport(e,t){if(this.match(83)){let t=e;this.next();let n=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?n=this.parseMaybeImportPhase(t,!1):t.importKind=`value`,this.tsParseImportEqualsDeclaration(t,n,!0)}else if(this.eat(29)){let t=e;return t.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(t,`TSExportAssignment`)}else if(this.eatContextual(93)){let t=e;return this.expectContextual(128),t.id=this.parseIdentifier(),this.semicolon(),this.finishNode(t,`TSNamespaceExportDeclaration`)}else return super.parseExport(e,t)}isAbstractClass(){return this.isContextual(124)&&this.isLookaheadContextual(`class`)}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,n=!1){let{isAmbientContext:r}=this.state,i=super.parseVarStatement(e,t,n||r);if(!r)return i;if(!e.declare&&(t===`using`||t===`await using`))return this.raiseOverwrite(U.UsingDeclarationInAmbientContext,e,t),i;for(let{id:e,init:n}of i.declarations)n&&(t===`var`||t===`let`||e.typeAnnotation?this.raise(U.InitializerNotAllowedInAmbientContext,n):nn(n,this.hasPlugin(`estree`))||this.raise(U.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,n));return i}parseStatementContent(e,t){if(!this.state.containsEsc)switch(this.state.type){case 75:if(this.isLookaheadContextual(`enum`)){let e=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(e,{const:!0})}break;case 124:case 125:if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let e=this.state.type,n=this.startNode();this.next();let r=e===125?this.tsTryParseDeclare(n):this.tsParseAbstractDeclaration(n,t);return r?(e===125&&(r.declare=!0),r):(n.expression=this.createIdentifier(this.startNodeAt(n.loc.start),e===125?`declare`:`abstract`),this.semicolon(!1),this.finishNode(n,`ExpressionStatement`))}break;case 126:return this.tsParseEnumDeclaration(this.startNode());case 112:if(this.lookaheadCharCode()===123){let e=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(e)}break;case 129:{let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e;break}case 127:if(this.nextTokenIsIdentifierOrStringLiteralOnSameLine()){let e=this.startNode();return this.next(),this.tsParseDeclaration(e,127,!1,t)}break;case 128:if(this.nextTokenIsIdentifierOnSameLine()){let e=this.startNode();return this.next(),this.tsParseDeclaration(e,128,!1,t)}break;case 130:if(this.nextTokenIsIdentifierOnSameLine()){let e=this.startNode();return this.next(),this.tsParseTypeAliasDeclaration(e)}break}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier([`public`,`protected`,`private`])}tsHasSomeModifiers(e,t){return t.some(t=>Qt(t)?e.accessibility===t:!!e[t])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,t,n){let r=[`declare`,`private`,`public`,`protected`,`override`,`abstract`,`readonly`,`static`];this.tsParseModifiers({allowedModifiers:r,disallowedModifiers:[`in`,`out`],stopOnStartOfClassStaticBlock:!0,errorTemplate:U.InvalidModifierOnTypeParameterPositions},t);let i=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,r)&&this.raise(U.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,n,!!t.static)};t.declare?this.tsInAmbientContext(i):i()}parseClassMemberWithIsStatic(e,t,n,r){let i=this.tsTryParseIndexSignature(t);if(i){e.body.push(i),t.abstract&&this.raise(U.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(U.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(U.IndexSignatureHasDeclare,t),t.override&&this.raise(U.IndexSignatureHasOverride,t);return}!this.state.inAbstractClass&&t.abstract&&this.raise(U.NonAbstractClassHasAbstractMethod,t),t.override&&(n.hadSuperClass||this.raise(U.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,n,r)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(U.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(U.ClassMethodHasDeclare,e)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,t,n){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let t=this.lookaheadCharCode();if(t===44||t===61||t===58||t===41)return this.setOptionalParametersError(n),e}return super.parseConditional(e,t,n)}parseParenItem(e,t){let n=super.parseParenItem(e,t);if(this.eat(17)&&(n.optional=!0,this.resetEndLocation(e)),this.match(14)){let n=this.startNodeAt(t);return n.expression=e,n.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(n,`TSTypeCastExpression`)}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let t=this.state.startLoc,n=this.eatContextual(125);if(n&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(U.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let r=L(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return r?((r.type===`TSInterfaceDeclaration`||r.type===`TSTypeAliasDeclaration`||n)&&(e.exportKind=`type`),n&&r.type!==`TSImportEqualsDeclaration`&&(this.resetStartLocation(r,t),r.declare=!0),r):null}parseClassId(e,t,n,r){if((!t||n)&&this.isContextual(113))return;super.parseClassId(e,t,n,e.declare?1024:8331);let i=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);i&&(e.typeParameters=i)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(U.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){let{key:t}=e;this.raise(U.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:t.type===`Identifier`&&!e.computed?t.name:`[${this.input.slice(this.offsetToSourcePos(t.start),this.offsetToSourcePos(t.end))}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(U.PrivateElementHasAbstract,e),e.accessibility&&this.raise(U.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(U.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,n,r,i,a){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&i&&this.raise(U.ConstructorHasTypeParameters,o);let{declare:s=!1,kind:c}=t;s&&(c===`get`||c===`set`)&&this.raise(U.DeclareAccessor,t,{kind:c}),o&&(t.typeParameters=o),super.pushClassMethod(e,t,n,r,i,a)}pushClassPrivateMethod(e,t,n,r){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(t.typeParameters=i),super.pushClassPrivateMethod(e,t,n,r)}declareClassPrivateMethodInScope(e,t){e.type!==`TSDeclareMethod`&&(e.type===`MethodDefinition`&&e.value.body==null||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass)if(e.superClass.type===`TSInstantiationExpression`){let t=e.superClass,n=t.expression;this.takeSurroundingComments(n,n.start,n.end);let r=t.typeParameters;this.takeSurroundingComments(r,r.start,r.end),e.superClass=n,e.superTypeParameters=r}else (this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression());this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause(`implements`))}parseObjPropValue(e,t,n,r,i,a,o){let s=this.tsTryParseTypeParameters(this.tsParseConstModifier);return s&&(e.typeParameters=s),super.parseObjPropValue(e,t,n,r,i,a,o)}parseFunctionParams(e,t){let n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(e.typeParameters=n),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),e.id.type===`Identifier`&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let n=this.tsTryParseTypeAnnotation();n&&(e.id.typeAnnotation=n,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var n,r,i;let a,o,s;if(this.hasPlugin(`jsx`)&&(this.match(143)||this.match(47))){if(a=this.state.clone(),o=this.tryParse(()=>super.parseMaybeAssign(e,t),a),!o.error)return o.node;let{context:n}=this.state,r=n[n.length-1];(r===E.j_oTag||r===E.j_expr)&&n.pop()}if(!((n=o)!=null&&n.error)&&!this.match(47))return super.parseMaybeAssign(e,t);(!a||a===this.state)&&(a=this.state.clone());let c,l=this.tryParse(n=>{var r;c=this.tsParseTypeParameters(this.tsParseConstModifier);let i=super.parseMaybeAssign(e,t);return(i.type!==`ArrowFunctionExpression`||(r=i.extra)!=null&&r.parenthesized)&&n(),c?.params.length!==0&&this.resetStartLocationFromNode(i,c),i.typeParameters=c,i},a);if(!l.error&&!l.aborted)return c&&this.reportReservedArrowTypeParam(c),l.node;if(!o&&(Xt(!this.hasPlugin(`jsx`)),s=this.tryParse(()=>super.parseMaybeAssign(e,t),a),!s.error))return s.node;if((r=o)!=null&&r.node)return this.state=o.failState,o.node;if(l.node)return this.state=l.failState,c&&this.reportReservedArrowTypeParam(c),l.node;if((i=s)!=null&&i.node)return this.state=s.failState,s.node;throw o?.error||l.error||s?.error}reportReservedArrowTypeParam(e){var t;e.params.length===1&&!e.params[0].constraint&&!((t=e.extra)!=null&&t.trailingComma)&&this.getPluginOption(`typescript`,`disallowAmbiguousJSXLike`)&&this.raise(U.ReservedArrowTypeParam,e)}parseMaybeUnary(e,t){return!this.hasPlugin(`jsx`)&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(e=>{let t=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&e(),t});if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseFunctionParamType(e){this.eat(17)&&(e.optional=!0);let t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case`TSTypeCastExpression`:return this.isAssignable(e.expression,t);case`TSParameterProperty`:return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case`ParenthesizedExpression`:this.toAssignableParenthesizedExpression(e,t);break;case`TSAsExpression`:case`TSSatisfiesExpression`:case`TSNonNullExpression`:case`TSTypeAssertion`:t?this.expressionScope.recordArrowParameterBindingError(U.UnexpectedTypeCastInParameter,e):this.raise(U.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,t);break;case`AssignmentExpression`:!t&&e.left.type===`TSTypeCastExpression`&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case`TSAsExpression`:case`TSSatisfiesExpression`:case`TSNonNullExpression`:case`TSTypeAssertion`:case`ParenthesizedExpression`:this.toAssignable(e.expression,t);break;default:super.toAssignable(e,t)}}checkToRestConversion(e,t){switch(e.type){case`TSAsExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:case`TSNonNullExpression`:this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,n,r){switch(e){case`TSTypeCastExpression`:return!0;case`TSParameterProperty`:return`parameter`;case`TSNonNullExpression`:return`expression`;case`TSAsExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:return(r!==64||!n)&&[`expression`,!0];default:return super.isValidLVal(e,t,n,r)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e,t){if(this.match(47)||this.match(51)){let n=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let r=super.parseMaybeDecoratorArguments(e,t);return r.typeParameters=n,r}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e,t)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){let n=super.parseMaybeDefault(e,t);return n.type===`AssignmentPattern`&&n.typeAnnotation&&n.right.start<n.typeAnnotation.start&&this.raise(U.TypeAnnotationAfterAssign,n.typeAnnotation),n}getTokenFromCode(e){if(this.state.inType){if(e===62){this.finishOp(48,1);return}if(e===60){this.finishOp(47,1);return}}super.getTokenFromCode(e)}reScan_lt_gt(){let{type:e}=this.state;e===47?(--this.state.pos,this.readToken_lt()):e===48&&(--this.state.pos,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return e===51?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableListItem(e,t,n){let r=e[t];r.type===`TSTypeCastExpression`&&(e[t]=this.typeCastToParameter(r)),super.toAssignableListItem(e,t,n)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every(e=>this.isAssignable(e,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let t=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let t=super.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e)[0];return n&&this.isThisParam(n)?t+1:t}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){let{isAmbientContext:t,strict:n}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return e()}finally{this.state.isAmbientContext=t,this.state.strict=n}}parseClass(e,t,n){let r=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,n)}finally{this.state.inAbstractClass=r}}tsParseAbstractDeclaration(e,t){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(129))return this.hasFollowingLineBreak()?null:(e.abstract=!0,this.raise(U.NonClassMethodPropertyHasAbstractModifier,e),this.tsParseInterfaceDeclaration(e));throw this.unexpected(null,80)}parseMethod(e,t,n,r,i,a,o){let s=super.parseMethod(e,t,n,r,i,a,o);if((s.abstract||s.type===`TSAbstractMethodDefinition`)&&(this.hasPlugin(`estree`)?s.value:s).body){let{key:e}=s;this.raise(U.AbstractMethodHasImplementation,s,{methodName:e.type===`Identifier`&&!s.computed?e.name:`[${this.input.slice(this.offsetToSourcePos(e.start),this.offsetToSourcePos(e.end))}]`})}return s}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption(`typescript`,`dts`)}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,t,n,r){return!t&&r?(this.parseTypeOnlyImportExportSpecifier(e,!1,n),this.finishNode(e,`ExportSpecifier`)):(e.exportKind=`value`,super.parseExportSpecifier(e,t,n,r))}parseImportSpecifier(e,t,n,r,i){return!t&&r?(this.parseTypeOnlyImportExportSpecifier(e,!0,n),this.finishNode(e,`ImportSpecifier`)):(e.importKind=`value`,super.parseImportSpecifier(e,t,n,r,n?4098:4096))}parseTypeOnlyImportExportSpecifier(e,t,n){let r=t?`imported`:`local`,i=t?`local`:`exported`,a=e[r],o,s=!1,c=!0,l=a.loc.start;if(this.isContextual(93)){let e=this.parseIdentifier();if(this.isContextual(93)){let n=this.parseIdentifier();z(this.state.type)?(s=!0,a=e,o=t?this.parseIdentifier():this.parseModuleExportName(),c=!1):(o=n,c=!1)}else z(this.state.type)?(c=!1,o=t?this.parseIdentifier():this.parseModuleExportName()):(s=!0,a=e)}else z(this.state.type)&&(s=!0,t?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());s&&n&&this.raise(t?U.TypeModifierIsUsedInTypeImports:U.TypeModifierIsUsedInTypeExports,l),e[r]=a,e[i]=o;let u=t?`importKind`:`exportKind`;e[u]=s?`type`:`value`,c&&this.eatContextual(93)&&(e[i]=t?this.parseIdentifier():this.parseModuleExportName()),e[i]||(e[i]=this.cloneIdentifier(e[r])),t&&this.checkIdentifier(e[i],s?4098:4096)}fillOptionalPropertiesForTSESLint(e){switch(e.type){case`ExpressionStatement`:e.directive??=void 0;return;case`RestElement`:e.value=void 0;case`Identifier`:case`ArrayPattern`:case`AssignmentPattern`:case`ObjectPattern`:e.decorators??=[],e.optional??=!1,e.typeAnnotation??=void 0;return;case`TSParameterProperty`:e.accessibility??=void 0,e.decorators??=[],e.override??=!1,e.readonly??=!1,e.static??=!1;return;case`TSEmptyBodyFunctionExpression`:e.body=null;case`TSDeclareFunction`:case`FunctionDeclaration`:case`FunctionExpression`:case`ClassMethod`:case`ClassPrivateMethod`:e.declare??=!1,e.returnType??=void 0,e.typeParameters??=void 0;return;case`Property`:e.optional??=!1;return;case`TSMethodSignature`:case`TSPropertySignature`:e.optional??=!1;case`TSIndexSignature`:e.accessibility??=void 0,e.readonly??=!1,e.static??=!1;return;case`TSAbstractPropertyDefinition`:case`PropertyDefinition`:case`TSAbstractAccessorProperty`:case`AccessorProperty`:e.declare??=!1,e.definite??=!1,e.readonly??=!1,e.typeAnnotation??=void 0;case`TSAbstractMethodDefinition`:case`MethodDefinition`:e.accessibility??=void 0,e.decorators??=[],e.override??=!1,e.optional??=!1;return;case`ClassExpression`:e.id??=null;case`ClassDeclaration`:e.abstract??=!1,e.declare??=!1,e.decorators??=[],e.implements??=[],e.superTypeArguments??=void 0,e.typeParameters??=void 0;return;case`TSTypeAliasDeclaration`:case`VariableDeclaration`:e.declare??=!1;return;case`VariableDeclarator`:e.definite??=!1;return;case`TSEnumDeclaration`:e.const??=!1,e.declare??=!1;return;case`TSEnumMember`:e.computed??=!1;return;case`TSImportType`:e.qualifier??=null,e.options??=null;return;case`TSInterfaceDeclaration`:e.declare??=!1,e.extends??=[];return;case`TSMappedType`:e.optional??=!1,e.readonly??=void 0;return;case`TSModuleDeclaration`:e.declare??=!1,e.global??=e.kind===`global`;return;case`TSTypeParameter`:e.const??=!1,e.in??=!1,e.out??=!1;return}}chStartsBindingIdentifierAndNotRelationalOperator(e,t){if(De(e)){if(Jt.lastIndex=t,Jt.test(this.input)){let e=this.codePointAtPos(Jt.lastIndex);if(!Oe(e)&&e!==92)return!1}return!0}else if(e===92)return!0;else return!1}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifierAndNotRelationalOperator(t,e)}nextTokenIsIdentifierOrStringLiteralOnSameLine(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)||t===34||t===39}};function tn(e){if(e.type!==`MemberExpression`)return!1;let{computed:t,property:n}=e;return t&&n.type!==`StringLiteral`&&(n.type!==`TemplateLiteral`||n.expressions.length>0)?!1:on(e.object)}function nn(e,t){var n;let{type:r}=e;if((n=e.extra)!=null&&n.parenthesized)return!1;if(t){if(r===`Literal`){let{value:t}=e;if(typeof t==`string`||typeof t==`boolean`)return!0}}else if(r===`StringLiteral`||r===`BooleanLiteral`)return!0;return!!(rn(e,t)||an(e,t)||r===`TemplateLiteral`&&e.expressions.length===0||tn(e))}function rn(e,t){return t?e.type===`Literal`&&(typeof e.value==`number`||`bigint`in e):e.type===`NumericLiteral`||e.type===`BigIntLiteral`}function an(e,t){if(e.type===`UnaryExpression`){let{operator:n,argument:r}=e;if(n===`-`&&rn(r,t))return!0}return!1}function on(e){return e.type===`Identifier`?!0:e.type!==`MemberExpression`||e.computed?!1:on(e.object)}let sn=_`placeholders`({ClassNameIsRequired:`A class name is required.`,UnexpectedSpace:`Unexpected space in placeholder.`});var cn=e=>class extends e{parsePlaceholder(e){if(this.match(133)){let t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){let n=e;return(!n.expectedNode||!n.type)&&(n=this.finishNode(n,`Placeholder`)),n.expectedNode=t,n}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder(`Expression`)||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder(`Identifier`)||super.parseIdentifier(e)}checkReservedWord(e,t,n,r){e!==void 0&&super.checkReservedWord(e,t,n,r)}cloneIdentifier(e){let t=super.cloneIdentifier(e);return t.type===`Placeholder`&&(t.expectedNode=e.expectedNode),t}cloneStringLiteral(e){return e.type===`Placeholder`?this.cloneIdentifier(e):super.cloneStringLiteral(e)}parseBindingAtom(){return this.parsePlaceholder(`Pattern`)||super.parseBindingAtom()}isValidLVal(e,t,n,r){return e===`Placeholder`||super.isValidLVal(e,t,n,r)}toAssignable(e,t){e&&e.type===`Placeholder`&&e.expectedNode===`Expression`?e.expectedNode=`Pattern`:super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){if(super.chStartsBindingIdentifier(e,t))return!0;let n=this.nextTokenStart();return this.input.charCodeAt(n)===37&&this.input.charCodeAt(n+1)===37}verifyBreakContinue(e,t){e.label?.type!==`Placeholder`&&super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){var n;if(t.type!==`Placeholder`||(n=t.extra)!=null&&n.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){let n=e;return n.label=this.finishPlaceholder(t,`Identifier`),this.next(),n.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(n,`LabeledStatement`)}this.semicolon();let r=e;return r.name=t.name,this.finishPlaceholder(r,`Statement`)}parseBlock(e,t,n){return this.parsePlaceholder(`BlockStatement`)||super.parseBlock(e,t,n)}parseFunctionId(e){return this.parsePlaceholder(`Identifier`)||super.parseFunctionId(e)}parseClass(e,t,n){let r=t?`ClassDeclaration`:`ClassExpression`;this.next();let i=this.state.strict,a=this.parsePlaceholder(`Identifier`);if(a)if(this.match(81)||this.match(133)||this.match(5))e.id=a;else if(n||!t)return e.id=null,e.body=this.finishPlaceholder(a,`ClassBody`),this.finishNode(e,r);else throw this.raise(sn.ClassNameIsRequired,this.state.startLoc);else this.parseClassId(e,t,n);return super.parseClassSuper(e),e.body=this.parsePlaceholder(`ClassBody`)||super.parseClassBody(!!e.superClass,i),this.finishNode(e,r)}parseExport(e,t){let n=this.parsePlaceholder(`Identifier`);if(!n)return super.parseExport(e,t);let r=e;if(!this.isContextual(98)&&!this.match(12))return r.specifiers=[],r.source=null,r.declaration=this.finishPlaceholder(n,`Declaration`),this.finishNode(r,`ExportNamedDeclaration`);this.expectPlugin(`exportDefaultFrom`);let i=this.startNode();return i.exported=n,r.specifiers=[this.finishNode(i,`ExportDefaultSpecifier`)],super.parseExport(r,t)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,`from`)&&this.input.startsWith(he(133),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var n;return(n=e.specifiers)!=null&&n.length?!0:super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){let{specifiers:t}=e;t!=null&&t.length&&(e.specifiers=t.filter(e=>e.exported.type===`Placeholder`)),super.checkExport(e),e.specifiers=t}parseImport(e){let t=this.parsePlaceholder(`Identifier`);if(!t)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(t,`StringLiteral`),this.semicolon(),this.finishNode(e,`ImportDeclaration`);let n=this.startNodeAtNode(t);return n.local=t,e.specifiers.push(this.finishNode(n,`ImportDefaultSpecifier`)),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,`ImportDeclaration`)}parseImportSource(){return this.parsePlaceholder(`StringLiteral`)||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(sn.UnexpectedSpace,this.state.lastTokEndLoc)}},ln=e=>class extends e{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,t=this.startNode();if(this.next(),L(this.state.type)){let e=this.parseIdentifierName(),n=this.createIdentifier(t,e);if(this.castNodeTo(n,`V8IntrinsicIdentifier`),this.match(10))return n}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}};let un=[`minimal`,`fsharp`,`hack`,`smart`],dn=[`^^`,`@@`,`^`,`%`,`#`];function fn(e){if(e.has(`decorators`)){if(e.has(`decorators-legacy`))throw Error(`Cannot use the decorators and decorators-legacy plugin together`);let t=e.get(`decorators`).decoratorsBeforeExport;if(t!=null&&typeof t!=`boolean`)throw Error(`'decoratorsBeforeExport' must be a boolean, if specified.`);let n=e.get(`decorators`).allowCallParenthesized;if(n!=null&&typeof n!=`boolean`)throw Error(`'allowCallParenthesized' must be a boolean.`)}if(e.has(`flow`)&&e.has(`typescript`))throw Error(`Cannot combine flow and typescript plugins.`);if(e.has(`placeholders`)&&e.has(`v8intrinsic`))throw Error(`Cannot combine placeholders and v8intrinsic plugins.`);if(e.has(`pipelineOperator`)){let t=e.get(`pipelineOperator`).proposal;if(!un.includes(t)){let e=un.map(e=>`"${e}"`).join(`, `);throw Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`)}if(t===`hack`){if(e.has(`placeholders`))throw Error(`Cannot combine placeholders plugin and Hack-style pipes.`);if(e.has(`v8intrinsic`))throw Error(`Cannot combine v8intrinsic plugin and Hack-style pipes.`);let t=e.get(`pipelineOperator`).topicToken;if(!dn.includes(t)){let e=dn.map(e=>`"${e}"`).join(`, `);throw Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${e}.`)}if(t===`#`&&e.get(`recordAndTuple`)?.syntaxType===`hash`)throw Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify([`recordAndTuple`,e.get(`recordAndTuple`)])}\`.`)}else if(t===`smart`&&e.get(`recordAndTuple`)?.syntaxType===`hash`)throw Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify([`recordAndTuple`,e.get(`recordAndTuple`)])}\`.`)}if(e.has(`moduleAttributes`)){if(e.has(`deprecatedImportAssert`)||e.has(`importAssertions`))throw Error(`Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.`);if(e.get(`moduleAttributes`).version!==`may-2020`)throw Error(`The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.`)}if(e.has(`importAssertions`)&&e.has(`deprecatedImportAssert`))throw Error(`Cannot combine importAssertions and deprecatedImportAssert plugins.`);if(e.has(`deprecatedImportAssert`)||e.has(`importAttributes`)&&e.get(`importAttributes`).deprecatedAssertSyntax&&e.set(`deprecatedImportAssert`,{}),e.has(`recordAndTuple`)){let t=e.get(`recordAndTuple`).syntaxType;if(t!=null){let e=[`hash`,`bar`];if(!e.includes(t))throw Error(`The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: `+e.map(e=>`'${e}'`).join(`, `))}}if(e.has(`asyncDoExpressions`)&&!e.has(`doExpressions`)){let e=Error(`'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.`);throw e.missingPlugins=`doExpressions`,e}if(e.has(`optionalChainingAssign`)&&e.get(`optionalChainingAssign`).version!==`2023-07`)throw Error(`The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.`);if(e.has(`discardBinding`)&&e.get(`discardBinding`).syntaxType!==`void`)throw Error(`The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.`)}let pn={estree:w,jsx:st,flow:Xe,typescript:en,v8intrinsic:ln,placeholders:cn},mn=Object.keys(pn);var hn=class extends qt{checkProto(e,t,n,r){if(e.type===`SpreadElement`||this.isObjectMethod(e)||e.computed||e.shorthand)return n;let i=e.key;return(i.type===`Identifier`?i.name:i.value)===`__proto__`?t?(this.raise(v.RecordNoProto,i),!0):(n&&(r?r.doubleProtoLoc===null&&(r.doubleProtoLoc=i.loc.start):this.raise(v.DuplicateProto,i)),!0):n}shouldExitDescending(e,t){return e.type===`ArrowFunctionExpression`&&this.offsetToSourcePos(e.start)===t}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(v.ParseExpressionEmptyInput,this.state.startLoc);let e=this.parseExpression();if(!this.match(140))throw this.raise(v.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,this.optionFlags&256&&(e.tokens=this.tokens),e}parseExpression(e,t){return e?this.disallowInAnd(()=>this.parseExpressionBase(t)):this.allowInAnd(()=>this.parseExpressionBase(t))}parseExpressionBase(e){let t=this.state.startLoc,n=this.parseMaybeAssign(e);if(this.match(12)){let r=this.startNodeAt(t);for(r.expressions=[n];this.eat(12);)r.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(r.expressions),this.finishNode(r,`SequenceExpression`)}return n}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd(()=>this.parseMaybeAssign(e,t))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd(()=>this.parseMaybeAssign(e,t))}setOptionalParametersError(e){e.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(e,t){let n=this.state.startLoc,r=this.isContextual(108);if(r&&this.prodParam.hasYield){this.next();let e=this.parseYield(n);return t&&(e=t.call(this,e,n)),e}let i;e?i=!1:(e=new Ht,i=!0);let{type:a}=this.state;(a===10||L(a))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(e);if(t&&(o=t.call(this,o,n)),se(this.state.type)){let t=this.startNodeAt(n),r=this.state.value;if(t.operator=r,this.match(29)){this.toAssignable(o,!0),t.left=o;let r=n.index;e.doubleProtoLoc!=null&&e.doubleProtoLoc.index>=r&&(e.doubleProtoLoc=null),e.shorthandAssignLoc!=null&&e.shorthandAssignLoc.index>=r&&(e.shorthandAssignLoc=null),e.privateKeyLoc!=null&&e.privateKeyLoc.index>=r&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null),e.voidPatternLoc!=null&&e.voidPatternLoc.index>=r&&(e.voidPatternLoc=null)}else t.left=o;return this.next(),t.right=this.parseMaybeAssign(),this.checkLVal(o,this.finishNode(t,`AssignmentExpression`),void 0,void 0,void 0,void 0,r===`||=`||r===`&&=`||r===`??=`),t}else i&&this.checkExpressionErrors(e,!0);if(r){let{type:e}=this.state;if((this.hasPlugin(`v8intrinsic`)?oe(e):oe(e)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(v.YieldNotInGeneratorFunction,n),this.parseYield(n)}return o}parseMaybeConditional(e){let t=this.state.startLoc,n=this.state.potentialArrowAt,r=this.parseExprOps(e);return this.shouldExitDescending(r,n)?r:this.parseConditional(r,t,e)}parseConditional(e,t,n){if(this.eat(17)){let n=this.startNodeAt(t);return n.test=e,n.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),n.alternate=this.parseMaybeAssign(),this.finishNode(n,`ConditionalExpression`)}return e}parseMaybeUnaryOrPrivate(e){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){let t=this.state.startLoc,n=this.state.potentialArrowAt,r=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(r,n)?r:this.parseExprOp(r,t,-1)}parseExprOp(e,t,n){if(this.isPrivateName(e)){let t=this.getPrivateNameSV(e);(n>=ge(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(v.PrivateInExpectedIn,e,{identifierName:t}),this.classScope.usePrivateName(t,e.loc.start)}let r=this.state.type;if(B(r)&&(this.prodParam.hasIn||!this.match(58))){let i=ge(r);if(i>n){if(r===39){if(this.expectPlugin(`pipelineOperator`),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}let a=this.startNodeAt(t);a.left=e,a.operator=this.state.value;let o=r===41||r===42,s=r===40;if(s&&(i=ge(42)),this.next(),r===39&&this.hasPlugin([`pipelineOperator`,{proposal:`minimal`}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(v.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);a.right=this.parseExprOpRightExpr(r,i);let c=this.finishNode(a,o||s?`LogicalExpression`:`BinaryExpression`),l=this.state.type;if(s&&(l===41||l===42)||o&&l===40)throw this.raise(v.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,t,n)}}return e}parseExprOpRightExpr(e,t){let n=this.state.startLoc;switch(e){case 39:switch(this.getPluginOption(`pipelineOperator`,`proposal`)){case`hack`:return this.withTopicBindingContext(()=>this.parseHackPipeBody());case`fsharp`:return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(t))}if(this.getPluginOption(`pipelineOperator`,`proposal`)===`smart`)return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(v.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,t),n)});default:return this.parseExprOpBaseRightExpr(e,t)}}parseExprOpBaseRightExpr(e,t){let n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),n,_e(e)?t-1:t)}parseHackPipeBody(){var e;let{startLoc:t}=this.state,n=this.parseMaybeAssign();return f.has(n.type)&&!((e=n.extra)!=null&&e.parenthesized)&&this.raise(v.PipeUnparenthesizedBody,t,{type:n.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipeTopicUnused,t),n}checkExponentialAfterUnary(e){this.match(57)&&this.raise(v.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,t){let n=this.state.startLoc,r=this.isContextual(96);if(r&&this.recordAwaitIfAllowed()){this.next();let e=this.parseAwait(n);return t||this.checkExponentialAfterUnary(e),e}let i=this.match(34),a=this.startNode();if(fe(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin(`throwExpressions`);let n=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&n){let e=a.argument;e.type===`Identifier`?this.raise(v.StrictDelete,a):this.hasPropertyAsPrivateName(e)&&this.raise(v.DeletePrivateField,a)}if(!i)return t||this.checkExponentialAfterUnary(a),this.finishNode(a,`UnaryExpression`)}let o=this.parseUpdate(a,i,e);if(r){let{type:e}=this.state;if((this.hasPlugin(`v8intrinsic`)?oe(e):oe(e)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(v.AwaitNotInAsyncContext,n),this.parseAwait(n)}return o}parseUpdate(e,t,n){if(t){let t=e;return this.checkLVal(t.argument,this.finishNode(t,`UpdateExpression`)),e}let r=this.state.startLoc,i=this.parseExprSubscripts(n);if(this.checkExpressionErrors(n,!1))return i;for(;de(this.state.type)&&!this.canInsertSemicolon();){let e=this.startNodeAt(r);e.operator=this.state.value,e.prefix=!1,e.argument=i,this.next(),this.checkLVal(i,i=this.finishNode(e,`UpdateExpression`))}return i}parseExprSubscripts(e){let t=this.state.startLoc,n=this.state.potentialArrowAt,r=this.parseExprAtom(e);return this.shouldExitDescending(r,n)?r:this.parseSubscripts(r,t)}parseSubscripts(e,t,n){let r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do e=this.parseSubscript(e,t,n,r),r.maybeAsyncArrow=!1;while(!r.stop);return e}parseSubscript(e,t,n,r){let{type:i}=this.state;if(!n&&i===15)return this.parseBind(e,t,n,r);if(ve(i))return this.parseTaggedTemplateExpression(e,t,r);let a=!1;if(i===18){if(n&&(this.raise(v.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(e,r);r.optionalChainMember=a=!0,this.next()}if(!n&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,t,r,a);{let n=this.eat(0);return n||a||this.eat(16)?this.parseMember(e,t,r,n,a):this.stopParseSubscript(e,r)}}stopParseSubscript(e,t){return t.stop=!0,e}parseMember(e,t,n,r,i){let a=this.startNodeAt(t);return a.object=e,a.computed=r,r?(a.property=this.parseExpression(),this.expect(3)):this.match(139)?(e.type===`Super`&&this.raise(v.SuperPrivateField,t),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),n.optionalChainMember?(a.optional=i,this.finishNode(a,`OptionalMemberExpression`)):this.finishNode(a,`MemberExpression`)}parseBind(e,t,n,r){let i=this.startNodeAt(t);return i.object=e,this.next(),i.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(i,`BindExpression`),t,n)}parseCoverCallAndAsyncArrowHead(e,t,n,r){let i=this.state.maybeInArrowParameters,a=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(t);o.callee=e;let{maybeAsyncArrow:s,optionalChainMember:c}=n;s&&(this.expressionScope.enter(zt()),a=new Ht),c&&(o.optional=r),r?o.arguments=this.parseCallExpressionArguments():o.arguments=this.parseCallExpressionArguments(e.type!==`Super`,o,a);let l=this.finishCallExpression(o,c);return s&&this.shouldParseAsyncArrow()&&!r?(n.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),l=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),l)):(s&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(l)),this.state.maybeInArrowParameters=i,l}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,n){let r=this.startNodeAt(t);return r.tag=e,r.quasi=this.parseTemplate(!0),n.optionalChainMember&&this.raise(v.OptionalChainingNoTemplate,t),this.finishNode(r,`TaggedTemplateExpression`)}atPossibleAsyncArrow(e){return e.type===`Identifier`&&e.name===`async`&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.offsetToSourcePos(e.start)===this.state.potentialArrowAt}finishCallExpression(e,t){if(e.callee.type===`Import`)if(e.arguments.length===0||e.arguments.length>2)this.raise(v.ImportCallArity,e);else for(let t of e.arguments)t.type===`SpreadElement`&&this.raise(v.ImportCallSpreadArgument,t);return this.finishNode(e,t?`OptionalCallExpression`:`CallExpression`)}parseCallExpressionArguments(e,t,n){let r=[],i=!0,a=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(11);){if(i)i=!1;else if(this.expect(12),this.match(11)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}r.push(this.parseExprListItem(11,!1,n,e))}return this.state.inFSharpPipelineDirectBody=a,r}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(e,t.arguments,!0,t.extra?.trailingCommaLoc),t.innerComments&&ht(e,t.innerComments),t.callee.trailingComments&&ht(e,t.callee.trailingComments),e}parseNoCallExpr(){let e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let t,n=null,{type:r}=this.state;switch(r){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(t):this.match(10)?this.optionFlags&512?this.parseImportCall(t):this.finishNode(t,`Import`):(this.raise(v.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(t,`Import`));case 78:return t=this.startNode(),this.next(),this.finishNode(t,`ThisExpression`);case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let e=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(e)}case 0:return this.parseArrayLike(3,!1,e);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:n=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(n,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{t=this.startNode(),this.next(),t.object=null;let e=t.callee=this.parseNoCallExpr();if(e.type===`MemberExpression`)return this.finishNode(t,`BindExpression`);throw this.raise(v.UnsupportedBind,e)}case 139:return this.raise(v.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,`%`);case 32:return this.parseTopicReferenceThenEqualsSign(44,`^`);case 37:case 38:return this.parseTopicReference(`hack`);case 44:case 54:case 27:{let e=this.getPluginOption(`pipelineOperator`,`proposal`);if(e)return this.parseTopicReference(e);throw this.unexpected()}case 47:{let e=this.input.codePointAt(this.nextTokenStart());throw De(e)||e===62?this.expectOnePlugin([`jsx`,`flow`,`typescript`]):this.unexpected()}default:if(r===137)return this.parseDecimalLiteral(this.state.value);if(r===2||r===1)return this.parseArrayLike(this.state.type===2?4:3,!0);if(r===6||r===7)return this.parseObjectLike(this.state.type===6?9:8,!1,!0);if(L(r)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let e=this.state.potentialArrowAt===this.state.start,t=this.state.containsEsc,n=this.parseIdentifier();if(!t&&n.name===`async`&&!this.canInsertSemicolon()){let{type:e}=this.state;if(e===68)return this.resetPreviousNodeTrailingComments(n),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(n));if(L(e))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(n)):n;if(e===90)return this.resetPreviousNodeTrailingComments(n),this.parseDo(this.startNodeAtNode(n),!0)}return e&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(n),[n],!1)):n}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){let n=this.getPluginOption(`pipelineOperator`,`proposal`);if(n)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=i(this.state.endLoc,-1),this.parseTopicReference(n);throw this.unexpected()}parseTopicReference(e){let t=this.startNode(),n=this.state.startLoc,r=this.state.type;return this.next(),this.finishTopicReference(t,n,e,r)}finishTopicReference(e,t,n,r){if(this.testTopicReferenceConfiguration(n,t,r))return n===`hack`?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(v.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(e,`TopicReference`)):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(v.PrimaryTopicNotAllowed,t),this.registerTopicReference(),this.finishNode(e,`PipelinePrimaryTopicReference`));throw this.raise(v.PipeTopicUnconfiguredToken,t,{token:he(r)})}testTopicReferenceConfiguration(e,t,n){switch(e){case`hack`:return this.hasPlugin([`pipelineOperator`,{topicToken:he(n)}]);case`smart`:return n===27;default:throw this.raise(v.PipeTopicRequiresHackPipes,t)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(dt(!0,this.prodParam.hasYield));let t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(v.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin(`doExpressions`),t&&this.expectPlugin(`asyncDoExpressions`),e.async=t,this.next();let n=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=n,this.finishNode(e,`DoExpression`)}parseSuper(){let e=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper?this.optionFlags&16||this.raise(v.SuperNotAllowed,e):this.scope.allowSuper||this.optionFlags&16||this.raise(v.UnexpectedSuper,e),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(v.UnsupportedSuper,e),this.finishNode(e,`Super`)}parsePrivateName(){let e=this.startNode(),t=this.startNodeAt(i(this.state.startLoc,1)),n=this.state.value;return this.next(),e.id=this.createIdentifier(t,n),this.finishNode(e,`PrivateName`)}parseFunctionOrFunctionSent(){let e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),`function`);return this.next(),this.match(103)?this.expectPlugin(`functionSent`):this.hasPlugin(`functionSent`)||this.unexpected(),this.parseMetaProperty(e,t,`sent`)}return this.parseFunction(e)}parseMetaProperty(e,t,n){e.meta=t;let r=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==n||r)&&this.raise(v.UnsupportedMetaProperty,e.property,{target:t.name,onlyValidPropertyName:n}),this.finishNode(e,`MetaProperty`)}parseImportMetaPropertyOrPhaseCall(e){if(this.next(),this.isContextual(105)||this.isContextual(97)){let t=this.isContextual(105);return this.expectPlugin(t?`sourcePhaseImports`:`deferredImportEvaluation`),this.next(),e.phase=t?`source`:`defer`,this.parseImportCall(e)}else{let t=this.createIdentifierAt(this.startNodeAtNode(e),`import`,this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(v.ImportMetaOutsideModule,t),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,`meta`)}}parseLiteralAtNode(e,t,n){return this.addExtra(n,`rawValue`,e),this.addExtra(n,`raw`,this.input.slice(this.offsetToSourcePos(n.start),this.state.end)),n.value=e,this.next(),this.finishNode(n,t)}parseLiteral(e,t){let n=this.startNode();return this.parseLiteralAtNode(e,t,n)}parseStringLiteral(e){return this.parseLiteral(e,`StringLiteral`)}parseNumericLiteral(e){return this.parseLiteral(e,`NumericLiteral`)}parseBigIntLiteral(e){return this.parseLiteral(e,`BigIntLiteral`)}parseDecimalLiteral(e){return this.parseLiteral(e,`DecimalLiteral`)}parseRegExpLiteral(e){let t=this.startNode();return this.addExtra(t,`raw`,this.input.slice(this.offsetToSourcePos(t.start),this.state.end)),t.pattern=e.pattern,t.flags=e.flags,this.next(),this.finishNode(t,`RegExpLiteral`)}parseBooleanLiteral(e){let t=this.startNode();return t.value=e,this.next(),this.finishNode(t,`BooleanLiteral`)}parseNullLiteral(){let e=this.startNode();return this.next(),this.finishNode(e,`NullLiteral`)}parseParenAndDistinguishExpression(e){let t=this.state.startLoc,n;this.next(),this.expressionScope.enter(Rt());let r=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let a=this.state.startLoc,o=[],s=new Ht,c=!0,l,u;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,s.optionalParametersLoc===null?null:s.optionalParametersLoc),this.match(11)){u=this.state.startLoc;break}if(this.match(21)){let e=this.state.startLoc;if(l=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),e)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowInOrVoidPattern(11,s,this.parseParenItem))}let d=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=i;let f=this.startNodeAt(t);return e&&this.shouldParseArrow(o)&&(f=this.parseArrow(f))?(this.checkDestructuringPrivate(s),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(f,o,!1),f):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),u&&this.unexpected(u),l&&this.unexpected(l),this.checkExpressionErrors(s,!0),this.toReferencedListDeep(o,!0),o.length>1?(n=this.startNodeAt(a),n.expressions=o,this.finishNode(n,`SequenceExpression`),this.resetEndLocation(n,d)):n=o[0],this.wrapParenthesis(t,n))}wrapParenthesis(e,t){if(!(this.optionFlags&1024))return this.addExtra(t,`parenthesized`,!0),this.addExtra(t,`parenStart`,e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;let n=this.startNodeAt(e);return n.expression=t,this.finishNode(n,`ParenthesizedExpression`)}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){let e=this.startNode();if(this.next(),this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),`new`);this.next();let n=this.parseMetaProperty(e,t,`target`);return this.scope.allowNewTarget||this.raise(v.UnexpectedNewTarget,n),n}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){let t=this.parseExprList(11);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,`NewExpression`)}parseNewCallee(e){let t=this.match(83),n=this.parseNoCallExpr();e.callee=n,t&&(n.type===`Import`||n.type===`ImportExpression`)&&this.raise(v.ImportCallNotNewExpression,n)}parseTemplateElement(e){let{start:t,startLoc:n,end:r,value:a}=this.state,o=t+1,s=this.startNodeAt(i(n,1));a===null&&(e||this.raise(v.InvalidEscapeSequenceTemplate,i(this.state.firstInvalidTemplateEscapePos,1)));let c=this.match(24),l=c?-1:-2,u=r+l;s.value={raw:this.input.slice(o,u).replace(/\r\n?/g,`
|
|
102
|
-
`),cooked:a===null?null:a.slice(1,l)},s.tail=c,this.next();let d=this.finishNode(s,`TemplateElement`);return this.resetEndLocation(d,i(this.state.lastTokEndLoc,l)),d}parseTemplate(e){let t=this.startNode(),n=this.parseTemplateElement(e),r=[n],i=[];for(;!n.tail;)i.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.push(n=this.parseTemplateElement(e));return t.expressions=i,t.quasis=r,this.finishNode(t,`TemplateLiteral`)}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,n,r){n&&this.expectPlugin(`recordAndTuple`);let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=!1,o=!0,s=this.startNode();for(s.properties=[],this.next();!this.match(e);){if(o)o=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(s);break}let i;t?i=this.parseBindingProperty():(i=this.parsePropertyDefinition(r),a=this.checkProto(i,n,a,r)),n&&!this.isObjectProperty(i)&&i.type!==`SpreadElement`&&this.raise(v.InvalidRecordProperty,i),i.shorthand&&this.addExtra(i,`shorthand`,!0),s.properties.push(i)}this.next(),this.state.inFSharpPipelineDirectBody=i;let c=`ObjectExpression`;return t?c=`ObjectPattern`:n&&(c=`RecordExpression`),this.finishNode(s,c)}addTrailingCommaExtraToNode(e){this.addExtra(e,`trailingComma`,this.state.lastTokStartLoc.index),this.addExtra(e,`trailingCommaLoc`,this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type===`Identifier`&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let t=[];if(this.match(26))for(this.hasPlugin(`decorators`)&&this.raise(v.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)t.push(this.parseDecorator());let n=this.startNode(),r=!1,i=!1,a;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(n.decorators=t,t=[]),n.method=!1,e&&(a=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(n);let s=this.state.containsEsc;if(this.parsePropertyName(n,e),!o&&!s&&this.maybeAsyncOrAccessorProp(n)){let{key:e}=n,t=e.name;t===`async`&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(e),o=this.eat(55),this.parsePropertyName(n)),(t===`get`||t===`set`)&&(i=!0,this.resetPreviousNodeTrailingComments(e),n.kind=t,this.match(55)&&(o=!0,this.raise(v.AccessorIsGenerator,this.state.curPosition(),{kind:t}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,a,o,r,!1,i,e)}getGetterSetterExpectedParamCount(e){return e.kind===`get`?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){let t=this.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e);n.length!==t&&this.raise(e.kind===`get`?v.BadGetterArity:v.BadSetterArity,e),e.kind===`set`&&n[n.length-1]?.type===`RestElement`&&this.raise(v.BadSetterRestParameter,e)}parseObjectMethod(e,t,n,r,i){if(i){let n=this.parseMethod(e,t,!1,!1,!1,`ObjectMethod`);return this.checkGetterSetterParams(n),n}if(n||t||this.match(10))return r&&this.unexpected(),e.kind=`method`,e.method=!0,this.parseMethod(e,t,n,!1,!1,`ObjectMethod`)}parseObjectProperty(e,t,n,r){if(e.shorthand=!1,this.eat(14))return e.value=n?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,r),this.finishObjectProperty(e);if(!e.computed&&e.key.type===`Identifier`){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),n)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(29)){let n=this.state.startLoc;r==null?this.raise(v.InvalidCoverInitializedName,n):r.shorthandAssignLoc===null&&(r.shorthandAssignLoc=n),e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,`ObjectProperty`)}parseObjPropValue(e,t,n,r,i,a,o){let s=this.parseObjectMethod(e,n,r,i,a)||this.parseObjectProperty(e,t,i,o);return s||this.unexpected(),s}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:n,value:r}=this.state,i;if(z(n))i=this.parseIdentifier(!0);else switch(n){case 135:i=this.parseNumericLiteral(r);break;case 134:i=this.parseStringLiteral(r);break;case 136:i=this.parseBigIntLiteral(r);break;case 139:{let e=this.state.startLoc;t==null?this.raise(v.UnexpectedPrivateField,e):t.privateKeyLoc===null&&(t.privateKeyLoc=e),i=this.parsePrivateName();break}default:if(n===137){i=this.parseDecimalLiteral(r);break}this.unexpected()}e.key=i,n!==139&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,n,r,i,a,o=!1){this.initFunction(e,n),e.generator=t,this.scope.enter(530|(o?576:0)|(i?32:0)),this.prodParam.enter(dt(n,e.generator)),this.parseFunctionParams(e,r);let s=this.parseFunctionBodyAndFinish(e,a,!0);return this.prodParam.exit(),this.scope.exit(),s}parseArrayLike(e,t,n){t&&this.expectPlugin(`recordAndTuple`);let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let i=this.startNode();return this.next(),i.elements=this.parseExprList(e,!t,n,i),this.state.inFSharpPipelineDirectBody=r,this.finishNode(i,t?`TupleExpression`:`ArrayExpression`)}parseArrowExpression(e,t,n,r){this.scope.enter(518);let i=dt(n,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(e,n);let a=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(e,`ArrowFunctionExpression`)}setArrowFunctionParameters(e,t,n){this.toAssignableList(t,n,!1),e.params=t}parseFunctionBodyAndFinish(e,t,n=!1){return this.parseFunctionBody(e,!1,n),this.finishNode(e,t)}parseFunctionBody(e,t,n=!1){let r=t&&!this.match(5);if(this.expressionScope.enter(Bt()),r)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{let r=this.state.strict,i=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),e.body=this.parseBlock(!0,!1,i=>{let a=!this.isSimpleParamList(e.params);i&&a&&this.raise(v.IllegalLanguageModeDirective,(e.kind===`method`||e.kind===`constructor`)&&e.key?e.key.loc.end:e);let o=!r&&this.state.strict;this.checkParams(e,!this.state.strict&&!t&&!n&&!a,t,o),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,o)}),this.prodParam.exit(),this.state.labels=i}this.expressionScope.exit()}isSimpleParameter(e){return e.type===`Identifier`}isSimpleParamList(e){for(let t=0,n=e.length;t<n;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,n,r=!0){let i=!t&&new Set,a={type:`FormalParameters`};for(let t of e.params)this.checkLVal(t,a,5,i,r)}parseExprList(e,t,n,r){let i=[],a=!0;for(;!this.eat(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}i.push(this.parseExprListItem(e,t,n))}return i}parseExprListItem(e,t,n,r){let i;if(this.match(12))t||this.raise(v.UnexpectedToken,this.state.curPosition(),{unexpected:`,`}),i=null;else if(this.match(21)){let e=this.state.startLoc;i=this.parseParenItem(this.parseSpread(n),e)}else if(this.match(17)){this.expectPlugin(`partialApplication`),r||this.raise(v.UnexpectedArgumentPlaceholder,this.state.startLoc);let e=this.startNode();this.next(),i=this.finishNode(e,`ArgumentPlaceholder`)}else i=this.parseMaybeAssignAllowInOrVoidPattern(e,n,this.parseParenItem);return i}parseIdentifier(e){let t=this.startNode(),n=this.parseIdentifierName(e);return this.createIdentifier(t,n)}createIdentifier(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,`Identifier`)}createIdentifierAt(e,t,n){return e.name=t,e.loc.identifierName=t,this.finishNodeAt(e,`Identifier`,n)}parseIdentifierName(e){let t,{startLoc:n,type:r}=this.state;z(r)?t=this.state.value:this.unexpected();let i=R(r);return e?i&&this.replaceToken(132):this.checkReservedWord(t,n,i,!1),this.next(),t}checkReservedWord(e,t,n,r){if(!(e.length>10)&&ze(e)){if(n&&Ie(e)){this.raise(v.UnexpectedKeyword,t,{keyword:e});return}if((this.state.strict?r?Fe:Ne:Me)(e,this.inModule)){this.raise(v.UnexpectedReservedWord,t,{reservedWord:e});return}else if(e===`yield`){if(this.prodParam.hasYield){this.raise(v.YieldBindingIdentifier,t);return}}else if(e===`await`){if(this.prodParam.hasAwait){this.raise(v.AwaitBindingIdentifier,t);return}if(this.scope.inStaticBlock){this.raise(v.AwaitBindingIdentifierInStaticBlock,t);return}this.expressionScope.recordAsyncArrowParametersError(t)}else if(e===`arguments`&&this.scope.inClassAndNotInNonArrowFunction){this.raise(v.ArgumentsInClass,t);return}}}recordAwaitIfAllowed(){let e=this.prodParam.hasAwait;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e){let t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(v.AwaitExpressionFormalParameter,t),this.eat(55)&&this.raise(v.ObsoleteAwaitStar,t),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,`AwaitExpression`)}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return e===53||e===10||e===0||ve(e)||e===102&&!this.state.containsEsc||e===138||e===56||this.hasPlugin(`v8intrinsic`)&&e===54}parseYield(e){let t=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError(v.YieldInParameter,t);let n=!1,r=null;if(!this.hasPrecedingLineBreak())switch(n=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!n)break;default:r=this.parseMaybeAssign()}return t.delegate=n,t.argument=r,this.finishNode(t,`YieldExpression`)}parseImportCall(e){if(this.next(),e.source=this.parseMaybeAssignAllowIn(),e.options=null,this.eat(12)){if(this.match(11))this.addTrailingCommaExtraToNode(e.source);else if(e.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(e.options),!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(v.ImportCallArity,e)}}return this.expect(11),this.finishNode(e,`ImportExpression`)}checkPipelineAtInfixOperator(e,t){this.hasPlugin([`pipelineOperator`,{proposal:`smart`}])&&e.type===`SequenceExpression`&&this.raise(v.PipelineHeadSequenceExpression,t)}parseSmartPipelineBodyInStyle(e,t){if(this.isSimpleReference(e)){let n=this.startNodeAt(t);return n.callee=e,this.finishNode(n,`PipelineBareFunction`)}else{let n=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),n.expression=e,this.finishNode(n,`PipelineTopicExpression`)}}isSimpleReference(e){switch(e.type){case`MemberExpression`:return!e.computed&&this.isSimpleReference(e.object);case`Identifier`:return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(v.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipelineTopicUnused,e)}withTopicBindingContext(e){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(e){if(this.hasPlugin([`pipelineOperator`,{proposal:`smart`}])){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}else return e()}withSoloAwaitPermittingContext(e){let t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){let t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(t|8);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(t&-9);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){let t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=n,r}parseModuleExpression(){this.expectPlugin(`moduleBlocks`);let e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let t=this.startNodeAt(this.state.endLoc);this.next();let n=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,8,`module`)}finally{n()}return this.finishNode(e,`ModuleExpression`)}parseVoidPattern(e){this.expectPlugin(`discardBinding`);let t=this.startNode();return e!=null&&(e.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(t,`VoidPattern`)}parseMaybeAssignAllowInOrVoidPattern(e,t,n){if(t!=null&&this.match(88)){let n=this.lookaheadCharCode();if(n===44||n===(e===3?93:e===8?125:41)||n===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(t))}return this.parseMaybeAssignAllowIn(t,n)}parsePropertyNamePrefixOperator(e){}};let gn={kind:1},_n={kind:2},vn=/[\uD800-\uDFFF]/u,yn=/in(?:stanceof)?/y;function bn(e,t,n){for(let r=0;r<e.length;r++){let a=e[r],{type:o}=a;if(typeof o==`number`){if(o===139){let{loc:t,start:n,value:o,end:s}=a,c=n+1,l=i(t.start,1);e.splice(r,1,new At({type:ye(27),value:`#`,start:n,end:c,startLoc:t.start,endLoc:l}),new At({type:ye(132),value:o,start:c,end:s,startLoc:l,endLoc:t.end})),r++;continue}if(ve(o)){let{loc:s,start:c,value:l,end:u}=a,d=c+1,f=i(s.start,1),p;p=t.charCodeAt(c-n)===96?new At({type:ye(22),value:"`",start:c,end:d,startLoc:s.start,endLoc:f}):new At({type:ye(8),value:`}`,start:c,end:d,startLoc:s.start,endLoc:f});let m,h,g,_;o===24?(h=u-1,g=i(s.end,-1),m=l===null?null:l.slice(1,-1),_=new At({type:ye(22),value:"`",start:h,end:u,startLoc:g,endLoc:s.end})):(h=u-2,g=i(s.end,-2),m=l===null?null:l.slice(1,-2),_=new At({type:ye(23),value:"${",start:h,end:u,startLoc:g,endLoc:s.end})),e.splice(r,1,p,new At({type:ye(20),value:m,start:d,end:h,startLoc:f,endLoc:g}),_),r+=2;continue}a.type=ye(o)}}return e}var xn=class extends hn{parseTopLevel(e,t){return e.program=this.parseProgram(t,140,this.options.sourceType===`module`?`module`:`script`),e.comments=this.comments,this.optionFlags&256&&(e.tokens=bn(this.tokens,this.input,this.startIndex)),this.finishNode(e,`File`)}parseProgram(e,t,n){if(e.sourceType=n,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule){if(!(this.optionFlags&64)&&this.scope.undefinedExports.size>0)for(let[e,t]of Array.from(this.scope.undefinedExports))this.raise(v.ModuleExportUndefined,t,{localName:e});this.addExtra(e,`topLevelAwait`,this.state.hasTopLevelAwait)}let r;return r=t===140?this.finishNode(e,`Program`):this.finishNodeAt(e,`Program`,i(this.state.startLoc,-1)),r}stmtToDirective(e){let t=this.castNodeTo(e,`Directive`),n=this.castNodeTo(e.expression,`DirectiveLiteral`),r=n.value,i=this.input.slice(this.offsetToSourcePos(n.start),this.offsetToSourcePos(n.end)),a=n.value=i.slice(1,-1);return this.addExtra(n,`raw`,i),this.addExtra(n,`rawValue`,a),this.addExtra(n,`expressionValue`,r),t.value=n,delete e.expression,t}parseInterpreterDirective(){if(!this.match(28))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,`InterpreterDirective`)}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(107)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(107))return!1;let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);if(this.isUnparsedContextual(e,`of`)){let t=this.lookaheadCharCodeSince(e+2);if(t!==61&&t!==58&&t!==59)return!1}return!!(this.chStartsBindingIdentifier(t,e)||this.isUnparsedContextual(e,`void`))}nextTokenIsIdentifierOnSameLine(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)}isAwaitUsing(){if(!this.isContextual(96))return!1;let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,`using`)){e=this.nextTokenInLineStartSince(e+5);let t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return!0}return!1}chStartsBindingIdentifier(e,t){if(De(e)){if(yn.lastIndex=t,yn.test(this.input)){let e=this.codePointAtPos(yn.lastIndex);if(!Oe(e)&&e!==92)return!1}return!0}else if(e===92)return!0;else return!1}chStartsBindingPattern(e){return e===91||e===123}hasFollowingBindingAtom(){let e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifierOrBrace(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return t===123||this.chStartsBindingIdentifier(t,e)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){let n=this.state.type,r=this.startNode(),i=!!(e&2),a=!!(e&4),o=e&1;switch(n){case 60:return this.parseBreakContinueStatement(r,!0);case 63:return this.parseBreakContinueStatement(r,!1);case 64:return this.parseDebuggerStatement(r);case 90:return this.parseDoWhileStatement(r);case 91:return this.parseForStatement(r);case 68:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?v.StrictFunction:this.options.annexB?v.SloppyFunctionAnnexB:v.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,!i&&a);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,r),!0);case 69:return this.parseIfStatement(r);case 70:return this.parseReturnStatement(r);case 71:return this.parseSwitchStatement(r);case 72:return this.parseThrowStatement(r);case 73:return this.parseTryStatement(r);case 96:if(this.isAwaitUsing())return this.allowsUsing()?i?this.recordAwaitIfAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,r):this.raise(v.UnexpectedLexicalDeclaration,r):this.raise(v.UnexpectedUsingDeclaration,r),this.next(),this.parseVarStatement(r,`await using`);break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?i||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(v.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(r,`using`);case 100:{if(this.state.containsEsc)break;let e=this.nextTokenStart(),t=this.codePointAtPos(e);if(t!==91&&(!i&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(t,e)&&t!==123))break}case 75:i||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let e=this.state.value;return this.parseVarStatement(r,e)}case 92:return this.parseWhileStatement(r);case 76:return this.parseWithStatement(r);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(r);case 83:{let e=this.lookaheadCharCode();if(e===40||e===46)break}case 82:{!(this.optionFlags&8)&&!o&&this.raise(v.UnexpectedImportExport,this.state.startLoc),this.next();let e;return e=n===83?this.parseImport(r):this.parseExport(r,t),this.assertModuleNodeAllowed(e),e}default:if(this.isAsyncFunction())return i||this.raise(v.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!i&&a)}let s=this.state.value,c=this.parseExpression();return L(n)&&c.type===`Identifier`&&this.eat(14)?this.parseLabeledStatement(r,s,c,e):this.parseExpressionStatement(r,c,t)}assertModuleNodeAllowed(e){!(this.optionFlags&8)&&!this.inModule&&this.raise(v.ImportOutsideModule,e)}decoratorsEnabledBeforeExport(){return this.hasPlugin(`decorators-legacy`)?!0:this.hasPlugin(`decorators`)&&this.getPluginOption(`decorators`,`decoratorsBeforeExport`)!==!1}maybeTakeDecorators(e,t,n){if(e){var r;(r=t.decorators)!=null&&r.length?(typeof this.getPluginOption(`decorators`,`decoratorsBeforeExport`)!=`boolean`&&this.raise(v.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),n&&this.resetStartLocationFromNode(n,t)}return t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){let t=[];do t.push(this.parseDecorator());while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(v.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(v.UnexpectedLeadingDecorator,this.state.startLoc);return t}parseDecorator(){this.expectOnePlugin([`decorators`,`decorators-legacy`]);let e=this.startNode();if(this.next(),this.hasPlugin(`decorators`)){let t=this.state.startLoc,n;if(this.match(10)){let t=this.state.startLoc;this.next(),n=this.parseExpression(),this.expect(11),n=this.wrapParenthesis(t,n);let r=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(n,t),this.getPluginOption(`decorators`,`allowCallParenthesized`)===!1&&e.expression!==n&&this.raise(v.DecoratorArgumentsOutsideParentheses,r)}else{for(n=this.parseIdentifier(!1);this.eat(16);){let e=this.startNodeAt(t);e.object=n,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),e.property=this.parsePrivateName()):e.property=this.parseIdentifier(!0),e.computed=!1,n=this.finishNode(e,`MemberExpression`)}e.expression=this.parseMaybeDecoratorArguments(n,t)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,`Decorator`)}parseMaybeDecoratorArguments(e,t){if(this.eat(10)){let n=this.startNodeAt(t);return n.callee=e,n.arguments=this.parseCallExpressionArguments(),this.toReferencedList(n.arguments),this.finishNode(n,`CallExpression`)}return e}parseBreakContinueStatement(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?`BreakStatement`:`ContinueStatement`)}verifyBreakContinue(e,t){let n;for(n=0;n<this.state.labels.length;++n){let r=this.state.labels[n];if((e.label==null||r.name===e.label.name)&&(r.kind!=null&&(t||r.kind===1)||e.label&&t))break}if(n===this.state.labels.length){let n=t?`BreakStatement`:`ContinueStatement`;this.raise(v.IllegalBreakContinue,e,{type:n})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,`DebuggerStatement`)}parseHeaderExpression(){this.expect(10);let e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(gn),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,`DoWhileStatement`)}parseForStatement(e){this.next(),this.state.labels.push(gn);let t=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(t=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return t!==null&&this.unexpected(t),this.parseFor(e,null);let n=this.isContextual(100);{let r=this.isAwaitUsing(),i=r||this.isForUsing(),a=n&&this.hasFollowingBindingAtom()||i;if(this.match(74)||this.match(75)||a){let n=this.startNode(),a;r?(a=`await using`,this.recordAwaitIfAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):a=this.state.value,this.next(),this.parseVar(n,!0,a);let o=this.finishNode(n,`VariableDeclaration`),s=this.match(58);return s&&i&&this.raise(v.ForInUsing,o),(s||this.isContextual(102))&&o.declarations.length===1?this.parseForIn(e,o,t):(t!==null&&this.unexpected(t),this.parseFor(e,o))}}let r=this.isContextual(95),i=new Ht,a=this.parseExpression(!0,i),o=this.isContextual(102);if(o&&(n&&this.raise(v.ForOfLet,a),t===null&&r&&a.type===`Identifier`&&this.raise(v.ForOfAsync,a)),o||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(a,!0);let n=o?`ForOfStatement`:`ForInStatement`;return this.checkLVal(a,{type:n}),this.parseForIn(e,a,t)}else this.checkExpressionErrors(i,!0);return t!==null&&this.unexpected(t),this.parseFor(e,a)}parseFunctionStatement(e,t,n){return this.next(),this.parseFunction(e,1|(n?2:0)|(t?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,`IfStatement`)}parseReturnStatement(e){return this.prodParam.hasReturn||this.raise(v.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,`ReturnStatement`)}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();let t=e.cases=[];this.expect(5),this.state.labels.push(_n),this.scope.enter(256);let n;for(let e;!this.match(8);)if(this.match(61)||this.match(65)){let r=this.match(61);n&&this.finishNode(n,`SwitchCase`),t.push(n=this.startNode()),n.consequent=[],this.next(),r?n.test=this.parseExpression():(e&&this.raise(v.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),e=!0,n.test=null),this.expect(14)}else n?n.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),n&&this.finishNode(n,`SwitchCase`),this.next(),this.state.labels.pop(),this.finishNode(e,`SwitchStatement`)}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(v.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,`ThrowStatement`)}parseCatchClauseParam(){let e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&e.type===`Identifier`?8:0),this.checkLVal(e,{type:`CatchClause`},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){let t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),e.handler=this.finishNode(t,`CatchClause`)}return e.finalizer=this.eat(67)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(v.NoCatchOrFinally,e),this.finishNode(e,`TryStatement`)}parseVarStatement(e,t,n=!1){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,`VariableDeclaration`)}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(gn),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(e,`WhileStatement`)}parseWithStatement(e){return this.state.strict&&this.raise(v.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(e,`WithStatement`)}parseEmptyStatement(e){return this.next(),this.finishNode(e,`EmptyStatement`)}parseLabeledStatement(e,t,n,r){for(let e of this.state.labels)e.name===t&&this.raise(v.LabelRedeclaration,n,{labelName:t});let i=le(this.state.type)?1:this.match(71)?2:null;for(let t=this.state.labels.length-1;t>=0;t--){let n=this.state.labels[t];if(n.statementStart===e.start)n.statementStart=this.sourceToOffsetPos(this.state.start),n.kind=i;else break}return this.state.labels.push({name:t,kind:i,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=r&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=n,this.finishNode(e,`LabeledStatement`)}parseExpressionStatement(e,t,n){return e.expression=t,this.semicolon(),this.finishNode(e,`ExpressionStatement`)}parseBlock(e=!1,t=!0,n){let r=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(r,e,!1,8,n),t&&this.scope.exit(),this.finishNode(r,`BlockStatement`)}isValidDirective(e){return e.type===`ExpressionStatement`&&e.expression.type===`StringLiteral`&&!e.expression.extra.parenthesized}parseBlockBody(e,t,n,r,i){let a=e.body=[],o=e.directives=[];this.parseBlockOrModuleBlockBody(a,t?o:void 0,n,r,i)}parseBlockOrModuleBlockBody(e,t,n,r,i){let a=this.state.strict,o=!1,s=!1;for(;!this.match(r);){let r=n?this.parseModuleItem():this.parseStatementListItem();if(t&&!s){if(this.isValidDirective(r)){let e=this.stmtToDirective(r);t.push(e),!o&&e.value.value===`use strict`&&(o=!0,this.setStrict(!0));continue}s=!0,this.state.strictErrors.clear()}e.push(r)}i?.call(this,o),a||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,`ForStatement`)}parseForIn(e,t,n){let r=this.match(58);return this.next(),r?n!==null&&this.unexpected(n):e.await=n!==null,t.type===`VariableDeclaration`&&t.declarations[0].init!=null&&(!r||!this.options.annexB||this.state.strict||t.kind!==`var`||t.declarations[0].id.type!==`Identifier`)&&this.raise(v.ForInOfLoopInitializer,t,{type:r?`ForInStatement`:`ForOfStatement`}),t.type===`AssignmentPattern`&&this.raise(v.InvalidLhs,t,{ancestor:{type:`ForStatement`}}),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,r?`ForInStatement`:`ForOfStatement`)}parseVar(e,t,n,r=!1){let i=e.declarations=[];for(e.kind=n;;){let e=this.startNode();if(this.parseVarId(e,n),e.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,e.init===null&&!r&&(e.id.type!==`Identifier`&&!(t&&(this.match(58)||this.isContextual(102)))?this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:`destructuring`}):(n===`const`||n===`using`||n===`await using`)&&!(this.match(58)||this.isContextual(102))&&this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:n})),i.push(this.finishNode(e,`VariableDeclarator`)),!this.eat(12))break}return e}parseVarId(e,t){let n=this.parseBindingAtom();t===`using`||t===`await using`?(n.type===`ArrayPattern`||n.type===`ObjectPattern`)&&this.raise(v.UsingDeclarationHasBindingPattern,n.loc.start):n.type===`VoidPattern`&&this.raise(v.UnexpectedVoidPattern,n.loc.start),this.checkLVal(n,{type:`VariableDeclarator`},t===`var`?5:8201),e.id=n}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){let n=t&2,r=!!(t&1),i=r&&!(t&4),a=!!(t&8);this.initFunction(e,a),this.match(55)&&(n&&this.raise(v.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),r&&(e.id=this.parseFunctionId(i));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter(dt(a,e.generator)),r||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(e,r?`FunctionDeclaration`:`FunctionExpression`)}),this.prodParam.exit(),this.scope.exit(),r&&!n&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=o,e}parseFunctionId(e){return e||L(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(10),this.expressionScope.enter(Lt()),e.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.loc.start)}parseClass(e,t,n){this.next();let r=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,n),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,r),this.finishNode(e,t?`ClassDeclaration`:`ClassExpression`)}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(e){return e.type===`Identifier`&&e.name===`constructor`||e.type===`StringLiteral`&&e.value===`constructor`}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,t){this.classScope.enter();let n={hadConstructor:!1,hadSuperClass:e},r=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(r.length>0)throw this.raise(v.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){r.push(this.parseDecorator());continue}let e=this.startNode();r.length&&(e.decorators=r,this.resetStartLocationFromNode(e,r[0]),r=[]),this.parseClassMember(i,e,n),e.kind===`constructor`&&e.decorators&&e.decorators.length>0&&this.raise(v.DecoratorConstructor,e)}}),this.state.strict=t,this.next(),r.length)throw this.raise(v.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(i,`ClassBody`)}parseClassMemberFromModifier(e,t){let n=this.parseIdentifier(!0);if(this.isClassMethod()){let r=t;return r.kind=`method`,r.computed=!1,r.key=n,r.static=!1,this.pushClassMethod(e,r,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let r=t;return r.computed=!1,r.key=n,r.static=!1,e.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(n),!1}parseClassMember(e,t,n){let r=this.isContextual(106);if(r){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(5)){this.parseClassStaticBlock(e,t);return}}this.parseClassMemberWithIsStatic(e,t,n,r)}parseClassMemberWithIsStatic(e,t,n,r){let i=t,a=t,o=t,s=t,c=t,l=i,u=i;if(t.static=r,this.parsePropertyNamePrefixOperator(t),this.eat(55)){l.kind=`method`;let t=this.match(139);if(this.parseClassElementName(l),this.parsePostMemberNameModifiers(l),t){this.pushClassPrivateMethod(e,a,!0,!1);return}this.isNonstaticConstructor(i)&&this.raise(v.ConstructorIsGenerator,i.key),this.pushClassMethod(e,i,!0,!1,!1,!1);return}let d=!this.state.containsEsc&&L(this.state.type),f=this.parseClassElementName(t),p=d?f.name:null,m=this.isPrivateName(f),h=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(l.kind=`method`,m){this.pushClassPrivateMethod(e,a,!1,!1);return}let r=this.isNonstaticConstructor(i),o=!1;r&&(i.kind=`constructor`,n.hadConstructor&&!this.hasPlugin(`typescript`)&&this.raise(v.DuplicateConstructor,f),r&&this.hasPlugin(`typescript`)&&t.override&&this.raise(v.OverrideOnConstructor,f),n.hadConstructor=!0,o=n.hadSuperClass),this.pushClassMethod(e,i,!1,!1,r,o)}else if(this.isClassProperty())m?this.pushClassPrivateProperty(e,s):this.pushClassProperty(e,o);else if(p===`async`&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(f);let t=this.eat(55);u.optional&&this.unexpected(h),l.kind=`method`;let n=this.match(139);this.parseClassElementName(l),this.parsePostMemberNameModifiers(u),n?this.pushClassPrivateMethod(e,a,t,!0):(this.isNonstaticConstructor(i)&&this.raise(v.ConstructorIsAsync,i.key),this.pushClassMethod(e,i,t,!0,!1,!1))}else if((p===`get`||p===`set`)&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(f),l.kind=p;let t=this.match(139);this.parseClassElementName(i),t?this.pushClassPrivateMethod(e,a,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(v.ConstructorIsAccessor,i.key),this.pushClassMethod(e,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}else if(p===`accessor`&&!this.isLineTerminator()){this.expectPlugin(`decoratorAutoAccessors`),this.resetPreviousNodeTrailingComments(f);let t=this.match(139);this.parseClassElementName(o),this.pushClassAccessorProperty(e,c,t)}else this.isLineTerminator()?m?this.pushClassPrivateProperty(e,s):this.pushClassProperty(e,o):this.unexpected()}parseClassElementName(e){let{type:t,value:n}=this.state;if((t===132||t===134)&&e.static&&n===`prototype`&&this.raise(v.StaticPrototype,this.state.startLoc),t===139){n===`constructor`&&this.raise(v.ConstructorClassPrivateField,this.state.startLoc);let t=this.parsePrivateName();return e.key=t,t}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,t){var n;this.scope.enter(720);let r=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let i=t.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=r,e.body.push(this.finishNode(t,`StaticBlock`)),(n=t.decorators)!=null&&n.length&&this.raise(v.DecoratorStaticBlock,t)}pushClassProperty(e,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(v.ConstructorClassField,t.key),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){let n=this.parseClassPrivateProperty(t);e.body.push(n),this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassAccessorProperty(e,t,n){!n&&!t.computed&&this.nameIsConstructor(t.key)&&this.raise(v.ConstructorClassField,t.key);let r=this.parseClassAccessorProperty(t);e.body.push(r),n&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassMethod(e,t,n,r,i,a){e.body.push(this.parseMethod(t,n,r,i,a,`ClassMethod`,!0))}pushClassPrivateMethod(e,t,n,r){let i=this.parseMethod(t,n,r,!1,!1,`ClassPrivateMethod`,!0);e.body.push(i);let a=i.kind===`get`?i.static?6:2:i.kind===`set`?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,a)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,`ClassPrivateProperty`)}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,`ClassProperty`)}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,`ClassAccessorProperty`)}parseInitializer(e){this.scope.enter(592),this.expressionScope.enter(Bt()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,n,r=8331){if(L(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,r);else if(n||!t)e.id=null;else throw this.raise(v.MissingClassName,this.state.startLoc)}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,t){let n=this.parseMaybeImportPhase(e,!0),r=this.maybeParseExportDefaultSpecifier(e,n),i=!r||this.eat(12),a=i&&this.eatExportStar(e),o=a&&this.maybeParseExportNamespaceSpecifier(e),s=i&&(!o||this.eat(12)),c=r||a;if(a&&!o){if(r&&this.unexpected(),t)throw this.raise(v.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.sawUnambiguousESM=!0,this.finishNode(e,`ExportAllDeclaration`)}let l=this.maybeParseExportNamedSpecifiers(e);r&&i&&!a&&!l&&this.unexpected(null,5),o&&s&&this.unexpected(null,98);let u;if(c||l){if(u=!1,t)throw this.raise(v.UnsupportedDecoratorExport,e);this.parseExportFrom(e,c)}else u=this.maybeParseExportDeclaration(e);if(c||l||u){let n=e;if(this.checkExport(n,!0,!1,!!n.source),n.declaration?.type===`ClassDeclaration`)this.maybeTakeDecorators(t,n.declaration,n);else if(t)throw this.raise(v.UnsupportedDecoratorExport,e);return this.sawUnambiguousESM=!0,this.finishNode(n,`ExportNamedDeclaration`)}if(this.eat(65)){let n=e,r=this.parseExportDefaultExpression();if(n.declaration=r,r.type===`ClassDeclaration`)this.maybeTakeDecorators(t,r,n);else if(t)throw this.raise(v.UnsupportedDecoratorExport,e);return this.checkExport(n,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(n,`ExportDefaultDeclaration`)}throw this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin(`exportDefaultFrom`,t?.loc.start);let n=t||this.parseIdentifier(!0),r=this.startNodeAtNode(n);return r.exported=n,e.specifiers=[this.finishNode(r,`ExportDefaultSpecifier`)],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){var t;(t=e).specifiers??(t.specifiers=[]);let n=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),n.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(n,`ExportNamespaceSpecifier`)),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){let t=e;t.specifiers||=[];let n=t.exportKind===`type`;return t.specifiers.push(...this.parseExportSpecifiers(n)),t.source=null,this.hasPlugin(`importAssertions`)?t.assertions=[]:t.attributes=[],t.declaration=null,!0}return!1}maybeParseExportDeclaration(e){return this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,this.hasPlugin(`importAssertions`)?e.assertions=[]:e.attributes=[],e.declaration=this.parseExportDeclaration(e),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,`function`)}parseExportDefaultExpression(){let e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin(`decorators`)&&this.getPluginOption(`decorators`,`decoratorsBeforeExport`)===!0&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(v.UnsupportedDefaultExport,this.state.startLoc);let t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(L(e)){if(e===95&&!this.state.containsEsc||e===100)return!1;if((e===130||e===129)&&!this.state.containsEsc){let e=this.nextTokenStart(),t=this.input.charCodeAt(e);if(t===123||this.chStartsBindingIdentifier(t,e)&&!this.input.startsWith(`from`,e))return this.expectOnePlugin([`flow`,`typescript`]),!1}}else if(!this.match(65))return!1;let t=this.nextTokenStart(),n=this.isUnparsedContextual(t,`from`);if(this.input.charCodeAt(t)===44||L(this.state.type)&&n)return!0;if(this.match(65)&&n){let e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return e===34||e===39}return!1}parseExportFrom(e,t){this.eatContextual(98)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return e===26&&(this.expectOnePlugin([`decorators`,`decorators-legacy`]),this.hasPlugin(`decorators`))?(this.getPluginOption(`decorators`,`decoratorsBeforeExport`)===!0&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),!0):this.isUsing()||this.isAwaitUsing()?(this.raise(v.UsingDeclarationExport,this.state.startLoc),!0):e===74||e===75||e===68||e===80||this.isLet()||this.isAsyncFunction()}checkExport(e,t,n,r){if(t){var i;if(n){if(this.checkDuplicateExports(e,`default`),this.hasPlugin(`exportDefaultFrom`)){var a;let t=e.declaration;t.type===`Identifier`&&t.name===`from`&&t.end-t.start===4&&!((a=t.extra)!=null&&a.parenthesized)&&this.raise(v.ExportDefaultFromAsIdentifier,t)}}else if((i=e.specifiers)!=null&&i.length)for(let t of e.specifiers){let{exported:e}=t,n=e.type===`Identifier`?e.name:e.value;if(this.checkDuplicateExports(t,n),!r&&t.local){let{local:e}=t;e.type===`Identifier`?(this.checkReservedWord(e.name,e.loc.start,!0,!1),this.scope.checkLocalExport(e)):this.raise(v.ExportBindingIsString,t,{localName:e.value,exportName:n})}}else if(e.declaration){let t=e.declaration;if(t.type===`FunctionDeclaration`||t.type===`ClassDeclaration`){let{id:n}=t;if(!n)throw Error(`Assertion failure`);this.checkDuplicateExports(e,n.name)}else if(t.type===`VariableDeclaration`)for(let e of t.declarations)this.checkDeclaration(e.id)}}}checkDeclaration(e){if(e.type===`Identifier`)this.checkDuplicateExports(e,e.name);else if(e.type===`ObjectPattern`)for(let t of e.properties)this.checkDeclaration(t);else if(e.type===`ArrayPattern`)for(let t of e.elements)t&&this.checkDeclaration(t);else e.type===`ObjectProperty`?this.checkDeclaration(e.value):e.type===`RestElement`?this.checkDeclaration(e.argument):e.type===`AssignmentPattern`&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&(t===`default`?this.raise(v.DuplicateDefaultExport,e):this.raise(v.DuplicateExport,e,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){let t=[],n=!0;for(this.expect(5);!this.eat(8);){if(n)n=!1;else if(this.expect(12),this.eat(8))break;let r=this.isContextual(130),i=this.match(134),a=this.startNode();a.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(a,i,e,r))}return t}parseExportSpecifier(e,t,n,r){return this.eatContextual(93)?e.exported=this.parseModuleExportName():t?e.exported=this.cloneStringLiteral(e.local):e.exported||=this.cloneIdentifier(e.local),this.finishNode(e,`ExportSpecifier`)}parseModuleExportName(){if(this.match(134)){let e=this.parseStringLiteral(this.state.value),t=vn.exec(e.value);return t&&this.raise(v.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return e.assertions==null?!1:e.assertions.some(({key:e,value:t})=>t.value===`json`&&(e.type===`Identifier`?e.name===`type`:e.value===`type`))}checkImportReflection(e){let{specifiers:t}=e,n=t.length===1?t[0].type:null;e.phase===`source`?n!==`ImportDefaultSpecifier`&&this.raise(v.SourcePhaseImportRequiresDefault,t[0].loc.start):e.phase===`defer`?n!==`ImportNamespaceSpecifier`&&this.raise(v.DeferImportRequiresNamespace,t[0].loc.start):e.module&&(n!==`ImportDefaultSpecifier`&&this.raise(v.ImportReflectionNotBinding,t[0].loc.start),e.assertions?.length>0&&this.raise(v.ImportReflectionHasAssertion,t[0].loc.start))}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&e.type!==`ExportAllDeclaration`){let{specifiers:t}=e;if(t!=null){let e=t.find(e=>{let t;if(e.type===`ExportSpecifier`?t=e.local:e.type===`ImportSpecifier`&&(t=e.imported),t!==void 0)return t.type===`Identifier`?t.name!==`default`:t.value!==`default`});e!==void 0&&this.raise(v.ImportJSONBindingNotDefault,e.loc.start)}}}isPotentialImportPhase(e){return e?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(e,t,n,r){t||(n===`module`?(this.expectPlugin(`importReflection`,r),e.module=!0):this.hasPlugin(`importReflection`)&&(e.module=!1),n===`source`?(this.expectPlugin(`sourcePhaseImports`,r),e.phase=`source`):n===`defer`?(this.expectPlugin(`deferredImportEvaluation`,r),e.phase=`defer`):this.hasPlugin(`sourcePhaseImports`)&&(e.phase=null))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;let n=this.startNode(),r=this.parseIdentifierName(!0),{type:i}=this.state;return(z(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.applyImportPhase(e,t,r,n.loc.start),null):(this.applyImportPhase(e,t,null),this.createIdentifier(n,r))}isPrecedingIdImportPhase(e){let{type:t}=this.state;return L(t)?t!==98||this.lookaheadCharCode()===102:t!==12}parseImport(e){return this.match(134)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];let n=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(12),r=n&&this.maybeParseStarImportSpecifier(e);return n&&!r&&this.parseNamedImportSpecifiers(e),this.expectContextual(98),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){return e.specifiers??=[],e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(e,`ImportDeclaration`)}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,t,n){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,n))}finishImportSpecifier(e,t,n=8201){return this.checkLVal(e.local,{type:t},n),this.finishNode(e,t)}parseImportAttributes(){this.expect(5);let e=[],t=new Set;do{if(this.match(8))break;let n=this.startNode(),r=this.state.value;if(t.has(r)&&this.raise(v.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),t.add(r),this.match(134)?n.key=this.parseStringLiteral(r):n.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(n,`ImportAttribute`))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){let e=[],t=new Set;do{let n=this.startNode();if(n.key=this.parseIdentifier(!0),n.key.name!==`type`&&this.raise(v.ModuleAttributeDifferentFromType,n.key),t.has(n.key.name)&&this.raise(v.ModuleAttributesWithDuplicateKeys,n.key,{key:n.key.name}),t.add(n.key.name),this.expect(14),!this.match(134))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(n,`ImportAttribute`))}while(this.eat(12));return e}maybeParseImportAttributes(e){let t;var n=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin(`moduleAttributes`)?(t=this.parseModuleAttributes(),this.addExtra(e,`deprecatedWithLegacySyntax`,!0)):t=this.parseImportAttributes(),n=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin(`deprecatedImportAssert`)&&!this.hasPlugin(`importAssertions`)&&this.raise(v.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin(`importAssertions`)||this.addExtra(e,`deprecatedAssertSyntax`,!0),this.next(),t=this.parseImportAttributes()):t=[];!n&&this.hasPlugin(`importAssertions`)?e.assertions=t:e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){let n=this.startNodeAtNode(t);return n.local=t,e.specifiers.push(this.finishImportSpecifier(n,`ImportDefaultSpecifier`)),!0}else if(z(this.state.type))return this.parseImportSpecifierLocal(e,this.startNode(),`ImportDefaultSpecifier`),!0;return!1}maybeParseStarImportSpecifier(e){if(this.match(55)){let t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,t,`ImportNamespaceSpecifier`),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(v.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let n=this.startNode(),r=this.match(134),i=this.isContextual(130);n.imported=this.parseModuleExportName();let a=this.parseImportSpecifier(n,r,e.importKind===`type`||e.importKind===`typeof`,i,void 0);e.specifiers.push(a)}}parseImportSpecifier(e,t,n,r,i){if(this.eatContextual(93))e.local=this.parseIdentifier();else{let{imported:n}=e;if(t)throw this.raise(v.ImportBindingIsString,e,{importName:n.value});this.checkReservedWord(n.name,e.loc.start,!0,!0),e.local||=this.cloneIdentifier(n)}return this.finishImportSpecifier(e,`ImportSpecifier`,i)}isThisParam(e){return e.type===`Identifier`&&e.name===`this`}},Sn=class extends xn{constructor(e,t,n){let r=b(e);super(r,t),this.options=r,this.initializeScopes(),this.plugins=n,this.filename=r.sourceFilename,this.startIndex=r.startIndex;let i=0;r.allowAwaitOutsideFunction&&(i|=1),r.allowReturnOutsideFunction&&(i|=2),r.allowImportExportEverywhere&&(i|=8),r.allowSuperOutsideMethod&&(i|=16),r.allowUndeclaredExports&&(i|=64),r.allowNewTargetOutsideFunction&&(i|=4),r.allowYieldOutsideFunction&&(i|=32),r.ranges&&(i|=128),r.tokens&&(i|=256),r.createImportExpressions&&(i|=512),r.createParenthesizedExpressions&&(i|=1024),r.errorRecovery&&(i|=2048),r.attachComment&&(i|=4096),r.annexB&&(i|=8192),this.optionFlags=i}getScopeHandler(){return Ve}parse(){this.enterInitialScopes();let e=this.startNode(),t=this.startNode();this.nextToken(),e.errors=null;let n=this.parseTopLevel(e,t);return n.errors=this.state.errors,n.comments.length=this.state.commentsLen,n}};function Cn(e,t){if(t?.sourceType===`unambiguous`){t=Object.assign({},t);try{t.sourceType=`module`;let n=Dn(t,e),r=n.parse();if(n.sawUnambiguousESM)return r;if(n.ambiguousScriptDifferentAst)try{return t.sourceType=`script`,Dn(t,e).parse()}catch{}else r.program.sourceType=`script`;return r}catch(n){try{return t.sourceType=`script`,Dn(t,e).parse()}catch{}throw n}}else return Dn(t,e).parse()}function wn(e,t){let n=Dn(t,e);return n.options.strictMode&&(n.state.strict=!0),n.getExpression()}function Tn(e){let t={};for(let n of Object.keys(e))t[n]=ye(e[n]);return t}let En=Tn(I);function Dn(e,t){let n=Sn,r=new Map;if(e!=null&&e.plugins){for(let t of e.plugins){let e,n;typeof t==`string`?e=t:[e,n]=t,r.has(e)||r.set(e,n||{})}fn(r),n=kn(r)}return new n(e,t,r)}let On=new Map;function kn(e){let t=[];for(let n of mn)e.has(n)&&t.push(n);let n=t.join(`|`),r=On.get(n);if(!r){r=Sn;for(let e of t)r=pn[e](r);On.set(n,r)}return r}e.parse=Cn,e.parseExpression=wn,e.tokTypes=En})),uv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Var=e.User=e.Statement=e.SpreadProperty=e.Scope=e.RestProperty=e.ReferencedMemberExpression=e.ReferencedIdentifier=e.Referenced=e.Pure=e.NumericLiteralTypeAnnotation=e.Generated=e.ForAwaitStatement=e.Flow=e.Expression=e.ExistentialTypeParam=e.BlockScoped=e.BindingIdentifier=void 0,e.ReferencedIdentifier=[`Identifier`,`JSXIdentifier`],e.ReferencedMemberExpression=[`MemberExpression`],e.BindingIdentifier=[`Identifier`],e.Statement=[`Statement`],e.Expression=[`Expression`],e.Scope=[`Scopable`,`Pattern`],e.Referenced=null,e.BlockScoped=[`FunctionDeclaration`,`ClassDeclaration`,`VariableDeclaration`],e.Var=[`VariableDeclaration`],e.User=null,e.Generated=null,e.Pure=null,e.Flow=[`Flow`,`ImportDeclaration`,`ExportDeclaration`,`ImportSpecifier`],e.RestProperty=[`RestElement`],e.SpreadProperty=[`RestElement`],e.ExistentialTypeParam=[`ExistsTypeAnnotation`],e.NumericLiteralTypeAnnotation=[`NumberLiteralTypeAnnotation`],e.ForAwaitStatement=[`ForOfStatement`]})),dv=V(((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return c(e);if(n===`number`&&isFinite(e))return t.long?u(e):l(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function c(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function u(e){var t=Math.abs(e);return t>=a?d(e,t,a,`day`):t>=i?d(e,t,i,`hour`):t>=r?d(e,t,r,`minute`):t>=n?d(e,t,n,`second`):e+` ms`}function d(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}})),fv=V(((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=c,n.disable=o,n.enable=i,n.enabled=s,n.humanize=dv(),n.destroy=l,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]}n.selectColor=t;function n(e){let t,i=null,a,o;function s(...e){if(!s.enabled)return;let r=s,i=Number(new Date);r.diff=i-(t||i),r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,`enabled`,{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(t===void 0?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t=(typeof e==`string`?e:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?n.skips.push(e.slice(1)):n.names.push(e)}function a(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]===`*`))t[r]===`*`?(i=r,a=n,r++):(n++,r++);else if(i!==-1)r=i+1,a++,n=a;else return!1;for(;r<t.length&&t[r]===`*`;)r++;return r===t.length}function o(){let e=[...n.names,...n.skips.map(e=>`-`+e)].join(`,`);return n.enable(``),e}function s(e){for(let t of n.skips)if(a(e,t))return!1;for(let t of n.names)if(a(e,t))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n})),pv=V(((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function i(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function a(){let t;try{t=e.storage.getItem(`debug`)||e.storage.getItem(`DEBUG`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t=process.env.DEBUG),t}function o(){try{return localStorage}catch{}}t.exports=fv()(e);let{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}})),mv=V(((e,t)=>{t.exports=(e,t=process.argv)=>{let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}})),hv=V(((e,t)=>{let n=Me(`os`),r=Me(`tty`),i=mv(),{env:a}=process,o;i(`no-color`)||i(`no-colors`)||i(`color=false`)||i(`color=never`)?o=0:(i(`color`)||i(`colors`)||i(`color=true`)||i(`color=always`))&&(o=1),`FORCE_COLOR`in a&&(o=a.FORCE_COLOR===`true`?1:a.FORCE_COLOR===`false`?0:a.FORCE_COLOR.length===0?1:Math.min(parseInt(a.FORCE_COLOR,10),3));function s(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function c(e,t){if(o===0)return 0;if(i(`color=16m`)||i(`color=full`)||i(`color=truecolor`))return 3;if(i(`color=256`))return 2;if(e&&!t&&o===void 0)return 0;let r=o||0;if(a.TERM===`dumb`)return r;if(process.platform===`win32`){let e=n.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in a)return[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`,`GITHUB_ACTIONS`,`BUILDKITE`].some(e=>e in a)||a.CI_NAME===`codeship`?1:r;if(`TEAMCITY_VERSION`in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if(a.COLORTERM===`truecolor`)return 3;if(`TERM_PROGRAM`in a){let e=parseInt((a.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(a.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||`COLORTERM`in a?1:r}function l(e){return s(c(e,e&&e.isTTY))}t.exports={supportsColor:l,stdout:s(c(!0,r.isatty(1))),stderr:s(c(!0,r.isatty(2)))}})),gv=V(((e,t)=>{let n=Me(`tty`),r=Me(`util`);e.init=u,e.log=s,e.formatArgs=a,e.save=c,e.load=l,e.useColors=i,e.destroy=r.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{let t=hv();t&&(t.stderr||t).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=/^(yes|on|true|enabled)$/i.test(r)?!0:/^(no|off|false|disabled)$/i.test(r)?!1:r===`null`?null:Number(r),e[n]=r,e},{});function i(){return`colors`in e.inspectOpts?!!e.inspectOpts.colors:n.isatty(process.stderr.fd)}function a(e){let{namespace:n,useColors:r}=this;if(r){let r=this.color,i=`\x1B[3`+(r<8?r:`8;5;`+r),a=` ${i};1m${n} \u001B[0m`;e[0]=a+e[0].split(`
|
|
103
|
-
`).join(`
|
|
104
|
-
|
|
105
|
-
`)
|
|
106
|
-
|
|
107
|
-
`)}}})),bv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isAccessor=Mi,e.isAnyTypeAnnotation=Ye,e.isArgumentPlaceholder=wn,e.isArrayExpression=r,e.isArrayPattern=me,e.isArrayTypeAnnotation=Xe,e.isArrowFunctionExpression=he,e.isAssignmentExpression=i,e.isAssignmentPattern=pe,e.isAwaitExpression=Le,e.isBigIntLiteral=ze,e.isBinary=$r,e.isBinaryExpression=a,e.isBindExpression=Tn,e.isBlock=ni,e.isBlockParent=ti,e.isBlockStatement=l,e.isBooleanLiteral=A,e.isBooleanLiteralTypeAnnotation=Qe,e.isBooleanTypeAnnotation=Ze,e.isBreakStatement=u,e.isCallExpression=d,e.isCatchClause=f,e.isClass=Oi,e.isClassAccessorProperty=We,e.isClassBody=ge,e.isClassDeclaration=ve,e.isClassExpression=_e,e.isClassImplements=et,e.isClassMethod=ke,e.isClassPrivateMethod=Ge,e.isClassPrivateProperty=H,e.isClassProperty=Ue,e.isCompletionStatement=ai,e.isConditional=oi,e.isConditionalExpression=p,e.isContinueStatement=m,e.isDebuggerStatement=h,e.isDecimalLiteral=jn,e.isDeclaration=hi,e.isDeclareClass=tt,e.isDeclareExportAllDeclaration=ut,e.isDeclareExportDeclaration=lt,e.isDeclareFunction=nt,e.isDeclareInterface=rt,e.isDeclareModule=it,e.isDeclareModuleExports=at,e.isDeclareOpaqueType=st,e.isDeclareTypeAlias=ot,e.isDeclareVariable=ct,e.isDeclaredPredicate=dt,e.isDecorator=En,e.isDirective=s,e.isDirectiveLiteral=c,e.isDoExpression=Dn,e.isDoWhileStatement=g,e.isEmptyStatement=_,e.isEmptyTypeAnnotation=St,e.isEnumBody=zi,e.isEnumBooleanBody=Xt,e.isEnumBooleanMember=$t,e.isEnumDeclaration=Yt,e.isEnumDefaultedMember=nn,e.isEnumMember=Bi,e.isEnumNumberBody=U,e.isEnumNumberMember=en,e.isEnumStringBody=Zt,e.isEnumStringMember=tn,e.isEnumSymbolBody=Qt,e.isExistsTypeAnnotation=ft,e.isExportAllDeclaration=ye,e.isExportDeclaration=Ai,e.isExportDefaultDeclaration=be,e.isExportDefaultSpecifier=On,e.isExportNamedDeclaration=xe,e.isExportNamespaceSpecifier=Be,e.isExportSpecifier=Se,e.isExpression=Qr,e.isExpressionStatement=v,e.isExpressionWrapper=li,e.isFile=y,e.isFlow=Pi,e.isFlowBaseAnnotation=Ii,e.isFlowDeclaration=Li,e.isFlowPredicate=Ri,e.isFlowType=Fi,e.isFor=ui,e.isForInStatement=b,e.isForOfStatement=Ce,e.isForStatement=x,e.isForXStatement=di,e.isFunction=fi,e.isFunctionDeclaration=S,e.isFunctionExpression=C,e.isFunctionParameter=gi,e.isFunctionParent=pi,e.isFunctionTypeAnnotation=pt,e.isFunctionTypeParam=mt,e.isGenericTypeAnnotation=ht,e.isIdentifier=w,e.isIfStatement=T,e.isImmutable=xi,e.isImport=Re,e.isImportAttribute=Je,e.isImportDeclaration=we,e.isImportDefaultSpecifier=Te,e.isImportExpression=Oe,e.isImportNamespaceSpecifier=Ee,e.isImportOrExportDeclaration=ki,e.isImportSpecifier=De,e.isIndexedAccessType=rn,e.isInferredPredicate=gt,e.isInterfaceDeclaration=vt,e.isInterfaceExtends=_t,e.isInterfaceTypeAnnotation=yt,e.isInterpreterDirective=o,e.isIntersectionTypeAnnotation=bt,e.isJSX=Vi,e.isJSXAttribute=on,e.isJSXClosingElement=sn,e.isJSXClosingFragment=bn,e.isJSXElement=cn,e.isJSXEmptyExpression=ln,e.isJSXExpressionContainer=un,e.isJSXFragment=vn,e.isJSXIdentifier=fn,e.isJSXMemberExpression=pn,e.isJSXNamespacedName=mn,e.isJSXOpeningElement=hn,e.isJSXOpeningFragment=yn,e.isJSXSpreadAttribute=gn,e.isJSXSpreadChild=dn,e.isJSXText=_n,e.isLVal=vi,e.isLabeledStatement=E,e.isLiteral=bi,e.isLogicalExpression=j,e.isLoop=si,e.isMemberExpression=te,e.isMetaProperty=V,e.isMethod=Ci,e.isMiscellaneous=Hi,e.isMixedTypeAnnotation=xt,e.isModuleDeclaration=Zi,e.isModuleExpression=Mn,e.isModuleSpecifier=ji,e.isNewExpression=ne,e.isNoop=xn,e.isNullLiteral=k,e.isNullLiteralTypeAnnotation=$e,e.isNullableTypeAnnotation=Ct,e.isNumberLiteral=qi,e.isNumberLiteralTypeAnnotation=wt,e.isNumberTypeAnnotation=Tt,e.isNumericLiteral=O,e.isObjectExpression=N,e.isObjectMember=wi,e.isObjectMethod=re,e.isObjectPattern=Ae,e.isObjectProperty=P,e.isObjectTypeAnnotation=Et,e.isObjectTypeCallProperty=Ot,e.isObjectTypeIndexer=kt,e.isObjectTypeInternalSlot=Dt,e.isObjectTypeProperty=At,e.isObjectTypeSpreadProperty=jt,e.isOpaqueType=Mt,e.isOptionalCallExpression=He,e.isOptionalIndexedAccessType=an,e.isOptionalMemberExpression=Ve,e.isParenthesizedExpression=R,e.isPattern=Di,e.isPatternLike=_i,e.isPipelineBareFunction=Fn,e.isPipelinePrimaryTopicReference=In,e.isPipelineTopicExpression=Pn,e.isPlaceholder=Sn,e.isPrivate=Ni,e.isPrivateName=Ke,e.isProgram=M,e.isProperty=Ti,e.isPureish=mi,e.isQualifiedTypeIdentifier=Nt,e.isRecordExpression=kn,e.isRegExpLiteral=ee,e.isRegexLiteral=Ji,e.isRestElement=F,e.isRestProperty=Yi,e.isReturnStatement=I,e.isScopable=ei,e.isSequenceExpression=L,e.isSpreadElement=je,e.isSpreadProperty=Xi,e.isStandardized=Zr,e.isStatement=ri,e.isStaticBlock=qe,e.isStringLiteral=D,e.isStringLiteralTypeAnnotation=Pt,e.isStringTypeAnnotation=Ft,e.isSuper=Me,e.isSwitchCase=z,e.isSwitchStatement=ie,e.isSymbolTypeAnnotation=It,e.isTSAnyKeyword=qn,e.isTSArrayType=pr,e.isTSAsExpression=Nr,e.isTSBaseType=Ki,e.isTSBigIntKeyword=Yn,e.isTSBooleanKeyword=Jn,e.isTSCallSignatureDeclaration=Hn,e.isTSConditionalType=br,e.isTSConstructSignatureDeclaration=Un,e.isTSConstructorType=cr,e.isTSDeclareFunction=zn,e.isTSDeclareMethod=Bn,e.isTSEntityName=yi,e.isTSEnumBody=Ir,e.isTSEnumDeclaration=Lr,e.isTSEnumMember=Rr,e.isTSExportAssignment=Gr,e.isTSExpressionWithTypeArguments=Or,e.isTSExternalModuleReference=Ur,e.isTSFunctionType=sr,e.isTSImportEqualsDeclaration=Hr,e.isTSImportType=Vr,e.isTSIndexSignature=Kn,e.isTSIndexedAccessType=wr,e.isTSInferType=xr,e.isTSInstantiationExpression=Mr,e.isTSInterfaceBody=Ar,e.isTSInterfaceDeclaration=kr,e.isTSIntersectionType=yr,e.isTSIntrinsicKeyword=Xn,e.isTSLiteralType=Dr,e.isTSMappedType=Tr,e.isTSMethodSignature=Gn,e.isTSModuleBlock=Br,e.isTSModuleDeclaration=zr,e.isTSNamedTupleMember=_r,e.isTSNamespaceExportDeclaration=Kr,e.isTSNeverKeyword=Zn,e.isTSNonNullExpression=Wr,e.isTSNullKeyword=Qn,e.isTSNumberKeyword=$n,e.isTSObjectKeyword=er,e.isTSOptionalType=hr,e.isTSParameterProperty=Rn,e.isTSParenthesizedType=Sr,e.isTSPropertySignature=Wn,e.isTSQualifiedName=Vn,e.isTSRestType=gr,e.isTSSatisfiesExpression=Pr,e.isTSStringKeyword=tr,e.isTSSymbolKeyword=nr,e.isTSTemplateLiteralType=Er,e.isTSThisType=or,e.isTSTupleType=mr,e.isTSType=Gi,e.isTSTypeAliasDeclaration=jr,e.isTSTypeAnnotation=qr,e.isTSTypeAssertion=Fr,e.isTSTypeElement=Wi,e.isTSTypeLiteral=fr,e.isTSTypeOperator=Cr,e.isTSTypeParameter=Xr,e.isTSTypeParameterDeclaration=Yr,e.isTSTypeParameterInstantiation=Jr,e.isTSTypePredicate=ur,e.isTSTypeQuery=dr,e.isTSTypeReference=lr,e.isTSUndefinedKeyword=rr,e.isTSUnionType=vr,e.isTSUnknownKeyword=ir,e.isTSVoidKeyword=ar,e.isTaggedTemplateExpression=Ne,e.isTemplateElement=Pe,e.isTemplateLiteral=Fe,e.isTerminatorless=ii,e.isThisExpression=ae,e.isThisTypeAnnotation=Lt,e.isThrowStatement=oe,e.isTopicReference=Nn,e.isTryStatement=se,e.isTupleExpression=An,e.isTupleTypeAnnotation=Rt,e.isTypeAlias=Bt,e.isTypeAnnotation=Vt,e.isTypeCastExpression=Ht,e.isTypeParameter=Ut,e.isTypeParameterDeclaration=Wt,e.isTypeParameterInstantiation=Gt,e.isTypeScript=Ui,e.isTypeofTypeAnnotation=zt,e.isUnaryExpression=ce,e.isUnaryLike=Ei,e.isUnionTypeAnnotation=Kt,e.isUpdateExpression=le,e.isUserWhitespacable=Si,e.isV8IntrinsicIdentifier=Cn,e.isVariableDeclaration=ue,e.isVariableDeclarator=B,e.isVariance=qt,e.isVoidPattern=Ln,e.isVoidTypeAnnotation=Jt,e.isWhile=ci,e.isWhileStatement=de,e.isWithStatement=fe,e.isYieldExpression=Ie;var t=vv(),n=yv();function r(e,n){return!e||e.type!==`ArrayExpression`?!1:n==null||(0,t.default)(e,n)}function i(e,n){return!e||e.type!==`AssignmentExpression`?!1:n==null||(0,t.default)(e,n)}function a(e,n){return!e||e.type!==`BinaryExpression`?!1:n==null||(0,t.default)(e,n)}function o(e,n){return!e||e.type!==`InterpreterDirective`?!1:n==null||(0,t.default)(e,n)}function s(e,n){return!e||e.type!==`Directive`?!1:n==null||(0,t.default)(e,n)}function c(e,n){return!e||e.type!==`DirectiveLiteral`?!1:n==null||(0,t.default)(e,n)}function l(e,n){return!e||e.type!==`BlockStatement`?!1:n==null||(0,t.default)(e,n)}function u(e,n){return!e||e.type!==`BreakStatement`?!1:n==null||(0,t.default)(e,n)}function d(e,n){return!e||e.type!==`CallExpression`?!1:n==null||(0,t.default)(e,n)}function f(e,n){return!e||e.type!==`CatchClause`?!1:n==null||(0,t.default)(e,n)}function p(e,n){return!e||e.type!==`ConditionalExpression`?!1:n==null||(0,t.default)(e,n)}function m(e,n){return!e||e.type!==`ContinueStatement`?!1:n==null||(0,t.default)(e,n)}function h(e,n){return!e||e.type!==`DebuggerStatement`?!1:n==null||(0,t.default)(e,n)}function g(e,n){return!e||e.type!==`DoWhileStatement`?!1:n==null||(0,t.default)(e,n)}function _(e,n){return!e||e.type!==`EmptyStatement`?!1:n==null||(0,t.default)(e,n)}function v(e,n){return!e||e.type!==`ExpressionStatement`?!1:n==null||(0,t.default)(e,n)}function y(e,n){return!e||e.type!==`File`?!1:n==null||(0,t.default)(e,n)}function b(e,n){return!e||e.type!==`ForInStatement`?!1:n==null||(0,t.default)(e,n)}function x(e,n){return!e||e.type!==`ForStatement`?!1:n==null||(0,t.default)(e,n)}function S(e,n){return!e||e.type!==`FunctionDeclaration`?!1:n==null||(0,t.default)(e,n)}function C(e,n){return!e||e.type!==`FunctionExpression`?!1:n==null||(0,t.default)(e,n)}function w(e,n){return!e||e.type!==`Identifier`?!1:n==null||(0,t.default)(e,n)}function T(e,n){return!e||e.type!==`IfStatement`?!1:n==null||(0,t.default)(e,n)}function E(e,n){return!e||e.type!==`LabeledStatement`?!1:n==null||(0,t.default)(e,n)}function D(e,n){return!e||e.type!==`StringLiteral`?!1:n==null||(0,t.default)(e,n)}function O(e,n){return!e||e.type!==`NumericLiteral`?!1:n==null||(0,t.default)(e,n)}function k(e,n){return!e||e.type!==`NullLiteral`?!1:n==null||(0,t.default)(e,n)}function A(e,n){return!e||e.type!==`BooleanLiteral`?!1:n==null||(0,t.default)(e,n)}function ee(e,n){return!e||e.type!==`RegExpLiteral`?!1:n==null||(0,t.default)(e,n)}function j(e,n){return!e||e.type!==`LogicalExpression`?!1:n==null||(0,t.default)(e,n)}function te(e,n){return!e||e.type!==`MemberExpression`?!1:n==null||(0,t.default)(e,n)}function ne(e,n){return!e||e.type!==`NewExpression`?!1:n==null||(0,t.default)(e,n)}function M(e,n){return!e||e.type!==`Program`?!1:n==null||(0,t.default)(e,n)}function N(e,n){return!e||e.type!==`ObjectExpression`?!1:n==null||(0,t.default)(e,n)}function re(e,n){return!e||e.type!==`ObjectMethod`?!1:n==null||(0,t.default)(e,n)}function P(e,n){return!e||e.type!==`ObjectProperty`?!1:n==null||(0,t.default)(e,n)}function F(e,n){return!e||e.type!==`RestElement`?!1:n==null||(0,t.default)(e,n)}function I(e,n){return!e||e.type!==`ReturnStatement`?!1:n==null||(0,t.default)(e,n)}function L(e,n){return!e||e.type!==`SequenceExpression`?!1:n==null||(0,t.default)(e,n)}function R(e,n){return!e||e.type!==`ParenthesizedExpression`?!1:n==null||(0,t.default)(e,n)}function z(e,n){return!e||e.type!==`SwitchCase`?!1:n==null||(0,t.default)(e,n)}function ie(e,n){return!e||e.type!==`SwitchStatement`?!1:n==null||(0,t.default)(e,n)}function ae(e,n){return!e||e.type!==`ThisExpression`?!1:n==null||(0,t.default)(e,n)}function oe(e,n){return!e||e.type!==`ThrowStatement`?!1:n==null||(0,t.default)(e,n)}function se(e,n){return!e||e.type!==`TryStatement`?!1:n==null||(0,t.default)(e,n)}function ce(e,n){return!e||e.type!==`UnaryExpression`?!1:n==null||(0,t.default)(e,n)}function le(e,n){return!e||e.type!==`UpdateExpression`?!1:n==null||(0,t.default)(e,n)}function ue(e,n){return!e||e.type!==`VariableDeclaration`?!1:n==null||(0,t.default)(e,n)}function B(e,n){return!e||e.type!==`VariableDeclarator`?!1:n==null||(0,t.default)(e,n)}function de(e,n){return!e||e.type!==`WhileStatement`?!1:n==null||(0,t.default)(e,n)}function fe(e,n){return!e||e.type!==`WithStatement`?!1:n==null||(0,t.default)(e,n)}function pe(e,n){return!e||e.type!==`AssignmentPattern`?!1:n==null||(0,t.default)(e,n)}function me(e,n){return!e||e.type!==`ArrayPattern`?!1:n==null||(0,t.default)(e,n)}function he(e,n){return!e||e.type!==`ArrowFunctionExpression`?!1:n==null||(0,t.default)(e,n)}function ge(e,n){return!e||e.type!==`ClassBody`?!1:n==null||(0,t.default)(e,n)}function _e(e,n){return!e||e.type!==`ClassExpression`?!1:n==null||(0,t.default)(e,n)}function ve(e,n){return!e||e.type!==`ClassDeclaration`?!1:n==null||(0,t.default)(e,n)}function ye(e,n){return!e||e.type!==`ExportAllDeclaration`?!1:n==null||(0,t.default)(e,n)}function be(e,n){return!e||e.type!==`ExportDefaultDeclaration`?!1:n==null||(0,t.default)(e,n)}function xe(e,n){return!e||e.type!==`ExportNamedDeclaration`?!1:n==null||(0,t.default)(e,n)}function Se(e,n){return!e||e.type!==`ExportSpecifier`?!1:n==null||(0,t.default)(e,n)}function Ce(e,n){return!e||e.type!==`ForOfStatement`?!1:n==null||(0,t.default)(e,n)}function we(e,n){return!e||e.type!==`ImportDeclaration`?!1:n==null||(0,t.default)(e,n)}function Te(e,n){return!e||e.type!==`ImportDefaultSpecifier`?!1:n==null||(0,t.default)(e,n)}function Ee(e,n){return!e||e.type!==`ImportNamespaceSpecifier`?!1:n==null||(0,t.default)(e,n)}function De(e,n){return!e||e.type!==`ImportSpecifier`?!1:n==null||(0,t.default)(e,n)}function Oe(e,n){return!e||e.type!==`ImportExpression`?!1:n==null||(0,t.default)(e,n)}function V(e,n){return!e||e.type!==`MetaProperty`?!1:n==null||(0,t.default)(e,n)}function ke(e,n){return!e||e.type!==`ClassMethod`?!1:n==null||(0,t.default)(e,n)}function Ae(e,n){return!e||e.type!==`ObjectPattern`?!1:n==null||(0,t.default)(e,n)}function je(e,n){return!e||e.type!==`SpreadElement`?!1:n==null||(0,t.default)(e,n)}function Me(e,n){return!e||e.type!==`Super`?!1:n==null||(0,t.default)(e,n)}function Ne(e,n){return!e||e.type!==`TaggedTemplateExpression`?!1:n==null||(0,t.default)(e,n)}function Pe(e,n){return!e||e.type!==`TemplateElement`?!1:n==null||(0,t.default)(e,n)}function Fe(e,n){return!e||e.type!==`TemplateLiteral`?!1:n==null||(0,t.default)(e,n)}function Ie(e,n){return!e||e.type!==`YieldExpression`?!1:n==null||(0,t.default)(e,n)}function Le(e,n){return!e||e.type!==`AwaitExpression`?!1:n==null||(0,t.default)(e,n)}function Re(e,n){return!e||e.type!==`Import`?!1:n==null||(0,t.default)(e,n)}function ze(e,n){return!e||e.type!==`BigIntLiteral`?!1:n==null||(0,t.default)(e,n)}function Be(e,n){return!e||e.type!==`ExportNamespaceSpecifier`?!1:n==null||(0,t.default)(e,n)}function Ve(e,n){return!e||e.type!==`OptionalMemberExpression`?!1:n==null||(0,t.default)(e,n)}function He(e,n){return!e||e.type!==`OptionalCallExpression`?!1:n==null||(0,t.default)(e,n)}function Ue(e,n){return!e||e.type!==`ClassProperty`?!1:n==null||(0,t.default)(e,n)}function We(e,n){return!e||e.type!==`ClassAccessorProperty`?!1:n==null||(0,t.default)(e,n)}function H(e,n){return!e||e.type!==`ClassPrivateProperty`?!1:n==null||(0,t.default)(e,n)}function Ge(e,n){return!e||e.type!==`ClassPrivateMethod`?!1:n==null||(0,t.default)(e,n)}function Ke(e,n){return!e||e.type!==`PrivateName`?!1:n==null||(0,t.default)(e,n)}function qe(e,n){return!e||e.type!==`StaticBlock`?!1:n==null||(0,t.default)(e,n)}function Je(e,n){return!e||e.type!==`ImportAttribute`?!1:n==null||(0,t.default)(e,n)}function Ye(e,n){return!e||e.type!==`AnyTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function Xe(e,n){return!e||e.type!==`ArrayTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function Ze(e,n){return!e||e.type!==`BooleanTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function Qe(e,n){return!e||e.type!==`BooleanLiteralTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function $e(e,n){return!e||e.type!==`NullLiteralTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function et(e,n){return!e||e.type!==`ClassImplements`?!1:n==null||(0,t.default)(e,n)}function tt(e,n){return!e||e.type!==`DeclareClass`?!1:n==null||(0,t.default)(e,n)}function nt(e,n){return!e||e.type!==`DeclareFunction`?!1:n==null||(0,t.default)(e,n)}function rt(e,n){return!e||e.type!==`DeclareInterface`?!1:n==null||(0,t.default)(e,n)}function it(e,n){return!e||e.type!==`DeclareModule`?!1:n==null||(0,t.default)(e,n)}function at(e,n){return!e||e.type!==`DeclareModuleExports`?!1:n==null||(0,t.default)(e,n)}function ot(e,n){return!e||e.type!==`DeclareTypeAlias`?!1:n==null||(0,t.default)(e,n)}function st(e,n){return!e||e.type!==`DeclareOpaqueType`?!1:n==null||(0,t.default)(e,n)}function ct(e,n){return!e||e.type!==`DeclareVariable`?!1:n==null||(0,t.default)(e,n)}function lt(e,n){return!e||e.type!==`DeclareExportDeclaration`?!1:n==null||(0,t.default)(e,n)}function ut(e,n){return!e||e.type!==`DeclareExportAllDeclaration`?!1:n==null||(0,t.default)(e,n)}function dt(e,n){return!e||e.type!==`DeclaredPredicate`?!1:n==null||(0,t.default)(e,n)}function ft(e,n){return!e||e.type!==`ExistsTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function pt(e,n){return!e||e.type!==`FunctionTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function mt(e,n){return!e||e.type!==`FunctionTypeParam`?!1:n==null||(0,t.default)(e,n)}function ht(e,n){return!e||e.type!==`GenericTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function gt(e,n){return!e||e.type!==`InferredPredicate`?!1:n==null||(0,t.default)(e,n)}function _t(e,n){return!e||e.type!==`InterfaceExtends`?!1:n==null||(0,t.default)(e,n)}function vt(e,n){return!e||e.type!==`InterfaceDeclaration`?!1:n==null||(0,t.default)(e,n)}function yt(e,n){return!e||e.type!==`InterfaceTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function bt(e,n){return!e||e.type!==`IntersectionTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function xt(e,n){return!e||e.type!==`MixedTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function St(e,n){return!e||e.type!==`EmptyTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function Ct(e,n){return!e||e.type!==`NullableTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function wt(e,n){return!e||e.type!==`NumberLiteralTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function Tt(e,n){return!e||e.type!==`NumberTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function Et(e,n){return!e||e.type!==`ObjectTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function Dt(e,n){return!e||e.type!==`ObjectTypeInternalSlot`?!1:n==null||(0,t.default)(e,n)}function Ot(e,n){return!e||e.type!==`ObjectTypeCallProperty`?!1:n==null||(0,t.default)(e,n)}function kt(e,n){return!e||e.type!==`ObjectTypeIndexer`?!1:n==null||(0,t.default)(e,n)}function At(e,n){return!e||e.type!==`ObjectTypeProperty`?!1:n==null||(0,t.default)(e,n)}function jt(e,n){return!e||e.type!==`ObjectTypeSpreadProperty`?!1:n==null||(0,t.default)(e,n)}function Mt(e,n){return!e||e.type!==`OpaqueType`?!1:n==null||(0,t.default)(e,n)}function Nt(e,n){return!e||e.type!==`QualifiedTypeIdentifier`?!1:n==null||(0,t.default)(e,n)}function Pt(e,n){return!e||e.type!==`StringLiteralTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function Ft(e,n){return!e||e.type!==`StringTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function It(e,n){return!e||e.type!==`SymbolTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function Lt(e,n){return!e||e.type!==`ThisTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function Rt(e,n){return!e||e.type!==`TupleTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function zt(e,n){return!e||e.type!==`TypeofTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function Bt(e,n){return!e||e.type!==`TypeAlias`?!1:n==null||(0,t.default)(e,n)}function Vt(e,n){return!e||e.type!==`TypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function Ht(e,n){return!e||e.type!==`TypeCastExpression`?!1:n==null||(0,t.default)(e,n)}function Ut(e,n){return!e||e.type!==`TypeParameter`?!1:n==null||(0,t.default)(e,n)}function Wt(e,n){return!e||e.type!==`TypeParameterDeclaration`?!1:n==null||(0,t.default)(e,n)}function Gt(e,n){return!e||e.type!==`TypeParameterInstantiation`?!1:n==null||(0,t.default)(e,n)}function Kt(e,n){return!e||e.type!==`UnionTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function qt(e,n){return!e||e.type!==`Variance`?!1:n==null||(0,t.default)(e,n)}function Jt(e,n){return!e||e.type!==`VoidTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function Yt(e,n){return!e||e.type!==`EnumDeclaration`?!1:n==null||(0,t.default)(e,n)}function Xt(e,n){return!e||e.type!==`EnumBooleanBody`?!1:n==null||(0,t.default)(e,n)}function U(e,n){return!e||e.type!==`EnumNumberBody`?!1:n==null||(0,t.default)(e,n)}function Zt(e,n){return!e||e.type!==`EnumStringBody`?!1:n==null||(0,t.default)(e,n)}function Qt(e,n){return!e||e.type!==`EnumSymbolBody`?!1:n==null||(0,t.default)(e,n)}function $t(e,n){return!e||e.type!==`EnumBooleanMember`?!1:n==null||(0,t.default)(e,n)}function en(e,n){return!e||e.type!==`EnumNumberMember`?!1:n==null||(0,t.default)(e,n)}function tn(e,n){return!e||e.type!==`EnumStringMember`?!1:n==null||(0,t.default)(e,n)}function nn(e,n){return!e||e.type!==`EnumDefaultedMember`?!1:n==null||(0,t.default)(e,n)}function rn(e,n){return!e||e.type!==`IndexedAccessType`?!1:n==null||(0,t.default)(e,n)}function an(e,n){return!e||e.type!==`OptionalIndexedAccessType`?!1:n==null||(0,t.default)(e,n)}function on(e,n){return!e||e.type!==`JSXAttribute`?!1:n==null||(0,t.default)(e,n)}function sn(e,n){return!e||e.type!==`JSXClosingElement`?!1:n==null||(0,t.default)(e,n)}function cn(e,n){return!e||e.type!==`JSXElement`?!1:n==null||(0,t.default)(e,n)}function ln(e,n){return!e||e.type!==`JSXEmptyExpression`?!1:n==null||(0,t.default)(e,n)}function un(e,n){return!e||e.type!==`JSXExpressionContainer`?!1:n==null||(0,t.default)(e,n)}function dn(e,n){return!e||e.type!==`JSXSpreadChild`?!1:n==null||(0,t.default)(e,n)}function fn(e,n){return!e||e.type!==`JSXIdentifier`?!1:n==null||(0,t.default)(e,n)}function pn(e,n){return!e||e.type!==`JSXMemberExpression`?!1:n==null||(0,t.default)(e,n)}function mn(e,n){return!e||e.type!==`JSXNamespacedName`?!1:n==null||(0,t.default)(e,n)}function hn(e,n){return!e||e.type!==`JSXOpeningElement`?!1:n==null||(0,t.default)(e,n)}function gn(e,n){return!e||e.type!==`JSXSpreadAttribute`?!1:n==null||(0,t.default)(e,n)}function _n(e,n){return!e||e.type!==`JSXText`?!1:n==null||(0,t.default)(e,n)}function vn(e,n){return!e||e.type!==`JSXFragment`?!1:n==null||(0,t.default)(e,n)}function yn(e,n){return!e||e.type!==`JSXOpeningFragment`?!1:n==null||(0,t.default)(e,n)}function bn(e,n){return!e||e.type!==`JSXClosingFragment`?!1:n==null||(0,t.default)(e,n)}function xn(e,n){return!e||e.type!==`Noop`?!1:n==null||(0,t.default)(e,n)}function Sn(e,n){return!e||e.type!==`Placeholder`?!1:n==null||(0,t.default)(e,n)}function Cn(e,n){return!e||e.type!==`V8IntrinsicIdentifier`?!1:n==null||(0,t.default)(e,n)}function wn(e,n){return!e||e.type!==`ArgumentPlaceholder`?!1:n==null||(0,t.default)(e,n)}function Tn(e,n){return!e||e.type!==`BindExpression`?!1:n==null||(0,t.default)(e,n)}function En(e,n){return!e||e.type!==`Decorator`?!1:n==null||(0,t.default)(e,n)}function Dn(e,n){return!e||e.type!==`DoExpression`?!1:n==null||(0,t.default)(e,n)}function On(e,n){return!e||e.type!==`ExportDefaultSpecifier`?!1:n==null||(0,t.default)(e,n)}function kn(e,n){return!e||e.type!==`RecordExpression`?!1:n==null||(0,t.default)(e,n)}function An(e,n){return!e||e.type!==`TupleExpression`?!1:n==null||(0,t.default)(e,n)}function jn(e,n){return!e||e.type!==`DecimalLiteral`?!1:n==null||(0,t.default)(e,n)}function Mn(e,n){return!e||e.type!==`ModuleExpression`?!1:n==null||(0,t.default)(e,n)}function Nn(e,n){return!e||e.type!==`TopicReference`?!1:n==null||(0,t.default)(e,n)}function Pn(e,n){return!e||e.type!==`PipelineTopicExpression`?!1:n==null||(0,t.default)(e,n)}function Fn(e,n){return!e||e.type!==`PipelineBareFunction`?!1:n==null||(0,t.default)(e,n)}function In(e,n){return!e||e.type!==`PipelinePrimaryTopicReference`?!1:n==null||(0,t.default)(e,n)}function Ln(e,n){return!e||e.type!==`VoidPattern`?!1:n==null||(0,t.default)(e,n)}function Rn(e,n){return!e||e.type!==`TSParameterProperty`?!1:n==null||(0,t.default)(e,n)}function zn(e,n){return!e||e.type!==`TSDeclareFunction`?!1:n==null||(0,t.default)(e,n)}function Bn(e,n){return!e||e.type!==`TSDeclareMethod`?!1:n==null||(0,t.default)(e,n)}function Vn(e,n){return!e||e.type!==`TSQualifiedName`?!1:n==null||(0,t.default)(e,n)}function Hn(e,n){return!e||e.type!==`TSCallSignatureDeclaration`?!1:n==null||(0,t.default)(e,n)}function Un(e,n){return!e||e.type!==`TSConstructSignatureDeclaration`?!1:n==null||(0,t.default)(e,n)}function Wn(e,n){return!e||e.type!==`TSPropertySignature`?!1:n==null||(0,t.default)(e,n)}function Gn(e,n){return!e||e.type!==`TSMethodSignature`?!1:n==null||(0,t.default)(e,n)}function Kn(e,n){return!e||e.type!==`TSIndexSignature`?!1:n==null||(0,t.default)(e,n)}function qn(e,n){return!e||e.type!==`TSAnyKeyword`?!1:n==null||(0,t.default)(e,n)}function Jn(e,n){return!e||e.type!==`TSBooleanKeyword`?!1:n==null||(0,t.default)(e,n)}function Yn(e,n){return!e||e.type!==`TSBigIntKeyword`?!1:n==null||(0,t.default)(e,n)}function Xn(e,n){return!e||e.type!==`TSIntrinsicKeyword`?!1:n==null||(0,t.default)(e,n)}function Zn(e,n){return!e||e.type!==`TSNeverKeyword`?!1:n==null||(0,t.default)(e,n)}function Qn(e,n){return!e||e.type!==`TSNullKeyword`?!1:n==null||(0,t.default)(e,n)}function $n(e,n){return!e||e.type!==`TSNumberKeyword`?!1:n==null||(0,t.default)(e,n)}function er(e,n){return!e||e.type!==`TSObjectKeyword`?!1:n==null||(0,t.default)(e,n)}function tr(e,n){return!e||e.type!==`TSStringKeyword`?!1:n==null||(0,t.default)(e,n)}function nr(e,n){return!e||e.type!==`TSSymbolKeyword`?!1:n==null||(0,t.default)(e,n)}function rr(e,n){return!e||e.type!==`TSUndefinedKeyword`?!1:n==null||(0,t.default)(e,n)}function ir(e,n){return!e||e.type!==`TSUnknownKeyword`?!1:n==null||(0,t.default)(e,n)}function ar(e,n){return!e||e.type!==`TSVoidKeyword`?!1:n==null||(0,t.default)(e,n)}function or(e,n){return!e||e.type!==`TSThisType`?!1:n==null||(0,t.default)(e,n)}function sr(e,n){return!e||e.type!==`TSFunctionType`?!1:n==null||(0,t.default)(e,n)}function cr(e,n){return!e||e.type!==`TSConstructorType`?!1:n==null||(0,t.default)(e,n)}function lr(e,n){return!e||e.type!==`TSTypeReference`?!1:n==null||(0,t.default)(e,n)}function ur(e,n){return!e||e.type!==`TSTypePredicate`?!1:n==null||(0,t.default)(e,n)}function dr(e,n){return!e||e.type!==`TSTypeQuery`?!1:n==null||(0,t.default)(e,n)}function fr(e,n){return!e||e.type!==`TSTypeLiteral`?!1:n==null||(0,t.default)(e,n)}function pr(e,n){return!e||e.type!==`TSArrayType`?!1:n==null||(0,t.default)(e,n)}function mr(e,n){return!e||e.type!==`TSTupleType`?!1:n==null||(0,t.default)(e,n)}function hr(e,n){return!e||e.type!==`TSOptionalType`?!1:n==null||(0,t.default)(e,n)}function gr(e,n){return!e||e.type!==`TSRestType`?!1:n==null||(0,t.default)(e,n)}function _r(e,n){return!e||e.type!==`TSNamedTupleMember`?!1:n==null||(0,t.default)(e,n)}function vr(e,n){return!e||e.type!==`TSUnionType`?!1:n==null||(0,t.default)(e,n)}function yr(e,n){return!e||e.type!==`TSIntersectionType`?!1:n==null||(0,t.default)(e,n)}function br(e,n){return!e||e.type!==`TSConditionalType`?!1:n==null||(0,t.default)(e,n)}function xr(e,n){return!e||e.type!==`TSInferType`?!1:n==null||(0,t.default)(e,n)}function Sr(e,n){return!e||e.type!==`TSParenthesizedType`?!1:n==null||(0,t.default)(e,n)}function Cr(e,n){return!e||e.type!==`TSTypeOperator`?!1:n==null||(0,t.default)(e,n)}function wr(e,n){return!e||e.type!==`TSIndexedAccessType`?!1:n==null||(0,t.default)(e,n)}function Tr(e,n){return!e||e.type!==`TSMappedType`?!1:n==null||(0,t.default)(e,n)}function Er(e,n){return!e||e.type!==`TSTemplateLiteralType`?!1:n==null||(0,t.default)(e,n)}function Dr(e,n){return!e||e.type!==`TSLiteralType`?!1:n==null||(0,t.default)(e,n)}function Or(e,n){return!e||e.type!==`TSExpressionWithTypeArguments`?!1:n==null||(0,t.default)(e,n)}function kr(e,n){return!e||e.type!==`TSInterfaceDeclaration`?!1:n==null||(0,t.default)(e,n)}function Ar(e,n){return!e||e.type!==`TSInterfaceBody`?!1:n==null||(0,t.default)(e,n)}function jr(e,n){return!e||e.type!==`TSTypeAliasDeclaration`?!1:n==null||(0,t.default)(e,n)}function Mr(e,n){return!e||e.type!==`TSInstantiationExpression`?!1:n==null||(0,t.default)(e,n)}function Nr(e,n){return!e||e.type!==`TSAsExpression`?!1:n==null||(0,t.default)(e,n)}function Pr(e,n){return!e||e.type!==`TSSatisfiesExpression`?!1:n==null||(0,t.default)(e,n)}function Fr(e,n){return!e||e.type!==`TSTypeAssertion`?!1:n==null||(0,t.default)(e,n)}function Ir(e,n){return!e||e.type!==`TSEnumBody`?!1:n==null||(0,t.default)(e,n)}function Lr(e,n){return!e||e.type!==`TSEnumDeclaration`?!1:n==null||(0,t.default)(e,n)}function Rr(e,n){return!e||e.type!==`TSEnumMember`?!1:n==null||(0,t.default)(e,n)}function zr(e,n){return!e||e.type!==`TSModuleDeclaration`?!1:n==null||(0,t.default)(e,n)}function Br(e,n){return!e||e.type!==`TSModuleBlock`?!1:n==null||(0,t.default)(e,n)}function Vr(e,n){return!e||e.type!==`TSImportType`?!1:n==null||(0,t.default)(e,n)}function Hr(e,n){return!e||e.type!==`TSImportEqualsDeclaration`?!1:n==null||(0,t.default)(e,n)}function Ur(e,n){return!e||e.type!==`TSExternalModuleReference`?!1:n==null||(0,t.default)(e,n)}function Wr(e,n){return!e||e.type!==`TSNonNullExpression`?!1:n==null||(0,t.default)(e,n)}function Gr(e,n){return!e||e.type!==`TSExportAssignment`?!1:n==null||(0,t.default)(e,n)}function Kr(e,n){return!e||e.type!==`TSNamespaceExportDeclaration`?!1:n==null||(0,t.default)(e,n)}function qr(e,n){return!e||e.type!==`TSTypeAnnotation`?!1:n==null||(0,t.default)(e,n)}function Jr(e,n){return!e||e.type!==`TSTypeParameterInstantiation`?!1:n==null||(0,t.default)(e,n)}function Yr(e,n){return!e||e.type!==`TSTypeParameterDeclaration`?!1:n==null||(0,t.default)(e,n)}function Xr(e,n){return!e||e.type!==`TSTypeParameter`?!1:n==null||(0,t.default)(e,n)}function Zr(e,n){if(!e)return!1;switch(e.type){case`ArrayExpression`:case`AssignmentExpression`:case`BinaryExpression`:case`InterpreterDirective`:case`Directive`:case`DirectiveLiteral`:case`BlockStatement`:case`BreakStatement`:case`CallExpression`:case`CatchClause`:case`ConditionalExpression`:case`ContinueStatement`:case`DebuggerStatement`:case`DoWhileStatement`:case`EmptyStatement`:case`ExpressionStatement`:case`File`:case`ForInStatement`:case`ForStatement`:case`FunctionDeclaration`:case`FunctionExpression`:case`Identifier`:case`IfStatement`:case`LabeledStatement`:case`StringLiteral`:case`NumericLiteral`:case`NullLiteral`:case`BooleanLiteral`:case`RegExpLiteral`:case`LogicalExpression`:case`MemberExpression`:case`NewExpression`:case`Program`:case`ObjectExpression`:case`ObjectMethod`:case`ObjectProperty`:case`RestElement`:case`ReturnStatement`:case`SequenceExpression`:case`ParenthesizedExpression`:case`SwitchCase`:case`SwitchStatement`:case`ThisExpression`:case`ThrowStatement`:case`TryStatement`:case`UnaryExpression`:case`UpdateExpression`:case`VariableDeclaration`:case`VariableDeclarator`:case`WhileStatement`:case`WithStatement`:case`AssignmentPattern`:case`ArrayPattern`:case`ArrowFunctionExpression`:case`ClassBody`:case`ClassExpression`:case`ClassDeclaration`:case`ExportAllDeclaration`:case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:case`ExportSpecifier`:case`ForOfStatement`:case`ImportDeclaration`:case`ImportDefaultSpecifier`:case`ImportNamespaceSpecifier`:case`ImportSpecifier`:case`ImportExpression`:case`MetaProperty`:case`ClassMethod`:case`ObjectPattern`:case`SpreadElement`:case`Super`:case`TaggedTemplateExpression`:case`TemplateElement`:case`TemplateLiteral`:case`YieldExpression`:case`AwaitExpression`:case`Import`:case`BigIntLiteral`:case`ExportNamespaceSpecifier`:case`OptionalMemberExpression`:case`OptionalCallExpression`:case`ClassProperty`:case`ClassAccessorProperty`:case`ClassPrivateProperty`:case`ClassPrivateMethod`:case`PrivateName`:case`StaticBlock`:case`ImportAttribute`:break;case`Placeholder`:switch(e.expectedNode){case`Identifier`:case`StringLiteral`:case`BlockStatement`:case`ClassBody`:break;default:return!1}break;default:return!1}return n==null||(0,t.default)(e,n)}function Qr(e,n){if(!e)return!1;switch(e.type){case`ArrayExpression`:case`AssignmentExpression`:case`BinaryExpression`:case`CallExpression`:case`ConditionalExpression`:case`FunctionExpression`:case`Identifier`:case`StringLiteral`:case`NumericLiteral`:case`NullLiteral`:case`BooleanLiteral`:case`RegExpLiteral`:case`LogicalExpression`:case`MemberExpression`:case`NewExpression`:case`ObjectExpression`:case`SequenceExpression`:case`ParenthesizedExpression`:case`ThisExpression`:case`UnaryExpression`:case`UpdateExpression`:case`ArrowFunctionExpression`:case`ClassExpression`:case`ImportExpression`:case`MetaProperty`:case`Super`:case`TaggedTemplateExpression`:case`TemplateLiteral`:case`YieldExpression`:case`AwaitExpression`:case`Import`:case`BigIntLiteral`:case`OptionalMemberExpression`:case`OptionalCallExpression`:case`TypeCastExpression`:case`JSXElement`:case`JSXFragment`:case`BindExpression`:case`DoExpression`:case`RecordExpression`:case`TupleExpression`:case`DecimalLiteral`:case`ModuleExpression`:case`TopicReference`:case`PipelineTopicExpression`:case`PipelineBareFunction`:case`PipelinePrimaryTopicReference`:case`TSInstantiationExpression`:case`TSAsExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:case`TSNonNullExpression`:break;case`Placeholder`:switch(e.expectedNode){case`Expression`:case`Identifier`:case`StringLiteral`:break;default:return!1}break;default:return!1}return n==null||(0,t.default)(e,n)}function $r(e,n){if(!e)return!1;switch(e.type){case`BinaryExpression`:case`LogicalExpression`:break;default:return!1}return n==null||(0,t.default)(e,n)}function ei(e,n){if(!e)return!1;switch(e.type){case`BlockStatement`:case`CatchClause`:case`DoWhileStatement`:case`ForInStatement`:case`ForStatement`:case`FunctionDeclaration`:case`FunctionExpression`:case`Program`:case`ObjectMethod`:case`SwitchStatement`:case`WhileStatement`:case`ArrowFunctionExpression`:case`ClassExpression`:case`ClassDeclaration`:case`ForOfStatement`:case`ClassMethod`:case`ClassPrivateMethod`:case`StaticBlock`:case`TSModuleBlock`:break;case`Placeholder`:if(e.expectedNode===`BlockStatement`)break;default:return!1}return n==null||(0,t.default)(e,n)}function ti(e,n){if(!e)return!1;switch(e.type){case`BlockStatement`:case`CatchClause`:case`DoWhileStatement`:case`ForInStatement`:case`ForStatement`:case`FunctionDeclaration`:case`FunctionExpression`:case`Program`:case`ObjectMethod`:case`SwitchStatement`:case`WhileStatement`:case`ArrowFunctionExpression`:case`ForOfStatement`:case`ClassMethod`:case`ClassPrivateMethod`:case`StaticBlock`:case`TSModuleBlock`:break;case`Placeholder`:if(e.expectedNode===`BlockStatement`)break;default:return!1}return n==null||(0,t.default)(e,n)}function ni(e,n){if(!e)return!1;switch(e.type){case`BlockStatement`:case`Program`:case`TSModuleBlock`:break;case`Placeholder`:if(e.expectedNode===`BlockStatement`)break;default:return!1}return n==null||(0,t.default)(e,n)}function ri(e,n){if(!e)return!1;switch(e.type){case`BlockStatement`:case`BreakStatement`:case`ContinueStatement`:case`DebuggerStatement`:case`DoWhileStatement`:case`EmptyStatement`:case`ExpressionStatement`:case`ForInStatement`:case`ForStatement`:case`FunctionDeclaration`:case`IfStatement`:case`LabeledStatement`:case`ReturnStatement`:case`SwitchStatement`:case`ThrowStatement`:case`TryStatement`:case`VariableDeclaration`:case`WhileStatement`:case`WithStatement`:case`ClassDeclaration`:case`ExportAllDeclaration`:case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:case`ForOfStatement`:case`ImportDeclaration`:case`DeclareClass`:case`DeclareFunction`:case`DeclareInterface`:case`DeclareModule`:case`DeclareModuleExports`:case`DeclareTypeAlias`:case`DeclareOpaqueType`:case`DeclareVariable`:case`DeclareExportDeclaration`:case`DeclareExportAllDeclaration`:case`InterfaceDeclaration`:case`OpaqueType`:case`TypeAlias`:case`EnumDeclaration`:case`TSDeclareFunction`:case`TSInterfaceDeclaration`:case`TSTypeAliasDeclaration`:case`TSEnumDeclaration`:case`TSModuleDeclaration`:case`TSImportEqualsDeclaration`:case`TSExportAssignment`:case`TSNamespaceExportDeclaration`:break;case`Placeholder`:switch(e.expectedNode){case`Statement`:case`Declaration`:case`BlockStatement`:break;default:return!1}break;default:return!1}return n==null||(0,t.default)(e,n)}function ii(e,n){if(!e)return!1;switch(e.type){case`BreakStatement`:case`ContinueStatement`:case`ReturnStatement`:case`ThrowStatement`:case`YieldExpression`:case`AwaitExpression`:break;default:return!1}return n==null||(0,t.default)(e,n)}function ai(e,n){if(!e)return!1;switch(e.type){case`BreakStatement`:case`ContinueStatement`:case`ReturnStatement`:case`ThrowStatement`:break;default:return!1}return n==null||(0,t.default)(e,n)}function oi(e,n){if(!e)return!1;switch(e.type){case`ConditionalExpression`:case`IfStatement`:break;default:return!1}return n==null||(0,t.default)(e,n)}function si(e,n){if(!e)return!1;switch(e.type){case`DoWhileStatement`:case`ForInStatement`:case`ForStatement`:case`WhileStatement`:case`ForOfStatement`:break;default:return!1}return n==null||(0,t.default)(e,n)}function ci(e,n){if(!e)return!1;switch(e.type){case`DoWhileStatement`:case`WhileStatement`:break;default:return!1}return n==null||(0,t.default)(e,n)}function li(e,n){if(!e)return!1;switch(e.type){case`ExpressionStatement`:case`ParenthesizedExpression`:case`TypeCastExpression`:break;default:return!1}return n==null||(0,t.default)(e,n)}function ui(e,n){if(!e)return!1;switch(e.type){case`ForInStatement`:case`ForStatement`:case`ForOfStatement`:break;default:return!1}return n==null||(0,t.default)(e,n)}function di(e,n){if(!e)return!1;switch(e.type){case`ForInStatement`:case`ForOfStatement`:break;default:return!1}return n==null||(0,t.default)(e,n)}function fi(e,n){if(!e)return!1;switch(e.type){case`FunctionDeclaration`:case`FunctionExpression`:case`ObjectMethod`:case`ArrowFunctionExpression`:case`ClassMethod`:case`ClassPrivateMethod`:break;default:return!1}return n==null||(0,t.default)(e,n)}function pi(e,n){if(!e)return!1;switch(e.type){case`FunctionDeclaration`:case`FunctionExpression`:case`ObjectMethod`:case`ArrowFunctionExpression`:case`ClassMethod`:case`ClassPrivateMethod`:case`StaticBlock`:case`TSModuleBlock`:break;default:return!1}return n==null||(0,t.default)(e,n)}function mi(e,n){if(!e)return!1;switch(e.type){case`FunctionDeclaration`:case`FunctionExpression`:case`StringLiteral`:case`NumericLiteral`:case`NullLiteral`:case`BooleanLiteral`:case`RegExpLiteral`:case`ArrowFunctionExpression`:case`BigIntLiteral`:case`DecimalLiteral`:break;case`Placeholder`:if(e.expectedNode===`StringLiteral`)break;default:return!1}return n==null||(0,t.default)(e,n)}function hi(e,n){if(!e)return!1;switch(e.type){case`FunctionDeclaration`:case`VariableDeclaration`:case`ClassDeclaration`:case`ExportAllDeclaration`:case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:case`ImportDeclaration`:case`DeclareClass`:case`DeclareFunction`:case`DeclareInterface`:case`DeclareModule`:case`DeclareModuleExports`:case`DeclareTypeAlias`:case`DeclareOpaqueType`:case`DeclareVariable`:case`DeclareExportDeclaration`:case`DeclareExportAllDeclaration`:case`InterfaceDeclaration`:case`OpaqueType`:case`TypeAlias`:case`EnumDeclaration`:case`TSDeclareFunction`:case`TSInterfaceDeclaration`:case`TSTypeAliasDeclaration`:case`TSEnumDeclaration`:case`TSModuleDeclaration`:case`TSImportEqualsDeclaration`:break;case`Placeholder`:if(e.expectedNode===`Declaration`)break;default:return!1}return n==null||(0,t.default)(e,n)}function gi(e,n){if(!e)return!1;switch(e.type){case`Identifier`:case`RestElement`:case`AssignmentPattern`:case`ArrayPattern`:case`ObjectPattern`:case`VoidPattern`:break;case`Placeholder`:if(e.expectedNode===`Identifier`)break;default:return!1}return n==null||(0,t.default)(e,n)}function _i(e,n){if(!e)return!1;switch(e.type){case`Identifier`:case`MemberExpression`:case`RestElement`:case`AssignmentPattern`:case`ArrayPattern`:case`ObjectPattern`:case`VoidPattern`:case`TSAsExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:case`TSNonNullExpression`:break;case`Placeholder`:switch(e.expectedNode){case`Pattern`:case`Identifier`:break;default:return!1}break;default:return!1}return n==null||(0,t.default)(e,n)}function vi(e,n){if(!e)return!1;switch(e.type){case`Identifier`:case`MemberExpression`:case`RestElement`:case`AssignmentPattern`:case`ArrayPattern`:case`ObjectPattern`:case`TSParameterProperty`:case`TSAsExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:case`TSNonNullExpression`:break;case`Placeholder`:switch(e.expectedNode){case`Pattern`:case`Identifier`:break;default:return!1}break;default:return!1}return n==null||(0,t.default)(e,n)}function yi(e,n){if(!e)return!1;switch(e.type){case`Identifier`:case`TSQualifiedName`:break;case`Placeholder`:if(e.expectedNode===`Identifier`)break;default:return!1}return n==null||(0,t.default)(e,n)}function bi(e,n){if(!e)return!1;switch(e.type){case`StringLiteral`:case`NumericLiteral`:case`NullLiteral`:case`BooleanLiteral`:case`RegExpLiteral`:case`TemplateLiteral`:case`BigIntLiteral`:case`DecimalLiteral`:break;case`Placeholder`:if(e.expectedNode===`StringLiteral`)break;default:return!1}return n==null||(0,t.default)(e,n)}function xi(e,n){if(!e)return!1;switch(e.type){case`StringLiteral`:case`NumericLiteral`:case`NullLiteral`:case`BooleanLiteral`:case`BigIntLiteral`:case`JSXAttribute`:case`JSXClosingElement`:case`JSXElement`:case`JSXExpressionContainer`:case`JSXSpreadChild`:case`JSXOpeningElement`:case`JSXText`:case`JSXFragment`:case`JSXOpeningFragment`:case`JSXClosingFragment`:case`DecimalLiteral`:break;case`Placeholder`:if(e.expectedNode===`StringLiteral`)break;default:return!1}return n==null||(0,t.default)(e,n)}function Si(e,n){if(!e)return!1;switch(e.type){case`ObjectMethod`:case`ObjectProperty`:case`ObjectTypeInternalSlot`:case`ObjectTypeCallProperty`:case`ObjectTypeIndexer`:case`ObjectTypeProperty`:case`ObjectTypeSpreadProperty`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Ci(e,n){if(!e)return!1;switch(e.type){case`ObjectMethod`:case`ClassMethod`:case`ClassPrivateMethod`:break;default:return!1}return n==null||(0,t.default)(e,n)}function wi(e,n){if(!e)return!1;switch(e.type){case`ObjectMethod`:case`ObjectProperty`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Ti(e,n){if(!e)return!1;switch(e.type){case`ObjectProperty`:case`ClassProperty`:case`ClassAccessorProperty`:case`ClassPrivateProperty`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Ei(e,n){if(!e)return!1;switch(e.type){case`UnaryExpression`:case`SpreadElement`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Di(e,n){if(!e)return!1;switch(e.type){case`AssignmentPattern`:case`ArrayPattern`:case`ObjectPattern`:case`VoidPattern`:break;case`Placeholder`:if(e.expectedNode===`Pattern`)break;default:return!1}return n==null||(0,t.default)(e,n)}function Oi(e,n){if(!e)return!1;switch(e.type){case`ClassExpression`:case`ClassDeclaration`:break;default:return!1}return n==null||(0,t.default)(e,n)}function ki(e,n){if(!e)return!1;switch(e.type){case`ExportAllDeclaration`:case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:case`ImportDeclaration`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Ai(e,n){if(!e)return!1;switch(e.type){case`ExportAllDeclaration`:case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:break;default:return!1}return n==null||(0,t.default)(e,n)}function ji(e,n){if(!e)return!1;switch(e.type){case`ExportSpecifier`:case`ImportDefaultSpecifier`:case`ImportNamespaceSpecifier`:case`ImportSpecifier`:case`ExportNamespaceSpecifier`:case`ExportDefaultSpecifier`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Mi(e,n){if(!e)return!1;switch(e.type){case`ClassAccessorProperty`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Ni(e,n){if(!e)return!1;switch(e.type){case`ClassPrivateProperty`:case`ClassPrivateMethod`:case`PrivateName`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Pi(e,n){if(!e)return!1;switch(e.type){case`AnyTypeAnnotation`:case`ArrayTypeAnnotation`:case`BooleanTypeAnnotation`:case`BooleanLiteralTypeAnnotation`:case`NullLiteralTypeAnnotation`:case`ClassImplements`:case`DeclareClass`:case`DeclareFunction`:case`DeclareInterface`:case`DeclareModule`:case`DeclareModuleExports`:case`DeclareTypeAlias`:case`DeclareOpaqueType`:case`DeclareVariable`:case`DeclareExportDeclaration`:case`DeclareExportAllDeclaration`:case`DeclaredPredicate`:case`ExistsTypeAnnotation`:case`FunctionTypeAnnotation`:case`FunctionTypeParam`:case`GenericTypeAnnotation`:case`InferredPredicate`:case`InterfaceExtends`:case`InterfaceDeclaration`:case`InterfaceTypeAnnotation`:case`IntersectionTypeAnnotation`:case`MixedTypeAnnotation`:case`EmptyTypeAnnotation`:case`NullableTypeAnnotation`:case`NumberLiteralTypeAnnotation`:case`NumberTypeAnnotation`:case`ObjectTypeAnnotation`:case`ObjectTypeInternalSlot`:case`ObjectTypeCallProperty`:case`ObjectTypeIndexer`:case`ObjectTypeProperty`:case`ObjectTypeSpreadProperty`:case`OpaqueType`:case`QualifiedTypeIdentifier`:case`StringLiteralTypeAnnotation`:case`StringTypeAnnotation`:case`SymbolTypeAnnotation`:case`ThisTypeAnnotation`:case`TupleTypeAnnotation`:case`TypeofTypeAnnotation`:case`TypeAlias`:case`TypeAnnotation`:case`TypeCastExpression`:case`TypeParameter`:case`TypeParameterDeclaration`:case`TypeParameterInstantiation`:case`UnionTypeAnnotation`:case`Variance`:case`VoidTypeAnnotation`:case`EnumDeclaration`:case`EnumBooleanBody`:case`EnumNumberBody`:case`EnumStringBody`:case`EnumSymbolBody`:case`EnumBooleanMember`:case`EnumNumberMember`:case`EnumStringMember`:case`EnumDefaultedMember`:case`IndexedAccessType`:case`OptionalIndexedAccessType`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Fi(e,n){if(!e)return!1;switch(e.type){case`AnyTypeAnnotation`:case`ArrayTypeAnnotation`:case`BooleanTypeAnnotation`:case`BooleanLiteralTypeAnnotation`:case`NullLiteralTypeAnnotation`:case`ExistsTypeAnnotation`:case`FunctionTypeAnnotation`:case`GenericTypeAnnotation`:case`InterfaceTypeAnnotation`:case`IntersectionTypeAnnotation`:case`MixedTypeAnnotation`:case`EmptyTypeAnnotation`:case`NullableTypeAnnotation`:case`NumberLiteralTypeAnnotation`:case`NumberTypeAnnotation`:case`ObjectTypeAnnotation`:case`StringLiteralTypeAnnotation`:case`StringTypeAnnotation`:case`SymbolTypeAnnotation`:case`ThisTypeAnnotation`:case`TupleTypeAnnotation`:case`TypeofTypeAnnotation`:case`UnionTypeAnnotation`:case`VoidTypeAnnotation`:case`IndexedAccessType`:case`OptionalIndexedAccessType`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Ii(e,n){if(!e)return!1;switch(e.type){case`AnyTypeAnnotation`:case`BooleanTypeAnnotation`:case`NullLiteralTypeAnnotation`:case`MixedTypeAnnotation`:case`EmptyTypeAnnotation`:case`NumberTypeAnnotation`:case`StringTypeAnnotation`:case`SymbolTypeAnnotation`:case`ThisTypeAnnotation`:case`VoidTypeAnnotation`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Li(e,n){if(!e)return!1;switch(e.type){case`DeclareClass`:case`DeclareFunction`:case`DeclareInterface`:case`DeclareModule`:case`DeclareModuleExports`:case`DeclareTypeAlias`:case`DeclareOpaqueType`:case`DeclareVariable`:case`DeclareExportDeclaration`:case`DeclareExportAllDeclaration`:case`InterfaceDeclaration`:case`OpaqueType`:case`TypeAlias`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Ri(e,n){if(!e)return!1;switch(e.type){case`DeclaredPredicate`:case`InferredPredicate`:break;default:return!1}return n==null||(0,t.default)(e,n)}function zi(e,n){if(!e)return!1;switch(e.type){case`EnumBooleanBody`:case`EnumNumberBody`:case`EnumStringBody`:case`EnumSymbolBody`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Bi(e,n){if(!e)return!1;switch(e.type){case`EnumBooleanMember`:case`EnumNumberMember`:case`EnumStringMember`:case`EnumDefaultedMember`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Vi(e,n){if(!e)return!1;switch(e.type){case`JSXAttribute`:case`JSXClosingElement`:case`JSXElement`:case`JSXEmptyExpression`:case`JSXExpressionContainer`:case`JSXSpreadChild`:case`JSXIdentifier`:case`JSXMemberExpression`:case`JSXNamespacedName`:case`JSXOpeningElement`:case`JSXSpreadAttribute`:case`JSXText`:case`JSXFragment`:case`JSXOpeningFragment`:case`JSXClosingFragment`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Hi(e,n){if(!e)return!1;switch(e.type){case`Noop`:case`Placeholder`:case`V8IntrinsicIdentifier`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Ui(e,n){if(!e)return!1;switch(e.type){case`TSParameterProperty`:case`TSDeclareFunction`:case`TSDeclareMethod`:case`TSQualifiedName`:case`TSCallSignatureDeclaration`:case`TSConstructSignatureDeclaration`:case`TSPropertySignature`:case`TSMethodSignature`:case`TSIndexSignature`:case`TSAnyKeyword`:case`TSBooleanKeyword`:case`TSBigIntKeyword`:case`TSIntrinsicKeyword`:case`TSNeverKeyword`:case`TSNullKeyword`:case`TSNumberKeyword`:case`TSObjectKeyword`:case`TSStringKeyword`:case`TSSymbolKeyword`:case`TSUndefinedKeyword`:case`TSUnknownKeyword`:case`TSVoidKeyword`:case`TSThisType`:case`TSFunctionType`:case`TSConstructorType`:case`TSTypeReference`:case`TSTypePredicate`:case`TSTypeQuery`:case`TSTypeLiteral`:case`TSArrayType`:case`TSTupleType`:case`TSOptionalType`:case`TSRestType`:case`TSNamedTupleMember`:case`TSUnionType`:case`TSIntersectionType`:case`TSConditionalType`:case`TSInferType`:case`TSParenthesizedType`:case`TSTypeOperator`:case`TSIndexedAccessType`:case`TSMappedType`:case`TSTemplateLiteralType`:case`TSLiteralType`:case`TSExpressionWithTypeArguments`:case`TSInterfaceDeclaration`:case`TSInterfaceBody`:case`TSTypeAliasDeclaration`:case`TSInstantiationExpression`:case`TSAsExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:case`TSEnumBody`:case`TSEnumDeclaration`:case`TSEnumMember`:case`TSModuleDeclaration`:case`TSModuleBlock`:case`TSImportType`:case`TSImportEqualsDeclaration`:case`TSExternalModuleReference`:case`TSNonNullExpression`:case`TSExportAssignment`:case`TSNamespaceExportDeclaration`:case`TSTypeAnnotation`:case`TSTypeParameterInstantiation`:case`TSTypeParameterDeclaration`:case`TSTypeParameter`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Wi(e,n){if(!e)return!1;switch(e.type){case`TSCallSignatureDeclaration`:case`TSConstructSignatureDeclaration`:case`TSPropertySignature`:case`TSMethodSignature`:case`TSIndexSignature`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Gi(e,n){if(!e)return!1;switch(e.type){case`TSAnyKeyword`:case`TSBooleanKeyword`:case`TSBigIntKeyword`:case`TSIntrinsicKeyword`:case`TSNeverKeyword`:case`TSNullKeyword`:case`TSNumberKeyword`:case`TSObjectKeyword`:case`TSStringKeyword`:case`TSSymbolKeyword`:case`TSUndefinedKeyword`:case`TSUnknownKeyword`:case`TSVoidKeyword`:case`TSThisType`:case`TSFunctionType`:case`TSConstructorType`:case`TSTypeReference`:case`TSTypePredicate`:case`TSTypeQuery`:case`TSTypeLiteral`:case`TSArrayType`:case`TSTupleType`:case`TSOptionalType`:case`TSRestType`:case`TSUnionType`:case`TSIntersectionType`:case`TSConditionalType`:case`TSInferType`:case`TSParenthesizedType`:case`TSTypeOperator`:case`TSIndexedAccessType`:case`TSMappedType`:case`TSTemplateLiteralType`:case`TSLiteralType`:case`TSExpressionWithTypeArguments`:case`TSImportType`:break;default:return!1}return n==null||(0,t.default)(e,n)}function Ki(e,n){if(!e)return!1;switch(e.type){case`TSAnyKeyword`:case`TSBooleanKeyword`:case`TSBigIntKeyword`:case`TSIntrinsicKeyword`:case`TSNeverKeyword`:case`TSNullKeyword`:case`TSNumberKeyword`:case`TSObjectKeyword`:case`TSStringKeyword`:case`TSSymbolKeyword`:case`TSUndefinedKeyword`:case`TSUnknownKeyword`:case`TSVoidKeyword`:case`TSThisType`:case`TSTemplateLiteralType`:case`TSLiteralType`:break;default:return!1}return n==null||(0,t.default)(e,n)}function qi(e,r){return(0,n.default)(`isNumberLiteral`,`isNumericLiteral`),!e||e.type!==`NumberLiteral`?!1:r==null||(0,t.default)(e,r)}function Ji(e,r){return(0,n.default)(`isRegexLiteral`,`isRegExpLiteral`),!e||e.type!==`RegexLiteral`?!1:r==null||(0,t.default)(e,r)}function Yi(e,r){return(0,n.default)(`isRestProperty`,`isRestElement`),!e||e.type!==`RestProperty`?!1:r==null||(0,t.default)(e,r)}function Xi(e,r){return(0,n.default)(`isSpreadProperty`,`isSpreadElement`),!e||e.type!==`SpreadProperty`?!1:r==null||(0,t.default)(e,r)}function Zi(e,t){return(0,n.default)(`isModuleDeclaration`,`isImportOrExportDeclaration`),ki(e,t)}})),xv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=bv();function n(e){return(0,t.isMemberExpression)(e)||(0,t.isMetaProperty)(e)}function r(e,r,i){if(!n(e))return!1;let a=Array.isArray(r)?r:r.split(`.`),o=[],s;for(s=e;n(s);s=(c=s.object)??s.meta){var c;o.push(s.property)}if(o.push(s),o.length<a.length||!i&&o.length>a.length)return!1;for(let e=0,n=o.length-1;e<a.length;e++,n--){let r=o[n],i;if((0,t.isIdentifier)(r))i=r.name;else if((0,t.isStringLiteral)(r))i=r.value;else if((0,t.isThisExpression)(r))i=`this`;else if((0,t.isSuper)(r))i=`super`;else if((0,t.isPrivateName)(r))i=`#`+r.id.name;else return!1;if(a[e]!==i)return!1}return!0}})),Sv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=xv();function n(e,n){let r=e.split(`.`);return e=>(0,t.default)(e,r,n)}})),Cv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=(0,Sv().default)(`React.Component`)})),wv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=t;function t(e){return!!e&&/^[a-z]/.test(e)}})),Tv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=Uv();function n(e,n){if(e===n)return!0;if(e==null||t.ALIAS_KEYS[n])return!1;let r=t.FLIPPED_ALIAS_KEYS[n];return!!(r!=null&&r.includes(e))}})),Ev=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=Uv();function n(e,n){if(e===n)return!0;let r=t.PLACEHOLDERS_ALIAS[e];return!!(r!=null&&r.includes(n))}})),Dv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=a;var t=vv(),n=Tv(),r=Ev(),i=Uv();function a(e,a,o){return a?(0,n.default)(a.type,e)?o===void 0?!0:(0,t.default)(a,o):!o&&a.type===`Placeholder`&&e in i.FLIPPED_ALIAS_KEYS?(0,r.default)(a.expectedNode,e):!1:!1}})),Ov=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isIdentifierChar=l,e.isIdentifierName=u,e.isIdentifierStart=c;let t=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,n=`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`,r=RegExp(`[`+t+`]`),i=RegExp(`[`+t+n+`]`);t=n=null;let a=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],o=[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];function s(e,t){let n=65536;for(let r=0,i=t.length;r<i;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function c(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&r.test(String.fromCharCode(e)):s(e,a)}function l(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&i.test(String.fromCharCode(e)):s(e,a)||s(e,o)}function u(e){let t=!0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if((r&64512)==55296&&n+1<e.length){let t=e.charCodeAt(++n);(t&64512)==56320&&(r=65536+((r&1023)<<10)+(t&1023))}if(t){if(t=!1,!c(r))return!1}else if(!l(r))return!1}return!t}})),kv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isKeyword=l,e.isReservedWord=a,e.isStrictBindOnlyReservedWord=s,e.isStrictBindReservedWord=c,e.isStrictReservedWord=o;let t={keyword:`break.case.catch.continue.debugger.default.do.else.finally.for.function.if.return.switch.throw.try.var.const.while.with.new.this.super.class.extends.export.import.null.true.false.in.instanceof.typeof.void.delete`.split(`.`),strict:[`implements`,`interface`,`let`,`package`,`private`,`protected`,`public`,`static`,`yield`],strictBind:[`eval`,`arguments`]},n=new Set(t.keyword),r=new Set(t.strict),i=new Set(t.strictBind);function a(e,t){return t&&e===`await`||e===`enum`}function o(e,t){return a(e,t)||r.has(e)}function s(e){return i.has(e)}function c(e,t){return o(e,t)||s(e)}function l(e){return n.has(e)}})),Av=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`isIdentifierChar`,{enumerable:!0,get:function(){return t.isIdentifierChar}}),Object.defineProperty(e,`isIdentifierName`,{enumerable:!0,get:function(){return t.isIdentifierName}}),Object.defineProperty(e,`isIdentifierStart`,{enumerable:!0,get:function(){return t.isIdentifierStart}}),Object.defineProperty(e,`isKeyword`,{enumerable:!0,get:function(){return n.isKeyword}}),Object.defineProperty(e,`isReservedWord`,{enumerable:!0,get:function(){return n.isReservedWord}}),Object.defineProperty(e,`isStrictBindOnlyReservedWord`,{enumerable:!0,get:function(){return n.isStrictBindOnlyReservedWord}}),Object.defineProperty(e,`isStrictBindReservedWord`,{enumerable:!0,get:function(){return n.isStrictBindReservedWord}}),Object.defineProperty(e,`isStrictReservedWord`,{enumerable:!0,get:function(){return n.isStrictReservedWord}});var t=Ov(),n=kv()})),jv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=Av();function n(e,n=!0){return typeof e!=`string`||n&&((0,t.isKeyword)(e)||(0,t.isStrictReservedWord)(e,!0))?!1:(0,t.isIdentifierName)(e)}})),Mv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.readCodePoint=l,e.readInt=c,e.readStringContents=i;var t=function(e){return e>=48&&e<=57};let n={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},r={bin:e=>e===48||e===49,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function i(e,t,n,r,i,s){let c=n,l=r,u=i,d=``,f=null,p=n,{length:m}=t;for(;;){if(n>=m){s.unterminated(c,l,u),d+=t.slice(p,n);break}let h=t.charCodeAt(n);if(a(e,h,t,n)){d+=t.slice(p,n);break}if(h===92){d+=t.slice(p,n);let a=o(t,n,r,i,e===`template`,s);a.ch===null&&!f?f={pos:n,lineStart:r,curLine:i}:d+=a.ch,{pos:n,lineStart:r,curLine:i}=a,p=n}else h===8232||h===8233?(++n,++i,r=n):h===10||h===13?e===`template`?(d+=t.slice(p,n)+`
|
|
108
|
-
`,++n,h===13&&t.charCodeAt(n)===10&&++n,++i,p=r=n):s.unterminated(c,l,u):++n}return{pos:n,str:d,firstInvalidLoc:f,lineStart:r,curLine:i,containsInvalid:!!f}}function a(e,t,n,r){return e===`template`?t===96||t===36&&n.charCodeAt(r+1)===123:t===(e===`double`?34:39)}function o(e,t,n,r,i,a){let o=!i;t++;let c=e=>({pos:t,ch:e,lineStart:n,curLine:r}),u=e.charCodeAt(t++);switch(u){case 110:return c(`
|
|
109
|
-
`);case 114:return c(`\r`);case 120:{let i;return{code:i,pos:t}=s(e,t,n,r,2,!1,o,a),c(i===null?null:String.fromCharCode(i))}case 117:{let i;return{code:i,pos:t}=l(e,t,n,r,o,a),c(i===null?null:String.fromCodePoint(i))}case 116:return c(` `);case 98:return c(`\b`);case 118:return c(`\v`);case 102:return c(`\f`);case 13:e.charCodeAt(t)===10&&++t;case 10:n=t,++r;case 8232:case 8233:return c(``);case 56:case 57:if(i)return c(null);a.strictNumericEscape(t-1,n,r);default:if(u>=48&&u<=55){let o=t-1,s=/^[0-7]+/.exec(e.slice(o,t+2))[0],l=parseInt(s,8);l>255&&(s=s.slice(0,-1),l=parseInt(s,8)),t+=s.length-1;let u=e.charCodeAt(t);if(s!==`0`||u===56||u===57){if(i)return c(null);a.strictNumericEscape(o,n,r)}return c(String.fromCharCode(l))}return c(String.fromCharCode(u))}}function s(e,t,n,r,i,a,o,s){let l=t,u;return{n:u,pos:t}=c(e,t,n,r,16,i,a,!1,s,!o),u===null&&(o?s.invalidEscapeSequence(l,n,r):t=l-1),{code:u,pos:t}}function c(e,i,a,o,s,c,l,u,d,f){let p=i,m=s===16?n.hex:n.decBinOct,h=s===16?r.hex:s===10?r.dec:s===8?r.oct:r.bin,g=!1,_=0;for(let n=0,r=c??1/0;n<r;++n){let n=e.charCodeAt(i),r;if(n===95&&u!==`bail`){let t=e.charCodeAt(i-1),n=e.charCodeAt(i+1);if(!u){if(f)return{n:null,pos:i};d.numericSeparatorInEscapeSequence(i,a,o)}else if(Number.isNaN(n)||!h(n)||m.has(t)||m.has(n)){if(f)return{n:null,pos:i};d.unexpectedNumericSeparator(i,a,o)}++i;continue}if(r=n>=97?n-97+10:n>=65?n-65+10:t(n)?n-48:1/0,r>=s){if(r<=9&&f)return{n:null,pos:i};if(r<=9&&d.invalidDigit(i,a,o,s))r=0;else if(l)r=0,g=!0;else break}++i,_=_*s+r}return i===p||c!=null&&i-p!==c||g?{n:null,pos:i}:{n:_,pos:i}}function l(e,t,n,r,i,a){let o=e.charCodeAt(t),c;if(o===123){if(++t,{code:c,pos:t}=s(e,t,n,r,e.indexOf(`}`,t)-t,!0,i,a),++t,c!==null&&c>1114111)if(i)a.invalidCodePoint(t,n,r);else return{code:null,pos:t}}else ({code:c,pos:t}=s(e,t,n,r,4,!1,i,a));return{code:c,pos:t}}})),Nv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.UPDATE_OPERATORS=e.UNARY_OPERATORS=e.STRING_UNARY_OPERATORS=e.STATEMENT_OR_BLOCK_KEYS=e.NUMBER_UNARY_OPERATORS=e.NUMBER_BINARY_OPERATORS=e.LOGICAL_OPERATORS=e.INHERIT_KEYS=e.FOR_INIT_KEYS=e.FLATTENABLE_KEYS=e.EQUALITY_BINARY_OPERATORS=e.COMPARISON_BINARY_OPERATORS=e.COMMENT_KEYS=e.BOOLEAN_UNARY_OPERATORS=e.BOOLEAN_NUMBER_BINARY_OPERATORS=e.BOOLEAN_BINARY_OPERATORS=e.BINARY_OPERATORS=e.ASSIGNMENT_OPERATORS=void 0,e.STATEMENT_OR_BLOCK_KEYS=[`consequent`,`body`,`alternate`],e.FLATTENABLE_KEYS=[`body`,`expressions`],e.FOR_INIT_KEYS=[`left`,`init`],e.COMMENT_KEYS=[`leadingComments`,`trailingComments`,`innerComments`];let t=e.LOGICAL_OPERATORS=[`||`,`&&`,`??`];e.UPDATE_OPERATORS=[`++`,`--`];let n=e.BOOLEAN_NUMBER_BINARY_OPERATORS=[`>`,`<`,`>=`,`<=`],r=e.BOOLEAN_BINARY_OPERATORS=[...e.COMPARISON_BINARY_OPERATORS=[...e.EQUALITY_BINARY_OPERATORS=[`==`,`===`,`!=`,`!==`],`in`,`instanceof`],...n],i=e.NUMBER_BINARY_OPERATORS=[`-`,`/`,`%`,`*`,`**`,`&`,`|`,`>>`,`>>>`,`<<`,`^`];e.BINARY_OPERATORS=[`+`,...i,...r,`|>`],e.ASSIGNMENT_OPERATORS=[`=`,`+=`,...i.map(e=>e+`=`),...t.map(e=>e+`=`)];let a=e.BOOLEAN_UNARY_OPERATORS=[`delete`,`!`],o=e.NUMBER_UNARY_OPERATORS=[`+`,`-`,`~`],s=e.STRING_UNARY_OPERATORS=[`typeof`];e.UNARY_OPERATORS=[`void`,`throw`,...a,...o,...s],e.INHERIT_KEYS={optional:[`typeAnnotation`,`typeParameters`,`returnType`],force:[`start`,`loc`,`end`]},e.BLOCK_SCOPED_SYMBOL=Symbol.for(`var used to be block scoped`),e.NOT_LOCAL_BINDING=Symbol.for(`should not be considered a local binding`)})),Pv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.allExpandedTypes=e.VISITOR_KEYS=e.NODE_UNION_SHAPES__PRIVATE=e.NODE_PARENT_VALIDATIONS=e.NODE_FIELDS=e.FLIPPED_ALIAS_KEYS=e.DEPRECATED_KEYS=e.BUILDER_KEYS=e.ALIAS_KEYS=void 0,e.arrayOf=g,e.arrayOfType=_,e.assertEach=y,e.assertNodeOrValueType=C,e.assertNodeType=S,e.assertOneOf=b,e.assertOptionalChainStart=E,e.assertShape=T,e.assertValueType=w,e.chain=D,e.default=j,e.defineAliasedType=ee,e.validate=f,e.validateArrayOfType=v,e.validateOptional=m,e.validateOptionalType=h,e.validateType=p;var t=Dv(),n=Wv();let r=e.VISITOR_KEYS={},i=e.ALIAS_KEYS={},a=e.FLIPPED_ALIAS_KEYS={},o=e.NODE_FIELDS={},s=e.BUILDER_KEYS={},c=e.DEPRECATED_KEYS={},l=e.NODE_PARENT_VALIDATIONS={},u=e.NODE_UNION_SHAPES__PRIVATE={};function d(e){return Array.isArray(e)?`array`:e===null?`null`:typeof e}function f(e){return{validate:e}}function p(...e){return f(S(...e))}function m(e){return{validate:e,optional:!0}}function h(...e){return{validate:S(...e),optional:!0}}function g(e){return D(w(`array`),y(e))}function _(...e){return g(S(...e))}function v(...e){return f(_(...e))}function y(e){let t=process.env.BABEL_TYPES_8_BREAKING?n.validateChild:()=>{};function r(n,r,i){if(!Array.isArray(i))return;let a=0,o={toString(){return`${r}[${a}]`}};for(;a<i.length;a++){let r=i[a];e(n,o,r),t(n,o,r)}}return r.each=e,r}function b(...e){function t(t,n,r){if(!e.includes(r))throw TypeError(`Property ${n} expected value to be one of ${JSON.stringify(e)} but got ${JSON.stringify(r)}`)}return t.oneOf=e,t}let x=e.allExpandedTypes=[];function S(...e){let r=new Set;x.push({types:e,set:r});function i(i,a,o){let s=o?.type;if(s!=null){if(r.has(s)){(0,n.validateChild)(i,a,o);return}if(s===`Placeholder`){for(let r of e)if((0,t.default)(r,o)){(0,n.validateChild)(i,a,o);return}}}throw TypeError(`Property ${a} of ${i.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(s)}`)}return i.oneOfNodeTypes=e,i}function C(...e){function r(r,i,a){let o=d(a);for(let s of e)if(o===s||(0,t.default)(s,a)){(0,n.validateChild)(r,i,a);return}throw TypeError(`Property ${i} of ${r.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(a?.type)}`)}return r.oneOfNodeOrValueTypes=e,r}function w(e){function t(t,n,r){if(d(r)!==e)throw TypeError(`Property ${n} expected type of ${e} but got ${d(r)}`)}return t.type=e,t}function T(e){let t=Object.keys(e);function r(r,i,a){let o=[];for(let i of t)try{(0,n.validateField)(r,i,a[i],e[i])}catch(e){if(e instanceof TypeError){o.push(e.message);continue}throw e}if(o.length)throw TypeError(`Property ${i} of ${r.type} expected to have the following:\n${o.join(`
|
|
110
|
-
`)}`)}return r.shapeOf=e,r}function E(){function e(e){let t=e;for(;e;){let{type:e}=t;if(e===`OptionalCallExpression`){if(t.optional)return;t=t.callee;continue}if(e===`OptionalMemberExpression`){if(t.optional)return;t=t.object;continue}break}throw TypeError(`Non-optional ${e.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${t?.type}`)}return e}function D(...e){function t(...t){for(let n of e)n(...t)}if(t.chainOf=e,e.length>=2&&`type`in e[0]&&e[0].type===`array`&&!(`each`in e[1]))throw Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);return t}let O=new Set([`aliases`,`builder`,`deprecatedAlias`,`fields`,`inherits`,`visitor`,`validate`,`unionShape`]),k=new Set([`default`,`optional`,`deprecated`,`validate`]),A={};function ee(...e){return(t,n={})=>{let r=n.aliases;r||(n.inherits&&(r=A[n.inherits].aliases?.slice()),r??=[],n.aliases=r);let i=e.filter(e=>!r.includes(e));r.unshift(...i),j(t,n)}}function j(e,t={}){let n=t.inherits&&A[t.inherits]||{},f=t.fields;if(!f&&(f={},n.fields)){let e=Object.getOwnPropertyNames(n.fields);for(let t of e){let e=n.fields[t],r=e.default;if(Array.isArray(r)?r.length>0:r&&typeof r==`object`)throw Error(`field defaults can only be primitives or empty arrays currently`);f[t]={default:Array.isArray(r)?[]:r,optional:e.optional,deprecated:e.deprecated,validate:e.validate}}}let p=t.visitor||n.visitor||[],m=t.aliases||n.aliases||[],h=t.builder||n.builder||t.visitor||[];for(let n of Object.keys(t))if(!O.has(n))throw Error(`Unknown type option "${n}" on ${e}`);t.deprecatedAlias&&(c[t.deprecatedAlias]=e);for(let e of p.concat(h))f[e]=f[e]||{};for(let t of Object.keys(f)){let n=f[t];n.default!==void 0&&!h.includes(t)&&(n.optional=!0),n.default===void 0?n.default=null:!n.validate&&n.default!=null&&(n.validate=w(d(n.default)));for(let r of Object.keys(n))if(!k.has(r))throw Error(`Unknown field key "${r}" on ${e}.${t}`)}r[e]=t.visitor=p,s[e]=t.builder=h,o[e]=t.fields=f,i[e]=t.aliases=m,m.forEach(t=>{a[t]=a[t]||[],a[t].push(e)}),t.validate&&(l[e]=t.validate),t.unionShape&&(u[e]=t.unionShape),A[e]=t}})),Fv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.patternLikeCommon=e.importAttributes=e.functionTypeAnnotationCommon=e.functionDeclarationCommon=e.functionCommon=e.classMethodOrPropertyUnionShapeCommon=e.classMethodOrPropertyCommon=e.classMethodOrDeclareMethodCommon=void 0;var t=Dv(),n=jv(),r=Av(),i=Mv(),a=Nv(),o=Pv();let s=(e=!1)=>({unionShape:{discriminator:`computed`,shapes:[{name:`computed`,value:[!0],properties:{key:{validate:(0,o.assertNodeType)(`Expression`)}}},{name:`nonComputed`,value:[!1],properties:{key:{validate:e?(0,o.assertNodeType)(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`,`PrivateName`):(0,o.assertNodeType)(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`)}}}]}});e.classMethodOrPropertyUnionShapeCommon=s;let c=(0,o.defineAliasedType)(`Standardized`);c(`ArrayExpression`,{fields:{elements:{validate:(0,o.arrayOf)((0,o.assertNodeOrValueType)(`null`,`Expression`,`SpreadElement`)),default:process.env.BABEL_TYPES_8_BREAKING?void 0:[]}},visitor:[`elements`],aliases:[`Expression`]}),c(`AssignmentExpression`,{fields:{operator:{validate:process.env.BABEL_TYPES_8_BREAKING?Object.assign(function(){let e=(0,o.assertOneOf)(...a.ASSIGNMENT_OPERATORS),n=(0,o.assertOneOf)(`=`);return function(r,i,a){((0,t.default)(`Pattern`,r.left)?n:e)(r,i,a)}}(),{oneOf:a.ASSIGNMENT_OPERATORS}):(0,o.assertValueType)(`string`)},left:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)(`Identifier`,`MemberExpression`,`OptionalMemberExpression`,`ArrayPattern`,`ObjectPattern`,`TSAsExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`,`TSNonNullExpression`):(0,o.assertNodeType)(`LVal`,`OptionalMemberExpression`)},right:{validate:(0,o.assertNodeType)(`Expression`)}},builder:[`operator`,`left`,`right`],visitor:[`left`,`right`],aliases:[`Expression`]}),c(`BinaryExpression`,{builder:[`operator`,`left`,`right`],fields:{operator:{validate:(0,o.assertOneOf)(...a.BINARY_OPERATORS)},left:{validate:function(){let e=(0,o.assertNodeType)(`Expression`),t=(0,o.assertNodeType)(`Expression`,`PrivateName`);return Object.assign(function(n,r,i){(n.operator===`in`?t:e)(n,r,i)},{oneOfNodeTypes:[`Expression`,`PrivateName`]})}()},right:{validate:(0,o.assertNodeType)(`Expression`)}},visitor:[`left`,`right`],aliases:[`Binary`,`Expression`]}),c(`InterpreterDirective`,{builder:[`value`],fields:{value:{validate:(0,o.assertValueType)(`string`)}}}),c(`Directive`,{visitor:[`value`],fields:{value:{validate:(0,o.assertNodeType)(`DirectiveLiteral`)}}}),c(`DirectiveLiteral`,{builder:[`value`],fields:{value:{validate:(0,o.assertValueType)(`string`)}}}),c(`BlockStatement`,{builder:[`body`,`directives`],visitor:[`directives`,`body`],fields:{directives:{validate:(0,o.arrayOfType)(`Directive`),default:[]},body:(0,o.validateArrayOfType)(`Statement`)},aliases:[`Scopable`,`BlockParent`,`Block`,`Statement`]}),c(`BreakStatement`,{visitor:[`label`],fields:{label:{validate:(0,o.assertNodeType)(`Identifier`),optional:!0}},aliases:[`Statement`,`Terminatorless`,`CompletionStatement`]}),c(`CallExpression`,{visitor:[`callee`,`typeParameters`,`typeArguments`,`arguments`],builder:[`callee`,`arguments`],aliases:[`Expression`],fields:Object.assign({callee:{validate:(0,o.assertNodeType)(`Expression`,`Super`,`V8IntrinsicIdentifier`)},arguments:(0,o.validateArrayOfType)(`Expression`,`SpreadElement`,`ArgumentPlaceholder`),typeArguments:{validate:(0,o.assertNodeType)(`TypeParameterInstantiation`),optional:!0}},process.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,o.assertValueType)(`boolean`),optional:!0},typeParameters:{validate:(0,o.assertNodeType)(`TSTypeParameterInstantiation`),optional:!0}})}),c(`CatchClause`,{visitor:[`param`,`body`],fields:{param:{validate:(0,o.assertNodeType)(`Identifier`,`ArrayPattern`,`ObjectPattern`),optional:!0},body:{validate:(0,o.assertNodeType)(`BlockStatement`)}},aliases:[`Scopable`,`BlockParent`]}),c(`ConditionalExpression`,{visitor:[`test`,`consequent`,`alternate`],fields:{test:{validate:(0,o.assertNodeType)(`Expression`)},consequent:{validate:(0,o.assertNodeType)(`Expression`)},alternate:{validate:(0,o.assertNodeType)(`Expression`)}},aliases:[`Expression`,`Conditional`]}),c(`ContinueStatement`,{visitor:[`label`],fields:{label:{validate:(0,o.assertNodeType)(`Identifier`),optional:!0}},aliases:[`Statement`,`Terminatorless`,`CompletionStatement`]}),c(`DebuggerStatement`,{aliases:[`Statement`]}),c(`DoWhileStatement`,{builder:[`test`,`body`],visitor:[`body`,`test`],fields:{test:{validate:(0,o.assertNodeType)(`Expression`)},body:{validate:(0,o.assertNodeType)(`Statement`)}},aliases:[`Statement`,`BlockParent`,`Loop`,`While`,`Scopable`]}),c(`EmptyStatement`,{aliases:[`Statement`]}),c(`ExpressionStatement`,{visitor:[`expression`],fields:{expression:{validate:(0,o.assertNodeType)(`Expression`)}},aliases:[`Statement`,`ExpressionWrapper`]}),c(`File`,{builder:[`program`,`comments`,`tokens`],visitor:[`program`],fields:{program:{validate:(0,o.assertNodeType)(`Program`)},comments:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,o.assertEach)((0,o.assertNodeType)(`CommentBlock`,`CommentLine`)):Object.assign(()=>{},{each:{oneOfNodeTypes:[`CommentBlock`,`CommentLine`]}}),optional:!0},tokens:{validate:(0,o.assertEach)(Object.assign(()=>{},{type:`any`})),optional:!0}}}),c(`ForInStatement`,{visitor:[`left`,`right`,`body`],aliases:[`Scopable`,`Statement`,`For`,`BlockParent`,`Loop`,`ForXStatement`],fields:{left:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)(`VariableDeclaration`,`Identifier`,`MemberExpression`,`ArrayPattern`,`ObjectPattern`,`TSAsExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`,`TSNonNullExpression`):(0,o.assertNodeType)(`VariableDeclaration`,`LVal`)},right:{validate:(0,o.assertNodeType)(`Expression`)},body:{validate:(0,o.assertNodeType)(`Statement`)}}}),c(`ForStatement`,{visitor:[`init`,`test`,`update`,`body`],aliases:[`Scopable`,`Statement`,`For`,`BlockParent`,`Loop`],fields:{init:{validate:(0,o.assertNodeType)(`VariableDeclaration`,`Expression`),optional:!0},test:{validate:(0,o.assertNodeType)(`Expression`),optional:!0},update:{validate:(0,o.assertNodeType)(`Expression`),optional:!0},body:{validate:(0,o.assertNodeType)(`Statement`)}}});let l=()=>({params:(0,o.validateArrayOfType)(`FunctionParameter`),generator:{default:!1},async:{default:!1}});e.functionCommon=l;let u=()=>({returnType:{validate:(0,o.assertNodeType)(`TypeAnnotation`,`TSTypeAnnotation`,`Noop`),optional:!0},typeParameters:{validate:(0,o.assertNodeType)(`TypeParameterDeclaration`,`TSTypeParameterDeclaration`,`Noop`),optional:!0}});e.functionTypeAnnotationCommon=u;let d=()=>Object.assign({},l(),{declare:{validate:(0,o.assertValueType)(`boolean`),optional:!0},id:{validate:(0,o.assertNodeType)(`Identifier`),optional:!0}});e.functionDeclarationCommon=d,c(`FunctionDeclaration`,{builder:[`id`,`params`,`body`,`generator`,`async`],visitor:[`id`,`typeParameters`,`params`,`predicate`,`returnType`,`body`],fields:Object.assign({},d(),u(),{body:{validate:(0,o.assertNodeType)(`BlockStatement`)},predicate:{validate:(0,o.assertNodeType)(`DeclaredPredicate`,`InferredPredicate`),optional:!0}}),aliases:[`Scopable`,`Function`,`BlockParent`,`FunctionParent`,`Statement`,`Pureish`,`Declaration`],validate:process.env.BABEL_TYPES_8_BREAKING?function(){let e=(0,o.assertNodeType)(`Identifier`);return function(n,r,i){(0,t.default)(`ExportDefaultDeclaration`,n)||e(i,`id`,i.id)}}():void 0}),c(`FunctionExpression`,{inherits:`FunctionDeclaration`,aliases:[`Scopable`,`Function`,`BlockParent`,`FunctionParent`,`Expression`,`Pureish`],fields:Object.assign({},l(),u(),{id:{validate:(0,o.assertNodeType)(`Identifier`),optional:!0},body:{validate:(0,o.assertNodeType)(`BlockStatement`)},predicate:{validate:(0,o.assertNodeType)(`DeclaredPredicate`,`InferredPredicate`),optional:!0}})});let f=()=>({typeAnnotation:{validate:(0,o.assertNodeType)(`TypeAnnotation`,`TSTypeAnnotation`,`Noop`),optional:!0},optional:{validate:(0,o.assertValueType)(`boolean`),optional:!0},decorators:{validate:(0,o.arrayOfType)(`Decorator`),optional:!0}});e.patternLikeCommon=f,c(`Identifier`,{builder:[`name`],visitor:[`typeAnnotation`,`decorators`],aliases:[`Expression`,`FunctionParameter`,`PatternLike`,`LVal`,`TSEntityName`],fields:Object.assign({},f(),{name:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,o.chain)((0,o.assertValueType)(`string`),Object.assign(function(e,t,r){if(!(0,n.default)(r,!1))throw TypeError(`"${r}" is not a valid identifier name`)},{type:`string`})):(0,o.assertValueType)(`string`)}}),validate:process.env.BABEL_TYPES_8_BREAKING?function(e,n,i){let a=/\.(\w+)$/.exec(n.toString());if(!a)return;let[,o]=a,s={computed:!1};if(o===`property`){if((0,t.default)(`MemberExpression`,e,s)||(0,t.default)(`OptionalMemberExpression`,e,s))return}else if(o===`key`){if((0,t.default)(`Property`,e,s)||(0,t.default)(`Method`,e,s))return}else if(o===`exported`){if((0,t.default)(`ExportSpecifier`,e))return}else if(o===`imported`){if((0,t.default)(`ImportSpecifier`,e,{imported:i}))return}else if(o===`meta`&&(0,t.default)(`MetaProperty`,e,{meta:i}))return;if(((0,r.isKeyword)(i.name)||(0,r.isReservedWord)(i.name,!1))&&i.name!==`this`)throw TypeError(`"${i.name}" is not a valid identifier`)}:void 0}),c(`IfStatement`,{visitor:[`test`,`consequent`,`alternate`],aliases:[`Statement`,`Conditional`],fields:{test:{validate:(0,o.assertNodeType)(`Expression`)},consequent:{validate:(0,o.assertNodeType)(`Statement`)},alternate:{optional:!0,validate:(0,o.assertNodeType)(`Statement`)}}}),c(`LabeledStatement`,{visitor:[`label`,`body`],aliases:[`Statement`],fields:{label:{validate:(0,o.assertNodeType)(`Identifier`)},body:{validate:(0,o.assertNodeType)(`Statement`)}}}),c(`StringLiteral`,{builder:[`value`],fields:{value:{validate:(0,o.assertValueType)(`string`)}},aliases:[`Expression`,`Pureish`,`Literal`,`Immutable`]}),c(`NumericLiteral`,{builder:[`value`],deprecatedAlias:`NumberLiteral`,fields:{value:{validate:(0,o.chain)((0,o.assertValueType)(`number`),Object.assign(function(e,t,n){(1/n<0||!Number.isFinite(n))&&`${n}`},{type:`number`}))}},aliases:[`Expression`,`Pureish`,`Literal`,`Immutable`]}),c(`NullLiteral`,{aliases:[`Expression`,`Pureish`,`Literal`,`Immutable`]}),c(`BooleanLiteral`,{builder:[`value`],fields:{value:{validate:(0,o.assertValueType)(`boolean`)}},aliases:[`Expression`,`Pureish`,`Literal`,`Immutable`]}),c(`RegExpLiteral`,{builder:[`pattern`,`flags`],deprecatedAlias:`RegexLiteral`,aliases:[`Expression`,`Pureish`,`Literal`],fields:{pattern:{validate:(0,o.assertValueType)(`string`)},flags:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,o.chain)((0,o.assertValueType)(`string`),Object.assign(function(e,t,n){let r=/[^dgimsuvy]/.exec(n);if(r)throw TypeError(`"${r[0]}" is not a valid RegExp flag`)},{type:`string`})):(0,o.assertValueType)(`string`),default:``}}}),c(`LogicalExpression`,{builder:[`operator`,`left`,`right`],visitor:[`left`,`right`],aliases:[`Binary`,`Expression`],fields:{operator:{validate:(0,o.assertOneOf)(...a.LOGICAL_OPERATORS)},left:{validate:(0,o.assertNodeType)(`Expression`)},right:{validate:(0,o.assertNodeType)(`Expression`)}}}),c(`MemberExpression`,{builder:[`object`,`property`,`computed`,...process.env.BABEL_TYPES_8_BREAKING?[]:[`optional`]],visitor:[`object`,`property`],aliases:[`Expression`,`LVal`,`PatternLike`],unionShape:{discriminator:`computed`,shapes:[{name:`computed`,value:[!0],properties:{property:{validate:(0,o.assertNodeType)(`Expression`)}}},{name:`nonComputed`,value:[!1],properties:{property:{validate:(0,o.assertNodeType)(`Identifier`,`PrivateName`)}}}]},fields:Object.assign({object:{validate:(0,o.assertNodeType)(`Expression`,`Super`)},property:{validate:function(){let e=(0,o.assertNodeType)(`Identifier`,`PrivateName`),t=(0,o.assertNodeType)(`Expression`),n=function(n,r,i){(n.computed?t:e)(n,r,i)};return n.oneOfNodeTypes=[`Expression`,`Identifier`,`PrivateName`],n}()},computed:{default:!1}},process.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,o.assertValueType)(`boolean`),optional:!0}})}),c(`NewExpression`,{inherits:`CallExpression`}),c(`Program`,{visitor:[`directives`,`body`],builder:[`body`,`directives`,`sourceType`,`interpreter`],fields:{sourceType:{validate:(0,o.assertOneOf)(`script`,`module`),default:`script`},interpreter:{validate:(0,o.assertNodeType)(`InterpreterDirective`),default:null,optional:!0},directives:{validate:(0,o.arrayOfType)(`Directive`),default:[]},body:(0,o.validateArrayOfType)(`Statement`)},aliases:[`Scopable`,`BlockParent`,`Block`]}),c(`ObjectExpression`,{visitor:[`properties`],aliases:[`Expression`],fields:{properties:(0,o.validateArrayOfType)(`ObjectMethod`,`ObjectProperty`,`SpreadElement`)}}),c(`ObjectMethod`,Object.assign({builder:[`kind`,`key`,`params`,`body`,`computed`,`generator`,`async`],visitor:[`decorators`,`key`,`typeParameters`,`params`,`returnType`,`body`]},s(),{fields:Object.assign({},l(),u(),{kind:Object.assign({validate:(0,o.assertOneOf)(`method`,`get`,`set`)},process.env.BABEL_TYPES_8_BREAKING?{}:{default:`method`}),computed:{default:!1},key:{validate:function(){let e=(0,o.assertNodeType)(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`),t=(0,o.assertNodeType)(`Expression`),n=function(n,r,i){(n.computed?t:e)(n,r,i)};return n.oneOfNodeTypes=[`Expression`,`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`],n}()},decorators:{validate:(0,o.arrayOfType)(`Decorator`),optional:!0},body:{validate:(0,o.assertNodeType)(`BlockStatement`)}}),aliases:[`UserWhitespacable`,`Function`,`Scopable`,`BlockParent`,`FunctionParent`,`Method`,`ObjectMember`]})),c(`ObjectProperty`,{builder:[`key`,`value`,`computed`,`shorthand`,...process.env.BABEL_TYPES_8_BREAKING?[]:[`decorators`]],unionShape:{discriminator:`computed`,shapes:[{name:`computed`,value:[!0],properties:{key:{validate:(0,o.assertNodeType)(`Expression`)}}},{name:`nonComputed`,value:[!1],properties:{key:{validate:(0,o.assertNodeType)(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`,`DecimalLiteral`,`PrivateName`)}}}]},fields:{computed:{default:!1},key:{validate:function(){let e=(0,o.assertNodeType)(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`,`DecimalLiteral`,`PrivateName`),t=(0,o.assertNodeType)(`Expression`);return Object.assign(function(n,r,i){(n.computed?t:e)(n,r,i)},{oneOfNodeTypes:[`Expression`,`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`,`DecimalLiteral`,`PrivateName`]})}()},value:{validate:(0,o.assertNodeType)(`Expression`,`PatternLike`)},shorthand:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,o.chain)((0,o.assertValueType)(`boolean`),Object.assign(function(e,n,r){if(r){if(e.computed)throw TypeError(`Property shorthand of ObjectProperty cannot be true if computed is true`);if(!(0,t.default)(`Identifier`,e.key))throw TypeError(`Property shorthand of ObjectProperty cannot be true if key is not an Identifier`)}},{type:`boolean`})):(0,o.assertValueType)(`boolean`),default:!1},decorators:{validate:(0,o.arrayOfType)(`Decorator`),optional:!0}},visitor:[`decorators`,`key`,`value`],aliases:[`UserWhitespacable`,`Property`,`ObjectMember`],validate:process.env.BABEL_TYPES_8_BREAKING?function(){let e=(0,o.assertNodeType)(`Identifier`,`Pattern`,`TSAsExpression`,`TSSatisfiesExpression`,`TSNonNullExpression`,`TSTypeAssertion`),n=(0,o.assertNodeType)(`Expression`);return function(r,i,a){((0,t.default)(`ObjectPattern`,r)?e:n)(a,`value`,a.value)}}():void 0}),c(`RestElement`,{visitor:[`argument`,`typeAnnotation`],builder:[`argument`],aliases:[`FunctionParameter`,`PatternLike`,`LVal`],deprecatedAlias:`RestProperty`,fields:Object.assign({},f(),{argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)(`Identifier`,`ArrayPattern`,`ObjectPattern`,`MemberExpression`,`TSAsExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`,`TSNonNullExpression`):(0,o.assertNodeType)(`Identifier`,`ArrayPattern`,`ObjectPattern`,`MemberExpression`,`TSAsExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`,`TSNonNullExpression`,`RestElement`,`AssignmentPattern`)}}),validate:process.env.BABEL_TYPES_8_BREAKING?function(e,t){let n=/(\w+)\[(\d+)\]/.exec(t.toString());if(!n)throw Error(`Internal Babel error: malformed key.`);let[,r,i]=n;if(e[r].length>+i+1)throw TypeError(`RestElement must be last element of ${r}`)}:void 0}),c(`ReturnStatement`,{visitor:[`argument`],aliases:[`Statement`,`Terminatorless`,`CompletionStatement`],fields:{argument:{validate:(0,o.assertNodeType)(`Expression`),optional:!0}}}),c(`SequenceExpression`,{visitor:[`expressions`],fields:{expressions:(0,o.validateArrayOfType)(`Expression`)},aliases:[`Expression`]}),c(`ParenthesizedExpression`,{visitor:[`expression`],aliases:[`Expression`,`ExpressionWrapper`],fields:{expression:{validate:(0,o.assertNodeType)(`Expression`)}}}),c(`SwitchCase`,{visitor:[`test`,`consequent`],fields:{test:{validate:(0,o.assertNodeType)(`Expression`),optional:!0},consequent:(0,o.validateArrayOfType)(`Statement`)}}),c(`SwitchStatement`,{visitor:[`discriminant`,`cases`],aliases:[`Statement`,`BlockParent`,`Scopable`],fields:{discriminant:{validate:(0,o.assertNodeType)(`Expression`)},cases:(0,o.validateArrayOfType)(`SwitchCase`)}}),c(`ThisExpression`,{aliases:[`Expression`]}),c(`ThrowStatement`,{visitor:[`argument`],aliases:[`Statement`,`Terminatorless`,`CompletionStatement`],fields:{argument:{validate:(0,o.assertNodeType)(`Expression`)}}}),c(`TryStatement`,{visitor:[`block`,`handler`,`finalizer`],aliases:[`Statement`],fields:{block:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,o.chain)((0,o.assertNodeType)(`BlockStatement`),Object.assign(function(e){if(!e.handler&&!e.finalizer)throw TypeError(`TryStatement expects either a handler or finalizer, or both`)},{oneOfNodeTypes:[`BlockStatement`]})):(0,o.assertNodeType)(`BlockStatement`)},handler:{optional:!0,validate:(0,o.assertNodeType)(`CatchClause`)},finalizer:{optional:!0,validate:(0,o.assertNodeType)(`BlockStatement`)}}}),c(`UnaryExpression`,{builder:[`operator`,`argument`,`prefix`],fields:{prefix:{default:!0},argument:{validate:(0,o.assertNodeType)(`Expression`)},operator:{validate:(0,o.assertOneOf)(...a.UNARY_OPERATORS)}},visitor:[`argument`],aliases:[`UnaryLike`,`Expression`]}),c(`UpdateExpression`,{builder:[`operator`,`argument`,`prefix`],fields:{prefix:{default:!1},argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)(`Identifier`,`MemberExpression`):(0,o.assertNodeType)(`Expression`)},operator:{validate:(0,o.assertOneOf)(...a.UPDATE_OPERATORS)}},visitor:[`argument`],aliases:[`Expression`]}),c(`VariableDeclaration`,{builder:[`kind`,`declarations`],visitor:[`declarations`],aliases:[`Statement`,`Declaration`],fields:{declare:{validate:(0,o.assertValueType)(`boolean`),optional:!0},kind:{validate:(0,o.assertOneOf)(`var`,`let`,`const`,`using`,`await using`)},declarations:(0,o.validateArrayOfType)(`VariableDeclarator`)},validate:process.env.BABEL_TYPES_8_BREAKING?(()=>{let e=(0,o.assertNodeType)(`Identifier`,`Placeholder`),n=(0,o.assertNodeType)(`Identifier`,`ArrayPattern`,`ObjectPattern`,`Placeholder`),r=(0,o.assertNodeType)(`Identifier`,`VoidPattern`,`Placeholder`);return function(i,a,o){let{kind:s,declarations:c}=o,l=(0,t.default)(`ForXStatement`,i,{left:o});if(l&&c.length!==1)throw TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${i.type}`);for(let t of c)s===`const`||s===`let`||s===`var`?!l&&!t.init?e(t,`id`,t.id):n(t,`id`,t.id):r(t,`id`,t.id)}})():void 0}),c(`VariableDeclarator`,{visitor:[`id`,`init`],fields:{id:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)(`Identifier`,`ArrayPattern`,`ObjectPattern`,`VoidPattern`):(0,o.assertNodeType)(`LVal`,`VoidPattern`)},definite:{optional:!0,validate:(0,o.assertValueType)(`boolean`)},init:{optional:!0,validate:(0,o.assertNodeType)(`Expression`)}}}),c(`WhileStatement`,{visitor:[`test`,`body`],aliases:[`Statement`,`BlockParent`,`Loop`,`While`,`Scopable`],fields:{test:{validate:(0,o.assertNodeType)(`Expression`)},body:{validate:(0,o.assertNodeType)(`Statement`)}}}),c(`WithStatement`,{visitor:[`object`,`body`],aliases:[`Statement`],fields:{object:{validate:(0,o.assertNodeType)(`Expression`)},body:{validate:(0,o.assertNodeType)(`Statement`)}}}),c(`AssignmentPattern`,{visitor:[`left`,`right`,`decorators`],builder:[`left`,`right`],aliases:[`FunctionParameter`,`Pattern`,`PatternLike`,`LVal`],fields:Object.assign({},f(),{left:{validate:(0,o.assertNodeType)(`Identifier`,`ObjectPattern`,`ArrayPattern`,`MemberExpression`,`TSAsExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`,`TSNonNullExpression`)},right:{validate:(0,o.assertNodeType)(`Expression`)},decorators:{validate:(0,o.arrayOfType)(`Decorator`),optional:!0}})}),c(`ArrayPattern`,{visitor:[`elements`,`typeAnnotation`],builder:[`elements`],aliases:[`FunctionParameter`,`Pattern`,`PatternLike`,`LVal`],fields:Object.assign({},f(),{elements:{validate:(0,o.chain)((0,o.assertValueType)(`array`),(0,o.assertEach)((0,o.assertNodeOrValueType)(`null`,`PatternLike`)))}})}),c(`ArrowFunctionExpression`,{builder:[`params`,`body`,`async`],visitor:[`typeParameters`,`params`,`predicate`,`returnType`,`body`],aliases:[`Scopable`,`Function`,`BlockParent`,`FunctionParent`,`Expression`,`Pureish`],fields:Object.assign({},l(),u(),{expression:{validate:(0,o.assertValueType)(`boolean`)},body:{validate:(0,o.assertNodeType)(`BlockStatement`,`Expression`)},predicate:{validate:(0,o.assertNodeType)(`DeclaredPredicate`,`InferredPredicate`),optional:!0}})}),c(`ClassBody`,{visitor:[`body`],fields:{body:(0,o.validateArrayOfType)(`ClassMethod`,`ClassPrivateMethod`,`ClassProperty`,`ClassPrivateProperty`,`ClassAccessorProperty`,`TSDeclareMethod`,`TSIndexSignature`,`StaticBlock`)}}),c(`ClassExpression`,{builder:[`id`,`superClass`,`body`,`decorators`],visitor:[`decorators`,`id`,`typeParameters`,`superClass`,`superTypeParameters`,`mixins`,`implements`,`body`],aliases:[`Scopable`,`Class`,`Expression`],fields:{id:{validate:(0,o.assertNodeType)(`Identifier`),optional:!0},typeParameters:{validate:(0,o.assertNodeType)(`TypeParameterDeclaration`,`TSTypeParameterDeclaration`,`Noop`),optional:!0},body:{validate:(0,o.assertNodeType)(`ClassBody`)},superClass:{optional:!0,validate:(0,o.assertNodeType)(`Expression`)},superTypeParameters:{validate:(0,o.assertNodeType)(`TypeParameterInstantiation`,`TSTypeParameterInstantiation`),optional:!0},implements:{validate:(0,o.arrayOfType)(`TSExpressionWithTypeArguments`,`ClassImplements`),optional:!0},decorators:{validate:(0,o.arrayOfType)(`Decorator`),optional:!0},mixins:{validate:(0,o.assertNodeType)(`InterfaceExtends`),optional:!0}}}),c(`ClassDeclaration`,{inherits:`ClassExpression`,aliases:[`Scopable`,`Class`,`Statement`,`Declaration`],fields:{id:{validate:(0,o.assertNodeType)(`Identifier`),optional:!0},typeParameters:{validate:(0,o.assertNodeType)(`TypeParameterDeclaration`,`TSTypeParameterDeclaration`,`Noop`),optional:!0},body:{validate:(0,o.assertNodeType)(`ClassBody`)},superClass:{optional:!0,validate:(0,o.assertNodeType)(`Expression`)},superTypeParameters:{validate:(0,o.assertNodeType)(`TypeParameterInstantiation`,`TSTypeParameterInstantiation`),optional:!0},implements:{validate:(0,o.arrayOfType)(`TSExpressionWithTypeArguments`,`ClassImplements`),optional:!0},decorators:{validate:(0,o.arrayOfType)(`Decorator`),optional:!0},mixins:{validate:(0,o.assertNodeType)(`InterfaceExtends`),optional:!0},declare:{validate:(0,o.assertValueType)(`boolean`),optional:!0},abstract:{validate:(0,o.assertValueType)(`boolean`),optional:!0}},validate:process.env.BABEL_TYPES_8_BREAKING?function(){let e=(0,o.assertNodeType)(`Identifier`);return function(n,r,i){(0,t.default)(`ExportDefaultDeclaration`,n)||e(i,`id`,i.id)}}():void 0});let p=e.importAttributes={attributes:{optional:!0,validate:(0,o.arrayOfType)(`ImportAttribute`)}};p.assertions={deprecated:!0,optional:!0,validate:(0,o.arrayOfType)(`ImportAttribute`)},c(`ExportAllDeclaration`,{builder:[`source`,`attributes`],visitor:[`source`,`attributes`,`assertions`],aliases:[`Statement`,`Declaration`,`ImportOrExportDeclaration`,`ExportDeclaration`],fields:Object.assign({source:{validate:(0,o.assertNodeType)(`StringLiteral`)},exportKind:(0,o.validateOptional)((0,o.assertOneOf)(`type`,`value`))},p)}),c(`ExportDefaultDeclaration`,{visitor:[`declaration`],aliases:[`Statement`,`Declaration`,`ImportOrExportDeclaration`,`ExportDeclaration`],fields:{declaration:(0,o.validateType)(`TSDeclareFunction`,`FunctionDeclaration`,`ClassDeclaration`,`Expression`),exportKind:(0,o.validateOptional)((0,o.assertOneOf)(`value`))}}),c(`ExportNamedDeclaration`,{builder:[`declaration`,`specifiers`,`source`,`attributes`],visitor:[`declaration`,`specifiers`,`source`,`attributes`,`assertions`],aliases:[`Statement`,`Declaration`,`ImportOrExportDeclaration`,`ExportDeclaration`],fields:Object.assign({declaration:{optional:!0,validate:process.env.BABEL_TYPES_8_BREAKING?(0,o.chain)((0,o.assertNodeType)(`Declaration`),Object.assign(function(e,t,n){if(n&&e.specifiers.length)throw TypeError(`Only declaration or specifiers is allowed on ExportNamedDeclaration`);if(n&&e.source)throw TypeError(`Cannot export a declaration from a source`)},{oneOfNodeTypes:[`Declaration`]})):(0,o.assertNodeType)(`Declaration`)}},p,{specifiers:{default:[],validate:(0,o.arrayOf)(function(){let e=(0,o.assertNodeType)(`ExportSpecifier`,`ExportDefaultSpecifier`,`ExportNamespaceSpecifier`),t=(0,o.assertNodeType)(`ExportSpecifier`);return process.env.BABEL_TYPES_8_BREAKING?Object.assign(function(n,r,i){(n.source?e:t)(n,r,i)},{oneOfNodeTypes:[`ExportSpecifier`,`ExportDefaultSpecifier`,`ExportNamespaceSpecifier`]}):e}())},source:{validate:(0,o.assertNodeType)(`StringLiteral`),optional:!0},exportKind:(0,o.validateOptional)((0,o.assertOneOf)(`type`,`value`))})}),c(`ExportSpecifier`,{visitor:[`local`,`exported`],aliases:[`ModuleSpecifier`],fields:{local:{validate:(0,o.assertNodeType)(`Identifier`)},exported:{validate:(0,o.assertNodeType)(`Identifier`,`StringLiteral`)},exportKind:{validate:(0,o.assertOneOf)(`type`,`value`),optional:!0}}}),c(`ForOfStatement`,{visitor:[`left`,`right`,`body`],builder:[`left`,`right`,`body`,`await`],aliases:[`Scopable`,`Statement`,`For`,`BlockParent`,`Loop`,`ForXStatement`],fields:{left:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING)return(0,o.assertNodeType)(`VariableDeclaration`,`LVal`);let e=(0,o.assertNodeType)(`VariableDeclaration`),n=(0,o.assertNodeType)(`Identifier`,`MemberExpression`,`ArrayPattern`,`ObjectPattern`,`TSAsExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`,`TSNonNullExpression`);return Object.assign(function(r,i,a){(0,t.default)(`VariableDeclaration`,a)?e(r,i,a):n(r,i,a)},{oneOfNodeTypes:[`VariableDeclaration`,`Identifier`,`MemberExpression`,`ArrayPattern`,`ObjectPattern`,`TSAsExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`,`TSNonNullExpression`]})}()},right:{validate:(0,o.assertNodeType)(`Expression`)},body:{validate:(0,o.assertNodeType)(`Statement`)},await:{default:!1}}}),c(`ImportDeclaration`,{builder:[`specifiers`,`source`,`attributes`],visitor:[`specifiers`,`source`,`attributes`,`assertions`],aliases:[`Statement`,`Declaration`,`ImportOrExportDeclaration`],fields:Object.assign({},p,{module:{optional:!0,validate:(0,o.assertValueType)(`boolean`)},phase:{default:null,validate:(0,o.assertOneOf)(`source`,`defer`)},specifiers:(0,o.validateArrayOfType)(`ImportSpecifier`,`ImportDefaultSpecifier`,`ImportNamespaceSpecifier`),source:{validate:(0,o.assertNodeType)(`StringLiteral`)},importKind:{validate:(0,o.assertOneOf)(`type`,`typeof`,`value`),optional:!0}})}),c(`ImportDefaultSpecifier`,{visitor:[`local`],aliases:[`ModuleSpecifier`],fields:{local:{validate:(0,o.assertNodeType)(`Identifier`)}}}),c(`ImportNamespaceSpecifier`,{visitor:[`local`],aliases:[`ModuleSpecifier`],fields:{local:{validate:(0,o.assertNodeType)(`Identifier`)}}}),c(`ImportSpecifier`,{visitor:[`imported`,`local`],builder:[`local`,`imported`],aliases:[`ModuleSpecifier`],fields:{local:{validate:(0,o.assertNodeType)(`Identifier`)},imported:{validate:(0,o.assertNodeType)(`Identifier`,`StringLiteral`)},importKind:{validate:(0,o.assertOneOf)(`type`,`typeof`,`value`),optional:!0}}}),c(`ImportExpression`,{visitor:[`source`,`options`],aliases:[`Expression`],fields:{phase:{default:null,validate:(0,o.assertOneOf)(`source`,`defer`)},source:{validate:(0,o.assertNodeType)(`Expression`)},options:{validate:(0,o.assertNodeType)(`Expression`),optional:!0}}}),c(`MetaProperty`,{visitor:[`meta`,`property`],aliases:[`Expression`],fields:{meta:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,o.chain)((0,o.assertNodeType)(`Identifier`),Object.assign(function(e,n,r){let i;switch(r.name){case`function`:i=`sent`;break;case`new`:i=`target`;break;case`import`:i=`meta`;break}if(!(0,t.default)(`Identifier`,e.property,{name:i}))throw TypeError(`Unrecognised MetaProperty`)},{oneOfNodeTypes:[`Identifier`]})):(0,o.assertNodeType)(`Identifier`)},property:{validate:(0,o.assertNodeType)(`Identifier`)}}});let m=()=>({abstract:{validate:(0,o.assertValueType)(`boolean`),optional:!0},accessibility:{validate:(0,o.assertOneOf)(`public`,`private`,`protected`),optional:!0},static:{default:!1},override:{default:!1},computed:{default:!1},optional:{validate:(0,o.assertValueType)(`boolean`),optional:!0},key:{validate:(0,o.chain)(function(){let e=(0,o.assertNodeType)(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`),t=(0,o.assertNodeType)(`Expression`);return function(n,r,i){(n.computed?t:e)(n,r,i)}}(),(0,o.assertNodeType)(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`,`Expression`))}});e.classMethodOrPropertyCommon=m;let h=()=>Object.assign({},l(),m(),{params:(0,o.validateArrayOfType)(`FunctionParameter`,`TSParameterProperty`),kind:{validate:(0,o.assertOneOf)(`get`,`set`,`method`,`constructor`),default:`method`},access:{validate:(0,o.chain)((0,o.assertValueType)(`string`),(0,o.assertOneOf)(`public`,`private`,`protected`)),optional:!0},decorators:{validate:(0,o.arrayOfType)(`Decorator`),optional:!0}});e.classMethodOrDeclareMethodCommon=h,c(`ClassMethod`,Object.assign({aliases:[`Function`,`Scopable`,`BlockParent`,`FunctionParent`,`Method`],builder:[`kind`,`key`,`params`,`body`,`computed`,`static`,`generator`,`async`],visitor:[`decorators`,`key`,`typeParameters`,`params`,`returnType`,`body`]},s(),{fields:Object.assign({},h(),u(),{body:{validate:(0,o.assertNodeType)(`BlockStatement`)}})})),c(`ObjectPattern`,{visitor:[`decorators`,`properties`,`typeAnnotation`],builder:[`properties`],aliases:[`FunctionParameter`,`Pattern`,`PatternLike`,`LVal`],fields:Object.assign({},f(),{properties:(0,o.validateArrayOfType)(`RestElement`,`ObjectProperty`)})}),c(`SpreadElement`,{visitor:[`argument`],aliases:[`UnaryLike`],deprecatedAlias:`SpreadProperty`,fields:{argument:{validate:(0,o.assertNodeType)(`Expression`)}}}),c(`Super`,{aliases:[`Expression`]}),c(`TaggedTemplateExpression`,{visitor:[`tag`,`typeParameters`,`quasi`],builder:[`tag`,`quasi`],aliases:[`Expression`],fields:{tag:{validate:(0,o.assertNodeType)(`Expression`)},quasi:{validate:(0,o.assertNodeType)(`TemplateLiteral`)},typeParameters:{validate:(0,o.assertNodeType)(`TypeParameterInstantiation`,`TSTypeParameterInstantiation`),optional:!0}}}),c(`TemplateElement`,{builder:[`value`,`tail`],fields:{value:{validate:(0,o.chain)((0,o.assertShape)({raw:{validate:(0,o.assertValueType)(`string`)},cooked:{validate:(0,o.assertValueType)(`string`),optional:!0}}),function(e){let t=e.value.raw,n=!1,r=()=>{throw Error(`Internal @babel/types error.`)},{str:a,firstInvalidLoc:o}=(0,i.readStringContents)(`template`,t,0,0,0,{unterminated(){n=!0},strictNumericEscape:r,invalidEscapeSequence:r,numericSeparatorInEscapeSequence:r,unexpectedNumericSeparator:r,invalidDigit:r,invalidCodePoint:r});if(!n)throw Error(`Invalid raw`);e.value.cooked=o?null:a})},tail:{default:!1}}}),c(`TemplateLiteral`,{visitor:[`quasis`,`expressions`],aliases:[`Expression`,`Literal`],fields:{quasis:(0,o.validateArrayOfType)(`TemplateElement`),expressions:{validate:(0,o.chain)((0,o.assertValueType)(`array`),(0,o.assertEach)((0,o.assertNodeType)(`Expression`,`TSType`)),function(e,t,n){if(e.quasis.length!==n.length+1)throw TypeError(`Number of ${e.type} quasis should be exactly one more than the number of expressions.\nExpected ${n.length+1} quasis but got ${e.quasis.length}`)})}}}),c(`YieldExpression`,{builder:[`argument`,`delegate`],visitor:[`argument`],aliases:[`Expression`,`Terminatorless`],fields:{delegate:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,o.chain)((0,o.assertValueType)(`boolean`),Object.assign(function(e,t,n){if(n&&!e.argument)throw TypeError(`Property delegate of YieldExpression cannot be true if there is no argument`)},{type:`boolean`})):(0,o.assertValueType)(`boolean`),default:!1},argument:{optional:!0,validate:(0,o.assertNodeType)(`Expression`)}}}),c(`AwaitExpression`,{builder:[`argument`],visitor:[`argument`],aliases:[`Expression`,`Terminatorless`],fields:{argument:{validate:(0,o.assertNodeType)(`Expression`)}}}),c(`Import`,{aliases:[`Expression`]}),c(`BigIntLiteral`,{builder:[`value`],fields:{value:{validate:(0,o.assertValueType)(`string`)}},aliases:[`Expression`,`Pureish`,`Literal`,`Immutable`]}),c(`ExportNamespaceSpecifier`,{visitor:[`exported`],aliases:[`ModuleSpecifier`],fields:{exported:{validate:(0,o.assertNodeType)(`Identifier`)}}}),c(`OptionalMemberExpression`,{builder:[`object`,`property`,`computed`,`optional`],visitor:[`object`,`property`],aliases:[`Expression`],fields:{object:{validate:(0,o.assertNodeType)(`Expression`)},property:{validate:function(){let e=(0,o.assertNodeType)(`Identifier`),t=(0,o.assertNodeType)(`Expression`);return Object.assign(function(n,r,i){(n.computed?t:e)(n,r,i)},{oneOfNodeTypes:[`Expression`,`Identifier`]})}()},computed:{default:!1},optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,o.chain)((0,o.assertValueType)(`boolean`),(0,o.assertOptionalChainStart)()):(0,o.assertValueType)(`boolean`)}}}),c(`OptionalCallExpression`,{visitor:[`callee`,`typeParameters`,`typeArguments`,`arguments`],builder:[`callee`,`arguments`,`optional`],aliases:[`Expression`],fields:Object.assign({callee:{validate:(0,o.assertNodeType)(`Expression`)},arguments:(0,o.validateArrayOfType)(`Expression`,`SpreadElement`,`ArgumentPlaceholder`),optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,o.chain)((0,o.assertValueType)(`boolean`),(0,o.assertOptionalChainStart)()):(0,o.assertValueType)(`boolean`)},typeArguments:{validate:(0,o.assertNodeType)(`TypeParameterInstantiation`),optional:!0}},{typeParameters:{validate:(0,o.assertNodeType)(`TSTypeParameterInstantiation`),optional:!0}})}),c(`ClassProperty`,Object.assign({visitor:[`decorators`,`variance`,`key`,`typeAnnotation`,`value`],builder:[`key`,`value`,`typeAnnotation`,`decorators`,`computed`,`static`],aliases:[`Property`]},s(),{fields:Object.assign({},m(),{value:{validate:(0,o.assertNodeType)(`Expression`),optional:!0},definite:{validate:(0,o.assertValueType)(`boolean`),optional:!0},typeAnnotation:{validate:(0,o.assertNodeType)(`TypeAnnotation`,`TSTypeAnnotation`,`Noop`),optional:!0},decorators:{validate:(0,o.arrayOfType)(`Decorator`),optional:!0},readonly:{validate:(0,o.assertValueType)(`boolean`),optional:!0},declare:{validate:(0,o.assertValueType)(`boolean`),optional:!0},variance:{validate:(0,o.assertNodeType)(`Variance`),optional:!0}})})),c(`ClassAccessorProperty`,Object.assign({visitor:[`decorators`,`key`,`typeAnnotation`,`value`],builder:[`key`,`value`,`typeAnnotation`,`decorators`,`computed`,`static`],aliases:[`Property`,`Accessor`]},s(!0),{fields:Object.assign({},m(),{key:{validate:(0,o.chain)(function(){let e=(0,o.assertNodeType)(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`,`PrivateName`),t=(0,o.assertNodeType)(`Expression`);return function(n,r,i){(n.computed?t:e)(n,r,i)}}(),(0,o.assertNodeType)(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`,`Expression`,`PrivateName`))},value:{validate:(0,o.assertNodeType)(`Expression`),optional:!0},definite:{validate:(0,o.assertValueType)(`boolean`),optional:!0},typeAnnotation:{validate:(0,o.assertNodeType)(`TypeAnnotation`,`TSTypeAnnotation`,`Noop`),optional:!0},decorators:{validate:(0,o.arrayOfType)(`Decorator`),optional:!0},readonly:{validate:(0,o.assertValueType)(`boolean`),optional:!0},declare:{validate:(0,o.assertValueType)(`boolean`),optional:!0},variance:{validate:(0,o.assertNodeType)(`Variance`),optional:!0}})})),c(`ClassPrivateProperty`,{visitor:[`decorators`,`variance`,`key`,`typeAnnotation`,`value`],builder:[`key`,`value`,`decorators`,`static`],aliases:[`Property`,`Private`],fields:{key:{validate:(0,o.assertNodeType)(`PrivateName`)},value:{validate:(0,o.assertNodeType)(`Expression`),optional:!0},typeAnnotation:{validate:(0,o.assertNodeType)(`TypeAnnotation`,`TSTypeAnnotation`,`Noop`),optional:!0},decorators:{validate:(0,o.arrayOfType)(`Decorator`),optional:!0},static:{validate:(0,o.assertValueType)(`boolean`),default:!1},readonly:{validate:(0,o.assertValueType)(`boolean`),optional:!0},optional:{validate:(0,o.assertValueType)(`boolean`),optional:!0},definite:{validate:(0,o.assertValueType)(`boolean`),optional:!0},variance:{validate:(0,o.assertNodeType)(`Variance`),optional:!0}}}),c(`ClassPrivateMethod`,{builder:[`kind`,`key`,`params`,`body`,`static`],visitor:[`decorators`,`key`,`typeParameters`,`params`,`returnType`,`body`],aliases:[`Function`,`Scopable`,`BlockParent`,`FunctionParent`,`Method`,`Private`],fields:Object.assign({},h(),u(),{kind:{validate:(0,o.assertOneOf)(`get`,`set`,`method`),default:`method`},key:{validate:(0,o.assertNodeType)(`PrivateName`)},body:{validate:(0,o.assertNodeType)(`BlockStatement`)}})}),c(`PrivateName`,{visitor:[`id`],aliases:[`Private`],fields:{id:{validate:(0,o.assertNodeType)(`Identifier`)}}}),c(`StaticBlock`,{visitor:[`body`],fields:{body:(0,o.validateArrayOfType)(`Statement`)},aliases:[`Scopable`,`BlockParent`,`FunctionParent`]}),c(`ImportAttribute`,{visitor:[`key`,`value`],fields:{key:{validate:(0,o.assertNodeType)(`Identifier`,`StringLiteral`)},value:{validate:(0,o.assertNodeType)(`StringLiteral`)}}})})),Iv=V((()=>{var e=Fv(),t=Pv();let n=(0,t.defineAliasedType)(`Flow`),r=e=>{let r=e===`DeclareClass`;n(e,{builder:[`id`,`typeParameters`,`extends`,`body`],visitor:[`id`,`typeParameters`,`extends`,...r?[`mixins`,`implements`]:[],`body`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:Object.assign({id:(0,t.validateType)(`Identifier`),typeParameters:(0,t.validateOptionalType)(`TypeParameterDeclaration`),extends:(0,t.validateOptional)((0,t.arrayOfType)(`InterfaceExtends`))},r?{mixins:(0,t.validateOptional)((0,t.arrayOfType)(`InterfaceExtends`)),implements:(0,t.validateOptional)((0,t.arrayOfType)(`ClassImplements`))}:{},{body:(0,t.validateType)(`ObjectTypeAnnotation`)})})};n(`AnyTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),n(`ArrayTypeAnnotation`,{visitor:[`elementType`],aliases:[`FlowType`],fields:{elementType:(0,t.validateType)(`FlowType`)}}),n(`BooleanTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),n(`BooleanLiteralTypeAnnotation`,{builder:[`value`],aliases:[`FlowType`],fields:{value:(0,t.validate)((0,t.assertValueType)(`boolean`))}}),n(`NullLiteralTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),n(`ClassImplements`,{visitor:[`id`,`typeParameters`],fields:{id:(0,t.validateType)(`Identifier`),typeParameters:(0,t.validateOptionalType)(`TypeParameterInstantiation`)}}),r(`DeclareClass`),n(`DeclareFunction`,{builder:[`id`],visitor:[`id`,`predicate`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:(0,t.validateType)(`Identifier`),predicate:(0,t.validateOptionalType)(`DeclaredPredicate`)}}),r(`DeclareInterface`),n(`DeclareModule`,{builder:[`id`,`body`,`kind`],visitor:[`id`,`body`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:(0,t.validateType)(`Identifier`,`StringLiteral`),body:(0,t.validateType)(`BlockStatement`),kind:(0,t.validateOptional)((0,t.assertOneOf)(`CommonJS`,`ES`))}}),n(`DeclareModuleExports`,{visitor:[`typeAnnotation`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{typeAnnotation:(0,t.validateType)(`TypeAnnotation`)}}),n(`DeclareTypeAlias`,{visitor:[`id`,`typeParameters`,`right`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:(0,t.validateType)(`Identifier`),typeParameters:(0,t.validateOptionalType)(`TypeParameterDeclaration`),right:(0,t.validateType)(`FlowType`)}}),n(`DeclareOpaqueType`,{visitor:[`id`,`typeParameters`,`supertype`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:(0,t.validateType)(`Identifier`),typeParameters:(0,t.validateOptionalType)(`TypeParameterDeclaration`),supertype:(0,t.validateOptionalType)(`FlowType`),impltype:(0,t.validateOptionalType)(`FlowType`)}}),n(`DeclareVariable`,{visitor:[`id`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:(0,t.validateType)(`Identifier`)}}),n(`DeclareExportDeclaration`,{visitor:[`declaration`,`specifiers`,`source`,`attributes`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:Object.assign({declaration:(0,t.validateOptionalType)(`Flow`),specifiers:(0,t.validateOptional)((0,t.arrayOfType)(`ExportSpecifier`,`ExportNamespaceSpecifier`)),source:(0,t.validateOptionalType)(`StringLiteral`),default:(0,t.validateOptional)((0,t.assertValueType)(`boolean`))},e.importAttributes)}),n(`DeclareExportAllDeclaration`,{visitor:[`source`,`attributes`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:Object.assign({source:(0,t.validateType)(`StringLiteral`),exportKind:(0,t.validateOptional)((0,t.assertOneOf)(`type`,`value`))},e.importAttributes)}),n(`DeclaredPredicate`,{visitor:[`value`],aliases:[`FlowPredicate`],fields:{value:(0,t.validateType)(`Flow`)}}),n(`ExistsTypeAnnotation`,{aliases:[`FlowType`]}),n(`FunctionTypeAnnotation`,{builder:[`typeParameters`,`params`,`rest`,`returnType`],visitor:[`typeParameters`,`this`,`params`,`rest`,`returnType`],aliases:[`FlowType`],fields:{typeParameters:(0,t.validateOptionalType)(`TypeParameterDeclaration`),params:(0,t.validateArrayOfType)(`FunctionTypeParam`),rest:(0,t.validateOptionalType)(`FunctionTypeParam`),this:(0,t.validateOptionalType)(`FunctionTypeParam`),returnType:(0,t.validateType)(`FlowType`)}}),n(`FunctionTypeParam`,{visitor:[`name`,`typeAnnotation`],fields:{name:(0,t.validateOptionalType)(`Identifier`),typeAnnotation:(0,t.validateType)(`FlowType`),optional:(0,t.validateOptional)((0,t.assertValueType)(`boolean`))}}),n(`GenericTypeAnnotation`,{visitor:[`id`,`typeParameters`],aliases:[`FlowType`],fields:{id:(0,t.validateType)(`Identifier`,`QualifiedTypeIdentifier`),typeParameters:(0,t.validateOptionalType)(`TypeParameterInstantiation`)}}),n(`InferredPredicate`,{aliases:[`FlowPredicate`]}),n(`InterfaceExtends`,{visitor:[`id`,`typeParameters`],fields:{id:(0,t.validateType)(`Identifier`,`QualifiedTypeIdentifier`),typeParameters:(0,t.validateOptionalType)(`TypeParameterInstantiation`)}}),r(`InterfaceDeclaration`),n(`InterfaceTypeAnnotation`,{visitor:[`extends`,`body`],aliases:[`FlowType`],fields:{extends:(0,t.validateOptional)((0,t.arrayOfType)(`InterfaceExtends`)),body:(0,t.validateType)(`ObjectTypeAnnotation`)}}),n(`IntersectionTypeAnnotation`,{visitor:[`types`],aliases:[`FlowType`],fields:{types:(0,t.validate)((0,t.arrayOfType)(`FlowType`))}}),n(`MixedTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),n(`EmptyTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),n(`NullableTypeAnnotation`,{visitor:[`typeAnnotation`],aliases:[`FlowType`],fields:{typeAnnotation:(0,t.validateType)(`FlowType`)}}),n(`NumberLiteralTypeAnnotation`,{builder:[`value`],aliases:[`FlowType`],fields:{value:(0,t.validate)((0,t.assertValueType)(`number`))}}),n(`NumberTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),n(`ObjectTypeAnnotation`,{visitor:[`properties`,`indexers`,`callProperties`,`internalSlots`],aliases:[`FlowType`],builder:[`properties`,`indexers`,`callProperties`,`internalSlots`,`exact`],fields:{properties:(0,t.validate)((0,t.arrayOfType)(`ObjectTypeProperty`,`ObjectTypeSpreadProperty`)),indexers:{validate:(0,t.arrayOfType)(`ObjectTypeIndexer`),optional:!0,default:[]},callProperties:{validate:(0,t.arrayOfType)(`ObjectTypeCallProperty`),optional:!0,default:[]},internalSlots:{validate:(0,t.arrayOfType)(`ObjectTypeInternalSlot`),optional:!0,default:[]},exact:{validate:(0,t.assertValueType)(`boolean`),default:!1},inexact:(0,t.validateOptional)((0,t.assertValueType)(`boolean`))}}),n(`ObjectTypeInternalSlot`,{visitor:[`id`,`value`],builder:[`id`,`value`,`optional`,`static`,`method`],aliases:[`UserWhitespacable`],fields:{id:(0,t.validateType)(`Identifier`),value:(0,t.validateType)(`FlowType`),optional:(0,t.validate)((0,t.assertValueType)(`boolean`)),static:(0,t.validate)((0,t.assertValueType)(`boolean`)),method:(0,t.validate)((0,t.assertValueType)(`boolean`))}}),n(`ObjectTypeCallProperty`,{visitor:[`value`],aliases:[`UserWhitespacable`],fields:{value:(0,t.validateType)(`FlowType`),static:(0,t.validate)((0,t.assertValueType)(`boolean`))}}),n(`ObjectTypeIndexer`,{visitor:[`variance`,`id`,`key`,`value`],builder:[`id`,`key`,`value`,`variance`],aliases:[`UserWhitespacable`],fields:{id:(0,t.validateOptionalType)(`Identifier`),key:(0,t.validateType)(`FlowType`),value:(0,t.validateType)(`FlowType`),static:(0,t.validate)((0,t.assertValueType)(`boolean`)),variance:(0,t.validateOptionalType)(`Variance`)}}),n(`ObjectTypeProperty`,{visitor:[`key`,`value`,`variance`],aliases:[`UserWhitespacable`],fields:{key:(0,t.validateType)(`Identifier`,`StringLiteral`),value:(0,t.validateType)(`FlowType`),kind:(0,t.validate)((0,t.assertOneOf)(`init`,`get`,`set`)),static:(0,t.validate)((0,t.assertValueType)(`boolean`)),proto:(0,t.validate)((0,t.assertValueType)(`boolean`)),optional:(0,t.validate)((0,t.assertValueType)(`boolean`)),variance:(0,t.validateOptionalType)(`Variance`),method:(0,t.validate)((0,t.assertValueType)(`boolean`))}}),n(`ObjectTypeSpreadProperty`,{visitor:[`argument`],aliases:[`UserWhitespacable`],fields:{argument:(0,t.validateType)(`FlowType`)}}),n(`OpaqueType`,{visitor:[`id`,`typeParameters`,`supertype`,`impltype`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:(0,t.validateType)(`Identifier`),typeParameters:(0,t.validateOptionalType)(`TypeParameterDeclaration`),supertype:(0,t.validateOptionalType)(`FlowType`),impltype:(0,t.validateType)(`FlowType`)}}),n(`QualifiedTypeIdentifier`,{visitor:[`qualification`,`id`],builder:[`id`,`qualification`],fields:{id:(0,t.validateType)(`Identifier`),qualification:(0,t.validateType)(`Identifier`,`QualifiedTypeIdentifier`)}}),n(`StringLiteralTypeAnnotation`,{builder:[`value`],aliases:[`FlowType`],fields:{value:(0,t.validate)((0,t.assertValueType)(`string`))}}),n(`StringTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),n(`SymbolTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),n(`ThisTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),n(`TupleTypeAnnotation`,{visitor:[`types`],aliases:[`FlowType`],fields:{types:(0,t.validate)((0,t.arrayOfType)(`FlowType`))}}),n(`TypeofTypeAnnotation`,{visitor:[`argument`],aliases:[`FlowType`],fields:{argument:(0,t.validateType)(`FlowType`)}}),n(`TypeAlias`,{visitor:[`id`,`typeParameters`,`right`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:(0,t.validateType)(`Identifier`),typeParameters:(0,t.validateOptionalType)(`TypeParameterDeclaration`),right:(0,t.validateType)(`FlowType`)}}),n(`TypeAnnotation`,{visitor:[`typeAnnotation`],fields:{typeAnnotation:(0,t.validateType)(`FlowType`)}}),n(`TypeCastExpression`,{visitor:[`expression`,`typeAnnotation`],aliases:[`ExpressionWrapper`,`Expression`],fields:{expression:(0,t.validateType)(`Expression`),typeAnnotation:(0,t.validateType)(`TypeAnnotation`)}}),n(`TypeParameter`,{visitor:[`bound`,`default`,`variance`],fields:{name:(0,t.validate)((0,t.assertValueType)(`string`)),bound:(0,t.validateOptionalType)(`TypeAnnotation`),default:(0,t.validateOptionalType)(`FlowType`),variance:(0,t.validateOptionalType)(`Variance`)}}),n(`TypeParameterDeclaration`,{visitor:[`params`],fields:{params:(0,t.validate)((0,t.arrayOfType)(`TypeParameter`))}}),n(`TypeParameterInstantiation`,{visitor:[`params`],fields:{params:(0,t.validate)((0,t.arrayOfType)(`FlowType`))}}),n(`UnionTypeAnnotation`,{visitor:[`types`],aliases:[`FlowType`],fields:{types:(0,t.validate)((0,t.arrayOfType)(`FlowType`))}}),n(`Variance`,{builder:[`kind`],fields:{kind:(0,t.validate)((0,t.assertOneOf)(`minus`,`plus`))}}),n(`VoidTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),n(`EnumDeclaration`,{aliases:[`Statement`,`Declaration`],visitor:[`id`,`body`],fields:{id:(0,t.validateType)(`Identifier`),body:(0,t.validateType)(`EnumBooleanBody`,`EnumNumberBody`,`EnumStringBody`,`EnumSymbolBody`)}}),n(`EnumBooleanBody`,{aliases:[`EnumBody`],visitor:[`members`],fields:{explicitType:(0,t.validate)((0,t.assertValueType)(`boolean`)),members:(0,t.validateArrayOfType)(`EnumBooleanMember`),hasUnknownMembers:(0,t.validate)((0,t.assertValueType)(`boolean`))}}),n(`EnumNumberBody`,{aliases:[`EnumBody`],visitor:[`members`],fields:{explicitType:(0,t.validate)((0,t.assertValueType)(`boolean`)),members:(0,t.validateArrayOfType)(`EnumNumberMember`),hasUnknownMembers:(0,t.validate)((0,t.assertValueType)(`boolean`))}}),n(`EnumStringBody`,{aliases:[`EnumBody`],visitor:[`members`],fields:{explicitType:(0,t.validate)((0,t.assertValueType)(`boolean`)),members:(0,t.validateArrayOfType)(`EnumStringMember`,`EnumDefaultedMember`),hasUnknownMembers:(0,t.validate)((0,t.assertValueType)(`boolean`))}}),n(`EnumSymbolBody`,{aliases:[`EnumBody`],visitor:[`members`],fields:{members:(0,t.validateArrayOfType)(`EnumDefaultedMember`),hasUnknownMembers:(0,t.validate)((0,t.assertValueType)(`boolean`))}}),n(`EnumBooleanMember`,{aliases:[`EnumMember`],builder:[`id`],visitor:[`id`,`init`],fields:{id:(0,t.validateType)(`Identifier`),init:(0,t.validateType)(`BooleanLiteral`)}}),n(`EnumNumberMember`,{aliases:[`EnumMember`],visitor:[`id`,`init`],fields:{id:(0,t.validateType)(`Identifier`),init:(0,t.validateType)(`NumericLiteral`)}}),n(`EnumStringMember`,{aliases:[`EnumMember`],visitor:[`id`,`init`],fields:{id:(0,t.validateType)(`Identifier`),init:(0,t.validateType)(`StringLiteral`)}}),n(`EnumDefaultedMember`,{aliases:[`EnumMember`],visitor:[`id`],fields:{id:(0,t.validateType)(`Identifier`)}}),n(`IndexedAccessType`,{visitor:[`objectType`,`indexType`],aliases:[`FlowType`],fields:{objectType:(0,t.validateType)(`FlowType`),indexType:(0,t.validateType)(`FlowType`)}}),n(`OptionalIndexedAccessType`,{visitor:[`objectType`,`indexType`],aliases:[`FlowType`],fields:{objectType:(0,t.validateType)(`FlowType`),indexType:(0,t.validateType)(`FlowType`),optional:(0,t.validate)((0,t.assertValueType)(`boolean`))}})})),Lv=V((()=>{var e=Pv();let t=(0,e.defineAliasedType)(`JSX`);t(`JSXAttribute`,{visitor:[`name`,`value`],aliases:[`Immutable`],fields:{name:{validate:(0,e.assertNodeType)(`JSXIdentifier`,`JSXNamespacedName`)},value:{optional:!0,validate:(0,e.assertNodeType)(`JSXElement`,`JSXFragment`,`StringLiteral`,`JSXExpressionContainer`)}}}),t(`JSXClosingElement`,{visitor:[`name`],aliases:[`Immutable`],fields:{name:{validate:(0,e.assertNodeType)(`JSXIdentifier`,`JSXMemberExpression`,`JSXNamespacedName`)}}}),t(`JSXElement`,{builder:[`openingElement`,`closingElement`,`children`,`selfClosing`],visitor:[`openingElement`,`children`,`closingElement`],aliases:[`Immutable`,`Expression`],fields:Object.assign({openingElement:{validate:(0,e.assertNodeType)(`JSXOpeningElement`)},closingElement:{optional:!0,validate:(0,e.assertNodeType)(`JSXClosingElement`)},children:(0,e.validateArrayOfType)(`JSXText`,`JSXExpressionContainer`,`JSXSpreadChild`,`JSXElement`,`JSXFragment`)},{selfClosing:{validate:(0,e.assertValueType)(`boolean`),optional:!0}})}),t(`JSXEmptyExpression`,{}),t(`JSXExpressionContainer`,{visitor:[`expression`],aliases:[`Immutable`],fields:{expression:{validate:(0,e.assertNodeType)(`Expression`,`JSXEmptyExpression`)}}}),t(`JSXSpreadChild`,{visitor:[`expression`],aliases:[`Immutable`],fields:{expression:{validate:(0,e.assertNodeType)(`Expression`)}}}),t(`JSXIdentifier`,{builder:[`name`],fields:{name:{validate:(0,e.assertValueType)(`string`)}}}),t(`JSXMemberExpression`,{visitor:[`object`,`property`],fields:{object:{validate:(0,e.assertNodeType)(`JSXMemberExpression`,`JSXIdentifier`)},property:{validate:(0,e.assertNodeType)(`JSXIdentifier`)}}}),t(`JSXNamespacedName`,{visitor:[`namespace`,`name`],fields:{namespace:{validate:(0,e.assertNodeType)(`JSXIdentifier`)},name:{validate:(0,e.assertNodeType)(`JSXIdentifier`)}}}),t(`JSXOpeningElement`,{builder:[`name`,`attributes`,`selfClosing`],visitor:[`name`,`typeParameters`,`typeArguments`,`attributes`],aliases:[`Immutable`],fields:Object.assign({name:{validate:(0,e.assertNodeType)(`JSXIdentifier`,`JSXMemberExpression`,`JSXNamespacedName`)},selfClosing:{default:!1},attributes:(0,e.validateArrayOfType)(`JSXAttribute`,`JSXSpreadAttribute`),typeArguments:{validate:(0,e.assertNodeType)(`TypeParameterInstantiation`),optional:!0}},{typeParameters:{validate:(0,e.assertNodeType)(`TSTypeParameterInstantiation`),optional:!0}})}),t(`JSXSpreadAttribute`,{visitor:[`argument`],fields:{argument:{validate:(0,e.assertNodeType)(`Expression`)}}}),t(`JSXText`,{aliases:[`Immutable`],builder:[`value`],fields:{value:{validate:(0,e.assertValueType)(`string`)}}}),t(`JSXFragment`,{builder:[`openingFragment`,`closingFragment`,`children`],visitor:[`openingFragment`,`children`,`closingFragment`],aliases:[`Immutable`,`Expression`],fields:{openingFragment:{validate:(0,e.assertNodeType)(`JSXOpeningFragment`)},closingFragment:{validate:(0,e.assertNodeType)(`JSXClosingFragment`)},children:(0,e.validateArrayOfType)(`JSXText`,`JSXExpressionContainer`,`JSXSpreadChild`,`JSXElement`,`JSXFragment`)}}),t(`JSXOpeningFragment`,{aliases:[`Immutable`]}),t(`JSXClosingFragment`,{aliases:[`Immutable`]})})),Rv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PLACEHOLDERS_FLIPPED_ALIAS=e.PLACEHOLDERS_ALIAS=e.PLACEHOLDERS=void 0;var t=Pv();let n=e.PLACEHOLDERS=[`Identifier`,`StringLiteral`,`Expression`,`Statement`,`Declaration`,`BlockStatement`,`ClassBody`,`Pattern`],r=e.PLACEHOLDERS_ALIAS={Declaration:[`Statement`],Pattern:[`PatternLike`,`LVal`]};for(let e of n){let n=t.ALIAS_KEYS[e];n!=null&&n.length&&(r[e]=n)}let i=e.PLACEHOLDERS_FLIPPED_ALIAS={};Object.keys(r).forEach(e=>{r[e].forEach(t=>{hasOwnProperty.call(i,t)||(i[t]=[]),i[t].push(e)})})})),zv=V((()=>{var e=Pv(),t=Rv(),n=Fv();let r=(0,e.defineAliasedType)(`Miscellaneous`);r(`Noop`,{visitor:[]}),r(`Placeholder`,{visitor:[],builder:[`expectedNode`,`name`],fields:Object.assign({name:{validate:(0,e.assertNodeType)(`Identifier`)},expectedNode:{validate:(0,e.assertOneOf)(...t.PLACEHOLDERS)}},(0,n.patternLikeCommon)())}),r(`V8IntrinsicIdentifier`,{builder:[`name`],fields:{name:{validate:(0,e.assertValueType)(`string`)}}})})),Bv=V((()=>{var e=Pv();(0,e.default)(`ArgumentPlaceholder`,{}),(0,e.default)(`BindExpression`,{visitor:[`object`,`callee`],aliases:[`Expression`],fields:process.env.BABEL_TYPES_8_BREAKING?{object:{validate:(0,e.assertNodeType)(`Expression`)},callee:{validate:(0,e.assertNodeType)(`Expression`)}}:{object:{validate:Object.assign(()=>{},{oneOfNodeTypes:[`Expression`]})},callee:{validate:Object.assign(()=>{},{oneOfNodeTypes:[`Expression`]})}}}),(0,e.default)(`Decorator`,{visitor:[`expression`],fields:{expression:{validate:(0,e.assertNodeType)(`Expression`)}}}),(0,e.default)(`DoExpression`,{visitor:[`body`],builder:[`body`,`async`],aliases:[`Expression`],fields:{body:{validate:(0,e.assertNodeType)(`BlockStatement`)},async:{validate:(0,e.assertValueType)(`boolean`),default:!1}}}),(0,e.default)(`ExportDefaultSpecifier`,{visitor:[`exported`],aliases:[`ModuleSpecifier`],fields:{exported:{validate:(0,e.assertNodeType)(`Identifier`)}}}),(0,e.default)(`RecordExpression`,{visitor:[`properties`],aliases:[`Expression`],fields:{properties:(0,e.validateArrayOfType)(`ObjectProperty`,`SpreadElement`)}}),(0,e.default)(`TupleExpression`,{fields:{elements:{validate:(0,e.arrayOfType)(`Expression`,`SpreadElement`),default:[]}},visitor:[`elements`],aliases:[`Expression`]}),(0,e.default)(`DecimalLiteral`,{builder:[`value`],fields:{value:{validate:(0,e.assertValueType)(`string`)}},aliases:[`Expression`,`Pureish`,`Literal`,`Immutable`]}),(0,e.default)(`ModuleExpression`,{visitor:[`body`],fields:{body:{validate:(0,e.assertNodeType)(`Program`)}},aliases:[`Expression`]}),(0,e.default)(`TopicReference`,{aliases:[`Expression`]}),(0,e.default)(`PipelineTopicExpression`,{builder:[`expression`],visitor:[`expression`],fields:{expression:{validate:(0,e.assertNodeType)(`Expression`)}},aliases:[`Expression`]}),(0,e.default)(`PipelineBareFunction`,{builder:[`callee`],visitor:[`callee`],fields:{callee:{validate:(0,e.assertNodeType)(`Expression`)}},aliases:[`Expression`]}),(0,e.default)(`PipelinePrimaryTopicReference`,{aliases:[`Expression`]}),(0,e.default)(`VoidPattern`,{aliases:[`Pattern`,`PatternLike`,`FunctionParameter`]})})),Vv=V((()=>{var e=Pv(),t=Fv(),n=Dv();let r=(0,e.defineAliasedType)(`TypeScript`),i=(0,e.assertValueType)(`boolean`),a=()=>({returnType:{validate:(0,e.assertNodeType)(`TSTypeAnnotation`,`Noop`),optional:!0},typeParameters:{validate:(0,e.assertNodeType)(`TSTypeParameterDeclaration`,`Noop`),optional:!0}});r(`TSParameterProperty`,{aliases:[`LVal`],visitor:[`parameter`],fields:{accessibility:{validate:(0,e.assertOneOf)(`public`,`private`,`protected`),optional:!0},readonly:{validate:(0,e.assertValueType)(`boolean`),optional:!0},parameter:{validate:(0,e.assertNodeType)(`Identifier`,`AssignmentPattern`)},override:{validate:(0,e.assertValueType)(`boolean`),optional:!0},decorators:{validate:(0,e.arrayOfType)(`Decorator`),optional:!0}}}),r(`TSDeclareFunction`,{aliases:[`Statement`,`Declaration`],visitor:[`id`,`typeParameters`,`params`,`returnType`],fields:Object.assign({},(0,t.functionDeclarationCommon)(),a())}),r(`TSDeclareMethod`,Object.assign({visitor:[`decorators`,`key`,`typeParameters`,`params`,`returnType`]},(0,t.classMethodOrPropertyUnionShapeCommon)(),{fields:Object.assign({},(0,t.classMethodOrDeclareMethodCommon)(),a())})),r(`TSQualifiedName`,{aliases:[`TSEntityName`],visitor:[`left`,`right`],fields:{left:(0,e.validateType)(`TSEntityName`),right:(0,e.validateType)(`Identifier`)}});let o=()=>({typeParameters:(0,e.validateOptionalType)(`TSTypeParameterDeclaration`),parameters:(0,e.validateArrayOfType)(`ArrayPattern`,`Identifier`,`ObjectPattern`,`RestElement`),typeAnnotation:(0,e.validateOptionalType)(`TSTypeAnnotation`)}),s={aliases:[`TSTypeElement`],visitor:[`typeParameters`,`parameters`,`typeAnnotation`],fields:o()};r(`TSCallSignatureDeclaration`,s),r(`TSConstructSignatureDeclaration`,s);let c=()=>({key:(0,e.validateType)(`Expression`),computed:{default:!1},optional:(0,e.validateOptional)(i)});r(`TSPropertySignature`,{aliases:[`TSTypeElement`],visitor:[`key`,`typeAnnotation`],fields:Object.assign({},c(),{readonly:(0,e.validateOptional)(i),typeAnnotation:(0,e.validateOptionalType)(`TSTypeAnnotation`),kind:{optional:!0,validate:(0,e.assertOneOf)(`get`,`set`)}})}),r(`TSMethodSignature`,{aliases:[`TSTypeElement`],visitor:[`key`,`typeParameters`,`parameters`,`typeAnnotation`],fields:Object.assign({},o(),c(),{kind:{validate:(0,e.assertOneOf)(`method`,`get`,`set`)}})}),r(`TSIndexSignature`,{aliases:[`TSTypeElement`],visitor:[`parameters`,`typeAnnotation`],fields:{readonly:(0,e.validateOptional)(i),static:(0,e.validateOptional)(i),parameters:(0,e.validateArrayOfType)(`Identifier`),typeAnnotation:(0,e.validateOptionalType)(`TSTypeAnnotation`)}});for(let e of[`TSAnyKeyword`,`TSBooleanKeyword`,`TSBigIntKeyword`,`TSIntrinsicKeyword`,`TSNeverKeyword`,`TSNullKeyword`,`TSNumberKeyword`,`TSObjectKeyword`,`TSStringKeyword`,`TSSymbolKeyword`,`TSUndefinedKeyword`,`TSUnknownKeyword`,`TSVoidKeyword`])r(e,{aliases:[`TSType`,`TSBaseType`],visitor:[],fields:{}});r(`TSThisType`,{aliases:[`TSType`,`TSBaseType`],visitor:[],fields:{}});let l={aliases:[`TSType`],visitor:[`typeParameters`,`parameters`,`typeAnnotation`]};r(`TSFunctionType`,Object.assign({},l,{fields:o()})),r(`TSConstructorType`,Object.assign({},l,{fields:Object.assign({},o(),{abstract:(0,e.validateOptional)(i)})})),r(`TSTypeReference`,{aliases:[`TSType`],visitor:[`typeName`,`typeParameters`],fields:{typeName:(0,e.validateType)(`TSEntityName`),typeParameters:(0,e.validateOptionalType)(`TSTypeParameterInstantiation`)}}),r(`TSTypePredicate`,{aliases:[`TSType`],visitor:[`parameterName`,`typeAnnotation`],builder:[`parameterName`,`typeAnnotation`,`asserts`],fields:{parameterName:(0,e.validateType)(`Identifier`,`TSThisType`),typeAnnotation:(0,e.validateOptionalType)(`TSTypeAnnotation`),asserts:(0,e.validateOptional)(i)}}),r(`TSTypeQuery`,{aliases:[`TSType`],visitor:[`exprName`,`typeParameters`],fields:{exprName:(0,e.validateType)(`TSEntityName`,`TSImportType`),typeParameters:(0,e.validateOptionalType)(`TSTypeParameterInstantiation`)}}),r(`TSTypeLiteral`,{aliases:[`TSType`],visitor:[`members`],fields:{members:(0,e.validateArrayOfType)(`TSTypeElement`)}}),r(`TSArrayType`,{aliases:[`TSType`],visitor:[`elementType`],fields:{elementType:(0,e.validateType)(`TSType`)}}),r(`TSTupleType`,{aliases:[`TSType`],visitor:[`elementTypes`],fields:{elementTypes:(0,e.validateArrayOfType)(`TSType`,`TSNamedTupleMember`)}}),r(`TSOptionalType`,{aliases:[`TSType`],visitor:[`typeAnnotation`],fields:{typeAnnotation:(0,e.validateType)(`TSType`)}}),r(`TSRestType`,{aliases:[`TSType`],visitor:[`typeAnnotation`],fields:{typeAnnotation:(0,e.validateType)(`TSType`)}}),r(`TSNamedTupleMember`,{visitor:[`label`,`elementType`],builder:[`label`,`elementType`,`optional`],fields:{label:(0,e.validateType)(`Identifier`),optional:{validate:i,default:!1},elementType:(0,e.validateType)(`TSType`)}});let u={aliases:[`TSType`],visitor:[`types`],fields:{types:(0,e.validateArrayOfType)(`TSType`)}};r(`TSUnionType`,u),r(`TSIntersectionType`,u),r(`TSConditionalType`,{aliases:[`TSType`],visitor:[`checkType`,`extendsType`,`trueType`,`falseType`],fields:{checkType:(0,e.validateType)(`TSType`),extendsType:(0,e.validateType)(`TSType`),trueType:(0,e.validateType)(`TSType`),falseType:(0,e.validateType)(`TSType`)}}),r(`TSInferType`,{aliases:[`TSType`],visitor:[`typeParameter`],fields:{typeParameter:(0,e.validateType)(`TSTypeParameter`)}}),r(`TSParenthesizedType`,{aliases:[`TSType`],visitor:[`typeAnnotation`],fields:{typeAnnotation:(0,e.validateType)(`TSType`)}}),r(`TSTypeOperator`,{aliases:[`TSType`],visitor:[`typeAnnotation`],builder:[`typeAnnotation`,`operator`],fields:{operator:{validate:(0,e.assertValueType)(`string`),default:`keyof`},typeAnnotation:(0,e.validateType)(`TSType`)}}),r(`TSIndexedAccessType`,{aliases:[`TSType`],visitor:[`objectType`,`indexType`],fields:{objectType:(0,e.validateType)(`TSType`),indexType:(0,e.validateType)(`TSType`)}}),r(`TSMappedType`,{aliases:[`TSType`],visitor:[`typeParameter`,`nameType`,`typeAnnotation`],builder:[`typeParameter`,`typeAnnotation`,`nameType`],fields:Object.assign({},{typeParameter:(0,e.validateType)(`TSTypeParameter`)},{readonly:(0,e.validateOptional)((0,e.assertOneOf)(!0,!1,`+`,`-`)),optional:(0,e.validateOptional)((0,e.assertOneOf)(!0,!1,`+`,`-`)),typeAnnotation:(0,e.validateOptionalType)(`TSType`),nameType:(0,e.validateOptionalType)(`TSType`)})}),r(`TSTemplateLiteralType`,{aliases:[`TSType`,`TSBaseType`],visitor:[`quasis`,`types`],fields:{quasis:(0,e.validateArrayOfType)(`TemplateElement`),types:{validate:(0,e.chain)((0,e.assertValueType)(`array`),(0,e.assertEach)((0,e.assertNodeType)(`TSType`)),function(e,t,n){if(e.quasis.length!==n.length+1)throw TypeError(`Number of ${e.type} quasis should be exactly one more than the number of types.\nExpected ${n.length+1} quasis but got ${e.quasis.length}`)})}}}),r(`TSLiteralType`,{aliases:[`TSType`,`TSBaseType`],visitor:[`literal`],fields:{literal:{validate:function(){let t=(0,e.assertNodeType)(`NumericLiteral`,`BigIntLiteral`),r=(0,e.assertOneOf)(`-`),i=(0,e.assertNodeType)(`NumericLiteral`,`StringLiteral`,`BooleanLiteral`,`BigIntLiteral`,`TemplateLiteral`),a=function(e,a,o){(0,n.default)(`UnaryExpression`,o)?(r(o,`operator`,o.operator),t(o,`argument`,o.argument)):i(e,a,o)};return a.oneOfNodeTypes=[`NumericLiteral`,`StringLiteral`,`BooleanLiteral`,`BigIntLiteral`,`TemplateLiteral`,`UnaryExpression`],a}()}}}),r(`TSExpressionWithTypeArguments`,{aliases:[`TSType`],visitor:[`expression`,`typeParameters`],fields:{expression:(0,e.validateType)(`TSEntityName`),typeParameters:(0,e.validateOptionalType)(`TSTypeParameterInstantiation`)}}),r(`TSInterfaceDeclaration`,{aliases:[`Statement`,`Declaration`],visitor:[`id`,`typeParameters`,`extends`,`body`],fields:{declare:(0,e.validateOptional)(i),id:(0,e.validateType)(`Identifier`),typeParameters:(0,e.validateOptionalType)(`TSTypeParameterDeclaration`),extends:(0,e.validateOptional)((0,e.arrayOfType)(`TSExpressionWithTypeArguments`)),body:(0,e.validateType)(`TSInterfaceBody`)}}),r(`TSInterfaceBody`,{visitor:[`body`],fields:{body:(0,e.validateArrayOfType)(`TSTypeElement`)}}),r(`TSTypeAliasDeclaration`,{aliases:[`Statement`,`Declaration`],visitor:[`id`,`typeParameters`,`typeAnnotation`],fields:{declare:(0,e.validateOptional)(i),id:(0,e.validateType)(`Identifier`),typeParameters:(0,e.validateOptionalType)(`TSTypeParameterDeclaration`),typeAnnotation:(0,e.validateType)(`TSType`)}}),r(`TSInstantiationExpression`,{aliases:[`Expression`],visitor:[`expression`,`typeParameters`],fields:{expression:(0,e.validateType)(`Expression`),typeParameters:(0,e.validateOptionalType)(`TSTypeParameterInstantiation`)}});let d={aliases:[`Expression`,`LVal`,`PatternLike`],visitor:[`expression`,`typeAnnotation`],fields:{expression:(0,e.validateType)(`Expression`),typeAnnotation:(0,e.validateType)(`TSType`)}};r(`TSAsExpression`,d),r(`TSSatisfiesExpression`,d),r(`TSTypeAssertion`,{aliases:[`Expression`,`LVal`,`PatternLike`],visitor:[`typeAnnotation`,`expression`],fields:{typeAnnotation:(0,e.validateType)(`TSType`),expression:(0,e.validateType)(`Expression`)}}),r(`TSEnumBody`,{visitor:[`members`],fields:{members:(0,e.validateArrayOfType)(`TSEnumMember`)}}),r(`TSEnumDeclaration`,{aliases:[`Statement`,`Declaration`],visitor:[`id`,`members`],fields:{declare:(0,e.validateOptional)(i),const:(0,e.validateOptional)(i),id:(0,e.validateType)(`Identifier`),members:(0,e.validateArrayOfType)(`TSEnumMember`),initializer:(0,e.validateOptionalType)(`Expression`),body:(0,e.validateOptionalType)(`TSEnumBody`)}}),r(`TSEnumMember`,{visitor:[`id`,`initializer`],fields:{id:(0,e.validateType)(`Identifier`,`StringLiteral`),initializer:(0,e.validateOptionalType)(`Expression`)}}),r(`TSModuleDeclaration`,{aliases:[`Statement`,`Declaration`],visitor:[`id`,`body`],fields:Object.assign({kind:{validate:(0,e.assertOneOf)(`global`,`module`,`namespace`)},declare:(0,e.validateOptional)(i)},{global:(0,e.validateOptional)(i)},{id:(0,e.validateType)(`Identifier`,`StringLiteral`),body:(0,e.validateType)(`TSModuleBlock`,`TSModuleDeclaration`)})}),r(`TSModuleBlock`,{aliases:[`Scopable`,`Block`,`BlockParent`,`FunctionParent`],visitor:[`body`],fields:{body:(0,e.validateArrayOfType)(`Statement`)}}),r(`TSImportType`,{aliases:[`TSType`],builder:[`argument`,`qualifier`,`typeParameters`],visitor:[`argument`,`options`,`qualifier`,`typeParameters`],fields:Object.assign({},{argument:(0,e.validateType)(`StringLiteral`)},{qualifier:(0,e.validateOptionalType)(`TSEntityName`)},{typeParameters:(0,e.validateOptionalType)(`TSTypeParameterInstantiation`)},{options:{validate:(0,e.assertNodeType)(`ObjectExpression`),optional:!0}})}),r(`TSImportEqualsDeclaration`,{aliases:[`Statement`,`Declaration`],visitor:[`id`,`moduleReference`],fields:Object.assign({},{isExport:(0,e.validate)(i)},{id:(0,e.validateType)(`Identifier`),moduleReference:(0,e.validateType)(`TSEntityName`,`TSExternalModuleReference`),importKind:{validate:(0,e.assertOneOf)(`type`,`value`),optional:!0}})}),r(`TSExternalModuleReference`,{visitor:[`expression`],fields:{expression:(0,e.validateType)(`StringLiteral`)}}),r(`TSNonNullExpression`,{aliases:[`Expression`,`LVal`,`PatternLike`],visitor:[`expression`],fields:{expression:(0,e.validateType)(`Expression`)}}),r(`TSExportAssignment`,{aliases:[`Statement`],visitor:[`expression`],fields:{expression:(0,e.validateType)(`Expression`)}}),r(`TSNamespaceExportDeclaration`,{aliases:[`Statement`],visitor:[`id`],fields:{id:(0,e.validateType)(`Identifier`)}}),r(`TSTypeAnnotation`,{visitor:[`typeAnnotation`],fields:{typeAnnotation:{validate:(0,e.assertNodeType)(`TSType`)}}}),r(`TSTypeParameterInstantiation`,{visitor:[`params`],fields:{params:(0,e.validateArrayOfType)(`TSType`)}}),r(`TSTypeParameterDeclaration`,{visitor:[`params`],fields:{params:(0,e.validateArrayOfType)(`TSTypeParameter`)}}),r(`TSTypeParameter`,{builder:[`constraint`,`default`,`name`],visitor:[`constraint`,`default`],fields:{name:{validate:(0,e.assertValueType)(`string`)},in:{validate:(0,e.assertValueType)(`boolean`),optional:!0},out:{validate:(0,e.assertValueType)(`boolean`),optional:!0},const:{validate:(0,e.assertValueType)(`boolean`),optional:!0},constraint:{validate:(0,e.assertNodeType)(`TSType`),optional:!0},default:{validate:(0,e.assertNodeType)(`TSType`),optional:!0}}})})),Hv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DEPRECATED_ALIASES=void 0,e.DEPRECATED_ALIASES={ModuleDeclaration:`ImportOrExportDeclaration`}})),Uv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`ALIAS_KEYS`,{enumerable:!0,get:function(){return t.ALIAS_KEYS}}),Object.defineProperty(e,`BUILDER_KEYS`,{enumerable:!0,get:function(){return t.BUILDER_KEYS}}),Object.defineProperty(e,`DEPRECATED_ALIASES`,{enumerable:!0,get:function(){return r.DEPRECATED_ALIASES}}),Object.defineProperty(e,`DEPRECATED_KEYS`,{enumerable:!0,get:function(){return t.DEPRECATED_KEYS}}),Object.defineProperty(e,`FLIPPED_ALIAS_KEYS`,{enumerable:!0,get:function(){return t.FLIPPED_ALIAS_KEYS}}),Object.defineProperty(e,`NODE_FIELDS`,{enumerable:!0,get:function(){return t.NODE_FIELDS}}),Object.defineProperty(e,`NODE_PARENT_VALIDATIONS`,{enumerable:!0,get:function(){return t.NODE_PARENT_VALIDATIONS}}),Object.defineProperty(e,`NODE_UNION_SHAPES__PRIVATE`,{enumerable:!0,get:function(){return t.NODE_UNION_SHAPES__PRIVATE}}),Object.defineProperty(e,`PLACEHOLDERS`,{enumerable:!0,get:function(){return n.PLACEHOLDERS}}),Object.defineProperty(e,`PLACEHOLDERS_ALIAS`,{enumerable:!0,get:function(){return n.PLACEHOLDERS_ALIAS}}),Object.defineProperty(e,`PLACEHOLDERS_FLIPPED_ALIAS`,{enumerable:!0,get:function(){return n.PLACEHOLDERS_FLIPPED_ALIAS}}),e.TYPES=void 0,Object.defineProperty(e,`VISITOR_KEYS`,{enumerable:!0,get:function(){return t.VISITOR_KEYS}}),Fv(),Iv(),Lv(),zv(),Bv(),Vv();var t=Pv(),n=Rv(),r=Hv();Object.keys(r.DEPRECATED_ALIASES).forEach(e=>{t.FLIPPED_ALIAS_KEYS[e]=t.FLIPPED_ALIAS_KEYS[r.DEPRECATED_ALIASES[e]]});for(let{types:e,set:n}of t.allExpandedTypes)for(let r of e){let e=t.FLIPPED_ALIAS_KEYS[r];e?e.forEach(n.add,n):n.add(r)}e.TYPES=[].concat(Object.keys(t.VISITOR_KEYS),Object.keys(t.FLIPPED_ALIAS_KEYS),Object.keys(t.DEPRECATED_KEYS))})),Wv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n,e.validateChild=a,e.validateField=i,e.validateInternal=r;var t=Uv();function n(e,n,r){if(!e)return;let o=t.NODE_FIELDS[e.type];if(!o)return;let s=o[n];i(e,n,r,s),a(e,n,r)}function r(e,n,r,i,a){if(e!=null&&e.validate&&!(e.optional&&i==null)&&(e.validate(n,r,i),a)){var o;let e=i.type;if(e==null)return;(o=t.NODE_PARENT_VALIDATIONS[e])==null||o.call(t.NODE_PARENT_VALIDATIONS,n,r,i)}}function i(e,t,n,r){r!=null&&r.validate&&(r.optional&&n==null||r.validate(e,t,n))}function a(e,n,r){var i;let a=r?.type;a!=null&&((i=t.NODE_PARENT_VALIDATIONS[a])==null||i.call(t.NODE_PARENT_VALIDATIONS,e,n,r))}})),Gv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.anyTypeAnnotation=Qe,e.argumentPlaceholder=Dn,e.arrayExpression=s,e.arrayPattern=ve,e.arrayTypeAnnotation=$e,e.arrowFunctionExpression=ye,e.assignmentExpression=c,e.assignmentPattern=_e,e.awaitExpression=Ve,e.bigIntLiteral=o,e.binaryExpression=l,e.bindExpression=On,e.blockStatement=p,e.booleanLiteral=ne,e.booleanLiteralTypeAnnotation=tt,e.booleanTypeAnnotation=et,e.breakStatement=m,e.callExpression=h,e.catchClause=g,e.classAccessorProperty=Ke,e.classBody=be,e.classDeclaration=Se,e.classExpression=xe,e.classImplements=rt,e.classMethod=Ne,e.classPrivateMethod=Je,e.classPrivateProperty=qe,e.classProperty=Ge,e.conditionalExpression=_,e.continueStatement=v,e.debuggerStatement=y,e.decimalLiteral=Pn,e.declareClass=it,e.declareExportAllDeclaration=pt,e.declareExportDeclaration=ft,e.declareFunction=at,e.declareInterface=ot,e.declareModule=st,e.declareModuleExports=ct,e.declareOpaqueType=ut,e.declareTypeAlias=lt,e.declareVariable=dt,e.declaredPredicate=mt,e.decorator=kn,e.directive=d,e.directiveLiteral=f,e.doExpression=An,e.doWhileStatement=b,e.emptyStatement=x,e.emptyTypeAnnotation=Tt,e.enumBooleanBody=Qt,e.enumBooleanMember=nn,e.enumDeclaration=Zt,e.enumDefaultedMember=on,e.enumNumberBody=$t,e.enumNumberMember=rn,e.enumStringBody=en,e.enumStringMember=an,e.enumSymbolBody=tn,e.existsTypeAnnotation=ht,e.exportAllDeclaration=Ce,e.exportDefaultDeclaration=we,e.exportDefaultSpecifier=jn,e.exportNamedDeclaration=Te,e.exportNamespaceSpecifier=Ue,e.exportSpecifier=Ee,e.expressionStatement=S,e.file=C,e.forInStatement=w,e.forOfStatement=De,e.forStatement=T,e.functionDeclaration=E,e.functionExpression=D,e.functionTypeAnnotation=gt,e.functionTypeParam=_t,e.genericTypeAnnotation=vt,e.identifier=O,e.ifStatement=k,e.import=He,e.importAttribute=Ze,e.importDeclaration=Oe,e.importDefaultSpecifier=V,e.importExpression=je,e.importNamespaceSpecifier=ke,e.importSpecifier=Ae,e.indexedAccessType=sn,e.inferredPredicate=yt,e.interfaceDeclaration=xt,e.interfaceExtends=bt,e.interfaceTypeAnnotation=St,e.interpreterDirective=u,e.intersectionTypeAnnotation=Ct,e.jSXAttribute=e.jsxAttribute=ln,e.jSXClosingElement=e.jsxClosingElement=un,e.jSXClosingFragment=e.jsxClosingFragment=Cn,e.jSXElement=e.jsxElement=dn,e.jSXEmptyExpression=e.jsxEmptyExpression=fn,e.jSXExpressionContainer=e.jsxExpressionContainer=pn,e.jSXFragment=e.jsxFragment=xn,e.jSXIdentifier=e.jsxIdentifier=hn,e.jSXMemberExpression=e.jsxMemberExpression=gn,e.jSXNamespacedName=e.jsxNamespacedName=_n,e.jSXOpeningElement=e.jsxOpeningElement=vn,e.jSXOpeningFragment=e.jsxOpeningFragment=Sn,e.jSXSpreadAttribute=e.jsxSpreadAttribute=yn,e.jSXSpreadChild=e.jsxSpreadChild=mn,e.jSXText=e.jsxText=bn,e.labeledStatement=A,e.logicalExpression=N,e.memberExpression=re,e.metaProperty=Me,e.mixedTypeAnnotation=wt,e.moduleExpression=Fn,e.newExpression=P,e.noop=wn,e.nullLiteral=te,e.nullLiteralTypeAnnotation=nt,e.nullableTypeAnnotation=Et,e.numberLiteral=ei,e.numberLiteralTypeAnnotation=Dt,e.numberTypeAnnotation=Ot,e.numericLiteral=j,e.objectExpression=I,e.objectMethod=L,e.objectPattern=Pe,e.objectProperty=R,e.objectTypeAnnotation=kt,e.objectTypeCallProperty=jt,e.objectTypeIndexer=Mt,e.objectTypeInternalSlot=At,e.objectTypeProperty=Nt,e.objectTypeSpreadProperty=Pt,e.opaqueType=Ft,e.optionalCallExpression=H,e.optionalIndexedAccessType=cn,e.optionalMemberExpression=We,e.parenthesizedExpression=oe,e.pipelineBareFunction=Rn,e.pipelinePrimaryTopicReference=zn,e.pipelineTopicExpression=Ln,e.placeholder=Tn,e.privateName=Ye,e.program=F,e.qualifiedTypeIdentifier=It,e.recordExpression=Mn,e.regExpLiteral=M,e.regexLiteral=ti,e.restElement=z,e.restProperty=ni,e.returnStatement=ie,e.sequenceExpression=ae,e.spreadElement=Fe,e.spreadProperty=ri,e.staticBlock=Xe,e.stringLiteral=ee,e.stringLiteralTypeAnnotation=Lt,e.stringTypeAnnotation=Rt,e.super=Ie,e.switchCase=se,e.switchStatement=ce,e.symbolTypeAnnotation=zt,e.taggedTemplateExpression=Le,e.templateElement=Re,e.templateLiteral=ze,e.thisExpression=le,e.thisTypeAnnotation=Bt,e.throwStatement=ue,e.topicReference=In,e.tryStatement=B,e.tSAnyKeyword=e.tsAnyKeyword=Xn,e.tSArrayType=e.tsArrayType=gr,e.tSAsExpression=e.tsAsExpression=Ir,e.tSBigIntKeyword=e.tsBigIntKeyword=Qn,e.tSBooleanKeyword=e.tsBooleanKeyword=Zn,e.tSCallSignatureDeclaration=e.tsCallSignatureDeclaration=Gn,e.tSConditionalType=e.tsConditionalType=Cr,e.tSConstructSignatureDeclaration=e.tsConstructSignatureDeclaration=Kn,e.tSConstructorType=e.tsConstructorType=dr,e.tSDeclareFunction=e.tsDeclareFunction=Hn,e.tSDeclareMethod=e.tsDeclareMethod=Un,e.tSEnumBody=e.tsEnumBody=zr,e.tSEnumDeclaration=e.tsEnumDeclaration=Br,e.tSEnumMember=e.tsEnumMember=Vr,e.tSExportAssignment=e.tsExportAssignment=Jr,e.tSExpressionWithTypeArguments=e.tsExpressionWithTypeArguments=jr,e.tSExternalModuleReference=e.tsExternalModuleReference=Kr,e.tSFunctionType=e.tsFunctionType=ur,e.tSImportEqualsDeclaration=e.tsImportEqualsDeclaration=Gr,e.tSImportType=e.tsImportType=Wr,e.tSIndexSignature=e.tsIndexSignature=Yn,e.tSIndexedAccessType=e.tsIndexedAccessType=Dr,e.tSInferType=e.tsInferType=wr,e.tSInstantiationExpression=e.tsInstantiationExpression=Fr,e.tSInterfaceBody=e.tsInterfaceBody=Nr,e.tSInterfaceDeclaration=e.tsInterfaceDeclaration=Mr,e.tSIntersectionType=e.tsIntersectionType=Sr,e.tSIntrinsicKeyword=e.tsIntrinsicKeyword=$n,e.tSLiteralType=e.tsLiteralType=Ar,e.tSMappedType=e.tsMappedType=Or,e.tSMethodSignature=e.tsMethodSignature=Jn,e.tSModuleBlock=e.tsModuleBlock=Ur,e.tSModuleDeclaration=e.tsModuleDeclaration=Hr,e.tSNamedTupleMember=e.tsNamedTupleMember=br,e.tSNamespaceExportDeclaration=e.tsNamespaceExportDeclaration=Yr,e.tSNeverKeyword=e.tsNeverKeyword=er,e.tSNonNullExpression=e.tsNonNullExpression=qr,e.tSNullKeyword=e.tsNullKeyword=tr,e.tSNumberKeyword=e.tsNumberKeyword=nr,e.tSObjectKeyword=e.tsObjectKeyword=rr,e.tSOptionalType=e.tsOptionalType=vr,e.tSParameterProperty=e.tsParameterProperty=Vn,e.tSParenthesizedType=e.tsParenthesizedType=Tr,e.tSPropertySignature=e.tsPropertySignature=qn,e.tSQualifiedName=e.tsQualifiedName=Wn,e.tSRestType=e.tsRestType=yr,e.tSSatisfiesExpression=e.tsSatisfiesExpression=Lr,e.tSStringKeyword=e.tsStringKeyword=ir,e.tSSymbolKeyword=e.tsSymbolKeyword=ar,e.tSTemplateLiteralType=e.tsTemplateLiteralType=kr,e.tSThisType=e.tsThisType=lr,e.tSTupleType=e.tsTupleType=_r,e.tSTypeAliasDeclaration=e.tsTypeAliasDeclaration=Pr,e.tSTypeAnnotation=e.tsTypeAnnotation=Xr,e.tSTypeAssertion=e.tsTypeAssertion=Rr,e.tSTypeLiteral=e.tsTypeLiteral=hr,e.tSTypeOperator=e.tsTypeOperator=Er,e.tSTypeParameter=e.tsTypeParameter=$r,e.tSTypeParameterDeclaration=e.tsTypeParameterDeclaration=Qr,e.tSTypeParameterInstantiation=e.tsTypeParameterInstantiation=Zr,e.tSTypePredicate=e.tsTypePredicate=pr,e.tSTypeQuery=e.tsTypeQuery=mr,e.tSTypeReference=e.tsTypeReference=fr,e.tSUndefinedKeyword=e.tsUndefinedKeyword=or,e.tSUnionType=e.tsUnionType=xr,e.tSUnknownKeyword=e.tsUnknownKeyword=sr,e.tSVoidKeyword=e.tsVoidKeyword=cr,e.tupleExpression=Nn,e.tupleTypeAnnotation=Vt,e.typeAlias=Ut,e.typeAnnotation=Wt,e.typeCastExpression=Gt,e.typeParameter=Kt,e.typeParameterDeclaration=qt,e.typeParameterInstantiation=Jt,e.typeofTypeAnnotation=Ht,e.unaryExpression=de,e.unionTypeAnnotation=Yt,e.updateExpression=fe,e.v8IntrinsicIdentifier=En,e.variableDeclaration=pe,e.variableDeclarator=me,e.variance=Xt,e.voidPattern=Bn,e.voidTypeAnnotation=U,e.whileStatement=he,e.withStatement=ge,e.yieldExpression=Be;var t=Wv(),n=yv(),r=Pv();let{validateInternal:i}=t,{NODE_FIELDS:a}=r;function o(e){typeof e==`bigint`&&(e=e.toString());let t={type:`BigIntLiteral`,value:e},n=a.BigIntLiteral;return i(n.value,t,`value`,e),t}function s(e=[]){let t={type:`ArrayExpression`,elements:e},n=a.ArrayExpression;return i(n.elements,t,`elements`,e,1),t}function c(e,t,n){let r={type:`AssignmentExpression`,operator:e,left:t,right:n},o=a.AssignmentExpression;return i(o.operator,r,`operator`,e),i(o.left,r,`left`,t,1),i(o.right,r,`right`,n,1),r}function l(e,t,n){let r={type:`BinaryExpression`,operator:e,left:t,right:n},o=a.BinaryExpression;return i(o.operator,r,`operator`,e),i(o.left,r,`left`,t,1),i(o.right,r,`right`,n,1),r}function u(e){let t={type:`InterpreterDirective`,value:e},n=a.InterpreterDirective;return i(n.value,t,`value`,e),t}function d(e){let t={type:`Directive`,value:e},n=a.Directive;return i(n.value,t,`value`,e,1),t}function f(e){let t={type:`DirectiveLiteral`,value:e},n=a.DirectiveLiteral;return i(n.value,t,`value`,e),t}function p(e,t=[]){let n={type:`BlockStatement`,body:e,directives:t},r=a.BlockStatement;return i(r.body,n,`body`,e,1),i(r.directives,n,`directives`,t,1),n}function m(e=null){let t={type:`BreakStatement`,label:e},n=a.BreakStatement;return i(n.label,t,`label`,e,1),t}function h(e,t){let n={type:`CallExpression`,callee:e,arguments:t},r=a.CallExpression;return i(r.callee,n,`callee`,e,1),i(r.arguments,n,`arguments`,t,1),n}function g(e=null,t){let n={type:`CatchClause`,param:e,body:t},r=a.CatchClause;return i(r.param,n,`param`,e,1),i(r.body,n,`body`,t,1),n}function _(e,t,n){let r={type:`ConditionalExpression`,test:e,consequent:t,alternate:n},o=a.ConditionalExpression;return i(o.test,r,`test`,e,1),i(o.consequent,r,`consequent`,t,1),i(o.alternate,r,`alternate`,n,1),r}function v(e=null){let t={type:`ContinueStatement`,label:e},n=a.ContinueStatement;return i(n.label,t,`label`,e,1),t}function y(){return{type:`DebuggerStatement`}}function b(e,t){let n={type:`DoWhileStatement`,test:e,body:t},r=a.DoWhileStatement;return i(r.test,n,`test`,e,1),i(r.body,n,`body`,t,1),n}function x(){return{type:`EmptyStatement`}}function S(e){let t={type:`ExpressionStatement`,expression:e},n=a.ExpressionStatement;return i(n.expression,t,`expression`,e,1),t}function C(e,t=null,n=null){let r={type:`File`,program:e,comments:t,tokens:n},o=a.File;return i(o.program,r,`program`,e,1),i(o.comments,r,`comments`,t,1),i(o.tokens,r,`tokens`,n),r}function w(e,t,n){let r={type:`ForInStatement`,left:e,right:t,body:n},o=a.ForInStatement;return i(o.left,r,`left`,e,1),i(o.right,r,`right`,t,1),i(o.body,r,`body`,n,1),r}function T(e=null,t=null,n=null,r){let o={type:`ForStatement`,init:e,test:t,update:n,body:r},s=a.ForStatement;return i(s.init,o,`init`,e,1),i(s.test,o,`test`,t,1),i(s.update,o,`update`,n,1),i(s.body,o,`body`,r,1),o}function E(e=null,t,n,r=!1,o=!1){let s={type:`FunctionDeclaration`,id:e,params:t,body:n,generator:r,async:o},c=a.FunctionDeclaration;return i(c.id,s,`id`,e,1),i(c.params,s,`params`,t,1),i(c.body,s,`body`,n,1),i(c.generator,s,`generator`,r),i(c.async,s,`async`,o),s}function D(e=null,t,n,r=!1,o=!1){let s={type:`FunctionExpression`,id:e,params:t,body:n,generator:r,async:o},c=a.FunctionExpression;return i(c.id,s,`id`,e,1),i(c.params,s,`params`,t,1),i(c.body,s,`body`,n,1),i(c.generator,s,`generator`,r),i(c.async,s,`async`,o),s}function O(e){let t={type:`Identifier`,name:e},n=a.Identifier;return i(n.name,t,`name`,e),t}function k(e,t,n=null){let r={type:`IfStatement`,test:e,consequent:t,alternate:n},o=a.IfStatement;return i(o.test,r,`test`,e,1),i(o.consequent,r,`consequent`,t,1),i(o.alternate,r,`alternate`,n,1),r}function A(e,t){let n={type:`LabeledStatement`,label:e,body:t},r=a.LabeledStatement;return i(r.label,n,`label`,e,1),i(r.body,n,`body`,t,1),n}function ee(e){let t={type:`StringLiteral`,value:e},n=a.StringLiteral;return i(n.value,t,`value`,e),t}function j(e){let t={type:`NumericLiteral`,value:e},n=a.NumericLiteral;return i(n.value,t,`value`,e),t}function te(){return{type:`NullLiteral`}}function ne(e){let t={type:`BooleanLiteral`,value:e},n=a.BooleanLiteral;return i(n.value,t,`value`,e),t}function M(e,t=``){let n={type:`RegExpLiteral`,pattern:e,flags:t},r=a.RegExpLiteral;return i(r.pattern,n,`pattern`,e),i(r.flags,n,`flags`,t),n}function N(e,t,n){let r={type:`LogicalExpression`,operator:e,left:t,right:n},o=a.LogicalExpression;return i(o.operator,r,`operator`,e),i(o.left,r,`left`,t,1),i(o.right,r,`right`,n,1),r}function re(e,t,n=!1,r=null){let o={type:`MemberExpression`,object:e,property:t,computed:n,optional:r},s=a.MemberExpression;return i(s.object,o,`object`,e,1),i(s.property,o,`property`,t,1),i(s.computed,o,`computed`,n),i(s.optional,o,`optional`,r),o}function P(e,t){let n={type:`NewExpression`,callee:e,arguments:t},r=a.NewExpression;return i(r.callee,n,`callee`,e,1),i(r.arguments,n,`arguments`,t,1),n}function F(e,t=[],n=`script`,r=null){let o={type:`Program`,body:e,directives:t,sourceType:n,interpreter:r},s=a.Program;return i(s.body,o,`body`,e,1),i(s.directives,o,`directives`,t,1),i(s.sourceType,o,`sourceType`,n),i(s.interpreter,o,`interpreter`,r,1),o}function I(e){let t={type:`ObjectExpression`,properties:e},n=a.ObjectExpression;return i(n.properties,t,`properties`,e,1),t}function L(e=`method`,t,n,r,o=!1,s=!1,c=!1){let l={type:`ObjectMethod`,kind:e,key:t,params:n,body:r,computed:o,generator:s,async:c},u=a.ObjectMethod;return i(u.kind,l,`kind`,e),i(u.key,l,`key`,t,1),i(u.params,l,`params`,n,1),i(u.body,l,`body`,r,1),i(u.computed,l,`computed`,o),i(u.generator,l,`generator`,s),i(u.async,l,`async`,c),l}function R(e,t,n=!1,r=!1,o=null){let s={type:`ObjectProperty`,key:e,value:t,computed:n,shorthand:r,decorators:o},c=a.ObjectProperty;return i(c.key,s,`key`,e,1),i(c.value,s,`value`,t,1),i(c.computed,s,`computed`,n),i(c.shorthand,s,`shorthand`,r),i(c.decorators,s,`decorators`,o,1),s}function z(e){let t={type:`RestElement`,argument:e},n=a.RestElement;return i(n.argument,t,`argument`,e,1),t}function ie(e=null){let t={type:`ReturnStatement`,argument:e},n=a.ReturnStatement;return i(n.argument,t,`argument`,e,1),t}function ae(e){let t={type:`SequenceExpression`,expressions:e},n=a.SequenceExpression;return i(n.expressions,t,`expressions`,e,1),t}function oe(e){let t={type:`ParenthesizedExpression`,expression:e},n=a.ParenthesizedExpression;return i(n.expression,t,`expression`,e,1),t}function se(e=null,t){let n={type:`SwitchCase`,test:e,consequent:t},r=a.SwitchCase;return i(r.test,n,`test`,e,1),i(r.consequent,n,`consequent`,t,1),n}function ce(e,t){let n={type:`SwitchStatement`,discriminant:e,cases:t},r=a.SwitchStatement;return i(r.discriminant,n,`discriminant`,e,1),i(r.cases,n,`cases`,t,1),n}function le(){return{type:`ThisExpression`}}function ue(e){let t={type:`ThrowStatement`,argument:e},n=a.ThrowStatement;return i(n.argument,t,`argument`,e,1),t}function B(e,t=null,n=null){let r={type:`TryStatement`,block:e,handler:t,finalizer:n},o=a.TryStatement;return i(o.block,r,`block`,e,1),i(o.handler,r,`handler`,t,1),i(o.finalizer,r,`finalizer`,n,1),r}function de(e,t,n=!0){let r={type:`UnaryExpression`,operator:e,argument:t,prefix:n},o=a.UnaryExpression;return i(o.operator,r,`operator`,e),i(o.argument,r,`argument`,t,1),i(o.prefix,r,`prefix`,n),r}function fe(e,t,n=!1){let r={type:`UpdateExpression`,operator:e,argument:t,prefix:n},o=a.UpdateExpression;return i(o.operator,r,`operator`,e),i(o.argument,r,`argument`,t,1),i(o.prefix,r,`prefix`,n),r}function pe(e,t){let n={type:`VariableDeclaration`,kind:e,declarations:t},r=a.VariableDeclaration;return i(r.kind,n,`kind`,e),i(r.declarations,n,`declarations`,t,1),n}function me(e,t=null){let n={type:`VariableDeclarator`,id:e,init:t},r=a.VariableDeclarator;return i(r.id,n,`id`,e,1),i(r.init,n,`init`,t,1),n}function he(e,t){let n={type:`WhileStatement`,test:e,body:t},r=a.WhileStatement;return i(r.test,n,`test`,e,1),i(r.body,n,`body`,t,1),n}function ge(e,t){let n={type:`WithStatement`,object:e,body:t},r=a.WithStatement;return i(r.object,n,`object`,e,1),i(r.body,n,`body`,t,1),n}function _e(e,t){let n={type:`AssignmentPattern`,left:e,right:t},r=a.AssignmentPattern;return i(r.left,n,`left`,e,1),i(r.right,n,`right`,t,1),n}function ve(e){let t={type:`ArrayPattern`,elements:e},n=a.ArrayPattern;return i(n.elements,t,`elements`,e,1),t}function ye(e,t,n=!1){let r={type:`ArrowFunctionExpression`,params:e,body:t,async:n,expression:null},o=a.ArrowFunctionExpression;return i(o.params,r,`params`,e,1),i(o.body,r,`body`,t,1),i(o.async,r,`async`,n),r}function be(e){let t={type:`ClassBody`,body:e},n=a.ClassBody;return i(n.body,t,`body`,e,1),t}function xe(e=null,t=null,n,r=null){let o={type:`ClassExpression`,id:e,superClass:t,body:n,decorators:r},s=a.ClassExpression;return i(s.id,o,`id`,e,1),i(s.superClass,o,`superClass`,t,1),i(s.body,o,`body`,n,1),i(s.decorators,o,`decorators`,r,1),o}function Se(e=null,t=null,n,r=null){let o={type:`ClassDeclaration`,id:e,superClass:t,body:n,decorators:r},s=a.ClassDeclaration;return i(s.id,o,`id`,e,1),i(s.superClass,o,`superClass`,t,1),i(s.body,o,`body`,n,1),i(s.decorators,o,`decorators`,r,1),o}function Ce(e,t=null){let n={type:`ExportAllDeclaration`,source:e,attributes:t},r=a.ExportAllDeclaration;return i(r.source,n,`source`,e,1),i(r.attributes,n,`attributes`,t,1),n}function we(e){let t={type:`ExportDefaultDeclaration`,declaration:e},n=a.ExportDefaultDeclaration;return i(n.declaration,t,`declaration`,e,1),t}function Te(e=null,t=[],n=null,r=null){let o={type:`ExportNamedDeclaration`,declaration:e,specifiers:t,source:n,attributes:r},s=a.ExportNamedDeclaration;return i(s.declaration,o,`declaration`,e,1),i(s.specifiers,o,`specifiers`,t,1),i(s.source,o,`source`,n,1),i(s.attributes,o,`attributes`,r,1),o}function Ee(e,t){let n={type:`ExportSpecifier`,local:e,exported:t},r=a.ExportSpecifier;return i(r.local,n,`local`,e,1),i(r.exported,n,`exported`,t,1),n}function De(e,t,n,r=!1){let o={type:`ForOfStatement`,left:e,right:t,body:n,await:r},s=a.ForOfStatement;return i(s.left,o,`left`,e,1),i(s.right,o,`right`,t,1),i(s.body,o,`body`,n,1),i(s.await,o,`await`,r),o}function Oe(e,t,n=null){let r={type:`ImportDeclaration`,specifiers:e,source:t,attributes:n},o=a.ImportDeclaration;return i(o.specifiers,r,`specifiers`,e,1),i(o.source,r,`source`,t,1),i(o.attributes,r,`attributes`,n,1),r}function V(e){let t={type:`ImportDefaultSpecifier`,local:e},n=a.ImportDefaultSpecifier;return i(n.local,t,`local`,e,1),t}function ke(e){let t={type:`ImportNamespaceSpecifier`,local:e},n=a.ImportNamespaceSpecifier;return i(n.local,t,`local`,e,1),t}function Ae(e,t){let n={type:`ImportSpecifier`,local:e,imported:t},r=a.ImportSpecifier;return i(r.local,n,`local`,e,1),i(r.imported,n,`imported`,t,1),n}function je(e,t=null){let n={type:`ImportExpression`,source:e,options:t},r=a.ImportExpression;return i(r.source,n,`source`,e,1),i(r.options,n,`options`,t,1),n}function Me(e,t){let n={type:`MetaProperty`,meta:e,property:t},r=a.MetaProperty;return i(r.meta,n,`meta`,e,1),i(r.property,n,`property`,t,1),n}function Ne(e=`method`,t,n,r,o=!1,s=!1,c=!1,l=!1){let u={type:`ClassMethod`,kind:e,key:t,params:n,body:r,computed:o,static:s,generator:c,async:l},d=a.ClassMethod;return i(d.kind,u,`kind`,e),i(d.key,u,`key`,t,1),i(d.params,u,`params`,n,1),i(d.body,u,`body`,r,1),i(d.computed,u,`computed`,o),i(d.static,u,`static`,s),i(d.generator,u,`generator`,c),i(d.async,u,`async`,l),u}function Pe(e){let t={type:`ObjectPattern`,properties:e},n=a.ObjectPattern;return i(n.properties,t,`properties`,e,1),t}function Fe(e){let t={type:`SpreadElement`,argument:e},n=a.SpreadElement;return i(n.argument,t,`argument`,e,1),t}function Ie(){return{type:`Super`}}function Le(e,t){let n={type:`TaggedTemplateExpression`,tag:e,quasi:t},r=a.TaggedTemplateExpression;return i(r.tag,n,`tag`,e,1),i(r.quasi,n,`quasi`,t,1),n}function Re(e,t=!1){let n={type:`TemplateElement`,value:e,tail:t},r=a.TemplateElement;return i(r.value,n,`value`,e),i(r.tail,n,`tail`,t),n}function ze(e,t){let n={type:`TemplateLiteral`,quasis:e,expressions:t},r=a.TemplateLiteral;return i(r.quasis,n,`quasis`,e,1),i(r.expressions,n,`expressions`,t,1),n}function Be(e=null,t=!1){let n={type:`YieldExpression`,argument:e,delegate:t},r=a.YieldExpression;return i(r.argument,n,`argument`,e,1),i(r.delegate,n,`delegate`,t),n}function Ve(e){let t={type:`AwaitExpression`,argument:e},n=a.AwaitExpression;return i(n.argument,t,`argument`,e,1),t}function He(){return{type:`Import`}}function Ue(e){let t={type:`ExportNamespaceSpecifier`,exported:e},n=a.ExportNamespaceSpecifier;return i(n.exported,t,`exported`,e,1),t}function We(e,t,n=!1,r){let o={type:`OptionalMemberExpression`,object:e,property:t,computed:n,optional:r},s=a.OptionalMemberExpression;return i(s.object,o,`object`,e,1),i(s.property,o,`property`,t,1),i(s.computed,o,`computed`,n),i(s.optional,o,`optional`,r),o}function H(e,t,n){let r={type:`OptionalCallExpression`,callee:e,arguments:t,optional:n},o=a.OptionalCallExpression;return i(o.callee,r,`callee`,e,1),i(o.arguments,r,`arguments`,t,1),i(o.optional,r,`optional`,n),r}function Ge(e,t=null,n=null,r=null,o=!1,s=!1){let c={type:`ClassProperty`,key:e,value:t,typeAnnotation:n,decorators:r,computed:o,static:s},l=a.ClassProperty;return i(l.key,c,`key`,e,1),i(l.value,c,`value`,t,1),i(l.typeAnnotation,c,`typeAnnotation`,n,1),i(l.decorators,c,`decorators`,r,1),i(l.computed,c,`computed`,o),i(l.static,c,`static`,s),c}function Ke(e,t=null,n=null,r=null,o=!1,s=!1){let c={type:`ClassAccessorProperty`,key:e,value:t,typeAnnotation:n,decorators:r,computed:o,static:s},l=a.ClassAccessorProperty;return i(l.key,c,`key`,e,1),i(l.value,c,`value`,t,1),i(l.typeAnnotation,c,`typeAnnotation`,n,1),i(l.decorators,c,`decorators`,r,1),i(l.computed,c,`computed`,o),i(l.static,c,`static`,s),c}function qe(e,t=null,n=null,r=!1){let o={type:`ClassPrivateProperty`,key:e,value:t,decorators:n,static:r},s=a.ClassPrivateProperty;return i(s.key,o,`key`,e,1),i(s.value,o,`value`,t,1),i(s.decorators,o,`decorators`,n,1),i(s.static,o,`static`,r),o}function Je(e=`method`,t,n,r,o=!1){let s={type:`ClassPrivateMethod`,kind:e,key:t,params:n,body:r,static:o},c=a.ClassPrivateMethod;return i(c.kind,s,`kind`,e),i(c.key,s,`key`,t,1),i(c.params,s,`params`,n,1),i(c.body,s,`body`,r,1),i(c.static,s,`static`,o),s}function Ye(e){let t={type:`PrivateName`,id:e},n=a.PrivateName;return i(n.id,t,`id`,e,1),t}function Xe(e){let t={type:`StaticBlock`,body:e},n=a.StaticBlock;return i(n.body,t,`body`,e,1),t}function Ze(e,t){let n={type:`ImportAttribute`,key:e,value:t},r=a.ImportAttribute;return i(r.key,n,`key`,e,1),i(r.value,n,`value`,t,1),n}function Qe(){return{type:`AnyTypeAnnotation`}}function $e(e){let t={type:`ArrayTypeAnnotation`,elementType:e},n=a.ArrayTypeAnnotation;return i(n.elementType,t,`elementType`,e,1),t}function et(){return{type:`BooleanTypeAnnotation`}}function tt(e){let t={type:`BooleanLiteralTypeAnnotation`,value:e},n=a.BooleanLiteralTypeAnnotation;return i(n.value,t,`value`,e),t}function nt(){return{type:`NullLiteralTypeAnnotation`}}function rt(e,t=null){let n={type:`ClassImplements`,id:e,typeParameters:t},r=a.ClassImplements;return i(r.id,n,`id`,e,1),i(r.typeParameters,n,`typeParameters`,t,1),n}function it(e,t=null,n=null,r){let o={type:`DeclareClass`,id:e,typeParameters:t,extends:n,body:r},s=a.DeclareClass;return i(s.id,o,`id`,e,1),i(s.typeParameters,o,`typeParameters`,t,1),i(s.extends,o,`extends`,n,1),i(s.body,o,`body`,r,1),o}function at(e){let t={type:`DeclareFunction`,id:e},n=a.DeclareFunction;return i(n.id,t,`id`,e,1),t}function ot(e,t=null,n=null,r){let o={type:`DeclareInterface`,id:e,typeParameters:t,extends:n,body:r},s=a.DeclareInterface;return i(s.id,o,`id`,e,1),i(s.typeParameters,o,`typeParameters`,t,1),i(s.extends,o,`extends`,n,1),i(s.body,o,`body`,r,1),o}function st(e,t,n=null){let r={type:`DeclareModule`,id:e,body:t,kind:n},o=a.DeclareModule;return i(o.id,r,`id`,e,1),i(o.body,r,`body`,t,1),i(o.kind,r,`kind`,n),r}function ct(e){let t={type:`DeclareModuleExports`,typeAnnotation:e},n=a.DeclareModuleExports;return i(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function lt(e,t=null,n){let r={type:`DeclareTypeAlias`,id:e,typeParameters:t,right:n},o=a.DeclareTypeAlias;return i(o.id,r,`id`,e,1),i(o.typeParameters,r,`typeParameters`,t,1),i(o.right,r,`right`,n,1),r}function ut(e,t=null,n=null){let r={type:`DeclareOpaqueType`,id:e,typeParameters:t,supertype:n},o=a.DeclareOpaqueType;return i(o.id,r,`id`,e,1),i(o.typeParameters,r,`typeParameters`,t,1),i(o.supertype,r,`supertype`,n,1),r}function dt(e){let t={type:`DeclareVariable`,id:e},n=a.DeclareVariable;return i(n.id,t,`id`,e,1),t}function ft(e=null,t=null,n=null,r=null){let o={type:`DeclareExportDeclaration`,declaration:e,specifiers:t,source:n,attributes:r},s=a.DeclareExportDeclaration;return i(s.declaration,o,`declaration`,e,1),i(s.specifiers,o,`specifiers`,t,1),i(s.source,o,`source`,n,1),i(s.attributes,o,`attributes`,r,1),o}function pt(e,t=null){let n={type:`DeclareExportAllDeclaration`,source:e,attributes:t},r=a.DeclareExportAllDeclaration;return i(r.source,n,`source`,e,1),i(r.attributes,n,`attributes`,t,1),n}function mt(e){let t={type:`DeclaredPredicate`,value:e},n=a.DeclaredPredicate;return i(n.value,t,`value`,e,1),t}function ht(){return{type:`ExistsTypeAnnotation`}}function gt(e=null,t,n=null,r){let o={type:`FunctionTypeAnnotation`,typeParameters:e,params:t,rest:n,returnType:r},s=a.FunctionTypeAnnotation;return i(s.typeParameters,o,`typeParameters`,e,1),i(s.params,o,`params`,t,1),i(s.rest,o,`rest`,n,1),i(s.returnType,o,`returnType`,r,1),o}function _t(e=null,t){let n={type:`FunctionTypeParam`,name:e,typeAnnotation:t},r=a.FunctionTypeParam;return i(r.name,n,`name`,e,1),i(r.typeAnnotation,n,`typeAnnotation`,t,1),n}function vt(e,t=null){let n={type:`GenericTypeAnnotation`,id:e,typeParameters:t},r=a.GenericTypeAnnotation;return i(r.id,n,`id`,e,1),i(r.typeParameters,n,`typeParameters`,t,1),n}function yt(){return{type:`InferredPredicate`}}function bt(e,t=null){let n={type:`InterfaceExtends`,id:e,typeParameters:t},r=a.InterfaceExtends;return i(r.id,n,`id`,e,1),i(r.typeParameters,n,`typeParameters`,t,1),n}function xt(e,t=null,n=null,r){let o={type:`InterfaceDeclaration`,id:e,typeParameters:t,extends:n,body:r},s=a.InterfaceDeclaration;return i(s.id,o,`id`,e,1),i(s.typeParameters,o,`typeParameters`,t,1),i(s.extends,o,`extends`,n,1),i(s.body,o,`body`,r,1),o}function St(e=null,t){let n={type:`InterfaceTypeAnnotation`,extends:e,body:t},r=a.InterfaceTypeAnnotation;return i(r.extends,n,`extends`,e,1),i(r.body,n,`body`,t,1),n}function Ct(e){let t={type:`IntersectionTypeAnnotation`,types:e},n=a.IntersectionTypeAnnotation;return i(n.types,t,`types`,e,1),t}function wt(){return{type:`MixedTypeAnnotation`}}function Tt(){return{type:`EmptyTypeAnnotation`}}function Et(e){let t={type:`NullableTypeAnnotation`,typeAnnotation:e},n=a.NullableTypeAnnotation;return i(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function Dt(e){let t={type:`NumberLiteralTypeAnnotation`,value:e},n=a.NumberLiteralTypeAnnotation;return i(n.value,t,`value`,e),t}function Ot(){return{type:`NumberTypeAnnotation`}}function kt(e,t=[],n=[],r=[],o=!1){let s={type:`ObjectTypeAnnotation`,properties:e,indexers:t,callProperties:n,internalSlots:r,exact:o},c=a.ObjectTypeAnnotation;return i(c.properties,s,`properties`,e,1),i(c.indexers,s,`indexers`,t,1),i(c.callProperties,s,`callProperties`,n,1),i(c.internalSlots,s,`internalSlots`,r,1),i(c.exact,s,`exact`,o),s}function At(e,t,n,r,o){let s={type:`ObjectTypeInternalSlot`,id:e,value:t,optional:n,static:r,method:o},c=a.ObjectTypeInternalSlot;return i(c.id,s,`id`,e,1),i(c.value,s,`value`,t,1),i(c.optional,s,`optional`,n),i(c.static,s,`static`,r),i(c.method,s,`method`,o),s}function jt(e){let t={type:`ObjectTypeCallProperty`,value:e,static:null},n=a.ObjectTypeCallProperty;return i(n.value,t,`value`,e,1),t}function Mt(e=null,t,n,r=null){let o={type:`ObjectTypeIndexer`,id:e,key:t,value:n,variance:r,static:null},s=a.ObjectTypeIndexer;return i(s.id,o,`id`,e,1),i(s.key,o,`key`,t,1),i(s.value,o,`value`,n,1),i(s.variance,o,`variance`,r,1),o}function Nt(e,t,n=null){let r={type:`ObjectTypeProperty`,key:e,value:t,variance:n,kind:null,method:null,optional:null,proto:null,static:null},o=a.ObjectTypeProperty;return i(o.key,r,`key`,e,1),i(o.value,r,`value`,t,1),i(o.variance,r,`variance`,n,1),r}function Pt(e){let t={type:`ObjectTypeSpreadProperty`,argument:e},n=a.ObjectTypeSpreadProperty;return i(n.argument,t,`argument`,e,1),t}function Ft(e,t=null,n=null,r){let o={type:`OpaqueType`,id:e,typeParameters:t,supertype:n,impltype:r},s=a.OpaqueType;return i(s.id,o,`id`,e,1),i(s.typeParameters,o,`typeParameters`,t,1),i(s.supertype,o,`supertype`,n,1),i(s.impltype,o,`impltype`,r,1),o}function It(e,t){let n={type:`QualifiedTypeIdentifier`,id:e,qualification:t},r=a.QualifiedTypeIdentifier;return i(r.id,n,`id`,e,1),i(r.qualification,n,`qualification`,t,1),n}function Lt(e){let t={type:`StringLiteralTypeAnnotation`,value:e},n=a.StringLiteralTypeAnnotation;return i(n.value,t,`value`,e),t}function Rt(){return{type:`StringTypeAnnotation`}}function zt(){return{type:`SymbolTypeAnnotation`}}function Bt(){return{type:`ThisTypeAnnotation`}}function Vt(e){let t={type:`TupleTypeAnnotation`,types:e},n=a.TupleTypeAnnotation;return i(n.types,t,`types`,e,1),t}function Ht(e){let t={type:`TypeofTypeAnnotation`,argument:e},n=a.TypeofTypeAnnotation;return i(n.argument,t,`argument`,e,1),t}function Ut(e,t=null,n){let r={type:`TypeAlias`,id:e,typeParameters:t,right:n},o=a.TypeAlias;return i(o.id,r,`id`,e,1),i(o.typeParameters,r,`typeParameters`,t,1),i(o.right,r,`right`,n,1),r}function Wt(e){let t={type:`TypeAnnotation`,typeAnnotation:e},n=a.TypeAnnotation;return i(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function Gt(e,t){let n={type:`TypeCastExpression`,expression:e,typeAnnotation:t},r=a.TypeCastExpression;return i(r.expression,n,`expression`,e,1),i(r.typeAnnotation,n,`typeAnnotation`,t,1),n}function Kt(e=null,t=null,n=null){let r={type:`TypeParameter`,bound:e,default:t,variance:n,name:null},o=a.TypeParameter;return i(o.bound,r,`bound`,e,1),i(o.default,r,`default`,t,1),i(o.variance,r,`variance`,n,1),r}function qt(e){let t={type:`TypeParameterDeclaration`,params:e},n=a.TypeParameterDeclaration;return i(n.params,t,`params`,e,1),t}function Jt(e){let t={type:`TypeParameterInstantiation`,params:e},n=a.TypeParameterInstantiation;return i(n.params,t,`params`,e,1),t}function Yt(e){let t={type:`UnionTypeAnnotation`,types:e},n=a.UnionTypeAnnotation;return i(n.types,t,`types`,e,1),t}function Xt(e){let t={type:`Variance`,kind:e},n=a.Variance;return i(n.kind,t,`kind`,e),t}function U(){return{type:`VoidTypeAnnotation`}}function Zt(e,t){let n={type:`EnumDeclaration`,id:e,body:t},r=a.EnumDeclaration;return i(r.id,n,`id`,e,1),i(r.body,n,`body`,t,1),n}function Qt(e){let t={type:`EnumBooleanBody`,members:e,explicitType:null,hasUnknownMembers:null},n=a.EnumBooleanBody;return i(n.members,t,`members`,e,1),t}function $t(e){let t={type:`EnumNumberBody`,members:e,explicitType:null,hasUnknownMembers:null},n=a.EnumNumberBody;return i(n.members,t,`members`,e,1),t}function en(e){let t={type:`EnumStringBody`,members:e,explicitType:null,hasUnknownMembers:null},n=a.EnumStringBody;return i(n.members,t,`members`,e,1),t}function tn(e){let t={type:`EnumSymbolBody`,members:e,hasUnknownMembers:null},n=a.EnumSymbolBody;return i(n.members,t,`members`,e,1),t}function nn(e){let t={type:`EnumBooleanMember`,id:e,init:null},n=a.EnumBooleanMember;return i(n.id,t,`id`,e,1),t}function rn(e,t){let n={type:`EnumNumberMember`,id:e,init:t},r=a.EnumNumberMember;return i(r.id,n,`id`,e,1),i(r.init,n,`init`,t,1),n}function an(e,t){let n={type:`EnumStringMember`,id:e,init:t},r=a.EnumStringMember;return i(r.id,n,`id`,e,1),i(r.init,n,`init`,t,1),n}function on(e){let t={type:`EnumDefaultedMember`,id:e},n=a.EnumDefaultedMember;return i(n.id,t,`id`,e,1),t}function sn(e,t){let n={type:`IndexedAccessType`,objectType:e,indexType:t},r=a.IndexedAccessType;return i(r.objectType,n,`objectType`,e,1),i(r.indexType,n,`indexType`,t,1),n}function cn(e,t){let n={type:`OptionalIndexedAccessType`,objectType:e,indexType:t,optional:null},r=a.OptionalIndexedAccessType;return i(r.objectType,n,`objectType`,e,1),i(r.indexType,n,`indexType`,t,1),n}function ln(e,t=null){let n={type:`JSXAttribute`,name:e,value:t},r=a.JSXAttribute;return i(r.name,n,`name`,e,1),i(r.value,n,`value`,t,1),n}function un(e){let t={type:`JSXClosingElement`,name:e},n=a.JSXClosingElement;return i(n.name,t,`name`,e,1),t}function dn(e,t=null,n,r=null){let o={type:`JSXElement`,openingElement:e,closingElement:t,children:n,selfClosing:r},s=a.JSXElement;return i(s.openingElement,o,`openingElement`,e,1),i(s.closingElement,o,`closingElement`,t,1),i(s.children,o,`children`,n,1),i(s.selfClosing,o,`selfClosing`,r),o}function fn(){return{type:`JSXEmptyExpression`}}function pn(e){let t={type:`JSXExpressionContainer`,expression:e},n=a.JSXExpressionContainer;return i(n.expression,t,`expression`,e,1),t}function mn(e){let t={type:`JSXSpreadChild`,expression:e},n=a.JSXSpreadChild;return i(n.expression,t,`expression`,e,1),t}function hn(e){let t={type:`JSXIdentifier`,name:e},n=a.JSXIdentifier;return i(n.name,t,`name`,e),t}function gn(e,t){let n={type:`JSXMemberExpression`,object:e,property:t},r=a.JSXMemberExpression;return i(r.object,n,`object`,e,1),i(r.property,n,`property`,t,1),n}function _n(e,t){let n={type:`JSXNamespacedName`,namespace:e,name:t},r=a.JSXNamespacedName;return i(r.namespace,n,`namespace`,e,1),i(r.name,n,`name`,t,1),n}function vn(e,t,n=!1){let r={type:`JSXOpeningElement`,name:e,attributes:t,selfClosing:n},o=a.JSXOpeningElement;return i(o.name,r,`name`,e,1),i(o.attributes,r,`attributes`,t,1),i(o.selfClosing,r,`selfClosing`,n),r}function yn(e){let t={type:`JSXSpreadAttribute`,argument:e},n=a.JSXSpreadAttribute;return i(n.argument,t,`argument`,e,1),t}function bn(e){let t={type:`JSXText`,value:e},n=a.JSXText;return i(n.value,t,`value`,e),t}function xn(e,t,n){let r={type:`JSXFragment`,openingFragment:e,closingFragment:t,children:n},o=a.JSXFragment;return i(o.openingFragment,r,`openingFragment`,e,1),i(o.closingFragment,r,`closingFragment`,t,1),i(o.children,r,`children`,n,1),r}function Sn(){return{type:`JSXOpeningFragment`}}function Cn(){return{type:`JSXClosingFragment`}}function wn(){return{type:`Noop`}}function Tn(e,t){let n={type:`Placeholder`,expectedNode:e,name:t},r=a.Placeholder;return i(r.expectedNode,n,`expectedNode`,e),i(r.name,n,`name`,t,1),n}function En(e){let t={type:`V8IntrinsicIdentifier`,name:e},n=a.V8IntrinsicIdentifier;return i(n.name,t,`name`,e),t}function Dn(){return{type:`ArgumentPlaceholder`}}function On(e,t){let n={type:`BindExpression`,object:e,callee:t},r=a.BindExpression;return i(r.object,n,`object`,e,1),i(r.callee,n,`callee`,t,1),n}function kn(e){let t={type:`Decorator`,expression:e},n=a.Decorator;return i(n.expression,t,`expression`,e,1),t}function An(e,t=!1){let n={type:`DoExpression`,body:e,async:t},r=a.DoExpression;return i(r.body,n,`body`,e,1),i(r.async,n,`async`,t),n}function jn(e){let t={type:`ExportDefaultSpecifier`,exported:e},n=a.ExportDefaultSpecifier;return i(n.exported,t,`exported`,e,1),t}function Mn(e){let t={type:`RecordExpression`,properties:e},n=a.RecordExpression;return i(n.properties,t,`properties`,e,1),t}function Nn(e=[]){let t={type:`TupleExpression`,elements:e},n=a.TupleExpression;return i(n.elements,t,`elements`,e,1),t}function Pn(e){let t={type:`DecimalLiteral`,value:e},n=a.DecimalLiteral;return i(n.value,t,`value`,e),t}function Fn(e){let t={type:`ModuleExpression`,body:e},n=a.ModuleExpression;return i(n.body,t,`body`,e,1),t}function In(){return{type:`TopicReference`}}function Ln(e){let t={type:`PipelineTopicExpression`,expression:e},n=a.PipelineTopicExpression;return i(n.expression,t,`expression`,e,1),t}function Rn(e){let t={type:`PipelineBareFunction`,callee:e},n=a.PipelineBareFunction;return i(n.callee,t,`callee`,e,1),t}function zn(){return{type:`PipelinePrimaryTopicReference`}}function Bn(){return{type:`VoidPattern`}}function Vn(e){let t={type:`TSParameterProperty`,parameter:e},n=a.TSParameterProperty;return i(n.parameter,t,`parameter`,e,1),t}function Hn(e=null,t=null,n,r=null){let o={type:`TSDeclareFunction`,id:e,typeParameters:t,params:n,returnType:r},s=a.TSDeclareFunction;return i(s.id,o,`id`,e,1),i(s.typeParameters,o,`typeParameters`,t,1),i(s.params,o,`params`,n,1),i(s.returnType,o,`returnType`,r,1),o}function Un(e=null,t,n=null,r,o=null){let s={type:`TSDeclareMethod`,decorators:e,key:t,typeParameters:n,params:r,returnType:o},c=a.TSDeclareMethod;return i(c.decorators,s,`decorators`,e,1),i(c.key,s,`key`,t,1),i(c.typeParameters,s,`typeParameters`,n,1),i(c.params,s,`params`,r,1),i(c.returnType,s,`returnType`,o,1),s}function Wn(e,t){let n={type:`TSQualifiedName`,left:e,right:t},r=a.TSQualifiedName;return i(r.left,n,`left`,e,1),i(r.right,n,`right`,t,1),n}function Gn(e=null,t,n=null){let r={type:`TSCallSignatureDeclaration`,typeParameters:e,parameters:t,typeAnnotation:n},o=a.TSCallSignatureDeclaration;return i(o.typeParameters,r,`typeParameters`,e,1),i(o.parameters,r,`parameters`,t,1),i(o.typeAnnotation,r,`typeAnnotation`,n,1),r}function Kn(e=null,t,n=null){let r={type:`TSConstructSignatureDeclaration`,typeParameters:e,parameters:t,typeAnnotation:n},o=a.TSConstructSignatureDeclaration;return i(o.typeParameters,r,`typeParameters`,e,1),i(o.parameters,r,`parameters`,t,1),i(o.typeAnnotation,r,`typeAnnotation`,n,1),r}function qn(e,t=null){let n={type:`TSPropertySignature`,key:e,typeAnnotation:t},r=a.TSPropertySignature;return i(r.key,n,`key`,e,1),i(r.typeAnnotation,n,`typeAnnotation`,t,1),n}function Jn(e,t=null,n,r=null){let o={type:`TSMethodSignature`,key:e,typeParameters:t,parameters:n,typeAnnotation:r,kind:null},s=a.TSMethodSignature;return i(s.key,o,`key`,e,1),i(s.typeParameters,o,`typeParameters`,t,1),i(s.parameters,o,`parameters`,n,1),i(s.typeAnnotation,o,`typeAnnotation`,r,1),o}function Yn(e,t=null){let n={type:`TSIndexSignature`,parameters:e,typeAnnotation:t},r=a.TSIndexSignature;return i(r.parameters,n,`parameters`,e,1),i(r.typeAnnotation,n,`typeAnnotation`,t,1),n}function Xn(){return{type:`TSAnyKeyword`}}function Zn(){return{type:`TSBooleanKeyword`}}function Qn(){return{type:`TSBigIntKeyword`}}function $n(){return{type:`TSIntrinsicKeyword`}}function er(){return{type:`TSNeverKeyword`}}function tr(){return{type:`TSNullKeyword`}}function nr(){return{type:`TSNumberKeyword`}}function rr(){return{type:`TSObjectKeyword`}}function ir(){return{type:`TSStringKeyword`}}function ar(){return{type:`TSSymbolKeyword`}}function or(){return{type:`TSUndefinedKeyword`}}function sr(){return{type:`TSUnknownKeyword`}}function cr(){return{type:`TSVoidKeyword`}}function lr(){return{type:`TSThisType`}}function ur(e=null,t,n=null){let r={type:`TSFunctionType`,typeParameters:e,parameters:t,typeAnnotation:n},o=a.TSFunctionType;return i(o.typeParameters,r,`typeParameters`,e,1),i(o.parameters,r,`parameters`,t,1),i(o.typeAnnotation,r,`typeAnnotation`,n,1),r}function dr(e=null,t,n=null){let r={type:`TSConstructorType`,typeParameters:e,parameters:t,typeAnnotation:n},o=a.TSConstructorType;return i(o.typeParameters,r,`typeParameters`,e,1),i(o.parameters,r,`parameters`,t,1),i(o.typeAnnotation,r,`typeAnnotation`,n,1),r}function fr(e,t=null){let n={type:`TSTypeReference`,typeName:e,typeParameters:t},r=a.TSTypeReference;return i(r.typeName,n,`typeName`,e,1),i(r.typeParameters,n,`typeParameters`,t,1),n}function pr(e,t=null,n=null){let r={type:`TSTypePredicate`,parameterName:e,typeAnnotation:t,asserts:n},o=a.TSTypePredicate;return i(o.parameterName,r,`parameterName`,e,1),i(o.typeAnnotation,r,`typeAnnotation`,t,1),i(o.asserts,r,`asserts`,n),r}function mr(e,t=null){let n={type:`TSTypeQuery`,exprName:e,typeParameters:t},r=a.TSTypeQuery;return i(r.exprName,n,`exprName`,e,1),i(r.typeParameters,n,`typeParameters`,t,1),n}function hr(e){let t={type:`TSTypeLiteral`,members:e},n=a.TSTypeLiteral;return i(n.members,t,`members`,e,1),t}function gr(e){let t={type:`TSArrayType`,elementType:e},n=a.TSArrayType;return i(n.elementType,t,`elementType`,e,1),t}function _r(e){let t={type:`TSTupleType`,elementTypes:e},n=a.TSTupleType;return i(n.elementTypes,t,`elementTypes`,e,1),t}function vr(e){let t={type:`TSOptionalType`,typeAnnotation:e},n=a.TSOptionalType;return i(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function yr(e){let t={type:`TSRestType`,typeAnnotation:e},n=a.TSRestType;return i(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function br(e,t,n=!1){let r={type:`TSNamedTupleMember`,label:e,elementType:t,optional:n},o=a.TSNamedTupleMember;return i(o.label,r,`label`,e,1),i(o.elementType,r,`elementType`,t,1),i(o.optional,r,`optional`,n),r}function xr(e){let t={type:`TSUnionType`,types:e},n=a.TSUnionType;return i(n.types,t,`types`,e,1),t}function Sr(e){let t={type:`TSIntersectionType`,types:e},n=a.TSIntersectionType;return i(n.types,t,`types`,e,1),t}function Cr(e,t,n,r){let o={type:`TSConditionalType`,checkType:e,extendsType:t,trueType:n,falseType:r},s=a.TSConditionalType;return i(s.checkType,o,`checkType`,e,1),i(s.extendsType,o,`extendsType`,t,1),i(s.trueType,o,`trueType`,n,1),i(s.falseType,o,`falseType`,r,1),o}function wr(e){let t={type:`TSInferType`,typeParameter:e},n=a.TSInferType;return i(n.typeParameter,t,`typeParameter`,e,1),t}function Tr(e){let t={type:`TSParenthesizedType`,typeAnnotation:e},n=a.TSParenthesizedType;return i(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function Er(e,t=`keyof`){let n={type:`TSTypeOperator`,typeAnnotation:e,operator:t},r=a.TSTypeOperator;return i(r.typeAnnotation,n,`typeAnnotation`,e,1),i(r.operator,n,`operator`,t),n}function Dr(e,t){let n={type:`TSIndexedAccessType`,objectType:e,indexType:t},r=a.TSIndexedAccessType;return i(r.objectType,n,`objectType`,e,1),i(r.indexType,n,`indexType`,t,1),n}function Or(e,t=null,n=null){let r={type:`TSMappedType`,typeParameter:e,typeAnnotation:t,nameType:n},o=a.TSMappedType;return i(o.typeParameter,r,`typeParameter`,e,1),i(o.typeAnnotation,r,`typeAnnotation`,t,1),i(o.nameType,r,`nameType`,n,1),r}function kr(e,t){let n={type:`TSTemplateLiteralType`,quasis:e,types:t},r=a.TSTemplateLiteralType;return i(r.quasis,n,`quasis`,e,1),i(r.types,n,`types`,t,1),n}function Ar(e){let t={type:`TSLiteralType`,literal:e},n=a.TSLiteralType;return i(n.literal,t,`literal`,e,1),t}function jr(e,t=null){let n={type:`TSExpressionWithTypeArguments`,expression:e,typeParameters:t},r=a.TSExpressionWithTypeArguments;return i(r.expression,n,`expression`,e,1),i(r.typeParameters,n,`typeParameters`,t,1),n}function Mr(e,t=null,n=null,r){let o={type:`TSInterfaceDeclaration`,id:e,typeParameters:t,extends:n,body:r},s=a.TSInterfaceDeclaration;return i(s.id,o,`id`,e,1),i(s.typeParameters,o,`typeParameters`,t,1),i(s.extends,o,`extends`,n,1),i(s.body,o,`body`,r,1),o}function Nr(e){let t={type:`TSInterfaceBody`,body:e},n=a.TSInterfaceBody;return i(n.body,t,`body`,e,1),t}function Pr(e,t=null,n){let r={type:`TSTypeAliasDeclaration`,id:e,typeParameters:t,typeAnnotation:n},o=a.TSTypeAliasDeclaration;return i(o.id,r,`id`,e,1),i(o.typeParameters,r,`typeParameters`,t,1),i(o.typeAnnotation,r,`typeAnnotation`,n,1),r}function Fr(e,t=null){let n={type:`TSInstantiationExpression`,expression:e,typeParameters:t},r=a.TSInstantiationExpression;return i(r.expression,n,`expression`,e,1),i(r.typeParameters,n,`typeParameters`,t,1),n}function Ir(e,t){let n={type:`TSAsExpression`,expression:e,typeAnnotation:t},r=a.TSAsExpression;return i(r.expression,n,`expression`,e,1),i(r.typeAnnotation,n,`typeAnnotation`,t,1),n}function Lr(e,t){let n={type:`TSSatisfiesExpression`,expression:e,typeAnnotation:t},r=a.TSSatisfiesExpression;return i(r.expression,n,`expression`,e,1),i(r.typeAnnotation,n,`typeAnnotation`,t,1),n}function Rr(e,t){let n={type:`TSTypeAssertion`,typeAnnotation:e,expression:t},r=a.TSTypeAssertion;return i(r.typeAnnotation,n,`typeAnnotation`,e,1),i(r.expression,n,`expression`,t,1),n}function zr(e){let t={type:`TSEnumBody`,members:e},n=a.TSEnumBody;return i(n.members,t,`members`,e,1),t}function Br(e,t){let n={type:`TSEnumDeclaration`,id:e,members:t},r=a.TSEnumDeclaration;return i(r.id,n,`id`,e,1),i(r.members,n,`members`,t,1),n}function Vr(e,t=null){let n={type:`TSEnumMember`,id:e,initializer:t},r=a.TSEnumMember;return i(r.id,n,`id`,e,1),i(r.initializer,n,`initializer`,t,1),n}function Hr(e,t){let n={type:`TSModuleDeclaration`,id:e,body:t,kind:null},r=a.TSModuleDeclaration;return i(r.id,n,`id`,e,1),i(r.body,n,`body`,t,1),n}function Ur(e){let t={type:`TSModuleBlock`,body:e},n=a.TSModuleBlock;return i(n.body,t,`body`,e,1),t}function Wr(e,t=null,n=null){let r={type:`TSImportType`,argument:e,qualifier:t,typeParameters:n},o=a.TSImportType;return i(o.argument,r,`argument`,e,1),i(o.qualifier,r,`qualifier`,t,1),i(o.typeParameters,r,`typeParameters`,n,1),r}function Gr(e,t){let n={type:`TSImportEqualsDeclaration`,id:e,moduleReference:t,isExport:null},r=a.TSImportEqualsDeclaration;return i(r.id,n,`id`,e,1),i(r.moduleReference,n,`moduleReference`,t,1),n}function Kr(e){let t={type:`TSExternalModuleReference`,expression:e},n=a.TSExternalModuleReference;return i(n.expression,t,`expression`,e,1),t}function qr(e){let t={type:`TSNonNullExpression`,expression:e},n=a.TSNonNullExpression;return i(n.expression,t,`expression`,e,1),t}function Jr(e){let t={type:`TSExportAssignment`,expression:e},n=a.TSExportAssignment;return i(n.expression,t,`expression`,e,1),t}function Yr(e){let t={type:`TSNamespaceExportDeclaration`,id:e},n=a.TSNamespaceExportDeclaration;return i(n.id,t,`id`,e,1),t}function Xr(e){let t={type:`TSTypeAnnotation`,typeAnnotation:e},n=a.TSTypeAnnotation;return i(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function Zr(e){let t={type:`TSTypeParameterInstantiation`,params:e},n=a.TSTypeParameterInstantiation;return i(n.params,t,`params`,e,1),t}function Qr(e){let t={type:`TSTypeParameterDeclaration`,params:e},n=a.TSTypeParameterDeclaration;return i(n.params,t,`params`,e,1),t}function $r(e=null,t=null,n){let r={type:`TSTypeParameter`,constraint:e,default:t,name:n},o=a.TSTypeParameter;return i(o.constraint,r,`constraint`,e,1),i(o.default,r,`default`,t,1),i(o.name,r,`name`,n),r}function ei(e){return(0,n.default)(`NumberLiteral`,`NumericLiteral`,`The node type `),j(e)}function ti(e,t=``){return(0,n.default)(`RegexLiteral`,`RegExpLiteral`,`The node type `),M(e,t)}function ni(e){return(0,n.default)(`RestProperty`,`RestElement`,`The node type `),z(e)}function ri(e){return(0,n.default)(`SpreadProperty`,`SpreadElement`,`The node type `),Fe(e)}})),Kv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.JSXIdentifier=e.JSXFragment=e.JSXExpressionContainer=e.JSXEmptyExpression=e.JSXElement=e.JSXClosingFragment=e.JSXClosingElement=e.JSXAttribute=e.IntersectionTypeAnnotation=e.InterpreterDirective=e.InterfaceTypeAnnotation=e.InterfaceExtends=e.InterfaceDeclaration=e.InferredPredicate=e.IndexedAccessType=e.ImportSpecifier=e.ImportNamespaceSpecifier=e.ImportExpression=e.ImportDefaultSpecifier=e.ImportDeclaration=e.ImportAttribute=e.Import=e.IfStatement=e.Identifier=e.GenericTypeAnnotation=e.FunctionTypeParam=e.FunctionTypeAnnotation=e.FunctionExpression=e.FunctionDeclaration=e.ForStatement=e.ForOfStatement=e.ForInStatement=e.File=e.ExpressionStatement=e.ExportSpecifier=e.ExportNamespaceSpecifier=e.ExportNamedDeclaration=e.ExportDefaultSpecifier=e.ExportDefaultDeclaration=e.ExportAllDeclaration=e.ExistsTypeAnnotation=e.EnumSymbolBody=e.EnumStringMember=e.EnumStringBody=e.EnumNumberMember=e.EnumNumberBody=e.EnumDefaultedMember=e.EnumDeclaration=e.EnumBooleanMember=e.EnumBooleanBody=e.EmptyTypeAnnotation=e.EmptyStatement=e.DoWhileStatement=e.DoExpression=e.DirectiveLiteral=e.Directive=e.Decorator=e.DeclaredPredicate=e.DeclareVariable=e.DeclareTypeAlias=e.DeclareOpaqueType=e.DeclareModuleExports=e.DeclareModule=e.DeclareInterface=e.DeclareFunction=e.DeclareExportDeclaration=e.DeclareExportAllDeclaration=e.DeclareClass=e.DecimalLiteral=e.DebuggerStatement=e.ContinueStatement=e.ConditionalExpression=e.ClassProperty=e.ClassPrivateProperty=e.ClassPrivateMethod=e.ClassMethod=e.ClassImplements=e.ClassExpression=e.ClassDeclaration=e.ClassBody=e.ClassAccessorProperty=e.CatchClause=e.CallExpression=e.BreakStatement=e.BooleanTypeAnnotation=e.BooleanLiteralTypeAnnotation=e.BooleanLiteral=e.BlockStatement=e.BindExpression=e.BinaryExpression=e.BigIntLiteral=e.AwaitExpression=e.AssignmentPattern=e.AssignmentExpression=e.ArrowFunctionExpression=e.ArrayTypeAnnotation=e.ArrayPattern=e.ArrayExpression=e.ArgumentPlaceholder=e.AnyTypeAnnotation=void 0,e.TSNumberKeyword=e.TSNullKeyword=e.TSNonNullExpression=e.TSNeverKeyword=e.TSNamespaceExportDeclaration=e.TSNamedTupleMember=e.TSModuleDeclaration=e.TSModuleBlock=e.TSMethodSignature=e.TSMappedType=e.TSLiteralType=e.TSIntrinsicKeyword=e.TSIntersectionType=e.TSInterfaceDeclaration=e.TSInterfaceBody=e.TSInstantiationExpression=e.TSInferType=e.TSIndexedAccessType=e.TSIndexSignature=e.TSImportType=e.TSImportEqualsDeclaration=e.TSFunctionType=e.TSExternalModuleReference=e.TSExpressionWithTypeArguments=e.TSExportAssignment=e.TSEnumMember=e.TSEnumDeclaration=e.TSEnumBody=e.TSDeclareMethod=e.TSDeclareFunction=e.TSConstructorType=e.TSConstructSignatureDeclaration=e.TSConditionalType=e.TSCallSignatureDeclaration=e.TSBooleanKeyword=e.TSBigIntKeyword=e.TSAsExpression=e.TSArrayType=e.TSAnyKeyword=e.SymbolTypeAnnotation=e.SwitchStatement=e.SwitchCase=e.Super=e.StringTypeAnnotation=e.StringLiteralTypeAnnotation=e.StringLiteral=e.StaticBlock=e.SpreadProperty=e.SpreadElement=e.SequenceExpression=e.ReturnStatement=e.RestProperty=e.RestElement=e.RegexLiteral=e.RegExpLiteral=e.RecordExpression=e.QualifiedTypeIdentifier=e.Program=e.PrivateName=e.Placeholder=e.PipelineTopicExpression=e.PipelinePrimaryTopicReference=e.PipelineBareFunction=e.ParenthesizedExpression=e.OptionalMemberExpression=e.OptionalIndexedAccessType=e.OptionalCallExpression=e.OpaqueType=e.ObjectTypeSpreadProperty=e.ObjectTypeProperty=e.ObjectTypeInternalSlot=e.ObjectTypeIndexer=e.ObjectTypeCallProperty=e.ObjectTypeAnnotation=e.ObjectProperty=e.ObjectPattern=e.ObjectMethod=e.ObjectExpression=e.NumericLiteral=e.NumberTypeAnnotation=e.NumberLiteralTypeAnnotation=e.NumberLiteral=e.NullableTypeAnnotation=e.NullLiteralTypeAnnotation=e.NullLiteral=e.Noop=e.NewExpression=e.ModuleExpression=e.MixedTypeAnnotation=e.MetaProperty=e.MemberExpression=e.LogicalExpression=e.LabeledStatement=e.JSXText=e.JSXSpreadChild=e.JSXSpreadAttribute=e.JSXOpeningFragment=e.JSXOpeningElement=e.JSXNamespacedName=e.JSXMemberExpression=void 0,e.YieldExpression=e.WithStatement=e.WhileStatement=e.VoidTypeAnnotation=e.VoidPattern=e.Variance=e.VariableDeclarator=e.VariableDeclaration=e.V8IntrinsicIdentifier=e.UpdateExpression=e.UnionTypeAnnotation=e.UnaryExpression=e.TypeofTypeAnnotation=e.TypeParameterInstantiation=e.TypeParameterDeclaration=e.TypeParameter=e.TypeCastExpression=e.TypeAnnotation=e.TypeAlias=e.TupleTypeAnnotation=e.TupleExpression=e.TryStatement=e.TopicReference=e.ThrowStatement=e.ThisTypeAnnotation=e.ThisExpression=e.TemplateLiteral=e.TemplateElement=e.TaggedTemplateExpression=e.TSVoidKeyword=e.TSUnknownKeyword=e.TSUnionType=e.TSUndefinedKeyword=e.TSTypeReference=e.TSTypeQuery=e.TSTypePredicate=e.TSTypeParameterInstantiation=e.TSTypeParameterDeclaration=e.TSTypeParameter=e.TSTypeOperator=e.TSTypeLiteral=e.TSTypeAssertion=e.TSTypeAnnotation=e.TSTypeAliasDeclaration=e.TSTupleType=e.TSThisType=e.TSTemplateLiteralType=e.TSSymbolKeyword=e.TSStringKeyword=e.TSSatisfiesExpression=e.TSRestType=e.TSQualifiedName=e.TSPropertySignature=e.TSParenthesizedType=e.TSParameterProperty=e.TSOptionalType=e.TSObjectKeyword=void 0;var t=Gv();yv();function n(e){return t[e]}e.ArrayExpression=n(`arrayExpression`),e.AssignmentExpression=n(`assignmentExpression`),e.BinaryExpression=n(`binaryExpression`),e.InterpreterDirective=n(`interpreterDirective`),e.Directive=n(`directive`),e.DirectiveLiteral=n(`directiveLiteral`),e.BlockStatement=n(`blockStatement`),e.BreakStatement=n(`breakStatement`),e.CallExpression=n(`callExpression`),e.CatchClause=n(`catchClause`),e.ConditionalExpression=n(`conditionalExpression`),e.ContinueStatement=n(`continueStatement`),e.DebuggerStatement=n(`debuggerStatement`),e.DoWhileStatement=n(`doWhileStatement`),e.EmptyStatement=n(`emptyStatement`),e.ExpressionStatement=n(`expressionStatement`),e.File=n(`file`),e.ForInStatement=n(`forInStatement`),e.ForStatement=n(`forStatement`),e.FunctionDeclaration=n(`functionDeclaration`),e.FunctionExpression=n(`functionExpression`),e.Identifier=n(`identifier`),e.IfStatement=n(`ifStatement`),e.LabeledStatement=n(`labeledStatement`),e.StringLiteral=n(`stringLiteral`),e.NumericLiteral=n(`numericLiteral`),e.NullLiteral=n(`nullLiteral`),e.BooleanLiteral=n(`booleanLiteral`),e.RegExpLiteral=n(`regExpLiteral`),e.LogicalExpression=n(`logicalExpression`),e.MemberExpression=n(`memberExpression`),e.NewExpression=n(`newExpression`),e.Program=n(`program`),e.ObjectExpression=n(`objectExpression`),e.ObjectMethod=n(`objectMethod`),e.ObjectProperty=n(`objectProperty`),e.RestElement=n(`restElement`),e.ReturnStatement=n(`returnStatement`),e.SequenceExpression=n(`sequenceExpression`),e.ParenthesizedExpression=n(`parenthesizedExpression`),e.SwitchCase=n(`switchCase`),e.SwitchStatement=n(`switchStatement`),e.ThisExpression=n(`thisExpression`),e.ThrowStatement=n(`throwStatement`),e.TryStatement=n(`tryStatement`),e.UnaryExpression=n(`unaryExpression`),e.UpdateExpression=n(`updateExpression`),e.VariableDeclaration=n(`variableDeclaration`),e.VariableDeclarator=n(`variableDeclarator`),e.WhileStatement=n(`whileStatement`),e.WithStatement=n(`withStatement`),e.AssignmentPattern=n(`assignmentPattern`),e.ArrayPattern=n(`arrayPattern`),e.ArrowFunctionExpression=n(`arrowFunctionExpression`),e.ClassBody=n(`classBody`),e.ClassExpression=n(`classExpression`),e.ClassDeclaration=n(`classDeclaration`),e.ExportAllDeclaration=n(`exportAllDeclaration`),e.ExportDefaultDeclaration=n(`exportDefaultDeclaration`),e.ExportNamedDeclaration=n(`exportNamedDeclaration`),e.ExportSpecifier=n(`exportSpecifier`),e.ForOfStatement=n(`forOfStatement`),e.ImportDeclaration=n(`importDeclaration`),e.ImportDefaultSpecifier=n(`importDefaultSpecifier`),e.ImportNamespaceSpecifier=n(`importNamespaceSpecifier`),e.ImportSpecifier=n(`importSpecifier`),e.ImportExpression=n(`importExpression`),e.MetaProperty=n(`metaProperty`),e.ClassMethod=n(`classMethod`),e.ObjectPattern=n(`objectPattern`),e.SpreadElement=n(`spreadElement`),e.Super=n(`super`),e.TaggedTemplateExpression=n(`taggedTemplateExpression`),e.TemplateElement=n(`templateElement`),e.TemplateLiteral=n(`templateLiteral`),e.YieldExpression=n(`yieldExpression`),e.AwaitExpression=n(`awaitExpression`),e.Import=n(`import`),e.BigIntLiteral=n(`bigIntLiteral`),e.ExportNamespaceSpecifier=n(`exportNamespaceSpecifier`),e.OptionalMemberExpression=n(`optionalMemberExpression`),e.OptionalCallExpression=n(`optionalCallExpression`),e.ClassProperty=n(`classProperty`),e.ClassAccessorProperty=n(`classAccessorProperty`),e.ClassPrivateProperty=n(`classPrivateProperty`),e.ClassPrivateMethod=n(`classPrivateMethod`),e.PrivateName=n(`privateName`),e.StaticBlock=n(`staticBlock`),e.ImportAttribute=n(`importAttribute`),e.AnyTypeAnnotation=n(`anyTypeAnnotation`),e.ArrayTypeAnnotation=n(`arrayTypeAnnotation`),e.BooleanTypeAnnotation=n(`booleanTypeAnnotation`),e.BooleanLiteralTypeAnnotation=n(`booleanLiteralTypeAnnotation`),e.NullLiteralTypeAnnotation=n(`nullLiteralTypeAnnotation`),e.ClassImplements=n(`classImplements`),e.DeclareClass=n(`declareClass`),e.DeclareFunction=n(`declareFunction`),e.DeclareInterface=n(`declareInterface`),e.DeclareModule=n(`declareModule`),e.DeclareModuleExports=n(`declareModuleExports`),e.DeclareTypeAlias=n(`declareTypeAlias`),e.DeclareOpaqueType=n(`declareOpaqueType`),e.DeclareVariable=n(`declareVariable`),e.DeclareExportDeclaration=n(`declareExportDeclaration`),e.DeclareExportAllDeclaration=n(`declareExportAllDeclaration`),e.DeclaredPredicate=n(`declaredPredicate`),e.ExistsTypeAnnotation=n(`existsTypeAnnotation`),e.FunctionTypeAnnotation=n(`functionTypeAnnotation`),e.FunctionTypeParam=n(`functionTypeParam`),e.GenericTypeAnnotation=n(`genericTypeAnnotation`),e.InferredPredicate=n(`inferredPredicate`),e.InterfaceExtends=n(`interfaceExtends`),e.InterfaceDeclaration=n(`interfaceDeclaration`),e.InterfaceTypeAnnotation=n(`interfaceTypeAnnotation`),e.IntersectionTypeAnnotation=n(`intersectionTypeAnnotation`),e.MixedTypeAnnotation=n(`mixedTypeAnnotation`),e.EmptyTypeAnnotation=n(`emptyTypeAnnotation`),e.NullableTypeAnnotation=n(`nullableTypeAnnotation`),e.NumberLiteralTypeAnnotation=n(`numberLiteralTypeAnnotation`),e.NumberTypeAnnotation=n(`numberTypeAnnotation`),e.ObjectTypeAnnotation=n(`objectTypeAnnotation`),e.ObjectTypeInternalSlot=n(`objectTypeInternalSlot`),e.ObjectTypeCallProperty=n(`objectTypeCallProperty`),e.ObjectTypeIndexer=n(`objectTypeIndexer`),e.ObjectTypeProperty=n(`objectTypeProperty`),e.ObjectTypeSpreadProperty=n(`objectTypeSpreadProperty`),e.OpaqueType=n(`opaqueType`),e.QualifiedTypeIdentifier=n(`qualifiedTypeIdentifier`),e.StringLiteralTypeAnnotation=n(`stringLiteralTypeAnnotation`),e.StringTypeAnnotation=n(`stringTypeAnnotation`),e.SymbolTypeAnnotation=n(`symbolTypeAnnotation`),e.ThisTypeAnnotation=n(`thisTypeAnnotation`),e.TupleTypeAnnotation=n(`tupleTypeAnnotation`),e.TypeofTypeAnnotation=n(`typeofTypeAnnotation`),e.TypeAlias=n(`typeAlias`),e.TypeAnnotation=n(`typeAnnotation`),e.TypeCastExpression=n(`typeCastExpression`),e.TypeParameter=n(`typeParameter`),e.TypeParameterDeclaration=n(`typeParameterDeclaration`),e.TypeParameterInstantiation=n(`typeParameterInstantiation`),e.UnionTypeAnnotation=n(`unionTypeAnnotation`),e.Variance=n(`variance`),e.VoidTypeAnnotation=n(`voidTypeAnnotation`),e.EnumDeclaration=n(`enumDeclaration`),e.EnumBooleanBody=n(`enumBooleanBody`),e.EnumNumberBody=n(`enumNumberBody`),e.EnumStringBody=n(`enumStringBody`),e.EnumSymbolBody=n(`enumSymbolBody`),e.EnumBooleanMember=n(`enumBooleanMember`),e.EnumNumberMember=n(`enumNumberMember`),e.EnumStringMember=n(`enumStringMember`),e.EnumDefaultedMember=n(`enumDefaultedMember`),e.IndexedAccessType=n(`indexedAccessType`),e.OptionalIndexedAccessType=n(`optionalIndexedAccessType`),e.JSXAttribute=n(`jsxAttribute`),e.JSXClosingElement=n(`jsxClosingElement`),e.JSXElement=n(`jsxElement`),e.JSXEmptyExpression=n(`jsxEmptyExpression`),e.JSXExpressionContainer=n(`jsxExpressionContainer`),e.JSXSpreadChild=n(`jsxSpreadChild`),e.JSXIdentifier=n(`jsxIdentifier`),e.JSXMemberExpression=n(`jsxMemberExpression`),e.JSXNamespacedName=n(`jsxNamespacedName`),e.JSXOpeningElement=n(`jsxOpeningElement`),e.JSXSpreadAttribute=n(`jsxSpreadAttribute`),e.JSXText=n(`jsxText`),e.JSXFragment=n(`jsxFragment`),e.JSXOpeningFragment=n(`jsxOpeningFragment`),e.JSXClosingFragment=n(`jsxClosingFragment`),e.Noop=n(`noop`),e.Placeholder=n(`placeholder`),e.V8IntrinsicIdentifier=n(`v8IntrinsicIdentifier`),e.ArgumentPlaceholder=n(`argumentPlaceholder`),e.BindExpression=n(`bindExpression`),e.Decorator=n(`decorator`),e.DoExpression=n(`doExpression`),e.ExportDefaultSpecifier=n(`exportDefaultSpecifier`),e.RecordExpression=n(`recordExpression`),e.TupleExpression=n(`tupleExpression`),e.DecimalLiteral=n(`decimalLiteral`),e.ModuleExpression=n(`moduleExpression`),e.TopicReference=n(`topicReference`),e.PipelineTopicExpression=n(`pipelineTopicExpression`),e.PipelineBareFunction=n(`pipelineBareFunction`),e.PipelinePrimaryTopicReference=n(`pipelinePrimaryTopicReference`),e.VoidPattern=n(`voidPattern`),e.TSParameterProperty=n(`tsParameterProperty`),e.TSDeclareFunction=n(`tsDeclareFunction`),e.TSDeclareMethod=n(`tsDeclareMethod`),e.TSQualifiedName=n(`tsQualifiedName`),e.TSCallSignatureDeclaration=n(`tsCallSignatureDeclaration`),e.TSConstructSignatureDeclaration=n(`tsConstructSignatureDeclaration`),e.TSPropertySignature=n(`tsPropertySignature`),e.TSMethodSignature=n(`tsMethodSignature`),e.TSIndexSignature=n(`tsIndexSignature`),e.TSAnyKeyword=n(`tsAnyKeyword`),e.TSBooleanKeyword=n(`tsBooleanKeyword`),e.TSBigIntKeyword=n(`tsBigIntKeyword`),e.TSIntrinsicKeyword=n(`tsIntrinsicKeyword`),e.TSNeverKeyword=n(`tsNeverKeyword`),e.TSNullKeyword=n(`tsNullKeyword`),e.TSNumberKeyword=n(`tsNumberKeyword`),e.TSObjectKeyword=n(`tsObjectKeyword`),e.TSStringKeyword=n(`tsStringKeyword`),e.TSSymbolKeyword=n(`tsSymbolKeyword`),e.TSUndefinedKeyword=n(`tsUndefinedKeyword`),e.TSUnknownKeyword=n(`tsUnknownKeyword`),e.TSVoidKeyword=n(`tsVoidKeyword`),e.TSThisType=n(`tsThisType`),e.TSFunctionType=n(`tsFunctionType`),e.TSConstructorType=n(`tsConstructorType`),e.TSTypeReference=n(`tsTypeReference`),e.TSTypePredicate=n(`tsTypePredicate`),e.TSTypeQuery=n(`tsTypeQuery`),e.TSTypeLiteral=n(`tsTypeLiteral`),e.TSArrayType=n(`tsArrayType`),e.TSTupleType=n(`tsTupleType`),e.TSOptionalType=n(`tsOptionalType`),e.TSRestType=n(`tsRestType`),e.TSNamedTupleMember=n(`tsNamedTupleMember`),e.TSUnionType=n(`tsUnionType`),e.TSIntersectionType=n(`tsIntersectionType`),e.TSConditionalType=n(`tsConditionalType`),e.TSInferType=n(`tsInferType`),e.TSParenthesizedType=n(`tsParenthesizedType`),e.TSTypeOperator=n(`tsTypeOperator`),e.TSIndexedAccessType=n(`tsIndexedAccessType`),e.TSMappedType=n(`tsMappedType`),e.TSTemplateLiteralType=n(`tsTemplateLiteralType`),e.TSLiteralType=n(`tsLiteralType`),e.TSExpressionWithTypeArguments=n(`tsExpressionWithTypeArguments`),e.TSInterfaceDeclaration=n(`tsInterfaceDeclaration`),e.TSInterfaceBody=n(`tsInterfaceBody`),e.TSTypeAliasDeclaration=n(`tsTypeAliasDeclaration`),e.TSInstantiationExpression=n(`tsInstantiationExpression`),e.TSAsExpression=n(`tsAsExpression`),e.TSSatisfiesExpression=n(`tsSatisfiesExpression`),e.TSTypeAssertion=n(`tsTypeAssertion`),e.TSEnumBody=n(`tsEnumBody`),e.TSEnumDeclaration=n(`tsEnumDeclaration`),e.TSEnumMember=n(`tsEnumMember`),e.TSModuleDeclaration=n(`tsModuleDeclaration`),e.TSModuleBlock=n(`tsModuleBlock`),e.TSImportType=n(`tsImportType`),e.TSImportEqualsDeclaration=n(`tsImportEqualsDeclaration`),e.TSExternalModuleReference=n(`tsExternalModuleReference`),e.TSNonNullExpression=n(`tsNonNullExpression`),e.TSExportAssignment=n(`tsExportAssignment`),e.TSNamespaceExportDeclaration=n(`tsNamespaceExportDeclaration`),e.TSTypeAnnotation=n(`tsTypeAnnotation`),e.TSTypeParameterInstantiation=n(`tsTypeParameterInstantiation`),e.TSTypeParameterDeclaration=n(`tsTypeParameterDeclaration`),e.TSTypeParameter=n(`tsTypeParameter`),e.NumberLiteral=t.numberLiteral,e.RegexLiteral=t.regexLiteral,e.RestProperty=t.restProperty,e.SpreadProperty=t.spreadProperty})),qv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Gv();Object.keys(t).forEach(function(n){n===`default`||n===`__esModule`||n in e&&e[n]===t[n]||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=Kv();Object.keys(n).forEach(function(t){t===`default`||t===`__esModule`||t in e&&e[t]===n[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})})})),Jv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=qv(),n=Zy();function r(e,r){let i=e.value.split(/\r\n|\n|\r/),a=0;for(let e=0;e<i.length;e++)/[^ \t]/.exec(i[e])&&(a=e);let o=``;for(let e=0;e<i.length;e++){let t=i[e],n=e===0,r=e===i.length-1,s=e===a,c=t.replace(/\t/g,` `);n||(c=c.replace(/^ +/,``)),r||(c=c.replace(/ +$/,``)),c&&(s||(c+=` `),o+=c)}o&&r.push((0,n.inherits)((0,t.stringLiteral)(o),e))}})),Yv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=bv(),n=Jv();function r(e){let r=[];for(let i=0;i<e.children.length;i++){let a=e.children[i];if((0,t.isJSXText)(a)){(0,n.default)(a,r);continue}(0,t.isJSXExpressionContainer)(a)&&(a=a.expression),!(0,t.isJSXEmptyExpression)(a)&&r.push(a)}return r}})),Xv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=Uv();function n(e){return!!(e&&t.VISITOR_KEYS[e.type])}})),Zv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=Xv();function n(e){if(!(0,t.default)(e)){let t=e?.type??JSON.stringify(e);throw TypeError(`Not a valid node of type "${t}"`)}}})),Qv=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.assertAccessor=Ni,e.assertAnyTypeAnnotation=Xe,e.assertArgumentPlaceholder=Tn,e.assertArrayExpression=i,e.assertArrayPattern=he,e.assertArrayTypeAnnotation=Ze,e.assertArrowFunctionExpression=ge,e.assertAssignmentExpression=a,e.assertAssignmentPattern=me,e.assertAwaitExpression=Re,e.assertBigIntLiteral=Be,e.assertBinary=ei,e.assertBinaryExpression=o,e.assertBindExpression=En,e.assertBlock=ri,e.assertBlockParent=ni,e.assertBlockStatement=u,e.assertBooleanLiteral=ee,e.assertBooleanLiteralTypeAnnotation=$e,e.assertBooleanTypeAnnotation=Qe,e.assertBreakStatement=d,e.assertCallExpression=f,e.assertCatchClause=p,e.assertClass=ki,e.assertClassAccessorProperty=H,e.assertClassBody=_e,e.assertClassDeclaration=ye,e.assertClassExpression=ve,e.assertClassImplements=tt,e.assertClassMethod=Ae,e.assertClassPrivateMethod=Ke,e.assertClassPrivateProperty=Ge,e.assertClassProperty=We,e.assertCompletionStatement=oi,e.assertConditional=si,e.assertConditionalExpression=m,e.assertContinueStatement=h,e.assertDebuggerStatement=g,e.assertDecimalLiteral=Mn,e.assertDeclaration=gi,e.assertDeclareClass=nt,e.assertDeclareExportAllDeclaration=dt,e.assertDeclareExportDeclaration=ut,e.assertDeclareFunction=rt,e.assertDeclareInterface=it,e.assertDeclareModule=at,e.assertDeclareModuleExports=ot,e.assertDeclareOpaqueType=ct,e.assertDeclareTypeAlias=st,e.assertDeclareVariable=lt,e.assertDeclaredPredicate=ft,e.assertDecorator=Dn,e.assertDirective=c,e.assertDirectiveLiteral=l,e.assertDoExpression=On,e.assertDoWhileStatement=_,e.assertEmptyStatement=v,e.assertEmptyTypeAnnotation=Ct,e.assertEnumBody=Bi,e.assertEnumBooleanBody=U,e.assertEnumBooleanMember=en,e.assertEnumDeclaration=Xt,e.assertEnumDefaultedMember=rn,e.assertEnumMember=Vi,e.assertEnumNumberBody=Zt,e.assertEnumNumberMember=tn,e.assertEnumStringBody=Qt,e.assertEnumStringMember=nn,e.assertEnumSymbolBody=$t,e.assertExistsTypeAnnotation=pt,e.assertExportAllDeclaration=be,e.assertExportDeclaration=ji,e.assertExportDefaultDeclaration=xe,e.assertExportDefaultSpecifier=kn,e.assertExportNamedDeclaration=Se,e.assertExportNamespaceSpecifier=Ve,e.assertExportSpecifier=Ce,e.assertExpression=$r,e.assertExpressionStatement=y,e.assertExpressionWrapper=ui,e.assertFile=b,e.assertFlow=Fi,e.assertFlowBaseAnnotation=Li,e.assertFlowDeclaration=Ri,e.assertFlowPredicate=zi,e.assertFlowType=Ii,e.assertFor=di,e.assertForInStatement=x,e.assertForOfStatement=we,e.assertForStatement=S,e.assertForXStatement=fi,e.assertFunction=pi,e.assertFunctionDeclaration=C,e.assertFunctionExpression=w,e.assertFunctionParameter=_i,e.assertFunctionParent=mi,e.assertFunctionTypeAnnotation=mt,e.assertFunctionTypeParam=ht,e.assertGenericTypeAnnotation=gt,e.assertIdentifier=T,e.assertIfStatement=E,e.assertImmutable=Si,e.assertImport=ze,e.assertImportAttribute=Ye,e.assertImportDeclaration=Te,e.assertImportDefaultSpecifier=Ee,e.assertImportExpression=V,e.assertImportNamespaceSpecifier=De,e.assertImportOrExportDeclaration=Ai,e.assertImportSpecifier=Oe,e.assertIndexedAccessType=an,e.assertInferredPredicate=_t,e.assertInterfaceDeclaration=yt,e.assertInterfaceExtends=vt,e.assertInterfaceTypeAnnotation=bt,e.assertInterpreterDirective=s,e.assertIntersectionTypeAnnotation=xt,e.assertJSX=Hi,e.assertJSXAttribute=sn,e.assertJSXClosingElement=cn,e.assertJSXClosingFragment=xn,e.assertJSXElement=ln,e.assertJSXEmptyExpression=un,e.assertJSXExpressionContainer=dn,e.assertJSXFragment=yn,e.assertJSXIdentifier=pn,e.assertJSXMemberExpression=mn,e.assertJSXNamespacedName=hn,e.assertJSXOpeningElement=gn,e.assertJSXOpeningFragment=bn,e.assertJSXSpreadAttribute=_n,e.assertJSXSpreadChild=fn,e.assertJSXText=vn,e.assertLVal=yi,e.assertLabeledStatement=D,e.assertLiteral=xi,e.assertLogicalExpression=te,e.assertLoop=ci,e.assertMemberExpression=ne,e.assertMetaProperty=ke,e.assertMethod=wi,e.assertMiscellaneous=Ui,e.assertMixedTypeAnnotation=St,e.assertModuleDeclaration=Qi,e.assertModuleExpression=Nn,e.assertModuleSpecifier=Mi,e.assertNewExpression=M,e.assertNoop=Sn,e.assertNullLiteral=A,e.assertNullLiteralTypeAnnotation=et,e.assertNullableTypeAnnotation=wt,e.assertNumberLiteral=Ji,e.assertNumberLiteralTypeAnnotation=Tt,e.assertNumberTypeAnnotation=Et,e.assertNumericLiteral=k,e.assertObjectExpression=re,e.assertObjectMember=Ti,e.assertObjectMethod=P,e.assertObjectPattern=je,e.assertObjectProperty=F,e.assertObjectTypeAnnotation=Dt,e.assertObjectTypeCallProperty=kt,e.assertObjectTypeIndexer=At,e.assertObjectTypeInternalSlot=Ot,e.assertObjectTypeProperty=jt,e.assertObjectTypeSpreadProperty=Mt,e.assertOpaqueType=Nt,e.assertOptionalCallExpression=Ue,e.assertOptionalIndexedAccessType=on,e.assertOptionalMemberExpression=He,e.assertParenthesizedExpression=z,e.assertPattern=Oi,e.assertPatternLike=vi,e.assertPipelineBareFunction=In,e.assertPipelinePrimaryTopicReference=Ln,e.assertPipelineTopicExpression=Fn,e.assertPlaceholder=Cn,e.assertPrivate=Pi,e.assertPrivateName=qe,e.assertProgram=N,e.assertProperty=Ei,e.assertPureish=hi,e.assertQualifiedTypeIdentifier=Pt,e.assertRecordExpression=An,e.assertRegExpLiteral=j,e.assertRegexLiteral=Yi,e.assertRestElement=I,e.assertRestProperty=Xi,e.assertReturnStatement=L,e.assertScopable=ti,e.assertSequenceExpression=R,e.assertSpreadElement=Me,e.assertSpreadProperty=Zi,e.assertStandardized=Qr,e.assertStatement=ii,e.assertStaticBlock=Je,e.assertStringLiteral=O,e.assertStringLiteralTypeAnnotation=Ft,e.assertStringTypeAnnotation=It,e.assertSuper=Ne,e.assertSwitchCase=ie,e.assertSwitchStatement=ae,e.assertSymbolTypeAnnotation=Lt,e.assertTSAnyKeyword=Jn,e.assertTSArrayType=mr,e.assertTSAsExpression=Pr,e.assertTSBaseType=qi,e.assertTSBigIntKeyword=Xn,e.assertTSBooleanKeyword=Yn,e.assertTSCallSignatureDeclaration=Un,e.assertTSConditionalType=xr,e.assertTSConstructSignatureDeclaration=Wn,e.assertTSConstructorType=lr,e.assertTSDeclareFunction=Bn,e.assertTSDeclareMethod=Vn,e.assertTSEntityName=bi,e.assertTSEnumBody=Lr,e.assertTSEnumDeclaration=Rr,e.assertTSEnumMember=zr,e.assertTSExportAssignment=Kr,e.assertTSExpressionWithTypeArguments=kr,e.assertTSExternalModuleReference=Wr,e.assertTSFunctionType=cr,e.assertTSImportEqualsDeclaration=Ur,e.assertTSImportType=Hr,e.assertTSIndexSignature=qn,e.assertTSIndexedAccessType=Tr,e.assertTSInferType=Sr,e.assertTSInstantiationExpression=Nr,e.assertTSInterfaceBody=jr,e.assertTSInterfaceDeclaration=Ar,e.assertTSIntersectionType=br,e.assertTSIntrinsicKeyword=Zn,e.assertTSLiteralType=Or,e.assertTSMappedType=Er,e.assertTSMethodSignature=Kn,e.assertTSModuleBlock=Vr,e.assertTSModuleDeclaration=Br,e.assertTSNamedTupleMember=vr,e.assertTSNamespaceExportDeclaration=qr,e.assertTSNeverKeyword=Qn,e.assertTSNonNullExpression=Gr,e.assertTSNullKeyword=$n,e.assertTSNumberKeyword=er,e.assertTSObjectKeyword=tr,e.assertTSOptionalType=gr,e.assertTSParameterProperty=zn,e.assertTSParenthesizedType=Cr,e.assertTSPropertySignature=Gn,e.assertTSQualifiedName=Hn,e.assertTSRestType=_r,e.assertTSSatisfiesExpression=Fr,e.assertTSStringKeyword=nr,e.assertTSSymbolKeyword=rr,e.assertTSTemplateLiteralType=Dr,e.assertTSThisType=sr,e.assertTSTupleType=hr,e.assertTSType=Ki,e.assertTSTypeAliasDeclaration=Mr,e.assertTSTypeAnnotation=Jr,e.assertTSTypeAssertion=Ir,e.assertTSTypeElement=Gi,e.assertTSTypeLiteral=pr,e.assertTSTypeOperator=wr,e.assertTSTypeParameter=Zr,e.assertTSTypeParameterDeclaration=Xr,e.assertTSTypeParameterInstantiation=Yr,e.assertTSTypePredicate=dr,e.assertTSTypeQuery=fr,e.assertTSTypeReference=ur,e.assertTSUndefinedKeyword=ir,e.assertTSUnionType=yr,e.assertTSUnknownKeyword=ar,e.assertTSVoidKeyword=or,e.assertTaggedTemplateExpression=Pe,e.assertTemplateElement=Fe,e.assertTemplateLiteral=Ie,e.assertTerminatorless=ai,e.assertThisExpression=oe,e.assertThisTypeAnnotation=Rt,e.assertThrowStatement=se,e.assertTopicReference=Pn,e.assertTryStatement=ce,e.assertTupleExpression=jn,e.assertTupleTypeAnnotation=zt,e.assertTypeAlias=Vt,e.assertTypeAnnotation=Ht,e.assertTypeCastExpression=Ut,e.assertTypeParameter=Wt,e.assertTypeParameterDeclaration=Gt,e.assertTypeParameterInstantiation=Kt,e.assertTypeScript=Wi,e.assertTypeofTypeAnnotation=Bt,e.assertUnaryExpression=le,e.assertUnaryLike=Di,e.assertUnionTypeAnnotation=qt,e.assertUpdateExpression=ue,e.assertUserWhitespacable=Ci,e.assertV8IntrinsicIdentifier=wn,e.assertVariableDeclaration=B,e.assertVariableDeclarator=de,e.assertVariance=Jt,e.assertVoidPattern=Rn,e.assertVoidTypeAnnotation=Yt,e.assertWhile=li,e.assertWhileStatement=fe,e.assertWithStatement=pe,e.assertYieldExpression=Le;var t=Dv(),n=yv();function r(e,n,r){if(!(0,t.default)(e,n,r))throw Error(`Expected type "${e}" with option ${JSON.stringify(r)}, but instead got "${n.type}".`)}function i(e,t){r(`ArrayExpression`,e,t)}function a(e,t){r(`AssignmentExpression`,e,t)}function o(e,t){r(`BinaryExpression`,e,t)}function s(e,t){r(`InterpreterDirective`,e,t)}function c(e,t){r(`Directive`,e,t)}function l(e,t){r(`DirectiveLiteral`,e,t)}function u(e,t){r(`BlockStatement`,e,t)}function d(e,t){r(`BreakStatement`,e,t)}function f(e,t){r(`CallExpression`,e,t)}function p(e,t){r(`CatchClause`,e,t)}function m(e,t){r(`ConditionalExpression`,e,t)}function h(e,t){r(`ContinueStatement`,e,t)}function g(e,t){r(`DebuggerStatement`,e,t)}function _(e,t){r(`DoWhileStatement`,e,t)}function v(e,t){r(`EmptyStatement`,e,t)}function y(e,t){r(`ExpressionStatement`,e,t)}function b(e,t){r(`File`,e,t)}function x(e,t){r(`ForInStatement`,e,t)}function S(e,t){r(`ForStatement`,e,t)}function C(e,t){r(`FunctionDeclaration`,e,t)}function w(e,t){r(`FunctionExpression`,e,t)}function T(e,t){r(`Identifier`,e,t)}function E(e,t){r(`IfStatement`,e,t)}function D(e,t){r(`LabeledStatement`,e,t)}function O(e,t){r(`StringLiteral`,e,t)}function k(e,t){r(`NumericLiteral`,e,t)}function A(e,t){r(`NullLiteral`,e,t)}function ee(e,t){r(`BooleanLiteral`,e,t)}function j(e,t){r(`RegExpLiteral`,e,t)}function te(e,t){r(`LogicalExpression`,e,t)}function ne(e,t){r(`MemberExpression`,e,t)}function M(e,t){r(`NewExpression`,e,t)}function N(e,t){r(`Program`,e,t)}function re(e,t){r(`ObjectExpression`,e,t)}function P(e,t){r(`ObjectMethod`,e,t)}function F(e,t){r(`ObjectProperty`,e,t)}function I(e,t){r(`RestElement`,e,t)}function L(e,t){r(`ReturnStatement`,e,t)}function R(e,t){r(`SequenceExpression`,e,t)}function z(e,t){r(`ParenthesizedExpression`,e,t)}function ie(e,t){r(`SwitchCase`,e,t)}function ae(e,t){r(`SwitchStatement`,e,t)}function oe(e,t){r(`ThisExpression`,e,t)}function se(e,t){r(`ThrowStatement`,e,t)}function ce(e,t){r(`TryStatement`,e,t)}function le(e,t){r(`UnaryExpression`,e,t)}function ue(e,t){r(`UpdateExpression`,e,t)}function B(e,t){r(`VariableDeclaration`,e,t)}function de(e,t){r(`VariableDeclarator`,e,t)}function fe(e,t){r(`WhileStatement`,e,t)}function pe(e,t){r(`WithStatement`,e,t)}function me(e,t){r(`AssignmentPattern`,e,t)}function he(e,t){r(`ArrayPattern`,e,t)}function ge(e,t){r(`ArrowFunctionExpression`,e,t)}function _e(e,t){r(`ClassBody`,e,t)}function ve(e,t){r(`ClassExpression`,e,t)}function ye(e,t){r(`ClassDeclaration`,e,t)}function be(e,t){r(`ExportAllDeclaration`,e,t)}function xe(e,t){r(`ExportDefaultDeclaration`,e,t)}function Se(e,t){r(`ExportNamedDeclaration`,e,t)}function Ce(e,t){r(`ExportSpecifier`,e,t)}function we(e,t){r(`ForOfStatement`,e,t)}function Te(e,t){r(`ImportDeclaration`,e,t)}function Ee(e,t){r(`ImportDefaultSpecifier`,e,t)}function De(e,t){r(`ImportNamespaceSpecifier`,e,t)}function Oe(e,t){r(`ImportSpecifier`,e,t)}function V(e,t){r(`ImportExpression`,e,t)}function ke(e,t){r(`MetaProperty`,e,t)}function Ae(e,t){r(`ClassMethod`,e,t)}function je(e,t){r(`ObjectPattern`,e,t)}function Me(e,t){r(`SpreadElement`,e,t)}function Ne(e,t){r(`Super`,e,t)}function Pe(e,t){r(`TaggedTemplateExpression`,e,t)}function Fe(e,t){r(`TemplateElement`,e,t)}function Ie(e,t){r(`TemplateLiteral`,e,t)}function Le(e,t){r(`YieldExpression`,e,t)}function Re(e,t){r(`AwaitExpression`,e,t)}function ze(e,t){r(`Import`,e,t)}function Be(e,t){r(`BigIntLiteral`,e,t)}function Ve(e,t){r(`ExportNamespaceSpecifier`,e,t)}function He(e,t){r(`OptionalMemberExpression`,e,t)}function Ue(e,t){r(`OptionalCallExpression`,e,t)}function We(e,t){r(`ClassProperty`,e,t)}function H(e,t){r(`ClassAccessorProperty`,e,t)}function Ge(e,t){r(`ClassPrivateProperty`,e,t)}function Ke(e,t){r(`ClassPrivateMethod`,e,t)}function qe(e,t){r(`PrivateName`,e,t)}function Je(e,t){r(`StaticBlock`,e,t)}function Ye(e,t){r(`ImportAttribute`,e,t)}function Xe(e,t){r(`AnyTypeAnnotation`,e,t)}function Ze(e,t){r(`ArrayTypeAnnotation`,e,t)}function Qe(e,t){r(`BooleanTypeAnnotation`,e,t)}function $e(e,t){r(`BooleanLiteralTypeAnnotation`,e,t)}function et(e,t){r(`NullLiteralTypeAnnotation`,e,t)}function tt(e,t){r(`ClassImplements`,e,t)}function nt(e,t){r(`DeclareClass`,e,t)}function rt(e,t){r(`DeclareFunction`,e,t)}function it(e,t){r(`DeclareInterface`,e,t)}function at(e,t){r(`DeclareModule`,e,t)}function ot(e,t){r(`DeclareModuleExports`,e,t)}function st(e,t){r(`DeclareTypeAlias`,e,t)}function ct(e,t){r(`DeclareOpaqueType`,e,t)}function lt(e,t){r(`DeclareVariable`,e,t)}function ut(e,t){r(`DeclareExportDeclaration`,e,t)}function dt(e,t){r(`DeclareExportAllDeclaration`,e,t)}function ft(e,t){r(`DeclaredPredicate`,e,t)}function pt(e,t){r(`ExistsTypeAnnotation`,e,t)}function mt(e,t){r(`FunctionTypeAnnotation`,e,t)}function ht(e,t){r(`FunctionTypeParam`,e,t)}function gt(e,t){r(`GenericTypeAnnotation`,e,t)}function _t(e,t){r(`InferredPredicate`,e,t)}function vt(e,t){r(`InterfaceExtends`,e,t)}function yt(e,t){r(`InterfaceDeclaration`,e,t)}function bt(e,t){r(`InterfaceTypeAnnotation`,e,t)}function xt(e,t){r(`IntersectionTypeAnnotation`,e,t)}function St(e,t){r(`MixedTypeAnnotation`,e,t)}function Ct(e,t){r(`EmptyTypeAnnotation`,e,t)}function wt(e,t){r(`NullableTypeAnnotation`,e,t)}function Tt(e,t){r(`NumberLiteralTypeAnnotation`,e,t)}function Et(e,t){r(`NumberTypeAnnotation`,e,t)}function Dt(e,t){r(`ObjectTypeAnnotation`,e,t)}function Ot(e,t){r(`ObjectTypeInternalSlot`,e,t)}function kt(e,t){r(`ObjectTypeCallProperty`,e,t)}function At(e,t){r(`ObjectTypeIndexer`,e,t)}function jt(e,t){r(`ObjectTypeProperty`,e,t)}function Mt(e,t){r(`ObjectTypeSpreadProperty`,e,t)}function Nt(e,t){r(`OpaqueType`,e,t)}function Pt(e,t){r(`QualifiedTypeIdentifier`,e,t)}function Ft(e,t){r(`StringLiteralTypeAnnotation`,e,t)}function It(e,t){r(`StringTypeAnnotation`,e,t)}function Lt(e,t){r(`SymbolTypeAnnotation`,e,t)}function Rt(e,t){r(`ThisTypeAnnotation`,e,t)}function zt(e,t){r(`TupleTypeAnnotation`,e,t)}function Bt(e,t){r(`TypeofTypeAnnotation`,e,t)}function Vt(e,t){r(`TypeAlias`,e,t)}function Ht(e,t){r(`TypeAnnotation`,e,t)}function Ut(e,t){r(`TypeCastExpression`,e,t)}function Wt(e,t){r(`TypeParameter`,e,t)}function Gt(e,t){r(`TypeParameterDeclaration`,e,t)}function Kt(e,t){r(`TypeParameterInstantiation`,e,t)}function qt(e,t){r(`UnionTypeAnnotation`,e,t)}function Jt(e,t){r(`Variance`,e,t)}function Yt(e,t){r(`VoidTypeAnnotation`,e,t)}function Xt(e,t){r(`EnumDeclaration`,e,t)}function U(e,t){r(`EnumBooleanBody`,e,t)}function Zt(e,t){r(`EnumNumberBody`,e,t)}function Qt(e,t){r(`EnumStringBody`,e,t)}function $t(e,t){r(`EnumSymbolBody`,e,t)}function en(e,t){r(`EnumBooleanMember`,e,t)}function tn(e,t){r(`EnumNumberMember`,e,t)}function nn(e,t){r(`EnumStringMember`,e,t)}function rn(e,t){r(`EnumDefaultedMember`,e,t)}function an(e,t){r(`IndexedAccessType`,e,t)}function on(e,t){r(`OptionalIndexedAccessType`,e,t)}function sn(e,t){r(`JSXAttribute`,e,t)}function cn(e,t){r(`JSXClosingElement`,e,t)}function ln(e,t){r(`JSXElement`,e,t)}function un(e,t){r(`JSXEmptyExpression`,e,t)}function dn(e,t){r(`JSXExpressionContainer`,e,t)}function fn(e,t){r(`JSXSpreadChild`,e,t)}function pn(e,t){r(`JSXIdentifier`,e,t)}function mn(e,t){r(`JSXMemberExpression`,e,t)}function hn(e,t){r(`JSXNamespacedName`,e,t)}function gn(e,t){r(`JSXOpeningElement`,e,t)}function _n(e,t){r(`JSXSpreadAttribute`,e,t)}function vn(e,t){r(`JSXText`,e,t)}function yn(e,t){r(`JSXFragment`,e,t)}function bn(e,t){r(`JSXOpeningFragment`,e,t)}function xn(e,t){r(`JSXClosingFragment`,e,t)}function Sn(e,t){r(`Noop`,e,t)}function Cn(e,t){r(`Placeholder`,e,t)}function wn(e,t){r(`V8IntrinsicIdentifier`,e,t)}function Tn(e,t){r(`ArgumentPlaceholder`,e,t)}function En(e,t){r(`BindExpression`,e,t)}function Dn(e,t){r(`Decorator`,e,t)}function On(e,t){r(`DoExpression`,e,t)}function kn(e,t){r(`ExportDefaultSpecifier`,e,t)}function An(e,t){r(`RecordExpression`,e,t)}function jn(e,t){r(`TupleExpression`,e,t)}function Mn(e,t){r(`DecimalLiteral`,e,t)}function Nn(e,t){r(`ModuleExpression`,e,t)}function Pn(e,t){r(`TopicReference`,e,t)}function Fn(e,t){r(`PipelineTopicExpression`,e,t)}function In(e,t){r(`PipelineBareFunction`,e,t)}function Ln(e,t){r(`PipelinePrimaryTopicReference`,e,t)}function Rn(e,t){r(`VoidPattern`,e,t)}function zn(e,t){r(`TSParameterProperty`,e,t)}function Bn(e,t){r(`TSDeclareFunction`,e,t)}function Vn(e,t){r(`TSDeclareMethod`,e,t)}function Hn(e,t){r(`TSQualifiedName`,e,t)}function Un(e,t){r(`TSCallSignatureDeclaration`,e,t)}function Wn(e,t){r(`TSConstructSignatureDeclaration`,e,t)}function Gn(e,t){r(`TSPropertySignature`,e,t)}function Kn(e,t){r(`TSMethodSignature`,e,t)}function qn(e,t){r(`TSIndexSignature`,e,t)}function Jn(e,t){r(`TSAnyKeyword`,e,t)}function Yn(e,t){r(`TSBooleanKeyword`,e,t)}function Xn(e,t){r(`TSBigIntKeyword`,e,t)}function Zn(e,t){r(`TSIntrinsicKeyword`,e,t)}function Qn(e,t){r(`TSNeverKeyword`,e,t)}function $n(e,t){r(`TSNullKeyword`,e,t)}function er(e,t){r(`TSNumberKeyword`,e,t)}function tr(e,t){r(`TSObjectKeyword`,e,t)}function nr(e,t){r(`TSStringKeyword`,e,t)}function rr(e,t){r(`TSSymbolKeyword`,e,t)}function ir(e,t){r(`TSUndefinedKeyword`,e,t)}function ar(e,t){r(`TSUnknownKeyword`,e,t)}function or(e,t){r(`TSVoidKeyword`,e,t)}function sr(e,t){r(`TSThisType`,e,t)}function cr(e,t){r(`TSFunctionType`,e,t)}function lr(e,t){r(`TSConstructorType`,e,t)}function ur(e,t){r(`TSTypeReference`,e,t)}function dr(e,t){r(`TSTypePredicate`,e,t)}function fr(e,t){r(`TSTypeQuery`,e,t)}function pr(e,t){r(`TSTypeLiteral`,e,t)}function mr(e,t){r(`TSArrayType`,e,t)}function hr(e,t){r(`TSTupleType`,e,t)}function gr(e,t){r(`TSOptionalType`,e,t)}function _r(e,t){r(`TSRestType`,e,t)}function vr(e,t){r(`TSNamedTupleMember`,e,t)}function yr(e,t){r(`TSUnionType`,e,t)}function br(e,t){r(`TSIntersectionType`,e,t)}function xr(e,t){r(`TSConditionalType`,e,t)}function Sr(e,t){r(`TSInferType`,e,t)}function Cr(e,t){r(`TSParenthesizedType`,e,t)}function wr(e,t){r(`TSTypeOperator`,e,t)}function Tr(e,t){r(`TSIndexedAccessType`,e,t)}function Er(e,t){r(`TSMappedType`,e,t)}function Dr(e,t){r(`TSTemplateLiteralType`,e,t)}function Or(e,t){r(`TSLiteralType`,e,t)}function kr(e,t){r(`TSExpressionWithTypeArguments`,e,t)}function Ar(e,t){r(`TSInterfaceDeclaration`,e,t)}function jr(e,t){r(`TSInterfaceBody`,e,t)}function Mr(e,t){r(`TSTypeAliasDeclaration`,e,t)}function Nr(e,t){r(`TSInstantiationExpression`,e,t)}function Pr(e,t){r(`TSAsExpression`,e,t)}function Fr(e,t){r(`TSSatisfiesExpression`,e,t)}function Ir(e,t){r(`TSTypeAssertion`,e,t)}function Lr(e,t){r(`TSEnumBody`,e,t)}function Rr(e,t){r(`TSEnumDeclaration`,e,t)}function zr(e,t){r(`TSEnumMember`,e,t)}function Br(e,t){r(`TSModuleDeclaration`,e,t)}function Vr(e,t){r(`TSModuleBlock`,e,t)}function Hr(e,t){r(`TSImportType`,e,t)}function Ur(e,t){r(`TSImportEqualsDeclaration`,e,t)}function Wr(e,t){r(`TSExternalModuleReference`,e,t)}function Gr(e,t){r(`TSNonNullExpression`,e,t)}function Kr(e,t){r(`TSExportAssignment`,e,t)}function qr(e,t){r(`TSNamespaceExportDeclaration`,e,t)}function Jr(e,t){r(`TSTypeAnnotation`,e,t)}function Yr(e,t){r(`TSTypeParameterInstantiation`,e,t)}function Xr(e,t){r(`TSTypeParameterDeclaration`,e,t)}function Zr(e,t){r(`TSTypeParameter`,e,t)}function Qr(e,t){r(`Standardized`,e,t)}function $r(e,t){r(`Expression`,e,t)}function ei(e,t){r(`Binary`,e,t)}function ti(e,t){r(`Scopable`,e,t)}function ni(e,t){r(`BlockParent`,e,t)}function ri(e,t){r(`Block`,e,t)}function ii(e,t){r(`Statement`,e,t)}function ai(e,t){r(`Terminatorless`,e,t)}function oi(e,t){r(`CompletionStatement`,e,t)}function si(e,t){r(`Conditional`,e,t)}function ci(e,t){r(`Loop`,e,t)}function li(e,t){r(`While`,e,t)}function ui(e,t){r(`ExpressionWrapper`,e,t)}function di(e,t){r(`For`,e,t)}function fi(e,t){r(`ForXStatement`,e,t)}function pi(e,t){r(`Function`,e,t)}function mi(e,t){r(`FunctionParent`,e,t)}function hi(e,t){r(`Pureish`,e,t)}function gi(e,t){r(`Declaration`,e,t)}function _i(e,t){r(`FunctionParameter`,e,t)}function vi(e,t){r(`PatternLike`,e,t)}function yi(e,t){r(`LVal`,e,t)}function bi(e,t){r(`TSEntityName`,e,t)}function xi(e,t){r(`Literal`,e,t)}function Si(e,t){r(`Immutable`,e,t)}function Ci(e,t){r(`UserWhitespacable`,e,t)}function wi(e,t){r(`Method`,e,t)}function Ti(e,t){r(`ObjectMember`,e,t)}function Ei(e,t){r(`Property`,e,t)}function Di(e,t){r(`UnaryLike`,e,t)}function Oi(e,t){r(`Pattern`,e,t)}function ki(e,t){r(`Class`,e,t)}function Ai(e,t){r(`ImportOrExportDeclaration`,e,t)}function ji(e,t){r(`ExportDeclaration`,e,t)}function Mi(e,t){r(`ModuleSpecifier`,e,t)}function Ni(e,t){r(`Accessor`,e,t)}function Pi(e,t){r(`Private`,e,t)}function Fi(e,t){r(`Flow`,e,t)}function Ii(e,t){r(`FlowType`,e,t)}function Li(e,t){r(`FlowBaseAnnotation`,e,t)}function Ri(e,t){r(`FlowDeclaration`,e,t)}function zi(e,t){r(`FlowPredicate`,e,t)}function Bi(e,t){r(`EnumBody`,e,t)}function Vi(e,t){r(`EnumMember`,e,t)}function Hi(e,t){r(`JSX`,e,t)}function Ui(e,t){r(`Miscellaneous`,e,t)}function Wi(e,t){r(`TypeScript`,e,t)}function Gi(e,t){r(`TSTypeElement`,e,t)}function Ki(e,t){r(`TSType`,e,t)}function qi(e,t){r(`TSBaseType`,e,t)}function Ji(e,t){(0,n.default)(`assertNumberLiteral`,`assertNumericLiteral`),r(`NumberLiteral`,e,t)}function Yi(e,t){(0,n.default)(`assertRegexLiteral`,`assertRegExpLiteral`),r(`RegexLiteral`,e,t)}function Xi(e,t){(0,n.default)(`assertRestProperty`,`assertRestElement`),r(`RestProperty`,e,t)}function Zi(e,t){(0,n.default)(`assertSpreadProperty`,`assertSpreadElement`),r(`SpreadProperty`,e,t)}function Qi(e,t){(0,n.default)(`assertModuleDeclaration`,`assertImportOrExportDeclaration`),r(`ModuleDeclaration`,e,t)}})),$v=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=qv();e.default=n;function n(e){switch(e){case`string`:return(0,t.stringTypeAnnotation)();case`number`:return(0,t.numberTypeAnnotation)();case`undefined`:return(0,t.voidTypeAnnotation)();case`boolean`:return(0,t.booleanTypeAnnotation)();case`function`:return(0,t.genericTypeAnnotation)((0,t.identifier)(`Function`));case`object`:return(0,t.genericTypeAnnotation)((0,t.identifier)(`Object`));case`symbol`:return(0,t.genericTypeAnnotation)((0,t.identifier)(`Symbol`));case`bigint`:return(0,t.anyTypeAnnotation)()}throw Error(`Invalid typeof value: `+e)}})),ey=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=bv();function n(e){return(0,t.isIdentifier)(e)?e.name:`${e.id.name}.${n(e.qualification)}`}function r(e){let i=Array.from(e),a=new Map,o=new Map,s=new Set,c=[];for(let e=0;e<i.length;e++){let l=i[e];if(l&&!c.includes(l)){if((0,t.isAnyTypeAnnotation)(l))return[l];if((0,t.isFlowBaseAnnotation)(l)){o.set(l.type,l);continue}if((0,t.isUnionTypeAnnotation)(l)){s.has(l.types)||(i.push(...l.types),s.add(l.types));continue}if((0,t.isGenericTypeAnnotation)(l)){let e=n(l.id);if(a.has(e)){let t=a.get(e);t.typeParameters?l.typeParameters&&(t.typeParameters.params.push(...l.typeParameters.params),t.typeParameters.params=r(t.typeParameters.params)):t=l.typeParameters}else a.set(e,l);continue}c.push(l)}}for(let[,e]of o)c.push(e);for(let[,e]of a)c.push(e);return c}})),ty=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=qv(),n=ey();function r(e){let r=(0,n.default)(e);return r.length===1?r[0]:(0,t.unionTypeAnnotation)(r)}})),ny=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=bv();function n(e){return(0,t.isIdentifier)(e)?e.name:(0,t.isThisExpression)(e)?`this`:`${e.right.name}.${n(e.left)}`}function r(e){let i=Array.from(e),a=new Map,o=new Map,s=new Set,c=[];for(let e=0;e<i.length;e++){let l=i[e];if(!l||c.includes(l))continue;if((0,t.isTSAnyKeyword)(l))return[l];if((0,t.isTSBaseType)(l)){o.set(l.type,l);continue}if((0,t.isTSUnionType)(l)){s.has(l.types)||(i.push(...l.types),s.add(l.types));continue}let u=`typeParameters`;if((0,t.isTSTypeReference)(l)&&l[u]){let e=l[u],t=n(l.typeName);if(a.has(t)){let n=a.get(t),i=n[u];i?(i.params.push(...e.params),i.params=r(i.params)):n=e}else a.set(t,l);continue}c.push(l)}for(let[,e]of o)c.push(e);for(let[,e]of a)c.push(e);return c}})),ry=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=i;var t=qv(),n=ny(),r=bv();function i(e){let i=e.map(e=>(0,r.isTSTypeAnnotation)(e)?e.typeAnnotation:e),a=(0,n.default)(i);return a.length===1?a[0]:(0,t.tsUnionType)(a)}})),iy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.buildUndefinedNode=n;var t=qv();function n(){return(0,t.unaryExpression)(`void`,(0,t.numericLiteral)(0),!0)}})),ay=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=o;var t=Uv(),n=bv();let{hasOwn:r}={hasOwn:Function.call.bind(Object.prototype.hasOwnProperty)};function i(e,t,n,r){return e&&typeof e.type==`string`?s(e,t,n,r):e}function a(e,t,n,r){return Array.isArray(e)?e.map(e=>i(e,t,n,r)):i(e,t,n,r)}function o(e,t=!0,n=!1){return s(e,t,n,new Map)}function s(e,i=!0,o=!1,s){if(!e)return e;let{type:l}=e,u={type:e.type};if((0,n.isIdentifier)(e))u.name=e.name,r(e,`optional`)&&typeof e.optional==`boolean`&&(u.optional=e.optional),r(e,`typeAnnotation`)&&(u.typeAnnotation=i?a(e.typeAnnotation,!0,o,s):e.typeAnnotation),r(e,`decorators`)&&(u.decorators=i?a(e.decorators,!0,o,s):e.decorators);else if(r(t.NODE_FIELDS,l))for(let d of Object.keys(t.NODE_FIELDS[l]))r(e,d)&&(i?u[d]=(0,n.isFile)(e)&&d===`comments`?c(e.comments,i,o,s):a(e[d],!0,o,s):u[d]=e[d]);else throw Error(`Unknown node type: "${l}"`);return r(e,`loc`)&&(o?u.loc=null:u.loc=e.loc),r(e,`leadingComments`)&&(u.leadingComments=c(e.leadingComments,i,o,s)),r(e,`innerComments`)&&(u.innerComments=c(e.innerComments,i,o,s)),r(e,`trailingComments`)&&(u.trailingComments=c(e.trailingComments,i,o,s)),r(e,`extra`)&&(u.extra=Object.assign({},e.extra)),u}function c(e,t,n,r){return!e||!t?e:e.map(e=>{let t=r.get(e);if(t)return t;let{type:i,value:a,loc:o}=e,s={type:i,value:a,loc:o};return n&&(s.loc=null),r.set(e,s),s})}})),oy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=ay();function n(e){return(0,t.default)(e,!1)}})),sy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=ay();function n(e){return(0,t.default)(e)}})),cy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=ay();function n(e){return(0,t.default)(e,!0,!0)}})),ly=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=ay();function n(e){return(0,t.default)(e,!1,!0)}})),uy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=t;function t(e,t,n){if(!n||!e)return e;let r=`${t}Comments`;return e[r]?t===`leading`?e[r]=n.concat(e[r]):e[r].push(...n):e[r]=n,e}})),dy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=uy();function n(e,n,r,i){return(0,t.default)(e,n,[{type:i?`CommentLine`:`CommentBlock`,value:r}])}})),fy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=t;function t(e,t,n){t&&n&&(t[e]=Array.from(new Set([].concat(t[e],n[e]).filter(Boolean))))}})),py=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=fy();function n(e,n){(0,t.default)(`innerComments`,e,n)}})),my=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=fy();function n(e,n){(0,t.default)(`leadingComments`,e,n)}})),hy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=fy();function n(e,n){(0,t.default)(`trailingComments`,e,n)}})),gy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=i;var t=hy(),n=my(),r=py();function i(e,i){return(0,t.default)(e,i),(0,n.default)(e,i),(0,r.default)(e,i),e}})),_y=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=Nv();function n(e){return t.COMMENT_KEYS.forEach(t=>{e[t]=null}),e}})),vy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WHILE_TYPES=e.USERWHITESPACABLE_TYPES=e.UNARYLIKE_TYPES=e.TYPESCRIPT_TYPES=e.TSTYPE_TYPES=e.TSTYPEELEMENT_TYPES=e.TSENTITYNAME_TYPES=e.TSBASETYPE_TYPES=e.TERMINATORLESS_TYPES=e.STATEMENT_TYPES=e.STANDARDIZED_TYPES=e.SCOPABLE_TYPES=e.PUREISH_TYPES=e.PROPERTY_TYPES=e.PRIVATE_TYPES=e.PATTERN_TYPES=e.PATTERNLIKE_TYPES=e.OBJECTMEMBER_TYPES=e.MODULESPECIFIER_TYPES=e.MODULEDECLARATION_TYPES=e.MISCELLANEOUS_TYPES=e.METHOD_TYPES=e.LVAL_TYPES=e.LOOP_TYPES=e.LITERAL_TYPES=e.JSX_TYPES=e.IMPORTOREXPORTDECLARATION_TYPES=e.IMMUTABLE_TYPES=e.FUNCTION_TYPES=e.FUNCTIONPARENT_TYPES=e.FUNCTIONPARAMETER_TYPES=e.FOR_TYPES=e.FORXSTATEMENT_TYPES=e.FLOW_TYPES=e.FLOWTYPE_TYPES=e.FLOWPREDICATE_TYPES=e.FLOWDECLARATION_TYPES=e.FLOWBASEANNOTATION_TYPES=e.EXPRESSION_TYPES=e.EXPRESSIONWRAPPER_TYPES=e.EXPORTDECLARATION_TYPES=e.ENUMMEMBER_TYPES=e.ENUMBODY_TYPES=e.DECLARATION_TYPES=e.CONDITIONAL_TYPES=e.COMPLETIONSTATEMENT_TYPES=e.CLASS_TYPES=e.BLOCK_TYPES=e.BLOCKPARENT_TYPES=e.BINARY_TYPES=e.ACCESSOR_TYPES=void 0;var t=Uv();e.STANDARDIZED_TYPES=t.FLIPPED_ALIAS_KEYS.Standardized,e.EXPRESSION_TYPES=t.FLIPPED_ALIAS_KEYS.Expression,e.BINARY_TYPES=t.FLIPPED_ALIAS_KEYS.Binary,e.SCOPABLE_TYPES=t.FLIPPED_ALIAS_KEYS.Scopable,e.BLOCKPARENT_TYPES=t.FLIPPED_ALIAS_KEYS.BlockParent,e.BLOCK_TYPES=t.FLIPPED_ALIAS_KEYS.Block,e.STATEMENT_TYPES=t.FLIPPED_ALIAS_KEYS.Statement,e.TERMINATORLESS_TYPES=t.FLIPPED_ALIAS_KEYS.Terminatorless,e.COMPLETIONSTATEMENT_TYPES=t.FLIPPED_ALIAS_KEYS.CompletionStatement,e.CONDITIONAL_TYPES=t.FLIPPED_ALIAS_KEYS.Conditional,e.LOOP_TYPES=t.FLIPPED_ALIAS_KEYS.Loop,e.WHILE_TYPES=t.FLIPPED_ALIAS_KEYS.While,e.EXPRESSIONWRAPPER_TYPES=t.FLIPPED_ALIAS_KEYS.ExpressionWrapper,e.FOR_TYPES=t.FLIPPED_ALIAS_KEYS.For,e.FORXSTATEMENT_TYPES=t.FLIPPED_ALIAS_KEYS.ForXStatement,e.FUNCTION_TYPES=t.FLIPPED_ALIAS_KEYS.Function,e.FUNCTIONPARENT_TYPES=t.FLIPPED_ALIAS_KEYS.FunctionParent,e.PUREISH_TYPES=t.FLIPPED_ALIAS_KEYS.Pureish,e.DECLARATION_TYPES=t.FLIPPED_ALIAS_KEYS.Declaration,e.FUNCTIONPARAMETER_TYPES=t.FLIPPED_ALIAS_KEYS.FunctionParameter,e.PATTERNLIKE_TYPES=t.FLIPPED_ALIAS_KEYS.PatternLike,e.LVAL_TYPES=t.FLIPPED_ALIAS_KEYS.LVal,e.TSENTITYNAME_TYPES=t.FLIPPED_ALIAS_KEYS.TSEntityName,e.LITERAL_TYPES=t.FLIPPED_ALIAS_KEYS.Literal,e.IMMUTABLE_TYPES=t.FLIPPED_ALIAS_KEYS.Immutable,e.USERWHITESPACABLE_TYPES=t.FLIPPED_ALIAS_KEYS.UserWhitespacable,e.METHOD_TYPES=t.FLIPPED_ALIAS_KEYS.Method,e.OBJECTMEMBER_TYPES=t.FLIPPED_ALIAS_KEYS.ObjectMember,e.PROPERTY_TYPES=t.FLIPPED_ALIAS_KEYS.Property,e.UNARYLIKE_TYPES=t.FLIPPED_ALIAS_KEYS.UnaryLike,e.PATTERN_TYPES=t.FLIPPED_ALIAS_KEYS.Pattern,e.CLASS_TYPES=t.FLIPPED_ALIAS_KEYS.Class;let n=e.IMPORTOREXPORTDECLARATION_TYPES=t.FLIPPED_ALIAS_KEYS.ImportOrExportDeclaration;e.EXPORTDECLARATION_TYPES=t.FLIPPED_ALIAS_KEYS.ExportDeclaration,e.MODULESPECIFIER_TYPES=t.FLIPPED_ALIAS_KEYS.ModuleSpecifier,e.ACCESSOR_TYPES=t.FLIPPED_ALIAS_KEYS.Accessor,e.PRIVATE_TYPES=t.FLIPPED_ALIAS_KEYS.Private,e.FLOW_TYPES=t.FLIPPED_ALIAS_KEYS.Flow,e.FLOWTYPE_TYPES=t.FLIPPED_ALIAS_KEYS.FlowType,e.FLOWBASEANNOTATION_TYPES=t.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation,e.FLOWDECLARATION_TYPES=t.FLIPPED_ALIAS_KEYS.FlowDeclaration,e.FLOWPREDICATE_TYPES=t.FLIPPED_ALIAS_KEYS.FlowPredicate,e.ENUMBODY_TYPES=t.FLIPPED_ALIAS_KEYS.EnumBody,e.ENUMMEMBER_TYPES=t.FLIPPED_ALIAS_KEYS.EnumMember,e.JSX_TYPES=t.FLIPPED_ALIAS_KEYS.JSX,e.MISCELLANEOUS_TYPES=t.FLIPPED_ALIAS_KEYS.Miscellaneous,e.TYPESCRIPT_TYPES=t.FLIPPED_ALIAS_KEYS.TypeScript,e.TSTYPEELEMENT_TYPES=t.FLIPPED_ALIAS_KEYS.TSTypeElement,e.TSTYPE_TYPES=t.FLIPPED_ALIAS_KEYS.TSType,e.TSBASETYPE_TYPES=t.FLIPPED_ALIAS_KEYS.TSBaseType,e.MODULEDECLARATION_TYPES=n})),yy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=bv(),n=qv();function r(e,r){if((0,t.isBlockStatement)(e))return e;let i=[];return(0,t.isEmptyStatement)(e)?i=[]:((0,t.isStatement)(e)||(e=(0,t.isFunction)(r)?(0,n.returnStatement)(e):(0,n.expressionStatement)(e)),i=[e]),(0,n.blockStatement)(i)}})),by=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=yy();function n(e,n=`body`){let r=(0,t.default)(e[n],e);return e[n]=r,r}})),xy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=jv(),n=Av();function r(e){e+=``;let r=``;for(let t of e)r+=(0,n.isIdentifierChar)(t.codePointAt(0))?t:`-`;return r=r.replace(/^[-0-9]+/,``),r=r.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():``}),(0,t.default)(r)||(r=`_${r}`),r||`_`}})),Sy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=xy();function n(e){return e=(0,t.default)(e),(e===`eval`||e===`arguments`)&&(e=`_`+e),e}})),Cy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=bv(),n=qv();function r(e,r=e.key||e.property){return!e.computed&&(0,t.isIdentifier)(r)&&(r=(0,n.stringLiteral)(r.name)),r}})),wy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=bv();e.default=n;function n(e){if((0,t.isExpressionStatement)(e)&&(e=e.expression),(0,t.isExpression)(e))return e;if((0,t.isClass)(e)?(e.type=`ClassExpression`,e.abstract=!1):(0,t.isFunction)(e)&&(e.type=`FunctionExpression`),!(0,t.isExpression)(e))throw Error(`cannot turn ${e.type} to an expression`);return e}})),Ty=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=i;var t=Uv();let n=Symbol(),r=Symbol();function i(e,a,o){if(!e)return!1;let s=t.VISITOR_KEYS[e.type];if(!s)return!1;o||={};let c=a(e,o);if(c!==void 0)switch(c){case n:return!1;case r:return!0}for(let t of s){let n=e[t];if(n){if(Array.isArray(n)){for(let e of n)if(i(e,a,o))return!0}else if(i(n,a,o))return!0}}return!1}i.skip=n,i.stop=r})),Ey=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=i;var t=Nv();let n=[`tokens`,`start`,`end`,`loc`,`raw`,`rawValue`],r=[...t.COMMENT_KEYS,`comments`,...n];function i(e,t={}){let i=t.preserveComments?n:r;for(let t of i)e[t]!=null&&(e[t]=void 0);for(let t of Object.keys(e))t.startsWith(`_`)&&e[t]!=null&&(e[t]=void 0);let a=Object.getOwnPropertySymbols(e);for(let t of a)e[t]=null}})),Dy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=Ty(),n=Ey();function r(e,r){return(0,t.default)(e,n.default,r),e}})),Oy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=i;var t=bv(),n=ay(),r=Dy();function i(e,a=e.key){let o;return e.kind===`method`?i.increment()+``:(o=(0,t.isIdentifier)(a)?a.name:(0,t.isStringLiteral)(a)?JSON.stringify(a.value):JSON.stringify((0,r.default)((0,n.default)(a))),e.computed&&(o=`[${o}]`),e.static&&(o=`static:${o}`),o)}i.uid=0,i.increment=function(){return i.uid>=2**53-1?i.uid=0:i.uid++}})),ky=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=bv(),n=qv();e.default=r;function r(e,r){if((0,t.isStatement)(e))return e;let i=!1,a;if((0,t.isClass)(e))i=!0,a=`ClassDeclaration`;else if((0,t.isFunction)(e))i=!0,a=`FunctionDeclaration`;else if((0,t.isAssignmentExpression)(e))return(0,n.expressionStatement)(e);if(i&&!e.id&&(a=!1),!a){if(r)return!1;throw Error(`cannot turn ${e.type} to a statement`)}return e.type=a,e}})),Ay=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=jv(),n=qv();e.default=o;let r=Function.call.bind(Object.prototype.toString);function i(e){return r(e)===`[object RegExp]`}function a(e){if(typeof e!=`object`||!e||Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function o(e){if(e===void 0)return(0,n.identifier)(`undefined`);if(e===!0||e===!1)return(0,n.booleanLiteral)(e);if(e===null)return(0,n.nullLiteral)();if(typeof e==`string`)return(0,n.stringLiteral)(e);if(typeof e==`number`){let t;if(Number.isFinite(e))t=(0,n.numericLiteral)(Math.abs(e));else{let r;r=Number.isNaN(e)?(0,n.numericLiteral)(0):(0,n.numericLiteral)(1),t=(0,n.binaryExpression)(`/`,r,(0,n.numericLiteral)(0))}return(e<0||Object.is(e,-0))&&(t=(0,n.unaryExpression)(`-`,t)),t}if(typeof e==`bigint`)return e<0?(0,n.unaryExpression)(`-`,(0,n.bigIntLiteral)(-e)):(0,n.bigIntLiteral)(e);if(i(e)){let t=e.source,r=/\/([a-z]*)$/.exec(e.toString())[1];return(0,n.regExpLiteral)(t,r)}if(Array.isArray(e))return(0,n.arrayExpression)(e.map(o));if(a(e)){let r=[];for(let i of Object.keys(e)){let a,s=!1;(0,t.default)(i)?i===`__proto__`?(s=!0,a=(0,n.stringLiteral)(i)):a=(0,n.identifier)(i):a=(0,n.stringLiteral)(i),r.push((0,n.objectProperty)(a,o(e[i]),s))}return(0,n.objectExpression)(r)}throw Error(`don't know how to turn this value into a node`)}})),jy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=qv();function n(e,n,r=!1){return e.object=(0,t.memberExpression)(e.object,e.property,e.computed),e.property=n,e.computed=!!r,e}})),My=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=Nv(),n=gy();function r(e,r){if(!e||!r)return e;for(let n of t.INHERIT_KEYS.optional)e[n]??(e[n]=r[n]);for(let t of Object.keys(r))t.startsWith(`_`)&&t!==`__clone`&&(e[t]=r[t]);for(let n of t.INHERIT_KEYS.force)e[n]=r[n];return(0,n.default)(e,r),e}})),Ny=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=qv(),n=Zy();function r(e,r){if((0,n.isSuper)(e.object))throw Error("Cannot prepend node to super property access (`super.foo`).");return e.object=(0,t.memberExpression)(r,e.object),e}})),Py=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=t;function t(e){let t=[].concat(e),n=Object.create(null);for(;t.length;){let e=t.pop();if(e)switch(e.type){case`ArrayPattern`:t.push(...e.elements);break;case`AssignmentExpression`:case`AssignmentPattern`:case`ForInStatement`:case`ForOfStatement`:t.push(e.left);break;case`ObjectPattern`:t.push(...e.properties);break;case`ObjectProperty`:t.push(e.value);break;case`RestElement`:case`UpdateExpression`:t.push(e.argument);break;case`UnaryExpression`:e.operator===`delete`&&t.push(e.argument);break;case`Identifier`:n[e.name]=e;break;default:break}}return n}})),Fy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=bv();function n(e,r,i,a){let o=[].concat(e),s=Object.create(null);for(;o.length;){let e=o.shift();if(!e||a&&((0,t.isAssignmentExpression)(e)||(0,t.isUnaryExpression)(e)||(0,t.isUpdateExpression)(e)))continue;if((0,t.isIdentifier)(e)){r?(s[e.name]=s[e.name]||[]).push(e):s[e.name]=e;continue}if((0,t.isExportDeclaration)(e)&&!(0,t.isExportAllDeclaration)(e)){(0,t.isDeclaration)(e.declaration)&&o.push(e.declaration);continue}if(i){if((0,t.isFunctionDeclaration)(e)){o.push(e.id);continue}if((0,t.isFunctionExpression)(e))continue}let c=n.keys[e.type];if(c)for(let t=0;t<c.length;t++){let n=e[c[t]];n&&(Array.isArray(n)?o.push(...n):o.push(n))}}return s}n.keys={DeclareClass:[`id`],DeclareFunction:[`id`],DeclareModule:[`id`],DeclareVariable:[`id`],DeclareInterface:[`id`],DeclareTypeAlias:[`id`],DeclareOpaqueType:[`id`],InterfaceDeclaration:[`id`],TypeAlias:[`id`],OpaqueType:[`id`],CatchClause:[`param`],LabeledStatement:[`label`],UnaryExpression:[`argument`],AssignmentExpression:[`left`],ImportSpecifier:[`local`],ImportNamespaceSpecifier:[`local`],ImportDefaultSpecifier:[`local`],ImportDeclaration:[`specifiers`],TSImportEqualsDeclaration:[`id`],ExportSpecifier:[`exported`],ExportNamespaceSpecifier:[`exported`],ExportDefaultSpecifier:[`exported`],FunctionDeclaration:[`id`,`params`],FunctionExpression:[`id`,`params`],ArrowFunctionExpression:[`params`],ObjectMethod:[`params`],ClassMethod:[`params`],ClassPrivateMethod:[`params`],ForInStatement:[`left`],ForOfStatement:[`left`],ClassDeclaration:[`id`],ClassExpression:[`id`],RestElement:[`argument`],UpdateExpression:[`argument`],ObjectProperty:[`value`],AssignmentPattern:[`left`],ArrayPattern:[`elements`],ObjectPattern:[`properties`],VariableDeclaration:[`declarations`],VariableDeclarator:[`id`]}})),Iy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=Fy();e.default=n;function n(e,n){return(0,t.default)(e,n,!0)}})),Ly=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=i;var t=bv();function n(e){return(0,t.isNullLiteral)(e)?`null`:(0,t.isRegExpLiteral)(e)?`/${e.pattern}/${e.flags}`:(0,t.isTemplateLiteral)(e)?e.quasis.map(e=>e.value.raw).join(``):e.value===void 0?null:String(e.value)}function r(e){if(!e.computed||(0,t.isLiteral)(e.key))return e.key}function i(e,i){if(`id`in e&&e.id)return{name:e.id.name,originalNode:e.id};let a=``,o;if((0,t.isObjectProperty)(i,{value:e})?o=r(i):(0,t.isObjectMethod)(e)||(0,t.isClassMethod)(e)?(o=r(e),e.kind===`get`?a=`get `:e.kind===`set`&&(a=`set `)):(0,t.isVariableDeclarator)(i,{init:e})?o=i.id:(0,t.isAssignmentExpression)(i,{operator:`=`,right:e})&&(o=i.left),!o)return null;let s=(0,t.isLiteral)(o)?n(o):(0,t.isIdentifier)(o)?o.name:(0,t.isPrivateName)(o)?o.id.name:null;return s==null?null:{name:a+s,originalNode:o}}})),Ry=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=Uv();function n(e,t,n){typeof t==`function`&&(t={enter:t});let{enter:i,exit:a}=t;r(e,i,a,n,[])}function r(e,n,i,a,o){let s=t.VISITOR_KEYS[e.type];if(s){n&&n(e,o,a);for(let t of s){let s=e[t];if(Array.isArray(s))for(let c=0;c<s.length;c++){let l=s[c];l&&(o.push({node:e,key:t,index:c}),r(l,n,i,a,o),o.pop())}else s&&(o.push({node:e,key:t}),r(s,n,i,a,o),o.pop())}i&&i(e,o,a)}}})),zy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=Fy();function n(e,n,r){if(r&&e.type===`Identifier`&&n.type===`ObjectProperty`&&r.type===`ObjectExpression`)return!1;let i=t.default.keys[n.type];if(i)for(let t=0;t<i.length;t++){let r=n[i[t]];if(Array.isArray(r)){if(r.includes(e))return!0}else if(r===e)return!0}return!1}})),By=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=bv(),n=Symbol.for(`var used to be block scoped`);function r(e){return(0,t.isVariableDeclaration)(e)&&(e.kind!==`var`||e[n])}})),Vy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=bv(),n=By();function r(e){return(0,t.isFunctionDeclaration)(e)||(0,t.isClassDeclaration)(e)||(0,n.default)(e)}})),Hy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=Tv(),n=bv();function r(e){return(0,t.default)(e.type,`Immutable`)?!0:(0,n.isIdentifier)(e)?e.name===`undefined`:!1}})),Uy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=Uv();function n(e,r){if(typeof e!=`object`||typeof r!=`object`||e==null||r==null)return e===r;if(e.type!==r.type)return!1;let i=Object.keys(t.NODE_FIELDS[e.type]||e.type),a=t.VISITOR_KEYS[e.type];for(let t of i){let i=e[t],o=r[t];if(typeof i!=typeof o)return!1;if(!(i==null&&o==null)){if(i==null||o==null)return!1;if(Array.isArray(i)){if(!Array.isArray(o)||i.length!==o.length)return!1;for(let e=0;e<i.length;e++)if(!n(i[e],o[e]))return!1;continue}if(typeof i==`object`&&!(a!=null&&a.includes(t))){for(let e of Object.keys(i))if(i[e]!==o[e])return!1;continue}if(!n(i,o))return!1}}return!0}})),Wy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=t;function t(e,t,n){switch(t.type){case`MemberExpression`:case`OptionalMemberExpression`:return t.property===e?!!t.computed:t.object===e;case`JSXMemberExpression`:return t.object===e;case`VariableDeclarator`:return t.init===e;case`ArrowFunctionExpression`:return t.body===e;case`PrivateName`:return!1;case`ClassMethod`:case`ClassPrivateMethod`:case`ObjectMethod`:return t.key===e?!!t.computed:!1;case`ObjectProperty`:return t.key===e?!!t.computed:n?.type!==`ObjectPattern`;case`ClassProperty`:case`ClassAccessorProperty`:return t.key===e?!!t.computed:!0;case`ClassPrivateProperty`:return t.key!==e;case`ClassDeclaration`:case`ClassExpression`:return t.superClass===e;case`AssignmentExpression`:return t.right===e;case`AssignmentPattern`:return t.right===e;case`LabeledStatement`:return!1;case`CatchClause`:return!1;case`RestElement`:return!1;case`BreakStatement`:case`ContinueStatement`:return!1;case`FunctionDeclaration`:case`FunctionExpression`:return!1;case`ExportNamespaceSpecifier`:case`ExportDefaultSpecifier`:return!1;case`ExportSpecifier`:return n!=null&&n.source?!1:t.local===e;case`ImportDefaultSpecifier`:case`ImportNamespaceSpecifier`:case`ImportSpecifier`:return!1;case`ImportAttribute`:return!1;case`JSXAttribute`:return!1;case`ObjectPattern`:case`ArrayPattern`:return!1;case`MetaProperty`:return!1;case`ObjectTypeProperty`:return t.key!==e;case`TSEnumMember`:return t.id!==e;case`TSPropertySignature`:return t.key===e?!!t.computed:!0}return!0}})),Gy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=bv();function n(e,n){return(0,t.isBlockStatement)(e)&&((0,t.isFunction)(n)||(0,t.isCatchClause)(n))?!1:(0,t.isPattern)(e)&&((0,t.isFunction)(n)||(0,t.isCatchClause)(n))?!0:(0,t.isScopable)(e)}})),Ky=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=bv();function n(e){return(0,t.isImportDefaultSpecifier)(e)||(0,t.isIdentifier)(e.imported||e.exported,{name:`default`})}})),qy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=jv();let n=new Set([`abstract`,`boolean`,`byte`,`char`,`double`,`enum`,`final`,`float`,`goto`,`implements`,`int`,`interface`,`long`,`native`,`package`,`private`,`protected`,`public`,`short`,`static`,`synchronized`,`throws`,`transient`,`volatile`]);function r(e){return(0,t.default)(e)&&!n.has(e)}})),Jy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var t=bv(),n=Symbol.for(`var used to be block scoped`);function r(e){return(0,t.isVariableDeclaration)(e,{kind:`var`})&&!e[n]}})),Yy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=o;var t=Fy(),n=bv(),r=qv(),i=iy(),a=ay();function o(e,s){let c=[],l=!0;for(let u of e)if((0,n.isEmptyStatement)(u)||(l=!1),(0,n.isExpression)(u))c.push(u);else if((0,n.isExpressionStatement)(u))c.push(u.expression);else if((0,n.isVariableDeclaration)(u)){if(u.kind!==`var`)return;for(let e of u.declarations){let n=(0,t.default)(e);for(let e of Object.keys(n))s.push({kind:u.kind,id:(0,a.default)(n[e])});e.init&&c.push((0,r.assignmentExpression)(`=`,e.id,e.init))}l=!0}else if((0,n.isIfStatement)(u)){let e=u.consequent?o([u.consequent],s):(0,i.buildUndefinedNode)(),t=u.alternate?o([u.alternate],s):(0,i.buildUndefinedNode)();if(!e||!t)return;c.push((0,r.conditionalExpression)(u.test,e,t))}else if((0,n.isBlockStatement)(u)){let e=o(u.body,s);if(!e)return;c.push(e)}else if((0,n.isEmptyStatement)(u))e.indexOf(u)===0&&(l=!0);else return;return l&&c.push((0,i.buildUndefinedNode)()),c.length===1?c[0]:(0,r.sequenceExpression)(c)}})),Xy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;var t=Yy();function n(e,n){if(!(e!=null&&e.length))return;let r=[],i=(0,t.default)(e,r);if(i){for(let e of r)n.push(e);return i}}})),Zy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t={react:!0,assertNode:!0,createTypeAnnotationBasedOnTypeof:!0,createUnionTypeAnnotation:!0,createFlowUnionType:!0,createTSUnionType:!0,cloneNode:!0,clone:!0,cloneDeep:!0,cloneDeepWithoutLoc:!0,cloneWithoutLoc:!0,addComment:!0,addComments:!0,inheritInnerComments:!0,inheritLeadingComments:!0,inheritsComments:!0,inheritTrailingComments:!0,removeComments:!0,ensureBlock:!0,toBindingIdentifierName:!0,toBlock:!0,toComputedKey:!0,toExpression:!0,toIdentifier:!0,toKeyAlias:!0,toStatement:!0,valueToNode:!0,appendToMemberExpression:!0,inherits:!0,prependToMemberExpression:!0,removeProperties:!0,removePropertiesDeep:!0,removeTypeDuplicates:!0,getAssignmentIdentifiers:!0,getBindingIdentifiers:!0,getOuterBindingIdentifiers:!0,getFunctionName:!0,traverse:!0,traverseFast:!0,shallowEqual:!0,is:!0,isBinding:!0,isBlockScoped:!0,isImmutable:!0,isLet:!0,isNode:!0,isNodesEquivalent:!0,isPlaceholderType:!0,isReferenced:!0,isScope:!0,isSpecifierDefault:!0,isType:!0,isValidES3Identifier:!0,isValidIdentifier:!0,isVar:!0,matchesPattern:!0,validate:!0,buildMatchMemberExpression:!0,__internal__deprecationWarning:!0};Object.defineProperty(e,`__internal__deprecationWarning`,{enumerable:!0,get:function(){return De.default}}),Object.defineProperty(e,`addComment`,{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(e,`addComments`,{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(e,`appendToMemberExpression`,{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(e,`assertNode`,{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,`buildMatchMemberExpression`,{enumerable:!0,get:function(){return Te.default}}),Object.defineProperty(e,`clone`,{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,`cloneDeep`,{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,`cloneDeepWithoutLoc`,{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,`cloneNode`,{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,`cloneWithoutLoc`,{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,`createFlowUnionType`,{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,`createTSUnionType`,{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,`createTypeAnnotationBasedOnTypeof`,{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,`createUnionTypeAnnotation`,{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,`ensureBlock`,{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(e,`getAssignmentIdentifiers`,{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(e,`getBindingIdentifiers`,{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(e,`getFunctionName`,{enumerable:!0,get:function(){return ae.default}}),Object.defineProperty(e,`getOuterBindingIdentifiers`,{enumerable:!0,get:function(){return ie.default}}),Object.defineProperty(e,`inheritInnerComments`,{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(e,`inheritLeadingComments`,{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,`inheritTrailingComments`,{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(e,`inherits`,{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(e,`inheritsComments`,{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(e,`is`,{enumerable:!0,get:function(){return le.default}}),Object.defineProperty(e,`isBinding`,{enumerable:!0,get:function(){return ue.default}}),Object.defineProperty(e,`isBlockScoped`,{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(e,`isImmutable`,{enumerable:!0,get:function(){return de.default}}),Object.defineProperty(e,`isLet`,{enumerable:!0,get:function(){return fe.default}}),Object.defineProperty(e,`isNode`,{enumerable:!0,get:function(){return pe.default}}),Object.defineProperty(e,`isNodesEquivalent`,{enumerable:!0,get:function(){return me.default}}),Object.defineProperty(e,`isPlaceholderType`,{enumerable:!0,get:function(){return he.default}}),Object.defineProperty(e,`isReferenced`,{enumerable:!0,get:function(){return ge.default}}),Object.defineProperty(e,`isScope`,{enumerable:!0,get:function(){return _e.default}}),Object.defineProperty(e,`isSpecifierDefault`,{enumerable:!0,get:function(){return ve.default}}),Object.defineProperty(e,`isType`,{enumerable:!0,get:function(){return ye.default}}),Object.defineProperty(e,`isValidES3Identifier`,{enumerable:!0,get:function(){return be.default}}),Object.defineProperty(e,`isValidIdentifier`,{enumerable:!0,get:function(){return xe.default}}),Object.defineProperty(e,`isVar`,{enumerable:!0,get:function(){return Se.default}}),Object.defineProperty(e,`matchesPattern`,{enumerable:!0,get:function(){return Ce.default}}),Object.defineProperty(e,`prependToMemberExpression`,{enumerable:!0,get:function(){return P.default}}),e.react=void 0,Object.defineProperty(e,`removeComments`,{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(e,`removeProperties`,{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(e,`removePropertiesDeep`,{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(e,`removeTypeDuplicates`,{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(e,`shallowEqual`,{enumerable:!0,get:function(){return ce.default}}),Object.defineProperty(e,`toBindingIdentifierName`,{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(e,`toBlock`,{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(e,`toComputedKey`,{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(e,`toExpression`,{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(e,`toIdentifier`,{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(e,`toKeyAlias`,{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(e,`toStatement`,{enumerable:!0,get:function(){return te.default}}),Object.defineProperty(e,`traverse`,{enumerable:!0,get:function(){return oe.default}}),Object.defineProperty(e,`traverseFast`,{enumerable:!0,get:function(){return se.default}}),Object.defineProperty(e,`validate`,{enumerable:!0,get:function(){return we.default}}),Object.defineProperty(e,`valueToNode`,{enumerable:!0,get:function(){return ne.default}});var n=Cv(),r=wv(),i=Yv(),a=Zv(),o=Qv();Object.keys(o).forEach(function(n){n===`default`||n===`__esModule`||Object.prototype.hasOwnProperty.call(t,n)||n in e&&e[n]===o[n]||Object.defineProperty(e,n,{enumerable:!0,get:function(){return o[n]}})});var s=$v(),c=ty(),l=ry(),u=iy();Object.keys(u).forEach(function(n){n===`default`||n===`__esModule`||Object.prototype.hasOwnProperty.call(t,n)||n in e&&e[n]===u[n]||Object.defineProperty(e,n,{enumerable:!0,get:function(){return u[n]}})});var d=qv();Object.keys(d).forEach(function(n){n===`default`||n===`__esModule`||Object.prototype.hasOwnProperty.call(t,n)||n in e&&e[n]===d[n]||Object.defineProperty(e,n,{enumerable:!0,get:function(){return d[n]}})});var f=ay(),p=oy(),m=sy(),h=cy(),g=ly(),_=dy(),v=uy(),y=py(),b=my(),x=gy(),S=hy(),C=_y(),w=vy();Object.keys(w).forEach(function(n){n===`default`||n===`__esModule`||Object.prototype.hasOwnProperty.call(t,n)||n in e&&e[n]===w[n]||Object.defineProperty(e,n,{enumerable:!0,get:function(){return w[n]}})});var T=Nv();Object.keys(T).forEach(function(n){n===`default`||n===`__esModule`||Object.prototype.hasOwnProperty.call(t,n)||n in e&&e[n]===T[n]||Object.defineProperty(e,n,{enumerable:!0,get:function(){return T[n]}})});var E=by(),D=Sy(),O=yy(),k=Cy(),A=wy(),ee=xy(),j=Oy(),te=ky(),ne=Ay(),M=Uv();Object.keys(M).forEach(function(n){n===`default`||n===`__esModule`||Object.prototype.hasOwnProperty.call(t,n)||n in e&&e[n]===M[n]||Object.defineProperty(e,n,{enumerable:!0,get:function(){return M[n]}})});var N=jy(),re=My(),P=Ny(),F=Ey(),I=Dy(),L=ey(),R=Py(),z=Fy(),ie=Iy(),ae=Ly(),oe=Ry();Object.keys(oe).forEach(function(n){n===`default`||n===`__esModule`||Object.prototype.hasOwnProperty.call(t,n)||n in e&&e[n]===oe[n]||Object.defineProperty(e,n,{enumerable:!0,get:function(){return oe[n]}})});var se=Ty(),ce=vv(),le=Dv(),ue=zy(),B=Vy(),de=Hy(),fe=By(),pe=Xv(),me=Uy(),he=Ev(),ge=Wy(),_e=Gy(),ve=Ky(),ye=Tv(),be=qy(),xe=jv(),Se=Jy(),Ce=xv(),we=Wv(),Te=Sv(),Ee=bv();Object.keys(Ee).forEach(function(n){n===`default`||n===`__esModule`||Object.prototype.hasOwnProperty.call(t,n)||n in e&&e[n]===Ee[n]||Object.defineProperty(e,n,{enumerable:!0,get:function(){return Ee[n]}})});var De=yv(),Oe=Xy();e.react={isReactComponent:n.default,isCompatTag:r.default,buildChildren:i.default},e.toSequenceExpression=Oe.default,process.env.BABEL_TYPES_8_BREAKING&&console.warn(`BABEL_TYPES_8_BREAKING is not supported anymore. Use the latest Babel 8.0.0 pre-release instead!`)})),Qy=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isBindingIdentifier=T,e.isBlockScoped=A,e.isExpression=D,e.isFlow=M,e.isForAwaitStatement=P,e.isGenerated=te,e.isPure=ne,e.isReferenced=k,e.isReferencedIdentifier=C,e.isReferencedMemberExpression=w,e.isRestProperty=N,e.isScope=O,e.isSpreadProperty=re,e.isStatement=E,e.isUser=j,e.isVar=ee;let{isBinding:t,isBlockScoped:n,isExportDeclaration:r,isExpression:i,isFlow:a,isForStatement:o,isForXStatement:s,isIdentifier:c,isImportDeclaration:l,isImportSpecifier:u,isJSXIdentifier:d,isJSXMemberExpression:f,isMemberExpression:p,isRestElement:m,isReferenced:h,isScope:g,isStatement:_,isVar:v,isVariableDeclaration:y,react:b,isForOfStatement:x}=Zy(),{isCompatTag:S}=b;function C(e){let{node:t,parent:n}=this;return c(t,e)?h(t,n,this.parentPath.parent):d(t,e)?!f(n)&&S(t.name)?!1:h(t,n,this.parentPath.parent):!1}function w(){let{node:e,parent:t}=this;return p(e)&&h(e,t)}function T(){let{node:e,parent:n}=this,r=this.parentPath.parent;return c(e)&&t(e,n,r)}function E(){let{node:e,parent:t}=this;return _(e)?!(y(e)&&(s(t,{left:e})||o(t,{init:e}))):!1}function D(){return this.isIdentifier()?this.isReferencedIdentifier():i(this.node)}function O(){return g(this.node,this.parent)}function k(){return h(this.node,this.parent)}function A(){return n(this.node)}function ee(){return v(this.node)}function j(){var e;return!!((e=this.node)!=null&&e.loc)}function te(){return!this.isUser()}function ne(e){return this.scope.isPure(this.node,e)}function M(){let{node:e}=this;return a(e)?!0:l(e)?e.importKind===`type`||e.importKind===`typeof`:r(e)?e.exportKind===`type`:u(e)?e.importKind===`type`||e.importKind===`typeof`:!1}function N(){return m(this.node)&&this.parentPath?.isObjectPattern()}function re(){return m(this.node)&&this.parentPath?.isObjectExpression()}function P(){return x(this.node,{await:!0})}e.isExistentialTypeParam=function(){throw Error("`path.isExistentialTypeParam` has been renamed to `path.isExistsTypeAnnotation()` in Babel 7.")},e.isNumericLiteralTypeAnnotation=function(){throw Error("`path.isNumericLiteralTypeAnnotation()` has been renamed to `path.isNumberLiteralTypeAnnotation()` in Babel 7.")}})),$y=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.environmentVisitor=C,e.explode=f,e.isExplodedVisitor=d,e.merge=h,e.verify=p;var t=uv(),n=Qy(),r=Zy(),i=lx();let{DEPRECATED_KEYS:a,DEPRECATED_ALIASES:o,FLIPPED_ALIAS_KEYS:s,TYPES:c,__internal__deprecationWarning:l}=r;function u(e){return e in t}function d(e){return e?._exploded}function f(e){if(d(e))return e;e._exploded=!0;for(let t of Object.keys(e)){if(b(t))continue;let n=t.split(`|`);if(n.length===1)continue;let r=e[t];delete e[t];for(let t of n)e[t]=r}p(e),delete e.__esModule,_(e),v(e);for(let n of Object.keys(e)){if(b(n)||!u(n))continue;let r=e[n];for(let e of Object.keys(r))r[e]=y(n,r[e]);delete e[n];let i=t[n];if(i!==null)for(let t of i)e[t]??(e[t]={}),x(e[t],r);else x(e,r)}for(let t of Object.keys(e)){if(b(t))continue;let n=s[t];if(t in a){let e=a[t];l(t,e,`Visitor `),n=[e]}else if(t in o){let e=o[t];l(t,e,`Visitor `),n=s[e]}if(!n)continue;let r=e[t];delete e[t];for(let t of n){let n=e[t];n?x(n,r):e[t]=Object.assign({},r)}}for(let t of Object.keys(e))b(t)||v(e[t]);return e}function p(e){if(!e._verified){if(typeof e==`function`)throw Error("You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?");for(let t of Object.keys(e)){if((t===`enter`||t===`exit`)&&m(t,e[t]),b(t))continue;if(!c.includes(t))throw Error(`You gave us a visitor for the node type ${t} but it's not a valid type in @babel/traverse 7.29.0`);let n=e[t];if(typeof n==`object`)for(let e of Object.keys(n))if(e===`enter`||e===`exit`)m(`${t}.${e}`,n[e]);else throw Error(`You passed \`traverse()\` a visitor object with the property ${t} that has the invalid property ${e}`)}e._verified=!0}}function m(e,t){let n=[].concat(t);for(let t of n)if(typeof t!=`function`)throw TypeError(`Non-function found defined in ${e} with type ${typeof t}`)}function h(e,t=[],n){let r={_verified:!0,_exploded:!0};Object.defineProperty(r,`_exploded`,{enumerable:!1}),Object.defineProperty(r,`_verified`,{enumerable:!1});for(let i=0;i<e.length;i++){let a=f(e[i]),o=t[i],s=a;(o||n)&&(s=g(s,o,n)),x(r,s);for(let e of Object.keys(a)){if(b(e))continue;let t=a[e];(o||n)&&(t=g(t,o,n)),x(r[e]||(r[e]={}),t)}}return r}function g(e,t,n){let r={};for(let i of[`enter`,`exit`]){let a=e[i];Array.isArray(a)&&(a=a.map(function(e){let r=e;return t&&(r=function(n){e.call(t,n,t)}),n&&(r=n(t?.key,i,r)),r!==e&&(r.toString=()=>e.toString()),r}),r[i]=a)}return r}function _(e){for(let t of Object.keys(e)){if(b(t))continue;let n=e[t];typeof n==`function`&&(e[t]={enter:n})}}function v(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function y(e,t){let r=n[`is${e}`],i=function(e){if(r.call(e))return t.apply(this,arguments)};return i.toString=()=>t.toString(),i}function b(e){return!!(e.startsWith(`_`)||e===`enter`||e===`exit`||e===`shouldSkip`||e===`denylist`||e===`noScope`||e===`skipKeys`||e===`blacklist`)}function x(e,t){for(let n of[`enter`,`exit`])t[n]&&(e[n]=[].concat(e[n]||[],t[n]))}let S={FunctionParent(e){e.isArrowFunctionExpression()||(e.skip(),e.isMethod()&&(e.requeueComputedKeyAndDecorators?e.requeueComputedKeyAndDecorators():i.requeueComputedKeyAndDecorators.call(e)))},Property(e){e.isObjectProperty()||(e.skip(),e.requeueComputedKeyAndDecorators?e.requeueComputedKeyAndDecorators():i.requeueComputedKeyAndDecorators.call(e))}};function C(e){return h([S,e])}})),eb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=Zy(),n=t,r=cx(),i=$y(),a=lx();let{getAssignmentIdentifiers:o}=n,s={ReferencedIdentifier({node:e},t){e.name===t.oldName&&(e.name=t.newName)},Scope(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||(e.skip(),e.isMethod()&&(e.requeueComputedKeyAndDecorators?e.requeueComputedKeyAndDecorators():a.requeueComputedKeyAndDecorators.call(e)),e.isSwitchStatement()&&e.context.maybeQueue(e.get(`discriminant`)))},ObjectProperty({node:e,scope:t},n){let{name:r}=e.key;if(e.shorthand&&(r===n.oldName||r===n.newName)&&t.getBindingIdentifier(r)===n.binding.identifier){var i;e.shorthand=!1,(i=e.extra)!=null&&i.shorthand&&(e.extra.shorthand=!1)}},"AssignmentExpression|Declaration|VariableDeclarator"(e,t){if(e.isVariableDeclaration())return;let n=e.isAssignmentExpression()?o(e.node):e.getOuterBindingIdentifiers();for(let e in n)e===t.oldName&&(n[e].name=t.newName)}};e.default=class{constructor(e,t,n){this.newName=n,this.oldName=t,this.binding=e}maybeConvertFromExportDeclaration(e){let n=e.parentPath;if(n.isExportDeclaration()){if(n.isExportDefaultDeclaration()){let{declaration:e}=n.node;if(t.isDeclaration(e)&&!e.id)return}n.isExportAllDeclaration()||n.splitExportDeclaration()}}maybeConvertFromClassFunctionDeclaration(e){return e}maybeConvertFromClassFunctionExpression(e){return e}rename(){let{binding:e,oldName:n,newName:a}=this,{scope:o,path:c}=e,l=c.find(e=>e.isDeclaration()||e.isFunctionExpression()||e.isClassExpression());l&&l.getOuterBindingIdentifiers()[n]===e.identifier&&this.maybeConvertFromExportDeclaration(l);let u=arguments[0]||o.block,d={discriminant:!0};t.isMethod(u)&&(u.computed&&(d.key=!0),t.isObjectMethod(u)||(d.decorators=!0)),(0,r.traverseNode)(u,(0,i.explode)(s),o,this,o.path,d),arguments[0]||(o.removeOwnBinding(n),o.bindings[a]=e,this.binding.identifier.name=a),l&&(this.maybeConvertFromClassFunctionDeclaration(c),this.maybeConvertFromClassFunctionExpression(c))}}})),tb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=o;var t=Zy(),n=ux(),r=$y(),i=lx();let{VISITOR_KEYS:a}=t;function o(e,t,o){let s=(0,r.explode)(t);if(s.enter||s.exit)throw Error(`Should not be used with enter/exit visitors.`);c(e.parentPath,e.parent,e.node,e.container,e.key,e.listKey,e.hub,e);function c(e,t,r,l,u,d,f,p){if(!r)return;let m=p||n.NodePath.get({hub:f,parentPath:e,parent:t,container:l,listKey:d,key:u});i._forceSetScope.call(m);let h=s[r.type];if(h!=null&&h.enter)for(let e of h.enter)e.call(o,m,o);if(m.shouldSkip)return;let g=a[r.type];if(g!=null&&g.length){for(let e of g){let t=r[e];if(t)if(Array.isArray(t))for(let n=0;n<t.length;n++){let i=t[n];c(m,r,i,t,n,e)}else c(m,r,t,r,e,null)}if(h!=null&&h.exit)for(let e of h.exit)e.call(o,m,o)}}}})),nb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=class{constructor({identifier:e,scope:n,path:r,kind:i}){this.identifier=void 0,this.scope=void 0,this.path=void 0,this.kind=void 0,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.identifier=e,this.scope=n,this.path=r,this.kind=i,(i===`var`||i===`hoisted`)&&t(r)&&this.reassign(r),this.clearValue()}deoptValue(){this.clearValue(),this.hasDeoptedValue=!0}setValue(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)}clearValue(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null}reassign(e){this.constant=!1,!this.constantViolations.includes(e)&&this.constantViolations.push(e)}reference(e){this.referencePaths.includes(e)||(this.referenced=!0,this.references++,this.referencePaths.push(e))}dereference(){this.references--,this.referenced=!!this.references}};function t(e){let t=!e.isVariableDeclarator()||e.node.init;for(let{parentPath:n,key:r}=e;n;{parentPath:n,key:r}=n){if(n.isFunctionParent())return!1;if(r===`left`&&n.isForXStatement()||t&&r===`body`&&n.isLoop())return!0}return!1}})),rb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.clear=n,e.clearPath=r,e.clearScope=i,e.getCachedPaths=a,e.getOrCreateCachedPaths=o,e.scope=e.path=void 0;let t=e.path=new WeakMap;e.scope=new WeakMap;function n(){r(),i()}function r(){e.path=t=new WeakMap}function i(){e.scope=new WeakMap}function a(e){let{parent:n,parentPath:r}=e;return t.get(n)}function o(e,n){let r=t.get(e);return r||t.set(e,r=new Map),r}})),ib=V(((e,t)=>{t.exports=[`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`eval`,`globalThis`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`undefined`,`unescape`]})),ab=V(((e,t)=>{t.exports=`AggregateError.Array.ArrayBuffer.Atomics.BigInt.BigInt64Array.BigUint64Array.Boolean.DataView.Date.Error.EvalError.FinalizationRegistry.Float16Array.Float32Array.Float64Array.Function.Infinity.Int16Array.Int32Array.Int8Array.Intl.Iterator.JSON.Map.Math.NaN.Number.Object.Promise.Proxy.RangeError.ReferenceError.Reflect.RegExp.Set.SharedArrayBuffer.String.Symbol.SyntaxError.TypeError.Uint16Array.Uint32Array.Uint8Array.Uint8ClampedArray.URIError.WeakMap.WeakRef.WeakSet`.split(`.`)})),ob=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=eb(),n=ux();tb();var r=nb(),i=Zy(),a=i,o=rb();let s=ib(),c=ab(),{assignmentExpression:l,callExpression:u,cloneNode:d,getBindingIdentifiers:f,identifier:p,isArrayExpression:m,isBinary:h,isCallExpression:g,isClass:_,isClassBody:v,isClassDeclaration:y,isExportAllDeclaration:b,isExportDefaultDeclaration:x,isExportNamedDeclaration:S,isFunctionDeclaration:C,isIdentifier:w,isImportDeclaration:T,isLiteral:E,isMemberExpression:D,isMethod:O,isModuleSpecifier:k,isNullLiteral:A,isObjectExpression:ee,isProperty:j,isPureish:te,isRegExpLiteral:ne,isSuper:M,isTaggedTemplateExpression:N,isTemplateLiteral:re,isThisExpression:P,isUnaryExpression:F,isVariableDeclaration:I,expressionStatement:L,matchesPattern:R,memberExpression:z,numericLiteral:ie,toIdentifier:ae,variableDeclaration:oe,variableDeclarator:se,isObjectProperty:ce,isTopicReference:le,isMetaProperty:ue,isPrivateName:B,isExportDeclaration:de,buildUndefinedNode:fe,sequenceExpression:pe}=i;function me(e,t){switch(e?.type){default:if(T(e)||de(e)){var n;if((b(e)||S(e)||T(e))&&e.source)me(e.source,t);else if((S(e)||T(e))&&(n=e.specifiers)!=null&&n.length)for(let n of e.specifiers)me(n,t);else (x(e)||S(e))&&e.declaration&&me(e.declaration,t)}else k(e)?me(e.local,t):E(e)&&!A(e)&&!ne(e)&&!re(e)&&t.push(e.value);break;case`MemberExpression`:case`OptionalMemberExpression`:case`JSXMemberExpression`:me(e.object,t),me(e.property,t);break;case`Identifier`:case`JSXIdentifier`:t.push(e.name);break;case`CallExpression`:case`OptionalCallExpression`:case`NewExpression`:me(e.callee,t);break;case`ObjectExpression`:case`ObjectPattern`:for(let n of e.properties)me(n,t);break;case`SpreadElement`:case`RestElement`:me(e.argument,t);break;case`ObjectProperty`:case`ObjectMethod`:case`ClassProperty`:case`ClassMethod`:case`ClassPrivateProperty`:case`ClassPrivateMethod`:me(e.key,t);break;case`ThisExpression`:t.push(`this`);break;case`Super`:t.push(`super`);break;case`Import`:case`ImportExpression`:t.push(`import`);break;case`DoExpression`:t.push(`do`);break;case`YieldExpression`:t.push(`yield`),me(e.argument,t);break;case`AwaitExpression`:t.push(`await`),me(e.argument,t);break;case`AssignmentExpression`:me(e.left,t);break;case`VariableDeclarator`:me(e.id,t);break;case`FunctionExpression`:case`FunctionDeclaration`:case`ClassExpression`:case`ClassDeclaration`:me(e.id,t);break;case`PrivateName`:me(e.id,t);break;case`ParenthesizedExpression`:me(e.expression,t);break;case`UnaryExpression`:case`UpdateExpression`:me(e.argument,t);break;case`MetaProperty`:me(e.meta,t),me(e.property,t);break;case`JSXElement`:me(e.openingElement,t);break;case`JSXOpeningElement`:me(e.name,t);break;case`JSXFragment`:me(e.openingFragment,t);break;case`JSXOpeningFragment`:t.push(`Fragment`);break;case`JSXNamespacedName`:me(e.namespace,t),me(e.name,t);break}}function he(e){e.references=Object.create(null),e.uids=Object.create(null),e.bindings=Object.create(null),e.globals=Object.create(null)}function ge(e){return e.isFunctionExpression()&&!e.node.id||e.isArrowFunctionExpression()}var _e=Symbol.for(`should not be considered a local binding`);let ve={ForStatement(e){let t=e.get(`init`);if(t.isVar()){let{scope:n}=e;(n.getFunctionParent()||n.getProgramParent()).registerBinding(`var`,t)}},Declaration(e){e.isBlockScoped()||e.isImportDeclaration()||e.isExportDeclaration()||(e.scope.getFunctionParent()||e.scope.getProgramParent()).registerDeclaration(e)},ImportDeclaration(e){e.scope.getBlockParent().registerDeclaration(e)},TSImportEqualsDeclaration(e){e.scope.getBlockParent().registerDeclaration(e)},ReferencedIdentifier(e,t){a.isTSQualifiedName(e.parent)&&e.parent.right===e.node||e.parentPath.isTSImportEqualsDeclaration()||t.references.push(e)},ForXStatement(e,t){let n=e.get(`left`);if(n.isPattern()||n.isIdentifier())t.constantViolations.push(e);else if(n.isVar()){let{scope:t}=e;(t.getFunctionParent()||t.getProgramParent()).registerBinding(`var`,n)}},ExportDeclaration:{exit(e){let{node:t,scope:n}=e;if(b(t))return;let r=t.declaration;if(y(r)||C(r)){let t=r.id;if(!t)return;n.getBinding(t.name)?.reference(e)}else if(I(r))for(let t of r.declarations)for(let r of Object.keys(f(t)))n.getBinding(r)?.reference(e)}},LabeledStatement(e){e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression(e,t){t.assignments.push(e)},UpdateExpression(e,t){t.constantViolations.push(e)},UnaryExpression(e,t){e.node.operator===`delete`&&t.constantViolations.push(e)},BlockScoped(e){let t=e.scope;if(t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e),e.isClassDeclaration()&&e.node.id){let t=e.node.id.name;e.scope.bindings[t]=e.scope.parent.getBinding(t)}},CatchClause(e){e.scope.registerBinding(`let`,e)},Function(e){let t=e.get(`params`);for(let n of t)e.scope.registerBinding(`param`,n);e.isFunctionExpression()&&e.node.id&&!e.node.id[_e]&&e.scope.registerBinding(`local`,e.get(`id`),e)},ClassExpression(e){e.node.id&&!e.node.id[_e]&&e.scope.registerBinding(`local`,e.get(`id`),e)},TSTypeAnnotation(e){e.skip()}},ye,be=0;var xe=class e{constructor(e){this.uid=void 0,this.path=void 0,this.block=void 0,this.inited=void 0,this.labels=void 0,this.bindings=void 0,this.referencesSet=void 0,this.globals=void 0,this.uidsSet=void 0,this.data=void 0,this.crawling=void 0;let{node:t}=e,n=o.scope.get(t);if(n?.path===e)return n;o.scope.set(t,this),this.uid=be++,this.block=t,this.path=e,this.labels=new Map,this.inited=!1,Object.defineProperties(this,{references:{enumerable:!0,configurable:!0,writable:!0,value:Object.create(null)},uids:{enumerable:!0,configurable:!0,writable:!0,value:Object.create(null)}})}get parent(){let e,t=this.path;do{var n;let r=t.key===`key`||t.listKey===`decorators`;t=t.parentPath,r&&t.isMethod()&&(t=t.parentPath),(n=t)!=null&&n.isScope()&&(e=t)}while(t&&!e);return e?.scope}get references(){throw Error(`Scope#references is not available in Babel 8. Use Scope#referencesSet instead.`)}get uids(){throw Error(`Scope#uids is not available in Babel 8. Use Scope#uidsSet instead.`)}generateDeclaredUidIdentifier(e){let t=this.generateUidIdentifier(e);return this.push({id:t}),d(t)}generateUidIdentifier(e){return p(this.generateUid(e))}generateUid(e=`temp`){e=ae(e).replace(/^_+/,``).replace(/\d+$/g,``);let t,n=0;do t=`_${e}`,n>=11?t+=n-1:n>=9?t+=n-9:n>=1&&(t+=n+1),n++;while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));let r=this.getProgramParent();return r.references[t]=!0,r.uids[t]=!0,t}generateUidBasedOnNode(e,t){let n=[];me(e,n);let r=n.join(`$`);return r=r.replace(/^_/,``)||t||`ref`,this.generateUid(r.slice(0,20))}generateUidIdentifierBasedOnNode(e,t){return p(this.generateUidBasedOnNode(e,t))}isStatic(e){if(P(e)||M(e)||le(e))return!0;if(w(e)){let t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1}maybeGenerateMemoised(e,t){if(this.isStatic(e))return null;{let n=this.generateUidIdentifierBasedOnNode(e);return t?n:(this.push({id:n}),d(n))}}checkBlockScopedCollisions(e,t,n,r){if(t!==`param`&&e.kind!==`local`&&(t===`let`||e.kind===`let`||e.kind===`const`||e.kind===`module`||e.kind===`param`&&t===`const`))throw this.path.hub.buildError(r,`Duplicate declaration "${n}"`,TypeError)}rename(e,n){let r=this.getBinding(e);r&&(n||=this.generateUidIdentifier(e).name,new t.default(r,e,n).rename(arguments[2]))}dump(){let e=`-`.repeat(60);console.log(e);let t=this;do{console.log(`#`,t.block.type);for(let e of Object.keys(t.bindings)){let n=t.bindings[e];console.log(` -`,e,{constant:n.constant,references:n.references,violations:n.constantViolations.length,kind:n.kind})}}while(t=t.parent);console.log(e)}hasLabel(e){return!!this.getLabel(e)}getLabel(e){return this.labels.get(e)}registerLabel(e){this.labels.set(e.node.label.name,e)}registerDeclaration(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding(`hoisted`,e.get(`id`),e);else if(e.isVariableDeclaration()){let t=e.get(`declarations`),{kind:n}=e.node;for(let e of t)this.registerBinding(n===`using`||n===`await using`?`const`:n,e)}else if(e.isClassDeclaration()){if(e.node.declare)return;this.registerBinding(`let`,e)}else if(e.isImportDeclaration()){let t=e.node.importKind===`type`||e.node.importKind===`typeof`,n=e.get(`specifiers`);for(let e of n){let n=t||e.isImportSpecifier()&&(e.node.importKind===`type`||e.node.importKind===`typeof`);this.registerBinding(n?`unknown`:`module`,e)}}else if(e.isExportDeclaration()){let t=e.get(`declaration`);(t.isClassDeclaration()||t.isFunctionDeclaration()||t.isVariableDeclaration())&&this.registerDeclaration(t)}else this.registerBinding(`unknown`,e)}buildUndefinedNode(){return fe()}registerConstantViolation(e){let t=e.getAssignmentIdentifiers();for(let r of Object.keys(t)){var n;(n=this.getBinding(r))==null||n.reassign(e)}}registerBinding(e,t,n=t){if(!e)throw ReferenceError("no `kind`");if(t.isVariableDeclaration()){let n=t.get(`declarations`);for(let t of n)this.registerBinding(e,t);return}let i=this.getProgramParent(),a=t.getOuterBindingIdentifiers(!0);for(let t of Object.keys(a)){i.references[t]=!0;for(let i of a[t]){let a=this.getOwnBinding(t);if(a){if(a.identifier===i)continue;this.checkBlockScopedCollisions(a,e,t,i)}a?a.reassign(n):this.bindings[t]=new r.default({identifier:i,scope:this,path:n,kind:e})}}}addGlobal(e){this.globals[e.name]=e}hasUid(e){let t=this;do if(t.uids[e])return!0;while(t=t.parent);return!1}hasGlobal(e){let t=this;do if(t.globals[e])return!0;while(t=t.parent);return!1}hasReference(e){return!!this.getProgramParent().references[e]}isPure(e,t){if(w(e)){let n=this.getBinding(e.name);return n?t?n.constant:!0:!1}else if(P(e)||ue(e)||le(e)||B(e))return!0;else if(_(e))return e.superClass&&!this.isPure(e.superClass,t)||e.decorators?.length>0?!1:this.isPure(e.body,t);else if(v(e)){for(let n of e.body)if(!this.isPure(n,t))return!1;return!0}else if(h(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);else if(m(e)||e?.type===`TupleExpression`){for(let n of e.elements)if(n!==null&&!this.isPure(n,t))return!1;return!0}else if(ee(e)||e?.type===`RecordExpression`){for(let n of e.properties)if(!this.isPure(n,t))return!1;return!0}else if(O(e))return!(e.computed&&!this.isPure(e.key,t)||e.decorators?.length>0);else if(j(e))return!(e.computed&&!this.isPure(e.key,t)||e.decorators?.length>0||(ce(e)||e.static)&&e.value!==null&&!this.isPure(e.value,t));else if(F(e))return this.isPure(e.argument,t);else if(re(e)){for(let n of e.expressions)if(!this.isPure(n,t))return!1;return!0}else if(N(e))return R(e.tag,`String.raw`)&&!this.hasBinding(`String`,{noGlobals:!0})&&this.isPure(e.quasi,t);else if(D(e))return!e.computed&&w(e.object)&&e.object.name===`Symbol`&&w(e.property)&&e.property.name!==`for`&&!this.hasBinding(`Symbol`,{noGlobals:!0});else if(g(e))return R(e.callee,`Symbol.for`)&&!this.hasBinding(`Symbol`,{noGlobals:!0})&&e.arguments.length===1&&a.isStringLiteral(e.arguments[0]);else return te(e)}setData(e,t){return this.data[e]=t}getData(e){let t=this;do{let n=t.data[e];if(n!=null)return n}while(t=t.parent)}removeData(e){let t=this;do t.data[e]!=null&&(t.data[e]=null);while(t=t.parent)}init(){this.inited||(this.inited=!0,this.crawl())}crawl(){let e=this.path;he(this),this.data=Object.create(null);let t=this;do{if(t.crawling)return;if(t.path.isProgram())break}while(t=t.parent);let r=t,i={references:[],constantViolations:[],assignments:[]};if(this.crawling=!0,ye||=n.default.visitors.merge([{Scope(e){he(e.scope)}},ve]),e.type!==`Program`){let t=ye[e.type];if(t)for(let n of t.enter)n.call(i,e,i)}e.traverse(ye,i),this.crawling=!1;for(let e of i.assignments){let t=e.getAssignmentIdentifiers();for(let n of Object.keys(t))e.scope.getBinding(n)||r.addGlobal(t[n]);e.scope.registerConstantViolation(e)}for(let e of i.references){let t=e.scope.getBinding(e.node.name);t?t.reference(e):r.addGlobal(e.node)}for(let e of i.constantViolations)e.scope.registerConstantViolation(e)}push(e){let t=this.path;t.isPattern()?t=this.getPatternParent().path:!t.isBlockStatement()&&!t.isProgram()&&(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=(this.getFunctionParent()||this.getProgramParent()).path);let{init:n,unique:r,kind:i=`var`,id:a}=e;if(!n&&!r&&(i===`var`||i===`let`)&&ge(t)&&g(t.parent,{callee:t.node})&&t.parent.arguments.length<=t.node.params.length&&w(a)){t.pushContainer(`params`,a),t.scope.registerBinding(`param`,t.get(`params`)[t.node.params.length-1]);return}(t.isLoop()||t.isCatchClause()||t.isFunction())&&(t.ensureBlock(),t=t.get(`body`));let o=e._blockHoist==null?2:e._blockHoist,s=`declaration:${i}:${o}`,c=!r&&t.getData(s);if(!c){let e=oe(i,[]);e._blockHoist=o,[c]=t.unshiftContainer(`body`,[e]),r||t.setData(s,c)}let l=se(a,n),u=c.node.declarations.push(l);t.scope.registerBinding(i,c.get(`declarations`)[u-1])}getProgramParent(){let e=this;do if(e.path.isProgram())return e;while(e=e.parent);throw Error(`Couldn't find a Program`)}getFunctionParent(){let e=this;do if(e.path.isFunctionParent())return e;while(e=e.parent);return null}getBlockParent(){let e=this;do if(e.path.isBlockParent())return e;while(e=e.parent);throw Error(`We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...`)}getPatternParent(){let e=this;do if(!e.path.isPattern())return e.getBlockParent();while(e=e.parent.parent);throw Error(`We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...`)}getAllBindings(){let e=Object.create(null),t=this;do{for(let n of Object.keys(t.bindings))n in e||(e[n]=t.bindings[n]);t=t.parent}while(t);return e}bindingIdentifierEquals(e,t){return this.getBindingIdentifier(e)===t}getBinding(e){let t=this,n;do{let i=t.getOwnBinding(e);if(i){var r;if(!((r=n)!=null&&r.isPattern()&&i.kind!==`param`&&i.kind!==`local`))return i}else if(!i&&e===`arguments`&&t.path.isFunction()&&!t.path.isArrowFunctionExpression())break;n=t.path}while(t=t.parent)}getOwnBinding(e){return this.bindings[e]}getBindingIdentifier(e){return this.getBinding(e)?.identifier}getOwnBindingIdentifier(e){return this.bindings[e]?.identifier}hasOwnBinding(e){return!!this.getOwnBinding(e)}hasBinding(t,n){if(!t)return!1;let r,i,a;typeof n==`object`?(r=n.noGlobals,i=n.noUids,a=n.upToScope):typeof n==`boolean`&&(r=n);let o=this;do{if(a===o)break;if(o.hasOwnBinding(t))return!0}while(o=o.parent);return!!(!i&&this.hasUid(t)||!r&&e.globals.includes(t)||!r&&e.contextVariables.includes(t))}parentHasBinding(e,t){return this.parent?.hasBinding(e,t)}moveBindingTo(e,t){let n=this.getBinding(e);n&&(n.scope.removeOwnBinding(e),n.scope=t,t.bindings[e]=n)}removeOwnBinding(e){delete this.bindings[e]}removeBinding(e){var t;(t=this.getBinding(e))==null||t.scope.removeOwnBinding(e);let n=this;do n.uids[e]&&(n.uids[e]=!1);while(n=n.parent)}hoistVariables(e=e=>this.push({id:e})){this.crawl();let t=new Set;for(let n of Object.keys(this.bindings)){let r=this.bindings[n];if(!r)continue;let{path:i}=r;if(!i.isVariableDeclarator())continue;let{parent:a,parentPath:o}=i;if(a.kind!==`var`||t.has(a))continue;t.add(i.parent);let s,c=[];for(let t of a.declarations){s??=t.id,t.init&&c.push(l(`=`,t.id,t.init));let n=Object.keys(f(t,!1,!0,!0));for(let r of n)e(p(r),t.init!=null)}if(o.parentPath.isForXStatement({left:a}))o.replaceWith(s);else if(c.length===0)o.remove();else{let e=c.length===1?c[0]:pe(c);o.parentPath.isForStatement({init:a})?o.replaceWith(e):o.replaceWith(L(e))}}}};e.default=xe,xe.globals=[...s,...c],xe.contextVariables=[`arguments`,`undefined`,`Infinity`,`NaN`],xe.prototype._renameFromMap=function(e,t,n,r){e[t]&&(e[n]=r,e[t]=null)},xe.prototype.traverse=function(e,t,r){(0,n.default)(e,t,this,r,this.path)},xe.prototype._generateUid=function(e,t){let n=e;return t>1&&(n+=t),`_${n}`},xe.prototype.toArray=function(e,t,n){if(w(e)){let t=this.getBinding(e.name);if(t!=null&&t.constant&&t.path.isGenericType(`Array`))return e}if(m(e))return e;if(w(e,{name:`arguments`}))return u(z(z(z(p(`Array`),p(`prototype`)),p(`slice`)),p(`call`)),[e]);let r,i=[e];return t===!0?r=`toConsumableArray`:typeof t==`number`?(i.push(ie(t)),r=`slicedToArray`):r=`toArray`,n&&(i.unshift(this.path.hub.addHelper(r)),r=`maybeArrayLike`),u(this.path.hub.addHelper(r),i)},xe.prototype.getAllBindingsOfKind=function(...e){let t=Object.create(null);for(let n of e){let e=this;do{for(let r of Object.keys(e.bindings)){let i=e.bindings[r];i.kind===n&&(t[r]=i)}e=e.parent}while(e)}return t},Object.defineProperties(xe.prototype,{parentBlock:{configurable:!0,enumerable:!0,get(){return this.path.parent}},hub:{configurable:!0,enumerable:!0,get(){return this.path.hub}}})})),sb=V(((e,t)=>{(function(n,r){if(typeof e==`object`&&t!==void 0)r(t),t.exports=i(t);else if(typeof define==`function`&&define.amd)define([`module`],function(e){r.apply(this,arguments),e.exports=i(e)});else{let e={exports:{}};r(e),n=typeof globalThis<`u`?globalThis:n||self,n.sourcemapCodec=i(e)}function i(e){return`default`in e.exports?e.exports.default:e.exports}})(e,(function(e){var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},o=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of r(a))!i.call(e,c)&&c!==o&&t(e,c,{get:()=>a[c],enumerable:!(s=n(a,c))||s.enumerable});return e},s=e=>o(t({},`__esModule`,{value:!0}),e),c={};a(c,{decode:()=>k,decodeGeneratedRanges:()=>T,decodeOriginalScopes:()=>S,encode:()=>j,encodeGeneratedRanges:()=>E,encodeOriginalScopes:()=>C}),e.exports=s(c);var l=44,u=59,d=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,f=new Uint8Array(64),p=new Uint8Array(128);for(let e=0;e<d.length;e++){let t=d.charCodeAt(e);f[e]=t,p[t]=e}function m(e,t){let n=0,r=0,i=0;do i=p[e.next()],n|=(i&31)<<r,r+=5;while(i&32);let a=n&1;return n>>>=1,a&&(n=-2147483648|-n),t+n}function h(e,t,n){let r=t-n;r=r<0?-r<<1|1:r<<1;do{let t=r&31;r>>>=5,r>0&&(t|=32),e.write(f[t])}while(r>0);return t}function g(e,t){return e.pos>=t?!1:e.peek()!==l}var _=1024*16,v=typeof TextDecoder<`u`?new TextDecoder:typeof Buffer<`u`?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},y=class{constructor(){this.pos=0,this.out=``,this.buffer=new Uint8Array(_)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===_&&(this.out+=v.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+v.decode(e.subarray(0,n)):t}},b=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}},x=[];function S(e){let{length:t}=e,n=new b(e),r=[],i=[],a=0;for(;n.pos<t;n.pos++){a=m(n,a);let e=m(n,0);if(!g(n,t)){let t=i.pop();t[2]=a,t[3]=e;continue}let o=m(n,0),s=m(n,0)&1?[a,e,0,0,o,m(n,0)]:[a,e,0,0,o],c=x;if(g(n,t)){c=[];do{let e=m(n,0);c.push(e)}while(g(n,t))}s.vars=c,r.push(s),i.push(s)}return r}function C(e){let t=new y;for(let n=0;n<e.length;)n=w(e,n,t,[0]);return t.flush()}function w(e,t,n,r){let i=e[t],{0:a,1:o,2:s,3:c,4:u,vars:d}=i;t>0&&n.write(l),r[0]=h(n,a,r[0]),h(n,o,0),h(n,u,0),h(n,i.length===6?1:0,0),i.length===6&&h(n,i[5],0);for(let e of d)h(n,e,0);for(t++;t<e.length;){let{0:i,1:a}=e[t];if(i>s||i===s&&a>=c)break;t=w(e,t,n,r)}return n.write(l),r[0]=h(n,s,r[0]),h(n,c,0),t}function T(e){let{length:t}=e,n=new b(e),r=[],i=[],a=0,o=0,s=0,c=0,l=0,u=0,d=0,f=0;do{let e=n.indexOf(`;`),t=0;for(;n.pos<e;n.pos++){if(t=m(n,t),!g(n,e)){let e=i.pop();e[2]=a,e[3]=t;continue}let p=m(n,0),h=p&1,_=p&2,v=p&4,y=null,b=x,S;if(h){let e=m(n,o);s=m(n,o===e?s:0),o=e,S=[a,t,0,0,e,s]}else S=[a,t,0,0];if(S.isScope=!!v,_){let e=c,t=l;c=m(n,c);let r=e===c;l=m(n,r?l:0),u=m(n,r&&t===l?u:0),y=[c,l,u]}if(S.callsite=y,g(n,e)){b=[];do{d=a,f=t;let e=m(n,0),r;if(e<-1){r=[[m(n,0)]];for(let t=-1;t>e;t--){let e=d;d=m(n,d),f=m(n,d===e?f:0);let t=m(n,0);r.push([t,d,f])}}else r=[[e]];b.push(r)}while(g(n,e))}S.bindings=b,r.push(S),i.push(S)}a++,n.pos=e+1}while(n.pos<t);return r}function E(e){if(e.length===0)return``;let t=new y;for(let n=0;n<e.length;)n=D(e,n,t,[0,0,0,0,0,0,0]);return t.flush()}function D(e,t,n,r){let i=e[t],{0:a,1:o,2:s,3:c,isScope:u,callsite:d,bindings:f}=i;if(r[0]<a?(O(n,r[0],a),r[0]=a,r[1]=0):t>0&&n.write(l),r[1]=h(n,i[1],r[1]),h(n,(i.length===6?1:0)|(d?2:0)|(u?4:0),0),i.length===6){let{4:e,5:t}=i;e!==r[2]&&(r[3]=0),r[2]=h(n,e,r[2]),r[3]=h(n,t,r[3])}if(d){let{0:e,1:t,2:a}=i.callsite;e===r[4]?t!==r[5]&&(r[6]=0):(r[5]=0,r[6]=0),r[4]=h(n,e,r[4]),r[5]=h(n,t,r[5]),r[6]=h(n,a,r[6])}if(f)for(let e of f){e.length>1&&h(n,-e.length,0);let t=e[0][0];h(n,t,0);let r=a,i=o;for(let t=1;t<e.length;t++){let a=e[t];r=h(n,a[1],r),i=h(n,a[2],i),h(n,a[0],0)}}for(t++;t<e.length;){let{0:i,1:a}=e[t];if(i>s||i===s&&a>=c)break;t=D(e,t,n,r)}return r[0]<s?(O(n,r[0],s),r[0]=s,r[1]=0):n.write(l),r[1]=h(n,c,r[1]),t}function O(e,t,n){do e.write(u);while(++t<n)}function k(e){let{length:t}=e,n=new b(e),r=[],i=0,a=0,o=0,s=0,c=0;do{let e=n.indexOf(`;`),t=[],l=!0,u=0;for(i=0;n.pos<e;){let r;i=m(n,i),i<u&&(l=!1),u=i,g(n,e)?(a=m(n,a),o=m(n,o),s=m(n,s),g(n,e)?(c=m(n,c),r=[i,a,o,s,c]):r=[i,a,o,s]):r=[i],t.push(r),n.pos++}l||A(t),r.push(t),n.pos=e+1}while(n.pos<=t);return r}function A(e){e.sort(ee)}function ee(e,t){return e[0]-t[0]}function j(e){let t=new y,n=0,r=0,i=0,a=0;for(let o=0;o<e.length;o++){let s=e[o];if(o>0&&t.write(u),s.length===0)continue;let c=0;for(let e=0;e<s.length;e++){let o=s[e];e>0&&t.write(l),c=h(t,o[0],c),o.length!==1&&(n=h(t,o[1],n),r=h(t,o[2],r),i=h(t,o[3],i),o.length!==4&&(a=h(t,o[4],a)))}}return t.flush()}}))})),cb=V(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.resolveURI=r())})(e,(function(){let e=/^[\w+.-]+:\/\//,t=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,n=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function r(t){return e.test(t)}function i(e){return e.startsWith(`//`)}function a(e){return e.startsWith(`/`)}function o(e){return e.startsWith(`file:`)}function s(e){return/^[.?#]/.test(e)}function c(e){let n=t.exec(e);return u(n[1],n[2]||``,n[3],n[4]||``,n[5]||`/`,n[6]||``,n[7]||``)}function l(e){let t=n.exec(e),r=t[2];return u(`file:`,``,t[1]||``,``,a(r)?r:`/`+r,t[3]||``,t[4]||``)}function u(e,t,n,r,i,a,o){return{scheme:e,user:t,host:n,port:r,path:i,query:a,hash:o,type:7}}function d(e){if(i(e)){let t=c(`http:`+e);return t.scheme=``,t.type=6,t}if(a(e)){let t=c(`http://foo.com`+e);return t.scheme=``,t.host=``,t.type=5,t}if(o(e))return l(e);if(r(e))return c(e);let t=c(`http://foo.com/`+e);return t.scheme=``,t.host=``,t.type=e?e.startsWith(`?`)?3:e.startsWith(`#`)?2:4:1,t}function f(e){if(e.endsWith(`/..`))return e;let t=e.lastIndexOf(`/`);return e.slice(0,t+1)}function p(e,t){m(t,t.type),e.path===`/`?e.path=t.path:e.path=f(t.path)+e.path}function m(e,t){let n=t<=4,r=e.path.split(`/`),i=1,a=0,o=!1;for(let e=1;e<r.length;e++){let t=r[e];if(!t){o=!0;continue}if(o=!1,t!==`.`){if(t===`..`){a?(o=!0,a--,i--):n&&(r[i++]=t);continue}r[i++]=t,a++}}let s=``;for(let e=1;e<i;e++)s+=`/`+r[e];(!s||o&&!s.endsWith(`/..`))&&(s+=`/`),e.path=s}function h(e,t){if(!e&&!t)return``;let n=d(e),r=n.type;if(t&&r!==7){let e=d(t),i=e.type;switch(r){case 1:n.hash=e.hash;case 2:n.query=e.query;case 3:case 4:p(n,e);case 5:n.user=e.user,n.host=e.host,n.port=e.port;case 6:n.scheme=e.scheme}i>r&&(r=i)}m(n,r);let i=n.query+n.hash;switch(r){case 2:case 3:return i;case 4:{let r=n.path.slice(1);return r?s(t||e)&&!s(r)?`./`+r+i:r+i:i||`.`}case 5:return n.path+i;default:return n.scheme+`//`+n.user+n.host+n.port+n.path+i}}return h}))})),lb=V(((e,t)=>{(function(n,r){if(typeof e==`object`&&t!==void 0)r(t,cb(),sb()),t.exports=i(t);else if(typeof define==`function`&&define.amd)define([`module`,`@jridgewell/resolve-uri`,`@jridgewell/sourcemap-codec`],function(e){r.apply(this,arguments),e.exports=i(e)});else{let e={exports:{}};r(e,n.resolveURI,n.sourcemapCodec),n=typeof globalThis<`u`?globalThis:n||self,n.traceMapping=i(e)}function i(e){return`default`in e.exports?e.exports.default:e.exports}})(e,(function(e,t,n){var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>function(){return t||(0,e[o(e)[0]])((t={exports:{}}).exports,t),t.exports},u=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let s of o(t))!c.call(e,s)&&s!==n&&i(e,s,{get:()=>t[s],enumerable:!(r=a(t,s))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:r(s(e)),d(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)),p=e=>d(i({},`__esModule`,{value:!0}),e),m=l({"umd:@jridgewell/sourcemap-codec"(e,t){t.exports=n}}),h=l({"umd:@jridgewell/resolve-uri"(e,n){n.exports=t}}),g={};u(g,{AnyMap:()=>L,FlattenMap:()=>L,GREATEST_LOWER_BOUND:()=>le,LEAST_UPPER_BOUND:()=>ce,TraceMap:()=>ue,allGeneratedPositionsFor:()=>ge,decodedMap:()=>Se,decodedMappings:()=>fe,eachMapping:()=>_e,encodedMap:()=>Ce,encodedMappings:()=>de,generatedPositionFor:()=>he,isIgnored:()=>be,originalPositionFor:()=>me,presortedDecodedMap:()=>xe,sourceContentFor:()=>ye,traceSegment:()=>pe}),e.exports=p(g);var _=f(m()),v=f(h());function y(e){if(!e)return``;let t=e.lastIndexOf(`/`);return e.slice(0,t+1)}function b(e,t){let n=y(e),r=t?t+`/`:``;return e=>(0,v.default)(r+(e||``),n)}var x=0,S=1,C=2,w=3,T=4,E=1,D=2;function O(e,t){let n=k(e,0);if(n===e.length)return e;t||(e=e.slice());for(let r=n;r<e.length;r=k(e,r+1))e[r]=ee(e[r],t);return e}function k(e,t){for(let n=t;n<e.length;n++)if(!A(e[n]))return n;return e.length}function A(e){for(let t=1;t<e.length;t++)if(e[t][x]<e[t-1][x])return!1;return!0}function ee(e,t){return t||(e=e.slice()),e.sort(j)}function j(e,t){return e[x]-t[x]}function te(e,t){let n=t.map(()=>[]);for(let t=0;t<e.length;t++){let r=e[t];for(let e=0;e<r.length;e++){let i=r[e];if(i.length===1)continue;let a=i[S],o=i[C],s=i[w],c=n[a];(c[o]||(c[o]=[])).push([s,t,i[x]])}}for(let e=0;e<n.length;e++){let t=n[e];for(let e=0;e<t.length;e++){let n=t[e];n&&n.sort(j)}}return n}var ne=!1;function M(e,t,n,r){for(;n<=r;){let i=n+(r-n>>1),a=e[i][x]-t;if(a===0)return ne=!0,i;a<0?n=i+1:r=i-1}return ne=!1,n-1}function N(e,t,n){for(let r=n+1;r<e.length&&e[r][x]===t;n=r++);return n}function re(e,t,n){for(let r=n-1;r>=0&&e[r][x]===t;n=r--);return n}function P(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function F(e,t,n,r){let{lastKey:i,lastNeedle:a,lastIndex:o}=n,s=0,c=e.length-1;if(r===i){if(t===a)return ne=o!==-1&&e[o][x]===t,o;t>=a?s=o===-1?0:o:c=o}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=M(e,t,s,c)}function I(e){return typeof e==`string`?JSON.parse(e):e}var L=function(e,t){let n=I(e);if(!(`sections`in n))return new ue(n,t);let r=[],i=[],a=[],o=[],s=[];return R(n,t,r,i,a,o,s,0,0,1/0,1/0),xe({version:3,file:n.file,names:o,sources:i,sourcesContent:a,mappings:r,ignoreList:s})};function R(e,t,n,r,i,a,o,s,c,l,u){let{sections:d}=e;for(let e=0;e<d.length;e++){let{map:f,offset:p}=d[e],m=l,h=u;if(e+1<d.length){let t=d[e+1].offset;m=Math.min(l,s+t.line),m===l?h=Math.min(u,c+t.column):m<l&&(h=c+t.column)}z(f,t,n,r,i,a,o,s+p.line,c+p.column,m,h)}}function z(e,t,n,r,i,a,o,s,c,l,u){let d=I(e);if(`sections`in d)return R(...arguments);let f=new ue(d,t),p=r.length,m=a.length,h=fe(f),{resolvedSources:g,sourcesContent:_,ignoreList:v}=f;if(ie(r,g),ie(a,f.names),_)ie(i,_);else for(let e=0;e<g.length;e++)i.push(null);if(v)for(let e=0;e<v.length;e++)o.push(v[e]+p);for(let e=0;e<h.length;e++){let t=s+e;if(t>l)return;let r=ae(n,t),i=e===0?c:0,a=h[e];for(let e=0;e<a.length;e++){let n=a[e],o=i+n[x];if(t===l&&o>=u)return;if(n.length===1){r.push([o]);continue}let s=p+n[S],c=n[C],d=n[w];r.push(n.length===4?[o,s,c,d]:[o,s,c,d,m+n[T]])}}}function ie(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function ae(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}var oe="`line` must be greater than 0 (lines start at line 1)",se="`column` must be greater than or equal to 0 (columns start at column 0)",ce=-1,le=1,ue=class{constructor(e,t){let n=typeof e==`string`;if(!n&&e._decodedMemo)return e;let r=I(e),{version:i,file:a,names:o,sourceRoot:s,sources:c,sourcesContent:l}=r;this.version=i,this.file=a,this.names=o||[],this.sourceRoot=s,this.sources=c,this.sourcesContent=l,this.ignoreList=r.ignoreList||r.x_google_ignoreList||void 0;let u=b(t,s);this.resolvedSources=c.map(u);let{mappings:d}=r;if(typeof d==`string`)this._encoded=d,this._decoded=void 0;else if(Array.isArray(d))this._encoded=void 0,this._decoded=O(d,n);else if(r.sections)throw Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`);else throw Error(`invalid source map: ${JSON.stringify(r)}`);this._decodedMemo=P(),this._bySources=void 0,this._bySourceMemos=void 0}};function B(e){return e}function de(e){var t;return(t=B(e))._encoded??(t._encoded=(0,_.encode)(B(e)._decoded))}function fe(e){var t;return(t=B(e))._decoded||(t._decoded=(0,_.decode)(B(e)._encoded))}function pe(e,t,n){let r=fe(e);if(t>=r.length)return null;let i=r[t],a=De(i,B(e)._decodedMemo,t,n,le);return a===-1?null:i[a]}function me(e,t){let{line:n,column:r,bias:i}=t;if(n--,n<0)throw Error(oe);if(r<0)throw Error(se);let a=fe(e);if(n>=a.length)return Te(null,null,null,null);let o=a[n],s=De(o,B(e)._decodedMemo,n,r,i||le);if(s===-1)return Te(null,null,null,null);let c=o[s];if(c.length===1)return Te(null,null,null,null);let{names:l,resolvedSources:u}=e;return Te(u[c[S]],c[C]+1,c[w],c.length===5?l[c[T]]:null)}function he(e,t){let{source:n,line:r,column:i,bias:a}=t;return V(e,n,r,i,a||le,!1)}function ge(e,t){let{source:n,line:r,column:i,bias:a}=t;return V(e,n,r,i,a||ce,!0)}function _e(e,t){let n=fe(e),{names:r,resolvedSources:i}=e;for(let e=0;e<n.length;e++){let a=n[e];for(let n=0;n<a.length;n++){let o=a[n],s=e+1,c=o[0],l=null,u=null,d=null,f=null;o.length!==1&&(l=i[o[1]],u=o[2]+1,d=o[3]),o.length===5&&(f=r[o[4]]),t({generatedLine:s,generatedColumn:c,source:l,originalLine:u,originalColumn:d,name:f})}}}function ve(e,t){let{sources:n,resolvedSources:r}=e,i=n.indexOf(t);return i===-1&&(i=r.indexOf(t)),i}function ye(e,t){let{sourcesContent:n}=e;if(n==null)return null;let r=ve(e,t);return r===-1?null:n[r]}function be(e,t){let{ignoreList:n}=e;if(n==null)return!1;let r=ve(e,t);return r===-1?!1:n.includes(r)}function xe(e,t){let n=new ue(we(e,[]),t);return B(n)._decoded=e.mappings,n}function Se(e){return we(e,fe(e))}function Ce(e){return we(e,de(e))}function we(e,t){return{version:e.version,file:e.file,names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,mappings:t,ignoreList:e.ignoreList||e.x_google_ignoreList}}function Te(e,t,n,r){return{source:e,line:t,column:n,name:r}}function Ee(e,t){return{line:e,column:t}}function De(e,t,n,r,i){let a=F(e,r,t,n);return ne?a=(i===ce?N:re)(e,r,a):i===ce&&a++,a===-1||a===e.length?-1:a}function Oe(e,t,n,r,i){let a=De(e,t,n,r,le);if(!ne&&i===ce&&a++,a===-1||a===e.length)return[];let o=ne?r:e[a][x];ne||(a=re(e,o,a));let s=N(e,o,a),c=[];for(;a<=s;a++){let t=e[a];c.push(Ee(t[E]+1,t[D]))}return c}function V(e,t,n,r,i,a){var o,s;if(n--,n<0)throw Error(oe);if(r<0)throw Error(se);let{sources:c,resolvedSources:l}=e,u=c.indexOf(t);if(u===-1&&(u=l.indexOf(t)),u===-1)return a?[]:Ee(null,null);let d=(o=B(e))._bySourceMemos||(o._bySourceMemos=c.map(P)),f=((s=B(e))._bySources||(s._bySources=te(fe(e),d)))[u][n];if(f==null)return a?[]:Ee(null,null);let p=d[u];if(a)return Oe(f,p,n,r,i);let m=De(f,p,n,r,i);if(m===-1)return Ee(null,null);let h=f[m];return Ee(h[E]+1,h[D])}}))})),ub=V(((e,t)=>{(function(n,r){if(typeof e==`object`&&t!==void 0)r(t,sb(),lb()),t.exports=i(t);else if(typeof define==`function`&&define.amd)define([`module`,`@jridgewell/sourcemap-codec`,`@jridgewell/trace-mapping`],function(e){r.apply(this,arguments),e.exports=i(e)});else{let e={exports:{}};r(e,n.sourcemapCodec,n.traceMapping),n=typeof globalThis<`u`?globalThis:n||self,n.genMapping=i(e)}function i(e){return`default`in e.exports?e.exports.default:e.exports}})(e,(function(e,t,n){var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>function(){return t||(0,e[o(e)[0]])((t={exports:{}}).exports,t),t.exports},u=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let s of o(t))!c.call(e,s)&&s!==n&&i(e,s,{get:()=>t[s],enumerable:!(r=a(t,s))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:r(s(e)),d(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)),p=e=>d(i({},`__esModule`,{value:!0}),e),m=l({"umd:@jridgewell/sourcemap-codec"(e,n){n.exports=t}}),h=l({"umd:@jridgewell/trace-mapping"(e,t){t.exports=n}}),g={};u(g,{GenMapping:()=>A,addMapping:()=>te,addSegment:()=>j,allMappings:()=>L,fromMap:()=>I,maybeAddMapping:()=>M,maybeAddSegment:()=>ne,setIgnore:()=>re,setSourceContent:()=>N,toDecodedMap:()=>P,toEncodedMap:()=>F}),e.exports=p(g);var _=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function v(e){return e}function y(e,t){return v(e)._indexes[t]}function b(e,t){let n=y(e,t);if(n!==void 0)return n;let{array:r,_indexes:i}=v(e);return i[t]=r.push(t)-1}function x(e,t){let n=y(e,t);if(n===void 0)return;let{array:r,_indexes:i}=v(e);for(let e=n+1;e<r.length;e++){let t=r[e];r[e-1]=t,i[t]--}i[t]=void 0,r.pop()}var S=f(m()),C=f(h()),w=0,T=1,E=2,D=3,O=4,k=-1,A=class{constructor({file:e,sourceRoot:t}={}){this._names=new _,this._sources=new _,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new _}};function ee(e){return e}function j(e,t,n,r,i,a,o,s){return R(!1,e,t,n,r,i,a,o,s)}function te(e,t){return ue(!1,e,t)}var ne=(e,t,n,r,i,a,o,s)=>R(!0,e,t,n,r,i,a,o,s),M=(e,t)=>ue(!0,e,t);function N(e,t,n){let{_sources:r,_sourcesContent:i}=ee(e),a=b(r,t);i[a]=n}function re(e,t,n=!0){let{_sources:r,_sourcesContent:i,_ignoreList:a}=ee(e),o=b(r,t);o===i.length&&(i[o]=null),n?b(a,o):x(a,o)}function P(e){let{_mappings:t,_sources:n,_sourcesContent:r,_names:i,_ignoreList:a}=ee(e);return oe(t),{version:3,file:e.file||void 0,names:i.array,sourceRoot:e.sourceRoot||void 0,sources:n.array,sourcesContent:r,mappings:t,ignoreList:a.array}}function F(e){let t=P(e);return Object.assign({},t,{mappings:(0,S.encode)(t.mappings)})}function I(e){let t=new C.TraceMap(e),n=new A({file:t.file,sourceRoot:t.sourceRoot});return se(ee(n)._names,t.names),se(ee(n)._sources,t.sources),ee(n)._sourcesContent=t.sourcesContent||t.sources.map(()=>null),ee(n)._mappings=(0,C.decodedMappings)(t),t.ignoreList&&se(ee(n)._ignoreList,t.ignoreList),n}function L(e){let t=[],{_mappings:n,_sources:r,_names:i}=ee(e);for(let e=0;e<n.length;e++){let a=n[e];for(let n=0;n<a.length;n++){let o=a[n],s={line:e+1,column:o[w]},c,l,u;o.length!==1&&(c=r.array[o[T]],l={line:o[E]+1,column:o[D]},o.length===5&&(u=i.array[o[O]])),t.push({generated:s,source:c,original:l,name:u})}}return t}function R(e,t,n,r,i,a,o,s,c){let{_mappings:l,_sources:u,_sourcesContent:d,_names:f}=ee(t),p=z(l,n),m=ie(p,r);if(!i)return e&&ce(p,m)?void 0:ae(p,m,[r]);let h=b(u,i),g=s?b(f,s):k;if(h===d.length&&(d[h]=c??null),!(e&&le(p,m,h,a,o,g)))return ae(p,m,s?[r,h,a,o,g]:[r,h,a,o])}function z(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}function ie(e,t){let n=e.length;for(let r=n-1;r>=0&&!(t>=e[r][w]);n=r--);return n}function ae(e,t,n){for(let n=e.length;n>t;n--)e[n]=e[n-1];e[t]=n}function oe(e){let{length:t}=e,n=t;for(let t=n-1;t>=0&&!(e[t].length>0);n=t,t--);n<t&&(e.length=n)}function se(e,t){for(let n=0;n<t.length;n++)b(e,t[n])}function ce(e,t){return t===0?!0:e[t-1].length===1}function le(e,t,n,r,i,a){if(t===0)return!1;let o=e[t-1];return o.length===1?!1:n===o[T]&&r===o[E]&&i===o[D]&&a===(o.length===5?o[O]:k)}function ue(e,t,n){let{generated:r,source:i,original:a,name:o,content:s}=n;return i?R(e,t,r.line-1,r.column,i,a.line-1,a.column,o,s):R(e,t,r.line-1,r.column,null,null,null,null,null)}}))})),db=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=ub(),n=lb();e.default=class{constructor(e,r){this._map=void 0,this._rawMappings=void 0,this._sourceFileName=void 0,this._lastGenLine=0,this._lastSourceLine=0,this._lastSourceColumn=0,this._inputMap=null;let i=this._map=new t.GenMapping({sourceRoot:e.sourceRoot});if(this._sourceFileName=e.sourceFileName?.replace(/\\/g,`/`),this._rawMappings=void 0,e.inputSourceMap){this._inputMap=new n.TraceMap(e.inputSourceMap);let r=this._inputMap.resolvedSources;if(r.length)for(let e=0;e<r.length;e++)(0,t.setSourceContent)(i,r[e],this._inputMap.sourcesContent?.[e])}if(typeof r==`string`&&!e.inputSourceMap)(0,t.setSourceContent)(i,this._sourceFileName,r);else if(typeof r==`object`)for(let e of Object.keys(r))(0,t.setSourceContent)(i,e.replace(/\\/g,`/`),r[e])}get(){return(0,t.toEncodedMap)(this._map)}getDecoded(){return(0,t.toDecodedMap)(this._map)}getRawMappings(){return this._rawMappings||=(0,t.allMappings)(this._map)}mark(e,r,i,a,o,s){this._rawMappings=void 0;let c;if(r!=null)if(this._inputMap){if(c=(0,n.originalPositionFor)(this._inputMap,{line:r,column:i}),!c.name&&o){let e=(0,n.originalPositionFor)(this._inputMap,o);e.name&&(a=e.name)}}else c={name:null,source:s?.replace(/\\/g,`/`)||this._sourceFileName,line:r,column:i};(0,t.maybeAddMapping)(this._map,{name:a,generated:e,source:c?.source,original:c})}}})),fb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;let t=[];for(let e=0;e<32;e++)t.push(` `.repeat(e*2));e.default=class{constructor(e,t){this._map=null,this._buf=``,this._str=``,this._appendCount=0,this._last=0,this._canMarkIdName=!0,this._indentChar=``,this._queuedChar=0,this._position={line:1,column:0},this._sourcePosition={identifierName:void 0,identifierNamePos:void 0,line:void 0,column:void 0,filename:void 0},this._map=e,this._indentChar=t}get(){let{_map:e,_last:t}=this;this._queuedChar!==32&&this._flush();let n=t===10?(this._buf+this._str).trimRight():this._buf+this._str;if(e===null)return{code:n,decodedMap:void 0,map:null,rawMappings:void 0};let r={code:n,decodedMap:e.getDecoded(),get __mergedMap(){return this.map},get map(){let t=e.get();return r.map=t,t},set map(e){Object.defineProperty(r,`map`,{value:e,writable:!0})},get rawMappings(){let t=e.getRawMappings();return r.rawMappings=t,t},set rawMappings(e){Object.defineProperty(r,`rawMappings`,{value:e,writable:!0})}};return r}append(e,t){this._flush(),this._append(e,t)}appendChar(e){this._flush(),this._appendChar(e,1,!0)}queue(e){this._flush(),this._queuedChar=e}_flush(){let e=this._queuedChar;e!==0&&(this._appendChar(e,1,!0),this._queuedChar=0)}_appendChar(e,n,r){if(this._last=e,e===-1){let e=n>64?this._indentChar.repeat(n):t[n/2];this._str+=e}else this._str+=n>1?String.fromCharCode(e).repeat(n):String.fromCharCode(e);let i=e===32,a=this._position;if(e!==10){if(this._map){let e=this._sourcePosition;r&&e?(this._map.mark(a,e.line,e.column,i?void 0:e.identifierName,i?void 0:e.identifierNamePos,e.filename),!i&&this._canMarkIdName&&(e.identifierName=void 0,e.identifierNamePos=void 0)):this._map.mark(a)}a.column+=n}else a.line++,a.column=0}_append(e,t){let n=e.length,r=this._position,i=this._sourcePosition;this._last=-1,++this._appendCount>4096?(+this._str,this._buf+=this._str,this._str=e,this._appendCount=0):this._str+=e;let a=this._map!==null;if(!t&&!a){r.column+=n;return}let{column:o,identifierName:s,identifierNamePos:c,filename:l}=i,u=i.line;(s!=null||c!=null)&&this._canMarkIdName&&(i.identifierName=void 0,i.identifierNamePos=void 0);let d=e.indexOf(`
|
|
111
|
-
`),f=0;for(a&&d!==0&&this._map.mark(r,u,o,s,c,l);d!==-1;)r.line++,r.column=0,f=d+1,f<n&&u!==void 0&&(u++,a&&this._map.mark(r,u,0,void 0,void 0,l)),d=e.indexOf(`
|
|
112
|
-
`,f);r.column+=n-f}removeLastSemicolon(){this._queuedChar===59&&(this._queuedChar=0)}getLastChar(e){if(!e)return this._last;let t=this._queuedChar;return t===0?this._last:t}getNewlineCount(){return this._queuedChar===0&&this._last===10?1:0}hasContent(){return this._last!==0}exactSource(e,t){if(!this._map){t();return}this.source(`start`,e);let n=e.identifierName,r=this._sourcePosition;n!=null&&(this._canMarkIdName=!1,r.identifierName=n),t(),n!=null&&(this._canMarkIdName=!0,r.identifierName=void 0,r.identifierNamePos=void 0),this.source(`end`,e)}source(e,t){this._map&&this._normalizePosition(e,t,0)}sourceWithOffset(e,t,n){this._map&&this._normalizePosition(e,t,n)}_normalizePosition(e,t,n){this._flush();let r=t[e],i=this._sourcePosition;r&&(i.line=r.line,i.column=Math.max(r.column+n,0),i.filename=t.filename)}getCurrentColumn(){return this._position.column+(this._queuedChar?1:0)}getCurrentLine(){return this._position.line}}})),pb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AssignmentExpression=re,e.BinaryExpression=O,e.ClassExpression=j,e.ArrowFunctionExpression=e.ConditionalExpression=M,e.DoExpression=g,e.FunctionExpression=ne,e.FunctionTypeAnnotation=f,e.Identifier=P,e.LogicalExpression=k,e.NullableTypeAnnotation=d,e.ObjectExpression=h,e.OptionalIndexedAccessType=y,e.OptionalCallExpression=e.OptionalMemberExpression=N,e.SequenceExpression=A,e.TSSatisfiesExpression=e.TSAsExpression=b,e.TSConditionalType=x,e.TSConstructorType=e.TSFunctionType=D,e.TSInferType=w,e.TSInstantiationExpression=E,e.TSIntersectionType=C,e.SpreadElement=e.UnaryExpression=e.TSTypeAssertion=te,e.TSTypeOperator=T,e.TSUnionType=S,e.IntersectionTypeAnnotation=e.UnionTypeAnnotation=v,e.UpdateExpression=p,e.AwaitExpression=e.YieldExpression=ee;var t=Zy(),n=kb();let{isMemberExpression:r,isOptionalMemberExpression:i,isYieldExpression:a,isStatement:o}=t,s=new Map([[`||`,0],[`??`,1],[`&&`,2],[`|`,3],[`^`,4],[`&`,5],[`==`,6],[`===`,6],[`!=`,6],[`!==`,6],[`<`,7],[`>`,7],[`<=`,7],[`>=`,7],[`in`,7],[`instanceof`,7],[`>>`,8],[`<<`,8],[`>>>`,8],[`+`,9],[`-`,9],[`*`,10],[`/`,10],[`%`,10],[`**`,11]]);function c(e){return e===156||e===201||e===209}let l=(e,t,n)=>(n===21||n===22)&&t.superClass===e,u=(e,t,n)=>{switch(n){case 108:case 132:return t.object===e;case 17:case 130:case 112:return t.callee===e;case 222:return t.tag===e;case 191:return!0}return!1};function d(e,t,n){return n===4}function f(e,t,r,i){return r===239||r===90||r===4||(i&n.TokenContext.arrowFlowReturnType)>0}function p(e,t,n){return u(e,t,n)||l(e,t,n)}function m(e){return(e&(n.TokenContext.expressionStatement|n.TokenContext.arrowBody))>0}function h(e,t,n,r){return m(r)}function g(e,t,r,i){return(i&n.TokenContext.expressionStatement)>0&&!e.async}function _(e,t,n,r){if(l(e,t,n)||u(e,t,n)||n===238||n===145||n===8)return!0;let i;switch(n){case 10:case 107:i=s.get(t.operator);break;case 156:case 201:i=7}if(i!==void 0){let a=r===2?7:s.get(e.operator);if(i>a||i===a&&n===10&&(a===11?t.left===e:t.right===e)||r===1&&n===107&&(a===1&&i!==1||i===1&&a!==1))return!0}return!1}function v(e,t,n){switch(n){case 4:case 115:case 90:case 239:return!0}return!1}function y(e,t,n){return n===84&&t.objectType===e}function b(e,t,n){return(n===6||n===7)&&t.left===e||n===10&&(t.operator===`|`||t.operator===`&`)&&e===t.left?!0:_(e,t,n,2)}function x(e,t,n){switch(n){case 155:case 195:case 211:case 212:return!0;case 175:return t.objectType===e;case 181:case 219:return t.types[0]===e;case 161:return t.checkType===e||t.extendsType===e}return!1}function S(e,t,n){switch(n){case 181:case 211:case 155:case 195:return!0;case 175:return t.objectType===e}return!1}function C(e,t,n){return n===211||T(e,t,n)}function w(e,t,n){return!!(T(e,t,n)||(n===181||n===219)&&e.typeParameter.constraint&&t.types[0]===e)}function T(e,t,n){switch(n){case 155:case 195:return!0;case 175:if(t.objectType===e)return!0}return!1}function E(e,t,n){switch(n){case 17:case 130:case 112:case 177:return t.typeParameters!=null}return!1}function D(e,t,n){return S(e,t,n)?!0:n===219||n===161&&(t.checkType===e||t.extendsType===e)}function O(e,t,r,i){return _(e,t,r,0)?!0:(i&n.TokenContext.forInOrInitHeadAccumulate)>0&&e.operator===`in`}function k(e,t,n){return _(e,t,n,1)}function A(e,t,n){return n===144||n===133||n===108&&t.property===e||n===132&&t.property===e||n===224?!1:n===21?!0:n===68?t.right===e:n===60?!0:!o(t)}function ee(e,t,n){return n===10||n===107||n===238||n===145||u(e,t,n)||n===8&&a(e)||n===28&&e===t.test||l(e,t,n)||c(n)}function j(e,t,r,i){return(i&(n.TokenContext.expressionStatement|n.TokenContext.exportDefault))>0}function te(e,t,n){return u(e,t,n)||n===10&&t.operator===`**`&&t.left===e||l(e,t,n)}function ne(e,t,r,i){return(i&(n.TokenContext.expressionStatement|n.TokenContext.exportDefault))>0}function M(e,t,n){switch(n){case 238:case 145:case 10:case 107:case 8:return!0;case 28:if(t.test===e)return!0}return c(n)?!0:te(e,t,n)}function N(e,t,n){switch(n){case 17:return t.callee===e;case 108:return t.object===e}return!1}function re(e,t,n,r){return m(r)&&e.left.type===`ObjectPattern`?!0:M(e,t,n)}function P(e,t,a,o,s){var c;if(s&&s(e)!==e.name)return!1;if(a===6&&(c=e.extra)!=null&&c.parenthesized&&t.left===e){let e=t.right.type;if((e===`FunctionExpression`||e===`ClassExpression`)&&t.right.id==null)return!0}return(o&n.TokenContext.forOfHead||(a===108||a===132)&&o&(n.TokenContext.expressionStatement|n.TokenContext.forInitHead|n.TokenContext.forInHead))&&e.name===`let`?(r(t,{object:e,computed:!0})||i(t,{object:e,computed:!0,optional:!1}))&&o&(n.TokenContext.expressionStatement|n.TokenContext.forInitHead|n.TokenContext.forInHead)?!0:(o&n.TokenContext.forOfHead)>0:a===68&&t.left===e&&e.name===`async`&&!t.await}})),mb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.TaggedTemplateExpression=t,e.TemplateElement=n,e.TemplateLiteral=i,e._printTemplate=r;function t(e){this.print(e.tag),this.print(e.typeParameters),this.print(e.quasi)}function n(){throw Error(`TemplateElement printing is handled in TemplateLiteral`)}function r(e,t){let n=e.quasis,r="`";for(let i=0;i<n.length-1;i++)if(r+=n[i].value.raw,this.token(r+"${",!0),this.print(t[i]),r=`}`,this.tokenMap){let t=this.tokenMap.findMatching(e,`}`,i);t&&this._catchUpTo(t.loc.start)}r+=n[n.length-1].value.raw,this.token(r+"`",!0)}function i(e){r.call(this,e,e.expressions)}})),hb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LogicalExpression=e.AssignmentExpression=O,e.AssignmentPattern=D,e.AwaitExpression=C,e.BinaryExpression=k,e.BindExpression=A,e.CallExpression=x,e.ConditionalExpression=f,e.Decorator=v,e.DoExpression=l,e.EmptyStatement=T,e.ExpressionStatement=E,e.Import=S,e.MemberExpression=ee,e.MetaProperty=j,e.ModuleExpression=M,e.NewExpression=p,e.OptionalCallExpression=b,e.OptionalMemberExpression=y,e.ParenthesizedExpression=u,e.PrivateName=te,e.SequenceExpression=m,e.Super=g,e.ThisExpression=h,e.UnaryExpression=c,e.UpdateExpression=d,e.V8IntrinsicIdentifier=ne,e.YieldExpression=w,e._shouldPrintDecoratorsBeforeExport=_;var t=Zy(),n=kb();let{isCallExpression:r,isLiteral:i,isMemberExpression:a,isNewExpression:o,isPattern:s}=t;function c(e){let{operator:t}=e,n=t.charCodeAt(0);n>=97&&n<=122?(this.word(t),this.space()):this.tokenChar(n),this.print(e.argument)}function l(e){e.async&&(this.word(`async`,!0),this.space()),this.word(`do`),this.space(),this.print(e.body)}function u(e){this.tokenChar(40);let t=this.enterDelimited();this.print(e.expression,void 0,!0),this._noLineTerminatorAfterNode=t,this.rightParens(e)}function d(e){e.prefix?(this.token(e.operator,!1,0,!0),this.print(e.argument)):(this.print(e.argument,!0),this.token(e.operator,!1,0,!0))}function f(e){this.print(e.test),this.space(),this.tokenChar(63),this.space(),this.print(e.consequent),this.space(),this.tokenChar(58),this.space(),this.print(e.alternate)}function p(e,t){if(this.word(`new`),this.space(),this.print(e.callee),this.format.minified&&e.arguments.length===0&&!e.optional&&!r(t,{callee:e})&&!a(t)&&!o(t)||(this.print(e.typeArguments),this.print(e.typeParameters),e.optional&&this.token(`?.`),e.arguments.length===0&&this.tokenMap&&!this.tokenMap.endMatches(e,`)`)))return;this.tokenChar(40);let n=this.enterDelimited();this.printList(e.arguments,this.shouldPrintTrailingComma(`)`),void 0,void 0,void 0,!0),this._noLineTerminatorAfterNode=n,this.rightParens(e)}function m(e){this.printList(e.expressions)}function h(){this.word(`this`)}function g(){this.word(`super`)}function _(e){return typeof this.format.decoratorsBeforeExport==`boolean`?this.format.decoratorsBeforeExport:typeof e.start==`number`&&e.start===e.declaration.start}function v(e){this.tokenChar(64);let{expression:t}=e;this.print(t),this.newline()}function y(e){let{computed:t}=e,{optional:n,property:r}=e;if(this.print(e.object),!t&&a(r))throw TypeError(`Got a MemberExpression for MemberExpression property`);i(r)&&typeof r.value==`number`&&(t=!0),n&&this.token(`?.`),t?(this.tokenChar(91),this.print(r),this.tokenChar(93)):(n||this.tokenChar(46),this.print(r))}function b(e){this.print(e.callee),this.print(e.typeParameters),e.optional&&this.token(`?.`),this.print(e.typeArguments),this.tokenChar(40);let t=this.enterDelimited();this.printList(e.arguments,void 0,void 0,void 0,void 0,!0),this._noLineTerminatorAfterNode=t,this.rightParens(e)}function x(e){this.print(e.callee),this.print(e.typeArguments),this.print(e.typeParameters),this.tokenChar(40);let t=this.enterDelimited();this.printList(e.arguments,this.shouldPrintTrailingComma(`)`),void 0,void 0,void 0,!0),this._noLineTerminatorAfterNode=t,this.rightParens(e)}function S(){this.word(`import`)}function C(e){this.word(`await`),this.space(),this.print(e.argument)}function w(e){e.delegate?(this.word(`yield`,!0),this.tokenChar(42),e.argument&&(this.space(),this.print(e.argument))):e.argument?(this.word(`yield`,!0),this.space(),this.print(e.argument)):this.word(`yield`)}function T(){this.semicolon(!0)}function E(e){this.tokenContext|=n.TokenContext.expressionStatement,this.print(e.expression),this.semicolon()}function D(e){this.print(e.left),(e.left.type===`Identifier`||s(e.left))&&(e.left.optional&&this.tokenChar(63),this.print(e.left.typeAnnotation)),this.space(),this.tokenChar(61),this.space(),this.print(e.right)}function O(e){this.print(e.left),this.space(),this.token(e.operator,!1,0,!0),this.space(),this.print(e.right)}function k(e){this.print(e.left),this.space();let{operator:t}=e;t.charCodeAt(0)===105?this.word(t):(this.token(t,!1,0,!0),this.setLastChar(t.charCodeAt(t.length-1))),this.space(),this.print(e.right)}function A(e){this.print(e.object),this.token(`::`),this.print(e.callee)}function ee(e){if(this.print(e.object),!e.computed&&a(e.property))throw TypeError(`Got a MemberExpression for MemberExpression property`);let t=e.computed;if(i(e.property)&&typeof e.property.value==`number`&&(t=!0),t){let t=this.enterDelimited();this.tokenChar(91),this.print(e.property,void 0,!0),this.tokenChar(93),this._noLineTerminatorAfterNode=t}else this.tokenChar(46),this.print(e.property)}function j(e){this.print(e.meta),this.tokenChar(46),this.print(e.property)}function te(e){this.tokenChar(35),this.print(e.id)}function ne(e){this.tokenChar(37),this.word(e.name)}function M(e){this.word(`module`,!0),this.space(),this.tokenChar(123),this.indent();let{body:t}=e;(t.body.length||t.directives.length)&&this.newline(),this.print(t),this.dedent(),this.rightBrace(e)}})),gb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BreakStatement=h,e.CatchClause=x,e.ContinueStatement=g,e.DebuggerStatement=w,e.DoWhileStatement=p,e.ForInStatement=d,e.ForOfStatement=f,e.ForStatement=l,e.IfStatement=s,e.LabeledStatement=y,e.ReturnStatement=_,e.SwitchCase=C,e.SwitchStatement=S,e.ThrowStatement=v,e.TryStatement=b,e.VariableDeclaration=E,e.VariableDeclarator=D,e.WhileStatement=u,e.WithStatement=o;var t=Zy(),n=kb();let{isFor:r,isIfStatement:i,isStatement:a}=t;function o(e){this.word(`with`),this.space(),this.tokenChar(40),this.print(e.object),this.tokenChar(41),this.printBlock(e.body)}function s(e){this.word(`if`),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.space();let t=e.alternate&&i(c(e.consequent));t&&(this.tokenChar(123),this.newline(),this.indent()),this.printAndIndentOnComments(e.consequent),t&&(this.dedent(),this.newline(),this.tokenChar(125)),e.alternate&&(this.endsWith(125)&&this.space(),this.word(`else`),this.space(),this.printAndIndentOnComments(e.alternate))}function c(e){let{body:t}=e;return a(t)===!1?e:c(t)}function l(e){this.word(`for`),this.space(),this.tokenChar(40),this.tokenContext|=n.TokenContext.forInitHead|n.TokenContext.forInOrInitHeadAccumulate,this.print(e.init),this.tokenContext=n.TokenContext.normal,this.tokenChar(59),e.test&&(this.space(),this.print(e.test)),this.tokenChar(59,1),e.update&&(this.space(),this.print(e.update)),this.tokenChar(41),this.printBlock(e.body)}function u(e){this.word(`while`),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.printBlock(e.body)}function d(e){this.word(`for`),this.space(),this.noIndentInnerCommentsHere(),this.tokenChar(40),this.tokenContext|=n.TokenContext.forInHead|n.TokenContext.forInOrInitHeadAccumulate,this.print(e.left),this.tokenContext=n.TokenContext.normal,this.space(),this.word(`in`),this.space(),this.print(e.right),this.tokenChar(41),this.printBlock(e.body)}function f(e){this.word(`for`),this.space(),e.await&&(this.word(`await`),this.space()),this.noIndentInnerCommentsHere(),this.tokenChar(40),this.tokenContext|=n.TokenContext.forOfHead,this.print(e.left),this.space(),this.word(`of`),this.space(),this.print(e.right),this.tokenChar(41),this.printBlock(e.body)}function p(e){this.word(`do`),this.space(),this.print(e.body),this.space(),this.word(`while`),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.semicolon()}function m(e,t){t&&(e.space(),e.printTerminatorless(t)),e.semicolon()}function h(e){this.word(`break`),m(this,e.label)}function g(e){this.word(`continue`),m(this,e.label)}function _(e){this.word(`return`),m(this,e.argument)}function v(e){this.word(`throw`),m(this,e.argument)}function y(e){this.print(e.label),this.tokenChar(58),this.space(),this.print(e.body)}function b(e){this.word(`try`),this.space(),this.print(e.block),this.space(),e.handlers?this.print(e.handlers[0]):this.print(e.handler),e.finalizer&&(this.space(),this.word(`finally`),this.space(),this.print(e.finalizer))}function x(e){this.word(`catch`),this.space(),e.param&&(this.tokenChar(40),this.print(e.param),this.print(e.param.typeAnnotation),this.tokenChar(41),this.space()),this.print(e.body)}function S(e){this.word(`switch`),this.space(),this.tokenChar(40),this.print(e.discriminant),this.tokenChar(41),this.space(),this.tokenChar(123),this.printSequence(e.cases,!0),this.rightBrace(e)}function C(e){e.test?(this.word(`case`),this.space(),this.print(e.test),this.tokenChar(58)):(this.word(`default`),this.tokenChar(58)),e.consequent.length&&(this.newline(),this.printSequence(e.consequent,!0))}function w(){this.word(`debugger`),this.semicolon()}function T(e){this.tokenChar(44,e),this.newline()}function E(e,t){e.declare&&(this.word(`declare`),this.space());let{kind:n}=e;switch(n){case`await using`:this.word(`await`),this.space();case`using`:this.word(`using`,!0);break;default:this.word(n)}this.space();let i=!1;if(!r(t)){for(let t of e.declarations)if(t.init){i=!0;break}}if(this.printList(e.declarations,void 0,void 0,e.declarations.length>1,i?T:void 0),t!=null)switch(t.type){case`ForStatement`:if(t.init===e)return;break;case`ForInStatement`:case`ForOfStatement`:if(t.left===e)return}this.semicolon()}function D(e){this.print(e.id),e.definite&&this.tokenChar(33),this.print(e.id.typeAnnotation),e.init&&(this.space(),this.tokenChar(61),this.space(),this.print(e.init))}})),_b=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ArrowFunctionExpression=d,e.FunctionDeclaration=e.FunctionExpression=u,e._functionHead=l,e._methodHead=s,e._param=o,e._parameters=a,e._params=i,e._predicate=c,e._shouldPrintArrowParamsParens=f;var t=Zy(),n=kb();let{isIdentifier:r}=t;function i(e,t,n,r){if(this.print(e.typeParameters),n!==void 0||r!==void 0){let e=p.call(this,n,r);e&&this.sourceIdentifierName(e.name,e.pos)}this.tokenChar(40),a.call(this,e.params,41),this.print(e.returnType,t),this._noLineTerminator=t}function a(e,t){let n=this.enterDelimited(),r=this.shouldPrintTrailingComma(t),i=e.length;for(let t=0;t<i;t++)o.call(this,e[t]),(r||t<i-1)&&(this.tokenChar(44,t),this.space());this.tokenChar(t),this._noLineTerminatorAfterNode=n}function o(e){this.printJoin(e.decorators,void 0,void 0,void 0,void 0,!0),this.print(e,void 0,!0),e.optional&&this.tokenChar(63),this.print(e.typeAnnotation,void 0,!0)}function s(e){let t=e.kind,n=e.key;(t===`get`||t===`set`)&&(this.word(t),this.space()),e.async&&(this.word(`async`,!0),this.space()),(t===`method`||t===`init`)&&e.generator&&this.tokenChar(42),e.computed?(this.tokenChar(91),this.print(n),this.tokenChar(93)):this.print(n),e.optional&&this.tokenChar(63),this._buf._map?i.call(this,e,!1,e.computed&&e.key.type!==`StringLiteral`?void 0:e.key):i.call(this,e,!1)}function c(e,t){e.predicate&&(e.returnType||this.tokenChar(58),this.space(),this.print(e.predicate,t))}function l(e,t,n){e.async&&(this.word(`async`),this.format.preserveFormat||(this._innerCommentsState=0),this.space()),this.word(`function`),e.generator&&(this.format.preserveFormat||(this._innerCommentsState=0),this.tokenChar(42)),this.space(),e.id&&this.print(e.id),this._buf._map?i.call(this,e,!1,e.id,t):i.call(this,e,!1),n&&c.call(this,e)}function u(e,t){l.call(this,e,t,!0),this.space(),this.print(e.body)}function d(e,t){e.async&&(this.word(`async`,!0),this.space()),f.call(this,e)?i.call(this,e,!0,void 0,this._buf._map?t:void 0):this.print(e.params[0],!0),c.call(this,e,!0),this.space(),this.printInnerComments(),this.token(`=>`),this.space(),this.tokenContext|=n.TokenContext.arrowBody,this.print(e.body)}function f(e){var t,n;if(e.params.length!==1||e.typeParameters||e.returnType||e.predicate)return!0;let i=e.params[0];if(!r(i)||i.typeAnnotation||i.optional||(t=i.leadingComments)!=null&&t.length||(n=i.trailingComments)!=null&&n.length)return!0;if(this.tokenMap){if(e.loc==null||this.tokenMap.findMatching(e,`(`)!==null)return!0;let t=this.tokenMap.findMatching(e,`=>`);return t?.loc==null?!0:t.loc.start.line!==e.loc.start.line}return!!this.format.retainLines}function p(e,t){let n=e;if(!n&&t){let e=t.type;e===`VariableDeclarator`?n=t.id:e===`AssignmentExpression`||e===`AssignmentPattern`?n=t.left:e===`ObjectProperty`||e===`ClassProperty`?(!t.computed||t.key.type===`StringLiteral`)&&(n=t.key):(e===`ClassPrivateProperty`||e===`ClassAccessorProperty`)&&(n=t.key)}if(!n)return;let r;return n.type===`Identifier`?r={pos:n.loc?.start,name:n.loc?.identifierName||n.name}:n.type===`PrivateName`?r={pos:n.loc?.start,name:`#`+n.id.name}:n.type===`StringLiteral`&&(r={pos:n.loc?.start,name:n.value}),r}})),vb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.TSAnyKeyword=v,e.TSArrayType=F,e.TSAsExpression=ye,e.TSBigIntKeyword=y,e.TSBooleanKeyword=C,e.TSCallSignatureDeclaration=d,e.TSInterfaceHeritage=e.TSClassImplements=he,e.TSConditionalType=se,e.TSConstructSignatureDeclaration=p,e.TSConstructorType=te,e.TSDeclareFunction=c,e.TSDeclareMethod=l,e.TSEnumBody=we,e.TSEnumDeclaration=Ce,e.TSEnumMember=Te,e.TSExportAssignment=je,e.TSExternalModuleReference=ke,e.TSFunctionType=j,e.TSImportEqualsDeclaration=V,e.TSImportType=Oe,e.TSIndexSignature=_,e.TSIndexedAccessType=B,e.TSInferType=ce,e.TSInstantiationExpression=Se,e.TSInterfaceBody=_e,e.TSInterfaceDeclaration=ge,e.TSIntersectionType=ae,e.TSIntrinsicKeyword=A,e.TSLiteralType=me,e.TSMappedType=de,e.TSMethodSignature=g,e.TSModuleBlock=De,e.TSModuleDeclaration=Ee,e.TSNamedTupleMember=z,e.TSNamespaceExportDeclaration=Me,e.TSNeverKeyword=k,e.TSNonNullExpression=Ae,e.TSNullKeyword=O,e.TSNumberKeyword=x,e.TSObjectKeyword=S,e.TSOptionalType=L,e.TSParameterProperty=s,e.TSParenthesizedType=le,e.TSPropertySignature=m,e.TSQualifiedName=u,e.TSRestType=R,e.TSSatisfiesExpression=be,e.TSStringKeyword=w,e.TSSymbolKeyword=T,e.TSTemplateLiteralType=pe,e.TSThisType=ee,e.TSTupleType=I,e.TSTypeAliasDeclaration=ve,e.TSTypeAnnotation=i,e.TSTypeAssertion=xe,e.TSTypeLiteral=P,e.TSTypeOperator=ue,e.TSTypeParameter=o,e.TSTypeParameterDeclaration=e.TSTypeParameterInstantiation=a,e.TSTypePredicate=N,e.TSTypeQuery=re,e.TSTypeReference=M,e.TSUndefinedKeyword=D,e.TSUnionType=ie,e.TSUnknownKeyword=b,e.TSVoidKeyword=E,e._tsPrintClassMemberModifiers=Pe;var t=_b(),n=Cb(),r=mb();function i(e,t){this.token((t.type===`TSFunctionType`||t.type===`TSConstructorType`)&&t.typeAnnotation===e?`=>`:`:`),this.space(),e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)}function a(e,t){this.tokenChar(60);let n=t.type===`ArrowFunctionExpression`&&e.params.length===1;this.tokenMap&&e.start!=null&&e.end!=null&&(n&&=!!this.tokenMap.find(e,e=>this.tokenMap.matchesOriginal(e,`,`)),n||=this.shouldPrintTrailingComma(`>`)),this.printList(e.params,n),this.tokenChar(62)}function o(e){e.const&&(this.word(`const`),this.space()),e.in&&(this.word(`in`),this.space()),e.out&&(this.word(`out`),this.space()),this.word(e.name),e.constraint&&(this.space(),this.word(`extends`),this.space(),this.print(e.constraint)),e.default&&(this.space(),this.tokenChar(61),this.space(),this.print(e.default))}function s(e){e.accessibility&&(this.word(e.accessibility),this.space()),e.readonly&&(this.word(`readonly`),this.space()),t._param.call(this,e.parameter)}function c(e,n){e.declare&&(this.word(`declare`),this.space()),t._functionHead.call(this,e,n,!1),this.semicolon()}function l(e){n._classMethodHead.call(this,e),this.semicolon()}function u(e){this.print(e.left),this.tokenChar(46),this.print(e.right)}function d(e){Ne.call(this,e),f(this,e)}function f(e,t){if(!e.tokenMap||!t.start||!t.end){e.semicolon();return}e.tokenMap.endMatches(t,`,`)?e.token(`,`):e.tokenMap.endMatches(t,`;`)&&e.semicolon()}function p(e){this.word(`new`),this.space(),Ne.call(this,e),f(this,e)}function m(e){let{readonly:t}=e;t&&(this.word(`readonly`),this.space()),h.call(this,e),this.print(e.typeAnnotation),f(this,e)}function h(e){e.computed&&this.tokenChar(91),this.print(e.key),e.computed&&this.tokenChar(93),e.optional&&this.tokenChar(63)}function g(e){let{kind:t}=e;(t===`set`||t===`get`)&&(this.word(t),this.space()),h.call(this,e),Ne.call(this,e),f(this,e)}function _(e){let{readonly:n,static:r}=e;r&&(this.word(`static`),this.space()),n&&(this.word(`readonly`),this.space()),this.tokenChar(91),t._parameters.call(this,e.parameters,93),this.print(e.typeAnnotation),f(this,e)}function v(){this.word(`any`)}function y(){this.word(`bigint`)}function b(){this.word(`unknown`)}function x(){this.word(`number`)}function S(){this.word(`object`)}function C(){this.word(`boolean`)}function w(){this.word(`string`)}function T(){this.word(`symbol`)}function E(){this.word(`void`)}function D(){this.word(`undefined`)}function O(){this.word(`null`)}function k(){this.word(`never`)}function A(){this.word(`intrinsic`)}function ee(){this.word(`this`)}function j(e){ne.call(this,e)}function te(e){e.abstract&&(this.word(`abstract`),this.space()),this.word(`new`),this.space(),ne.call(this,e)}function ne(e){let{typeParameters:n}=e,r=e.parameters;this.print(n),this.tokenChar(40),t._parameters.call(this,r,41),this.space();let i=e.typeAnnotation;this.print(i)}function M(e){let t=e.typeParameters;this.print(e.typeName,!!t),this.print(t)}function N(e){e.asserts&&(this.word(`asserts`),this.space()),this.print(e.parameterName),e.typeAnnotation&&(this.space(),this.word(`is`),this.space(),this.print(e.typeAnnotation.typeAnnotation))}function re(e){this.word(`typeof`),this.space(),this.print(e.exprName);let t=e.typeParameters;t&&this.print(t)}function P(e){Fe(this,e,()=>this.printJoin(e.members,!0,!0,void 0,void 0,!0))}function F(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)}function I(e){this.tokenChar(91),this.printList(e.elementTypes,this.shouldPrintTrailingComma(`]`)),this.tokenChar(93)}function L(e){this.print(e.typeAnnotation),this.tokenChar(63)}function R(e){this.token(`...`),this.print(e.typeAnnotation)}function z(e){this.print(e.label),e.optional&&this.tokenChar(63),this.tokenChar(58),this.space(),this.print(e.elementType)}function ie(e){oe(this,e,`|`)}function ae(e){oe(this,e,`&`)}function oe(e,t,n){var r;let i=0;(r=e.tokenMap)!=null&&r.startMatches(t,n)&&(i=1,e.token(n)),e.printJoin(t.types,void 0,void 0,function(e){this.space(),this.token(n,void 0,e+i),this.space()})}function se(e){this.print(e.checkType),this.space(),this.word(`extends`),this.space(),this.print(e.extendsType),this.space(),this.tokenChar(63),this.space(),this.print(e.trueType),this.space(),this.tokenChar(58),this.space(),this.print(e.falseType)}function ce(e){this.word(`infer`),this.print(e.typeParameter)}function le(e){this.tokenChar(40),this.print(e.typeAnnotation),this.tokenChar(41)}function ue(e){this.word(e.operator),this.space(),this.print(e.typeAnnotation)}function B(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)}function de(e){let{nameType:t,optional:n,readonly:r,typeAnnotation:i}=e;this.tokenChar(123);let a=this.enterDelimited();this.space(),r&&(fe(this,r),this.word(`readonly`),this.space()),this.tokenChar(91),this.word(e.typeParameter.name),this.space(),this.word(`in`),this.space(),this.print(e.typeParameter.constraint,void 0,!0),t&&(this.space(),this.word(`as`),this.space(),this.print(t,void 0,!0)),this.tokenChar(93),n&&(fe(this,n),this.tokenChar(63)),i&&(this.tokenChar(58),this.space(),this.print(i,void 0,!0)),this.space(),this._noLineTerminatorAfterNode=a,this.tokenChar(125)}function fe(e,t){t!==!0&&e.token(t)}function pe(e){r._printTemplate.call(this,e,e.types)}function me(e){this.print(e.literal)}function he(e){this.print(e.expression),this.print(e.typeArguments)}function ge(e){let{declare:t,id:n,typeParameters:r,extends:i,body:a}=e;t&&(this.word(`declare`),this.space()),this.word(`interface`),this.space(),this.print(n),this.print(r),i!=null&&i.length&&(this.space(),this.word(`extends`),this.space(),this.printList(i)),this.space(),this.print(a)}function _e(e){Fe(this,e,()=>this.printJoin(e.body,!0,!0,void 0,void 0,!0))}function ve(e){let{declare:t,id:n,typeParameters:r,typeAnnotation:i}=e;t&&(this.word(`declare`),this.space()),this.word(`type`),this.space(),this.print(n),this.print(r),this.space(),this.tokenChar(61),this.space(),this.print(i),this.semicolon()}function ye(e){let{expression:t,typeAnnotation:n}=e;this.print(t,!0),this.space(),this.word(`as`),this.space(),this.print(n)}function be(e){let{expression:t,typeAnnotation:n}=e;this.print(t,!0),this.space(),this.word(`satisfies`),this.space(),this.print(n)}function xe(e){let{typeAnnotation:t,expression:n}=e;this.tokenChar(60),this.print(t),this.tokenChar(62),this.space(),this.print(n)}function Se(e){this.print(e.expression),this.print(e.typeParameters)}function Ce(e){let{declare:t,const:n,id:r}=e;t&&(this.word(`declare`),this.space()),n&&(this.word(`const`),this.space()),this.word(`enum`),this.space(),this.print(r),this.space(),we.call(this,e)}function we(e){Fe(this,e,()=>this.printList(e.members,this.shouldPrintTrailingComma(`}`)??!0,!0,!0,void 0,!0))}function Te(e){let{id:t,initializer:n}=e;this.print(t),n&&(this.space(),this.tokenChar(61),this.space(),this.print(n))}function Ee(e){let{declare:t,id:n,kind:r}=e;if(t&&(this.word(`declare`),this.space()),e.global||(this.word(r??(n.type===`Identifier`?`namespace`:`module`)),this.space()),this.print(n),!e.body){this.semicolon();return}let i=e.body;for(;i.type===`TSModuleDeclaration`;)this.tokenChar(46),this.print(i.id),i=i.body;this.space(),this.print(i)}function De(e){Fe(this,e,()=>this.printSequence(e.body,!0,!0))}function Oe(e){let{qualifier:t,options:n}=e;this.word(`import`),this.tokenChar(40),this.print(e.argument),n&&(this.tokenChar(44),this.print(n)),this.tokenChar(41),t&&(this.tokenChar(46),this.print(t));let r=e.typeParameters;r&&this.print(r)}function V(e){let{id:t,moduleReference:n}=e;e.isExport&&(this.word(`export`),this.space()),this.word(`import`),this.space(),this.print(t),this.space(),this.tokenChar(61),this.space(),this.print(n),this.semicolon()}function ke(e){this.token(`require(`),this.print(e.expression),this.tokenChar(41)}function Ae(e){this.print(e.expression),this.tokenChar(33),this.setLastChar(33)}function je(e){this.word(`export`),this.space(),this.tokenChar(61),this.space(),this.print(e.expression),this.semicolon()}function Me(e){this.word(`export`),this.space(),this.word(`as`),this.space(),this.word(`namespace`),this.space(),this.print(e.id),this.semicolon()}function Ne(e){let{typeParameters:n}=e,r=e.parameters;this.print(n),this.tokenChar(40),t._parameters.call(this,r,41);let i=e.typeAnnotation;this.print(i)}function Pe(e){let t=e.type===`ClassPrivateProperty`,n=e.type===`ClassAccessorProperty`||e.type===`ClassProperty`;Ie(this,e,[n&&e.declare&&`declare`,!t&&e.accessibility]),e.static&&(this.word(`static`),this.space()),Ie(this,e,[!t&&e.abstract&&`abstract`,!t&&e.override&&`override`,(n||t)&&e.readonly&&`readonly`])}function Fe(e,t,n){e.token(`{`);let r=e.enterDelimited();n(),e._noLineTerminatorAfterNode=r,e.rightBrace(t)}function Ie(e,t,n){var r;let i=new Set;for(let e of n)e&&i.add(e);(r=e.tokenMap)==null||r.find(t,t=>i.has(t.value)?(e.token(t.value),e.space(),i.delete(t.value),i.size===0):!1);for(let t of i)e.word(t),e.space()}})),yb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ExportAllDeclaration=_,e.ExportDefaultDeclaration=b,e.ExportDefaultSpecifier=f,e.ExportNamedDeclaration=y,e.ExportNamespaceSpecifier=m,e.ExportSpecifier=p,e.ImportAttribute=S,e.ImportDeclaration=x,e.ImportDefaultSpecifier=d,e.ImportExpression=w,e.ImportNamespaceSpecifier=C,e.ImportSpecifier=u,e._printAttributes=g;var t=Zy(),n=kb(),r=hb();let{isClassDeclaration:i,isExportDefaultSpecifier:a,isExportNamespaceSpecifier:o,isImportDefaultSpecifier:s,isImportNamespaceSpecifier:c,isStatement:l}=t;function u(e){(e.importKind===`type`||e.importKind===`typeof`)&&(this.word(e.importKind),this.space()),this.print(e.imported),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word(`as`),this.space(),this.print(e.local))}function d(e){this.print(e.local)}function f(e){this.print(e.exported)}function p(e){e.exportKind===`type`&&(this.word(`type`),this.space()),this.print(e.local),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word(`as`),this.space(),this.print(e.exported))}function m(e){this.tokenChar(42),this.space(),this.word(`as`),this.space(),this.print(e.exported)}let h=!1;function g(e,t){var n;let{attributes:r}=e;var{assertions:i}=e;let{importAttributesKeyword:a}=this.format;r&&!a&&e.extra&&(e.extra.deprecatedAssertSyntax||e.extra.deprecatedWithLegacySyntax)&&!h&&(h=!0,console.warn('You are using import attributes, without specifying the desired output syntax.\nPlease specify the "importAttributesKeyword" generator option, whose value can be one of:\n - "with" : `import { a } from "b" with { type: "json" };`\n - "assert" : `import { a } from "b" assert { type: "json" };`\n - "with-legacy" : `import { a } from "b" with type: "json";`\n'));let o=a===`assert`||!a&&i;if(this.word(o?`assert`:`with`),this.space(),!o&&(a===`with-legacy`||!a&&(n=e.extra)!=null&&n.deprecatedWithLegacySyntax)){this.printList(r||i);return}let s=t?1:0;this.token(`{`,void 0,s),this.space(),this.printList(r||i,this.shouldPrintTrailingComma(`}`)),this.space(),this.token(`}`,void 0,s)}function _(e){var t,n;this.word(`export`),this.space(),e.exportKind===`type`&&(this.word(`type`),this.space()),this.tokenChar(42),this.space(),this.word(`from`),this.space(),(t=e.attributes)!=null&&t.length||(n=e.assertions)!=null&&n.length?(this.print(e.source,!0),this.space(),g.call(this,e,!1)):this.print(e.source),this.semicolon()}function v(e,t){i(t.declaration)&&r._shouldPrintDecoratorsBeforeExport.call(e,t)&&e.printJoin(t.declaration.decorators)}function y(e){if(v(this,e),this.word(`export`),this.space(),e.declaration){let t=e.declaration;this.print(t),l(t)||this.semicolon()}else{e.exportKind===`type`&&(this.word(`type`),this.space());let r=e.specifiers.slice(0),i=!1;for(;;){let e=r[0];if(a(e)||o(e))i=!0,this.print(r.shift()),r.length&&(this.tokenChar(44),this.space());else break}let s=!1;if((r.length||!r.length&&!i)&&(s=!0,this.tokenChar(123),r.length&&(this.space(),this.printList(r,this.shouldPrintTrailingComma(`}`)),this.space()),this.tokenChar(125)),e.source){var t,n;this.space(),this.word(`from`),this.space(),(t=e.attributes)!=null&&t.length||(n=e.assertions)!=null&&n.length?(this.print(e.source,!0),this.space(),g.call(this,e,s)):this.print(e.source)}this.semicolon()}}function b(e){v(this,e),this.word(`export`),this.noIndentInnerCommentsHere(),this.space(),this.word(`default`),this.space(),this.tokenContext|=n.TokenContext.exportDefault;let t=e.declaration;this.print(t),l(t)||this.semicolon()}function x(e){var t,n;this.word(`import`),this.space();let r=e.importKind===`type`||e.importKind===`typeof`;r?(this.noIndentInnerCommentsHere(),this.word(e.importKind),this.space()):e.module?(this.noIndentInnerCommentsHere(),this.word(`module`),this.space()):e.phase&&(this.noIndentInnerCommentsHere(),this.word(e.phase),this.space());let i=e.specifiers.slice(0),a=!!i.length;for(;a;){let e=i[0];if(s(e)||c(e))this.print(i.shift()),i.length&&(this.tokenChar(44),this.space());else break}let o=!1;i.length?(o=!0,this.tokenChar(123),this.space(),this.printList(i,this.shouldPrintTrailingComma(`}`)),this.space(),this.tokenChar(125)):r&&!a&&(o=!0,this.tokenChar(123),this.tokenChar(125)),(a||r)&&(this.space(),this.word(`from`),this.space()),(t=e.attributes)!=null&&t.length||(n=e.assertions)!=null&&n.length?(this.print(e.source,!0),this.space(),g.call(this,e,o)):this.print(e.source),this.semicolon()}function S(e){this.print(e.key),this.tokenChar(58),this.space(),this.print(e.value)}function C(e){this.tokenChar(42),this.space(),this.word(`as`),this.space(),this.print(e.local)}function w(e){this.word(`import`),e.phase&&(this.tokenChar(46),this.word(e.phase)),this.tokenChar(40);let t=this.shouldPrintTrailingComma(`)`);this.print(e.source),e.options!=null&&(this.tokenChar(44),this.space(),this.print(e.options)),t&&this.tokenChar(44),this.rightParens(e)}})),bb=V(((e,t)=>{let n={},r=n.hasOwnProperty,i=(e,t)=>{for(let n in e)r.call(e,n)&&t(n,e[n])},a=(e,t)=>(t&&i(t,(t,n)=>{e[t]=n}),e),o=(e,t)=>{let n=e.length,r=-1;for(;++r<n;)t(e[r])},s=e=>`\\u`+(`0000`+e).slice(-4),c=(e,t)=>{let n=e.toString(16);return t?n:n.toUpperCase()},l=n.toString,u=Array.isArray,d=e=>typeof Buffer==`function`&&Buffer.isBuffer(e),f=e=>l.call(e)==`[object Object]`,p=e=>typeof e==`string`||l.call(e)==`[object String]`,m=e=>typeof e==`number`||l.call(e)==`[object Number]`,h=e=>typeof e==`bigint`,g=e=>typeof e==`function`,_=e=>l.call(e)==`[object Map]`,v=e=>l.call(e)==`[object Set]`,y={"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`},b=/[\\\b\f\n\r\t]/,x=/[0-9]/,S=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,C=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,w=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,T=(e,t)=>{let n=()=>{A=k,++t.indentLevel,k=t.indent.repeat(t.indentLevel)},r={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:`single`,wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:`decimal`,indent:` `,indentLevel:0,__inline1__:!1,__inline2__:!1},l=t&&t.json;l&&(r.quotes=`double`,r.wrap=!0),t=a(r,t),t.quotes!=`single`&&t.quotes!=`double`&&t.quotes!=`backtick`&&(t.quotes=`single`);let E=t.quotes==`double`?`"`:t.quotes==`backtick`?"`":`'`,D=t.compact,O=t.lowercaseHex,k=t.indent.repeat(t.indentLevel),A=``,ee=t.__inline1__,j=t.__inline2__,te=D?``:`
|
|
113
|
-
`,ne,M=!0,N=t.numbers==`binary`,re=t.numbers==`octal`,P=t.numbers==`decimal`,F=t.numbers==`hexadecimal`;if(l&&e&&g(e.toJSON)&&(e=e.toJSON()),!p(e)){if(_(e))return e.size==0?`new Map()`:(D||(t.__inline1__=!0,t.__inline2__=!1),`new Map(`+T(Array.from(e),t)+`)`);if(v(e))return e.size==0?`new Set()`:`new Set(`+T(Array.from(e),t)+`)`;if(d(e))return e.length==0?`Buffer.from([])`:`Buffer.from(`+T(Array.from(e),t)+`)`;if(u(e))return ne=[],t.wrap=!0,ee&&(t.__inline1__=!1,t.__inline2__=!0),j||n(),o(e,e=>{M=!1,j&&(t.__inline2__=!1),ne.push((D||j?``:k)+T(e,t))}),M?`[]`:j?`[`+ne.join(`, `)+`]`:`[`+te+ne.join(`,`+te)+te+(D?``:A)+`]`;if(m(e)||h(e)){if(l)return JSON.stringify(Number(e));let t;if(P)t=String(e);else if(F){let n=e.toString(16);O||(n=n.toUpperCase()),t=`0x`+n}else N?t=`0b`+e.toString(2):re&&(t=`0o`+e.toString(8));return h(e)?t+`n`:t}else if(h(e))return l?JSON.stringify(Number(e)):e+`n`;else if(f(e))return ne=[],t.wrap=!0,n(),i(e,(e,n)=>{M=!1,ne.push((D?``:k)+T(e,t)+`:`+(D?``:` `)+T(n,t))}),M?`{}`:`{`+te+ne.join(`,`+te)+te+(D?``:A)+`}`;else return l?JSON.stringify(e)||`null`:String(e)}let I=t.escapeEverything?C:w;return ne=e.replace(I,(e,n,r,i,a,o)=>{if(n){if(t.minimal)return n;let e=n.charCodeAt(0),r=n.charCodeAt(1);return t.es6?`\\u{`+c((e-55296)*1024+r-56320+65536,O)+`}`:s(c(e,O))+s(c(r,O))}if(r)return s(c(r.charCodeAt(0),O));if(e==`\0`&&!l&&!x.test(o.charAt(a+1)))return`\\0`;if(i)return i==E||t.escapeEverything?`\\`+i:i;if(b.test(e))return y[e];if(t.minimal&&!S.test(e))return e;let u=c(e.charCodeAt(0),O);return l||u.length>2?s(u):`\\x`+(`00`+u).slice(-2)}),E=="`"&&(ne=ne.replace(/\$\{/g,"\\${")),t.isScriptContext&&(ne=ne.replace(/<\/(script|style)/gi,`<\\/$1`).replace(/<!--/g,l?`\\u003C!--`:`\\x3C!--`)),t.wrap&&(ne=E+ne+E),ne};T.version=`3.0.2`,t.exports=T})),xb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ArgumentPlaceholder=l,e.ArrayPattern=e.ArrayExpression=m,e.BigIntLiteral=b,e.BooleanLiteral=g,e.Identifier=c,e.NullLiteral=_,e.NumericLiteral=v,e.ObjectPattern=e.ObjectExpression=d,e.ObjectMethod=f,e.ObjectProperty=p,e.PipelineBareFunction=w,e.PipelinePrimaryTopicReference=T,e.PipelineTopicExpression=C,e.RegExpLiteral=h,e.SpreadElement=e.RestElement=u,e.StringLiteral=y,e.TopicReference=S,e.VoidPattern=E,e._getRawIdentifier=s;var t=Zy(),n=bb(),r=_b();let{isAssignmentPattern:i,isIdentifier:a}=t,o=``;function s(e){let{name:t}=e,n=this.tokenMap.find(e,e=>e.value===t);return n?(o=this._originalCode.slice(n.start,n.end),o):o=e.name}function c(e){this._buf._map&&this.sourceIdentifierName(e.loc?.identifierName||e.name),this.word(this.tokenMap?o:e.name)}function l(){this.tokenChar(63)}function u(e){this.token(`...`),this.print(e.argument)}function d(e){let t=e.properties;if(this.tokenChar(123),t.length){let e=this.enterDelimited();this.space(),this.printList(t,this.shouldPrintTrailingComma(`}`),!0,!0,void 0,!0),this.space(),this._noLineTerminatorAfterNode=e}this.rightBrace(e)}function f(e){this.printJoin(e.decorators),r._methodHead.call(this,e),this.space(),this.print(e.body)}function p(e){if(this.printJoin(e.decorators),e.computed)this.tokenChar(91),this.print(e.key),this.tokenChar(93);else{if(i(e.value)&&a(e.key)&&e.key.name===e.value.left.name){this.print(e.value);return}if(this.print(e.key),e.shorthand&&a(e.key)&&a(e.value)&&e.key.name===e.value.name)return}this.tokenChar(58),this.space(),this.print(e.value)}function m(e){let t=e.elements,n=t.length;this.tokenChar(91);let r=this.enterDelimited();for(let e=0;e<t.length;e++){let r=t[e];r?(e>0&&this.space(),this.print(r,void 0,!0),(e<n-1||this.shouldPrintTrailingComma(`]`))&&this.tokenChar(44,e)):this.tokenChar(44,e)}this._noLineTerminatorAfterNode=r,this.tokenChar(93)}function h(e){this.word(`/${e.pattern}/${e.flags}`,!1)}function g(e){this.word(e.value?`true`:`false`)}function _(){this.word(`null`)}function v(e){let t=this.getPossibleRaw(e),r=this.format.jsescOption,i=e.value,a=i+``;r.numbers?this.number(n(i,r),i):t==null?this.number(a,i):this.format.minified?this.number(t.length<a.length?t:a,i):this.number(t,i)}function y(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.token(t);return}let r=n(e.value,this.format.jsescOption);this.token(r)}function b(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.word(t);return}this.word(e.value+`n`)}let x=new Set([`^^`,`@@`,`^`,`%`,`#`]);function S(){let{topicToken:e}=this.format;if(x.has(e))this.token(e);else{let t=JSON.stringify(e),n=Array.from(x,e=>JSON.stringify(e));throw Error(`The "topicToken" generator option must be one of ${n.join(`, `)} (${t} received instead).`)}}function C(e){this.print(e.expression)}function w(e){this.print(e.callee)}function T(){this.tokenChar(35)}function E(){this.word(`void`)}})),Sb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AnyTypeAnnotation=s,e.ArrayTypeAnnotation=c,e.BooleanLiteralTypeAnnotation=u,e.BooleanTypeAnnotation=l,e.DeclareClass=f,e.DeclareExportAllDeclaration=C,e.DeclareExportDeclaration=S,e.DeclareFunction=p,e.DeclareInterface=g,e.DeclareModule=_,e.DeclareModuleExports=v,e.DeclareOpaqueType=b,e.DeclareTypeAlias=y,e.DeclareVariable=x,e.DeclaredPredicate=h,e.EmptyTypeAnnotation=ce,e.EnumBooleanBody=D,e.EnumBooleanMember=te,e.EnumDeclaration=w,e.EnumDefaultedMember=ee,e.EnumNumberBody=O,e.EnumNumberMember=ne,e.EnumStringBody=k,e.EnumStringMember=M,e.EnumSymbolBody=A,e.ExistsTypeAnnotation=re,e.FunctionTypeAnnotation=P,e.FunctionTypeParam=F,e.IndexedAccessType=je,e.InferredPredicate=m,e.InterfaceDeclaration=z,e.GenericTypeAnnotation=e.ClassImplements=e.InterfaceExtends=I,e.InterfaceTypeAnnotation=ae,e.IntersectionTypeAnnotation=oe,e.MixedTypeAnnotation=se,e.NullLiteralTypeAnnotation=d,e.NullableTypeAnnotation=le,Object.defineProperty(e,`NumberLiteralTypeAnnotation`,{enumerable:!0,get:function(){return i.NumericLiteral}}),e.NumberTypeAnnotation=ue,e.ObjectTypeAnnotation=ye,e.ObjectTypeCallProperty=xe,e.ObjectTypeIndexer=Se,e.ObjectTypeInternalSlot=be,e.ObjectTypeProperty=Ce,e.ObjectTypeSpreadProperty=we,e.OpaqueType=ve,e.OptionalIndexedAccessType=Me,e.QualifiedTypeIdentifier=Te,Object.defineProperty(e,`StringLiteralTypeAnnotation`,{enumerable:!0,get:function(){return i.StringLiteral}}),e.StringTypeAnnotation=B,e.SymbolTypeAnnotation=Ee,e.ThisTypeAnnotation=de,e.TupleTypeAnnotation=fe,e.TypeAlias=me,e.TypeAnnotation=he,e.TypeCastExpression=V,e.TypeParameter=_e,e.TypeParameterDeclaration=e.TypeParameterInstantiation=ge,e.TypeofTypeAnnotation=pe,e.UnionTypeAnnotation=Oe,e.Variance=ke,e.VoidTypeAnnotation=Ae,e._interfaceish=L,e._variance=R;var t=Zy(),n=yb(),r=kb(),i=xb();let{isDeclareExportDeclaration:a,isStatement:o}=t;function s(){this.word(`any`)}function c(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)}function l(){this.word(`boolean`)}function u(e){this.word(e.value?`true`:`false`)}function d(){this.word(`null`)}function f(e,t){a(t)||(this.word(`declare`),this.space()),this.word(`class`),this.space(),L.call(this,e)}function p(e,t){a(t)||(this.word(`declare`),this.space()),this.word(`function`),this.space(),this.print(e.id),this.print(e.id.typeAnnotation.typeAnnotation),e.predicate&&(this.space(),this.print(e.predicate)),this.semicolon()}function m(){this.tokenChar(37),this.word(`checks`)}function h(e){this.tokenChar(37),this.word(`checks`),this.tokenChar(40),this.print(e.value),this.tokenChar(41)}function g(e){this.word(`declare`),this.space(),z.call(this,e)}function _(e){this.word(`declare`),this.space(),this.word(`module`),this.space(),this.print(e.id),this.space(),this.print(e.body)}function v(e){this.word(`declare`),this.space(),this.word(`module`),this.tokenChar(46),this.word(`exports`),this.print(e.typeAnnotation)}function y(e){this.word(`declare`),this.space(),me.call(this,e)}function b(e,t){a(t)||(this.word(`declare`),this.space()),ve.call(this,e)}function x(e,t){a(t)||(this.word(`declare`),this.space()),this.word(`var`),this.space(),this.print(e.id),this.print(e.id.typeAnnotation),this.semicolon()}function S(e){this.word(`declare`),this.space(),this.word(`export`),this.space(),e.default&&(this.word(`default`),this.space()),N.call(this,e)}function C(e){this.word(`declare`),this.space(),n.ExportAllDeclaration.call(this,e)}function w(e){let{id:t,body:n}=e;this.word(`enum`),this.space(),this.print(t),this.print(n)}function T(e,t,n){n&&(e.space(),e.word(`of`),e.space(),e.word(t)),e.space()}function E(e,t){let{members:n}=t;e.token(`{`),e.indent(),e.newline();for(let t of n)e.print(t),e.newline();t.hasUnknownMembers&&(e.token(`...`),e.newline()),e.dedent(),e.token(`}`)}function D(e){let{explicitType:t}=e;T(this,`boolean`,t),E(this,e)}function O(e){let{explicitType:t}=e;T(this,`number`,t),E(this,e)}function k(e){let{explicitType:t}=e;T(this,`string`,t),E(this,e)}function A(e){T(this,`symbol`,!0),E(this,e)}function ee(e){let{id:t}=e;this.print(t),this.tokenChar(44)}function j(e,t){e.print(t.id),e.space(),e.token(`=`),e.space(),e.print(t.init),e.token(`,`)}function te(e){j(this,e)}function ne(e){j(this,e)}function M(e){j(this,e)}function N(e){if(e.declaration){let t=e.declaration;this.print(t),o(t)||this.semicolon()}else this.tokenChar(123),e.specifiers.length&&(this.space(),this.printList(e.specifiers),this.space()),this.tokenChar(125),e.source&&(this.space(),this.word(`from`),this.space(),this.print(e.source)),this.semicolon()}function re(){this.tokenChar(42)}function P(e,t){this.print(e.typeParameters),this.tokenChar(40),e.this&&(this.word(`this`),this.tokenChar(58),this.space(),this.print(e.this.typeAnnotation),(e.params.length||e.rest)&&(this.tokenChar(44),this.space())),this.printList(e.params),e.rest&&(e.params.length&&(this.tokenChar(44),this.space()),this.token(`...`),this.print(e.rest)),this.tokenChar(41);let n=t?.type;n!=null&&(n===`ObjectTypeCallProperty`||n===`ObjectTypeInternalSlot`||n===`DeclareFunction`||n===`ObjectTypeProperty`&&t.method)?this.tokenChar(58):(this.space(),this.token(`=>`)),this.space(),this.print(e.returnType)}function F(e){this.print(e.name),e.optional&&this.tokenChar(63),e.name&&(this.tokenChar(58),this.space()),this.print(e.typeAnnotation)}function I(e){this.print(e.id),this.print(e.typeParameters,!0)}function L(e){var t;if(this.print(e.id),this.print(e.typeParameters),(t=e.extends)!=null&&t.length&&(this.space(),this.word(`extends`),this.space(),this.printList(e.extends)),e.type===`DeclareClass`){var n,r;(n=e.mixins)!=null&&n.length&&(this.space(),this.word(`mixins`),this.space(),this.printList(e.mixins)),(r=e.implements)!=null&&r.length&&(this.space(),this.word(`implements`),this.space(),this.printList(e.implements))}this.space(),this.print(e.body)}function R(e){let t=e.variance?.kind;t!=null&&(t===`plus`?this.tokenChar(43):t===`minus`&&this.tokenChar(45))}function z(e){this.word(`interface`),this.space(),L.call(this,e)}function ie(e){this.space(),this.token(`&`,!1,e),this.space()}function ae(e){var t;this.word(`interface`),(t=e.extends)!=null&&t.length&&(this.space(),this.word(`extends`),this.space(),this.printList(e.extends)),this.space(),this.print(e.body)}function oe(e){this.printJoin(e.types,void 0,void 0,ie)}function se(){this.word(`mixed`)}function ce(){this.word(`empty`)}function le(e){this.tokenChar(63),this.print(e.typeAnnotation)}function ue(){this.word(`number`)}function B(){this.word(`string`)}function de(){this.word(`this`)}function fe(e){this.tokenChar(91),this.printList(e.types),this.tokenChar(93)}function pe(e){this.word(`typeof`),this.space(),this.print(e.argument)}function me(e){this.word(`type`),this.space(),this.print(e.id),this.print(e.typeParameters),this.space(),this.tokenChar(61),this.space(),this.print(e.right),this.semicolon()}function he(e,t){this.tokenChar(58),this.space(),t.type===`ArrowFunctionExpression`?this.tokenContext|=r.TokenContext.arrowFlowReturnType:e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)}function ge(e){this.tokenChar(60),this.printList(e.params),this.tokenChar(62)}function _e(e){R.call(this,e),this.word(e.name),e.bound&&this.print(e.bound),e.default&&(this.space(),this.tokenChar(61),this.space(),this.print(e.default))}function ve(e){this.word(`opaque`),this.space(),this.word(`type`),this.space(),this.print(e.id),this.print(e.typeParameters),e.supertype&&(this.tokenChar(58),this.space(),this.print(e.supertype)),e.impltype&&(this.space(),this.tokenChar(61),this.space(),this.print(e.impltype)),this.semicolon()}function ye(e){e.exact?this.token(`{|`):this.tokenChar(123);let t=[...e.properties,...e.callProperties||[],...e.indexers||[],...e.internalSlots||[]];t.length&&(this.newline(),this.space(),this.printJoin(t,!0,!0,()=>{(t.length!==1||e.inexact)&&(this.tokenChar(44),this.space())},!0),this.space()),e.inexact&&(this.indent(),this.token(`...`),t.length&&this.newline(),this.dedent()),e.exact?this.token(`|}`):this.tokenChar(125)}function be(e){e.static&&(this.word(`static`),this.space()),this.tokenChar(91),this.tokenChar(91),this.print(e.id),this.tokenChar(93),this.tokenChar(93),e.optional&&this.tokenChar(63),e.method||(this.tokenChar(58),this.space()),this.print(e.value)}function xe(e){e.static&&(this.word(`static`),this.space()),this.print(e.value)}function Se(e){e.static&&(this.word(`static`),this.space()),R.call(this,e),this.tokenChar(91),e.id&&(this.print(e.id),this.tokenChar(58),this.space()),this.print(e.key),this.tokenChar(93),this.tokenChar(58),this.space(),this.print(e.value)}function Ce(e){e.proto&&(this.word(`proto`),this.space()),e.static&&(this.word(`static`),this.space()),(e.kind===`get`||e.kind===`set`)&&(this.word(e.kind),this.space()),R.call(this,e),this.print(e.key),e.optional&&this.tokenChar(63),e.method||(this.tokenChar(58),this.space()),this.print(e.value)}function we(e){this.token(`...`),this.print(e.argument)}function Te(e){this.print(e.qualification),this.tokenChar(46),this.print(e.id)}function Ee(){this.word(`symbol`)}function De(e){this.space(),this.token(`|`,!1,e),this.space()}function Oe(e){this.printJoin(e.types,void 0,void 0,De)}function V(e){this.tokenChar(40),this.print(e.expression),this.print(e.typeAnnotation),this.tokenChar(41)}function ke(e){e.kind===`plus`?this.tokenChar(43):this.tokenChar(45)}function Ae(){this.word(`void`)}function je(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)}function Me(e){this.print(e.objectType),e.optional&&this.token(`?.`),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)}})),Cb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ClassAccessorProperty=f,e.ClassBody=l,e.ClassExpression=e.ClassDeclaration=c,e.ClassMethod=m,e.ClassPrivateMethod=h,e.ClassPrivateProperty=p,e.ClassProperty=d,e.StaticBlock=_,e._classMethodHead=g;var t=Zy(),n=hb(),r=vb(),i=Sb(),a=_b();let{isExportDefaultDeclaration:o,isExportNamedDeclaration:s}=t;function c(e,t){(!(o(t)||s(t))||!n._shouldPrintDecoratorsBeforeExport.call(this,t))&&this.printJoin(e.decorators),e.declare&&(this.word(`declare`),this.space()),e.abstract&&(this.word(`abstract`),this.space()),this.word(`class`),e.id&&(this.space(),this.print(e.id)),this.print(e.typeParameters),e.superClass&&(this.space(),this.word(`extends`),this.space(),this.print(e.superClass),this.print(e.superTypeParameters)),e.implements&&(this.space(),this.word(`implements`),this.space(),this.printList(e.implements)),this.space(),this.print(e.body)}function l(e){if(this.tokenChar(123),e.body.length===0)this.tokenChar(125);else{let t=u(this,e);t?.(-1);let n=this.enterDelimited();this.printJoin(e.body,!0,!0,t,!0,!0),this._noLineTerminatorAfterNode=n,this.endsWith(10)||this.newline(),this.rightBrace(e)}}function u(e,t){if(!e.tokenMap||t.start==null||t.end==null)return null;let n=e.tokenMap.getIndexes(t);if(!n)return null;let r=1,i=0,a=0,o=()=>{for(;a<t.body.length&&t.body[a].start==null;)a++};return o(),s=>{a<=s&&(a=s+1,o());let c=a===t.body.length?t.end:t.body[a].start,l;for(;r<n.length&&e.tokenMap.matchesOriginal(l=e._tokens[n[r]],`;`)&&l.start<c;)e.tokenChar(59,i++),r++}}function d(e){if(this.printJoin(e.decorators),!e.static&&!this.format.preserveFormat){var t;let n=(t=e.key.loc)==null||(t=t.end)==null?void 0:t.line;n&&this.catchUp(n)}r._tsPrintClassMemberModifiers.call(this,e),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(i._variance.call(this,e),this.print(e.key)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()}function f(e){var t;this.printJoin(e.decorators);let n=(t=e.key.loc)==null||(t=t.end)==null?void 0:t.line;n&&this.catchUp(n),r._tsPrintClassMemberModifiers.call(this,e),this.word(`accessor`,!0),this.space(),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(i._variance.call(this,e),this.print(e.key)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()}function p(e){this.printJoin(e.decorators),r._tsPrintClassMemberModifiers.call(this,e),this.print(e.key),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()}function m(e){g.call(this,e),this.space(),this.print(e.body)}function h(e){g.call(this,e),this.space(),this.print(e.body)}function g(e){if(this.printJoin(e.decorators),!this.format.preserveFormat){var t;let n=(t=e.key.loc)==null||(t=t.end)==null?void 0:t.line;n&&this.catchUp(n)}r._tsPrintClassMemberModifiers.call(this,e),a._methodHead.call(this,e)}function _(e){this.word(`static`),this.space(),this.tokenChar(123),e.body.length===0?this.tokenChar(125):(this.newline(),this.printSequence(e.body,!0),this.rightBrace(e))}})),wb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BlockStatement=r,e.Directive=i,e.DirectiveLiteral=s,e.File=t,e.InterpreterDirective=c,e.Placeholder=l,e.Program=n;function t(e){e.program&&this.print(e.program.interpreter),this.print(e.program)}function n(e){this.printInnerComments(!1);let t=e.directives?.length;if(t){var n;let r=e.body.length?2:1;this.printSequence(e.directives,void 0,void 0,r),(n=e.directives[t-1].trailingComments)!=null&&n.length||this.newline(r)}this.printSequence(e.body)}function r(e){this.tokenChar(123);let t=this.enterDelimited(),n=e.directives?.length;if(n){var r;let t=e.body.length?2:1;this.printSequence(e.directives,!0,!0,t),(r=e.directives[n-1].trailingComments)!=null&&r.length||this.newline(t)}this.printSequence(e.body,!0,!0),this._noLineTerminatorAfterNode=t,this.rightBrace(e)}function i(e){this.print(e.value),this.semicolon()}let a=/(?:^|[^\\])(?:\\\\)*'/,o=/(?:^|[^\\])(?:\\\\)*"/;function s(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.token(t);return}let{value:n}=e;if(!o.test(n))this.token(`"${n}"`);else if(!a.test(n))this.token(`'${n}'`);else throw Error(`Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.`)}function c(e){this.token(`#!${e.value}`),this._newline()}function l(e){this.token(`%%`),this.print(e.name),this.token(`%%`),e.expectedNode===`Statement`&&this.semicolon()}})),Tb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.JSXAttribute=t,e.JSXClosingElement=f,e.JSXClosingFragment=g,e.JSXElement=l,e.JSXEmptyExpression=p,e.JSXExpressionContainer=o,e.JSXFragment=m,e.JSXIdentifier=n,e.JSXMemberExpression=i,e.JSXNamespacedName=r,e.JSXOpeningElement=d,e.JSXOpeningFragment=h,e.JSXSpreadAttribute=a,e.JSXSpreadChild=s,e.JSXText=c;function t(e){this.print(e.name),e.value&&(this.tokenChar(61),this.print(e.value))}function n(e){this.word(e.name)}function r(e){this.print(e.namespace),this.tokenChar(58),this.print(e.name)}function i(e){this.print(e.object),this.tokenChar(46),this.print(e.property)}function a(e){this.tokenChar(123),this.token(`...`),this.print(e.argument),this.rightBrace(e)}function o(e){this.tokenChar(123),this.print(e.expression),this.rightBrace(e)}function s(e){this.tokenChar(123),this.token(`...`),this.print(e.expression),this.rightBrace(e)}function c(e){let t=this.getPossibleRaw(e);t===void 0?this.token(e.value,!0):this.token(t,!0)}function l(e){let t=e.openingElement;if(this.print(t),!t.selfClosing){this.indent();for(let t of e.children)this.print(t);this.dedent(),this.print(e.closingElement)}}function u(){this.space()}function d(e){this.tokenChar(60),this.print(e.name),e.typeArguments&&this.print(e.typeArguments),this.print(e.typeParameters),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,void 0,void 0,u)),e.selfClosing&&(this.space(),this.tokenChar(47)),this.tokenChar(62)}function f(e){this.tokenChar(60),this.tokenChar(47),this.print(e.name),this.tokenChar(62)}function p(){this.printInnerComments()}function m(e){this.print(e.openingFragment),this.indent();for(let t of e.children)this.print(t);this.dedent(),this.print(e.closingFragment)}function h(){this.tokenChar(60),this.tokenChar(62)}function g(){this.token(`</`),this.tokenChar(62)}})),Eb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=mb();Object.keys(t).forEach(function(n){n===`default`||n===`__esModule`||n in e&&e[n]===t[n]||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=hb();Object.keys(n).forEach(function(t){t===`default`||t===`__esModule`||t in e&&e[t]===n[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})});var r=gb();Object.keys(r).forEach(function(t){t===`default`||t===`__esModule`||t in e&&e[t]===r[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}})});var i=Cb();Object.keys(i).forEach(function(t){t===`default`||t===`__esModule`||t in e&&e[t]===i[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}})});var a=_b();Object.keys(a).forEach(function(t){t===`default`||t===`__esModule`||t in e&&e[t]===a[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}})});var o=yb();Object.keys(o).forEach(function(t){t===`default`||t===`__esModule`||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})});var s=xb();Object.keys(s).forEach(function(t){t===`default`||t===`__esModule`||t in e&&e[t]===s[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}})});var c=Sb();Object.keys(c).forEach(function(t){t===`default`||t===`__esModule`||t in e&&e[t]===c[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}})});var l=wb();Object.keys(l).forEach(function(t){t===`default`||t===`__esModule`||t in e&&e[t]===l[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return l[t]}})});var u=Tb();Object.keys(u).forEach(function(t){t===`default`||t===`__esModule`||t in e&&e[t]===u[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return u[t]}})});var d=vb();Object.keys(d).forEach(function(t){t===`default`||t===`__esModule`||t in e&&e[t]===d[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return d[t]}})})})),Db=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DecimalLiteral=r,e.Noop=t,e.RecordExpression=i,e.TSExpressionWithTypeArguments=n,e.TupleExpression=a;function t(){}function n(e){this.print(e.expression),this.print(e.typeParameters)}function r(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.word(t);return}this.word(e.value+`m`)}function i(e){let t=e.properties,n,r;if(this.format.recordAndTupleSyntaxType===`bar`)n=`{|`,r=`|}`;else if(this.format.recordAndTupleSyntaxType!==`hash`&&this.format.recordAndTupleSyntaxType!=null)throw Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`);else n=`#{`,r=`}`;this.token(n),t.length&&(this.space(),this.printList(t,this.shouldPrintTrailingComma(r),!0,!0),this.space()),this.token(r)}function a(e){let t=e.elements,n=t.length,r,i;if(this.format.recordAndTupleSyntaxType===`bar`)r=`[|`,i=`|]`;else if(this.format.recordAndTupleSyntaxType===`hash`)r=`#[`,i=`]`;else throw Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);this.token(r);for(let e=0;e<t.length;e++){let r=t[e];r&&(e>0&&this.space(),this.print(r),(e<n-1||this.shouldPrintTrailingComma(i))&&this.token(`,`,!1,e))}this.token(i)}})),Ob=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.generatorInfosMap=void 0;var t=Eb(),n=Db();let r=e.generatorInfosMap=new Map,i=0;for(let e of Object.keys(t).sort())e.startsWith(`_`)||r.set(e,[t[e],i++,void 0]);for(let e of Object.keys(n))r.set(e,[n[e],i++,void 0])})),kb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.TokenContext=void 0,e.isLastChild=c,e.parentNeedsParens=o;var t=pb(),n=Zy(),r=Ob();let{VISITOR_KEYS:i}=n;e.TokenContext={normal:0,expressionStatement:1,arrowBody:2,exportDefault:4,arrowFlowReturnType:8,forInitHead:16,forInHead:32,forOfHead:64,forInOrInitHeadAccumulate:128,forInOrInitHeadAccumulatePassThroughMask:128};for(let e of Object.keys(t)){let n=t[e];r.generatorInfosMap.has(e)&&(r.generatorInfosMap.get(e)[2]=n)}function a(e){switch(e.type){case`CallExpression`:return!0;case`MemberExpression`:return a(e.object)}return!1}function o(e,t,n){switch(n){case 112:if(t.callee===e&&a(e))return!0;break;case 42:return!s(e)&&!(e.type===`CallExpression`&&s(e.callee))&&e.type!==`ParenthesizedExpression`}return!1}function s(e){switch(e.type){case`Identifier`:return!0;case`MemberExpression`:return!e.computed&&e.property.type===`Identifier`&&s(e.object);default:return!1}}function c(e,t){let n=i[e.type];for(let r=n.length-1;r>=0;r--){let i=e[n[r]];if(i===t)return!0;if(Array.isArray(i)){let e=i.length-1;for(;e>=0&&i[e]===null;)e--;return e>=0&&i[e]===t}else if(i)return!1}return!1}})),Ab=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.TokenMap=void 0;let{traverseFast:t,VISITOR_KEYS:n}=Zy();e.TokenMap=class{constructor(e,n,r){this._tokens=void 0,this._source=void 0,this._nodesToTokenIndexes=new Map,this._nodesOccurrencesCountCache=new Map,this._tokensCache=new Map,this._tokens=n,this._source=r,t(e,e=>{let t=this._getTokensIndexesOfNode(e);t.length>0&&this._nodesToTokenIndexes.set(e,t)}),this._tokensCache.clear()}has(e){return this._nodesToTokenIndexes.has(e)}getIndexes(e){return this._nodesToTokenIndexes.get(e)}find(e,t){let n=this._nodesToTokenIndexes.get(e);if(n)for(let e=0;e<n.length;e++){let r=n[e],i=this._tokens[r];if(t(i,r))return i}return null}findLastIndex(e,t){let n=this._nodesToTokenIndexes.get(e);if(n)for(let e=n.length-1;e>=0;e--){let r=n[e],i=this._tokens[r];if(t(i,r))return r}return-1}findMatching(e,t,n=0){let r=this._nodesToTokenIndexes.get(e);if(r){typeof t==`number`&&(t=String.fromCharCode(t));let i=0,a=n;if(a>1){let r=this._nodesOccurrencesCountCache.get(e);r?.test===t&&r.count<a&&(i=r.i+1,n-=r.count+1)}for(;i<r.length;i++){let o=this._tokens[r[i]];if(this.matchesOriginal(o,t)){if(n===0)return a>0&&this._nodesOccurrencesCountCache.set(e,{test:t,count:a,i}),o;n--}}}return null}matchesOriginal(e,t){return e.end-e.start===t.length?e.value==null?this._source.startsWith(t,e.start):e.value===t:!1}startMatches(e,t){let n=this._nodesToTokenIndexes.get(e);if(!n)return!1;let r=this._tokens[n[0]];return r.start===e.start?this.matchesOriginal(r,t):!1}endMatches(e,t){let n=this._nodesToTokenIndexes.get(e);if(!n)return!1;let r=this._tokens[n[n.length-1]];return r.end===e.end?this.matchesOriginal(r,t):!1}_getTokensIndexesOfNode(e){if(e.start==null||e.end==null)return[];let{first:t,last:n}=this._findTokensOfNode(e,0,this._tokens.length-1),i=t,a=r(e);(e.type===`ExportNamedDeclaration`||e.type===`ExportDefaultDeclaration`)&&e.declaration?.type===`ClassDeclaration`&&a.next();let o=[];for(let e of a){if(e==null||e.start==null||e.end==null)continue;let t=this._findTokensOfNode(e,i,n),r=t.first;for(let e=i;e<r;e++)o.push(e);i=t.last+1}for(let e=i;e<=n;e++)o.push(e);return o}_findTokensOfNode(e,t,n){let r=this._tokensCache.get(e);if(r)return r;let i=this._findFirstTokenOfNode(e.start,t,n),a=this._findLastTokenOfNode(e.end,i,n);return this._tokensCache.set(e,{first:i,last:a}),{first:i,last:a}}_findFirstTokenOfNode(e,t,n){for(;t<=n;){let r=n+t>>1;if(e<this._tokens[r].start)n=r-1;else if(e>this._tokens[r].start)t=r+1;else return r}return t}_findLastTokenOfNode(e,t,n){for(;t<=n;){let r=n+t>>1;if(e<this._tokens[r].end)n=r-1;else if(e>this._tokens[r].end)t=r+1;else return r}return n}};function*r(e){if(e.type===`TemplateLiteral`){yield e.quasis[0];for(let t=1;t<e.quasis.length;t++)yield e.expressions[t-1],yield e.quasis[t];return}let t=n[e.type];for(let n of t){let t=e[n];t&&(Array.isArray(t)?yield*t:yield t)}}})),jb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=fb(),n=kb(),r=Ob(),i=Zy(),a=Ab(),o=xb();let{isExpression:s,isFunction:c,isStatement:l,isClassBody:u,isTSInterfaceBody:d,isTSEnumMember:f}=i,p=/e/i,m=/\.0+$/,h=/[\n\r\u2028\u2029]/,g=/[\n\r\u2028\u2029]|\*\//;function _(e){return e.type===`CommentLine`||h.test(e.value)}e.default=class{constructor(e,r,i=null,a=null){this.tokenContext=n.TokenContext.normal,this._tokens=null,this._originalCode=null,this._currentNode=null,this._currentTypeId=null,this._indent=0,this._indentRepeat=0,this._insideAux=!1,this._noLineTerminator=!1,this._noLineTerminatorAfterNode=null,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new Set,this._lastCommentLine=0,this._innerCommentsState=0,this._flags=0,this.tokenMap=null,this._boundGetRawIdentifier=null,this._printSemicolonBeforeNextNode=-1,this._printSemicolonBeforeNextToken=-1,this.format=e,this._tokens=i,this._originalCode=a,this._indentRepeat=e.indent.style.length,this._inputMap=r?._inputMap||null,this._buf=new t.default(r,e.indent.style[0]);let{preserveFormat:o,compact:s,concise:c,retainLines:l,retainFunctionParens:u}=e;o&&(this._flags|=1),s&&(this._flags|=2),c&&(this._flags|=4),l&&(this._flags|=8),u&&(this._flags|=16),(e.auxiliaryCommentBefore||e.auxiliaryCommentAfter)&&(this._flags|=32)}enterDelimited(){let e=this._noLineTerminatorAfterNode;return e!==null&&(this._noLineTerminatorAfterNode=null),e}generate(e){return this.format.preserveFormat&&(this.tokenMap=new a.TokenMap(e,this._tokens,this._originalCode),this._boundGetRawIdentifier=o._getRawIdentifier.bind(this)),this.print(e),this._maybeAddAuxComment(),this._buf.get()}indent(e=this._flags){e&7||(this._indent+=this._indentRepeat)}dedent(e=this._flags){e&7||(this._indent-=this._indentRepeat)}semicolon(e=!1){let t=this._flags;if(t&32&&this._maybeAddAuxComment(),t&1){let e=this._currentNode;if(e.start!=null&&e.end!=null){if(!this.tokenMap.endMatches(e,`;`)){this._printSemicolonBeforeNextNode=this._buf.getCurrentLine();return}let t=this.tokenMap.getIndexes(this._currentNode);this._catchUpTo(this._tokens[t[t.length-1]].loc.start)}}e?this._appendChar(59):this._queue(59),this._noLineTerminator=!1}rightBrace(e){this.format.minified&&this._buf.removeLastSemicolon(),this.sourceWithOffset(`end`,e.loc,-1),this.tokenChar(125)}rightParens(e){this.sourceWithOffset(`end`,e.loc,-1),this.tokenChar(41)}space(e=!1){if(!(this._flags&3))if(e)this._space();else{let e=this.getLastChar(!0);e!==0&&e!==32&&e!==10&&this._space()}}word(e,t=!1){this.tokenContext&=n.TokenContext.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(e);let r=this._flags;r&32&&this._maybeAddAuxComment(),r&1&&this._catchUpToCurrentToken(e);let i=this.getLastChar();(i===-2||i===-3||i===47&&e.charCodeAt(0)===47)&&this._space(),this._append(e,!1),this.setLastChar(-3),this._noLineTerminator=t}number(e,t){function n(e){if(e.length>2&&e.charCodeAt(0)===48){let t=e.charCodeAt(1);return t===98||t===111||t===120}return!1}this.word(e),Number.isInteger(t)&&!n(e)&&!p.test(e)&&!m.test(e)&&e.charCodeAt(e.length-1)!==46&&this.setLastChar(-2)}token(e,t=!1,r=0,i=!1){this.tokenContext&=n.TokenContext.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(e,r);let a=this._flags;if(a&32&&this._maybeAddAuxComment(),a&1&&this._catchUpToCurrentToken(e,r),i){let t=e.charCodeAt(0);((t===45&&e===`--`||t===61)&&this.getLastChar()===33||t===43&&this.getLastChar()===43||t===45&&this.getLastChar()===45||t===46&&this.getLastChar()===-2)&&this._space()}this._append(e,t),this._noLineTerminator=!1}tokenChar(e,t=0){this.tokenContext&=n.TokenContext.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(e,t);let r=this._flags;r&32&&this._maybeAddAuxComment(),r&1&&this._catchUpToCurrentToken(e,t),(e===43&&this.getLastChar()===43||e===45&&this.getLastChar()===45||e===46&&this.getLastChar()===-2)&&this._space(),this._appendChar(e),this._noLineTerminator=!1}newline(e=1,t=this._flags){if(!(e<=0)&&!(t&10)){if(t&4){this.space();return}e>2&&(e=2),e-=this._buf.getNewlineCount();for(let t=0;t<e;t++)this._newline()}}endsWith(e){return this.getLastChar(!0)===e}getLastChar(e){return this._buf.getLastChar(e)}setLastChar(e){this._buf._last=e}exactSource(e,t){if(!e){t();return}this._catchUp(`start`,e),this._buf.exactSource(e,t)}source(e,t){t&&(this._catchUp(e,t),this._buf.source(e,t))}sourceWithOffset(e,t,n){!t||this.format.preserveFormat||(this._catchUp(e,t),this._buf.sourceWithOffset(e,t,n))}sourceIdentifierName(e,t){if(!this._buf._canMarkIdName)return;let n=this._buf._sourcePosition;n.identifierNamePos=t,n.identifierName=e}_space(){this._queue(32)}_newline(){this._buf._queuedChar===32&&(this._buf._queuedChar=0),this._appendChar(10,!0)}_catchUpToCurrentToken(e,t=0){let n=this.tokenMap.findMatching(this._currentNode,e,t);n&&this._catchUpTo(n.loc.start),this._printSemicolonBeforeNextToken!==-1&&this._printSemicolonBeforeNextToken===this._buf.getCurrentLine()&&this._appendChar(59,!0),this._printSemicolonBeforeNextToken=-1,this._printSemicolonBeforeNextNode=-1}_append(e,t){this._maybeIndent(),this._buf.append(e,t)}_appendChar(e,t){t||this._maybeIndent(),this._buf.appendChar(e)}_queue(e){this._buf.queue(e),this.setLastChar(-1)}_maybeIndent(){let e=this._shouldIndent();e>0&&this._buf._appendChar(-1,e,!1)}_shouldIndent(){return this.endsWith(10)?this._indent:0}catchUp(e){if(!this.format.retainLines)return;let t=e-this._buf.getCurrentLine();for(let e=0;e<t;e++)this._newline()}_catchUp(e,t){let n=this._flags;if(!(n&1)){n&8&&t!=null&&t[e]&&this.catchUp(t[e].line);return}let r=t?.[e];r!=null&&this._catchUpTo(r)}_catchUpTo({line:e,column:t,index:n}){let r=e-this._buf.getCurrentLine();if(r>0&&this._noLineTerminator)return;for(let e=0;e<r;e++)this._newline();let i=r>0?t:t-this._buf.getCurrentColumn();if(i>0){let e=this._originalCode?this._originalCode.slice(n-i,n).replace(/[^\t\x0B\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]/gu,` `):` `.repeat(i);this._append(e,!1),this.setLastChar(32)}}printTerminatorless(e){this._noLineTerminator=!0,this.print(e)}print(e,t=!1,i=!1,a){var o,c;if(!e)return;this._innerCommentsState=0;let{type:l,loc:u,extra:d}=e,f=this._flags,p=!1;e._compact&&(this._flags|=4,p=!0);let m=r.generatorInfosMap.get(l);if(m===void 0)throw ReferenceError(`unknown node of type ${JSON.stringify(l)} with constructor ${JSON.stringify(e.constructor.name)}`);let[h,g,v]=m,y=this._currentNode,b=this._currentTypeId;this._currentNode=e,this._currentTypeId=g,f&1&&(this._printSemicolonBeforeNextToken=this._printSemicolonBeforeNextNode);let x;f&32&&(x=this._insideAux,this._insideAux=u==null,this._maybeAddAuxComment(this._insideAux&&!x));let S=0;i&&(S=this.tokenContext,S&n.TokenContext.forInOrInitHeadAccumulate?this.tokenContext=0:S=0);let C=d!=null&&d.parenthesized,w=C&&f&1||C&&f&16&&g===71||y&&((0,n.parentNeedsParens)(e,y,b)||v!=null&&v(e,y,b,this.tokenContext,f&1?this._boundGetRawIdentifier:void 0));if(!w&&C&&(o=e.leadingComments)!=null&&o.length&&e.leadingComments[0].type===`CommentBlock`)switch(b){case 65:case 243:case 6:case 143:break;case 17:case 130:case 112:if(y.callee!==e)break;default:w=!0}let T=!1;!w&&this._noLineTerminator&&((c=e.leadingComments)!=null&&c.some(_)||f&8&&u&&u.start.line>this._buf.getCurrentLine())&&(w=!0,T=!0);let E;if(!w&&(t||=!!y&&this._noLineTerminatorAfterNode===y&&(0,n.isLastChild)(y,e),t)){var D;(D=e.trailingComments)!=null&&D.some(_)?s(e)&&(w=!0):(E=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=e)}w&&(this.tokenChar(40),T&&this.indent(),this._innerCommentsState=0,i||(S=this.tokenContext),S&n.TokenContext.forInOrInitHeadAccumulate&&(this.tokenContext=0),E=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=null),this._printLeadingComments(e,y),this.exactSource(g===139||g===66?null:u,h.bind(this,e,y)),w?(this._printTrailingComments(e,y),T&&(this.dedent(),this.newline()),this.tokenChar(41),this._noLineTerminator=t):t&&!this._noLineTerminator?(this._noLineTerminator=!0,this._printTrailingComments(e,y)):this._printTrailingComments(e,y,a),S&&(this.tokenContext=S),this._currentNode=y,this._currentTypeId=b,p&&(this._flags=f),f&32&&(this._insideAux=x),E!=null&&(this._noLineTerminatorAfterNode=E),this._innerCommentsState=0}_maybeAddAuxComment(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!0;let e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:`CommentBlock`,value:e},0)}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!1;let e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:`CommentBlock`,value:e},0)}getPossibleRaw(e){let t=e.extra;if(t?.raw!=null&&t.rawValue!=null&&e.value===t.rawValue)return t.raw}printJoin(e,t,n,r,i,a,o){if(!(e!=null&&e.length))return;let s=this._flags;if(n==null&&s&8){let t=e[0].loc?.start.line;t!=null&&t!==this._buf.getCurrentLine()&&(n=!0)}n&&this.indent(s);let c=e.length;for(let n=0;n<c;n++){let l=e[n];if(l&&(t&&n===0&&this._buf.hasContent()&&this.newline(1,s),this.print(l,!1,a,o||0),r!=null&&(n<c-1?r.call(this,n,!1):i&&r.call(this,n,!0)),t))if(n+1===c)this.newline(1,s);else{let t=this._lastCommentLine;if(t>0){let r=(e[n+1].loc?.start.line||0)-t;if(r>=0){this.newline(r||1,s);continue}}this.newline(1,s)}}n&&this.dedent(s)}printAndIndentOnComments(e){let t=e.leadingComments&&e.leadingComments.length>0;t&&this.indent(),this.print(e),t&&this.dedent()}printBlock(e){e.type!==`EmptyStatement`&&this.space(),this.print(e)}_printTrailingComments(e,t,n){let{innerComments:r,trailingComments:i}=e;r!=null&&r.length&&this._printComments(2,r,e,t,n),i!=null&&i.length?this._printComments(2,i,e,t,n):this._lastCommentLine=0}_printLeadingComments(e,t){let n=e.leadingComments;n!=null&&n.length&&this._printComments(0,n,e,t)}_maybePrintInnerComments(e,t){let n=this._innerCommentsState;switch(n&3){case 0:this._innerCommentsState=5;return;case 1:this.printInnerComments((n&4)>0,this.tokenMap?.findMatching(this._currentNode,e,t))}}printInnerComments(e=!0,t){let n=this._currentNode,r=n.innerComments;if(!(r!=null&&r.length)){this._innerCommentsState=2;return}let i=this.endsWith(32);switch(e&&this.indent(),this._printComments(1,r,n,void 0,void 0,t)){case 2:this._innerCommentsState=2;case 1:i&&this.space()}e&&this.dedent()}noIndentInnerCommentsHere(){this._innerCommentsState&=-5}printSequence(e,t,n,r){this.printJoin(e,!0,t??!1,void 0,void 0,n,r)}printList(e,t,n,r,i,a){this.printJoin(e,n,r,i??v,t,a)}shouldPrintTrailingComma(e){if(!this.tokenMap)return null;let t=this.tokenMap.findLastIndex(this._currentNode,t=>this.tokenMap.matchesOriginal(t,typeof e==`number`?String.fromCharCode(e):e));return t<=0?null:this.tokenMap.matchesOriginal(this._tokens[t-1],`,`)}_shouldPrintComment(e,t){if(e.ignore||this._printedComments.has(e))return 0;if(this._noLineTerminator&&g.test(e.value))return 2;if(t&&this.tokenMap){let n=this.tokenMap.find(this._currentNode,t=>t.value===e.value);if(n&&n.start>t.start)return 2}return this._printedComments.add(e),this.format.shouldPrintComment(e.value)?1:0}_printComment(e,t){let n=this._noLineTerminator,r=e.type===`CommentBlock`,i=r&&t!==1&&!n;switch(i&&this._buf.hasContent()&&t!==2&&this.newline(1),this.getLastChar(!0)){case 47:this._space();case 91:case 123:case 40:break;default:this.space()}let a;if(r){if(a=`/*${e.value}*/`,this.format.indent.adjustMultilineComment){let t=e.loc?.start.column;if(t){let e=RegExp(`\\n\\s{1,`+t+`}`,`g`);a=a.replace(e,`
|
|
114
|
-
`)}if(this._flags&4)a=a.replace(/\n(?!$)/g,`
|
|
115
|
-
`);else{let e=this.format.retainLines?0:this._buf.getCurrentColumn();(this._shouldIndent()||this.format.retainLines)&&(e+=this._indent),a=a.replace(/\n(?!$)/g,`\n${` `.repeat(e)}`)}}}else a=n?`/*${e.value}*/`:`//${e.value}`;this.source(`start`,e.loc),this._append(a,r),!r&&!n&&this._newline(),i&&t!==3&&this.newline(1)}_printComments(e,t,n,r,i=0,a){let o=n.loc,s=t.length,p=!!o,m=p?o.start.line:0,g=p?o.end.line:0,_=0,v=0,{_noLineTerminator:y,_flags:b}=this;for(let o=0;o<s;o++){let x=t[o],S=this._shouldPrintComment(x,a);if(S===2)return o===0?0:1;if(p&&x.loc&&S===1){let t=x.loc.start.line,n=x.loc.end.line;if(e===0){let e=0;if(o===0?this._buf.hasContent()&&(x.type===`CommentLine`||t!==n)&&(e=v=1):e=t-_,_=n,e>0&&!y&&this.newline(e,b),this._printComment(x,1),o+1===s){let e=Math.max(m-_,v);e>0&&!y&&this.newline(e,b),_=m}}else if(e===1){let e=t-(o===0?m:_);if(_=n,e>0&&!y&&this.newline(e,b),this._printComment(x,1),o+1===s){let e=Math.min(1,g-_);e>0&&!y&&this.newline(e,b),_=g}}else{let e=t-(o===0?g-i:_);_=n,e>0&&!y&&this.newline(e,b),this._printComment(x,1)}}else{if(p=!1,S!==1)continue;if(s===1){let t=x.loc?x.loc.start.line===x.loc.end.line:!h.test(x.value),i=t&&!l(n)&&!u(r)&&!d(r)&&!f(n);e===0?this._printComment(x,i&&n.type!==`ObjectExpression`||t&&c(r)&&r.body===n?1:0):i&&e===2?this._printComment(x,1):this._printComment(x,0)}else e===1&&!(n.type===`ObjectExpression`&&n.properties.length>1)&&n.type!==`ClassBody`&&n.type!==`TSInterfaceBody`?this._printComment(x,o===0?2:o===s-1?3:0):this._printComment(x,0)}}return e===2&&p&&_&&(this._lastCommentLine=_),2}};function v(e,t){this.tokenChar(44,e),t||this.space()}})),Mb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.generate=i;var t=db(),n=jb();function r(e,t,n){if(t.experimental_preserveFormat){if(typeof e!=`string`)throw Error("`experimental_preserveFormat` requires the original `code` to be passed to @babel/generator as a string");if(!t.retainLines)throw Error("`experimental_preserveFormat` requires `retainLines` to be set to `true`");if(t.compact&&t.compact!==`auto`)throw Error("`experimental_preserveFormat` is not compatible with the `compact` option");if(t.minified)throw Error("`experimental_preserveFormat` is not compatible with the `minified` option");if(t.jsescOption)throw Error("`experimental_preserveFormat` is not compatible with the `jsescOption` option");if(!Array.isArray(n.tokens))throw Error("`experimental_preserveFormat` requires the AST to have attached the token of the input code. Make sure to enable the `tokens: true` parser option.")}let r={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,preserveFormat:t.experimental_preserveFormat,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:t.comments==null||t.comments,compact:t.compact,minified:t.minified,concise:t.concise,indent:{adjustMultilineComment:!0,style:` `},jsescOption:Object.assign({quotes:`double`,wrap:!0,minimal:!1},t.jsescOption),topicToken:t.topicToken};r.decoratorsBeforeExport=t.decoratorsBeforeExport,r.jsescOption.json=t.jsonCompatibleStrings,r.recordAndTupleSyntaxType=t.recordAndTupleSyntaxType??`hash`,r.importAttributesKeyword=t.importAttributesKeyword,r.minified?(r.compact=!0,r.shouldPrintComment=r.shouldPrintComment||(()=>r.comments)):r.shouldPrintComment=r.shouldPrintComment||(e=>r.comments||e.includes(`@license`)||e.includes(`@preserve`)),r.compact===`auto`&&(r.compact=typeof e==`string`&&e.length>5e5,r.compact&&console.error(`[BABEL] Note: The code generator has deoptimised the styling of ${t.filename} as it exceeds the max of 500KB.`)),(r.compact||r.preserveFormat)&&(r.indent.adjustMultilineComment=!1);let{auxiliaryCommentBefore:i,auxiliaryCommentAfter:a,shouldPrintComment:o}=r;return i&&!o(i)&&(r.auxiliaryCommentBefore=void 0),a&&!o(a)&&(r.auxiliaryCommentAfter=void 0),r}e.CodeGenerator=class{constructor(e,n={},i){this._ast=void 0,this._format=void 0,this._map=void 0,this._ast=e,this._format=r(i,n,e),this._map=n.sourceMaps?new t.default(n,i):null}generate(){return new n.default(this._format,this._map).generate(this._ast)}};function i(e,i={},a){let o=r(a,i,e),s=i.sourceMaps?new t.default(i,a):null;return new n.default(o,s,e.tokens,typeof a==`string`?a:null).generate(e)}e.default=i})),Nb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.find=r,e.findParent=n,e.getAncestry=c,e.getDeepestCommonAncestorFrom=s,e.getEarliestCommonAncestorFrom=o,e.getFunctionParent=i,e.getStatementParent=a,e.inType=d,e.isAncestor=l,e.isDescendant=u;let{VISITOR_KEYS:t}=Zy();function n(e){let t=this;for(;t=t.parentPath;)if(e(t))return t;return null}function r(e){let t=this;do if(e(t))return t;while(t=t.parentPath);return null}function i(){return this.findParent(e=>e.isFunction())}function a(){let e=this;do if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;else e=e.parentPath;while(e);if(e&&(e.isProgram()||e.isFile()))throw Error(`File/Program node, we can't possibly find a statement parent to this`);return e}function o(e){return this.getDeepestCommonAncestorFrom(e,function(e,n,r){let i,a=t[e.type];for(let e of r){let t=e[n+1];if(!i){i=t;continue}if(t.listKey&&i.listKey===t.listKey&&t.key<i.key){i=t;continue}a.indexOf(i.parentKey)>a.indexOf(t.parentKey)&&(i=t)}return i})}function s(e,t){if(!e.length)return this;if(e.length===1)return e[0];let n=1/0,r,i,a=e.map(e=>{let t=[];do t.unshift(e);while((e=e.parentPath)&&e!==this);return t.length<n&&(n=t.length),t}),o=a[0];depthLoop:for(let e=0;e<n;e++){let t=o[e];for(let n of a)if(n[e]!==t)break depthLoop;r=e,i=t}if(i)return t?t(i,r,a):i;throw Error(`Couldn't find intersection`)}function c(){let e=this,t=[];do t.push(e);while(e=e.parentPath);return t}function l(e){return e.isDescendant(this)}function u(e){return!!this.findParent(t=>t===e)}function d(...e){let t=this;for(;t;){if(e.includes(t.node.type))return!0;t=t.parentPath}return!1}})),Pb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createUnionType=o;let{createFlowUnionType:t,createTSUnionType:n,createUnionTypeAnnotation:r,isFlowType:i,isTSType:a}=Zy();function o(e){if(e.every(e=>i(e)))return t?t(e):r(e);if(e.every(e=>a(e))&&n)return n(e)}})),Fb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=s;var t=Zy(),n=Pb();let{BOOLEAN_NUMBER_BINARY_OPERATORS:r,createTypeAnnotationBasedOnTypeof:i,numberTypeAnnotation:a,voidTypeAnnotation:o}=t;function s(e){if(!this.isReferenced())return;let t=this.scope.getBinding(e.name);if(t)return t.identifier.typeAnnotation?t.identifier.typeAnnotation:c(t,this,e.name);if(e.name===`undefined`)return o();if(e.name===`NaN`||e.name===`Infinity`)return a();e.name}function c(e,t,r){let i=[],a=[],o=l(e,t,a),s=f(e,t,r);if(s){let t=l(e,s.ifStatement);o=o.filter(e=>!t.includes(e)),i.push(s.typeAnnotation)}if(o.length){o.push(...a);for(let e of o)i.push(e.getTypeAnnotation())}if(i.length)return(0,n.createUnionType)(i)}function l(e,t,n){let r=e.constantViolations.slice();return r.unshift(e.path),r.filter(e=>{e=e.resolve();let r=e._guessExecutionStatusRelativeTo(t);return n&&r===`unknown`&&n.push(e),r===`before`})}function u(e,t){let n=t.node.operator,o=t.get(`right`).resolve(),s=t.get(`left`).resolve(),c;if(s.isIdentifier({name:e})?c=o:o.isIdentifier({name:e})&&(c=s),c)return n===`===`?c.getTypeAnnotation():r.includes(n)?a():void 0;if(n!==`===`&&n!==`==`)return;let l,u;if(s.isUnaryExpression({operator:`typeof`})?(l=s,u=o):o.isUnaryExpression({operator:`typeof`})&&(l=o,u=s),!l||!l.get(`argument`).isIdentifier({name:e})||(u=u.resolve(),!u.isLiteral()))return;let d=u.node.value;if(typeof d==`string`)return i(d)}function d(e,t,n){let r;for(;r=t.parentPath;){if(r.isIfStatement()||r.isConditionalExpression())return t.key===`test`?void 0:r;if(r.isFunction()&&(n==null||r.parentPath.scope.getBinding(n)!==e))return;t=r}}function f(e,t,r){let i=d(e,t,r);if(!i)return;let a=[i.get(`test`)],o=[];for(let e=0;e<a.length;e++){let t=a[e];if(t.isLogicalExpression())t.node.operator===`&&`&&(a.push(t.get(`left`)),a.push(t.get(`right`)));else if(t.isBinaryExpression()){let e=u(r,t);e&&o.push(e)}}return o.length?{typeAnnotation:(0,n.createUnionType)(o),ifStatement:i}:f(e,i,r)}})),Ib=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ArrayExpression=R,e.AssignmentExpression=ne,e.BinaryExpression=k,e.BooleanLiteral=P,e.CallExpression=le,e.ConditionalExpression=ee,e.ClassDeclaration=e.ClassExpression=e.FunctionDeclaration=e.ArrowFunctionExpression=e.FunctionExpression=ie,Object.defineProperty(e,`Identifier`,{enumerable:!0,get:function(){return n.default}}),e.LogicalExpression=A,e.NewExpression=E,e.NullLiteral=F,e.NumericLiteral=re,e.ObjectExpression=L,e.ParenthesizedExpression=te,e.RegExpLiteral=I,e.RestElement=z,e.SequenceExpression=j,e.StringLiteral=N,e.TSAsExpression=w,e.TSNonNullExpression=T,e.TaggedTemplateExpression=ue,e.TemplateLiteral=D,e.TypeCastExpression=C,e.UnaryExpression=O,e.UpdateExpression=M,e.VariableDeclarator=S;var t=Zy(),n=Fb(),r=Pb();let{BOOLEAN_BINARY_OPERATORS:i,BOOLEAN_UNARY_OPERATORS:a,NUMBER_BINARY_OPERATORS:o,NUMBER_UNARY_OPERATORS:s,STRING_UNARY_OPERATORS:c,anyTypeAnnotation:l,arrayTypeAnnotation:u,booleanTypeAnnotation:d,buildMatchMemberExpression:f,genericTypeAnnotation:p,identifier:m,nullLiteralTypeAnnotation:h,numberTypeAnnotation:g,stringTypeAnnotation:_,tupleTypeAnnotation:v,unionTypeAnnotation:y,voidTypeAnnotation:b,isIdentifier:x}=t;function S(){if(this.get(`id`).isIdentifier())return this.get(`init`).getTypeAnnotation()}function C(e){return e.typeAnnotation}C.validParent=!0;function w(e){return e.typeAnnotation}w.validParent=!0;function T(){return this.get(`expression`).getTypeAnnotation()}function E(e){if(e.callee.type===`Identifier`)return p(e.callee)}function D(){return _()}function O(e){let t=e.operator;if(t===`void`)return b();if(s.includes(t))return g();if(c.includes(t))return _();if(a.includes(t))return d()}function k(e){let t=e.operator;if(o.includes(t))return g();if(i.includes(t))return d();if(t===`+`){let e=this.get(`right`),t=this.get(`left`);return t.isBaseType(`number`)&&e.isBaseType(`number`)?g():t.isBaseType(`string`)||e.isBaseType(`string`)?_():y([_(),g()])}}function A(){let e=[this.get(`left`).getTypeAnnotation(),this.get(`right`).getTypeAnnotation()];return(0,r.createUnionType)(e)}function ee(){let e=[this.get(`consequent`).getTypeAnnotation(),this.get(`alternate`).getTypeAnnotation()];return(0,r.createUnionType)(e)}function j(){return this.get(`expressions`).pop().getTypeAnnotation()}function te(){return this.get(`expression`).getTypeAnnotation()}function ne(){return this.get(`right`).getTypeAnnotation()}function M(e){let t=e.operator;if(t===`++`||t===`--`)return g()}function N(){return _()}function re(){return g()}function P(){return d()}function F(){return h()}function I(){return p(m(`RegExp`))}function L(){return p(m(`Object`))}function R(){return p(m(`Array`))}function z(){return R()}z.validParent=!0;function ie(){return p(m(`Function`))}let ae=f(`Array.from`),oe=f(`Object.keys`),se=f(`Object.values`),ce=f(`Object.entries`);function le(){let{callee:e}=this.node;return oe(e)?u(_()):ae(e)||se(e)||x(e,{name:`Array`})?u(l()):ce(e)?u(v([_(),l()])):B(this.get(`callee`))}function ue(){return B(this.get(`tag`))}function B(e){if(e=e.resolve(),e.isFunction()){let{node:t}=e;if(t.async)return t.generator?p(m(`AsyncIterator`)):p(m(`Promise`));if(t.generator)return p(m(`Iterator`));if(e.node.returnType)return e.node.returnType}}})),Lb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e._getTypeAnnotation=w,e.baseTypeStrictlyMatches=O,e.couldBeBaseType=D,e.getTypeAnnotation=S,e.isBaseType=T,e.isGenericType=k;var t=Ib();let{anyTypeAnnotation:n,isAnyTypeAnnotation:r,isArrayTypeAnnotation:i,isBooleanTypeAnnotation:a,isEmptyTypeAnnotation:o,isFlowBaseAnnotation:s,isGenericTypeAnnotation:c,isIdentifier:l,isMixedTypeAnnotation:u,isNumberTypeAnnotation:d,isStringTypeAnnotation:f,isTSArrayType:p,isTSTypeAnnotation:m,isTSTypeReference:h,isTupleTypeAnnotation:g,isTypeAnnotation:_,isUnionTypeAnnotation:v,isVoidTypeAnnotation:y,stringTypeAnnotation:b,voidTypeAnnotation:x}=Zy();function S(){let e=this.getData(`typeAnnotation`);return e??(e=w.call(this)||n(),(_(e)||m(e))&&(e=e.typeAnnotation),this.setData(`typeAnnotation`,e),e)}let C=new WeakSet;function w(){let e=this.node;if(!e)if(this.key===`init`&&this.parentPath.isVariableDeclarator()){let e=this.parentPath.parentPath,t=e.parentPath;return e.key===`left`&&t.isForInStatement()?b():e.key===`left`&&t.isForOfStatement()?n():x()}else return;if(e.typeAnnotation)return e.typeAnnotation;if(!C.has(e)){C.add(e);try{var r;let n=t[e.type];if(n)return n.call(this,e);if(n=t[this.parentPath.type],(r=n)!=null&&r.validParent)return this.parentPath.getTypeAnnotation()}finally{C.delete(e)}}}function T(e,t){return E(e,this.getTypeAnnotation(),t)}function E(e,t,n){if(e===`string`)return f(t);if(e===`number`)return d(t);if(e===`boolean`)return a(t);if(e===`any`)return r(t);if(e===`mixed`)return u(t);if(e===`empty`)return o(t);if(e===`void`)return y(t);if(n)return!1;throw Error(`Unknown base type ${e}`)}function D(e){let t=this.getTypeAnnotation();if(r(t))return!0;if(v(t)){for(let n of t.types)if(r(n)||E(e,n,!0))return!0;return!1}else return E(e,t,!0)}function O(e){let t=this.getTypeAnnotation(),n=e.getTypeAnnotation();return!r(t)&&s(t)?n.type===t.type:!1}function k(e){let t=this.getTypeAnnotation();return e===`Array`&&(p(t)||i(t)||g(t))?!0:c(t)&&l(t.id,{name:e})||h(t)&&l(t.typeName,{name:e})}})),Rb=V(((e,t)=>{let n=process||{},r=n.argv||[],i=n.env||{},a=!(i.NO_COLOR||r.includes(`--no-color`))&&(!!i.FORCE_COLOR||r.includes(`--color`)||n.platform===`win32`||(n.stdout||{}).isTTY&&i.TERM!==`dumb`||!!i.CI),o=(e,t,n=e)=>r=>{let i=``+r,a=i.indexOf(t,e.length);return~a?e+s(i,t,n,a)+t:e+i+t},s=(e,t,n,r)=>{let i=``,a=0;do i+=e.substring(a,r)+n,a=r+t.length,r=e.indexOf(t,a);while(~r);return i+e.substring(a)},c=(e=a)=>{let t=e?o:()=>String;return{isColorSupported:e,reset:t(`\x1B[0m`,`\x1B[0m`),bold:t(`\x1B[1m`,`\x1B[22m`,`\x1B[22m\x1B[1m`),dim:t(`\x1B[2m`,`\x1B[22m`,`\x1B[22m\x1B[2m`),italic:t(`\x1B[3m`,`\x1B[23m`),underline:t(`\x1B[4m`,`\x1B[24m`),inverse:t(`\x1B[7m`,`\x1B[27m`),hidden:t(`\x1B[8m`,`\x1B[28m`),strikethrough:t(`\x1B[9m`,`\x1B[29m`),black:t(`\x1B[30m`,`\x1B[39m`),red:t(`\x1B[31m`,`\x1B[39m`),green:t(`\x1B[32m`,`\x1B[39m`),yellow:t(`\x1B[33m`,`\x1B[39m`),blue:t(`\x1B[34m`,`\x1B[39m`),magenta:t(`\x1B[35m`,`\x1B[39m`),cyan:t(`\x1B[36m`,`\x1B[39m`),white:t(`\x1B[37m`,`\x1B[39m`),gray:t(`\x1B[90m`,`\x1B[39m`),bgBlack:t(`\x1B[40m`,`\x1B[49m`),bgRed:t(`\x1B[41m`,`\x1B[49m`),bgGreen:t(`\x1B[42m`,`\x1B[49m`),bgYellow:t(`\x1B[43m`,`\x1B[49m`),bgBlue:t(`\x1B[44m`,`\x1B[49m`),bgMagenta:t(`\x1B[45m`,`\x1B[49m`),bgCyan:t(`\x1B[46m`,`\x1B[49m`),bgWhite:t(`\x1B[47m`,`\x1B[49m`),blackBright:t(`\x1B[90m`,`\x1B[39m`),redBright:t(`\x1B[91m`,`\x1B[39m`),greenBright:t(`\x1B[92m`,`\x1B[39m`),yellowBright:t(`\x1B[93m`,`\x1B[39m`),blueBright:t(`\x1B[94m`,`\x1B[39m`),magentaBright:t(`\x1B[95m`,`\x1B[39m`),cyanBright:t(`\x1B[96m`,`\x1B[39m`),whiteBright:t(`\x1B[97m`,`\x1B[39m`),bgBlackBright:t(`\x1B[100m`,`\x1B[49m`),bgRedBright:t(`\x1B[101m`,`\x1B[49m`),bgGreenBright:t(`\x1B[102m`,`\x1B[49m`),bgYellowBright:t(`\x1B[103m`,`\x1B[49m`),bgBlueBright:t(`\x1B[104m`,`\x1B[49m`),bgMagentaBright:t(`\x1B[105m`,`\x1B[49m`),bgCyanBright:t(`\x1B[106m`,`\x1B[49m`),bgWhiteBright:t(`\x1B[107m`,`\x1B[49m`)}};t.exports=c(),t.exports.createColors=c})),zb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,e.matchToToken=function(e){var t={type:`invalid`,value:e[0],closed:void 0};return e[1]?(t.type=`string`,t.closed=!!(e[3]||e[4])):e[5]?t.type=`comment`:e[6]?(t.type=`comment`,t.closed=!!e[7]):e[8]?t.type=`regex`:e[9]?t.type=`number`:e[10]?t.type=`name`:e[11]?t.type=`punctuator`:e[12]&&(t.type=`whitespace`),t}})),Bb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Rb(),n=zb(),r=Av();function i(){return typeof process==`object`&&(process.env.FORCE_COLOR===`0`||process.env.FORCE_COLOR===`false`)?!1:t.isColorSupported}let a=(e,t)=>n=>e(t(n));function o(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:a(a(e.white,e.bgRed),e.bold),gutter:e.gray,marker:a(e.red,e.bold),message:a(e.red,e.bold),reset:e.reset}}let s=o(t.createColors(!0)),c=o(t.createColors(!1));function l(e){return e?s:c}let u=new Set([`as`,`async`,`from`,`get`,`of`,`set`]),d=/\r\n|[\n\r\u2028\u2029]/,f=/^[()[\]{}]$/,p,m=/^[a-z][\w-]*$/i,h=function(e,t,n){if(e.type===`name`){let i=e.value;if(r.isKeyword(i)||r.isStrictReservedWord(i,!0)||u.has(i))return`keyword`;if(m.test(i)&&(n[t-1]===`<`||n.slice(t-2,t)===`</`))return`jsxIdentifier`;let a=String.fromCodePoint(i.codePointAt(0));if(a!==a.toLowerCase())return`capitalized`}return e.type===`punctuator`&&f.test(e.value)?`bracket`:e.type===`invalid`&&(e.value===`@`||e.value===`#`)?`punctuator`:e.type};p=function*(e){let t;for(;t=n.default.exec(e);){let r=n.matchToToken(t);yield{type:h(r,t.index,e),value:r.value}}};function g(e){if(e===``)return``;let t=l(!0),n=``;for(let{type:r,value:i}of p(e))r in t?n+=i.split(d).map(e=>t[r](e)).join(`
|
|
116
|
-
`):n+=i;return n}let _=!1,v=/\r\n|[\n\r\u2028\u2029]/;function y(e,t,n,r){let i=Object.assign({column:0,line:-1},e.start),a=Object.assign({},i,e.end),{linesAbove:o=2,linesBelow:s=3}=n||{},c=i.line-r,l=i.column,u=a.line-r,d=a.column,f=Math.max(c-(o+1),0),p=Math.min(t.length,u+s);c===-1&&(f=0),u===-1&&(p=t.length);let m=u-c,h={};if(m)for(let e=0;e<=m;e++){let n=e+c;l?e===0?h[n]=[l,t[n-1].length-l+1]:e===m?h[n]=[0,d]:h[n]=[0,t[n-e].length]:h[n]=!0}else l===d?l?h[c]=[l,0]:h[c]=!0:h[c]=[l,d-l];return{start:f,end:p,markerLines:h}}function b(e,t,n={}){let r=n.forceColor||i()&&n.highlightCode,a=(n.startLine||1)-1,o=l(r),{start:s,end:c,markerLines:u}=y(t,e.split(v),n,a),d=t.start&&typeof t.start.column==`number`,f=String(c+a).length,p=(r?g(e):e).split(v,c).slice(s,c).map((e,t)=>{let r=s+1+t,i=` ${` ${r+a}`.slice(-f)} |`,c=u[r],l=!u[r+1];if(c){let t=``;if(Array.isArray(c)){let r=e.slice(0,Math.max(c[0]-1,0)).replace(/[^\t]/g,` `),a=c[1]||1;t=[`
|
|
117
|
-
`,o.gutter(i.replace(/\d/g,` `)),` `,r,o.marker(`^`).repeat(a)].join(``),l&&n.message&&(t+=` `+o.message(n.message))}return[o.marker(`>`),o.gutter(i),e.length>0?` ${e}`:``,t].join(``)}else return` ${o.gutter(i)}${e.length>0?` ${e}`:``}`}).join(`
|
|
118
|
-
`);return n.message&&!d&&(p=`${` `.repeat(f+1)}${n.message}\n${p}`),r?o.reset(p):p}function x(e,t,n,r={}){if(!_){_=!0;let e="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(e,`DeprecationWarning`);else{let t=Error(e);t.name=`DeprecationWarning`,console.warn(Error(e))}}return n=Math.max(n,0),b(e,{start:{column:n,line:t}},r)}e.codeFrameColumns=b,e.default=x,e.highlight=g})),Vb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hooks=void 0,e.hooks=[function(e,t){if(e.key===`test`&&(t.isWhile()||t.isSwitchCase())||e.key===`declaration`&&t.isExportDeclaration()||e.key===`body`&&t.isLabeledStatement()||e.listKey===`declarations`&&t.isVariableDeclaration()&&t.node.declarations.length===1||e.key===`expression`&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&t.node.expressions.length===1)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return e.key===`left`?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&e.key===`consequent`||e.key===`body`&&(t.isLoop()||t.isArrowFunctionExpression()))return e.replaceWith({type:`BlockStatement`,directives:[],body:[]}),!0}]})),Hb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e._assertUnremoved=p,e._callRemovalHooks=u,e._markRemoved=f,e._remove=d,e._removeFromScope=l,e.remove=c;var t=Vb(),n=rb(),r=Gb(),i=ax(),a=Zy(),o=Wb(),s=lx();function c(){var e;if(p.call(this),s.resync.call(this),u.call(this)){f.call(this);return}(e=this.opts)!=null&&e.noScope||l.call(this),this.shareCommentsWithSiblings(),d.call(this),f.call(this)}function l(){let e=a.getBindingIdentifiers(this.node,!1,!1,!0);Object.keys(e).forEach(e=>this.scope.removeBinding(e))}function u(){if(this.parentPath){for(let e of t.hooks)if(e(this,this.parentPath))return!0}}function d(){Array.isArray(this.container)?(this.container.splice(this.key,1),o.updateSiblingKeys.call(this,this.key,-1)):r._replaceWith.call(this,null)}function f(){if(this._traverseFlags|=i.SHOULD_SKIP|i.REMOVED,this.parent){var e;(e=(0,n.getCachedPaths)(this))==null||e.delete(this.node)}this.node=null}function p(){if(this.removed)throw this.buildCodeFrameError(`NodePath has been removed so is read-only.`)}})),Ub=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=Zy(),n=t;let{react:r}=t,{cloneNode:i,jsxExpressionContainer:a,variableDeclaration:o,variableDeclarator:s}=n,c={ReferencedIdentifier(e,t){if(e.isJSXIdentifier()&&r.isCompatTag(e.node.name)&&!e.parentPath.isJSXMemberExpression())return;if(e.node.name===`this`){let n=e.scope;do if(n.path.isFunction()&&!n.path.isArrowFunctionExpression())break;while(n=n.parent);n&&t.breakOnScopePaths.push(n.path)}let n=e.scope.getBinding(e.node.name);if(n){for(let r of n.constantViolations)if(r.scope!==n.path.scope){t.mutableBinding=!0,e.stop();return}n===t.scope.getBinding(e.node.name)&&(t.bindings[e.node.name]=n)}}};e.default=class{constructor(e,t){this.breakOnScopePaths=void 0,this.bindings=void 0,this.mutableBinding=void 0,this.scopes=void 0,this.scope=void 0,this.path=void 0,this.attachAfter=void 0,this.breakOnScopePaths=[],this.bindings={},this.mutableBinding=!1,this.scopes=[],this.scope=t,this.path=e,this.attachAfter=!1}isCompatibleScope(e){for(let t of Object.keys(this.bindings)){let n=this.bindings[t];if(!e.bindingIdentifierEquals(t,n.identifier))return!1}return!0}getCompatibleScopes(){let e=this.path.scope;do{if(this.isCompatibleScope(e))this.scopes.push(e);else break;if(this.breakOnScopePaths.includes(e.path))break}while(e=e.parent)}getAttachmentPath(){let e=this._getAttachmentPath();if(!e)return;let t=e.scope;if(t.path===e&&(t=e.scope.parent),t.path.isProgram()||t.path.isFunction())for(let n of Object.keys(this.bindings)){if(!t.hasOwnBinding(n))continue;let r=this.bindings[n];if(!(r.kind===`param`||r.path.parentKey===`params`)&&this.getAttachmentParentForPath(r.path).key>=e.key){this.attachAfter=!0,e=r.path;for(let t of r.constantViolations)this.getAttachmentParentForPath(t).key>e.key&&(e=t)}}return e}_getAttachmentPath(){let e=this.scopes.pop();if(e){if(e.path.isFunction())if(this.hasOwnParamBindings(e)){if(this.scope===e)return;let t=e.path.get(`body`).get(`body`);for(let e=0;e<t.length;e++)if(!t[e].node._blockHoist)return t[e]}else return this.getNextScopeAttachmentParent();else if(e.path.isProgram())return this.getNextScopeAttachmentParent()}}getNextScopeAttachmentParent(){let e=this.scopes.pop();if(e)return this.getAttachmentParentForPath(e.path)}getAttachmentParentForPath(e){do if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())return e;while(e=e.parentPath);return e}hasOwnParamBindings(e){for(let t of Object.keys(this.bindings)){if(!e.hasOwnBinding(t))continue;let n=this.bindings[t];if(n.kind===`param`&&n.constant)return!0}return!1}run(){if(this.path.traverse(c,this),this.mutableBinding)return;this.getCompatibleScopes();let e=this.getAttachmentPath();if(!e||e.getFunctionParent()===this.path.getFunctionParent())return;let t=e.scope.generateUidIdentifier(`ref`),n=s(t,this.path.node),[r]=e[this.attachAfter?`insertAfter`:`insertBefore`]([e.isVariableDeclarator()?n:o(`var`,[n])]),l=this.path.parentPath;return l.isJSXElement()&&this.path.container===l.node.children&&(t=a(t)),this.path.replaceWith(i(t)),r.isVariableDeclarator()?r.get(`init`):r.get(`declarations.0.init`)}}})),Wb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e._containerInsert=C,e._containerInsertAfter=T,e._containerInsertBefore=w,e._verifyNodeList=ee,e.insertAfter=k,e.insertBefore=S,e.pushContainer=te,e.unshiftContainer=j,e.updateSiblingKeys=A;var t=rb(),n=ax(),r=lx(),i=Hb(),a=Zy(),o=Ub();let{arrowFunctionExpression:s,assertExpression:c,assignmentExpression:l,blockStatement:u,callExpression:d,cloneNode:f,expressionStatement:p,isAssignmentExpression:m,isCallExpression:h,isExportNamedDeclaration:g,isExpression:_,isIdentifier:v,isSequenceExpression:y,isSuper:b,thisExpression:x}=a;function S(e){i._assertUnremoved.call(this);let t=ee.call(this,e),{parentPath:n,parent:r}=this;if(n.isExpressionStatement()||n.isLabeledStatement()||g(r)||n.isExportDefaultDeclaration()&&this.isDeclaration())return n.insertBefore(t);if(this.isNodeType(`Expression`)&&!this.isJSXElement()||n.isForStatement()&&this.key===`init`)return this.node&&t.push(this.node),this.replaceExpressionWithStatements(t);if(Array.isArray(this.container))return w.call(this,t);if(this.isStatementOrBlock()){let e=this.node,n=e&&(!this.isExpressionStatement()||e.expression!=null),[r]=this.replaceWith(u(n?[e]:[]));return r.unshiftContainer(`body`,t)}else throw Error(`We don't know what to do with this node type. We were previously a Statement but we can't fit in here?`)}function C(e,t){A.call(this,e,t.length);let n=[];this.container.splice(e,0,...t);for(let a=0;a<t.length;a++){var i;let t=e+a,o=this.getSibling(t);n.push(o),(i=this.context)!=null&&i.queue&&r.pushContext.call(o,this.context)}let a=r._getQueueContexts.call(this);for(let e of n){r.setScope.call(e),e.debug(`Inserted.`);for(let t of a)t.maybeQueue(e,!0)}return n}function w(e){return C.call(this,this.key,e)}function T(e){return C.call(this,this.key+1,e)}let E=e=>e[e.length-1];function D(e){return y(e.parent)&&(E(e.parent.expressions)!==e.node||D(e.parentPath))}function O(e,t){if(!m(e)||!v(e.left))return!1;let n=t.getBlockParent();return n.hasOwnBinding(e.left.name)&&n.getOwnBinding(e.left.name).constantViolations.length<=1}function k(e){if(i._assertUnremoved.call(this),this.isSequenceExpression())return E(this.get(`expressions`)).insertAfter(e);let t=ee.call(this,e),{parentPath:n,parent:r}=this;if(n.isExpressionStatement()||n.isLabeledStatement()||g(r)||n.isExportDefaultDeclaration()&&this.isDeclaration())return n.insertAfter(t.map(e=>_(e)?p(e):e));if(this.isNodeType(`Expression`)&&!this.isJSXElement()&&!n.isJSXElement()||n.isForStatement()&&this.key===`init`){let e=this;if(e.node){let r=e.node,{scope:i}=this;if(i.path.isPattern())return c(r),e.replaceWith(d(s([],r),[])),e.get(`callee.body`).insertAfter(t),[e];if(D(e))t.unshift(r);else if(h(r)&&b(r.callee))t.unshift(r),t.push(x());else if(O(r,i))t.unshift(r),t.push(f(r.left));else if(i.isPure(r,!0))t.push(r);else{n.isMethod({computed:!0,key:r})&&(i=i.parent);let e=i.generateDeclaredUidIdentifier();t.unshift(p(l(`=`,f(e),r))),t.push(p(f(e)))}}return this.replaceExpressionWithStatements(t)}else if(Array.isArray(this.container))return T.call(this,t);else if(this.isStatementOrBlock()){let e=this.node,n=e&&(!this.isExpressionStatement()||e.expression!=null),[r]=this.replaceWith(u(n?[e]:[]));return r.pushContainer(`body`,t)}else throw Error(`We don't know what to do with this node type. We were previously a Statement but we can't fit in here?`)}function A(e,n){if(!this.parent)return;let r=(0,t.getCachedPaths)(this);if(r)for(let[,t]of r)typeof t.key==`number`&&t.container===this.container&&t.key>=e&&(t.key+=n)}function ee(e){if(!e)return[];Array.isArray(e)||(e=[e]);for(let t=0;t<e.length;t++){let r=e[t],i;if(r?typeof r==`object`?r.type?r instanceof n.default&&(i=`has a NodePath when it expected a raw object`):i=`without a type`:i=`contains a non-object node`:i=`has falsy node`,i){let e=Array.isArray(r)?`array`:typeof r;throw Error(`Node list ${i} with the index of ${t} and type of ${e}`)}}return e}function j(e,t){i._assertUnremoved.call(this);let r=ee.call(this,t),a=this.node[e],o=n.default.get({parentPath:this,parent:this.node,container:a,listKey:e,key:0}).setContext(this.context);return w.call(o,r)}function te(e,t){i._assertUnremoved.call(this);let r=ee.call(this,t),a=this.node[e];return n.default.get({parentPath:this,parent:this.node,container:a,listKey:e,key:a.length}).setContext(this.context).replaceWithMultiple(r)}e.hoist=function(e=this.scope){return new o.default(this,e).run()}})),Gb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e._replaceWith=I,e.replaceExpressionWithStatements=L,e.replaceInline=z,e.replaceWith=F,e.replaceWithMultiple=re,e.replaceWithSourceString=P;var t=Bb(),n=ux(),r=ax(),i=rb(),a=Wb(),o=lv(),s=Zy(),c=lx();let{FUNCTION_TYPES:l,arrowFunctionExpression:u,assignmentExpression:d,awaitExpression:f,blockStatement:p,buildUndefinedNode:m,callExpression:h,cloneNode:g,conditionalExpression:_,expressionStatement:v,getBindingIdentifiers:y,identifier:b,inheritLeadingComments:x,inheritTrailingComments:S,inheritsComments:C,isBlockStatement:w,isEmptyStatement:T,isExpression:E,isExpressionStatement:D,isIfStatement:O,isProgram:k,isStatement:A,isVariableDeclaration:ee,removeComments:j,returnStatement:te,sequenceExpression:ne,validate:M,yieldExpression:N}=s;function re(e){var t;c.resync.call(this);let n=a._verifyNodeList.call(this,e);x(n[0],this.node),S(n[n.length-1],this.node),(t=(0,i.getCachedPaths)(this))==null||t.delete(this.node),this.node=this.container[this.key]=null;let r=this.insertAfter(e);return this.node?this.requeue():this.remove(),r}function P(e){c.resync.call(this);let r;try{e=`(${e})`,r=(0,o.parse)(e)}catch(n){let r=n.loc;throw r&&(n.message+=` - make sure this is an expression.
|
|
119
|
-
`+(0,t.codeFrameColumns)(e,{start:{line:r.line,column:r.column+1}}),n.code=`BABEL_REPLACE_SOURCE_ERROR`),n}let i=r.program.body[0].expression;return n.default.removeProperties(i),this.replaceWith(i)}function F(e){if(c.resync.call(this),this.removed)throw Error(`You can't replace this node, we've already removed it`);let t=e instanceof r.default?e.node:e;if(!t)throw Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node===t)return[this];if(this.isProgram()&&!k(t))throw Error(`You can only replace a Program root node with another Program node`);if(Array.isArray(t))throw Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if(typeof t==`string`)throw Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");let n=``;if(this.isNodeType(`Statement`)&&E(t)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(t)&&!this.parentPath.isExportDefaultDeclaration()&&(t=v(t),n=`expression`),this.isNodeType(`Expression`)&&A(t)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(t))return this.replaceExpressionWithStatements([t]);let i=this.node;return i&&(C(t,i),j(i)),I.call(this,t),this.type=t.type,c.setScope.call(this),this.requeue(),[n?this.get(n):this]}function I(e){var t;if(!this.container)throw ReferenceError(`Container is falsy`);this.inList?M(this.parent,this.key,[e]):M(this.parent,this.key,e),this.debug(`Replace with ${e?.type}`),(t=(0,i.getCachedPaths)(this))==null||t.set(e,this).delete(this.node),this.node=e,this.container[this.key]=e}function L(e){c.resync.call(this);let t=[],r=R(e,t);if(r){for(let e of t)this.scope.push({id:e});return this.replaceWith(r)[0].get(`expressions`)}let i=this.getFunctionParent(),a=i?.node.async,o=i?.node.generator,s=u([],p(e));this.replaceWith(h(s,[]));let m=this.get(`callee`);m.get(`body`).scope.hoistVariables(e=>this.scope.push({id:e}));let _=m.getCompletionRecords();for(let e of _){if(!e.isExpressionStatement())continue;let t=e.findParent(e=>e.isLoop());if(t){let n=t.getData(`expressionReplacementReturnUid`);n?n=b(n.name):(n=m.scope.generateDeclaredUidIdentifier(`ret`),m.get(`body`).pushContainer(`body`,te(g(n))),t.setData(`expressionReplacementReturnUid`,n)),e.get(`expression`).replaceWith(d(`=`,g(n),e.node.expression))}else e.replaceWith(te(e.node.expression))}m.arrowFunctionToExpression();let v=m,y=a&&n.default.hasType(v.node.body,`AwaitExpression`,l),x=o&&n.default.hasType(v.node.body,`YieldExpression`,l);return y&&(v.set(`async`,!0),x||this.replaceWith(f(this.node))),x&&(v.set(`generator`,!0),this.replaceWith(N(this.node,!0))),v.get(`body.body`)}function R(e,t){let n=[],r=!0;for(let i of e)if(T(i)||(r=!1),E(i))n.push(i);else if(D(i))n.push(i.expression);else if(ee(i)){if(i.kind!==`var`)return;for(let e of i.declarations){let r=y(e);for(let e of Object.keys(r))t.push(g(r[e]));e.init&&n.push(d(`=`,e.id,e.init))}r=!0}else if(O(i)){let e=i.consequent?R([i.consequent],t):m(),r=i.alternate?R([i.alternate],t):m();if(!e||!r)return;n.push(_(i.test,e,r))}else if(w(i)){let e=R(i.body,t);if(!e)return;n.push(e)}else if(T(i))e.indexOf(i)===0&&(r=!0);else return;return r&&n.push(m()),n.length===1?n[0]:ne(n)}function z(e){if(c.resync.call(this),Array.isArray(e))if(Array.isArray(this.container)){e=a._verifyNodeList.call(this,e);let t=a._containerInsertAfter.call(this,e);return this.remove(),t}else return this.replaceWithMultiple(e);else return this.replaceWith(e)}})),Kb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.evaluate=p,e.evaluateTruthy=s;let t=[`Number`,`String`,`Math`],n=[`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,null,null],r=[`random`];function i(e){return t.includes(e)}function a(e){return n.includes(e)}function o(e){return r.includes(e)}function s(){let e=this.evaluate();if(e.confident)return!!e.value}function c(e,t){t.confident&&=(t.deoptPath=e,!1)}let l=new Map([[`undefined`,void 0],[`Infinity`,1/0],[`NaN`,NaN]]);function u(e,t){let{node:n}=e,{seen:r}=t;if(r.has(n)){let i=r.get(n);if(i.resolved)return i.value;c(e,t);return}else{let i={resolved:!1};r.set(n,i);let a=d(e,t);return t.confident&&(i.resolved=!0,i.value=a),a}}function d(e,t){if(t.confident){if(e.isSequenceExpression()){let n=e.get(`expressions`);return u(n[n.length-1],t)}if(e.isStringLiteral()||e.isNumericLiteral()||e.isBooleanLiteral())return e.node.value;if(e.isNullLiteral())return null;if(e.isTemplateLiteral())return f(e,e.node.quasis,t);if(e.isTaggedTemplateExpression()&&e.get(`tag`).isMemberExpression()){let n=e.get(`tag.object`),{node:{name:r}}=n,i=e.get(`tag.property`);if(n.isIdentifier()&&r===`String`&&!e.scope.getBinding(r)&&i.isIdentifier()&&i.node.name===`raw`)return f(e,e.node.quasi.quasis,t,!0)}if(e.isConditionalExpression()){let n=u(e.get(`test`),t);return t.confident?u(n?e.get(`consequent`):e.get(`alternate`),t):void 0}if(e.isExpressionWrapper())return u(e.get(`expression`),t);if(e.isMemberExpression()&&!e.parentPath.isCallExpression({callee:e.node})){let n=e.get(`property`),r=e.get(`object`);if(r.isLiteral()){let i=r.node.value,a=typeof i,o=null;if(e.node.computed){if(o=u(n,t),!t.confident)return}else n.isIdentifier()&&(o=n.node.name);if((a===`number`||a===`string`)&&o!=null&&(typeof o==`number`||typeof o==`string`))return i[o]}}if(e.isReferencedIdentifier()){let r=e.scope.getBinding(e.node.name);if(r){if(r.constantViolations.length>0||e.node.start<r.path.node.end){c(r.path,t);return}let i=r.path.scope;if(r.kind===`var`&&i!==r.scope){let a=!i.path.parentPath.isBlockStatement();for(let o=i.parent;o;o=o.parent){var n;if(o===e.scope){if(a){c(r.path,t);return}break}(n=o.path.parentPath)!=null&&n.isBlockStatement()&&(a=!0)}}if(r.hasValue)return r.value}let i=e.node.name;if(l.has(i)){if(!r)return l.get(i);c(r.path,t);return}if(!r){c(e,t);return}let a=r.path;if(!a.isVariableDeclarator()){c(a,t);return}let o=a.get(`init`),s=u(o,t);if(typeof s==`object`&&s&&r.references>1){c(o,t);return}return s}if(e.isUnaryExpression({prefix:!0})){if(e.node.operator===`void`)return;let n=e.get(`argument`);if(e.node.operator===`typeof`&&(n.isFunction()||n.isClass()))return`function`;let r=u(n,t);if(!t.confident)return;switch(e.node.operator){case`!`:return!r;case`+`:return+r;case`-`:return-r;case`~`:return~r;case`typeof`:return typeof r}}if(e.isArrayExpression()){let n=[],r=e.get(`elements`);for(let e of r){let r=e.evaluate();if(r.confident)n.push(r.value);else{c(r.deopt,t);return}}return n}if(e.isObjectExpression()){let n={},r=e.get(`properties`);for(let e of r){if(e.isObjectMethod()||e.isSpreadElement()){c(e,t);return}let r=e.get(`key`),i;if(e.node.computed){if(i=r.evaluate(),!i.confident){c(i.deopt,t);return}i=i.value}else i=r.isIdentifier()?r.node.name:r.node.value;let a=e.get(`value`).evaluate();if(!a.confident){c(a.deopt,t);return}a=a.value,n[i]=a}return n}if(e.isLogicalExpression()){let n=t.confident,r=u(e.get(`left`),t),i=t.confident;t.confident=n;let a=u(e.get(`right`),t),o=t.confident;switch(e.node.operator){case`||`:return t.confident=i&&(!!r||o),t.confident?r||a:void 0;case`&&`:return t.confident=i&&(!r||o),t.confident?r&&a:void 0;case`??`:return t.confident=i&&(r!=null||o),t.confident?r??a:void 0}}if(e.isBinaryExpression()){let n=u(e.get(`left`),t);if(!t.confident)return;let r=u(e.get(`right`),t);if(!t.confident)return;switch(e.node.operator){case`-`:return n-r;case`+`:return n+r;case`/`:return n/r;case`*`:return n*r;case`%`:return n%r;case`**`:return n**+r;case`<`:return n<r;case`>`:return n>r;case`<=`:return n<=r;case`>=`:return n>=r;case`==`:return n==r;case`!=`:return n!=r;case`===`:return n===r;case`!==`:return n!==r;case`|`:return n|r;case`&`:return n&r;case`^`:return n^r;case`<<`:return n<<r;case`>>`:return n>>r;case`>>>`:return n>>>r}}if(e.isCallExpression()){let n=e.get(`callee`),r,s;if(n.isIdentifier()&&!e.scope.getBinding(n.node.name)&&(i(n.node.name)||a(n.node.name))&&(s=global[n.node.name]),n.isMemberExpression()){let e=n.get(`object`),t=n.get(`property`);if(e.isIdentifier()&&t.isIdentifier()&&i(e.node.name)&&!o(t.node.name)){r=global[e.node.name];let n=t.node.name;hasOwnProperty.call(r,n)&&(s=r[n])}if(e.isLiteral()&&t.isIdentifier()){let n=typeof e.node.value;(n===`string`||n===`number`)&&(r=e.node.value,s=r[t.node.name])}}if(s){let n=e.get(`arguments`).map(e=>u(e,t));return t.confident?s.apply(r,n):void 0}}c(e,t)}}function f(e,t,n,r=!1){let i=``,a=0,o=e.isTemplateLiteral()?e.get(`expressions`):e.get(`quasi.expressions`);for(let e of t){if(!n.confident)break;i+=r?e.value.raw:e.value.cooked;let t=o[a++];t&&(i+=String(u(t,n)))}if(n.confident)return i}function p(){let e={confident:!0,deoptPath:null,seen:new Map},t=u(this,e);return e.confident||(t=void 0),{confident:e.confident,deopt:e.deoptPath,value:t}}})),qb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.statements=e.statement=e.smart=e.program=e.expression=void 0;let{assertExpressionStatement:t}=Zy();function n(e){return{code:e=>`/* @babel/template */;\n${e}`,validate:()=>{},unwrap:t=>e(t.program.body.slice(1))}}e.smart=n(e=>e.length>1?e:e[0]),e.statements=n(e=>e),e.statement=n(e=>{if(e.length===0)throw Error(`Found nothing to return.`);if(e.length>1)throw Error(`Found multiple statements but wanted one`);return e[0]});let r=e.expression={code:e=>`(\n${e}\n)`,validate:e=>{if(e.program.body.length>1)throw Error(`Found multiple statements but wanted one`);if(r.unwrap(e).start===0)throw Error(`Parse result included parens.`)},unwrap:({program:e})=>{let[n]=e.body;return t(n),n.expression}};e.program={code:e=>e,validate:()=>{},unwrap:e=>e.program}})),Jb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.merge=r,e.normalizeReplacements=a,e.validate=i;let t=[`placeholderWhitelist`,`placeholderPattern`,`preserveComments`,`syntacticPlaceholders`];function n(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function r(e,t){let{placeholderWhitelist:n=e.placeholderWhitelist,placeholderPattern:r=e.placeholderPattern,preserveComments:i=e.preserveComments,syntacticPlaceholders:a=e.syntacticPlaceholders}=t;return{parser:Object.assign({},e.parser,t.parser),placeholderWhitelist:n,placeholderPattern:r,preserveComments:i,syntacticPlaceholders:a}}function i(e){if(e!=null&&typeof e!=`object`)throw Error(`Unknown template options.`);let r=e||{},{placeholderWhitelist:i,placeholderPattern:a,preserveComments:o,syntacticPlaceholders:s}=r,c=n(r,t);if(i!=null&&!(i instanceof Set))throw Error(`'.placeholderWhitelist' must be a Set, null, or undefined`);if(a!=null&&!(a instanceof RegExp)&&a!==!1)throw Error(`'.placeholderPattern' must be a RegExp, false, null, or undefined`);if(o!=null&&typeof o!=`boolean`)throw Error(`'.preserveComments' must be a boolean, null, or undefined`);if(s!=null&&typeof s!=`boolean`)throw Error(`'.syntacticPlaceholders' must be a boolean, null, or undefined`);if(s===!0&&(i!=null||a!=null))throw Error(`'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'`);return{parser:c,placeholderWhitelist:i||void 0,placeholderPattern:a??void 0,preserveComments:o??void 0,syntacticPlaceholders:s??void 0}}function a(e){if(Array.isArray(e))return e.reduce((e,t,n)=>(e[`$`+n]=t,e),{});if(typeof e==`object`||e==null)return e||void 0;throw Error(`Template replacements must be an array, object, null, or undefined`)}})),Yb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=g;var t=Zy(),n=lv(),r=Bb();let{isCallExpression:i,isExpressionStatement:a,isFunction:o,isIdentifier:s,isJSXIdentifier:c,isNewExpression:l,isPlaceholder:u,isStatement:d,isStringLiteral:f,removePropertiesDeep:p,traverse:m}=t,h=/^[_$A-Z0-9]+$/;function g(e,t,n){let{placeholderWhitelist:r,placeholderPattern:i,preserveComments:a,syntacticPlaceholders:o}=n,s=y(t,n.parser,o);p(s,{preserveComments:a}),e.validate(s);let c={syntactic:{placeholders:[],placeholderNames:new Set},legacy:{placeholders:[],placeholderNames:new Set},placeholderWhitelist:r,placeholderPattern:i,syntacticPlaceholders:o};return m(s,_,c),Object.assign({ast:s},c.syntactic.placeholders.length?c.syntactic:c.legacy)}function _(e,t,n){var r;let p,m=n.syntactic.placeholders.length>0;if(u(e)){if(n.syntacticPlaceholders===!1)throw Error(`%%foo%%-style placeholders can't be used when '.syntacticPlaceholders' is false.`);p=e.name.name,m=!0}else if(m||n.syntacticPlaceholders)return;else if(s(e)||c(e))p=e.name;else if(f(e))p=e.value;else return;if(m&&(n.placeholderPattern!=null||n.placeholderWhitelist!=null))throw Error(`'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'`);if(!m&&(n.placeholderPattern===!1||!(n.placeholderPattern||h).test(p))&&!((r=n.placeholderWhitelist)!=null&&r.has(p)))return;t=t.slice();let{node:g,key:_}=t[t.length-1],y;f(e)||u(e,{expectedNode:`StringLiteral`})?y=`string`:l(g)&&_===`arguments`||i(g)&&_===`arguments`||o(g)&&_===`params`?y=`param`:a(g)&&!u(e)?(y=`statement`,t=t.slice(0,-1)):y=d(e)&&u(e)?`statement`:`other`;let{placeholders:b,placeholderNames:x}=m?n.syntactic:n.legacy;b.push({name:p,type:y,resolve:e=>v(e,t),isDuplicate:x.has(p)}),x.add(p)}function v(e,t){let n=e;for(let e=0;e<t.length-1;e++){let{key:r,index:i}=t[e];n=i===void 0?n[r]:n[r][i]}let{key:r,index:i}=t[t.length-1];return{parent:n,key:r,index:i}}function y(e,t,i){let a=(t.plugins||[]).slice();i!==!1&&a.push(`placeholders`),t=Object.assign({allowAwaitOutsideFunction:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowYieldOutsideFunction:!0,sourceType:`module`},t,{plugins:a});try{return(0,n.parse)(e,t)}catch(t){let n=t.loc;throw n&&(t.message+=`
|
|
120
|
-
`+(0,r.codeFrameColumns)(e,{start:n}),t.code=`BABEL_TEMPLATE_PARSE_ERROR`),t}}})),Xb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=u;let{blockStatement:t,cloneNode:n,emptyStatement:r,expressionStatement:i,identifier:a,isStatement:o,isStringLiteral:s,stringLiteral:c,validate:l}=Zy();function u(e,t){let r=n(e.ast);return t&&(e.placeholders.forEach(e=>{if(!hasOwnProperty.call(t,e.name)){let t=e.name;throw Error(`Error: No substitution given for "${t}". If this is not meant to be a
|
|
121
|
-
placeholder you may want to consider passing one of the following options to @babel/template:
|
|
122
|
-
- { placeholderPattern: false, placeholderWhitelist: new Set(['${t}'])}
|
|
123
|
-
- { placeholderPattern: /^${t}$/ }`)}}),Object.keys(t).forEach(t=>{if(!e.placeholderNames.has(t))throw Error(`Unknown substitution "${t}" given`)})),e.placeholders.slice().reverse().forEach(e=>{try{d(e,r,(t&&t[e.name])??null)}catch(t){throw t.message=`@babel/template placeholder "${e.name}": ${t.message}`,t}}),r}function d(e,u,d){e.isDuplicate&&(Array.isArray(d)?d=d.map(e=>n(e)):typeof d==`object`&&(d=n(d)));let{parent:f,key:p,index:m}=e.resolve(u);if(e.type===`string`){if(typeof d==`string`&&(d=c(d)),!d||!s(d))throw Error(`Expected string substitution`)}else if(e.type===`statement`)m===void 0?d?Array.isArray(d)?d=t(d):typeof d==`string`?d=i(a(d)):o(d)||(d=i(d)):d=r():d&&!Array.isArray(d)&&(typeof d==`string`&&(d=a(d)),o(d)||(d=i(d)));else if(e.type===`param`){if(typeof d==`string`&&(d=a(d)),m===void 0)throw Error(`Assertion failure.`)}else if(typeof d==`string`&&(d=a(d)),Array.isArray(d))throw Error(`Cannot replace single expression with an array.`);function h(e,t,n){let r=e[t];e[t]=n,(r.type===`Identifier`||r.type===`Placeholder`)&&(r.typeAnnotation&&(n.typeAnnotation=r.typeAnnotation),r.optional&&(n.optional=r.optional),r.decorators&&(n.decorators=r.decorators))}if(m===void 0)l(f,p,d),h(f,p,d);else{let t=f[p].slice();e.type===`statement`||e.type===`param`?d==null?t.splice(m,1):Array.isArray(d)?t.splice(m,1,...d):h(t,m,d):h(t,m,d),l(f,p,t),f[p]=t}}})),Zb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=i;var t=Jb(),n=Yb(),r=Xb();function i(e,i,a){i=e.code(i);let o;return s=>{let c=(0,t.normalizeReplacements)(s);return o||=(0,n.default)(e,i,a),e.unwrap((0,r.default)(o,c))}}})),Qb=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=i;var t=Jb(),n=Yb(),r=Xb();function i(e,n,i){let{metadata:o,names:s}=a(e,n,i);return n=>{let i={};return n.forEach((e,t)=>{i[s[t]]=e}),n=>{let a=(0,t.normalizeReplacements)(n);return a&&Object.keys(a).forEach(e=>{if(hasOwnProperty.call(i,e))throw Error(`Unexpected replacement overlap.`)}),e.unwrap((0,r.default)(o,a?Object.assign(a,i):i))}}}function a(e,t,r){let i=`BABEL_TPL$`,a=t.join(``);do i=`$$`+i;while(a.includes(i));let{names:s,code:c}=o(t,i);return{metadata:(0,n.default)(e,e.code(c),{parser:r.parser,placeholderWhitelist:new Set(s.concat(r.placeholderWhitelist?Array.from(r.placeholderWhitelist):[])),placeholderPattern:r.placeholderPattern,preserveComments:r.preserveComments,syntacticPlaceholders:r.syntacticPlaceholders}),names:s}}function o(e,t){let n=[],r=e[0];for(let i=1;i<e.length;i++){let a=`${t}${i-1}`;n.push(a),r+=a+e[i]}return{names:n,code:r}}})),$b=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=a;var t=Jb(),n=Zb(),r=Qb();let i=(0,t.validate)({placeholderPattern:!1});function a(e,s){let c=new WeakMap,l=new WeakMap,u=s||(0,t.validate)(null);return Object.assign((i,...s)=>{if(typeof i==`string`){if(s.length>1)throw Error(`Unexpected extra params.`);return o((0,n.default)(e,i,(0,t.merge)(u,(0,t.validate)(s[0]))))}else if(Array.isArray(i)){let t=c.get(i);return t||(t=(0,r.default)(e,i,u),c.set(i,t)),o(t(s))}else if(typeof i==`object`&&i){if(s.length>0)throw Error(`Unexpected extra params.`);return a(e,(0,t.merge)(u,(0,t.validate)(i)))}throw Error(`Unexpected template param ${typeof i}`)},{ast:(a,...o)=>{if(typeof a==`string`){if(o.length>1)throw Error(`Unexpected extra params.`);return(0,n.default)(e,a,(0,t.merge)((0,t.merge)(u,(0,t.validate)(o[0])),i))()}else if(Array.isArray(a)){let n=l.get(a);return n||(n=(0,r.default)(e,a,(0,t.merge)(u,i)),l.set(a,n)),n(o)()}throw Error(`Unexpected template param ${typeof a}`)}})}function o(e){let t=``;try{throw Error()}catch(e){e.stack&&(t=e.stack.split(`
|
|
124
|
-
`).slice(3).join(`
|
|
125
|
-
`))}return n=>{try{return e(n)}catch(e){throw e.stack+=`\n =============\n${t}`,e}}}})),ex=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.statements=e.statement=e.smart=e.program=e.expression=e.default=void 0;var t=qb(),n=$b();let r=e.smart=(0,n.default)(t.smart),i=e.statement=(0,n.default)(t.statement),a=e.statements=(0,n.default)(t.statements),o=e.expression=(0,n.default)(t.expression),s=e.program=(0,n.default)(t.program);e.default=Object.assign(r.bind(void 0),{smart:r,statement:i,statements:a,expression:o,program:s,ast:r.ast})})),tx=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.arrowFunctionToExpression=ae,e.ensureBlock=R,e.ensureFunctionName=ye,e.splitExportDeclaration=_e,e.toComputedKey=L,e.unwrapFunctionEnvironment=z;var t=Zy(),n=ex(),r=$y(),i=lx();let{arrowFunctionExpression:a,assignmentExpression:o,binaryExpression:s,blockStatement:c,callExpression:l,conditionalExpression:u,expressionStatement:d,identifier:f,isIdentifier:p,jsxIdentifier:m,logicalExpression:h,LOGICAL_OPERATORS:g,memberExpression:_,metaProperty:v,numericLiteral:y,objectExpression:b,restElement:x,returnStatement:S,sequenceExpression:C,spreadElement:w,stringLiteral:T,super:E,thisExpression:D,toExpression:O,unaryExpression:k,toBindingIdentifierName:A,isFunction:ee,isAssignmentPattern:j,isRestElement:te,getFunctionName:ne,cloneNode:M,variableDeclaration:N,variableDeclarator:re,exportNamedDeclaration:P,exportSpecifier:F,inherits:I}=t;function L(){let e;if(this.isMemberExpression())e=this.node.property;else if(this.isProperty()||this.isMethod())e=this.node.key;else throw ReferenceError(`todo`);return this.node.computed||p(e)&&(e=T(e.name)),e}function R(){let e=this.get(`body`),t=e.node;if(Array.isArray(e))throw Error(`Can't convert array path to a block statement`);if(!t)throw Error(`Can't convert node without a body`);if(e.isBlockStatement())return t;let n=[],r=`body`,a,o;e.isStatement()?(o=`body`,a=0,n.push(e.node)):(r+=`.body.0`,this.isFunction()?(a=`argument`,n.push(S(e.node))):(a=`expression`,n.push(d(e.node)))),this.node.body=c(n);let s=this.get(r);return i.setup.call(e,s,o?s.node[o]:s.node,o,a),this.node}e.arrowFunctionToShadowed=function(){this.isArrowFunctionExpression()&&this.arrowFunctionToExpression()};function z(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration())throw this.buildCodeFrameError(`Can only unwrap the environment of a function.`);se(this)}function ie(e,t){e.node.type=t}function ae({allowInsertArrow:e=!0,allowInsertArrowWithRest:t=e,noNewArrows:n=!(e=>(e=arguments[0])?.specCompliant)()}={}){if(!this.isArrowFunctionExpression())throw this.buildCodeFrameError(`Cannot convert non-arrow function to a function expression.`);let r=this;n||(r=r.ensureFunctionName(!1)??r);let{thisBinding:i,fnPath:a}=se(r,n,e,t);if(a.ensureBlock(),ie(a,`FunctionExpression`),!n){let e=i?null:a.scope.generateUidIdentifier(`arrowCheckId`);return e&&a.parentPath.scope.push({id:e,init:b([])}),a.get(`body`).unshiftContainer(`body`,d(l(this.hub.addHelper(`newArrowCheck`),[D(),f(e?e.name:i)]))),a.replaceWith(l(_(a.node,f(`bind`)),[e?f(e.name):D()])),a.get(`callee.object`)}return a}let oe=(0,r.environmentVisitor)({CallExpression(e,{allSuperCalls:t}){e.get(`callee`).isSuper()&&t.push(e)}});function se(e,t=!0,n=!0,r=!0){let i,o=e.findParent(e=>e.isArrowFunctionExpression()?(i??=e,!1):e.isFunction()||e.isProgram()||e.isClassProperty({static:!1})||e.isClassPrivateProperty({static:!1})),c=o.isClassMethod({kind:`constructor`});if(o.isClassProperty()||o.isClassPrivateProperty())if(i)o=i;else if(n)e.replaceWith(l(a([],O(e.node)),[])),o=e.get(`callee`),e=o.get(`body`);else throw e.buildCodeFrameError(`Unable to transform arrow inside class property`);let{thisPaths:d,argumentsPaths:p,newTargetPaths:h,superProps:g,superCalls:y}=ge(e);if(c&&y.length>0){if(!n)throw y[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super()` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");if(!r)throw y[0].buildCodeFrameError("When using '@babel/plugin-transform-parameters', it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");let e=[];o.traverse(oe,{allSuperCalls:e});let t=fe(o);e.forEach(e=>{let n=f(t);n.loc=e.node.callee.loc,e.get(`callee`).replaceWith(n)})}if(p.length>0){let e=me(o,`arguments`,()=>{let e=()=>f(`arguments`);return o.scope.path.isProgram()?u(s(`===`,k(`typeof`,e()),T(`undefined`)),o.scope.buildUndefinedNode(),e()):e()});p.forEach(t=>{let n=f(e);n.loc=t.node.loc,t.replaceWith(n)})}if(h.length>0){let e=me(o,`newtarget`,()=>v(f(`new`),f(`target`)));h.forEach(t=>{let n=f(e);n.loc=t.node.loc,t.replaceWith(n)})}if(g.length>0){if(!n)throw g[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super.prop` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");g.reduce((e,t)=>e.concat(le(t)),[]).forEach(e=>{let t=e.node.computed?``:e.get(`property`).node.name,n=e.parentPath,r=n.isAssignmentExpression({left:e.node}),i=n.isCallExpression({callee:e.node}),a=n.isTaggedTemplateExpression({tag:e.node}),s=pe(o,r,t),c=[];if(e.node.computed&&c.push(e.get(`property`).node),r){let e=n.node.right;c.push(e)}let u=l(f(s),c);i?(n.unshiftContainer(`arguments`,D()),e.replaceWith(_(u,f(`call`))),d.push(n.get(`arguments.0`))):r?n.replaceWith(u):a?(e.replaceWith(l(_(u,f(`bind`),!1),[D()])),d.push(e.get(`arguments.0`))):e.replaceWith(u)})}let b;return(d.length>0||!t)&&(b=de(o,c),(t||c&&ue(o))&&(d.forEach(e=>{let t=e.isJSX()?m(b):f(b);t.loc=e.node.loc,e.replaceWith(t)}),t||(b=null))),{thisBinding:b,fnPath:e}}function ce(e){return g.includes(e)}function le(e){if(e.parentPath.isAssignmentExpression()&&e.parentPath.node.operator!==`=`){let n=e.parentPath,r=n.node.operator.slice(0,-1),i=n.node.right,a=ce(r);if(e.node.computed){let s=e.scope.generateDeclaredUidIdentifier(`tmp`),{object:c,property:l}=e.node;n.get(`left`).replaceWith(_(c,o(`=`,s,l),!0)),n.get(`right`).replaceWith(t(a?`=`:r,_(c,f(s.name),!0),i))}else{let o=e.node.object,s=e.node.property;n.get(`left`).replaceWith(_(o,s)),n.get(`right`).replaceWith(t(a?`=`:r,_(o,f(s.name)),i))}return a?n.replaceWith(h(r,n.node.left,n.node.right)):n.node.operator=`=`,[n.get(`left`),n.get(`right`).get(`left`)]}else if(e.parentPath.isUpdateExpression()){let t=e.parentPath,n=e.scope.generateDeclaredUidIdentifier(`tmp`),r=e.node.computed?e.scope.generateDeclaredUidIdentifier(`prop`):null,i=[o(`=`,n,_(e.node.object,r?o(`=`,r,e.node.property):e.node.property,e.node.computed)),o(`=`,_(e.node.object,r?f(r.name):e.node.property,e.node.computed),s(e.parentPath.node.operator[0],f(n.name),y(1)))];return e.parentPath.node.prefix||i.push(f(n.name)),t.replaceWith(C(i)),[t.get(`expressions.0.right`),t.get(`expressions.1.left`)]}return[e];function t(e,t,n){return e===`=`?o(`=`,t,n):s(e,t,n)}}function ue(e){return e.isClassMethod()&&!!e.parentPath.parentPath.node.superClass}let B=(0,r.environmentVisitor)({CallExpression(e,{supers:t,thisBinding:n}){e.get(`callee`).isSuper()&&(t.has(e.node)||(t.add(e.node),e.replaceWithMultiple([e.node,o(`=`,f(n),f(`this`))])))}});function de(e,t){return me(e,`this`,n=>{if(!t||!ue(e))return D();e.traverse(B,{supers:new WeakSet,thisBinding:n})})}function fe(e){return me(e,`supercall`,()=>{let t=e.scope.generateUidIdentifier(`args`);return a([x(t)],l(E(),[w(f(t.name))]))})}function pe(e,t,n){return me(e,`superprop_${t?`set`:`get`}:${n||``}`,()=>{let r=[],i;if(n)i=_(E(),f(n));else{let t=e.scope.generateUidIdentifier(`prop`);r.unshift(t),i=_(E(),f(t.name),!0)}if(t){let t=e.scope.generateUidIdentifier(`value`);r.push(t),i=o(`=`,i,f(t.name))}return a(r,i)})}function me(e,t,n){let r=`binding:`+t,i=e.getData(r);if(!i){let a=e.scope.generateUidIdentifier(t);i=a.name,e.setData(r,i),e.scope.push({id:a,init:n(i)})}return i}let he=(0,r.environmentVisitor)({ThisExpression(e,{thisPaths:t}){t.push(e)},JSXIdentifier(e,{thisPaths:t}){e.node.name===`this`&&(!e.parentPath.isJSXMemberExpression({object:e.node})&&!e.parentPath.isJSXOpeningElement({name:e.node})||t.push(e))},CallExpression(e,{superCalls:t}){e.get(`callee`).isSuper()&&t.push(e)},MemberExpression(e,{superProps:t}){e.get(`object`).isSuper()&&t.push(e)},Identifier(e,{argumentsPaths:t}){if(!e.isReferencedIdentifier({name:`arguments`}))return;let n=e.scope;do{if(n.hasOwnBinding(`arguments`)){n.rename(`arguments`);return}if(n.path.isFunction()&&!n.path.isArrowFunctionExpression())break}while(n=n.parent);t.push(e)},MetaProperty(e,{newTargetPaths:t}){e.get(`meta`).isIdentifier({name:`new`})&&e.get(`property`).isIdentifier({name:`target`})&&t.push(e)}});function ge(e){let t=[],n=[],r=[],i=[],a=[];return e.traverse(he,{thisPaths:t,argumentsPaths:n,newTargetPaths:r,superProps:i,superCalls:a}),{thisPaths:t,argumentsPaths:n,newTargetPaths:r,superProps:i,superCalls:a}}function _e(){if(!this.isExportDeclaration()||this.isExportAllDeclaration())throw Error(`Only default and named export declarations can be split.`);if(this.isExportNamedDeclaration()&&this.get(`specifiers`).length>0)throw Error(`It doesn't make sense to split exported specifiers.`);let e=this.get(`declaration`);if(this.isExportDefaultDeclaration()){let t=e.isFunctionDeclaration()||e.isClassDeclaration(),n=e.isFunctionExpression()||e.isClassExpression(),r=e.isScope()?e.scope.parent:e.scope,i=e.node.id,a=!1;i?n&&r.hasBinding(i.name)&&(a=!0,i=r.generateUidIdentifier(i.name)):(a=!0,i=r.generateUidIdentifier(`default`),(t||n)&&(e.node.id=M(i)));let o=t?e.node:N(`var`,[re(M(i),e.node)]),s=P(null,[F(M(i),f(`default`))]);return this.insertAfter(s),this.replaceWith(o),a&&r.registerDeclaration(this),this}else if(this.get(`specifiers`).length>0)throw Error(`It doesn't make sense to split exported specifiers.`);let t=e.getOuterBindingIdentifiers(),n=P(null,Object.keys(t).map(e=>F(f(e),f(e))));return this.insertAfter(n),this.replaceWith(e.node),this}let ve={"ReferencedIdentifier|BindingIdentifier"(e,t){e.node.name===t.name&&(t.needsRename=!0,e.stop())},Scope(e,t){e.scope.hasOwnBinding(t.name)&&e.skip()}};function ye(e){if(this.node.id)return this;let t=ne(this.node,this.parent);if(t==null)return this;let{name:r}=t;if(!e&&/[\uD800-\uDFFF]/.test(r)||r.startsWith(`get `)||r.startsWith(`set `))return null;r=A(r.replace(/[/ ]/g,`_`));let i=f(r);I(i,t.originalNode);let a={needsRename:!1,name:r},{scope:o}=this,s=o.getOwnBinding(r);if(s?s.kind===`param`&&(a.needsRename=!0):(o.parent.hasBinding(r)||o.hasGlobal(r))&&this.traverse(ve,a),!a.needsRename)return this.node.id=i,o.getProgramParent().references[i.name]=!0,this;if(o.hasBinding(i.name)&&!o.hasGlobal(i.name))return o.rename(i.name),this.node.id=i,o.getProgramParent().references[i.name]=!0,this;if(!ee(this.node))return null;let c=o.generateUidIdentifier(i.name),l=[];for(let e=0,t=be(this.node);e<t;e++)l.push(o.generateUidIdentifier(`x`));let u=n.default.expression.ast`
|
|
126
|
-
(function (${c}) {
|
|
127
|
-
function ${i}(${l}) {
|
|
128
|
-
return ${M(c)}.apply(this, arguments);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
${M(i)}.toString = function () {
|
|
132
|
-
return ${M(c)}.toString();
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
return ${M(i)};
|
|
136
|
-
})(${O(this.node)})
|
|
137
|
-
`;return this.replaceWith(u)[0].get(`arguments.0`)}function be(e){let t=e.params.findIndex(e=>j(e)||te(e));return t===-1?e.params.length:t}})),nx=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e._guessExecutionStatusRelativeTo=w,e._resolve=k,e.canHaveVariableDeclarationOrExpression=p,e.canSwapBetweenExpressionAndStatement=m,e.getSource=v,e.isCompletionRecord=h,e.isConstantExpression=A,e.isInStrictMode=ee,e.isNodeType=f,e.isStatementOrBlock=g,e.isStatic=d,e.matchesPattern=u,e.referencesImport=_,e.resolve=O,e.willIMaybeExecuteBefore=y;let{STATEMENT_OR_BLOCK_KEYS:t,VISITOR_KEYS:n,isBlockStatement:r,isExpression:i,isIdentifier:a,isLiteral:o,isStringLiteral:s,isType:c,matchesPattern:l}=Zy();function u(e,t){return l(this.node,e,t)}e.has=function(e){let t=this.node?.[e];return t&&Array.isArray(t)?!!t.length:!!t};function d(){return this.scope.isStatic(this.node)}e.is=e.has,e.isnt=function(e){return!this.has(e)},e.equals=function(e,t){return this.node[e]===t};function f(e){return c(this.type,e)}function p(){return(this.key===`init`||this.key===`left`)&&this.parentPath.isFor()}function m(e){return this.key!==`body`||!this.parentPath.isArrowFunctionExpression()?!1:this.isExpression()?r(e):this.isBlockStatement()?i(e):!1}function h(e){let t=this,n=!0;do{let{type:r,container:i}=t;if(!n&&(t.isFunction()||r===`StaticBlock`))return!!e;if(n=!1,Array.isArray(i)&&t.key!==i.length-1)return!1}while((t=t.parentPath)&&!t.isProgram()&&!t.isDoExpression());return!0}function g(){return this.parentPath.isLabeledStatement()||r(this.container)?!1:t.includes(this.key)}function _(e,t){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===t||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?s(this.node.property,{value:t}):this.node.property.name===t)){let t=this.get(`object`);return t.isReferencedIdentifier()&&t.referencesImport(e,`*`)}return!1}let n=this.scope.getBinding(this.node.name);if(n?.kind!==`module`)return!1;let r=n.path,i=r.parentPath;if(!i.isImportDeclaration())return!1;if(i.node.source.value===e){if(!t)return!0}else return!1;return!!(r.isImportDefaultSpecifier()&&t===`default`||r.isImportNamespaceSpecifier()&&t===`*`||r.isImportSpecifier()&&a(r.node.imported,{name:t}))}function v(){let e=this.node;if(e.end){let t=this.hub.getCode();if(t)return t.slice(e.start,e.end)}return``}function y(e){return this._guessExecutionStatusRelativeTo(e)!==`after`}function b(e){return e.isProgram()?e:(e.parentPath.scope.getFunctionParent()||e.parentPath.scope.getProgramParent()).path}function x(e,t){switch(e){case`LogicalExpression`:return t===`right`;case`ConditionalExpression`:case`IfStatement`:return t===`consequent`||t===`alternate`;case`WhileStatement`:case`DoWhileStatement`:case`ForInStatement`:case`ForOfStatement`:return t===`body`;case`ForStatement`:return t===`body`||t===`update`;case`SwitchStatement`:return t===`cases`;case`TryStatement`:return t===`handler`;case`AssignmentPattern`:return t===`right`;case`OptionalMemberExpression`:return t===`property`;case`OptionalCallExpression`:return t===`arguments`;default:return!1}}function S(e,t){for(let n=0;n<t;n++){let t=e[n];if(x(t.parent.type,t.parentKey))return!0}return!1}let C=Symbol();function w(e){return T(this,e,new Map)}function T(e,t,r){let i={this:b(e),target:b(t)};if(i.target.node!==i.this.node)return D(e,i.target,r);let a={target:t.getAncestry(),this:e.getAncestry()};if(a.target.includes(e))return`after`;if(a.this.includes(t))return`before`;let o,s={target:0,this:0};for(;!o&&s.this<a.this.length;){let e=a.this[s.this];s.target=a.target.indexOf(e),s.target>=0?o=e:s.this++}if(!o)throw Error(`Internal Babel error - The two compared nodes don't appear to belong to the same program.`);if(S(a.this,s.this-1)||S(a.target,s.target-1))return`unknown`;let c={this:a.this[s.this-1],target:a.target[s.target-1]};if(c.target.listKey&&c.this.listKey&&c.target.container===c.this.container)return c.target.key>c.this.key?`before`:`after`;let l=n[o.type],u={this:l.indexOf(c.this.parentKey),target:l.indexOf(c.target.parentKey)};return u.target>u.this?`before`:`after`}function E(e,t,n){if(!t.isFunctionDeclaration())return T(e,t,n)===`before`?`before`:`unknown`;if(t.parentPath.isExportDeclaration())return`unknown`;let r=t.scope.getBinding(t.node.id.name);if(!r.references)return`before`;let i=r.referencePaths,a;for(let r of i){if(r.find(e=>e.node===t.node))continue;if(r.key!==`callee`||!r.parentPath.isCallExpression())return`unknown`;let i=T(e,r,n);if(a&&a!==i)return`unknown`;a=i}return a}function D(e,t,n){let r=n.get(e.node),i;if(!r)n.set(e.node,r=new Map);else if(i=r.get(t.node))return i===C?`unknown`:i;r.set(t.node,C);let a=E(e,t,n);return r.set(t.node,a),a}function O(e,t){return k.call(this,e,t)||this}function k(e,t){var n;if(!((n=t)!=null&&n.includes(this))){if(t||=[],t.push(this),this.isVariableDeclarator()){if(this.get(`id`).isIdentifier())return this.get(`init`).resolve(e,t)}else if(this.isReferencedIdentifier()){let n=this.scope.getBinding(this.node.name);if(!n||!n.constant||n.kind===`module`)return;if(n.path!==this){let r=n.path.resolve(e,t);return this.find(e=>e.node===r.node)?void 0:r}}else if(this.isTypeCastExpression())return this.get(`expression`).resolve(e,t);else if(e&&this.isMemberExpression()){let n=this.toComputedKey();if(!o(n))return;let r=n.value,i=this.get(`object`).resolve(e,t);if(i.isObjectExpression()){let n=i.get(`properties`);for(let i of n){if(!i.isProperty())continue;let n=i.get(`key`),a=i.isnt(`computed`)&&n.isIdentifier({name:r});if(a||=n.isLiteral({value:r}),a)return i.get(`value`).resolve(e,t)}}else if(i.isArrayExpression()&&!isNaN(+r)){let n=i.get(`elements`)[r];if(n)return n.resolve(e,t)}}}}function A(){if(this.isIdentifier()){let e=this.scope.getBinding(this.node.name);return e?e.constant:!1}if(this.isLiteral())return this.isRegExpLiteral()?!1:this.isTemplateLiteral()?this.get(`expressions`).every(e=>e.isConstantExpression()):!0;if(this.isUnaryExpression())return this.node.operator===`void`?this.get(`argument`).isConstantExpression():!1;if(this.isBinaryExpression()){let{operator:e}=this.node;return e!==`in`&&e!==`instanceof`&&this.get(`left`).isConstantExpression()&&this.get(`right`).isConstantExpression()}return this.isMemberExpression()?!this.node.computed&&this.get(`object`).isIdentifier({name:`Symbol`})&&!this.scope.hasBinding(`Symbol`,{noGlobals:!0}):this.isCallExpression()?this.node.arguments.length===1&&this.get(`callee`).matchesPattern(`Symbol.for`)&&!this.scope.hasBinding(`Symbol`,{noGlobals:!0})&&this.get(`arguments`)[0].isStringLiteral():!1}function ee(){return!!(this.isProgram()?this:this.parentPath).find(e=>{if(e.isProgram({sourceType:`module`})||e.isClass())return!0;if(e.isArrowFunctionExpression()&&!e.get(`body`).isBlockStatement())return!1;let t;if(e.isFunction())t=e.node.body;else if(e.isProgram())t=e.node;else return!1;for(let e of t.directives)if(e.value.value===`use strict`)return!0;return!1})}})),rx=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e._getKey=C,e._getPattern=w,e.get=S,e.getAllNextSiblings=b,e.getAllPrevSiblings=x,e.getAssignmentIdentifiers=T,e.getBindingIdentifierPaths=O,e.getBindingIdentifiers=E,e.getCompletionRecords=g,e.getNextSibling=y,e.getOpposite=l,e.getOuterBindingIdentifierPaths=k,e.getOuterBindingIdentifiers=D,e.getPrevSibling=v,e.getSibling=_;var t=ax();let{getAssignmentIdentifiers:n,getBindingIdentifiers:r,getOuterBindingIdentifiers:i,numericLiteral:a,unaryExpression:o}=Zy();function s(e){return{type:0,path:e}}function c(e){return{type:1,path:e}}function l(){return this.key===`left`?this.getSibling(`right`):this.key===`right`?this.getSibling(`left`):null}function u(e,t,n){return e&&t.push(...h(e,n)),t}function d(e,t,n){let r=[];for(let i=0;i<e.length;i++){let a=e[i],o=h(a,n),s=[],c=[];for(let e of o)e.type===0&&s.push(e),e.type===1&&c.push(e);s.length&&(r=s),t.push(...c)}return t.push(...r),t}function f(e){e.forEach(e=>{e.type=1})}function p(e,t){e.forEach(e=>{e.path.isBreakStatement({label:null})&&(t?e.path.replaceWith(o(`void`,a(0))):e.path.remove())})}function m(e,t){let n=[];if(t.canHaveBreak){let r=[];for(let i=0;i<e.length;i++){let a=e[i],o=Object.assign({},t,{inCaseClause:!1});a.isBlockStatement()&&(t.inCaseClause||t.shouldPopulateBreak)?o.shouldPopulateBreak=!0:o.shouldPopulateBreak=!1;let s=h(a,o);if(s.length>0&&s.every(e=>e.type===1)){r.length>0&&s.every(e=>e.path.isBreakStatement({label:null}))?(f(r),n.push(...r),r.some(e=>e.path.isDeclaration())&&(n.push(...s),t.shouldPreserveBreak||p(s,!0)),t.shouldPreserveBreak||p(s,!1)):(n.push(...s),!t.shouldPopulateBreak&&!t.shouldPreserveBreak&&p(s,!0));break}if(i===e.length-1)n.push(...s);else{r=[];for(let e=0;e<s.length;e++){let t=s[e];t.type===1&&n.push(t),t.type===0&&r.push(t)}}}}else if(e.length)for(let r=e.length-1;r>=0;r--){let i=h(e[r],t);if(i.length>1||i.length===1&&!i[0].path.isVariableDeclaration()&&!i[0].path.isEmptyStatement()){n.push(...i);break}}return n}function h(e,t){let n=[];if(e.isIfStatement())n=u(e.get(`consequent`),n,t),n=u(e.get(`alternate`),n,t);else if(e.isDoExpression()||e.isFor()||e.isWhile()||e.isLabeledStatement())return u(e.get(`body`),n,t);else if(e.isProgram()||e.isBlockStatement())return m(e.get(`body`),t);else if(e.isFunction())return h(e.get(`body`),t);else if(e.isTryStatement())n=u(e.get(`block`),n,t),n=u(e.get(`handler`),n,t);else if(e.isCatchClause())return u(e.get(`body`),n,t);else if(e.isSwitchStatement())return d(e.get(`cases`),n,t);else if(e.isSwitchCase())return m(e.get(`consequent`),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0,shouldPreserveBreak:t.shouldPreserveBreak});else e.isBreakStatement()?n.push(c(e)):n.push(s(e));return n}function g(e=!1){return h(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1,shouldPreserveBreak:e}).map(e=>e.path)}function _(e){return t.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e}).setContext(this.context)}function v(){return this.getSibling(this.key-1)}function y(){return this.getSibling(this.key+1)}function b(){let e=this.key,t=this.getSibling(++e),n=[];for(;t.node;)n.push(t),t=this.getSibling(++e);return n}function x(){let e=this.key,t=this.getSibling(--e),n=[];for(;t.node;)n.push(t),t=this.getSibling(--e);return n}function S(e,t=!0){t===!0&&(t=this.context);let n=e.split(`.`);return n.length===1?C.call(this,e,t):w.call(this,n,t)}function C(e,n){let r=this.node,i=r[e];return Array.isArray(i)?i.map((a,o)=>t.default.get({listKey:e,parentPath:this,parent:r,container:i,key:o}).setContext(n)):t.default.get({parentPath:this,parent:r,container:r,key:e}).setContext(n)}function w(e,t){let n=this;for(let r of e)n=r===`.`?n.parentPath:Array.isArray(n)?n[r]:n.get(r,t);return n}function T(){return n(this.node)}function E(e){return r(this.node,e)}function D(e){return i(this.node,e)}function O(e=!1,t=!1){let n=[this],i=Object.create(null);for(;n.length;){let a=n.shift();if(!a||!a.node)continue;let o=r.keys[a.node.type];if(a.isIdentifier()){e?(i[a.node.name]=i[a.node.name]||[]).push(a):i[a.node.name]=a;continue}if(a.isExportDeclaration()){let e=a.get(`declaration`);e.isDeclaration()&&n.push(e);continue}if(t){if(a.isFunctionDeclaration()){n.push(a.get(`id`));continue}if(a.isFunctionExpression())continue}if(o)for(let e=0;e<o.length;e++){let t=o[e],r=a.get(t);Array.isArray(r)?n.push(...r):r.node&&n.push(r)}}return i}function k(e=!1){return this.getBindingIdentifierPaths(e,!0)}})),ix=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.addComment=a,e.addComments=o,e.shareCommentsWithSiblings=r;let{addComment:t,addComments:n}=Zy();function r(){if(typeof this.key==`string`)return;let e=this.node;if(!e)return;let t=e.trailingComments,n=e.leadingComments;if(!t&&!n)return;let r=this.getSibling(this.key-1),a=this.getSibling(this.key+1),o=!!r.node,s=!!a.node;o&&(n&&r.addComments(`trailing`,i(n,r.node.trailingComments)),t&&!s&&r.addComments(`trailing`,t)),s&&(t&&a.addComments(`leading`,i(t,a.node.leadingComments)),n&&!o&&a.addComments(`leading`,n))}function i(e,t){if(!(t!=null&&t.length))return e;let n=new Set(t);return e.filter(e=>!n.has(e))}function a(e,n,r){t(this.node,e,n,r)}function o(e,t){n(this.node,e,t)}})),ax=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=e.SHOULD_STOP=e.SHOULD_SKIP=e.REMOVED=void 0;var t=uv(),n=_v(),r=ux(),i=ob(),a=Zy(),o=a,s=rb(),c=Mb(),l=Nb(),u=Lb(),d=Gb(),f=Kb(),p=tx(),m=nx(),h=lx(),g=h,_=Hb(),v=Wb(),y=rx(),b=ix(),x=Qy();let{validate:S}=a,C=n(`babel`);e.REMOVED=1,e.SHOULD_STOP=2,e.SHOULD_SKIP=4;let w=e.default=class e{constructor(e,t){this.contexts=[],this.state=null,this._traverseFlags=0,this.skipKeys=null,this.parentPath=null,this.container=null,this.listKey=null,this.key=null,this.node=null,this.type=null,this._store=null,this.parent=t,this.hub=e,this.data=null,this.context=null,this.scope=null}get removed(){return(this._traverseFlags&1)>0}set removed(e){e?this._traverseFlags|=1:this._traverseFlags&=-2}get shouldStop(){return(this._traverseFlags&2)>0}set shouldStop(e){e?this._traverseFlags|=2:this._traverseFlags&=-3}get shouldSkip(){return(this._traverseFlags&4)>0}set shouldSkip(e){e?this._traverseFlags|=4:this._traverseFlags&=-5}static get({hub:t,parentPath:n,parent:r,container:i,listKey:a,key:o}){if(!t&&n&&(t=n.hub),!r)throw Error(`To get a node path the parent needs to exist`);let c=i[o],l=s.getOrCreateCachedPaths(r,n),u=l.get(c);return u||(u=new e(t,r),c&&l.set(c,u)),h.setup.call(u,n,i,a,o),u}getScope(e){return this.isScope()?new i.default(this):e}setData(e,t){return this.data??=Object.create(null),this.data[e]=t}getData(e,t){this.data??=Object.create(null);let n=this.data[e];return n===void 0&&t!==void 0&&(n=this.data[e]=t),n}hasNode(){return this.node!=null}buildCodeFrameError(e,t=SyntaxError){return this.hub.buildError(this.node,e,t)}traverse(e,t){(0,r.default)(this.node,e,this.scope,t,this)}set(e,t){S(this.node,e,t),this.node[e]=t}getPathLocation(){let e=[],t=this;do{let n=t.key;t.inList&&(n=`${t.listKey}[${n}]`),e.unshift(n)}while(t=t.parentPath);return e.join(`.`)}debug(e){C.enabled&&C(`${this.getPathLocation()} ${this.type}: ${e}`)}toString(){return(0,c.default)(this.node).code}get inList(){return!!this.listKey}set inList(e){e||(this.listKey=null)}get parentKey(){return this.listKey||this.key}},T={findParent:l.findParent,find:l.find,getFunctionParent:l.getFunctionParent,getStatementParent:l.getStatementParent,getEarliestCommonAncestorFrom:l.getEarliestCommonAncestorFrom,getDeepestCommonAncestorFrom:l.getDeepestCommonAncestorFrom,getAncestry:l.getAncestry,isAncestor:l.isAncestor,isDescendant:l.isDescendant,inType:l.inType,getTypeAnnotation:u.getTypeAnnotation,isBaseType:u.isBaseType,couldBeBaseType:u.couldBeBaseType,baseTypeStrictlyMatches:u.baseTypeStrictlyMatches,isGenericType:u.isGenericType,replaceWithMultiple:d.replaceWithMultiple,replaceWithSourceString:d.replaceWithSourceString,replaceWith:d.replaceWith,replaceExpressionWithStatements:d.replaceExpressionWithStatements,replaceInline:d.replaceInline,evaluateTruthy:f.evaluateTruthy,evaluate:f.evaluate,toComputedKey:p.toComputedKey,ensureBlock:p.ensureBlock,unwrapFunctionEnvironment:p.unwrapFunctionEnvironment,arrowFunctionToExpression:p.arrowFunctionToExpression,splitExportDeclaration:p.splitExportDeclaration,ensureFunctionName:p.ensureFunctionName,matchesPattern:m.matchesPattern,isStatic:m.isStatic,isNodeType:m.isNodeType,canHaveVariableDeclarationOrExpression:m.canHaveVariableDeclarationOrExpression,canSwapBetweenExpressionAndStatement:m.canSwapBetweenExpressionAndStatement,isCompletionRecord:m.isCompletionRecord,isStatementOrBlock:m.isStatementOrBlock,referencesImport:m.referencesImport,getSource:m.getSource,willIMaybeExecuteBefore:m.willIMaybeExecuteBefore,_guessExecutionStatusRelativeTo:m._guessExecutionStatusRelativeTo,resolve:m.resolve,isConstantExpression:m.isConstantExpression,isInStrictMode:m.isInStrictMode,isDenylisted:g.isDenylisted,visit:g.visit,skip:g.skip,skipKey:g.skipKey,stop:g.stop,setContext:g.setContext,requeue:g.requeue,requeueComputedKeyAndDecorators:g.requeueComputedKeyAndDecorators,remove:_.remove,insertBefore:v.insertBefore,insertAfter:v.insertAfter,unshiftContainer:v.unshiftContainer,pushContainer:v.pushContainer,getOpposite:y.getOpposite,getCompletionRecords:y.getCompletionRecords,getSibling:y.getSibling,getPrevSibling:y.getPrevSibling,getNextSibling:y.getNextSibling,getAllNextSiblings:y.getAllNextSiblings,getAllPrevSiblings:y.getAllPrevSiblings,get:y.get,getAssignmentIdentifiers:y.getAssignmentIdentifiers,getBindingIdentifiers:y.getBindingIdentifiers,getOuterBindingIdentifiers:y.getOuterBindingIdentifiers,getBindingIdentifierPaths:y.getBindingIdentifierPaths,getOuterBindingIdentifierPaths:y.getOuterBindingIdentifierPaths,shareCommentsWithSiblings:b.shareCommentsWithSiblings,addComment:b.addComment,addComments:b.addComments};Object.assign(w.prototype,T),w.prototype.arrowFunctionToShadowed=p.arrowFunctionToShadowed,Object.assign(w.prototype,{has:m.has,is:m.is,isnt:m.isnt,equals:m.equals,hoist:v.hoist,updateSiblingKeys:v.updateSiblingKeys,call:g.call,isBlacklisted:g.isBlacklisted,setScope:g.setScope,resync:g.resync,popContext:g.popContext,pushContext:g.pushContext,setup:g.setup,setKey:g.setKey}),w.prototype._guessExecutionStatusRelativeToDifferentFunctions=m._guessExecutionStatusRelativeTo,w.prototype._guessExecutionStatusRelativeToDifferentFunctions=m._guessExecutionStatusRelativeTo,Object.assign(w.prototype,{_getTypeAnnotation:u._getTypeAnnotation,_replaceWith:d._replaceWith,_resolve:m._resolve,_call:g._call,_resyncParent:g._resyncParent,_resyncKey:g._resyncKey,_resyncList:g._resyncList,_resyncRemoved:g._resyncRemoved,_getQueueContexts:g._getQueueContexts,_removeFromScope:_._removeFromScope,_callRemovalHooks:_._callRemovalHooks,_remove:_._remove,_markRemoved:_._markRemoved,_assertUnremoved:_._assertUnremoved,_containerInsert:v._containerInsert,_containerInsertBefore:v._containerInsertBefore,_containerInsertAfter:v._containerInsertAfter,_verifyNodeList:v._verifyNodeList,_getKey:y._getKey,_getPattern:y._getPattern});for(let e of o.TYPES){let t=`is${e}`,n=o[t];w.prototype[t]=function(e){return n(this.node,e)},w.prototype[`assert${e}`]=function(t){if(!n(this.node,t))throw TypeError(`Expected node path of type ${e}`)}}Object.assign(w.prototype,x);for(let e of Object.keys(t))e.startsWith(`_`)||o.TYPES.includes(e)||o.TYPES.push(e)})),ox=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=class{getCode(){}getScope(){}addHelper(){throw Error(`Helpers are not supported by the default hub.`)}buildError(e,t,n=TypeError){return new n(t)}}})),sx=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=ax(),n=Zy(),r=lx(),i=ox();let{VISITOR_KEYS:a}=n;e.default=class{constructor(e,t,n,r){this.queue=null,this.priorityQueue=null,this.parentPath=r,this.scope=e,this.state=n,this.opts=t}shouldVisit(e){let t=this.opts;if(t.enter||t.exit||t[e.type])return!0;let n=a[e.type];if(!(n!=null&&n.length))return!1;for(let t of n)if(e[t])return!0;return!1}create(e,n,r,a){let{parentPath:o}=this,s=o==null?e.type===`Program`||e.type===`File`?new i.default:void 0:o.hub;return t.default.get({parentPath:o,parent:e,container:n,key:r,listKey:a,hub:s})}maybeQueue(e,t){this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))}visitMultiple(e,t,n){if(e.length===0)return!1;let r=[];for(let i=0;i<e.length;i++){let a=e[i];a&&this.shouldVisit(a)&&r.push(this.create(t,e,i,n))}return this.visitQueue(r)}visitSingle(e,t){return this.shouldVisit(e[t])?this.visitQueue([this.create(e,e,t)]):!1}visitQueue(e){this.queue=e,this.priorityQueue=[];let t=new WeakSet,n=!1,i=0;for(;i<e.length;){let a=e[i];if(i++,r.resync.call(a),(a.contexts.length===0||a.contexts[a.contexts.length-1]!==this)&&r.pushContext.call(a,this),a.key===null)continue;let{node:o}=a;if(!t.has(o)){if(o&&t.add(o),a.visit()){n=!0;break}if(this.priorityQueue.length&&(n=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,n))break}}for(let t=0;t<i;t++)r.popContext.call(e[t]);return this.queue=null,n}visit(e,t){let n=e[t];return n?Array.isArray(n)?this.visitMultiple(n,e,t):this.visitSingle(e,t):!1}}})),cx=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.traverseNode=i;var t=sx();ax();var n=Zy();lx();let{VISITOR_KEYS:r}=n;function i(e,n,i,a,o,s,c){let l=r[e.type];if(!l)return!1;let u=new t.default(i,n,a,o);if(c)return s!=null&&s[o.parentKey]?!1:u.visitQueue([o]);for(let t of l)if(!(s!=null&&s[t])&&u.visit(e,t))return!0;return!1}})),lx=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e._call=o,e._forceSetScope=p,e._getQueueContexts=D,e._resyncKey=v,e._resyncList=y,e._resyncParent=_,e._resyncRemoved=b,e.call=a,e.isDenylisted=s,e.popContext=x,e.pushContext=S,e.requeue=T,e.requeueComputedKeyAndDecorators=E,e.resync=g,e.setContext=h,e.setKey=w,e.setScope=m,e.setup=C,e.skip=u,e.skipKey=d,e.stop=f,e.visit=l;var t=cx(),n=ax(),r=Hb(),i=Zy();function a(e){let t=this.opts;return this.debug(e),this.node&&o.call(this,t[e])?!0:this.node?o.call(this,t[this.node.type]?.[e]):!1}function o(e){if(!e)return!1;for(let t of e){if(!t)continue;let e=this.node;if(!e)return!0;let n=t.call(this.state,this,this.state);if(n&&typeof n==`object`&&typeof n.then==`function`)throw Error(`You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.`);if(n)throw Error(`Unexpected return value from visitor method ${t}`);if(this.node!==e||this._traverseFlags>0)return!0}return!1}function s(){return(this.opts.denylist??this.opts.blacklist)?.includes(this.node.type)}e.isBlacklisted=s;function c(e,t){e.context!==t&&(e.context=t,e.state=t.state,e.opts=t.opts)}function l(){var e,n;if(!this.node||this.isDenylisted()||(e=(n=this.opts).shouldSkip)!=null&&e.call(n,this))return!1;let r=this.context;return this.shouldSkip||a.call(this,`enter`)?(this.debug(`Skip...`),this.shouldStop):(c(this,r),this.debug(`Recursing into...`),this.shouldStop=(0,t.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),c(this,r),a.call(this,`exit`),this.shouldStop)}function u(){this.shouldSkip=!0}function d(e){this.skipKeys??={},this.skipKeys[e]=!0}function f(){this._traverseFlags|=n.SHOULD_SKIP|n.SHOULD_STOP}function p(){var e;let t=this.parentPath;((this.key===`key`||this.listKey===`decorators`)&&t.isMethod()||this.key===`discriminant`&&t.isSwitchStatement())&&(t=t.parentPath);let n;for(;t&&!n;)n=t.scope,t=t.parentPath;this.scope=this.getScope(n),(e=this.scope)==null||e.init()}function m(){var e,t;if((e=this.opts)!=null&&e.noScope)return;let n=this.parentPath;((this.key===`key`||this.listKey===`decorators`)&&n.isMethod()||this.key===`discriminant`&&n.isSwitchStatement())&&(n=n.parentPath);let r;for(;n&&!r;){var i;if((i=n.opts)!=null&&i.noScope)return;r=n.scope,n=n.parentPath}this.scope=this.getScope(r),(t=this.scope)==null||t.init()}function h(e){return this.skipKeys!=null&&(this.skipKeys={}),this._traverseFlags=0,e&&(this.context=e,this.state=e.state,this.opts=e.opts),m.call(this),this}function g(){this.removed||(_.call(this),y.call(this),v.call(this))}function _(){this.parentPath&&(this.parent=this.parentPath.node)}function v(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(let e=0;e<this.container.length;e++)if(this.container[e]===this.node){w.call(this,e);return}}else for(let e of Object.keys(this.container))if(this.container[e]===this.node){w.call(this,e);return}this.key=null}}function y(){if(!this.parent||!this.inList)return;let e=this.parent[this.listKey];this.container!==e&&(this.container=e||null)}function b(){(this.key==null||!this.container||this.container[this.key]!==this.node)&&r._markRemoved.call(this)}function x(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0)}function S(e){this.contexts.push(e),this.setContext(e)}function C(e,t,n,r){this.listKey=n,this.container=t,this.parentPath=e||this.parentPath,w.call(this,r)}function w(e){this.key=e,this.node=this.container[this.key],this.type=this.node?.type}function T(e=this){if(e.removed)return;let t=this.contexts;for(let n of t)n.maybeQueue(e)}function E(){let{context:e,node:t}=this;if(!i.isPrivate(t)&&t.computed&&e.maybeQueue(this.get(`key`)),t.decorators)for(let t of this.get(`decorators`))e.maybeQueue(t)}function D(){let e=this,t=this.contexts;for(;!t.length&&(e=e.parentPath,e);)t=e.contexts;return t}})),ux=V((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`Hub`,{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,`NodePath`,{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,`Scope`,{enumerable:!0,get:function(){return o.default}}),e.visitors=e.default=void 0,lx();var t=$y();e.visitors=t;var n=Zy(),r=rb(),i=cx(),a=ax(),o=ob(),s=ox();let{VISITOR_KEYS:c,removeProperties:l,traverseFast:u}=n;function d(e,n={},r,a,o,s){if(e){if(!n.noScope&&!r&&e.type!==`Program`&&e.type!==`File`)throw Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${e.type} node without passing scope and parentPath.`);if(!o&&s)throw Error(`visitSelf can only be used when providing a NodePath.`);c[e.type]&&(t.explode(n),(0,i.traverseNode)(e,n,r,a,o,void 0,s))}}e.default=d,d.visitors=t,d.verify=t.verify,d.explode=t.explode,d.cheap=function(e,t){u(e,t)},d.node=function(e,t,n,r,a,o){(0,i.traverseNode)(e,t,n,r,a,o)},d.clearNode=function(e,t){l(e,t)},d.removeProperties=function(e,t){return u(e,d.clearNode,t),e},d.hasType=function(e,t,n){return n!=null&&n.includes(e.type)?!1:e.type===t?!0:u(e,function(e){if(n!=null&&n.includes(e.type))return u.skip;if(e.type===t)return u.stop})},d.cache=r})),dx=je(ux(),1),fx=je(Mb(),1),px=lv();async function mx(e){let t=i.join(e.rootDir,`src`);if(!await gx(t))return _x(``);let n=[],r=async t=>{let a=await O.readdir(t,{withFileTypes:!0});for(let o of a){let a=i.join(t,o.name);if(o.isDirectory()){if(o.name===`__tests__`)continue;await r(a);continue}if(!o.isFile())continue;let s=o.name;if(s.includes(`.test.`)||s.includes(`.spec.`))continue;let c=i.relative(e.rootDir,a).split(i.sep).join(`/`);c.startsWith(`src/`)&&n.push({rel:c,abs:a})}};await r(t),n.sort((e,t)=>e.rel.localeCompare(t.rel));let a=``;for(let e of n){let t=_x(await O.readFile(e.abs));a+=`${e.rel}:${t}\n`}return _x(a)}async function hx(e){let{rootDir:t,toolId:n}=e,r=[...e.children].sort(),a=[];for(let e of r){let r=await mx({rootDir:i.join(t,`children`,e)});a.push(`${n}/${e}:${r}`)}return _x(a.length>0?`${a.join(`
|
|
138
|
-
`)}\n`:``)}async function gx(e){try{return await O.access(e),!0}catch{return!1}}function _x(e){let t=ae(`md5`);return t.update(e),t.digest(`hex`)}const vx=dx.default,yx=fx.default;function bx(e){let t=e.split(`/`);return t.at(-3)===`children`?`${t.at(-4)}/${t.at(-2)}`:t.at(-2)||`unknown`}async function xx(e){let t=i.join(e,`children`);try{await O.access(t)}catch{return[]}try{return await O.readdir(t)}catch{return[]}}function Sx(e,t){let n=!1;return vx(e.node,{ObjectProperty(e){e.node.key.type===`Identifier`&&e.node.key.name===t&&(n=!0)}},e.scope,e.parentPath),n}function Cx(e,t,n){let r={type:`ObjectProperty`,key:{type:`Identifier`,name:t},value:{type:`StringLiteral`,value:n},computed:!1,shorthand:!1};e.properties.push(r)}function wx(e){return e.node.callee.type===`Identifier`&&e.node.callee.name===`defineToolSet`}function Tx(e,t,n){if(n.length===0||Sx(t,`children`))return!1;for(let t of n){let n={type:`ImportDeclaration`,source:{type:`StringLiteral`,value:`./children/${t}`},importKind:`value`,specifiers:[{type:`ImportDefaultSpecifier`,local:{type:`Identifier`,name:t}}]};e.program.body.unshift(n)}let r={type:`ObjectProperty`,key:{type:`Identifier`,name:`children`},value:{type:`ArrayExpression`,elements:n.map(e=>({type:`Identifier`,name:e}))},computed:!1,shorthand:!1};return t.node.arguments[0].properties.push(r),!0}async function Ex({sourceCode:e,filePath:t}){if(e.includes(`toolId:`))return{code:e,hasToolId:!0};let n=(0,px.parse)(e,{plugins:[`typescript`],sourceType:`module`}),r=bx(t),a=i.dirname(t),o=!1,s=await xx(a),c=await mx({rootDir:a}),l=s.length>0?await hx({rootDir:a,toolId:r,children:s}):null;return vx(n,{CallExpression(e){if(e.node.callee.type===`Identifier`&&e.node.arguments[0]&&e.node.arguments[0].type===`ObjectExpression`){let t=e.node.arguments[0],i=Sx(e,`toolId`),a=Sx(e,`etag`);i||(Cx(t,`toolId`,r),o=!0),a||(Cx(t,`etag`,wx(e)&&l?l:c),o=!0),wx(e)&&Tx(n,e,s)&&(o=!0)}}}),{code:yx(n).code,hasToolId:!o&&e.includes(`toolId:`)}}async function Dx(e){let t=i.resolve(e.entry);await Ax(t,`入口目录不存在: ${t}`);let n=i.join(t,`config.ts`);await Ax(n,`找不到 config.ts 文件: ${n}`);let r=i.join(t,`index.ts`);await Ax(r,`找不到 index.ts 文件: ${r}`);let a=i.join(t,`.build-temp`);await kx(a);let o=Date.now(),s=0,c=0,l=0;try{let r=Date.now(),u=await Ex({sourceCode:await O.readFile(n,`utf-8`),filePath:n});await O.writeFile(i.join(a,`config.ts`),u.code,`utf-8`),s=Date.now()-r;let d=Date.now();await Ox(t,a,t),c=Date.now()-d;let f=i.resolve(e.output);await kx(f);let p=i.join(a,`index.ts`),m=Date.now();await ov({entry:[p],outDir:f,format:[e.format],clean:!0,minify:e.minify,platform:`node`,target:`node22`,dts:{enabled:!0,sourcemap:!1},treeshake:!0,skipNodeModulesBundle:process.env.NODE_ENV===`test`,external:process.env.NODE_ENV===`test`?[`@fastgpt-plugin/helpers`]:[]}),l=Date.now()-m;let h=await O.readdir(f),g=Date.now()-o;return xn.info([`构建阶段耗时统计:`,` • config 转换: ${jx(s)}`,` • 源码复制: ${jx(c)}`,` • tsdown 构建: ${jx(l)}`,` • 总耗时: ${jx(g)}`].join(`
|
|
139
|
-
`)),{entryDir:t,outputDir:f,files:h.map(e=>e)}}finally{try{await O.rm(a,{recursive:!0,force:!0})}catch{}}}async function Ox(e,t,n){let r=await O.readdir(e,{withFileTypes:!0});for(let a of r){if(a.name===`node_modules`||a.name===`dist`||a.name.startsWith(`.build-`))continue;let r=i.join(e,a.name),o=i.join(t,a.name);if(a.isDirectory())await kx(o),await Ox(r,o,n);else if(a.isFile()&&!(a.name===`config.ts`&&e===n))if(a.name===`config.ts`){let e=await Ex({sourceCode:await O.readFile(r,`utf-8`),filePath:r});await O.writeFile(o,e.code,`utf-8`)}else await O.copyFile(r,o)}}async function kx(e){await O.mkdir(e,{recursive:!0})}async function Ax(e,t){try{await O.access(e)}catch{throw Error(t)}}function jx(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(2)}s`}var Mx=class extends zn{register(e){e.command(`build`).description(`构建 FastGPT 插件为可分发的包`).option(`-e, --entry <path>`,`工具入口目录`,process.cwd()).option(`-o, --output <path>`,`输出目录`,`./dist`).option(`-m, --minify`,`压缩输出代码`,!1).option(`-w, --watch`,`监听模式`,!1).option(`-f, --format <format>`,`输出格式: esm | cjs`,`esm`).action(async e=>{await this.run({entry:e.entry,output:e.output,minify:e.minify,watch:e.watch,format:e.format})})}async run(e){let t=Date.now();xn.box([`FastGPT 插件构建`,``,`入口目录: ${e.entry}`,`输出目录: ${e.output}`,`代码压缩: ${e.minify?`开启`:`关闭`}`,`输出格式: ${e.format}`,``].join(`
|
|
140
|
-
`)),xn.start(`准备构建插件...`);try{let n=await Dx(e),r=((Date.now()-t)/1e3).toFixed(2);xn.success(`构建完成,用时 ${r}s`),xn.info(`输出目录: ${n.outputDir}`),n.files.length>0?(xn.info(`生成的文件列表:`),n.files.forEach(e=>{xn.info(` • ${e}`)})):xn.info(`未检测到输出文件,请检查配置。`),xn.info(`
|
|
141
|
-
下一步: 可以将该目录作为 npm 包发布,或在 FastGPT 中作为插件安装使用。`),e.watch&&xn.info(`
|
|
142
|
-
监听模式暂不支持,请使用 --no-watch 选项`)}catch(e){xn.error(`构建失败,详情如下:`),xn.error(e instanceof Error?e:Error(String(e))),xn.info(`如果这是在 CI 中发生的,请查看上方构建日志以获取更多信息。`),process.exit(1)}}};function Nx(){let e=new Fn;return e.name(Fe).version(Ie).description(`FastGPT 插件开发 CLI`),new Ui().register(e),new Mx().register(e),e}async function Px(e){await Nx().parseAsync(e??process.argv)}(async()=>{try{await Px()}catch(e){xn.error(e),process.exitCode=1}})();export{je as S,Dc as _,bu as a,Io as b,bc as c,Tc as d,Sc as f,Ec as g,Oc as h,fg as i,xc as l,wc as m,s_ as n,xu as o,yc as p,c_ as r,Cc as s,bb as t,vc as u,Ac as v,ke as x,kc as y};
|
|
97
|
+
export default ${o}\n`),tv(`Wrote debug rolldown config for "%s" (%s) -> %s`,t||`default name`,n,a)}function sv(e){if(Array.isArray(e))for(let t of e)sv(t);else typeof e==`object`&&e&&`name`in e&&(e[m.custom]=function(t,n,r){return`_options`in e?r({name:e.name,options:e._options},n):`"rolldown plugin: ${e.name}"`})}function cv(e){let t=!1;async function n(n){if(t)return;n=n.trim().toLowerCase();let r=[{key:`r`,description:`reload config and rebuild`,action(){e()}},{key:`c`,description:`clear console`,action(){console.clear()}},{key:`q`,description:`quit`,action(){v.exit(0)}}];if(n===`h`){let e=new Set;co.info(` Shortcuts`);for(let t of r)e.has(t.key)||(e.add(t.key),t.action!=null&&co.info(ua` press `+la`${t.key} + enter`+ua` to ${t.description}`));return}let i=r.find(e=>e.key===n);i&&(t=!0,await i.action(),t=!1)}let r=O.createInterface({input:v.stdin});return r.on(`line`,n),()=>r.close()}const lv=Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`);async function uv(e={}){co.level=e.logLevel||`info`;let{configs:t,files:n}=await x_(e);return dv(t,n,()=>uv(e))}async function dv(e,t,n){let r,i=()=>r||=wl(e),a=[],o=!1;async function s(){o||(o=!0,await Promise.all(a.map(e=>e())),Jc(),n())}let c=L_(e);function l(e){return R_(c,e)}co.info(`Build start`);let u=await Promise.all(e.map(e=>fv(e,t,e.pkg?c[e.pkg.packageJsonPath].formats.size>1:!0,i,s,l))),d=e.find(e=>e.devtools&&e.devtools.ui);if(e.some(e=>e.watch)){a.push(cv(s));for(let e of u)a.push(e[lv])}else d&&T_(d.devtools);return u}async function fv(e,t,n,r,i,a){let{format:o,dts:s,watch:c,logger:l,outDir:u}=e,{hooks:d,context:f}=await E_(e);S_(e);let p=performance.now();await d.callHook(`build:prepare`,f),await r();let m=await av(),h=[],g,_,v=!1,ee={chunks:h,config:e,async[lv](){_?.abort(),await g?.close()}},y=await x();if(c)g=hg(y),b(g);else{let e=await vg(y);for(let{output:t}of e)h.push(...Wu(t,u))}return c||(l.success(e.nameLabel,`Build complete in ${ga(`${Math.round(performance.now()-p)}ms`)}`),await te()),ee;function b(n){let r=[],a=!1;n.on(`change`,(e,n)=>{n.event===`update`&&r.push(e),(t.includes(e)||Gu.test(e))&&(co.info(`Reload config: ${e}, restarting...`),i())}),n.on(`event`,async t=>{switch(t.code){case`START`:e.clean.length&&await El(e.outDir,h),h.length=0,a=!1;break;case`END`:a||await te();break;case`BUNDLE_START`:r.length&&(l.clearScreen(`info`),l.info(`Found ${la(r.join(`, `))} changed, rebuilding...`)),r.length=0;break;case`BUNDLE_END`:await t.result.close(),l.success(e.nameLabel,`Rebuilt in ${t.duration}ms.`);break;case`ERROR`:await t.result.close(),l.error(t.error),a=!0;break}})}async function x(){let r=await nv(e,o,t,ee,!1,n);await d.callHook(`build:before`,{...f,buildOptions:r}),m&&await ov(m,e.name,o,r);let i=[r];return o===`cjs`&&s&&i.push(await nv(e,o,t,ee,!0,n)),i}async function te(){await C_(e),v||await a(ee),await d.callHook(`build:done`,{...f,chunks:h}),v=!0,_?.abort(),_=D_(e)}}Wo(`tsdown:debug`);const X=n(import.meta.url);new URL(`.`,import.meta.url).pathname;const{readFileSync:pv}=X(`node:fs`);let mv=null;const Z=[],hv=()=>{let e=!1;return process.platform===`linux`&&(e=_v(),e===null&&(e=vv()),e===null&&(e=yv())),e},gv=e=>e.includes(`libc.musl-`)||e.includes(`ld-musl-`),_v=()=>{try{return pv(`/usr/bin/ldd`,`utf-8`).includes(`musl`)}catch{return null}},vv=()=>{let e=null;return typeof process.report?.getReport==`function`&&(process.report.excludeNetwork=!0,e=process.report.getReport()),e?e.header&&e.header.glibcVersionRuntime?!1:!!(Array.isArray(e.sharedObjects)&&e.sharedObjects.some(gv)):null},yv=()=>{try{return X(`child_process`).execSync(`ldd --version`,{encoding:`utf8`}).includes(`musl`)}catch{return!1}};function bv(){if(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)try{return X(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)}catch(e){Z.push(e)}else if(process.platform===`android`)if(process.arch===`arm64`){try{return X(`./parser.android-arm64.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-android-arm64`),t=X(`@oxc-parser/binding-android-arm64/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else if(process.arch===`arm`){try{return X(`./parser.android-arm-eabi.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-android-arm-eabi`),t=X(`@oxc-parser/binding-android-arm-eabi/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else Z.push(Error(`Unsupported architecture on Android ${process.arch}`));else if(process.platform===`win32`)if(process.arch===`x64`)if(process.config?.variables?.shlib_suffix===`dll.a`||process.config?.variables?.node_target_type===`shared_library`){try{return X(`./parser.win32-x64-gnu.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-win32-x64-gnu`),t=X(`@oxc-parser/binding-win32-x64-gnu/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else{try{return X(`./parser.win32-x64-msvc.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-win32-x64-msvc`),t=X(`@oxc-parser/binding-win32-x64-msvc/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else if(process.arch===`ia32`){try{return X(`./parser.win32-ia32-msvc.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-win32-ia32-msvc`),t=X(`@oxc-parser/binding-win32-ia32-msvc/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else if(process.arch===`arm64`){try{return X(`./parser.win32-arm64-msvc.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-win32-arm64-msvc`),t=X(`@oxc-parser/binding-win32-arm64-msvc/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else Z.push(Error(`Unsupported architecture on Windows: ${process.arch}`));else if(process.platform===`darwin`){try{return X(`./parser.darwin-universal.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-darwin-universal`),t=X(`@oxc-parser/binding-darwin-universal/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}if(process.arch===`x64`){try{return X(`./parser.darwin-x64.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-darwin-x64`),t=X(`@oxc-parser/binding-darwin-x64/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else if(process.arch===`arm64`){try{return X(`./parser.darwin-arm64.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-darwin-arm64`),t=X(`@oxc-parser/binding-darwin-arm64/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else Z.push(Error(`Unsupported architecture on macOS: ${process.arch}`))}else if(process.platform===`freebsd`)if(process.arch===`x64`){try{return X(`./parser.freebsd-x64.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-freebsd-x64`),t=X(`@oxc-parser/binding-freebsd-x64/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else if(process.arch===`arm64`){try{return X(`./parser.freebsd-arm64.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-freebsd-arm64`),t=X(`@oxc-parser/binding-freebsd-arm64/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else Z.push(Error(`Unsupported architecture on FreeBSD: ${process.arch}`));else if(process.platform===`linux`)if(process.arch===`x64`)if(hv()){try{return X(`./parser.linux-x64-musl.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-linux-x64-musl`),t=X(`@oxc-parser/binding-linux-x64-musl/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else{try{return X(`./parser.linux-x64-gnu.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-linux-x64-gnu`),t=X(`@oxc-parser/binding-linux-x64-gnu/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else if(process.arch===`arm64`)if(hv()){try{return X(`./parser.linux-arm64-musl.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-linux-arm64-musl`),t=X(`@oxc-parser/binding-linux-arm64-musl/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else{try{return X(`./parser.linux-arm64-gnu.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-linux-arm64-gnu`),t=X(`@oxc-parser/binding-linux-arm64-gnu/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else if(process.arch===`arm`)if(hv()){try{return X(`./parser.linux-arm-musleabihf.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-linux-arm-musleabihf`),t=X(`@oxc-parser/binding-linux-arm-musleabihf/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else{try{return X(`./parser.linux-arm-gnueabihf.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-linux-arm-gnueabihf`),t=X(`@oxc-parser/binding-linux-arm-gnueabihf/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else if(process.arch===`loong64`)if(hv()){try{return X(`./parser.linux-loong64-musl.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-linux-loong64-musl`),t=X(`@oxc-parser/binding-linux-loong64-musl/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else{try{return X(`./parser.linux-loong64-gnu.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-linux-loong64-gnu`),t=X(`@oxc-parser/binding-linux-loong64-gnu/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else if(process.arch===`riscv64`)if(hv()){try{return X(`./parser.linux-riscv64-musl.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-linux-riscv64-musl`),t=X(`@oxc-parser/binding-linux-riscv64-musl/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else{try{return X(`./parser.linux-riscv64-gnu.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-linux-riscv64-gnu`),t=X(`@oxc-parser/binding-linux-riscv64-gnu/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else if(process.arch===`ppc64`){try{return X(`./parser.linux-ppc64-gnu.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-linux-ppc64-gnu`),t=X(`@oxc-parser/binding-linux-ppc64-gnu/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else if(process.arch===`s390x`){try{return X(`./parser.linux-s390x-gnu.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-linux-s390x-gnu`),t=X(`@oxc-parser/binding-linux-s390x-gnu/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else Z.push(Error(`Unsupported architecture on Linux: ${process.arch}`));else if(process.platform===`openharmony`)if(process.arch===`arm64`){try{return X(`./parser.openharmony-arm64.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-openharmony-arm64`),t=X(`@oxc-parser/binding-openharmony-arm64/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else if(process.arch===`x64`){try{return X(`./parser.openharmony-x64.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-openharmony-x64`),t=X(`@oxc-parser/binding-openharmony-x64/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else if(process.arch===`arm`){try{return X(`./parser.openharmony-arm.node`)}catch(e){Z.push(e)}try{let e=X(`@oxc-parser/binding-openharmony-arm`),t=X(`@oxc-parser/binding-openharmony-arm/package.json`).version;if(t!==`0.112.0`&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!==`0`)throw Error(`Native binding package version mismatch, expected 0.112.0 but got ${t}. You can reinstall dependencies to fix this issue.`);return e}catch(e){Z.push(e)}}else Z.push(Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));else Z.push(Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))}if(mv=bv(),!mv||process.env.NAPI_RS_FORCE_WASI){let e=null,t=null;try{e=X(`./parser.wasi.cjs`),mv=e}catch(e){process.env.NAPI_RS_FORCE_WASI&&(t=e)}if(!mv||process.env.NAPI_RS_FORCE_WASI)try{e=X(`@oxc-parser/binding-wasm32-wasi`),mv=e}catch(e){process.env.NAPI_RS_FORCE_WASI&&(t?t.cause=e:t=e,Z.push(e))}if(process.env.NAPI_RS_FORCE_WASI===`error`&&!e){let e=Error(`WASI binding not found and NAPI_RS_FORCE_WASI is set to error`);throw e.cause=t,e}}if(!mv&&globalThis.process?.versions?.webcontainer)try{mv=X(`./webcontainer-fallback.cjs`)}catch(e){Z.push(e)}if(!mv)throw Z.length>0?Error("Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.",{cause:Z.reduce((e,t)=>(t.cause=e,t))}):Error(`Failed to load native binding`);const{Severity:xv,ParseResult:Sv,ExportExportNameKind:Cv,ExportImportNameKind:wv,ExportLocalNameKind:Tv,ImportNameKind:Ev,parse:Dv,parseSync:Ov,rawTransferSupported:kv}=mv,{getBufferOffset:Av,parseRaw:jv,parseRawSync:Mv}=mv;function Nv(e){let t,n,r,i;return{get program(){return t||=Pv(e.program),t},get module(){return n||=e.module,n},get comments(){return r||=e.comments,r},get errors(){return i||=e.errors,i}}}function Pv(e){let{node:t,fixes:n}=JSON.parse(e);for(let e of n)Fv(t,e);return t}function Fv(e,t){let n=e;for(let e of t)n=n[e];if(n.bigint)n.value=BigInt(n.bigint);else try{n.value=RegExp(n.regex.pattern,n.regex.flags)}catch{}}const{freeze:Q}=Object,$=Q([]),Iv=Q([`decorators`,`key`,`typeAnnotation`,`value`]),Lv=Q([`left`,`right`]),Rv=Q([`argument`]),zv=Q([`body`]),Bv=Q([`label`]),Vv=Q([`callee`,`typeArguments`,`arguments`]),Hv=Q([`expression`]),Uv=Q([`decorators`,`id`,`typeParameters`,`superClass`,`superTypeArguments`,`implements`,`body`]),Wv=Q([`test`,`consequent`,`alternate`]),Gv=Q([`left`,`right`,`body`]),Kv=Q([`id`,`typeParameters`,`params`,`returnType`,`body`]),qv=Q([`key`,`value`]),Jv=Q([`local`]),Yv=Q([`object`,`property`]),Xv=Q([`decorators`,`key`,`typeAnnotation`]),Zv=Q([`expression`,`typeAnnotation`]),Qv=Q([`typeParameters`,`params`,`returnType`]),$v=Q([`expression`,`typeArguments`]),ey=Q([`members`]),ty=Q([`id`,`body`]),ny=Q([`types`]),ry=Q([`typeAnnotation`]),iy=Q([`params`]);Q({DebuggerStatement:$,EmptyStatement:$,Literal:$,PrivateIdentifier:$,Super:$,TemplateElement:$,ThisExpression:$,JSXClosingFragment:$,JSXEmptyExpression:$,JSXIdentifier:$,JSXOpeningFragment:$,JSXText:$,TSAnyKeyword:$,TSBigIntKeyword:$,TSBooleanKeyword:$,TSIntrinsicKeyword:$,TSJSDocUnknownType:$,TSNeverKeyword:$,TSNullKeyword:$,TSNumberKeyword:$,TSObjectKeyword:$,TSStringKeyword:$,TSSymbolKeyword:$,TSThisType:$,TSUndefinedKeyword:$,TSUnknownKeyword:$,TSVoidKeyword:$,AccessorProperty:Iv,ArrayExpression:Q([`elements`]),ArrayPattern:Q([`decorators`,`elements`,`typeAnnotation`]),ArrowFunctionExpression:Q([`typeParameters`,`params`,`returnType`,`body`]),AssignmentExpression:Lv,AssignmentPattern:Q([`decorators`,`left`,`right`,`typeAnnotation`]),AwaitExpression:Rv,BinaryExpression:Lv,BlockStatement:zv,BreakStatement:Bv,CallExpression:Vv,CatchClause:Q([`param`,`body`]),ChainExpression:Hv,ClassBody:zv,ClassDeclaration:Uv,ClassExpression:Uv,ConditionalExpression:Wv,ContinueStatement:Bv,Decorator:Hv,DoWhileStatement:Q([`body`,`test`]),ExportAllDeclaration:Q([`exported`,`source`,`attributes`]),ExportDefaultDeclaration:Q([`declaration`]),ExportNamedDeclaration:Q([`declaration`,`specifiers`,`source`,`attributes`]),ExportSpecifier:Q([`local`,`exported`]),ExpressionStatement:Hv,ForInStatement:Gv,ForOfStatement:Gv,ForStatement:Q([`init`,`test`,`update`,`body`]),FunctionDeclaration:Kv,FunctionExpression:Kv,Identifier:Q([`decorators`,`typeAnnotation`]),IfStatement:Wv,ImportAttribute:qv,ImportDeclaration:Q([`specifiers`,`source`,`attributes`]),ImportDefaultSpecifier:Jv,ImportExpression:Q([`source`,`options`]),ImportNamespaceSpecifier:Jv,ImportSpecifier:Q([`imported`,`local`]),LabeledStatement:Q([`label`,`body`]),LogicalExpression:Lv,MemberExpression:Yv,MetaProperty:Q([`meta`,`property`]),MethodDefinition:Q([`decorators`,`key`,`value`]),NewExpression:Vv,ObjectExpression:Q([`properties`]),ObjectPattern:Q([`decorators`,`properties`,`typeAnnotation`]),ParenthesizedExpression:Hv,Program:zv,Property:qv,PropertyDefinition:Iv,RestElement:Q([`decorators`,`argument`,`typeAnnotation`]),ReturnStatement:Rv,SequenceExpression:Q([`expressions`]),SpreadElement:Rv,StaticBlock:zv,SwitchCase:Q([`test`,`consequent`]),SwitchStatement:Q([`discriminant`,`cases`]),TaggedTemplateExpression:Q([`tag`,`typeArguments`,`quasi`]),TemplateLiteral:Q([`quasis`,`expressions`]),ThrowStatement:Rv,TryStatement:Q([`block`,`handler`,`finalizer`]),UnaryExpression:Rv,UpdateExpression:Rv,V8IntrinsicExpression:Q([`name`,`arguments`]),VariableDeclaration:Q([`declarations`]),VariableDeclarator:Q([`id`,`init`]),WhileStatement:Q([`test`,`body`]),WithStatement:Q([`object`,`body`]),YieldExpression:Rv,JSXAttribute:Q([`name`,`value`]),JSXClosingElement:Q([`name`]),JSXElement:Q([`openingElement`,`children`,`closingElement`]),JSXExpressionContainer:Hv,JSXFragment:Q([`openingFragment`,`children`,`closingFragment`]),JSXMemberExpression:Yv,JSXNamespacedName:Q([`namespace`,`name`]),JSXOpeningElement:Q([`name`,`typeArguments`,`attributes`]),JSXSpreadAttribute:Rv,JSXSpreadChild:Hv,TSAbstractAccessorProperty:Xv,TSAbstractMethodDefinition:qv,TSAbstractPropertyDefinition:Xv,TSArrayType:Q([`elementType`]),TSAsExpression:Zv,TSCallSignatureDeclaration:Qv,TSClassImplements:$v,TSConditionalType:Q([`checkType`,`extendsType`,`trueType`,`falseType`]),TSConstructSignatureDeclaration:Qv,TSConstructorType:Qv,TSDeclareFunction:Kv,TSEmptyBodyFunctionExpression:Q([`id`,`typeParameters`,`params`,`returnType`]),TSEnumBody:ey,TSEnumDeclaration:ty,TSEnumMember:Q([`id`,`initializer`]),TSExportAssignment:Hv,TSExternalModuleReference:Hv,TSFunctionType:Qv,TSImportEqualsDeclaration:Q([`id`,`moduleReference`]),TSImportType:Q([`source`,`options`,`qualifier`,`typeArguments`]),TSIndexSignature:Q([`parameters`,`typeAnnotation`]),TSIndexedAccessType:Q([`objectType`,`indexType`]),TSInferType:Q([`typeParameter`]),TSInstantiationExpression:$v,TSInterfaceBody:zv,TSInterfaceDeclaration:Q([`id`,`typeParameters`,`extends`,`body`]),TSInterfaceHeritage:$v,TSIntersectionType:ny,TSJSDocNonNullableType:ry,TSJSDocNullableType:ry,TSLiteralType:Q([`literal`]),TSMappedType:Q([`key`,`constraint`,`nameType`,`typeAnnotation`]),TSMethodSignature:Q([`key`,`typeParameters`,`params`,`returnType`]),TSModuleBlock:zv,TSModuleDeclaration:ty,TSNamedTupleMember:Q([`label`,`elementType`]),TSNamespaceExportDeclaration:Q([`id`]),TSNonNullExpression:Hv,TSOptionalType:ry,TSParameterProperty:Q([`decorators`,`parameter`]),TSParenthesizedType:ry,TSPropertySignature:Q([`key`,`typeAnnotation`]),TSQualifiedName:Lv,TSRestType:ry,TSSatisfiesExpression:Zv,TSTemplateLiteralType:Q([`quasis`,`types`]),TSTupleType:Q([`elementTypes`]),TSTypeAliasDeclaration:Q([`id`,`typeParameters`,`typeAnnotation`]),TSTypeAnnotation:ry,TSTypeAssertion:Q([`typeAnnotation`,`expression`]),TSTypeLiteral:ey,TSTypeOperator:ry,TSTypeParameter:Q([`name`,`constraint`,`default`]),TSTypeParameterDeclaration:iy,TSTypeParameterInstantiation:iy,TSTypePredicate:Q([`parameterName`,`typeAnnotation`]),TSTypeQuery:Q([`exprName`,`typeArguments`]),TSTypeReference:Q([`typeName`,`typeArguments`]),TSUnionType:ny});let ay=null,oy,sy,cy;var ly=class{#e=null;constructor(e){if(ay===null){let e=n(import.meta.url);({walkProgram:ay}=e(`../generated/visit/walk.js`)),{addVisitorToCompiled:oy,createCompiledVisitor:sy,finalizeCompiledVisitor:cy}=e(`./visitor.js`)}let t=sy();oy(e),cy()&&(this.#e=t)}visit(e){let t=this.#e;t!==null&&ay(e,t)}};const uy=n(import.meta.url);let dy=null,fy,py=null,my,hy;function gy(){dy===null&&({parseSyncRaw:dy,parse:fy}=uy(`./raw-transfer/eager.js`))}function _y(){py===null&&({parseSyncLazy:py,parse:my,Visitor:hy}=uy(`./raw-transfer/lazy.js`))}function vy(e,t,n){return n?.experimentalRawTransfer?(gy(),dy(e,t,n)):n?.experimentalLazy?(_y(),py(e,t,n)):Nv(Ov(e,t,n))}async function yy(e){let t=i.join(e.rootDir,`src`);if(!await xy(t))return Sy(``);let n=[],r=async t=>{let a=await C.readdir(t,{withFileTypes:!0});for(let o of a){let a=i.join(t,o.name);if(o.isDirectory()){if(o.name===`__tests__`)continue;await r(a);continue}if(!o.isFile())continue;let s=o.name;if(s.includes(`.test.`)||s.includes(`.spec.`))continue;let c=i.relative(e.rootDir,a).split(i.sep).join(`/`);c.startsWith(`src/`)&&n.push({rel:c,abs:a})}};await r(t),n.sort((e,t)=>e.rel.localeCompare(t.rel));let a=``;for(let e of n){let t=Sy(await C.readFile(e.abs));a+=`${e.rel}:${t}\n`}return Sy(a)}async function by(e){let{rootDir:t,toolId:n}=e,r=[...e.children].sort(),a=[];for(let e of r){let r=await yy({rootDir:i.join(t,`children`,e)});a.push(`${n}/${e}:${r}`)}return Sy(a.length>0?`${a.join(`
|
|
98
|
+
`)}\n`:``)}async function xy(e){try{return await C.access(e),!0}catch{return!1}}function Sy(e){let t=pe(`md5`);return t.update(e),t.digest(`hex`)}function Cy(e){let t=e.split(`/`);return t.at(-3)===`children`?`${t.at(-4)}/${t.at(-2)}`:t.at(-2)||`unknown`}async function wy(e){let t=i.join(e,`children`);try{await C.access(t)}catch{return[]}try{return await C.readdir(t)}catch{return[]}}function Ty(e,t){return e.some(e=>e.type===`Property`&&e.key?.type===`Identifier`&&e.key?.name===t)}function Ey(e,t){let n=t.sort((e,t)=>t.start-e.start),r=e;for(let e of n)r=r.slice(0,e.start)+e.content+r.slice(e.end);return r}async function Dy({sourceCode:e,filePath:t}){if(e.includes(`toolId:`))return{code:e,hasToolId:!0};let n=Cy(t),r=i.dirname(t),a=await wy(r),o=await yy({rootDir:r}),s=a.length>0?await by({rootDir:r,toolId:n,children:a}):null,c=vy(i.basename(t),e,{sourceType:`module`});if(c.errors.length>0)throw Error(`Parse errors: ${c.errors.map(e=>e.message).join(`, `)}`);let l=[],u=[];new ly({CallExpression(e){e.callee?.type===`Identifier`&&(e.callee.name===`defineTool`||e.callee.name===`defineToolSet`)&&e.arguments?.[0]?.type===`ObjectExpression`&&u.push(e)}}).visit(c.program);for(let e of u){let t=e.arguments[0];if(t?.type!==`ObjectExpression`)continue;let r=t,i=r.properties||[],c=e.callee?.type===`Identifier`&&e.callee.name===`defineToolSet`,u=!Ty(i,`toolId`),d=!Ty(i,`etag`),f=c&&!Ty(i,`children`)&&a.length>0;if(!u&&!d&&!f)continue;let p=i[i.length-1],m=p?p.end:(r.start??0)+1,h=[];if(u&&h.push(`toolId: '${n}'`),d){let e=c&&s?s:o;h.push(`etag: '${e}'`)}if(f){let e=a.map(e=>e).join(`, `);h.push(`children: [${e}]`);let t=a.map(e=>`import ${e} from './children/${e}';`).join(`
|
|
99
|
+
`);l.push({start:0,end:0,content:t+`
|
|
100
|
+
`})}if(h.length>0){let e=(p?`,
|
|
101
|
+
`:`
|
|
102
|
+
`)+h.join(`,
|
|
103
|
+
`);l.push({start:m,end:m,content:e})}}return l.length===0?{code:e,hasToolId:!1}:{code:Ey(e,l),hasToolId:!0}}async function Oy(e){let t=i.resolve(e.entry);await jy(t,`入口目录不存在: ${t}`);let n=i.join(t,`config.ts`);await jy(n,`找不到 config.ts 文件: ${n}`);let r=i.join(t,`index.ts`);await jy(r,`找不到 index.ts 文件: ${r}`);let a=i.join(t,`.build-temp`);await Ay(a);let o=Date.now(),s=0,c=0,l=0;try{let r=Date.now(),u=await Dy({sourceCode:await C.readFile(n,`utf-8`),filePath:n});await C.writeFile(i.join(a,`config.ts`),u.code,`utf-8`),s=Date.now()-r;let d=Date.now();await ky(t,a,t),c=Date.now()-d;let f=i.resolve(e.output);await Ay(f);let p=i.join(a,`index.ts`),m=Date.now();await uv({entry:[p],outDir:f,format:[e.format],clean:!0,minify:e.minify,platform:`node`,target:`node22`,dts:{enabled:!0,sourcemap:!1},treeshake:!0,skipNodeModulesBundle:process.env.NODE_ENV===`test`,external:process.env.NODE_ENV===`test`?[`@fastgpt-plugin/helpers`]:[]}),l=Date.now()-m;let h=await C.readdir(f),g=Date.now()-o;return kn.info([`构建阶段耗时统计:`,` • config 转换: ${My(s)}`,` • 源码复制: ${My(c)}`,` • tsdown 构建: ${My(l)}`,` • 总耗时: ${My(g)}`].join(`
|
|
104
|
+
`)),{entryDir:t,outputDir:f,files:h.map(e=>e)}}finally{try{await C.rm(a,{recursive:!0,force:!0})}catch{}}}async function ky(e,t,n){let r=await C.readdir(e,{withFileTypes:!0});for(let a of r){if(a.name===`node_modules`||a.name===`dist`||a.name.startsWith(`.build-`))continue;let r=i.join(e,a.name),o=i.join(t,a.name);if(a.isDirectory())await Ay(o),await ky(r,o,n);else if(a.isFile()&&!(a.name===`config.ts`&&e===n))if(a.name===`config.ts`){let e=await Dy({sourceCode:await C.readFile(r,`utf-8`),filePath:r});await C.writeFile(o,e.code,`utf-8`)}else await C.copyFile(r,o)}}async function Ay(e){await C.mkdir(e,{recursive:!0})}async function jy(e,t){try{await C.access(e)}catch{throw Error(t)}}function My(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(2)}s`}var Ny=class extends qn{register(e){e.command(`build`).description(`构建 FastGPT 插件为可分发的包`).option(`-e, --entry <path>`,`工具入口目录`,process.cwd()).option(`-o, --output <path>`,`输出目录`,`./dist`).option(`-m, --minify`,`压缩输出代码`,!1).option(`-w, --watch`,`监听模式`,!1).option(`-f, --format <format>`,`输出格式: esm | cjs`,`esm`).action(async e=>{await this.run({entry:e.entry,output:e.output,minify:e.minify,watch:e.watch,format:e.format})})}async run(e){let t=Date.now();kn.box([`FastGPT 插件构建`,``,`入口目录: ${e.entry}`,`输出目录: ${e.output}`,`代码压缩: ${e.minify?`开启`:`关闭`}`,`输出格式: ${e.format}`,``].join(`
|
|
105
|
+
`)),kn.start(`准备构建插件...`);try{let n=await Oy(e),r=((Date.now()-t)/1e3).toFixed(2);kn.success(`构建完成,用时 ${r}s`),kn.info(`输出目录: ${n.outputDir}`),n.files.length>0?(kn.info(`生成的文件列表:`),n.files.forEach(e=>{kn.info(` • ${e}`)})):kn.info(`未检测到输出文件,请检查配置。`),kn.info(`
|
|
106
|
+
下一步: 可以将该目录作为 npm 包发布,或在 FastGPT 中作为插件安装使用。`),e.watch&&kn.info(`
|
|
107
|
+
监听模式暂不支持,请使用 --no-watch 选项`)}catch(e){kn.error(`构建失败,详情如下:`),kn.error(e instanceof Error?e:Error(String(e))),kn.info(`如果这是在 CI 中发生的,请查看上方构建日志以获取更多信息。`),process.exit(1)}}};function Py(){let e=new Un;return e.name(He).version(Ue).description(`FastGPT 插件开发 CLI`),new Zi().register(e),new Ny().register(e),e}async function Fy(e){await Py().parseAsync(e??process.argv)}(async()=>{try{await Fy()}catch(e){kn.error(e),process.exitCode=1}})();export{Re as S,Rc as _,ku as a,Fe as b,kc as c,Ac as d,Dc as f,Fc as g,Pc as h,Ou as i,Ec as l,Ic as m,f_ as n,jc as o,Mc as p,gg as r,Oc as s,d_ as t,Nc as u,Lc as v,Ie as x,Wo as y};
|