azot 5.0.0-alpha.7 → 5.0.0-alpha.78
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/README.md +44 -4
- package/dist/api.mjs +1 -0
- package/dist/azot.mjs +21 -0
- package/dist/build-DQPzG-SN.mjs +1 -0
- package/dist/build-shared-BSONaG9d.mjs +1 -0
- package/dist/chunk-BD7HfmW0.mjs +1 -0
- package/dist/config-DPIJ-OWD.mjs +19 -0
- package/dist/context-GC2o7c9O.mjs +122 -0
- package/dist/context.mjs +1 -1
- package/dist/detect-DN3DXXYt-DoVMOyS2.mjs +1 -0
- package/dist/dev-BnRTNk6j.mjs +1 -0
- package/dist/dist-BUVQiLsw.mjs +7 -0
- package/dist/dist-Bx1U_8N4.mjs +481 -0
- package/dist/dist-Cd7u0f6O.mjs +21 -0
- package/dist/dist-DWac1F1m.mjs +1 -0
- package/dist/dist-wDOczP8N.mjs +27 -0
- package/dist/filename-DQnUJlio-D-GutpyP.mjs +38 -0
- package/dist/logger-wJ2wq5u1.mjs +18 -0
- package/dist/node-CJGbmw8A.mjs +3 -0
- package/dist/open-LYR5RfQA.mjs +2 -0
- package/dist/prompt-U5ajztzG-vUDxm337.mjs +45 -0
- package/dist/resolver-DkvdaW3s-B5R6Y3j5.mjs +1 -0
- package/dist/tsc-B18f0v7A.mjs +1 -0
- package/dist/tsc-context-BP5ZtADe.mjs +1 -0
- package/dist/vitest.mjs +1 -1
- package/manifest_schema.json +234 -0
- package/package.json +38 -72
- package/types/{main.d.ts → api.d.ts} +89 -16
- package/types/extension-v2.d.ts +214 -0
- package/types/extension-v2.type-test.ts +48 -0
- package/types/extension.d.ts +17 -14
- package/types/feedback.d.ts +86 -0
- package/types/manifest.d.ts +60 -0
- package/dist/azt.js +0 -2
- package/dist/azt.mjs +0 -2
- package/dist/chunk-nOFOJqeH.js +0 -1
- package/dist/context-DHWGgddt.mjs +0 -3
- package/dist/context-DtwTOZVR.js +0 -3
- package/dist/context.js +0 -1
- package/dist/main.js +0 -1
- package/dist/main.mjs +0 -1
- package/dist/vitest.js +0 -1
- package/types/input.d.ts +0 -15
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{i as e,n as t,t as n}from"./chunk-BD7HfmW0.mjs";import{_ as r,a as i,c as a,d as o,f as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g,u as ee,v as te}from"./filename-DQnUJlio-D-GutpyP.mjs";import{t as _}from"./node-CJGbmw8A.mjs";import{n as v,r as ne,t as re}from"./tsc-context-BP5ZtADe.mjs";import{i as ie,n as ae,r as oe,t as se}from"./dist-BUVQiLsw.mjs";import{createRequire as ce}from"node:module";import{existsSync as le}from"node:fs";import y,{dirname as ue,extname as de}from"node:path";import{mkdtemp as fe,readFile as pe,rm as b}from"node:fs/promises";import{tmpdir as me}from"node:os";import he from"node:process";import{fork as ge,spawn as _e}from"node:child_process";var ve=44,ye=59,be=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,xe=new Uint8Array(64),Se=new Uint8Array(128);for(let e=0;e<be.length;e++){let t=be.charCodeAt(e);xe[e]=t,Se[t]=e}function Ce(e,t){let n=0,r=0,i=0;do i=Se[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 we(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(xe[t])}while(r>0);return t}function Te(e,t){return e.pos>=t?!1:e.peek()!==ve}var Ee=1024*16,De=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}},Oe=class{constructor(){this.pos=0,this.out=``,this.buffer=new Uint8Array(Ee)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===Ee&&(this.out+=De.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+De.decode(e.subarray(0,n)):t}},ke=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}};function Ae(e){let{length:t}=e,n=new ke(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=Ce(n,i),i<u&&(l=!1),u=i,Te(n,e)?(a=Ce(n,a),o=Ce(n,o),s=Ce(n,s),Te(n,e)?(c=Ce(n,c),r=[i,a,o,s,c]):r=[i,a,o,s]):r=[i],t.push(r),n.pos++}l||je(t),r.push(t),n.pos=e+1}while(n.pos<=t);return r}function je(e){e.sort(Me)}function Me(e,t){return e[0]-t[0]}function Ne(e){let t=new Oe,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(ye),s.length===0)continue;let c=0;for(let e=0;e<s.length;e++){let o=s[e];e>0&&t.write(ve),c=we(t,o[0],c),o.length!==1&&(n=we(t,o[1],n),r=we(t,o[2],r),i=we(t,o[3],i),o.length!==4&&(a=we(t,o[4],a)))}}return t.flush()}const Pe=/^[\w+.-]+:\/\//,Fe=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,Ie=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function Le(e){return Pe.test(e)}function Re(e){return e.startsWith(`//`)}function ze(e){return e.startsWith(`/`)}function Be(e){return e.startsWith(`file:`)}function Ve(e){return/^[.?#]/.test(e)}function He(e){let t=Fe.exec(e);return We(t[1],t[2]||``,t[3],t[4]||``,t[5]||`/`,t[6]||``,t[7]||``)}function Ue(e){let t=Ie.exec(e),n=t[2];return We(`file:`,``,t[1]||``,``,ze(n)?n:`/`+n,t[3]||``,t[4]||``)}function We(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 Ge(e){if(Re(e)){let t=He(`http:`+e);return t.scheme=``,t.type=6,t}if(ze(e)){let t=He(`http://foo.com`+e);return t.scheme=``,t.host=``,t.type=5,t}if(Be(e))return Ue(e);if(Le(e))return He(e);let t=He(`http://foo.com/`+e);return t.scheme=``,t.host=``,t.type=e?e.startsWith(`?`)?3:e.startsWith(`#`)?2:4:1,t}function Ke(e){if(e.endsWith(`/..`))return e;let t=e.lastIndexOf(`/`);return e.slice(0,t+1)}function qe(e,t){Je(t,t.type),e.path===`/`?e.path=t.path:e.path=Ke(t.path)+e.path}function Je(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 Ye(e,t){if(!e&&!t)return``;let n=Ge(e),r=n.type;if(t&&r!==7){let e=Ge(t),i=e.type;switch(r){case 1:n.hash=e.hash;case 2:n.query=e.query;case 3:case 4:qe(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)}Je(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?Ve(t||e)&&!Ve(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}}function Xe(e){if(!e)return``;let t=e.lastIndexOf(`/`);return e.slice(0,t+1)}function Ze(e,t){let n=Xe(e),r=t?t+`/`:``;return e=>Ye(r+(e||``),n)}var Qe=0,$e=1,et=2,tt=3,nt=4;function rt(e,t){let n=it(e,0);if(n===e.length)return e;t||(e=e.slice());for(let r=n;r<e.length;r=it(e,r+1))e[r]=ot(e[r],t);return e}function it(e,t){for(let n=t;n<e.length;n++)if(!at(e[n]))return n;return e.length}function at(e){for(let t=1;t<e.length;t++)if(e[t][Qe]<e[t-1][Qe])return!1;return!0}function ot(e,t){return t||(e=e.slice()),e.sort(st)}function st(e,t){return e[Qe]-t[Qe]}var ct=!1;function lt(e,t,n,r){for(;n<=r;){let i=n+(r-n>>1),a=e[i][Qe]-t;if(a===0)return ct=!0,i;a<0?n=i+1:r=i-1}return ct=!1,n-1}function ut(e,t,n){for(let r=n+1;r<e.length&&e[r][Qe]===t;n=r++);return n}function dt(e,t,n){for(let r=n-1;r>=0&&e[r][Qe]===t;n=r--);return n}function ft(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function pt(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 ct=o!==-1&&e[o][Qe]===t,o;t>=a?s=o===-1?0:o:c=o}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=lt(e,t,s,c)}function mt(e){return typeof e==`string`?JSON.parse(e):e}var ht="`line` must be greater than 0 (lines start at line 1)",gt="`column` must be greater than or equal to 0 (columns start at column 0)",_t=class{constructor(e,t){let n=typeof e==`string`;if(!n&&e._decodedMemo)return e;let r=mt(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=Ze(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=rt(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=ft(),this._bySources=void 0,this._bySourceMemos=void 0}};function vt(e){return e}function yt(e){var t;return(t=vt(e))._decoded||(t._decoded=Ae(vt(e)._encoded))}function bt(e,t){let{line:n,column:r,bias:i}=t;if(n--,n<0)throw Error(ht);if(r<0)throw Error(gt);let a=yt(e);if(n>=a.length)return xt(null,null,null,null);let o=a[n],s=St(o,vt(e)._decodedMemo,n,r,i||1);if(s===-1)return xt(null,null,null,null);let c=o[s];if(c.length===1)return xt(null,null,null,null);let{names:l,resolvedSources:u}=e;return xt(u[c[$e]],c[et]+1,c[tt],c.length===5?l[c[nt]]:null)}function xt(e,t,n,r){return{source:e,line:t,column:n,name:r}}function St(e,t,n,r,i){let a=pt(e,r,t,n);return ct?a=(i===-1?ut:dt)(e,r,a):i===-1&&a++,a===-1||a===e.length?-1:a}var Ct=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function wt(e){return e}function Tt(e,t){return wt(e)._indexes[t]}function Et(e,t){let n=Tt(e,t);if(n!==void 0)return n;let{array:r,_indexes:i}=wt(e);return i[t]=r.push(t)-1}var Dt=0,Ot=1,kt=2,At=3,jt=4,Mt=-1,Nt=class{constructor({file:e,sourceRoot:t}={}){this._names=new Ct,this._sources=new Ct,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new Ct}};function Pt(e){return e}var Ft=(e,t)=>qt(!0,e,t);function It(e,t,n){let{_sources:r,_sourcesContent:i}=Pt(e),a=Et(r,t);i[a]=n}function Lt(e){let{_mappings:t,_sources:n,_sourcesContent:r,_names:i,_ignoreList:a}=Pt(e);return Wt(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 Rt(e){let t=Lt(e);return Object.assign({},t,{mappings:Ne(t.mappings)})}function zt(e){let t=[],{_mappings:n,_sources:r,_names:i}=Pt(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[Dt]},c,l,u;o.length!==1&&(c=r.array[o[Ot]],l={line:o[kt]+1,column:o[At]},o.length===5&&(u=i.array[o[jt]])),t.push({generated:s,source:c,original:l,name:u})}}return t}function Bt(e,t,n,r,i,a,o,s,c){let{_mappings:l,_sources:u,_sourcesContent:d,_names:f}=Pt(t),p=Vt(l,n),m=Ht(p,r);if(!i)return e&&Gt(p,m)?void 0:Ut(p,m,[r]);let h=Et(u,i),g=s?Et(f,s):Mt;if(h===d.length&&(d[h]=c??null),!(e&&Kt(p,m,h,a,o,g)))return Ut(p,m,s?[r,h,a,o,g]:[r,h,a,o])}function Vt(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}function Ht(e,t){let n=e.length;for(let r=n-1;r>=0&&!(t>=e[r][Dt]);n=r--);return n}function Ut(e,t,n){for(let n=e.length;n>t;n--)e[n]=e[n-1];e[t]=n}function Wt(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 Gt(e,t){return t===0?!0:e[t-1].length===1}function Kt(e,t,n,r,i,a){if(t===0)return!1;let o=e[t-1];return o.length===1?!1:n===o[Ot]&&r===o[kt]&&i===o[At]&&a===(o.length===5?o[jt]:Mt)}function qt(e,t,n){let{generated:r,source:i,original:a,name:o,content:s}=n;return i?Bt(e,t,r.line-1,r.column,i,a.line-1,a.column,o,s):Bt(e,t,r.line-1,r.column,null,null,null,null,null)}const Jt=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,Yt=RegExp(`[`+Jt+`]`),Xt=RegExp(`[`+Jt+`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]`),Zt=[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],Qt=[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 $t(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 en(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Yt.test(String.fromCharCode(e)):$t(e,Zt)}function tn(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&&Xt.test(String.fromCharCode(e)):$t(e,Zt)||$t(e,Qt)}function nn(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,!en(r))return!1}else if(!tn(r))return!1}return!t}const rn={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`]},an=new Set(rn.keyword),on=new Set(rn.strict);new Set(rn.strictBind);function sn(e,t){return t&&e===`await`||e===`enum`}function cn(e,t){return sn(e,t)||on.has(e)}function ln(e){return an.has(e)}var un=function(e){return e>=48&&e<=57};const dn={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},fn={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 pn(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(mn(e,p,t,n)){l+=t.slice(d,n);break}if(p===92){l+=t.slice(d,n);let o=hn(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)+`
|
|
2
|
+
`,++n,p===13&&t.charCodeAt(n)===10&&++n,++i,d=r=n):a.unterminated(o,s,c):++n}return{pos:n,str:l,firstInvalidLoc:u,lineStart:r,curLine:i}}function mn(e,t,n,r){return e===`template`?t===96||t===36&&n.charCodeAt(r+1)===123:t===(e===`double`?34:39)}function hn(e,t,n,r,i,a){let o=!i;t++;let s=e=>({pos:t,ch:e,lineStart:n,curLine:r}),c=e.charCodeAt(t++);switch(c){case 110:return s(`
|
|
3
|
+
`);case 114:return s(`\r`);case 120:{let i;return{code:i,pos:t}=gn(e,t,n,r,2,!1,o,a),s(i===null?null:String.fromCharCode(i))}case 117:{let i;return{code:i,pos:t}=vn(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 gn(e,t,n,r,i,a,o,s){let c=t,l;return{n:l,pos:t}=_n(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 _n(e,t,n,r,i,a,o,s,c,l){let u=t,d=i===16?dn.hex:dn.decBinOct,f=i===16?fn.hex:i===10?fn.dec:i===8?fn.oct:fn.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:un(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 vn(e,t,n,r,i,a){let o=e.charCodeAt(t),s;if(o===123){if(++t,{code:s,pos:t}=gn(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}=gn(e,t,n,r,4,!1,i,a));return{code:s,pos:t}}var yn=t({ACCESSOR_TYPES:()=>BT,ALIAS_KEYS:()=>Oc,ASSIGNMENT_OPERATORS:()=>xc,AnyTypeAnnotation:()=>Hh,ArgumentPlaceholder:()=>__,ArrayExpression:()=>cm,ArrayPattern:()=>oh,ArrayTypeAnnotation:()=>Uh,ArrowFunctionExpression:()=>sh,AssignmentExpression:()=>lm,AssignmentPattern:()=>ah,AwaitExpression:()=>kh,BINARY_OPERATORS:()=>bc,BINARY_TYPES:()=>Zw,BLOCKPARENT_TYPES:()=>$w,BLOCK_TYPES:()=>eT,BOOLEAN_BINARY_OPERATORS:()=>vc,BOOLEAN_NUMBER_BINARY_OPERATORS:()=>hc,BOOLEAN_UNARY_OPERATORS:()=>Sc,BUILDER_KEYS:()=>Ac,BigIntLiteral:()=>Mh,BigIntLiteralTypeAnnotation:()=>vg,BinaryExpression:()=>um,BindExpression:()=>v_,BlockStatement:()=>mm,BooleanLiteral:()=>Fm,BooleanLiteralTypeAnnotation:()=>Gh,BooleanTypeAnnotation:()=>Wh,BreakStatement:()=>hm,CLASS_TYPES:()=>ET,COMMENT_KEYS:()=>fc,COMPARISON_BINARY_OPERATORS:()=>_c,COMPLETIONSTATEMENT_TYPES:()=>rT,CONDITIONAL_TYPES:()=>iT,CallExpression:()=>gm,CatchClause:()=>_m,ClassAccessorProperty:()=>y_,ClassBody:()=>ch,ClassDeclaration:()=>uh,ClassExpression:()=>lh,ClassImplements:()=>qh,ClassMethod:()=>xh,ClassPrivateMethod:()=>Rh,ClassPrivateProperty:()=>Lh,ClassProperty:()=>Ih,ConditionalExpression:()=>vm,ContinueStatement:()=>ym,DECLARATION_TYPES:()=>pT,DEPRECATED_ALIASES:()=>vl,DEPRECATED_KEYS:()=>jc,DebuggerStatement:()=>bm,DeclareClass:()=>Jh,DeclareExportAllDeclaration:()=>rg,DeclareExportDeclaration:()=>ng,DeclareFunction:()=>Yh,DeclareInterface:()=>Xh,DeclareModule:()=>Zh,DeclareModuleExports:()=>Qh,DeclareOpaqueType:()=>eg,DeclareTypeAlias:()=>$h,DeclareVariable:()=>tg,DeclaredPredicate:()=>ig,Decorator:()=>b_,Directive:()=>fm,DirectiveLiteral:()=>pm,DoExpression:()=>x_,DoWhileStatement:()=>xm,ENUMBODY_TYPES:()=>IT,ENUMMEMBER_TYPES:()=>LT,EQUALITY_BINARY_OPERATORS:()=>gc,EXPORTDECLARATION_TYPES:()=>OT,EXPRESSIONWRAPPER_TYPES:()=>sT,EXPRESSION_TYPES:()=>Xw,EmptyStatement:()=>Sm,EmptyTypeAnnotation:()=>hg,EnumBooleanBody:()=>Wg,EnumBooleanMember:()=>Jg,EnumDeclaration:()=>Ug,EnumDefaultedMember:()=>Zg,EnumNumberBody:()=>Gg,EnumNumberMember:()=>Yg,EnumStringBody:()=>Kg,EnumStringMember:()=>Xg,EnumSymbolBody:()=>qg,ExistsTypeAnnotation:()=>ag,ExportAllDeclaration:()=>dh,ExportDefaultDeclaration:()=>fh,ExportDefaultSpecifier:()=>S_,ExportNamedDeclaration:()=>ph,ExportNamespaceSpecifier:()=>Nh,ExportSpecifier:()=>mh,ExpressionStatement:()=>Cm,FLATTENABLE_KEYS:()=>uc,FLIPPED_ALIAS_KEYS:()=>w,FLOWBASEANNOTATION_TYPES:()=>NT,FLOWDECLARATION_TYPES:()=>PT,FLOWPREDICATE_TYPES:()=>FT,FLOWTYPE_TYPES:()=>MT,FLOW_TYPES:()=>jT,FORXSTATEMENT_TYPES:()=>lT,FOR_INIT_KEYS:()=>dc,FOR_TYPES:()=>cT,FUNCTIONPARAMETER_TYPES:()=>mT,FUNCTIONPARENT_TYPES:()=>dT,FUNCTION_TYPES:()=>uT,File:()=>wm,ForInStatement:()=>Tm,ForOfStatement:()=>hh,ForStatement:()=>Em,FunctionDeclaration:()=>Dm,FunctionExpression:()=>Om,FunctionTypeAnnotation:()=>og,FunctionTypeParam:()=>sg,GenericTypeAnnotation:()=>cg,IMMUTABLE_TYPES:()=>yT,IMPORTOREXPORTDECLARATION_TYPES:()=>DT,INHERIT_KEYS:()=>Ec,Identifier:()=>km,IfStatement:()=>Am,Import:()=>jh,ImportAttribute:()=>Vh,ImportDeclaration:()=>gh,ImportDefaultSpecifier:()=>_h,ImportExpression:()=>Ah,ImportNamespaceSpecifier:()=>vh,ImportSpecifier:()=>yh,IndexedAccessType:()=>Qg,InferredPredicate:()=>lg,InterfaceDeclaration:()=>dg,InterfaceExtends:()=>ug,InterfaceTypeAnnotation:()=>fg,InterpreterDirective:()=>dm,IntersectionTypeAnnotation:()=>pg,JSXAttribute:()=>e_,JSXClosingElement:()=>t_,JSXClosingFragment:()=>m_,JSXElement:()=>n_,JSXEmptyExpression:()=>r_,JSXExpressionContainer:()=>i_,JSXFragment:()=>f_,JSXIdentifier:()=>o_,JSXMemberExpression:()=>s_,JSXNamespacedName:()=>c_,JSXOpeningElement:()=>l_,JSXOpeningFragment:()=>p_,JSXSpreadAttribute:()=>u_,JSXSpreadChild:()=>a_,JSXText:()=>d_,JSX_TYPES:()=>RT,LITERAL_TYPES:()=>vT,LOGICAL_OPERATORS:()=>pc,LOOP_TYPES:()=>aT,LVAL_TYPES:()=>gT,LabeledStatement:()=>jm,LogicalExpression:()=>Lm,METHOD_TYPES:()=>xT,MISCELLANEOUS_TYPES:()=>zT,MODULEDECLARATION_TYPES:()=>GT,MODULESPECIFIER_TYPES:()=>kT,MemberExpression:()=>Rm,MetaProperty:()=>bh,MixedTypeAnnotation:()=>mg,ModuleExpression:()=>C_,NODE_FIELDS:()=>kc,NODE_PARENT_VALIDATIONS:()=>Mc,NODE_UNION_SHAPES__PRIVATE:()=>Nc,NUMBER_BINARY_OPERATORS:()=>yc,NUMBER_UNARY_OPERATORS:()=>Cc,NewExpression:()=>zm,NullLiteral:()=>Pm,NullLiteralTypeAnnotation:()=>Kh,NullableTypeAnnotation:()=>gg,NumberLiteralTypeAnnotation:()=>_g,NumberTypeAnnotation:()=>yg,NumericLiteral:()=>Nm,OBJECTMEMBER_TYPES:()=>ST,ObjectExpression:()=>Vm,ObjectMethod:()=>Hm,ObjectPattern:()=>Sh,ObjectProperty:()=>Um,ObjectTypeAnnotation:()=>bg,ObjectTypeCallProperty:()=>Sg,ObjectTypeIndexer:()=>Cg,ObjectTypeInternalSlot:()=>xg,ObjectTypeProperty:()=>wg,ObjectTypeSpreadProperty:()=>Tg,OpaqueType:()=>Eg,OptionalCallExpression:()=>Fh,OptionalIndexedAccessType:()=>$g,OptionalMemberExpression:()=>Ph,PATTERNLIKE_TYPES:()=>hT,PATTERN_TYPES:()=>TT,PLACEHOLDERS:()=>ol,PLACEHOLDERS_ALIAS:()=>sl,PLACEHOLDERS_FLIPPED_ALIAS:()=>cl,PRIVATE_TYPES:()=>AT,PROPERTY_TYPES:()=>CT,PUREISH_TYPES:()=>fT,ParenthesizedExpression:()=>qm,Placeholder:()=>h_,PrivateName:()=>zh,Program:()=>Bm,QualifiedTypeIdentifier:()=>Dg,RegExpLiteral:()=>Im,RestElement:()=>Wm,ReturnStatement:()=>Gm,SCOPABLE_TYPES:()=>Qw,STANDARDIZED_TYPES:()=>Yw,STATEMENT_OR_BLOCK_KEYS:()=>lc,STATEMENT_TYPES:()=>tT,STRING_UNARY_OPERATORS:()=>wc,SequenceExpression:()=>Km,SpreadElement:()=>Ch,StaticBlock:()=>Bh,StringLiteral:()=>Mm,StringLiteralTypeAnnotation:()=>Og,StringTypeAnnotation:()=>kg,Super:()=>wh,SwitchCase:()=>Jm,SwitchStatement:()=>Ym,SymbolTypeAnnotation:()=>Ag,TERMINATORLESS_TYPES:()=>nT,TSAnyKeyword:()=>F_,TSArrayType:()=>tv,TSAsExpression:()=>Sv,TSBASETYPE_TYPES:()=>WT,TSBigIntKeyword:()=>L_,TSBooleanKeyword:()=>I_,TSCallSignatureDeclaration:()=>A_,TSClassImplements:()=>gv,TSConditionalType:()=>cv,TSConstructSignatureDeclaration:()=>j_,TSConstructorType:()=>X_,TSDeclareFunction:()=>D_,TSDeclareMethod:()=>O_,TSENTITYNAME_TYPES:()=>_T,TSEnumBody:()=>Tv,TSEnumDeclaration:()=>Ev,TSEnumMember:()=>Dv,TSExportAssignment:()=>Pv,TSExternalModuleReference:()=>Mv,TSFunctionType:()=>Y_,TSImportEqualsDeclaration:()=>jv,TSImportType:()=>Av,TSIndexSignature:()=>P_,TSIndexedAccessType:()=>fv,TSInferType:()=>lv,TSInstantiationExpression:()=>xv,TSInterfaceBody:()=>yv,TSInterfaceDeclaration:()=>vv,TSInterfaceHeritage:()=>_v,TSIntersectionType:()=>sv,TSIntrinsicKeyword:()=>R_,TSLiteralType:()=>hv,TSMappedType:()=>pv,TSMethodSignature:()=>N_,TSModuleBlock:()=>kv,TSModuleDeclaration:()=>Ov,TSNamedTupleMember:()=>av,TSNamespaceExportDeclaration:()=>Fv,TSNeverKeyword:()=>z_,TSNonNullExpression:()=>Nv,TSNullKeyword:()=>B_,TSNumberKeyword:()=>V_,TSObjectKeyword:()=>H_,TSOptionalType:()=>rv,TSParameterProperty:()=>E_,TSParenthesizedType:()=>uv,TSPropertySignature:()=>M_,TSQualifiedName:()=>k_,TSRestType:()=>iv,TSSatisfiesExpression:()=>Cv,TSStringKeyword:()=>U_,TSSymbolKeyword:()=>W_,TSTYPEELEMENT_TYPES:()=>HT,TSTYPE_TYPES:()=>UT,TSTemplateLiteralType:()=>mv,TSThisType:()=>J_,TSTupleType:()=>nv,TSTypeAliasDeclaration:()=>bv,TSTypeAnnotation:()=>Iv,TSTypeAssertion:()=>wv,TSTypeLiteral:()=>ev,TSTypeOperator:()=>dv,TSTypeParameter:()=>zv,TSTypeParameterDeclaration:()=>Rv,TSTypeParameterInstantiation:()=>Lv,TSTypePredicate:()=>Q_,TSTypeQuery:()=>$_,TSTypeReference:()=>Z_,TSUndefinedKeyword:()=>G_,TSUnionType:()=>ov,TSUnknownKeyword:()=>K_,TSVoidKeyword:()=>q_,TYPES:()=>yl,TYPESCRIPT_TYPES:()=>VT,TaggedTemplateExpression:()=>Th,TemplateElement:()=>Eh,TemplateLiteral:()=>Dh,ThisExpression:()=>Xm,ThisTypeAnnotation:()=>jg,ThrowStatement:()=>Zm,TopicReference:()=>w_,TryStatement:()=>Qm,TupleTypeAnnotation:()=>Mg,TypeAlias:()=>Pg,TypeAnnotation:()=>Fg,TypeCastExpression:()=>Ig,TypeParameter:()=>Lg,TypeParameterDeclaration:()=>Rg,TypeParameterInstantiation:()=>zg,TypeofTypeAnnotation:()=>Ng,UNARYLIKE_TYPES:()=>wT,UNARY_OPERATORS:()=>Tc,UPDATE_OPERATORS:()=>mc,USERWHITESPACABLE_TYPES:()=>bT,UnaryExpression:()=>$m,UnionTypeAnnotation:()=>Bg,UpdateExpression:()=>eh,V8IntrinsicIdentifier:()=>g_,VISITOR_KEYS:()=>Dc,VariableDeclaration:()=>th,VariableDeclarator:()=>nh,Variance:()=>Vg,VoidPattern:()=>T_,VoidTypeAnnotation:()=>Hg,WHILE_TYPES:()=>oT,WhileStatement:()=>rh,WithStatement:()=>ih,YieldExpression:()=>Oh,__internal__deprecationWarning:()=>S,addComment:()=>Hw,addComments:()=>Vw,anyTypeAnnotation:()=>id,appendToMemberExpression:()=>dE,argumentPlaceholder:()=>Pf,arrayExpression:()=>wl,arrayPattern:()=>Su,arrayTypeAnnotation:()=>ad,arrowFunctionExpression:()=>Cu,assertAccessor:()=>pw,assertAnyTypeAnnotation:()=>wb,assertArgumentPlaceholder:()=>$x,assertArrayExpression:()=>Wv,assertArrayPattern:()=>Hy,assertArrayTypeAnnotation:()=>Tb,assertArrowFunctionExpression:()=>Uy,assertAssignmentExpression:()=>Gv,assertAssignmentPattern:()=>Vy,assertAwaitExpression:()=>db,assertBigIntLiteral:()=>mb,assertBigIntLiteralTypeAnnotation:()=>ex,assertBinary:()=>wC,assertBinaryExpression:()=>Kv,assertBindExpression:()=>eS,assertBlock:()=>DC,assertBlockParent:()=>EC,assertBlockStatement:()=>Xv,assertBooleanLiteral:()=>_y,assertBooleanLiteralTypeAnnotation:()=>Db,assertBooleanTypeAnnotation:()=>Eb,assertBreakStatement:()=>Zv,assertCallExpression:()=>Qv,assertCatchClause:()=>$v,assertClass:()=>$C,assertClassAccessorProperty:()=>tS,assertClassBody:()=>Wy,assertClassDeclaration:()=>Ky,assertClassExpression:()=>Gy,assertClassImplements:()=>kb,assertClassMethod:()=>rb,assertClassPrivateMethod:()=>bb,assertClassPrivateProperty:()=>yb,assertClassProperty:()=>vb,assertCompletionStatement:()=>AC,assertConditional:()=>jC,assertConditionalExpression:()=>ey,assertContinueStatement:()=>ty,assertDebuggerStatement:()=>ny,assertDeclaration:()=>BC,assertDeclareClass:()=>Ab,assertDeclareExportAllDeclaration:()=>zb,assertDeclareExportDeclaration:()=>Rb,assertDeclareFunction:()=>jb,assertDeclareInterface:()=>Mb,assertDeclareModule:()=>Nb,assertDeclareModuleExports:()=>Pb,assertDeclareOpaqueType:()=>Ib,assertDeclareTypeAlias:()=>Fb,assertDeclareVariable:()=>Lb,assertDeclaredPredicate:()=>Bb,assertDecorator:()=>nS,assertDirective:()=>Jv,assertDirectiveLiteral:()=>Yv,assertDoExpression:()=>rS,assertDoWhileStatement:()=>ry,assertEmptyStatement:()=>iy,assertEmptyTypeAnnotation:()=>Zb,assertEnumBody:()=>lw,assertEnumBooleanBody:()=>Ex,assertEnumBooleanMember:()=>Ax,assertEnumDeclaration:()=>Tx,assertEnumDefaultedMember:()=>Nx,assertEnumMember:()=>uw,assertEnumNumberBody:()=>Dx,assertEnumNumberMember:()=>jx,assertEnumStringBody:()=>Ox,assertEnumStringMember:()=>Mx,assertEnumSymbolBody:()=>kx,assertExistsTypeAnnotation:()=>Vb,assertExportAllDeclaration:()=>qy,assertExportDeclaration:()=>tw,assertExportDefaultDeclaration:()=>Jy,assertExportDefaultSpecifier:()=>iS,assertExportNamedDeclaration:()=>Yy,assertExportNamespaceSpecifier:()=>hb,assertExportSpecifier:()=>Xy,assertExpression:()=>CC,assertExpressionStatement:()=>ay,assertExpressionWrapper:()=>PC,assertFile:()=>oy,assertFlow:()=>iw,assertFlowBaseAnnotation:()=>ow,assertFlowDeclaration:()=>sw,assertFlowPredicate:()=>cw,assertFlowType:()=>aw,assertFor:()=>FC,assertForInStatement:()=>sy,assertForOfStatement:()=>Zy,assertForStatement:()=>cy,assertForXStatement:()=>IC,assertFunction:()=>LC,assertFunctionDeclaration:()=>ly,assertFunctionExpression:()=>uy,assertFunctionParameter:()=>VC,assertFunctionParent:()=>RC,assertFunctionTypeAnnotation:()=>Hb,assertFunctionTypeParam:()=>Ub,assertGenericTypeAnnotation:()=>Wb,assertIdentifier:()=>dy,assertIfStatement:()=>fy,assertImmutable:()=>KC,assertImport:()=>pb,assertImportAttribute:()=>Cb,assertImportDeclaration:()=>Qy,assertImportDefaultSpecifier:()=>$y,assertImportExpression:()=>fb,assertImportNamespaceSpecifier:()=>eb,assertImportOrExportDeclaration:()=>ew,assertImportSpecifier:()=>tb,assertIndexedAccessType:()=>Px,assertInferredPredicate:()=>Gb,assertInterfaceDeclaration:()=>qb,assertInterfaceExtends:()=>Kb,assertInterfaceTypeAnnotation:()=>Jb,assertInterpreterDirective:()=>qv,assertIntersectionTypeAnnotation:()=>Yb,assertJSX:()=>dw,assertJSXAttribute:()=>Ix,assertJSXClosingElement:()=>Lx,assertJSXClosingFragment:()=>Xx,assertJSXElement:()=>Rx,assertJSXEmptyExpression:()=>zx,assertJSXExpressionContainer:()=>Bx,assertJSXFragment:()=>Jx,assertJSXIdentifier:()=>Hx,assertJSXMemberExpression:()=>Ux,assertJSXNamespacedName:()=>Wx,assertJSXOpeningElement:()=>Gx,assertJSXOpeningFragment:()=>Yx,assertJSXSpreadAttribute:()=>Kx,assertJSXSpreadChild:()=>Vx,assertJSXText:()=>qx,assertLVal:()=>UC,assertLabeledStatement:()=>py,assertLiteral:()=>GC,assertLogicalExpression:()=>yy,assertLoop:()=>MC,assertMemberExpression:()=>by,assertMetaProperty:()=>nb,assertMethod:()=>JC,assertMiscellaneous:()=>fw,assertMixedTypeAnnotation:()=>Xb,assertModuleDeclaration:()=>Sw,assertModuleExpression:()=>aS,assertModuleSpecifier:()=>nw,assertNewExpression:()=>xy,assertNode:()=>Uv,assertNullLiteral:()=>gy,assertNullLiteralTypeAnnotation:()=>Ob,assertNullableTypeAnnotation:()=>Qb,assertNumberLiteral:()=>vw,assertNumberLiteralTypeAnnotation:()=>$b,assertNumberTypeAnnotation:()=>tx,assertNumericLiteral:()=>hy,assertObjectExpression:()=>Cy,assertObjectMember:()=>YC,assertObjectMethod:()=>wy,assertObjectPattern:()=>ib,assertObjectProperty:()=>Ty,assertObjectTypeAnnotation:()=>nx,assertObjectTypeCallProperty:()=>ix,assertObjectTypeIndexer:()=>ax,assertObjectTypeInternalSlot:()=>rx,assertObjectTypeProperty:()=>ox,assertObjectTypeSpreadProperty:()=>sx,assertOpaqueType:()=>cx,assertOptionalCallExpression:()=>_b,assertOptionalIndexedAccessType:()=>Fx,assertOptionalMemberExpression:()=>gb,assertParenthesizedExpression:()=>ky,assertPattern:()=>QC,assertPatternLike:()=>HC,assertPlaceholder:()=>Zx,assertPrivate:()=>rw,assertPrivateName:()=>xb,assertProgram:()=>Sy,assertProperty:()=>XC,assertPureish:()=>zC,assertQualifiedTypeIdentifier:()=>lx,assertRegExpLiteral:()=>vy,assertRegexLiteral:()=>yw,assertRestElement:()=>Ey,assertRestProperty:()=>bw,assertReturnStatement:()=>Dy,assertScopable:()=>TC,assertSequenceExpression:()=>Oy,assertSpreadElement:()=>ab,assertSpreadProperty:()=>xw,assertStandardized:()=>SC,assertStatement:()=>OC,assertStaticBlock:()=>Sb,assertStringLiteral:()=>my,assertStringLiteralTypeAnnotation:()=>ux,assertStringTypeAnnotation:()=>dx,assertSuper:()=>ob,assertSwitchCase:()=>Ay,assertSwitchStatement:()=>jy,assertSymbolTypeAnnotation:()=>fx,assertTSAnyKeyword:()=>_S,assertTSArrayType:()=>LS,assertTSAsExpression:()=>iC,assertTSBaseType:()=>_w,assertTSBigIntKeyword:()=>yS,assertTSBooleanKeyword:()=>vS,assertTSCallSignatureDeclaration:()=>fS,assertTSClassImplements:()=>QS,assertTSConditionalType:()=>WS,assertTSConstructSignatureDeclaration:()=>pS,assertTSConstructorType:()=>MS,assertTSDeclareFunction:()=>lS,assertTSDeclareMethod:()=>uS,assertTSEntityName:()=>WC,assertTSEnumBody:()=>sC,assertTSEnumDeclaration:()=>cC,assertTSEnumMember:()=>lC,assertTSExportAssignment:()=>gC,assertTSExternalModuleReference:()=>mC,assertTSFunctionType:()=>jS,assertTSImportEqualsDeclaration:()=>pC,assertTSImportType:()=>fC,assertTSIndexSignature:()=>gS,assertTSIndexedAccessType:()=>JS,assertTSInferType:()=>GS,assertTSInstantiationExpression:()=>rC,assertTSInterfaceBody:()=>tC,assertTSInterfaceDeclaration:()=>eC,assertTSInterfaceHeritage:()=>$S,assertTSIntersectionType:()=>US,assertTSIntrinsicKeyword:()=>bS,assertTSLiteralType:()=>ZS,assertTSMappedType:()=>YS,assertTSMethodSignature:()=>hS,assertTSModuleBlock:()=>dC,assertTSModuleDeclaration:()=>uC,assertTSNamedTupleMember:()=>VS,assertTSNamespaceExportDeclaration:()=>_C,assertTSNeverKeyword:()=>xS,assertTSNonNullExpression:()=>hC,assertTSNullKeyword:()=>SS,assertTSNumberKeyword:()=>CS,assertTSObjectKeyword:()=>wS,assertTSOptionalType:()=>zS,assertTSParameterProperty:()=>cS,assertTSParenthesizedType:()=>KS,assertTSPropertySignature:()=>mS,assertTSQualifiedName:()=>dS,assertTSRestType:()=>BS,assertTSSatisfiesExpression:()=>aC,assertTSStringKeyword:()=>TS,assertTSSymbolKeyword:()=>ES,assertTSTemplateLiteralType:()=>XS,assertTSThisType:()=>AS,assertTSTupleType:()=>RS,assertTSType:()=>gw,assertTSTypeAliasDeclaration:()=>nC,assertTSTypeAnnotation:()=>vC,assertTSTypeAssertion:()=>oC,assertTSTypeElement:()=>hw,assertTSTypeLiteral:()=>IS,assertTSTypeOperator:()=>qS,assertTSTypeParameter:()=>xC,assertTSTypeParameterDeclaration:()=>bC,assertTSTypeParameterInstantiation:()=>yC,assertTSTypePredicate:()=>PS,assertTSTypeQuery:()=>FS,assertTSTypeReference:()=>NS,assertTSUndefinedKeyword:()=>DS,assertTSUnionType:()=>HS,assertTSUnknownKeyword:()=>OS,assertTSVoidKeyword:()=>kS,assertTaggedTemplateExpression:()=>sb,assertTemplateElement:()=>cb,assertTemplateLiteral:()=>lb,assertTerminatorless:()=>kC,assertThisExpression:()=>My,assertThisTypeAnnotation:()=>px,assertThrowStatement:()=>Ny,assertTopicReference:()=>oS,assertTryStatement:()=>Py,assertTupleTypeAnnotation:()=>mx,assertTypeAlias:()=>gx,assertTypeAnnotation:()=>_x,assertTypeCastExpression:()=>vx,assertTypeParameter:()=>yx,assertTypeParameterDeclaration:()=>bx,assertTypeParameterInstantiation:()=>xx,assertTypeScript:()=>mw,assertTypeofTypeAnnotation:()=>hx,assertUnaryExpression:()=>Fy,assertUnaryLike:()=>ZC,assertUnionTypeAnnotation:()=>Sx,assertUpdateExpression:()=>Iy,assertUserWhitespacable:()=>qC,assertV8IntrinsicIdentifier:()=>Qx,assertVariableDeclaration:()=>Ly,assertVariableDeclarator:()=>Ry,assertVariance:()=>Cx,assertVoidPattern:()=>sS,assertVoidTypeAnnotation:()=>wx,assertWhile:()=>NC,assertWhileStatement:()=>zy,assertWithStatement:()=>By,assertYieldExpression:()=>ub,assignmentExpression:()=>Tl,assignmentPattern:()=>xu,awaitExpression:()=>Gu,bigIntLiteral:()=>Ju,bigIntLiteralTypeAnnotation:()=>Pd,binaryExpression:()=>El,bindExpression:()=>Ff,blockStatement:()=>Al,booleanLiteral:()=>Zl,booleanLiteralTypeAnnotation:()=>sd,booleanTypeAnnotation:()=>od,breakStatement:()=>jl,buildMatchMemberExpression:()=>rc,buildUndefinedNode:()=>Aw,callExpression:()=>Ml,catchClause:()=>Nl,classAccessorProperty:()=>If,classBody:()=>wu,classDeclaration:()=>Eu,classExpression:()=>Tu,classImplements:()=>ld,classMethod:()=>Lu,classPrivateMethod:()=>ed,classPrivateProperty:()=>$u,classProperty:()=>Qu,clone:()=>Lw,cloneDeep:()=>Rw,cloneDeepWithoutLoc:()=>zw,cloneNode:()=>Pw,cloneWithoutLoc:()=>Bw,conditionalExpression:()=>Pl,continueStatement:()=>Fl,createFlowUnionType:()=>Ew,createTSUnionType:()=>kw,createTypeAnnotationBasedOnTypeof:()=>Cw,createUnionTypeAnnotation:()=>Ew,debuggerStatement:()=>Il,declareClass:()=>ud,declareExportAllDeclaration:()=>yd,declareExportDeclaration:()=>vd,declareFunction:()=>dd,declareInterface:()=>fd,declareModule:()=>pd,declareModuleExports:()=>md,declareOpaqueType:()=>gd,declareTypeAlias:()=>hd,declareVariable:()=>_d,declaredPredicate:()=>bd,decorator:()=>Lf,directive:()=>Ol,directiveLiteral:()=>kl,doExpression:()=>Rf,doWhileStatement:()=>Ll,emptyStatement:()=>Rl,emptyTypeAnnotation:()=>jd,ensureBlock:()=>qT,enumBooleanBody:()=>sf,enumBooleanMember:()=>df,enumDeclaration:()=>of,enumDefaultedMember:()=>mf,enumNumberBody:()=>cf,enumNumberMember:()=>ff,enumStringBody:()=>lf,enumStringMember:()=>pf,enumSymbolBody:()=>uf,existsTypeAnnotation:()=>xd,exportAllDeclaration:()=>Du,exportDefaultDeclaration:()=>Ou,exportDefaultSpecifier:()=>zf,exportNamedDeclaration:()=>ku,exportNamespaceSpecifier:()=>Yu,exportSpecifier:()=>Au,expressionStatement:()=>zl,file:()=>Bl,forInStatement:()=>Vl,forOfStatement:()=>ju,forStatement:()=>Hl,functionDeclaration:()=>Ul,functionExpression:()=>Wl,functionTypeAnnotation:()=>Sd,functionTypeParam:()=>Cd,genericTypeAnnotation:()=>wd,getAssignmentIdentifiers:()=>mE,getBindingIdentifiers:()=>hE,getFunctionName:()=>yE,getOuterBindingIdentifiers:()=>gE,identifier:()=>Gl,ifStatement:()=>Kl,import:()=>qu,importAttribute:()=>rd,importDeclaration:()=>Mu,importDefaultSpecifier:()=>Nu,importExpression:()=>Ku,importNamespaceSpecifier:()=>Pu,importSpecifier:()=>Fu,indexedAccessType:()=>hf,inferredPredicate:()=>Td,inheritInnerComments:()=>Ww,inheritLeadingComments:()=>Gw,inheritTrailingComments:()=>Kw,inherits:()=>fE,inheritsComments:()=>qw,interfaceDeclaration:()=>Dd,interfaceExtends:()=>Ed,interfaceTypeAnnotation:()=>Od,interpreterDirective:()=>Dl,intersectionTypeAnnotation:()=>kd,is:()=>C,isAccessor:()=>Gs,isAnyTypeAnnotation:()=>ni,isArgumentPlaceholder:()=>ja,isArrayExpression:()=>Sn,isArrayPattern:()=>br,isArrayTypeAnnotation:()=>ri,isArrowFunctionExpression:()=>xr,isAssignmentExpression:()=>Cn,isAssignmentPattern:()=>yr,isAwaitExpression:()=>Ur,isBigIntLiteral:()=>Kr,isBigIntLiteralTypeAnnotation:()=>Mi,isBinary:()=>rs,isBinaryExpression:()=>wn,isBindExpression:()=>Ma,isBinding:()=>SE,isBlock:()=>os,isBlockParent:()=>as,isBlockScoped:()=>wE,isBlockStatement:()=>On,isBooleanLiteral:()=>Yn,isBooleanLiteralTypeAnnotation:()=>ai,isBooleanTypeAnnotation:()=>ii,isBreakStatement:()=>kn,isCallExpression:()=>An,isCatchClause:()=>jn,isClass:()=>js,isClassAccessorProperty:()=>Na,isClassBody:()=>Sr,isClassDeclaration:()=>wr,isClassExpression:()=>Cr,isClassImplements:()=>si,isClassMethod:()=>Fr,isClassPrivateMethod:()=>Qr,isClassPrivateProperty:()=>Zr,isClassProperty:()=>Xr,isCompletionStatement:()=>ls,isConditional:()=>us,isConditionalExpression:()=>Mn,isContinueStatement:()=>Nn,isDebuggerStatement:()=>Pn,isDeclaration:()=>ys,isDeclareClass:()=>ci,isDeclareExportAllDeclaration:()=>_i,isDeclareExportDeclaration:()=>gi,isDeclareFunction:()=>li,isDeclareInterface:()=>ui,isDeclareModule:()=>di,isDeclareModuleExports:()=>fi,isDeclareOpaqueType:()=>mi,isDeclareTypeAlias:()=>pi,isDeclareVariable:()=>hi,isDeclaredPredicate:()=>vi,isDecorator:()=>Pa,isDirective:()=>En,isDirectiveLiteral:()=>Dn,isDoExpression:()=>Fa,isDoWhileStatement:()=>Fn,isEmptyStatement:()=>In,isEmptyTypeAnnotation:()=>ki,isEnumBody:()=>Vs,isEnumBooleanBody:()=>ia,isEnumBooleanMember:()=>ca,isEnumDeclaration:()=>ra,isEnumDefaultedMember:()=>da,isEnumMember:()=>Hs,isEnumNumberBody:()=>aa,isEnumNumberMember:()=>la,isEnumStringBody:()=>oa,isEnumStringMember:()=>ua,isEnumSymbolBody:()=>sa,isExistsTypeAnnotation:()=>yi,isExportAllDeclaration:()=>Tr,isExportDeclaration:()=>Ns,isExportDefaultDeclaration:()=>Er,isExportDefaultSpecifier:()=>Ia,isExportNamedDeclaration:()=>Dr,isExportNamespaceSpecifier:()=>qr,isExportSpecifier:()=>Or,isExpression:()=>ns,isExpressionStatement:()=>Ln,isExpressionWrapper:()=>ps,isFile:()=>Rn,isFlow:()=>Is,isFlowBaseAnnotation:()=>Rs,isFlowDeclaration:()=>zs,isFlowPredicate:()=>Bs,isFlowType:()=>Ls,isFor:()=>ms,isForInStatement:()=>zn,isForOfStatement:()=>kr,isForStatement:()=>Bn,isForXStatement:()=>hs,isFunction:()=>gs,isFunctionDeclaration:()=>Vn,isFunctionExpression:()=>Hn,isFunctionParameter:()=>bs,isFunctionParent:()=>_s,isFunctionTypeAnnotation:()=>bi,isFunctionTypeParam:()=>xi,isGenericTypeAnnotation:()=>Si,isIdentifier:()=>Un,isIfStatement:()=>Wn,isImmutable:()=>TE,isImport:()=>Gr,isImportAttribute:()=>ti,isImportDeclaration:()=>Ar,isImportDefaultSpecifier:()=>jr,isImportExpression:()=>Wr,isImportNamespaceSpecifier:()=>Mr,isImportOrExportDeclaration:()=>Ms,isImportSpecifier:()=>Nr,isIndexedAccessType:()=>fa,isInferredPredicate:()=>Ci,isInterfaceDeclaration:()=>Ti,isInterfaceExtends:()=>wi,isInterfaceTypeAnnotation:()=>Ei,isInterpreterDirective:()=>Tn,isIntersectionTypeAnnotation:()=>Di,isJSX:()=>Us,isJSXAttribute:()=>ma,isJSXClosingElement:()=>ha,isJSXClosingFragment:()=>Oa,isJSXElement:()=>ga,isJSXEmptyExpression:()=>_a,isJSXExpressionContainer:()=>va,isJSXFragment:()=>Ea,isJSXIdentifier:()=>ba,isJSXMemberExpression:()=>xa,isJSXNamespacedName:()=>Sa,isJSXOpeningElement:()=>Ca,isJSXOpeningFragment:()=>Da,isJSXSpreadAttribute:()=>wa,isJSXSpreadChild:()=>ya,isJSXText:()=>Ta,isLVal:()=>Ss,isLabeledStatement:()=>Gn,isLet:()=>CE,isLiteral:()=>ws,isLogicalExpression:()=>Zn,isLoop:()=>ds,isMemberExpression:()=>Qn,isMetaProperty:()=>Pr,isMethod:()=>Es,isMiscellaneous:()=>Ws,isMixedTypeAnnotation:()=>Oi,isModuleDeclaration:()=>ec,isModuleExpression:()=>La,isModuleSpecifier:()=>Ps,isNewExpression:()=>$n,isNode:()=>Hv,isNodesEquivalent:()=>EE,isNullLiteral:()=>Jn,isNullLiteralTypeAnnotation:()=>oi,isNullableTypeAnnotation:()=>Ai,isNumberLiteral:()=>Xs,isNumberLiteralTypeAnnotation:()=>ji,isNumberTypeAnnotation:()=>Ni,isNumericLiteral:()=>qn,isObjectExpression:()=>tr,isObjectMember:()=>Ds,isObjectMethod:()=>nr,isObjectPattern:()=>Ir,isObjectProperty:()=>rr,isObjectTypeAnnotation:()=>Pi,isObjectTypeCallProperty:()=>Ii,isObjectTypeIndexer:()=>Li,isObjectTypeInternalSlot:()=>Fi,isObjectTypeProperty:()=>Ri,isObjectTypeSpreadProperty:()=>zi,isOpaqueType:()=>Bi,isOptionalCallExpression:()=>Yr,isOptionalIndexedAccessType:()=>pa,isOptionalMemberExpression:()=>Jr,isParenthesizedExpression:()=>sr,isPattern:()=>As,isPatternLike:()=>xs,isPlaceholder:()=>ka,isPlaceholderType:()=>sc,isPrivate:()=>Fs,isPrivateName:()=>$r,isProgram:()=>er,isProperty:()=>Os,isPureish:()=>vs,isQualifiedTypeIdentifier:()=>Vi,isReferenced:()=>DE,isRegExpLiteral:()=>Xn,isRegexLiteral:()=>Zs,isRestElement:()=>ir,isRestProperty:()=>Qs,isReturnStatement:()=>ar,isScopable:()=>is,isScope:()=>OE,isSequenceExpression:()=>or,isSpecifierDefault:()=>kE,isSpreadElement:()=>Lr,isSpreadProperty:()=>$s,isStandardized:()=>ts,isStatement:()=>ss,isStaticBlock:()=>ei,isStringLiteral:()=>Kn,isStringLiteralTypeAnnotation:()=>Hi,isStringTypeAnnotation:()=>Ui,isSuper:()=>Rr,isSwitchCase:()=>cr,isSwitchStatement:()=>lr,isSymbolTypeAnnotation:()=>Wi,isTSAnyKeyword:()=>Ya,isTSArrayType:()=>go,isTSAsExpression:()=>Lo,isTSBaseType:()=>Ys,isTSBigIntKeyword:()=>Za,isTSBooleanKeyword:()=>Xa,isTSCallSignatureDeclaration:()=>Wa,isTSClassImplements:()=>jo,isTSConditionalType:()=>Co,isTSConstructSignatureDeclaration:()=>Ga,isTSConstructorType:()=>uo,isTSDeclareFunction:()=>Va,isTSDeclareMethod:()=>Ha,isTSEntityName:()=>Cs,isTSEnumBody:()=>Bo,isTSEnumDeclaration:()=>Vo,isTSEnumMember:()=>Ho,isTSExportAssignment:()=>Yo,isTSExternalModuleReference:()=>qo,isTSFunctionType:()=>lo,isTSImportEqualsDeclaration:()=>Ko,isTSImportType:()=>Go,isTSIndexSignature:()=>Ja,isTSIndexedAccessType:()=>Do,isTSInferType:()=>wo,isTSInstantiationExpression:()=>Io,isTSInterfaceBody:()=>Po,isTSInterfaceDeclaration:()=>No,isTSInterfaceHeritage:()=>Mo,isTSIntersectionType:()=>So,isTSIntrinsicKeyword:()=>Qa,isTSLiteralType:()=>Ao,isTSMappedType:()=>Oo,isTSMethodSignature:()=>qa,isTSModuleBlock:()=>Wo,isTSModuleDeclaration:()=>Uo,isTSNamedTupleMember:()=>bo,isTSNamespaceExportDeclaration:()=>Xo,isTSNeverKeyword:()=>$a,isTSNonNullExpression:()=>Jo,isTSNullKeyword:()=>eo,isTSNumberKeyword:()=>to,isTSObjectKeyword:()=>no,isTSOptionalType:()=>vo,isTSParameterProperty:()=>Ba,isTSParenthesizedType:()=>To,isTSPropertySignature:()=>Ka,isTSQualifiedName:()=>Ua,isTSRestType:()=>yo,isTSSatisfiesExpression:()=>Ro,isTSStringKeyword:()=>ro,isTSSymbolKeyword:()=>io,isTSTemplateLiteralType:()=>ko,isTSThisType:()=>co,isTSTupleType:()=>_o,isTSType:()=>Js,isTSTypeAliasDeclaration:()=>Fo,isTSTypeAnnotation:()=>Zo,isTSTypeAssertion:()=>zo,isTSTypeElement:()=>qs,isTSTypeLiteral:()=>ho,isTSTypeOperator:()=>Eo,isTSTypeParameter:()=>es,isTSTypeParameterDeclaration:()=>$o,isTSTypeParameterInstantiation:()=>Qo,isTSTypePredicate:()=>po,isTSTypeQuery:()=>mo,isTSTypeReference:()=>fo,isTSUndefinedKeyword:()=>ao,isTSUnionType:()=>xo,isTSUnknownKeyword:()=>oo,isTSVoidKeyword:()=>so,isTaggedTemplateExpression:()=>zr,isTemplateElement:()=>Br,isTemplateLiteral:()=>Vr,isTerminatorless:()=>cs,isThisExpression:()=>ur,isThisTypeAnnotation:()=>Gi,isThrowStatement:()=>dr,isTopicReference:()=>Ra,isTryStatement:()=>fr,isTupleTypeAnnotation:()=>Ki,isType:()=>oc,isTypeAlias:()=>Ji,isTypeAnnotation:()=>Yi,isTypeCastExpression:()=>Xi,isTypeParameter:()=>Zi,isTypeParameterDeclaration:()=>Qi,isTypeParameterInstantiation:()=>$i,isTypeScript:()=>Ks,isTypeofTypeAnnotation:()=>qi,isUnaryExpression:()=>pr,isUnaryLike:()=>ks,isUnionTypeAnnotation:()=>ea,isUpdateExpression:()=>mr,isUserWhitespacable:()=>Ts,isV8IntrinsicIdentifier:()=>Aa,isValidES3Identifier:()=>jE,isValidIdentifier:()=>cc,isVar:()=>ME,isVariableDeclaration:()=>hr,isVariableDeclarator:()=>gr,isVariance:()=>ta,isVoidPattern:()=>za,isVoidTypeAnnotation:()=>na,isWhile:()=>fs,isWhileStatement:()=>_r,isWithStatement:()=>vr,isYieldExpression:()=>Hr,jsxAttribute:()=>_f,jsxClosingElement:()=>vf,jsxClosingFragment:()=>jf,jsxElement:()=>yf,jsxEmptyExpression:()=>bf,jsxExpressionContainer:()=>xf,jsxFragment:()=>kf,jsxIdentifier:()=>Cf,jsxMemberExpression:()=>wf,jsxNamespacedName:()=>Tf,jsxOpeningElement:()=>Ef,jsxOpeningFragment:()=>Af,jsxSpreadAttribute:()=>Df,jsxSpreadChild:()=>Sf,jsxText:()=>Of,labeledStatement:()=>ql,logicalExpression:()=>$l,matchesPattern:()=>nc,memberExpression:()=>eu,metaProperty:()=>Iu,mixedTypeAnnotation:()=>Ad,moduleExpression:()=>Bf,newExpression:()=>tu,nullLiteral:()=>Xl,nullLiteralTypeAnnotation:()=>cd,nullableTypeAnnotation:()=>Md,numberLiteral:()=>rm,numberLiteralTypeAnnotation:()=>Nd,numberTypeAnnotation:()=>Fd,numericLiteral:()=>Yl,objectExpression:()=>ru,objectMethod:()=>iu,objectPattern:()=>Ru,objectProperty:()=>au,objectTypeAnnotation:()=>Id,objectTypeCallProperty:()=>Rd,objectTypeIndexer:()=>zd,objectTypeInternalSlot:()=>Ld,objectTypeProperty:()=>Bd,objectTypeSpreadProperty:()=>Vd,opaqueType:()=>Hd,optionalCallExpression:()=>Zu,optionalIndexedAccessType:()=>gf,optionalMemberExpression:()=>Xu,parenthesizedExpression:()=>lu,placeholder:()=>Mf,prependToMemberExpression:()=>pE,privateName:()=>td,program:()=>nu,qualifiedTypeIdentifier:()=>Ud,react:()=>NE,regExpLiteral:()=>Ql,regexLiteral:()=>im,removeComments:()=>Jw,removeProperties:()=>rE,removePropertiesDeep:()=>iE,removeTypeDuplicates:()=>Tw,restElement:()=>ou,restProperty:()=>am,returnStatement:()=>su,sequenceExpression:()=>cu,shallowEqual:()=>x,spreadElement:()=>zu,spreadProperty:()=>om,staticBlock:()=>nd,stringLiteral:()=>Jl,stringLiteralTypeAnnotation:()=>Wd,stringTypeAnnotation:()=>Gd,super:()=>Bu,switchCase:()=>uu,switchStatement:()=>du,symbolTypeAnnotation:()=>Kd,taggedTemplateExpression:()=>Vu,templateElement:()=>Hu,templateLiteral:()=>Uu,thisExpression:()=>fu,thisTypeAnnotation:()=>qd,throwStatement:()=>pu,toBindingIdentifierName:()=>YT,toBlock:()=>KT,toComputedKey:()=>XT,toExpression:()=>ZT,toIdentifier:()=>JT,toKeyAlias:()=>aE,toStatement:()=>oE,topicReference:()=>Vf,traverse:()=>bE,traverseFast:()=>eE,tryStatement:()=>mu,tsAnyKeyword:()=>Qf,tsArrayType:()=>vp,tsAsExpression:()=>zp,tsBigIntKeyword:()=>ep,tsBooleanKeyword:()=>$f,tsCallSignatureDeclaration:()=>qf,tsClassImplements:()=>Np,tsConditionalType:()=>Tp,tsConstructSignatureDeclaration:()=>Jf,tsConstructorType:()=>pp,tsDeclareFunction:()=>Wf,tsDeclareMethod:()=>Gf,tsEnumBody:()=>Hp,tsEnumDeclaration:()=>Up,tsEnumMember:()=>Wp,tsExportAssignment:()=>Zp,tsExternalModuleReference:()=>Yp,tsFunctionType:()=>fp,tsImportEqualsDeclaration:()=>Jp,tsImportType:()=>qp,tsIndexSignature:()=>Zf,tsIndexedAccessType:()=>kp,tsInferType:()=>Ep,tsInstantiationExpression:()=>Rp,tsInterfaceBody:()=>Ip,tsInterfaceDeclaration:()=>Fp,tsInterfaceHeritage:()=>Pp,tsIntersectionType:()=>wp,tsIntrinsicKeyword:()=>tp,tsLiteralType:()=>Mp,tsMappedType:()=>Ap,tsMethodSignature:()=>Xf,tsModuleBlock:()=>Kp,tsModuleDeclaration:()=>Gp,tsNamedTupleMember:()=>Sp,tsNamespaceExportDeclaration:()=>Qp,tsNeverKeyword:()=>np,tsNonNullExpression:()=>Xp,tsNullKeyword:()=>rp,tsNumberKeyword:()=>ip,tsObjectKeyword:()=>ap,tsOptionalType:()=>bp,tsParameterProperty:()=>Uf,tsParenthesizedType:()=>Dp,tsPropertySignature:()=>Yf,tsQualifiedName:()=>Kf,tsRestType:()=>xp,tsSatisfiesExpression:()=>Bp,tsStringKeyword:()=>op,tsSymbolKeyword:()=>sp,tsTemplateLiteralType:()=>jp,tsThisType:()=>dp,tsTupleType:()=>yp,tsTypeAliasDeclaration:()=>Lp,tsTypeAnnotation:()=>$p,tsTypeAssertion:()=>Vp,tsTypeLiteral:()=>_p,tsTypeOperator:()=>Op,tsTypeParameter:()=>nm,tsTypeParameterDeclaration:()=>tm,tsTypeParameterInstantiation:()=>em,tsTypePredicate:()=>hp,tsTypeQuery:()=>gp,tsTypeReference:()=>mp,tsUndefinedKeyword:()=>cp,tsUnionType:()=>Cp,tsUnknownKeyword:()=>lp,tsVoidKeyword:()=>up,tupleTypeAnnotation:()=>Jd,typeAlias:()=>Xd,typeAnnotation:()=>Zd,typeCastExpression:()=>Qd,typeParameter:()=>$d,typeParameterDeclaration:()=>ef,typeParameterInstantiation:()=>tf,typeofTypeAnnotation:()=>Yd,unaryExpression:()=>hu,unionTypeAnnotation:()=>nf,updateExpression:()=>gu,v8IntrinsicIdentifier:()=>Nf,validate:()=>bl,valueToNode:()=>uE,variableDeclaration:()=>_u,variableDeclarator:()=>vu,variance:()=>rf,voidPattern:()=>Hf,voidTypeAnnotation:()=>af,whileStatement:()=>yu,withStatement:()=>bu,yieldExpression:()=>Wu});function x(e,t){let n=Object.keys(t);for(let r of n)if(e[r]!==t[r])return!1;return!0}const bn=new Set;function S(e,t,n=``,r=e){if(bn.has(r))return;bn.add(r);let{internal:i,trace:a}=xn(1,2);i||console.warn(`${n}\`${e}\` has been deprecated, please migrate to \`${t}\`\n${a}`)}function xn(e,t){let{stackTraceLimit:n,prepareStackTrace:r}=Error,i;if(Error.stackTraceLimit=1+e+t,Error.prepareStackTrace=function(e,t){i=t},Error().stack,Error.stackTraceLimit=n,Error.prepareStackTrace=r,!i)return{internal:!1,trace:``};let a=i.slice(1+e,1+e+t);return{internal:/[\\/]@babel[\\/]/.test(a[1].getFileName()),trace:a.map(e=>` at ${e}`).join(`
|
|
4
|
+
`)}}function Sn(e,t){return!e||e.type!==`ArrayExpression`?!1:t==null||x(e,t)}function Cn(e,t){return!e||e.type!==`AssignmentExpression`?!1:t==null||x(e,t)}function wn(e,t){return!e||e.type!==`BinaryExpression`?!1:t==null||x(e,t)}function Tn(e,t){return!e||e.type!==`InterpreterDirective`?!1:t==null||x(e,t)}function En(e,t){return!e||e.type!==`Directive`?!1:t==null||x(e,t)}function Dn(e,t){return!e||e.type!==`DirectiveLiteral`?!1:t==null||x(e,t)}function On(e,t){return!e||e.type!==`BlockStatement`?!1:t==null||x(e,t)}function kn(e,t){return!e||e.type!==`BreakStatement`?!1:t==null||x(e,t)}function An(e,t){return!e||e.type!==`CallExpression`?!1:t==null||x(e,t)}function jn(e,t){return!e||e.type!==`CatchClause`?!1:t==null||x(e,t)}function Mn(e,t){return!e||e.type!==`ConditionalExpression`?!1:t==null||x(e,t)}function Nn(e,t){return!e||e.type!==`ContinueStatement`?!1:t==null||x(e,t)}function Pn(e,t){return!e||e.type!==`DebuggerStatement`?!1:t==null||x(e,t)}function Fn(e,t){return!e||e.type!==`DoWhileStatement`?!1:t==null||x(e,t)}function In(e,t){return!e||e.type!==`EmptyStatement`?!1:t==null||x(e,t)}function Ln(e,t){return!e||e.type!==`ExpressionStatement`?!1:t==null||x(e,t)}function Rn(e,t){return!e||e.type!==`File`?!1:t==null||x(e,t)}function zn(e,t){return!e||e.type!==`ForInStatement`?!1:t==null||x(e,t)}function Bn(e,t){return!e||e.type!==`ForStatement`?!1:t==null||x(e,t)}function Vn(e,t){return!e||e.type!==`FunctionDeclaration`?!1:t==null||x(e,t)}function Hn(e,t){return!e||e.type!==`FunctionExpression`?!1:t==null||x(e,t)}function Un(e,t){return!e||e.type!==`Identifier`?!1:t==null||x(e,t)}function Wn(e,t){return!e||e.type!==`IfStatement`?!1:t==null||x(e,t)}function Gn(e,t){return!e||e.type!==`LabeledStatement`?!1:t==null||x(e,t)}function Kn(e,t){return!e||e.type!==`StringLiteral`?!1:t==null||x(e,t)}function qn(e,t){return!e||e.type!==`NumericLiteral`?!1:t==null||x(e,t)}function Jn(e,t){return!e||e.type!==`NullLiteral`?!1:t==null||x(e,t)}function Yn(e,t){return!e||e.type!==`BooleanLiteral`?!1:t==null||x(e,t)}function Xn(e,t){return!e||e.type!==`RegExpLiteral`?!1:t==null||x(e,t)}function Zn(e,t){return!e||e.type!==`LogicalExpression`?!1:t==null||x(e,t)}function Qn(e,t){return!e||e.type!==`MemberExpression`?!1:t==null||x(e,t)}function $n(e,t){return!e||e.type!==`NewExpression`?!1:t==null||x(e,t)}function er(e,t){return!e||e.type!==`Program`?!1:t==null||x(e,t)}function tr(e,t){return!e||e.type!==`ObjectExpression`?!1:t==null||x(e,t)}function nr(e,t){return!e||e.type!==`ObjectMethod`?!1:t==null||x(e,t)}function rr(e,t){return!e||e.type!==`ObjectProperty`?!1:t==null||x(e,t)}function ir(e,t){return!e||e.type!==`RestElement`?!1:t==null||x(e,t)}function ar(e,t){return!e||e.type!==`ReturnStatement`?!1:t==null||x(e,t)}function or(e,t){return!e||e.type!==`SequenceExpression`?!1:t==null||x(e,t)}function sr(e,t){return!e||e.type!==`ParenthesizedExpression`?!1:t==null||x(e,t)}function cr(e,t){return!e||e.type!==`SwitchCase`?!1:t==null||x(e,t)}function lr(e,t){return!e||e.type!==`SwitchStatement`?!1:t==null||x(e,t)}function ur(e,t){return!e||e.type!==`ThisExpression`?!1:t==null||x(e,t)}function dr(e,t){return!e||e.type!==`ThrowStatement`?!1:t==null||x(e,t)}function fr(e,t){return!e||e.type!==`TryStatement`?!1:t==null||x(e,t)}function pr(e,t){return!e||e.type!==`UnaryExpression`?!1:t==null||x(e,t)}function mr(e,t){return!e||e.type!==`UpdateExpression`?!1:t==null||x(e,t)}function hr(e,t){return!e||e.type!==`VariableDeclaration`?!1:t==null||x(e,t)}function gr(e,t){return!e||e.type!==`VariableDeclarator`?!1:t==null||x(e,t)}function _r(e,t){return!e||e.type!==`WhileStatement`?!1:t==null||x(e,t)}function vr(e,t){return!e||e.type!==`WithStatement`?!1:t==null||x(e,t)}function yr(e,t){return!e||e.type!==`AssignmentPattern`?!1:t==null||x(e,t)}function br(e,t){return!e||e.type!==`ArrayPattern`?!1:t==null||x(e,t)}function xr(e,t){return!e||e.type!==`ArrowFunctionExpression`?!1:t==null||x(e,t)}function Sr(e,t){return!e||e.type!==`ClassBody`?!1:t==null||x(e,t)}function Cr(e,t){return!e||e.type!==`ClassExpression`?!1:t==null||x(e,t)}function wr(e,t){return!e||e.type!==`ClassDeclaration`?!1:t==null||x(e,t)}function Tr(e,t){return!e||e.type!==`ExportAllDeclaration`?!1:t==null||x(e,t)}function Er(e,t){return!e||e.type!==`ExportDefaultDeclaration`?!1:t==null||x(e,t)}function Dr(e,t){return!e||e.type!==`ExportNamedDeclaration`?!1:t==null||x(e,t)}function Or(e,t){return!e||e.type!==`ExportSpecifier`?!1:t==null||x(e,t)}function kr(e,t){return!e||e.type!==`ForOfStatement`?!1:t==null||x(e,t)}function Ar(e,t){return!e||e.type!==`ImportDeclaration`?!1:t==null||x(e,t)}function jr(e,t){return!e||e.type!==`ImportDefaultSpecifier`?!1:t==null||x(e,t)}function Mr(e,t){return!e||e.type!==`ImportNamespaceSpecifier`?!1:t==null||x(e,t)}function Nr(e,t){return!e||e.type!==`ImportSpecifier`?!1:t==null||x(e,t)}function Pr(e,t){return!e||e.type!==`MetaProperty`?!1:t==null||x(e,t)}function Fr(e,t){return!e||e.type!==`ClassMethod`?!1:t==null||x(e,t)}function Ir(e,t){return!e||e.type!==`ObjectPattern`?!1:t==null||x(e,t)}function Lr(e,t){return!e||e.type!==`SpreadElement`?!1:t==null||x(e,t)}function Rr(e,t){return!e||e.type!==`Super`?!1:t==null||x(e,t)}function zr(e,t){return!e||e.type!==`TaggedTemplateExpression`?!1:t==null||x(e,t)}function Br(e,t){return!e||e.type!==`TemplateElement`?!1:t==null||x(e,t)}function Vr(e,t){return!e||e.type!==`TemplateLiteral`?!1:t==null||x(e,t)}function Hr(e,t){return!e||e.type!==`YieldExpression`?!1:t==null||x(e,t)}function Ur(e,t){return!e||e.type!==`AwaitExpression`?!1:t==null||x(e,t)}function Wr(e,t){return!e||e.type!==`ImportExpression`?!1:t==null||x(e,t)}function Gr(e,t){return!e||e.type!==`Import`?!1:t==null||x(e,t)}function Kr(e,t){return!e||e.type!==`BigIntLiteral`?!1:t==null||x(e,t)}function qr(e,t){return!e||e.type!==`ExportNamespaceSpecifier`?!1:t==null||x(e,t)}function Jr(e,t){return!e||e.type!==`OptionalMemberExpression`?!1:t==null||x(e,t)}function Yr(e,t){return!e||e.type!==`OptionalCallExpression`?!1:t==null||x(e,t)}function Xr(e,t){return!e||e.type!==`ClassProperty`?!1:t==null||x(e,t)}function Zr(e,t){return!e||e.type!==`ClassPrivateProperty`?!1:t==null||x(e,t)}function Qr(e,t){return!e||e.type!==`ClassPrivateMethod`?!1:t==null||x(e,t)}function $r(e,t){return!e||e.type!==`PrivateName`?!1:t==null||x(e,t)}function ei(e,t){return!e||e.type!==`StaticBlock`?!1:t==null||x(e,t)}function ti(e,t){return!e||e.type!==`ImportAttribute`?!1:t==null||x(e,t)}function ni(e,t){return!e||e.type!==`AnyTypeAnnotation`?!1:t==null||x(e,t)}function ri(e,t){return!e||e.type!==`ArrayTypeAnnotation`?!1:t==null||x(e,t)}function ii(e,t){return!e||e.type!==`BooleanTypeAnnotation`?!1:t==null||x(e,t)}function ai(e,t){return!e||e.type!==`BooleanLiteralTypeAnnotation`?!1:t==null||x(e,t)}function oi(e,t){return!e||e.type!==`NullLiteralTypeAnnotation`?!1:t==null||x(e,t)}function si(e,t){return!e||e.type!==`ClassImplements`?!1:t==null||x(e,t)}function ci(e,t){return!e||e.type!==`DeclareClass`?!1:t==null||x(e,t)}function li(e,t){return!e||e.type!==`DeclareFunction`?!1:t==null||x(e,t)}function ui(e,t){return!e||e.type!==`DeclareInterface`?!1:t==null||x(e,t)}function di(e,t){return!e||e.type!==`DeclareModule`?!1:t==null||x(e,t)}function fi(e,t){return!e||e.type!==`DeclareModuleExports`?!1:t==null||x(e,t)}function pi(e,t){return!e||e.type!==`DeclareTypeAlias`?!1:t==null||x(e,t)}function mi(e,t){return!e||e.type!==`DeclareOpaqueType`?!1:t==null||x(e,t)}function hi(e,t){return!e||e.type!==`DeclareVariable`?!1:t==null||x(e,t)}function gi(e,t){return!e||e.type!==`DeclareExportDeclaration`?!1:t==null||x(e,t)}function _i(e,t){return!e||e.type!==`DeclareExportAllDeclaration`?!1:t==null||x(e,t)}function vi(e,t){return!e||e.type!==`DeclaredPredicate`?!1:t==null||x(e,t)}function yi(e,t){return!e||e.type!==`ExistsTypeAnnotation`?!1:t==null||x(e,t)}function bi(e,t){return!e||e.type!==`FunctionTypeAnnotation`?!1:t==null||x(e,t)}function xi(e,t){return!e||e.type!==`FunctionTypeParam`?!1:t==null||x(e,t)}function Si(e,t){return!e||e.type!==`GenericTypeAnnotation`?!1:t==null||x(e,t)}function Ci(e,t){return!e||e.type!==`InferredPredicate`?!1:t==null||x(e,t)}function wi(e,t){return!e||e.type!==`InterfaceExtends`?!1:t==null||x(e,t)}function Ti(e,t){return!e||e.type!==`InterfaceDeclaration`?!1:t==null||x(e,t)}function Ei(e,t){return!e||e.type!==`InterfaceTypeAnnotation`?!1:t==null||x(e,t)}function Di(e,t){return!e||e.type!==`IntersectionTypeAnnotation`?!1:t==null||x(e,t)}function Oi(e,t){return!e||e.type!==`MixedTypeAnnotation`?!1:t==null||x(e,t)}function ki(e,t){return!e||e.type!==`EmptyTypeAnnotation`?!1:t==null||x(e,t)}function Ai(e,t){return!e||e.type!==`NullableTypeAnnotation`?!1:t==null||x(e,t)}function ji(e,t){return!e||e.type!==`NumberLiteralTypeAnnotation`?!1:t==null||x(e,t)}function Mi(e,t){return!e||e.type!==`BigIntLiteralTypeAnnotation`?!1:t==null||x(e,t)}function Ni(e,t){return!e||e.type!==`NumberTypeAnnotation`?!1:t==null||x(e,t)}function Pi(e,t){return!e||e.type!==`ObjectTypeAnnotation`?!1:t==null||x(e,t)}function Fi(e,t){return!e||e.type!==`ObjectTypeInternalSlot`?!1:t==null||x(e,t)}function Ii(e,t){return!e||e.type!==`ObjectTypeCallProperty`?!1:t==null||x(e,t)}function Li(e,t){return!e||e.type!==`ObjectTypeIndexer`?!1:t==null||x(e,t)}function Ri(e,t){return!e||e.type!==`ObjectTypeProperty`?!1:t==null||x(e,t)}function zi(e,t){return!e||e.type!==`ObjectTypeSpreadProperty`?!1:t==null||x(e,t)}function Bi(e,t){return!e||e.type!==`OpaqueType`?!1:t==null||x(e,t)}function Vi(e,t){return!e||e.type!==`QualifiedTypeIdentifier`?!1:t==null||x(e,t)}function Hi(e,t){return!e||e.type!==`StringLiteralTypeAnnotation`?!1:t==null||x(e,t)}function Ui(e,t){return!e||e.type!==`StringTypeAnnotation`?!1:t==null||x(e,t)}function Wi(e,t){return!e||e.type!==`SymbolTypeAnnotation`?!1:t==null||x(e,t)}function Gi(e,t){return!e||e.type!==`ThisTypeAnnotation`?!1:t==null||x(e,t)}function Ki(e,t){return!e||e.type!==`TupleTypeAnnotation`?!1:t==null||x(e,t)}function qi(e,t){return!e||e.type!==`TypeofTypeAnnotation`?!1:t==null||x(e,t)}function Ji(e,t){return!e||e.type!==`TypeAlias`?!1:t==null||x(e,t)}function Yi(e,t){return!e||e.type!==`TypeAnnotation`?!1:t==null||x(e,t)}function Xi(e,t){return!e||e.type!==`TypeCastExpression`?!1:t==null||x(e,t)}function Zi(e,t){return!e||e.type!==`TypeParameter`?!1:t==null||x(e,t)}function Qi(e,t){return!e||e.type!==`TypeParameterDeclaration`?!1:t==null||x(e,t)}function $i(e,t){return!e||e.type!==`TypeParameterInstantiation`?!1:t==null||x(e,t)}function ea(e,t){return!e||e.type!==`UnionTypeAnnotation`?!1:t==null||x(e,t)}function ta(e,t){return!e||e.type!==`Variance`?!1:t==null||x(e,t)}function na(e,t){return!e||e.type!==`VoidTypeAnnotation`?!1:t==null||x(e,t)}function ra(e,t){return!e||e.type!==`EnumDeclaration`?!1:t==null||x(e,t)}function ia(e,t){return!e||e.type!==`EnumBooleanBody`?!1:t==null||x(e,t)}function aa(e,t){return!e||e.type!==`EnumNumberBody`?!1:t==null||x(e,t)}function oa(e,t){return!e||e.type!==`EnumStringBody`?!1:t==null||x(e,t)}function sa(e,t){return!e||e.type!==`EnumSymbolBody`?!1:t==null||x(e,t)}function ca(e,t){return!e||e.type!==`EnumBooleanMember`?!1:t==null||x(e,t)}function la(e,t){return!e||e.type!==`EnumNumberMember`?!1:t==null||x(e,t)}function ua(e,t){return!e||e.type!==`EnumStringMember`?!1:t==null||x(e,t)}function da(e,t){return!e||e.type!==`EnumDefaultedMember`?!1:t==null||x(e,t)}function fa(e,t){return!e||e.type!==`IndexedAccessType`?!1:t==null||x(e,t)}function pa(e,t){return!e||e.type!==`OptionalIndexedAccessType`?!1:t==null||x(e,t)}function ma(e,t){return!e||e.type!==`JSXAttribute`?!1:t==null||x(e,t)}function ha(e,t){return!e||e.type!==`JSXClosingElement`?!1:t==null||x(e,t)}function ga(e,t){return!e||e.type!==`JSXElement`?!1:t==null||x(e,t)}function _a(e,t){return!e||e.type!==`JSXEmptyExpression`?!1:t==null||x(e,t)}function va(e,t){return!e||e.type!==`JSXExpressionContainer`?!1:t==null||x(e,t)}function ya(e,t){return!e||e.type!==`JSXSpreadChild`?!1:t==null||x(e,t)}function ba(e,t){return!e||e.type!==`JSXIdentifier`?!1:t==null||x(e,t)}function xa(e,t){return!e||e.type!==`JSXMemberExpression`?!1:t==null||x(e,t)}function Sa(e,t){return!e||e.type!==`JSXNamespacedName`?!1:t==null||x(e,t)}function Ca(e,t){return!e||e.type!==`JSXOpeningElement`?!1:t==null||x(e,t)}function wa(e,t){return!e||e.type!==`JSXSpreadAttribute`?!1:t==null||x(e,t)}function Ta(e,t){return!e||e.type!==`JSXText`?!1:t==null||x(e,t)}function Ea(e,t){return!e||e.type!==`JSXFragment`?!1:t==null||x(e,t)}function Da(e,t){return!e||e.type!==`JSXOpeningFragment`?!1:t==null||x(e,t)}function Oa(e,t){return!e||e.type!==`JSXClosingFragment`?!1:t==null||x(e,t)}function ka(e,t){return!e||e.type!==`Placeholder`?!1:t==null||x(e,t)}function Aa(e,t){return!e||e.type!==`V8IntrinsicIdentifier`?!1:t==null||x(e,t)}function ja(e,t){return!e||e.type!==`ArgumentPlaceholder`?!1:t==null||x(e,t)}function Ma(e,t){return!e||e.type!==`BindExpression`?!1:t==null||x(e,t)}function Na(e,t){return!e||e.type!==`ClassAccessorProperty`?!1:t==null||x(e,t)}function Pa(e,t){return!e||e.type!==`Decorator`?!1:t==null||x(e,t)}function Fa(e,t){return!e||e.type!==`DoExpression`?!1:t==null||x(e,t)}function Ia(e,t){return!e||e.type!==`ExportDefaultSpecifier`?!1:t==null||x(e,t)}function La(e,t){return!e||e.type!==`ModuleExpression`?!1:t==null||x(e,t)}function Ra(e,t){return!e||e.type!==`TopicReference`?!1:t==null||x(e,t)}function za(e,t){return!e||e.type!==`VoidPattern`?!1:t==null||x(e,t)}function Ba(e,t){return!e||e.type!==`TSParameterProperty`?!1:t==null||x(e,t)}function Va(e,t){return!e||e.type!==`TSDeclareFunction`?!1:t==null||x(e,t)}function Ha(e,t){return!e||e.type!==`TSDeclareMethod`?!1:t==null||x(e,t)}function Ua(e,t){return!e||e.type!==`TSQualifiedName`?!1:t==null||x(e,t)}function Wa(e,t){return!e||e.type!==`TSCallSignatureDeclaration`?!1:t==null||x(e,t)}function Ga(e,t){return!e||e.type!==`TSConstructSignatureDeclaration`?!1:t==null||x(e,t)}function Ka(e,t){return!e||e.type!==`TSPropertySignature`?!1:t==null||x(e,t)}function qa(e,t){return!e||e.type!==`TSMethodSignature`?!1:t==null||x(e,t)}function Ja(e,t){return!e||e.type!==`TSIndexSignature`?!1:t==null||x(e,t)}function Ya(e,t){return!e||e.type!==`TSAnyKeyword`?!1:t==null||x(e,t)}function Xa(e,t){return!e||e.type!==`TSBooleanKeyword`?!1:t==null||x(e,t)}function Za(e,t){return!e||e.type!==`TSBigIntKeyword`?!1:t==null||x(e,t)}function Qa(e,t){return!e||e.type!==`TSIntrinsicKeyword`?!1:t==null||x(e,t)}function $a(e,t){return!e||e.type!==`TSNeverKeyword`?!1:t==null||x(e,t)}function eo(e,t){return!e||e.type!==`TSNullKeyword`?!1:t==null||x(e,t)}function to(e,t){return!e||e.type!==`TSNumberKeyword`?!1:t==null||x(e,t)}function no(e,t){return!e||e.type!==`TSObjectKeyword`?!1:t==null||x(e,t)}function ro(e,t){return!e||e.type!==`TSStringKeyword`?!1:t==null||x(e,t)}function io(e,t){return!e||e.type!==`TSSymbolKeyword`?!1:t==null||x(e,t)}function ao(e,t){return!e||e.type!==`TSUndefinedKeyword`?!1:t==null||x(e,t)}function oo(e,t){return!e||e.type!==`TSUnknownKeyword`?!1:t==null||x(e,t)}function so(e,t){return!e||e.type!==`TSVoidKeyword`?!1:t==null||x(e,t)}function co(e,t){return!e||e.type!==`TSThisType`?!1:t==null||x(e,t)}function lo(e,t){return!e||e.type!==`TSFunctionType`?!1:t==null||x(e,t)}function uo(e,t){return!e||e.type!==`TSConstructorType`?!1:t==null||x(e,t)}function fo(e,t){return!e||e.type!==`TSTypeReference`?!1:t==null||x(e,t)}function po(e,t){return!e||e.type!==`TSTypePredicate`?!1:t==null||x(e,t)}function mo(e,t){return!e||e.type!==`TSTypeQuery`?!1:t==null||x(e,t)}function ho(e,t){return!e||e.type!==`TSTypeLiteral`?!1:t==null||x(e,t)}function go(e,t){return!e||e.type!==`TSArrayType`?!1:t==null||x(e,t)}function _o(e,t){return!e||e.type!==`TSTupleType`?!1:t==null||x(e,t)}function vo(e,t){return!e||e.type!==`TSOptionalType`?!1:t==null||x(e,t)}function yo(e,t){return!e||e.type!==`TSRestType`?!1:t==null||x(e,t)}function bo(e,t){return!e||e.type!==`TSNamedTupleMember`?!1:t==null||x(e,t)}function xo(e,t){return!e||e.type!==`TSUnionType`?!1:t==null||x(e,t)}function So(e,t){return!e||e.type!==`TSIntersectionType`?!1:t==null||x(e,t)}function Co(e,t){return!e||e.type!==`TSConditionalType`?!1:t==null||x(e,t)}function wo(e,t){return!e||e.type!==`TSInferType`?!1:t==null||x(e,t)}function To(e,t){return!e||e.type!==`TSParenthesizedType`?!1:t==null||x(e,t)}function Eo(e,t){return!e||e.type!==`TSTypeOperator`?!1:t==null||x(e,t)}function Do(e,t){return!e||e.type!==`TSIndexedAccessType`?!1:t==null||x(e,t)}function Oo(e,t){return!e||e.type!==`TSMappedType`?!1:t==null||x(e,t)}function ko(e,t){return!e||e.type!==`TSTemplateLiteralType`?!1:t==null||x(e,t)}function Ao(e,t){return!e||e.type!==`TSLiteralType`?!1:t==null||x(e,t)}function jo(e,t){return!e||e.type!==`TSClassImplements`?!1:t==null||x(e,t)}function Mo(e,t){return!e||e.type!==`TSInterfaceHeritage`?!1:t==null||x(e,t)}function No(e,t){return!e||e.type!==`TSInterfaceDeclaration`?!1:t==null||x(e,t)}function Po(e,t){return!e||e.type!==`TSInterfaceBody`?!1:t==null||x(e,t)}function Fo(e,t){return!e||e.type!==`TSTypeAliasDeclaration`?!1:t==null||x(e,t)}function Io(e,t){return!e||e.type!==`TSInstantiationExpression`?!1:t==null||x(e,t)}function Lo(e,t){return!e||e.type!==`TSAsExpression`?!1:t==null||x(e,t)}function Ro(e,t){return!e||e.type!==`TSSatisfiesExpression`?!1:t==null||x(e,t)}function zo(e,t){return!e||e.type!==`TSTypeAssertion`?!1:t==null||x(e,t)}function Bo(e,t){return!e||e.type!==`TSEnumBody`?!1:t==null||x(e,t)}function Vo(e,t){return!e||e.type!==`TSEnumDeclaration`?!1:t==null||x(e,t)}function Ho(e,t){return!e||e.type!==`TSEnumMember`?!1:t==null||x(e,t)}function Uo(e,t){return!e||e.type!==`TSModuleDeclaration`?!1:t==null||x(e,t)}function Wo(e,t){return!e||e.type!==`TSModuleBlock`?!1:t==null||x(e,t)}function Go(e,t){return!e||e.type!==`TSImportType`?!1:t==null||x(e,t)}function Ko(e,t){return!e||e.type!==`TSImportEqualsDeclaration`?!1:t==null||x(e,t)}function qo(e,t){return!e||e.type!==`TSExternalModuleReference`?!1:t==null||x(e,t)}function Jo(e,t){return!e||e.type!==`TSNonNullExpression`?!1:t==null||x(e,t)}function Yo(e,t){return!e||e.type!==`TSExportAssignment`?!1:t==null||x(e,t)}function Xo(e,t){return!e||e.type!==`TSNamespaceExportDeclaration`?!1:t==null||x(e,t)}function Zo(e,t){return!e||e.type!==`TSTypeAnnotation`?!1:t==null||x(e,t)}function Qo(e,t){return!e||e.type!==`TSTypeParameterInstantiation`?!1:t==null||x(e,t)}function $o(e,t){return!e||e.type!==`TSTypeParameterDeclaration`?!1:t==null||x(e,t)}function es(e,t){return!e||e.type!==`TSTypeParameter`?!1:t==null||x(e,t)}function ts(e,t){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`MetaProperty`:case`ClassMethod`:case`ObjectPattern`:case`SpreadElement`:case`Super`:case`TaggedTemplateExpression`:case`TemplateElement`:case`TemplateLiteral`:case`YieldExpression`:case`AwaitExpression`:case`ImportExpression`:case`Import`:case`BigIntLiteral`:case`ExportNamespaceSpecifier`:case`OptionalMemberExpression`:case`OptionalCallExpression`:case`ClassProperty`: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 t==null||x(e,t)}function ns(e,t){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`MetaProperty`:case`TaggedTemplateExpression`:case`TemplateLiteral`:case`YieldExpression`:case`AwaitExpression`:case`ImportExpression`:case`BigIntLiteral`:case`OptionalMemberExpression`:case`OptionalCallExpression`:case`TypeCastExpression`:case`JSXElement`:case`JSXFragment`:case`BindExpression`:case`DoExpression`:case`ModuleExpression`:case`TopicReference`: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 t==null||x(e,t)}function rs(e,t){if(!e)return!1;switch(e.type){case`BinaryExpression`:case`LogicalExpression`:break;default:return!1}return t==null||x(e,t)}function is(e,t){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 t==null||x(e,t)}function as(e,t){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 t==null||x(e,t)}function os(e,t){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 t==null||x(e,t)}function ss(e,t){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 t==null||x(e,t)}function cs(e,t){if(!e)return!1;switch(e.type){case`BreakStatement`:case`ContinueStatement`:case`ReturnStatement`:case`ThrowStatement`:case`YieldExpression`:case`AwaitExpression`:break;default:return!1}return t==null||x(e,t)}function ls(e,t){if(!e)return!1;switch(e.type){case`BreakStatement`:case`ContinueStatement`:case`ReturnStatement`:case`ThrowStatement`:break;default:return!1}return t==null||x(e,t)}function us(e,t){if(!e)return!1;switch(e.type){case`ConditionalExpression`:case`IfStatement`:break;default:return!1}return t==null||x(e,t)}function ds(e,t){if(!e)return!1;switch(e.type){case`DoWhileStatement`:case`ForInStatement`:case`ForStatement`:case`WhileStatement`:case`ForOfStatement`:break;default:return!1}return t==null||x(e,t)}function fs(e,t){if(!e)return!1;switch(e.type){case`DoWhileStatement`:case`WhileStatement`:break;default:return!1}return t==null||x(e,t)}function ps(e,t){if(!e)return!1;switch(e.type){case`ExpressionStatement`:case`ParenthesizedExpression`:case`TypeCastExpression`:break;default:return!1}return t==null||x(e,t)}function ms(e,t){if(!e)return!1;switch(e.type){case`ForInStatement`:case`ForStatement`:case`ForOfStatement`:break;default:return!1}return t==null||x(e,t)}function hs(e,t){if(!e)return!1;switch(e.type){case`ForInStatement`:case`ForOfStatement`:break;default:return!1}return t==null||x(e,t)}function gs(e,t){if(!e)return!1;switch(e.type){case`FunctionDeclaration`:case`FunctionExpression`:case`ObjectMethod`:case`ArrowFunctionExpression`:case`ClassMethod`:case`ClassPrivateMethod`:break;default:return!1}return t==null||x(e,t)}function _s(e,t){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 t==null||x(e,t)}function vs(e,t){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`:break;case`Placeholder`:if(e.expectedNode===`StringLiteral`)break;default:return!1}return t==null||x(e,t)}function ys(e,t){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 t==null||x(e,t)}function bs(e,t){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 t==null||x(e,t)}function xs(e,t){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 t==null||x(e,t)}function Ss(e,t){if(!e)return!1;switch(e.type){case`Identifier`:case`MemberExpression`:case`ArrayPattern`:case`ObjectPattern`: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 t==null||x(e,t)}function Cs(e,t){if(!e)return!1;switch(e.type){case`Identifier`:case`ThisExpression`:case`TSQualifiedName`:break;case`Placeholder`:if(e.expectedNode===`Identifier`)break;default:return!1}return t==null||x(e,t)}function ws(e,t){if(!e)return!1;switch(e.type){case`StringLiteral`:case`NumericLiteral`:case`NullLiteral`:case`BooleanLiteral`:case`RegExpLiteral`:case`TemplateLiteral`:case`BigIntLiteral`:break;case`Placeholder`:if(e.expectedNode===`StringLiteral`)break;default:return!1}return t==null||x(e,t)}function Ts(e,t){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 t==null||x(e,t)}function Es(e,t){if(!e)return!1;switch(e.type){case`ObjectMethod`:case`ClassMethod`:case`ClassPrivateMethod`:break;default:return!1}return t==null||x(e,t)}function Ds(e,t){if(!e)return!1;switch(e.type){case`ObjectMethod`:case`ObjectProperty`:break;default:return!1}return t==null||x(e,t)}function Os(e,t){if(!e)return!1;switch(e.type){case`ObjectProperty`:case`ClassProperty`:case`ClassPrivateProperty`:case`ClassAccessorProperty`:break;default:return!1}return t==null||x(e,t)}function ks(e,t){if(!e)return!1;switch(e.type){case`UnaryExpression`:case`SpreadElement`:break;default:return!1}return t==null||x(e,t)}function As(e,t){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 t==null||x(e,t)}function js(e,t){if(!e)return!1;switch(e.type){case`ClassExpression`:case`ClassDeclaration`:break;default:return!1}return t==null||x(e,t)}function Ms(e,t){if(!e)return!1;switch(e.type){case`ExportAllDeclaration`:case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:case`ImportDeclaration`:break;default:return!1}return t==null||x(e,t)}function Ns(e,t){if(!e)return!1;switch(e.type){case`ExportAllDeclaration`:case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:break;default:return!1}return t==null||x(e,t)}function Ps(e,t){if(!e)return!1;switch(e.type){case`ExportSpecifier`:case`ImportDefaultSpecifier`:case`ImportNamespaceSpecifier`:case`ImportSpecifier`:case`ExportNamespaceSpecifier`:case`ExportDefaultSpecifier`:break;default:return!1}return t==null||x(e,t)}function Fs(e,t){if(!e)return!1;switch(e.type){case`ClassPrivateProperty`:case`ClassPrivateMethod`:case`PrivateName`:break;default:return!1}return t==null||x(e,t)}function Is(e,t){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`BigIntLiteralTypeAnnotation`: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 t==null||x(e,t)}function Ls(e,t){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`BigIntLiteralTypeAnnotation`: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 t==null||x(e,t)}function Rs(e,t){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 t==null||x(e,t)}function zs(e,t){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 t==null||x(e,t)}function Bs(e,t){if(!e)return!1;switch(e.type){case`DeclaredPredicate`:case`InferredPredicate`:break;default:return!1}return t==null||x(e,t)}function Vs(e,t){if(!e)return!1;switch(e.type){case`EnumBooleanBody`:case`EnumNumberBody`:case`EnumStringBody`:case`EnumSymbolBody`:break;default:return!1}return t==null||x(e,t)}function Hs(e,t){if(!e)return!1;switch(e.type){case`EnumBooleanMember`:case`EnumNumberMember`:case`EnumStringMember`:case`EnumDefaultedMember`:break;default:return!1}return t==null||x(e,t)}function Us(e,t){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 t==null||x(e,t)}function Ws(e,t){if(!e)return!1;switch(e.type){case`Placeholder`:case`V8IntrinsicIdentifier`:break;default:return!1}return t==null||x(e,t)}function Gs(e,t){if(!e)return!1;switch(e.type){case`ClassAccessorProperty`:break;default:return!1}return t==null||x(e,t)}function Ks(e,t){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`TSClassImplements`:case`TSInterfaceHeritage`: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 t==null||x(e,t)}function qs(e,t){if(!e)return!1;switch(e.type){case`TSCallSignatureDeclaration`:case`TSConstructSignatureDeclaration`:case`TSPropertySignature`:case`TSMethodSignature`:case`TSIndexSignature`:break;default:return!1}return t==null||x(e,t)}function Js(e,t){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`TSClassImplements`:case`TSInterfaceHeritage`:case`TSImportType`:break;default:return!1}return t==null||x(e,t)}function Ys(e,t){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 t==null||x(e,t)}function Xs(e,t){return S(`isNumberLiteral`,`isNumericLiteral`),!e||e.type!==`NumberLiteral`?!1:t==null||x(e,t)}function Zs(e,t){return S(`isRegexLiteral`,`isRegExpLiteral`),!e||e.type!==`RegexLiteral`?!1:t==null||x(e,t)}function Qs(e,t){return S(`isRestProperty`,`isRestElement`),!e||e.type!==`RestProperty`?!1:t==null||x(e,t)}function $s(e,t){return S(`isSpreadProperty`,`isSpreadElement`),!e||e.type!==`SpreadProperty`?!1:t==null||x(e,t)}function ec(e,t){return S(`isModuleDeclaration`,`isImportOrExportDeclaration`),Ms(e,t)}function tc(e){return Qn(e)||Pr(e)}function nc(e,t,n){if(!tc(e))return!1;let r=Array.isArray(t)?t:t.split(`.`),i=[],a;for(a=e;tc(a);a=a.object??a.meta)i.push(a.property);if(i.push(a),i.length<r.length||!n&&i.length>r.length)return!1;for(let e=0,t=i.length-1;e<r.length;e++,t--){let n=i[t],a;if(Un(n))a=n.name;else if(Kn(n))a=n.value;else if(ur(n))a=`this`;else if(Rr(n))a=`super`;else if($r(n))a=`#`+n.id.name;else return!1;if(r[e]!==a)return!1}return!0}function rc(e,t){let n=e.split(`.`);return e=>nc(e,n,t)}const ic=rc(`React.Component`);function ac(e){return!!e&&/^[a-z]/.test(e)}function oc(e,t){return e===t?!0:e==null||Oc[t]?!1:!!w[t]?.includes(e)}function sc(e,t){return!!(e===t||sl[e]?.includes(t))}function C(e,t,n){return t?oc(t.type,e)?n===void 0?!0:x(t,n):!n&&t.type===`Placeholder`&&e in w?sc(t.expectedNode,e):!1:!1}function cc(e,t=!0){return typeof e!=`string`||t&&(ln(e)||cn(e,!0))?!1:nn(e)}const lc=[`consequent`,`body`,`alternate`],uc=[`body`,`expressions`],dc=[`left`,`init`],fc=[`leadingComments`,`trailingComments`,`innerComments`],pc=[`||`,`&&`,`??`],mc=[`++`,`--`],hc=[`>`,`<`,`>=`,`<=`],gc=[`==`,`===`,`!=`,`!==`],_c=[...gc,`in`,`instanceof`],vc=[..._c,...hc],yc=[`-`,`/`,`%`,`*`,`**`,`&`,`|`,`>>`,`>>>`,`<<`,`^`],bc=[`+`,...yc,...vc,`|>`],xc=[`=`,`+=`,...yc.map(e=>e+`=`),...pc.map(e=>e+`=`)],Sc=[`delete`,`!`],Cc=[`+`,`-`,`~`],wc=[`typeof`],Tc=[`void`,`throw`,...Sc,...Cc,...wc],Ec={optional:[`typeAnnotation`,`typeParameters`,`returnType`],force:[`start`,`loc`,`end`]},Dc={},Oc={},w={},kc={},Ac={},jc={},Mc={},Nc={};function Pc(e){return Array.isArray(e)?`array`:e===null?`null`:typeof e}function T(e,...t){return Object.assign(e,...t)}function E(e){return{validate:e}}function D(...e){return E(N(...e))}function O(e){return{validate:e,optional:!0}}function Fc(e,t){return{validate:e,default:t,optional:!1}}function k(...e){return{validate:N(...e),optional:!0}}function Ic(e){return F(P(`array`),Lc(e))}function A(...e){return Ic(N(...e))}function j(...e){return E(A(...e))}function Lc(e){let t=Cl;function n(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 n.each=e,n}function M(...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}const Rc=[];function N(...e){let t=new Set;Rc.push({types:e,set:t});function n(n,r,i){let a=i?.type;if(a!=null){if(t.has(a)){Cl(n,r,i);return}if(a===`Placeholder`){for(let t of e)if(C(t,i)){Cl(n,r,i);return}}}throw TypeError(`Property ${r} of ${n.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(a)}`)}return n.oneOfNodeTypes=e,n}function zc(...e){function t(t,n,r){let i=Pc(r);for(let a of e)if(i===a||C(a,r)){Cl(t,n,r);return}throw TypeError(`Property ${n} of ${t.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(r?.type)}`)}return t.oneOfNodeOrValueTypes=e,t}function P(e){function t(t,n,r){if(Pc(r)!==e)throw TypeError(`Property ${n} expected type of ${e} but got ${Pc(r)}`)}return t.type=e,t}function Bc(e){let t=Object.keys(e);function n(n,r,i){let a=[];for(let r of t)try{Sl(n,r,i[r],e[r])}catch(e){if(e instanceof TypeError){a.push(e.message);continue}throw e}if(a.length)throw TypeError(`Property ${r} of ${n.type} expected to have the following:\n${a.join(`
|
|
5
|
+
`)}`)}return n.shapeOf=e,n}function Vc(){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 F(...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}const Hc=new Set([`aliases`,`builder`,`deprecatedAlias`,`fields`,`inherits`,`visitor`,`validate`,`unionShape`]),Uc=new Set([`default`,`optional`,`deprecated`,`validate`]),Wc={};function Gc(...e){return(t,n={})=>{let r=n.aliases;r||(n.inherits&&(r=Wc[n.inherits].aliases?.slice()),r??=[],n.aliases=r);let i=e.filter(e=>!r.includes(e));r.unshift(...i),Kc(t,n)}}function Kc(e,t={}){let n=t.inherits&&Wc[t.inherits]||{},r=t.visitor||n.visitor||[],i=t.aliases||n.aliases||[],a=t.builder||n.builder||t.visitor||[],o=t.fields;if(!o&&(o={},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`);o[t]={default:Array.isArray(r)?[]:r,optional:e.optional,deprecated:e.deprecated,validate:e.validate}}}for(let n of Object.keys(t))if(!Hc.has(n))throw Error(`Unknown type option "${n}" on ${e}`);t.deprecatedAlias&&(jc[t.deprecatedAlias]=e);for(let e of r.concat(a))o[e]=o[e]||{};for(let t of Object.keys(o)){let n=o[t];n.default===null&&(n.optional??=!0),n.default===void 0?(n.default=null,n.optional??=!1):!n.validate&&n.default!=null&&(n.validate=P(Pc(n.default)));for(let r of Object.keys(n))if(!Uc.has(r))throw Error(`Unknown field key "${r}" on ${e}.${t}`)}Dc[e]=t.visitor=r,Ac[e]=t.builder=a,kc[e]=t.fields=o,Oc[e]=t.aliases=i,i.forEach(t=>{w[t]=w[t]||[],w[t].push(e)}),t.validate&&(Mc[e]=t.validate),t.unionShape&&(Nc[e]=t.unionShape),Wc[e]=t}const qc=Object.defineProperty({__proto__:null,ALIAS_KEYS:Oc,BUILDER_KEYS:Ac,DEPRECATED_KEYS:jc,FLIPPED_ALIAS_KEYS:w,NODE_FIELDS:kc,NODE_PARENT_VALIDATIONS:Mc,NODE_UNION_SHAPES__PRIVATE:Nc,VISITOR_KEYS:Dc,allExpandedTypes:Rc,arrayOf:Ic,arrayOfType:A,assertEach:Lc,assertNodeOrValueType:zc,assertNodeType:N,assertOneOf:M,assertOptionalChainStart:Vc,assertShape:Bc,assertValueType:P,chain:F,combine:T,default:Kc,defineAliasedType:Gc,validate:E,validateArrayOfType:j,validateDefault:Fc,validateOptional:O,validateOptionalType:k,validateType:D},Symbol.toStringTag,{value:`Module`}),Jc=(e=!1)=>({unionShape:{discriminator:`computed`,shapes:[{name:`computed`,value:[!0],properties:{key:{validate:N(`Expression`)}}},{name:`nonComputed`,value:[!1],properties:{key:{validate:e?N(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`,`PrivateName`):N(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`)}}}]}}),Yc={unionShape:{discriminator:`computed`,shapes:[{name:`computed`,value:[!0],properties:{property:{validate:N(`Expression`)}}},{name:`nonComputed`,value:[!1],properties:{property:{validate:N(`Identifier`,`PrivateName`)}}}]}},I=Gc(`Standardized`);I(`ArrayExpression`,{fields:{elements:{validate:Ic(zc(`null`,`Expression`,`SpreadElement`)),default:void 0}},visitor:[`elements`],aliases:[`Expression`]}),I(`AssignmentExpression`,{fields:{operator:{validate:T(function(){let e=M(...xc),t=M(`=`);return function(n,r,i){(C(`Pattern`,n.left)?t:e)(n,r,i)}}(),{oneOf:xc})},left:{validate:N(`Identifier`,`MemberExpression`,`OptionalMemberExpression`,`ArrayPattern`,`ObjectPattern`,`TSAsExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`,`TSNonNullExpression`)},right:{validate:N(`Expression`)}},builder:[`operator`,`left`,`right`],visitor:[`left`,`right`],aliases:[`Expression`]}),I(`BinaryExpression`,{builder:[`operator`,`left`,`right`],fields:{operator:{validate:M(...bc)},left:{validate:function(){let e=N(`Expression`),t=N(`Expression`,`PrivateName`);return T(function(n,r,i){(n.operator===`in`?t:e)(n,r,i)},{oneOfNodeTypes:[`Expression`,`PrivateName`]})}()},right:{validate:N(`Expression`)}},unionShape:{discriminator:`operator`,shapes:[{name:`in`,value:[`in`],properties:{left:{validate:N(`Expression`,`PrivateName`)}}},{name:`notIn`,value:bc.filter(e=>e!==`in`),properties:{left:{validate:N(`Expression`)}}}]},visitor:[`left`,`right`],aliases:[`Binary`,`Expression`]}),I(`InterpreterDirective`,{builder:[`value`],fields:{value:{validate:P(`string`)}}}),I(`Directive`,{visitor:[`value`],fields:{value:{validate:N(`DirectiveLiteral`)}}}),I(`DirectiveLiteral`,{builder:[`value`],fields:{value:{validate:P(`string`)}}}),I(`BlockStatement`,{builder:[`body`,`directives`],visitor:[`directives`,`body`],fields:{directives:{validate:A(`Directive`),default:[]},body:j(`Statement`)},aliases:[`Scopable`,`BlockParent`,`Block`,`Statement`]}),I(`BreakStatement`,{visitor:[`label`],fields:{label:{validate:N(`Identifier`),optional:!0}},aliases:[`Statement`,`Terminatorless`,`CompletionStatement`]}),I(`CallExpression`,{visitor:[`callee`,`typeArguments`,`arguments`],builder:[`callee`,`arguments`],aliases:[`Expression`],fields:{callee:{validate:N(`Expression`,`Super`,`Import`,`V8IntrinsicIdentifier`)},arguments:j(`Expression`,`SpreadElement`,`ArgumentPlaceholder`),typeArguments:{validate:N(`TypeParameterInstantiation`,`TSTypeParameterInstantiation`),optional:!0}}}),I(`CatchClause`,{visitor:[`param`,`body`],fields:{param:{validate:N(`Identifier`,`ArrayPattern`,`ObjectPattern`),optional:!0},body:{validate:N(`BlockStatement`)}},aliases:[`Scopable`,`BlockParent`]}),I(`ConditionalExpression`,{visitor:[`test`,`consequent`,`alternate`],fields:{test:{validate:N(`Expression`)},consequent:{validate:N(`Expression`)},alternate:{validate:N(`Expression`)}},aliases:[`Expression`,`Conditional`]}),I(`ContinueStatement`,{visitor:[`label`],fields:{label:{validate:N(`Identifier`),optional:!0}},aliases:[`Statement`,`Terminatorless`,`CompletionStatement`]}),I(`DebuggerStatement`,{aliases:[`Statement`]}),I(`DoWhileStatement`,{builder:[`test`,`body`],visitor:[`body`,`test`],fields:{test:{validate:N(`Expression`)},body:{validate:N(`Statement`)}},aliases:[`Statement`,`BlockParent`,`Loop`,`While`,`Scopable`]}),I(`EmptyStatement`,{aliases:[`Statement`]}),I(`ExpressionStatement`,{visitor:[`expression`],fields:{expression:{validate:N(`Expression`)}},aliases:[`Statement`,`ExpressionWrapper`]}),I(`File`,{builder:[`program`,`comments`,`tokens`],visitor:[`program`],fields:{program:{validate:N(`Program`)},comments:{validate:Lc(N(`CommentBlock`,`CommentLine`)),optional:!0},tokens:{validate:Lc(Object.assign(()=>{},{type:`any`})),optional:!0}}}),I(`ForInStatement`,{visitor:[`left`,`right`,`body`],aliases:[`Scopable`,`Statement`,`For`,`BlockParent`,`Loop`,`ForXStatement`],fields:{left:{validate:N(`VariableDeclaration`,`Identifier`,`MemberExpression`,`ArrayPattern`,`ObjectPattern`,`TSAsExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`,`TSNonNullExpression`)},right:{validate:N(`Expression`)},body:{validate:N(`Statement`)}}}),I(`ForStatement`,{visitor:[`init`,`test`,`update`,`body`],aliases:[`Scopable`,`Statement`,`For`,`BlockParent`,`Loop`],fields:{init:{validate:N(`VariableDeclaration`,`Expression`),optional:!0},test:{validate:N(`Expression`),optional:!0},update:{validate:N(`Expression`),optional:!0},body:{validate:N(`Statement`)}}});const Xc=()=>({params:j(`FunctionParameter`),generator:{default:!1},async:{default:!1}}),Zc=()=>({returnType:{validate:N(`TypeAnnotation`,`TSTypeAnnotation`),optional:!0},typeParameters:{validate:N(`TypeParameterDeclaration`,`TSTypeParameterDeclaration`),optional:!0}}),Qc=()=>({...Xc(),declare:{validate:P(`boolean`),optional:!0},id:{validate:N(`Identifier`),optional:!0}});I(`FunctionDeclaration`,{builder:[`id`,`params`,`body`,`generator`,`async`],visitor:[`id`,`typeParameters`,`params`,`predicate`,`returnType`,`body`],fields:{...Qc(),...Zc(),body:{validate:N(`BlockStatement`)},predicate:{validate:N(`FlowPredicate`),optional:!0}},aliases:[`Scopable`,`Function`,`BlockParent`,`FunctionParent`,`Statement`,`Pureish`,`Declaration`],validate:function(){let e=N(`Identifier`);return function(t,n,r){C(`ExportDefaultDeclaration`,t)||e(r,`id`,r.id)}}()}),I(`FunctionExpression`,{inherits:`FunctionDeclaration`,aliases:[`Scopable`,`Function`,`BlockParent`,`FunctionParent`,`Expression`,`Pureish`],fields:{...Xc(),...Zc(),id:{validate:N(`Identifier`),optional:!0},body:{validate:N(`BlockStatement`)},predicate:{validate:N(`FlowPredicate`),optional:!0}}});const $c=()=>({typeAnnotation:{validate:N(`TypeAnnotation`,`TSTypeAnnotation`),optional:!0},optional:{validate:P(`boolean`),optional:!0},decorators:{validate:A(`Decorator`),optional:!0}});I(`Identifier`,{builder:[`name`],visitor:[`typeAnnotation`,`decorators`],aliases:[`Expression`,`FunctionParameter`,`PatternLike`,`LVal`,`TSEntityName`],fields:{...$c(),name:{validate:F(P(`string`),T(function(e,t,n){if(!cc(n,!1))throw TypeError(`"${n}" is not a valid identifier name`)},{type:`string`}))}},validate:function(e,t,n){let r=/\.(\w+)$/.exec(t.toString());if(!r)return;let[,i]=r,a={computed:!1};if(i===`property`){if(C(`MemberExpression`,e,a)||C(`OptionalMemberExpression`,e,a))return}else if(i===`key`){if(C(`Property`,e,a)||C(`Method`,e,a))return}else if(i===`exported`){if(C(`ExportSpecifier`,e))return}else if(i===`imported`){if(C(`ImportSpecifier`,e,{imported:n}))return}else if(i===`meta`&&C(`MetaProperty`,e,{meta:n}))return;if((ln(n.name)||sn(n.name,!1))&&n.name!==`this`)throw TypeError(`"${n.name}" is not a valid identifier`)}}),I(`IfStatement`,{visitor:[`test`,`consequent`,`alternate`],aliases:[`Statement`,`Conditional`],fields:{test:{validate:N(`Expression`)},consequent:{validate:N(`Statement`)},alternate:{optional:!0,validate:N(`Statement`)}}}),I(`LabeledStatement`,{visitor:[`label`,`body`],aliases:[`Statement`],fields:{label:{validate:N(`Identifier`)},body:{validate:N(`Statement`)}}}),I(`StringLiteral`,{builder:[`value`],fields:{value:{validate:P(`string`)}},aliases:[`Expression`,`Pureish`,`Literal`,`Immutable`]}),I(`NumericLiteral`,{builder:[`value`],deprecatedAlias:`NumberLiteral`,fields:{value:{validate:F(P(`number`),T(function(e,t,n){if(1/n<0||!Number.isFinite(n)){let e=Error(`NumericLiterals must be non-negative finite numbers. You can use t.valueToNode(${n}) instead.`);if(!Error().stack.includes(`regenerator`))throw e}},{type:`number`}))}},aliases:[`Expression`,`Pureish`,`Literal`,`Immutable`]}),I(`NullLiteral`,{aliases:[`Expression`,`Pureish`,`Literal`,`Immutable`]}),I(`BooleanLiteral`,{builder:[`value`],fields:{value:{validate:P(`boolean`)}},aliases:[`Expression`,`Pureish`,`Literal`,`Immutable`]}),I(`RegExpLiteral`,{builder:[`pattern`,`flags`],deprecatedAlias:`RegexLiteral`,aliases:[`Expression`,`Pureish`,`Literal`],fields:{pattern:{validate:P(`string`)},flags:{validate:F(P(`string`),T(function(e,t,n){let r=/[^dgimsuvy]/.exec(n);if(r)throw TypeError(`"${r[0]}" is not a valid RegExp flag`)},{type:`string`})),default:``}}}),I(`LogicalExpression`,{builder:[`operator`,`left`,`right`],visitor:[`left`,`right`],aliases:[`Binary`,`Expression`],fields:{operator:{validate:M(...pc)},left:{validate:N(`Expression`)},right:{validate:N(`Expression`)}}}),I(`MemberExpression`,{builder:[`object`,`property`,`computed`],visitor:[`object`,`property`],aliases:[`Expression`,`LVal`,`PatternLike`],...Yc,fields:{object:{validate:N(`Expression`,`Super`)},property:{validate:function(){let e=N(`Identifier`,`PrivateName`),t=N(`Expression`);return T(function(n,r,i){(n.computed?t:e)(n,r,i)},{oneOfNodeTypes:[`Expression`,`Identifier`,`PrivateName`]})}()},computed:{default:!1}}}),I(`NewExpression`,{inherits:`CallExpression`,fields:{callee:{validate:N(`Expression`)},arguments:j(`Expression`,`SpreadElement`,`ArgumentPlaceholder`),typeArguments:{validate:N(`TypeParameterInstantiation`,`TSTypeParameterInstantiation`),optional:!0}}}),I(`Program`,{visitor:[`directives`,`body`],builder:[`body`,`directives`,`sourceType`,`interpreter`],fields:{sourceType:{validate:M(`script`,`module`),default:`script`},interpreter:{validate:N(`InterpreterDirective`),default:null,optional:!0},directives:{validate:A(`Directive`),default:[]},body:j(`Statement`)},aliases:[`Scopable`,`BlockParent`,`Block`]}),I(`ObjectExpression`,{visitor:[`properties`],aliases:[`Expression`],fields:{properties:j(`ObjectMethod`,`ObjectProperty`,`SpreadElement`)}}),I(`ObjectMethod`,{builder:[`kind`,`key`,`params`,`body`,`computed`,`generator`,`async`],visitor:[`decorators`,`key`,`typeParameters`,`params`,`returnType`,`body`],...Jc(),fields:{...Xc(),...Zc(),kind:{validate:M(`method`,`get`,`set`)},computed:{default:!1},key:{validate:function(){let e=N(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`),t=N(`Expression`);return T(function(n,r,i){(n.computed?t:e)(n,r,i)},{oneOfNodeTypes:[`Expression`,`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`]})}()},decorators:{validate:A(`Decorator`),optional:!0},body:{validate:N(`BlockStatement`)}},aliases:[`UserWhitespacable`,`Function`,`Scopable`,`BlockParent`,`FunctionParent`,`Method`,`ObjectMember`]}),I(`ObjectProperty`,{builder:[`key`,`value`,`computed`,`shorthand`],...Jc(!0),fields:{computed:{default:!1},key:{validate:function(){let e=N(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`,`PrivateName`),t=N(`Expression`);return T(function(n,r,i){(n.computed?t:e)(n,r,i)},{oneOfNodeTypes:[`Expression`,`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`,`PrivateName`]})}()},value:{validate:N(`Expression`,`PatternLike`)},shorthand:{validate:F(P(`boolean`),T(function(e,t,n){if(n){if(e.computed)throw TypeError(`Property shorthand of ObjectProperty cannot be true if computed is true`);if(!C(`Identifier`,e.key))throw TypeError(`Property shorthand of ObjectProperty cannot be true if key is not an Identifier`)}},{type:`boolean`})),default:!1},decorators:{validate:A(`Decorator`),optional:!0}},visitor:[`decorators`,`key`,`value`],aliases:[`UserWhitespacable`,`Property`,`ObjectMember`],validate:function(){let e=N(`Identifier`,`Pattern`,`TSAsExpression`,`TSSatisfiesExpression`,`TSNonNullExpression`,`TSTypeAssertion`),t=N(`Expression`);return function(n,r,i){(C(`ObjectPattern`,n)?e:t)(i,`value`,i.value)}}()}),I(`RestElement`,{visitor:[`argument`,`typeAnnotation`],builder:[`argument`],aliases:[`FunctionParameter`,`PatternLike`],deprecatedAlias:`RestProperty`,fields:{...$c(),argument:{validate:N(`Identifier`,`ArrayPattern`,`ObjectPattern`,`MemberExpression`,`TSAsExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`,`TSNonNullExpression`)}},validate: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}`)}}),I(`ReturnStatement`,{visitor:[`argument`],aliases:[`Statement`,`Terminatorless`,`CompletionStatement`],fields:{argument:{validate:N(`Expression`),optional:!0}}}),I(`SequenceExpression`,{visitor:[`expressions`],fields:{expressions:j(`Expression`)},aliases:[`Expression`]}),I(`ParenthesizedExpression`,{visitor:[`expression`],aliases:[`Expression`,`ExpressionWrapper`],fields:{expression:{validate:N(`Expression`)}}}),I(`SwitchCase`,{visitor:[`test`,`consequent`],fields:{test:{validate:N(`Expression`),optional:!0},consequent:j(`Statement`)}}),I(`SwitchStatement`,{visitor:[`discriminant`,`cases`],aliases:[`Statement`,`BlockParent`,`Scopable`],fields:{discriminant:{validate:N(`Expression`)},cases:j(`SwitchCase`)}}),I(`ThisExpression`,{aliases:[`Expression`,`TSEntityName`]}),I(`ThrowStatement`,{visitor:[`argument`],aliases:[`Statement`,`Terminatorless`,`CompletionStatement`],fields:{argument:{validate:N(`Expression`)}}}),I(`TryStatement`,{visitor:[`block`,`handler`,`finalizer`],aliases:[`Statement`],fields:{block:{validate:F(N(`BlockStatement`),T(function(e){if(!e.handler&&!e.finalizer)throw TypeError(`TryStatement expects either a handler or finalizer, or both`)},{oneOfNodeTypes:[`BlockStatement`]}))},handler:{optional:!0,validate:N(`CatchClause`)},finalizer:{optional:!0,validate:N(`BlockStatement`)}}}),I(`UnaryExpression`,{builder:[`operator`,`argument`,`prefix`],fields:{prefix:{default:!0},argument:{validate:N(`Expression`)},operator:{validate:M(...Tc)}},visitor:[`argument`],aliases:[`UnaryLike`,`Expression`]}),I(`UpdateExpression`,{builder:[`operator`,`argument`,`prefix`],fields:{prefix:{default:!1},argument:{validate:N(`Identifier`,`MemberExpression`)},operator:{validate:M(...mc)}},visitor:[`argument`],aliases:[`Expression`]}),I(`VariableDeclaration`,{builder:[`kind`,`declarations`],visitor:[`declarations`],aliases:[`Statement`,`Declaration`],fields:{declare:{validate:P(`boolean`),optional:!0},kind:{validate:M(`var`,`let`,`const`,`using`,`await using`)},declarations:j(`VariableDeclarator`)},validate:(()=>{let e=N(`Identifier`,`Placeholder`),t=N(`Identifier`,`ArrayPattern`,`ObjectPattern`,`Placeholder`),n=N(`Identifier`,`VoidPattern`,`Placeholder`);return function(r,i,a){let{kind:o,declarations:s}=a,c=C(`ForXStatement`,r,{left:a});if(c&&s.length!==1)throw TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${r.type}`);for(let r of s)o===`const`||o===`let`||o===`var`?!c&&!r.init?e(r,`id`,r.id):t(r,`id`,r.id):n(r,`id`,r.id)}})()}),I(`VariableDeclarator`,{visitor:[`id`,`init`],fields:{id:{validate:N(`Identifier`,`ArrayPattern`,`ObjectPattern`,`VoidPattern`)},definite:{optional:!0,validate:P(`boolean`)},init:{optional:!0,validate:N(`Expression`)}}}),I(`WhileStatement`,{visitor:[`test`,`body`],aliases:[`Statement`,`BlockParent`,`Loop`,`While`,`Scopable`],fields:{test:{validate:N(`Expression`)},body:{validate:N(`Statement`)}}}),I(`WithStatement`,{visitor:[`object`,`body`],aliases:[`Statement`],fields:{object:{validate:N(`Expression`)},body:{validate:N(`Statement`)}}}),I(`AssignmentPattern`,{visitor:[`left`,`right`,`decorators`],builder:[`left`,`right`],aliases:[`FunctionParameter`,`Pattern`,`PatternLike`],fields:{...$c(),left:{validate:N(`Identifier`,`ObjectPattern`,`ArrayPattern`,`MemberExpression`,`TSAsExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`,`TSNonNullExpression`)},right:{validate:N(`Expression`)},decorators:{validate:A(`Decorator`),optional:!0}}}),I(`ArrayPattern`,{visitor:[`elements`,`typeAnnotation`],builder:[`elements`],aliases:[`FunctionParameter`,`Pattern`,`PatternLike`,`LVal`],fields:{...$c(),elements:{validate:F(P(`array`),Lc(zc(`null`,`PatternLike`)))}}}),I(`ArrowFunctionExpression`,{builder:[`params`,`body`,`async`],visitor:[`typeParameters`,`params`,`predicate`,`returnType`,`body`],aliases:[`Scopable`,`Function`,`BlockParent`,`FunctionParent`,`Expression`,`Pureish`],fields:{...Xc(),generator:{default:null,optional:!0,validate:T((e,t,n)=>{if(n)throw TypeError(`ArrowFunctionExpression cannot be a generator`)},{type:`boolean`})},...Zc(),expression:{optional:!0,validate:P(`boolean`)},body:{validate:N(`BlockStatement`,`Expression`)},predicate:{validate:N(`FlowPredicate`),optional:!0}}}),I(`ClassBody`,{visitor:[`body`],fields:{body:j(`ClassMethod`,`ClassPrivateMethod`,`ClassProperty`,`ClassPrivateProperty`,`ClassAccessorProperty`,`TSDeclareMethod`,`TSIndexSignature`,`StaticBlock`)}}),I(`ClassExpression`,{builder:[`id`,`superClass`,`body`,`decorators`],visitor:[`decorators`,`id`,`typeParameters`,`superClass`,`superTypeArguments`,`mixins`,`implements`,`body`],aliases:[`Scopable`,`Class`,`Expression`],fields:{id:{validate:N(`Identifier`),optional:!0},typeParameters:{validate:N(`TypeParameterDeclaration`,`TSTypeParameterDeclaration`),optional:!0},body:{validate:N(`ClassBody`)},superClass:{optional:!0,validate:N(`Expression`)},superTypeArguments:{validate:N(`TypeParameterInstantiation`,`TSTypeParameterInstantiation`),optional:!0},implements:{validate:A(`TSClassImplements`,`ClassImplements`),optional:!0},decorators:{validate:A(`Decorator`),optional:!0},mixins:{validate:N(`InterfaceExtends`),optional:!0}}}),I(`ClassDeclaration`,{inherits:`ClassExpression`,aliases:[`Scopable`,`Class`,`Statement`,`Declaration`],fields:{id:{validate:N(`Identifier`),optional:!0},typeParameters:{validate:N(`TypeParameterDeclaration`,`TSTypeParameterDeclaration`),optional:!0},body:{validate:N(`ClassBody`)},superClass:{optional:!0,validate:N(`Expression`)},superTypeArguments:{validate:N(`TypeParameterInstantiation`,`TSTypeParameterInstantiation`),optional:!0},implements:{validate:A(`TSClassImplements`,`ClassImplements`),optional:!0},decorators:{validate:A(`Decorator`),optional:!0},mixins:{validate:N(`InterfaceExtends`),optional:!0},declare:{validate:P(`boolean`),optional:!0},abstract:{validate:P(`boolean`),optional:!0}},validate:function(){let e=N(`Identifier`);return function(t,n,r){C(`ExportDefaultDeclaration`,t)||e(r,`id`,r.id)}}()});const el={attributes:{optional:!0,validate:A(`ImportAttribute`)}};I(`ExportAllDeclaration`,{visitor:[`source`,`attributes`],aliases:[`Statement`,`Declaration`,`ImportOrExportDeclaration`,`ExportDeclaration`],fields:{source:{validate:N(`StringLiteral`)},exportKind:O(M(`type`,`value`)),...el}}),I(`ExportDefaultDeclaration`,{visitor:[`declaration`],aliases:[`Statement`,`Declaration`,`ImportOrExportDeclaration`,`ExportDeclaration`],fields:{declaration:D(`FunctionDeclaration`,`ClassDeclaration`,`Expression`,`TSDeclareFunction`,`TSInterfaceDeclaration`,`EnumDeclaration`),exportKind:O(M(`value`))}}),I(`ExportNamedDeclaration`,{builder:[`declaration`,`specifiers`,`source`,`attributes`],visitor:[`declaration`,`specifiers`,`source`,`attributes`],aliases:[`Statement`,`Declaration`,`ImportOrExportDeclaration`,`ExportDeclaration`],fields:{declaration:{optional:!0,validate:F(N(`Declaration`),T(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:[`VariableDeclaration`,`FunctionDeclaration`,`ClassDeclaration`,`TSDeclareFunction`,`TSEnumDeclaration`,`TSImportEqualsDeclaration`,`TSInterfaceDeclaration`,`TSModuleDeclaration`,`TSTypeAliasDeclaration`,`EnumDeclaration`,`InterfaceDeclaration`,`OpaqueType`,`TypeAlias`]}))},...el,specifiers:{default:[],validate:Ic(function(){let e=N(`ExportSpecifier`,`ExportDefaultSpecifier`,`ExportNamespaceSpecifier`),t=N(`ExportSpecifier`);return T(function(n,r,i){(n.source?e:t)(n,r,i)},{oneOfNodeTypes:[`ExportSpecifier`,`ExportDefaultSpecifier`,`ExportNamespaceSpecifier`]})}())},source:{validate:N(`StringLiteral`),optional:!0},exportKind:O(M(`type`,`value`))}}),I(`ExportSpecifier`,{visitor:[`local`,`exported`],aliases:[`ModuleSpecifier`],fields:{local:{validate:N(`Identifier`)},exported:{validate:N(`Identifier`,`StringLiteral`)},exportKind:{validate:M(`type`,`value`),optional:!0}}}),I(`ForOfStatement`,{visitor:[`left`,`right`,`body`],builder:[`left`,`right`,`body`,`await`],aliases:[`Scopable`,`Statement`,`For`,`BlockParent`,`Loop`,`ForXStatement`],fields:{left:{validate:function(){let e=N(`VariableDeclaration`),t=N(`Identifier`,`MemberExpression`,`ArrayPattern`,`ObjectPattern`,`TSAsExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`,`TSNonNullExpression`);return T(function(n,r,i){C(`VariableDeclaration`,i)?e(n,r,i):t(n,r,i)},{oneOfNodeTypes:[`VariableDeclaration`,`Identifier`,`MemberExpression`,`ArrayPattern`,`ObjectPattern`,`TSAsExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`,`TSNonNullExpression`]})}()},right:{validate:N(`Expression`)},body:{validate:N(`Statement`)},await:{default:!1}}}),I(`ImportDeclaration`,{builder:[`specifiers`,`source`,`attributes`],visitor:[`specifiers`,`source`,`attributes`],aliases:[`Statement`,`Declaration`,`ImportOrExportDeclaration`],fields:{...el,module:{optional:!0,validate:P(`boolean`)},phase:{default:null,validate:M(`source`,`defer`)},specifiers:j(`ImportSpecifier`,`ImportDefaultSpecifier`,`ImportNamespaceSpecifier`),source:{validate:N(`StringLiteral`)},importKind:{validate:M(`type`,`typeof`,`value`),optional:!0}}}),I(`ImportDefaultSpecifier`,{visitor:[`local`],aliases:[`ModuleSpecifier`],fields:{local:{validate:N(`Identifier`)}}}),I(`ImportNamespaceSpecifier`,{visitor:[`local`],aliases:[`ModuleSpecifier`],fields:{local:{validate:N(`Identifier`)}}}),I(`ImportSpecifier`,{visitor:[`imported`,`local`],builder:[`local`,`imported`],aliases:[`ModuleSpecifier`],fields:{local:{validate:N(`Identifier`)},imported:{validate:N(`Identifier`,`StringLiteral`)},importKind:{validate:M(`type`,`typeof`,`value`),optional:!0}}}),I(`MetaProperty`,{visitor:[`meta`,`property`],aliases:[`Expression`],fields:{meta:{validate:F(N(`Identifier`),T(function(e,t,n){let r;switch(n.name){case`function`:r=`sent`;break;case`new`:r=`target`;break;case`import`:r=`meta`;break}if(!C(`Identifier`,e.property,{name:r}))throw TypeError(`Unrecognised MetaProperty`)},{oneOfNodeTypes:[`Identifier`]}))},property:{validate:N(`Identifier`)}}});const tl=()=>({abstract:{validate:P(`boolean`),default:!1,optional:!0},accessibility:{validate:M(`public`,`private`,`protected`),optional:!0},static:{default:!1},override:{optional:!0,validate:P(`boolean`),default:!1},computed:{default:!1},optional:{validate:P(`boolean`),optional:!0},key:{validate:F(function(){let e=N(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`),t=N(`Expression`);return function(n,r,i){(n.computed?t:e)(n,r,i)}}(),N(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`,`Expression`))}}),nl=(e=!0)=>({...Xc(),...tl(),params:j(`FunctionParameter`,`TSParameterProperty`),kind:{validate:M(`get`,`set`,`method`,`constructor`),default:`method`},access:{validate:F(P(`string`),M(`public`,`private`,`protected`)),optional:!0},...e?{decorators:{validate:A(`Decorator`),optional:!0}}:{}});I(`ClassMethod`,{aliases:[`Function`,`Scopable`,`BlockParent`,`FunctionParent`,`Method`],builder:[`kind`,`key`,`params`,`body`,`computed`,`static`,`generator`,`async`],visitor:[`decorators`,`key`,`typeParameters`,`params`,`returnType`,`body`],...Jc(),fields:{...nl(),...Zc(),body:{validate:N(`BlockStatement`)}}}),I(`ObjectPattern`,{visitor:[`decorators`,`properties`,`typeAnnotation`],builder:[`properties`],aliases:[`FunctionParameter`,`Pattern`,`PatternLike`,`LVal`],fields:{...$c(),properties:j(`RestElement`,`ObjectProperty`)}}),I(`SpreadElement`,{visitor:[`argument`],aliases:[`UnaryLike`],deprecatedAlias:`SpreadProperty`,fields:{argument:{validate:N(`Expression`)}}}),I(`Super`),I(`TaggedTemplateExpression`,{visitor:[`tag`,`typeArguments`,`quasi`],builder:[`tag`,`quasi`],aliases:[`Expression`],fields:{tag:{validate:N(`Expression`)},quasi:{validate:N(`TemplateLiteral`)},typeArguments:{validate:N(`TypeParameterInstantiation`,`TSTypeParameterInstantiation`),optional:!0}}}),I(`TemplateElement`,{builder:[`value`,`tail`],fields:{value:{validate:F(Bc({raw:{validate:P(`string`)},cooked:{validate:P(`string`),optional:!0}}),function(e){let t=e.value.raw,n=!1,r=()=>{throw Error(`Internal @babel/types error.`)},{str:i,firstInvalidLoc:a}=pn(`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=a?null:i})},tail:{default:!1}}}),I(`TemplateLiteral`,{visitor:[`quasis`,`expressions`],aliases:[`Expression`,`Literal`],fields:{quasis:j(`TemplateElement`),expressions:{validate:F(P(`array`),Lc(N(`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}`)})}}}),I(`YieldExpression`,{builder:[`argument`,`delegate`],visitor:[`argument`],aliases:[`Expression`,`Terminatorless`],fields:{delegate:{validate:F(P(`boolean`),T(function(e,t,n){if(n&&!e.argument)throw TypeError(`Property delegate of YieldExpression cannot be true if there is no argument`)},{type:`boolean`})),default:!1},argument:{optional:!0,validate:N(`Expression`)}}}),I(`AwaitExpression`,{builder:[`argument`],visitor:[`argument`],aliases:[`Expression`,`Terminatorless`],fields:{argument:{validate:N(`Expression`)}}}),I(`ImportExpression`,{visitor:[`source`,`options`],aliases:[`Expression`],fields:{phase:{default:null,validate:M(`source`,`defer`)},source:{validate:N(`Expression`)},options:{validate:N(`Expression`),optional:!0}}}),I(`Import`),I(`BigIntLiteral`,{builder:[`value`],fields:{value:{validate:P(`bigint`)}},aliases:[`Expression`,`Pureish`,`Literal`,`Immutable`]}),I(`ExportNamespaceSpecifier`,{visitor:[`exported`],aliases:[`ModuleSpecifier`],fields:{exported:{validate:N(`Identifier`,`StringLiteral`)}}}),I(`OptionalMemberExpression`,{builder:[`object`,`property`,`computed`,`optional`],visitor:[`object`,`property`],aliases:[`Expression`],...Yc,fields:{object:{validate:N(`Expression`)},property:{validate:function(){let e=N(`Identifier`,`PrivateName`),t=N(`Expression`);return T(function(n,r,i){(n.computed?t:e)(n,r,i)},{oneOfNodeTypes:[`Expression`,`PrivateName`]})}()},computed:{default:!1},optional:{validate:F(P(`boolean`),Vc())}}}),I(`OptionalCallExpression`,{visitor:[`callee`,`typeArguments`,`arguments`],builder:[`callee`,`arguments`,`optional`],aliases:[`Expression`],fields:{callee:{validate:N(`Expression`)},arguments:j(`Expression`,`SpreadElement`,`ArgumentPlaceholder`),optional:{validate:F(P(`boolean`),Vc())},typeArguments:{validate:N(`TypeParameterInstantiation`,`TSTypeParameterInstantiation`),optional:!0}}}),I(`ClassProperty`,{visitor:[`decorators`,`variance`,`key`,`typeAnnotation`,`value`],builder:[`key`,`value`,`typeAnnotation`,`decorators`,`computed`,`static`],aliases:[`Property`],...Jc(),fields:{...tl(),value:{validate:N(`Expression`),optional:!0},definite:{validate:P(`boolean`),optional:!0},typeAnnotation:{validate:N(`TypeAnnotation`,`TSTypeAnnotation`),optional:!0},decorators:{validate:A(`Decorator`),optional:!0},readonly:{validate:P(`boolean`),optional:!0},declare:{validate:P(`boolean`),optional:!0},variance:{validate:N(`Variance`),optional:!0}}}),I(`ClassPrivateProperty`,{visitor:[`decorators`,`variance`,`key`,`typeAnnotation`,`value`],builder:[`key`,`value`,`decorators`,`static`],aliases:[`Property`,`Private`],fields:{key:{validate:N(`PrivateName`)},value:{validate:N(`Expression`),optional:!0},typeAnnotation:{validate:N(`TypeAnnotation`,`TSTypeAnnotation`),optional:!0},decorators:{validate:A(`Decorator`),optional:!0},static:{validate:P(`boolean`),default:!1},readonly:{validate:P(`boolean`),optional:!0},optional:{validate:P(`boolean`),optional:!0},definite:{validate:P(`boolean`),optional:!0},variance:{validate:N(`Variance`),optional:!0}}}),I(`ClassPrivateMethod`,{builder:[`kind`,`key`,`params`,`body`,`static`],visitor:[`decorators`,`key`,`typeParameters`,`params`,`returnType`,`body`],aliases:[`Function`,`Scopable`,`BlockParent`,`FunctionParent`,`Method`,`Private`],fields:{...nl(),...Zc(),kind:{validate:M(`get`,`set`,`method`),default:`method`},key:{validate:N(`PrivateName`)},body:{validate:N(`BlockStatement`)}}}),I(`PrivateName`,{visitor:[`id`],aliases:[`Private`],fields:{id:{validate:N(`Identifier`)}}}),I(`StaticBlock`,{visitor:[`body`],fields:{body:j(`Statement`)},aliases:[`Scopable`,`BlockParent`,`FunctionParent`]}),I(`ImportAttribute`,{visitor:[`key`,`value`],fields:{key:{validate:N(`Identifier`,`StringLiteral`)},value:{validate:N(`StringLiteral`)}}});const L=Gc(`Flow`),rl=e=>{let t=e===`DeclareClass`;L(e,{builder:[`id`,`typeParameters`,`extends`,`body`],visitor:[`id`,`typeParameters`,`extends`,...t?[`mixins`,`implements`]:[],`body`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:D(`Identifier`),typeParameters:k(`TypeParameterDeclaration`),extends:O(A(`InterfaceExtends`)),...t?{mixins:O(A(`InterfaceExtends`)),implements:O(A(`ClassImplements`))}:{},body:D(`ObjectTypeAnnotation`)}})};L(`AnyTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),L(`ArrayTypeAnnotation`,{visitor:[`elementType`],aliases:[`FlowType`],fields:{elementType:D(`FlowType`)}}),L(`BooleanTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),L(`BooleanLiteralTypeAnnotation`,{builder:[`value`],aliases:[`FlowType`],fields:{value:E(P(`boolean`))}}),L(`NullLiteralTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),L(`ClassImplements`,{visitor:[`id`,`typeParameters`],fields:{id:D(`Identifier`),typeParameters:k(`TypeParameterInstantiation`)}}),rl(`DeclareClass`),L(`DeclareFunction`,{builder:[`id`],visitor:[`id`,`predicate`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:D(`Identifier`),predicate:k(`FlowPredicate`)}}),rl(`DeclareInterface`),L(`DeclareModule`,{builder:[`id`,`body`,`kind`],visitor:[`id`,`body`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:D(`Identifier`,`StringLiteral`),body:D(`BlockStatement`),kind:O(M(`CommonJS`,`ES`))}}),L(`DeclareModuleExports`,{visitor:[`typeAnnotation`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{typeAnnotation:D(`TypeAnnotation`)}}),L(`DeclareTypeAlias`,{visitor:[`id`,`typeParameters`,`right`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:D(`Identifier`),typeParameters:k(`TypeParameterDeclaration`),right:D(`FlowType`)}}),L(`DeclareOpaqueType`,{visitor:[`id`,`typeParameters`,`supertype`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:D(`Identifier`),typeParameters:k(`TypeParameterDeclaration`),supertype:k(`FlowType`),impltype:k(`FlowType`)}}),L(`DeclareVariable`,{visitor:[`id`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:D(`Identifier`)}}),L(`DeclareExportDeclaration`,{visitor:[`declaration`,`specifiers`,`source`,`attributes`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{declaration:k(`Flow`),specifiers:O(A(`ExportSpecifier`,`ExportNamespaceSpecifier`)),source:k(`StringLiteral`),default:O(P(`boolean`)),...el}}),L(`DeclareExportAllDeclaration`,{visitor:[`source`,`attributes`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{source:D(`StringLiteral`),exportKind:O(M(`type`,`value`)),...el}}),L(`DeclaredPredicate`,{visitor:[`value`],aliases:[`FlowPredicate`],fields:{value:D(`Expression`)}}),L(`ExistsTypeAnnotation`,{aliases:[`FlowType`]}),L(`FunctionTypeAnnotation`,{builder:[`typeParameters`,`params`,`rest`,`returnType`],visitor:[`typeParameters`,`this`,`params`,`rest`,`returnType`],aliases:[`FlowType`],fields:{typeParameters:k(`TypeParameterDeclaration`),params:j(`FunctionTypeParam`),rest:k(`FunctionTypeParam`),this:k(`FunctionTypeParam`),returnType:D(`FlowType`)}}),L(`FunctionTypeParam`,{visitor:[`name`,`typeAnnotation`],fields:{name:k(`Identifier`),typeAnnotation:D(`FlowType`),optional:O(P(`boolean`))}}),L(`GenericTypeAnnotation`,{visitor:[`id`,`typeParameters`],aliases:[`FlowType`],fields:{id:D(`Identifier`,`QualifiedTypeIdentifier`),typeParameters:k(`TypeParameterInstantiation`)}}),L(`InferredPredicate`,{aliases:[`FlowPredicate`]}),L(`InterfaceExtends`,{visitor:[`id`,`typeParameters`],fields:{id:D(`Identifier`,`QualifiedTypeIdentifier`),typeParameters:k(`TypeParameterInstantiation`)}}),rl(`InterfaceDeclaration`),L(`InterfaceTypeAnnotation`,{visitor:[`extends`,`body`],aliases:[`FlowType`],fields:{extends:O(A(`InterfaceExtends`)),body:D(`ObjectTypeAnnotation`)}}),L(`IntersectionTypeAnnotation`,{visitor:[`types`],aliases:[`FlowType`],fields:{types:E(A(`FlowType`))}}),L(`MixedTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),L(`EmptyTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),L(`NullableTypeAnnotation`,{visitor:[`typeAnnotation`],aliases:[`FlowType`],fields:{typeAnnotation:D(`FlowType`)}}),L(`NumberLiteralTypeAnnotation`,{builder:[`value`],aliases:[`FlowType`],fields:{value:E(P(`number`))}}),L(`BigIntLiteralTypeAnnotation`,{builder:[`value`],aliases:[`FlowType`],fields:{value:E(P(`bigint`))}}),L(`NumberTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),L(`ObjectTypeAnnotation`,{visitor:[`properties`,`indexers`,`callProperties`,`internalSlots`],aliases:[`FlowType`],builder:[`properties`,`indexers`,`callProperties`,`internalSlots`,`exact`],fields:{properties:E(A(`ObjectTypeProperty`,`ObjectTypeSpreadProperty`)),indexers:{validate:A(`ObjectTypeIndexer`),optional:!1,default:[]},callProperties:{validate:A(`ObjectTypeCallProperty`),optional:!1,default:[]},internalSlots:{validate:A(`ObjectTypeInternalSlot`),optional:!1,default:[]},exact:{validate:P(`boolean`),default:!1},inexact:O(P(`boolean`))}}),L(`ObjectTypeInternalSlot`,{visitor:[`id`,`value`],builder:[`id`,`value`,`optional`,`static`,`method`],aliases:[`UserWhitespacable`],fields:{id:D(`Identifier`),value:D(`FlowType`),optional:E(P(`boolean`)),static:E(P(`boolean`)),method:E(P(`boolean`))}}),L(`ObjectTypeCallProperty`,{visitor:[`value`],aliases:[`UserWhitespacable`],fields:{value:D(`FlowType`),static:Fc(P(`boolean`),!1)}}),L(`ObjectTypeIndexer`,{visitor:[`variance`,`id`,`key`,`value`],builder:[`id`,`key`,`value`,`variance`],aliases:[`UserWhitespacable`],fields:{id:k(`Identifier`),key:D(`FlowType`),value:D(`FlowType`),static:Fc(P(`boolean`),!1),variance:k(`Variance`)}}),L(`ObjectTypeProperty`,{visitor:[`key`,`value`,`variance`],aliases:[`UserWhitespacable`],fields:{key:D(`Identifier`,`StringLiteral`,`NumericLiteral`),value:D(`FlowType`),kind:{validate:M(`init`,`get`,`set`),default:`init`,optional:!1},static:Fc(P(`boolean`),!1),proto:Fc(P(`boolean`),!1),optional:Fc(P(`boolean`),!1),variance:k(`Variance`),method:Fc(P(`boolean`),!1)}}),L(`ObjectTypeSpreadProperty`,{visitor:[`argument`],aliases:[`UserWhitespacable`],fields:{argument:D(`FlowType`)}}),L(`OpaqueType`,{visitor:[`id`,`typeParameters`,`supertype`,`impltype`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:D(`Identifier`),typeParameters:k(`TypeParameterDeclaration`),supertype:k(`FlowType`),impltype:D(`FlowType`)}}),L(`QualifiedTypeIdentifier`,{visitor:[`qualification`,`id`],builder:[`id`,`qualification`],fields:{id:D(`Identifier`),qualification:D(`Identifier`,`QualifiedTypeIdentifier`)}}),L(`StringLiteralTypeAnnotation`,{builder:[`value`],aliases:[`FlowType`],fields:{value:E(P(`string`))}}),L(`StringTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),L(`SymbolTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),L(`ThisTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),L(`TupleTypeAnnotation`,{visitor:[`types`],aliases:[`FlowType`],fields:{types:E(A(`FlowType`))}}),L(`TypeofTypeAnnotation`,{visitor:[`argument`],aliases:[`FlowType`],fields:{argument:D(`FlowType`)}}),L(`TypeAlias`,{visitor:[`id`,`typeParameters`,`right`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:D(`Identifier`),typeParameters:k(`TypeParameterDeclaration`),right:D(`FlowType`)}}),L(`TypeAnnotation`,{visitor:[`typeAnnotation`],fields:{typeAnnotation:D(`FlowType`)}}),L(`TypeCastExpression`,{visitor:[`expression`,`typeAnnotation`],aliases:[`ExpressionWrapper`,`Expression`],fields:{expression:D(`Expression`),typeAnnotation:D(`TypeAnnotation`)}}),L(`TypeParameter`,{builder:[`name`,`bound`,`default`,`variance`],visitor:[`bound`,`default`,`variance`],fields:{name:E(P(`string`)),bound:k(`TypeAnnotation`),default:k(`FlowType`),variance:k(`Variance`)}}),L(`TypeParameterDeclaration`,{visitor:[`params`],fields:{params:E(A(`TypeParameter`))}}),L(`TypeParameterInstantiation`,{visitor:[`params`],fields:{params:E(A(`FlowType`))}}),L(`UnionTypeAnnotation`,{visitor:[`types`],aliases:[`FlowType`],fields:{types:E(A(`FlowType`))}}),L(`Variance`,{builder:[`kind`],fields:{kind:E(M(`minus`,`plus`))}}),L(`VoidTypeAnnotation`,{aliases:[`FlowType`,`FlowBaseAnnotation`]}),L(`EnumDeclaration`,{aliases:[`Statement`,`Declaration`],visitor:[`id`,`body`],fields:{id:D(`Identifier`),body:D(`EnumBooleanBody`,`EnumNumberBody`,`EnumStringBody`,`EnumSymbolBody`)}});const il={explicitType:Fc(P(`boolean`),!1),hasUnknownMembers:Fc(P(`boolean`),!1)};L(`EnumBooleanBody`,{aliases:[`EnumBody`],visitor:[`members`],fields:{...il,members:j(`EnumBooleanMember`)}}),L(`EnumNumberBody`,{aliases:[`EnumBody`],visitor:[`members`],fields:{...il,members:j(`EnumNumberMember`)}}),L(`EnumStringBody`,{aliases:[`EnumBody`],visitor:[`members`],fields:{...il,members:j(`EnumStringMember`,`EnumDefaultedMember`)}}),L(`EnumSymbolBody`,{aliases:[`EnumBody`],visitor:[`members`],fields:{members:j(`EnumDefaultedMember`),hasUnknownMembers:Fc(P(`boolean`),!1)}}),L(`EnumBooleanMember`,{aliases:[`EnumMember`],visitor:[`id`,`init`],fields:{id:D(`Identifier`),init:D(`BooleanLiteral`)}}),L(`EnumNumberMember`,{aliases:[`EnumMember`],visitor:[`id`,`init`],fields:{id:D(`Identifier`),init:D(`NumericLiteral`)}}),L(`EnumStringMember`,{aliases:[`EnumMember`],visitor:[`id`,`init`],fields:{id:D(`Identifier`),init:D(`StringLiteral`)}}),L(`EnumDefaultedMember`,{aliases:[`EnumMember`],visitor:[`id`],fields:{id:D(`Identifier`)}}),L(`IndexedAccessType`,{visitor:[`objectType`,`indexType`],aliases:[`FlowType`],fields:{objectType:D(`FlowType`),indexType:D(`FlowType`)}}),L(`OptionalIndexedAccessType`,{visitor:[`objectType`,`indexType`],aliases:[`FlowType`],fields:{objectType:D(`FlowType`),indexType:D(`FlowType`),optional:Fc(P(`boolean`),!1)}});const al=Gc(`JSX`);al(`JSXAttribute`,{visitor:[`name`,`value`],aliases:[`Immutable`],fields:{name:{validate:N(`JSXIdentifier`,`JSXNamespacedName`)},value:{optional:!0,validate:N(`JSXElement`,`JSXFragment`,`StringLiteral`,`JSXExpressionContainer`)}}}),al(`JSXClosingElement`,{visitor:[`name`],aliases:[`Immutable`],fields:{name:{validate:N(`JSXIdentifier`,`JSXMemberExpression`,`JSXNamespacedName`)}}}),al(`JSXElement`,{builder:[`openingElement`,`closingElement`,`children`],visitor:[`openingElement`,`children`,`closingElement`],aliases:[`Immutable`,`Expression`],fields:{openingElement:{validate:N(`JSXOpeningElement`)},closingElement:{optional:!0,validate:N(`JSXClosingElement`)},children:j(`JSXText`,`JSXExpressionContainer`,`JSXSpreadChild`,`JSXElement`,`JSXFragment`)}}),al(`JSXEmptyExpression`,{}),al(`JSXExpressionContainer`,{visitor:[`expression`],aliases:[`Immutable`],fields:{expression:{validate:N(`Expression`,`JSXEmptyExpression`)}}}),al(`JSXSpreadChild`,{visitor:[`expression`],aliases:[`Immutable`],fields:{expression:{validate:N(`Expression`)}}}),al(`JSXIdentifier`,{builder:[`name`],fields:{name:{validate:P(`string`)}}}),al(`JSXMemberExpression`,{visitor:[`object`,`property`],fields:{object:{validate:N(`JSXMemberExpression`,`JSXIdentifier`)},property:{validate:N(`JSXIdentifier`)}}}),al(`JSXNamespacedName`,{visitor:[`namespace`,`name`],fields:{namespace:{validate:N(`JSXIdentifier`)},name:{validate:N(`JSXIdentifier`)}}}),al(`JSXOpeningElement`,{builder:[`name`,`attributes`,`selfClosing`],visitor:[`name`,`typeArguments`,`attributes`],aliases:[`Immutable`],fields:{name:{validate:N(`JSXIdentifier`,`JSXMemberExpression`,`JSXNamespacedName`)},selfClosing:{default:!1},attributes:j(`JSXAttribute`,`JSXSpreadAttribute`),typeArguments:{validate:N(`TypeParameterInstantiation`,`TSTypeParameterInstantiation`),optional:!0}}}),al(`JSXSpreadAttribute`,{visitor:[`argument`],fields:{argument:{validate:N(`Expression`)}}}),al(`JSXText`,{aliases:[`Immutable`],builder:[`value`],fields:{value:{validate:P(`string`)}}}),al(`JSXFragment`,{builder:[`openingFragment`,`closingFragment`,`children`],visitor:[`openingFragment`,`children`,`closingFragment`],aliases:[`Immutable`,`Expression`],fields:{openingFragment:{validate:N(`JSXOpeningFragment`)},closingFragment:{validate:N(`JSXClosingFragment`)},children:j(`JSXText`,`JSXExpressionContainer`,`JSXSpreadChild`,`JSXElement`,`JSXFragment`)}}),al(`JSXOpeningFragment`,{aliases:[`Immutable`]}),al(`JSXClosingFragment`,{aliases:[`Immutable`]});const ol=[`Identifier`,`StringLiteral`,`Expression`,`Statement`,`Declaration`,`BlockStatement`,`ClassBody`,`Pattern`],sl={Declaration:[`Statement`],Pattern:[`PatternLike`,`LVal`]};for(let e of ol){let t=Oc[e];t?.length&&(sl[e]=t)}const cl={};Object.keys(sl).forEach(e=>{sl[e].forEach(t=>{Object.hasOwn(cl,t)||(cl[t]=[]),cl[t].push(e)})});const ll=Gc(`Miscellaneous`);ll(`Placeholder`,{visitor:[],builder:[`expectedNode`,`name`],fields:{name:{validate:N(`Identifier`)},expectedNode:{validate:M(...ol)},...$c()}}),ll(`V8IntrinsicIdentifier`,{builder:[`name`],fields:{name:{validate:P(`string`)}}}),Kc(`ArgumentPlaceholder`,{}),Kc(`BindExpression`,{visitor:[`object`,`callee`],aliases:[`Expression`],fields:{object:{validate:zc(`null`,`Expression`)},callee:{validate:N(`Expression`)}}}),Kc(`ClassAccessorProperty`,{visitor:[`decorators`,`key`,`typeAnnotation`,`value`],builder:[`key`,`value`,`typeAnnotation`,`decorators`,`computed`,`static`],aliases:[`Property`,`Accessor`],...Jc(!0),fields:{...tl(),key:{validate:F(function(){let e=N(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`,`PrivateName`),t=N(`Expression`);return function(n,r,i){(n.computed?t:e)(n,r,i)}}(),N(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`,`Expression`,`PrivateName`))},value:{validate:N(`Expression`),optional:!0},definite:{validate:P(`boolean`),optional:!0},typeAnnotation:{validate:N(`TypeAnnotation`,`TSTypeAnnotation`),optional:!0},decorators:{validate:A(`Decorator`),optional:!0},readonly:{validate:P(`boolean`),optional:!0},declare:{validate:P(`boolean`),optional:!0},variance:{validate:N(`Variance`),optional:!0}}}),Kc(`Decorator`,{visitor:[`expression`],fields:{expression:{validate:N(`Expression`)}}}),Kc(`DoExpression`,{visitor:[`body`],builder:[`body`,`async`],aliases:[`Expression`],fields:{body:{validate:N(`BlockStatement`)},async:{validate:P(`boolean`),default:!1}}}),Kc(`ExportDefaultSpecifier`,{visitor:[`exported`],aliases:[`ModuleSpecifier`],fields:{exported:{validate:N(`Identifier`)}}}),Kc(`ModuleExpression`,{visitor:[`body`],fields:{body:{validate:N(`Program`)}},aliases:[`Expression`]}),Kc(`TopicReference`,{aliases:[`Expression`]}),Kc(`VoidPattern`,{aliases:[`Pattern`,`PatternLike`,`FunctionParameter`]});const R=Gc(`TypeScript`),ul=P(`boolean`),dl=()=>({returnType:{validate:N(`TSTypeAnnotation`),optional:!0},typeParameters:{validate:N(`TSTypeParameterDeclaration`),optional:!0}});R(`TSParameterProperty`,{aliases:[],visitor:[`parameter`],fields:{accessibility:{validate:M(`public`,`private`,`protected`),optional:!0},readonly:{validate:P(`boolean`),optional:!0},parameter:{validate:N(`Identifier`,`AssignmentPattern`)},override:{validate:P(`boolean`),optional:!0},decorators:{validate:A(`Decorator`),optional:!0}}}),R(`TSDeclareFunction`,{aliases:[`Statement`,`Declaration`],visitor:[`id`,`typeParameters`,`params`,`returnType`],fields:{...Qc(),...dl()}}),R(`TSDeclareMethod`,{visitor:[`key`,`typeParameters`,`params`,`returnType`],...Jc(),fields:{...nl(!1),...dl()}}),R(`TSQualifiedName`,{aliases:[`TSEntityName`],visitor:[`left`,`right`],fields:{left:D(`TSEntityName`),right:D(`Identifier`)}});const fl=()=>({typeParameters:k(`TSTypeParameterDeclaration`),params:j(`ArrayPattern`,`Identifier`,`ObjectPattern`,`RestElement`),returnType:k(`TSTypeAnnotation`)}),pl={aliases:[`TSTypeElement`],visitor:[`typeParameters`,`params`,`returnType`],fields:fl()};R(`TSCallSignatureDeclaration`,pl),R(`TSConstructSignatureDeclaration`,pl);const ml=()=>({key:D(`Expression`),computed:{default:!1},optional:O(ul)});R(`TSPropertySignature`,{aliases:[`TSTypeElement`],visitor:[`key`,`typeAnnotation`],fields:{...ml(),readonly:O(ul),typeAnnotation:k(`TSTypeAnnotation`),kind:{optional:!0,validate:M(`get`,`set`)}}}),R(`TSMethodSignature`,{aliases:[`TSTypeElement`],visitor:[`key`,`typeParameters`,`params`,`returnType`],fields:{...fl(),...ml(),kind:{validate:M(`method`,`get`,`set`),default:`method`}}}),R(`TSIndexSignature`,{aliases:[`TSTypeElement`],visitor:[`parameters`,`typeAnnotation`],fields:{readonly:O(ul),static:O(ul),parameters:j(`Identifier`),typeAnnotation:k(`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:{}});const hl={aliases:[`TSType`],visitor:[`typeParameters`,`params`,`returnType`]};R(`TSFunctionType`,{...hl,fields:fl()}),R(`TSConstructorType`,{...hl,fields:{...fl(),abstract:O(ul)}}),R(`TSTypeReference`,{aliases:[`TSType`],visitor:[`typeName`,`typeArguments`],fields:{typeName:D(`TSEntityName`),typeArguments:k(`TSTypeParameterInstantiation`)}}),R(`TSTypePredicate`,{aliases:[`TSType`],visitor:[`parameterName`,`typeAnnotation`],builder:[`parameterName`,`typeAnnotation`,`asserts`],fields:{parameterName:D(`Identifier`,`TSThisType`),typeAnnotation:k(`TSTypeAnnotation`),asserts:O(ul)}}),R(`TSTypeQuery`,{aliases:[`TSType`],visitor:[`exprName`,`typeArguments`],fields:{exprName:D(`TSEntityName`,`TSImportType`),typeArguments:k(`TSTypeParameterInstantiation`)}}),R(`TSTypeLiteral`,{aliases:[`TSType`],visitor:[`members`],fields:{members:j(`TSTypeElement`)}}),R(`TSArrayType`,{aliases:[`TSType`],visitor:[`elementType`],fields:{elementType:D(`TSType`)}}),R(`TSTupleType`,{aliases:[`TSType`],visitor:[`elementTypes`],fields:{elementTypes:j(`TSType`,`TSNamedTupleMember`)}}),R(`TSOptionalType`,{aliases:[`TSType`],visitor:[`typeAnnotation`],fields:{typeAnnotation:D(`TSType`)}}),R(`TSRestType`,{aliases:[`TSType`],visitor:[`typeAnnotation`],fields:{typeAnnotation:D(`TSType`)}}),R(`TSNamedTupleMember`,{visitor:[`label`,`elementType`],builder:[`label`,`elementType`,`optional`],fields:{label:D(`Identifier`),optional:{validate:ul,default:!1},elementType:D(`TSType`)}});const gl={aliases:[`TSType`],visitor:[`types`],fields:{types:j(`TSType`)}};R(`TSUnionType`,gl),R(`TSIntersectionType`,gl),R(`TSConditionalType`,{aliases:[`TSType`],visitor:[`checkType`,`extendsType`,`trueType`,`falseType`],fields:{checkType:D(`TSType`),extendsType:D(`TSType`),trueType:D(`TSType`),falseType:D(`TSType`)}}),R(`TSInferType`,{aliases:[`TSType`],visitor:[`typeParameter`],fields:{typeParameter:D(`TSTypeParameter`)}}),R(`TSParenthesizedType`,{aliases:[`TSType`],visitor:[`typeAnnotation`],fields:{typeAnnotation:D(`TSType`)}}),R(`TSTypeOperator`,{aliases:[`TSType`],visitor:[`typeAnnotation`],builder:[`typeAnnotation`,`operator`],fields:{operator:{validate:M(`keyof`,`readonly`,`unique`),default:void 0},typeAnnotation:D(`TSType`)}}),R(`TSIndexedAccessType`,{aliases:[`TSType`],visitor:[`objectType`,`indexType`],fields:{objectType:D(`TSType`),indexType:D(`TSType`)}}),R(`TSMappedType`,{aliases:[`TSType`],visitor:[`key`,`constraint`,`nameType`,`typeAnnotation`],builder:[`key`,`constraint`,`nameType`,`typeAnnotation`],fields:{key:D(`Identifier`),constraint:D(`TSType`),readonly:O(M(!0,!1,`+`,`-`)),optional:O(M(!0,!1,`+`,`-`)),typeAnnotation:k(`TSType`),nameType:k(`TSType`)}}),R(`TSTemplateLiteralType`,{aliases:[`TSType`,`TSBaseType`],visitor:[`quasis`,`types`],fields:{quasis:j(`TemplateElement`),types:{validate:F(P(`array`),Lc(N(`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 e=N(`NumericLiteral`,`BigIntLiteral`),t=M(`-`),n=N(`NumericLiteral`,`StringLiteral`,`BooleanLiteral`,`BigIntLiteral`,`TemplateLiteral`);return T(function(r,i,a){C(`UnaryExpression`,a)?(t(a,`operator`,a.operator),e(a,`argument`,a.argument)):n(r,i,a)},{oneOfNodeTypes:[`NumericLiteral`,`StringLiteral`,`BooleanLiteral`,`BigIntLiteral`,`TemplateLiteral`,`UnaryExpression`]})}()}}}),R(`TSClassImplements`,{aliases:[`TSType`],visitor:[`expression`,`typeArguments`],fields:{expression:D(`Expression`),typeArguments:k(`TSTypeParameterInstantiation`)}}),R(`TSInterfaceHeritage`,{aliases:[`TSType`],visitor:[`expression`,`typeArguments`],fields:{expression:D(`Expression`),typeArguments:k(`TSTypeParameterInstantiation`)}}),R(`TSInterfaceDeclaration`,{aliases:[`Statement`,`Declaration`],visitor:[`id`,`typeParameters`,`extends`,`body`],fields:{declare:O(ul),id:D(`Identifier`),typeParameters:k(`TSTypeParameterDeclaration`),extends:O(A(`TSInterfaceHeritage`)),body:D(`TSInterfaceBody`)}}),R(`TSInterfaceBody`,{visitor:[`body`],fields:{body:j(`TSTypeElement`)}}),R(`TSTypeAliasDeclaration`,{aliases:[`Statement`,`Declaration`],visitor:[`id`,`typeParameters`,`typeAnnotation`],fields:{declare:O(ul),id:D(`Identifier`),typeParameters:k(`TSTypeParameterDeclaration`),typeAnnotation:D(`TSType`)}}),R(`TSInstantiationExpression`,{aliases:[`Expression`],visitor:[`expression`,`typeArguments`],fields:{expression:D(`Expression`),typeArguments:k(`TSTypeParameterInstantiation`)}});const _l={aliases:[`Expression`,`LVal`,`PatternLike`],visitor:[`expression`,`typeAnnotation`],fields:{expression:D(`Expression`),typeAnnotation:D(`TSType`)}};R(`TSAsExpression`,_l),R(`TSSatisfiesExpression`,_l),R(`TSTypeAssertion`,{aliases:[`Expression`,`LVal`,`PatternLike`],visitor:[`typeAnnotation`,`expression`],fields:{typeAnnotation:D(`TSType`),expression:D(`Expression`)}}),R(`TSEnumBody`,{visitor:[`members`],fields:{members:j(`TSEnumMember`)}}),R(`TSEnumDeclaration`,{aliases:[`Statement`,`Declaration`],visitor:[`id`,`body`],fields:{declare:O(ul),const:O(ul),id:D(`Identifier`),body:D(`TSEnumBody`)}}),R(`TSEnumMember`,{visitor:[`id`,`initializer`],fields:{id:D(`Identifier`,`StringLiteral`),initializer:k(`Expression`)}}),R(`TSModuleDeclaration`,{aliases:[`Statement`,`Declaration`],visitor:[`id`,`body`],fields:{kind:{validate:M(`global`,`namespace`,`module`),default:`namespace`},declare:O(ul),id:{validate:F(N(`TSEntityName`,`StringLiteral`),T(function(e,t,n){if(e.kind===`namespace`&&C(`StringLiteral`,n))throw TypeError(`TSModuleDeclaration of kind 'namespace' cannot have a StringLiteral id.`)},{oneOfNodeTypes:[`TSEntityName`,`StringLiteral`]}))},body:D(`TSModuleBlock`)}}),R(`TSModuleBlock`,{aliases:[`Scopable`,`Block`,`BlockParent`,`FunctionParent`],visitor:[`body`],fields:{body:j(`Statement`)}}),R(`TSImportType`,{aliases:[`TSType`],builder:[`source`,`qualifier`,`typeArguments`],visitor:[`source`,`options`,`qualifier`,`typeArguments`],fields:{source:D(`StringLiteral`),qualifier:k(`TSEntityName`),typeArguments:k(`TSTypeParameterInstantiation`),options:{validate:N(`ObjectExpression`),optional:!0}}}),R(`TSImportEqualsDeclaration`,{aliases:[`Statement`,`Declaration`],visitor:[`id`,`moduleReference`],fields:{id:D(`Identifier`),moduleReference:D(`TSEntityName`,`TSExternalModuleReference`),importKind:{validate:M(`type`,`value`),optional:!0}}}),R(`TSExternalModuleReference`,{visitor:[`expression`],fields:{expression:D(`StringLiteral`)}}),R(`TSNonNullExpression`,{aliases:[`Expression`,`LVal`,`PatternLike`],visitor:[`expression`],fields:{expression:D(`Expression`)}}),R(`TSExportAssignment`,{aliases:[`Statement`],visitor:[`expression`],fields:{expression:D(`Expression`)}}),R(`TSNamespaceExportDeclaration`,{aliases:[`Statement`],visitor:[`id`],fields:{id:D(`Identifier`)}}),R(`TSTypeAnnotation`,{visitor:[`typeAnnotation`],fields:{typeAnnotation:{validate:N(`TSType`)}}}),R(`TSTypeParameterInstantiation`,{visitor:[`params`],fields:{params:j(`TSType`)}}),R(`TSTypeParameterDeclaration`,{visitor:[`params`],fields:{params:j(`TSTypeParameter`)}}),R(`TSTypeParameter`,{builder:[`constraint`,`default`,`name`],visitor:[`name`,`constraint`,`default`],fields:{name:{validate:N(`Identifier`)},in:{validate:P(`boolean`),optional:!0},out:{validate:P(`boolean`),optional:!0},const:{validate:P(`boolean`),optional:!0},constraint:{validate:N(`TSType`),optional:!0},default:{validate:N(`TSType`),optional:!0}}});const vl={ModuleDeclaration:`ImportOrExportDeclaration`};Object.keys(vl).forEach(e=>{w[e]=w[vl[e]]});for(let{types:e,set:t}of Rc)for(let n of e){let e=w[n];e?e.forEach(t.add,t):t.add(n)}const yl=[].concat(Object.keys(Dc),Object.keys(w),Object.keys(jc));function bl(e,t,n){if(!e)return;let r=kc[e.type];if(!r)return;let i=r[t];Sl(e,t,n,i),Cl(e,t,n)}function xl(e,t,n,r,i){if(e?.validate&&!(e.optional&&r==null)&&(e.validate(t,n,r),i)){let e=r.type;if(e==null)return;Mc[e]?.(t,n,r)}}function Sl(e,t,n,r){r?.validate&&(r.optional&&n==null||r.validate(e,t,n))}function Cl(e,t,n){let r=n?.type;r!=null&&Mc[r]?.(e,t,n)}const{validateInternal:z}=Object.defineProperty({__proto__:null,default:bl,validateChild:Cl,validateField:Sl,validateInternal:xl},Symbol.toStringTag,{value:`Module`}),{NODE_FIELDS:B}=qc;function wl(e){let t={type:`ArrayExpression`,elements:e},n=B.ArrayExpression;return z(n.elements,t,`elements`,e,1),t}function Tl(e,t,n){let r={type:`AssignmentExpression`,operator:e,left:t,right:n},i=B.AssignmentExpression;return z(i.operator,r,`operator`,e),z(i.left,r,`left`,t,1),z(i.right,r,`right`,n,1),r}function El(e,t,n){let r={type:`BinaryExpression`,operator:e,left:t,right:n},i=B.BinaryExpression;return z(i.operator,r,`operator`,e),z(i.left,r,`left`,t,1),z(i.right,r,`right`,n,1),r}function Dl(e){let t={type:`InterpreterDirective`,value:e},n=B.InterpreterDirective;return z(n.value,t,`value`,e),t}function Ol(e){let t={type:`Directive`,value:e},n=B.Directive;return z(n.value,t,`value`,e,1),t}function kl(e){let t={type:`DirectiveLiteral`,value:e},n=B.DirectiveLiteral;return z(n.value,t,`value`,e),t}function Al(e,t=[]){let n={type:`BlockStatement`,body:e,directives:t},r=B.BlockStatement;return z(r.body,n,`body`,e,1),z(r.directives,n,`directives`,t,1),n}function jl(e=null){let t={type:`BreakStatement`,label:e},n=B.BreakStatement;return z(n.label,t,`label`,e,1),t}function Ml(e,t){let n={type:`CallExpression`,callee:e,arguments:t},r=B.CallExpression;return z(r.callee,n,`callee`,e,1),z(r.arguments,n,`arguments`,t,1),n}function Nl(e=null,t){let n={type:`CatchClause`,param:e,body:t},r=B.CatchClause;return z(r.param,n,`param`,e,1),z(r.body,n,`body`,t,1),n}function Pl(e,t,n){let r={type:`ConditionalExpression`,test:e,consequent:t,alternate:n},i=B.ConditionalExpression;return z(i.test,r,`test`,e,1),z(i.consequent,r,`consequent`,t,1),z(i.alternate,r,`alternate`,n,1),r}function Fl(e=null){let t={type:`ContinueStatement`,label:e},n=B.ContinueStatement;return z(n.label,t,`label`,e,1),t}function Il(){return{type:`DebuggerStatement`}}function Ll(e,t){let n={type:`DoWhileStatement`,test:e,body:t},r=B.DoWhileStatement;return z(r.test,n,`test`,e,1),z(r.body,n,`body`,t,1),n}function Rl(){return{type:`EmptyStatement`}}function zl(e){let t={type:`ExpressionStatement`,expression:e},n=B.ExpressionStatement;return z(n.expression,t,`expression`,e,1),t}function Bl(e,t=null,n=null){let r={type:`File`,program:e,comments:t,tokens:n},i=B.File;return z(i.program,r,`program`,e,1),z(i.comments,r,`comments`,t,1),z(i.tokens,r,`tokens`,n),r}function Vl(e,t,n){let r={type:`ForInStatement`,left:e,right:t,body:n},i=B.ForInStatement;return z(i.left,r,`left`,e,1),z(i.right,r,`right`,t,1),z(i.body,r,`body`,n,1),r}function Hl(e=null,t=null,n=null,r){let i={type:`ForStatement`,init:e,test:t,update:n,body:r},a=B.ForStatement;return z(a.init,i,`init`,e,1),z(a.test,i,`test`,t,1),z(a.update,i,`update`,n,1),z(a.body,i,`body`,r,1),i}function Ul(e=null,t,n,r=!1,i=!1){let a={type:`FunctionDeclaration`,id:e,params:t,body:n,generator:r,async:i},o=B.FunctionDeclaration;return z(o.id,a,`id`,e,1),z(o.params,a,`params`,t,1),z(o.body,a,`body`,n,1),z(o.generator,a,`generator`,r),z(o.async,a,`async`,i),a}function Wl(e=null,t,n,r=!1,i=!1){let a={type:`FunctionExpression`,id:e,params:t,body:n,generator:r,async:i},o=B.FunctionExpression;return z(o.id,a,`id`,e,1),z(o.params,a,`params`,t,1),z(o.body,a,`body`,n,1),z(o.generator,a,`generator`,r),z(o.async,a,`async`,i),a}function Gl(e){let t={type:`Identifier`,name:e},n=B.Identifier;return z(n.name,t,`name`,e),t}function Kl(e,t,n=null){let r={type:`IfStatement`,test:e,consequent:t,alternate:n},i=B.IfStatement;return z(i.test,r,`test`,e,1),z(i.consequent,r,`consequent`,t,1),z(i.alternate,r,`alternate`,n,1),r}function ql(e,t){let n={type:`LabeledStatement`,label:e,body:t},r=B.LabeledStatement;return z(r.label,n,`label`,e,1),z(r.body,n,`body`,t,1),n}function Jl(e){let t={type:`StringLiteral`,value:e},n=B.StringLiteral;return z(n.value,t,`value`,e),t}function Yl(e){let t={type:`NumericLiteral`,value:e},n=B.NumericLiteral;return z(n.value,t,`value`,e),t}function Xl(){return{type:`NullLiteral`}}function Zl(e){let t={type:`BooleanLiteral`,value:e},n=B.BooleanLiteral;return z(n.value,t,`value`,e),t}function Ql(e,t=``){let n={type:`RegExpLiteral`,pattern:e,flags:t},r=B.RegExpLiteral;return z(r.pattern,n,`pattern`,e),z(r.flags,n,`flags`,t),n}function $l(e,t,n){let r={type:`LogicalExpression`,operator:e,left:t,right:n},i=B.LogicalExpression;return z(i.operator,r,`operator`,e),z(i.left,r,`left`,t,1),z(i.right,r,`right`,n,1),r}function eu(e,t,n=!1){let r={type:`MemberExpression`,object:e,property:t,computed:n},i=B.MemberExpression;return z(i.object,r,`object`,e,1),z(i.property,r,`property`,t,1),z(i.computed,r,`computed`,n),r}function tu(e,t){let n={type:`NewExpression`,callee:e,arguments:t},r=B.NewExpression;return z(r.callee,n,`callee`,e,1),z(r.arguments,n,`arguments`,t,1),n}function nu(e,t=[],n=`script`,r=null){let i={type:`Program`,body:e,directives:t,sourceType:n,interpreter:r},a=B.Program;return z(a.body,i,`body`,e,1),z(a.directives,i,`directives`,t,1),z(a.sourceType,i,`sourceType`,n),z(a.interpreter,i,`interpreter`,r,1),i}function ru(e){let t={type:`ObjectExpression`,properties:e},n=B.ObjectExpression;return z(n.properties,t,`properties`,e,1),t}function iu(e,t,n,r,i=!1,a=!1,o=!1){let s={type:`ObjectMethod`,kind:e,key:t,params:n,body:r,computed:i,generator:a,async:o},c=B.ObjectMethod;return z(c.kind,s,`kind`,e),z(c.key,s,`key`,t,1),z(c.params,s,`params`,n,1),z(c.body,s,`body`,r,1),z(c.computed,s,`computed`,i),z(c.generator,s,`generator`,a),z(c.async,s,`async`,o),s}function au(e,t,n=!1,r=!1){let i={type:`ObjectProperty`,key:e,value:t,computed:n,shorthand:r},a=B.ObjectProperty;return z(a.key,i,`key`,e,1),z(a.value,i,`value`,t,1),z(a.computed,i,`computed`,n),z(a.shorthand,i,`shorthand`,r),i}function ou(e){let t={type:`RestElement`,argument:e},n=B.RestElement;return z(n.argument,t,`argument`,e,1),t}function su(e=null){let t={type:`ReturnStatement`,argument:e},n=B.ReturnStatement;return z(n.argument,t,`argument`,e,1),t}function cu(e){let t={type:`SequenceExpression`,expressions:e},n=B.SequenceExpression;return z(n.expressions,t,`expressions`,e,1),t}function lu(e){let t={type:`ParenthesizedExpression`,expression:e},n=B.ParenthesizedExpression;return z(n.expression,t,`expression`,e,1),t}function uu(e=null,t){let n={type:`SwitchCase`,test:e,consequent:t},r=B.SwitchCase;return z(r.test,n,`test`,e,1),z(r.consequent,n,`consequent`,t,1),n}function du(e,t){let n={type:`SwitchStatement`,discriminant:e,cases:t},r=B.SwitchStatement;return z(r.discriminant,n,`discriminant`,e,1),z(r.cases,n,`cases`,t,1),n}function fu(){return{type:`ThisExpression`}}function pu(e){let t={type:`ThrowStatement`,argument:e},n=B.ThrowStatement;return z(n.argument,t,`argument`,e,1),t}function mu(e,t=null,n=null){let r={type:`TryStatement`,block:e,handler:t,finalizer:n},i=B.TryStatement;return z(i.block,r,`block`,e,1),z(i.handler,r,`handler`,t,1),z(i.finalizer,r,`finalizer`,n,1),r}function hu(e,t,n=!0){let r={type:`UnaryExpression`,operator:e,argument:t,prefix:n},i=B.UnaryExpression;return z(i.operator,r,`operator`,e),z(i.argument,r,`argument`,t,1),z(i.prefix,r,`prefix`,n),r}function gu(e,t,n=!1){let r={type:`UpdateExpression`,operator:e,argument:t,prefix:n},i=B.UpdateExpression;return z(i.operator,r,`operator`,e),z(i.argument,r,`argument`,t,1),z(i.prefix,r,`prefix`,n),r}function _u(e,t){let n={type:`VariableDeclaration`,kind:e,declarations:t},r=B.VariableDeclaration;return z(r.kind,n,`kind`,e),z(r.declarations,n,`declarations`,t,1),n}function vu(e,t=null){let n={type:`VariableDeclarator`,id:e,init:t},r=B.VariableDeclarator;return z(r.id,n,`id`,e,1),z(r.init,n,`init`,t,1),n}function yu(e,t){let n={type:`WhileStatement`,test:e,body:t},r=B.WhileStatement;return z(r.test,n,`test`,e,1),z(r.body,n,`body`,t,1),n}function bu(e,t){let n={type:`WithStatement`,object:e,body:t},r=B.WithStatement;return z(r.object,n,`object`,e,1),z(r.body,n,`body`,t,1),n}function xu(e,t){let n={type:`AssignmentPattern`,left:e,right:t},r=B.AssignmentPattern;return z(r.left,n,`left`,e,1),z(r.right,n,`right`,t,1),n}function Su(e){let t={type:`ArrayPattern`,elements:e},n=B.ArrayPattern;return z(n.elements,t,`elements`,e,1),t}function Cu(e,t,n=!1){let r={type:`ArrowFunctionExpression`,params:e,body:t,async:n},i=B.ArrowFunctionExpression;return z(i.params,r,`params`,e,1),z(i.body,r,`body`,t,1),z(i.async,r,`async`,n),r}function wu(e){let t={type:`ClassBody`,body:e},n=B.ClassBody;return z(n.body,t,`body`,e,1),t}function Tu(e=null,t=null,n,r=null){let i={type:`ClassExpression`,id:e,superClass:t,body:n,decorators:r},a=B.ClassExpression;return z(a.id,i,`id`,e,1),z(a.superClass,i,`superClass`,t,1),z(a.body,i,`body`,n,1),z(a.decorators,i,`decorators`,r,1),i}function Eu(e=null,t=null,n,r=null){let i={type:`ClassDeclaration`,id:e,superClass:t,body:n,decorators:r},a=B.ClassDeclaration;return z(a.id,i,`id`,e,1),z(a.superClass,i,`superClass`,t,1),z(a.body,i,`body`,n,1),z(a.decorators,i,`decorators`,r,1),i}function Du(e,t=null){let n={type:`ExportAllDeclaration`,source:e,attributes:t},r=B.ExportAllDeclaration;return z(r.source,n,`source`,e,1),z(r.attributes,n,`attributes`,t,1),n}function Ou(e){let t={type:`ExportDefaultDeclaration`,declaration:e},n=B.ExportDefaultDeclaration;return z(n.declaration,t,`declaration`,e,1),t}function ku(e=null,t=[],n=null,r=null){let i={type:`ExportNamedDeclaration`,declaration:e,specifiers:t,source:n,attributes:r},a=B.ExportNamedDeclaration;return z(a.declaration,i,`declaration`,e,1),z(a.specifiers,i,`specifiers`,t,1),z(a.source,i,`source`,n,1),z(a.attributes,i,`attributes`,r,1),i}function Au(e,t){let n={type:`ExportSpecifier`,local:e,exported:t},r=B.ExportSpecifier;return z(r.local,n,`local`,e,1),z(r.exported,n,`exported`,t,1),n}function ju(e,t,n,r=!1){let i={type:`ForOfStatement`,left:e,right:t,body:n,await:r},a=B.ForOfStatement;return z(a.left,i,`left`,e,1),z(a.right,i,`right`,t,1),z(a.body,i,`body`,n,1),z(a.await,i,`await`,r),i}function Mu(e,t,n=null){let r={type:`ImportDeclaration`,specifiers:e,source:t,attributes:n},i=B.ImportDeclaration;return z(i.specifiers,r,`specifiers`,e,1),z(i.source,r,`source`,t,1),z(i.attributes,r,`attributes`,n,1),r}function Nu(e){let t={type:`ImportDefaultSpecifier`,local:e},n=B.ImportDefaultSpecifier;return z(n.local,t,`local`,e,1),t}function Pu(e){let t={type:`ImportNamespaceSpecifier`,local:e},n=B.ImportNamespaceSpecifier;return z(n.local,t,`local`,e,1),t}function Fu(e,t){let n={type:`ImportSpecifier`,local:e,imported:t},r=B.ImportSpecifier;return z(r.local,n,`local`,e,1),z(r.imported,n,`imported`,t,1),n}function Iu(e,t){let n={type:`MetaProperty`,meta:e,property:t},r=B.MetaProperty;return z(r.meta,n,`meta`,e,1),z(r.property,n,`property`,t,1),n}function Lu(e=`method`,t,n,r,i=!1,a=!1,o=!1,s=!1){let c={type:`ClassMethod`,kind:e,key:t,params:n,body:r,computed:i,static:a,generator:o,async:s},l=B.ClassMethod;return z(l.kind,c,`kind`,e),z(l.key,c,`key`,t,1),z(l.params,c,`params`,n,1),z(l.body,c,`body`,r,1),z(l.computed,c,`computed`,i),z(l.static,c,`static`,a),z(l.generator,c,`generator`,o),z(l.async,c,`async`,s),c}function Ru(e){let t={type:`ObjectPattern`,properties:e},n=B.ObjectPattern;return z(n.properties,t,`properties`,e,1),t}function zu(e){let t={type:`SpreadElement`,argument:e},n=B.SpreadElement;return z(n.argument,t,`argument`,e,1),t}function Bu(){return{type:`Super`}}function Vu(e,t){let n={type:`TaggedTemplateExpression`,tag:e,quasi:t},r=B.TaggedTemplateExpression;return z(r.tag,n,`tag`,e,1),z(r.quasi,n,`quasi`,t,1),n}function Hu(e,t=!1){let n={type:`TemplateElement`,value:e,tail:t},r=B.TemplateElement;return z(r.value,n,`value`,e),z(r.tail,n,`tail`,t),n}function Uu(e,t){let n={type:`TemplateLiteral`,quasis:e,expressions:t},r=B.TemplateLiteral;return z(r.quasis,n,`quasis`,e,1),z(r.expressions,n,`expressions`,t,1),n}function Wu(e=null,t=!1){let n={type:`YieldExpression`,argument:e,delegate:t},r=B.YieldExpression;return z(r.argument,n,`argument`,e,1),z(r.delegate,n,`delegate`,t),n}function Gu(e){let t={type:`AwaitExpression`,argument:e},n=B.AwaitExpression;return z(n.argument,t,`argument`,e,1),t}function Ku(e,t=null){let n={type:`ImportExpression`,source:e,options:t},r=B.ImportExpression;return z(r.source,n,`source`,e,1),z(r.options,n,`options`,t,1),n}function qu(){return{type:`Import`}}function Ju(e){let t={type:`BigIntLiteral`,value:e},n=B.BigIntLiteral;return z(n.value,t,`value`,e),t}function Yu(e){let t={type:`ExportNamespaceSpecifier`,exported:e},n=B.ExportNamespaceSpecifier;return z(n.exported,t,`exported`,e,1),t}function Xu(e,t,n=!1,r){let i={type:`OptionalMemberExpression`,object:e,property:t,computed:n,optional:r},a=B.OptionalMemberExpression;return z(a.object,i,`object`,e,1),z(a.property,i,`property`,t,1),z(a.computed,i,`computed`,n),z(a.optional,i,`optional`,r),i}function Zu(e,t,n){let r={type:`OptionalCallExpression`,callee:e,arguments:t,optional:n},i=B.OptionalCallExpression;return z(i.callee,r,`callee`,e,1),z(i.arguments,r,`arguments`,t,1),z(i.optional,r,`optional`,n),r}function Qu(e,t=null,n=null,r=null,i=!1,a=!1){let o={type:`ClassProperty`,key:e,value:t,typeAnnotation:n,decorators:r,computed:i,static:a},s=B.ClassProperty;return z(s.key,o,`key`,e,1),z(s.value,o,`value`,t,1),z(s.typeAnnotation,o,`typeAnnotation`,n,1),z(s.decorators,o,`decorators`,r,1),z(s.computed,o,`computed`,i),z(s.static,o,`static`,a),o}function $u(e,t=null,n=null,r=!1){let i={type:`ClassPrivateProperty`,key:e,value:t,decorators:n,static:r},a=B.ClassPrivateProperty;return z(a.key,i,`key`,e,1),z(a.value,i,`value`,t,1),z(a.decorators,i,`decorators`,n,1),z(a.static,i,`static`,r),i}function ed(e=`method`,t,n,r,i=!1){let a={type:`ClassPrivateMethod`,kind:e,key:t,params:n,body:r,static:i,async:!1,computed:!1,generator:!1},o=B.ClassPrivateMethod;return z(o.kind,a,`kind`,e),z(o.key,a,`key`,t,1),z(o.params,a,`params`,n,1),z(o.body,a,`body`,r,1),z(o.static,a,`static`,i),a}function td(e){let t={type:`PrivateName`,id:e},n=B.PrivateName;return z(n.id,t,`id`,e,1),t}function nd(e){let t={type:`StaticBlock`,body:e},n=B.StaticBlock;return z(n.body,t,`body`,e,1),t}function rd(e,t){let n={type:`ImportAttribute`,key:e,value:t},r=B.ImportAttribute;return z(r.key,n,`key`,e,1),z(r.value,n,`value`,t,1),n}function id(){return{type:`AnyTypeAnnotation`}}function ad(e){let t={type:`ArrayTypeAnnotation`,elementType:e},n=B.ArrayTypeAnnotation;return z(n.elementType,t,`elementType`,e,1),t}function od(){return{type:`BooleanTypeAnnotation`}}function sd(e){let t={type:`BooleanLiteralTypeAnnotation`,value:e},n=B.BooleanLiteralTypeAnnotation;return z(n.value,t,`value`,e),t}function cd(){return{type:`NullLiteralTypeAnnotation`}}function ld(e,t=null){let n={type:`ClassImplements`,id:e,typeParameters:t},r=B.ClassImplements;return z(r.id,n,`id`,e,1),z(r.typeParameters,n,`typeParameters`,t,1),n}function ud(e,t=null,n=null,r){let i={type:`DeclareClass`,id:e,typeParameters:t,extends:n,body:r},a=B.DeclareClass;return z(a.id,i,`id`,e,1),z(a.typeParameters,i,`typeParameters`,t,1),z(a.extends,i,`extends`,n,1),z(a.body,i,`body`,r,1),i}function dd(e){let t={type:`DeclareFunction`,id:e},n=B.DeclareFunction;return z(n.id,t,`id`,e,1),t}function fd(e,t=null,n=null,r){let i={type:`DeclareInterface`,id:e,typeParameters:t,extends:n,body:r},a=B.DeclareInterface;return z(a.id,i,`id`,e,1),z(a.typeParameters,i,`typeParameters`,t,1),z(a.extends,i,`extends`,n,1),z(a.body,i,`body`,r,1),i}function pd(e,t,n=null){let r={type:`DeclareModule`,id:e,body:t,kind:n},i=B.DeclareModule;return z(i.id,r,`id`,e,1),z(i.body,r,`body`,t,1),z(i.kind,r,`kind`,n),r}function md(e){let t={type:`DeclareModuleExports`,typeAnnotation:e},n=B.DeclareModuleExports;return z(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function hd(e,t=null,n){let r={type:`DeclareTypeAlias`,id:e,typeParameters:t,right:n},i=B.DeclareTypeAlias;return z(i.id,r,`id`,e,1),z(i.typeParameters,r,`typeParameters`,t,1),z(i.right,r,`right`,n,1),r}function gd(e,t=null,n=null){let r={type:`DeclareOpaqueType`,id:e,typeParameters:t,supertype:n},i=B.DeclareOpaqueType;return z(i.id,r,`id`,e,1),z(i.typeParameters,r,`typeParameters`,t,1),z(i.supertype,r,`supertype`,n,1),r}function _d(e){let t={type:`DeclareVariable`,id:e},n=B.DeclareVariable;return z(n.id,t,`id`,e,1),t}function vd(e=null,t=null,n=null,r=null){let i={type:`DeclareExportDeclaration`,declaration:e,specifiers:t,source:n,attributes:r},a=B.DeclareExportDeclaration;return z(a.declaration,i,`declaration`,e,1),z(a.specifiers,i,`specifiers`,t,1),z(a.source,i,`source`,n,1),z(a.attributes,i,`attributes`,r,1),i}function yd(e,t=null){let n={type:`DeclareExportAllDeclaration`,source:e,attributes:t},r=B.DeclareExportAllDeclaration;return z(r.source,n,`source`,e,1),z(r.attributes,n,`attributes`,t,1),n}function bd(e){let t={type:`DeclaredPredicate`,value:e},n=B.DeclaredPredicate;return z(n.value,t,`value`,e,1),t}function xd(){return{type:`ExistsTypeAnnotation`}}function Sd(e=null,t,n=null,r){let i={type:`FunctionTypeAnnotation`,typeParameters:e,params:t,rest:n,returnType:r},a=B.FunctionTypeAnnotation;return z(a.typeParameters,i,`typeParameters`,e,1),z(a.params,i,`params`,t,1),z(a.rest,i,`rest`,n,1),z(a.returnType,i,`returnType`,r,1),i}function Cd(e=null,t){let n={type:`FunctionTypeParam`,name:e,typeAnnotation:t},r=B.FunctionTypeParam;return z(r.name,n,`name`,e,1),z(r.typeAnnotation,n,`typeAnnotation`,t,1),n}function wd(e,t=null){let n={type:`GenericTypeAnnotation`,id:e,typeParameters:t},r=B.GenericTypeAnnotation;return z(r.id,n,`id`,e,1),z(r.typeParameters,n,`typeParameters`,t,1),n}function Td(){return{type:`InferredPredicate`}}function Ed(e,t=null){let n={type:`InterfaceExtends`,id:e,typeParameters:t},r=B.InterfaceExtends;return z(r.id,n,`id`,e,1),z(r.typeParameters,n,`typeParameters`,t,1),n}function Dd(e,t=null,n=null,r){let i={type:`InterfaceDeclaration`,id:e,typeParameters:t,extends:n,body:r},a=B.InterfaceDeclaration;return z(a.id,i,`id`,e,1),z(a.typeParameters,i,`typeParameters`,t,1),z(a.extends,i,`extends`,n,1),z(a.body,i,`body`,r,1),i}function Od(e=null,t){let n={type:`InterfaceTypeAnnotation`,extends:e,body:t},r=B.InterfaceTypeAnnotation;return z(r.extends,n,`extends`,e,1),z(r.body,n,`body`,t,1),n}function kd(e){let t={type:`IntersectionTypeAnnotation`,types:e},n=B.IntersectionTypeAnnotation;return z(n.types,t,`types`,e,1),t}function Ad(){return{type:`MixedTypeAnnotation`}}function jd(){return{type:`EmptyTypeAnnotation`}}function Md(e){let t={type:`NullableTypeAnnotation`,typeAnnotation:e},n=B.NullableTypeAnnotation;return z(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function Nd(e){let t={type:`NumberLiteralTypeAnnotation`,value:e},n=B.NumberLiteralTypeAnnotation;return z(n.value,t,`value`,e),t}function Pd(e){let t={type:`BigIntLiteralTypeAnnotation`,value:e},n=B.BigIntLiteralTypeAnnotation;return z(n.value,t,`value`,e),t}function Fd(){return{type:`NumberTypeAnnotation`}}function Id(e,t=[],n=[],r=[],i=!1){let a={type:`ObjectTypeAnnotation`,properties:e,indexers:t,callProperties:n,internalSlots:r,exact:i},o=B.ObjectTypeAnnotation;return z(o.properties,a,`properties`,e,1),z(o.indexers,a,`indexers`,t,1),z(o.callProperties,a,`callProperties`,n,1),z(o.internalSlots,a,`internalSlots`,r,1),z(o.exact,a,`exact`,i),a}function Ld(e,t,n,r,i){let a={type:`ObjectTypeInternalSlot`,id:e,value:t,optional:n,static:r,method:i},o=B.ObjectTypeInternalSlot;return z(o.id,a,`id`,e,1),z(o.value,a,`value`,t,1),z(o.optional,a,`optional`,n),z(o.static,a,`static`,r),z(o.method,a,`method`,i),a}function Rd(e){let t={type:`ObjectTypeCallProperty`,value:e,static:!1},n=B.ObjectTypeCallProperty;return z(n.value,t,`value`,e,1),t}function zd(e=null,t,n,r=null){let i={type:`ObjectTypeIndexer`,id:e,key:t,value:n,variance:r,static:!1},a=B.ObjectTypeIndexer;return z(a.id,i,`id`,e,1),z(a.key,i,`key`,t,1),z(a.value,i,`value`,n,1),z(a.variance,i,`variance`,r,1),i}function Bd(e,t,n=null){let r={type:`ObjectTypeProperty`,key:e,value:t,variance:n,kind:`init`,method:!1,optional:!1,proto:!1,static:!1},i=B.ObjectTypeProperty;return z(i.key,r,`key`,e,1),z(i.value,r,`value`,t,1),z(i.variance,r,`variance`,n,1),r}function Vd(e){let t={type:`ObjectTypeSpreadProperty`,argument:e},n=B.ObjectTypeSpreadProperty;return z(n.argument,t,`argument`,e,1),t}function Hd(e,t=null,n=null,r){let i={type:`OpaqueType`,id:e,typeParameters:t,supertype:n,impltype:r},a=B.OpaqueType;return z(a.id,i,`id`,e,1),z(a.typeParameters,i,`typeParameters`,t,1),z(a.supertype,i,`supertype`,n,1),z(a.impltype,i,`impltype`,r,1),i}function Ud(e,t){let n={type:`QualifiedTypeIdentifier`,id:e,qualification:t},r=B.QualifiedTypeIdentifier;return z(r.id,n,`id`,e,1),z(r.qualification,n,`qualification`,t,1),n}function Wd(e){let t={type:`StringLiteralTypeAnnotation`,value:e},n=B.StringLiteralTypeAnnotation;return z(n.value,t,`value`,e),t}function Gd(){return{type:`StringTypeAnnotation`}}function Kd(){return{type:`SymbolTypeAnnotation`}}function qd(){return{type:`ThisTypeAnnotation`}}function Jd(e){let t={type:`TupleTypeAnnotation`,types:e},n=B.TupleTypeAnnotation;return z(n.types,t,`types`,e,1),t}function Yd(e){let t={type:`TypeofTypeAnnotation`,argument:e},n=B.TypeofTypeAnnotation;return z(n.argument,t,`argument`,e,1),t}function Xd(e,t=null,n){let r={type:`TypeAlias`,id:e,typeParameters:t,right:n},i=B.TypeAlias;return z(i.id,r,`id`,e,1),z(i.typeParameters,r,`typeParameters`,t,1),z(i.right,r,`right`,n,1),r}function Zd(e){let t={type:`TypeAnnotation`,typeAnnotation:e},n=B.TypeAnnotation;return z(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function Qd(e,t){let n={type:`TypeCastExpression`,expression:e,typeAnnotation:t},r=B.TypeCastExpression;return z(r.expression,n,`expression`,e,1),z(r.typeAnnotation,n,`typeAnnotation`,t,1),n}function $d(e,t=null,n=null,r=null){let i={type:`TypeParameter`,name:e,bound:t,default:n,variance:r},a=B.TypeParameter;return z(a.name,i,`name`,e),z(a.bound,i,`bound`,t,1),z(a.default,i,`default`,n,1),z(a.variance,i,`variance`,r,1),i}function ef(e){let t={type:`TypeParameterDeclaration`,params:e},n=B.TypeParameterDeclaration;return z(n.params,t,`params`,e,1),t}function tf(e){let t={type:`TypeParameterInstantiation`,params:e},n=B.TypeParameterInstantiation;return z(n.params,t,`params`,e,1),t}function nf(e){let t={type:`UnionTypeAnnotation`,types:e},n=B.UnionTypeAnnotation;return z(n.types,t,`types`,e,1),t}function rf(e){let t={type:`Variance`,kind:e},n=B.Variance;return z(n.kind,t,`kind`,e),t}function af(){return{type:`VoidTypeAnnotation`}}function of(e,t){let n={type:`EnumDeclaration`,id:e,body:t},r=B.EnumDeclaration;return z(r.id,n,`id`,e,1),z(r.body,n,`body`,t,1),n}function sf(e){let t={type:`EnumBooleanBody`,members:e,explicitType:!1,hasUnknownMembers:!1},n=B.EnumBooleanBody;return z(n.members,t,`members`,e,1),t}function cf(e){let t={type:`EnumNumberBody`,members:e,explicitType:!1,hasUnknownMembers:!1},n=B.EnumNumberBody;return z(n.members,t,`members`,e,1),t}function lf(e){let t={type:`EnumStringBody`,members:e,explicitType:!1,hasUnknownMembers:!1},n=B.EnumStringBody;return z(n.members,t,`members`,e,1),t}function uf(e){let t={type:`EnumSymbolBody`,members:e,hasUnknownMembers:!1},n=B.EnumSymbolBody;return z(n.members,t,`members`,e,1),t}function df(e,t){let n={type:`EnumBooleanMember`,id:e,init:t},r=B.EnumBooleanMember;return z(r.id,n,`id`,e,1),z(r.init,n,`init`,t,1),n}function ff(e,t){let n={type:`EnumNumberMember`,id:e,init:t},r=B.EnumNumberMember;return z(r.id,n,`id`,e,1),z(r.init,n,`init`,t,1),n}function pf(e,t){let n={type:`EnumStringMember`,id:e,init:t},r=B.EnumStringMember;return z(r.id,n,`id`,e,1),z(r.init,n,`init`,t,1),n}function mf(e){let t={type:`EnumDefaultedMember`,id:e},n=B.EnumDefaultedMember;return z(n.id,t,`id`,e,1),t}function hf(e,t){let n={type:`IndexedAccessType`,objectType:e,indexType:t},r=B.IndexedAccessType;return z(r.objectType,n,`objectType`,e,1),z(r.indexType,n,`indexType`,t,1),n}function gf(e,t){let n={type:`OptionalIndexedAccessType`,objectType:e,indexType:t,optional:!1},r=B.OptionalIndexedAccessType;return z(r.objectType,n,`objectType`,e,1),z(r.indexType,n,`indexType`,t,1),n}function _f(e,t=null){let n={type:`JSXAttribute`,name:e,value:t},r=B.JSXAttribute;return z(r.name,n,`name`,e,1),z(r.value,n,`value`,t,1),n}function vf(e){let t={type:`JSXClosingElement`,name:e},n=B.JSXClosingElement;return z(n.name,t,`name`,e,1),t}function yf(e,t=null,n){let r={type:`JSXElement`,openingElement:e,closingElement:t,children:n},i=B.JSXElement;return z(i.openingElement,r,`openingElement`,e,1),z(i.closingElement,r,`closingElement`,t,1),z(i.children,r,`children`,n,1),r}function bf(){return{type:`JSXEmptyExpression`}}function xf(e){let t={type:`JSXExpressionContainer`,expression:e},n=B.JSXExpressionContainer;return z(n.expression,t,`expression`,e,1),t}function Sf(e){let t={type:`JSXSpreadChild`,expression:e},n=B.JSXSpreadChild;return z(n.expression,t,`expression`,e,1),t}function Cf(e){let t={type:`JSXIdentifier`,name:e},n=B.JSXIdentifier;return z(n.name,t,`name`,e),t}function wf(e,t){let n={type:`JSXMemberExpression`,object:e,property:t},r=B.JSXMemberExpression;return z(r.object,n,`object`,e,1),z(r.property,n,`property`,t,1),n}function Tf(e,t){let n={type:`JSXNamespacedName`,namespace:e,name:t},r=B.JSXNamespacedName;return z(r.namespace,n,`namespace`,e,1),z(r.name,n,`name`,t,1),n}function Ef(e,t,n=!1){let r={type:`JSXOpeningElement`,name:e,attributes:t,selfClosing:n},i=B.JSXOpeningElement;return z(i.name,r,`name`,e,1),z(i.attributes,r,`attributes`,t,1),z(i.selfClosing,r,`selfClosing`,n),r}function Df(e){let t={type:`JSXSpreadAttribute`,argument:e},n=B.JSXSpreadAttribute;return z(n.argument,t,`argument`,e,1),t}function Of(e){let t={type:`JSXText`,value:e},n=B.JSXText;return z(n.value,t,`value`,e),t}function kf(e,t,n){let r={type:`JSXFragment`,openingFragment:e,closingFragment:t,children:n},i=B.JSXFragment;return z(i.openingFragment,r,`openingFragment`,e,1),z(i.closingFragment,r,`closingFragment`,t,1),z(i.children,r,`children`,n,1),r}function Af(){return{type:`JSXOpeningFragment`}}function jf(){return{type:`JSXClosingFragment`}}function Mf(e,t){let n={type:`Placeholder`,expectedNode:e,name:t},r=B.Placeholder;return z(r.expectedNode,n,`expectedNode`,e),z(r.name,n,`name`,t,1),n}function Nf(e){let t={type:`V8IntrinsicIdentifier`,name:e},n=B.V8IntrinsicIdentifier;return z(n.name,t,`name`,e),t}function Pf(){return{type:`ArgumentPlaceholder`}}function Ff(e,t){let n={type:`BindExpression`,object:e,callee:t},r=B.BindExpression;return z(r.object,n,`object`,e,1),z(r.callee,n,`callee`,t,1),n}function If(e,t=null,n=null,r=null,i=!1,a=!1){let o={type:`ClassAccessorProperty`,key:e,value:t,typeAnnotation:n,decorators:r,computed:i,static:a},s=B.ClassAccessorProperty;return z(s.key,o,`key`,e,1),z(s.value,o,`value`,t,1),z(s.typeAnnotation,o,`typeAnnotation`,n,1),z(s.decorators,o,`decorators`,r,1),z(s.computed,o,`computed`,i),z(s.static,o,`static`,a),o}function Lf(e){let t={type:`Decorator`,expression:e},n=B.Decorator;return z(n.expression,t,`expression`,e,1),t}function Rf(e,t=!1){let n={type:`DoExpression`,body:e,async:t},r=B.DoExpression;return z(r.body,n,`body`,e,1),z(r.async,n,`async`,t),n}function zf(e){let t={type:`ExportDefaultSpecifier`,exported:e},n=B.ExportDefaultSpecifier;return z(n.exported,t,`exported`,e,1),t}function Bf(e){let t={type:`ModuleExpression`,body:e},n=B.ModuleExpression;return z(n.body,t,`body`,e,1),t}function Vf(){return{type:`TopicReference`}}function Hf(){return{type:`VoidPattern`}}function Uf(e){let t={type:`TSParameterProperty`,parameter:e},n=B.TSParameterProperty;return z(n.parameter,t,`parameter`,e,1),t}function Wf(e=null,t=null,n,r=null){let i={type:`TSDeclareFunction`,id:e,typeParameters:t,params:n,returnType:r,async:!1,generator:!1},a=B.TSDeclareFunction;return z(a.id,i,`id`,e,1),z(a.typeParameters,i,`typeParameters`,t,1),z(a.params,i,`params`,n,1),z(a.returnType,i,`returnType`,r,1),i}function Gf(e,t=null,n,r=null){let i={type:`TSDeclareMethod`,key:e,typeParameters:t,params:n,returnType:r,async:!1,computed:!1,generator:!1,kind:`method`,static:!1},a=B.TSDeclareMethod;return z(a.key,i,`key`,e,1),z(a.typeParameters,i,`typeParameters`,t,1),z(a.params,i,`params`,n,1),z(a.returnType,i,`returnType`,r,1),i}function Kf(e,t){let n={type:`TSQualifiedName`,left:e,right:t},r=B.TSQualifiedName;return z(r.left,n,`left`,e,1),z(r.right,n,`right`,t,1),n}function qf(e=null,t,n=null){let r={type:`TSCallSignatureDeclaration`,typeParameters:e,params:t,returnType:n},i=B.TSCallSignatureDeclaration;return z(i.typeParameters,r,`typeParameters`,e,1),z(i.params,r,`params`,t,1),z(i.returnType,r,`returnType`,n,1),r}function Jf(e=null,t,n=null){let r={type:`TSConstructSignatureDeclaration`,typeParameters:e,params:t,returnType:n},i=B.TSConstructSignatureDeclaration;return z(i.typeParameters,r,`typeParameters`,e,1),z(i.params,r,`params`,t,1),z(i.returnType,r,`returnType`,n,1),r}function Yf(e,t=null){let n={type:`TSPropertySignature`,key:e,typeAnnotation:t,computed:!1},r=B.TSPropertySignature;return z(r.key,n,`key`,e,1),z(r.typeAnnotation,n,`typeAnnotation`,t,1),n}function Xf(e,t=null,n,r=null){let i={type:`TSMethodSignature`,key:e,typeParameters:t,params:n,returnType:r,computed:!1,kind:`method`},a=B.TSMethodSignature;return z(a.key,i,`key`,e,1),z(a.typeParameters,i,`typeParameters`,t,1),z(a.params,i,`params`,n,1),z(a.returnType,i,`returnType`,r,1),i}function Zf(e,t=null){let n={type:`TSIndexSignature`,parameters:e,typeAnnotation:t},r=B.TSIndexSignature;return z(r.parameters,n,`parameters`,e,1),z(r.typeAnnotation,n,`typeAnnotation`,t,1),n}function Qf(){return{type:`TSAnyKeyword`}}function $f(){return{type:`TSBooleanKeyword`}}function ep(){return{type:`TSBigIntKeyword`}}function tp(){return{type:`TSIntrinsicKeyword`}}function np(){return{type:`TSNeverKeyword`}}function rp(){return{type:`TSNullKeyword`}}function ip(){return{type:`TSNumberKeyword`}}function ap(){return{type:`TSObjectKeyword`}}function op(){return{type:`TSStringKeyword`}}function sp(){return{type:`TSSymbolKeyword`}}function cp(){return{type:`TSUndefinedKeyword`}}function lp(){return{type:`TSUnknownKeyword`}}function up(){return{type:`TSVoidKeyword`}}function dp(){return{type:`TSThisType`}}function fp(e=null,t,n=null){let r={type:`TSFunctionType`,typeParameters:e,params:t,returnType:n},i=B.TSFunctionType;return z(i.typeParameters,r,`typeParameters`,e,1),z(i.params,r,`params`,t,1),z(i.returnType,r,`returnType`,n,1),r}function pp(e=null,t,n=null){let r={type:`TSConstructorType`,typeParameters:e,params:t,returnType:n},i=B.TSConstructorType;return z(i.typeParameters,r,`typeParameters`,e,1),z(i.params,r,`params`,t,1),z(i.returnType,r,`returnType`,n,1),r}function mp(e,t=null){let n={type:`TSTypeReference`,typeName:e,typeArguments:t},r=B.TSTypeReference;return z(r.typeName,n,`typeName`,e,1),z(r.typeArguments,n,`typeArguments`,t,1),n}function hp(e,t=null,n=null){let r={type:`TSTypePredicate`,parameterName:e,typeAnnotation:t,asserts:n},i=B.TSTypePredicate;return z(i.parameterName,r,`parameterName`,e,1),z(i.typeAnnotation,r,`typeAnnotation`,t,1),z(i.asserts,r,`asserts`,n),r}function gp(e,t=null){let n={type:`TSTypeQuery`,exprName:e,typeArguments:t},r=B.TSTypeQuery;return z(r.exprName,n,`exprName`,e,1),z(r.typeArguments,n,`typeArguments`,t,1),n}function _p(e){let t={type:`TSTypeLiteral`,members:e},n=B.TSTypeLiteral;return z(n.members,t,`members`,e,1),t}function vp(e){let t={type:`TSArrayType`,elementType:e},n=B.TSArrayType;return z(n.elementType,t,`elementType`,e,1),t}function yp(e){let t={type:`TSTupleType`,elementTypes:e},n=B.TSTupleType;return z(n.elementTypes,t,`elementTypes`,e,1),t}function bp(e){let t={type:`TSOptionalType`,typeAnnotation:e},n=B.TSOptionalType;return z(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function xp(e){let t={type:`TSRestType`,typeAnnotation:e},n=B.TSRestType;return z(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function Sp(e,t,n=!1){let r={type:`TSNamedTupleMember`,label:e,elementType:t,optional:n},i=B.TSNamedTupleMember;return z(i.label,r,`label`,e,1),z(i.elementType,r,`elementType`,t,1),z(i.optional,r,`optional`,n),r}function Cp(e){let t={type:`TSUnionType`,types:e},n=B.TSUnionType;return z(n.types,t,`types`,e,1),t}function wp(e){let t={type:`TSIntersectionType`,types:e},n=B.TSIntersectionType;return z(n.types,t,`types`,e,1),t}function Tp(e,t,n,r){let i={type:`TSConditionalType`,checkType:e,extendsType:t,trueType:n,falseType:r},a=B.TSConditionalType;return z(a.checkType,i,`checkType`,e,1),z(a.extendsType,i,`extendsType`,t,1),z(a.trueType,i,`trueType`,n,1),z(a.falseType,i,`falseType`,r,1),i}function Ep(e){let t={type:`TSInferType`,typeParameter:e},n=B.TSInferType;return z(n.typeParameter,t,`typeParameter`,e,1),t}function Dp(e){let t={type:`TSParenthesizedType`,typeAnnotation:e},n=B.TSParenthesizedType;return z(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function Op(e,t){let n={type:`TSTypeOperator`,typeAnnotation:e,operator:t},r=B.TSTypeOperator;return z(r.typeAnnotation,n,`typeAnnotation`,e,1),z(r.operator,n,`operator`,t),n}function kp(e,t){let n={type:`TSIndexedAccessType`,objectType:e,indexType:t},r=B.TSIndexedAccessType;return z(r.objectType,n,`objectType`,e,1),z(r.indexType,n,`indexType`,t,1),n}function Ap(e,t,n=null,r=null){let i={type:`TSMappedType`,key:e,constraint:t,nameType:n,typeAnnotation:r},a=B.TSMappedType;return z(a.key,i,`key`,e,1),z(a.constraint,i,`constraint`,t,1),z(a.nameType,i,`nameType`,n,1),z(a.typeAnnotation,i,`typeAnnotation`,r,1),i}function jp(e,t){let n={type:`TSTemplateLiteralType`,quasis:e,types:t},r=B.TSTemplateLiteralType;return z(r.quasis,n,`quasis`,e,1),z(r.types,n,`types`,t,1),n}function Mp(e){let t={type:`TSLiteralType`,literal:e},n=B.TSLiteralType;return z(n.literal,t,`literal`,e,1),t}function Np(e,t=null){let n={type:`TSClassImplements`,expression:e,typeArguments:t},r=B.TSClassImplements;return z(r.expression,n,`expression`,e,1),z(r.typeArguments,n,`typeArguments`,t,1),n}function Pp(e,t=null){let n={type:`TSInterfaceHeritage`,expression:e,typeArguments:t},r=B.TSInterfaceHeritage;return z(r.expression,n,`expression`,e,1),z(r.typeArguments,n,`typeArguments`,t,1),n}function Fp(e,t=null,n=null,r){let i={type:`TSInterfaceDeclaration`,id:e,typeParameters:t,extends:n,body:r},a=B.TSInterfaceDeclaration;return z(a.id,i,`id`,e,1),z(a.typeParameters,i,`typeParameters`,t,1),z(a.extends,i,`extends`,n,1),z(a.body,i,`body`,r,1),i}function Ip(e){let t={type:`TSInterfaceBody`,body:e},n=B.TSInterfaceBody;return z(n.body,t,`body`,e,1),t}function Lp(e,t=null,n){let r={type:`TSTypeAliasDeclaration`,id:e,typeParameters:t,typeAnnotation:n},i=B.TSTypeAliasDeclaration;return z(i.id,r,`id`,e,1),z(i.typeParameters,r,`typeParameters`,t,1),z(i.typeAnnotation,r,`typeAnnotation`,n,1),r}function Rp(e,t=null){let n={type:`TSInstantiationExpression`,expression:e,typeArguments:t},r=B.TSInstantiationExpression;return z(r.expression,n,`expression`,e,1),z(r.typeArguments,n,`typeArguments`,t,1),n}function zp(e,t){let n={type:`TSAsExpression`,expression:e,typeAnnotation:t},r=B.TSAsExpression;return z(r.expression,n,`expression`,e,1),z(r.typeAnnotation,n,`typeAnnotation`,t,1),n}function Bp(e,t){let n={type:`TSSatisfiesExpression`,expression:e,typeAnnotation:t},r=B.TSSatisfiesExpression;return z(r.expression,n,`expression`,e,1),z(r.typeAnnotation,n,`typeAnnotation`,t,1),n}function Vp(e,t){let n={type:`TSTypeAssertion`,typeAnnotation:e,expression:t},r=B.TSTypeAssertion;return z(r.typeAnnotation,n,`typeAnnotation`,e,1),z(r.expression,n,`expression`,t,1),n}function Hp(e){let t={type:`TSEnumBody`,members:e},n=B.TSEnumBody;return z(n.members,t,`members`,e,1),t}function Up(e,t){let n={type:`TSEnumDeclaration`,id:e,body:t},r=B.TSEnumDeclaration;return z(r.id,n,`id`,e,1),z(r.body,n,`body`,t,1),n}function Wp(e,t=null){let n={type:`TSEnumMember`,id:e,initializer:t},r=B.TSEnumMember;return z(r.id,n,`id`,e,1),z(r.initializer,n,`initializer`,t,1),n}function Gp(e,t){let n={type:`TSModuleDeclaration`,id:e,body:t,kind:`namespace`},r=B.TSModuleDeclaration;return z(r.id,n,`id`,e,1),z(r.body,n,`body`,t,1),n}function Kp(e){let t={type:`TSModuleBlock`,body:e},n=B.TSModuleBlock;return z(n.body,t,`body`,e,1),t}function qp(e,t=null,n=null){let r={type:`TSImportType`,source:e,qualifier:t,typeArguments:n},i=B.TSImportType;return z(i.source,r,`source`,e,1),z(i.qualifier,r,`qualifier`,t,1),z(i.typeArguments,r,`typeArguments`,n,1),r}function Jp(e,t){let n={type:`TSImportEqualsDeclaration`,id:e,moduleReference:t},r=B.TSImportEqualsDeclaration;return z(r.id,n,`id`,e,1),z(r.moduleReference,n,`moduleReference`,t,1),n}function Yp(e){let t={type:`TSExternalModuleReference`,expression:e},n=B.TSExternalModuleReference;return z(n.expression,t,`expression`,e,1),t}function Xp(e){let t={type:`TSNonNullExpression`,expression:e},n=B.TSNonNullExpression;return z(n.expression,t,`expression`,e,1),t}function Zp(e){let t={type:`TSExportAssignment`,expression:e},n=B.TSExportAssignment;return z(n.expression,t,`expression`,e,1),t}function Qp(e){let t={type:`TSNamespaceExportDeclaration`,id:e},n=B.TSNamespaceExportDeclaration;return z(n.id,t,`id`,e,1),t}function $p(e){let t={type:`TSTypeAnnotation`,typeAnnotation:e},n=B.TSTypeAnnotation;return z(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function em(e){let t={type:`TSTypeParameterInstantiation`,params:e},n=B.TSTypeParameterInstantiation;return z(n.params,t,`params`,e,1),t}function tm(e){let t={type:`TSTypeParameterDeclaration`,params:e},n=B.TSTypeParameterDeclaration;return z(n.params,t,`params`,e,1),t}function nm(e=null,t=null,n){let r={type:`TSTypeParameter`,constraint:e,default:t,name:n},i=B.TSTypeParameter;return z(i.constraint,r,`constraint`,e,1),z(i.default,r,`default`,t,1),z(i.name,r,`name`,n,1),r}function rm(e){return S(`NumberLiteral`,`NumericLiteral`,`The node type `),Yl(e)}function im(e,t=``){return S(`RegexLiteral`,`RegExpLiteral`,`The node type `),Ql(e,t)}function am(e){return S(`RestProperty`,`RestElement`,`The node type `),ou(e)}function om(e){return S(`SpreadProperty`,`SpreadElement`,`The node type `),zu(e)}const sm=Object.defineProperty({__proto__:null,anyTypeAnnotation:id,argumentPlaceholder:Pf,arrayExpression:wl,arrayPattern:Su,arrayTypeAnnotation:ad,arrowFunctionExpression:Cu,assignmentExpression:Tl,assignmentPattern:xu,awaitExpression:Gu,bigIntLiteral:Ju,bigIntLiteralTypeAnnotation:Pd,binaryExpression:El,bindExpression:Ff,blockStatement:Al,booleanLiteral:Zl,booleanLiteralTypeAnnotation:sd,booleanTypeAnnotation:od,breakStatement:jl,callExpression:Ml,catchClause:Nl,classAccessorProperty:If,classBody:wu,classDeclaration:Eu,classExpression:Tu,classImplements:ld,classMethod:Lu,classPrivateMethod:ed,classPrivateProperty:$u,classProperty:Qu,conditionalExpression:Pl,continueStatement:Fl,debuggerStatement:Il,declareClass:ud,declareExportAllDeclaration:yd,declareExportDeclaration:vd,declareFunction:dd,declareInterface:fd,declareModule:pd,declareModuleExports:md,declareOpaqueType:gd,declareTypeAlias:hd,declareVariable:_d,declaredPredicate:bd,decorator:Lf,directive:Ol,directiveLiteral:kl,doExpression:Rf,doWhileStatement:Ll,emptyStatement:Rl,emptyTypeAnnotation:jd,enumBooleanBody:sf,enumBooleanMember:df,enumDeclaration:of,enumDefaultedMember:mf,enumNumberBody:cf,enumNumberMember:ff,enumStringBody:lf,enumStringMember:pf,enumSymbolBody:uf,existsTypeAnnotation:xd,exportAllDeclaration:Du,exportDefaultDeclaration:Ou,exportDefaultSpecifier:zf,exportNamedDeclaration:ku,exportNamespaceSpecifier:Yu,exportSpecifier:Au,expressionStatement:zl,file:Bl,forInStatement:Vl,forOfStatement:ju,forStatement:Hl,functionDeclaration:Ul,functionExpression:Wl,functionTypeAnnotation:Sd,functionTypeParam:Cd,genericTypeAnnotation:wd,identifier:Gl,ifStatement:Kl,import:qu,importAttribute:rd,importDeclaration:Mu,importDefaultSpecifier:Nu,importExpression:Ku,importNamespaceSpecifier:Pu,importSpecifier:Fu,indexedAccessType:hf,inferredPredicate:Td,interfaceDeclaration:Dd,interfaceExtends:Ed,interfaceTypeAnnotation:Od,interpreterDirective:Dl,intersectionTypeAnnotation:kd,jsxAttribute:_f,jsxClosingElement:vf,jsxClosingFragment:jf,jsxElement:yf,jsxEmptyExpression:bf,jsxExpressionContainer:xf,jsxFragment:kf,jsxIdentifier:Cf,jsxMemberExpression:wf,jsxNamespacedName:Tf,jsxOpeningElement:Ef,jsxOpeningFragment:Af,jsxSpreadAttribute:Df,jsxSpreadChild:Sf,jsxText:Of,labeledStatement:ql,logicalExpression:$l,memberExpression:eu,metaProperty:Iu,mixedTypeAnnotation:Ad,moduleExpression:Bf,newExpression:tu,nullLiteral:Xl,nullLiteralTypeAnnotation:cd,nullableTypeAnnotation:Md,numberLiteral:rm,numberLiteralTypeAnnotation:Nd,numberTypeAnnotation:Fd,numericLiteral:Yl,objectExpression:ru,objectMethod:iu,objectPattern:Ru,objectProperty:au,objectTypeAnnotation:Id,objectTypeCallProperty:Rd,objectTypeIndexer:zd,objectTypeInternalSlot:Ld,objectTypeProperty:Bd,objectTypeSpreadProperty:Vd,opaqueType:Hd,optionalCallExpression:Zu,optionalIndexedAccessType:gf,optionalMemberExpression:Xu,parenthesizedExpression:lu,placeholder:Mf,privateName:td,program:nu,qualifiedTypeIdentifier:Ud,regExpLiteral:Ql,regexLiteral:im,restElement:ou,restProperty:am,returnStatement:su,sequenceExpression:cu,spreadElement:zu,spreadProperty:om,staticBlock:nd,stringLiteral:Jl,stringLiteralTypeAnnotation:Wd,stringTypeAnnotation:Gd,super:Bu,switchCase:uu,switchStatement:du,symbolTypeAnnotation:Kd,taggedTemplateExpression:Vu,templateElement:Hu,templateLiteral:Uu,thisExpression:fu,thisTypeAnnotation:qd,throwStatement:pu,topicReference:Vf,tryStatement:mu,tsAnyKeyword:Qf,tsArrayType:vp,tsAsExpression:zp,tsBigIntKeyword:ep,tsBooleanKeyword:$f,tsCallSignatureDeclaration:qf,tsClassImplements:Np,tsConditionalType:Tp,tsConstructSignatureDeclaration:Jf,tsConstructorType:pp,tsDeclareFunction:Wf,tsDeclareMethod:Gf,tsEnumBody:Hp,tsEnumDeclaration:Up,tsEnumMember:Wp,tsExportAssignment:Zp,tsExternalModuleReference:Yp,tsFunctionType:fp,tsImportEqualsDeclaration:Jp,tsImportType:qp,tsIndexSignature:Zf,tsIndexedAccessType:kp,tsInferType:Ep,tsInstantiationExpression:Rp,tsInterfaceBody:Ip,tsInterfaceDeclaration:Fp,tsInterfaceHeritage:Pp,tsIntersectionType:wp,tsIntrinsicKeyword:tp,tsLiteralType:Mp,tsMappedType:Ap,tsMethodSignature:Xf,tsModuleBlock:Kp,tsModuleDeclaration:Gp,tsNamedTupleMember:Sp,tsNamespaceExportDeclaration:Qp,tsNeverKeyword:np,tsNonNullExpression:Xp,tsNullKeyword:rp,tsNumberKeyword:ip,tsObjectKeyword:ap,tsOptionalType:bp,tsParameterProperty:Uf,tsParenthesizedType:Dp,tsPropertySignature:Yf,tsQualifiedName:Kf,tsRestType:xp,tsSatisfiesExpression:Bp,tsStringKeyword:op,tsSymbolKeyword:sp,tsTemplateLiteralType:jp,tsThisType:dp,tsTupleType:yp,tsTypeAliasDeclaration:Lp,tsTypeAnnotation:$p,tsTypeAssertion:Vp,tsTypeLiteral:_p,tsTypeOperator:Op,tsTypeParameter:nm,tsTypeParameterDeclaration:tm,tsTypeParameterInstantiation:em,tsTypePredicate:hp,tsTypeQuery:gp,tsTypeReference:mp,tsUndefinedKeyword:cp,tsUnionType:Cp,tsUnknownKeyword:lp,tsVoidKeyword:up,tupleTypeAnnotation:Jd,typeAlias:Xd,typeAnnotation:Zd,typeCastExpression:Qd,typeParameter:$d,typeParameterDeclaration:ef,typeParameterInstantiation:tf,typeofTypeAnnotation:Yd,unaryExpression:hu,unionTypeAnnotation:nf,updateExpression:gu,v8IntrinsicIdentifier:Nf,variableDeclaration:_u,variableDeclarator:vu,variance:rf,voidPattern:Hf,voidTypeAnnotation:af,whileStatement:yu,withStatement:bu,yieldExpression:Wu},Symbol.toStringTag,{value:`Module`});function V(e){return function(){return S(e.replace(/^(?:ts|jsx|[a-z])/,e=>e.toUpperCase()),e,`Usage of builders starting with an uppercase letter such as `,`uppercase builders`),sm[e](...arguments)}}const cm=V(`arrayExpression`),lm=V(`assignmentExpression`),um=V(`binaryExpression`),dm=V(`interpreterDirective`),fm=V(`directive`),pm=V(`directiveLiteral`),mm=V(`blockStatement`),hm=V(`breakStatement`),gm=V(`callExpression`),_m=V(`catchClause`),vm=V(`conditionalExpression`),ym=V(`continueStatement`),bm=V(`debuggerStatement`),xm=V(`doWhileStatement`),Sm=V(`emptyStatement`),Cm=V(`expressionStatement`),wm=V(`file`),Tm=V(`forInStatement`),Em=V(`forStatement`),Dm=V(`functionDeclaration`),Om=V(`functionExpression`),km=V(`identifier`),Am=V(`ifStatement`),jm=V(`labeledStatement`),Mm=V(`stringLiteral`),Nm=V(`numericLiteral`),Pm=V(`nullLiteral`),Fm=V(`booleanLiteral`),Im=V(`regExpLiteral`),Lm=V(`logicalExpression`),Rm=V(`memberExpression`),zm=V(`newExpression`),Bm=V(`program`),Vm=V(`objectExpression`),Hm=V(`objectMethod`),Um=V(`objectProperty`),Wm=V(`restElement`),Gm=V(`returnStatement`),Km=V(`sequenceExpression`),qm=V(`parenthesizedExpression`),Jm=V(`switchCase`),Ym=V(`switchStatement`),Xm=V(`thisExpression`),Zm=V(`throwStatement`),Qm=V(`tryStatement`),$m=V(`unaryExpression`),eh=V(`updateExpression`),th=V(`variableDeclaration`),nh=V(`variableDeclarator`),rh=V(`whileStatement`),ih=V(`withStatement`),ah=V(`assignmentPattern`),oh=V(`arrayPattern`),sh=V(`arrowFunctionExpression`),ch=V(`classBody`),lh=V(`classExpression`),uh=V(`classDeclaration`),dh=V(`exportAllDeclaration`),fh=V(`exportDefaultDeclaration`),ph=V(`exportNamedDeclaration`),mh=V(`exportSpecifier`),hh=V(`forOfStatement`),gh=V(`importDeclaration`),_h=V(`importDefaultSpecifier`),vh=V(`importNamespaceSpecifier`),yh=V(`importSpecifier`),bh=V(`metaProperty`),xh=V(`classMethod`),Sh=V(`objectPattern`),Ch=V(`spreadElement`),wh=V(`super`),Th=V(`taggedTemplateExpression`),Eh=V(`templateElement`),Dh=V(`templateLiteral`),Oh=V(`yieldExpression`),kh=V(`awaitExpression`),Ah=V(`importExpression`),jh=V(`import`),Mh=V(`bigIntLiteral`),Nh=V(`exportNamespaceSpecifier`),Ph=V(`optionalMemberExpression`),Fh=V(`optionalCallExpression`),Ih=V(`classProperty`),Lh=V(`classPrivateProperty`),Rh=V(`classPrivateMethod`),zh=V(`privateName`),Bh=V(`staticBlock`),Vh=V(`importAttribute`),Hh=V(`anyTypeAnnotation`),Uh=V(`arrayTypeAnnotation`),Wh=V(`booleanTypeAnnotation`),Gh=V(`booleanLiteralTypeAnnotation`),Kh=V(`nullLiteralTypeAnnotation`),qh=V(`classImplements`),Jh=V(`declareClass`),Yh=V(`declareFunction`),Xh=V(`declareInterface`),Zh=V(`declareModule`),Qh=V(`declareModuleExports`),$h=V(`declareTypeAlias`),eg=V(`declareOpaqueType`),tg=V(`declareVariable`),ng=V(`declareExportDeclaration`),rg=V(`declareExportAllDeclaration`),ig=V(`declaredPredicate`),ag=V(`existsTypeAnnotation`),og=V(`functionTypeAnnotation`),sg=V(`functionTypeParam`),cg=V(`genericTypeAnnotation`),lg=V(`inferredPredicate`),ug=V(`interfaceExtends`),dg=V(`interfaceDeclaration`),fg=V(`interfaceTypeAnnotation`),pg=V(`intersectionTypeAnnotation`),mg=V(`mixedTypeAnnotation`),hg=V(`emptyTypeAnnotation`),gg=V(`nullableTypeAnnotation`),_g=V(`numberLiteralTypeAnnotation`),vg=V(`bigIntLiteralTypeAnnotation`),yg=V(`numberTypeAnnotation`),bg=V(`objectTypeAnnotation`),xg=V(`objectTypeInternalSlot`),Sg=V(`objectTypeCallProperty`),Cg=V(`objectTypeIndexer`),wg=V(`objectTypeProperty`),Tg=V(`objectTypeSpreadProperty`),Eg=V(`opaqueType`),Dg=V(`qualifiedTypeIdentifier`),Og=V(`stringLiteralTypeAnnotation`),kg=V(`stringTypeAnnotation`),Ag=V(`symbolTypeAnnotation`),jg=V(`thisTypeAnnotation`),Mg=V(`tupleTypeAnnotation`),Ng=V(`typeofTypeAnnotation`),Pg=V(`typeAlias`),Fg=V(`typeAnnotation`),Ig=V(`typeCastExpression`),Lg=V(`typeParameter`),Rg=V(`typeParameterDeclaration`),zg=V(`typeParameterInstantiation`),Bg=V(`unionTypeAnnotation`),Vg=V(`variance`),Hg=V(`voidTypeAnnotation`),Ug=V(`enumDeclaration`),Wg=V(`enumBooleanBody`),Gg=V(`enumNumberBody`),Kg=V(`enumStringBody`),qg=V(`enumSymbolBody`),Jg=V(`enumBooleanMember`),Yg=V(`enumNumberMember`),Xg=V(`enumStringMember`),Zg=V(`enumDefaultedMember`),Qg=V(`indexedAccessType`),$g=V(`optionalIndexedAccessType`),e_=V(`jsxAttribute`),t_=V(`jsxClosingElement`),n_=V(`jsxElement`),r_=V(`jsxEmptyExpression`),i_=V(`jsxExpressionContainer`),a_=V(`jsxSpreadChild`),o_=V(`jsxIdentifier`),s_=V(`jsxMemberExpression`),c_=V(`jsxNamespacedName`),l_=V(`jsxOpeningElement`),u_=V(`jsxSpreadAttribute`),d_=V(`jsxText`),f_=V(`jsxFragment`),p_=V(`jsxOpeningFragment`),m_=V(`jsxClosingFragment`),h_=V(`placeholder`),g_=V(`v8IntrinsicIdentifier`),__=V(`argumentPlaceholder`),v_=V(`bindExpression`),y_=V(`classAccessorProperty`),b_=V(`decorator`),x_=V(`doExpression`),S_=V(`exportDefaultSpecifier`),C_=V(`moduleExpression`),w_=V(`topicReference`),T_=V(`voidPattern`),E_=V(`tsParameterProperty`),D_=V(`tsDeclareFunction`),O_=V(`tsDeclareMethod`),k_=V(`tsQualifiedName`),A_=V(`tsCallSignatureDeclaration`),j_=V(`tsConstructSignatureDeclaration`),M_=V(`tsPropertySignature`),N_=V(`tsMethodSignature`),P_=V(`tsIndexSignature`),F_=V(`tsAnyKeyword`),I_=V(`tsBooleanKeyword`),L_=V(`tsBigIntKeyword`),R_=V(`tsIntrinsicKeyword`),z_=V(`tsNeverKeyword`),B_=V(`tsNullKeyword`),V_=V(`tsNumberKeyword`),H_=V(`tsObjectKeyword`),U_=V(`tsStringKeyword`),W_=V(`tsSymbolKeyword`),G_=V(`tsUndefinedKeyword`),K_=V(`tsUnknownKeyword`),q_=V(`tsVoidKeyword`),J_=V(`tsThisType`),Y_=V(`tsFunctionType`),X_=V(`tsConstructorType`),Z_=V(`tsTypeReference`),Q_=V(`tsTypePredicate`),$_=V(`tsTypeQuery`),ev=V(`tsTypeLiteral`),tv=V(`tsArrayType`),nv=V(`tsTupleType`),rv=V(`tsOptionalType`),iv=V(`tsRestType`),av=V(`tsNamedTupleMember`),ov=V(`tsUnionType`),sv=V(`tsIntersectionType`),cv=V(`tsConditionalType`),lv=V(`tsInferType`),uv=V(`tsParenthesizedType`),dv=V(`tsTypeOperator`),fv=V(`tsIndexedAccessType`),pv=V(`tsMappedType`),mv=V(`tsTemplateLiteralType`),hv=V(`tsLiteralType`),gv=V(`tsClassImplements`),_v=V(`tsInterfaceHeritage`),vv=V(`tsInterfaceDeclaration`),yv=V(`tsInterfaceBody`),bv=V(`tsTypeAliasDeclaration`),xv=V(`tsInstantiationExpression`),Sv=V(`tsAsExpression`),Cv=V(`tsSatisfiesExpression`),wv=V(`tsTypeAssertion`),Tv=V(`tsEnumBody`),Ev=V(`tsEnumDeclaration`),Dv=V(`tsEnumMember`),Ov=V(`tsModuleDeclaration`),kv=V(`tsModuleBlock`),Av=V(`tsImportType`),jv=V(`tsImportEqualsDeclaration`),Mv=V(`tsExternalModuleReference`),Nv=V(`tsNonNullExpression`),Pv=V(`tsExportAssignment`),Fv=V(`tsNamespaceExportDeclaration`),Iv=V(`tsTypeAnnotation`),Lv=V(`tsTypeParameterInstantiation`),Rv=V(`tsTypeParameterDeclaration`),zv=V(`tsTypeParameter`);function Bv(e,t){let n=e.value.split(/\r\n|\n|\r/),r=0;for(let e=0;e<n.length;e++)/[^ \t]/.exec(n[e])&&(r=e);let i=``;for(let e=0;e<n.length;e++){let t=n[e],a=e===0,o=e===n.length-1,s=e===r,c=t.replace(/\t/g,` `);a||(c=c.replace(/^ +/,``)),o||(c=c.replace(/ +$/,``)),c&&(s||(c+=` `),i+=c)}i&&t.push(fE(Jl(i),e))}function Vv(e){let t=[];for(let n=0;n<e.children.length;n++){let r=e.children[n];if(Ta(r)){Bv(r,t);continue}va(r)&&(r=r.expression),!_a(r)&&t.push(r)}return t}function Hv(e){return!!(e&&Dc[e.type])}function Uv(e){if(!Hv(e)){let t=e?.type??JSON.stringify(e);throw TypeError(`Not a valid node of type "${t}"`)}}function H(e,t,n){if(!C(e,t,n))throw Error(`Expected type "${e}" with option ${JSON.stringify(n)}, but instead got "${t.type}".`)}function Wv(e,t){H(`ArrayExpression`,e,t)}function Gv(e,t){H(`AssignmentExpression`,e,t)}function Kv(e,t){H(`BinaryExpression`,e,t)}function qv(e,t){H(`InterpreterDirective`,e,t)}function Jv(e,t){H(`Directive`,e,t)}function Yv(e,t){H(`DirectiveLiteral`,e,t)}function Xv(e,t){H(`BlockStatement`,e,t)}function Zv(e,t){H(`BreakStatement`,e,t)}function Qv(e,t){H(`CallExpression`,e,t)}function $v(e,t){H(`CatchClause`,e,t)}function ey(e,t){H(`ConditionalExpression`,e,t)}function ty(e,t){H(`ContinueStatement`,e,t)}function ny(e,t){H(`DebuggerStatement`,e,t)}function ry(e,t){H(`DoWhileStatement`,e,t)}function iy(e,t){H(`EmptyStatement`,e,t)}function ay(e,t){H(`ExpressionStatement`,e,t)}function oy(e,t){H(`File`,e,t)}function sy(e,t){H(`ForInStatement`,e,t)}function cy(e,t){H(`ForStatement`,e,t)}function ly(e,t){H(`FunctionDeclaration`,e,t)}function uy(e,t){H(`FunctionExpression`,e,t)}function dy(e,t){H(`Identifier`,e,t)}function fy(e,t){H(`IfStatement`,e,t)}function py(e,t){H(`LabeledStatement`,e,t)}function my(e,t){H(`StringLiteral`,e,t)}function hy(e,t){H(`NumericLiteral`,e,t)}function gy(e,t){H(`NullLiteral`,e,t)}function _y(e,t){H(`BooleanLiteral`,e,t)}function vy(e,t){H(`RegExpLiteral`,e,t)}function yy(e,t){H(`LogicalExpression`,e,t)}function by(e,t){H(`MemberExpression`,e,t)}function xy(e,t){H(`NewExpression`,e,t)}function Sy(e,t){H(`Program`,e,t)}function Cy(e,t){H(`ObjectExpression`,e,t)}function wy(e,t){H(`ObjectMethod`,e,t)}function Ty(e,t){H(`ObjectProperty`,e,t)}function Ey(e,t){H(`RestElement`,e,t)}function Dy(e,t){H(`ReturnStatement`,e,t)}function Oy(e,t){H(`SequenceExpression`,e,t)}function ky(e,t){H(`ParenthesizedExpression`,e,t)}function Ay(e,t){H(`SwitchCase`,e,t)}function jy(e,t){H(`SwitchStatement`,e,t)}function My(e,t){H(`ThisExpression`,e,t)}function Ny(e,t){H(`ThrowStatement`,e,t)}function Py(e,t){H(`TryStatement`,e,t)}function Fy(e,t){H(`UnaryExpression`,e,t)}function Iy(e,t){H(`UpdateExpression`,e,t)}function Ly(e,t){H(`VariableDeclaration`,e,t)}function Ry(e,t){H(`VariableDeclarator`,e,t)}function zy(e,t){H(`WhileStatement`,e,t)}function By(e,t){H(`WithStatement`,e,t)}function Vy(e,t){H(`AssignmentPattern`,e,t)}function Hy(e,t){H(`ArrayPattern`,e,t)}function Uy(e,t){H(`ArrowFunctionExpression`,e,t)}function Wy(e,t){H(`ClassBody`,e,t)}function Gy(e,t){H(`ClassExpression`,e,t)}function Ky(e,t){H(`ClassDeclaration`,e,t)}function qy(e,t){H(`ExportAllDeclaration`,e,t)}function Jy(e,t){H(`ExportDefaultDeclaration`,e,t)}function Yy(e,t){H(`ExportNamedDeclaration`,e,t)}function Xy(e,t){H(`ExportSpecifier`,e,t)}function Zy(e,t){H(`ForOfStatement`,e,t)}function Qy(e,t){H(`ImportDeclaration`,e,t)}function $y(e,t){H(`ImportDefaultSpecifier`,e,t)}function eb(e,t){H(`ImportNamespaceSpecifier`,e,t)}function tb(e,t){H(`ImportSpecifier`,e,t)}function nb(e,t){H(`MetaProperty`,e,t)}function rb(e,t){H(`ClassMethod`,e,t)}function ib(e,t){H(`ObjectPattern`,e,t)}function ab(e,t){H(`SpreadElement`,e,t)}function ob(e,t){H(`Super`,e,t)}function sb(e,t){H(`TaggedTemplateExpression`,e,t)}function cb(e,t){H(`TemplateElement`,e,t)}function lb(e,t){H(`TemplateLiteral`,e,t)}function ub(e,t){H(`YieldExpression`,e,t)}function db(e,t){H(`AwaitExpression`,e,t)}function fb(e,t){H(`ImportExpression`,e,t)}function pb(e,t){H(`Import`,e,t)}function mb(e,t){H(`BigIntLiteral`,e,t)}function hb(e,t){H(`ExportNamespaceSpecifier`,e,t)}function gb(e,t){H(`OptionalMemberExpression`,e,t)}function _b(e,t){H(`OptionalCallExpression`,e,t)}function vb(e,t){H(`ClassProperty`,e,t)}function yb(e,t){H(`ClassPrivateProperty`,e,t)}function bb(e,t){H(`ClassPrivateMethod`,e,t)}function xb(e,t){H(`PrivateName`,e,t)}function Sb(e,t){H(`StaticBlock`,e,t)}function Cb(e,t){H(`ImportAttribute`,e,t)}function wb(e,t){H(`AnyTypeAnnotation`,e,t)}function Tb(e,t){H(`ArrayTypeAnnotation`,e,t)}function Eb(e,t){H(`BooleanTypeAnnotation`,e,t)}function Db(e,t){H(`BooleanLiteralTypeAnnotation`,e,t)}function Ob(e,t){H(`NullLiteralTypeAnnotation`,e,t)}function kb(e,t){H(`ClassImplements`,e,t)}function Ab(e,t){H(`DeclareClass`,e,t)}function jb(e,t){H(`DeclareFunction`,e,t)}function Mb(e,t){H(`DeclareInterface`,e,t)}function Nb(e,t){H(`DeclareModule`,e,t)}function Pb(e,t){H(`DeclareModuleExports`,e,t)}function Fb(e,t){H(`DeclareTypeAlias`,e,t)}function Ib(e,t){H(`DeclareOpaqueType`,e,t)}function Lb(e,t){H(`DeclareVariable`,e,t)}function Rb(e,t){H(`DeclareExportDeclaration`,e,t)}function zb(e,t){H(`DeclareExportAllDeclaration`,e,t)}function Bb(e,t){H(`DeclaredPredicate`,e,t)}function Vb(e,t){H(`ExistsTypeAnnotation`,e,t)}function Hb(e,t){H(`FunctionTypeAnnotation`,e,t)}function Ub(e,t){H(`FunctionTypeParam`,e,t)}function Wb(e,t){H(`GenericTypeAnnotation`,e,t)}function Gb(e,t){H(`InferredPredicate`,e,t)}function Kb(e,t){H(`InterfaceExtends`,e,t)}function qb(e,t){H(`InterfaceDeclaration`,e,t)}function Jb(e,t){H(`InterfaceTypeAnnotation`,e,t)}function Yb(e,t){H(`IntersectionTypeAnnotation`,e,t)}function Xb(e,t){H(`MixedTypeAnnotation`,e,t)}function Zb(e,t){H(`EmptyTypeAnnotation`,e,t)}function Qb(e,t){H(`NullableTypeAnnotation`,e,t)}function $b(e,t){H(`NumberLiteralTypeAnnotation`,e,t)}function ex(e,t){H(`BigIntLiteralTypeAnnotation`,e,t)}function tx(e,t){H(`NumberTypeAnnotation`,e,t)}function nx(e,t){H(`ObjectTypeAnnotation`,e,t)}function rx(e,t){H(`ObjectTypeInternalSlot`,e,t)}function ix(e,t){H(`ObjectTypeCallProperty`,e,t)}function ax(e,t){H(`ObjectTypeIndexer`,e,t)}function ox(e,t){H(`ObjectTypeProperty`,e,t)}function sx(e,t){H(`ObjectTypeSpreadProperty`,e,t)}function cx(e,t){H(`OpaqueType`,e,t)}function lx(e,t){H(`QualifiedTypeIdentifier`,e,t)}function ux(e,t){H(`StringLiteralTypeAnnotation`,e,t)}function dx(e,t){H(`StringTypeAnnotation`,e,t)}function fx(e,t){H(`SymbolTypeAnnotation`,e,t)}function px(e,t){H(`ThisTypeAnnotation`,e,t)}function mx(e,t){H(`TupleTypeAnnotation`,e,t)}function hx(e,t){H(`TypeofTypeAnnotation`,e,t)}function gx(e,t){H(`TypeAlias`,e,t)}function _x(e,t){H(`TypeAnnotation`,e,t)}function vx(e,t){H(`TypeCastExpression`,e,t)}function yx(e,t){H(`TypeParameter`,e,t)}function bx(e,t){H(`TypeParameterDeclaration`,e,t)}function xx(e,t){H(`TypeParameterInstantiation`,e,t)}function Sx(e,t){H(`UnionTypeAnnotation`,e,t)}function Cx(e,t){H(`Variance`,e,t)}function wx(e,t){H(`VoidTypeAnnotation`,e,t)}function Tx(e,t){H(`EnumDeclaration`,e,t)}function Ex(e,t){H(`EnumBooleanBody`,e,t)}function Dx(e,t){H(`EnumNumberBody`,e,t)}function Ox(e,t){H(`EnumStringBody`,e,t)}function kx(e,t){H(`EnumSymbolBody`,e,t)}function Ax(e,t){H(`EnumBooleanMember`,e,t)}function jx(e,t){H(`EnumNumberMember`,e,t)}function Mx(e,t){H(`EnumStringMember`,e,t)}function Nx(e,t){H(`EnumDefaultedMember`,e,t)}function Px(e,t){H(`IndexedAccessType`,e,t)}function Fx(e,t){H(`OptionalIndexedAccessType`,e,t)}function Ix(e,t){H(`JSXAttribute`,e,t)}function Lx(e,t){H(`JSXClosingElement`,e,t)}function Rx(e,t){H(`JSXElement`,e,t)}function zx(e,t){H(`JSXEmptyExpression`,e,t)}function Bx(e,t){H(`JSXExpressionContainer`,e,t)}function Vx(e,t){H(`JSXSpreadChild`,e,t)}function Hx(e,t){H(`JSXIdentifier`,e,t)}function Ux(e,t){H(`JSXMemberExpression`,e,t)}function Wx(e,t){H(`JSXNamespacedName`,e,t)}function Gx(e,t){H(`JSXOpeningElement`,e,t)}function Kx(e,t){H(`JSXSpreadAttribute`,e,t)}function qx(e,t){H(`JSXText`,e,t)}function Jx(e,t){H(`JSXFragment`,e,t)}function Yx(e,t){H(`JSXOpeningFragment`,e,t)}function Xx(e,t){H(`JSXClosingFragment`,e,t)}function Zx(e,t){H(`Placeholder`,e,t)}function Qx(e,t){H(`V8IntrinsicIdentifier`,e,t)}function $x(e,t){H(`ArgumentPlaceholder`,e,t)}function eS(e,t){H(`BindExpression`,e,t)}function tS(e,t){H(`ClassAccessorProperty`,e,t)}function nS(e,t){H(`Decorator`,e,t)}function rS(e,t){H(`DoExpression`,e,t)}function iS(e,t){H(`ExportDefaultSpecifier`,e,t)}function aS(e,t){H(`ModuleExpression`,e,t)}function oS(e,t){H(`TopicReference`,e,t)}function sS(e,t){H(`VoidPattern`,e,t)}function cS(e,t){H(`TSParameterProperty`,e,t)}function lS(e,t){H(`TSDeclareFunction`,e,t)}function uS(e,t){H(`TSDeclareMethod`,e,t)}function dS(e,t){H(`TSQualifiedName`,e,t)}function fS(e,t){H(`TSCallSignatureDeclaration`,e,t)}function pS(e,t){H(`TSConstructSignatureDeclaration`,e,t)}function mS(e,t){H(`TSPropertySignature`,e,t)}function hS(e,t){H(`TSMethodSignature`,e,t)}function gS(e,t){H(`TSIndexSignature`,e,t)}function _S(e,t){H(`TSAnyKeyword`,e,t)}function vS(e,t){H(`TSBooleanKeyword`,e,t)}function yS(e,t){H(`TSBigIntKeyword`,e,t)}function bS(e,t){H(`TSIntrinsicKeyword`,e,t)}function xS(e,t){H(`TSNeverKeyword`,e,t)}function SS(e,t){H(`TSNullKeyword`,e,t)}function CS(e,t){H(`TSNumberKeyword`,e,t)}function wS(e,t){H(`TSObjectKeyword`,e,t)}function TS(e,t){H(`TSStringKeyword`,e,t)}function ES(e,t){H(`TSSymbolKeyword`,e,t)}function DS(e,t){H(`TSUndefinedKeyword`,e,t)}function OS(e,t){H(`TSUnknownKeyword`,e,t)}function kS(e,t){H(`TSVoidKeyword`,e,t)}function AS(e,t){H(`TSThisType`,e,t)}function jS(e,t){H(`TSFunctionType`,e,t)}function MS(e,t){H(`TSConstructorType`,e,t)}function NS(e,t){H(`TSTypeReference`,e,t)}function PS(e,t){H(`TSTypePredicate`,e,t)}function FS(e,t){H(`TSTypeQuery`,e,t)}function IS(e,t){H(`TSTypeLiteral`,e,t)}function LS(e,t){H(`TSArrayType`,e,t)}function RS(e,t){H(`TSTupleType`,e,t)}function zS(e,t){H(`TSOptionalType`,e,t)}function BS(e,t){H(`TSRestType`,e,t)}function VS(e,t){H(`TSNamedTupleMember`,e,t)}function HS(e,t){H(`TSUnionType`,e,t)}function US(e,t){H(`TSIntersectionType`,e,t)}function WS(e,t){H(`TSConditionalType`,e,t)}function GS(e,t){H(`TSInferType`,e,t)}function KS(e,t){H(`TSParenthesizedType`,e,t)}function qS(e,t){H(`TSTypeOperator`,e,t)}function JS(e,t){H(`TSIndexedAccessType`,e,t)}function YS(e,t){H(`TSMappedType`,e,t)}function XS(e,t){H(`TSTemplateLiteralType`,e,t)}function ZS(e,t){H(`TSLiteralType`,e,t)}function QS(e,t){H(`TSClassImplements`,e,t)}function $S(e,t){H(`TSInterfaceHeritage`,e,t)}function eC(e,t){H(`TSInterfaceDeclaration`,e,t)}function tC(e,t){H(`TSInterfaceBody`,e,t)}function nC(e,t){H(`TSTypeAliasDeclaration`,e,t)}function rC(e,t){H(`TSInstantiationExpression`,e,t)}function iC(e,t){H(`TSAsExpression`,e,t)}function aC(e,t){H(`TSSatisfiesExpression`,e,t)}function oC(e,t){H(`TSTypeAssertion`,e,t)}function sC(e,t){H(`TSEnumBody`,e,t)}function cC(e,t){H(`TSEnumDeclaration`,e,t)}function lC(e,t){H(`TSEnumMember`,e,t)}function uC(e,t){H(`TSModuleDeclaration`,e,t)}function dC(e,t){H(`TSModuleBlock`,e,t)}function fC(e,t){H(`TSImportType`,e,t)}function pC(e,t){H(`TSImportEqualsDeclaration`,e,t)}function mC(e,t){H(`TSExternalModuleReference`,e,t)}function hC(e,t){H(`TSNonNullExpression`,e,t)}function gC(e,t){H(`TSExportAssignment`,e,t)}function _C(e,t){H(`TSNamespaceExportDeclaration`,e,t)}function vC(e,t){H(`TSTypeAnnotation`,e,t)}function yC(e,t){H(`TSTypeParameterInstantiation`,e,t)}function bC(e,t){H(`TSTypeParameterDeclaration`,e,t)}function xC(e,t){H(`TSTypeParameter`,e,t)}function SC(e,t){H(`Standardized`,e,t)}function CC(e,t){H(`Expression`,e,t)}function wC(e,t){H(`Binary`,e,t)}function TC(e,t){H(`Scopable`,e,t)}function EC(e,t){H(`BlockParent`,e,t)}function DC(e,t){H(`Block`,e,t)}function OC(e,t){H(`Statement`,e,t)}function kC(e,t){H(`Terminatorless`,e,t)}function AC(e,t){H(`CompletionStatement`,e,t)}function jC(e,t){H(`Conditional`,e,t)}function MC(e,t){H(`Loop`,e,t)}function NC(e,t){H(`While`,e,t)}function PC(e,t){H(`ExpressionWrapper`,e,t)}function FC(e,t){H(`For`,e,t)}function IC(e,t){H(`ForXStatement`,e,t)}function LC(e,t){H(`Function`,e,t)}function RC(e,t){H(`FunctionParent`,e,t)}function zC(e,t){H(`Pureish`,e,t)}function BC(e,t){H(`Declaration`,e,t)}function VC(e,t){H(`FunctionParameter`,e,t)}function HC(e,t){H(`PatternLike`,e,t)}function UC(e,t){H(`LVal`,e,t)}function WC(e,t){H(`TSEntityName`,e,t)}function GC(e,t){H(`Literal`,e,t)}function KC(e,t){H(`Immutable`,e,t)}function qC(e,t){H(`UserWhitespacable`,e,t)}function JC(e,t){H(`Method`,e,t)}function YC(e,t){H(`ObjectMember`,e,t)}function XC(e,t){H(`Property`,e,t)}function ZC(e,t){H(`UnaryLike`,e,t)}function QC(e,t){H(`Pattern`,e,t)}function $C(e,t){H(`Class`,e,t)}function ew(e,t){H(`ImportOrExportDeclaration`,e,t)}function tw(e,t){H(`ExportDeclaration`,e,t)}function nw(e,t){H(`ModuleSpecifier`,e,t)}function rw(e,t){H(`Private`,e,t)}function iw(e,t){H(`Flow`,e,t)}function aw(e,t){H(`FlowType`,e,t)}function ow(e,t){H(`FlowBaseAnnotation`,e,t)}function sw(e,t){H(`FlowDeclaration`,e,t)}function cw(e,t){H(`FlowPredicate`,e,t)}function lw(e,t){H(`EnumBody`,e,t)}function uw(e,t){H(`EnumMember`,e,t)}function dw(e,t){H(`JSX`,e,t)}function fw(e,t){H(`Miscellaneous`,e,t)}function pw(e,t){H(`Accessor`,e,t)}function mw(e,t){H(`TypeScript`,e,t)}function hw(e,t){H(`TSTypeElement`,e,t)}function gw(e,t){H(`TSType`,e,t)}function _w(e,t){H(`TSBaseType`,e,t)}function vw(e,t){S(`assertNumberLiteral`,`assertNumericLiteral`),H(`NumberLiteral`,e,t)}function yw(e,t){S(`assertRegexLiteral`,`assertRegExpLiteral`),H(`RegexLiteral`,e,t)}function bw(e,t){S(`assertRestProperty`,`assertRestElement`),H(`RestProperty`,e,t)}function xw(e,t){S(`assertSpreadProperty`,`assertSpreadElement`),H(`SpreadProperty`,e,t)}function Sw(e,t){S(`assertModuleDeclaration`,`assertImportOrExportDeclaration`),H(`ModuleDeclaration`,e,t)}function Cw(e){switch(e){case`string`:return Gd();case`number`:return Fd();case`undefined`:return af();case`boolean`:return od();case`function`:return wd(Gl(`Function`));case`object`:return wd(Gl(`Object`));case`symbol`:return wd(Gl(`Symbol`));case`bigint`:return id()}throw Error(`Invalid typeof value: `+e)}function ww(e){return Un(e)?e.name:`${e.id.name}.${ww(e.qualification)}`}function Tw(e){let t=Array.from(e),n=new Map,r=new Map,i=new Set,a=[];for(let e=0;e<t.length;e++){let o=t[e];if(o&&!a.includes(o)){if(ni(o))return[o];if(Rs(o)){r.set(o.type,o);continue}if(ea(o)){i.has(o.types)||(t.push(...o.types),i.add(o.types));continue}if(Si(o)){let e=ww(o.id);if(n.has(e)){let t=n.get(e).typeParameters;t&&o.typeParameters&&(t.params.push(...o.typeParameters.params),t.params=Tw(t.params))}else n.set(e,o);continue}a.push(o)}}for(let[,e]of r)a.push(e);for(let[,e]of n)a.push(e);return a}function Ew(e){let t=Tw(e);return t.length===1?t[0]:nf(t)}function Dw(e){return Un(e)?e.name:ur(e)?`this`:`${e.right.name}.${Dw(e.left)}`}function Ow(e){let t=Array.from(e),n=new Map,r=new Map,i=new Set,a=[];for(let e=0;e<t.length;e++){let o=t[e];if(!o||a.includes(o))continue;if(Ya(o))return[o];if(Ys(o)){r.set(o.type,o);continue}if(xo(o)){i.has(o.types)||(t.push(...o.types),i.add(o.types));continue}let s=`typeArguments`;if(fo(o)&&o[s]){let e=o[s],t=Dw(o.typeName);if(n.has(t)){let r=n.get(t)[s];r&&(r.params.push(...e.params),r.params=Ow(r.params))}else n.set(t,o);continue}a.push(o)}for(let[,e]of r)a.push(e);for(let[,e]of n)a.push(e);return a}function kw(e){let t=Ow(e.map(e=>Zo(e)?e.typeAnnotation:e));return t.length===1?t[0]:Cp(t)}function Aw(){return hu(`void`,Yl(0),!0)}const{hasOwn:jw}=Object;function Mw(e,t,n,r){return e&&typeof e.type==`string`?Fw(e,t,n,r):e}function Nw(e,t,n,r){return Array.isArray(e)?e.map(e=>Mw(e,t,n,r)):Mw(e,t,n,r)}function Pw(e,t=!0,n=!1){return e&&Fw(e,t,n,new Map)}function Fw(e,t=!0,n=!1,r){if(!e)return e;let{type:i}=e,a={type:e.type};if(Un(e))a.name=e.name,jw(e,`optional`)&&typeof e.optional==`boolean`&&(a.optional=e.optional),jw(e,`typeAnnotation`)&&(a.typeAnnotation=t?Nw(e.typeAnnotation,!0,n,r):e.typeAnnotation),jw(e,`decorators`)&&(a.decorators=t?Nw(e.decorators,!0,n,r):e.decorators);else if(jw(kc,i))for(let o of Object.keys(kc[i]))jw(e,o)&&(t?a[o]=Rn(e)&&o===`comments`?Iw(e.comments,t,n,r):Nw(e[o],!0,n,r):a[o]=e[o]);else throw Error(`Unknown node type: "${i}"`);return jw(e,`loc`)&&(n?a.loc=null:a.loc=e.loc),jw(e,`leadingComments`)&&(a.leadingComments=Iw(e.leadingComments,t,n,r)),jw(e,`innerComments`)&&(a.innerComments=Iw(e.innerComments,t,n,r)),jw(e,`trailingComments`)&&(a.trailingComments=Iw(e.trailingComments,t,n,r)),jw(e,`extra`)&&(a.extra={...e.extra}),a}function Iw(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=void 0),r.set(e,s),s})}function Lw(e){return Pw(e,!1)}function Rw(e){return Pw(e)}function zw(e){return Pw(e,!0,!0)}function Bw(e){return Pw(e,!1,!0)}function Vw(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}function Hw(e,t,n,r){return Vw(e,t,[{type:r?`CommentLine`:`CommentBlock`,value:n}])}function Uw(e,t,n){t&&n&&(t[e]=Array.from(new Set([].concat(t[e],n[e]).filter(Boolean))))}function Ww(e,t){Uw(`innerComments`,e,t)}function Gw(e,t){Uw(`leadingComments`,e,t)}function Kw(e,t){Uw(`trailingComments`,e,t)}function qw(e,t){return Kw(e,t),Gw(e,t),Ww(e,t),e}function Jw(e){return fc.forEach(t=>{e[t]=null}),e}const Yw=w.Standardized,Xw=w.Expression,Zw=w.Binary,Qw=w.Scopable,$w=w.BlockParent,eT=w.Block,tT=w.Statement,nT=w.Terminatorless,rT=w.CompletionStatement,iT=w.Conditional,aT=w.Loop,oT=w.While,sT=w.ExpressionWrapper,cT=w.For,lT=w.ForXStatement,uT=w.Function,dT=w.FunctionParent,fT=w.Pureish,pT=w.Declaration,mT=w.FunctionParameter,hT=w.PatternLike,gT=w.LVal,_T=w.TSEntityName,vT=w.Literal,yT=w.Immutable,bT=w.UserWhitespacable,xT=w.Method,ST=w.ObjectMember,CT=w.Property,wT=w.UnaryLike,TT=w.Pattern,ET=w.Class,DT=w.ImportOrExportDeclaration,OT=w.ExportDeclaration,kT=w.ModuleSpecifier,AT=w.Private,jT=w.Flow,MT=w.FlowType,NT=w.FlowBaseAnnotation,PT=w.FlowDeclaration,FT=w.FlowPredicate,IT=w.EnumBody,LT=w.EnumMember,RT=w.JSX,zT=w.Miscellaneous,BT=w.Accessor,VT=w.TypeScript,HT=w.TSTypeElement,UT=w.TSType,WT=w.TSBaseType,GT=DT;function KT(e,t){if(On(e))return e;let n;return In(e)?n=[]:(ss(e)||(e=gs(t)?su(e):zl(e)),n=[e]),Al(n)}function qT(e,t=`body`){let n=KT(e[t],e);return e[t]=n,n}function JT(e){e+=``;let t=``;for(let n of e)t+=tn(n.codePointAt(0))?n:`-`;return t=t.replace(/^[-0-9]+/,``),t=t.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():``}),cc(t)||(t=`_${t}`),t||`_`}function YT(e){return e=JT(e),(e===`eval`||e===`arguments`)&&(e=`_`+e),e}function XT(e,t=e.key||e.property){return!e.computed&&Un(t)&&(t=Jl(t.name)),t}function ZT(e){if(Ln(e)&&(e=e.expression),ns(e))return e;if(js(e)?(e.type=`ClassExpression`,e.abstract=!1):gs(e)&&(e.type=`FunctionExpression`),!ns(e))throw Error(`cannot turn ${e.type} to an expression`);return e}const QT=Symbol(),$T=Symbol();function eE(e,t,n){if(!e)return!1;let r=Dc[e.type];if(!r)return!1;n||={};let i=t(e,n);if(i!==void 0)switch(i){case QT:return!1;case $T:return!0}for(let i of r){let r=e[i];if(r){if(Array.isArray(r)){for(let e of r)if(eE(e,t,n))return!0}else if(eE(r,t,n))return!0}}return!1}eE.skip=QT,eE.stop=$T;const tE=[`tokens`,`start`,`end`,`loc`,`raw`,`rawValue`],nE=[...fc,`comments`,...tE];function rE(e,t={}){let n=t.preserveComments?tE:nE;for(let t of n)e[t]!=null&&(e[t]=void 0);for(let t of Object.keys(e))t.startsWith(`_`)&&e[t]!=null&&(e[t]=void 0);let r=Object.getOwnPropertySymbols(e);for(let t of r)e[t]=null}function iE(e,t){return eE(e,rE,t),e}function aE(e,t=e.key){let n;return e.kind===`method`?aE.increment()+``:(n=Un(t)?t.name:Kn(t)?JSON.stringify(t.value):JSON.stringify(iE(Pw(t))),e.computed&&(n=`[${n}]`),e.static&&(n=`static:${n}`),n)}aE.uid=0,aE.increment=function(){return aE.uid>=2**53-1?aE.uid=0:aE.uid++};function oE(e,t){if(ss(e))return e;let n=!1,r;if(js(e))n=!0,r=`ClassDeclaration`;else if(gs(e))n=!0,r=`FunctionDeclaration`;else if(Cn(e))return zl(e);if(n&&!e.id&&(r=!1),!r){if(t)return!1;throw Error(`cannot turn ${e.type} to a statement`)}return e.type=r,e}const sE=Function.call.bind(Object.prototype.toString);function cE(e){return sE(e)===`[object RegExp]`}function lE(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 uE(e){if(e===void 0)return Gl(`undefined`);if(e===!0||e===!1)return Zl(e);if(e===null)return Xl();if(typeof e==`string`)return Jl(e);if(typeof e==`number`){let t;if(Number.isFinite(e))t=Yl(Math.abs(e));else{let n;n=Yl(+!Number.isNaN(e)),t=El(`/`,n,Yl(0))}return(e<0||Object.is(e,-0))&&(t=hu(`-`,t)),t}if(typeof e==`bigint`)return e<0?hu(`-`,Ju(-e)):Ju(e);if(cE(e)){let t=e.source,n=/\/([a-z]*)$/.exec(e.toString())[1];return Ql(t,n)}if(Array.isArray(e))return wl(e.map(uE));if(lE(e)){let t=[];for(let n of Object.keys(e)){let r,i=!1;cc(n)?n===`__proto__`?(i=!0,r=Jl(n)):r=Gl(n):r=Jl(n),t.push(au(r,uE(e[n]),i))}return ru(t)}throw Error(`don't know how to turn this value into a node`)}function dE(e,t,n=!1){return e.object=eu(e.object,e.property,e.computed),e.property=t,e.computed=!!n,e}function fE(e,t){if(!e||!t)return e;for(let n of Ec.optional)e[n]??(e[n]=t[n]);for(let n of Object.keys(t))n.startsWith(`_`)&&n!==`__clone`&&(e[n]=t[n]);for(let n of Ec.force)e[n]=t[n];return qw(e,t),e}function pE(e,t){if(Rr(e.object))throw Error("Cannot prepend node to super property access (`super.foo`).");return e.object=eu(t,e.object),e}function mE(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}}return n}function hE(e,t,n,r){let i=[].concat(e),a=Object.create(null);for(;i.length;){let e=i.shift();if(!e||r&&(Cn(e)||pr(e)||mr(e)))continue;if(Un(e)){t?(a[e.name]=a[e.name]||[]).push(e):a[e.name]=e;continue}if(Ns(e)&&!Tr(e)){ys(e.declaration)&&i.push(e.declaration);continue}if(n){if(Vn(e)){i.push(e.id);continue}if(Hn(e)||Cr(e))continue}let o=hE.keys[e.type];if(o)for(let t=0;t<o.length;t++){let n=e[o[t]];n&&(Array.isArray(n)?i.push(...n):i.push(n))}}return a}hE.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`]};function gE(e,t){return hE(e,t,!0)}function _E(e){return Jn(e)?`null`:Xn(e)?`/${e.pattern}/${e.flags}`:Vr(e)?e.quasis.map(e=>e.value.raw).join(``):e.value===void 0?null:String(e.value)}function vE(e){return!e.computed||ws(e.key)?e.key:null}function yE(e,t){if(`id`in e&&e.id)return{name:e.id.name,originalNode:e.id};let n=``,r;if(rr(t,{value:e})?r=vE(t):nr(e)||Fr(e)?(r=vE(e),e.kind===`get`?n=`get `:e.kind===`set`&&(n=`set `)):gr(t)&&t.init===e?r=t.id:Cn(t,{operator:`=`,right:e})&&(r=t.left),!r)return null;let i=ws(r)?_E(r):Un(r)?r.name:$r(r)?r.id.name:null;return i==null?null:{name:n+i,originalNode:r}}function bE(e,t,n){typeof t==`function`&&(t={enter:t});let{enter:r,exit:i}=t;xE(e,r,i,n,[])}function xE(e,t,n,r,i){let a=Dc[e.type];if(a){t&&t(e,i,r);for(let o of a){let a=e[o];if(Array.isArray(a))for(let s=0;s<a.length;s++){let c=a[s];c&&(i.push({node:e,key:o,index:s}),xE(c,t,n,r,i),i.pop())}else a&&(i.push({node:e,key:o}),xE(a,t,n,r,i),i.pop())}n&&n(e,i,r)}}function SE(e,t,n){if(n&&e.type===`Identifier`&&t.type===`ObjectProperty`&&n.type===`ObjectExpression`)return!1;let r=hE.keys[t.type];if(r)for(let n=0;n<r.length;n++){let i=t[r[n]];if(Array.isArray(i)){if(i.includes(e))return!0}else if(i===e)return!0}return!1}function CE(e){return hr(e)&&e.kind!==`var`}function wE(e){return Vn(e)||wr(e)||CE(e)}function TE(e){return oc(e.type,`Immutable`)?!0:Un(e)?e.name===`undefined`:!1}function EE(e,t){if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return e===t;if(e.type!==t.type)return!1;let n=Object.keys(kc[e.type]||e.type),r=Dc[e.type];for(let i of n){let n=e[i],a=t[i];if(typeof n!=typeof a)return!1;if(!(n==null&&a==null)){if(n==null||a==null)return!1;if(Array.isArray(n)){if(!Array.isArray(a)||n.length!==a.length)return!1;for(let e=0;e<n.length;e++)if(!EE(n[e],a[e]))return!1;continue}if(typeof n==`object`&&!r?.includes(i)){for(let e of Object.keys(n))if(n[e]!==a[e])return!1;continue}if(!EE(n,a))return!1}}return!0}function DE(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?.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}function OE(e,t){return On(e)&&(gs(t)||jn(t))?!1:As(e)&&(gs(t)||jn(t))?!0:is(e)}function kE(e){return jr(e)||Un(e.imported||e.exported,{name:`default`})}const AE=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 jE(e){return cc(e)&&!AE.has(e)}function ME(e){return hr(e)&&e.kind===`var`}const NE={isReactComponent:ic,isCompatTag:ac,buildChildren:Vv};var PE=e(n(((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`,ee=e=>l.call(e)==`[object Map]`,te=e=>l.call(e)==`[object Set]`,_={"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`},v=/[\\\b\f\n\r\t]/,ne=/[0-9]/,re=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,ie=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,ae=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,oe=(e,t)=>{let n=()=>{ue=y,++t.indentLevel,y=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 se=t.quotes==`double`?`"`:t.quotes==`backtick`?"`":`'`,ce=t.compact,le=t.lowercaseHex,y=t.indent.repeat(t.indentLevel),ue=``,de=t.__inline1__,fe=t.__inline2__,pe=ce?``:`
|
|
6
|
+
`,b,me=!0,he=t.numbers==`binary`,ge=t.numbers==`octal`,_e=t.numbers==`decimal`,ve=t.numbers==`hexadecimal`;if(l&&e&&g(e.toJSON)&&(e=e.toJSON()),!p(e)){if(ee(e))return e.size==0?`new Map()`:(ce||(t.__inline1__=!0,t.__inline2__=!1),`new Map(`+oe(Array.from(e),t)+`)`);if(te(e))return e.size==0?`new Set()`:`new Set(`+oe(Array.from(e),t)+`)`;if(d(e))return e.length==0?`Buffer.from([])`:`Buffer.from(`+oe(Array.from(e),t)+`)`;if(u(e))return b=[],t.wrap=!0,de&&(t.__inline1__=!1,t.__inline2__=!0),fe||n(),o(e,e=>{me=!1,fe&&(t.__inline2__=!1),b.push((ce||fe?``:y)+oe(e,t))}),me?`[]`:fe?`[`+b.join(`, `)+`]`:`[`+pe+b.join(`,`+pe)+pe+(ce?``:ue)+`]`;if(m(e)||h(e)){if(l)return JSON.stringify(Number(e));let t;if(_e)t=String(e);else if(ve){let n=e.toString(16);le||(n=n.toUpperCase()),t=`0x`+n}else he?t=`0b`+e.toString(2):ge&&(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 b=[],t.wrap=!0,n(),i(e,(e,n)=>{me=!1,b.push((ce?``:y)+oe(e,t)+`:`+(ce?``:` `)+oe(n,t))}),me?`{}`:`{`+pe+b.join(`,`+pe)+pe+(ce?``:ue)+`}`;else return l?JSON.stringify(e)||`null`:String(e)}let ye=t.escapeEverything?ie:ae;return b=e.replace(ye,(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,le)+`}`:s(c(e,le))+s(c(r,le))}if(r)return s(c(r.charCodeAt(0),le));if(e==`\0`&&!l&&!ne.test(o.charAt(a+1)))return`\\0`;if(i)return i==se||t.escapeEverything?`\\`+i:i;if(v.test(e))return _[e];if(t.minimal&&!re.test(e))return e;let u=c(e.charCodeAt(0),le);return l||u.length>2?s(u):`\\x`+(`00`+u).slice(-2)}),se=="`"&&(b=b.replace(/\$\{/g,"\\${")),t.isScriptContext&&(b=b.replace(/<\/(script|style)/gi,`<\\/$1`).replace(/<!--/g,l?`\\u003C!--`:`\\x3C!--`)),t.wrap&&(b=se+b+se),b};oe.version=`3.0.2`,t.exports=oe}))(),1),FE=class{_map;_rawMappings;_sourceFileName;_lastGenLine=0;_lastSourceLine=0;_lastSourceColumn=0;_inputMap=null;constructor(e,t){let n=this._map=new Nt({sourceRoot:e.sourceRoot});if(this._sourceFileName=e.sourceFileName?.replace(/\\/g,`/`),this._rawMappings=void 0,e.inputSourceMap){this._inputMap=new _t(e.inputSourceMap);let t=this._inputMap.resolvedSources;if(t.length)for(let e=0;e<t.length;e++)It(n,t[e],this._inputMap.sourcesContent?.[e])}if(typeof t==`string`&&!e.inputSourceMap)It(n,this._sourceFileName,t);else if(typeof t==`object`)for(let e of Object.keys(t))It(n,e.replace(/\\/g,`/`),t[e])}get(){return Rt(this._map)}getDecoded(){return Lt(this._map)}getRawMappings(){return this._rawMappings||=zt(this._map)}mark(e,t,n,r,i,a){this._rawMappings=void 0;let o;if(t!=null)if(this._inputMap){if(o=bt(this._inputMap,{line:t,column:n}),!o.name&&i){let e=bt(this._inputMap,i);e.name&&(r=e.name)}}else o={name:null,source:a?.replace(/\\/g,`/`)||this._sourceFileName,line:t,column:n};Ft(this._map,{name:r,generated:e,source:o?.source,original:o})}};const IE=[];for(let e=0;e<32;e++)IE.push(` `.repeat(e*2));var LE=class{constructor(e,t){this._map=e,this._indentChar=t}_map=null;_buf=``;_str=``;_appendCount=0;_last=0;_canMarkIdName=!0;_indentChar=``;_queuedChar=0;_position={line:1,column:0};_sourcePosition={identifierName:void 0,identifierNamePos:void 0,line:void 0,column:void 0,filename:void 0};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 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,t,n){if(this._last=e,e===-1){let e=t>=64?this._indentChar.repeat(t):IE[t/2];this._str+=e}else this._str+=t>1?String.fromCharCode(e).repeat(t):String.fromCharCode(e);let r=e===32,i=this._position;if(e!==10){if(this._map){let e=this._sourcePosition;n&&e?(this._map.mark(i,e.line,e.column,r?void 0:e.identifierName,r?void 0:e.identifierNamePos,e.filename),!r&&this._canMarkIdName&&(e.identifierName=void 0,e.identifierNamePos=void 0)):this._map.mark(i)}i.column+=t}else i.line++,i.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(`
|
|
7
|
+
`),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(`
|
|
8
|
+
`,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)}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}getCurrentLine(){return this._position.line}};const{isMemberExpression:RE,isOptionalMemberExpression:zE,isYieldExpression:BE,isStatement:VE}=yn,HE=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 UE(e){return e===154||e===199||e===207}const WE=(e,t,n)=>(n===22||n===23)&&t.superClass===e,GE=(e,t,n)=>{switch(n){case 109:case 133:return t.object===e;case 18:case 131:case 113:return t.callee===e;case 220:return t.tag===e;case 189:return!0}return!1};function KE(e,t,n){return n===4}function qE(e,t,n,r){return n===237||n===91||n===4||(r&8)>0}function JE(e,t,n){return GE(e,t,n)||WE(e,t,n)}function YE(e){return(e&3)>0}function XE(e,t,n,r){return YE(r)}function ZE(e,t,n,r){return(r&1)>0&&!e.async}function QE(e,t,n,r){if(WE(e,t,n)||GE(e,t,n)||n===236||n===143||n===8)return!0;let i;switch(n){case 11:case 108:i=HE.get(t.operator);break;case 154:case 199:i=7}if(i!==void 0){let a=r===2?7:HE.get(e.operator);if(i>a||i===a&&n===11&&(a===11?t.left===e:t.right===e)||r===1&&n===108&&(a===1&&i!==1||i===1&&a!==1))return!0}return!1}function $E(e,t,n){switch(n){case 4:case 116:case 91:case 237:return!0}return!1}function eD(e,t,n){return n===85&&t.objectType===e}function tD(e,t,n){return(n===6||n===7)&&t.left===e||n===11&&(t.operator===`|`||t.operator===`&`)&&e===t.left?!0:QE(e,t,n,2)}function nD(e,t,n){switch(n){case 153:case 193:case 209:case 210:case 179:case 217:return!0;case 173:return t.objectType===e;case 159:return t.checkType===e||t.extendsType===e}return!1}function rD(e,t,n){switch(n){case 179:case 209:case 153:case 193:return!0;case 173:return t.objectType===e}return!1}function iD(e,t,n){return n===209||oD(e,t,n)}function aD(e,t,n){return!!(oD(e,t,n)||(n===179||n===217)&&e.typeParameter.constraint!=null)}function oD(e,t,n){switch(n){case 153:case 193:return!0;case 173:if(t.objectType===e)return!0}return!1}function sD(e,t,n){switch(n){case 18:case 131:case 113:case 175:return t.typeArguments!=null}return!1}function cD(e,t,n){return rD(e,t,n)?!0:n===217||n===159&&(t.checkType===e||t.extendsType===e)}function lD(e,t,n,r){return QE(e,t,n,0)?!0:(r&128)>0&&e.operator===`in`}function uD(e,t,n){return QE(e,t,n,1)}function dD(e,t,n){return n===142||n===134||n===109&&t.property===e||n===133&&t.property===e||n===222?!1:n===22?!0:n===69?t.right===e:n===61?!0:!VE(t)}function fD(e,t,n){return n===11||n===108||n===236||n===143||GE(e,t,n)||n===8&&BE(e)||n===29&&e===t.test||WE(e,t,n)||UE(n)}function pD(e,t,n,r){return(r&5)>0}function mD(e,t,n){return GE(e,t,n)||n===11&&t.operator===`**`&&t.left===e||WE(e,t,n)}function hD(e,t,n,r){return(r&5)>0}function gD(e,t,n){switch(n){case 236:case 143:case 11:case 108:case 8:return!0;case 29:if(t.test===e)return!0}return UE(n)?!0:mD(e,t,n)}function _D(e,t,n){switch(n){case 18:return t.callee===e;case 109:return t.object===e}return!1}function vD(e,t,n,r){return YE(r)&&e.left.type===`ObjectPattern`?!0:gD(e,t,n)}function yD(e,t,n,r,i){if(i&&i(e)!==e.name)return!1;if(n===6&&e.extra?.parenthesized&&t.left===e){let e=t.right.type;if((e===`FunctionExpression`||e===`ClassExpression`)&&t.right.id==null)return!0}return(r&64||(n===109||n===133)&&r&49)&&e.name===`let`?(RE(t,{object:e,computed:!0})||zE(t,{object:e,computed:!0,optional:!1}))&&r&49?!0:(r&64)>0:n===69&&t.left===e&&e.name===`async`&&!t.await}const bD=Object.defineProperty({__proto__:null,ArrowFunctionExpression:gD,AssignmentExpression:vD,AwaitExpression:fD,BinaryExpression:lD,ClassExpression:pD,ConditionalExpression:gD,DoExpression:ZE,FunctionExpression:hD,FunctionTypeAnnotation:qE,Identifier:yD,IntersectionTypeAnnotation:$E,LogicalExpression:uD,NullableTypeAnnotation:KE,ObjectExpression:XE,OptionalCallExpression:_D,OptionalIndexedAccessType:eD,OptionalMemberExpression:_D,SequenceExpression:dD,SpreadElement:mD,TSAsExpression:tD,TSConditionalType:nD,TSConstructorType:cD,TSFunctionType:cD,TSInferType:aD,TSInstantiationExpression:sD,TSIntersectionType:iD,TSSatisfiesExpression:tD,TSTypeAssertion:mD,TSTypeOperator:oD,TSUnionType:rD,UnaryExpression:mD,UnionTypeAnnotation:$E,UpdateExpression:JE,YieldExpression:fD},Symbol.toStringTag,{value:`Module`});function xD(e){this.print(e.tag),this.print(e.typeArguments),this.print(e.quasi)}function SD(){throw Error(`TemplateElement printing is handled in TemplateLiteral`)}function CD(e,t){let n=e.quasis,r="`";for(let e=0;e<n.length-1;e++)r+=n[e].value.raw,this.token(r+"${",!0),this.print(t[e]),r=`}`;r+=n[n.length-1].value.raw,this.token(r+"`",!0)}function wD(e){CD.call(this,e,e.expressions)}const{isCallExpression:TD,isLiteral:ED,isMemberExpression:DD,isNewExpression:OD,isPattern:kD}=yn;function AD(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 jD(e){e.async&&(this.word(`async`,!0),this.space()),this.word(`do`),this.space(),this.print(e.body)}function MD(e){this.tokenChar(40);let t=this.enterDelimited();this.print(e.expression,void 0,!0),this._noLineTerminatorAfterNode=t,this.rightParens(e)}function ND(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 PD(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 FD(e){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 ID(e,t){this.word(`new`),this.space(),this.print(e.callee),!(this.format.minified&&e.arguments.length===0&&!TD(t,{callee:e})&&!DD(t)&&!OD(t))&&(this.print(e.typeArguments),!(e.arguments.length===0&&this.tokenMap&&!this.tokenMap.endMatches(e,`)`))&&FD.call(this,e))}function LD(e){this.printList(e.expressions)}function RD(){this.word(`this`)}function zD(){this.word(`super`)}function BD(e){return typeof e.start==`number`&&e.start===e.declaration.start}function VD(e){this.tokenChar(64);let{expression:t}=e;this.print(t),this.newline()}function HD(e){let{computed:t}=e,{optional:n,property:r}=e;if(this.print(e.object),!t&&DD(r))throw TypeError(`Got a MemberExpression for MemberExpression property`);ED(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 UD(e){this.print(e.callee),e.optional&&this.token(`?.`),this.print(e.typeArguments),FD.call(this,e)}function WD(e){this.print(e.callee),this.print(e.typeArguments),FD.call(this,e)}function GD(){this.word(`import`)}function KD(e){this.word(`await`),this.space(),this.print(e.argument)}function qD(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 JD(){this.semicolon(!0)}function YD(e){this.tokenContext|=1,this.print(e.expression),this.semicolon()}function XD(e){this.print(e.left),(e.left.type===`Identifier`||kD(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 ZD(e){this.print(e.left),this.space(),this.token(e.operator,!1,0,!0),this.space(),this.print(e.right)}function QD(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 $D(e){this.print(e.object),this.token(`::`),this.print(e.callee)}function eO(e){if(this.print(e.object),!e.computed&&DD(e.property))throw TypeError(`Got a MemberExpression for MemberExpression property`);let t=e.computed;if(ED(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 tO(e){this.print(e.meta),this.tokenChar(46),this.print(e.property)}function nO(e){this.tokenChar(35),this.print(e.id)}function rO(e){this.tokenChar(37),this.word(e.name)}function iO(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)}const{isFor:aO,isIfStatement:oO,isStatement:sO,isVoidPattern:cO}=yn;function lO(e){this.word(`with`),this.space(),this.tokenChar(40),this.print(e.object),this.tokenChar(41),this.printBlock(e.body)}function uO(e){this.word(`if`),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.space();let t=e.alternate&&oO(dO(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 dO(e){let{body:t}=e;return sO(t)===!1?e:dO(t)}function fO(e){this.word(`for`),this.space(),this.tokenChar(40),this.tokenContext|=144,this.print(e.init),this.tokenContext=0,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 pO(e){this.word(`while`),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.printBlock(e.body)}function mO(e){this.word(`for`),this.space(),this.noIndentInnerCommentsHere(),this.tokenChar(40),this.tokenContext|=160,this.print(e.left),this.tokenContext=0,this.space(),this.word(`in`),this.space(),this.print(e.right),this.tokenChar(41),this.printBlock(e.body)}function hO(e){this.word(`for`),this.space(),e.await&&(this.word(`await`),this.space()),this.noIndentInnerCommentsHere(),this.tokenChar(40),this.tokenContext|=64,this.print(e.left),this.space(),this.word(`of`),this.space(),this.print(e.right),this.tokenChar(41),this.printBlock(e.body)}function gO(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 _O(e,t){t&&(e.space(),e.printTerminatorless(t)),e.semicolon()}function vO(e){this.word(`break`),_O(this,e.label)}function yO(e){this.word(`continue`),_O(this,e.label)}function bO(e){this.word(`return`),_O(this,e.argument)}function xO(e){this.word(`throw`),_O(this,e.argument)}function SO(e){this.print(e.label),this.tokenChar(58),this.space(),this.print(e.body)}function CO(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 wO(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 TO(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 EO(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 DO(){this.word(`debugger`),this.semicolon()}function OO(e){this.tokenChar(44,e),this.newline()}function kO(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 r=!1;if(!aO(t)){for(let t of e.declarations)if(t.init){r=!0;break}}if(this.printList(e.declarations,void 0,void 0,e.declarations.length>1,r?OO: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 AO(e){this.print(e.id),e.definite&&this.tokenChar(33),cO(e.id)||this.print(e.id.typeAnnotation),e.init&&(this.space(),this.tokenChar(61),this.space(),this.print(e.init))}const{isIdentifier:jO}=yn;function MO(e,t,n,r){if(this.print(e.typeParameters),n!==void 0||r!==void 0){let e=VO.call(this,n,r);e&&this.sourceIdentifierName(e.name,e.pos)}this.tokenChar(40),NO.call(this,e.params,41),this.print(e.returnType,t),this._noLineTerminator=t}function NO(e,t){let n=this.enterDelimited(),r=this.shouldPrintTrailingComma(t),i=e.length;for(let t=0;t<i;t++)PO.call(this,e[t]),(r||t<i-1)&&(this.tokenChar(44,t),this.space());this.tokenChar(t),this._noLineTerminatorAfterNode=n}function PO(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 FO(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?MO.call(this,e,!1,e.computed&&e.key.type!==`StringLiteral`?void 0:e.key):MO.call(this,e,!1)}function IO(e,t){e.predicate&&(e.returnType||this.tokenChar(58),this.space(),this.print(e.predicate,t))}function LO(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?MO.call(this,e,!1,e.id,t):MO.call(this,e,!1),n&&IO.call(this,e)}function RO(e,t){LO.call(this,e,t,!0),this.space(),this.print(e.body)}function zO(e,t){e.async&&(this.word(`async`,!0),this.space()),BO.call(this,e)?MO.call(this,e,!0,void 0,this._buf._map?t:void 0):this.print(e.params[0],!0),IO.call(this,e,!0),this.space(),this.printInnerComments(),this.token(`=>`),this.space(),this.tokenContext|=2,this.print(e.body)}function BO(e){if(e.params.length!==1||e.typeParameters||e.returnType||e.predicate)return!0;let t=e.params[0];if(!jO(t)||t.typeAnnotation||t.optional||t.leadingComments?.length||t.trailingComments?.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 VO(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}function HO(e,t){this.token((t.type===`TSFunctionType`||t.type===`TSConstructorType`)&&t.returnType===e?`=>`:`:`),this.space(),e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)}function UO(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 WO(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.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 GO(e){e.accessibility&&(this.word(e.accessibility),this.space()),e.readonly&&(this.word(`readonly`),this.space()),PO.call(this,e.parameter)}function KO(e,t){e.declare&&(this.word(`declare`),this.space()),LO.call(this,e,t,!1),this.semicolon()}function qO(e){xM.call(this,e,!1),this.semicolon()}function JO(e){this.print(e.left),this.tokenChar(46),this.print(e.right)}function YO(e){aA.call(this,e),XO(this,e)}function XO(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 ZO(e){this.word(`new`),this.space(),aA.call(this,e),XO(this,e)}function QO(e){let{readonly:t}=e;t&&(this.word(`readonly`),this.space()),$O.call(this,e),this.print(e.typeAnnotation),XO(this,e)}function $O(e){e.computed&&this.tokenChar(91),this.print(e.key),e.computed&&this.tokenChar(93),e.optional&&this.tokenChar(63)}function ek(e){let{kind:t}=e;(t===`set`||t===`get`)&&(this.word(t),this.space()),$O.call(this,e),aA.call(this,e),XO(this,e)}function tk(e){let{readonly:t,static:n}=e;n&&(this.word(`static`),this.space()),t&&(this.word(`readonly`),this.space()),this.tokenChar(91),NO.call(this,e.parameters,93),this.print(e.typeAnnotation),XO(this,e)}function nk(){this.word(`any`)}function rk(){this.word(`bigint`)}function ik(){this.word(`unknown`)}function ak(){this.word(`number`)}function ok(){this.word(`object`)}function sk(){this.word(`boolean`)}function ck(){this.word(`string`)}function lk(){this.word(`symbol`)}function uk(){this.word(`void`)}function dk(){this.word(`undefined`)}function fk(){this.word(`null`)}function pk(){this.word(`never`)}function mk(){this.word(`intrinsic`)}function hk(){this.word(`this`)}function gk(e){vk.call(this,e)}function _k(e){e.abstract&&(this.word(`abstract`),this.space()),this.word(`new`),this.space(),vk.call(this,e)}function vk(e){let{typeParameters:t}=e,n=e.params;this.print(t),this.tokenChar(40),NO.call(this,n,41),this.space();let r=e.returnType;this.print(r)}function yk(e){let t=e.typeArguments;this.print(e.typeName,!!t),this.print(t)}function bk(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 xk(e){this.word(`typeof`),this.space(),this.print(e.exprName);let t=e.typeArguments;t&&this.print(t)}function Sk(e){sA(this,e,()=>this.printJoin(e.members,!0,!0,void 0,void 0,!0))}function Ck(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)}function wk(e){this.tokenChar(91),this.printList(e.elementTypes,this.shouldPrintTrailingComma(`]`)),this.tokenChar(93)}function Tk(e){this.print(e.typeAnnotation),this.tokenChar(63)}function Ek(e){this.token(`...`),this.print(e.typeAnnotation)}function Dk(e){this.print(e.label),e.optional&&this.tokenChar(63),this.tokenChar(58),this.space(),this.print(e.elementType)}function Ok(e){Ak(this,e,`|`)}function kk(e){Ak(this,e,`&`)}function Ak(e,t,n){let r=0;e.tokenMap?.startMatches(t,n)&&(r=1,e.token(n)),e.printJoin(t.types,void 0,void 0,function(e){this.space(),this.token(n,void 0,e+r),this.space()})}function jk(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 Mk(e){this.word(`infer`),this.print(e.typeParameter)}function Nk(e){this.tokenChar(40),this.print(e.typeAnnotation),this.tokenChar(41)}function Pk(e){this.word(e.operator),this.space(),this.print(e.typeAnnotation)}function Fk(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)}function Ik(e){let{nameType:t,optional:n,readonly:r,typeAnnotation:i}=e;this.tokenChar(123);let a=this.enterDelimited();this.space(),r&&(Lk(this,r),this.word(`readonly`),this.space()),this.tokenChar(91),this.word(e.key.name),this.space(),this.word(`in`),this.space(),this.print(e.constraint),t&&(this.space(),this.word(`as`),this.space(),this.print(t,void 0,!0)),this.tokenChar(93),n&&(Lk(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 Lk(e,t){t!==!0&&e.token(t)}function Rk(e){CD.call(this,e,e.types)}function zk(e){this.print(e.literal)}function Bk(e){this.print(e.expression),this.print(e.typeArguments)}function Vk(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?.length&&(this.space(),this.word(`extends`),this.space(),this.printList(i)),this.space(),this.print(a)}function Hk(e){sA(this,e,()=>this.printJoin(e.body,!0,!0,void 0,void 0,!0))}function Uk(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 Wk(e){let{expression:t,typeAnnotation:n}=e;this.print(t,!0),this.space(),this.word(`as`),this.space(),this.print(n)}function Gk(e){let{expression:t,typeAnnotation:n}=e;this.print(t,!0),this.space(),this.word(`satisfies`),this.space(),this.print(n)}function Kk(e){let{typeAnnotation:t,expression:n}=e;this.tokenChar(60),this.print(t),this.tokenChar(62),this.space(),this.print(n)}function qk(e){this.print(e.expression),this.print(e.typeArguments)}function Jk(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(),this.print(e.body)}function Yk(e){sA(this,e,()=>this.printList(e.members,this.shouldPrintTrailingComma(`}`)??!1,!0,!0,void 0,!0))}function Xk(e){let{id:t,initializer:n}=e;this.print(t),n&&(this.space(),this.tokenChar(61),this.space(),this.print(n))}function Zk(e){let{declare:t,kind:n}=e;if(t&&(this.word(`declare`),this.space()),n!==`global`&&(this.word(n),this.space()),this.print(e.id),!e.body){this.semicolon();return}this.space(),this.print(e.body)}function Qk(e){sA(this,e,()=>this.printSequence(e.body,!0,!0))}function $k(e){let{qualifier:t,options:n}=e;this.word(`import`),this.tokenChar(40),this.print(e.source),n&&(this.tokenChar(44),this.print(n)),this.tokenChar(41),t&&(this.tokenChar(46),this.print(t));let r=e.typeArguments;r&&this.print(r)}function eA(e){let{id:t,moduleReference:n}=e;this.word(`import`),this.space(),this.print(t),this.space(),this.tokenChar(61),this.space(),this.print(n),this.semicolon()}function tA(e){this.token(`require(`),this.print(e.expression),this.tokenChar(41)}function nA(e){this.print(e.expression),this.tokenChar(33),this.setLastChar(33)}function rA(e){this.word(`export`),this.space(),this.tokenChar(61),this.space(),this.print(e.expression),this.semicolon()}function iA(e){this.word(`export`),this.space(),this.word(`as`),this.space(),this.word(`namespace`),this.space(),this.print(e.id),this.semicolon()}function aA(e){let{typeParameters:t}=e,n=e.params;this.print(t),this.tokenChar(40),NO.call(this,n,41),this.print(e.returnType)}function oA(e){let t=e.type===`ClassPrivateProperty`,n=e.type===`ClassAccessorProperty`||e.type===`ClassProperty`;cA(this,e,[n&&e.declare&&`declare`,!t&&e.accessibility]),e.static&&(this.word(`static`),this.space()),cA(this,e,[!t&&e.abstract&&`abstract`,!t&&e.override&&`override`,(n||t)&&e.readonly&&`readonly`])}function sA(e,t,n){e.token(`{`);let r=e.enterDelimited();n(),e._noLineTerminatorAfterNode=r,e.rightBrace(t)}function cA(e,t,n){let r=new Set;for(let e of n)e&&r.add(e);e.tokenMap?.find(t,t=>r.has(t.value)?(e.token(t.value),e.space(),r.delete(t.value),r.size===0):!1);for(let t of r)e.word(t),e.space()}const{isClassDeclaration:lA,isExportDefaultSpecifier:uA,isExportNamespaceSpecifier:dA,isImportDefaultSpecifier:fA,isImportNamespaceSpecifier:pA,isStatement:mA}=yn;function hA(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 gA(e){this.print(e.local)}function _A(e){this.print(e.exported)}function vA(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 yA(e){this.tokenChar(42),this.space(),this.word(`as`),this.space(),this.print(e.exported)}function bA(e,t){let{attributes:n}=e;this.word(`with`),this.space();let r=+!!t;this.token(`{`,void 0,r),this.space(),this.printList(n,this.shouldPrintTrailingComma(`}`)),this.space(),this.token(`}`,void 0,r)}function xA(e){this.word(`export`),this.space(),e.exportKind===`type`&&(this.word(`type`),this.space()),this.tokenChar(42),this.space(),this.word(`from`),this.space(),e.attributes?.length?(this.print(e.source,!0),this.space(),bA.call(this,e,!1)):this.print(e.source),this.semicolon()}function SA(e,t){lA(t.declaration)&&BD.call(e,t)&&e.printJoin(t.declaration.decorators)}function CA(e){if(SA(this,e),this.word(`export`),this.space(),e.declaration){let t=e.declaration;this.print(t),mA(t)||this.semicolon()}else{e.exportKind===`type`&&(this.word(`type`),this.space());let t=e.specifiers.slice(0),n=!1;for(;;){let e=t[0];if(uA(e)||dA(e))n=!0,this.print(t.shift()),t.length&&(this.tokenChar(44),this.space());else break}let r=!1;(t.length||!t.length&&!n)&&(r=!0,this.tokenChar(123),t.length&&(this.space(),this.printList(t,this.shouldPrintTrailingComma(`}`)),this.space()),this.tokenChar(125)),e.source&&(this.space(),this.word(`from`),this.space(),e.attributes?.length?(this.print(e.source,!0),this.space(),bA.call(this,e,r)):this.print(e.source)),this.semicolon()}}function wA(e){SA(this,e),this.word(`export`),this.noIndentInnerCommentsHere(),this.space(),this.word(`default`),this.space(),this.tokenContext|=4;let t=e.declaration;this.print(t),mA(t)||this.semicolon()}function TA(e){this.word(`import`),this.space();let t=e.importKind===`type`||e.importKind===`typeof`;t?(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 n=e.specifiers.slice(0),r=!!n.length;for(;r;){let e=n[0];if(fA(e)||pA(e))this.print(n.shift()),n.length&&(this.tokenChar(44),this.space());else break}let i=!1;n.length?(i=!0,this.tokenChar(123),this.space(),this.printList(n,this.shouldPrintTrailingComma(`}`)),this.space(),this.tokenChar(125)):t&&!r&&(i=!0,this.tokenChar(123),this.tokenChar(125)),(r||t)&&(this.space(),this.word(`from`),this.space()),e.attributes?.length?(this.print(e.source,!0),this.space(),bA.call(this,e,i)):this.print(e.source),this.semicolon()}function EA(e){this.print(e.key),this.tokenChar(58),this.space(),this.print(e.value)}function DA(e){this.tokenChar(42),this.space(),this.word(`as`),this.space(),this.print(e.local)}function OA(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)}const{isAssignmentPattern:kA,isIdentifier:AA}=yn;let jA=``;function MA(e){let{name:t}=e,n=this.tokenMap.find(e,e=>e.value===t);return n?(jA=this._originalCode.slice(n.start,n.end),jA):jA=e.name}function NA(e){this._buf._map&&this.sourceIdentifierName(e.loc?.identifierName||e.name),this.word(this.tokenMap?jA:e.name)}function PA(){this.tokenChar(63)}function FA(e){this.token(`...`),this.print(e.argument)}function IA(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 LA(e){this.printJoin(e.decorators),FO.call(this,e),this.space(),this.print(e.body)}function RA(e){if(this.printJoin(e.decorators),e.computed)this.tokenChar(91),this.print(e.key),this.tokenChar(93);else{if(kA(e.value)&&AA(e.key)&&e.key.name===e.value.left.name){this.print(e.value);return}if(this.print(e.key),e.shorthand&&AA(e.key)&&AA(e.value)&&e.key.name===e.value.name)return}this.tokenChar(58),this.space(),this.print(e.value)}function zA(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 BA(e){this.word(`/${e.pattern}/${e.flags}`,!1)}function VA(e){this.word(e.value?`true`:`false`)}function HA(){this.word(`null`)}function UA(e){let t=this.getPossibleRaw(e),n=this.format.jsescOption,r=e.value,i=r+``;n.numbers?this.number((0,PE.default)(r,n),r):t==null?this.number(i,r):this.format.minified?this.number(t.length<i.length?t:i,r):this.number(t,r)}function WA(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.token(t);return}let n=(0,PE.default)(e.value,this.format.jsescOption);this.token(n)}function GA(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.word(t);return}this.word(e.value+`n`)}const KA=new Set([`^^`,`@@`,`^`,`%`,`#`]);function qA(){let{topicToken:e}=this.format;if(KA.has(e))this.token(e);else{let t=JSON.stringify(e),n=Array.from(KA,e=>JSON.stringify(e));throw Error(`The "topicToken" generator option must be one of ${n.join(`, `)} (${t} received instead).`)}}function JA(){this.word(`void`)}const{isDeclareExportDeclaration:YA,isStatement:XA}=yn;function ZA(){this.word(`any`)}function QA(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)}function $A(){this.word(`boolean`)}function ej(e){this.word(e.value?`true`:`false`)}function tj(){this.word(`null`)}function nj(e,t){YA(t)||(this.word(`declare`),this.space()),this.word(`class`),this.space(),jj.call(this,e)}function rj(e,t){YA(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 ij(){this.tokenChar(37),this.word(`checks`)}function aj(e){this.tokenChar(37),this.word(`checks`),this.tokenChar(40),this.print(e.value),this.tokenChar(41)}function oj(e){this.word(`declare`),this.space(),Nj.call(this,e)}function sj(e){this.word(`declare`),this.space(),this.word(`module`),this.space(),this.print(e.id),this.space(),this.print(e.body)}function cj(e){this.word(`declare`),this.space(),this.word(`module`),this.tokenChar(46),this.word(`exports`),this.print(e.typeAnnotation)}function lj(e){this.word(`declare`),this.space(),Gj.call(this,e)}function uj(e,t){YA(t)||(this.word(`declare`),this.space()),Yj.call(this,e)}function dj(e,t){YA(t)||(this.word(`declare`),this.space()),this.word(`var`),this.space(),this.print(e.id),this.print(e.id.typeAnnotation),this.semicolon()}function fj(e){this.word(`declare`),this.space(),this.word(`export`),this.space(),e.default&&(this.word(`default`),this.space()),Ej.call(this,e)}function pj(e){this.word(`declare`),this.space(),xA.call(this,e)}function mj(e){let{id:t,body:n}=e;this.word(`enum`),this.space(),this.print(t),this.print(n)}function hj(e,t,n){n&&(e.space(),e.word(`of`),e.space(),e.word(t)),e.space()}function gj(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 _j(e){let{explicitType:t}=e;hj(this,`boolean`,t),gj(this,e)}function vj(e){let{explicitType:t}=e;hj(this,`number`,t),gj(this,e)}function yj(e){let{explicitType:t}=e;hj(this,`string`,t),gj(this,e)}function bj(e){hj(this,`symbol`,!0),gj(this,e)}function xj(e){let{id:t}=e;this.print(t),this.tokenChar(44)}function Sj(e,t){e.print(t.id),e.space(),e.token(`=`),e.space(),e.print(t.init),e.token(`,`)}function Cj(e){Sj(this,e)}function wj(e){Sj(this,e)}function Tj(e){Sj(this,e)}function Ej(e){if(e.declaration){let t=e.declaration;this.print(t),XA(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 Dj(){this.tokenChar(42)}function Oj(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 kj(e){this.print(e.name),e.optional&&this.tokenChar(63),e.name&&(this.tokenChar(58),this.space()),this.print(e.typeAnnotation)}function Aj(e){this.print(e.id),this.print(e.typeParameters,!0)}function jj(e){this.print(e.id),this.print(e.typeParameters),e.extends?.length&&(this.space(),this.word(`extends`),this.space(),this.printList(e.extends)),e.type===`DeclareClass`&&(e.mixins?.length&&(this.space(),this.word(`mixins`),this.space(),this.printList(e.mixins)),e.implements?.length&&(this.space(),this.word(`implements`),this.space(),this.printList(e.implements))),this.space(),this.print(e.body)}function Mj(e){let t=e.variance?.kind;t!=null&&(t===`plus`?this.tokenChar(43):t===`minus`&&this.tokenChar(45))}function Nj(e){this.word(`interface`),this.space(),jj.call(this,e)}function Pj(e){this.space(),this.token(`&`,!1,e),this.space()}function Fj(e){this.word(`interface`),e.extends?.length&&(this.space(),this.word(`extends`),this.space(),this.printList(e.extends)),this.space(),this.print(e.body)}function Ij(e){this.printJoin(e.types,void 0,void 0,Pj)}function Lj(){this.word(`mixed`)}function Rj(){this.word(`empty`)}function zj(e){this.tokenChar(63),this.print(e.typeAnnotation)}function Bj(){this.word(`number`)}function Vj(){this.word(`string`)}function Hj(){this.word(`this`)}function Uj(e){this.tokenChar(91),this.printList(e.types),this.tokenChar(93)}function Wj(e){this.word(`typeof`),this.space(),this.print(e.argument)}function Gj(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 Kj(e,t){this.tokenChar(58),this.space(),t.type===`ArrowFunctionExpression`?this.tokenContext|=8:e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)}function qj(e){this.tokenChar(60),this.printList(e.params),this.tokenChar(62)}function Jj(e){Mj.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 Yj(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 Xj(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 Zj(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 Qj(e){e.static&&(this.word(`static`),this.space()),this.print(e.value)}function $j(e){e.static&&(this.word(`static`),this.space()),Mj.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 eM(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()),Mj.call(this,e),this.print(e.key),e.optional&&this.tokenChar(63),e.method||(this.tokenChar(58),this.space()),this.print(e.value)}function tM(e){this.token(`...`),this.print(e.argument)}function nM(e){this.print(e.qualification),this.tokenChar(46),this.print(e.id)}function rM(){this.word(`symbol`)}function iM(e){this.space(),this.token(`|`,!1,e),this.space()}function aM(e){this.printJoin(e.types,void 0,void 0,iM)}function oM(e){this.tokenChar(40),this.print(e.expression),this.print(e.typeAnnotation),this.tokenChar(41)}function sM(e){e.kind===`plus`?this.tokenChar(43):this.tokenChar(45)}function cM(){this.word(`void`)}function lM(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)}function uM(e){this.print(e.objectType),e.optional&&this.token(`?.`),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)}const{isExportDefaultDeclaration:dM,isExportNamedDeclaration:fM}=yn;function pM(e,t){(!(dM(t)||fM(t))||!BD.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.superTypeArguments)),e.implements&&(this.space(),this.word(`implements`),this.space(),this.printList(e.implements)),this.space(),this.print(e.body)}function mM(e){if(this.tokenChar(123),e.body.length===0)this.tokenChar(125);else{let t=hM(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 hM(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 gM(e){if(this.printJoin(e.decorators),!e.static&&!this.format.preserveFormat){let t=e.key.loc?.end?.line;t&&this.catchUp(t)}oA.call(this,e),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(Mj.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){this.printJoin(e.decorators);let t=e.key.loc?.end?.line;t&&this.catchUp(t),oA.call(this,e),this.word(`accessor`,!0),this.space(),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(Mj.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 vM(e){this.printJoin(e.decorators),oA.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 yM(e){xM.call(this,e),this.space(),this.print(e.body)}function bM(e){xM.call(this,e),this.space(),this.print(e.body)}function xM(e,t=!0){if(t&&this.printJoin(e.decorators),!this.format.preserveFormat){let t=e.key.loc?.end?.line;t&&this.catchUp(t)}oA.call(this,e),FO.call(this,e)}function SM(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))}function CM(e){e.program&&this.print(e.program.interpreter),this.print(e.program)}function wM(e){this.printInnerComments(!1);let t=e.directives?.length;if(t){let n=e.body.length?2:1;this.printSequence(e.directives,void 0,void 0,n),e.directives[t-1].trailingComments?.length||this.newline(n)}this.printSequence(e.body)}function TM(e){this.tokenChar(123);let t=this.enterDelimited(),n=e.directives?.length;if(n){let t=e.body.length?2:1;this.printSequence(e.directives,!0,!0,t),e.directives[n-1].trailingComments?.length||this.newline(t)}this.printSequence(e.body,!0,!0),this._noLineTerminatorAfterNode=t,this.rightBrace(e)}function EM(e){this.print(e.value),this.semicolon()}const DM=/(?:^|[^\\])(?:\\\\)*'/,OM=/(?:^|[^\\])(?:\\\\)*"/;function kM(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.token(t);return}let{value:n}=e;if(!OM.test(n))this.token(`"${n}"`);else if(!DM.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 AM(e){this.token(`#!${e.value}`),this._newline()}function jM(e){this.token(`%%`),this.print(e.name),this.token(`%%`),e.expectedNode===`Statement`&&this.semicolon()}function MM(e){this.print(e.name),e.value&&(this.tokenChar(61),this.print(e.value))}function NM(e){this.word(e.name)}function PM(e){this.print(e.namespace),this.tokenChar(58),this.print(e.name)}function FM(e){this.print(e.object),this.tokenChar(46),this.print(e.property)}function IM(e){this.tokenChar(123),this.token(`...`),this.print(e.argument),this.rightBrace(e)}function LM(e){this.tokenChar(123),this.print(e.expression),this.rightBrace(e)}function RM(e){this.tokenChar(123),this.token(`...`),this.print(e.expression),this.rightBrace(e)}function zM(e){let t=this.getPossibleRaw(e);t===void 0?this.token(e.value,!0):this.token(t,!0)}function BM(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 VM(){this.space()}function HM(e){this.tokenChar(60),this.print(e.name),this.print(e.typeArguments),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,void 0,void 0,VM)),e.selfClosing&&(this.space(),this.tokenChar(47)),this.tokenChar(62)}function UM(e){this.tokenChar(60),this.tokenChar(47),this.print(e.name),this.tokenChar(62)}function WM(){this.printInnerComments()}function GM(e){this.print(e.openingFragment),this.indent();for(let t of e.children)this.print(t);this.dedent(),this.print(e.closingFragment)}function KM(){this.tokenChar(60),this.tokenChar(62)}function qM(){this.token(`</`),this.tokenChar(62)}const JM=Object.defineProperty({__proto__:null,AnyTypeAnnotation:ZA,ArgumentPlaceholder:PA,ArrayExpression:zA,ArrayPattern:zA,ArrayTypeAnnotation:QA,ArrowFunctionExpression:zO,AssignmentExpression:ZD,AssignmentPattern:XD,AwaitExpression:KD,BigIntLiteral:GA,BigIntLiteralTypeAnnotation:GA,BinaryExpression:QD,BindExpression:$D,BlockStatement:TM,BooleanLiteral:VA,BooleanLiteralTypeAnnotation:ej,BooleanTypeAnnotation:$A,BreakStatement:vO,CallExpression:WD,CatchClause:wO,ClassAccessorProperty:_M,ClassBody:mM,ClassDeclaration:pM,ClassExpression:pM,ClassImplements:Aj,ClassMethod:yM,ClassPrivateMethod:bM,ClassPrivateProperty:vM,ClassProperty:gM,ConditionalExpression:PD,ContinueStatement:yO,DebuggerStatement:DO,DeclareClass:nj,DeclareExportAllDeclaration:pj,DeclareExportDeclaration:fj,DeclareFunction:rj,DeclareInterface:oj,DeclareModule:sj,DeclareModuleExports:cj,DeclareOpaqueType:uj,DeclareTypeAlias:lj,DeclareVariable:dj,DeclaredPredicate:aj,Decorator:VD,Directive:EM,DirectiveLiteral:kM,DoExpression:jD,DoWhileStatement:gO,EmptyStatement:JD,EmptyTypeAnnotation:Rj,EnumBooleanBody:_j,EnumBooleanMember:Cj,EnumDeclaration:mj,EnumDefaultedMember:xj,EnumNumberBody:vj,EnumNumberMember:wj,EnumStringBody:yj,EnumStringMember:Tj,EnumSymbolBody:bj,ExistsTypeAnnotation:Dj,ExportAllDeclaration:xA,ExportDefaultDeclaration:wA,ExportDefaultSpecifier:_A,ExportNamedDeclaration:CA,ExportNamespaceSpecifier:yA,ExportSpecifier:vA,ExpressionStatement:YD,File:CM,ForInStatement:mO,ForOfStatement:hO,ForStatement:fO,FunctionDeclaration:RO,FunctionExpression:RO,FunctionTypeAnnotation:Oj,FunctionTypeParam:kj,GenericTypeAnnotation:Aj,Identifier:NA,IfStatement:uO,Import:GD,ImportAttribute:EA,ImportDeclaration:TA,ImportDefaultSpecifier:gA,ImportExpression:OA,ImportNamespaceSpecifier:DA,ImportSpecifier:hA,IndexedAccessType:lM,InferredPredicate:ij,InterfaceDeclaration:Nj,InterfaceExtends:Aj,InterfaceTypeAnnotation:Fj,InterpreterDirective:AM,IntersectionTypeAnnotation:Ij,JSXAttribute:MM,JSXClosingElement:UM,JSXClosingFragment:qM,JSXElement:BM,JSXEmptyExpression:WM,JSXExpressionContainer:LM,JSXFragment:GM,JSXIdentifier:NM,JSXMemberExpression:FM,JSXNamespacedName:PM,JSXOpeningElement:HM,JSXOpeningFragment:KM,JSXSpreadAttribute:IM,JSXSpreadChild:RM,JSXText:zM,LabeledStatement:SO,LogicalExpression:ZD,MemberExpression:eO,MetaProperty:tO,MixedTypeAnnotation:Lj,ModuleExpression:iO,NewExpression:ID,NullLiteral:HA,NullLiteralTypeAnnotation:tj,NullableTypeAnnotation:zj,NumberLiteralTypeAnnotation:UA,NumberTypeAnnotation:Bj,NumericLiteral:UA,ObjectExpression:IA,ObjectMethod:LA,ObjectPattern:IA,ObjectProperty:RA,ObjectTypeAnnotation:Xj,ObjectTypeCallProperty:Qj,ObjectTypeIndexer:$j,ObjectTypeInternalSlot:Zj,ObjectTypeProperty:eM,ObjectTypeSpreadProperty:tM,OpaqueType:Yj,OptionalCallExpression:UD,OptionalIndexedAccessType:uM,OptionalMemberExpression:HD,ParenthesizedExpression:MD,Placeholder:jM,PrivateName:nO,Program:wM,QualifiedTypeIdentifier:nM,RegExpLiteral:BA,RestElement:FA,ReturnStatement:bO,SequenceExpression:LD,SpreadElement:FA,StaticBlock:SM,StringLiteral:WA,StringLiteralTypeAnnotation:WA,StringTypeAnnotation:Vj,Super:zD,SwitchCase:EO,SwitchStatement:TO,SymbolTypeAnnotation:rM,TSAnyKeyword:nk,TSArrayType:Ck,TSAsExpression:Wk,TSBigIntKeyword:rk,TSBooleanKeyword:sk,TSCallSignatureDeclaration:YO,TSClassImplements:Bk,TSConditionalType:jk,TSConstructSignatureDeclaration:ZO,TSConstructorType:_k,TSDeclareFunction:KO,TSDeclareMethod:qO,TSEnumBody:Yk,TSEnumDeclaration:Jk,TSEnumMember:Xk,TSExportAssignment:rA,TSExternalModuleReference:tA,TSFunctionType:gk,TSImportEqualsDeclaration:eA,TSImportType:$k,TSIndexSignature:tk,TSIndexedAccessType:Fk,TSInferType:Mk,TSInstantiationExpression:qk,TSInterfaceBody:Hk,TSInterfaceDeclaration:Vk,TSInterfaceHeritage:Bk,TSIntersectionType:kk,TSIntrinsicKeyword:mk,TSLiteralType:zk,TSMappedType:Ik,TSMethodSignature:ek,TSModuleBlock:Qk,TSModuleDeclaration:Zk,TSNamedTupleMember:Dk,TSNamespaceExportDeclaration:iA,TSNeverKeyword:pk,TSNonNullExpression:nA,TSNullKeyword:fk,TSNumberKeyword:ak,TSObjectKeyword:ok,TSOptionalType:Tk,TSParameterProperty:GO,TSParenthesizedType:Nk,TSPropertySignature:QO,TSQualifiedName:JO,TSRestType:Ek,TSSatisfiesExpression:Gk,TSStringKeyword:ck,TSSymbolKeyword:lk,TSTemplateLiteralType:Rk,TSThisType:hk,TSTupleType:wk,TSTypeAliasDeclaration:Uk,TSTypeAnnotation:HO,TSTypeAssertion:Kk,TSTypeLiteral:Sk,TSTypeOperator:Pk,TSTypeParameter:WO,TSTypeParameterDeclaration:UO,TSTypeParameterInstantiation:UO,TSTypePredicate:bk,TSTypeQuery:xk,TSTypeReference:yk,TSUndefinedKeyword:dk,TSUnionType:Ok,TSUnknownKeyword:ik,TSVoidKeyword:uk,TaggedTemplateExpression:xD,TemplateElement:SD,TemplateLiteral:wD,ThisExpression:RD,ThisTypeAnnotation:Hj,ThrowStatement:xO,TopicReference:qA,TryStatement:CO,TupleTypeAnnotation:Uj,TypeAlias:Gj,TypeAnnotation:Kj,TypeCastExpression:oM,TypeParameter:Jj,TypeParameterDeclaration:qj,TypeParameterInstantiation:qj,TypeofTypeAnnotation:Wj,UnaryExpression:AD,UnionTypeAnnotation:aM,UpdateExpression:ND,V8IntrinsicIdentifier:rO,VariableDeclaration:kO,VariableDeclarator:AO,Variance:sM,VoidPattern:JA,VoidTypeAnnotation:cM,WhileStatement:pO,WithStatement:lO,YieldExpression:qD,_classMethodHead:xM,_functionHead:LO,_getRawIdentifier:MA,_interfaceish:jj,_methodHead:FO,_param:PO,_parameters:NO,_params:MO,_predicate:IO,_printAttributes:bA,_printTemplate:CD,_shouldPrintArrowParamsParens:BO,_shouldPrintDecoratorsBeforeExport:BD,_tsPrintClassMemberModifiers:oA,_variance:Mj},Symbol.toStringTag,{value:`Module`}),YM=new Map;let XM=0;for(let e of Object.keys(JM).sort())e.startsWith(`_`)||YM.set(e,[JM[e],XM++,void 0]);const{VISITOR_KEYS:ZM}=yn;for(let e of Object.keys(bD)){let t=bD[e];YM.has(e)&&(YM.get(e)[2]=t)}function QM(e){switch(e.type){case`CallExpression`:case`ImportExpression`:return!0;case`MemberExpression`:return QM(e.object)}return!1}function $M(e,t,n){switch(n){case 113:if(t.callee===e&&(QM(e)||e.type===`OptionalCallExpression`||e.type===`OptionalMemberExpression`))return!0;break;case 43:return!eN(e)&&!(e.type===`CallExpression`&&eN(e.callee))&&e.type!==`ParenthesizedExpression`}return!1}function eN(e){switch(e.type){case`Identifier`:return!0;case`MemberExpression`:return!e.computed&&e.property.type===`Identifier`&&eN(e.object);default:return!1}}function tN(e,t){let n=ZM[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}const{traverseFast:nN,VISITOR_KEYS:rN}=yn;var iN=class{_tokens;_source;_nodesToTokenIndexes=new Map;_nodesOccurrencesCountCache=new Map;_tokensCache=new Map;constructor(e,t,n){this._tokens=t,this._source=n,nN(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),r=t,i=aN(e);(e.type===`ExportNamedDeclaration`||e.type===`ExportDefaultDeclaration`)&&e.declaration?.type===`ClassDeclaration`&&i.next();let a=[];for(let e of i){if(e==null||e.start==null||e.end==null)continue;let t=this._findTokensOfNode(e,r,n),i=t.first;for(let e=r;e<i;e++)a.push(e);r=t.last+1}for(let e=r;e<=n;e++)a.push(e);return a}_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*aN(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=rN[e.type];for(let n of t){let t=e[n];t&&(Array.isArray(t)?yield*t:yield t)}}const{isExpression:oN,isFunction:sN,isStatement:cN,isClassBody:lN,isTSInterfaceBody:uN,isTSEnumMember:dN}=yn,fN=/e/i,pN=/\.0+$/,mN=/[\n\r\u2028\u2029]/,hN=/[\n\r\u2028\u2029]|\*\//;function gN(e){return e.type===`CommentLine`||mN.test(e.value)}var _N=class{constructor(e,t,n=null,r=null){this.format=e,this._tokens=n,this._originalCode=r,this._indentRepeat=e.indent.style.length,this._inputMap=t?._inputMap||null,this._buf=new LE(t,e.indent.style[0]);let{preserveFormat:i,compact:a,concise:o,retainLines:s,retainFunctionParens:c}=e;i&&(this._flags|=1),a&&(this._flags|=2),o&&(this._flags|=4),s&&(this._flags|=8),c&&(this._flags|=16),(e.auxiliaryCommentBefore||e.auxiliaryCommentAfter)&&(this._flags|=32)}enterDelimited(){let e=this._noLineTerminatorAfterNode;return e!==null&&(this._noLineTerminatorAfterNode=null),e}tokenContext=0;_tokens=null;_originalCode=null;_currentNode=null;_currentTypeId=null;_indent=0;_indentRepeat=0;_insideAux=!1;_noLineTerminator=!1;_noLineTerminatorAfterNode=null;_printAuxAfterOnNextUserNode=!1;_printedComments=new Set;_lastCommentLine=0;_innerCommentsState=0;_flags=0;tokenMap=null;_boundGetRawIdentifier=null;generate(e){return this.format.preserveFormat&&(this.tokenMap=new iN(e,this._tokens,this._originalCode),this._boundGetRawIdentifier=MA.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)}_printSemicolonBeforeNextNode=-1;_printSemicolonBeforeNextToken=-1;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&=128,this._maybePrintInnerComments(e);let n=this._flags;n&32&&this._maybeAddAuxComment(),n&1&&this._catchUpToCurrentToken(e);let r=this.getLastChar();(r===-2||r===-3||r===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)&&!fN.test(e)&&!pN.test(e)&&e.charCodeAt(e.length-1)!==46&&this.setLastChar(-2)}token(e,t=!1,n=0,r=!1){this.tokenContext&=128,this._maybePrintInnerComments(e,n);let i=this._flags;if(i&32&&this._maybeAddAuxComment(),i&1&&this._catchUpToCurrentToken(e,n),r){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&=128,this._maybePrintInnerComments(e,t);let n=this._flags;n&32&&this._maybeAddAuxComment(),n&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?.[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\v\f\uFEFF\p{Space_Separator}]/gu,` `):` `.repeat(i);this._append(e,!1),this.setLastChar(32)}}printTerminatorless(e){this._noLineTerminator=!0,this.print(e)}print(e,t=!1,n=!1,r){if(!e)return;this._innerCommentsState=0;let{type:i,loc:a,extra:o}=e,s=this._flags,c=!1;e._compact&&(this._flags|=4,c=!0);let l=YM.get(i);if(l===void 0)throw ReferenceError(`unknown node of type ${JSON.stringify(i)} with constructor ${JSON.stringify(e.constructor.name)}`);let[u,d,f]=l,p=this._currentNode,m=this._currentTypeId;this._currentNode=e,this._currentTypeId=d,s&1&&(this._printSemicolonBeforeNextToken=this._printSemicolonBeforeNextNode);let h;s&32&&(h=this._insideAux,this._insideAux=a==null,this._maybeAddAuxComment(this._insideAux&&!h));let g=0;n&&(g=this.tokenContext,g&128?this.tokenContext=0:g=0);let ee=o!=null&&o.parenthesized,te=ee&&s&1||ee&&s&16&&d===72||p&&($M(e,p,m)||f!=null&&f(e,p,m,this.tokenContext,s&1?this._boundGetRawIdentifier:void 0));if(!te&&ee&&e.leadingComments?.length&&e.leadingComments[0].type===`CommentBlock`)switch(m){case 66:case 241:case 6:case 141:break;case 18:case 131:case 113:if(p.callee!==e)break;default:te=!0}let _=!1;!te&&this._noLineTerminator&&(e.leadingComments?.some(gN)||s&8&&a&&a.start.line>this._buf.getCurrentLine())&&(te=!0,_=!0);let v;te||(t||=!!p&&this._noLineTerminatorAfterNode===p&&tN(p,e),t&&(e.trailingComments?.some(gN)?oN(e)&&(te=!0):(v=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=e))),te&&(this.tokenChar(40),_&&this.indent(),this._innerCommentsState=0,n||(g=this.tokenContext),g&128&&(this.tokenContext=0),v=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=null),this._printLeadingComments(e,p),this.exactSource(d===137||d===67?null:a,u.bind(this,e,p)),te?(this._printTrailingComments(e,p),_&&(this.dedent(),this.newline()),this.tokenChar(41),this._noLineTerminator=t):t&&!this._noLineTerminator?(this._noLineTerminator=!0,this._printTrailingComments(e,p)):this._printTrailingComments(e,p,r),g&&(this.tokenContext=g),this._currentNode=p,this._currentTypeId=m,c&&(this._flags=s),s&32&&(this._insideAux=h),v!=null&&(this._noLineTerminatorAfterNode=v),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?.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?.length&&this._printComments(2,r,e,t,n),i?.length?this._printComments(2,i,e,t,n):this._lastCommentLine=0}_printLeadingComments(e,t){let n=e.leadingComments;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?.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??vN,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&&hN.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)}_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,`
|
|
9
|
+
`)}if(this._flags&4)a=a.replace(/\n(?!$)/g,`
|
|
10
|
+
`);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,c=!!o,l=c?o.start.line:0,u=c?o.end.line:0,d=0,f=0,{_noLineTerminator:p,_flags:m}=this;for(let o=0;o<s;o++){let h=t[o],g=this._shouldPrintComment(h,a);if(g===2)return o===0?0:1;if(c&&h.loc&&g===1){let t=h.loc.start.line,n=h.loc.end.line;if(e===0){let e=0;if(o===0?this._buf.hasContent()&&(h.type===`CommentLine`||t!==n)&&(e=f=1):e=t-d,d=n,e>0&&!p&&this.newline(e,m),this._printComment(h,1),o+1===s){let e=Math.max(l-d,f);e>0&&!p&&this.newline(e,m),d=l}}else if(e===1){let e=t-(o===0?l:d);if(d=n,e>0&&!p&&this.newline(e,m),this._printComment(h,1),o+1===s){let e=Math.min(1,u-d);e>0&&!p&&this.newline(e,m),d=u}}else{let e=t-(o===0?u-i:d);d=n,e>0&&!p&&this.newline(e,m),this._printComment(h,1)}}else{if(c=!1,g!==1)continue;if(s===1){let t=h.loc?h.loc.start.line===h.loc.end.line:!mN.test(h.value),i=t&&!cN(n)&&!lN(r)&&!uN(r)&&!dN(n);e===0?this._printComment(h,i&&n.type!==`ObjectExpression`||t&&sN(r)&&r.body===n?1:0):i&&e===2?this._printComment(h,1):this._printComment(h,0)}else e===1&&!(n.type===`ObjectExpression`&&n.properties.length>1)&&n.type!==`ClassBody`&&n.type!==`TSInterfaceBody`?this._printComment(h,o===0?2:o===s-1?3:0):this._printComment(h,0)}}return e===2&&c&&d&&(this._lastCommentLine=d),2}};function vN(e,t){this.tokenChar(44,e),t||this.space()}function yN(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:{quotes:`double`,wrap:!0,minimal:!0,...t.jsescOption},topicToken:t.topicToken};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}function bN(e,t={},n){return new _N(yN(n,t,e),t.sourceMaps?new FE(t,n):null,e.tokens,typeof n==`string`?n:null).generate(e)}var xN=class{constructor(e,t,n){this.line=void 0,this.column=void 0,n!==void 0&&(this.index=void 0),this.line=e,this.column=t,n!==void 0&&(this.index=n)}},SN=class{start;end;filename;identifierName;constructor(e,t){this.start=e,this.end=t}};function CN(e,t){let{line:n,column:r,index:i}=e;return new xN(n,r+t,i+t)}const wN=`BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED`,TN={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:wN},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:wN}},EN={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`},DN=e=>e.type===`UpdateExpression`?EN.UpdateExpression[`${e.prefix}`]:EN[e.type],ON={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.`,DecoratorAbstractMethod:`Decorators can't be used with an abstract method.`,DecoratorArgumentsOutsideParentheses:`Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.`,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 { ... }'?`,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.`,ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArity:({phase:e})=>`\`import${e?`.${e}`:``}()\` requires exactly one or two arguments.`,ImportCallNotNewExpression:({phase:e})=>`Cannot use new with import${e?`.${e}`:``}().`,ImportCallSpreadArgument:({phase:e})=>`\`...\` is not allowed in \`import${e?`.${e}`:``}()\`.`,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.`,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 ${DN(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${DN(e)}.`,InvalidLhsOptionalChaining:({ancestor:e})=>`Invalid optional chaining in the left-hand side of ${DN(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.`,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.`,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}.`,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.`,SuperCallNotNewExpression:`Cannot use new with super(...).`,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.`,UnexpectedArgumentPlaceholder:`Unexpected argument placeholder.`,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.`,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.`},kN={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.`},AN={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)}\`.`},jN=new Set([`ArrowFunctionExpression`,`AssignmentExpression`,`ConditionalExpression`,`YieldExpression`]),MN={PipeTopicRequiresHackPipes:'Topic references are only supported when using the `"proposal": "hack"` version of the pipeline proposal.',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 ${DN({type:e})}; please wrap it in parentheses.`,PipelineUnparenthesized:`Cannot mix binary operator with solo-await F#-style pipeline. Please wrap the pipeline in parentheses.`},NN={UnsupportedBind:`Binding should be performed on object property.`,UnsupportedBindRHS:`The right-hand side of binding can not be super or import.`};function PN(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:n})}function FN({toMessage:e,code:t,reasonCode:n,syntaxPlugin:r}){let i=n===`MissingPlugin`||n===`MissingOneOfPlugins`;return function a(o,s,c){let l=SyntaxError();return l.code=t,l.reasonCode=n,l.loc=o,l.pos=s,l.syntaxPlugin=r,i&&(l.missingPlugin=c.missingPlugin),PN(l,`clone`,function(e={}){let{line:t,column:n,index:r=s}=e.loc??o;return a(new xN(t,n),r,{...c,...e.details})}),PN(l,`details`,c),Object.defineProperty(l,`message`,{configurable:!0,get(){let t=`${e(c)} (${o.line}:${o.column})`;return this.message=t,t},set(e){Object.defineProperty(this,`message`,{value:e,writable:!0})}}),l}}function IN(e,t){if(Array.isArray(e))return t=>IN(t,e[0]);let n={};for(let r of Object.keys(e)){let i=e[r],{message:a,...o}=typeof i==`string`?{message:()=>i}:typeof i==`function`?{message:i}:i;n[r]=FN({code:`BABEL_PARSER_SYNTAX_ERROR`,reasonCode:r,toMessage:typeof a==`string`?()=>a:a,...t?{syntaxPlugin:t}:{},...o})}return n}const U={...IN(TN),...IN(ON),...IN(kN),...IN(AN),...IN`pipelineOperator`(MN),...IN`functionBind`(NN)};function LN(){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,locations:!0,tokens:!1,createImportExpressions:!0,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function RN(e){let t=LN();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)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}function zN(e){let{start:t,end:n}=e.loc;return e.loc.start=new xN(t.line,t.column),e.loc.end=new xN(n.line,n.column),e}const BN=e=>class extends e{createPosition(e){return new xN(e.line,e.column)}parse(){let e=super.parse();return this.optionFlags&512&&(e.tokens=e.tokens.map(zN)),zN(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}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.finishNodeAtNode(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){return e.type===`ExpressionStatement`&&e.expression.type===`Literal`&&typeof e.expression.value==`string`&&!e.expression.extra?.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.convertPrivateNameToPrivateIdentifier(e)}convertPrivateNameToPrivateIdentifier(e){let t=super.getPrivateNameSV(e);return delete e.id,e.name=t,this.castNodeTo(e,`PrivateIdentifier`)}isPrivateName(e){return e.type===`PrivateIdentifier`}getPrivateNameSV(e){return e.name}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,this.hasPlugin(`typescript`)&&!s.body?`TSEmptyBodyFunctionExpression`:`FunctionExpression`),a===`ClassPrivateMethod`&&(e.computed=!1),this.hasPlugin(`typescript`)&&e.abstract?(delete e.abstract,this.finishNode(e,`TSAbstractMethodDefinition`)):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 t.abstract&&this.hasPlugin(`typescript`)?(delete t.abstract,this.castNodeTo(t,`TSAbstractPropertyDefinition`)):this.castNodeTo(t,`PropertyDefinition`),t}parseClassPrivateProperty(...e){let t=super.parseClassPrivateProperty(...e);return t.abstract&&this.hasPlugin(`typescript`)?this.castNodeTo(t,`TSAbstractPropertyDefinition`):this.castNodeTo(t,`PropertyDefinition`),t.computed=!1,t}parseClassAccessorProperty(e){let t=super.parseClassAccessorProperty(e);return 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.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(U.PatternHasAccessor,e.key):e.type===`Property`&&e.method?this.raise(U.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,delete n.arguments,delete n.callee):n.type===`OptionalCallExpression`?this.castNodeTo(n,`CallExpression`):n.optional=!1,n}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):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 zN(super.finishNodeAt(e,t,n))}finishNodeAtNode(e,t,n){return zN(super.finishNodeAtNode(e,t,n))}finishNode(e,t){let n=super.finishNode(e,t);return this.fillOptionalPropertiesForTSESLint(n),n}resetStartLocation(e,t){super.resetStartLocation(e,t),zN(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),zN(e)}};var VN=class{label;keyword;beforeExpr;startsExpr;rightAssociative;isLoop;isAssign;prefix;postfix;binop;constructor(e,t={}){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}};const HN=new Map;function W(e,t={}){t.keyword=e;let n=G(e,t);return HN.set(e,n),n}function UN(e,t){return G(e,{beforeExpr:!0,binop:t})}let WN=-1;const GN=[],KN=[],qN=[],JN=[],YN=[],XN=[];function G(e,t={}){return++WN,KN.push(e),qN.push(t.binop??-1),JN.push(t.beforeExpr??!1),YN.push(t.startsExpr??!1),XN.push(t.prefix??!1),GN.push(new VN(e,t)),WN}function K(e,t={}){return++WN,HN.set(e,WN),KN.push(e),qN.push(t.binop??-1),JN.push(t.beforeExpr??!1),YN.push(t.startsExpr??!1),XN.push(t.prefix??!1),GN.push(new VN(`name`,t)),WN}const ZN={bracketL:G(`[`,{beforeExpr:!0,startsExpr:!0}),bracketR:G(`]`),braceL:G(`{`,{beforeExpr:!0,startsExpr:!0}),braceBarL:G(`{|`,{beforeExpr:!0,startsExpr:!0}),braceR:G(`}`),braceBarR:G(`|}`),parenL:G(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:G(`)`),comma:G(`,`,{beforeExpr:!0}),semi:G(`;`,{beforeExpr:!0}),colon:G(`:`,{beforeExpr:!0}),doubleColon:G(`::`,{beforeExpr:!0}),dot:G(`.`),question:G(`?`,{beforeExpr:!0}),questionDot:G(`?.`),arrow:G(`=>`,{beforeExpr:!0}),template:G(`template`),ellipsis:G(`...`,{beforeExpr:!0}),backQuote:G("`",{startsExpr:!0}),dollarBraceL:G("${",{beforeExpr:!0,startsExpr:!0}),templateTail:G("...`",{startsExpr:!0}),templateNonTail:G("...${",{beforeExpr:!0,startsExpr:!0}),at:G(`@`),hash:G(`#`,{startsExpr:!0}),interpreterDirective:G(`#!...`),eq:G(`=`,{beforeExpr:!0,isAssign:!0}),assign:G(`_=`,{beforeExpr:!0,isAssign:!0}),slashAssign:G(`_=`,{beforeExpr:!0,isAssign:!0}),xorAssign:G(`_=`,{beforeExpr:!0,isAssign:!0}),moduloAssign:G(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:G(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),bang:G(`!`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),tilde:G(`~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),doubleCaret:G(`^^`,{startsExpr:!0}),doubleAt:G(`@@`,{startsExpr:!0}),pipeline:UN(`|>`,0),nullishCoalescing:UN(`??`,1),logicalOR:UN(`||`,1),logicalAND:UN(`&&`,2),bitwiseOR:UN(`|`,3),bitwiseXOR:UN(`^`,4),bitwiseAND:UN(`&`,5),equality:UN(`==/!=/===/!==`,6),lt:UN(`</>/<=/>=`,7),gt:UN(`</>/<=/>=`,7),relational:UN(`</>/<=/>=`,7),bitShift:UN(`<</>>/>>>`,8),bitShiftL:UN(`<</>>/>>>`,8),bitShiftR:UN(`<</>>/>>>`,8),plusMin:G(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:G(`%`,{binop:10,startsExpr:!0}),star:G(`*`,{binop:10}),slash:UN(`/`,10),exponent:G(`**`,{beforeExpr:!0,binop:11,rightAssociative:!0}),_in:W(`in`,{beforeExpr:!0,binop:7}),_instanceof:W(`instanceof`,{beforeExpr:!0,binop:7}),_break:W(`break`),_case:W(`case`,{beforeExpr:!0}),_catch:W(`catch`),_continue:W(`continue`),_debugger:W(`debugger`),_default:W(`default`,{beforeExpr:!0}),_else:W(`else`,{beforeExpr:!0}),_finally:W(`finally`),_function:W(`function`,{startsExpr:!0}),_if:W(`if`),_return:W(`return`,{beforeExpr:!0}),_switch:W(`switch`),_throw:W(`throw`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_try:W(`try`),_var:W(`var`),_const:W(`const`),_with:W(`with`),_new:W(`new`,{beforeExpr:!0,startsExpr:!0}),_this:W(`this`,{startsExpr:!0}),_super:W(`super`,{startsExpr:!0}),_class:W(`class`,{startsExpr:!0}),_extends:W(`extends`,{beforeExpr:!0}),_export:W(`export`),_import:W(`import`,{startsExpr:!0}),_null:W(`null`,{startsExpr:!0}),_true:W(`true`,{startsExpr:!0}),_false:W(`false`,{startsExpr:!0}),_typeof:W(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:W(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:W(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_do:W(`do`,{isLoop:!0,beforeExpr:!0}),_for:W(`for`,{isLoop:!0}),_while:W(`while`,{isLoop:!0}),_as:K(`as`,{startsExpr:!0}),_assert:K(`assert`,{startsExpr:!0}),_async:K(`async`,{startsExpr:!0}),_await:K(`await`,{startsExpr:!0}),_defer:K(`defer`,{startsExpr:!0}),_from:K(`from`,{startsExpr:!0}),_get:K(`get`,{startsExpr:!0}),_let:K(`let`,{startsExpr:!0}),_meta:K(`meta`,{startsExpr:!0}),_of:K(`of`,{startsExpr:!0}),_sent:K(`sent`,{startsExpr:!0}),_set:K(`set`,{startsExpr:!0}),_source:K(`source`,{startsExpr:!0}),_static:K(`static`,{startsExpr:!0}),_using:K(`using`,{startsExpr:!0}),_yield:K(`yield`,{startsExpr:!0}),_asserts:K(`asserts`,{startsExpr:!0}),_checks:K(`checks`,{startsExpr:!0}),_exports:K(`exports`,{startsExpr:!0}),_global:K(`global`,{startsExpr:!0}),_implements:K(`implements`,{startsExpr:!0}),_intrinsic:K(`intrinsic`,{startsExpr:!0}),_infer:K(`infer`,{startsExpr:!0}),_is:K(`is`,{startsExpr:!0}),_mixins:K(`mixins`,{startsExpr:!0}),_proto:K(`proto`,{startsExpr:!0}),_require:K(`require`,{startsExpr:!0}),_satisfies:K(`satisfies`,{startsExpr:!0}),_keyof:K(`keyof`,{startsExpr:!0}),_readonly:K(`readonly`,{startsExpr:!0}),_unique:K(`unique`,{startsExpr:!0}),_abstract:K(`abstract`,{startsExpr:!0}),_declare:K(`declare`,{startsExpr:!0}),_enum:K(`enum`,{startsExpr:!0}),_module:K(`module`,{startsExpr:!0}),_namespace:K(`namespace`,{startsExpr:!0}),_interface:K(`interface`,{startsExpr:!0}),_type:K(`type`,{startsExpr:!0}),_opaque:K(`opaque`,{startsExpr:!0}),name:G(`name`,{startsExpr:!0}),placeholder:G(`%%`,{startsExpr:!0}),string:G(`string`,{startsExpr:!0}),num:G(`num`,{startsExpr:!0}),bigint:G(`bigint`,{startsExpr:!0}),regexp:G(`regexp`,{startsExpr:!0}),privateName:G(`#name`,{startsExpr:!0}),eof:G(`eof`),jsxName:G(`jsxName`),jsxText:G(`jsxText`,{beforeExpr:!0}),jsxTagStart:G(`jsxTagStart`,{startsExpr:!0}),jsxTagEnd:G(`jsxTagEnd`)};function q(e){return e>=89&&e<=129}function QN(e){return e<=88}function $N(e){return e>=54&&e<=129}function eP(e){return e>=54&&e<=132}function tP(e){return JN[e]}function nP(e){return YN[e]}function rP(e){return e>=25&&e<=29}function iP(e){return e>=125&&e<=127}function aP(e){return e>=86&&e<=88}function oP(e){return e>=54&&e<=88}function sP(e){return e>=35&&e<=55}function cP(e){return e===30}function lP(e){return XN[e]}function uP(e){return e>=117&&e<=119}function dP(e){return e>=120&&e<=126}function fP(e){return KN[e]}function pP(e){return qN[e]}function mP(e){return e===53}function hP(e){return e>=20&&e<=21}function gP(e){return GN[e]}var _P=class{constructor(e,t){this.token=e,this.preserveSpace=!!t}token;preserveSpace};const J={brace:new _P(`{`),j_oTag:new _P(`<tag`),j_cTag:new _P(`</tag`),j_expr:new _P(`<tag>...</tag>`,!0)},vP=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,yP=RegExp(`[`+vP+`]`),bP=RegExp(`[`+vP+`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]`),xP=[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],SP=[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 CP(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 wP(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&yP.test(String.fromCharCode(e)):CP(e,xP)}function TP(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&&bP.test(String.fromCharCode(e)):CP(e,xP)||CP(e,SP)}const EP={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`]},DP=new Set(EP.keyword),OP=new Set(EP.strict),kP=new Set(EP.strictBind);function AP(e,t){return t&&e===`await`||e===`enum`}function jP(e,t){return AP(e,t)||OP.has(e)}function MP(e){return kP.has(e)}function NP(e,t){return jP(e,t)||MP(e)}function PP(e){return DP.has(e)}function FP(e,t,n){return e===64&&t===64&&wP(n)}const IP=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 LP(e){return IP.has(e)}var RP=class{flags=0;names=new Map;firstLexicalName=``;constructor(e){this.flags=e}},zP=class{parser;scopeStack=[];inModule;undefinedExports=new Map;constructor(e,t){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&3779)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 RP(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&3715));--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(U.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.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&3715)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&3779&&!(t&4))return t}}},BP=class extends RP{declareFunctions=new Set},VP=class extends zP{createScope(e){return new BP(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)}};const HP=new Set([`_`,`any`,`bool`,`boolean`,`empty`,`extends`,`false`,`interface`,`mixed`,`null`,`number`,`static`,`string`,`true`,`typeof`,`void`]),Y=IN`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.",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:{message:`A binding pattern parameter cannot be optional in an implementation signature.`},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 UP(e){return e.type===`DeclareExportAllDeclaration`||e.type===`DeclareExportDeclaration`&&(!e.declaration||e.declaration.type!==`TypeAlias`&&e.declaration.type!==`InterfaceDeclaration`)}function WP(e){return e.importKind===`type`||e.importKind===`typeof`}const GP={const:`declare export var`,let:`declare export var`,type:`export type`,interface:`export interface`};function KP(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]}const qP=/\*?\s*@((?:no)?flow)\b/,JP=e=>class extends e{flowPragma=void 0;getScopeHandler(){return VP}shouldParseTypes(){return this.getPluginOption(`flow`,`all`)||this.flowPragma===`flow`}finishToken(e,t){e!==130&&e!==9&&e!==24&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(this.flowPragma===void 0){let t=qP.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||10);let n=this.flowParseType();return this.state.inType=t,n}flowParsePredicate(){let e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(106),this.state.lastTokStartLoc.index>t.index+1&&this.raise(Y.UnexpectedSpaceBetweenModuloChecks,t),this.eat(6)?(e.value=super.parseExpression(),this.expect(7),this.finishNode(e,`DeclaredPredicate`)):this.finishNode(e,`InferredPredicate`)}flowParseTypeAndPredicateInitialiser(e){let t=this.state.inType;this.state.inType=!0,this.expect(10);let n=null,r=null;return e&&this.match(50)?(this.state.inType=t,r=this.flowParsePredicate()):(n=this.flowParseType(),this.state.inType=t,this.match(50)&&(r=this.flowParsePredicate())),[n,r]}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(43)?n.typeParameters=this.flowParseTypeParameterDeclaration():n.typeParameters=null,this.expect(6);let i=this.flowParseFunctionTypeParams();return n.params=i.params,n.rest=i.rest,n.this=i._this,this.expect(7),[n.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(!1),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.start),this.finishNode(e,`DeclareFunction`)}flowParseDeclare(e,t){if(this.match(76))return this.flowParseDeclareClass(e);if(this.match(64))return this.flowParseDeclareFunction(e);if(this.match(70))return this.flowParseDeclareVariable(e);if(this.eatContextual(123))return this.match(12)?this.flowParseDeclareModuleExports(e):(t&&this.raise(Y.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(126))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(127))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(125))return this.flowParseDeclareInterface(e);if(this.match(78))return this.flowParseDeclareExportDeclaration(e,t);throw this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.scope.declareName(e.id.name,5,e.id.start),this.semicolon(),this.finishNode(e,`DeclareVariable`)}flowParseDeclareModule(e){this.scope.enter(0),this.match(130)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let t=this.startNode(),n=t.body=[];for(this.expect(2);!this.match(4);){let e=this.startNode();this.match(79)?(this.next(),!this.isContextual(126)&&!this.match(83)&&this.raise(Y.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),n.push(super.parseImport(e))):(this.expectContextual(121,Y.UnsupportedStatementInDeclareModule),n.push(this.flowParseDeclare(e,!0)))}this.scope.exit(),this.expect(4),e.body=this.finishNode(t,`BlockStatement`);let r=null,i=!1;return n.forEach(e=>{UP(e)?(r===`CommonJS`&&this.raise(Y.AmbiguousDeclareModuleKind,e),r=`ES`):e.type===`DeclareModuleExports`&&(i&&this.raise(Y.DuplicateDeclareModuleExports,e),r===`ES`&&this.raise(Y.AmbiguousDeclareModuleKind,e),r=`CommonJS`,i=!0)}),e.kind=r||`CommonJS`,this.finishNode(e,`DeclareModule`)}flowParseDeclareExportDeclaration(e,t){if(this.expect(78),this.eat(61))return this.match(64)||this.match(76)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,`DeclareExportDeclaration`);if(this.match(71)||this.isLet()||(this.isContextual(126)||this.isContextual(125))&&!t){let e=this.state.value;throw this.raise(Y.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:e,suggestion:GP[e]})}if(this.match(70)||this.match(64)||this.match(76)||this.isContextual(127))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,`DeclareExportDeclaration`);if(this.match(51)||this.match(2)||this.isContextual(125)||this.isContextual(126)||this.isContextual(127)){let t=this.parseExport(e,null);return t.type===`ExportNamedDeclaration`?(t.default=!1,delete t.exportKind,this.castNodeTo(t,`DeclareExportDeclaration`)):this.castNodeTo(t,`DeclareExportAllDeclaration`)}throw this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(107),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){return this.next(),this.flowParseOpaqueType(e,!0)}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.start),this.match(43)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(77))do e.extends.push(this.flowParseInterfaceExtends());while(!t&&this.eat(8));if(t){let t=[],n=[];if(this.eatContextual(113))do n.push(this.flowParseInterfaceExtends());while(this.eat(8));if(this.eatContextual(109))do t.push(this.flowParseClassImplements());while(this.eat(8));e.implements=t,e.mixins=n}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(43)?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(Y.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,t,n){HP.has(e)&&this.raise(n?Y.AssignReservedType:Y.UnexpectedReservedType,t,{reservedType:e})}flowParseRestrictedIdentifierName(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifierName(e)}flowParseRestrictedIdentifier(e,t){let n=this.startNode(),r=this.flowParseRestrictedIdentifierName(e,t);return this.createIdentifier(n,r)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.start),this.match(43)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(25),this.semicolon(),this.finishNode(e,`TypeAlias`)}flowParseOpaqueType(e,t){return this.expectContextual(126),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.start),this.match(43)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(10)&&(e.supertype=this.flowParseTypeInitialiser(10)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(25)),this.semicolon(),this.finishNode(e,t?`DeclareOpaqueType`:`OpaqueType`)}flowParseTypeParameterBound(){if(this.match(10)||this.isContextual(77)){let e=this.startNode();return this.next(),e.typeAnnotation=this.flowParseType(),this.finishNode(e,`TypeAnnotation`)}}flowParseTypeParameter(e=!1){let t=this.state.startLoc,n=this.startNode(),r=this.flowParseVariance();return n.name=this.flowParseRestrictedIdentifierName(),n.variance=r,n.bound=this.flowParseTypeParameterBound(),this.match(25)?(this.eat(25),n.default=this.flowParseType()):e&&this.raise(Y.MissingTypeParamDefault,t),this.finishNode(n,`TypeParameter`)}flowParseTypeParameterDeclaration(){let e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(43)||this.match(138)?this.next():this.unexpected();let n=!1;do{let e=this.flowParseTypeParameter(n);t.params.push(e),e.default&&(n=!0),this.match(44)||this.expect(8)}while(!this.match(44));return this.expect(44),this.state.inType=e,this.finishNode(t,`TypeParameterDeclaration`)}flowInTopLevelContext(e){if(this.curContext()!==J.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()===43)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let e=this.startNode(),t=this.state.inType;return this.state.inType=!0,e.params=[],this.flowInTopLevelContext(()=>{this.expect(43);let t=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(44);)e.params.push(this.flowParseType()),this.match(44)||this.expect(8);this.state.noAnonFunctionType=t}),this.state.inType=t,!this.state.inType&&this.curContext()===J.brace&&this.reScan_lt_gt(),this.expect(44),this.finishNode(e,`TypeParameterInstantiation`)}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==43)return null;let e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(43);!this.match(44);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(44)||this.expect(8);return this.expect(44),this.state.inType=t,this.finishNode(e,`TypeParameterInstantiation`)}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(125),e.extends=[],this.eat(77))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(8));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,`InterfaceTypeAnnotation`)}flowParseObjectPropertyKey(){return this.match(131)||this.match(130)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,n){return e.static=t,this.lookahead().type===10?(e.id=this.parseIdentifier(!0),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(1),e.value=this.flowParseTypeInitialiser(),e.variance=n,this.finishNode(e,`ObjectTypeIndexer`)}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.parseIdentifier(!0),this.expect(1),this.expect(1),this.match(43)||this.match(6)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAtNode(e))):(e.method=!1,this.eat(13)&&(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(43)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(6),this.match(74)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(7)||this.expect(8));!this.match(7)&&!this.match(17);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(7)||this.expect(8);return this.eat(17)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(7),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(3)?(this.expect(3),s=5,c=!0):(this.expect(2),s=4,c=!1),o.exact=c;!this.match(s);){let t=!1,a=null,s=null,u=this.startNode();if(r&&this.isContextual(114)){let t=this.lookahead();t.type!==10&&t.type!==13&&(this.next(),a=this.state.startLoc,e=!1)}if(e&&this.isContextual(102)){let e=this.lookahead();e.type!==10&&e.type!==13&&(this.next(),t=!0)}let d=this.flowParseVariance();if(this.eat(0))a!=null&&this.unexpected(a),this.eat(0)?(d&&this.unexpected(d.start),o.internalSlots.push(this.flowParseObjectTypeInternalSlot(u,t))):o.indexers.push(this.flowParseObjectTypeIndexer(u,t,d));else if(this.match(6)||this.match(43))a!=null&&this.unexpected(a),d&&this.unexpected(d.start),o.callProperties.push(this.flowParseObjectTypeCallProperty(u,t));else{let e=`init`;(this.isContextual(95)||this.isContextual(100))&&eP(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(4)&&!this.match(5)&&this.raise(Y.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(17))return this.match(8)||this.match(9)||this.match(4)||this.match(5)?(a?o||this.raise(Y.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Y.InexactInsideNonObject,this.state.lastTokStartLoc),r&&this.raise(Y.InexactVariance,r),null):(a||this.raise(Y.UnexpectedSpreadType,this.state.lastTokStartLoc),n!=null&&this.unexpected(n),r&&this.raise(Y.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(43)||this.match(6)?(e.method=!0,n!=null&&this.unexpected(n),r&&this.unexpected(r.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAtNode(e)),i===`get`||i===`set`?this.flowCheckGetterSetterParams(e):!t&&!a&&e.key.name===`constructor`&&e.value.this&&this.raise(Y.ThisParamBannedInConstructor,e.value.this)):(i!==`init`&&this.unexpected(),e.method=!1,this.eat(13)&&(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,r=n.params.length+ +!!n.rest;n.this&&this.raise(e.kind===`get`?Y.GetterMayNotHaveThisParam:Y.SetterMayNotHaveThisParam,n.this),r!==t&&this.raise(e.kind===`get`?U.BadGetterArity:U.BadSetterArity,e),e.kind===`set`&&n.rest&&this.raise(U.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(9)&&!this.eat(8)&&!this.match(4)&&!this.match(5)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){e??=this.state.startLoc;let n=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(12);){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(43)&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,`GenericTypeAnnotation`)}flowParseTypeofType(){let e=this.startNode();return this.expect(83),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(1)&&(e.types.push(this.flowParseType()),!this.match(1));)this.expect(8);return this.expect(1),this.finishNode(e,`TupleTypeAnnotation`)}flowParseFunctionTypeParam(e){let t=null,n=!1,r,i=this.startNode(),a=this.lookahead(),o=this.state.type===74;return a.type===10||a.type===13?(o&&!e&&this.raise(Y.ThisParamMustBeFirst,i),t=this.parseIdentifier(o),this.eat(13)&&(n=!0,o&&this.raise(Y.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.startNodeAtNode(e);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,`FunctionTypeParam`)}flowParseFunctionTypeParams(e=[]){let t=null,n=null;for(this.match(74)&&(n=this.flowParseFunctionTypeParam(!0),n.name=null,this.match(7)||this.expect(8));!this.match(7)&&!this.match(17);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(7)||this.expect(8);return this.eat(17)&&(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 2:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 3: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 43:{let e=this.startNode();return e.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(6),n=this.flowParseFunctionTypeParams(),e.params=n.params,e.rest=n.rest,e.this=n._this,this.expect(7),this.expect(15),e.returnType=this.flowParseType(),this.finishNode(e,`FunctionTypeAnnotation`)}case 6:{let e=this.startNode();if(this.next(),!this.match(7)&&!this.match(17))if(q(this.state.type)||this.match(74)){let e=this.lookahead().type;i=e!==13&&e!==10}else i=!0;if(i){if(this.state.noAnonFunctionType=!1,r=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(8)||this.match(7)&&this.lookahead().type===15))return this.expect(7),r;this.eat(8)}return n=r?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(r)]):this.flowParseFunctionTypeParams(),e.params=n.params,e.rest=n.rest,e.this=n._this,this.expect(7),this.expect(15),e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,`FunctionTypeAnnotation`)}case 130:return this.parseLiteral(this.state.value,`StringLiteralTypeAnnotation`);case 81:case 82:return t.value=this.match(81),this.next(),this.finishNode(t,`BooleanLiteralTypeAnnotation`);case 49:if(this.state.value===`-`){if(this.next(),this.match(131))return this.parseLiteralAtNode(-this.state.value,`NumberLiteralTypeAnnotation`,t);if(this.match(132))return this.parseLiteralAtNode(-this.state.value,`BigIntLiteralTypeAnnotation`,t);throw this.raise(Y.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 131:return this.parseLiteral(this.state.value,`NumberLiteralTypeAnnotation`);case 132:return this.parseLiteral(this.state.value,`BigIntLiteralTypeAnnotation`);case 84:return this.next(),this.finishNode(t,`VoidTypeAnnotation`);case 80:return this.next(),this.finishNode(t,`NullLiteralTypeAnnotation`);case 74:return this.next(),this.finishNode(t,`ThisTypeAnnotation`);case 51:return this.next(),this.finishNode(t,`ExistsTypeAnnotation`);case 83:return this.flowParseTypeofType();default:if(oP(this.state.type)){let e=fP(this.state.type);return this.next(),super.createIdentifier(t,e)}else if(q(this.state.type))return this.isContextual(125)?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(14))&&!this.canInsertSemicolon();){let r=this.startNodeAt(e),i=this.eat(14);n||=i,this.expect(0),!i&&this.match(1)?(r.elementType=t,this.next(),t=this.finishNode(r,`ArrayTypeAnnotation`)):(r.objectType=t,r.indexType=this.flowParseType(),this.expect(1),n?(r.optional=i,t=this.finishNode(r,`OptionalIndexedAccessType`)):t=this.finishNode(r,`IndexedAccessType`))}return t}flowParsePrefixType(){let e=this.startNode();return this.eat(13)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,`NullableTypeAnnotation`)):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(15)){let t=this.startNodeAtNode(e);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(41);let t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(41);)e.types.push(this.flowParseAnonFunctionWithoutParens());return e.types.length===1?t:this.finishNode(e,`IntersectionTypeAnnotation`)}flowParseUnionType(){let e=this.startNode();this.eat(39);let t=this.flowParseIntersectionType();for(e.types=[t];this.eat(39);)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===128&&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(){let e=this.startNode(),t=this.parseIdentifierName();return this.match(10)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.createIdentifier(e,t)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocationFromNode(e.expression,e.typeAnnotation),e.expression}flowParseVariance(){let e=null;return this.match(49)?(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(10)){let n=this.startNode();t===`FunctionDeclaration`||t===`FunctionExpression`||t===`ArrowFunctionExpression`?[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(!0):n.typeAnnotation=this.flowParseTypeInitialiser(),e.returnType=n.typeAnnotation?this.finishNode(n,`TypeAnnotation`):null}return super.parseFunctionBodyAndFinish(e,t,n)}parseStatementLike(e){if(this.state.strict&&this.isContextual(125)){if($N(this.lookahead().type)){let e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.isContextual(122)){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(76)||q(this.state.type)||this.match(64)||this.match(70)||this.match(78))return this.flowParseDeclare(e)}else if(q(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===122||iP(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return e===122||iP(e)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(122)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,n){if(!this.match(13))return e;if(n!=null){let t=this.lookaheadCharCode();if(t===44||t===61||t===58||t===41)return this.setOptionalParametersError(n),e}this.expect(13);let r=this.state.clone(),i=this.state.noArrowAt,a=this.startNodeAt(t),{consequent:o,failed:s}=this.tryParseConditionalConsequent(),c=this.getArrowLikeExpressions(o),l=c[0],u=c[1];if(s||u.length>0){let e=[...i];if(u.length>0){this.state=r,this.state.noArrowAt=e;for(let t=0;t<u.length;t++)e.push(u[t].start);({consequent:o,failed:s}=this.tryParseConditionalConsequent()),[l]=this.getArrowLikeExpressions(o)}s&&l.length>1&&this.raise(Y.AmbiguousConditionalArrow,r.startLoc),s&&l.length===1&&(this.state=r,e.push(l[0].start),this.state.noArrowAt=e,{consequent:o}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(o,!0),this.state.noArrowAt=i,this.expect(10),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(10);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,[]]):KP(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(13)&&(n.optional=!0,this.resetEndLocation(e)),this.match(10)){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(126)){e.exportKind=`type`;let t=this.startNode();return this.next(),this.match(2)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}else if(this.isContextual(127)){e.exportKind=`type`;let t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}else if(this.isContextual(125)){e.exportKind=`type`;let t=this.startNode();return this.next(),this.flowParseInterface(t)}else if(this.isContextual(122)){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(126)&&this.lookahead().type===51?(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){if((!t||n)&&this.isContextual(109)){e.id=null;return}super.parseClassId(e,t,n),this.match(43)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,n){let{startLoc:r}=this.state;if(this.isContextual(121)){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(Y.DeclareClassElement,r):t.value&&this.raise(Y.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(U.InvalidIdentifier,this.state.curPosition(),{identifierName:t}),this.finishToken(128,t)}getTokenFromCode(e){let t=this.input.charCodeAt(this.state.pos+1);e===123&&t===124?this.finishOp(3,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?44:43,1):this.state.inType&&e===63?t===46?this.finishOp(14,2):this.finishOp(13,1):FP(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)}toAssignableListItem(e,t,n){let r=e[t];r.type===`TypeCastExpression`&&(e[t]=this.typeCastToParameter(r)),super.toAssignableListItem(e,t,n)}toReferencedList(e,t){for(let n=0;n<e.length;n++){let r=e[n];r?.type===`TypeCastExpression`&&!r.extra?.parenthesized&&(e.length>1||!t)&&this.raise(Y.TypeCastInPattern,r.typeAnnotation)}return e}parseArrayLike(e,t){let n=super.parseArrayLike(e,t);return n.type===`ArrayExpression`&&this.toReferencedList(n.elements),n}isValidLVal(e,t,n,r){return e===`TypeCastExpression`||super.isValidLVal(e,t,n,r)}parseClassProperty(e){return this.match(10)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(10)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(43)||super.isClassMethod()}isClassProperty(){return this.match(10)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(10)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,n,r,i,a){if(t.variance&&this.unexpected(t.variance.start),delete t.variance,this.match(43)&&(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(Y.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(Y.ThisParamBannedInConstructor,t)}}pushClassPrivateMethod(e,t,n,r){t.variance&&this.unexpected(t.variance.start),delete t.variance,this.match(43)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,n,r)}flowParseClassImplements(){let e=this.startNode();return e.id=this.flowParseRestrictedIdentifier(!0),this.match(43)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,`ClassImplements`)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.match(43)||this.match(47))&&(e.superTypeArguments=this.flowParseTypeParameterInstantiationInExpression()),this.eatContextual(109)){let t=e.implements=[];do t.push(this.flowParseClassImplements());while(this.eat(8))}}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(Y.GetterMayNotHaveThisParam,n):this.isThisParam(n)&&this.raise(Y.SetterMayNotHaveThisParam,n)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,n,r,i,a,o){e.variance&&this.unexpected(e.variance.start),delete e.variance;let s;this.match(43)&&!a&&(s=this.flowParseTypeParameterDeclaration(),this.match(6)||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(13)&&(e.type!==`Identifier`&&this.raise(Y.PatternIsOptional,e),this.isThisParam(e)&&this.raise(Y.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(10)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(Y.ThisParamAnnotationRequired,e),this.match(25)&&this.isThisParam(e)&&this.raise(Y.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(Y.TypeBeforeInitializer,n.typeAnnotation),n}parseImportSpecifierLocal(e,t,n){t.local=WP(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(126)){if(!e)return!0;let t=this.lookaheadCharCode();return t===123||t===42}return!e&&this.isContextual(83)}applyImportPhase(e,t,n,r){if(super.applyImportPhase(e,t,n,r),t){if(!n&&this.match(61))return;e.exportKind=n===`type`?n:`value`}else n===`type`&&this.match(51)&&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(89)&&!this.isLookaheadContextual(`as`)){let t=this.parseIdentifier(!0);o!==null&&!$N(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&&$N(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=o;else{if(t)throw this.raise(U.ImportBindingIsString,e,{importName:a.value});e.imported=a,e.importKind=null}this.eatContextual(89)?e.local=this.parseIdentifier():(s=!0,e.local=this.cloneIdentifier(e.imported))}let c=WP(e);return n&&c&&this.raise(Y.ImportTypeShorthandOnlyInPureImport,e),(n||c)&&this.checkReservedType(e.local.name,e.local.start,!0),s&&!n&&!c&&this.checkReservedWord(e.local.name,e.start,!0,!0),this.finishImportSpecifier(e,`ImportSpecifier`)}parseBindingAtom(){switch(this.state.type){case 74:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(e,t){let n=e.kind;n!==`get`&&n!==`set`&&this.match(43)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(10)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(10)){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(10)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){let n=null,r;if(this.hasPlugin(`jsx`)&&(this.match(138)||this.match(43))){if(n=this.state.clone(),r=this.tryParse(()=>super.parseMaybeAssign(e,t),n),!r.error)return r.node;let{context:i}=this.state,a=i[i.length-1];(a===J.j_oTag||a===J.j_expr)&&i.pop()}if(r?.error||this.match(43)){n||=this.state.clone();let i,a=this.tryParse(n=>{i=this.flowParseTypeParameterDeclaration();let r=this.forwardNoArrowParamsConversionAt(i,()=>{let n=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(n,i),n});r.extra?.parenthesized&&n();let a=this.maybeUnwrapTypeCastExpression(r);return a.type!==`ArrowFunctionExpression`&&n(),a.typeParameters=i,this.resetStartLocationFromNode(a,i),r},n),o=null;if(a.node&&this.maybeUnwrapTypeCastExpression(a.node).type===`ArrowFunctionExpression`){if(!a.error&&!a.aborted)return a.node.async&&this.raise(Y.UnexpectedTypeParameterBeforeAsyncArrowFunction,i),a.node;o=a.node}if(r?.node)return this.state=r.failState,r.node;if(o)return this.state=a.failState,o;throw r?.thrown?r.error:a.thrown?a.error:this.raise(Y.UnexpectedTokenAfterTypeParameter,i)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(10)){let t=this.tryParse(()=>{let t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let n=this.startNode();return[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(!0),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(15)||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(10)||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(Y.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(43)){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(14)&&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(6),i.arguments=this.parseCallExpressionArguments(),i.optional=!0,this.finishCallExpression(i,!0)}else if(!n&&this.shouldParseTypes()&&(this.match(43)||this.match(47))){let n=this.startNodeAt(t);n.callee=e;let i=this.tryParse(()=>(n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(6),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(43)&&(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(5,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,t){let n=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(Y.UnterminatedFlowComment,this.state.curPosition()),n}skipBlockComment(){if(this.hasPlugin(`flowComments`)&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Y.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(U.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,t){this.raise(Y.EnumBooleanMemberNotInitialized,e,t)}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?t.explicitType===`symbol`?Y.EnumInvalidMemberInitializerSymbolType:Y.EnumInvalidMemberInitializerPrimaryType:Y.EnumInvalidMemberInitializerUnknownType,e,t)}flowEnumErrorNumberMemberNotInitialized(e,t){this.raise(Y.EnumNumberMemberNotInitialized,e,t)}flowEnumErrorStringMemberInconsistentlyInitialized(e,t){this.raise(Y.EnumStringMemberInconsistentlyInitialized,e,t)}flowEnumMemberInit(){let e=this.state.startLoc,t=()=>this.match(8)||this.match(4);switch(this.state.type){case 131:{let e=this.parseNumericLiteral(this.state.value);if(t())return{type:`number`,loc:e.start,value:e};break}case 130:{let e=this.parseStringLiteral(this.state.value);if(t())return{type:`string`,loc:e.start,value:e};break}case 81:case 82:{let e=this.parseBooleanLiteral(this.match(81));if(t())return{type:`boolean`,loc:e.start,value:e}}}return{type:`invalid`,loc:e}}flowEnumMemberRaw(){let e=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(25)?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(4);){if(this.eat(17)){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(Y.EnumInvalidMemberName,o,{memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),n.has(c)&&this.raise(Y.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(4)||this.expect(8)}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(98))return null;if(!q(this.state.type))throw this.raise(Y.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:t}=this.state;return this.next(),t!==`boolean`&&t!==`number`&&t!==`string`&&t!==`symbol`&&this.raise(Y.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){let n=t.name,r=t.start,i=this.flowEnumParseExplicitType({enumName:n});this.expect(2);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(4),this.finishNode(e,`EnumBooleanBody`);case`number`:return e.explicitType=!0,e.members=a.numberMembers,this.expect(4),this.finishNode(e,`EnumNumberBody`);case`string`:return e.explicitType=!0,e.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:n}),this.expect(4),this.finishNode(e,`EnumStringBody`);case`symbol`:return e.members=a.defaultedMembers,this.expect(4),this.finishNode(e,`EnumSymbolBody`);default:{let t=()=>(e.members=[],this.expect(4),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(4),this.finishNode(e,`EnumStringBody`);if(!o&&!s&&i>=c){for(let e of a.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.start,{enumName:n,memberName:e.id.name});return e.members=a.booleanMembers,this.expect(4),this.finishNode(e,`EnumBooleanBody`)}else if(!i&&!s&&o>=c){for(let e of a.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.start,{enumName:n,memberName:e.id.name});return e.members=a.numberMembers,this.expect(4),this.finishNode(e,`EnumNumberBody`)}else return this.raise(Y.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(43)||this.match(47))&&(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===43?(--this.state.pos,this.readToken_lt()):e===44&&(--this.state.pos,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return e===47?(this.state.pos-=2,this.finishOp(43,1),43):e}maybeUnwrapTypeCastExpression(e){return e.type===`TypeCastExpression`?e.expression:e}},YP={__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:`♦`},XP=RegExp(`\\r\\n|[\\r\\n\\u2028\\u2029]`,`g`);function ZP(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function QP(e,t,n){for(let r=t;r<n;r++)if(ZP(e.charCodeAt(r)))return!0;return!1}const $P=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,eF=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function tF(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}}const nF=IN`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 rF(e){return e?e.type===`JSXOpeningFragment`||e.type===`JSXClosingFragment`:!1}function iF(e){if(e.type===`JSXIdentifier`)return e.name;if(e.type===`JSXNamespacedName`)return e.namespace.name+`:`+e.name.name;if(e.type===`JSXMemberExpression`)return iF(e.object)+`.`+iF(e.property);throw Error(`Node had unexpected type: `+e.type)}const aF=e=>class extends e{jsxReadToken(){let e=``,t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(nF.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(138)):super.getTokenFromCode(n);return}e+=this.input.slice(t,this.state.pos),this.finishToken(137,e);return;case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;case 62:case 125:this.raise(nF.UnexpectedToken,this.state.curPosition(),{unexpected:this.input[this.state.pos],HTMLEntity:n===125?`}`:`>`});default:ZP(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?`
|
|
11
|
+
`:`\r
|
|
12
|
+
`):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(U.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):ZP(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(130,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=YP[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(TP(e)||e===45);this.finishToken(136,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(136)?e.name=this.state.value:oP(this.state.type)?e.name=fP(this.state.type):this.unexpected(),this.next(),this.finishNode(e,`JSXIdentifier`)}jsxParseNamespacedName(){let e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(10))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(12);){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 2:return e=this.startNode(),this.setContext(J.brace),this.next(),e=this.jsxParseExpressionContainer(e,J.j_oTag),e.expression.type===`JSXEmptyExpression`&&this.raise(nF.AttributeIsEmpty,e),e;case 138:case 130:return this.parseExprAtom();default:throw this.raise(nF.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(J.j_expr),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(e,`JSXSpreadChild`)}jsxParseExpressionContainer(e,t){if(this.match(4))e.expression=this.jsxParseEmptyExpression();else{let t=this.parseExpression();t.type===`SequenceExpression`&&!t.extra?.parenthesized&&this.raise(nF.UnexpectedSequenceExpression,t.expressions[1]),e.expression=t}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(e,`JSXExpressionContainer`)}jsxParseAttribute(){if(this.match(2)){let e=this.startNode();return this.setContext(J.brace),this.next(),this.expect(17),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(J.j_oTag),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(e,`JSXSpreadAttribute`)}let e=this.startNode();return e.name=this.jsxParseNamespacedName(),e.value=this.eat(25)?this.jsxParseAttributeValue():null,this.finishNode(e,`JSXAttribute`)}jsxParseOpeningElementAt(e){if(this.eat(139)){let t=this.startNodeAt(e);return this.finishNode(t,`JSXOpeningFragment`)}let t=this.startNodeAt(e);return t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t)}jsxParseOpeningElementAfterName(e){let t=[];for(;!this.match(52)&&!this.match(139);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(52),this.expect(139),this.finishNode(e,`JSXOpeningElement`)}jsxParseClosingElementAt(e){if(this.eat(139)){let t=this.startNodeAt(e);return this.finishNode(t,`JSXClosingFragment`)}let t=this.startNodeAt(e);return t.name=this.jsxParseElementName(),this.expect(139),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 138:if(e=this.state.startLoc,this.next(),this.eat(52)){this.setLoc(e),i=this.jsxParseClosingElementAt(e);break contents}n.push(this.jsxParseElementAt(e));break;case 137:n.push(this.parseLiteral(this.state.value,`JSXText`));break;case 2:{let e=this.startNode();this.setContext(J.brace),this.next(),this.match(17)?n.push(this.jsxParseSpreadChild(e)):n.push(this.jsxParseExpressionContainer(e,J.j_expr));break}default:this.unexpected()}rF(r)&&!rF(i)&&i!==null?this.raise(nF.MissingClosingTagFragment,i):(!rF(r)&&rF(i)||!rF(r)&&!rF(i)&&iF(i.name)!==iF(r.name))&&this.raise(nF.MissingClosingTagElement,i,{openingTagName:iF(r.name)})}if(rF(r)?(t.openingFragment=r,t.closingFragment=i):(t.openingElement=r,t.closingElement=i),t.children=n,this.match(43))throw this.raise(nF.UnwrappedAdjacentJSXElements,this.state.startLoc);return rF(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(138)?this.jsxParseElement():this.match(43)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(138),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){let t=this.curContext();if(t===J.j_expr){this.jsxReadToken();return}if(t===J.j_oTag||t===J.j_cTag){if(wP(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(139);return}if((e===34||e===39)&&t===J.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(138);return}super.getTokenFromCode(e)}updateContext(e){let{context:t,type:n}=this.state;if(n===52&&e===138)t.splice(-2,2,J.j_cTag),this.state.canStartJSXElement=!1;else if(n===138)t.push(J.j_oTag);else if(n===139){let n=t[t.length-1];n===J.j_oTag&&e===52||n===J.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===J.j_expr):(this.setContext(J.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=tP(n)}};var oF=class extends RP{tsNames=new Map},sF=class extends zP{get inTSNamespace(){let e=this.scopeStack;return e.length>=2&&e[e.length-1].flags===0&&(e[e.length-2].flags&2048)>0}importsStack=[];createScope(e){return this.importsStack.push(new Set),new oF(e)}enter(e){e&3072&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return e&3072&&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(U.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)>0!=(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)}},cF=class{sawUnambiguousESM=!1;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 lF(e,t){e.trailingComments===void 0?e.trailingComments=t:e.trailingComments.unshift(...t)}function uF(e,t){e.leadingComments===void 0?e.leadingComments=t:e.leadingComments.unshift(...t)}function dF(e,t){e.innerComments===void 0?e.innerComments=t:e.innerComments.unshift(...t)}function fF(e,t,n){let r=null,i=t.length;for(;r===null&&i>0;)r=t[--i];r===null||r.start>n.start?dF(e,n.comments):lF(r,n.comments)}var pF=class extends cF{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 a=e.start;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&&lF(e.leadingNode,t),e.trailingNode!==null&&uF(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`:fF(n,n.properties,e);break;case`CallExpression`:case`NewExpression`:case`OptionalCallExpression`:fF(n,n.arguments,e);break;case`ImportExpression`:fF(n,[n.source,n.options??null],e);break;case`FunctionDeclaration`:case`FunctionExpression`:case`ArrowFunctionExpression`:case`ObjectMethod`:case`ClassMethod`:case`ClassPrivateMethod`:case`TSTypeParameterDeclaration`:fF(n,n.params,e);break;case`ArrayExpression`:case`ArrayPattern`:fF(n,n.elements,e);break;case`ExportNamedDeclaration`:case`ImportDeclaration`:fF(n,n.specifiers,e);break;case`TSEnumBody`:fF(n,n.members,e);break;case`TSInterfaceBody`:fF(n,n.body,e);break;default:dF(n,t)}else dF(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}}},mF=class e{flags=2048;get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}startIndex;curLine;lineStart;startLoc;endLoc;init({strictMode:e,sourceType:t,startIndex:n,startLine:r,startColumn:i}){this.strict=e===!1?!1:e===!0?!0:t===`module`,this.startIndex=n,this.curLine=r,this.lineStart=-i,this.startLoc=this.endLoc=new xN(r,i,n)}errors=[];noArrowAt=[];noArrowParamsConversionAt=[];get canStartArrow(){return(this.flags&2)>0}set canStartArrow(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 inConditionalConsequent(){return(this.flags&256)>0}set inConditionalConsequent(e){e?this.flags|=256:this.flags&=-257}get inHackPipelineBody(){return(this.flags&512)>0}set inHackPipelineBody(e){e?this.flags|=512:this.flags&=-513}get seenTopicReference(){return(this.flags&1024)>0}set seenTopicReference(e){e?this.flags|=1024:this.flags&=-1025}labels=[];commentsLen=0;commentStack=[];pos=0;type=135;value=null;start=0;end=0;lastTokEndLoc=null;lastTokStartLoc=null;context=[J.brace];get canStartJSXElement(){return(this.flags&2048)>0}set canStartJSXElement(e){e?this.flags|=2048:this.flags&=-2049}get containsEsc(){return(this.flags&4096)>0}set containsEsc(e){e?this.flags|=4096:this.flags&=-4097}firstInvalidTemplateEscapePos=null;get hasTopLevelAwait(){return(this.flags&8192)>0}set hasTopLevelAwait(e){e?this.flags|=8192:this.flags&=-8193}strictErrors=new Map;tokensLength=0;curPosition(){return new xN(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.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),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}},hF=function(e){return e>=48&&e<=57};const gF={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},_F={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 vF(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(yF(e,p,t,n)){l+=t.slice(d,n);break}if(p===92){l+=t.slice(d,n);let o=bF(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)+`
|
|
13
|
+
`,++n,p===13&&t.charCodeAt(n)===10&&++n,++i,d=r=n):a.unterminated(o,s,c):++n}return{pos:n,str:l,firstInvalidLoc:u,lineStart:r,curLine:i}}function yF(e,t,n,r){return e===`template`?t===96||t===36&&n.charCodeAt(r+1)===123:t===(e===`double`?34:39)}function bF(e,t,n,r,i,a){let o=!i;t++;let s=e=>({pos:t,ch:e,lineStart:n,curLine:r}),c=e.charCodeAt(t++);switch(c){case 110:return s(`
|
|
14
|
+
`);case 114:return s(`\r`);case 120:{let i;return{code:i,pos:t}=xF(e,t,n,r,2,!1,o,a),s(i===null?null:String.fromCharCode(i))}case 117:{let i;return{code:i,pos:t}=CF(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 xF(e,t,n,r,i,a,o,s){let c=t,l;return{n:l,pos:t}=SF(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 SF(e,t,n,r,i,a,o,s,c,l){let u=t,d=i===16?gF.hex:gF.decBinOct,f=i===16?_F.hex:i===10?_F.dec:i===8?_F.oct:_F.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:hF(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 CF(e,t,n,r,i,a){let o=e.charCodeAt(t),s;if(o===123){if(++t,{code:s,pos:t}=xF(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}=xF(e,t,n,r,4,!1,i,a));return{code:s,pos:t}}function wF(e,t,n){return new xN(n,e-t,e)}const TF=new Set([103,109,115,105,121,117,100,118]);var EF=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 SN(e.startLoc,e.endLoc)}};let DF;function OF(){let e=DF;return DF=void 0,e}var kF=class extends pF{isLookahead;tokens=[];constructor(e,t){super(),this.state=new mF,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1,(!DF||DF.length<(this.length+1)*2||e.locations===`packed`)&&(DF=new Uint32Array((this.length+1)*2)),this.locData=DF}setLoc(e){let t=this.offsetToSourcePos(e.index);this.locData[t*2]=e.line,this.locData[t*2+1]=e.column}getLoc(e){let t=this.offsetToSourcePos(e);return new xN(this.locData[t*2],this.locData[t*2+1],e)}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&512&&this.pushToken(new EF(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 $P.lastIndex=e,$P.test(this.input)?$P.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 eF.lastIndex=e,eF.test(this.input)?eF.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(135);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let n=this.state.pos,r=this.input.indexOf(e,n+2);if(r===-1)throw this.raise(U.UnterminatedComment,this.state.curPosition());for(this.state.pos=r+e.length,XP.lastIndex=n+2;XP.test(this.input)&&XP.lastIndex<=r;)++this.state.curLine,this.state.lineStart=XP.lastIndex;if(this.isLookahead)return;let i={type:`CommentBlock`,value:this.input.slice(n+2,r),start:this.sourceToOffsetPos(n),end:this.sourceToOffsetPos(r+e.length),loc:new SN(t,this.state.curPosition())};return this.optionFlags&512&&this.pushToken(i),i}skipLineComment(e){let t=this.state.pos,n;this.isLookahead||(n=this.state.curPosition());let r=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!ZP(r)&&++this.state.pos<this.length;)r=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let i=this.state.pos,a={type:`CommentLine`,value:this.input.slice(t+e,i),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(i),loc:new SN(n,this.state.curPosition())};return this.optionFlags&512&&this.pushToken(a),a}skipSpace(){let e=this.state.pos,t=this.optionFlags&8192?[]: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(tF(n))++this.state.pos;else if(n===45&&!this.inModule&&this.optionFlags&16384){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&16384){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(U.UnexpectedDigitAfterHash,this.state.curPosition());wP(t)?(++this.state.pos,this.finishToken(134,this.readWord1(t))):t===92?(++this.state.pos,this.finishToken(134,this.readWord1())):this.finishOp(23,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(17)):(++this.state.pos,this.finishToken(12))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(27,2):this.finishOp(52,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;!ZP(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(24,n),!0}readToken_mult_modulo(e){let t=e===42?51:50,n=1,r=this.input.charCodeAt(this.state.pos+1);e===42&&r===42&&(n++,r=this.input.charCodeAt(this.state.pos+2),t=53),r===61&&!this.state.inType&&(n++,t=e===37?29:26),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(26,3):this.finishOp(e===124?37:38,2);return}if(e===124&&t===62){this.finishOp(35,2);return}if(t===61){this.finishOp(26,2);return}this.finishOp(e===124?39:41,1)}readToken_caret(){let e=this.input.charCodeAt(this.state.pos+1);e===61&&!this.state.inType?this.finishOp(28,2):e===94&&this.hasPlugin([`pipelineOperator`,{proposal:`hack`,topicToken:`^^`}])?(this.finishOp(33,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(40,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin([`pipelineOperator`,{proposal:`hack`,topicToken:`@@`}])?this.finishOp(34,2):this.finishOp(22,1)}readToken_plus_min(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===e){this.finishOp(30,2);return}t===61?this.finishOp(26,2):this.finishOp(49,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(26,3);return}this.finishOp(47,2);return}if(t===61){this.finishOp(45,2);return}this.finishOp(43,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(26,t+1);return}this.finishOp(48,t);return}if(t===61){this.finishOp(45,2);return}this.finishOp(44,1)}readToken_eq_excl(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===61){this.finishOp(42,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(e===61&&t===62){this.state.pos+=2,this.finishToken(15);return}this.finishOp(e===61?25:31,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(26,3):this.finishOp(36,2):e===46&&!(t>=48&&t<=57)?(this.state.pos+=2,this.finishToken(14)):(++this.state.pos,this.finishToken(13))}getTokenFromCode(e){switch(e){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(6);return;case 41:++this.state.pos,this.finishToken(7);return;case 59:++this.state.pos,this.finishToken(9);return;case 44:++this.state.pos,this.finishToken(8);return;case 91:++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(1);return;case 123:++this.state.pos,this.finishToken(2);return;case 125:++this.state.pos,this.finishToken(4);return;case 58:this.hasPlugin(`functionBind`)&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(11,2):(++this.state.pos,this.finishToken(10));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(32,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(wP(e)){this.readWord(e);return}}throw this.raise(U.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:i}=this.state;for(;;++i){if(i>=this.length)throw this.raise(U.UnterminatedRegExp,CN(e,1));let t=this.input.charCodeAt(i);if(ZP(t))throw this.raise(U.UnterminatedRegExp,CN(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 a=this.input.slice(t,i);++i;let o=``,s=()=>CN(e,i+2-t);for(;i<this.length;){let e=this.codePointAtPos(i),t=String.fromCharCode(e);if(TF.has(e))e===118?o.includes(`u`)&&this.raise(U.IncompatibleRegExpUVFlags,s()):e===117&&o.includes(`v`)&&this.raise(U.IncompatibleRegExpUVFlags,s()),o.includes(t)&&this.raise(U.DuplicateRegExpFlags,s());else if(TP(e)||e===92)this.raise(U.MalformedRegExpFlags,s());else break;++i,o+=t}this.state.pos=i,this.finishToken(133,{pattern:a,flags:o})}readInt(e,t,n=!1,r=!0){let{n:i,pos:a}=SF(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 i=this.readInt(e);if(i??this.raise(U.InvalidDigit,CN(n,2),{radix:e}),this.input.charCodeAt(this.state.pos)===110&&(++this.state.pos,r=!0),wP(this.codePointAtPos(this.state.pos)))throw this.raise(U.NumberIdentifier,this.state.curPosition());if(r){let e=this.input.slice(t,this.state.pos).replace(/[_n]/g,``);this.finishToken(132,e);return}this.finishToken(131,i)}readNumber(e){let t=this.state.pos,n=this.state.curPosition(),r=!1,i=!1,a=!1;!e&&this.readInt(10)===null&&this.raise(U.InvalidNumber,this.state.curPosition());let o=this.state.pos-t>=2&&this.input.charCodeAt(t)===48;if(o){let e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(U.StrictOctalLiteral,n),!this.state.strict){let t=e.indexOf(`_`);t>0&&this.raise(U.ZeroDigitNumericSeparator,CN(n,t))}a=o&&!/[89]/.test(e)}let s=this.input.charCodeAt(this.state.pos);s===46&&!a&&(++this.state.pos,this.readInt(10),r=!0,s=this.input.charCodeAt(this.state.pos)),(s===69||s===101)&&!a&&(s=this.input.charCodeAt(++this.state.pos),(s===43||s===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(U.InvalidOrMissingExponent,n),r=!0,s=this.input.charCodeAt(this.state.pos));let c=this.input.slice(t,this.state.pos).replaceAll(`_`,``);if(s===110&&((r||o)&&this.raise(U.InvalidBigIntLiteral,n),++this.state.pos,i=!0),wP(this.codePointAtPos(this.state.pos)))throw this.raise(U.NumberIdentifier,this.state.curPosition());if(i){this.finishToken(132,c);return}let l=a?parseInt(c,8):parseFloat(c);this.finishToken(131,l)}readCodePoint(e){let{code:t,pos:n}=CF(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}=vF(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(130,t)}readTemplateContinuation(){this.match(4)||this.unexpected(null,4),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:t,firstInvalidLoc:n,pos:r,curLine:i,lineStart:a}=vF(`template`,this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=r+1,this.state.lineStart=a,this.state.curLine=i,n&&(this.state.firstInvalidTemplateEscapePos=new xN(n.curLine,n.pos-n.lineStart,this.sourceToOffsetPos(n.pos))),this.input.codePointAt(r)===96?this.finishToken(20,n?null:e+t+"`"):(this.state.pos++,this.finishToken(21,n?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(TP(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?wP:TP;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(U.MissingUnicodeEscape,this.state.curPosition()),r=this.state.pos-1;continue}++this.state.pos;let a=this.readCodePoint(!0);a!==null&&(i(a)||this.raise(U.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=HN.get(t);n===void 0?this.finishToken(128,t):this.finishToken(n,fP(n))}checkKeywordEscapes(){let{type:e}=this.state;oP(e)&&this.state.containsEsc&&this.raise(U.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:fP(e)})}raise(e,t,n={}){let r=t instanceof xN?t:typeof t==`number`?this.getLoc(t):this.optionFlags&256?t.loc.start:this.getLoc(t.start),i=e(r,t instanceof xN?r.index:typeof t==`number`?t:t.start,n);if(!(this.optionFlags&4096))throw i;return this.isLookahead||this.state.errors.push(i),i}raiseOverwrite(e,t,n={}){let r=t instanceof xN?t:this.optionFlags&256?t.loc.start:this.getLoc(t.start),i=t instanceof xN?r.index:t.start,a=this.state.errors;for(let t=a.length-1;t>=0;t--){let o=a[t];if(o.pos===i)return a[t]=e(r,i,n);if(o.pos<i)break}return this.raise(e,r,n)}updateContext(e){}unexpected(e,t){throw this.raise(U.UnexpectedToken,e??this.state.startLoc,{expected:t?fP(t):null})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(U.MissingPlugin,t??this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(e=>this.hasPlugin(e)))throw this.raise(U.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(t,n,r)=>{this.raise(e,wF(t,n,r))}}errorHandlers_readInt={invalidDigit:(e,t,n,r)=>this.optionFlags&4096?(this.raise(U.InvalidDigit,wF(e,t,n),{radix:r}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(U.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(U.UnexpectedNumericSeparator)};errorHandlers_readCodePoint={...this.errorHandlers_readInt,invalidEscapeSequence:this.errorBuilder(U.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(U.InvalidCodePoint)};errorHandlers_readStringContents_string={...this.errorHandlers_readCodePoint,strictNumericEscape:(e,t,n)=>{this.recordStrictModeErrors(U.StrictNumericEscape,wF(e,t,n))},unterminated:(e,t,n)=>{throw this.raise(U.UnterminatedString,wF(e-1,t,n))}};errorHandlers_readStringContents_template={...this.errorHandlers_readCodePoint,strictNumericEscape:this.errorBuilder(U.StrictNumericEscape),unterminated:(e,t,n)=>{throw this.raise(U.UnterminatedTemplate,wF(e,t,n))}}},AF=class{privateNames=new Set;loneAccessors=new Map;undefinedPrivateNames=new Map},jF=class{parser;stack=[];constructor(e){this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new AF)}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(U.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(U.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(U.InvalidPrivateFieldResolution,t,{identifierName:e})}},MF=class{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},NF=class extends MF{declarationErrors=new Map;constructor(e){super(e)}recordDeclarationError(e,t){this.declarationErrors.set(t,e)}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}},PF=class{parser;stack=[new MF];constructor(e){this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){let{stack:n}=this,r=n.length-1,i=n[r];for(;!i.isCertainlyParameterDeclaration();){if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(e,t);else return;i=n[--r]}this.parser.raise(e,t)}recordArrowParameterBindingError(e,t){let{stack:n}=this,r=n[n.length-1],i=t.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(U.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),i=e[--r]})}};function FF(){return new MF(3)}function IF(){return new NF(1)}function LF(){return new NF(2)}function RF(){return new MF}var zF=class{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}get inFSharpPipelineDirectBody(){return(this.currentFlags()&16)==0}};function BF(e,t){return(e?2:0)|!!t}var VF=class extends kF{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!(TP(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(135)||this.match(4)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return QP(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return QP(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(9)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(9))||this.raise(U.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(U.InvalidCoverInitializedName,n),r!=null&&this.raise(U.DuplicateProto,r),i!=null&&this.raise(U.UnexpectedPrivateField,i),a!=null&&this.unexpected(a),o!=null&&this.raise(U.InvalidCoverDiscardElement,o)}isLiteralPropertyName(){return eP(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,a=this.getScopeHandler();this.scope=new a(this,e);let o=this.prodParam;this.prodParam=new zF;let s=this.classScope;this.classScope=new jF(this);let c=this.expressionScope;return this.expressionScope=new PF(this),()=>{this.state.labels=t,this.exportedIdentifiers=n,this.inModule=r,this.scope=i,this.prodParam=o,this.classScope=s,this.expressionScope=c}}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.optionFlags&16&&(n|=48),this.scope.enter(n)}checkDestructuringPrivate(e){let{privateKeyLoc:t}=e;t!==null&&this.expectPlugin(`destructuringPrivate`,t)}},HF=class{shorthandAssignLoc=null;doubleProtoLoc=null;privateKeyLoc=null;optionalParametersLoc=null;voidPatternLoc=null},UF=class{constructor(e,t,n,r){this.start=n,this.end=0,r!==void 0&&(this.loc=new SN(r)),e&128&&(this.range=[n,0]),r!==void 0&&t&&(this.loc.filename=t)}type=``};const WF=UF.prototype;var GF=class extends VF{createPosition(e){return e}startNode(){let{startLoc:e}=this.state;return this.setLoc(e),this.startNodeAt(e)}startNodeAt(e){let{optionFlags:t,filename:n}=this;return t&256?new UF(t,n,e.index,this.createPosition(e)):new UF(t,n,e.index)}startNodeAtNode(e){let{optionFlags:t,filename:n}=this;return t&256?new UF(t,n,e.start,e.loc.start):new UF(t,n,e.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,n){e.type=t,e.end=n.index;let{optionFlags:r}=this;return r&256&&(e.loc.end=this.createPosition(n)),r&128&&(e.range[1]=n.index),r&8192&&this.processComment(e),e}finishNodeAtNode(e,t,n){e.type=t,e.end=n.end;let{optionFlags:r}=this;return r&256&&(e.loc.end=n.loc.end),r&128&&(e.range[1]=e.end),r&8192&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index;let{optionFlags:n}=this;n&256&&(e.loc.start=this.createPosition(t)),n&128&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index;let{optionFlags:n}=this;n&256&&(e.loc.end=this.createPosition(t)),n&128&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){e.start=t.start;let{optionFlags:n}=this;n&256&&(e.loc.start=t.loc.start),n&128&&(e.range[0]=t.start)}resetEndLocationFromNode(e,t){e.end=t.end;let{optionFlags:n}=this;n&256&&(e.loc.end=t.loc.end),n&128&&(e.range[1]=t.end)}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(WF);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(WF);return s.type=t,s.start=n,s.end=r,s.loc=i,s.range=a,s.extra=o,s.value=e.value,s}};const KF=e=>e.type===`ParenthesizedExpression`?KF(e.expression):e;var qF=class extends GF{toAssignable(e,t=!1){let n;switch((e.type===`ParenthesizedExpression`||e.extra?.parenthesized)&&(n=KF(e),t?n.type===`Identifier`?this.expressionScope.recordArrowParameterBindingError(U.InvalidParenthesizedAssignment,e):n.type!==`CallExpression`&&n.type!==`MemberExpression`&&!this.isOptionalMemberExpression(n)&&this.raise(U.InvalidParenthesizedAssignment,e):this.raise(U.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,i=r-1;n<r;n++){let r=e.properties[n],a=n===i;this.toAssignableObjectExpressionProp(r,a,t),a&&r.type===`RestElement`&&e.extra?.trailingCommaLoc&&this.raise(U.RestTrailingComma,e.extra.trailingCommaLoc)}break;case`ObjectProperty`:{let{key:n,value:r}=e;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.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(U.MissingEqInAssignment,this.optionFlags&256?e.left.loc.end:e.left),this.castNodeTo(e,`AssignmentPattern`),delete e.operator,e.left.type===`VoidPattern`&&this.raise(U.VoidPatternInitializer,e.left),this.toAssignable(e.left,t);break;case`ParenthesizedExpression`:this.toAssignable(n,t);break}}toAssignableObjectExpressionProp(e,t,n){if(e.type===`ObjectMethod`)this.raise(e.kind===`get`||e.kind===`set`?U.PatternHasAccessor:U.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(U.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(U.RestTrailingComma,a):t&&this.raise(U.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}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(U.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(1,93,1),this.finishNode(e,`ArrayPattern`)}case 2:return this.parseObjectLike(4,!0);case 84: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(8),r&&this.match(8))i.push(null);else if(this.eat(e))break;else if(this.match(17)){let r=this.parseRestBinding();if(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(22)&&this.hasPlugin(`decorators`)&&this.raise(U.UnsupportedParameterDecorator,this.state.startLoc);this.match(22);)e.push(this.parseDecorator());i.push(this.parseBindingElement(n,e))}return i}parseBindingRestProperty(e){return this.next(),this.hasPlugin(`discardBinding`)&&this.match(84)?(e.argument=this.parseVoidPattern(null),this.raise(U.UnexpectedVoidPattern,e.argument)):e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,`RestElement`)}parseBindingProperty(){let{type:e,startLoc:t}=this.state;if(e===17)return this.parseBindingRestProperty(this.startNode());let n=this.startNode();return e===134?(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{startLoc:n}=this.state,r=this.parseMaybeDefault();return e&2&&this.parseFunctionParamType(r),t.length&&(r.decorators=t,this.resetStartLocationFromNode(r,t[0])),this.parseMaybeDefault(n,r)}parseFunctionParamType(e){return e}parseMaybeDefault(e,t){if(e??=this.state.startLoc,t??=this.parseBindingAtom(),!this.eat(25))return t;let n=this.startNodeAt(e);return t.type===`VoidPattern`&&this.raise(U.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&16384)return!0}return!1}isOptionalMemberExpression(e){return e.type===`OptionalMemberExpression`}checkLVal(e,t,n=64,r=!1,i=!1,a=!1,o=!1){let s=e.type;if(this.isObjectMethod(e))return;let c=this.isOptionalMemberExpression(e);if(c||s===`MemberExpression`){c&&(this.expectPlugin(`optionalChainingAssign`,e.start),t.type!==`AssignmentExpression`&&this.raise(U.InvalidLhsOptionalChaining,e,{ancestor:t})),n!==64&&this.raise(U.InvalidPropertyBindingPattern,e);return}if(s===`Identifier`){this.checkIdentifier(e,n,i);let{name:t}=e;r&&(r.has(t)?this.raise(U.ParamDupe,e):r.add(t));return}else s===`VoidPattern`&&t.type===`CatchClause`&&this.raise(U.VoidPatternCatchClauseParam,e);let l=KF(e);o||=l.type===`CallExpression`&&(l.callee.type===`Import`||l.callee.type===`Super`);let u=this.isValidLVal(s,o,!(a||e.extra?.parenthesized)&&t.type===`AssignmentExpression`,n);if(u===!0)return;if(u===!1){let r=n===64?U.InvalidLhs:U.InvalidLhsBinding;this.raise(r,e,{ancestor:t});return}let d,f;typeof u==`string`?(d=u,f=s===`ParenthesizedExpression`):[d,f]=u;let p=s===`ArrayPattern`||s===`ObjectPattern`?{type:s}:t,m=e[d];if(Array.isArray(m))for(let e of m)e&&this.checkLVal(e,p,n,r,i,f,!0);else m&&this.checkLVal(m,p,n,r,i,f,o)}checkIdentifier(e,t,n=!1){this.state.strict&&(n?NP(e.name,this.inModule):MP(e.name))&&(t===64?this.raise(U.StrictEvalArguments,e,{referenceName:e.name}):this.raise(U.StrictEvalArgumentsBinding,e,{bindingName:e.name})),t&8192&&e.name===`let`&&this.raise(U.LetInLexicalBinding,e),t&64||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.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(U.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return this.match(8)?(this.raise(this.lookaheadCharCode()===e?U.RestTrailingComma:U.ElementAfterRest,this.state.startLoc),!0):!1}},JF=class extends qF{checkProto(e,t,n){if(e.type===`SpreadElement`||this.isObjectMethod(e)||e.computed||e.shorthand)return t;let r=e.key;return(r.type===`Identifier`?r.name:r.value)===`__proto__`?(t&&(n?n.doubleProtoLoc===null&&(n.doubleProtoLoc=this.getLoc(r.start)):this.raise(U.DuplicateProto,r)),!0):t}shouldExitDescending(e){return e.type===`ArrowFunctionExpression`&&!e.extra?.parenthesized}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(135))throw this.raise(U.ParseExpressionEmptyInput,this.state.startLoc);let e=this.parseExpression();if(!this.match(135))throw this.raise(U.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&512&&(e.tokens=$F(this.tokens)),this.options.locations===`packed`&&(e.locData=OF()),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(8)){let r=this.startNodeAt(t);for(r.expressions=[n];this.eat(8);)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(104);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 HF,i=!0),this.state.canStartArrow=!0;let a=this.parseMaybeConditional(e);if(t&&(a=t.call(this,a,n)),rP(this.state.type)){let t=this.startNodeAt(n),r=this.state.value;if(t.operator=r,this.match(25)){this.toAssignable(a,!0),t.left=a;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=a;return this.next(),t.right=this.parseMaybeAssign(),this.checkLVal(a,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`)?nP(e):nP(e)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(U.YieldNotInGeneratorFunction,n),this.parseYield(n)}return a}parseMaybeConditional(e){let t=this.state.startLoc,n=this.parseExprOps(e);return this.shouldExitDescending(n)?n:this.parseConditional(n,t,e)}parseConditional(e,t,n){if(this.eat(13)){let n=this.startNodeAt(t);return n.test=e,n.consequent=this.parseMaybeAssignAllowIn(),this.expect(10),n.alternate=this.parseMaybeAssign(),this.finishNode(n,`ConditionalExpression`)}return e}parseMaybeUnaryOrPrivate(e){return this.match(134)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){let t=this.state.startLoc,n=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(n)?n:(this.state.canStartArrow=!1,this.parseExprOp(n,t,-1))}parseExprOp(e,t,n){if(this.isPrivateName(e)){let r=this.getPrivateNameSV(e);(n>=pP(54)||!this.prodParam.hasIn||!this.match(54))&&this.raise(U.PrivateInExpectedIn,t,{identifierName:r}),this.classScope.usePrivateName(r,t)}let r=this.state.type;if(sP(r)&&(this.prodParam.hasIn||!this.match(54))){let i=pP(r);if(i>n){if(r===35&&(this.expectPlugin(`pipelineOperator`),this.prodParam.inFSharpPipelineDirectBody))return e;let a=this.startNodeAt(t);a.left=e,a.operator=this.state.value;let o=r===37||r===38,s=r===36;s&&(i=pP(38)),this.next(),a.right=this.parseExprOpRightExpr(r,i);let c=this.finishNode(a,o||s?`LogicalExpression`:`BinaryExpression`),l=this.state.type;if(s&&(l===37||l===38)||o&&l===36)throw this.raise(U.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,t,n)}}return e}parseExprOpRightExpr(e,t){switch(e){case 35:switch(this.getPluginOption(`pipelineOperator`,`proposal`)){case`hack`:return this.withTopicBindingContext(()=>this.parseHackPipeBody());case`fsharp`:return this.parseFSharpPipelineBody(t)}default:return this.parseExprOpBaseRightExpr(e,t)}}parseExprOpBaseRightExpr(e,t){let n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),n,mP(e)?t-1:t)}parseHackPipeBody(){let{startLoc:e}=this.state,t=this.parseMaybeAssign();return jN.has(t.type)&&!t.extra?.parenthesized&&this.raise(U.PipeUnparenthesizedBody,e,{type:t.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(U.PipeTopicUnused,e),t}checkExponentialAfterUnary(e){this.match(53)&&this.raise(U.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,t){let n=this.state.startLoc,r=this.isContextual(92);if(r&&this.recordAwaitIfAllowed()){this.next();let e=this.parseAwait(n);return t||this.checkExponentialAfterUnary(e),e}let i=this.match(30),a=this.startNode();if(lP(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.state.canStartArrow=!1,this.match(68)&&this.expectPlugin(`throwExpressions`);let n=this.match(85);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(U.StrictDelete,a):this.hasPropertyAsPrivateName(e)&&this.raise(U.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`)?nP(e):nP(e)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(U.AwaitNotInAsyncContext,n),this.parseAwait(n)}return o}parseUpdate(e,t,n){if(t){let t=this.finishNode(e,`UpdateExpression`);return this.checkLVal(t.argument,t),t}let r=this.state.startLoc,i=this.parseExprSubscripts(n);if(this.checkExpressionErrors(n,!1))return i;for(;cP(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;this.setLoc(t);let n=this.parseExprAtom(e);return this.shouldExitDescending(n)?n:this.parseSubscripts(n,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===11)return this.parseBind(e,t,r);if(hP(i))return this.parseTaggedTemplateExpression(e,t,r);let a=!1;if(i===14){if(n&&(this.raise(U.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(e,r);r.optionalChainMember=a=!0,this.next()}if(!n&&this.match(6))return this.parseCoverCallAndAsyncArrowHead(e,t,r,a);{let n=this.eat(0);return n||a||this.eat(12)?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(1)):this.match(134)?(e.type===`Super`&&this.raise(U.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){let r=this.startNodeAt(t);r.object=e,this.next();let i=this.match(79),a=this.parseNoCallExpr();if(a.type===`Super`||i&&a.type===`ImportExpression`||a.type===`Import`)throw this.raise(U.UnsupportedBindRHS,a);return r.callee=a,n.stop=!0,this.parseSubscripts(this.finishNode(r,`BindExpression`),t,!1)}parseCoverCallAndAsyncArrowHead(e,t,n,r){let i=null;this.next();let a=this.startNodeAt(t);a.callee=e;let{maybeAsyncArrow:o,optionalChainMember:s}=n;o&&(this.expressionScope.enter(LF()),i=new HF),s&&(a.optional=r),r?a.arguments=this.parseCallExpressionArguments():a.arguments=this.parseCallExpressionArguments(e.type!==`Super`,a,i);let c=this.finishCallExpression(a,s);return o&&this.shouldParseAsyncArrow()&&!r?(n.stop=!0,this.checkDestructuringPrivate(i),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),c=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),c)):(o&&(this.checkExpressionErrors(i,!0),this.expressionScope.exit()),this.toReferencedList(a.arguments)),c}parseTaggedTemplateExpression(e,t,n){let r=this.startNodeAt(t);return r.tag=e,r.quasi=this.parseTemplate(!0),n.optionalChainMember&&this.raise(U.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.state.canStartArrow}finishCallExpression(e,t){if(e.callee.type===`Import`)if(e.arguments.length===0||e.arguments.length>2)this.raise(U.ImportCallArity,e);else for(let t of e.arguments)t.type===`SpreadElement`&&this.raise(U.ImportCallSpreadArgument,t);return this.finishNode(e,t?`OptionalCallExpression`:`CallExpression`)}parseCallExpressionArguments(e,t,n){let r=[],i=!0;for(;!this.eat(7);){if(i)i=!1;else if(this.expect(8),this.match(7)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}r.push(this.parseExprListItem(7,!1,n,e))}return r}shouldParseAsyncArrow(){return this.match(15)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){return this.resetPreviousNodeTrailingComments(t),this.expect(15),this.parseArrowExpression(e,t.arguments,!0,t.extra?.trailingCommaLoc),t.innerComments&&dF(e,t.innerComments),t.callee.trailingComments&&dF(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 75:return this.parseSuper();case 79:return t=this.startNode(),this.next(),this.match(12)?this.parseImportMetaPropertyOrPhaseCall(t):this.match(6)?this.optionFlags&1024?this.parseImportCall(t):this.finishNode(t,`Import`):(this.raise(U.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(t,`Import`));case 74:return t=this.startNode(),this.next(),this.finishNode(t,`ThisExpression`);case 86:return this.parseDo(this.startNode(),!1);case 52:case 27:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 131:return this.parseNumericLiteral(this.state.value);case 132:return this.parseBigIntLiteral(this.state.value);case 130:return this.parseStringLiteral(this.state.value);case 80:return this.parseNullLiteral();case 81:return this.parseBooleanLiteral(!0);case 82:return this.parseBooleanLiteral(!1);case 6:return this.parseParenAndDistinguishExpression(this.state.canStartArrow);case 0:return this.parseArrayLike(1,e);case 2:return this.parseObjectLike(4,!1,e);case 64:return this.parseFunctionOrFunctionSent();case 22:n=this.parseDecorators();case 76:return this.parseClass(this.maybeTakeDecorators(n,this.startNode()),!1);case 73:return this.parseNewOrNewTarget();case 21:case 20:return this.parseTemplate(!1);case 11:{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(U.UnsupportedBind,e)}case 134:return this.raise(U.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 29:return this.parseTopicReferenceThenEqualsSign(50,`%`);case 28:return this.parseTopicReferenceThenEqualsSign(40,`^`);case 33:case 34:return this.parseTopicReference(`hack`);case 40:case 50:case 23:{let e=this.getPluginOption(`pipelineOperator`,`proposal`);if(e)return this.parseTopicReference(e);throw this.unexpected()}case 43:{let e=this.input.codePointAt(this.nextTokenStart());throw wP(e)||e===62?this.expectOnePlugin([`jsx`,`flow`,`typescript`]):this.unexpected()}default:if(q(r)){if(this.isContextual(123)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let{canStartArrow:e,containsEsc:t}=this.state,n=this.parseIdentifier();if(!t&&n.name===`async`&&!this.canInsertSemicolon()){let{type:t}=this.state;if(t===64)return this.resetPreviousNodeTrailingComments(n),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(n));if(q(t))return e&&this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(n)):n;if(t===86)return this.resetPreviousNodeTrailingComments(n),this.parseDo(this.startNodeAtNode(n),!0)}return e&&this.match(15)&&!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=CN(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 this.topicReferenceIsAllowedInCurrentContext()||this.raise(U.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(e,`TopicReference`);throw this.raise(U.PipeTopicUnconfiguredToken,t,{token:fP(r)})}testTopicReferenceConfiguration(e,t,n){switch(e){case`hack`:return this.hasPlugin([`pipelineOperator`,{topicToken:fP(n)}]);default:throw this.raise(U.PipeTopicRequiresHackPipes,t)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(BF(!0,this.prodParam.hasYield));let t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(U.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(15),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(6)&&!this.scope.allowDirectSuper?this.raise(U.SuperNotAllowed,e):this.scope.allowSuper||this.raise(U.UnexpectedSuper,e),!this.match(6)&&!this.match(0)&&!this.match(12)&&this.raise(U.UnsupportedSuper,e),this.finishNode(e,`Super`)}parsePrivateName(){let e=this.startNode(),t=this.startNodeAt(CN(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(12)){let t=this.createIdentifier(this.startNodeAtNode(e),`function`);return this.next(),this.match(99)?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(U.UnsupportedMetaProperty,e.property,{target:t.name,onlyValidPropertyName:n}),this.finishNode(e,`MetaProperty`)}parseImportMetaPropertyOrPhaseCall(e){if(this.next(),this.isContextual(101)||this.isContextual(93)){let t=this.isContextual(101);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(97)&&(this.inModule||this.raise(U.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){let t;try{t=BigInt(e)}catch{t=null}return this.parseLiteral(t,`BigIntLiteral`)}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(IF());let r=this.state.startLoc,i=[],a=new HF,o=!0,s,c;for(;!this.match(7);){if(o)o=!1;else if(this.expect(8,a.optionalParametersLoc===null?null:a.optionalParametersLoc),this.match(7)){c=this.state.startLoc;break}if(this.match(17)){let e=this.state.startLoc;if(s=this.state.startLoc,i.push(this.parseParenItem(this.parseRestBinding(),e)),!this.checkCommaAfterRest(41))break}else i.push(this.parseMaybeAssignAllowInOrVoidPattern(7,a,this.parseParenItem))}let l=this.state.lastTokEndLoc;this.expect(7);let u=this.startNodeAt(t);return e&&this.shouldParseArrow(i)&&(u=this.parseArrow(u))?(this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(u,i,!1),u):(this.expressionScope.exit(),i.length||this.unexpected(this.state.lastTokStartLoc),c&&this.unexpected(c),s&&this.unexpected(s),this.checkExpressionErrors(a,!0),this.toReferencedList(i,!0),i.length>1?(n=this.startNodeAt(r),n.expressions=i,this.finishNode(n,`SequenceExpression`),this.resetEndLocation(n,l)):n=i[0],this.wrapParenthesis(t,n))}wrapParenthesis(e,t){if(!(this.optionFlags&2048))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(15))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){let e=this.startNode();if(this.next(),this.match(12)){let t=this.createIdentifier(this.startNodeAtNode(e),`new`);this.next();let n=this.parseMetaProperty(e,t,`target`);return this.scope.allowNewTarget||this.raise(U.UnexpectedNewTarget,n),n}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(6)){let t=this.parseExprList(7);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,`NewExpression`)}parseNewCallee(e){let t=this.match(79),n=this.parseNoCallExpr();e.callee=n,t&&n.type===`ImportExpression`&&this.raise(U.ImportCallNotNewExpression,n,n),n.type===`Import`&&this.raise(U.ImportCallNotNewExpression,n),n.type===`Super`&&this.raise(U.SuperCallNotNewExpression,n)}parseTemplateElement(e){let{start:t,startLoc:n,end:r,value:i}=this.state,a=t+1,o=this.startNodeAt(CN(n,1));i===null&&(e||this.raise(U.InvalidEscapeSequenceTemplate,CN(this.state.firstInvalidTemplateEscapePos,1)));let s=this.match(20),c=s?-1:-2,l=r+c;o.value={raw:this.input.slice(a,l).replace(/\r\n?/g,`
|
|
15
|
+
`),cooked:i===null?null:i.slice(1,c)},o.tail=s,this.next();let u=this.finishNode(o,`TemplateElement`);return this.resetEndLocation(u,CN(this.state.lastTokEndLoc,c)),u}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){let r=!1,i=!0,a=this.startNode();for(a.properties=[],this.next();!this.match(e);){if(i)i=!1;else if(this.expect(8),this.match(e)){this.addTrailingCommaExtraToNode(a);break}let o;t?o=this.parseBindingProperty():(o=this.parsePropertyDefinition(n),r=this.checkProto(o,r,n)),a.properties.push(o)}this.next();let o=t?`ObjectPattern`:`ObjectExpression`;return this.finishNode(a,o)}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(51))}parsePropertyDefinition(e){let t=[];if(this.match(22))for(this.hasPlugin(`decorators`)&&this.raise(U.UnsupportedPropertyDecorator,this.state.startLoc);this.match(22);)t.push(this.parseDecorator());let n=this.startNode(),r=!1,i=!1,a;if(this.match(17))return t.length&&this.unexpected(),this.parseSpread();t.length&&(n.decorators=t),n.method=!1,e&&(a=this.state.startLoc);let o=this.eat(51);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(51),this.parsePropertyName(n)),(t===`get`||t===`set`)&&(i=!0,this.resetPreviousNodeTrailingComments(e),n.kind=t,this.match(51)&&(o=!0,this.raise(U.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`?U.BadGetterArity:U.BadSetterArity,e),e.kind===`set`&&n[n.length-1]?.type===`RestElement`&&this.raise(U.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(6))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(10))return e.value=n?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(4,r),this.finishObjectProperty(e);if(!e.computed&&e.key.type===`Identifier`){if(this.checkReservedWord(e.key.name,e.key.start,!0,!1),n)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(25)){let n=this.state.startLoc;r==null?this.raise(U.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(1);else{let{type:n,value:r}=this.state,i;if($N(n))i=this.parseIdentifier(!0);else switch(n){case 131:i=this.parseNumericLiteral(r);break;case 130:i=this.parseStringLiteral(r);break;case 132:i=this.parseBigIntLiteral(r);break;case 134:{let e=this.state.startLoc;t==null?this.raise(U.UnexpectedPrivateField,e):t.privateKeyLoc===null&&(t.privateKeyLoc=e),i=this.parsePrivateName();break}default:this.unexpected()}e.key=i,n!==134&&(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(BF(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){let n=this.startNode();return this.next(),n.elements=this.parseExprList(e,!0,t,n),this.finishNode(n,`ArrayExpression`)}parseArrowExpression(e,t,n,r){this.scope.enter(518);let i=BF(n,!1);return this.match(2)||(i|=this.prodParam.currentFlags()&24),this.prodParam.enter(i),this.initFunction(e,n),t&&this.setArrowFunctionParameters(e,t,r),this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),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(2);if(this.expressionScope.enter(RF()),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(U.IllegalLanguageModeDirective,(e.kind===`method`||e.kind===`constructor`)&&e.key?this.optionFlags&256?e.key.loc.end:e.key: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(8),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(8))t||this.raise(U.UnexpectedToken,this.state.curPosition(),{unexpected:`,`}),i=null;else if(this.match(17)){let e=this.state.startLoc;i=this.parseParenItem(this.parseSpread(n),e)}else if(this.match(13)){this.expectPlugin(`partialApplication`),r||this.raise(U.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,this.optionFlags&256&&(e.loc.identifierName=t),this.finishNode(e,`Identifier`)}createIdentifierAt(e,t,n){return e.name=t,this.optionFlags&256&&(e.loc.identifierName=t),this.finishNodeAt(e,`Identifier`,n)}parseIdentifierName(e){let t,{start:n,type:r}=this.state;$N(r)?t=this.state.value:this.unexpected();let i=QN(r);return e?i&&this.replaceToken(128):this.checkReservedWord(t,this.sourceToOffsetPos(n),i,!1),this.next(),t}checkReservedWord(e,t,n,r){if(!(e.length>10)&&LP(e)){if(n&&PP(e)){this.raise(U.UnexpectedKeyword,t,{keyword:e});return}if((this.state.strict?r?NP:jP:AP)(e,this.inModule)){this.raise(U.UnexpectedReservedWord,t,{reservedWord:e});return}else if(e===`yield`){if(this.prodParam.hasYield){this.raise(U.YieldBindingIdentifier,t);return}}else if(e===`await`){if(this.prodParam.hasAwait){this.raise(U.AwaitBindingIdentifier,t);return}if(this.scope.inStaticBlock){this.raise(U.AwaitBindingIdentifierInStaticBlock,t);return}this.expressionScope.recordAsyncArrowParametersError(t)}else if(e===`arguments`&&this.scope.inClassAndNotInNonArrowFunction){this.raise(U.ArgumentsInClass,t);return}}}recordAwaitIfAllowed(){let e=this.prodParam.hasAwait;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e,t){let n=e.index;this.setLoc(e);let r=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(U.AwaitExpressionFormalParameter,n),this.eat(51)&&this.raise(U.ObsoleteAwaitStar,e),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),t||(r.argument=this.parseMaybeUnary(null,!0)),this.finishNode(r,`AwaitExpression`)}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return e===49||e===6||e===0||hP(e)||e===98&&!this.state.containsEsc||e===133||e===52||this.hasPlugin(`v8intrinsic`)&&e===50}parseYield(e){this.setLoc(e);let t=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError(U.YieldInParameter,e.index);let n=!1,r=null;if(!this.hasPrecedingLineBreak())switch(n=this.eat(51),this.state.type){case 9:case 135:case 4:case 7:case 1:case 5:case 10:case 8:if(!n)break;default:r=this.parseMaybeAssign()}return t.delegate=n,t.argument=r,this.finishNode(t,`YieldExpression`)}parseImportCall(e){this.next();let t=this.parseCallExpressionArguments();if(t.length===0||t.length>2)this.raise(U.ImportCallArity,e,e);else for(let n of t)n.type===`SpreadElement`&&this.raise(U.ImportCallSpreadArgument,n,e);return e.source=t[0],e.options=t[1]??null,this.finishNode(e,`ImportExpression`)}withTopicBindingContext(e){let t=this.state.inHackPipelineBody;this.state.inHackPipelineBody=!0;let n=this.state.seenTopicReference;this.state.seenTopicReference=!1;try{return e()}finally{this.state.inHackPipelineBody=t,this.state.seenTopicReference=n}}allowInAnd(e){let t=this.prodParam.currentFlags();if(24&~t){this.prodParam.enter(t|24);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let t=this.prodParam.currentFlags(),n=8&t,r=16&~t;if(n||r){this.prodParam.enter(t&-9|16);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.seenTopicReference=!0}topicReferenceIsAllowedInCurrentContext(){return this.state.inHackPipelineBody}topicReferenceWasUsedInCurrentContext(){return this.state.seenTopicReference}parseFSharpPipelineBody(e){let t=this.state.startLoc;this.prodParam.enter(this.prodParam.currentFlags()&-17);let n;if(this.isContextual(92)&&this.recordAwaitIfAllowed()){this.next(),n=this.parseAwait(t,!0);let e=this.state.type;sP(e)&&e!==35&&(this.prodParam.hasIn||e!==54)&&this.raise(U.PipelineUnparenthesized,t)}else this.state.canStartArrow=!0,n=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.prodParam.exit(),n}parseModuleExpression(){this.expectPlugin(`moduleBlocks`);let e=this.startNode();this.next(),this.match(2)||this.unexpected(null,2);let t=this.startNodeAt(this.state.endLoc);this.next();let n=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,4,`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(84)){let n=this.lookaheadCharCode();if(n===44||n===(e===1?93:e===4?125:41)||n===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(t))}return this.parseMaybeAssignAllowIn(t,n)}parsePropertyNamePrefixOperator(e){}};const YF={kind:1},XF={kind:2},ZF=/[\uD800-\uDFFF]/u,QF=/in(?:stanceof)?/y;function $F(e){for(let t=0;t<e.length;t++){let n=e[t],{type:r}=n;typeof r==`number`&&(n.type=gP(r))}return e}var eI=class extends JF{parseTopLevel(e,t){return e.program=this.parseProgram(t,135,this.options.sourceType===`module`?`module`:`script`),e.comments=this.comments,this.optionFlags&512&&(e.tokens=$F(this.tokens)),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(U.ModuleExportUndefined,t,{localName:e});this.addExtra(e,`topLevelAwait`,this.state.hasTopLevelAwait)}let r;return r=t===135?this.finishNode(e,`Program`):this.finishNodeAt(e,`Program`,CN(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(24))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,`InterpreterDirective`)}isLet(){return this.isContextual(96)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(103)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(103))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(92))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(wP(e)){if(QF.lastIndex=t,QF.test(this.input)){let e=this.codePointAtPos(QF.lastIndex);if(!TP(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(22)&&(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 56:return this.parseBreakContinueStatement(r,!0);case 59:return this.parseBreakContinueStatement(r,!1);case 60:return this.parseDebuggerStatement(r);case 86:return this.parseDoWhileStatement(r);case 87:return this.parseForStatement(r);case 64:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?U.StrictFunction:this.options.annexB?U.SloppyFunctionAnnexB:U.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,!i&&a);case 76:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,r),!0);case 65:return this.parseIfStatement(r);case 66:return this.parseReturnStatement(r);case 67:return this.parseSwitchStatement(r);case 68:return this.parseThrowStatement(r);case 69:return this.parseTryStatement(r);case 92:if(this.isAwaitUsing())return this.allowsUsing()?i?this.recordAwaitIfAllowed()||this.raise(U.AwaitUsingNotInAsyncContext,r):this.raise(U.UnexpectedLexicalDeclaration,r):this.raise(U.UnexpectedUsingDeclaration,r),this.next(),this.parseVarStatement(r,`await using`);break;case 103:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?i||this.raise(U.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(U.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(r,`using`);case 96:{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 71:i||this.raise(U.UnexpectedLexicalDeclaration,this.state.startLoc);case 70:{let e=this.state.value;return this.parseVarStatement(r,e)}case 88:return this.parseWhileStatement(r);case 72:return this.parseWithStatement(r);case 2:return this.parseBlock();case 9:return this.parseEmptyStatement(r);case 79:{let e=this.lookaheadCharCode();if(e===40||e===46)break}case 78:{!(this.optionFlags&8)&&!o&&this.raise(U.UnexpectedImportExport,this.state.startLoc),this.next();let e;return e=n===79?this.parseImport(r):this.parseExport(r,t),this.assertModuleNodeAllowed(e),e}default:if(this.isAsyncFunction())return i||this.raise(U.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!i&&a)}let s=this.state.value,c=this.parseExpression();return q(n)&&c.type===`Identifier`&&this.eat(10)?this.parseLabeledStatement(r,s,c,e):this.parseExpressionStatement(r,c,t)}assertModuleNodeAllowed(e){!(this.optionFlags&8)&&!this.inModule&&this.raise(U.ImportOutsideModule,e)}maybeTakeDecorators(e,t,n){return e&&(t.decorators?.length?(this.raise(U.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),n&&this.resetStartLocationFromNode(n,t)),t}canHaveLeadingDecorator(){return this.match(76)}parseDecorators(e){let t=[];do t.push(this.parseDecorator());while(this.match(22));if(this.match(78))e||this.unexpected();else if(!this.canHaveLeadingDecorator())throw this.raise(U.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(6)){let t=this.state.startLoc;this.next(),n=this.parseExpression(),this.expect(7),n=this.wrapParenthesis(t,n);let r=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(n,t),e.expression!==n&&this.raise(U.DecoratorArgumentsOutsideParentheses,r)}else{for(n=this.parseIdentifier(!1);this.eat(12);){let e=this.startNodeAt(t);e.object=n,this.match(134)?(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 this.state.canStartArrow=!1,e.expression=this.parseExprSubscripts();return this.finishNode(e,`Decorator`)}parseMaybeDecoratorArguments(e,t){if(this.eat(6)){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(U.IllegalBreakContinue,e,{type:n})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,`DebuggerStatement`)}parseHeaderExpression(){this.expect(6);let e=this.parseExpression();return this.expect(7),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(YF),e.body=this.parseStatement(),this.state.labels.pop(),this.expect(88),e.test=this.parseHeaderExpression(),this.eat(9),this.finishNode(e,`DoWhileStatement`)}parseForStatement(e){this.next(),this.state.labels.push(YF);let t=null;if(this.isContextual(92)&&this.recordAwaitIfAllowed()&&(t=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(6),this.match(9))return t!==null&&this.unexpected(t),this.parseFor(e,null);let n=this.isContextual(96);{let r=this.isAwaitUsing(),i=r||this.isForUsing(),a=n&&this.hasFollowingBindingAtom()||i;if(this.match(70)||this.match(71)||a){let n=this.startNode(),a;r?(a=`await using`,this.recordAwaitIfAllowed()||this.raise(U.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(54);return s&&i&&this.raise(U.ForInUsing,o),(s||this.isContextual(98))&&o.declarations.length===1?this.parseForIn(e,o,t):(t!==null&&this.unexpected(t),this.parseFor(e,o))}}let r=this.isContextual(91),i=new HF,a=this.parseExpression(!0,i),o=this.isContextual(98);if(o&&(n&&this.raise(U.ForOfLet,a),t===null&&r&&a.type===`Identifier`&&this.raise(U.ForOfAsync,a)),o||this.match(54)){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(62)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,`IfStatement`)}parseReturnStatement(e){return this.prodParam.hasReturn||this.raise(U.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(2),this.state.labels.push(XF),this.scope.enter(256);let n;for(let e;!this.match(4);)if(this.match(57)||this.match(61)){let r=this.match(57);n&&this.finishNode(n,`SwitchCase`),t.push(n=this.startNode()),n.consequent=[],this.next(),r?n.test=this.parseExpression():(e&&this.raise(U.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),e=!0,n.test=null),this.expect(10)}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(U.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(58)){let t=this.startNode();this.next(),this.match(6)?(this.expect(6),t.param=this.parseCatchClauseParam(),this.expect(7)):(t.param=null,this.scope.enter(0)),t.body=this.parseBlock(!1,!1),this.scope.exit(),e.handler=this.finishNode(t,`CatchClause`)}return e.finalizer=this.eat(63)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(U.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(YF),e.body=this.parseStatement(),this.state.labels.pop(),this.finishNode(e,`WhileStatement`)}parseWithStatement(e){return this.state.strict&&this.raise(U.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=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(U.LabelRedeclaration,n,{labelName:t});let i=aP(this.state.type)?1:this.match(67)?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(2),t&&this.scope.enter(0),this.parseBlockBody(r,e,!1,4,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(9)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(7)?null:this.parseExpression(),this.expect(7),e.body=this.parseStatement(),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,`ForStatement`)}parseForIn(e,t,n){let r=this.match(54);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(U.ForInOfLoopInitializer,t,{type:r?`ForInStatement`:`ForOfStatement`}),t.type===`AssignmentPattern`&&this.raise(U.InvalidLhs,t,{ancestor:{type:`ForStatement`}}),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(7),e.body=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(25)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,e.init===null&&!r&&(e.id.type!==`Identifier`&&!(t&&(this.match(54)||this.isContextual(98)))?this.raise(U.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:`destructuring`}):(n===`const`||n===`using`||n===`await using`)&&!(this.match(54)||this.isContextual(98))&&this.raise(U.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:n})),i.push(this.finishNode(e,`VariableDeclarator`)),!this.eat(8))break}return e}parseVarId(e,t){let n=this.parseBindingAtom();t===`using`||t===`await using`?(n.type===`ArrayPattern`||n.type===`ObjectPattern`)&&this.raise(U.UsingDeclarationHasBindingPattern,n):n.type===`VoidPattern`&&this.raise(U.UnexpectedVoidPattern,n),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);return this.initFunction(e,a),this.match(51)&&(n&&this.raise(U.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),r&&(e.id=this.parseFunctionId(i)),this.scope.enter(514),this.prodParam.enter(BF(a,e.generator)),r||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.parseFunctionBodyAndFinish(e,r?`FunctionDeclaration`:`FunctionExpression`),this.prodParam.exit(),this.scope.exit(),r&&!n&&this.registerFunctionStatementId(e),e}parseFunctionId(e){return e||q(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(6),this.expressionScope.enter(FF()),e.params=this.parseBindingList(7,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.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(25)||this.match(9)||this.match(4)}isClassMethod(){return this.match(6)}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();for(i.body=[],this.expect(2);!this.match(4);){if(this.eat(9)){if(r.length>0)throw this.raise(U.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(22)){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.decorators&&e.decorators.length>0&&(this.hasPlugin(`typescript`)&&(this.hasPlugin(`estree`)?e.type===`TSAbstractMethodDefinition`:e.type===`TSDeclareMethod`)&&this.raise(U.DecoratorAbstractMethod,e),e.kind===`constructor`&&this.raise(U.DecoratorConstructor,e))}if(this.state.strict=t,this.next(),r.length)throw this.raise(U.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(102);if(r){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(2)){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(51)){l.kind=`method`;let t=this.match(134);if(this.parseClassElementName(l),this.parsePostMemberNameModifiers(l),t){this.pushClassPrivateMethod(e,a,!0,!1);return}this.isNonstaticConstructor(i)&&this.raise(U.ConstructorIsGenerator,i.key),this.pushClassMethod(e,i,!0,!1,!1,!1);return}let d=!this.state.containsEsc&&q(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(U.DuplicateConstructor,f),r&&this.hasPlugin(`typescript`)&&t.override&&this.raise(U.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(51);u.optional&&this.unexpected(h),l.kind=`method`;let n=this.match(134);this.parseClassElementName(l),this.parsePostMemberNameModifiers(u),n?this.pushClassPrivateMethod(e,a,t,!0):(this.isNonstaticConstructor(i)&&this.raise(U.ConstructorIsAsync,i.key),this.pushClassMethod(e,i,t,!0,!1,!1))}else if((p===`get`||p===`set`)&&!(this.match(51)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(f),l.kind=p;let t=this.match(134);this.parseClassElementName(i),t?this.pushClassPrivateMethod(e,a,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(U.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(134);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===128||t===130)&&e.static&&n===`prototype`&&this.raise(U.StaticPrototype,this.state.startLoc),t===134){n===`constructor`&&this.raise(U.ConstructorClassPrivateField,this.state.startLoc);let t=this.parsePrivateName();return e.key=t,t}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,t){this.scope.enter(720);let n=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let r=t.body=[];this.parseBlockOrModuleBlockBody(r,void 0,!1,4),this.prodParam.exit(),this.scope.exit(),this.state.labels=n,e.body.push(this.finishNode(t,`StaticBlock`)),t.decorators?.length&&this.raise(U.DecoratorStaticBlock,t)}pushClassProperty(e,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(U.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.start)}pushClassAccessorProperty(e,t,n){!n&&!t.computed&&this.nameIsConstructor(t.key)&&this.raise(U.ConstructorClassField,t.key);let r=this.parseClassAccessorProperty(t);e.body.push(r),n&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.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.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(RF()),this.prodParam.enter(0),e.value=this.eat(25)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,n,r=8331){if(q(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,r);else if(n||!t)e.id=null;else throw this.raise(U.MissingClassName,this.state.startLoc)}parseClassSuper(e){this.eat(77)?(this.state.canStartArrow=!1,e.superClass=this.parseExprSubscripts()):e.superClass=null}parseExport(e,t){let n=this.parseMaybeImportPhase(e,!0),r=this.maybeParseExportDefaultSpecifier(e,n),i=!r||this.eat(8),a=i&&this.eatExportStar(e),o=a&&this.maybeParseExportNamespaceSpecifier(e),s=i&&(!o||this.eat(8)),c=r||a;if(a&&!o){if(r&&this.unexpected(),t)throw this.raise(U.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,2),o&&s&&this.unexpected(null,94);let u;if(c||l){if(u=!1,t)throw this.raise(U.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(U.UnsupportedDecoratorExport,e);return this.sawUnambiguousESM=!0,this.finishNode(n,`ExportNamedDeclaration`)}if(this.eat(61)){let n=e,r=this.parseExportDefaultExpression();if(n.declaration=r,r.type===`ClassDeclaration`)this.maybeTakeDecorators(t,r,n);else if(t)throw this.raise(U.UnsupportedDecoratorExport,e);return this.checkExport(n,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(n,`ExportDefaultDeclaration`)}throw this.unexpected(null,2)}eatExportStar(e){return this.eat(51)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin(`exportDefaultFrom`,t?.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(89)){e.specifiers??=[];let t=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),t.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(t,`ExportNamespaceSpecifier`)),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(2)){let t=e;t.specifiers||=[];let n=t.exportKind===`type`;return t.specifiers.push(...this.parseExportSpecifiers(n)),t.source=null,t.attributes=[],t.declaration=null,!0}return!1}maybeParseExportDeclaration(e){return this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.attributes=[],e.declaration=this.parseExportDeclaration(e),!0):!1}isAsyncFunction(){if(!this.isContextual(91))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,`function`)}parseExportDefaultExpression(){let e=this.startNode();if(this.match(64))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(76))return this.parseClass(e,!0,!0);if(this.match(22))return this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(71)||this.match(70)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(U.UnsupportedDefaultExport,this.state.startLoc);let t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(76)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(q(e)){if(e===91&&!this.state.containsEsc||e===96)return!1;if((e===126||e===125)&&!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(61))return!1;let t=this.nextTokenStart(),n=this.isUnparsedContextual(t,`from`);if(this.input.charCodeAt(t)===44||q(this.state.type)&&n)return!0;if(this.match(61)&&n){let e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return e===34||e===39}return!1}parseExportFrom(e,t){this.eatContextual(94)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return e===22&&(this.expectOnePlugin([`decorators`,`decorators-legacy`]),this.hasPlugin(`decorators`))?!0:this.isUsing()||this.isAwaitUsing()?(this.raise(U.UsingDeclarationExport,this.state.startLoc),!0):e===70||e===71||e===64||e===76||this.isLet()||this.isAsyncFunction()}checkExport(e,t,n,r){if(t){if(n){if(this.checkDuplicateExports(e,`default`),this.hasPlugin(`exportDefaultFrom`)){let t=e.declaration;t.type===`Identifier`&&t.name===`from`&&t.end-t.start===4&&!t.extra?.parenthesized&&this.raise(U.ExportDefaultFromAsIdentifier,t)}}else if(e.specifiers?.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.start,!0,!1),this.scope.checkLocalExport(e)):this.raise(U.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(U.DuplicateDefaultExport,e):this.raise(U.DuplicateExport,e,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){let t=[],n=!0;for(this.expect(2);!this.eat(4);){if(n)n=!1;else if(this.expect(8),this.eat(4))break;let r=this.isContextual(126),i=this.match(130),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(89)?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(130)){let e=this.parseStringLiteral(this.state.value),t=ZF.exec(e.value);return t&&this.raise(U.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}checkImportPhase(e){let{specifiers:t}=e,n=t.length===1?t[0].type:null;e.phase===`source`?n!==`ImportDefaultSpecifier`&&this.raise(U.SourcePhaseImportRequiresDefault,t[0]):e.phase===`defer`&&n!==`ImportNamespaceSpecifier`&&this.raise(U.DeferImportRequiresNamespace,t[0])}isPotentialImportPhase(e){return e?!1:this.isContextual(101)||this.isContextual(93)}applyImportPhase(e,t,n,r){t||(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($N(i)?i!==94||this.lookaheadCharCode()===102:i!==8)?(this.applyImportPhase(e,t,r,n.start),null):(this.applyImportPhase(e,t,null),this.createIdentifier(n,r))}isPrecedingIdImportPhase(e){let{type:t}=this.state;return q(t)?t!==94||this.lookaheadCharCode()===102:t!==8}parseImport(e){return this.match(130)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];let n=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(8),r=n&&this.maybeParseStarImportSpecifier(e);return n&&!r&&this.parseNamedImportSpecifiers(e),this.expectContextual(94),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){return e.specifiers??=[],e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportPhase(e),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(e,`ImportDeclaration`)}parseImportSource(){return this.match(130)||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(2);let e=[],t=new Set;do{if(this.match(4))break;let n=this.startNode(),r=this.state.value;if(t.has(r)&&this.raise(U.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),t.add(r),this.match(130)?n.key=this.parseStringLiteral(r):n.key=this.parseIdentifier(!0),this.expect(10),!this.match(130))throw this.raise(U.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(n,`ImportAttribute`))}while(this.eat(8));return this.expect(4),e}maybeParseImportAttributes(e){let t;if(this.match(72)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),t=this.parseImportAttributes()}else 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($N(this.state.type))return this.parseImportSpecifierLocal(e,this.startNode(),`ImportDefaultSpecifier`),!0;return!1}maybeParseStarImportSpecifier(e){if(this.match(51)){let t=this.startNode();return this.next(),this.expectContextual(89),this.parseImportSpecifierLocal(e,t,`ImportNamespaceSpecifier`),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(2);!this.eat(4);){if(t)t=!1;else{if(this.eat(10))throw this.raise(U.DestructureNamedImport,this.state.startLoc);if(this.expect(8),this.eat(4))break}let n=this.startNode(),r=this.match(130),i=this.isContextual(126);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(89))e.local=this.parseIdentifier();else{let{imported:n}=e;if(t)throw this.raise(U.ImportBindingIsString,e,{importName:n.value});this.checkReservedWord(n.name,e.start,!0,!0),e.local||=this.cloneIdentifier(n)}return this.finishImportSpecifier(e,`ImportSpecifier`,i)}isThisParam(e){return e.type===`Identifier`&&e.name===`this`}};const tI=/in(?:stanceof)?|as|satisfies/y;function nI(e){if(e==null)throw Error(`Unexpected ${e} value.`);return e}function rI(e){if(!e)throw Error(`Assert fail`)}const X=IN`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.`,ExportAssignmentInTSNamespace:`An export assignment cannot be used in a namespace.`,ExportInTSNamespace:`Export declarations are not permitted in a namespace.`,ImportAliasHasImportType:`An import alias can not use 'import type'.`,ImportInTSNamespace:`Import declarations in a namespace cannot reference a module.`,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.`,InlineModuleDeclarationMustUseString:"`module ... {}` declarations must have a string name. Use `namespace ... {}` instead.",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.`,NamespaceExportInTSNamespace:`Global module exports may only appear at top level.`,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.`,UnexpectedParameterInitializer:`A parameter initializer is only allowed in a function or constructor implementation.`,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.`,UnexpectedTypeDeclaration:e=>`'${e}' declarations can only be declared inside a block.`,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 iI(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 aI(e){return e===`private`||e===`public`||e===`protected`}function oI(e){return e===`in`||e===`out`}function sI(e){if(e.extra?.parenthesized)return!1;switch(e.type){case`Identifier`:return!0;case`MemberExpression`:return!e.computed&&sI(e.object);case`TSInstantiationExpression`:return sI(e.expression);default:return!1}}const cI=e=>class extends e{getScopeHandler(){return sF}tsIsIdentifier(){return q(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(2)||this.match(51)||this.match(17)||this.match(134)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(102)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(e,t,n){if(!q(this.state.type)&&this.state.type!==54&&this.state.type!==71)return;let r=this.state.value;if(e.includes(r)){if(n&&this.match(102)||t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:n,errorTemplate:r=X.InvalidModifierOnTypeMember},i){let a=(e,t,n,r)=>{t===n&&i[r]&&this.raise(X.InvalidModifiersOrder,e,{orderedModifiers:[n,r]})},o=(e,t,n,r)=>{(i[n]&&t===r||i[r]&&t===n)&&this.raise(X.IncompatibleModifiers,e,{modifiers:[n,r]})};for(;;){let{startLoc:s}=this.state,c=this.tsParseModifier(e.concat(t??[]),n,i.static);if(!c)break;aI(c)?i.accessibility?this.raise(X.DuplicateAccessibilityModifier,s,{modifier:c}):(a(s,c,c,`override`),a(s,c,c,`static`),a(s,c,c,`readonly`),i.accessibility=c):oI(c)?(i[c]&&this.raise(X.DuplicateModifier,s,{modifier:c}),i[c]=!0,a(s,c,`in`,`out`)):(Object.hasOwn(i,c)?this.raise(X.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?.includes(c)&&this.raise(r,s,{modifier:c})}}tsIsListTerminator(e){switch(e){case`EnumMembers`:case`TypeMembers`:return this.match(4);case`HeritageClauseElement`:return this.match(2);case`TupleElementTypes`:return this.match(1);case`TypeParametersOrArguments`:return this.match(44)}}tsParseList(e,t){let n=[];for(;!this.tsIsListTerminator(e);)n.push(t());return n}tsParseDelimitedList(e,t,n){return nI(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(8)){a=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;n&&this.expect(8);return}return r&&(r.value=a),i}tsParseBracketedList(e,t,n,r,i){r||(n?this.expect(0):this.expect(43));let a=this.tsParseDelimitedList(e,t,i);return n?this.expect(1):this.expect(44),a}tsParseImportType(){let e=this.startNode();return this.expect(79),this.expect(6),this.match(130)?e.source=this.parseStringLiteral(this.state.value):(this.raise(X.UnsupportedImportTypeArgument,this.state.startLoc),e.source=this.tsParseNonConditionalType()),this.eat(8)?e.options=this.tsParseImportTypeOptions():e.options=null,this.expect(7),this.eat(12)&&(e.qualifier=this.tsParseEntityName(3)),this.match(43)&&(e.typeArguments=this.tsParseTypeArguments()),this.finishNode(e,`TSImportType`)}tsParseImportTypeOptions(){let e=this.startNode();this.expect(2);let t=this.startNode();return this.isContextual(72)?(t.method=!1,t.key=this.parseIdentifier(!0),t.computed=!1,t.shorthand=!1):this.unexpected(null,72),this.expect(10),t.value=this.tsParseImportTypeWithPropertyValue(),e.properties=[this.finishObjectProperty(t)],this.eat(8),this.expect(4),this.finishNode(e,`ObjectExpression`)}tsParseImportTypeWithPropertyValue(){let e=this.startNode(),t=[];for(this.expect(2);!this.match(4);){let e=this.state.type;q(e)||e===130?t.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(8)}return e.properties=t,this.next(),this.finishNode(e,`ObjectExpression`)}tsParseEntityName(e){let t;if(e&1&&this.match(74))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(12);){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(43)&&(e.typeArguments=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(83),this.match(79)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(43)&&(e.typeArguments=this.tsParseTypeArguments()),this.finishNode(e,`TSTypeQuery`)}tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:[`in`,`out`],disallowedModifiers:[`const`,`public`,`private`,`protected`,`readonly`,`declare`,`abstract`,`override`],errorTemplate:X.InvalidModifierOnTypeParameter});tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:[`const`],disallowedModifiers:[`in`,`out`],errorTemplate:X.InvalidModifierOnTypeParameterPositions});tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:[`in`,`out`,`const`],disallowedModifiers:[`public`,`private`,`protected`,`readonly`,`declare`,`abstract`,`override`],errorTemplate:X.InvalidModifierOnTypeParameter});tsParseTypeParameter(e){let t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(77),t.default=this.tsEatThenParseType(25),this.finishNode(t,`TSTypeParameter`)}tsTryParseTypeParameters(e){if(this.match(43))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let t=this.startNode();this.match(43)||this.match(138)?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(X.EmptyTypeParameters,t),n.value!==-1&&this.addExtra(t,`trailingComma`,n.value),this.finishNode(t,`TSTypeParameterDeclaration`)}tsFillSignature(e,t){let n=e===15;t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(6),t.params=this.tsParseBindingListForSignature(),(n||this.match(e))&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(7,41,2);for(let t of e){let{type:e}=t;(e===`AssignmentPattern`||e===`TSParameterProperty`)&&this.raise(X.UnsupportedSignatureParameterKind,t,{type:e})}return e}tsParseTypeMemberSemicolon(){!this.eat(8)&&!this.isLineTerminator()&&this.expect(9)}tsParseSignatureMember(e,t){return this.tsFillSignature(10,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),q(this.state.type)?(this.next(),this.match(10)):!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(1),e.parameters=[t];let n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(e,`TSIndexSignature`)}tsParsePropertyOrMethodSignature(e,t){if(this.eat(13)&&(e.optional=!0),this.match(6)||this.match(43)){t&&this.raise(X.ReadonlyForMethodSignature,e);let n=e;if(n.kind&&this.match(43)&&this.raise(X.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(10,n),this.tsParseTypeMemberSemicolon(),n.kind===`get`)n.params.length>0&&(this.raise(U.BadGetterArity,this.state.curPosition()),this.isThisParam(n.params[0])&&this.raise(X.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(n.kind===`set`){if(n.params.length!==1)this.raise(U.BadSetterArity,this.state.curPosition());else{let e=n.params[0];this.isThisParam(e)&&this.raise(X.AccessorCannotDeclareThisParameter,this.state.curPosition()),e.type===`Identifier`&&e.optional&&this.raise(X.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),e.type===`RestElement`&&this.raise(X.SetAccessorCannotHaveRestParameter,this.state.curPosition())}n.returnType&&this.raise(X.SetAccessorCannotHaveReturnType,n.returnType)}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(6)||this.match(43))return this.tsParseSignatureMember(`TSCallSignatureDeclaration`,e);if(this.match(73)){let t=this.startNode();return this.next(),this.match(6)||this.match(43)?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(6)&&!this.match(43)&&this.unexpected(null,6)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,`TSTypeLiteral`)}tsParseObjectTypeMembers(){this.expect(2);let e=this.tsParseList(`TypeMembers`,this.tsParseTypeMember.bind(this));return this.expect(4),e}tsIsStartOfMappedType(){return this.next(),this.eat(49)?this.isContextual(118):(this.isContextual(118)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(54)))}tsParseMappedType(){let e=this.startNode();return this.expect(2),this.match(49)?(e.readonly=this.state.value,this.next(),this.expectContextual(118)):this.eatContextual(118)&&(e.readonly=!0),this.expect(0),e.key=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(54),e.nameType=this.eatContextual(89)?this.tsParseType():null,this.expect(1),this.match(49)?(e.optional=this.state.value,this.next(),this.expect(13)):this.eat(13)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(4),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(X.OptionalTypeBeforeRequired,e),t||=n===`TSNamedTupleMember`&&e.optional||n===`TSOptionalType`}),this.finishNode(e,`TSTupleType`)}tsParseTupleElementType(){let e=this.state.startLoc,t=this.eat(17),{startLoc:n}=this.state,r,i,a,o,s=$N(this.state.type)?this.lookaheadCharCode():null;if(s===58)r=!0,a=!1,i=this.parseIdentifier(!0),this.expect(10),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(13),this.expect(10),o=this.tsParseType()):(r=!1,o=t,this.expect(13))}else o=this.tsParseType(),a=this.eat(13),r=this.eat(10);if(r){let e;i?(e=this.startNodeAt(n),e.optional=a,e.label=i,e.elementType=o,this.eat(13)&&(e.optional=!0,this.raise(X.TupleOptionalAfterType,this.state.lastTokStartLoc))):(e=this.startNodeAt(n),e.optional=a,this.raise(X.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(6),e.typeAnnotation=this.tsParseType(),this.expect(7),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(15,n)),this.finishNode(n,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 131:case 132:case 130:case 81:case 82:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,`TSLiteralType`)}tsParseTemplateLiteralType(){let e=this.state.startLoc,t=this.parseTemplateElement(!1),n=[t];if(t.tail){let t=this.startNodeAt(e),r=this.startNodeAt(e);return r.expressions=[],r.quasis=n,t.literal=this.finishNode(r,`TemplateLiteral`),this.finishNode(t,`TSLiteralType`)}else{let r=[];for(;!t.tail;)r.push(this.tsParseType()),this.readTemplateContinuation(),n.push(t=this.parseTemplateElement(!1));let i=this.startNodeAt(e);return i.types=r,i.quasis=n,this.finishNode(i,`TSTemplateLiteralType`)}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(112)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 130:case 131:case 132:case 81:case 82:return this.tsParseLiteralTypeNode();case 49:if(this.state.value===`-`){let e=this.startNode(),t=this.lookahead();return t.type!==131&&t.type!==132&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,`TSLiteralType`)}break;case 74:return this.tsParseThisTypeOrThisTypePredicate();case 83:return this.tsParseTypeQuery();case 79:return this.tsParseImportType();case 2:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 6:if(!(this.optionFlags&2048)){let e=this.state.startLoc;this.next();let t=this.tsParseType();return this.expect(7),this.addExtra(t,`parenthesized`,!0),this.addExtra(t,`parenStart`,e.index),t}return this.tsParseParenthesizedType();case 21:case 20:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(q(e)||e===84||e===80){let t=e===84?`TSVoidKeyword`:e===80?`TSNullKeyword`:iI(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(1)){let n=this.startNodeAt(e);n.elementType=t,this.expect(1),t=this.finishNode(n,`TSArrayType`)}else{let n=this.startNodeAt(e);n.objectType=t,n.indexType=this.tsParseType(),this.expect(1),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(X.UnexpectedReadonly,e)}}tsParseInferType(){let e=this.startNode();this.expectContextual(111);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(77)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(13))return e}}tsParseTypeOperatorOrHigher(){return uP(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(111)?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),41)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType(`TSUnionType`,this.tsParseIntersectionTypeOrHigher.bind(this),39)}tsIsStartOfFunctionType(){return this.match(43)?!0:this.match(6)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(q(this.state.type)||this.match(74))return this.next(),!0;if(this.match(2)){let{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(4,!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(1,93,1),e.length===t}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(7)||this.match(17)||this.tsSkipParameterStart()&&(this.match(10)||this.match(8)||this.match(13)||this.match(25)||this.match(7)&&(this.next(),this.match(15))))}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(74)){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(10))return this.tsParseTypeOrTypePredicateAnnotation(10)}tsTryParseTypeAnnotation(){if(this.match(10))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(10)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(112)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==105)return!1;let e=this.state.containsEsc;return this.next(),!q(this.state.type)&&!this.match(74)?!1:(e&&this.raise(U.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:`asserts`}),!0)}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType(()=>{e&&this.expect(10),t.typeAnnotation=this.tsParseType()}),this.finishNode(t,`TSTypeAnnotation`)}tsParseType(){rI(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(77))return e;let t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(13),t.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(10),t.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(t,`TSConditionalType`)}isAbstractConstructorSignature(){return this.isContextual(120)&&this.isLookaheadContextual(`new`)}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType(`TSFunctionType`):this.match(73)?this.tsParseFunctionOrConstructorType(`TSConstructorType`):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType(`TSConstructorType`,!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption(`typescript`,`disallowAmbiguousJSXLike`)&&this.raise(X.ReservedTypeAssertion,this.state.startLoc);let e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(71)?this.tsParseTypeReference():this.tsParseType())),this.expect(44),e.expression=this.parseMaybeUnary(),this.finishNode(e,`TSTypeAssertion`)}tsParseHeritageClause(e){let t=this.state.startLoc,n=this.tsParseDelimitedList(`HeritageClauseElement`,()=>{let t=(this.state.canStartArrow=!1,super.parseExprSubscripts());sI(t)||this.raise(X.InvalidHeritageClauseType,t.start,{token:e});let n=e===`extends`?`TSInterfaceHeritage`:`TSClassImplements`;if(t.type===`TSInstantiationExpression`)return t.type=n,t;let r=this.startNodeAtNode(t);return r.expression=t,(this.match(43)||this.match(47))&&(r.typeArguments=this.tsParseTypeArgumentsInExpression()),this.finishNode(r,n)});return n.length||this.raise(X.EmptyHeritageClauseType,t,{token:e}),n}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(125),t.declare&&(e.declare=!0),q(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(X.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(77)&&(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(25),this.isContextual(110)&&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()!==J.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(130)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(25)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,`TSEnumMember`)}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(122),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),e.body=this.tsParseEnumBody(),this.finishNode(e,`TSEnumDeclaration`)}tsParseEnumBody(){let e=this.startNode();return this.expect(2),e.members=this.tsParseDelimitedList(`EnumMembers`,this.tsParseEnumMember.bind(this)),this.expect(4),this.finishNode(e,`TSEnumBody`)}tsParseModuleBlock(e){let t=this.startNode();return e||this.scope.enter(0),this.expect(2),super.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,4),e||this.scope.exit(),this.finishNode(t,`TSModuleBlock`)}tsParseNamespaceDeclaration(e){return e.id=this.tsParseEntityName(0),e.id.type===`Identifier`&&this.checkIdentifier(e.id,1024),this.scope.enter(2048),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(!1),this.prodParam.exit(),this.scope.exit(),this.finishNode(e,`TSModuleDeclaration`)}tsParseAmbientExternalModuleDeclaration(e){let t=this.isContextual(108);return t?(e.kind=`global`,e.id=this.parseIdentifier()):(e.kind=`module`,e.id=super.parseStringLiteral(this.state.value)),this.match(2)?(t||this.scope.enter(1024),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(t),this.prodParam.exit(),t||this.scope.exit()):this.semicolon(),this.finishNode(e,`TSModuleDeclaration`)}tsParseImportEqualsDeclaration(e,t){e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(25);let n=this.tsParseModuleReference();return e.importKind===`type`&&n.type!==`TSExternalModuleReference`&&this.raise(X.ImportAliasHasImportType,n),e.moduleReference=n,this.semicolon(),this.finishNode(e,`TSImportEqualsDeclaration`)}tsIsExternalModuleReference(){return this.isContextual(115)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(115),this.expect(6),this.match(130)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(7),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 64:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 76:return e.declare=!0,this.parseClass(e,!0,!1);case 122:return this.tsParseEnumDeclaration(e,{declare:!0});case 108:return this.tsParseAmbientExternalModuleDeclaration(e);case 96:if(this.state.containsEsc)return;case 71:case 70:return!this.match(71)||!this.isLookaheadContextual(`enum`)?(e.declare=!0,this.parseVarStatement(e,this.state.value,!0)):(this.expect(71),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 103:if(this.isUsing())return this.raise(X.InvalidModifierOnUsingDeclaration,this.state.startLoc,`declare`),e.declare=!0,this.parseVarStatement(e,`using`,!0);break;case 92:if(this.isAwaitUsing())return this.raise(X.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,`declare`),e.declare=!0,this.next(),this.parseVarStatement(e,`await using`,!0);break;case 125:{let t=this.tsParseInterfaceDeclaration(e,{declare:!0});if(t)return t}default:if(q(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 120:if(this.tsCheckLineTerminator(n)&&(this.match(76)||q(this.state.type)))return this.tsParseAbstractDeclaration(e,r);break;case 123:if(this.tsCheckLineTerminator(n))return this.tsParseAmbientExternalModuleDeclaration(e);break;case 124:if(this.tsCheckLineTerminator(n)&&q(this.state.type))return e.kind=`namespace`,this.tsParseNamespaceDeclaration(e);break;case 126:if(this.tsCheckLineTerminator(n)&&q(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(43))return;let t=this.tsTryParseAndCatch(()=>{let t=this.startNodeAt(e);return t.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(t),t.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(15),t});if(t)return super.parseArrowExpression(t,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===43)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(43),this.tsParseDelimitedList(`TypeParametersOrArguments`,this.tsParseType.bind(this))))),e.params.length===0?this.raise(X.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===J.brace&&this.reScan_lt_gt(),this.expect(44),this.finishNode(e,`TSTypeParameterInstantiation`)}tsIsDeclarationStart(){return dP(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(e,t){let n=t.length?null: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(X.UnexpectedParameterModifier,n||t[0]);let s=this.state.startLoc,c=this.parseMaybeDefault(s);e&2&&this.parseFunctionParamType(c);let l=this.parseMaybeDefault(s,c);if(i||o||a){let e=n?this.startNodeAt(n):this.startNodeAtNode(t[0]);return t.length?e.decorators=t:this.setLoc(n),i&&(e.accessibility=i),o&&(e.readonly=o),a&&(e.override=a),l.type!==`Identifier`&&l.type!==`AssignmentPattern`&&this.raise(X.UnsupportedParameterPropertyKind,n||t[0]),e.parameter=l,this.finishNode(e,`TSParameterProperty`)}return t.length&&(c.decorators=t),l}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(X.PatternIsOptional,t)}setArrowFunctionParameters(e,t,n){super.setArrowFunctionParameters(e,t,n),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,n=!1){this.match(10)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(10));let r=t===`FunctionDeclaration`?`TSDeclareFunction`:t===`ClassMethod`||t===`ClassPrivateMethod`?`TSDeclareMethod`:void 0;if(r&&!this.match(2)&&this.isLineTerminator()){if(r===`TSDeclareMethod`&&e.kind===`constructor`)for(let t of e.params)t.type===`TSParameterProperty`?this.raise(X.UnexpectedParameterModifier,t):t.type===`AssignmentPattern`&&this.raise(X.UnexpectedParameterInitializer,t);else for(let t of e.params)t.type===`AssignmentPattern`&&this.raise(X.UnexpectedParameterInitializer,t);return this.finishNode(e,r)}return r&&this.state.isAmbientContext&&(this.raise(X.DeclareFunctionHasImplementation,this.state.startLoc),r===`TSDeclareFunction`&&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(X.UnexpectedTypeAnnotation,e.typeAnnotation)})}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t){let n=super.parseArrayLike(e,t);return n.type===`ArrayExpression`&&this.tsCheckForInvalidTypeCasts(n.elements),n}parseSubscript(e,t,n,r){if(!this.hasPrecedingLineBreak()&&this.match(31)){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(14)&&this.lookaheadCharCode()===60){if(n)return r.stop=!0,e;r.optionalChainMember=i=!0,this.next()}if(this.match(43)||this.match(47)){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(6)){a=this.state.curPosition();return}if(hP(this.state.type)){let n=super.parseTaggedTemplateExpression(e,t,r);return n.typeArguments=o,n}if(!n&&this.eat(6)){let n=this.startNodeAt(t);return n.callee=e,n.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(n.arguments),n.typeArguments=o,r.optionalChainMember&&(n.optional=i),this.finishCallExpression(n,r.optionalChainMember)}let s=this.state.type;if(s===44||s===48||s!==6&&s!==89&&s!==116&&nP(s)&&!this.hasPrecedingLineBreak())return;let c=this.startNodeAt(t);return c.expression=e,c.typeArguments=o,this.finishNode(c,`TSInstantiationExpression`)});if(a&&this.unexpected(a,6),o)return o.type===`TSInstantiationExpression`&&((this.match(12)||this.match(14)&&this.lookaheadCharCode()!==40)&&this.raise(X.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(12)&&!this.match(14)&&(o.expression=super.stopParseSubscript(e,r))),o}return super.parseSubscript(e,t,n,r)}parseNewCallee(e){super.parseNewCallee(e);let{callee:t}=e;t.type===`TSInstantiationExpression`&&!t.extra?.parenthesized&&(e.typeArguments=t.typeArguments,e.callee=t.expression)}parseExprOp(e,t,n){let r;if(pP(54)>n&&!this.hasPrecedingLineBreak()&&(this.isContextual(89)||(r=this.isContextual(116)))){let i=this.startNodeAt(t);i.expression=e,i.typeAnnotation=this.tsInType(()=>(this.next(),this.match(71)?(r&&this.raise(U.UnexpectedKeyword,this.state.startLoc,{keyword:`const`}),this.tsParseTypeReference()):this.tsParseType()));let a=this.finishNode(i,r?`TSSatisfiesExpression`:`TSAsExpression`);return this.reScan_lt_gt(),this.parseExprOp(a,t,n)}return super.parseExprOp(e,t,n)}checkReservedWord(e,t,n,r){this.state.isAmbientContext||super.checkReservedWord(e,t,n,r)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(126)){let t=this.lookaheadCharCode();return e?t===123||t===42:t!==61}return!e&&this.isContextual(83)}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(130))return e.importKind=`value`,this.scope.inTSNamespace&&this.raise(X.ImportInTSNamespace,e),super.parseImport(e);let t;if(q(this.state.type)&&this.lookaheadCharCode()===61){e.importKind=`value`;let t=this.tsParseImportEqualsDeclaration(e);return this.scope.inTSNamespace&&t.moduleReference.type===`TSExternalModuleReference`&&this.raise(X.ImportInTSNamespace,e),t}else if(this.isContextual(126)){let n=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.scope.inTSNamespace&&this.raise(X.ImportInTSNamespace,e),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(X.TypeImportCannotSpecifyDefaultAndNamed,t):this.scope.inTSNamespace&&this.raise(X.ImportInTSNamespace,t),t}parseExport(e,t){if(this.match(79)){let t=this.startNode();this.next();let n=null;this.isContextual(126)&&this.isPotentialImportPhase(!1)?n=this.parseMaybeImportPhase(t,!1):t.importKind=`value`;let r=this.tsParseImportEqualsDeclaration(t,n);return e.attributes=[],e.declaration=r,e.exportKind=`value`,e.source=null,e.specifiers=[],this.finishNode(e,`ExportNamedDeclaration`)}else if(this.eat(25)){let t=e;return t.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.scope.inTSNamespace&&this.raise(X.ExportAssignmentInTSNamespace,t),this.finishNode(t,`TSExportAssignment`)}else if(this.eatContextual(89)){let t=e;return this.expectContextual(124),t.id=this.parseIdentifier(),this.checkIdentifier(t.id,8201),this.semicolon(),this.scope.inTSNamespace&&this.raise(X.NamespaceExportInTSNamespace,t),this.finishNode(t,`TSNamespaceExportDeclaration`)}else{let n=super.parseExport(e,t);return this.scope.inTSNamespace&&(n.type!==`ExportNamedDeclaration`||n.source||!n.declaration&&!this.state.isAmbientContext)&&this.raise(X.ExportInTSNamespace,n),n}}isAbstractClass(){return this.isContextual(120)&&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(125)){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(X.UsingDeclarationInAmbientContext,e,t),i;for(let{id:e,init:n}of i.declarations)n&&(t===`var`||t===`let`||e.typeAnnotation?this.raise(X.InitializerNotAllowedInAmbientContext,n):uI(n,this.hasPlugin(`estree`))||this.raise(X.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,n));return i}parseStatementContent(e,t){let n=!!(e&2);if(!this.state.containsEsc)switch(this.state.type){case 71:if(this.isLookaheadContextual(`enum`)){let e=this.startNode();return this.next(),this.tsParseEnumDeclaration(e,{const:!0})}break;case 120:case 121:if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let e=this.state.type,n=this.startNode();this.next();let r=e===121?this.tsTryParseDeclare(n):this.tsParseAbstractDeclaration(n,t);return r?(e===121&&(r.declare=!0),r):(n.expression=this.createIdentifier(this.startNodeAtNode(n),e===121?`declare`:`abstract`),this.semicolon(!1),this.finishNode(n,`ExpressionStatement`))}break;case 122:return this.tsParseEnumDeclaration(this.startNode());case 108:if(this.lookaheadCharCode()===123){let e=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(e)}break;case 125:{let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return n||this.raise(X.UnexpectedTypeDeclaration,e,`interface`),e;break}case 123:if(this.nextTokenIsStringLiteralOnSameLine()){let e=this.startNode();return this.next(),this.tsParseDeclaration(e,123,!1,t)}else if(this.nextTokenIsIdentifierOnSameLine()){this.raise(X.InlineModuleDeclarationMustUseString,this.state.startLoc);let e=this.startNode();return this.next(),this.tsParseDeclaration(e,124,!1,t)}break;case 124:if(this.nextTokenIsIdentifierOnSameLine()){let e=this.startNode();return this.next(),this.tsParseDeclaration(e,124,!1,t)}break;case 126:if(this.nextTokenIsIdentifierOnSameLine()){let e=this.startNode();return n||this.raise(X.UnexpectedTypeDeclaration,e,`type`),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=>aI(t)?e.accessibility===t:!!e[t])}tsIsStartOfStaticBlocks(){return this.isContextual(102)&&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:X.InvalidModifierOnTypeParameterPositions},t);let i=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,r)&&this.raise(X.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(X.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(X.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(X.IndexSignatureHasDeclare,t),t.override&&this.raise(X.IndexSignatureHasOverride,t);return}!this.state.inAbstractClass&&t.abstract&&this.raise(X.NonAbstractClassHasAbstractMethod,t),t.override&&(n.hadSuperClass||this.raise(X.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,n,r)}parsePostMemberNameModifiers(e){this.eat(13)&&(e.optional=!0),e.readonly&&this.match(6)&&this.raise(X.ClassMethodHasReadonly,e),e.declare&&this.match(6)&&this.raise(X.ClassMethodHasDeclare,e)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,t,n){if(!this.match(13))return e;if(n!=null){let t=this.lookaheadCharCode();if(t===44||t===61||t===58||t===41)return this.setOptionalParametersError(n),e}this.next();let r=this.startNodeAt(t);r.test=e;let i=this.state.inConditionalConsequent;return this.state.inConditionalConsequent=!0,r.consequent=this.parseMaybeAssignAllowIn(),this.state.inConditionalConsequent=i,this.expect(10),r.alternate=this.parseMaybeAssign(),this.finishNode(r,`ConditionalExpression`)}parseParenItem(e,t){let n=super.parseParenItem(e,t);if(this.eat(13)&&(n.optional=!0,this.resetEndLocation(e)),this.match(10)){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(121))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let t=this.state.startLoc,n=this.eatContextual(121);if(n&&(this.isContextual(121)||!this.shouldParseExportDeclaration()))throw this.raise(X.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let r=q(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(109)){e.id=null;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(31)?e.definite=!0:this.eat(13)&&(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(25)&&this.raise(X.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(25)){let{key:t}=e;this.raise(X.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(X.PrivateElementHasAbstract,e),e.accessibility&&this.raise(X.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(X.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,n,r,i,a){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&i&&this.raise(X.ConstructorHasTypeParameters,o);let{declare:s=!1,kind:c}=t;s&&(c===`get`||c===`set`)&&this.raise(X.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.typeArguments;this.takeSurroundingComments(r,r.start,r.end),e.superClass=n,e.superTypeArguments=r}else (this.match(43)||this.match(47))&&(e.superTypeArguments=this.tsParseTypeArgumentsInExpression());this.eatContextual(109)&&(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(31)&&(e.definite=!0);let n=this.tsTryParseTypeAnnotation();n&&(e.id.typeAnnotation=n,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(10)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){let n,r,i;if(this.hasPlugin(`jsx`)&&(this.match(138)||this.match(43))){if(n=this.state.clone(),r=this.tryParse(()=>super.parseMaybeAssign(e,t),n),!r.error)return r.node;let{context:i}=this.state,a=i[i.length-1];(a===J.j_oTag||a===J.j_expr)&&i.pop()}if(!r?.error&&!this.match(43))return super.parseMaybeAssign(e,t);(!n||n===this.state)&&(n=this.state.clone());let a,o=this.tryParse(n=>{a=this.tsParseTypeParameters(this.tsParseConstModifier);let r=super.parseMaybeAssign(e,t);if((r.type!==`ArrowFunctionExpression`||r.extra?.parenthesized)&&n(),a?.params.length!==0&&this.resetStartLocationFromNode(r,a),r.typeParameters=a,this.hasPlugin(`jsx`)&&r.typeParameters.params.length===1&&!r.typeParameters.extra?.trailingComma){let e=r.typeParameters.params[0];e.constraint||this.raise(X.SingleTypeParameterWithoutTrailingComma,this.optionFlags&256?CN(e.loc.end,1):e,{typeParameterName:e.name.name})}return r},n);if(!o.error&&!o.aborted)return a&&this.reportReservedArrowTypeParam(a),o.node;if(!r&&(rI(!this.hasPlugin(`jsx`)),i=this.tryParse(()=>super.parseMaybeAssign(e,t),n),!i.error))return i.node;if(r?.node)return this.state=r.failState,r.node;if(o.node)return this.state=o.failState,a&&this.reportReservedArrowTypeParam(a),o.node;if(i?.node)return this.state=i.failState,i.node;throw r?.error||o.error||i?.error}reportReservedArrowTypeParam(e){e.params.length===1&&!e.params[0].constraint&&!e.extra?.trailingComma&&this.getPluginOption(`typescript`,`disallowAmbiguousJSXLike`)&&this.raise(X.ReservedArrowTypeParam,e)}parseMaybeUnary(e,t){return!this.hasPlugin(`jsx`)&&this.match(43)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(10)){let t=this.tryParse(e=>{let t=this.tsParseTypeOrTypePredicateAnnotation(10);return(this.canInsertSemicolon()||!this.match(15))&&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(13)&&(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(X.UnexpectedTypeCastInParameter,e):this.raise(X.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===74?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e,t){if(this.match(43)||this.match(47)){let n=this.tsParseTypeArgumentsInExpression();if(this.match(6)){let r=super.parseMaybeDecoratorArguments(e,t);return r.typeArguments=n,r}this.unexpected(null,6)}return super.parseMaybeDecoratorArguments(e,t)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(8)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(43)||super.isClassMethod()}isClassProperty(){return this.match(31)||this.match(10)||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(X.TypeAnnotationAfterAssign,n.typeAnnotation),n}getTokenFromCode(e){if(this.state.inType){if(e===62){this.finishOp(44,1);return}if(e===60){this.finishOp(43,1);return}}super.getTokenFromCode(e)}reScan_lt_gt(){let{type:e}=this.state;e===43?(--this.state.pos,this.readToken_lt()):e===44&&(--this.state.pos,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return e===47?(this.state.pos-=2,this.finishOp(43,1),43):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.resetEndLocationFromNode(e.expression,e.typeAnnotation),e.expression}shouldParseArrow(e){return this.match(10)?e.every(e=>this.isAssignable(e,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(10)?!this.state.inConditionalConsequent:super.shouldParseAsyncArrow()}parseParenAndDistinguishExpression(e){let t=this.state.inConditionalConsequent;this.state.inConditionalConsequent=!1;let n=super.parseParenAndDistinguishExpression(e);return this.state.inConditionalConsequent=t,n}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(43)||this.match(47)){let t=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());t&&(e.typeArguments=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(76))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(125))return this.hasFollowingLineBreak()?null:(e.abstract=!0,this.raise(X.NonClassMethodPropertyHasAbstractModifier,e),this.tsParseInterfaceDeclaration(e));throw this.unexpected(null,76)}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(X.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()}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.start;if(this.isContextual(89)){let e=this.parseIdentifier();if(this.isContextual(89)){let n=this.parseIdentifier();$N(this.state.type)?(s=!0,a=e,o=t?this.parseIdentifier():this.parseModuleExportName(),c=!1):(o=n,c=!1)}else $N(this.state.type)?(c=!1,o=t?this.parseIdentifier():this.parseModuleExportName()):(s=!0,a=e)}else $N(this.state.type)&&(s=!0,t?(a=this.parseIdentifier(!0),this.isContextual(89)||this.checkReservedWord(a.name,a.start,!0,!0)):a=this.parseModuleExportName());s&&n&&this.raise(t?X.TypeModifierIsUsedInTypeImports:X.TypeModifierIsUsedInTypeExports,l),e[r]=a,e[i]=o;let u=t?`importKind`:`exportKind`;e[u]=s?`type`:`value`,c&&this.eatContextual(89)&&(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,e.typeArguments??=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(wP(e)){if(tI.lastIndex=t,tI.test(this.input)){let e=this.codePointAtPos(tI.lastIndex);if(!TP(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)}nextTokenIsStringLiteralOnSameLine(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return t===34||t===39}};function lI(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:pI(e.object)}function uI(e,t){let{type:n}=e;if(e.extra?.parenthesized)return!1;if(t){if(n===`Literal`){let{value:t}=e;if(typeof t==`string`||typeof t==`boolean`)return!0}}else if(n===`StringLiteral`||n===`BooleanLiteral`)return!0;return!!(dI(e,t)||fI(e,t)||n===`TemplateLiteral`&&e.expressions.length===0||lI(e))}function dI(e,t){return t?e.type===`Literal`&&(typeof e.value==`number`||`bigint`in e):e.type===`NumericLiteral`||e.type===`BigIntLiteral`}function fI(e,t){if(e.type===`UnaryExpression`){let{operator:n,argument:r}=e;if(n===`-`&&dI(r,t))return!0}return!1}function pI(e){return e.type===`Identifier`?!0:e.type!==`MemberExpression`||e.computed?!1:pI(e.object)}const mI=IN`placeholders`({ClassNameIsRequired:`A class name is required.`,UnexpectedSpace:`Unexpected space in placeholder.`}),hI=e=>class extends e{parsePlaceholder(e){if(this.match(129)){let t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(129),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(129,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){if(t.type!==`Placeholder`||t.extra?.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(10)){let n=e;return n.label=this.finishPlaceholder(t,`Identifier`),this.next(),n.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(n,`LabeledStatement`)}this.semicolon();let n=e;return n.name=t.name,this.finishPlaceholder(n,`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(77)||this.match(129)||this.match(2))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(mI.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(94)&&!this.match(8))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(61)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,`from`)&&this.input.startsWith(fP(129),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){return e.specifiers?.length?!0:super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){let{specifiers:t}=e;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(94)&&!this.match(8))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(8)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(94),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(mI.UnexpectedSpace,this.state.lastTokEndLoc)}},gI=e=>class extends e{parseV8Intrinsic(){if(this.match(50)){let e=this.state.startLoc,t=this.startNode();if(this.next(),q(this.state.type)){let e=this.parseIdentifierName(),n=this.createIdentifier(t,e);if(this.castNodeTo(n,`V8IntrinsicIdentifier`),this.match(6))return n}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},_I=[`fsharp`,`hack`],vI=[`^^`,`@@`,`^`,`%`,`#`];function yI(e){if(e.has(`decorators`)&&e.has(`decorators-legacy`))throw Error(`Cannot use the decorators and decorators-legacy plugin together`);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(!_I.includes(t)){let e=_I.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(!vI.includes(t)){let e=vI.map(e=>`"${e}"`).join(`, `);throw Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${e}.`)}}}if(e.has(`moduleAttributes`))throw Error("`moduleAttributes` has been removed in Babel 8, please migrate to import attributes instead.");if(e.has(`importAssertions`))throw Error("`importAssertions` has been removed in Babel 8, please use import attributes instead.");if(e.has(`deprecatedImportAssert`)?console.warn("`deprecatedImportAssert` has been removed in Babel 8, please use import attributes instead."):e.has(`importAttributes`)&&e.get(`importAttributes`).deprecatedAssertSyntax&&console.warn("The 'importAttributes' plugin has been removed in Babel 8. Please migrate any usage of `assert`-style attributes to `with`."),e.has(`recordAndTuple`))throw Error(`The 'recordAndTuple' plugin has been removed in Babel 8. Please remove it from your configuration.`);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'.`);if(e.has(`decimal`))throw Error(`The 'decimal' plugin has been removed in Babel 8. Please remove it from your configuration.`);if(e.has(`importReflection`))throw Error(`The 'importReflection' plugin has been removed in Babel 8. Use 'sourcePhaseImports' instead, and replace 'import module' with 'import source' in your code.`)}const bI={estree:BN,jsx:aF,flow:JP,typescript:cI,v8intrinsic:gI,placeholders:hI},xI=Object.keys(bI);var SI=class extends eI{constructor(e,t,n){let r=RN(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.locations===!0&&(i|=256),r.tokens&&(i|=512),r.createImportExpressions&&(i|=1024),r.createParenthesizedExpressions&&(i|=2048),r.errorRecovery&&(i|=4096),r.attachComment&&(i|=8192),r.annexB&&(i|=16384),this.optionFlags=i}getScopeHandler(){return zP}parse(){this.enterInitialScopes();let e=this.startNode(),t=this.startNode();this.nextToken(),e.errors=[];let n=this.parseTopLevel(e,t);return n.errors=this.state.errors,n.comments.length=this.state.commentsLen,this.options.locations===`packed`&&(n.locData=OF()),n}};function CI(e,t){if(t?.sourceType===`unambiguous`){t={...t};try{t.sourceType=`module`;let n=TI(t,e),r=n.parse();if(n.sawUnambiguousESM)return r;if(n.ambiguousScriptDifferentAst)try{return t.sourceType=`script`,TI(t,e).parse()}catch{}else r.program.sourceType=`script`;return r}catch(n){try{return t.sourceType=`script`,TI(t,e).parse()}catch{}throw n}}else return TI(t,e).parse()}function wI(e){let t={};for(let n of Object.keys(e))t[n]=gP(e[n]);return t}wI(ZN);function TI(e,t){let n=SI,r=new Map;if(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||{})}yI(r),n=DI(r)}return new n(e,t,r)}const EI=new Map;function DI(e){let t=[];for(let n of xI)e.has(n)&&t.push(n);let n=t.join(`|`),r=EI.get(n);if(!r){r=SI;for(let e of t)r=bI[e](r);EI.set(n,r)}return r}var OI=class{line;column;index;constructor(e,t,n){this.line=e,this.column=t,this.index=n}},kI=class{start;end;filename;identifierName;constructor(e,t){this.start=e,this.end=t}};const AI=`BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED`;var jI={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:AI},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:AI}};const MI={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`},NI=e=>e.type===`UpdateExpression`?MI.UpdateExpression[`${e.prefix}`]:MI[e.type];var PI={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)'.`,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 { ... }'?`,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.`,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()`.",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.`,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 ${NI(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${NI(e)}.`,InvalidLhsOptionalChaining:({ancestor:e})=>`Invalid optional chaining in the left-hand side of ${NI(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.`,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.`,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}.`,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.`,UnexpectedArgumentPlaceholder:`Unexpected argument placeholder.`,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.`},FI={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.`},II={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)}\`.`},LI={PipeTopicRequiresHackPipes:'Topic references are only supported when using the `"proposal": "hack"` version of the pipeline proposal.',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 ${NI({type:e})}; please wrap it in parentheses.`};function RI(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:n})}function zI({toMessage:e,code:t,reasonCode:n,syntaxPlugin:r}){let i=n===`MissingPlugin`||n===`MissingOneOfPlugins`;return function a(o,s){let c=SyntaxError();return c.code=t,c.reasonCode=n,c.loc=o,c.pos=o.index,c.syntaxPlugin=r,i&&(c.missingPlugin=s.missingPlugin),RI(c,`clone`,function(e={}){let{line:t,column:n,index:r}=e.loc??o;return a(new OI(t,n,r),{...s,...e.details})}),RI(c,`details`,s),Object.defineProperty(c,`message`,{configurable:!0,get(){let t=`${e(s)} (${o.line}:${o.column})`;return this.message=t,t},set(e){Object.defineProperty(this,`message`,{value:e,writable:!0})}}),c}}function BI(e,t){if(Array.isArray(e))return t=>BI(t,e[0]);let n={};for(let r of Object.keys(e)){let i=e[r],{message:a,...o}=typeof i==`string`?{message:()=>i}:typeof i==`function`?{message:i}:i;n[r]=zI({code:`BABEL_PARSER_SYNTAX_ERROR`,reasonCode:r,toMessage:typeof a==`string`?()=>a:a,...t?{syntaxPlugin:t}:{},...o})}return n}({...BI(jI),...BI(PI),...BI(FI),...BI(II),...BI`pipelineOperator`(LI)});const{defineProperty:VI}=Object;var HI=class{label;keyword;beforeExpr;startsExpr;rightAssociative;isLoop;isAssign;prefix;postfix;binop;constructor(e,t={}){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}};const UI=new Map;function Z(e,t={}){t.keyword=e;let n=Q(e,t);return UI.set(e,n),n}function WI(e,t){return Q(e,{beforeExpr:!0,binop:t})}let GI=-1;const KI=[],qI=[],JI=[],YI=[],XI=[],ZI=[];function Q(e,t={}){return++GI,qI.push(e),JI.push(t.binop??-1),YI.push(t.beforeExpr??!1),XI.push(t.startsExpr??!1),ZI.push(t.prefix??!1),KI.push(new HI(e,t)),GI}function $(e,t={}){return++GI,UI.set(e,GI),qI.push(e),JI.push(t.binop??-1),YI.push(t.beforeExpr??!1),XI.push(t.startsExpr??!1),ZI.push(t.prefix??!1),KI.push(new HI(`name`,t)),GI}const QI={bracketL:Q(`[`,{beforeExpr:!0,startsExpr:!0}),bracketR:Q(`]`),braceL:Q(`{`,{beforeExpr:!0,startsExpr:!0}),braceBarL:Q(`{|`,{beforeExpr:!0,startsExpr:!0}),braceR:Q(`}`),braceBarR:Q(`|}`),parenL:Q(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:Q(`)`),comma:Q(`,`,{beforeExpr:!0}),semi:Q(`;`,{beforeExpr:!0}),colon:Q(`:`,{beforeExpr:!0}),doubleColon:Q(`::`,{beforeExpr:!0}),dot:Q(`.`),question:Q(`?`,{beforeExpr:!0}),questionDot:Q(`?.`),arrow:Q(`=>`,{beforeExpr:!0}),template:Q(`template`),ellipsis:Q(`...`,{beforeExpr:!0}),backQuote:Q("`",{startsExpr:!0}),dollarBraceL:Q("${",{beforeExpr:!0,startsExpr:!0}),templateTail:Q("...`",{startsExpr:!0}),templateNonTail:Q("...${",{beforeExpr:!0,startsExpr:!0}),at:Q(`@`),hash:Q(`#`,{startsExpr:!0}),interpreterDirective:Q(`#!...`),eq:Q(`=`,{beforeExpr:!0,isAssign:!0}),assign:Q(`_=`,{beforeExpr:!0,isAssign:!0}),slashAssign:Q(`_=`,{beforeExpr:!0,isAssign:!0}),xorAssign:Q(`_=`,{beforeExpr:!0,isAssign:!0}),moduloAssign:Q(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:Q(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),bang:Q(`!`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),tilde:Q(`~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),doubleCaret:Q(`^^`,{startsExpr:!0}),doubleAt:Q(`@@`,{startsExpr:!0}),pipeline:WI(`|>`,0),nullishCoalescing:WI(`??`,1),logicalOR:WI(`||`,1),logicalAND:WI(`&&`,2),bitwiseOR:WI(`|`,3),bitwiseXOR:WI(`^`,4),bitwiseAND:WI(`&`,5),equality:WI(`==/!=/===/!==`,6),lt:WI(`</>/<=/>=`,7),gt:WI(`</>/<=/>=`,7),relational:WI(`</>/<=/>=`,7),bitShift:WI(`<</>>/>>>`,8),bitShiftL:WI(`<</>>/>>>`,8),bitShiftR:WI(`<</>>/>>>`,8),plusMin:Q(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Q(`%`,{binop:10,startsExpr:!0}),star:Q(`*`,{binop:10}),slash:WI(`/`,10),exponent:Q(`**`,{beforeExpr:!0,binop:11,rightAssociative:!0}),_in:Z(`in`,{beforeExpr:!0,binop:7}),_instanceof:Z(`instanceof`,{beforeExpr:!0,binop:7}),_break:Z(`break`),_case:Z(`case`,{beforeExpr:!0}),_catch:Z(`catch`),_continue:Z(`continue`),_debugger:Z(`debugger`),_default:Z(`default`,{beforeExpr:!0}),_else:Z(`else`,{beforeExpr:!0}),_finally:Z(`finally`),_function:Z(`function`,{startsExpr:!0}),_if:Z(`if`),_return:Z(`return`,{beforeExpr:!0}),_switch:Z(`switch`),_throw:Z(`throw`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_try:Z(`try`),_var:Z(`var`),_const:Z(`const`),_with:Z(`with`),_new:Z(`new`,{beforeExpr:!0,startsExpr:!0}),_this:Z(`this`,{startsExpr:!0}),_super:Z(`super`,{startsExpr:!0}),_class:Z(`class`,{startsExpr:!0}),_extends:Z(`extends`,{beforeExpr:!0}),_export:Z(`export`),_import:Z(`import`,{startsExpr:!0}),_null:Z(`null`,{startsExpr:!0}),_true:Z(`true`,{startsExpr:!0}),_false:Z(`false`,{startsExpr:!0}),_typeof:Z(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Z(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Z(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_do:Z(`do`,{isLoop:!0,beforeExpr:!0}),_for:Z(`for`,{isLoop:!0}),_while:Z(`while`,{isLoop:!0}),_as:$(`as`,{startsExpr:!0}),_assert:$(`assert`,{startsExpr:!0}),_async:$(`async`,{startsExpr:!0}),_await:$(`await`,{startsExpr:!0}),_defer:$(`defer`,{startsExpr:!0}),_from:$(`from`,{startsExpr:!0}),_get:$(`get`,{startsExpr:!0}),_let:$(`let`,{startsExpr:!0}),_meta:$(`meta`,{startsExpr:!0}),_of:$(`of`,{startsExpr:!0}),_sent:$(`sent`,{startsExpr:!0}),_set:$(`set`,{startsExpr:!0}),_source:$(`source`,{startsExpr:!0}),_static:$(`static`,{startsExpr:!0}),_using:$(`using`,{startsExpr:!0}),_yield:$(`yield`,{startsExpr:!0}),_asserts:$(`asserts`,{startsExpr:!0}),_checks:$(`checks`,{startsExpr:!0}),_exports:$(`exports`,{startsExpr:!0}),_global:$(`global`,{startsExpr:!0}),_implements:$(`implements`,{startsExpr:!0}),_intrinsic:$(`intrinsic`,{startsExpr:!0}),_infer:$(`infer`,{startsExpr:!0}),_is:$(`is`,{startsExpr:!0}),_mixins:$(`mixins`,{startsExpr:!0}),_proto:$(`proto`,{startsExpr:!0}),_require:$(`require`,{startsExpr:!0}),_satisfies:$(`satisfies`,{startsExpr:!0}),_keyof:$(`keyof`,{startsExpr:!0}),_readonly:$(`readonly`,{startsExpr:!0}),_unique:$(`unique`,{startsExpr:!0}),_abstract:$(`abstract`,{startsExpr:!0}),_declare:$(`declare`,{startsExpr:!0}),_enum:$(`enum`,{startsExpr:!0}),_module:$(`module`,{startsExpr:!0}),_namespace:$(`namespace`,{startsExpr:!0}),_interface:$(`interface`,{startsExpr:!0}),_type:$(`type`,{startsExpr:!0}),_opaque:$(`opaque`,{startsExpr:!0}),name:Q(`name`,{startsExpr:!0}),placeholder:Q(`%%`,{startsExpr:!0}),string:Q(`string`,{startsExpr:!0}),num:Q(`num`,{startsExpr:!0}),bigint:Q(`bigint`,{startsExpr:!0}),regexp:Q(`regexp`,{startsExpr:!0}),privateName:Q(`#name`,{startsExpr:!0}),eof:Q(`eof`),jsxName:Q(`jsxName`),jsxText:Q(`jsxText`,{beforeExpr:!0}),jsxTagStart:Q(`jsxTagStart`,{startsExpr:!0}),jsxTagEnd:Q(`jsxTagEnd`)};function $I(e){return KI[e]}var eL=class{constructor(e,t){this.token=e,this.preserveSpace=!!t}token;preserveSpace};new eL(`{`),new eL(`<tag`),new eL(`</tag`),new eL(`<tag>...</tag>`,!0);let tL=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,nL=`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`;RegExp(`[`+tL+`]`),RegExp(`[`+tL+nL+`]`),tL=nL=null;const rL={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`]};new Set(rL.keyword),new Set(rL.strict),new Set(rL.strictBind),BI`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.",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:{message:`A binding pattern parameter cannot be optional in an implementation signature.`},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.`}),BI`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 <>...</>?`}),class{constructor(e,t,n){this.start=t,this.end=0,this.loc=new kI(n),e?.optionFlags&128&&(this.range=[t,0]),e?.filename&&(this.loc.filename=e.filename)}type=``}.prototype,BI`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'.`,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.`,InlineModuleDeclarationMustUseString:"`module ... {}` declarations must have a string name. Use `namespace ... {}` instead.",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.`}),BI`placeholders`({ClassNameIsRequired:`A class name is required.`,UnexpectedSpace:`Unexpected space in placeholder.`});function iL(e){let t={};for(let n of Object.keys(e))t[n]=$I(e[n]);return t}iL(QI);var aL=class{constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:e=>this.replacement=e}}replace(e,t,n,r){e&&t&&(n==null?e[t]=r:e[t][n]=r)}remove(e,t,n){e&&t&&(n==null?delete e[t]:e[t].splice(n,1))}},oL=class extends aL{constructor(e,t){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:e=>this.replacement=e},this.enter=e,this.leave=t}visit(e,t,n,r){if(e){if(this.enter){let i=this.should_skip,a=this.should_remove,o=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,t,n,r),this.replacement&&(e=this.replacement,this.replace(t,n,r,e)),this.should_remove&&this.remove(t,n,r);let s=this.should_skip,c=this.should_remove;if(this.should_skip=i,this.should_remove=a,this.replacement=o,s)return e;if(c)return null}let i;for(i in e){let t=e[i];if(t&&typeof t==`object`)if(Array.isArray(t)){let n=t;for(let t=0;t<n.length;t+=1){let r=n[t];sL(r)&&(this.visit(r,e,i,t)||t--)}}else sL(t)&&this.visit(t,e,i,null)}if(this.leave){let i=this.replacement,a=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,t,n,r),this.replacement&&(e=this.replacement,this.replace(t,n,r,e)),this.should_remove&&this.remove(t,n,r);let o=this.should_remove;if(this.replacement=i,this.should_remove=a,o)return null}}return e}};function sL(e){return typeof e==`object`&&!!e&&`type`in e&&typeof e.type==`string`}function cL(e,{enter:t,leave:n}){return new oL(t,n).visit(e,null)}function lL(e,t){return e?[].concat(t).some(t=>{switch(t){case`Function`:return fL(e);case`Literal`:return dL(e);case`Expression`:return mL(e);default:return e.type===t}}):!1}function uL(e,t){return gL(e)&&hL(e.name,t)}function dL(e){return!!e&&e.type.endsWith(`Literal`)}function fL(e){return!!e&&!e.type.startsWith(`TS`)&&/Function(?:Expression|Declaration)$|Method$/.test(e.type)}function pL(e){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`:return!0;case`Placeholder`:if(e.expectedNode===`Declaration`)return!0}return!1}function mL(e){return!!e&&(e.type.endsWith(`Expression`)||dL(e)||[`Identifier`,`MetaProperty`,`Super`,`Import`,`JSXElement`,`JSXFragment`,`TopicReference`,`PipelineBareFunction`,`PipelinePrimaryTopicReference`,`TSTypeAssertion`].includes(e.type))}function hL(e,t){return Array.isArray(t)?t.includes(e):typeof t==`function`?t(e):e===t}function gL(e){return!!e&&(e.type===`Identifier`||e.type===`JSXIdentifier`)}function _L(e,t=!1){if(typeof e==`string`)return e;switch(e.type){case`Identifier`:if(t)throw TypeError(`Invalid Identifier`);return e.name;case`PrivateName`:return`#${e.id.name}`;case`ThisExpression`:return`this`;case`Super`:return`super`}return String(vL(e))}function vL(e){switch(e.type){case`TemplateLiteral`:return yL(e);case`NullLiteral`:return null;case`BigIntLiteral`:return BigInt(e.value);case`RegExpLiteral`:return new RegExp(e.pattern,e.flags);case`BooleanLiteral`:case`NumericLiteral`:case`StringLiteral`:return e.value}}function yL(e){return e.quasis.reduce((t,n,r)=>{let i=e.expressions[r];if(i){if(!dL(i))throw TypeError(`TemplateLiteral expression must be a literal`);return t+n.value.cooked+vL(i)}return t+n.value.cooked},``)}const bL=cL;var xL=ce(import.meta.url);function SL({tsconfig:e,cwd:t=he.cwd(),resolveNodeModules:n=!1,ResolverFactory:r}={}){r||=xL(`oxc-resolver`).ResolverFactory;let i=new r({mainFields:[`types`,`typings`,`module`,`main`],conditionNames:[`types`,`typings`,`import`,`require`],extensions:[`.d.ts`,`.d.mts`,`.d.cts`,`.ts`,`.mts`,`.cts`,`.tsx`,`.js`,`.mjs`,`.cjs`,`.jsx`],extensionAlias:{".js":[`.d.ts`,`.ts`,`.tsx`,`.js`,`.jsx`],".jsx":[`.d.ts`,`.ts`,`.tsx`,`.jsx`,`.js`],".mjs":[`.d.mts`,`.mts`,`.mjs`],".cjs":[`.d.cts`,`.cts`,`.cjs`],".ts":[`.d.ts`,`.ts`,`.tsx`,`.js`,`.jsx`],".tsx":[`.d.ts`,`.tsx`,`.ts`,`.js`,`.jsx`],".mts":[`.d.mts`,`.mts`,`.mjs`],".cts":[`.d.cts`,`.cts`,`.cjs`]},modules:n?[`node_modules`,`node_modules/@types`]:[],tsconfig:e?{configFile:e,references:`auto`}:void 0});return(e,n)=>{let r=n?ue(n):t,a=i.sync(r,e);if(!a.path)return null;let o=a.path;return wL(o)}}const CL=new Set([`.js`,`.cjs`,`.mjs`,`.jsx`,`.ts`,`.cts`,`.mts`,`.tsx`,`.json`,`.vue`,`.svelte`,`.astro`]);function wL(e){return e&&CL.has(de(e))?e.replaceAll(`\\`,`/`):null}function TL({sideEffects:e}){return{name:`rolldown-plugin-dts:dts-input`,options:e===!1?e=>({treeshake:e.treeshake===!1?!1:{...e.treeshake===!0?{}:e.treeshake,moduleSideEffects:!1},...e}):void 0,outputOptions(e){return{...e,entryFileNames(t){let{entryFileNames:n}=e;if(n){let e=u(n,t),r=p(e,t.name);if(d.test(r))return e;let i=p(e,`${t.name}.d`);if(d.test(i))return i}return d.test(t.name)?t.name:t.name.endsWith(`.d`)?`[name].ts`:`[name].d.ts`}}}}}function EL({sourcemap:e,cjsDefault:t,sideEffects:n}){let r=0,i=new Map,a=new Map,s=new Map;return{name:`rolldown-plugin-dts:fake-js`,outputOptions(t){if(t.format===`cjs`||t.format===`commonjs`)throw Error("[rolldown-plugin-dts] Cannot bundle dts files with `cjs` format.");let{chunkFileNames:n,entryFileNames:r}=t;return{...t,sourcemap:t.sourcemap||e,chunkFileNames(e){let t=u(e.isEntry?r||`[name].js`:n||`[name]-[hash].js`,e);if(e.name.endsWith(`.d`)){let n=o(p(t,e.name.slice(0,-2)));if(d.test(n))return n;let r=o(p(t,e.name));if(d.test(r))return r}return t}}},transform:{filter:{id:d},handler:c},renderChunk:l,generateBundle(t,n){for(let t of Object.values(n))if(m.test(t.fileName))if(e){if(t.type===`chunk`||typeof t.source!=`string`)continue;let e=JSON.parse(t.source);e.sourcesContent=void 0,t.source=JSON.stringify(e)}else delete n[t.fileName]}};function c(t,r){let i;try{i=CI(t,{plugins:[[`typescript`,{dts:!0}],`decoratorAutoAccessors`],sourceType:`module`,errorRecovery:!0,createParenthesizedExpressions:!0})}catch(e){throw Error(`Failed to parse ${r}. This may be caused by a syntax error in the declaration file or a bug in the plugin. Please report this issue to https://github.com/sxzz/rolldown-plugin-dts\n${e}`,{cause:e})}let{program:o,comments:c}=i,l=[],u=Object.create(null);if(c){let e=AL(c);a.set(r,e)}let d=[],p=new Map;for(let[e,n]of o.body.entries()){let i=t=>o.body[e]=t;if(WL(n,i,l))continue;let a=n.type===`TSModuleDeclaration`&&n.kind!==`namespace`;if(a&&n.id.type===`StringLiteral`&&n.id.value[0]===`.`&&this.warn(`\`declare module ${JSON.stringify(n.id.value)}\` will be kept as-is in the output. Relative module declaration may cause unexpected issues. Found in ${r}.`),a&&r.endsWith(`.vue.d.ts`)&&t.slice(n.start,n.end).includes(`__VLS_`))continue;let s=n.type===`ExportDefaultDeclaration`,c=lL(n,[`ExportNamedDeclaration`,`ExportDefaultDeclaration`])&&!!n.declaration,m=c?n.declaration:n,g=c?e=>n.declaration=e:i;if(m.type!==`TSDeclareFunction`&&!pL(m))continue;lL(m,[`TSEnumDeclaration`,`ClassDeclaration`,`FunctionDeclaration`,`TSDeclareFunction`,`TSModuleDeclaration`,`VariableDeclaration`])&&(m.declare=!0);let _=[];if(m.type===`VariableDeclaration`)_.push(...m.declarations.map(e=>e.id));else if(`id`in m&&m.id){let e=m.id;if(e.type===`TSQualifiedName`&&(e=RL(e)),e=a?{type:`Identifier`,name:`_${f(u,``)}`}:e,e.type!==`Identifier`)throw Error(`Unexpected ${e.type} declaration id`);_.push(e)}else{let e={type:`Identifier`,name:`export_default`};_.push(e),m.id=e}let v=ee(m),ne=new Set,re=te(m,p,ne,u),ie=Array.from(ne).filter(e=>_.every(t=>e!==t));m!==n&&(m.leadingComments=n.leadingComments);let ae={type:`NumericLiteral`,value:h({decl:m,deps:re,bindings:_,params:v,children:ie})},oe={type:`ArrayExpression`,elements:re},se={type:`ArrowFunctionExpression`,params:v.map(({name:e})=>({type:`Identifier`,name:e})),body:oe,async:!1,expression:!0},ce={type:`ArrayExpression`,elements:ie.map(e=>({type:`StringLiteral`,value:``,start:e.start,end:e.end,loc:e.loc}))},le=a&&{type:`CallExpression`,callee:{type:`Identifier`,name:`sideEffect`},arguments:[_[0]]},y=PL([ae,se,ce,...le?[le]:[]]),ue={type:`VariableDeclaration`,kind:`var`,declarations:[{type:`VariableDeclarator`,id:{..._[0],typeAnnotation:null},init:y},..._.slice(1).map(e=>({type:`VariableDeclarator`,id:{...e,typeAnnotation:null}}))]};s?(d.push({type:`ExportNamedDeclaration`,declaration:null,specifiers:[{type:`ExportSpecifier`,local:_[0],exported:{type:`Identifier`,name:`default`}}],source:null,attributes:null}),i(ue)):g(ue)}n&&d.push({type:`ExpressionStatement`,expression:{type:`CallExpression`,callee:{type:`Identifier`,name:`sideEffect`},arguments:[]}}),o.body=[...Array.from(p.values()).map(({stmt:e})=>e),...o.body,...d],s.set(r,l);let m=bN(i,{comments:!1,sourceMaps:e,sourceFileName:r});return{code:m.code,map:m.map}}function l(n,r){if(!d.test(r.fileName))return;let i=[];for(let e of r.moduleIds){let t=s.get(e);t&&i.push(...t)}let o;try{o=CI(n,{sourceType:`module`})}catch(e){throw Error(`Failed to parse generated code for chunk ${r.fileName}. This may be caused by a bug in the plugin. Please report this issue to https://github.com/sxzz/rolldown-plugin-dts\n${e}`,{cause:e})}let{program:c}=o;if(c.body=HL(c.body),c.body=UL(c.body),c.body=c.body.map(e=>{if(BL(e)||e.type===`ExpressionStatement`)return null;let n=VL(e,i,t);if(n||n===!1)return n;if(e.type!==`VariableDeclaration`)return e;if(!jL(e))return null;let[r,a,o]=e.declarations[0].init.elements,s=r.value,c=g(s);bL(c.decl,{enter(e){e.type!==`CommentBlock`&&delete e.loc}});for(let[t,n]of e.declarations.entries()){let e={...n.id,typeAnnotation:c.bindings[t].typeAnnotation};GL(c.bindings[t],e)}for(let[e,t]of o.elements.entries())Object.assign(c.children[e],{loc:t.loc});let l=a.params;for(let[e,t]of l.entries()){let n=t.name;for(let t of c.params[e].typeParams)t.name=n}let u=a.body.elements;for(let[e,t]of c.deps.entries()){let n=u[e];n.type===`UnaryExpression`&&n.operator===`void`?n={type:`Identifier`,name:`undefined`,loc:n.loc,start:n.start,end:n.end}:IL(n)&&(n.name=`__Infer`),t.replace?t.replace(n):Object.assign(t,n)}return KL(e,c.decl)}).filter(e=>!!e),c.body.length===0)return`export { };`;let l=new Set,u=new Set;for(let e of r.moduleIds){let t=a.get(e);t&&(t.forEach(e=>{let t=e.type+e.value;u.has(t)||(u.add(t),l.add(e))}),a.delete(e))}l.size&&(c.body[0].leadingComments||=[],c.body[0].leadingComments.unshift(...l));let f=bN(o,{sourceMaps:e,sourceFileName:r.fileName});return{code:f.code,map:f.map}}function f(e,t){return t in e?++e[t]:e[t]=0}function h(e){let t=r++;return i.set(t,e),t}function g(e){return i.get(e)}function ee(e){let t=[];bL(e,{leave(e){`typeParameters`in e&&e.typeParameters?.type===`TSTypeParameterDeclaration`&&t.push(...e.typeParameters.params.map(({name:e})=>typeof e==`string`?{type:`Identifier`,name:e}:e))}});let n=new Map;for(let e of t){let t=e.name,r=n.get(t);r?r.push(e):n.set(t,[e])}return Array.from(n.entries()).map(([e,t])=>({name:e,typeParams:t}))}function te(e,t,n,r){let i=new Set,a=new Set,o=[],s=new Set;function c(e){return e.type===`Identifier`&&s.has(e.name)}return bL(e,{enter(e){if(e.type===`TSConditionalType`){let t=OL(e.extendsType);o.push(t)}},leave(e,c){if(e.type===`TSConditionalType`)o.pop();else if(c?.type===`TSConditionalType`){let t=c.trueType===e;s=new Set((t?o:o.slice(0,-1)).flat())}else s=new Set;if(e.type===`ExportNamedDeclaration`)for(let t of e.specifiers)t.type===`ExportSpecifier`&&l(t.local);else if(e.type===`TSInterfaceDeclaration`&&e.extends)for(let t of e.extends||[])l(t.expression);else if(e.type===`ClassDeclaration`){if(e.superClass&&l(e.superClass),e.implements)for(let t of e.implements){if(t.type===`ClassImplements`)throw Error(`Unexpected Flow syntax`);l(t.expression)}}else if(lL(e,[`ObjectMethod`,`ObjectProperty`,`ClassProperty`,`TSPropertySignature`,`TSDeclareMethod`]))e.computed&&zL(e.key)&&l(e.key),`value`in e&&zL(e.value)&&l(e.value);else switch(e.type){case`TSTypeReference`:l(LL(e.typeName));break;case`TSTypeQuery`:if(a.has(e.exprName))return;if(e.exprName.type===`TSImportType`)break;l(LL(e.exprName));break;case`TSImportType`:{a.add(e);let{source:n,qualifier:i}=e;l(_(e,i,n,t,r));break}}c&&!i.has(e)&&DL(e,c)&&n.add(e)}}),Array.from(i);function l(e){FL(e)||c(e)||i.add(e)}}function _(e,t,n,r,i){let a=n.value.replaceAll(/\W/g,`_`),o={type:`Identifier`,name:`_$${nn(n.value)?n.value:`${a}${f(i,a)}`}`};if(r.has(n.value)?o=r.get(n.value).local:r.set(n.value,{stmt:{type:`ImportDeclaration`,specifiers:[{type:`ImportNamespaceSpecifier`,local:o}],source:n,attributes:null},local:o}),t){let e=RL(t);if(t.type===`ThisExpression`||e.type===`ThisExpression`)throw Error("Cannot import `this` from module.");GL(e,{type:`TSQualifiedName`,left:o,right:{...e}}),o=t}let s=e;return e.typeArguments?(GL(e,{type:`TSTypeReference`,typeName:o,typeArguments:e.typeArguments}),s=o):GL(e,o),{...LL(o),replace(e){GL(s,e)}}}}function DL(e,t){return!!(e.type===`Identifier`||lL(t,[`TSPropertySignature`,`TSMethodSignature`])&&t.key===e)}function OL(e){let t=[];return bL(e,{enter(e){e.type===`TSInferType`&&e.typeParameter&&t.push(e.typeParameter.name.name)}}),t}const kL=/\/\s*<reference\s+(?:path|types)=/;function AL(e,t=!1){return e.filter(e=>kL.test(e.value)!==t)}function jL(e){return e?.type===`VariableDeclaration`&&e.declarations.length>0&&e.declarations[0].type===`VariableDeclarator`&&ML(e.declarations[0].init)}function ML(e){return e?.type===`ArrayExpression`&&NL(e.elements)}function NL(e){let[t,n,r,i]=e;return t?.type===`NumericLiteral`&&n?.type===`ArrowFunctionExpression`&&r?.type===`ArrayExpression`&&(!i||i.type===`CallExpression`)}function PL(e){return{type:`ArrayExpression`,elements:e}}function FL(e){return uL(e,`this`)||e.type===`ThisExpression`||e.type===`MemberExpression`&&FL(e.object)}function IL(e){return uL(e,`infer`)}function LL(e){if(e.type===`Identifier`||e.type===`ThisExpression`)return e;let t=LL(e.left);return Object.assign(e,{type:`MemberExpression`,object:t,property:e.right,computed:!1})}function RL(e){return e.type===`Identifier`||e.type===`ThisExpression`?e:RL(e.left)}function zL(e){return lL(e,[`Identifier`,`MemberExpression`])}function BL(e){return e.type===`ImportDeclaration`&&e.specifiers.every(e=>e.type===`ImportSpecifier`&&e.imported.type===`Identifier`&&[`__exportAll`,`__reExport`].includes(e.local.name))}function VL(e,t,n){if(e.type===`ExportNamedDeclaration`&&!e.declaration&&!e.source&&!e.specifiers.length&&!e.attributes?.length)return!1;if(e.type===`ImportDeclaration`&&e.specifiers.length)for(let t of e.specifiers)IL(t.local)&&(t.local.name=`__Infer`);if(lL(e,[`ImportDeclaration`,`ExportAllDeclaration`,`ExportNamedDeclaration`])){if(e.type===`ExportNamedDeclaration`&&t.length)for(let n of e.specifiers){let r=_L(n.exported);t.includes(r)&&(n.type===`ExportSpecifier`?n.exportKind=`type`:e.exportKind=`type`)}if(e.source?.value&&d.test(e.source.value))return e.source.value=ee(e.source.value,`js`),e;if(n&&e.type===`ExportNamedDeclaration`&&!e.source&&e.specifiers.length===1&&e.specifiers[0].type===`ExportSpecifier`&&_L(e.specifiers[0].exported)===`default`)return{type:`TSExportAssignment`,expression:e.specifiers[0].local}}}function HL(e){let t=new Set;for(let[t,r]of e.entries()){let i=n(r);if(!i)continue;let[a,o]=i;o.properties.length&&(e[t]={type:`TSModuleDeclaration`,id:a,kind:`namespace`,declare:!0,body:{type:`TSModuleBlock`,body:[{type:`ExportNamedDeclaration`,specifiers:o.properties.filter(e=>e.type===`ObjectProperty`).map(e=>({type:`ExportSpecifier`,local:e.value.body,exported:e.key})),source:null,declaration:null}]}})}return e.filter(e=>!t.has(e));function n(e){return e.type!==`VariableDeclaration`||e.declarations.length!==1||e.declarations[0].id.type!==`Identifier`||e.declarations[0].init?.type!==`CallExpression`||e.declarations[0].init.callee.type!==`Identifier`||e.declarations[0].init.callee.name!==`__exportAll`||e.declarations[0].init.arguments.length!==1||e.declarations[0].init.arguments[0].type!==`ObjectExpression`?!1:[e.declarations[0].id,e.declarations[0].init.arguments[0]]}}function UL(e){let t=new Map;for(let[n,r]of e.entries())if(r.type===`ImportDeclaration`&&r.specifiers.length===1&&r.specifiers[0].type===`ImportSpecifier`&&r.specifiers[0].local.type===`Identifier`&&r.specifiers[0].local.name.endsWith(`_exports`))t.set(r.specifiers[0].local.name,r.specifiers[0].local.name);else if(r.type===`ExpressionStatement`&&r.expression.type===`CallExpression`&&uL(r.expression.callee,`__reExport`)){let e=r.expression.arguments;t.set(e[0].name,e[1].name)}else r.type===`VariableDeclaration`&&r.declarations.length===1&&r.declarations[0].init?.type===`MemberExpression`&&r.declarations[0].init.object.type===`Identifier`&&t.has(r.declarations[0].init.object.name)?e[n]={type:`TSTypeAliasDeclaration`,id:{type:`Identifier`,name:r.declarations[0].id.name},typeAnnotation:{type:`TSTypeReference`,typeName:{type:`TSQualifiedName`,left:{type:`Identifier`,name:t.get(r.declarations[0].init.object.name)},right:{type:`Identifier`,name:r.declarations[0].init.property.name}}}}:r.type===`ExportNamedDeclaration`&&r.specifiers.length===1&&r.specifiers[0].type===`ExportSpecifier`&&r.specifiers[0].local.type===`Identifier`&&t.has(r.specifiers[0].local.name)&&(r.specifiers[0].local.name=t.get(r.specifiers[0].local.name));return e}function WL(e,t,n){if(e.type===`ImportDeclaration`||e.type===`ExportNamedDeclaration`&&!e.declaration){for(let t of e.specifiers)(`exportKind`in t&&t.exportKind===`type`||`exportKind`in e&&e.exportKind===`type`)&&n.push(_L(t.exported)),t.type===`ImportSpecifier`?t.importKind=`value`:t.type===`ExportSpecifier`&&(t.exportKind=`value`);return e.type===`ImportDeclaration`?e.importKind=`value`:e.type===`ExportNamedDeclaration`&&(e.exportKind=`value`),!0}else if(e.type===`ExportAllDeclaration`)return e.exportKind=`value`,!0;else if(e.type===`TSImportEqualsDeclaration`)return e.moduleReference.type===`TSExternalModuleReference`&&t({type:`ImportDeclaration`,specifiers:[{type:`ImportDefaultSpecifier`,local:e.id}],source:e.moduleReference.expression}),!0;else if(e.type===`TSExportAssignment`&&e.expression.type===`Identifier`)return t({type:`ExportNamedDeclaration`,specifiers:[{type:`ExportSpecifier`,local:e.expression,exported:{type:`Identifier`,name:`default`}}]}),!0;else if(e.type===`ExportDefaultDeclaration`&&e.declaration.type===`Identifier`)return t({type:`ExportNamedDeclaration`,specifiers:[{type:`ExportSpecifier`,local:e.declaration,exported:{type:`Identifier`,name:`default`}}]}),!0;return!1}function GL(e,t){for(let t of Object.keys(e))delete e[t];return Object.assign(e,t),e}function KL(e,t){t.leadingComments||=[];let n=e.leadingComments?.filter(e=>e.value.startsWith(`#`));return n&&t.leadingComments.unshift(...n),t.leadingComments=AL(t.leadingComments,!0),t}const qL=_(`rolldown-plugin-dts:tsgo`),JL=(...e)=>new Promise((t,n)=>{let r=_e(...e);r.on(`close`,()=>t()),r.on(`error`,e=>n(e))});async function YL(){let e=import.meta.resolve(`@typescript/native-preview/package.json`),{default:t}=await import(new URL(`lib/getExePath.js`,e).href);return t()}async function XL(e,t,n,r){qL(`[tsgo] rootDir`,e);let i;r?(i=r,qL(`[tsgo] using custom path`,i)):(i=await YL(),qL(`[tsgo] using tsgo from node_modules`,i));let a=await fe(y.join(me(),`rolldown-plugin-dts-`));qL(`[tsgo] tsgoDist`,a);let o=[`--noEmit`,`false`,`--declaration`,`--emitDeclarationOnly`,...t?[`-p`,t]:[],`--outDir`,a,`--rootDir`,e,`--noCheck`,...n?[`--declarationMap`]:[]];return qL(`[tsgo] args %o`,o),await JL(i,o,{stdio:`inherit`}),a}const ZL=_(`rolldown-plugin-dts:generate`);function QL({entry:e,tsconfig:t,tsconfigRaw:n,build:r,incremental:o,cwd:g,oxc:ee,emitDtsOnly:te,vue:_,tsMacro:ae,parallel:oe,eager:se,tsgo:ce,newContext:ue,emitJs:de,sourcemap:fe}){let me=e?.filter(e=>e[0]!==`!`),he=e?.filter(e=>e[0]===`!`).map(e=>e.slice(1)),_e=e?e=>me.some(t=>y.matchesGlob(e,t))&&!he.some(t=>y.matchesGlob(e,t)):void 0,ve=new Map,ye=new Map,be,xe,Se,Ce,we,Te=t?y.dirname(t):g;return{name:`rolldown-plugin-dts:generate`,async buildStart(e){if(ce?we=await XL(Te,t,fe,ce.path):ee||(oe?(be=ge(new URL(`./tsc-worker.mjs`,import.meta.url),{stdio:`inherit`}),xe=(await import(`./dist-DWac1F1m.mjs`)).createBirpc({},{post:e=>be.send(e),on:e=>be.on(`message`,e)})):(Se=await import(`./tsc-B18f0v7A.mjs`),ue&&(Ce=re()))),!Array.isArray(e.input))for(let[t,n]of Object.entries(e.input)){ZL(`resolving input alias %s -> %s`,t,n);let e=await this.resolve(n);n.startsWith(`./`)||(e||=await this.resolve(`./${n}`));let r=e?.id||n;ZL(`resolved input alias %s -> %s`,n,r),ye.set(r,t)}},outputOptions(e){return{...e,entryFileNames(t){let{entryFileNames:n}=e,r=u(n||`[name].js`,t);if(t.name.endsWith(`.d`)){if(d.test(r))return p(r,t.name.slice(0,-2));if(c.test(r))return r.replace(c,`.$1ts`)}return r}}},resolveId(e){if(ve.has(e))return ZL(`resolve dts id %s`,e),{id:e}},transform:{order:`pre`,filter:{id:{include:[c,a,l,i],exclude:[d,f,h]}},handler(e,t){if(!c.test(t)||de){let n=this.getModuleInfo(t),r=_e?_e(y.relative(g,t)):!!n?.isEntry,i=s(t);if(ve.set(i,{code:e,id:t,isEntry:r}),ZL(`register dts source: %s`,t),r){let e=ye.get(t);this.emitFile({type:`chunk`,id:i,name:e?`${e}.d`:void 0})}}if(te)return i.test(t)?`{}`:`export { }`}},load:{filter:{id:{include:[d],exclude:[f]}},async handler(e){if(!ve.has(e))return;let{code:a,id:c}=ve.get(e),u,d;if(ZL(`generate dts %s from %s`,e,c),ce){if(l.test(c))throw Error(`tsgo does not support Vue files.`);let e=y.resolve(we,y.relative(y.resolve(Te),s(c)));if(!le(e))throw ZL(`[tsgo]`,e,`is missing`),Error(`tsgo did not generate dts file for ${c}, please check your tsconfig.`);u=await pe(e,`utf8`);let t=`${e}.map`;if(le(t)){let e=await pe(t,`utf8`);d={...JSON.parse(e),sources:[c]}}}else if(ee&&!l.test(c)){let e=ie(c,a,ee);if(e.errors.length){let[t]=e.errors;return this.error({message:t.message,frame:t.codeframe||void 0})}u=e.code,e.map&&(d=e.map,d.sourcesContent=void 0)}else{let e={tsconfig:t,tsconfigRaw:n,build:r,incremental:o,cwd:g,entries:se?void 0:Array.from(ve.values()).filter(e=>e.isEntry).map(e=>e.id),id:c,sourcemap:fe,vue:_,tsMacro:ae,context:Ce},a;if(a=oe?await xe.tscEmit(e):Se.tscEmit(e),a.error)return this.error(a.error);if(u=a.code,d=a.map,u&&i.test(c))if(u.includes(`declare const _exports`)){if(u.includes(`declare const _exports: {`)&&!u.includes(`
|
|
16
|
+
}[];`)){let e=eR(u),t=0;u+=e.map(e=>{let n=`_${e.replaceAll(/[^\w$]/g,`_`)}${t++}`,r=JSON.stringify(e);return`declare let ${n}: typeof _exports[${r}]\nexport { ${n} as ${r} }`}).join(`
|
|
17
|
+
`)}}else{let e=$L(u);u+=`
|
|
18
|
+
declare namespace __json_default_export {
|
|
19
|
+
export { ${Array.from(e.entries()).map(([e,t])=>e===t?e:`${t} as ${e}`).join(`, `)} }
|
|
20
|
+
}
|
|
21
|
+
export { __json_default_export as default }`}}return{code:u||``,map:d}}},generateBundle:te?(e,t)=>{for(let e of Object.keys(t))t[e].type===`chunk`&&!d.test(e)&&!m.test(e)&&delete t[e]}:void 0,async buildEnd(){be?.kill(),!ZL.enabled&&we&&await b(we,{recursive:!0,force:!0}).catch(()=>{}),we=void 0,ue&&(Ce=void 0)},watchChange(e){Se&&ne(Ce||v,e)}}}function $L(e){let t=new Map,{program:n}=CI(e,{sourceType:`module`,plugins:[[`typescript`,{dts:!0}]],errorRecovery:!0});for(let e of n.body)if(e.type===`ExportNamedDeclaration`){if(e.declaration)if(e.declaration.type===`VariableDeclaration`)for(let n of e.declaration.declarations)n.id.type===`Identifier`&&t.set(n.id.name,n.id.name);else e.declaration.type===`TSModuleDeclaration`&&e.declaration.id.type===`Identifier`&&t.set(e.declaration.id.name,e.declaration.id.name);else if(e.specifiers.length)for(let n of e.specifiers)n.type===`ExportSpecifier`&&n.exported.type===`Identifier`&&t.set(n.exported.name,n.local.type===`Identifier`?n.local.name:n.exported.name)}return t}function eR(e){let t=[],{program:n}=CI(e,{sourceType:`module`,plugins:[[`typescript`,{dts:!0}]]}),r=n.body[0].declarations[0].id.typeAnnotation.typeAnnotation.members;for(let e of r)e.key.type===`Identifier`?t.push(e.key.name):e.key.type===`StringLiteral`&&t.push(e.key.value);return t}let tR=!1;function nR({entry:e,cwd:t=he.cwd(),dtsInput:n=!1,emitDtsOnly:r=!1,tsconfig:i,tsconfigRaw:a={},compilerOptions:o={},sourcemap:s,resolver:c=`oxc`,cjsDefault:l=!1,sideEffects:u=!1,build:d=!1,incremental:f=!1,vue:p=!1,tsMacro:m=!1,parallel:h=!1,eager:g=!1,newContext:ee=!1,emitJs:te,oxc:_,tsgo:v=!1}){v===!0?v={}:typeof v==`object`&&v.enabled===!1&&(v=!1);let ne;if(i===!0||i==null){let{config:e,path:n}=se(t)||{};i=n,ne=e}else typeof i==`string`?(i=y.resolve(t||he.cwd(),i),ne=ae(i).config):i=void 0;o={...ne?.compilerOptions,...o},f||=o.incremental||!!o.tsBuildInfoFile,s??=!!o.declarationMap,o.declarationMap=s;let re={...ne,...a,compilerOptions:o};if(_??=!!(o?.isolatedDeclarations&&!p&&!v&&!m),_===!0&&(_={}),_&&(_.stripInternal??=!!o?.stripInternal,_.sourcemap=!!o.declarationMap),te??=!!(o.checkJs||o.allowJs),v){if(p)throw Error("[rolldown-plugin-dts] The `tsgo` option is not compatible with the `vue` option. Please disable one of them.");if(m)throw Error("[rolldown-plugin-dts] The `tsgo` option is not compatible with the `tsMacro` option. Please disable one of them.");if(_)throw Error("[rolldown-plugin-dts] The `tsgo` option is not compatible with the `oxc` option. Please disable one of them.")}if(_&&p)throw Error("[rolldown-plugin-dts] The `oxc` option is not compatible with the `vue` option. Please disable one of them.");if(_&&m)throw Error("[rolldown-plugin-dts] The `oxc` option is not compatible with the `tsMacro` option. Please disable one of them.");return v&&!tR&&(console.warn("The `tsgo` option is experimental and may change in the future."),tR=!0),{entry:e?Array.isArray(e)?e:[e]:void 0,cwd:t,dtsInput:n,emitDtsOnly:r,tsconfig:i,tsconfigRaw:re,sourcemap:s,resolver:c,cjsDefault:l,sideEffects:u,build:d,incremental:f,vue:p,tsMacro:m,parallel:h,eager:g,newContext:ee,emitJs:te,oxc:_,tsgo:v}}const rR=_(`rolldown-plugin-dts:resolver`);function iR(e){return a.test(e)||l.test(e)||i.test(e)}function aR({cwd:e,tsconfig:t,tsconfigRaw:n,resolver:i,sideEffects:a}){let o=SL({tsconfig:t,resolveNodeModules:!0,ResolverFactory:oe}),c=a?!0:null;return{name:`rolldown-plugin-dts:resolver`,resolveId:{order:`pre`,filter:[te(r(d))],async handler(e,t,n){if(!t)return;let r={id:e,external:!0,moduleSideEffects:a},i=await this.resolve(e,t,n);if(rR(`Rolldown resolution for dts import %O from %O: %O`,e,t,i),i?.external)return rR(`Rolldown marked dts import as external:`,e),i;let o=await l(e,t,i);if(rR(`Dts resolution for dts import %O from %O: %O`,e,t,o),!o)return g.test(e)?(rR(`Externalizing css import:`,e),r):(rR(`Unresolvable dts import:`,e,`from`,t),oR(e)?null:r);if(d.test(o))return rR(`Resolving dts import to declaration file:`,e),{id:o,moduleSideEffects:c};if(iR(o))return rR(`Resolving dts import to source file:`,e),await this.load({id:o}),{id:s(o),moduleSideEffects:c}}}};async function l(r,a,s){let c;if(i===`tsc`){let{tscResolve:i}=await import(`./resolver-DkvdaW3s-B5R6Y3j5.mjs`);c=i(r,a,e,t,n)}else c=o(r,a);return rR(`Using %s for dts import: %O -> %O`,i,r,c),c&&=y.normalize(c),!c||!iR(c)?s&&oR(s.id)&&iR(s.id)&&!s.external?s.id:null:c}}function oR(e){return e.startsWith(`.`)||y.isAbsolute(e)}const sR=_(`rolldown-plugin-dts:options`);function cR(e={}){sR(`resolving dts options`);let t=nR(e);sR(`resolved dts options %o`,t);let n=[];return e.dtsInput?n.push(TL(t)):n.push(QL(t)),n.push(aR(t),EL(t)),n}export{cR as dts};
|