@fastgpt-plugin/cli 0.1.0-alpha.5 → 0.1.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{context-DoVwxr5H-B6IEtQ3M.js → context-DoVwxr5H-CUnaSkDS.js} +1 -1
- package/dist/dist-BClt8EYk.js +27 -0
- package/dist/index.js +51 -51
- package/dist/{resolver-o20sdYK5-D5TGopbk.js → resolver-o20sdYK5-Dnq-MmKm.js} +1 -1
- package/dist/{tsc-By9Scnlt.js → tsc-BoybAFN3.js} +1 -1
- package/package.json +7 -7
- package/templates/tool/package.json +2 -1
- package/templates/tool/src/tool.test.ts +3 -3
- package/templates/tool-suite/package.json +2 -1
- package/dist/dist-mM4pkTG1.js +0 -27
package/dist/dist-mM4pkTG1.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import{S as e,_ as t,a as n,b as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,s as h,t as g,u as ee,v as _,x as te,y as ne}from"./index.js";import{n as re,r as v,t as y}from"./context-DoVwxr5H-B6IEtQ3M.js";import ie,{createRequire as ae}from"node:module";import b,{dirname as oe,extname as se}from"node:path";import ce from"node:process";import le from"node:fs";import ue from"fs";import de from"path";import fe from"os";var x=44,pe=59,me=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,he=new Uint8Array(64),ge=new Uint8Array(128);for(let e=0;e<me.length;e++){let t=me.charCodeAt(e);he[e]=t,ge[t]=e}function _e(e,t){let n=0,r=0,i=0;do i=ge[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 ve(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(he[t])}while(r>0);return t}function ye(e,t){return e.pos>=t?!1:e.peek()!==x}var be=1024*16,xe=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}},Se=class{constructor(){this.pos=0,this.out=``,this.buffer=new Uint8Array(be)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===be&&(this.out+=xe.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+xe.decode(e.subarray(0,n)):t}},Ce=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 we(e){let{length:t}=e,n=new Ce(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=_e(n,i),i<u&&(l=!1),u=i,ye(n,e)?(a=_e(n,a),o=_e(n,o),s=_e(n,s),ye(n,e)?(c=_e(n,c),r=[i,a,o,s,c]):r=[i,a,o,s]):r=[i],t.push(r),n.pos++}l||Te(t),r.push(t),n.pos=e+1}while(n.pos<=t);return r}function Te(e){e.sort(Ee)}function Ee(e,t){return e[0]-t[0]}function De(e){let t=new Se,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(pe),s.length===0)continue;let c=0;for(let e=0;e<s.length;e++){let o=s[e];e>0&&t.write(x),c=ve(t,o[0],c),o.length!==1&&(n=ve(t,o[1],n),r=ve(t,o[2],r),i=ve(t,o[3],i),o.length!==4&&(a=ve(t,o[4],a)))}}return t.flush()}const Oe=/^[\w+.-]+:\/\//,ke=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,Ae=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function je(e){return Oe.test(e)}function Me(e){return e.startsWith(`//`)}function Ne(e){return e.startsWith(`/`)}function Pe(e){return e.startsWith(`file:`)}function Fe(e){return/^[.?#]/.test(e)}function Ie(e){let t=ke.exec(e);return Re(t[1],t[2]||``,t[3],t[4]||``,t[5]||`/`,t[6]||``,t[7]||``)}function Le(e){let t=Ae.exec(e),n=t[2];return Re(`file:`,``,t[1]||``,``,Ne(n)?n:`/`+n,t[3]||``,t[4]||``)}function Re(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 ze(e){if(Me(e)){let t=Ie(`http:`+e);return t.scheme=``,t.type=6,t}if(Ne(e)){let t=Ie(`http://foo.com`+e);return t.scheme=``,t.host=``,t.type=5,t}if(Pe(e))return Le(e);if(je(e))return Ie(e);let t=Ie(`http://foo.com/`+e);return t.scheme=``,t.host=``,t.type=e?e.startsWith(`?`)?3:e.startsWith(`#`)?2:4:1,t}function Be(e){if(e.endsWith(`/..`))return e;let t=e.lastIndexOf(`/`);return e.slice(0,t+1)}function Ve(e,t){He(t,t.type),e.path===`/`?e.path=t.path:e.path=Be(t.path)+e.path}function He(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 Ue(e,t){if(!e&&!t)return``;let n=ze(e),r=n.type;if(t&&r!==7){let e=ze(t),i=e.type;switch(r){case 1:n.hash=e.hash;case 2:n.query=e.query;case 3:case 4:Ve(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)}He(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?Fe(t||e)&&!Fe(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 We(e){if(!e)return``;let t=e.lastIndexOf(`/`);return e.slice(0,t+1)}function Ge(e,t){let n=We(e),r=t?t+`/`:``;return e=>Ue(r+(e||``),n)}var Ke=0,qe=1,Je=2,Ye=3,Xe=4;function Ze(e,t){let n=Qe(e,0);if(n===e.length)return e;t||(e=e.slice());for(let r=n;r<e.length;r=Qe(e,r+1))e[r]=et(e[r],t);return e}function Qe(e,t){for(let n=t;n<e.length;n++)if(!$e(e[n]))return n;return e.length}function $e(e){for(let t=1;t<e.length;t++)if(e[t][Ke]<e[t-1][Ke])return!1;return!0}function et(e,t){return t||(e=e.slice()),e.sort(tt)}function tt(e,t){return e[Ke]-t[Ke]}var nt=!1;function rt(e,t,n,r){for(;n<=r;){let i=n+(r-n>>1),a=e[i][Ke]-t;if(a===0)return nt=!0,i;a<0?n=i+1:r=i-1}return nt=!1,n-1}function it(e,t,n){for(let r=n+1;r<e.length&&e[r][Ke]===t;n=r++);return n}function at(e,t,n){for(let r=n-1;r>=0&&e[r][Ke]===t;n=r--);return n}function ot(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function st(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 nt=o!==-1&&e[o][Ke]===t,o;t>=a?s=o===-1?0:o:c=o}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=rt(e,t,s,c)}function ct(e){return typeof e==`string`?JSON.parse(e):e}var lt="`line` must be greater than 0 (lines start at line 1)",ut="`column` must be greater than or equal to 0 (columns start at column 0)",dt=-1,ft=1,pt=class{constructor(e,t){let n=typeof e==`string`;if(!n&&e._decodedMemo)return e;let r=ct(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=Ge(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=Ze(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=ot(),this._bySources=void 0,this._bySourceMemos=void 0}};function mt(e){return e}function ht(e){var t;return(t=mt(e))._decoded||(t._decoded=we(mt(e)._encoded))}function gt(e,t){let{line:n,column:r,bias:i}=t;if(n--,n<0)throw Error(lt);if(r<0)throw Error(ut);let a=ht(e);if(n>=a.length)return _t(null,null,null,null);let o=a[n],s=vt(o,mt(e)._decodedMemo,n,r,i||ft);if(s===-1)return _t(null,null,null,null);let c=o[s];if(c.length===1)return _t(null,null,null,null);let{names:l,resolvedSources:u}=e;return _t(u[c[qe]],c[Je]+1,c[Ye],c.length===5?l[c[Xe]]:null)}function _t(e,t,n,r){return{source:e,line:t,column:n,name:r}}function vt(e,t,n,r,i){let a=st(e,r,t,n);return nt?a=(i===dt?it:at)(e,r,a):i===dt&&a++,a===-1||a===e.length?-1:a}var yt=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function bt(e){return e}function xt(e,t){return bt(e)._indexes[t]}function St(e,t){let n=xt(e,t);if(n!==void 0)return n;let{array:r,_indexes:i}=bt(e);return i[t]=r.push(t)-1}var Ct=0,wt=1,Tt=2,Et=3,Dt=4,Ot=-1,kt=class{constructor({file:e,sourceRoot:t}={}){this._names=new yt,this._sources=new yt,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new yt}};function At(e){return e}var jt=(e,t)=>Ut(!0,e,t);function Mt(e,t,n){let{_sources:r,_sourcesContent:i}=At(e),a=St(r,t);i[a]=n}function Nt(e){let{_mappings:t,_sources:n,_sourcesContent:r,_names:i,_ignoreList:a}=At(e);return Bt(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 Pt(e){let t=Nt(e);return Object.assign({},t,{mappings:De(t.mappings)})}function Ft(e){let t=[],{_mappings:n,_sources:r,_names:i}=At(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[Ct]},c,l,u;o.length!==1&&(c=r.array[o[wt]],l={line:o[Tt]+1,column:o[Et]},o.length===5&&(u=i.array[o[Dt]])),t.push({generated:s,source:c,original:l,name:u})}}return t}function It(e,t,n,r,i,a,o,s,c){let{_mappings:l,_sources:u,_sourcesContent:d,_names:f}=At(t),p=Lt(l,n),m=Rt(p,r);if(!i)return e&&Vt(p,m)?void 0:zt(p,m,[r]);let h=St(u,i),g=s?St(f,s):Ot;if(h===d.length&&(d[h]=c??null),!(e&&Ht(p,m,h,a,o,g)))return zt(p,m,s?[r,h,a,o,g]:[r,h,a,o])}function Lt(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}function Rt(e,t){let n=e.length;for(let r=n-1;r>=0&&!(t>=e[r][Ct]);n=r--);return n}function zt(e,t,n){for(let n=e.length;n>t;n--)e[n]=e[n-1];e[t]=n}function Bt(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 Vt(e,t){return t===0?!0:e[t-1].length===1}function Ht(e,t,n,r,i,a){if(t===0)return!1;let o=e[t-1];return o.length===1?!1:n===o[wt]&&r===o[Tt]&&i===o[Et]&&a===(o.length===5?o[Dt]:Ot)}function Ut(e,t,n){let{generated:r,source:i,original:a,name:o,content:s}=n;return i?It(e,t,r.line-1,r.column,i,a.line-1,a.column,o,s):It(e,t,r.line-1,r.column,null,null,null,null,null)}let Wt=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,Gt=`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`;const Kt=RegExp(`[`+Wt+`]`),qt=RegExp(`[`+Wt+Gt+`]`);Wt=Gt=null;const Jt=[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],Yt=[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 Xt(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 Zt(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Kt.test(String.fromCharCode(e)):Xt(e,Jt)}function Qt(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&&qt.test(String.fromCharCode(e)):Xt(e,Jt)||Xt(e,Yt)}function $t(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,!Zt(r))return!1}else if(!Qt(r))return!1}return!t}const en={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`]},tn=new Set(en.keyword),nn=new Set(en.strict);new Set(en.strictBind);function rn(e,t){return t&&e===`await`||e===`enum`}function an(e,t){return rn(e,t)||nn.has(e)}function on(e){return tn.has(e)}var sn=function(e){return e>=48&&e<=57};const cn={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},ln={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 un(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(dn(e,p,t,n)){l+=t.slice(d,n);break}if(p===92){l+=t.slice(d,n);let o=fn(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 dn(e,t,n,r){return e===`template`?t===96||t===36&&n.charCodeAt(r+1)===123:t===(e===`double`?34:39)}function fn(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}=pn(e,t,n,r,2,!1,o,a),s(i===null?null:String.fromCharCode(i))}case 117:{let i;return{code:i,pos:t}=hn(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 pn(e,t,n,r,i,a,o,s){let c=t,l;return{n:l,pos:t}=mn(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 mn(e,t,n,r,i,a,o,s,c,l){let u=t,d=i===16?cn.hex:cn.decBinOct,f=i===16?ln.hex:i===10?ln.dec:i===8?ln.oct:ln.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:sn(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 hn(e,t,n,r,i,a){let o=e.charCodeAt(t),s;if(o===123){if(++t,{code:s,pos:t}=pn(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}=pn(e,t,n,r,4,!1,i,a));return{code:s,pos:t}}var gn=te({ACCESSOR_TYPES:()=>jT,ALIAS_KEYS:()=>Dc,ASSIGNMENT_OPERATORS:()=>bc,AnyTypeAnnotation:()=>Bh,ArgumentPlaceholder:()=>m_,ArrayExpression:()=>am,ArrayPattern:()=>rh,ArrayTypeAnnotation:()=>Vh,ArrowFunctionExpression:()=>ih,AssignmentExpression:()=>om,AssignmentPattern:()=>nh,AwaitExpression:()=>Dh,BINARY_OPERATORS:()=>yc,BINARY_TYPES:()=>Qw,BLOCKPARENT_TYPES:()=>eT,BLOCK_TYPES:()=>tT,BOOLEAN_BINARY_OPERATORS:()=>_c,BOOLEAN_NUMBER_BINARY_OPERATORS:()=>mc,BOOLEAN_UNARY_OPERATORS:()=>xc,BUILDER_KEYS:()=>kc,BigIntLiteral:()=>kh,BinaryExpression:()=>sm,BindExpression:()=>h_,BlockStatement:()=>dm,BooleanLiteral:()=>Mm,BooleanLiteralTypeAnnotation:()=>Uh,BooleanTypeAnnotation:()=>Hh,BreakStatement:()=>fm,CLASS_TYPES:()=>DT,COMMENT_KEYS:()=>dc,COMPARISON_BINARY_OPERATORS:()=>gc,COMPLETIONSTATEMENT_TYPES:()=>iT,CONDITIONAL_TYPES:()=>aT,CallExpression:()=>pm,CatchClause:()=>mm,ClassAccessorProperty:()=>Ph,ClassBody:()=>ah,ClassDeclaration:()=>sh,ClassExpression:()=>oh,ClassImplements:()=>Gh,ClassMethod:()=>yh,ClassPrivateMethod:()=>Ih,ClassPrivateProperty:()=>Fh,ClassProperty:()=>Nh,ConditionalExpression:()=>hm,ContinueStatement:()=>gm,DECLARATION_TYPES:()=>mT,DEPRECATED_ALIASES:()=>ml,DEPRECATED_KEYS:()=>Ac,DebuggerStatement:()=>_m,DeclareClass:()=>Kh,DeclareExportAllDeclaration:()=>tg,DeclareExportDeclaration:()=>eg,DeclareFunction:()=>qh,DeclareInterface:()=>Jh,DeclareModule:()=>Yh,DeclareModuleExports:()=>Xh,DeclareOpaqueType:()=>Qh,DeclareTypeAlias:()=>Zh,DeclareVariable:()=>$h,DeclaredPredicate:()=>ng,Decorator:()=>g_,Directive:()=>lm,DirectiveLiteral:()=>um,DoExpression:()=>__,DoWhileStatement:()=>vm,ENUMBODY_TYPES:()=>RT,ENUMMEMBER_TYPES:()=>zT,EQUALITY_BINARY_OPERATORS:()=>hc,EXPORTDECLARATION_TYPES:()=>kT,EXPRESSIONWRAPPER_TYPES:()=>cT,EXPRESSION_TYPES:()=>Zw,EmptyStatement:()=>ym,EmptyTypeAnnotation:()=>pg,EnumBooleanBody:()=>Vg,EnumBooleanMember:()=>Gg,EnumDeclaration:()=>Bg,EnumDefaultedMember:()=>Jg,EnumNumberBody:()=>Hg,EnumNumberMember:()=>Kg,EnumStringBody:()=>Ug,EnumStringMember:()=>qg,EnumSymbolBody:()=>Wg,ExistsTypeAnnotation:()=>rg,ExportAllDeclaration:()=>ch,ExportDefaultDeclaration:()=>lh,ExportDefaultSpecifier:()=>v_,ExportNamedDeclaration:()=>uh,ExportNamespaceSpecifier:()=>Ah,ExportSpecifier:()=>dh,ExpressionStatement:()=>bm,FLATTENABLE_KEYS:()=>lc,FLIPPED_ALIAS_KEYS:()=>T,FLOWBASEANNOTATION_TYPES:()=>FT,FLOWDECLARATION_TYPES:()=>IT,FLOWPREDICATE_TYPES:()=>LT,FLOWTYPE_TYPES:()=>PT,FLOW_TYPES:()=>NT,FORXSTATEMENT_TYPES:()=>uT,FOR_INIT_KEYS:()=>uc,FOR_TYPES:()=>lT,FUNCTIONPARAMETER_TYPES:()=>hT,FUNCTIONPARENT_TYPES:()=>fT,FUNCTION_TYPES:()=>dT,File:()=>xm,ForInStatement:()=>Sm,ForOfStatement:()=>fh,ForStatement:()=>Cm,FunctionDeclaration:()=>wm,FunctionExpression:()=>Tm,FunctionTypeAnnotation:()=>ig,FunctionTypeParam:()=>ag,GenericTypeAnnotation:()=>og,IMMUTABLE_TYPES:()=>bT,IMPORTOREXPORTDECLARATION_TYPES:()=>OT,INHERIT_KEYS:()=>Tc,Identifier:()=>Em,IfStatement:()=>Dm,Import:()=>Oh,ImportAttribute:()=>zh,ImportDeclaration:()=>ph,ImportDefaultSpecifier:()=>mh,ImportExpression:()=>_h,ImportNamespaceSpecifier:()=>hh,ImportSpecifier:()=>gh,IndexedAccessType:()=>Yg,InferredPredicate:()=>sg,InterfaceDeclaration:()=>lg,InterfaceExtends:()=>cg,InterfaceTypeAnnotation:()=>ug,InterpreterDirective:()=>cm,IntersectionTypeAnnotation:()=>dg,JSXAttribute:()=>Zg,JSXClosingElement:()=>Qg,JSXClosingFragment:()=>d_,JSXElement:()=>$g,JSXEmptyExpression:()=>e_,JSXExpressionContainer:()=>t_,JSXFragment:()=>l_,JSXIdentifier:()=>r_,JSXMemberExpression:()=>i_,JSXNamespacedName:()=>a_,JSXOpeningElement:()=>o_,JSXOpeningFragment:()=>u_,JSXSpreadAttribute:()=>s_,JSXSpreadChild:()=>n_,JSXText:()=>c_,JSX_TYPES:()=>BT,LITERAL_TYPES:()=>yT,LOGICAL_OPERATORS:()=>fc,LOOP_TYPES:()=>oT,LVAL_TYPES:()=>_T,LabeledStatement:()=>Om,LogicalExpression:()=>Pm,METHOD_TYPES:()=>ST,MISCELLANEOUS_TYPES:()=>VT,MODULEDECLARATION_TYPES:()=>KT,MODULESPECIFIER_TYPES:()=>AT,MemberExpression:()=>Fm,MetaProperty:()=>vh,MixedTypeAnnotation:()=>fg,ModuleExpression:()=>y_,NODE_FIELDS:()=>Oc,NODE_PARENT_VALIDATIONS:()=>jc,NODE_UNION_SHAPES__PRIVATE:()=>Mc,NUMBER_BINARY_OPERATORS:()=>vc,NUMBER_UNARY_OPERATORS:()=>Sc,NewExpression:()=>Im,NullLiteral:()=>jm,NullLiteralTypeAnnotation:()=>Wh,NullableTypeAnnotation:()=>mg,NumberLiteralTypeAnnotation:()=>hg,NumberTypeAnnotation:()=>gg,NumericLiteral:()=>Am,OBJECTMEMBER_TYPES:()=>CT,ObjectExpression:()=>Rm,ObjectMethod:()=>zm,ObjectPattern:()=>bh,ObjectProperty:()=>Bm,ObjectTypeAnnotation:()=>_g,ObjectTypeCallProperty:()=>yg,ObjectTypeIndexer:()=>bg,ObjectTypeInternalSlot:()=>vg,ObjectTypeProperty:()=>xg,ObjectTypeSpreadProperty:()=>Sg,OpaqueType:()=>Cg,OptionalCallExpression:()=>Mh,OptionalIndexedAccessType:()=>Xg,OptionalMemberExpression:()=>jh,PATTERNLIKE_TYPES:()=>gT,PATTERN_TYPES:()=>ET,PLACEHOLDERS:()=>nl,PLACEHOLDERS_ALIAS:()=>rl,PLACEHOLDERS_FLIPPED_ALIAS:()=>il,PRIVATE_TYPES:()=>MT,PROPERTY_TYPES:()=>wT,PUREISH_TYPES:()=>pT,ParenthesizedExpression:()=>Wm,PipelineBareFunction:()=>S_,PipelinePrimaryTopicReference:()=>C_,PipelineTopicExpression:()=>x_,Placeholder:()=>f_,PrivateName:()=>Lh,Program:()=>Lm,QualifiedTypeIdentifier:()=>wg,RegExpLiteral:()=>Nm,RestElement:()=>Vm,ReturnStatement:()=>Hm,SCOPABLE_TYPES:()=>$w,STANDARDIZED_TYPES:()=>Xw,STATEMENT_OR_BLOCK_KEYS:()=>cc,STATEMENT_TYPES:()=>nT,STRING_UNARY_OPERATORS:()=>Cc,SequenceExpression:()=>Um,SpreadElement:()=>xh,StaticBlock:()=>Rh,StringLiteral:()=>km,StringLiteralTypeAnnotation:()=>Tg,StringTypeAnnotation:()=>Eg,Super:()=>Sh,SwitchCase:()=>Gm,SwitchStatement:()=>Km,SymbolTypeAnnotation:()=>Dg,TERMINATORLESS_TYPES:()=>rT,TSAnyKeyword:()=>P_,TSArrayType:()=>ev,TSAsExpression:()=>xv,TSBASETYPE_TYPES:()=>GT,TSBigIntKeyword:()=>I_,TSBooleanKeyword:()=>F_,TSCallSignatureDeclaration:()=>k_,TSClassImplements:()=>hv,TSConditionalType:()=>sv,TSConstructSignatureDeclaration:()=>A_,TSConstructorType:()=>Y_,TSDeclareFunction:()=>E_,TSDeclareMethod:()=>D_,TSENTITYNAME_TYPES:()=>vT,TSEnumBody:()=>wv,TSEnumDeclaration:()=>Tv,TSEnumMember:()=>Ev,TSExportAssignment:()=>Nv,TSExternalModuleReference:()=>jv,TSFunctionType:()=>J_,TSImportEqualsDeclaration:()=>Av,TSImportType:()=>kv,TSIndexSignature:()=>N_,TSIndexedAccessType:()=>dv,TSInferType:()=>cv,TSInstantiationExpression:()=>bv,TSInterfaceBody:()=>vv,TSInterfaceDeclaration:()=>_v,TSInterfaceHeritage:()=>gv,TSIntersectionType:()=>ov,TSIntrinsicKeyword:()=>L_,TSLiteralType:()=>mv,TSMappedType:()=>fv,TSMethodSignature:()=>M_,TSModuleBlock:()=>Ov,TSModuleDeclaration:()=>Dv,TSNamedTupleMember:()=>iv,TSNamespaceExportDeclaration:()=>Pv,TSNeverKeyword:()=>R_,TSNonNullExpression:()=>Mv,TSNullKeyword:()=>z_,TSNumberKeyword:()=>B_,TSObjectKeyword:()=>V_,TSOptionalType:()=>nv,TSParameterProperty:()=>T_,TSParenthesizedType:()=>lv,TSPropertySignature:()=>j_,TSQualifiedName:()=>O_,TSRestType:()=>rv,TSSatisfiesExpression:()=>Sv,TSStringKeyword:()=>H_,TSSymbolKeyword:()=>U_,TSTYPEELEMENT_TYPES:()=>UT,TSTYPE_TYPES:()=>WT,TSTemplateLiteralType:()=>pv,TSThisType:()=>q_,TSTupleType:()=>tv,TSTypeAliasDeclaration:()=>yv,TSTypeAnnotation:()=>Fv,TSTypeAssertion:()=>Cv,TSTypeLiteral:()=>$_,TSTypeOperator:()=>uv,TSTypeParameter:()=>Rv,TSTypeParameterDeclaration:()=>Lv,TSTypeParameterInstantiation:()=>Iv,TSTypePredicate:()=>Z_,TSTypeQuery:()=>Q_,TSTypeReference:()=>X_,TSUndefinedKeyword:()=>W_,TSUnionType:()=>av,TSUnknownKeyword:()=>G_,TSVoidKeyword:()=>K_,TYPES:()=>hl,TYPESCRIPT_TYPES:()=>HT,TaggedTemplateExpression:()=>Ch,TemplateElement:()=>wh,TemplateLiteral:()=>Th,ThisExpression:()=>qm,ThisTypeAnnotation:()=>Og,ThrowStatement:()=>Jm,TopicReference:()=>b_,TryStatement:()=>Ym,TupleTypeAnnotation:()=>kg,TypeAlias:()=>jg,TypeAnnotation:()=>Mg,TypeCastExpression:()=>Ng,TypeParameter:()=>Pg,TypeParameterDeclaration:()=>Fg,TypeParameterInstantiation:()=>Ig,TypeofTypeAnnotation:()=>Ag,UNARYLIKE_TYPES:()=>TT,UNARY_OPERATORS:()=>wc,UPDATE_OPERATORS:()=>pc,USERWHITESPACABLE_TYPES:()=>xT,UnaryExpression:()=>Xm,UnionTypeAnnotation:()=>Lg,UpdateExpression:()=>Zm,V8IntrinsicIdentifier:()=>p_,VISITOR_KEYS:()=>Ec,VariableDeclaration:()=>Qm,VariableDeclarator:()=>$m,Variance:()=>Rg,VoidPattern:()=>w_,VoidTypeAnnotation:()=>zg,WHILE_TYPES:()=>sT,WhileStatement:()=>eh,WithStatement:()=>th,YieldExpression:()=>Eh,__internal__deprecationWarning:()=>C,addComment:()=>Uw,addComments:()=>Hw,anyTypeAnnotation:()=>ed,appendToMemberExpression:()=>fE,argumentPlaceholder:()=>kf,arrayExpression:()=>bl,arrayPattern:()=>_u,arrayTypeAnnotation:()=>td,arrowFunctionExpression:()=>vu,assertAccessor:()=>iw,assertAnyTypeAnnotation:()=>wb,assertArgumentPlaceholder:()=>Qx,assertArrayExpression:()=>Uv,assertArrayPattern:()=>Vy,assertArrayTypeAnnotation:()=>Tb,assertArrowFunctionExpression:()=>Hy,assertAssignmentExpression:()=>Wv,assertAssignmentPattern:()=>By,assertAwaitExpression:()=>db,assertBigIntLiteral:()=>pb,assertBinary:()=>TC,assertBinaryExpression:()=>Gv,assertBindExpression:()=>$x,assertBlock:()=>OC,assertBlockParent:()=>DC,assertBlockStatement:()=>Yv,assertBooleanLiteral:()=>gy,assertBooleanLiteralTypeAnnotation:()=>Db,assertBooleanTypeAnnotation:()=>Eb,assertBreakStatement:()=>Xv,assertCallExpression:()=>Zv,assertCatchClause:()=>Qv,assertClass:()=>ew,assertClassAccessorProperty:()=>vb,assertClassBody:()=>Uy,assertClassDeclaration:()=>Gy,assertClassExpression:()=>Wy,assertClassImplements:()=>kb,assertClassMethod:()=>rb,assertClassPrivateMethod:()=>bb,assertClassPrivateProperty:()=>yb,assertClassProperty:()=>_b,assertCompletionStatement:()=>jC,assertConditional:()=>MC,assertConditionalExpression:()=>$v,assertContinueStatement:()=>ey,assertDebuggerStatement:()=>ty,assertDeclaration:()=>VC,assertDeclareClass:()=>Ab,assertDeclareExportAllDeclaration:()=>zb,assertDeclareExportDeclaration:()=>Rb,assertDeclareFunction:()=>jb,assertDeclareInterface:()=>Mb,assertDeclareModule:()=>Nb,assertDeclareModuleExports:()=>Pb,assertDeclareOpaqueType:()=>Ib,assertDeclareTypeAlias:()=>Fb,assertDeclareVariable:()=>Lb,assertDeclaredPredicate:()=>Bb,assertDecorator:()=>eS,assertDirective:()=>qv,assertDirectiveLiteral:()=>Jv,assertDoExpression:()=>tS,assertDoWhileStatement:()=>ny,assertEmptyStatement:()=>ry,assertEmptyTypeAnnotation:()=>Zb,assertEnumBody:()=>dw,assertEnumBooleanBody:()=>Tx,assertEnumBooleanMember:()=>kx,assertEnumDeclaration:()=>wx,assertEnumDefaultedMember:()=>Mx,assertEnumMember:()=>fw,assertEnumNumberBody:()=>Ex,assertEnumNumberMember:()=>Ax,assertEnumStringBody:()=>Dx,assertEnumStringMember:()=>jx,assertEnumSymbolBody:()=>Ox,assertExistsTypeAnnotation:()=>Vb,assertExportAllDeclaration:()=>Ky,assertExportDeclaration:()=>nw,assertExportDefaultDeclaration:()=>qy,assertExportDefaultSpecifier:()=>nS,assertExportNamedDeclaration:()=>Jy,assertExportNamespaceSpecifier:()=>mb,assertExportSpecifier:()=>Yy,assertExpression:()=>wC,assertExpressionStatement:()=>iy,assertExpressionWrapper:()=>FC,assertFile:()=>ay,assertFlow:()=>ow,assertFlowBaseAnnotation:()=>cw,assertFlowDeclaration:()=>lw,assertFlowPredicate:()=>uw,assertFlowType:()=>sw,assertFor:()=>IC,assertForInStatement:()=>oy,assertForOfStatement:()=>Xy,assertForStatement:()=>sy,assertForXStatement:()=>LC,assertFunction:()=>RC,assertFunctionDeclaration:()=>cy,assertFunctionExpression:()=>ly,assertFunctionParameter:()=>HC,assertFunctionParent:()=>zC,assertFunctionTypeAnnotation:()=>Hb,assertFunctionTypeParam:()=>Ub,assertGenericTypeAnnotation:()=>Wb,assertIdentifier:()=>uy,assertIfStatement:()=>dy,assertImmutable:()=>qC,assertImport:()=>fb,assertImportAttribute:()=>Cb,assertImportDeclaration:()=>Zy,assertImportDefaultSpecifier:()=>Qy,assertImportExpression:()=>tb,assertImportNamespaceSpecifier:()=>$y,assertImportOrExportDeclaration:()=>tw,assertImportSpecifier:()=>eb,assertIndexedAccessType:()=>Nx,assertInferredPredicate:()=>Gb,assertInterfaceDeclaration:()=>qb,assertInterfaceExtends:()=>Kb,assertInterfaceTypeAnnotation:()=>Jb,assertInterpreterDirective:()=>Kv,assertIntersectionTypeAnnotation:()=>Yb,assertJSX:()=>pw,assertJSXAttribute:()=>Fx,assertJSXClosingElement:()=>Ix,assertJSXClosingFragment:()=>Yx,assertJSXElement:()=>Lx,assertJSXEmptyExpression:()=>Rx,assertJSXExpressionContainer:()=>zx,assertJSXFragment:()=>qx,assertJSXIdentifier:()=>Vx,assertJSXMemberExpression:()=>Hx,assertJSXNamespacedName:()=>Ux,assertJSXOpeningElement:()=>Wx,assertJSXOpeningFragment:()=>Jx,assertJSXSpreadAttribute:()=>Gx,assertJSXSpreadChild:()=>Bx,assertJSXText:()=>Kx,assertLVal:()=>WC,assertLabeledStatement:()=>fy,assertLiteral:()=>KC,assertLogicalExpression:()=>vy,assertLoop:()=>NC,assertMemberExpression:()=>yy,assertMetaProperty:()=>nb,assertMethod:()=>YC,assertMiscellaneous:()=>mw,assertMixedTypeAnnotation:()=>Xb,assertModuleDeclaration:()=>Cw,assertModuleExpression:()=>rS,assertModuleSpecifier:()=>rw,assertNewExpression:()=>by,assertNode:()=>Hv,assertNullLiteral:()=>hy,assertNullLiteralTypeAnnotation:()=>Ob,assertNullableTypeAnnotation:()=>Qb,assertNumberLiteral:()=>yw,assertNumberLiteralTypeAnnotation:()=>$b,assertNumberTypeAnnotation:()=>ex,assertNumericLiteral:()=>my,assertObjectExpression:()=>Sy,assertObjectMember:()=>XC,assertObjectMethod:()=>Cy,assertObjectPattern:()=>ib,assertObjectProperty:()=>wy,assertObjectTypeAnnotation:()=>tx,assertObjectTypeCallProperty:()=>rx,assertObjectTypeIndexer:()=>ix,assertObjectTypeInternalSlot:()=>nx,assertObjectTypeProperty:()=>ax,assertObjectTypeSpreadProperty:()=>ox,assertOpaqueType:()=>sx,assertOptionalCallExpression:()=>gb,assertOptionalIndexedAccessType:()=>Px,assertOptionalMemberExpression:()=>hb,assertParenthesizedExpression:()=>Oy,assertPattern:()=>$C,assertPatternLike:()=>UC,assertPipelineBareFunction:()=>oS,assertPipelinePrimaryTopicReference:()=>sS,assertPipelineTopicExpression:()=>aS,assertPlaceholder:()=>Xx,assertPrivate:()=>aw,assertPrivateName:()=>xb,assertProgram:()=>xy,assertProperty:()=>ZC,assertPureish:()=>BC,assertQualifiedTypeIdentifier:()=>cx,assertRegExpLiteral:()=>_y,assertRegexLiteral:()=>bw,assertRestElement:()=>Ty,assertRestProperty:()=>xw,assertReturnStatement:()=>Ey,assertScopable:()=>EC,assertSequenceExpression:()=>Dy,assertSpreadElement:()=>ab,assertSpreadProperty:()=>Sw,assertStandardized:()=>CC,assertStatement:()=>kC,assertStaticBlock:()=>Sb,assertStringLiteral:()=>py,assertStringLiteralTypeAnnotation:()=>lx,assertStringTypeAnnotation:()=>ux,assertSuper:()=>ob,assertSwitchCase:()=>ky,assertSwitchStatement:()=>Ay,assertSymbolTypeAnnotation:()=>dx,assertTSAnyKeyword:()=>vS,assertTSArrayType:()=>RS,assertTSAsExpression:()=>aC,assertTSBaseType:()=>vw,assertTSBigIntKeyword:()=>bS,assertTSBooleanKeyword:()=>yS,assertTSCallSignatureDeclaration:()=>pS,assertTSClassImplements:()=>$S,assertTSConditionalType:()=>GS,assertTSConstructSignatureDeclaration:()=>mS,assertTSConstructorType:()=>NS,assertTSDeclareFunction:()=>uS,assertTSDeclareMethod:()=>dS,assertTSEntityName:()=>GC,assertTSEnumBody:()=>cC,assertTSEnumDeclaration:()=>lC,assertTSEnumMember:()=>uC,assertTSExportAssignment:()=>_C,assertTSExternalModuleReference:()=>hC,assertTSFunctionType:()=>MS,assertTSImportEqualsDeclaration:()=>mC,assertTSImportType:()=>pC,assertTSIndexSignature:()=>_S,assertTSIndexedAccessType:()=>YS,assertTSInferType:()=>KS,assertTSInstantiationExpression:()=>iC,assertTSInterfaceBody:()=>nC,assertTSInterfaceDeclaration:()=>tC,assertTSInterfaceHeritage:()=>eC,assertTSIntersectionType:()=>WS,assertTSIntrinsicKeyword:()=>xS,assertTSLiteralType:()=>QS,assertTSMappedType:()=>XS,assertTSMethodSignature:()=>gS,assertTSModuleBlock:()=>fC,assertTSModuleDeclaration:()=>dC,assertTSNamedTupleMember:()=>HS,assertTSNamespaceExportDeclaration:()=>vC,assertTSNeverKeyword:()=>SS,assertTSNonNullExpression:()=>gC,assertTSNullKeyword:()=>CS,assertTSNumberKeyword:()=>wS,assertTSObjectKeyword:()=>TS,assertTSOptionalType:()=>BS,assertTSParameterProperty:()=>lS,assertTSParenthesizedType:()=>qS,assertTSPropertySignature:()=>hS,assertTSQualifiedName:()=>fS,assertTSRestType:()=>VS,assertTSSatisfiesExpression:()=>oC,assertTSStringKeyword:()=>ES,assertTSSymbolKeyword:()=>DS,assertTSTemplateLiteralType:()=>ZS,assertTSThisType:()=>jS,assertTSTupleType:()=>zS,assertTSType:()=>_w,assertTSTypeAliasDeclaration:()=>rC,assertTSTypeAnnotation:()=>yC,assertTSTypeAssertion:()=>sC,assertTSTypeElement:()=>gw,assertTSTypeLiteral:()=>LS,assertTSTypeOperator:()=>JS,assertTSTypeParameter:()=>SC,assertTSTypeParameterDeclaration:()=>xC,assertTSTypeParameterInstantiation:()=>bC,assertTSTypePredicate:()=>FS,assertTSTypeQuery:()=>IS,assertTSTypeReference:()=>PS,assertTSUndefinedKeyword:()=>OS,assertTSUnionType:()=>US,assertTSUnknownKeyword:()=>kS,assertTSVoidKeyword:()=>AS,assertTaggedTemplateExpression:()=>sb,assertTemplateElement:()=>cb,assertTemplateLiteral:()=>lb,assertTerminatorless:()=>AC,assertThisExpression:()=>jy,assertThisTypeAnnotation:()=>fx,assertThrowStatement:()=>My,assertTopicReference:()=>iS,assertTryStatement:()=>Ny,assertTupleTypeAnnotation:()=>px,assertTypeAlias:()=>hx,assertTypeAnnotation:()=>gx,assertTypeCastExpression:()=>_x,assertTypeParameter:()=>vx,assertTypeParameterDeclaration:()=>yx,assertTypeParameterInstantiation:()=>bx,assertTypeScript:()=>hw,assertTypeofTypeAnnotation:()=>mx,assertUnaryExpression:()=>Py,assertUnaryLike:()=>QC,assertUnionTypeAnnotation:()=>xx,assertUpdateExpression:()=>Fy,assertUserWhitespacable:()=>JC,assertV8IntrinsicIdentifier:()=>Zx,assertVariableDeclaration:()=>Iy,assertVariableDeclarator:()=>Ly,assertVariance:()=>Sx,assertVoidPattern:()=>cS,assertVoidTypeAnnotation:()=>Cx,assertWhile:()=>PC,assertWhileStatement:()=>Ry,assertWithStatement:()=>zy,assertYieldExpression:()=>ub,assignmentExpression:()=>xl,assignmentPattern:()=>gu,awaitExpression:()=>Vu,bigIntLiteral:()=>Uu,binaryExpression:()=>Sl,bindExpression:()=>Af,blockStatement:()=>El,booleanLiteral:()=>Kl,booleanLiteralTypeAnnotation:()=>rd,booleanTypeAnnotation:()=>nd,breakStatement:()=>Dl,buildMatchMemberExpression:()=>nc,buildUndefinedNode:()=>jw,callExpression:()=>Ol,catchClause:()=>kl,classAccessorProperty:()=>Ju,classBody:()=>yu,classDeclaration:()=>xu,classExpression:()=>bu,classImplements:()=>ad,classMethod:()=>Nu,classPrivateMethod:()=>Xu,classPrivateProperty:()=>Yu,classProperty:()=>qu,clone:()=>Rw,cloneDeep:()=>zw,cloneDeepWithoutLoc:()=>Bw,cloneNode:()=>Fw,cloneWithoutLoc:()=>Vw,conditionalExpression:()=>Al,continueStatement:()=>jl,createFlowUnionType:()=>Dw,createTSUnionType:()=>Aw,createTypeAnnotationBasedOnTypeof:()=>ww,createUnionTypeAnnotation:()=>Dw,debuggerStatement:()=>Ml,declareClass:()=>od,declareExportAllDeclaration:()=>hd,declareExportDeclaration:()=>md,declareFunction:()=>sd,declareInterface:()=>cd,declareModule:()=>ld,declareModuleExports:()=>ud,declareOpaqueType:()=>fd,declareTypeAlias:()=>dd,declareVariable:()=>pd,declaredPredicate:()=>gd,decorator:()=>jf,directive:()=>wl,directiveLiteral:()=>Tl,doExpression:()=>Mf,doWhileStatement:()=>Nl,emptyStatement:()=>Pl,emptyTypeAnnotation:()=>Dd,ensureBlock:()=>JT,enumBooleanBody:()=>tf,enumBooleanMember:()=>of,enumDeclaration:()=>ef,enumDefaultedMember:()=>lf,enumNumberBody:()=>nf,enumNumberMember:()=>sf,enumStringBody:()=>rf,enumStringMember:()=>cf,enumSymbolBody:()=>af,existsTypeAnnotation:()=>_d,exportAllDeclaration:()=>Su,exportDefaultDeclaration:()=>Cu,exportDefaultSpecifier:()=>Nf,exportNamedDeclaration:()=>wu,exportNamespaceSpecifier:()=>Wu,exportSpecifier:()=>Tu,expressionStatement:()=>Fl,file:()=>Il,forInStatement:()=>Ll,forOfStatement:()=>Eu,forStatement:()=>Rl,functionDeclaration:()=>zl,functionExpression:()=>Bl,functionTypeAnnotation:()=>vd,functionTypeParam:()=>yd,genericTypeAnnotation:()=>bd,getAssignmentIdentifiers:()=>hE,getBindingIdentifiers:()=>gE,getFunctionName:()=>bE,getOuterBindingIdentifiers:()=>_E,identifier:()=>V,ifStatement:()=>Vl,import:()=>Hu,importAttribute:()=>$u,importDeclaration:()=>Du,importDefaultSpecifier:()=>Ou,importExpression:()=>ju,importNamespaceSpecifier:()=>ku,importSpecifier:()=>Au,indexedAccessType:()=>uf,inferredPredicate:()=>xd,inheritInnerComments:()=>Gw,inheritLeadingComments:()=>Kw,inheritTrailingComments:()=>qw,inherits:()=>pE,inheritsComments:()=>Jw,interfaceDeclaration:()=>Cd,interfaceExtends:()=>Sd,interfaceTypeAnnotation:()=>wd,interpreterDirective:()=>Cl,intersectionTypeAnnotation:()=>Td,is:()=>w,isAccessor:()=>Ps,isAnyTypeAnnotation:()=>ei,isArgumentPlaceholder:()=>Oa,isArrayExpression:()=>yn,isArrayPattern:()=>_r,isArrayTypeAnnotation:()=>ti,isArrowFunctionExpression:()=>vr,isAssignmentExpression:()=>bn,isAssignmentPattern:()=>gr,isAwaitExpression:()=>Vr,isBigIntLiteral:()=>Ur,isBinary:()=>ns,isBinaryExpression:()=>xn,isBindExpression:()=>ka,isBinding:()=>CE,isBlock:()=>as,isBlockParent:()=>is,isBlockScoped:()=>TE,isBlockStatement:()=>Tn,isBooleanLiteral:()=>Kn,isBooleanLiteralTypeAnnotation:()=>ri,isBooleanTypeAnnotation:()=>ni,isBreakStatement:()=>En,isCallExpression:()=>Dn,isCatchClause:()=>On,isClass:()=>As,isClassAccessorProperty:()=>Jr,isClassBody:()=>yr,isClassDeclaration:()=>xr,isClassExpression:()=>br,isClassImplements:()=>ai,isClassMethod:()=>Nr,isClassPrivateMethod:()=>Xr,isClassPrivateProperty:()=>Yr,isClassProperty:()=>qr,isCompletionStatement:()=>cs,isConditional:()=>ls,isConditionalExpression:()=>kn,isContinueStatement:()=>An,isDebuggerStatement:()=>jn,isDeclaration:()=>vs,isDeclareClass:()=>oi,isDeclareExportAllDeclaration:()=>hi,isDeclareExportDeclaration:()=>mi,isDeclareFunction:()=>si,isDeclareInterface:()=>ci,isDeclareModule:()=>li,isDeclareModuleExports:()=>ui,isDeclareOpaqueType:()=>fi,isDeclareTypeAlias:()=>di,isDeclareVariable:()=>pi,isDeclaredPredicate:()=>gi,isDecorator:()=>Aa,isDirective:()=>Cn,isDirectiveLiteral:()=>wn,isDoExpression:()=>ja,isDoWhileStatement:()=>Mn,isEmptyStatement:()=>Nn,isEmptyTypeAnnotation:()=>Di,isEnumBody:()=>Vs,isEnumBooleanBody:()=>ta,isEnumBooleanMember:()=>aa,isEnumDeclaration:()=>ea,isEnumDefaultedMember:()=>ca,isEnumMember:()=>Hs,isEnumNumberBody:()=>na,isEnumNumberMember:()=>oa,isEnumStringBody:()=>ra,isEnumStringMember:()=>sa,isEnumSymbolBody:()=>ia,isExistsTypeAnnotation:()=>_i,isExportAllDeclaration:()=>Sr,isExportDeclaration:()=>Ms,isExportDefaultDeclaration:()=>Cr,isExportDefaultSpecifier:()=>Ma,isExportNamedDeclaration:()=>wr,isExportNamespaceSpecifier:()=>Wr,isExportSpecifier:()=>Tr,isExpression:()=>ts,isExpressionStatement:()=>Pn,isExpressionWrapper:()=>fs,isFile:()=>Fn,isFlow:()=>Is,isFlowBaseAnnotation:()=>Rs,isFlowDeclaration:()=>zs,isFlowPredicate:()=>Bs,isFlowType:()=>Ls,isFor:()=>ps,isForInStatement:()=>In,isForOfStatement:()=>Er,isForStatement:()=>Ln,isForXStatement:()=>ms,isFunction:()=>hs,isFunctionDeclaration:()=>Rn,isFunctionExpression:()=>zn,isFunctionParameter:()=>ys,isFunctionParent:()=>gs,isFunctionTypeAnnotation:()=>vi,isFunctionTypeParam:()=>yi,isGenericTypeAnnotation:()=>bi,isIdentifier:()=>Bn,isIfStatement:()=>Vn,isImmutable:()=>EE,isImport:()=>Hr,isImportAttribute:()=>$r,isImportDeclaration:()=>Dr,isImportDefaultSpecifier:()=>Or,isImportExpression:()=>jr,isImportNamespaceSpecifier:()=>kr,isImportOrExportDeclaration:()=>js,isImportSpecifier:()=>Ar,isIndexedAccessType:()=>la,isInferredPredicate:()=>xi,isInterfaceDeclaration:()=>Ci,isInterfaceExtends:()=>Si,isInterfaceTypeAnnotation:()=>wi,isInterpreterDirective:()=>Sn,isIntersectionTypeAnnotation:()=>Ti,isJSX:()=>Us,isJSXAttribute:()=>da,isJSXClosingElement:()=>fa,isJSXClosingFragment:()=>Ta,isJSXElement:()=>pa,isJSXEmptyExpression:()=>ma,isJSXExpressionContainer:()=>ha,isJSXFragment:()=>Ca,isJSXIdentifier:()=>_a,isJSXMemberExpression:()=>va,isJSXNamespacedName:()=>ya,isJSXOpeningElement:()=>ba,isJSXOpeningFragment:()=>wa,isJSXSpreadAttribute:()=>xa,isJSXSpreadChild:()=>ga,isJSXText:()=>Sa,isLVal:()=>xs,isLabeledStatement:()=>Hn,isLet:()=>wE,isLiteral:()=>Cs,isLogicalExpression:()=>Jn,isLoop:()=>us,isMemberExpression:()=>Yn,isMetaProperty:()=>Mr,isMethod:()=>Ts,isMiscellaneous:()=>Ws,isMixedTypeAnnotation:()=>Ei,isModuleDeclaration:()=>$s,isModuleExpression:()=>Na,isModuleSpecifier:()=>Ns,isNewExpression:()=>Xn,isNode:()=>Vv,isNodesEquivalent:()=>DE,isNullLiteral:()=>Gn,isNullLiteralTypeAnnotation:()=>ii,isNullableTypeAnnotation:()=>Oi,isNumberLiteral:()=>Ys,isNumberLiteralTypeAnnotation:()=>ki,isNumberTypeAnnotation:()=>Ai,isNumericLiteral:()=>Wn,isObjectExpression:()=>Qn,isObjectMember:()=>Es,isObjectMethod:()=>$n,isObjectPattern:()=>Pr,isObjectProperty:()=>er,isObjectTypeAnnotation:()=>ji,isObjectTypeCallProperty:()=>Ni,isObjectTypeIndexer:()=>Pi,isObjectTypeInternalSlot:()=>Mi,isObjectTypeProperty:()=>Fi,isObjectTypeSpreadProperty:()=>Ii,isOpaqueType:()=>Li,isOptionalCallExpression:()=>Kr,isOptionalIndexedAccessType:()=>ua,isOptionalMemberExpression:()=>Gr,isParenthesizedExpression:()=>ir,isPattern:()=>ks,isPatternLike:()=>bs,isPipelineBareFunction:()=>Ia,isPipelinePrimaryTopicReference:()=>La,isPipelineTopicExpression:()=>Fa,isPlaceholder:()=>Ea,isPlaceholderType:()=>oc,isPrivate:()=>Fs,isPrivateName:()=>Zr,isProgram:()=>Zn,isProperty:()=>Ds,isPureish:()=>_s,isQualifiedTypeIdentifier:()=>Ri,isReferenced:()=>OE,isRegExpLiteral:()=>qn,isRegexLiteral:()=>Xs,isRestElement:()=>tr,isRestProperty:()=>Zs,isReturnStatement:()=>nr,isScopable:()=>rs,isScope:()=>kE,isSequenceExpression:()=>rr,isSpecifierDefault:()=>AE,isSpreadElement:()=>Fr,isSpreadProperty:()=>Qs,isStandardized:()=>es,isStatement:()=>os,isStaticBlock:()=>Qr,isStringLiteral:()=>Un,isStringLiteralTypeAnnotation:()=>zi,isStringTypeAnnotation:()=>Bi,isSuper:()=>Ir,isSwitchCase:()=>ar,isSwitchStatement:()=>or,isSymbolTypeAnnotation:()=>Vi,isTSAnyKeyword:()=>Ja,isTSArrayType:()=>ho,isTSAsExpression:()=>Io,isTSBaseType:()=>Js,isTSBigIntKeyword:()=>Xa,isTSBooleanKeyword:()=>Ya,isTSCallSignatureDeclaration:()=>Ua,isTSClassImplements:()=>Ao,isTSConditionalType:()=>So,isTSConstructSignatureDeclaration:()=>Wa,isTSConstructorType:()=>lo,isTSDeclareFunction:()=>Ba,isTSDeclareMethod:()=>Va,isTSEntityName:()=>Ss,isTSEnumBody:()=>zo,isTSEnumDeclaration:()=>Bo,isTSEnumMember:()=>Vo,isTSExportAssignment:()=>Jo,isTSExternalModuleReference:()=>Ko,isTSFunctionType:()=>co,isTSImportEqualsDeclaration:()=>Go,isTSImportType:()=>Wo,isTSIndexSignature:()=>qa,isTSIndexedAccessType:()=>Eo,isTSInferType:()=>Co,isTSInstantiationExpression:()=>Fo,isTSInterfaceBody:()=>No,isTSInterfaceDeclaration:()=>Mo,isTSInterfaceHeritage:()=>jo,isTSIntersectionType:()=>xo,isTSIntrinsicKeyword:()=>Za,isTSLiteralType:()=>ko,isTSMappedType:()=>Do,isTSMethodSignature:()=>Ka,isTSModuleBlock:()=>Uo,isTSModuleDeclaration:()=>Ho,isTSNamedTupleMember:()=>yo,isTSNamespaceExportDeclaration:()=>Yo,isTSNeverKeyword:()=>Qa,isTSNonNullExpression:()=>qo,isTSNullKeyword:()=>$a,isTSNumberKeyword:()=>eo,isTSObjectKeyword:()=>to,isTSOptionalType:()=>_o,isTSParameterProperty:()=>za,isTSParenthesizedType:()=>wo,isTSPropertySignature:()=>Ga,isTSQualifiedName:()=>Ha,isTSRestType:()=>vo,isTSSatisfiesExpression:()=>Lo,isTSStringKeyword:()=>no,isTSSymbolKeyword:()=>ro,isTSTemplateLiteralType:()=>Oo,isTSThisType:()=>so,isTSTupleType:()=>go,isTSType:()=>qs,isTSTypeAliasDeclaration:()=>Po,isTSTypeAnnotation:()=>Xo,isTSTypeAssertion:()=>Ro,isTSTypeElement:()=>Ks,isTSTypeLiteral:()=>mo,isTSTypeOperator:()=>To,isTSTypeParameter:()=>$o,isTSTypeParameterDeclaration:()=>Qo,isTSTypeParameterInstantiation:()=>Zo,isTSTypePredicate:()=>fo,isTSTypeQuery:()=>po,isTSTypeReference:()=>uo,isTSUndefinedKeyword:()=>io,isTSUnionType:()=>bo,isTSUnknownKeyword:()=>ao,isTSVoidKeyword:()=>oo,isTaggedTemplateExpression:()=>Lr,isTemplateElement:()=>Rr,isTemplateLiteral:()=>zr,isTerminatorless:()=>ss,isThisExpression:()=>sr,isThisTypeAnnotation:()=>Hi,isThrowStatement:()=>cr,isTopicReference:()=>Pa,isTryStatement:()=>lr,isTupleTypeAnnotation:()=>Ui,isType:()=>ac,isTypeAlias:()=>Gi,isTypeAnnotation:()=>Ki,isTypeCastExpression:()=>qi,isTypeParameter:()=>Ji,isTypeParameterDeclaration:()=>Yi,isTypeParameterInstantiation:()=>Xi,isTypeScript:()=>Gs,isTypeofTypeAnnotation:()=>Wi,isUnaryExpression:()=>ur,isUnaryLike:()=>Os,isUnionTypeAnnotation:()=>Zi,isUpdateExpression:()=>dr,isUserWhitespacable:()=>ws,isV8IntrinsicIdentifier:()=>Da,isValidES3Identifier:()=>ME,isValidIdentifier:()=>sc,isVar:()=>NE,isVariableDeclaration:()=>fr,isVariableDeclarator:()=>pr,isVariance:()=>Qi,isVoidPattern:()=>Ra,isVoidTypeAnnotation:()=>$i,isWhile:()=>ds,isWhileStatement:()=>mr,isWithStatement:()=>hr,isYieldExpression:()=>Br,jsxAttribute:()=>ff,jsxClosingElement:()=>pf,jsxClosingFragment:()=>Ef,jsxElement:()=>mf,jsxEmptyExpression:()=>hf,jsxExpressionContainer:()=>gf,jsxFragment:()=>wf,jsxIdentifier:()=>vf,jsxMemberExpression:()=>yf,jsxNamespacedName:()=>bf,jsxOpeningElement:()=>xf,jsxOpeningFragment:()=>Tf,jsxSpreadAttribute:()=>Sf,jsxSpreadChild:()=>_f,jsxText:()=>Cf,labeledStatement:()=>Hl,logicalExpression:()=>Jl,matchesPattern:()=>tc,memberExpression:()=>Yl,metaProperty:()=>Mu,mixedTypeAnnotation:()=>Ed,moduleExpression:()=>Pf,newExpression:()=>Xl,nullLiteral:()=>Gl,nullLiteralTypeAnnotation:()=>id,nullableTypeAnnotation:()=>Od,numberLiteral:()=>em,numberLiteralTypeAnnotation:()=>kd,numberTypeAnnotation:()=>Ad,numericLiteral:()=>Wl,objectExpression:()=>Ql,objectMethod:()=>$l,objectPattern:()=>Pu,objectProperty:()=>eu,objectTypeAnnotation:()=>jd,objectTypeCallProperty:()=>Nd,objectTypeIndexer:()=>Pd,objectTypeInternalSlot:()=>Md,objectTypeProperty:()=>Fd,objectTypeSpreadProperty:()=>Id,opaqueType:()=>Ld,optionalCallExpression:()=>Ku,optionalIndexedAccessType:()=>df,optionalMemberExpression:()=>Gu,parenthesizedExpression:()=>iu,pipelineBareFunction:()=>Lf,pipelinePrimaryTopicReference:()=>Rf,pipelineTopicExpression:()=>If,placeholder:()=>Df,prependToMemberExpression:()=>mE,privateName:()=>Zu,program:()=>Zl,qualifiedTypeIdentifier:()=>Rd,react:()=>PE,regExpLiteral:()=>ql,regexLiteral:()=>tm,removeComments:()=>Yw,removeProperties:()=>iE,removePropertiesDeep:()=>aE,removeTypeDuplicates:()=>Ew,restElement:()=>tu,restProperty:()=>nm,returnStatement:()=>nu,sequenceExpression:()=>ru,shallowEqual:()=>S,spreadElement:()=>Fu,spreadProperty:()=>rm,staticBlock:()=>Qu,stringLiteral:()=>Ul,stringLiteralTypeAnnotation:()=>zd,stringTypeAnnotation:()=>Bd,super:()=>Iu,switchCase:()=>au,switchStatement:()=>ou,symbolTypeAnnotation:()=>Vd,taggedTemplateExpression:()=>Lu,templateElement:()=>Ru,templateLiteral:()=>zu,thisExpression:()=>su,thisTypeAnnotation:()=>Hd,throwStatement:()=>cu,toBindingIdentifierName:()=>XT,toBlock:()=>qT,toComputedKey:()=>ZT,toExpression:()=>QT,toIdentifier:()=>YT,toKeyAlias:()=>oE,toStatement:()=>sE,topicReference:()=>Ff,traverse:()=>xE,traverseFast:()=>tE,tryStatement:()=>lu,tsAnyKeyword:()=>Yf,tsArrayType:()=>hp,tsAsExpression:()=>Ip,tsBigIntKeyword:()=>Zf,tsBooleanKeyword:()=>Xf,tsCallSignatureDeclaration:()=>Wf,tsClassImplements:()=>Ap,tsConditionalType:()=>Sp,tsConstructSignatureDeclaration:()=>Gf,tsConstructorType:()=>up,tsDeclareFunction:()=>Vf,tsDeclareMethod:()=>Hf,tsEnumBody:()=>zp,tsEnumDeclaration:()=>Bp,tsEnumMember:()=>Vp,tsExportAssignment:()=>Jp,tsExternalModuleReference:()=>Kp,tsFunctionType:()=>lp,tsImportEqualsDeclaration:()=>Gp,tsImportType:()=>Wp,tsIndexSignature:()=>Jf,tsIndexedAccessType:()=>Ep,tsInferType:()=>Cp,tsInstantiationExpression:()=>Fp,tsInterfaceBody:()=>Np,tsInterfaceDeclaration:()=>Mp,tsInterfaceHeritage:()=>jp,tsIntersectionType:()=>xp,tsIntrinsicKeyword:()=>Qf,tsLiteralType:()=>kp,tsMappedType:()=>Dp,tsMethodSignature:()=>qf,tsModuleBlock:()=>Up,tsModuleDeclaration:()=>Hp,tsNamedTupleMember:()=>yp,tsNamespaceExportDeclaration:()=>Yp,tsNeverKeyword:()=>$f,tsNonNullExpression:()=>qp,tsNullKeyword:()=>ep,tsNumberKeyword:()=>tp,tsObjectKeyword:()=>np,tsOptionalType:()=>_p,tsParameterProperty:()=>Bf,tsParenthesizedType:()=>wp,tsPropertySignature:()=>Kf,tsQualifiedName:()=>Uf,tsRestType:()=>vp,tsSatisfiesExpression:()=>Lp,tsStringKeyword:()=>rp,tsSymbolKeyword:()=>ip,tsTemplateLiteralType:()=>Op,tsThisType:()=>cp,tsTupleType:()=>gp,tsTypeAliasDeclaration:()=>Pp,tsTypeAnnotation:()=>Xp,tsTypeAssertion:()=>Rp,tsTypeLiteral:()=>mp,tsTypeOperator:()=>Tp,tsTypeParameter:()=>$p,tsTypeParameterDeclaration:()=>Qp,tsTypeParameterInstantiation:()=>Zp,tsTypePredicate:()=>fp,tsTypeQuery:()=>pp,tsTypeReference:()=>dp,tsUndefinedKeyword:()=>ap,tsUnionType:()=>bp,tsUnknownKeyword:()=>op,tsVoidKeyword:()=>sp,tupleTypeAnnotation:()=>Ud,typeAlias:()=>Gd,typeAnnotation:()=>Kd,typeCastExpression:()=>qd,typeParameter:()=>Jd,typeParameterDeclaration:()=>Yd,typeParameterInstantiation:()=>Xd,typeofTypeAnnotation:()=>Wd,unaryExpression:()=>uu,unionTypeAnnotation:()=>Zd,updateExpression:()=>du,v8IntrinsicIdentifier:()=>Of,validate:()=>gl,valueToNode:()=>dE,variableDeclaration:()=>fu,variableDeclarator:()=>pu,variance:()=>Qd,voidPattern:()=>zf,voidTypeAnnotation:()=>$d,whileStatement:()=>mu,withStatement:()=>hu,yieldExpression:()=>Bu});function S(e,t){let n=Object.keys(t);for(let r of n)if(e[r]!==t[r])return!1;return!0}const _n=new Set;function C(e,t,n=``,r=e){if(_n.has(r))return;_n.add(r);let{internal:i,trace:a}=vn(1,2);i||console.warn(`${n}\`${e}\` has been deprecated, please migrate to \`${t}\`\n${a}`)}function vn(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 yn(e,t){return!e||e.type!==`ArrayExpression`?!1:t==null||S(e,t)}function bn(e,t){return!e||e.type!==`AssignmentExpression`?!1:t==null||S(e,t)}function xn(e,t){return!e||e.type!==`BinaryExpression`?!1:t==null||S(e,t)}function Sn(e,t){return!e||e.type!==`InterpreterDirective`?!1:t==null||S(e,t)}function Cn(e,t){return!e||e.type!==`Directive`?!1:t==null||S(e,t)}function wn(e,t){return!e||e.type!==`DirectiveLiteral`?!1:t==null||S(e,t)}function Tn(e,t){return!e||e.type!==`BlockStatement`?!1:t==null||S(e,t)}function En(e,t){return!e||e.type!==`BreakStatement`?!1:t==null||S(e,t)}function Dn(e,t){return!e||e.type!==`CallExpression`?!1:t==null||S(e,t)}function On(e,t){return!e||e.type!==`CatchClause`?!1:t==null||S(e,t)}function kn(e,t){return!e||e.type!==`ConditionalExpression`?!1:t==null||S(e,t)}function An(e,t){return!e||e.type!==`ContinueStatement`?!1:t==null||S(e,t)}function jn(e,t){return!e||e.type!==`DebuggerStatement`?!1:t==null||S(e,t)}function Mn(e,t){return!e||e.type!==`DoWhileStatement`?!1:t==null||S(e,t)}function Nn(e,t){return!e||e.type!==`EmptyStatement`?!1:t==null||S(e,t)}function Pn(e,t){return!e||e.type!==`ExpressionStatement`?!1:t==null||S(e,t)}function Fn(e,t){return!e||e.type!==`File`?!1:t==null||S(e,t)}function In(e,t){return!e||e.type!==`ForInStatement`?!1:t==null||S(e,t)}function Ln(e,t){return!e||e.type!==`ForStatement`?!1:t==null||S(e,t)}function Rn(e,t){return!e||e.type!==`FunctionDeclaration`?!1:t==null||S(e,t)}function zn(e,t){return!e||e.type!==`FunctionExpression`?!1:t==null||S(e,t)}function Bn(e,t){return!e||e.type!==`Identifier`?!1:t==null||S(e,t)}function Vn(e,t){return!e||e.type!==`IfStatement`?!1:t==null||S(e,t)}function Hn(e,t){return!e||e.type!==`LabeledStatement`?!1:t==null||S(e,t)}function Un(e,t){return!e||e.type!==`StringLiteral`?!1:t==null||S(e,t)}function Wn(e,t){return!e||e.type!==`NumericLiteral`?!1:t==null||S(e,t)}function Gn(e,t){return!e||e.type!==`NullLiteral`?!1:t==null||S(e,t)}function Kn(e,t){return!e||e.type!==`BooleanLiteral`?!1:t==null||S(e,t)}function qn(e,t){return!e||e.type!==`RegExpLiteral`?!1:t==null||S(e,t)}function Jn(e,t){return!e||e.type!==`LogicalExpression`?!1:t==null||S(e,t)}function Yn(e,t){return!e||e.type!==`MemberExpression`?!1:t==null||S(e,t)}function Xn(e,t){return!e||e.type!==`NewExpression`?!1:t==null||S(e,t)}function Zn(e,t){return!e||e.type!==`Program`?!1:t==null||S(e,t)}function Qn(e,t){return!e||e.type!==`ObjectExpression`?!1:t==null||S(e,t)}function $n(e,t){return!e||e.type!==`ObjectMethod`?!1:t==null||S(e,t)}function er(e,t){return!e||e.type!==`ObjectProperty`?!1:t==null||S(e,t)}function tr(e,t){return!e||e.type!==`RestElement`?!1:t==null||S(e,t)}function nr(e,t){return!e||e.type!==`ReturnStatement`?!1:t==null||S(e,t)}function rr(e,t){return!e||e.type!==`SequenceExpression`?!1:t==null||S(e,t)}function ir(e,t){return!e||e.type!==`ParenthesizedExpression`?!1:t==null||S(e,t)}function ar(e,t){return!e||e.type!==`SwitchCase`?!1:t==null||S(e,t)}function or(e,t){return!e||e.type!==`SwitchStatement`?!1:t==null||S(e,t)}function sr(e,t){return!e||e.type!==`ThisExpression`?!1:t==null||S(e,t)}function cr(e,t){return!e||e.type!==`ThrowStatement`?!1:t==null||S(e,t)}function lr(e,t){return!e||e.type!==`TryStatement`?!1:t==null||S(e,t)}function ur(e,t){return!e||e.type!==`UnaryExpression`?!1:t==null||S(e,t)}function dr(e,t){return!e||e.type!==`UpdateExpression`?!1:t==null||S(e,t)}function fr(e,t){return!e||e.type!==`VariableDeclaration`?!1:t==null||S(e,t)}function pr(e,t){return!e||e.type!==`VariableDeclarator`?!1:t==null||S(e,t)}function mr(e,t){return!e||e.type!==`WhileStatement`?!1:t==null||S(e,t)}function hr(e,t){return!e||e.type!==`WithStatement`?!1:t==null||S(e,t)}function gr(e,t){return!e||e.type!==`AssignmentPattern`?!1:t==null||S(e,t)}function _r(e,t){return!e||e.type!==`ArrayPattern`?!1:t==null||S(e,t)}function vr(e,t){return!e||e.type!==`ArrowFunctionExpression`?!1:t==null||S(e,t)}function yr(e,t){return!e||e.type!==`ClassBody`?!1:t==null||S(e,t)}function br(e,t){return!e||e.type!==`ClassExpression`?!1:t==null||S(e,t)}function xr(e,t){return!e||e.type!==`ClassDeclaration`?!1:t==null||S(e,t)}function Sr(e,t){return!e||e.type!==`ExportAllDeclaration`?!1:t==null||S(e,t)}function Cr(e,t){return!e||e.type!==`ExportDefaultDeclaration`?!1:t==null||S(e,t)}function wr(e,t){return!e||e.type!==`ExportNamedDeclaration`?!1:t==null||S(e,t)}function Tr(e,t){return!e||e.type!==`ExportSpecifier`?!1:t==null||S(e,t)}function Er(e,t){return!e||e.type!==`ForOfStatement`?!1:t==null||S(e,t)}function Dr(e,t){return!e||e.type!==`ImportDeclaration`?!1:t==null||S(e,t)}function Or(e,t){return!e||e.type!==`ImportDefaultSpecifier`?!1:t==null||S(e,t)}function kr(e,t){return!e||e.type!==`ImportNamespaceSpecifier`?!1:t==null||S(e,t)}function Ar(e,t){return!e||e.type!==`ImportSpecifier`?!1:t==null||S(e,t)}function jr(e,t){return!e||e.type!==`ImportExpression`?!1:t==null||S(e,t)}function Mr(e,t){return!e||e.type!==`MetaProperty`?!1:t==null||S(e,t)}function Nr(e,t){return!e||e.type!==`ClassMethod`?!1:t==null||S(e,t)}function Pr(e,t){return!e||e.type!==`ObjectPattern`?!1:t==null||S(e,t)}function Fr(e,t){return!e||e.type!==`SpreadElement`?!1:t==null||S(e,t)}function Ir(e,t){return!e||e.type!==`Super`?!1:t==null||S(e,t)}function Lr(e,t){return!e||e.type!==`TaggedTemplateExpression`?!1:t==null||S(e,t)}function Rr(e,t){return!e||e.type!==`TemplateElement`?!1:t==null||S(e,t)}function zr(e,t){return!e||e.type!==`TemplateLiteral`?!1:t==null||S(e,t)}function Br(e,t){return!e||e.type!==`YieldExpression`?!1:t==null||S(e,t)}function Vr(e,t){return!e||e.type!==`AwaitExpression`?!1:t==null||S(e,t)}function Hr(e,t){return!e||e.type!==`Import`?!1:t==null||S(e,t)}function Ur(e,t){return!e||e.type!==`BigIntLiteral`?!1:t==null||S(e,t)}function Wr(e,t){return!e||e.type!==`ExportNamespaceSpecifier`?!1:t==null||S(e,t)}function Gr(e,t){return!e||e.type!==`OptionalMemberExpression`?!1:t==null||S(e,t)}function Kr(e,t){return!e||e.type!==`OptionalCallExpression`?!1:t==null||S(e,t)}function qr(e,t){return!e||e.type!==`ClassProperty`?!1:t==null||S(e,t)}function Jr(e,t){return!e||e.type!==`ClassAccessorProperty`?!1:t==null||S(e,t)}function Yr(e,t){return!e||e.type!==`ClassPrivateProperty`?!1:t==null||S(e,t)}function Xr(e,t){return!e||e.type!==`ClassPrivateMethod`?!1:t==null||S(e,t)}function Zr(e,t){return!e||e.type!==`PrivateName`?!1:t==null||S(e,t)}function Qr(e,t){return!e||e.type!==`StaticBlock`?!1:t==null||S(e,t)}function $r(e,t){return!e||e.type!==`ImportAttribute`?!1:t==null||S(e,t)}function ei(e,t){return!e||e.type!==`AnyTypeAnnotation`?!1:t==null||S(e,t)}function ti(e,t){return!e||e.type!==`ArrayTypeAnnotation`?!1:t==null||S(e,t)}function ni(e,t){return!e||e.type!==`BooleanTypeAnnotation`?!1:t==null||S(e,t)}function ri(e,t){return!e||e.type!==`BooleanLiteralTypeAnnotation`?!1:t==null||S(e,t)}function ii(e,t){return!e||e.type!==`NullLiteralTypeAnnotation`?!1:t==null||S(e,t)}function ai(e,t){return!e||e.type!==`ClassImplements`?!1:t==null||S(e,t)}function oi(e,t){return!e||e.type!==`DeclareClass`?!1:t==null||S(e,t)}function si(e,t){return!e||e.type!==`DeclareFunction`?!1:t==null||S(e,t)}function ci(e,t){return!e||e.type!==`DeclareInterface`?!1:t==null||S(e,t)}function li(e,t){return!e||e.type!==`DeclareModule`?!1:t==null||S(e,t)}function ui(e,t){return!e||e.type!==`DeclareModuleExports`?!1:t==null||S(e,t)}function di(e,t){return!e||e.type!==`DeclareTypeAlias`?!1:t==null||S(e,t)}function fi(e,t){return!e||e.type!==`DeclareOpaqueType`?!1:t==null||S(e,t)}function pi(e,t){return!e||e.type!==`DeclareVariable`?!1:t==null||S(e,t)}function mi(e,t){return!e||e.type!==`DeclareExportDeclaration`?!1:t==null||S(e,t)}function hi(e,t){return!e||e.type!==`DeclareExportAllDeclaration`?!1:t==null||S(e,t)}function gi(e,t){return!e||e.type!==`DeclaredPredicate`?!1:t==null||S(e,t)}function _i(e,t){return!e||e.type!==`ExistsTypeAnnotation`?!1:t==null||S(e,t)}function vi(e,t){return!e||e.type!==`FunctionTypeAnnotation`?!1:t==null||S(e,t)}function yi(e,t){return!e||e.type!==`FunctionTypeParam`?!1:t==null||S(e,t)}function bi(e,t){return!e||e.type!==`GenericTypeAnnotation`?!1:t==null||S(e,t)}function xi(e,t){return!e||e.type!==`InferredPredicate`?!1:t==null||S(e,t)}function Si(e,t){return!e||e.type!==`InterfaceExtends`?!1:t==null||S(e,t)}function Ci(e,t){return!e||e.type!==`InterfaceDeclaration`?!1:t==null||S(e,t)}function wi(e,t){return!e||e.type!==`InterfaceTypeAnnotation`?!1:t==null||S(e,t)}function Ti(e,t){return!e||e.type!==`IntersectionTypeAnnotation`?!1:t==null||S(e,t)}function Ei(e,t){return!e||e.type!==`MixedTypeAnnotation`?!1:t==null||S(e,t)}function Di(e,t){return!e||e.type!==`EmptyTypeAnnotation`?!1:t==null||S(e,t)}function Oi(e,t){return!e||e.type!==`NullableTypeAnnotation`?!1:t==null||S(e,t)}function ki(e,t){return!e||e.type!==`NumberLiteralTypeAnnotation`?!1:t==null||S(e,t)}function Ai(e,t){return!e||e.type!==`NumberTypeAnnotation`?!1:t==null||S(e,t)}function ji(e,t){return!e||e.type!==`ObjectTypeAnnotation`?!1:t==null||S(e,t)}function Mi(e,t){return!e||e.type!==`ObjectTypeInternalSlot`?!1:t==null||S(e,t)}function Ni(e,t){return!e||e.type!==`ObjectTypeCallProperty`?!1:t==null||S(e,t)}function Pi(e,t){return!e||e.type!==`ObjectTypeIndexer`?!1:t==null||S(e,t)}function Fi(e,t){return!e||e.type!==`ObjectTypeProperty`?!1:t==null||S(e,t)}function Ii(e,t){return!e||e.type!==`ObjectTypeSpreadProperty`?!1:t==null||S(e,t)}function Li(e,t){return!e||e.type!==`OpaqueType`?!1:t==null||S(e,t)}function Ri(e,t){return!e||e.type!==`QualifiedTypeIdentifier`?!1:t==null||S(e,t)}function zi(e,t){return!e||e.type!==`StringLiteralTypeAnnotation`?!1:t==null||S(e,t)}function Bi(e,t){return!e||e.type!==`StringTypeAnnotation`?!1:t==null||S(e,t)}function Vi(e,t){return!e||e.type!==`SymbolTypeAnnotation`?!1:t==null||S(e,t)}function Hi(e,t){return!e||e.type!==`ThisTypeAnnotation`?!1:t==null||S(e,t)}function Ui(e,t){return!e||e.type!==`TupleTypeAnnotation`?!1:t==null||S(e,t)}function Wi(e,t){return!e||e.type!==`TypeofTypeAnnotation`?!1:t==null||S(e,t)}function Gi(e,t){return!e||e.type!==`TypeAlias`?!1:t==null||S(e,t)}function Ki(e,t){return!e||e.type!==`TypeAnnotation`?!1:t==null||S(e,t)}function qi(e,t){return!e||e.type!==`TypeCastExpression`?!1:t==null||S(e,t)}function Ji(e,t){return!e||e.type!==`TypeParameter`?!1:t==null||S(e,t)}function Yi(e,t){return!e||e.type!==`TypeParameterDeclaration`?!1:t==null||S(e,t)}function Xi(e,t){return!e||e.type!==`TypeParameterInstantiation`?!1:t==null||S(e,t)}function Zi(e,t){return!e||e.type!==`UnionTypeAnnotation`?!1:t==null||S(e,t)}function Qi(e,t){return!e||e.type!==`Variance`?!1:t==null||S(e,t)}function $i(e,t){return!e||e.type!==`VoidTypeAnnotation`?!1:t==null||S(e,t)}function ea(e,t){return!e||e.type!==`EnumDeclaration`?!1:t==null||S(e,t)}function ta(e,t){return!e||e.type!==`EnumBooleanBody`?!1:t==null||S(e,t)}function na(e,t){return!e||e.type!==`EnumNumberBody`?!1:t==null||S(e,t)}function ra(e,t){return!e||e.type!==`EnumStringBody`?!1:t==null||S(e,t)}function ia(e,t){return!e||e.type!==`EnumSymbolBody`?!1:t==null||S(e,t)}function aa(e,t){return!e||e.type!==`EnumBooleanMember`?!1:t==null||S(e,t)}function oa(e,t){return!e||e.type!==`EnumNumberMember`?!1:t==null||S(e,t)}function sa(e,t){return!e||e.type!==`EnumStringMember`?!1:t==null||S(e,t)}function ca(e,t){return!e||e.type!==`EnumDefaultedMember`?!1:t==null||S(e,t)}function la(e,t){return!e||e.type!==`IndexedAccessType`?!1:t==null||S(e,t)}function ua(e,t){return!e||e.type!==`OptionalIndexedAccessType`?!1:t==null||S(e,t)}function da(e,t){return!e||e.type!==`JSXAttribute`?!1:t==null||S(e,t)}function fa(e,t){return!e||e.type!==`JSXClosingElement`?!1:t==null||S(e,t)}function pa(e,t){return!e||e.type!==`JSXElement`?!1:t==null||S(e,t)}function ma(e,t){return!e||e.type!==`JSXEmptyExpression`?!1:t==null||S(e,t)}function ha(e,t){return!e||e.type!==`JSXExpressionContainer`?!1:t==null||S(e,t)}function ga(e,t){return!e||e.type!==`JSXSpreadChild`?!1:t==null||S(e,t)}function _a(e,t){return!e||e.type!==`JSXIdentifier`?!1:t==null||S(e,t)}function va(e,t){return!e||e.type!==`JSXMemberExpression`?!1:t==null||S(e,t)}function ya(e,t){return!e||e.type!==`JSXNamespacedName`?!1:t==null||S(e,t)}function ba(e,t){return!e||e.type!==`JSXOpeningElement`?!1:t==null||S(e,t)}function xa(e,t){return!e||e.type!==`JSXSpreadAttribute`?!1:t==null||S(e,t)}function Sa(e,t){return!e||e.type!==`JSXText`?!1:t==null||S(e,t)}function Ca(e,t){return!e||e.type!==`JSXFragment`?!1:t==null||S(e,t)}function wa(e,t){return!e||e.type!==`JSXOpeningFragment`?!1:t==null||S(e,t)}function Ta(e,t){return!e||e.type!==`JSXClosingFragment`?!1:t==null||S(e,t)}function Ea(e,t){return!e||e.type!==`Placeholder`?!1:t==null||S(e,t)}function Da(e,t){return!e||e.type!==`V8IntrinsicIdentifier`?!1:t==null||S(e,t)}function Oa(e,t){return!e||e.type!==`ArgumentPlaceholder`?!1:t==null||S(e,t)}function ka(e,t){return!e||e.type!==`BindExpression`?!1:t==null||S(e,t)}function Aa(e,t){return!e||e.type!==`Decorator`?!1:t==null||S(e,t)}function ja(e,t){return!e||e.type!==`DoExpression`?!1:t==null||S(e,t)}function Ma(e,t){return!e||e.type!==`ExportDefaultSpecifier`?!1:t==null||S(e,t)}function Na(e,t){return!e||e.type!==`ModuleExpression`?!1:t==null||S(e,t)}function Pa(e,t){return!e||e.type!==`TopicReference`?!1:t==null||S(e,t)}function Fa(e,t){return!e||e.type!==`PipelineTopicExpression`?!1:t==null||S(e,t)}function Ia(e,t){return!e||e.type!==`PipelineBareFunction`?!1:t==null||S(e,t)}function La(e,t){return!e||e.type!==`PipelinePrimaryTopicReference`?!1:t==null||S(e,t)}function Ra(e,t){return!e||e.type!==`VoidPattern`?!1:t==null||S(e,t)}function za(e,t){return!e||e.type!==`TSParameterProperty`?!1:t==null||S(e,t)}function Ba(e,t){return!e||e.type!==`TSDeclareFunction`?!1:t==null||S(e,t)}function Va(e,t){return!e||e.type!==`TSDeclareMethod`?!1:t==null||S(e,t)}function Ha(e,t){return!e||e.type!==`TSQualifiedName`?!1:t==null||S(e,t)}function Ua(e,t){return!e||e.type!==`TSCallSignatureDeclaration`?!1:t==null||S(e,t)}function Wa(e,t){return!e||e.type!==`TSConstructSignatureDeclaration`?!1:t==null||S(e,t)}function Ga(e,t){return!e||e.type!==`TSPropertySignature`?!1:t==null||S(e,t)}function Ka(e,t){return!e||e.type!==`TSMethodSignature`?!1:t==null||S(e,t)}function qa(e,t){return!e||e.type!==`TSIndexSignature`?!1:t==null||S(e,t)}function Ja(e,t){return!e||e.type!==`TSAnyKeyword`?!1:t==null||S(e,t)}function Ya(e,t){return!e||e.type!==`TSBooleanKeyword`?!1:t==null||S(e,t)}function Xa(e,t){return!e||e.type!==`TSBigIntKeyword`?!1:t==null||S(e,t)}function Za(e,t){return!e||e.type!==`TSIntrinsicKeyword`?!1:t==null||S(e,t)}function Qa(e,t){return!e||e.type!==`TSNeverKeyword`?!1:t==null||S(e,t)}function $a(e,t){return!e||e.type!==`TSNullKeyword`?!1:t==null||S(e,t)}function eo(e,t){return!e||e.type!==`TSNumberKeyword`?!1:t==null||S(e,t)}function to(e,t){return!e||e.type!==`TSObjectKeyword`?!1:t==null||S(e,t)}function no(e,t){return!e||e.type!==`TSStringKeyword`?!1:t==null||S(e,t)}function ro(e,t){return!e||e.type!==`TSSymbolKeyword`?!1:t==null||S(e,t)}function io(e,t){return!e||e.type!==`TSUndefinedKeyword`?!1:t==null||S(e,t)}function ao(e,t){return!e||e.type!==`TSUnknownKeyword`?!1:t==null||S(e,t)}function oo(e,t){return!e||e.type!==`TSVoidKeyword`?!1:t==null||S(e,t)}function so(e,t){return!e||e.type!==`TSThisType`?!1:t==null||S(e,t)}function co(e,t){return!e||e.type!==`TSFunctionType`?!1:t==null||S(e,t)}function lo(e,t){return!e||e.type!==`TSConstructorType`?!1:t==null||S(e,t)}function uo(e,t){return!e||e.type!==`TSTypeReference`?!1:t==null||S(e,t)}function fo(e,t){return!e||e.type!==`TSTypePredicate`?!1:t==null||S(e,t)}function po(e,t){return!e||e.type!==`TSTypeQuery`?!1:t==null||S(e,t)}function mo(e,t){return!e||e.type!==`TSTypeLiteral`?!1:t==null||S(e,t)}function ho(e,t){return!e||e.type!==`TSArrayType`?!1:t==null||S(e,t)}function go(e,t){return!e||e.type!==`TSTupleType`?!1:t==null||S(e,t)}function _o(e,t){return!e||e.type!==`TSOptionalType`?!1:t==null||S(e,t)}function vo(e,t){return!e||e.type!==`TSRestType`?!1:t==null||S(e,t)}function yo(e,t){return!e||e.type!==`TSNamedTupleMember`?!1:t==null||S(e,t)}function bo(e,t){return!e||e.type!==`TSUnionType`?!1:t==null||S(e,t)}function xo(e,t){return!e||e.type!==`TSIntersectionType`?!1:t==null||S(e,t)}function So(e,t){return!e||e.type!==`TSConditionalType`?!1:t==null||S(e,t)}function Co(e,t){return!e||e.type!==`TSInferType`?!1:t==null||S(e,t)}function wo(e,t){return!e||e.type!==`TSParenthesizedType`?!1:t==null||S(e,t)}function To(e,t){return!e||e.type!==`TSTypeOperator`?!1:t==null||S(e,t)}function Eo(e,t){return!e||e.type!==`TSIndexedAccessType`?!1:t==null||S(e,t)}function Do(e,t){return!e||e.type!==`TSMappedType`?!1:t==null||S(e,t)}function Oo(e,t){return!e||e.type!==`TSTemplateLiteralType`?!1:t==null||S(e,t)}function ko(e,t){return!e||e.type!==`TSLiteralType`?!1:t==null||S(e,t)}function Ao(e,t){return!e||e.type!==`TSClassImplements`?!1:t==null||S(e,t)}function jo(e,t){return!e||e.type!==`TSInterfaceHeritage`?!1:t==null||S(e,t)}function Mo(e,t){return!e||e.type!==`TSInterfaceDeclaration`?!1:t==null||S(e,t)}function No(e,t){return!e||e.type!==`TSInterfaceBody`?!1:t==null||S(e,t)}function Po(e,t){return!e||e.type!==`TSTypeAliasDeclaration`?!1:t==null||S(e,t)}function Fo(e,t){return!e||e.type!==`TSInstantiationExpression`?!1:t==null||S(e,t)}function Io(e,t){return!e||e.type!==`TSAsExpression`?!1:t==null||S(e,t)}function Lo(e,t){return!e||e.type!==`TSSatisfiesExpression`?!1:t==null||S(e,t)}function Ro(e,t){return!e||e.type!==`TSTypeAssertion`?!1:t==null||S(e,t)}function zo(e,t){return!e||e.type!==`TSEnumBody`?!1:t==null||S(e,t)}function Bo(e,t){return!e||e.type!==`TSEnumDeclaration`?!1:t==null||S(e,t)}function Vo(e,t){return!e||e.type!==`TSEnumMember`?!1:t==null||S(e,t)}function Ho(e,t){return!e||e.type!==`TSModuleDeclaration`?!1:t==null||S(e,t)}function Uo(e,t){return!e||e.type!==`TSModuleBlock`?!1:t==null||S(e,t)}function Wo(e,t){return!e||e.type!==`TSImportType`?!1:t==null||S(e,t)}function Go(e,t){return!e||e.type!==`TSImportEqualsDeclaration`?!1:t==null||S(e,t)}function Ko(e,t){return!e||e.type!==`TSExternalModuleReference`?!1:t==null||S(e,t)}function qo(e,t){return!e||e.type!==`TSNonNullExpression`?!1:t==null||S(e,t)}function Jo(e,t){return!e||e.type!==`TSExportAssignment`?!1:t==null||S(e,t)}function Yo(e,t){return!e||e.type!==`TSNamespaceExportDeclaration`?!1:t==null||S(e,t)}function Xo(e,t){return!e||e.type!==`TSTypeAnnotation`?!1:t==null||S(e,t)}function Zo(e,t){return!e||e.type!==`TSTypeParameterInstantiation`?!1:t==null||S(e,t)}function Qo(e,t){return!e||e.type!==`TSTypeParameterDeclaration`?!1:t==null||S(e,t)}function $o(e,t){return!e||e.type!==`TSTypeParameter`?!1:t==null||S(e,t)}function es(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`ImportExpression`:case`MetaProperty`:case`ClassMethod`:case`ObjectPattern`:case`SpreadElement`:case`Super`:case`TaggedTemplateExpression`:case`TemplateElement`:case`TemplateLiteral`:case`YieldExpression`:case`AwaitExpression`:case`Import`:case`BigIntLiteral`:case`ExportNamespaceSpecifier`:case`OptionalMemberExpression`:case`OptionalCallExpression`:case`ClassProperty`:case`ClassAccessorProperty`:case`ClassPrivateProperty`:case`ClassPrivateMethod`:case`PrivateName`:case`StaticBlock`:case`ImportAttribute`:break;case`Placeholder`:switch(e.expectedNode){case`Identifier`:case`StringLiteral`:case`BlockStatement`:case`ClassBody`:break;default:return!1}break;default:return!1}return t==null||S(e,t)}function ts(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`ImportExpression`:case`MetaProperty`:case`TaggedTemplateExpression`:case`TemplateLiteral`:case`YieldExpression`:case`AwaitExpression`:case`Import`:case`BigIntLiteral`:case`OptionalMemberExpression`:case`OptionalCallExpression`:case`TypeCastExpression`:case`JSXElement`:case`JSXFragment`:case`BindExpression`:case`DoExpression`:case`ModuleExpression`:case`TopicReference`:case`PipelineTopicExpression`:case`PipelineBareFunction`:case`PipelinePrimaryTopicReference`:case`TSInstantiationExpression`:case`TSAsExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:case`TSNonNullExpression`:break;case`Placeholder`:switch(e.expectedNode){case`Expression`:case`Identifier`:case`StringLiteral`:break;default:return!1}break;default:return!1}return t==null||S(e,t)}function ns(e,t){if(!e)return!1;switch(e.type){case`BinaryExpression`:case`LogicalExpression`:break;default:return!1}return t==null||S(e,t)}function rs(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||S(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`ForOfStatement`:case`ClassMethod`:case`ClassPrivateMethod`:case`StaticBlock`:case`TSModuleBlock`:break;case`Placeholder`:if(e.expectedNode===`BlockStatement`)break;default:return!1}return t==null||S(e,t)}function as(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||S(e,t)}function os(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||S(e,t)}function ss(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||S(e,t)}function cs(e,t){if(!e)return!1;switch(e.type){case`BreakStatement`:case`ContinueStatement`:case`ReturnStatement`:case`ThrowStatement`:break;default:return!1}return t==null||S(e,t)}function ls(e,t){if(!e)return!1;switch(e.type){case`ConditionalExpression`:case`IfStatement`:break;default:return!1}return t==null||S(e,t)}function us(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||S(e,t)}function ds(e,t){if(!e)return!1;switch(e.type){case`DoWhileStatement`:case`WhileStatement`:break;default:return!1}return t==null||S(e,t)}function fs(e,t){if(!e)return!1;switch(e.type){case`ExpressionStatement`:case`ParenthesizedExpression`:case`TypeCastExpression`:break;default:return!1}return t==null||S(e,t)}function ps(e,t){if(!e)return!1;switch(e.type){case`ForInStatement`:case`ForStatement`:case`ForOfStatement`:break;default:return!1}return t==null||S(e,t)}function ms(e,t){if(!e)return!1;switch(e.type){case`ForInStatement`:case`ForOfStatement`:break;default:return!1}return t==null||S(e,t)}function hs(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||S(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`:case`StaticBlock`:case`TSModuleBlock`:break;default:return!1}return t==null||S(e,t)}function _s(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||S(e,t)}function vs(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||S(e,t)}function ys(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||S(e,t)}function bs(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||S(e,t)}function xs(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||S(e,t)}function Ss(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||S(e,t)}function Cs(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||S(e,t)}function ws(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||S(e,t)}function Ts(e,t){if(!e)return!1;switch(e.type){case`ObjectMethod`:case`ClassMethod`:case`ClassPrivateMethod`:break;default:return!1}return t==null||S(e,t)}function Es(e,t){if(!e)return!1;switch(e.type){case`ObjectMethod`:case`ObjectProperty`:break;default:return!1}return t==null||S(e,t)}function Ds(e,t){if(!e)return!1;switch(e.type){case`ObjectProperty`:case`ClassProperty`:case`ClassAccessorProperty`:case`ClassPrivateProperty`:break;default:return!1}return t==null||S(e,t)}function Os(e,t){if(!e)return!1;switch(e.type){case`UnaryExpression`:case`SpreadElement`:break;default:return!1}return t==null||S(e,t)}function ks(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||S(e,t)}function As(e,t){if(!e)return!1;switch(e.type){case`ClassExpression`:case`ClassDeclaration`:break;default:return!1}return t==null||S(e,t)}function js(e,t){if(!e)return!1;switch(e.type){case`ExportAllDeclaration`:case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:case`ImportDeclaration`:break;default:return!1}return t==null||S(e,t)}function Ms(e,t){if(!e)return!1;switch(e.type){case`ExportAllDeclaration`:case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:break;default:return!1}return t==null||S(e,t)}function Ns(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||S(e,t)}function Ps(e,t){if(!e)return!1;switch(e.type){case`ClassAccessorProperty`:break;default:return!1}return t==null||S(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||S(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`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||S(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`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||S(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||S(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||S(e,t)}function Bs(e,t){if(!e)return!1;switch(e.type){case`DeclaredPredicate`:case`InferredPredicate`:break;default:return!1}return t==null||S(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||S(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||S(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||S(e,t)}function Ws(e,t){if(!e)return!1;switch(e.type){case`Placeholder`:case`V8IntrinsicIdentifier`:break;default:return!1}return t==null||S(e,t)}function Gs(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||S(e,t)}function Ks(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||S(e,t)}function qs(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||S(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`TSTemplateLiteralType`:case`TSLiteralType`:break;default:return!1}return t==null||S(e,t)}function Ys(e,t){return C(`isNumberLiteral`,`isNumericLiteral`),!e||e.type!==`NumberLiteral`?!1:t==null||S(e,t)}function Xs(e,t){return C(`isRegexLiteral`,`isRegExpLiteral`),!e||e.type!==`RegexLiteral`?!1:t==null||S(e,t)}function Zs(e,t){return C(`isRestProperty`,`isRestElement`),!e||e.type!==`RestProperty`?!1:t==null||S(e,t)}function Qs(e,t){return C(`isSpreadProperty`,`isSpreadElement`),!e||e.type!==`SpreadProperty`?!1:t==null||S(e,t)}function $s(e,t){return C(`isModuleDeclaration`,`isImportOrExportDeclaration`),js(e,t)}function ec(e){return Yn(e)||Mr(e)}function tc(e,t,n){if(!ec(e))return!1;let r=Array.isArray(t)?t:t.split(`.`),i=[],a;for(a=e;ec(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(Bn(n))a=n.name;else if(Un(n))a=n.value;else if(sr(n))a=`this`;else if(Ir(n))a=`super`;else if(Zr(n))a=`#`+n.id.name;else return!1;if(r[e]!==a)return!1}return!0}function nc(e,t){let n=e.split(`.`);return e=>tc(e,n,t)}const rc=nc(`React.Component`);function ic(e){return!!e&&/^[a-z]/.test(e)}function ac(e,t){return e===t?!0:e==null||Dc[t]?!1:!!T[t]?.includes(e)}function oc(e,t){return!!(e===t||rl[e]?.includes(t))}function w(e,t,n){return t?ac(t.type,e)?n===void 0?!0:S(t,n):!n&&t.type===`Placeholder`&&e in T?oc(t.expectedNode,e):!1:!1}function sc(e,t=!0){return typeof e!=`string`||t&&(on(e)||an(e,!0))?!1:$t(e)}const cc=[`consequent`,`body`,`alternate`],lc=[`body`,`expressions`],uc=[`left`,`init`],dc=[`leadingComments`,`trailingComments`,`innerComments`],fc=[`||`,`&&`,`??`],pc=[`++`,`--`],mc=[`>`,`<`,`>=`,`<=`],hc=[`==`,`===`,`!=`,`!==`],gc=[...hc,`in`,`instanceof`],_c=[...gc,...mc],vc=[`-`,`/`,`%`,`*`,`**`,`&`,`|`,`>>`,`>>>`,`<<`,`^`],yc=[`+`,...vc,..._c,`|>`],bc=[`=`,`+=`,...vc.map(e=>e+`=`),...fc.map(e=>e+`=`)],xc=[`delete`,`!`],Sc=[`+`,`-`,`~`],Cc=[`typeof`],wc=[`void`,`throw`,...xc,...Sc,...Cc],Tc={optional:[`typeAnnotation`,`typeParameters`,`returnType`],force:[`start`,`loc`,`end`]},Ec={},Dc={},T={},Oc={},kc={},Ac={},jc={},Mc={};function Nc(e){return Array.isArray(e)?`array`:e===null?`null`:typeof e}function E(e){return{validate:e}}function D(...e){return E(N(...e))}function O(e){return{validate:e,optional:!0}}function k(...e){return{validate:N(...e),optional:!0}}function Pc(e){return F(P(`array`),Fc(e))}function A(...e){return Pc(N(...e))}function j(...e){return E(A(...e))}function Fc(e){let t=yl;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 Ic=[];function N(...e){let t=new Set;Ic.push({types:e,set:t});function n(n,r,i){let a=i?.type;if(a!=null){if(t.has(a)){yl(n,r,i);return}if(a===`Placeholder`){for(let t of e)if(w(t,i)){yl(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 Lc(...e){function t(t,n,r){let i=Nc(r);for(let a of e)if(i===a||w(a,r)){yl(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(Nc(r)!==e)throw TypeError(`Property ${n} expected type of ${e} but got ${Nc(r)}`)}return t.type=e,t}function Rc(e){let t=Object.keys(e);function n(n,r,i){let a=[];for(let r of t)try{vl(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 zc(){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 Bc=new Set([`aliases`,`builder`,`deprecatedAlias`,`fields`,`inherits`,`visitor`,`validate`,`unionShape`]),Vc=new Set([`default`,`optional`,`deprecated`,`validate`]),Hc={};function Uc(...e){return(t,n={})=>{let r=n.aliases;r||(n.inherits&&(r=Hc[n.inherits].aliases?.slice()),r??=[],n.aliases=r);let i=e.filter(e=>!r.includes(e));r.unshift(...i),Wc(t,n)}}function Wc(e,t={}){let n=t.inherits&&Hc[t.inherits]||{},r=t.fields;if(!r&&(r={},n.fields)){let e=Object.getOwnPropertyNames(n.fields);for(let t of e){let e=n.fields[t],i=e.default;if(Array.isArray(i)?i.length>0:i&&typeof i==`object`)throw Error(`field defaults can only be primitives or empty arrays currently`);r[t]={default:Array.isArray(i)?[]:i,optional:e.optional,deprecated:e.deprecated,validate:e.validate}}}let i=t.visitor||n.visitor||[],a=t.aliases||n.aliases||[],o=t.builder||n.builder||t.visitor||[];for(let n of Object.keys(t))if(!Bc.has(n))throw Error(`Unknown type option "${n}" on ${e}`);t.deprecatedAlias&&(Ac[t.deprecatedAlias]=e);for(let e of i.concat(o))r[e]=r[e]||{};for(let t of Object.keys(r)){let n=r[t];n.default!==void 0&&!o.includes(t)&&(n.optional=!0),n.default===void 0?n.default=null:!n.validate&&n.default!=null&&(n.validate=P(Nc(n.default)));for(let r of Object.keys(n))if(!Vc.has(r))throw Error(`Unknown field key "${r}" on ${e}.${t}`)}Ec[e]=t.visitor=i,kc[e]=t.builder=o,Oc[e]=t.fields=r,Dc[e]=t.aliases=a,a.forEach(t=>{T[t]=T[t]||[],T[t].push(e)}),t.validate&&(jc[e]=t.validate),t.unionShape&&(Mc[e]=t.unionShape),Hc[e]=t}var Gc=Object.freeze({__proto__:null,ALIAS_KEYS:Dc,BUILDER_KEYS:kc,DEPRECATED_KEYS:Ac,FLIPPED_ALIAS_KEYS:T,NODE_FIELDS:Oc,NODE_PARENT_VALIDATIONS:jc,NODE_UNION_SHAPES__PRIVATE:Mc,VISITOR_KEYS:Ec,allExpandedTypes:Ic,arrayOf:Pc,arrayOfType:A,assertEach:Fc,assertNodeOrValueType:Lc,assertNodeType:N,assertOneOf:M,assertOptionalChainStart:zc,assertShape:Rc,assertValueType:P,chain:F,default:Wc,defineAliasedType:Uc,validate:E,validateArrayOfType:j,validateOptional:O,validateOptionalType:k,validateType:D});const Kc=(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`)}}}]}}),I=Uc(`Standardized`);I(`ArrayExpression`,{fields:{elements:{validate:Pc(Lc(`null`,`Expression`,`SpreadElement`)),default:void 0}},visitor:[`elements`],aliases:[`Expression`]}),I(`AssignmentExpression`,{fields:{operator:{validate:Object.assign(function(){let e=M(...bc),t=M(`=`);return function(n,r,i){(w(`Pattern`,n.left)?t:e)(n,r,i)}}(),{oneOf:bc})},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(...yc)},left:{validate:function(){let e=N(`Expression`),t=N(`Expression`,`PrivateName`);return Object.assign(function(n,r,i){(n.operator===`in`?t:e)(n,r,i)},{oneOfNodeTypes:[`Expression`,`PrivateName`]})}()},right:{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`,`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:Fc(N(`CommentBlock`,`CommentLine`)),optional:!0},tokens:{validate:Fc(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 qc=()=>({params:j(`FunctionParameter`),generator:{default:!1},async:{default:!1}}),Jc=()=>({returnType:{validate:N(`TypeAnnotation`,`TSTypeAnnotation`),optional:!0},typeParameters:{validate:N(`TypeParameterDeclaration`,`TSTypeParameterDeclaration`),optional:!0}}),Yc=()=>({...qc(),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:{...Yc(),...Jc(),body:{validate:N(`BlockStatement`)},predicate:{validate:N(`DeclaredPredicate`,`InferredPredicate`),optional:!0}},aliases:[`Scopable`,`Function`,`BlockParent`,`FunctionParent`,`Statement`,`Pureish`,`Declaration`],validate:function(){let e=N(`Identifier`);return function(t,n,r){w(`ExportDefaultDeclaration`,t)||e(r,`id`,r.id)}}()}),I(`FunctionExpression`,{inherits:`FunctionDeclaration`,aliases:[`Scopable`,`Function`,`BlockParent`,`FunctionParent`,`Expression`,`Pureish`],fields:{...qc(),...Jc(),id:{validate:N(`Identifier`),optional:!0},body:{validate:N(`BlockStatement`)},predicate:{validate:N(`DeclaredPredicate`,`InferredPredicate`),optional:!0}}});const Xc=()=>({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:{...Xc(),name:{validate:F(P(`string`),Object.assign(function(e,t,n){if(!sc(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(w(`MemberExpression`,e,a)||w(`OptionalMemberExpression`,e,a))return}else if(i===`key`){if(w(`Property`,e,a)||w(`Method`,e,a))return}else if(i===`exported`){if(w(`ExportSpecifier`,e))return}else if(i===`imported`){if(w(`ImportSpecifier`,e,{imported:n}))return}else if(i===`meta`&&w(`MetaProperty`,e,{meta:n}))return;if((on(n.name)||rn(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`),Object.assign(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`),Object.assign(function(e,t,n){let r=/[^dgimsuvy]/.exec(n);if(r)throw TypeError(`"${r[0]}" is not a valid RegExp flag`)},{type:`string`})),default:``}}}),I(`LogicalExpression`,{builder:[`operator`,`left`,`right`],visitor:[`left`,`right`],aliases:[`Binary`,`Expression`],fields:{operator:{validate:M(...fc)},left:{validate:N(`Expression`)},right:{validate:N(`Expression`)}}}),I(`MemberExpression`,{builder:[`object`,`property`,`computed`,...[]],visitor:[`object`,`property`],aliases:[`Expression`,`LVal`,`PatternLike`],unionShape:{discriminator:`computed`,shapes:[{name:`computed`,value:[!0],properties:{property:{validate:N(`Expression`)}}},{name:`nonComputed`,value:[!1],properties:{property:{validate:N(`Identifier`,`PrivateName`)}}}]},fields:{object:{validate:N(`Expression`,`Super`)},property:{validate:function(){let e=N(`Identifier`,`PrivateName`),t=N(`Expression`),n=function(n,r,i){(n.computed?t:e)(n,r,i)};return n.oneOfNodeTypes=[`Expression`,`Identifier`,`PrivateName`],n}()},computed:{default:!1}}}),I(`NewExpression`,{inherits:`CallExpression`}),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`],...Kc(),fields:{...qc(),...Jc(),kind:{validate:M(`method`,`get`,`set`)},computed:{default:!1},key:{validate:function(){let e=N(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`),t=N(`Expression`),n=function(n,r,i){(n.computed?t:e)(n,r,i)};return n.oneOfNodeTypes=[`Expression`,`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`],n}()},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`,...[]],unionShape:{discriminator:`computed`,shapes:[{name:`computed`,value:[!0],properties:{key:{validate:N(`Expression`)}}},{name:`nonComputed`,value:[!1],properties:{key:{validate:N(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`,`PrivateName`)}}}]},fields:{computed:{default:!1},key:{validate:function(){let e=N(`Identifier`,`StringLiteral`,`NumericLiteral`,`BigIntLiteral`,`PrivateName`),t=N(`Expression`);return Object.assign(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`),Object.assign(function(e,t,n){if(n){if(e.computed)throw TypeError(`Property shorthand of ObjectProperty cannot be true if computed is true`);if(!w(`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){(w(`ObjectPattern`,n)?e:t)(i,`value`,i.value)}}()}),I(`RestElement`,{visitor:[`argument`,`typeAnnotation`],builder:[`argument`],aliases:[`FunctionParameter`,`PatternLike`],deprecatedAlias:`RestProperty`,fields:{...Xc(),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`),Object.assign(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(...wc)}},visitor:[`argument`],aliases:[`UnaryLike`,`Expression`]}),I(`UpdateExpression`,{builder:[`operator`,`argument`,`prefix`],fields:{prefix:{default:!1},argument:{validate:N(`Identifier`,`MemberExpression`)},operator:{validate:M(...pc)}},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=w(`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:{...Xc(),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:{...Xc(),elements:{validate:F(P(`array`),Fc(Lc(`null`,`PatternLike`)))}}}),I(`ArrowFunctionExpression`,{builder:[`params`,`body`,`async`],visitor:[`typeParameters`,`params`,`predicate`,`returnType`,`body`],aliases:[`Scopable`,`Function`,`BlockParent`,`FunctionParent`,`Expression`,`Pureish`],fields:{...qc(),...Jc(),expression:{validate:P(`boolean`)},body:{validate:N(`BlockStatement`,`Expression`)},predicate:{validate:N(`DeclaredPredicate`,`InferredPredicate`),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){w(`ExportDefaultDeclaration`,t)||e(r,`id`,r.id)}}()});const Zc={attributes:{optional:!0,validate:A(`ImportAttribute`)}};I(`ExportAllDeclaration`,{builder:[`source`],visitor:[`source`,`attributes`,`assertions`],aliases:[`Statement`,`Declaration`,`ImportOrExportDeclaration`,`ExportDeclaration`],fields:{source:{validate:N(`StringLiteral`)},exportKind:O(M(`type`,`value`)),...Zc}}),I(`ExportDefaultDeclaration`,{visitor:[`declaration`],aliases:[`Statement`,`Declaration`,`ImportOrExportDeclaration`,`ExportDeclaration`],fields:{declaration:D(`TSDeclareFunction`,`FunctionDeclaration`,`ClassDeclaration`,`Expression`),exportKind:O(M(`value`))}}),I(`ExportNamedDeclaration`,{builder:[`declaration`,`specifiers`,`source`],visitor:[`declaration`,`specifiers`,`source`,`attributes`],aliases:[`Statement`,`Declaration`,`ImportOrExportDeclaration`,`ExportDeclaration`],fields:{declaration:{optional:!0,validate:F(N(`Declaration`),Object.assign(function(e,t,n){if(n&&e.specifiers.length)throw TypeError(`Only declaration or specifiers is allowed on ExportNamedDeclaration`);if(n&&e.source)throw TypeError(`Cannot export a declaration from a source`)},{oneOfNodeTypes:[`Declaration`]}))},...Zc,specifiers:{default:[],validate:Pc(function(){let e=N(`ExportSpecifier`,`ExportDefaultSpecifier`,`ExportNamespaceSpecifier`),t=N(`ExportSpecifier`);return Object.assign(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 Object.assign(function(n,r,i){w(`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`],visitor:[`specifiers`,`source`,`attributes`],aliases:[`Statement`,`Declaration`,`ImportOrExportDeclaration`],fields:{...Zc,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(`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(`MetaProperty`,{visitor:[`meta`,`property`],aliases:[`Expression`],fields:{meta:{validate:F(N(`Identifier`),Object.assign(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(!w(`Identifier`,e.property,{name:r}))throw TypeError(`Unrecognised MetaProperty`)},{oneOfNodeTypes:[`Identifier`]}))},property:{validate:N(`Identifier`)}}});const Qc=()=>({abstract:{validate:P(`boolean`),optional:!0},accessibility:{validate:M(`public`,`private`,`protected`),optional:!0},static:{default:!1},override:{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`))}}),$c=()=>({...qc(),...Qc(),params:j(`FunctionParameter`,`TSParameterProperty`),kind:{validate:M(`get`,`set`,`method`,`constructor`),default:`method`},access:{validate:F(P(`string`),M(`public`,`private`,`protected`)),optional:!0},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`],...Kc(),fields:{...$c(),...Jc(),body:{validate:N(`BlockStatement`)}}}),I(`ObjectPattern`,{visitor:[`decorators`,`properties`,`typeAnnotation`],builder:[`properties`],aliases:[`FunctionParameter`,`Pattern`,`PatternLike`,`LVal`],fields:{...Xc(),properties:j(`RestElement`,`ObjectProperty`)}}),I(`SpreadElement`,{visitor:[`argument`],aliases:[`UnaryLike`],deprecatedAlias:`SpreadProperty`,fields:{argument:{validate:N(`Expression`)}}}),I(`Super`,void 0),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(Rc({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}=un(`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`),Fc(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`),Object.assign(function(e,t,n){if(n&&!e.argument)throw TypeError(`Property delegate of YieldExpression cannot be true if there is no argument`)},{type:`boolean`})),default:!1},argument:{optional:!0,validate:N(`Expression`)}}}),I(`AwaitExpression`,{builder:[`argument`],visitor:[`argument`],aliases:[`Expression`,`Terminatorless`],fields:{argument:{validate:N(`Expression`)}}}),I(`Import`,{aliases:[`Expression`]}),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`)}}}),I(`OptionalMemberExpression`,{builder:[`object`,`property`,`computed`,`optional`],visitor:[`object`,`property`],aliases:[`Expression`],fields:{object:{validate:N(`Expression`)},property:{validate:function(){let e=N(`Identifier`),t=N(`Expression`);return Object.assign(function(n,r,i){(n.computed?t:e)(n,r,i)},{oneOfNodeTypes:[`Expression`,`Identifier`]})}()},computed:{default:!1},optional:{validate:F(P(`boolean`),zc())}}}),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`),zc())},typeArguments:{validate:N(`TypeParameterInstantiation`,`TSTypeParameterInstantiation`),optional:!0}}}),I(`ClassProperty`,{visitor:[`decorators`,`variance`,`key`,`typeAnnotation`,`value`],builder:[`key`,`value`,`typeAnnotation`,`decorators`,`computed`,`static`],aliases:[`Property`],...Kc(),fields:{...Qc(),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(`ClassAccessorProperty`,{visitor:[`decorators`,`key`,`typeAnnotation`,`value`],builder:[`key`,`value`,`typeAnnotation`,`decorators`,`computed`,`static`],aliases:[`Property`,`Accessor`],...Kc(!0),fields:{...Qc(),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}}}),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:{...$c(),...Jc(),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=Uc(`Flow`),el=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`)}}),el(`DeclareClass`),L(`DeclareFunction`,{builder:[`id`],visitor:[`id`,`predicate`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{id:D(`Identifier`),predicate:k(`DeclaredPredicate`)}}),el(`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`)),...Zc}}),L(`DeclareExportAllDeclaration`,{visitor:[`source`,`attributes`],aliases:[`FlowDeclaration`,`Statement`,`Declaration`],fields:{source:D(`StringLiteral`),exportKind:O(M(`type`,`value`)),...Zc}}),L(`DeclaredPredicate`,{visitor:[`value`],aliases:[`FlowPredicate`],fields:{value:D(`Flow`)}}),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`)}}),el(`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(`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:E(P(`boolean`))}}),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:E(P(`boolean`)),variance:k(`Variance`)}}),L(`ObjectTypeProperty`,{visitor:[`key`,`value`,`variance`],aliases:[`UserWhitespacable`],fields:{key:D(`Identifier`,`StringLiteral`),value:D(`FlowType`),kind:E(M(`init`,`get`,`set`)),static:E(P(`boolean`)),proto:E(P(`boolean`)),optional:E(P(`boolean`)),variance:k(`Variance`),method:E(P(`boolean`))}}),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`,{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`)}}),L(`EnumBooleanBody`,{aliases:[`EnumBody`],visitor:[`members`],fields:{explicitType:E(P(`boolean`)),members:j(`EnumBooleanMember`),hasUnknownMembers:E(P(`boolean`))}}),L(`EnumNumberBody`,{aliases:[`EnumBody`],visitor:[`members`],fields:{explicitType:E(P(`boolean`)),members:j(`EnumNumberMember`),hasUnknownMembers:E(P(`boolean`))}}),L(`EnumStringBody`,{aliases:[`EnumBody`],visitor:[`members`],fields:{explicitType:E(P(`boolean`)),members:j(`EnumStringMember`,`EnumDefaultedMember`),hasUnknownMembers:E(P(`boolean`))}}),L(`EnumSymbolBody`,{aliases:[`EnumBody`],visitor:[`members`],fields:{members:j(`EnumDefaultedMember`),hasUnknownMembers:E(P(`boolean`))}}),L(`EnumBooleanMember`,{aliases:[`EnumMember`],builder:[`id`],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:E(P(`boolean`))}});const tl=Uc(`JSX`);tl(`JSXAttribute`,{visitor:[`name`,`value`],aliases:[`Immutable`],fields:{name:{validate:N(`JSXIdentifier`,`JSXNamespacedName`)},value:{optional:!0,validate:N(`JSXElement`,`JSXFragment`,`StringLiteral`,`JSXExpressionContainer`)}}}),tl(`JSXClosingElement`,{visitor:[`name`],aliases:[`Immutable`],fields:{name:{validate:N(`JSXIdentifier`,`JSXMemberExpression`,`JSXNamespacedName`)}}}),tl(`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`)}}),tl(`JSXEmptyExpression`,{}),tl(`JSXExpressionContainer`,{visitor:[`expression`],aliases:[`Immutable`],fields:{expression:{validate:N(`Expression`,`JSXEmptyExpression`)}}}),tl(`JSXSpreadChild`,{visitor:[`expression`],aliases:[`Immutable`],fields:{expression:{validate:N(`Expression`)}}}),tl(`JSXIdentifier`,{builder:[`name`],fields:{name:{validate:P(`string`)}}}),tl(`JSXMemberExpression`,{visitor:[`object`,`property`],fields:{object:{validate:N(`JSXMemberExpression`,`JSXIdentifier`)},property:{validate:N(`JSXIdentifier`)}}}),tl(`JSXNamespacedName`,{visitor:[`namespace`,`name`],fields:{namespace:{validate:N(`JSXIdentifier`)},name:{validate:N(`JSXIdentifier`)}}}),tl(`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}}}),tl(`JSXSpreadAttribute`,{visitor:[`argument`],fields:{argument:{validate:N(`Expression`)}}}),tl(`JSXText`,{aliases:[`Immutable`],builder:[`value`],fields:{value:{validate:P(`string`)}}}),tl(`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`)}}),tl(`JSXOpeningFragment`,{aliases:[`Immutable`]}),tl(`JSXClosingFragment`,{aliases:[`Immutable`]});const nl=[`Identifier`,`StringLiteral`,`Expression`,`Statement`,`Declaration`,`BlockStatement`,`ClassBody`,`Pattern`],rl={Declaration:[`Statement`],Pattern:[`PatternLike`,`LVal`]};for(let e of nl){let t=Dc[e];t?.length&&(rl[e]=t)}const il={};Object.keys(rl).forEach(e=>{rl[e].forEach(t=>{Object.hasOwn(il,t)||(il[t]=[]),il[t].push(e)})});const al=Uc(`Miscellaneous`);al(`Placeholder`,{visitor:[],builder:[`expectedNode`,`name`],fields:{name:{validate:N(`Identifier`)},expectedNode:{validate:M(...nl)},...Xc()}}),al(`V8IntrinsicIdentifier`,{builder:[`name`],fields:{name:{validate:P(`string`)}}}),Wc(`ArgumentPlaceholder`,{}),Wc(`BindExpression`,{visitor:[`object`,`callee`],aliases:[`Expression`],fields:{object:{validate:N(`Expression`)},callee:{validate:N(`Expression`)}}}),Wc(`Decorator`,{visitor:[`expression`],fields:{expression:{validate:N(`Expression`)}}}),Wc(`DoExpression`,{visitor:[`body`],builder:[`body`,`async`],aliases:[`Expression`],fields:{body:{validate:N(`BlockStatement`)},async:{validate:P(`boolean`),default:!1}}}),Wc(`ExportDefaultSpecifier`,{visitor:[`exported`],aliases:[`ModuleSpecifier`],fields:{exported:{validate:N(`Identifier`)}}}),Wc(`ModuleExpression`,{visitor:[`body`],fields:{body:{validate:N(`Program`)}},aliases:[`Expression`]}),Wc(`TopicReference`,{aliases:[`Expression`]}),Wc(`PipelineTopicExpression`,{builder:[`expression`],visitor:[`expression`],fields:{expression:{validate:N(`Expression`)}},aliases:[`Expression`]}),Wc(`PipelineBareFunction`,{builder:[`callee`],visitor:[`callee`],fields:{callee:{validate:N(`Expression`)}},aliases:[`Expression`]}),Wc(`PipelinePrimaryTopicReference`,{aliases:[`Expression`]}),Wc(`VoidPattern`,{aliases:[`Pattern`,`PatternLike`,`FunctionParameter`]});const R=Uc(`TypeScript`),ol=P(`boolean`),sl=()=>({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:{...Yc(),...sl()}}),R(`TSDeclareMethod`,{visitor:[`decorators`,`key`,`typeParameters`,`params`,`returnType`],...Kc(),fields:{...$c(),...sl()}}),R(`TSQualifiedName`,{aliases:[`TSEntityName`],visitor:[`left`,`right`],fields:{left:D(`TSEntityName`),right:D(`Identifier`)}});const cl=()=>({typeParameters:k(`TSTypeParameterDeclaration`),params:j(`ArrayPattern`,`Identifier`,`ObjectPattern`,`RestElement`),returnType:k(`TSTypeAnnotation`)}),ll={aliases:[`TSTypeElement`],visitor:[`typeParameters`,`params`,`returnType`],fields:cl()};R(`TSCallSignatureDeclaration`,ll),R(`TSConstructSignatureDeclaration`,ll);const ul=()=>({key:D(`Expression`),computed:{default:!1},optional:O(ol)});R(`TSPropertySignature`,{aliases:[`TSTypeElement`],visitor:[`key`,`typeAnnotation`],fields:{...ul(),readonly:O(ol),typeAnnotation:k(`TSTypeAnnotation`),kind:{optional:!0,validate:M(`get`,`set`)}}}),R(`TSMethodSignature`,{aliases:[`TSTypeElement`],visitor:[`key`,`typeParameters`,`params`,`returnType`],fields:{...cl(),...ul(),kind:{validate:M(`method`,`get`,`set`)}}}),R(`TSIndexSignature`,{aliases:[`TSTypeElement`],visitor:[`parameters`,`typeAnnotation`],fields:{readonly:O(ol),static:O(ol),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 dl={aliases:[`TSType`],visitor:[`typeParameters`,`params`,`returnType`]};R(`TSFunctionType`,{...dl,fields:cl()}),R(`TSConstructorType`,{...dl,fields:{...cl(),abstract:O(ol)}}),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(ol)}}),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:ol,default:!1},elementType:D(`TSType`)}});const fl={aliases:[`TSType`],visitor:[`types`],fields:{types:j(`TSType`)}};R(`TSUnionType`,fl),R(`TSIntersectionType`,fl),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`),Fc(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`),r=function(r,i,a){w(`UnaryExpression`,a)?(t(a,`operator`,a.operator),e(a,`argument`,a.argument)):n(r,i,a)};return r.oneOfNodeTypes=[`NumericLiteral`,`StringLiteral`,`BooleanLiteral`,`BigIntLiteral`,`TemplateLiteral`,`UnaryExpression`],r}()}}}),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(ol),id:D(`Identifier`),typeParameters:k(`TSTypeParameterDeclaration`),extends:O(A(`TSClassImplements`)),body:D(`TSInterfaceBody`)}}),R(`TSInterfaceBody`,{visitor:[`body`],fields:{body:j(`TSTypeElement`)}}),R(`TSTypeAliasDeclaration`,{aliases:[`Statement`,`Declaration`],visitor:[`id`,`typeParameters`,`typeAnnotation`],fields:{declare:O(ol),id:D(`Identifier`),typeParameters:k(`TSTypeParameterDeclaration`),typeAnnotation:D(`TSType`)}}),R(`TSInstantiationExpression`,{aliases:[`Expression`],visitor:[`expression`,`typeArguments`],fields:{expression:D(`Expression`),typeArguments:k(`TSTypeParameterInstantiation`)}});const pl={aliases:[`Expression`,`LVal`,`PatternLike`],visitor:[`expression`,`typeAnnotation`],fields:{expression:D(`Expression`),typeAnnotation:D(`TSType`)}};R(`TSAsExpression`,pl),R(`TSSatisfiesExpression`,pl),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(ol),const:O(ol),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`,`module`,`namespace`)},declare:O(ol),id:{validate:F(N(`TSEntityName`,`StringLiteral`),Object.assign(function(e,t,n){if(e.kind===`module`&&!w(`StringLiteral`,n))throw TypeError(`TSModuleDeclaration of kind 'module' must have a StringLiteral id.`);if(e.kind===`namespace`&&w(`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 ml={ModuleDeclaration:`ImportOrExportDeclaration`};Object.keys(ml).forEach(e=>{T[e]=T[ml[e]]});for(let{types:e,set:t}of Ic)for(let n of e){let e=T[n];e?e.forEach(t.add,t):t.add(n)}const hl=[].concat(Object.keys(Ec),Object.keys(T),Object.keys(Ac));function gl(e,t,n){if(!e)return;let r=Oc[e.type];if(!r)return;let i=r[t];vl(e,t,n,i),yl(e,t,n)}function _l(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;jc[e]?.(t,n,r)}}function vl(e,t,n,r){r?.validate&&(r.optional&&n==null||r.validate(e,t,n))}function yl(e,t,n){let r=n?.type;r!=null&&jc[r]?.(e,t,n)}const{validateInternal:z}=Object.freeze({__proto__:null,default:gl,validateChild:yl,validateField:vl,validateInternal:_l}),{NODE_FIELDS:B}=Gc;function bl(e){let t={type:`ArrayExpression`,elements:e},n=B.ArrayExpression;return z(n.elements,t,`elements`,e,1),t}function xl(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 Sl(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 Cl(e){let t={type:`InterpreterDirective`,value:e},n=B.InterpreterDirective;return z(n.value,t,`value`,e),t}function wl(e){let t={type:`Directive`,value:e},n=B.Directive;return z(n.value,t,`value`,e,1),t}function Tl(e){let t={type:`DirectiveLiteral`,value:e},n=B.DirectiveLiteral;return z(n.value,t,`value`,e),t}function El(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 Dl(e=null){let t={type:`BreakStatement`,label:e},n=B.BreakStatement;return z(n.label,t,`label`,e,1),t}function Ol(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 kl(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 Al(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 jl(e=null){let t={type:`ContinueStatement`,label:e},n=B.ContinueStatement;return z(n.label,t,`label`,e,1),t}function Ml(){return{type:`DebuggerStatement`}}function Nl(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 Pl(){return{type:`EmptyStatement`}}function Fl(e){let t={type:`ExpressionStatement`,expression:e},n=B.ExpressionStatement;return z(n.expression,t,`expression`,e,1),t}function Il(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 Ll(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 Rl(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 zl(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 Bl(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 V(e){let t={type:`Identifier`,name:e},n=B.Identifier;return z(n.name,t,`name`,e),t}function Vl(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 Hl(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 Ul(e){let t={type:`StringLiteral`,value:e},n=B.StringLiteral;return z(n.value,t,`value`,e),t}function Wl(e){let t={type:`NumericLiteral`,value:e},n=B.NumericLiteral;return z(n.value,t,`value`,e),t}function Gl(){return{type:`NullLiteral`}}function Kl(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 Jl(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 Yl(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 Xl(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 Zl(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 Ql(e){let t={type:`ObjectExpression`,properties:e},n=B.ObjectExpression;return z(n.properties,t,`properties`,e,1),t}function $l(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 eu(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 tu(e){let t={type:`RestElement`,argument:e},n=B.RestElement;return z(n.argument,t,`argument`,e,1),t}function nu(e=null){let t={type:`ReturnStatement`,argument:e},n=B.ReturnStatement;return z(n.argument,t,`argument`,e,1),t}function ru(e){let t={type:`SequenceExpression`,expressions:e},n=B.SequenceExpression;return z(n.expressions,t,`expressions`,e,1),t}function iu(e){let t={type:`ParenthesizedExpression`,expression:e},n=B.ParenthesizedExpression;return z(n.expression,t,`expression`,e,1),t}function au(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 ou(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 su(){return{type:`ThisExpression`}}function cu(e){let t={type:`ThrowStatement`,argument:e},n=B.ThrowStatement;return z(n.argument,t,`argument`,e,1),t}function lu(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 uu(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 du(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 fu(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 pu(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 mu(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 hu(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 gu(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 _u(e){let t={type:`ArrayPattern`,elements:e},n=B.ArrayPattern;return z(n.elements,t,`elements`,e,1),t}function vu(e,t,n=!1){let r={type:`ArrowFunctionExpression`,params:e,body:t,async:n,expression:null},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 yu(e){let t={type:`ClassBody`,body:e},n=B.ClassBody;return z(n.body,t,`body`,e,1),t}function bu(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 xu(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 Su(e){let t={type:`ExportAllDeclaration`,source:e,assertions:null},n=B.ExportAllDeclaration;return z(n.source,t,`source`,e,1),t}function Cu(e){let t={type:`ExportDefaultDeclaration`,declaration:e},n=B.ExportDefaultDeclaration;return z(n.declaration,t,`declaration`,e,1),t}function wu(e=null,t=[],n=null){let r={type:`ExportNamedDeclaration`,declaration:e,specifiers:t,source:n},i=B.ExportNamedDeclaration;return z(i.declaration,r,`declaration`,e,1),z(i.specifiers,r,`specifiers`,t,1),z(i.source,r,`source`,n,1),r}function Tu(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 Eu(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 Du(e,t){let n={type:`ImportDeclaration`,specifiers:e,source:t},r=B.ImportDeclaration;return z(r.specifiers,n,`specifiers`,e,1),z(r.source,n,`source`,t,1),n}function Ou(e){let t={type:`ImportDefaultSpecifier`,local:e},n=B.ImportDefaultSpecifier;return z(n.local,t,`local`,e,1),t}function ku(e){let t={type:`ImportNamespaceSpecifier`,local:e},n=B.ImportNamespaceSpecifier;return z(n.local,t,`local`,e,1),t}function Au(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 ju(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 Mu(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 Nu(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 Pu(e){let t={type:`ObjectPattern`,properties:e},n=B.ObjectPattern;return z(n.properties,t,`properties`,e,1),t}function Fu(e){let t={type:`SpreadElement`,argument:e},n=B.SpreadElement;return z(n.argument,t,`argument`,e,1),t}function Iu(){return{type:`Super`}}function Lu(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 Ru(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 zu(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 Bu(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 Vu(e){let t={type:`AwaitExpression`,argument:e},n=B.AwaitExpression;return z(n.argument,t,`argument`,e,1),t}function Hu(){return{type:`Import`}}function Uu(e){let t={type:`BigIntLiteral`,value:e},n=B.BigIntLiteral;return z(n.value,t,`value`,e),t}function Wu(e){let t={type:`ExportNamespaceSpecifier`,exported:e},n=B.ExportNamespaceSpecifier;return z(n.exported,t,`exported`,e,1),t}function Gu(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 Ku(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 Ju(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 Yu(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 Xu(e=`method`,t,n,r,i=!1){let a={type:`ClassPrivateMethod`,kind:e,key:t,params:n,body:r,static:i},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 Zu(e){let t={type:`PrivateName`,id:e},n=B.PrivateName;return z(n.id,t,`id`,e,1),t}function Qu(e){let t={type:`StaticBlock`,body:e},n=B.StaticBlock;return z(n.body,t,`body`,e,1),t}function $u(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 ed(){return{type:`AnyTypeAnnotation`}}function td(e){let t={type:`ArrayTypeAnnotation`,elementType:e},n=B.ArrayTypeAnnotation;return z(n.elementType,t,`elementType`,e,1),t}function nd(){return{type:`BooleanTypeAnnotation`}}function rd(e){let t={type:`BooleanLiteralTypeAnnotation`,value:e},n=B.BooleanLiteralTypeAnnotation;return z(n.value,t,`value`,e),t}function id(){return{type:`NullLiteralTypeAnnotation`}}function ad(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 od(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 sd(e){let t={type:`DeclareFunction`,id:e},n=B.DeclareFunction;return z(n.id,t,`id`,e,1),t}function cd(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 ld(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 ud(e){let t={type:`DeclareModuleExports`,typeAnnotation:e},n=B.DeclareModuleExports;return z(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function dd(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 fd(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 pd(e){let t={type:`DeclareVariable`,id:e},n=B.DeclareVariable;return z(n.id,t,`id`,e,1),t}function md(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 hd(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 gd(e){let t={type:`DeclaredPredicate`,value:e},n=B.DeclaredPredicate;return z(n.value,t,`value`,e,1),t}function _d(){return{type:`ExistsTypeAnnotation`}}function vd(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 yd(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 bd(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 xd(){return{type:`InferredPredicate`}}function Sd(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 Cd(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 wd(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 Td(e){let t={type:`IntersectionTypeAnnotation`,types:e},n=B.IntersectionTypeAnnotation;return z(n.types,t,`types`,e,1),t}function Ed(){return{type:`MixedTypeAnnotation`}}function Dd(){return{type:`EmptyTypeAnnotation`}}function Od(e){let t={type:`NullableTypeAnnotation`,typeAnnotation:e},n=B.NullableTypeAnnotation;return z(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function kd(e){let t={type:`NumberLiteralTypeAnnotation`,value:e},n=B.NumberLiteralTypeAnnotation;return z(n.value,t,`value`,e),t}function Ad(){return{type:`NumberTypeAnnotation`}}function jd(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 Md(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 Nd(e){let t={type:`ObjectTypeCallProperty`,value:e,static:null},n=B.ObjectTypeCallProperty;return z(n.value,t,`value`,e,1),t}function Pd(e=null,t,n,r=null){let i={type:`ObjectTypeIndexer`,id:e,key:t,value:n,variance:r,static:null},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 Fd(e,t,n=null){let r={type:`ObjectTypeProperty`,key:e,value:t,variance:n,kind:null,method:null,optional:null,proto:null,static:null},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 Id(e){let t={type:`ObjectTypeSpreadProperty`,argument:e},n=B.ObjectTypeSpreadProperty;return z(n.argument,t,`argument`,e,1),t}function Ld(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 Rd(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 zd(e){let t={type:`StringLiteralTypeAnnotation`,value:e},n=B.StringLiteralTypeAnnotation;return z(n.value,t,`value`,e),t}function Bd(){return{type:`StringTypeAnnotation`}}function Vd(){return{type:`SymbolTypeAnnotation`}}function Hd(){return{type:`ThisTypeAnnotation`}}function Ud(e){let t={type:`TupleTypeAnnotation`,types:e},n=B.TupleTypeAnnotation;return z(n.types,t,`types`,e,1),t}function Wd(e){let t={type:`TypeofTypeAnnotation`,argument:e},n=B.TypeofTypeAnnotation;return z(n.argument,t,`argument`,e,1),t}function Gd(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 Kd(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 Jd(e=null,t=null,n=null){let r={type:`TypeParameter`,bound:e,default:t,variance:n,name:null},i=B.TypeParameter;return z(i.bound,r,`bound`,e,1),z(i.default,r,`default`,t,1),z(i.variance,r,`variance`,n,1),r}function Yd(e){let t={type:`TypeParameterDeclaration`,params:e},n=B.TypeParameterDeclaration;return z(n.params,t,`params`,e,1),t}function Xd(e){let t={type:`TypeParameterInstantiation`,params:e},n=B.TypeParameterInstantiation;return z(n.params,t,`params`,e,1),t}function Zd(e){let t={type:`UnionTypeAnnotation`,types:e},n=B.UnionTypeAnnotation;return z(n.types,t,`types`,e,1),t}function Qd(e){let t={type:`Variance`,kind:e},n=B.Variance;return z(n.kind,t,`kind`,e),t}function $d(){return{type:`VoidTypeAnnotation`}}function ef(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 tf(e){let t={type:`EnumBooleanBody`,members:e,explicitType:null,hasUnknownMembers:null},n=B.EnumBooleanBody;return z(n.members,t,`members`,e,1),t}function nf(e){let t={type:`EnumNumberBody`,members:e,explicitType:null,hasUnknownMembers:null},n=B.EnumNumberBody;return z(n.members,t,`members`,e,1),t}function rf(e){let t={type:`EnumStringBody`,members:e,explicitType:null,hasUnknownMembers:null},n=B.EnumStringBody;return z(n.members,t,`members`,e,1),t}function af(e){let t={type:`EnumSymbolBody`,members:e,hasUnknownMembers:null},n=B.EnumSymbolBody;return z(n.members,t,`members`,e,1),t}function of(e){let t={type:`EnumBooleanMember`,id:e,init:null},n=B.EnumBooleanMember;return z(n.id,t,`id`,e,1),t}function sf(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 cf(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 lf(e){let t={type:`EnumDefaultedMember`,id:e},n=B.EnumDefaultedMember;return z(n.id,t,`id`,e,1),t}function uf(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 df(e,t){let n={type:`OptionalIndexedAccessType`,objectType:e,indexType:t,optional:null},r=B.OptionalIndexedAccessType;return z(r.objectType,n,`objectType`,e,1),z(r.indexType,n,`indexType`,t,1),n}function ff(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 pf(e){let t={type:`JSXClosingElement`,name:e},n=B.JSXClosingElement;return z(n.name,t,`name`,e,1),t}function mf(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 hf(){return{type:`JSXEmptyExpression`}}function gf(e){let t={type:`JSXExpressionContainer`,expression:e},n=B.JSXExpressionContainer;return z(n.expression,t,`expression`,e,1),t}function _f(e){let t={type:`JSXSpreadChild`,expression:e},n=B.JSXSpreadChild;return z(n.expression,t,`expression`,e,1),t}function vf(e){let t={type:`JSXIdentifier`,name:e},n=B.JSXIdentifier;return z(n.name,t,`name`,e),t}function yf(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 bf(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 xf(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 Sf(e){let t={type:`JSXSpreadAttribute`,argument:e},n=B.JSXSpreadAttribute;return z(n.argument,t,`argument`,e,1),t}function Cf(e){let t={type:`JSXText`,value:e},n=B.JSXText;return z(n.value,t,`value`,e),t}function wf(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 Tf(){return{type:`JSXOpeningFragment`}}function Ef(){return{type:`JSXClosingFragment`}}function Df(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 Of(e){let t={type:`V8IntrinsicIdentifier`,name:e},n=B.V8IntrinsicIdentifier;return z(n.name,t,`name`,e),t}function kf(){return{type:`ArgumentPlaceholder`}}function Af(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 jf(e){let t={type:`Decorator`,expression:e},n=B.Decorator;return z(n.expression,t,`expression`,e,1),t}function Mf(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 Nf(e){let t={type:`ExportDefaultSpecifier`,exported:e},n=B.ExportDefaultSpecifier;return z(n.exported,t,`exported`,e,1),t}function Pf(e){let t={type:`ModuleExpression`,body:e},n=B.ModuleExpression;return z(n.body,t,`body`,e,1),t}function Ff(){return{type:`TopicReference`}}function If(e){let t={type:`PipelineTopicExpression`,expression:e},n=B.PipelineTopicExpression;return z(n.expression,t,`expression`,e,1),t}function Lf(e){let t={type:`PipelineBareFunction`,callee:e},n=B.PipelineBareFunction;return z(n.callee,t,`callee`,e,1),t}function Rf(){return{type:`PipelinePrimaryTopicReference`}}function zf(){return{type:`VoidPattern`}}function Bf(e){let t={type:`TSParameterProperty`,parameter:e},n=B.TSParameterProperty;return z(n.parameter,t,`parameter`,e,1),t}function Vf(e=null,t=null,n,r=null){let i={type:`TSDeclareFunction`,id:e,typeParameters:t,params:n,returnType:r},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 Hf(e=null,t,n=null,r,i=null){let a={type:`TSDeclareMethod`,decorators:e,key:t,typeParameters:n,params:r,returnType:i},o=B.TSDeclareMethod;return z(o.decorators,a,`decorators`,e,1),z(o.key,a,`key`,t,1),z(o.typeParameters,a,`typeParameters`,n,1),z(o.params,a,`params`,r,1),z(o.returnType,a,`returnType`,i,1),a}function Uf(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 Wf(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 Gf(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 Kf(e,t=null){let n={type:`TSPropertySignature`,key:e,typeAnnotation:t},r=B.TSPropertySignature;return z(r.key,n,`key`,e,1),z(r.typeAnnotation,n,`typeAnnotation`,t,1),n}function qf(e,t=null,n,r=null){let i={type:`TSMethodSignature`,key:e,typeParameters:t,params:n,returnType:r,kind:null},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 Jf(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 Yf(){return{type:`TSAnyKeyword`}}function Xf(){return{type:`TSBooleanKeyword`}}function Zf(){return{type:`TSBigIntKeyword`}}function Qf(){return{type:`TSIntrinsicKeyword`}}function $f(){return{type:`TSNeverKeyword`}}function ep(){return{type:`TSNullKeyword`}}function tp(){return{type:`TSNumberKeyword`}}function np(){return{type:`TSObjectKeyword`}}function rp(){return{type:`TSStringKeyword`}}function ip(){return{type:`TSSymbolKeyword`}}function ap(){return{type:`TSUndefinedKeyword`}}function op(){return{type:`TSUnknownKeyword`}}function sp(){return{type:`TSVoidKeyword`}}function cp(){return{type:`TSThisType`}}function lp(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 up(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 dp(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 fp(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 pp(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 mp(e){let t={type:`TSTypeLiteral`,members:e},n=B.TSTypeLiteral;return z(n.members,t,`members`,e,1),t}function hp(e){let t={type:`TSArrayType`,elementType:e},n=B.TSArrayType;return z(n.elementType,t,`elementType`,e,1),t}function gp(e){let t={type:`TSTupleType`,elementTypes:e},n=B.TSTupleType;return z(n.elementTypes,t,`elementTypes`,e,1),t}function _p(e){let t={type:`TSOptionalType`,typeAnnotation:e},n=B.TSOptionalType;return z(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function vp(e){let t={type:`TSRestType`,typeAnnotation:e},n=B.TSRestType;return z(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function yp(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 bp(e){let t={type:`TSUnionType`,types:e},n=B.TSUnionType;return z(n.types,t,`types`,e,1),t}function xp(e){let t={type:`TSIntersectionType`,types:e},n=B.TSIntersectionType;return z(n.types,t,`types`,e,1),t}function Sp(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 Cp(e){let t={type:`TSInferType`,typeParameter:e},n=B.TSInferType;return z(n.typeParameter,t,`typeParameter`,e,1),t}function wp(e){let t={type:`TSParenthesizedType`,typeAnnotation:e},n=B.TSParenthesizedType;return z(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function Tp(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 Ep(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 Dp(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 Op(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 kp(e){let t={type:`TSLiteralType`,literal:e},n=B.TSLiteralType;return z(n.literal,t,`literal`,e,1),t}function Ap(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 jp(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 Mp(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 Np(e){let t={type:`TSInterfaceBody`,body:e},n=B.TSInterfaceBody;return z(n.body,t,`body`,e,1),t}function Pp(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 Fp(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 Ip(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 Lp(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 Rp(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 zp(e){let t={type:`TSEnumBody`,members:e},n=B.TSEnumBody;return z(n.members,t,`members`,e,1),t}function Bp(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 Vp(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 Hp(e,t){let n={type:`TSModuleDeclaration`,id:e,body:t,kind:null},r=B.TSModuleDeclaration;return z(r.id,n,`id`,e,1),z(r.body,n,`body`,t,1),n}function Up(e){let t={type:`TSModuleBlock`,body:e},n=B.TSModuleBlock;return z(n.body,t,`body`,e,1),t}function Wp(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 Gp(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 Kp(e){let t={type:`TSExternalModuleReference`,expression:e},n=B.TSExternalModuleReference;return z(n.expression,t,`expression`,e,1),t}function qp(e){let t={type:`TSNonNullExpression`,expression:e},n=B.TSNonNullExpression;return z(n.expression,t,`expression`,e,1),t}function Jp(e){let t={type:`TSExportAssignment`,expression:e},n=B.TSExportAssignment;return z(n.expression,t,`expression`,e,1),t}function Yp(e){let t={type:`TSNamespaceExportDeclaration`,id:e},n=B.TSNamespaceExportDeclaration;return z(n.id,t,`id`,e,1),t}function Xp(e){let t={type:`TSTypeAnnotation`,typeAnnotation:e},n=B.TSTypeAnnotation;return z(n.typeAnnotation,t,`typeAnnotation`,e,1),t}function Zp(e){let t={type:`TSTypeParameterInstantiation`,params:e},n=B.TSTypeParameterInstantiation;return z(n.params,t,`params`,e,1),t}function Qp(e){let t={type:`TSTypeParameterDeclaration`,params:e},n=B.TSTypeParameterDeclaration;return z(n.params,t,`params`,e,1),t}function $p(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 em(e){return C(`NumberLiteral`,`NumericLiteral`,`The node type `),Wl(e)}function tm(e,t=``){return C(`RegexLiteral`,`RegExpLiteral`,`The node type `),ql(e,t)}function nm(e){return C(`RestProperty`,`RestElement`,`The node type `),tu(e)}function rm(e){return C(`SpreadProperty`,`SpreadElement`,`The node type `),Fu(e)}var im=Object.freeze({__proto__:null,anyTypeAnnotation:ed,argumentPlaceholder:kf,arrayExpression:bl,arrayPattern:_u,arrayTypeAnnotation:td,arrowFunctionExpression:vu,assignmentExpression:xl,assignmentPattern:gu,awaitExpression:Vu,bigIntLiteral:Uu,binaryExpression:Sl,bindExpression:Af,blockStatement:El,booleanLiteral:Kl,booleanLiteralTypeAnnotation:rd,booleanTypeAnnotation:nd,breakStatement:Dl,callExpression:Ol,catchClause:kl,classAccessorProperty:Ju,classBody:yu,classDeclaration:xu,classExpression:bu,classImplements:ad,classMethod:Nu,classPrivateMethod:Xu,classPrivateProperty:Yu,classProperty:qu,conditionalExpression:Al,continueStatement:jl,debuggerStatement:Ml,declareClass:od,declareExportAllDeclaration:hd,declareExportDeclaration:md,declareFunction:sd,declareInterface:cd,declareModule:ld,declareModuleExports:ud,declareOpaqueType:fd,declareTypeAlias:dd,declareVariable:pd,declaredPredicate:gd,decorator:jf,directive:wl,directiveLiteral:Tl,doExpression:Mf,doWhileStatement:Nl,emptyStatement:Pl,emptyTypeAnnotation:Dd,enumBooleanBody:tf,enumBooleanMember:of,enumDeclaration:ef,enumDefaultedMember:lf,enumNumberBody:nf,enumNumberMember:sf,enumStringBody:rf,enumStringMember:cf,enumSymbolBody:af,existsTypeAnnotation:_d,exportAllDeclaration:Su,exportDefaultDeclaration:Cu,exportDefaultSpecifier:Nf,exportNamedDeclaration:wu,exportNamespaceSpecifier:Wu,exportSpecifier:Tu,expressionStatement:Fl,file:Il,forInStatement:Ll,forOfStatement:Eu,forStatement:Rl,functionDeclaration:zl,functionExpression:Bl,functionTypeAnnotation:vd,functionTypeParam:yd,genericTypeAnnotation:bd,identifier:V,ifStatement:Vl,import:Hu,importAttribute:$u,importDeclaration:Du,importDefaultSpecifier:Ou,importExpression:ju,importNamespaceSpecifier:ku,importSpecifier:Au,indexedAccessType:uf,inferredPredicate:xd,interfaceDeclaration:Cd,interfaceExtends:Sd,interfaceTypeAnnotation:wd,interpreterDirective:Cl,intersectionTypeAnnotation:Td,jsxAttribute:ff,jsxClosingElement:pf,jsxClosingFragment:Ef,jsxElement:mf,jsxEmptyExpression:hf,jsxExpressionContainer:gf,jsxFragment:wf,jsxIdentifier:vf,jsxMemberExpression:yf,jsxNamespacedName:bf,jsxOpeningElement:xf,jsxOpeningFragment:Tf,jsxSpreadAttribute:Sf,jsxSpreadChild:_f,jsxText:Cf,labeledStatement:Hl,logicalExpression:Jl,memberExpression:Yl,metaProperty:Mu,mixedTypeAnnotation:Ed,moduleExpression:Pf,newExpression:Xl,nullLiteral:Gl,nullLiteralTypeAnnotation:id,nullableTypeAnnotation:Od,numberLiteral:em,numberLiteralTypeAnnotation:kd,numberTypeAnnotation:Ad,numericLiteral:Wl,objectExpression:Ql,objectMethod:$l,objectPattern:Pu,objectProperty:eu,objectTypeAnnotation:jd,objectTypeCallProperty:Nd,objectTypeIndexer:Pd,objectTypeInternalSlot:Md,objectTypeProperty:Fd,objectTypeSpreadProperty:Id,opaqueType:Ld,optionalCallExpression:Ku,optionalIndexedAccessType:df,optionalMemberExpression:Gu,parenthesizedExpression:iu,pipelineBareFunction:Lf,pipelinePrimaryTopicReference:Rf,pipelineTopicExpression:If,placeholder:Df,privateName:Zu,program:Zl,qualifiedTypeIdentifier:Rd,regExpLiteral:ql,regexLiteral:tm,restElement:tu,restProperty:nm,returnStatement:nu,sequenceExpression:ru,spreadElement:Fu,spreadProperty:rm,staticBlock:Qu,stringLiteral:Ul,stringLiteralTypeAnnotation:zd,stringTypeAnnotation:Bd,super:Iu,switchCase:au,switchStatement:ou,symbolTypeAnnotation:Vd,taggedTemplateExpression:Lu,templateElement:Ru,templateLiteral:zu,thisExpression:su,thisTypeAnnotation:Hd,throwStatement:cu,topicReference:Ff,tryStatement:lu,tsAnyKeyword:Yf,tsArrayType:hp,tsAsExpression:Ip,tsBigIntKeyword:Zf,tsBooleanKeyword:Xf,tsCallSignatureDeclaration:Wf,tsClassImplements:Ap,tsConditionalType:Sp,tsConstructSignatureDeclaration:Gf,tsConstructorType:up,tsDeclareFunction:Vf,tsDeclareMethod:Hf,tsEnumBody:zp,tsEnumDeclaration:Bp,tsEnumMember:Vp,tsExportAssignment:Jp,tsExternalModuleReference:Kp,tsFunctionType:lp,tsImportEqualsDeclaration:Gp,tsImportType:Wp,tsIndexSignature:Jf,tsIndexedAccessType:Ep,tsInferType:Cp,tsInstantiationExpression:Fp,tsInterfaceBody:Np,tsInterfaceDeclaration:Mp,tsInterfaceHeritage:jp,tsIntersectionType:xp,tsIntrinsicKeyword:Qf,tsLiteralType:kp,tsMappedType:Dp,tsMethodSignature:qf,tsModuleBlock:Up,tsModuleDeclaration:Hp,tsNamedTupleMember:yp,tsNamespaceExportDeclaration:Yp,tsNeverKeyword:$f,tsNonNullExpression:qp,tsNullKeyword:ep,tsNumberKeyword:tp,tsObjectKeyword:np,tsOptionalType:_p,tsParameterProperty:Bf,tsParenthesizedType:wp,tsPropertySignature:Kf,tsQualifiedName:Uf,tsRestType:vp,tsSatisfiesExpression:Lp,tsStringKeyword:rp,tsSymbolKeyword:ip,tsTemplateLiteralType:Op,tsThisType:cp,tsTupleType:gp,tsTypeAliasDeclaration:Pp,tsTypeAnnotation:Xp,tsTypeAssertion:Rp,tsTypeLiteral:mp,tsTypeOperator:Tp,tsTypeParameter:$p,tsTypeParameterDeclaration:Qp,tsTypeParameterInstantiation:Zp,tsTypePredicate:fp,tsTypeQuery:pp,tsTypeReference:dp,tsUndefinedKeyword:ap,tsUnionType:bp,tsUnknownKeyword:op,tsVoidKeyword:sp,tupleTypeAnnotation:Ud,typeAlias:Gd,typeAnnotation:Kd,typeCastExpression:qd,typeParameter:Jd,typeParameterDeclaration:Yd,typeParameterInstantiation:Xd,typeofTypeAnnotation:Wd,unaryExpression:uu,unionTypeAnnotation:Zd,updateExpression:du,v8IntrinsicIdentifier:Of,variableDeclaration:fu,variableDeclarator:pu,variance:Qd,voidPattern:zf,voidTypeAnnotation:$d,whileStatement:mu,withStatement:hu,yieldExpression:Bu});function H(e){return function(){return C(e.replace(/^(?:ts|jsx|[a-z])/,e=>e.toUpperCase()),e,`Usage of builders starting with an uppercase letter such as `,`uppercase builders`),im[e](...arguments)}}const am=H(`arrayExpression`),om=H(`assignmentExpression`),sm=H(`binaryExpression`),cm=H(`interpreterDirective`),lm=H(`directive`),um=H(`directiveLiteral`),dm=H(`blockStatement`),fm=H(`breakStatement`),pm=H(`callExpression`),mm=H(`catchClause`),hm=H(`conditionalExpression`),gm=H(`continueStatement`),_m=H(`debuggerStatement`),vm=H(`doWhileStatement`),ym=H(`emptyStatement`),bm=H(`expressionStatement`),xm=H(`file`),Sm=H(`forInStatement`),Cm=H(`forStatement`),wm=H(`functionDeclaration`),Tm=H(`functionExpression`),Em=H(`identifier`),Dm=H(`ifStatement`),Om=H(`labeledStatement`),km=H(`stringLiteral`),Am=H(`numericLiteral`),jm=H(`nullLiteral`),Mm=H(`booleanLiteral`),Nm=H(`regExpLiteral`),Pm=H(`logicalExpression`),Fm=H(`memberExpression`),Im=H(`newExpression`),Lm=H(`program`),Rm=H(`objectExpression`),zm=H(`objectMethod`),Bm=H(`objectProperty`),Vm=H(`restElement`),Hm=H(`returnStatement`),Um=H(`sequenceExpression`),Wm=H(`parenthesizedExpression`),Gm=H(`switchCase`),Km=H(`switchStatement`),qm=H(`thisExpression`),Jm=H(`throwStatement`),Ym=H(`tryStatement`),Xm=H(`unaryExpression`),Zm=H(`updateExpression`),Qm=H(`variableDeclaration`),$m=H(`variableDeclarator`),eh=H(`whileStatement`),th=H(`withStatement`),nh=H(`assignmentPattern`),rh=H(`arrayPattern`),ih=H(`arrowFunctionExpression`),ah=H(`classBody`),oh=H(`classExpression`),sh=H(`classDeclaration`),ch=H(`exportAllDeclaration`),lh=H(`exportDefaultDeclaration`),uh=H(`exportNamedDeclaration`),dh=H(`exportSpecifier`),fh=H(`forOfStatement`),ph=H(`importDeclaration`),mh=H(`importDefaultSpecifier`),hh=H(`importNamespaceSpecifier`),gh=H(`importSpecifier`),_h=H(`importExpression`),vh=H(`metaProperty`),yh=H(`classMethod`),bh=H(`objectPattern`),xh=H(`spreadElement`),Sh=H(`super`),Ch=H(`taggedTemplateExpression`),wh=H(`templateElement`),Th=H(`templateLiteral`),Eh=H(`yieldExpression`),Dh=H(`awaitExpression`),Oh=H(`import`),kh=H(`bigIntLiteral`),Ah=H(`exportNamespaceSpecifier`),jh=H(`optionalMemberExpression`),Mh=H(`optionalCallExpression`),Nh=H(`classProperty`),Ph=H(`classAccessorProperty`),Fh=H(`classPrivateProperty`),Ih=H(`classPrivateMethod`),Lh=H(`privateName`),Rh=H(`staticBlock`),zh=H(`importAttribute`),Bh=H(`anyTypeAnnotation`),Vh=H(`arrayTypeAnnotation`),Hh=H(`booleanTypeAnnotation`),Uh=H(`booleanLiteralTypeAnnotation`),Wh=H(`nullLiteralTypeAnnotation`),Gh=H(`classImplements`),Kh=H(`declareClass`),qh=H(`declareFunction`),Jh=H(`declareInterface`),Yh=H(`declareModule`),Xh=H(`declareModuleExports`),Zh=H(`declareTypeAlias`),Qh=H(`declareOpaqueType`),$h=H(`declareVariable`),eg=H(`declareExportDeclaration`),tg=H(`declareExportAllDeclaration`),ng=H(`declaredPredicate`),rg=H(`existsTypeAnnotation`),ig=H(`functionTypeAnnotation`),ag=H(`functionTypeParam`),og=H(`genericTypeAnnotation`),sg=H(`inferredPredicate`),cg=H(`interfaceExtends`),lg=H(`interfaceDeclaration`),ug=H(`interfaceTypeAnnotation`),dg=H(`intersectionTypeAnnotation`),fg=H(`mixedTypeAnnotation`),pg=H(`emptyTypeAnnotation`),mg=H(`nullableTypeAnnotation`),hg=H(`numberLiteralTypeAnnotation`),gg=H(`numberTypeAnnotation`),_g=H(`objectTypeAnnotation`),vg=H(`objectTypeInternalSlot`),yg=H(`objectTypeCallProperty`),bg=H(`objectTypeIndexer`),xg=H(`objectTypeProperty`),Sg=H(`objectTypeSpreadProperty`),Cg=H(`opaqueType`),wg=H(`qualifiedTypeIdentifier`),Tg=H(`stringLiteralTypeAnnotation`),Eg=H(`stringTypeAnnotation`),Dg=H(`symbolTypeAnnotation`),Og=H(`thisTypeAnnotation`),kg=H(`tupleTypeAnnotation`),Ag=H(`typeofTypeAnnotation`),jg=H(`typeAlias`),Mg=H(`typeAnnotation`),Ng=H(`typeCastExpression`),Pg=H(`typeParameter`),Fg=H(`typeParameterDeclaration`),Ig=H(`typeParameterInstantiation`),Lg=H(`unionTypeAnnotation`),Rg=H(`variance`),zg=H(`voidTypeAnnotation`),Bg=H(`enumDeclaration`),Vg=H(`enumBooleanBody`),Hg=H(`enumNumberBody`),Ug=H(`enumStringBody`),Wg=H(`enumSymbolBody`),Gg=H(`enumBooleanMember`),Kg=H(`enumNumberMember`),qg=H(`enumStringMember`),Jg=H(`enumDefaultedMember`),Yg=H(`indexedAccessType`),Xg=H(`optionalIndexedAccessType`),Zg=H(`jsxAttribute`),Qg=H(`jsxClosingElement`),$g=H(`jsxElement`),e_=H(`jsxEmptyExpression`),t_=H(`jsxExpressionContainer`),n_=H(`jsxSpreadChild`),r_=H(`jsxIdentifier`),i_=H(`jsxMemberExpression`),a_=H(`jsxNamespacedName`),o_=H(`jsxOpeningElement`),s_=H(`jsxSpreadAttribute`),c_=H(`jsxText`),l_=H(`jsxFragment`),u_=H(`jsxOpeningFragment`),d_=H(`jsxClosingFragment`),f_=H(`placeholder`),p_=H(`v8IntrinsicIdentifier`),m_=H(`argumentPlaceholder`),h_=H(`bindExpression`),g_=H(`decorator`),__=H(`doExpression`),v_=H(`exportDefaultSpecifier`),y_=H(`moduleExpression`),b_=H(`topicReference`),x_=H(`pipelineTopicExpression`),S_=H(`pipelineBareFunction`),C_=H(`pipelinePrimaryTopicReference`),w_=H(`voidPattern`),T_=H(`tsParameterProperty`),E_=H(`tsDeclareFunction`),D_=H(`tsDeclareMethod`),O_=H(`tsQualifiedName`),k_=H(`tsCallSignatureDeclaration`),A_=H(`tsConstructSignatureDeclaration`),j_=H(`tsPropertySignature`),M_=H(`tsMethodSignature`),N_=H(`tsIndexSignature`),P_=H(`tsAnyKeyword`),F_=H(`tsBooleanKeyword`),I_=H(`tsBigIntKeyword`),L_=H(`tsIntrinsicKeyword`),R_=H(`tsNeverKeyword`),z_=H(`tsNullKeyword`),B_=H(`tsNumberKeyword`),V_=H(`tsObjectKeyword`),H_=H(`tsStringKeyword`),U_=H(`tsSymbolKeyword`),W_=H(`tsUndefinedKeyword`),G_=H(`tsUnknownKeyword`),K_=H(`tsVoidKeyword`),q_=H(`tsThisType`),J_=H(`tsFunctionType`),Y_=H(`tsConstructorType`),X_=H(`tsTypeReference`),Z_=H(`tsTypePredicate`),Q_=H(`tsTypeQuery`),$_=H(`tsTypeLiteral`),ev=H(`tsArrayType`),tv=H(`tsTupleType`),nv=H(`tsOptionalType`),rv=H(`tsRestType`),iv=H(`tsNamedTupleMember`),av=H(`tsUnionType`),ov=H(`tsIntersectionType`),sv=H(`tsConditionalType`),cv=H(`tsInferType`),lv=H(`tsParenthesizedType`),uv=H(`tsTypeOperator`),dv=H(`tsIndexedAccessType`),fv=H(`tsMappedType`),pv=H(`tsTemplateLiteralType`),mv=H(`tsLiteralType`),hv=H(`tsClassImplements`),gv=H(`tsInterfaceHeritage`),_v=H(`tsInterfaceDeclaration`),vv=H(`tsInterfaceBody`),yv=H(`tsTypeAliasDeclaration`),bv=H(`tsInstantiationExpression`),xv=H(`tsAsExpression`),Sv=H(`tsSatisfiesExpression`),Cv=H(`tsTypeAssertion`),wv=H(`tsEnumBody`),Tv=H(`tsEnumDeclaration`),Ev=H(`tsEnumMember`),Dv=H(`tsModuleDeclaration`),Ov=H(`tsModuleBlock`),kv=H(`tsImportType`),Av=H(`tsImportEqualsDeclaration`),jv=H(`tsExternalModuleReference`),Mv=H(`tsNonNullExpression`),Nv=H(`tsExportAssignment`),Pv=H(`tsNamespaceExportDeclaration`),Fv=H(`tsTypeAnnotation`),Iv=H(`tsTypeParameterInstantiation`),Lv=H(`tsTypeParameterDeclaration`),Rv=H(`tsTypeParameter`);function zv(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(pE(Ul(i),e))}function Bv(e){let t=[];for(let n=0;n<e.children.length;n++){let r=e.children[n];if(Sa(r)){zv(r,t);continue}ha(r)&&(r=r.expression),!ma(r)&&t.push(r)}return t}function Vv(e){return!!(e&&Ec[e.type])}function Hv(e){if(!Vv(e)){let t=e?.type??JSON.stringify(e);throw TypeError(`Not a valid node of type "${t}"`)}}function U(e,t,n){if(!w(e,t,n))throw Error(`Expected type "${e}" with option ${JSON.stringify(n)}, but instead got "${t.type}".`)}function Uv(e,t){U(`ArrayExpression`,e,t)}function Wv(e,t){U(`AssignmentExpression`,e,t)}function Gv(e,t){U(`BinaryExpression`,e,t)}function Kv(e,t){U(`InterpreterDirective`,e,t)}function qv(e,t){U(`Directive`,e,t)}function Jv(e,t){U(`DirectiveLiteral`,e,t)}function Yv(e,t){U(`BlockStatement`,e,t)}function Xv(e,t){U(`BreakStatement`,e,t)}function Zv(e,t){U(`CallExpression`,e,t)}function Qv(e,t){U(`CatchClause`,e,t)}function $v(e,t){U(`ConditionalExpression`,e,t)}function ey(e,t){U(`ContinueStatement`,e,t)}function ty(e,t){U(`DebuggerStatement`,e,t)}function ny(e,t){U(`DoWhileStatement`,e,t)}function ry(e,t){U(`EmptyStatement`,e,t)}function iy(e,t){U(`ExpressionStatement`,e,t)}function ay(e,t){U(`File`,e,t)}function oy(e,t){U(`ForInStatement`,e,t)}function sy(e,t){U(`ForStatement`,e,t)}function cy(e,t){U(`FunctionDeclaration`,e,t)}function ly(e,t){U(`FunctionExpression`,e,t)}function uy(e,t){U(`Identifier`,e,t)}function dy(e,t){U(`IfStatement`,e,t)}function fy(e,t){U(`LabeledStatement`,e,t)}function py(e,t){U(`StringLiteral`,e,t)}function my(e,t){U(`NumericLiteral`,e,t)}function hy(e,t){U(`NullLiteral`,e,t)}function gy(e,t){U(`BooleanLiteral`,e,t)}function _y(e,t){U(`RegExpLiteral`,e,t)}function vy(e,t){U(`LogicalExpression`,e,t)}function yy(e,t){U(`MemberExpression`,e,t)}function by(e,t){U(`NewExpression`,e,t)}function xy(e,t){U(`Program`,e,t)}function Sy(e,t){U(`ObjectExpression`,e,t)}function Cy(e,t){U(`ObjectMethod`,e,t)}function wy(e,t){U(`ObjectProperty`,e,t)}function Ty(e,t){U(`RestElement`,e,t)}function Ey(e,t){U(`ReturnStatement`,e,t)}function Dy(e,t){U(`SequenceExpression`,e,t)}function Oy(e,t){U(`ParenthesizedExpression`,e,t)}function ky(e,t){U(`SwitchCase`,e,t)}function Ay(e,t){U(`SwitchStatement`,e,t)}function jy(e,t){U(`ThisExpression`,e,t)}function My(e,t){U(`ThrowStatement`,e,t)}function Ny(e,t){U(`TryStatement`,e,t)}function Py(e,t){U(`UnaryExpression`,e,t)}function Fy(e,t){U(`UpdateExpression`,e,t)}function Iy(e,t){U(`VariableDeclaration`,e,t)}function Ly(e,t){U(`VariableDeclarator`,e,t)}function Ry(e,t){U(`WhileStatement`,e,t)}function zy(e,t){U(`WithStatement`,e,t)}function By(e,t){U(`AssignmentPattern`,e,t)}function Vy(e,t){U(`ArrayPattern`,e,t)}function Hy(e,t){U(`ArrowFunctionExpression`,e,t)}function Uy(e,t){U(`ClassBody`,e,t)}function Wy(e,t){U(`ClassExpression`,e,t)}function Gy(e,t){U(`ClassDeclaration`,e,t)}function Ky(e,t){U(`ExportAllDeclaration`,e,t)}function qy(e,t){U(`ExportDefaultDeclaration`,e,t)}function Jy(e,t){U(`ExportNamedDeclaration`,e,t)}function Yy(e,t){U(`ExportSpecifier`,e,t)}function Xy(e,t){U(`ForOfStatement`,e,t)}function Zy(e,t){U(`ImportDeclaration`,e,t)}function Qy(e,t){U(`ImportDefaultSpecifier`,e,t)}function $y(e,t){U(`ImportNamespaceSpecifier`,e,t)}function eb(e,t){U(`ImportSpecifier`,e,t)}function tb(e,t){U(`ImportExpression`,e,t)}function nb(e,t){U(`MetaProperty`,e,t)}function rb(e,t){U(`ClassMethod`,e,t)}function ib(e,t){U(`ObjectPattern`,e,t)}function ab(e,t){U(`SpreadElement`,e,t)}function ob(e,t){U(`Super`,e,t)}function sb(e,t){U(`TaggedTemplateExpression`,e,t)}function cb(e,t){U(`TemplateElement`,e,t)}function lb(e,t){U(`TemplateLiteral`,e,t)}function ub(e,t){U(`YieldExpression`,e,t)}function db(e,t){U(`AwaitExpression`,e,t)}function fb(e,t){U(`Import`,e,t)}function pb(e,t){U(`BigIntLiteral`,e,t)}function mb(e,t){U(`ExportNamespaceSpecifier`,e,t)}function hb(e,t){U(`OptionalMemberExpression`,e,t)}function gb(e,t){U(`OptionalCallExpression`,e,t)}function _b(e,t){U(`ClassProperty`,e,t)}function vb(e,t){U(`ClassAccessorProperty`,e,t)}function yb(e,t){U(`ClassPrivateProperty`,e,t)}function bb(e,t){U(`ClassPrivateMethod`,e,t)}function xb(e,t){U(`PrivateName`,e,t)}function Sb(e,t){U(`StaticBlock`,e,t)}function Cb(e,t){U(`ImportAttribute`,e,t)}function wb(e,t){U(`AnyTypeAnnotation`,e,t)}function Tb(e,t){U(`ArrayTypeAnnotation`,e,t)}function Eb(e,t){U(`BooleanTypeAnnotation`,e,t)}function Db(e,t){U(`BooleanLiteralTypeAnnotation`,e,t)}function Ob(e,t){U(`NullLiteralTypeAnnotation`,e,t)}function kb(e,t){U(`ClassImplements`,e,t)}function Ab(e,t){U(`DeclareClass`,e,t)}function jb(e,t){U(`DeclareFunction`,e,t)}function Mb(e,t){U(`DeclareInterface`,e,t)}function Nb(e,t){U(`DeclareModule`,e,t)}function Pb(e,t){U(`DeclareModuleExports`,e,t)}function Fb(e,t){U(`DeclareTypeAlias`,e,t)}function Ib(e,t){U(`DeclareOpaqueType`,e,t)}function Lb(e,t){U(`DeclareVariable`,e,t)}function Rb(e,t){U(`DeclareExportDeclaration`,e,t)}function zb(e,t){U(`DeclareExportAllDeclaration`,e,t)}function Bb(e,t){U(`DeclaredPredicate`,e,t)}function Vb(e,t){U(`ExistsTypeAnnotation`,e,t)}function Hb(e,t){U(`FunctionTypeAnnotation`,e,t)}function Ub(e,t){U(`FunctionTypeParam`,e,t)}function Wb(e,t){U(`GenericTypeAnnotation`,e,t)}function Gb(e,t){U(`InferredPredicate`,e,t)}function Kb(e,t){U(`InterfaceExtends`,e,t)}function qb(e,t){U(`InterfaceDeclaration`,e,t)}function Jb(e,t){U(`InterfaceTypeAnnotation`,e,t)}function Yb(e,t){U(`IntersectionTypeAnnotation`,e,t)}function Xb(e,t){U(`MixedTypeAnnotation`,e,t)}function Zb(e,t){U(`EmptyTypeAnnotation`,e,t)}function Qb(e,t){U(`NullableTypeAnnotation`,e,t)}function $b(e,t){U(`NumberLiteralTypeAnnotation`,e,t)}function ex(e,t){U(`NumberTypeAnnotation`,e,t)}function tx(e,t){U(`ObjectTypeAnnotation`,e,t)}function nx(e,t){U(`ObjectTypeInternalSlot`,e,t)}function rx(e,t){U(`ObjectTypeCallProperty`,e,t)}function ix(e,t){U(`ObjectTypeIndexer`,e,t)}function ax(e,t){U(`ObjectTypeProperty`,e,t)}function ox(e,t){U(`ObjectTypeSpreadProperty`,e,t)}function sx(e,t){U(`OpaqueType`,e,t)}function cx(e,t){U(`QualifiedTypeIdentifier`,e,t)}function lx(e,t){U(`StringLiteralTypeAnnotation`,e,t)}function ux(e,t){U(`StringTypeAnnotation`,e,t)}function dx(e,t){U(`SymbolTypeAnnotation`,e,t)}function fx(e,t){U(`ThisTypeAnnotation`,e,t)}function px(e,t){U(`TupleTypeAnnotation`,e,t)}function mx(e,t){U(`TypeofTypeAnnotation`,e,t)}function hx(e,t){U(`TypeAlias`,e,t)}function gx(e,t){U(`TypeAnnotation`,e,t)}function _x(e,t){U(`TypeCastExpression`,e,t)}function vx(e,t){U(`TypeParameter`,e,t)}function yx(e,t){U(`TypeParameterDeclaration`,e,t)}function bx(e,t){U(`TypeParameterInstantiation`,e,t)}function xx(e,t){U(`UnionTypeAnnotation`,e,t)}function Sx(e,t){U(`Variance`,e,t)}function Cx(e,t){U(`VoidTypeAnnotation`,e,t)}function wx(e,t){U(`EnumDeclaration`,e,t)}function Tx(e,t){U(`EnumBooleanBody`,e,t)}function Ex(e,t){U(`EnumNumberBody`,e,t)}function Dx(e,t){U(`EnumStringBody`,e,t)}function Ox(e,t){U(`EnumSymbolBody`,e,t)}function kx(e,t){U(`EnumBooleanMember`,e,t)}function Ax(e,t){U(`EnumNumberMember`,e,t)}function jx(e,t){U(`EnumStringMember`,e,t)}function Mx(e,t){U(`EnumDefaultedMember`,e,t)}function Nx(e,t){U(`IndexedAccessType`,e,t)}function Px(e,t){U(`OptionalIndexedAccessType`,e,t)}function Fx(e,t){U(`JSXAttribute`,e,t)}function Ix(e,t){U(`JSXClosingElement`,e,t)}function Lx(e,t){U(`JSXElement`,e,t)}function Rx(e,t){U(`JSXEmptyExpression`,e,t)}function zx(e,t){U(`JSXExpressionContainer`,e,t)}function Bx(e,t){U(`JSXSpreadChild`,e,t)}function Vx(e,t){U(`JSXIdentifier`,e,t)}function Hx(e,t){U(`JSXMemberExpression`,e,t)}function Ux(e,t){U(`JSXNamespacedName`,e,t)}function Wx(e,t){U(`JSXOpeningElement`,e,t)}function Gx(e,t){U(`JSXSpreadAttribute`,e,t)}function Kx(e,t){U(`JSXText`,e,t)}function qx(e,t){U(`JSXFragment`,e,t)}function Jx(e,t){U(`JSXOpeningFragment`,e,t)}function Yx(e,t){U(`JSXClosingFragment`,e,t)}function Xx(e,t){U(`Placeholder`,e,t)}function Zx(e,t){U(`V8IntrinsicIdentifier`,e,t)}function Qx(e,t){U(`ArgumentPlaceholder`,e,t)}function $x(e,t){U(`BindExpression`,e,t)}function eS(e,t){U(`Decorator`,e,t)}function tS(e,t){U(`DoExpression`,e,t)}function nS(e,t){U(`ExportDefaultSpecifier`,e,t)}function rS(e,t){U(`ModuleExpression`,e,t)}function iS(e,t){U(`TopicReference`,e,t)}function aS(e,t){U(`PipelineTopicExpression`,e,t)}function oS(e,t){U(`PipelineBareFunction`,e,t)}function sS(e,t){U(`PipelinePrimaryTopicReference`,e,t)}function cS(e,t){U(`VoidPattern`,e,t)}function lS(e,t){U(`TSParameterProperty`,e,t)}function uS(e,t){U(`TSDeclareFunction`,e,t)}function dS(e,t){U(`TSDeclareMethod`,e,t)}function fS(e,t){U(`TSQualifiedName`,e,t)}function pS(e,t){U(`TSCallSignatureDeclaration`,e,t)}function mS(e,t){U(`TSConstructSignatureDeclaration`,e,t)}function hS(e,t){U(`TSPropertySignature`,e,t)}function gS(e,t){U(`TSMethodSignature`,e,t)}function _S(e,t){U(`TSIndexSignature`,e,t)}function vS(e,t){U(`TSAnyKeyword`,e,t)}function yS(e,t){U(`TSBooleanKeyword`,e,t)}function bS(e,t){U(`TSBigIntKeyword`,e,t)}function xS(e,t){U(`TSIntrinsicKeyword`,e,t)}function SS(e,t){U(`TSNeverKeyword`,e,t)}function CS(e,t){U(`TSNullKeyword`,e,t)}function wS(e,t){U(`TSNumberKeyword`,e,t)}function TS(e,t){U(`TSObjectKeyword`,e,t)}function ES(e,t){U(`TSStringKeyword`,e,t)}function DS(e,t){U(`TSSymbolKeyword`,e,t)}function OS(e,t){U(`TSUndefinedKeyword`,e,t)}function kS(e,t){U(`TSUnknownKeyword`,e,t)}function AS(e,t){U(`TSVoidKeyword`,e,t)}function jS(e,t){U(`TSThisType`,e,t)}function MS(e,t){U(`TSFunctionType`,e,t)}function NS(e,t){U(`TSConstructorType`,e,t)}function PS(e,t){U(`TSTypeReference`,e,t)}function FS(e,t){U(`TSTypePredicate`,e,t)}function IS(e,t){U(`TSTypeQuery`,e,t)}function LS(e,t){U(`TSTypeLiteral`,e,t)}function RS(e,t){U(`TSArrayType`,e,t)}function zS(e,t){U(`TSTupleType`,e,t)}function BS(e,t){U(`TSOptionalType`,e,t)}function VS(e,t){U(`TSRestType`,e,t)}function HS(e,t){U(`TSNamedTupleMember`,e,t)}function US(e,t){U(`TSUnionType`,e,t)}function WS(e,t){U(`TSIntersectionType`,e,t)}function GS(e,t){U(`TSConditionalType`,e,t)}function KS(e,t){U(`TSInferType`,e,t)}function qS(e,t){U(`TSParenthesizedType`,e,t)}function JS(e,t){U(`TSTypeOperator`,e,t)}function YS(e,t){U(`TSIndexedAccessType`,e,t)}function XS(e,t){U(`TSMappedType`,e,t)}function ZS(e,t){U(`TSTemplateLiteralType`,e,t)}function QS(e,t){U(`TSLiteralType`,e,t)}function $S(e,t){U(`TSClassImplements`,e,t)}function eC(e,t){U(`TSInterfaceHeritage`,e,t)}function tC(e,t){U(`TSInterfaceDeclaration`,e,t)}function nC(e,t){U(`TSInterfaceBody`,e,t)}function rC(e,t){U(`TSTypeAliasDeclaration`,e,t)}function iC(e,t){U(`TSInstantiationExpression`,e,t)}function aC(e,t){U(`TSAsExpression`,e,t)}function oC(e,t){U(`TSSatisfiesExpression`,e,t)}function sC(e,t){U(`TSTypeAssertion`,e,t)}function cC(e,t){U(`TSEnumBody`,e,t)}function lC(e,t){U(`TSEnumDeclaration`,e,t)}function uC(e,t){U(`TSEnumMember`,e,t)}function dC(e,t){U(`TSModuleDeclaration`,e,t)}function fC(e,t){U(`TSModuleBlock`,e,t)}function pC(e,t){U(`TSImportType`,e,t)}function mC(e,t){U(`TSImportEqualsDeclaration`,e,t)}function hC(e,t){U(`TSExternalModuleReference`,e,t)}function gC(e,t){U(`TSNonNullExpression`,e,t)}function _C(e,t){U(`TSExportAssignment`,e,t)}function vC(e,t){U(`TSNamespaceExportDeclaration`,e,t)}function yC(e,t){U(`TSTypeAnnotation`,e,t)}function bC(e,t){U(`TSTypeParameterInstantiation`,e,t)}function xC(e,t){U(`TSTypeParameterDeclaration`,e,t)}function SC(e,t){U(`TSTypeParameter`,e,t)}function CC(e,t){U(`Standardized`,e,t)}function wC(e,t){U(`Expression`,e,t)}function TC(e,t){U(`Binary`,e,t)}function EC(e,t){U(`Scopable`,e,t)}function DC(e,t){U(`BlockParent`,e,t)}function OC(e,t){U(`Block`,e,t)}function kC(e,t){U(`Statement`,e,t)}function AC(e,t){U(`Terminatorless`,e,t)}function jC(e,t){U(`CompletionStatement`,e,t)}function MC(e,t){U(`Conditional`,e,t)}function NC(e,t){U(`Loop`,e,t)}function PC(e,t){U(`While`,e,t)}function FC(e,t){U(`ExpressionWrapper`,e,t)}function IC(e,t){U(`For`,e,t)}function LC(e,t){U(`ForXStatement`,e,t)}function RC(e,t){U(`Function`,e,t)}function zC(e,t){U(`FunctionParent`,e,t)}function BC(e,t){U(`Pureish`,e,t)}function VC(e,t){U(`Declaration`,e,t)}function HC(e,t){U(`FunctionParameter`,e,t)}function UC(e,t){U(`PatternLike`,e,t)}function WC(e,t){U(`LVal`,e,t)}function GC(e,t){U(`TSEntityName`,e,t)}function KC(e,t){U(`Literal`,e,t)}function qC(e,t){U(`Immutable`,e,t)}function JC(e,t){U(`UserWhitespacable`,e,t)}function YC(e,t){U(`Method`,e,t)}function XC(e,t){U(`ObjectMember`,e,t)}function ZC(e,t){U(`Property`,e,t)}function QC(e,t){U(`UnaryLike`,e,t)}function $C(e,t){U(`Pattern`,e,t)}function ew(e,t){U(`Class`,e,t)}function tw(e,t){U(`ImportOrExportDeclaration`,e,t)}function nw(e,t){U(`ExportDeclaration`,e,t)}function rw(e,t){U(`ModuleSpecifier`,e,t)}function iw(e,t){U(`Accessor`,e,t)}function aw(e,t){U(`Private`,e,t)}function ow(e,t){U(`Flow`,e,t)}function sw(e,t){U(`FlowType`,e,t)}function cw(e,t){U(`FlowBaseAnnotation`,e,t)}function lw(e,t){U(`FlowDeclaration`,e,t)}function uw(e,t){U(`FlowPredicate`,e,t)}function dw(e,t){U(`EnumBody`,e,t)}function fw(e,t){U(`EnumMember`,e,t)}function pw(e,t){U(`JSX`,e,t)}function mw(e,t){U(`Miscellaneous`,e,t)}function hw(e,t){U(`TypeScript`,e,t)}function gw(e,t){U(`TSTypeElement`,e,t)}function _w(e,t){U(`TSType`,e,t)}function vw(e,t){U(`TSBaseType`,e,t)}function yw(e,t){C(`assertNumberLiteral`,`assertNumericLiteral`),U(`NumberLiteral`,e,t)}function bw(e,t){C(`assertRegexLiteral`,`assertRegExpLiteral`),U(`RegexLiteral`,e,t)}function xw(e,t){C(`assertRestProperty`,`assertRestElement`),U(`RestProperty`,e,t)}function Sw(e,t){C(`assertSpreadProperty`,`assertSpreadElement`),U(`SpreadProperty`,e,t)}function Cw(e,t){C(`assertModuleDeclaration`,`assertImportOrExportDeclaration`),U(`ModuleDeclaration`,e,t)}function ww(e){switch(e){case`string`:return Bd();case`number`:return Ad();case`undefined`:return $d();case`boolean`:return nd();case`function`:return bd(V(`Function`));case`object`:return bd(V(`Object`));case`symbol`:return bd(V(`Symbol`));case`bigint`:return ed()}throw Error(`Invalid typeof value: `+e)}function Tw(e){return Bn(e)?e.name:`${e.id.name}.${Tw(e.qualification)}`}function Ew(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(ei(o))return[o];if(Rs(o)){r.set(o.type,o);continue}if(Zi(o)){i.has(o.types)||(t.push(...o.types),i.add(o.types));continue}if(bi(o)){let e=Tw(o.id);if(n.has(e)){let t=n.get(e);t.typeParameters?o.typeParameters&&(t.typeParameters.params.push(...o.typeParameters.params),t.typeParameters.params=Ew(t.typeParameters.params)):t=o.typeParameters}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 Dw(e){let t=Ew(e);return t.length===1?t[0]:Zd(t)}function Ow(e){return Bn(e)?e.name:sr(e)?`this`:`${e.right.name}.${Ow(e.left)}`}function kw(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(Ja(o))return[o];if(Js(o)){r.set(o.type,o);continue}if(bo(o)){i.has(o.types)||(t.push(...o.types),i.add(o.types));continue}let s=`typeArguments`;if(uo(o)&&o[s]){let e=o[s],t=Ow(o.typeName);if(n.has(t)){let r=n.get(t),i=r[s];i?(i.params.push(...e.params),i.params=kw(i.params)):r=e}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 Aw(e){let t=kw(e.map(e=>Xo(e)?e.typeAnnotation:e));return t.length===1?t[0]:bp(t)}function jw(){return uu(`void`,Wl(0),!0)}const{hasOwn:Mw}=Object;function Nw(e,t,n,r){return e&&typeof e.type==`string`?Iw(e,t,n,r):e}function Pw(e,t,n,r){return Array.isArray(e)?e.map(e=>Nw(e,t,n,r)):Nw(e,t,n,r)}function Fw(e,t=!0,n=!1){return Iw(e,t,n,new Map)}function Iw(e,t=!0,n=!1,r){if(!e)return e;let{type:i}=e,a={type:e.type};if(Bn(e))a.name=e.name,Mw(e,`optional`)&&typeof e.optional==`boolean`&&(a.optional=e.optional),Mw(e,`typeAnnotation`)&&(a.typeAnnotation=t?Pw(e.typeAnnotation,!0,n,r):e.typeAnnotation),Mw(e,`decorators`)&&(a.decorators=t?Pw(e.decorators,!0,n,r):e.decorators);else if(Mw(Oc,i))for(let o of Object.keys(Oc[i]))Mw(e,o)&&(t?a[o]=Fn(e)&&o===`comments`?Lw(e.comments,t,n,r):Pw(e[o],!0,n,r):a[o]=e[o]);else throw Error(`Unknown node type: "${i}"`);return Mw(e,`loc`)&&(n?a.loc=null:a.loc=e.loc),Mw(e,`leadingComments`)&&(a.leadingComments=Lw(e.leadingComments,t,n,r)),Mw(e,`innerComments`)&&(a.innerComments=Lw(e.innerComments,t,n,r)),Mw(e,`trailingComments`)&&(a.trailingComments=Lw(e.trailingComments,t,n,r)),Mw(e,`extra`)&&(a.extra={...e.extra}),a}function Lw(e,t,n,r){return!e||!t?e:e.map(e=>{let t=r.get(e);if(t)return t;let{type:i,value:a,loc:o}=e,s={type:i,value:a,loc:o};return n&&(s.loc=null),r.set(e,s),s})}function Rw(e){return Fw(e,!1)}function zw(e){return Fw(e)}function Bw(e){return Fw(e,!0,!0)}function Vw(e){return Fw(e,!1,!0)}function Hw(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 Uw(e,t,n,r){return Hw(e,t,[{type:r?`CommentLine`:`CommentBlock`,value:n}])}function Ww(e,t,n){t&&n&&(t[e]=Array.from(new Set([].concat(t[e],n[e]).filter(Boolean))))}function Gw(e,t){Ww(`innerComments`,e,t)}function Kw(e,t){Ww(`leadingComments`,e,t)}function qw(e,t){Ww(`trailingComments`,e,t)}function Jw(e,t){return qw(e,t),Kw(e,t),Gw(e,t),e}function Yw(e){return dc.forEach(t=>{e[t]=null}),e}const Xw=T.Standardized,Zw=T.Expression,Qw=T.Binary,$w=T.Scopable,eT=T.BlockParent,tT=T.Block,nT=T.Statement,rT=T.Terminatorless,iT=T.CompletionStatement,aT=T.Conditional,oT=T.Loop,sT=T.While,cT=T.ExpressionWrapper,lT=T.For,uT=T.ForXStatement,dT=T.Function,fT=T.FunctionParent,pT=T.Pureish,mT=T.Declaration,hT=T.FunctionParameter,gT=T.PatternLike,_T=T.LVal,vT=T.TSEntityName,yT=T.Literal,bT=T.Immutable,xT=T.UserWhitespacable,ST=T.Method,CT=T.ObjectMember,wT=T.Property,TT=T.UnaryLike,ET=T.Pattern,DT=T.Class,OT=T.ImportOrExportDeclaration,kT=T.ExportDeclaration,AT=T.ModuleSpecifier,jT=T.Accessor,MT=T.Private,NT=T.Flow,PT=T.FlowType,FT=T.FlowBaseAnnotation,IT=T.FlowDeclaration,LT=T.FlowPredicate,RT=T.EnumBody,zT=T.EnumMember,BT=T.JSX,VT=T.Miscellaneous,HT=T.TypeScript,UT=T.TSTypeElement,WT=T.TSType,GT=T.TSBaseType,KT=OT;function qT(e,t){if(Tn(e))return e;let n=[];return Nn(e)?n=[]:(os(e)||(e=hs(t)?nu(e):Fl(e)),n=[e]),El(n)}function JT(e,t=`body`){let n=qT(e[t],e);return e[t]=n,n}function YT(e){e+=``;let t=``;for(let n of e)t+=Qt(n.codePointAt(0))?n:`-`;return t=t.replace(/^[-0-9]+/,``),t=t.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():``}),sc(t)||(t=`_${t}`),t||`_`}function XT(e){return e=YT(e),(e===`eval`||e===`arguments`)&&(e=`_`+e),e}function ZT(e,t=e.key||e.property){return!e.computed&&Bn(t)&&(t=Ul(t.name)),t}function QT(e){if(Pn(e)&&(e=e.expression),ts(e))return e;if(As(e)?(e.type=`ClassExpression`,e.abstract=!1):hs(e)&&(e.type=`FunctionExpression`),!ts(e))throw Error(`cannot turn ${e.type} to an expression`);return e}const $T=Symbol(),eE=Symbol();function tE(e,t,n){if(!e)return!1;let r=Ec[e.type];if(!r)return!1;n||={};let i=t(e,n);if(i!==void 0)switch(i){case $T:return!1;case eE:return!0}for(let i of r){let r=e[i];if(r){if(Array.isArray(r)){for(let e of r)if(tE(e,t,n))return!0}else if(tE(r,t,n))return!0}}return!1}tE.skip=$T,tE.stop=eE;const nE=[`tokens`,`start`,`end`,`loc`,`raw`,`rawValue`],rE=[...dc,`comments`,...nE];function iE(e,t={}){let n=t.preserveComments?nE:rE;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 aE(e,t){return tE(e,iE,t),e}function oE(e,t=e.key){let n;return e.kind===`method`?oE.increment()+``:(n=Bn(t)?t.name:Un(t)?JSON.stringify(t.value):JSON.stringify(aE(Fw(t))),e.computed&&(n=`[${n}]`),e.static&&(n=`static:${n}`),n)}oE.uid=0,oE.increment=function(){return oE.uid>=2**53-1?oE.uid=0:oE.uid++};function sE(e,t){if(os(e))return e;let n=!1,r;if(As(e))n=!0,r=`ClassDeclaration`;else if(hs(e))n=!0,r=`FunctionDeclaration`;else if(bn(e))return Fl(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 cE=Function.call.bind(Object.prototype.toString);function lE(e){return cE(e)===`[object RegExp]`}function uE(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 dE(e){if(e===void 0)return V(`undefined`);if(e===!0||e===!1)return Kl(e);if(e===null)return Gl();if(typeof e==`string`)return Ul(e);if(typeof e==`number`){let t;if(Number.isFinite(e))t=Wl(Math.abs(e));else{let n;n=Wl(Number.isNaN(e)?0:1),t=Sl(`/`,n,Wl(0))}return(e<0||Object.is(e,-0))&&(t=uu(`-`,t)),t}if(typeof e==`bigint`)return e<0?uu(`-`,Uu(-e)):Uu(e);if(lE(e)){let t=e.source,n=/\/([a-z]*)$/.exec(e.toString())[1];return ql(t,n)}if(Array.isArray(e))return bl(e.map(dE));if(uE(e)){let t=[];for(let n of Object.keys(e)){let r,i=!1;sc(n)?n===`__proto__`?(i=!0,r=Ul(n)):r=V(n):r=Ul(n),t.push(eu(r,dE(e[n]),i))}return Ql(t)}throw Error(`don't know how to turn this value into a node`)}function fE(e,t,n=!1){return e.object=Yl(e.object,e.property,e.computed),e.property=t,e.computed=!!n,e}function pE(e,t){if(!e||!t)return e;for(let n of Tc.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 Tc.force)e[n]=t[n];return Jw(e,t),e}function mE(e,t){if(Ir(e.object))throw Error("Cannot prepend node to super property access (`super.foo`).");return e.object=Yl(t,e.object),e}function hE(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 gE(e,t,n,r){let i=[].concat(e),a=Object.create(null);for(;i.length;){let e=i.shift();if(!e||r&&(bn(e)||ur(e)||dr(e)))continue;if(Bn(e)){t?(a[e.name]=a[e.name]||[]).push(e):a[e.name]=e;continue}if(Ms(e)&&!Sr(e)){vs(e.declaration)&&i.push(e.declaration);continue}if(n){if(Rn(e)){i.push(e.id);continue}if(zn(e)||br(e))continue}let o=gE.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}gE.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 _E(e,t){return gE(e,t,!0)}function vE(e){return Gn(e)?`null`:qn(e)?`/${e.pattern}/${e.flags}`:zr(e)?e.quasis.map(e=>e.value.raw).join(``):e.value===void 0?null:String(e.value)}function yE(e){if(!e.computed||Cs(e.key))return e.key}function bE(e,t){if(`id`in e&&e.id)return{name:e.id.name,originalNode:e.id};let n=``,r;if(er(t,{value:e})?r=yE(t):$n(e)||Nr(e)?(r=yE(e),e.kind===`get`?n=`get `:e.kind===`set`&&(n=`set `)):pr(t,{init:e})?r=t.id:bn(t,{operator:`=`,right:e})&&(r=t.left),!r)return null;let i=Cs(r)?vE(r):Bn(r)?r.name:Zr(r)?r.id.name:null;return i==null?null:{name:n+i,originalNode:r}}function xE(e,t,n){typeof t==`function`&&(t={enter:t});let{enter:r,exit:i}=t;SE(e,r,i,n,[])}function SE(e,t,n,r,i){let a=Ec[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}),SE(c,t,n,r,i),i.pop())}else a&&(i.push({node:e,key:o}),SE(a,t,n,r,i),i.pop())}n&&n(e,i,r)}}function CE(e,t,n){if(n&&e.type===`Identifier`&&t.type===`ObjectProperty`&&n.type===`ObjectExpression`)return!1;let r=gE.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 wE(e){return fr(e)&&e.kind!==`var`}function TE(e){return Rn(e)||xr(e)||wE(e)}function EE(e){return ac(e.type,`Immutable`)?!0:Bn(e)?e.name===`undefined`:!1}function DE(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(Oc[e.type]||e.type),r=Ec[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(!DE(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(!DE(n,a))return!1}}return!0}function OE(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 kE(e,t){return Tn(e)&&(hs(t)||On(t))?!1:ks(e)&&(hs(t)||On(t))?!0:rs(e)}function AE(e){return Or(e)||Bn(e.imported||e.exported,{name:`default`})}const jE=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 ME(e){return sc(e)&&!jE.has(e)}function NE(e){return fr(e)&&e.kind===`var`}const PE={isReactComponent:rc,isCompatTag:ic,buildChildren:Bv};var FE=e(r(((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]`,_=e=>l.call(e)==`[object Set]`,te={"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`},ne=/[\\\b\f\n\r\t]/,re=/[0-9]/,v=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,y=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,ie=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,ae=(e,t)=>{let n=()=>{le=ce,++t.indentLevel,ce=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 b=t.quotes==`double`?`"`:t.quotes==`backtick`?"`":`'`,oe=t.compact,se=t.lowercaseHex,ce=t.indent.repeat(t.indentLevel),le=``,ue=t.__inline1__,de=t.__inline2__,fe=oe?``:`
|
|
6
|
-
`,x,pe=!0,me=t.numbers==`binary`,he=t.numbers==`octal`,ge=t.numbers==`decimal`,_e=t.numbers==`hexadecimal`;if(l&&e&&g(e.toJSON)&&(e=e.toJSON()),!p(e)){if(ee(e))return e.size==0?`new Map()`:(oe||(t.__inline1__=!0,t.__inline2__=!1),`new Map(`+ae(Array.from(e),t)+`)`);if(_(e))return e.size==0?`new Set()`:`new Set(`+ae(Array.from(e),t)+`)`;if(d(e))return e.length==0?`Buffer.from([])`:`Buffer.from(`+ae(Array.from(e),t)+`)`;if(u(e))return x=[],t.wrap=!0,ue&&(t.__inline1__=!1,t.__inline2__=!0),de||n(),o(e,e=>{pe=!1,de&&(t.__inline2__=!1),x.push((oe||de?``:ce)+ae(e,t))}),pe?`[]`:de?`[`+x.join(`, `)+`]`:`[`+fe+x.join(`,`+fe)+fe+(oe?``:le)+`]`;if(m(e)||h(e)){if(l)return JSON.stringify(Number(e));let t;if(ge)t=String(e);else if(_e){let n=e.toString(16);se||(n=n.toUpperCase()),t=`0x`+n}else me?t=`0b`+e.toString(2):he&&(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 x=[],t.wrap=!0,n(),i(e,(e,n)=>{pe=!1,x.push((oe?``:ce)+ae(e,t)+`:`+(oe?``:` `)+ae(n,t))}),pe?`{}`:`{`+fe+x.join(`,`+fe)+fe+(oe?``:le)+`}`;else return l?JSON.stringify(e)||`null`:String(e)}let ve=t.escapeEverything?y:ie;return x=e.replace(ve,(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,se)+`}`:s(c(e,se))+s(c(r,se))}if(r)return s(c(r.charCodeAt(0),se));if(e==`\0`&&!l&&!re.test(o.charAt(a+1)))return`\\0`;if(i)return i==b||t.escapeEverything?`\\`+i:i;if(ne.test(e))return te[e];if(t.minimal&&!v.test(e))return e;let u=c(e.charCodeAt(0),se);return l||u.length>2?s(u):`\\x`+(`00`+u).slice(-2)}),b=="`"&&(x=x.replace(/\$\{/g,"\\${")),t.isScriptContext&&(x=x.replace(/<\/(script|style)/gi,`<\\/$1`).replace(/<!--/g,l?`\\u003C!--`:`\\x3C!--`)),t.wrap&&(x=b+x+b),x};ae.version=`3.0.2`,t.exports=ae}))(),1),IE=class{_map;_rawMappings;_sourceFileName;_lastGenLine=0;_lastSourceLine=0;_lastSourceColumn=0;_inputMap=null;constructor(e,t){let n=this._map=new kt({sourceRoot:e.sourceRoot});if(this._sourceFileName=e.sourceFileName?.replace(/\\/g,`/`),this._rawMappings=void 0,e.inputSourceMap){this._inputMap=new pt(e.inputSourceMap);let t=this._inputMap.resolvedSources;if(t.length)for(let e=0;e<t.length;e++)Mt(n,t[e],this._inputMap.sourcesContent?.[e])}if(typeof t==`string`&&!e.inputSourceMap)Mt(n,this._sourceFileName,t);else if(typeof t==`object`)for(let e of Object.keys(t))Mt(n,e.replace(/\\/g,`/`),t[e])}get(){return Pt(this._map)}getDecoded(){return Nt(this._map)}getRawMappings(){return this._rawMappings||=Ft(this._map)}mark(e,t,n,r,i,a){this._rawMappings=void 0;let o;if(t!=null)if(this._inputMap){if(o=gt(this._inputMap,{line:t,column:n}),!o.name&&i){let e=gt(this._inputMap,i);e.name&&(r=e.name)}}else o={name:null,source:a?.replace(/\\/g,`/`)||this._sourceFileName,line:t,column:n};jt(this._map,{name:r,generated:e,source:o?.source,original:o})}},LE=class{constructor(e,t){this._map=e,this._indentChar=t;for(let e=0;e<64;e++)this._fastIndentations.push(t.repeat(e));this._allocQueue()}_map=null;_buf=``;_str=``;_appendCount=0;_last=0;_queue=[];_queueCursor=0;_canMarkIdName=!0;_indentChar=``;_fastIndentations=[];_position={line:1,column:0};_sourcePosition={identifierName:void 0,identifierNamePos:void 0,line:void 0,column:void 0,filename:void 0};_allocQueue(){let e=this._queue;for(let t=0;t<16;t++)e.push({char:0,repeat:1,line:void 0,column:void 0,identifierName:void 0,identifierNamePos:void 0,filename:``})}_pushQueue(e,t,n,r,i){let a=this._queueCursor;a===this._queue.length&&this._allocQueue();let o=this._queue[a];o.char=e,o.repeat=t,o.line=n,o.column=r,o.filename=i,this._queueCursor++}_popQueue(){if(this._queueCursor===0)throw Error(`Cannot pop from empty queue`);return this._queue[--this._queueCursor]}get(){this._flush();let e=this._map,t={code:(this._buf+this._str).trimRight(),decodedMap:e?.getDecoded(),get __mergedMap(){return this.map},get map(){let n=e?e.get():null;return t.map=n,n},set map(e){Object.defineProperty(t,`map`,{value:e,writable:!0})},get rawMappings(){let n=e?.getRawMappings();return t.rawMappings=n,n},set rawMappings(e){Object.defineProperty(t,`rawMappings`,{value:e,writable:!0})}};return t}append(e,t){this._flush(),this._append(e,this._sourcePosition,t)}appendChar(e){this._flush(),this._appendChar(e,1,this._sourcePosition)}queue(e){if(e===10)for(;this._queueCursor!==0;){let e=this._queue[this._queueCursor-1].char;if(e!==32&&e!==9)break;this._queueCursor--}let t=this._sourcePosition;this._pushQueue(e,1,t.line,t.column,t.filename)}queueIndentation(e){e!==0&&this._pushQueue(-1,e,void 0,void 0,void 0)}_flush(){let e=this._queueCursor,t=this._queue;for(let n=0;n<e;n++){let e=t[n];this._appendChar(e.char,e.repeat,e)}this._queueCursor=0}_appendChar(e,t,n){if(this._last=e,e===-1){let e=this._fastIndentations[t];e===void 0?this._str+=t>1?this._indentChar.repeat(t):this._indentChar:this._str+=e}else this._str+=t>1?String.fromCharCode(e).repeat(t):String.fromCharCode(e);e===10?(this._position.line++,this._position.column=0):(this._mark(n.line,n.column,n.identifierName,n.identifierNamePos,n.filename),this._position.column+=t),this._canMarkIdName&&(n.identifierName=void 0,n.identifierNamePos=void 0)}_append(e,t,n){let r=e.length,i=this._position;if(this._last=e.charCodeAt(r-1),++this._appendCount>4096?(+this._str,this._buf+=this._str,this._str=e,this._appendCount=0):this._str+=e,!n&&!this._map){i.column+=r;return}let{column:a,identifierName:o,identifierNamePos:s,filename:c}=t,l=t.line;(o!=null||s!=null)&&this._canMarkIdName&&(t.identifierName=void 0,t.identifierNamePos=void 0);let u=e.indexOf(`
|
|
7
|
-
`),d=0;for(u!==0&&this._mark(l,a,o,s,c);u!==-1;)i.line++,i.column=0,d=u+1,d<r&&l!==void 0&&this._mark(++l,0,void 0,void 0,c),u=e.indexOf(`
|
|
8
|
-
`,d);i.column+=r-d}_mark(e,t,n,r,i){this._map?.mark(this._position,e,t,n,r,i)}removeTrailingNewline(){let e=this._queueCursor;e!==0&&this._queue[e-1].char===10&&this._queueCursor--}removeLastSemicolon(){let e=this._queueCursor;e!==0&&this._queue[e-1].char===59&&this._queueCursor--}getLastChar(){let e=this._queueCursor;return e===0?this._last:this._queue[e-1].char}getNewlineCount(){let e=this._queueCursor,t=0;if(e===0)return this._last===10?1:0;for(let n=e-1;n>=0&&this._queue[n].char===10;n--)t++;return t===e&&this._last===10?t+1:t}endsWithCharAndNewline(){let e=this._queue,t=this._queueCursor;if(t!==0)return e[t-1].char===10?t>1?e[t-2].char:this._last:void 0}hasContent(){return this._queueCursor!==0||!!this._last}exactSource(e,t){if(!this._map){t();return}this.source(`start`,e);let n=e.identifierName,r=this._sourcePosition;n&&(this._canMarkIdName=!1,r.identifierName=n),t(),n&&(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){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(){let e=this._queue,t=this._queueCursor,n=-1,r=0;for(let i=0;i<t;i++){let t=e[i];t.char===10&&(n=r),r+=t.repeat}return n===-1?this._position.column+r:r-1-n}getCurrentLine(){let e=0,t=this._queue;for(let n=0;n<this._queueCursor;n++)t[n].char===10&&e++;return this._position.line+e}};const{FLIPPED_ALIAS_KEYS:RE,isArrayExpression:zE,isAssignmentExpression:BE,isBinary:VE,isBlockStatement:HE,isCallExpression:UE,isFunction:WE,isIdentifier:GE,isLiteral:KE,isMemberExpression:qE,isObjectExpression:JE,isOptionalCallExpression:YE,isOptionalMemberExpression:XE,isStringLiteral:ZE}=gn;function QE(e,t){return e&&(qE(e)||XE(e)?(QE(e.object,t),e.computed&&QE(e.property,t)):VE(e)||BE(e)?(QE(e.left,t),QE(e.right,t)):UE(e)||YE(e)?(t.hasCall=!0,QE(e.callee,t)):WE(e)?t.hasFunction=!0:GE(e)&&(t.hasHelper=t.hasHelper||e.callee&&eD(e.callee))),t}function $E(e){return QE(e,{hasCall:!1,hasFunction:!1,hasHelper:!1})}function eD(e){return e?qE(e)?eD(e.object)||eD(e.property):GE(e)?e.name===`require`||e.name.charCodeAt(0)===95:UE(e)?eD(e.callee):VE(e)||BE(e)?GE(e.left)&&eD(e.left)||eD(e.right):!1:!1}function tD(e){return KE(e)||JE(e)||zE(e)||GE(e)||qE(e)}const nD={AssignmentExpression(e){let t=$E(e.right);return t.hasCall&&t.hasHelper||t.hasFunction?t.hasFunction?3:2:0},SwitchCase(e,t){return(e.consequent.length||t.cases[0]===e?1:0)|(!e.consequent.length&&t.cases[t.cases.length-1]===e?2:0)},LogicalExpression(e){return WE(e.left)||WE(e.right)?2:0},Literal(e){return ZE(e)&&e.value===`use strict`?2:0},CallExpression(e){return WE(e.callee)||eD(e)?3:0},OptionalCallExpression(e){return WE(e.callee)?3:0},VariableDeclaration(e){for(let t=0;t<e.declarations.length;t++){let n=e.declarations[t],r=eD(n.id)&&!tD(n.init);if(!r&&n.init){let e=$E(n.init);r=eD(n.init)&&e.hasCall||e.hasFunction}if(r)return 3}return 0},IfStatement(e){return HE(e.consequent)?3:0}};nD.ObjectProperty=nD.ObjectTypeProperty=nD.ObjectMethod=function(e,t){return t.properties[0]===e?1:0},nD.ObjectTypeCallProperty=function(e,t){return t.callProperties[0]===e&&!t.properties?.length?1:0},nD.ObjectTypeIndexer=function(e,t){return t.indexers[0]===e&&!t.properties?.length&&!t.callProperties?.length?1:0},nD.ObjectTypeInternalSlot=function(e,t){return t.internalSlots[0]===e&&!t.properties?.length&&!t.callProperties?.length&&!t.indexers?.length?1:0},[[`Function`,!0],[`Class`,!0],[`Loop`,!0],[`LabeledStatement`,!0],[`SwitchStatement`,!0],[`TryStatement`,!0]].forEach(function([e,t]){[e].concat(RE[e]||[]).forEach(function(e){let n=t?3:0;nD[e]=()=>n})});const{isArrayTypeAnnotation:rD,isBinaryExpression:iD,isCallExpression:aD,isForOfStatement:oD,isIndexedAccessType:sD,isMemberExpression:cD,isObjectPattern:lD,isOptionalMemberExpression:uD,isYieldExpression:dD,isStatement:fD}=gn,pD=new Map([[`||`,0],[`??`,0],[`|>`,0],[`&&`,1],[`|`,2],[`^`,3],[`&`,4],[`==`,5],[`===`,5],[`!=`,5],[`!==`,5],[`<`,6],[`>`,6],[`<=`,6],[`>=`,6],[`in`,6],[`instanceof`,6],[`>>`,7],[`<<`,7],[`>>>`,7],[`+`,8],[`-`,8],[`*`,9],[`/`,9],[`%`,9],[`**`,10]]);function mD(e,t){if(t===`BinaryExpression`||t===`LogicalExpression`)return pD.get(e.operator);if(t===`TSAsExpression`||t===`TSSatisfiesExpression`)return pD.get(`in`)}function hD(e){return e===`TSAsExpression`||e===`TSSatisfiesExpression`||e===`TSTypeAssertion`}const gD=(e,t)=>{let n=t.type;return(n===`ClassDeclaration`||n===`ClassExpression`)&&t.superClass===e},_D=(e,t)=>{let n=t.type;return(n===`MemberExpression`||n===`OptionalMemberExpression`)&&t.object===e||(n===`CallExpression`||n===`OptionalCallExpression`||n===`NewExpression`)&&t.callee===e||n===`TaggedTemplateExpression`&&t.tag===e||n===`TSNonNullExpression`};function vD(e,t){return rD(t)}function yD(e,t,n){let r=t.type;return r===`UnionTypeAnnotation`||r===`IntersectionTypeAnnotation`||r===`ArrayTypeAnnotation`||!!(n&W.arrowFlowReturnType)}function bD(e,t){return _D(e,t)||gD(e,t)}function xD(e){return!!(e&(W.expressionStatement|W.arrowBody))}function SD(e,t,n){return xD(n)}function CD(e,t,n){return!e.async&&!!(n&W.expressionStatement)}function wD(e,t){let n=t.type;if(e.type===`BinaryExpression`&&e.operator===`**`&&n===`BinaryExpression`&&t.operator===`**`)return t.left===e;if(gD(e,t)||_D(e,t)||n===`UnaryExpression`||n===`SpreadElement`||n===`AwaitExpression`)return!0;let r=mD(t,n);if(r!=null){let i=mD(e,e.type);if(r===i&&n===`BinaryExpression`&&t.right===e||r>i)return!0}}function TD(e,t){let n=t.type;return n===`ArrayTypeAnnotation`||n===`NullableTypeAnnotation`||n===`IntersectionTypeAnnotation`||n===`UnionTypeAnnotation`}function ED(e,t){return sD(t)&&t.objectType===e}function DD(e,t){return(t.type===`AssignmentExpression`||t.type===`AssignmentPattern`)&&t.left===e||t.type===`BinaryExpression`&&(t.operator===`|`||t.operator===`&`)&&e===t.left?!0:wD(e,t)}function OD(e,t){let n=t.type;return n===`TSArrayType`||n===`TSIndexedAccessType`&&t.objectType===e||n===`TSOptionalType`||n===`TSTypeOperator`||n===`TSTypeParameter`||(n===`TSIntersectionType`||n===`TSUnionType`)&&t.types[0]===e||n===`TSConditionalType`&&(t.checkType===e||t.extendsType===e)}function kD(e,t){let n=t.type;return n===`TSIntersectionType`||n===`TSTypeOperator`||n===`TSArrayType`||n===`TSIndexedAccessType`&&t.objectType===e||n===`TSOptionalType`}function AD(e,t){let n=t.type;return n===`TSTypeOperator`||n===`TSArrayType`||n===`TSIndexedAccessType`&&t.objectType===e||n===`TSOptionalType`}function jD(e,t){let n=t.type;return!!(n===`TSArrayType`||n===`TSIndexedAccessType`&&t.objectType===e||n===`TSOptionalType`||e.typeParameter.constraint&&(n===`TSIntersectionType`||n===`TSUnionType`)&&t.types[0]===e)}function MD(e,t){let n=t.type;return n===`TSArrayType`||n===`TSIndexedAccessType`&&t.objectType===e||n===`TSOptionalType`}function ND(e,t){let n=t.type;return(n===`CallExpression`||n===`OptionalCallExpression`||n===`NewExpression`||n===`TSInstantiationExpression`)&&!!t.typeArguments}function PD(e,t){let n=t.type;return n===`TSIntersectionType`||n===`TSUnionType`||n===`TSTypeOperator`||n===`TSOptionalType`||n===`TSArrayType`||n===`TSIndexedAccessType`&&t.objectType===e||n===`TSConditionalType`&&(t.checkType===e||t.extendsType===e)}function FD(e,t,n){return e.operator===`in`&&!!(n&W.forInOrInitHeadAccumulate)}function ID(e,t){let n=t.type;return n===`SequenceExpression`||n===`ParenthesizedExpression`||n===`MemberExpression`&&t.property===e||n===`OptionalMemberExpression`&&t.property===e||n===`TemplateLiteral`?!1:n===`ClassDeclaration`?!0:n===`ForOfStatement`?t.right===e:n===`ExportDefaultDeclaration`?!0:!fD(t)}function LD(e,t){let n=t.type;return n===`BinaryExpression`||n===`LogicalExpression`||n===`UnaryExpression`||n===`SpreadElement`||_D(e,t)||n===`AwaitExpression`&&dD(e)||n===`ConditionalExpression`&&e===t.test||gD(e,t)||hD(n)}function RD(e,t,n){return!!(n&(W.expressionStatement|W.exportDefault))}function zD(e,t){return _D(e,t)||iD(t)&&t.operator===`**`&&t.left===e||gD(e,t)}function BD(e,t,n){return!!(n&(W.expressionStatement|W.exportDefault))}function VD(e,t){let n=t.type;return n===`UnaryExpression`||n===`SpreadElement`||n===`BinaryExpression`||n===`LogicalExpression`||n===`ConditionalExpression`&&t.test===e||n===`AwaitExpression`||hD(n)?!0:zD(e,t)}function HD(e,t){return aD(t)&&t.callee===e||cD(t)&&t.object===e}function UD(e,t,n){return xD(n)&&lD(e.left)?!0:VD(e,t)}function WD(e,t){let n=t.type;if(hD(n))return!0;if(n!==`LogicalExpression`)return!1;switch(e.operator){case`||`:return t.operator===`??`||t.operator===`&&`;case`&&`:return t.operator===`??`;case`??`:return t.operator!==`??`}}function GD(e,t,n,r){let i=t.type;if(e.extra?.parenthesized&&i===`AssignmentExpression`&&t.left===e){let e=t.right.type;if((e===`FunctionExpression`||e===`ClassExpression`)&&t.right.id==null)return!0}return r&&r(e)!==e.name?!1:e.name===`let`?(cD(t,{object:e,computed:!0})||uD(t,{object:e,computed:!0,optional:!1}))&&n&(W.expressionStatement|W.forInitHead|W.forInHead)?!0:!!(n&W.forOfHead):e.name===`async`&&oD(t,{left:e,await:!1})}var KD=Object.freeze({__proto__:null,ArrowFunctionExpression:VD,AssignmentExpression:UD,AwaitExpression:LD,Binary:wD,BinaryExpression:FD,ClassExpression:RD,ConditionalExpression:VD,DoExpression:CD,FunctionExpression:BD,FunctionTypeAnnotation:yD,Identifier:GD,IntersectionTypeAnnotation:TD,LogicalExpression:WD,NullableTypeAnnotation:vD,ObjectExpression:SD,OptionalCallExpression:HD,OptionalIndexedAccessType:ED,OptionalMemberExpression:HD,SequenceExpression:ID,TSAsExpression:DD,TSConditionalType:OD,TSConstructorType:PD,TSFunctionType:PD,TSInferType:jD,TSInstantiationExpression:ND,TSIntersectionType:AD,TSSatisfiesExpression:DD,TSTypeAssertion:zD,TSTypeOperator:MD,TSUnionType:kD,UnaryLike:zD,UnionTypeAnnotation:TD,UpdateExpression:bD,YieldExpression:LD});const{FLIPPED_ALIAS_KEYS:qD,VISITOR_KEYS:JD,isCallExpression:YD,isDecorator:XD,isExpressionStatement:ZD,isMemberExpression:QD,isNewExpression:$D,isParenthesizedExpression:eO}=gn,W={normal:0,expressionStatement:1,arrowBody:2,exportDefault:4,arrowFlowReturnType:8,forInitHead:16,forInHead:32,forOfHead:64,forInOrInitHeadAccumulate:128,forInOrInitHeadAccumulatePassThroughMask:128};function tO(e){let t=new Map;function n(e,n){let r=t.get(e);t.set(e,r?function(e,t,i,a){return r(e,t,i,a)??n(e,t,i,a)}:n)}for(let t of Object.keys(e)){let r=qD[t];if(r)for(let i of r)n(i,e[t]);else n(t,e[t])}return t}const nO=tO(KD),rO=tO(nD);function iO(e){return YD(e)?!0:QD(e)&&iO(e.object)}function aO(e,t,n){if(!e)return!1;ZD(e)&&(e=e.expression);let r=rO.get(e.type)?.(e,t);return typeof r==`number`?(r&n)!==0:!1}function oO(e,t){return aO(e,t,1)}function sO(e,t){return aO(e,t,2)}function cO(e,t,n,r){return t?$D(t)&&t.callee===e&&iO(e)?!0:XD(t)?!lO(e)&&!(YD(e)&&lO(e.callee))&&!eO(e):nO.get(e.type)?.(e,t,n,r)||!1:!1}function lO(e){switch(e.type){case`Identifier`:return!0;case`MemberExpression`:return!e.computed&&e.property.type===`Identifier`&&lO(e.object);default:return!1}}function uO(e,t){let n=JD[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}var dO=Object.freeze({__proto__:null,TokenContext:W,isLastChild:uO,needsParens:cO,needsWhitespace:aO,needsWhitespaceAfter:sO,needsWhitespaceBefore:oO});const{traverseFast:fO,VISITOR_KEYS:pO}=gn;var mO=class{_tokens;_source;_nodesToTokenIndexes=new Map;_nodesOccurrencesCountCache=new Map;_tokensCache=new Map;constructor(e,t,n){this._tokens=t,this._source=n,fO(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){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=hO(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*hO(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=pO[e.type];for(let n of t){let t=e[n];t&&(Array.isArray(t)?yield*t:yield t)}}function gO(e){this.print(e.tag),this.print(e.typeArguments),this.print(e.quasi)}function _O(){throw Error(`TemplateElement printing is handled in TemplateLiteral`)}function vO(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 yO(e){this._printTemplate(e,e.expressions)}const{isCallExpression:bO,isLiteral:xO,isMemberExpression:SO,isNewExpression:CO,isPattern:wO}=gn;function TO(e){let{operator:t}=e;t===`void`||t===`delete`||t===`typeof`||t===`throw`?(this.word(t),this.space()):this.token(t),this.print(e.argument)}function EO(e){e.async&&(this.word(`async`,!0),this.space()),this.word(`do`),this.space(),this.print(e.body)}function DO(e){this.tokenChar(40);let t=this.enterDelimited();this.print(e.expression),t(),this.rightParens(e)}function OO(e){e.prefix?(this.token(e.operator),this.print(e.argument)):(this.print(e.argument,!0),this.token(e.operator))}function kO(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 AO(e,t){if(this.word(`new`),this.space(),this.print(e.callee),this.format.minified&&e.arguments.length===0&&!bO(t,{callee:e})&&!SO(t)&&!CO(t)||(this.print(e.typeArguments),e.arguments.length===0&&this.tokenMap&&!this.tokenMap.endMatches(e,`)`)))return;this.tokenChar(40);let n=this.enterDelimited();this.printList(e.arguments,this.shouldPrintTrailingComma(`)`)),n(),this.rightParens(e)}function jO(e){this.printList(e.expressions)}function MO(){this.word(`this`)}function NO(){this.word(`super`)}function PO(e){return typeof e.start==`number`&&e.start===e.declaration.start}function FO(e){this.tokenChar(64),this.print(e.expression),this.newline()}function IO(e){let{computed:t}=e,{optional:n,property:r}=e;if(this.print(e.object),!t&&SO(r))throw TypeError(`Got a MemberExpression for MemberExpression property`);xO(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 LO(e){this.print(e.callee),e.optional&&this.token(`?.`),this.print(e.typeArguments),this.tokenChar(40);let t=this.enterDelimited();this.printList(e.arguments),t(),this.rightParens(e)}function RO(e){this.print(e.callee),this.print(e.typeArguments),this.tokenChar(40);let t=this.enterDelimited();this.printList(e.arguments,this.shouldPrintTrailingComma(`)`)),t(),this.rightParens(e)}function zO(){this.word(`import`)}function BO(e){this.word(`await`),this.space(),this.print(e.argument)}function VO(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 HO(){this.semicolon(!0)}function UO(e){this.tokenContext|=W.expressionStatement,this.print(e.expression),this.semicolon()}function WO(e){this.print(e.left),(e.left.type===`Identifier`||wO(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 GO(e){this.print(e.left),this.space(),e.operator===`in`||e.operator===`instanceof`?this.word(e.operator):(this.token(e.operator),this._endsWithDiv=e.operator===`/`),this.space(),this.print(e.right)}function KO(e){this.print(e.object),this.token(`::`),this.print(e.callee)}function qO(e){if(this.print(e.object),!e.computed&&SO(e.property))throw TypeError(`Got a MemberExpression for MemberExpression property`);let t=e.computed;if(xO(e.property)&&typeof e.property.value==`number`&&(t=!0),t){let t=this.enterDelimited();this.tokenChar(91),this.print(e.property),this.tokenChar(93),t()}else this.tokenChar(46),this.print(e.property)}function JO(e){this.print(e.meta),this.tokenChar(46),this.print(e.property)}function YO(e){this.tokenChar(35),this.print(e.id)}function XO(e){this.tokenChar(37),this.word(e.name)}function ZO(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:QO,isForStatement:$O,isIfStatement:ek,isStatement:tk,isVoidPattern:nk}=gn;function rk(e){this.word(`with`),this.space(),this.tokenChar(40),this.print(e.object),this.tokenChar(41),this.printBlock(e)}function ik(e){this.word(`if`),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.space();let t=e.alternate&&ek(ak(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 ak(e){let{body:t}=e;return tk(t)===!1?e:ak(t)}function ok(e){this.word(`for`),this.space(),this.tokenChar(40);{let t=this.enterForStatementInit();this.print(e.init),t()}this.tokenChar(59),e.test&&(this.space(),this.print(e.test)),this.token(`;`,!1,1),e.update&&(this.space(),this.print(e.update)),this.tokenChar(41),this.printBlock(e)}function sk(e){this.word(`while`),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.printBlock(e)}function ck(e){this.word(`for`),this.space();let t=e.type===`ForOfStatement`;t&&e.await&&(this.word(`await`),this.space()),this.noIndentInnerCommentsHere(),this.tokenChar(40);{let n=this.enterForXStatementInit(t);this.print(e.left),n?.()}this.space(),this.word(t?`of`:`in`),this.space(),this.print(e.right),this.tokenChar(41),this.printBlock(e)}const lk=ck,uk=ck;function dk(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 fk(e,t){t&&(e.space(),e.printTerminatorless(t)),e.semicolon()}function pk(e){this.word(`break`),fk(this,e.label)}function mk(e){this.word(`continue`),fk(this,e.label)}function hk(e){this.word(`return`),fk(this,e.argument)}function gk(e){this.word(`throw`),fk(this,e.argument)}function _k(e){this.print(e.label),this.tokenChar(58),this.space(),this.print(e.body)}function vk(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 yk(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 bk(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 xk(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 Sk(){this.word(`debugger`),this.semicolon()}function Ck(e,t){e.declare&&(this.word(`declare`),this.space());let{kind:n}=e;n===`await using`?(this.word(`await`),this.space(),this.word(`using`,!0)):this.word(n,n===`using`),this.space();let r=!1;if(!QO(t))for(let t of e.declarations)t.init&&(r=!0);if(this.printList(e.declarations,void 0,void 0,e.declarations.length>1,r?function(e){this.token(`,`,!1,e),this.newline()}:void 0),QO(t)){if($O(t)){if(t.init===e)return}else if(t.left===e)return}this.semicolon()}function wk(e){this.print(e.id),e.definite&&this.tokenChar(33),nk(e.id)||this.print(e.id.typeAnnotation),e.init&&(this.space(),this.tokenChar(61),this.space(),this.print(e.init))}const{isExportDefaultDeclaration:Tk,isExportNamedDeclaration:Ek}=gn;function Dk(e,t){(!(Tk(t)||Ek(t))||!this._shouldPrintDecoratorsBeforeExport(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 Ok(e){if(this.tokenChar(123),e.body.length===0)this.tokenChar(125);else{this.newline();let t=kk(this,e);t?.(-1);let n=this.enterDelimited();this.printJoin(e.body,!0,!0,t,!0),n(),this.endsWith(10)||this.newline(),this.rightBrace(e)}}function kk(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.token(`;`,void 0,i++),r++}}function Ak(e){if(this.printJoin(e.decorators),!e.static&&!this.format.preserveFormat){let t=e.key.loc?.end?.line;t&&this.catchUp(t)}this.tsPrintClassMemberModifiers(e),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(this._variance(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 jk(e){this.printJoin(e.decorators);let t=e.key.loc?.end?.line;t&&this.catchUp(t),this.tsPrintClassMemberModifiers(e),this.word(`accessor`,!0),this.space(),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(this._variance(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 Mk(e){this.printJoin(e.decorators),this.tsPrintClassMemberModifiers(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 Nk(e){this._classMethodHead(e),this.space(),this.print(e.body)}function Pk(e){this._classMethodHead(e),this.space(),this.print(e.body)}function Fk(e){if(this.printJoin(e.decorators),!this.format.preserveFormat){let t=e.key.loc?.end?.line;t&&this.catchUp(t)}this.tsPrintClassMemberModifiers(e),this._methodHead(e)}function Ik(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))}const{isIdentifier:Lk}=gn;function Rk(e,t,n){this.print(e.typeParameters);let r=qk.call(this,t,n);r&&this.sourceIdentifierName(r.name,r.pos),this.tokenChar(40),this._parameters(e.params,`)`);let i=e.type===`ArrowFunctionExpression`;this.print(e.returnType,i),this._noLineTerminator=i}function zk(e,t){let n=this.enterDelimited(),r=this.shouldPrintTrailingComma(t),i=e.length;for(let t=0;t<i;t++)this._param(e[t]),(r||t<i-1)&&(this.token(`,`,void 0,t),this.space());this.token(t),n()}function Bk(e){this.printJoin(e.decorators),this.print(e),e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)}function Vk(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._params(e,e.computed&&e.key.type!==`StringLiteral`?void 0:e.key)}function Hk(e,t){e.predicate&&(e.returnType||this.tokenChar(58),this.space(),this.print(e.predicate,t))}function Uk(e,t){e.async&&(this.word(`async`),this.format.preserveFormat||(this._endsWithInnerRaw=!1),this.space()),this.word(`function`),e.generator&&(this.format.preserveFormat||(this._endsWithInnerRaw=!1),this.tokenChar(42)),this.space(),e.id&&this.print(e.id),this._params(e,e.id,t),e.type!==`TSDeclareFunction`&&this._predicate(e)}function Wk(e,t){this._functionHead(e,t),this.space(),this.print(e.body)}function Gk(e,t){e.async&&(this.word(`async`,!0),this.space()),this._shouldPrintArrowParamsParens(e)?this._params(e,void 0,t):this.print(e.params[0],!0),this._predicate(e,!0),this.space(),this.printInnerComments(),this.token(`=>`),this.space(),this.tokenContext|=W.arrowBody,this.print(e.body)}function Kk(e){if(e.params.length!==1||e.typeParameters||e.returnType||e.predicate)return!0;let t=e.params[0];if(!Lk(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 qk(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}const{isClassDeclaration:Jk,isExportDefaultSpecifier:Yk,isExportNamespaceSpecifier:Xk,isImportDefaultSpecifier:Zk,isImportNamespaceSpecifier:Qk,isStatement:$k}=gn;function eA(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 tA(e){this.print(e.local)}function nA(e){this.print(e.exported)}function rA(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 iA(e){this.tokenChar(42),this.space(),this.word(`as`),this.space(),this.print(e.exported)}function aA(e,t){let{attributes:n}=e;this.word(`with`),this.space();let r=t?1:0;this.token(`{`,void 0,r),this.space(),this.printList(n,this.shouldPrintTrailingComma(`}`)),this.space(),this.token(`}`,void 0,r)}function oA(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(),this._printAttributes(e,!1)):this.print(e.source),this.semicolon()}function sA(e,t){Jk(t.declaration)&&e._shouldPrintDecoratorsBeforeExport(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),$k(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(Yk(e)||Xk(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(),this._printAttributes(e,r)):this.print(e.source)),this.semicolon()}}function lA(e){sA(this,e),this.word(`export`),this.noIndentInnerCommentsHere(),this.space(),this.word(`default`),this.space(),this.tokenContext|=W.exportDefault;let t=e.declaration;this.print(t),$k(t)||this.semicolon()}function uA(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(Zk(e)||Qk(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(),this._printAttributes(e,i)):this.print(e.source),this.semicolon()}function dA(e){this.print(e.key),this.tokenChar(58),this.space(),this.print(e.value)}function fA(e){this.tokenChar(42),this.space(),this.word(`as`),this.space(),this.print(e.local)}function pA(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:mA,isIdentifier:hA}=gn;let gA=null,_A=``;function vA(e){if(e===gA)return _A;gA=e;let{name:t}=e,n=this.tokenMap.find(e,e=>e.value===t);return n?(_A=this._originalCode.slice(n.start,n.end),_A):_A=e.name}function yA(e){this.sourceIdentifierName(e.loc?.identifierName||e.name),this.word(this.tokenMap?this._getRawIdentifier(e):e.name)}function bA(){this.tokenChar(63)}function xA(e){this.token(`...`),this.print(e.argument)}function SA(e){let t=e.properties;if(this.tokenChar(123),t.length){let e=this.enterDelimited();this.space(),this.printList(t,this.shouldPrintTrailingComma(`}`),!0,!0),this.space(),e()}this.sourceWithOffset(`end`,e.loc,-1),this.tokenChar(125)}function CA(e){this.printJoin(e.decorators),this._methodHead(e),this.space(),this.print(e.body)}function wA(e){if(this.printJoin(e.decorators),e.computed)this.tokenChar(91),this.print(e.key),this.tokenChar(93);else{if(mA(e.value)&&hA(e.key)&&e.key.name===e.value.left.name){this.print(e.value);return}if(this.print(e.key),e.shorthand&&hA(e.key)&&hA(e.value)&&e.key.name===e.value.name)return}this.tokenChar(58),this.space(),this.print(e.value)}function TA(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),(e<n-1||this.shouldPrintTrailingComma(`]`))&&this.token(`,`,!1,e)):this.token(`,`,!1,e)}r(),this.tokenChar(93)}function EA(e){this.word(`/${e.pattern}/${e.flags}`)}function DA(e){this.word(e.value?`true`:`false`)}function OA(){this.word(`null`)}function kA(e){let t=this.getPossibleRaw(e),n=this.format.jsescOption,r=e.value,i=r+``;n.numbers?this.number((0,FE.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 AA(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.token(t);return}let n=(0,FE.default)(e.value,this.format.jsescOption);this.token(n)}function jA(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.word(t);return}this.word(e.value+`n`)}const MA=new Set([`^^`,`@@`,`^`,`%`,`#`]);function NA(){let{topicToken:e}=this.format;if(MA.has(e))this.token(e);else{let t=JSON.stringify(e),n=Array.from(MA,e=>JSON.stringify(e));throw Error(`The "topicToken" generator option must be one of ${n.join(`, `)} (${t} received instead).`)}}function PA(e){this.print(e.expression)}function FA(e){this.print(e.callee)}function IA(){this.tokenChar(35)}function LA(){this.word(`void`)}const{isDeclareExportDeclaration:RA,isStatement:zA}=gn;function BA(){this.word(`any`)}function VA(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)}function HA(){this.word(`boolean`)}function UA(e){this.word(e.value?`true`:`false`)}function WA(){this.word(`null`)}function GA(e,t){RA(t)||(this.word(`declare`),this.space()),this.word(`class`),this.space(),this._interfaceish(e)}function KA(e,t){RA(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 qA(){this.tokenChar(37),this.word(`checks`)}function JA(e){this.tokenChar(37),this.word(`checks`),this.tokenChar(40),this.print(e.value),this.tokenChar(41)}function YA(e){this.word(`declare`),this.space(),this.InterfaceDeclaration(e)}function XA(e){this.word(`declare`),this.space(),this.word(`module`),this.space(),this.print(e.id),this.space(),this.print(e.body)}function ZA(e){this.word(`declare`),this.space(),this.word(`module`),this.tokenChar(46),this.word(`exports`),this.print(e.typeAnnotation)}function QA(e){this.word(`declare`),this.space(),this.TypeAlias(e)}function $A(e,t){RA(t)||(this.word(`declare`),this.space()),this.OpaqueType(e)}function ej(e,t){RA(t)||(this.word(`declare`),this.space()),this.word(`var`),this.space(),this.print(e.id),this.print(e.id.typeAnnotation),this.semicolon()}function tj(e){this.word(`declare`),this.space(),this.word(`export`),this.space(),e.default&&(this.word(`default`),this.space()),hj.call(this,e)}function nj(e){this.word(`declare`),this.space(),oA.call(this,e)}function rj(e){let{id:t,body:n}=e;this.word(`enum`),this.space(),this.print(t),this.print(n)}function ij(e,t,n){n&&(e.space(),e.word(`of`),e.space(),e.word(t)),e.space()}function aj(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 oj(e){let{explicitType:t}=e;ij(this,`boolean`,t),aj(this,e)}function sj(e){let{explicitType:t}=e;ij(this,`number`,t),aj(this,e)}function cj(e){let{explicitType:t}=e;ij(this,`string`,t),aj(this,e)}function lj(e){ij(this,`symbol`,!0),aj(this,e)}function uj(e){let{id:t}=e;this.print(t),this.tokenChar(44)}function dj(e,t){e.print(t.id),e.space(),e.token(`=`),e.space(),e.print(t.init),e.token(`,`)}function fj(e){dj(this,e)}function pj(e){dj(this,e)}function mj(e){dj(this,e)}function hj(e){if(e.declaration){let t=e.declaration;this.print(t),zA(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 gj(){this.tokenChar(42)}function _j(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 vj(e){this.print(e.name),e.optional&&this.tokenChar(63),e.name&&(this.tokenChar(58),this.space()),this.print(e.typeAnnotation)}function yj(e){this.print(e.id),this.print(e.typeParameters,!0)}function bj(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 xj(e){let t=e.variance?.kind;t!=null&&(t===`plus`?this.tokenChar(43):t===`minus`&&this.tokenChar(45))}function Sj(e){this.word(`interface`),this.space(),this._interfaceish(e)}function Cj(e){this.space(),this.token(`&`,!1,e),this.space()}function wj(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 Tj(e){this.printJoin(e.types,void 0,void 0,Cj)}function Ej(){this.word(`mixed`)}function Dj(){this.word(`empty`)}function Oj(e){this.tokenChar(63),this.print(e.typeAnnotation)}function kj(){this.word(`number`)}function Aj(){this.word(`string`)}function jj(){this.word(`this`)}function Mj(e){this.tokenChar(91),this.printList(e.types),this.tokenChar(93)}function Nj(e){this.word(`typeof`),this.space(),this.print(e.argument)}function Pj(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 Fj(e,t){this.tokenChar(58),this.space(),t.type===`ArrowFunctionExpression`?this.tokenContext|=W.arrowFlowReturnType:e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)}function Ij(e){this.tokenChar(60),this.printList(e.params),this.tokenChar(62)}function Lj(e){this._variance(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 Rj(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 zj(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,void 0,void 0,()=>{(t.length!==1||e.inexact)&&(this.tokenChar(44),this.space())}),this.space()),e.inexact&&(this.indent(),this.token(`...`),t.length&&this.newline(),this.dedent()),e.exact?this.token(`|}`):this.tokenChar(125)}function Bj(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 Vj(e){e.static&&(this.word(`static`),this.space()),this.print(e.value)}function Hj(e){e.static&&(this.word(`static`),this.space()),this._variance(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 Uj(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()),this._variance(e),this.print(e.key),e.optional&&this.tokenChar(63),e.method||(this.tokenChar(58),this.space()),this.print(e.value)}function Wj(e){this.token(`...`),this.print(e.argument)}function Gj(e){this.print(e.qualification),this.tokenChar(46),this.print(e.id)}function Kj(){this.word(`symbol`)}function qj(e){this.space(),this.token(`|`,!1,e),this.space()}function Jj(e){this.printJoin(e.types,void 0,void 0,qj)}function Yj(e){this.tokenChar(40),this.print(e.expression),this.print(e.typeAnnotation),this.tokenChar(41)}function Xj(e){e.kind===`plus`?this.tokenChar(43):this.tokenChar(45)}function Zj(){this.word(`void`)}function Qj(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)}function $j(e){this.print(e.objectType),e.optional&&this.token(`?.`),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)}function eM(e){e.program&&this.print(e.program.interpreter),this.print(e.program)}function tM(e){this.noIndentInnerCommentsHere(),this.printInnerComments();let t=e.directives?.length;if(t){let n=e.body.length?2:1;this.printSequence(e.directives,void 0,n),e.directives[t-1].trailingComments?.length||this.newline(n)}this.printSequence(e.body)}function nM(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,t),e.directives[n-1].trailingComments?.length||this.newline(t)}this.printSequence(e.body,!0),t(),this.rightBrace(e)}function rM(e){this.print(e.value),this.semicolon()}const iM=/(?:^|[^\\])(?:\\\\)*'/,aM=/(?:^|[^\\])(?:\\\\)*"/;function oM(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.token(t);return}let{value:n}=e;if(!aM.test(n))this.token(`"${n}"`);else if(!iM.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 sM(e){this.token(`#!${e.value}`),this.newline(1,!0)}function cM(e){this.token(`%%`),this.print(e.name),this.token(`%%`),e.expectedNode===`Statement`&&this.semicolon()}function lM(e){this.print(e.name),e.value&&(this.tokenChar(61),this.print(e.value))}function uM(e){this.word(e.name)}function dM(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 pM(e){this.tokenChar(123),this.token(`...`),this.print(e.argument),this.rightBrace(e)}function mM(e){this.tokenChar(123),this.print(e.expression),this.rightBrace(e)}function hM(e){this.tokenChar(123),this.token(`...`),this.print(e.expression),this.rightBrace(e)}function gM(e){let t=this.getPossibleRaw(e);t===void 0?this.token(e.value,!0):this.token(t,!0)}function _M(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 yM(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 bM(e){this.tokenChar(60),this.tokenChar(47),this.print(e.name),this.tokenChar(62)}function xM(){this.printInnerComments()}function SM(e){this.print(e.openingFragment),this.indent();for(let t of e.children)this.print(t);this.dedent(),this.print(e.closingFragment)}function CM(){this.tokenChar(60),this.tokenChar(62)}function wM(){this.token(`</`),this.tokenChar(62)}function TM(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 EM(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 DM(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 OM(e){e.accessibility&&(this.word(e.accessibility),this.space()),e.readonly&&(this.word(`readonly`),this.space()),this._param(e.parameter)}function kM(e,t){e.declare&&(this.word(`declare`),this.space()),this._functionHead(e,t),this.semicolon()}function AM(e){this._classMethodHead(e),this.semicolon()}function jM(e){this.print(e.left),this.tokenChar(46),this.print(e.right)}function MM(e){this.tsPrintSignatureDeclarationBase(e),NM(this,e)}function NM(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 PM(e){this.word(`new`),this.space(),this.tsPrintSignatureDeclarationBase(e),NM(this,e)}function FM(e){let{readonly:t}=e;t&&(this.word(`readonly`),this.space()),this.tsPrintPropertyOrMethodName(e),this.print(e.typeAnnotation),NM(this,e)}function IM(e){e.computed&&this.tokenChar(91),this.print(e.key),e.computed&&this.tokenChar(93),e.optional&&this.tokenChar(63)}function LM(e){let{kind:t}=e;(t===`set`||t===`get`)&&(this.word(t),this.space()),this.tsPrintPropertyOrMethodName(e),this.tsPrintSignatureDeclarationBase(e),NM(this,e)}function RM(e){let{readonly:t,static:n}=e;n&&(this.word(`static`),this.space()),t&&(this.word(`readonly`),this.space()),this.tokenChar(91),this._parameters(e.parameters,`]`),this.print(e.typeAnnotation),NM(this,e)}function zM(){this.word(`any`)}function BM(){this.word(`bigint`)}function VM(){this.word(`unknown`)}function HM(){this.word(`number`)}function UM(){this.word(`object`)}function WM(){this.word(`boolean`)}function GM(){this.word(`string`)}function KM(){this.word(`symbol`)}function qM(){this.word(`void`)}function JM(){this.word(`undefined`)}function YM(){this.word(`null`)}function XM(){this.word(`never`)}function ZM(){this.word(`intrinsic`)}function QM(){this.word(`this`)}function $M(e){this.tsPrintFunctionOrConstructorType(e)}function eN(e){e.abstract&&(this.word(`abstract`),this.space()),this.word(`new`),this.space(),this.tsPrintFunctionOrConstructorType(e)}function tN(e){let{typeParameters:t}=e,n=e.params;this.print(t),this.tokenChar(40),this._parameters(n,`)`),this.space();let r=e.returnType;this.print(r)}function nN(e){let t=e.typeArguments;this.print(e.typeName,!!t),this.print(t)}function rN(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 iN(e){this.word(`typeof`),this.space(),this.print(e.exprName);let t=e.typeArguments;t&&this.print(t)}function aN(e){UN(this,e,()=>this.printJoin(e.members,!0,!0))}function oN(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)}function sN(e){this.tokenChar(91),this.printList(e.elementTypes,this.shouldPrintTrailingComma(`]`)),this.tokenChar(93)}function cN(e){this.print(e.typeAnnotation),this.tokenChar(63)}function lN(e){this.token(`...`),this.print(e.typeAnnotation)}function uN(e){this.print(e.label),e.optional&&this.tokenChar(63),this.tokenChar(58),this.space(),this.print(e.elementType)}function dN(e){pN(this,e,`|`)}function fN(e){pN(this,e,`&`)}function pN(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 mN(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 hN(e){this.word(`infer`),this.print(e.typeParameter)}function gN(e){this.tokenChar(40),this.print(e.typeAnnotation),this.tokenChar(41)}function _N(e){this.word(e.operator),this.space(),this.print(e.typeAnnotation)}function vN(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)}function yN(e){let{nameType:t,optional:n,readonly:r,typeAnnotation:i}=e;this.tokenChar(123);let a=this.enterDelimited();this.space(),r&&(bN(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)),this.tokenChar(93),n&&(bN(this,n),this.tokenChar(63)),i&&(this.tokenChar(58),this.space(),this.print(i)),this.space(),a(),this.tokenChar(125)}function bN(e,t){t!==!0&&e.token(t)}function xN(e){this._printTemplate(e,e.types)}function SN(e){this.print(e.literal)}function CN(e){this.print(e.expression),this.print(e.typeArguments)}function wN(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 TN(e){UN(this,e,()=>this.printJoin(e.body,!0,!0))}function EN(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 DN(e){let{type:t,expression:n,typeAnnotation:r}=e;this.print(n,!0),this.space(),this.word(t===`TSAsExpression`?`as`:`satisfies`),this.space(),this.print(r)}function ON(e){let{typeAnnotation:t,expression:n}=e;this.tokenChar(60),this.print(t),this.tokenChar(62),this.space(),this.print(n)}function kN(e){this.print(e.expression),this.print(e.typeArguments)}function AN(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 jN(e){UN(this,e,()=>this.printList(e.members,this.shouldPrintTrailingComma(`}`)??!1,!0,!0))}function MN(e){let{id:t,initializer:n}=e;this.print(t),n&&(this.space(),this.tokenChar(61),this.space(),this.print(n))}function NN(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 PN(e){UN(this,e,()=>this.printSequence(e.body,!0))}function FN(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 IN(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 LN(e){this.token(`require(`),this.print(e.expression),this.tokenChar(41)}function RN(e){this.print(e.expression),this.tokenChar(33)}function zN(e){this.word(`export`),this.space(),this.tokenChar(61),this.space(),this.print(e.expression),this.semicolon()}function BN(e){this.word(`export`),this.space(),this.word(`as`),this.space(),this.word(`namespace`),this.space(),this.print(e.id),this.semicolon()}function VN(e){let{typeParameters:t}=e,n=e.params;this.print(t),this.tokenChar(40),this._parameters(n,`)`);let r=e.returnType;this.print(r)}function HN(e){let t=e.type===`ClassPrivateProperty`,n=e.type===`ClassAccessorProperty`||e.type===`ClassProperty`;WN(this,e,[n&&e.declare&&`declare`,!t&&e.accessibility]),e.static&&(this.word(`static`),this.space()),WN(this,e,[!t&&e.abstract&&`abstract`,!t&&e.override&&`override`,(n||t)&&e.readonly&&`readonly`])}function UN(e,t,n){e.token(`{`);let r=e.enterDelimited();n(),r(),e.rightBrace(t)}function WN(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()}var GN=Object.freeze({__proto__:null,AnyTypeAnnotation:BA,ArgumentPlaceholder:bA,ArrayExpression:TA,ArrayPattern:TA,ArrayTypeAnnotation:VA,ArrowFunctionExpression:Gk,AssignmentExpression:GO,AssignmentPattern:WO,AwaitExpression:BO,BigIntLiteral:jA,BinaryExpression:GO,BindExpression:KO,BlockStatement:nM,BooleanLiteral:DA,BooleanLiteralTypeAnnotation:UA,BooleanTypeAnnotation:HA,BreakStatement:pk,CallExpression:RO,CatchClause:yk,ClassAccessorProperty:jk,ClassBody:Ok,ClassDeclaration:Dk,ClassExpression:Dk,ClassImplements:yj,ClassMethod:Nk,ClassPrivateMethod:Pk,ClassPrivateProperty:Mk,ClassProperty:Ak,ConditionalExpression:kO,ContinueStatement:mk,DebuggerStatement:Sk,DeclareClass:GA,DeclareExportAllDeclaration:nj,DeclareExportDeclaration:tj,DeclareFunction:KA,DeclareInterface:YA,DeclareModule:XA,DeclareModuleExports:ZA,DeclareOpaqueType:$A,DeclareTypeAlias:QA,DeclareVariable:ej,DeclaredPredicate:JA,Decorator:FO,Directive:rM,DirectiveLiteral:oM,DoExpression:EO,DoWhileStatement:dk,EmptyStatement:HO,EmptyTypeAnnotation:Dj,EnumBooleanBody:oj,EnumBooleanMember:fj,EnumDeclaration:rj,EnumDefaultedMember:uj,EnumNumberBody:sj,EnumNumberMember:pj,EnumStringBody:cj,EnumStringMember:mj,EnumSymbolBody:lj,ExistsTypeAnnotation:gj,ExportAllDeclaration:oA,ExportDefaultDeclaration:lA,ExportDefaultSpecifier:nA,ExportNamedDeclaration:cA,ExportNamespaceSpecifier:iA,ExportSpecifier:rA,ExpressionStatement:UO,File:eM,ForInStatement:lk,ForOfStatement:uk,ForStatement:ok,FunctionDeclaration:Wk,FunctionExpression:Wk,FunctionTypeAnnotation:_j,FunctionTypeParam:vj,GenericTypeAnnotation:yj,Identifier:yA,IfStatement:ik,Import:zO,ImportAttribute:dA,ImportDeclaration:uA,ImportDefaultSpecifier:tA,ImportExpression:pA,ImportNamespaceSpecifier:fA,ImportSpecifier:eA,IndexedAccessType:Qj,InferredPredicate:qA,InterfaceDeclaration:Sj,InterfaceExtends:yj,InterfaceTypeAnnotation:wj,InterpreterDirective:sM,IntersectionTypeAnnotation:Tj,JSXAttribute:lM,JSXClosingElement:bM,JSXClosingFragment:wM,JSXElement:_M,JSXEmptyExpression:xM,JSXExpressionContainer:mM,JSXFragment:SM,JSXIdentifier:uM,JSXMemberExpression:fM,JSXNamespacedName:dM,JSXOpeningElement:yM,JSXOpeningFragment:CM,JSXSpreadAttribute:pM,JSXSpreadChild:hM,JSXText:gM,LabeledStatement:_k,LogicalExpression:GO,MemberExpression:qO,MetaProperty:JO,MixedTypeAnnotation:Ej,ModuleExpression:ZO,NewExpression:AO,NullLiteral:OA,NullLiteralTypeAnnotation:WA,NullableTypeAnnotation:Oj,NumberLiteralTypeAnnotation:kA,NumberTypeAnnotation:kj,NumericLiteral:kA,ObjectExpression:SA,ObjectMethod:CA,ObjectPattern:SA,ObjectProperty:wA,ObjectTypeAnnotation:zj,ObjectTypeCallProperty:Vj,ObjectTypeIndexer:Hj,ObjectTypeInternalSlot:Bj,ObjectTypeProperty:Uj,ObjectTypeSpreadProperty:Wj,OpaqueType:Rj,OptionalCallExpression:LO,OptionalIndexedAccessType:$j,OptionalMemberExpression:IO,ParenthesizedExpression:DO,PipelineBareFunction:FA,PipelinePrimaryTopicReference:IA,PipelineTopicExpression:PA,Placeholder:cM,PrivateName:YO,Program:tM,QualifiedTypeIdentifier:Gj,RegExpLiteral:EA,RestElement:xA,ReturnStatement:hk,SequenceExpression:jO,SpreadElement:xA,StaticBlock:Ik,StringLiteral:AA,StringLiteralTypeAnnotation:AA,StringTypeAnnotation:Aj,Super:NO,SwitchCase:xk,SwitchStatement:bk,SymbolTypeAnnotation:Kj,TSAnyKeyword:zM,TSArrayType:oN,TSAsExpression:DN,TSBigIntKeyword:BM,TSBooleanKeyword:WM,TSCallSignatureDeclaration:MM,TSClassImplements:CN,TSConditionalType:mN,TSConstructSignatureDeclaration:PM,TSConstructorType:eN,TSDeclareFunction:kM,TSDeclareMethod:AM,TSEnumBody:jN,TSEnumDeclaration:AN,TSEnumMember:MN,TSExportAssignment:zN,TSExternalModuleReference:LN,TSFunctionType:$M,TSImportEqualsDeclaration:IN,TSImportType:FN,TSIndexSignature:RM,TSIndexedAccessType:vN,TSInferType:hN,TSInstantiationExpression:kN,TSInterfaceBody:TN,TSInterfaceDeclaration:wN,TSInterfaceHeritage:CN,TSIntersectionType:fN,TSIntrinsicKeyword:ZM,TSLiteralType:SN,TSMappedType:yN,TSMethodSignature:LM,TSModuleBlock:PN,TSModuleDeclaration:NN,TSNamedTupleMember:uN,TSNamespaceExportDeclaration:BN,TSNeverKeyword:XM,TSNonNullExpression:RN,TSNullKeyword:YM,TSNumberKeyword:HM,TSObjectKeyword:UM,TSOptionalType:cN,TSParameterProperty:OM,TSParenthesizedType:gN,TSPropertySignature:FM,TSQualifiedName:jM,TSRestType:lN,TSSatisfiesExpression:DN,TSStringKeyword:GM,TSSymbolKeyword:KM,TSTemplateLiteralType:xN,TSThisType:QM,TSTupleType:sN,TSTypeAliasDeclaration:EN,TSTypeAnnotation:TM,TSTypeAssertion:ON,TSTypeLiteral:aN,TSTypeOperator:_N,TSTypeParameter:DM,TSTypeParameterDeclaration:EM,TSTypeParameterInstantiation:EM,TSTypePredicate:rN,TSTypeQuery:iN,TSTypeReference:nN,TSUndefinedKeyword:JM,TSUnionType:dN,TSUnknownKeyword:VM,TSVoidKeyword:qM,TaggedTemplateExpression:gO,TemplateElement:_O,TemplateLiteral:yO,ThisExpression:MO,ThisTypeAnnotation:jj,ThrowStatement:gk,TopicReference:NA,TryStatement:vk,TupleTypeAnnotation:Mj,TypeAlias:Pj,TypeAnnotation:Fj,TypeCastExpression:Yj,TypeParameter:Lj,TypeParameterDeclaration:Ij,TypeParameterInstantiation:Ij,TypeofTypeAnnotation:Nj,UnaryExpression:TO,UnionTypeAnnotation:Jj,UpdateExpression:OO,V8IntrinsicIdentifier:XO,VariableDeclaration:Ck,VariableDeclarator:wk,Variance:Xj,VoidPattern:LA,VoidTypeAnnotation:Zj,WhileStatement:sk,WithStatement:rk,YieldExpression:VO,_classMethodHead:Fk,_functionHead:Uk,_getRawIdentifier:vA,_interfaceish:bj,_methodHead:Vk,_param:Bk,_parameters:zk,_params:Rk,_predicate:Hk,_printAttributes:aA,_printTemplate:vO,_shouldPrintArrowParamsParens:Kk,_shouldPrintDecoratorsBeforeExport:PO,_variance:xj,tsPrintClassMemberModifiers:HN,tsPrintFunctionOrConstructorType:tN,tsPrintPropertyOrMethodName:IM,tsPrintSignatureDeclarationBase:VN});const{isExpression:KN,isFunction:qN,isStatement:JN,isClassBody:YN,isTSInterfaceBody:XN,isTSEnumMember:ZN}=gn,QN=/e/i,$N=/\.0+$/,eP=/[\n\r\u2028\u2029]/,tP=/[\n\r\u2028\u2029]|\*\//;function nP(e){return e.type===`CommentLine`||eP.test(e.value)}const{needsParens:rP}=dO;var iP=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])}enterForStatementInit(){return this.tokenContext|=W.forInitHead|W.forInOrInitHeadAccumulate,()=>this.tokenContext=W.normal}enterForXStatementInit(e){return e?(this.tokenContext|=W.forOfHead,null):(this.tokenContext|=W.forInHead|W.forInOrInitHeadAccumulate,()=>this.tokenContext=W.normal)}enterDelimited(){let e=this.tokenContext,t=this._noLineTerminatorAfterNode;return!(e&W.forInOrInitHeadAccumulate)&&t===null?()=>{}:(this._noLineTerminatorAfterNode=null,this.tokenContext=W.normal,()=>{this._noLineTerminatorAfterNode=t,this.tokenContext=e})}tokenContext=W.normal;_tokens=null;_originalCode=null;_currentNode=null;_indent=0;_indentRepeat=0;_insideAux=!1;_noLineTerminator=!1;_noLineTerminatorAfterNode=null;_printAuxAfterOnNextUserNode=!1;_printedComments=new Set;_endsWithInteger=!1;_endsWithWord=!1;_endsWithDiv=!1;_lastCommentLine=0;_endsWithInnerRaw=!1;_indentInnerComments=!0;tokenMap=null;_boundGetRawIdentifier=this._getRawIdentifier.bind(this);generate(e){return this.format.preserveFormat&&(this.tokenMap=new mO(e,this._tokens,this._originalCode)),this.print(e),this._maybeAddAuxComment(),this._buf.get()}indent(){let{format:e}=this;e.preserveFormat||e.compact||e.concise||this._indent++}dedent(){let{format:e}=this;e.preserveFormat||e.compact||e.concise||this._indent--}_printSemicolonBeforeNextNode=-1;_printSemicolonBeforeNextToken=-1;semicolon(e=!1){if(this._maybeAddAuxComment(),e){this._appendChar(59),this._noLineTerminator=!1;return}if(this.tokenMap){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)}}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){let{format:t}=this;if(!(t.compact||t.preserveFormat)){if(e)this._space();else if(this._buf.hasContent()){let e=this.getLastChar();e!==32&&e!==10&&this._space()}}}word(e,t=!1){this.tokenContext&=W.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(e),this._maybeAddAuxComment(),this.tokenMap&&this._catchUpToCurrentToken(e),(this._endsWithWord||this._endsWithDiv&&e.charCodeAt(0)===47)&&this._space(),this._append(e,!1),this._endsWithWord=!0,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),this._endsWithInteger=Number.isInteger(t)&&!n(e)&&!QN.test(e)&&!$N.test(e)&&e.charCodeAt(e.length-1)!==46}token(e,t=!1,n=0){this.tokenContext&=W.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(e,n),this._maybeAddAuxComment(),this.tokenMap&&this._catchUpToCurrentToken(e,n);let r=this.getLastChar(),i=e.charCodeAt(0);(r===33&&(e===`--`||i===61)||i===43&&r===43||i===45&&r===45||i===46&&this._endsWithInteger)&&this._space(),this._append(e,t),this._noLineTerminator=!1}tokenChar(e){this.tokenContext&=W.forInOrInitHeadAccumulatePassThroughMask;let t=String.fromCharCode(e);this._maybePrintInnerComments(t),this._maybeAddAuxComment(),this.tokenMap&&this._catchUpToCurrentToken(t);let n=this.getLastChar();(e===43&&n===43||e===45&&n===45||e===46&&this._endsWithInteger)&&this._space(),this._appendChar(e),this._noLineTerminator=!1}newline(e=1,t){if(!(e<=0)){if(!t){if(this.format.retainLines||this.format.compact)return;if(this.format.concise){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()===e}getLastChar(){return this._buf.getLastChar()}endsWithCharAndNewline(){return this._buf.endsWithCharAndNewline()}removeTrailingNewline(){this._buf.removeTrailingNewline()}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._queue(10)}_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._buf.appendChar(59),this._endsWithWord=!1,this._endsWithInteger=!1,this._endsWithDiv=!1),this._printSemicolonBeforeNextToken=-1,this._printSemicolonBeforeNextNode=-1}_append(e,t){this._maybeIndent(e.charCodeAt(0)),this._buf.append(e,t),this._endsWithWord=!1,this._endsWithInteger=!1,this._endsWithDiv=!1}_appendChar(e){this._maybeIndent(e),this._buf.appendChar(e),this._endsWithWord=!1,this._endsWithInteger=!1,this._endsWithDiv=!1}_queue(e){this._maybeIndent(e),this._buf.queue(e),this._endsWithWord=!1,this._endsWithInteger=!1}_maybeIndent(e){this._indent&&e!==10&&this.endsWith(10)&&this._buf.queueIndentation(this._getIndent())}_shouldIndent(e){if(this._indent&&e!==10&&this.endsWith(10))return!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{format:n}=this;if(!n.preserveFormat){n.retainLines&&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)}}_getIndent(){return this._indentRepeat*this._indent}printTerminatorless(e){this._noLineTerminator=!0,this.print(e)}print(e,t=!1,n){if(!e)return;this._endsWithInnerRaw=!1;let r=e.type,i=this.format,a=i.concise;e._compact&&(i.concise=!0);let o=this[r];if(o===void 0)throw ReferenceError(`unknown node of type ${JSON.stringify(r)} with constructor ${JSON.stringify(e.constructor.name)}`);let s=this._currentNode;this._currentNode=e,this.tokenMap&&(this._printSemicolonBeforeNextToken=this._printSemicolonBeforeNextNode);let c=this._insideAux;this._insideAux=e.loc==null,this._maybeAddAuxComment(this._insideAux&&!c);let l=e.extra?.parenthesized,u=l&&i.preserveFormat||l&&i.retainFunctionParens&&r===`FunctionExpression`||rP(e,s,this.tokenContext,i.preserveFormat?this._boundGetRawIdentifier:void 0);if(!u&&l&&e.leadingComments?.length&&e.leadingComments[0].type===`CommentBlock`)switch(s?.type){case`ExpressionStatement`:case`VariableDeclarator`:case`AssignmentExpression`:case`ReturnStatement`:break;case`CallExpression`:case`OptionalCallExpression`:case`NewExpression`:if(s.callee!==e)break;default:u=!0}let d=!1;!u&&this._noLineTerminator&&(e.leadingComments?.some(nP)||this.format.retainLines&&e.loc&&e.loc.start.line>this._buf.getCurrentLine())&&(u=!0,d=!0);let f,p;u||(t||=!!s&&this._noLineTerminatorAfterNode===s&&uO(s,e),t&&(e.trailingComments?.some(nP)?KN(e)&&(u=!0):(f=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=e))),u&&(this.tokenChar(40),d&&this.indent(),this._endsWithInnerRaw=!1,this.tokenContext&W.forInOrInitHeadAccumulate&&(p=this.tokenContext,this.tokenContext=W.normal),f=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=null),this._lastCommentLine=0,this._printLeadingComments(e,s);let m=r===`Program`||r===`File`?null:e.loc;this.exactSource(m,o.bind(this,e,s)),u?(this._printTrailingComments(e,s),d&&(this.dedent(),this.newline()),this.tokenChar(41),this._noLineTerminator=t,p&&(this.tokenContext=p)):t&&!this._noLineTerminator?(this._noLineTerminator=!0,this._printTrailingComments(e,s)):this._printTrailingComments(e,s,n),this._currentNode=s,i.concise=a,this._insideAux=c,f!==void 0&&(this._noLineTerminatorAfterNode=f),this._endsWithInnerRaw=!1}_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;if(n==null&&this.format.retainLines){let t=e[0].loc?.start.line;t!=null&&t!==this._buf.getCurrentLine()&&(n=!0)}n&&this.indent();let s={nextNodeStartLine:0},c=r?.bind(this),l=e.length;for(let n=0;n<l;n++){let r=e[n];r&&(t&&this._printNewline(n===0,s),this.print(r,void 0,o||0),a?.(r,n),c!=null&&(n<l-1?c(n,!1):i&&c(n,!0)),t&&(r.trailingComments?.length||(this._lastCommentLine=0),n+1===l?this.newline(1):(s.nextNodeStartLine=e[n+1].loc?.start.line||0,this._printNewline(!0,s))))}n&&this.dedent()}printAndIndentOnComments(e){let t=e.leadingComments&&e.leadingComments.length>0;t&&this.indent(),this.print(e),t&&this.dedent()}printBlock(e){let t=e.body;t.type!==`EmptyStatement`&&this.space(),this.print(t)}_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)}_printLeadingComments(e,t){let n=e.leadingComments;n?.length&&this._printComments(0,n,e,t)}_maybePrintInnerComments(e,t){this._endsWithInnerRaw&&this.printInnerComments(this.tokenMap?.findMatching(this._currentNode,e,t)),this._endsWithInnerRaw=!0,this._indentInnerComments=!0}printInnerComments(e){let t=this._currentNode,n=t.innerComments;if(!n?.length)return;let r=this.endsWith(32),i=this._indentInnerComments,a=this._printedComments.size;i&&this.indent(),this._printComments(1,n,t,void 0,void 0,e),r&&a!==this._printedComments.size&&this.space(),i&&this.dedent()}noIndentInnerCommentsHere(){this._indentInnerComments=!1}printSequence(e,t,n){this.printJoin(e,!0,t??!1,void 0,void 0,void 0,n)}printList(e,t,n,r,i,a){this.printJoin(e,n,r,i??aP,t,a)}shouldPrintTrailingComma(e){if(!this.tokenMap)return null;let t=this.tokenMap.findLastIndex(this._currentNode,t=>this.tokenMap.matchesOriginal(t,e));return t<=0?null:this.tokenMap.matchesOriginal(this._tokens[t-1],`,`)}_printNewline(e,t){let n=this.format;if(n.retainLines||n.compact)return;if(n.concise){this.space();return}if(!e)return;let r=t.nextNodeStartLine,i=this._lastCommentLine;if(r>0&&i>0){let e=r-i;if(e>=0){this.newline(e||1);return}}this._buf.hasContent()&&this.newline(1)}_shouldPrintComment(e,t){if(e.ignore||this._printedComments.has(e))return 0;if(this._noLineTerminator&&tP.test(e.value))return 2;if(t&&this.tokenMap){let n=this.tokenMap.find(this._currentNode,t=>t.value===e.value);if(n&&n.start>t.start)return 2}return this._printedComments.add(e),this.format.shouldPrintComment(e.value)?1:0}_printComment(e,t){let n=this._noLineTerminator,r=e.type===`CommentBlock`,i=r&&t!==1&&!this._noLineTerminator;i&&this._buf.hasContent()&&t!==2&&this.newline(1);let a=this.getLastChar();a!==91&&a!==123&&a!==40&&this.space();let o;if(r){if(o=`/*${e.value}*/`,this.format.indent.adjustMultilineComment){let t=e.loc?.start.column;if(t){let e=RegExp(`\\n\\s{1,`+t+`}`,`g`);o=o.replace(e,`
|
|
9
|
-
`)}if(this.format.concise)o=o.replace(/\n(?!$)/g,`
|
|
10
|
-
`);else{let e=this.format.retainLines?0:this._buf.getCurrentColumn();(this._shouldIndent(47)||this.format.retainLines)&&(e+=this._getIndent()),o=o.replace(/\n(?!$)/g,`\n${` `.repeat(e)}`)}}}else o=n?`/*${e.value}*/`:`//${e.value}`;if(this._endsWithDiv&&this._space(),this.tokenMap){let{_printSemicolonBeforeNextToken:t,_printSemicolonBeforeNextNode:n}=this;this._printSemicolonBeforeNextToken=-1,this._printSemicolonBeforeNextNode=-1,this.source(`start`,e.loc),this._append(o,r),this._printSemicolonBeforeNextNode=n,this._printSemicolonBeforeNextToken=t}else this.source(`start`,e.loc),this._append(o,r);!r&&!n&&this.newline(1,!0),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,p=this._noLineTerminator?function(){}:this.newline.bind(this);for(let o=0;o<s;o++){let m=t[o],h=this._shouldPrintComment(m,a);if(h===2){c=!1;break}if(c&&m.loc&&h===1){let t=m.loc.start.line,n=m.loc.end.line;if(e===0){let e=0;o===0?this._buf.hasContent()&&(m.type===`CommentLine`||t!==n)&&(e=f=1):e=t-d,d=n,p(e),this._printComment(m,1),o+1===s&&(p(Math.max(l-d,f)),d=l)}else if(e===1){let e=t-(o===0?l:d);d=n,p(e),this._printComment(m,1),o+1===s&&(p(Math.min(1,u-d)),d=u)}else{let e=t-(o===0?u-i:d);d=n,p(e),this._printComment(m,1)}}else{if(c=!1,h!==1)continue;if(s===1){let t=m.loc?m.loc.start.line===m.loc.end.line:!eP.test(m.value),i=t&&!JN(n)&&!YN(r)&&!XN(r)&&!ZN(n);e===0?this._printComment(m,i&&n.type!==`ObjectExpression`||t&&qN(r,{body:n})?1:0):i&&e===2?this._printComment(m,1):this._printComment(m,0)}else e===1&&!(n.type===`ObjectExpression`&&n.properties.length>1)&&n.type!==`ClassBody`&&n.type!==`TSInterfaceBody`?this._printComment(m,o===0?2:o===s-1?3:0):this._printComment(m,0)}}e===2&&c&&d&&(this._lastCommentLine=d)}};Object.assign(iP.prototype,GN);function aP(e,t){this.token(`,`,!1,e),t||this.space()}function oP(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 sP(e,t={},n){return new iP(oP(n,t,e),t.sourceMaps?new IE(t,n):null,e.tokens,typeof n==`string`?n:null).generate(e)}var cP=class{line;column;index;constructor(e,t,n){this.line=e,this.column=t,this.index=n}},lP=class{start;end;filename;identifierName;constructor(e,t){this.start=e,this.end=t}};function uP(e,t){let{line:n,column:r,index:i}=e;return new cP(n,r+t,i+t)}const dP=`BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED`;var fP={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:dP},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:dP}};const pP={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`},mP=e=>e.type===`UpdateExpression`?pP.UpdateExpression[`${e.prefix}`]:pP[e.type];var hP={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 ${mP(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${mP(e)}.`,InvalidLhsOptionalChaining:({ancestor:e})=>`Invalid optional chaining in the left-hand side of ${mP(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.`},gP={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.`},_P={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)}\`.`};const vP=new Set([`ArrowFunctionExpression`,`AssignmentExpression`,`ConditionalExpression`,`YieldExpression`]);var yP={PipeBodyIsTighter:`Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.`,PipeTopicRequiresHackPipes:'Topic 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 ${mP({type:e})}; please wrap it in parentheses.`};function bP(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:n})}function xP({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),bP(c,`clone`,function(e={}){let{line:t,column:n,index:r}=e.loc??o;return a(new cP(t,n,r),{...s,...e.details})}),bP(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 SP(e,t){if(Array.isArray(e))return t=>SP(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]=xP({code:`BABEL_PARSER_SYNTAX_ERROR`,reasonCode:r,toMessage:typeof a==`string`?()=>a:a,...t?{syntaxPlugin:t}:{},...o})}return n}const G={...SP(fP),...SP(hP),...SP(gP),...SP(_P),...SP`pipelineOperator`(yP)};function CP(){return{sourceType:`script`,sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!0,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function wP(e){let t=CP();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}const{defineProperty:TP}=Object,EP=(e,t)=>{e&&TP(e,t,{enumerable:!1,value:e[t]})};function DP(e){return EP(e.loc.start,`index`),EP(e.loc.end,`index`),e}var OP=e=>class extends e{parse(){let e=DP(super.parse());return this.optionFlags&256&&(e.tokens=e.tokens.map(DP)),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.finishNodeAt(n,`ChainExpression`,t)}directiveToStmt(e){let t=e.value;delete e.value,this.castNodeTo(t,`Literal`),t.raw=t.extra.raw,t.value=t.extra.expressionValue;let n=this.castNodeTo(e,`ExpressionStatement`);return n.expression=t,n.directive=t.extra.rawValue,delete t.extra,n}fillOptionalPropertiesForTSESLint(e){}cloneEstreeStringLiteral(e){let{start:t,end:n,loc:r,range:i,raw:a,value:o}=e,s=Object.create(e.constructor.prototype);return s.type=`Literal`,s.start=t,s.end=n,s.loc=r,s.range=i,s.raw=a,s.value=o,s}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){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.loc.start),this.toAssignable(r,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,n){e.type===`Property`&&(e.kind===`get`||e.kind===`set`)?this.raise(G.PatternHasAccessor,e.key):e.type===`Property`&&e.method?this.raise(G.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}toReferencedArguments(e){e.type!==`ImportExpression`&&super.toReferencedArguments(e)}parseExport(e,t){let n=this.state.lastTokStartLoc,r=super.parseExport(e,t);switch(r.type){case`ExportAllDeclaration`:r.exported=null;break;case`ExportNamedDeclaration`:r.specifiers.length===1&&r.specifiers[0].type===`ExportNamespaceSpecifier`&&(this.castNodeTo(r,`ExportAllDeclaration`),r.exported=r.specifiers[0].exported,delete r.specifiers);case`ExportDefaultDeclaration`:{let{declaration:e}=r;e?.type===`ClassDeclaration`&&e.decorators?.length>0&&e.start===r.start&&this.resetStartLocation(r,n)}break}return r}stopParseSubscript(e,t){let n=super.stopParseSubscript(e,t);return t.optionalChainMember?this.estreeParseChainExpression(n,e.loc.end):n}parseMember(e,t,n,r,i){let a=super.parseMember(e,t,n,r,i);return a.type===`OptionalMemberExpression`?this.castNodeTo(a,`MemberExpression`):a.optional=!1,a}isOptionalMemberExpression(e){return e.type===`ChainExpression`?e.expression.type===`MemberExpression`:super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type===`ChainExpression`&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type===`Property`&&e.kind===`init`&&!e.method}isObjectMethod(e){return e.type===`Property`&&(e.method||e.kind===`get`||e.kind===`set`)}castNodeTo(e,t){let n=super.castNodeTo(e,t);return this.fillOptionalPropertiesForTSESLint(n),n}cloneIdentifier(e){let t=super.cloneIdentifier(e);return this.fillOptionalPropertiesForTSESLint(t),t}cloneStringLiteral(e){return e.type===`Literal`?this.cloneEstreeStringLiteral(e):super.cloneStringLiteral(e)}finishNodeAt(e,t,n){return DP(super.finishNodeAt(e,t,n))}finishNode(e,t){let n=super.finishNode(e,t);return this.fillOptionalPropertiesForTSESLint(n),n}resetStartLocation(e,t){super.resetStartLocation(e,t),DP(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),DP(e)}},kP=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 AP=new Map;function K(e,t={}){t.keyword=e;let n=q(e,t);return AP.set(e,n),n}function jP(e,t){return q(e,{beforeExpr:!0,binop:t})}let MP=-1;const NP=[],PP=[],FP=[],IP=[],LP=[],RP=[];function q(e,t={}){return++MP,PP.push(e),FP.push(t.binop??-1),IP.push(t.beforeExpr??!1),LP.push(t.startsExpr??!1),RP.push(t.prefix??!1),NP.push(new kP(e,t)),MP}function J(e,t={}){return++MP,AP.set(e,MP),PP.push(e),FP.push(t.binop??-1),IP.push(t.beforeExpr??!1),LP.push(t.startsExpr??!1),RP.push(t.prefix??!1),NP.push(new kP(`name`,t)),MP}const zP={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:jP(`|>`,0),nullishCoalescing:jP(`??`,1),logicalOR:jP(`||`,1),logicalAND:jP(`&&`,2),bitwiseOR:jP(`|`,3),bitwiseXOR:jP(`^`,4),bitwiseAND:jP(`&`,5),equality:jP(`==/!=/===/!==`,6),lt:jP(`</>/<=/>=`,7),gt:jP(`</>/<=/>=`,7),relational:jP(`</>/<=/>=`,7),bitShift:jP(`<</>>/>>>`,8),bitShiftL:jP(`<</>>/>>>`,8),bitShiftR:jP(`<</>>/>>>`,8),plusMin:q(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:q(`%`,{binop:10,startsExpr:!0}),star:q(`*`,{binop:10}),slash:jP(`/`,10),exponent:q(`**`,{beforeExpr:!0,binop:11,rightAssociative:!0}),_in:K(`in`,{beforeExpr:!0,binop:7}),_instanceof:K(`instanceof`,{beforeExpr:!0,binop:7}),_break:K(`break`),_case:K(`case`,{beforeExpr:!0}),_catch:K(`catch`),_continue:K(`continue`),_debugger:K(`debugger`),_default:K(`default`,{beforeExpr:!0}),_else:K(`else`,{beforeExpr:!0}),_finally:K(`finally`),_function:K(`function`,{startsExpr:!0}),_if:K(`if`),_return:K(`return`,{beforeExpr:!0}),_switch:K(`switch`),_throw:K(`throw`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_try:K(`try`),_var:K(`var`),_const:K(`const`),_with:K(`with`),_new:K(`new`,{beforeExpr:!0,startsExpr:!0}),_this:K(`this`,{startsExpr:!0}),_super:K(`super`,{startsExpr:!0}),_class:K(`class`,{startsExpr:!0}),_extends:K(`extends`,{beforeExpr:!0}),_export:K(`export`),_import:K(`import`,{startsExpr:!0}),_null:K(`null`,{startsExpr:!0}),_true:K(`true`,{startsExpr:!0}),_false:K(`false`,{startsExpr:!0}),_typeof:K(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:K(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:K(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_do:K(`do`,{isLoop:!0,beforeExpr:!0}),_for:K(`for`,{isLoop:!0}),_while:K(`while`,{isLoop:!0}),_as:J(`as`,{startsExpr:!0}),_assert:J(`assert`,{startsExpr:!0}),_async:J(`async`,{startsExpr:!0}),_await:J(`await`,{startsExpr:!0}),_defer:J(`defer`,{startsExpr:!0}),_from:J(`from`,{startsExpr:!0}),_get:J(`get`,{startsExpr:!0}),_let:J(`let`,{startsExpr:!0}),_meta:J(`meta`,{startsExpr:!0}),_of:J(`of`,{startsExpr:!0}),_sent:J(`sent`,{startsExpr:!0}),_set:J(`set`,{startsExpr:!0}),_source:J(`source`,{startsExpr:!0}),_static:J(`static`,{startsExpr:!0}),_using:J(`using`,{startsExpr:!0}),_yield:J(`yield`,{startsExpr:!0}),_asserts:J(`asserts`,{startsExpr:!0}),_checks:J(`checks`,{startsExpr:!0}),_exports:J(`exports`,{startsExpr:!0}),_global:J(`global`,{startsExpr:!0}),_implements:J(`implements`,{startsExpr:!0}),_intrinsic:J(`intrinsic`,{startsExpr:!0}),_infer:J(`infer`,{startsExpr:!0}),_is:J(`is`,{startsExpr:!0}),_mixins:J(`mixins`,{startsExpr:!0}),_proto:J(`proto`,{startsExpr:!0}),_require:J(`require`,{startsExpr:!0}),_satisfies:J(`satisfies`,{startsExpr:!0}),_keyof:J(`keyof`,{startsExpr:!0}),_readonly:J(`readonly`,{startsExpr:!0}),_unique:J(`unique`,{startsExpr:!0}),_abstract:J(`abstract`,{startsExpr:!0}),_declare:J(`declare`,{startsExpr:!0}),_enum:J(`enum`,{startsExpr:!0}),_module:J(`module`,{startsExpr:!0}),_namespace:J(`namespace`,{startsExpr:!0}),_interface:J(`interface`,{startsExpr:!0}),_type:J(`type`,{startsExpr:!0}),_opaque:J(`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 Y(e){return e>=89&&e<=129}function BP(e){return e<=88}function VP(e){return e>=54&&e<=129}function HP(e){return e>=54&&e<=132}function UP(e){return IP[e]}function WP(e){return LP[e]}function GP(e){return e>=25&&e<=29}function KP(e){return e>=125&&e<=127}function qP(e){return e>=86&&e<=88}function JP(e){return e>=54&&e<=88}function YP(e){return e>=35&&e<=55}function XP(e){return e===30}function ZP(e){return RP[e]}function QP(e){return e>=117&&e<=119}function $P(e){return e>=120&&e<=126}function eF(e){return PP[e]}function tF(e){return FP[e]}function nF(e){return e===53}function rF(e){return e>=20&&e<=21}function iF(e){return NP[e]}var aF=class{constructor(e,t){this.token=e,this.preserveSpace=!!t}token;preserveSpace};const X={brace:new aF(`{`),j_oTag:new aF(`<tag`),j_cTag:new aF(`</tag`),j_expr:new aF(`<tag>...</tag>`,!0)};let oF=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,sF=`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`;const cF=RegExp(`[`+oF+`]`),lF=RegExp(`[`+oF+sF+`]`);oF=sF=null;const uF=[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],dF=[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 fF(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 pF(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&cF.test(String.fromCharCode(e)):fF(e,uF)}function mF(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&&lF.test(String.fromCharCode(e)):fF(e,uF)||fF(e,dF)}const hF={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`]},gF=new Set(hF.keyword),_F=new Set(hF.strict),vF=new Set(hF.strictBind);function yF(e,t){return t&&e===`await`||e===`enum`}function bF(e,t){return yF(e,t)||_F.has(e)}function xF(e){return vF.has(e)}function SF(e,t){return bF(e,t)||xF(e)}function CF(e){return gF.has(e)}function wF(e,t,n){return e===64&&t===64&&pF(n)}const TF=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 EF(e){return TF.has(e)}var DF=class{flags=0;names=new Map;firstLexicalName=``;constructor(e){this.flags=e}},OF=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&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new DF(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,t,n){let r=this.currentScope();if(t&8||t&16){this.checkRedeclarationInScope(r,e,t,n);let i=r.names.get(e)||0;t&16?i|=4:(r.firstLexicalName||=e,i|=2),r.names.set(e,i),t&8&&this.maybeExportDefined(r,e)}else if(t&4)for(let i=this.scopeStack.length-1;i>=0&&(r=this.scopeStack[i],this.checkRedeclarationInScope(r,e,t,n),r.names.set(e,(r.names.get(e)||0)|1),this.maybeExportDefined(r,e),!(r.flags&1667));--i);this.parser.inModule&&r.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,n,r){this.isRedeclaredInScope(e,t,n)&&this.parser.raise(G.VarRedeclaration,r,{identifierName:t})}isRedeclaredInScope(e,t,n){if(!(n&1))return!1;if(n&8)return e.names.has(t);let r=e.names.get(t)||0;return n&16?(r&2)>0||!this.treatFunctionsAsVarInScope(e)&&(r&1)>0:(r&2)>0&&!(e.flags&8&&e.firstLexicalName===t)||!this.treatFunctionsAsVarInScope(e)&&(r&4)>0}checkLocalExport(e){let{name:t}=e;this.scopeStack[0].names.has(t)||this.undefinedExports.set(t,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&1667)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&1731&&!(t&4))return t}}},kF=class extends DF{declareFunctions=new Set},AF=class extends OF{createScope(e){return new kF(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 jF=new Set([`_`,`any`,`bool`,`boolean`,`empty`,`extends`,`false`,`interface`,`mixed`,`null`,`number`,`static`,`string`,`true`,`typeof`,`void`]),Z=SP`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 MF(e){return e.type===`DeclareExportAllDeclaration`||e.type===`DeclareExportDeclaration`&&(!e.declaration||e.declaration.type!==`TypeAlias`&&e.declaration.type!==`InterfaceDeclaration`)}function NF(e){return e.importKind===`type`||e.importKind===`typeof`}const PF={const:`declare export var`,let:`declare export var`,type:`export type`,interface:`export interface`};function FF(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 IF=/\*?\s*@((?:no)?flow)\b/;var LF=e=>class extends e{flowPragma=void 0;getScopeHandler(){return AF}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=IF.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(Z.UnexpectedSpaceBetweenModuloChecks,t),this.eat(6)?(e.value=super.parseExpression(),this.expect(7),this.finishNode(e,`DeclaredPredicate`)):this.finishNode(e,`InferredPredicate`)}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(10);let t=null,n=null;return this.match(50)?(this.state.inType=e,n=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(50)&&(n=this.flowParsePredicate())),[t,n]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,`DeclareClass`)}flowParseDeclareFunction(e){this.next();let t=e.id=this.parseIdentifier(),n=this.startNode(),r=this.startNode();this.match(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(),r.typeAnnotation=this.finishNode(n,`FunctionTypeAnnotation`),t.typeAnnotation=this.finishNode(r,`TypeAnnotation`),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,`DeclareFunction`)}flowParseDeclare(e,t){if(this.match(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(Z.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(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,`DeclareVariable`)}flowParseDeclareModule(e){this.scope.enter(0),this.match(130)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let t=e.body=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(Z.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),n.push(super.parseImport(e))):(this.expectContextual(121,Z.UnsupportedStatementInDeclareModule),n.push(this.flowParseDeclare(e,!0)))}this.scope.exit(),this.expect(4),this.finishNode(t,`BlockStatement`);let r=null,i=!1;return n.forEach(e=>{MF(e)?(r===`CommonJS`&&this.raise(Z.AmbiguousDeclareModuleKind,e),r=`ES`):e.type===`DeclareModuleExports`&&(i&&this.raise(Z.DuplicateDeclareModuleExports,e),r===`ES`&&this.raise(Z.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(Z.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:e,suggestion:PF[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))return e=this.parseExport(e,null),e.type===`ExportNamedDeclaration`?(e.default=!1,delete e.exportKind,this.castNodeTo(e,`DeclareExportDeclaration`)):this.castNodeTo(e,`DeclareExportAllDeclaration`);throw this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(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){this.next();let t=this.flowParseOpaqueType(e,!0);return this.castNodeTo(t,`DeclareOpaqueType`),t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,`DeclareInterface`)}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:8201,e.id.loc.start),this.match(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){if(e.implements=[],e.mixins=[],this.eatContextual(113))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(8));if(this.eatContextual(109))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(8))}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(Z.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,t,n){jF.has(e)&&this.raise(n?Z.AssignReservedType:Z.UnexpectedReservedType,t,{reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(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.loc.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,`OpaqueType`)}flowParseTypeParameter(e=!1){let t=this.state.startLoc,n=this.startNode(),r=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return n.name=i.name,n.variance=r,n.bound=i.typeAnnotation,this.match(25)?(this.eat(25),n.default=this.flowParseType()):e&&this.raise(Z.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()!==X.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()===X.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.flowParseObjectPropertyKey(),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.flowParseObjectPropertyKey(),this.expect(1),this.expect(1),this.match(43)||this.match(6)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(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.loc.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.loc.start),o.callProperties.push(this.flowParseObjectTypeCallProperty(u,t));else{let e=`init`;(this.isContextual(95)||this.isContextual(100))&&HP(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(Z.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(Z.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Z.InexactInsideNonObject,this.state.lastTokStartLoc),r&&this.raise(Z.InexactVariance,r),null):(a||this.raise(Z.UnexpectedSpreadType,this.state.lastTokStartLoc),n!=null&&this.unexpected(n),r&&this.raise(Z.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.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(i===`get`||i===`set`)&&this.flowCheckGetterSetterParams(e),!a&&e.key.name===`constructor`&&e.value.this&&this.raise(Z.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.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind===`get`?Z.GetterMayNotHaveThisParam:Z.SetterMayNotHaveThisParam,e.value.this),n!==t&&this.raise(e.kind===`get`?G.BadGetterArity:G.BadSetterArity,e),e.kind===`set`&&e.value.rest&&this.raise(G.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=null,i=this.startNode(),a=this.lookahead(),o=this.state.type===74;return a.type===10||a.type===13?(o&&!e&&this.raise(Z.ThisParamMustBeFirst,i),t=this.parseIdentifier(o),this.eat(13)&&(n=!0,o&&this.raise(Z.ThisParamMayNotBeOptional,i)),r=this.flowParseTypeInitialiser()):r=this.flowParseType(),i.name=t,i.optional=n,i.typeAnnotation=r,this.finishNode(i,`FunctionTypeParam`)}reinterpretTypeAsFunctionTypeParam(e){let t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,`FunctionTypeParam`)}flowParseFunctionTypeParams(e=[]){let t=null,n=null;for(this.match(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(Y(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(Z.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(JP(this.state.type)){let e=eF(this.state.type);return this.next(),super.createIdentifier(t,e)}else if(Y(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.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,`FunctionTypeAnnotation`)}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(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(e){let t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(10)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(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 t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,`TypeAnnotation`):null}return super.parseFunctionBodyAndFinish(e,t,n)}parseStatementLike(e){if(this.state.strict&&this.isContextual(125)){if(VP(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)||Y(this.state.type)||this.match(64)||this.match(70)||this.match(78))return this.flowParseDeclare(e)}else if(Y(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||KP(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return e===122||KP(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(this.state.maybeInArrowParameters){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,l]=this.getArrowLikeExpressions(o);if(s||l.length>0){let e=[...i];if(l.length>0){this.state=r,this.state.noArrowAt=e;for(let t=0;t<l.length;t++)e.push(l[t].start);({consequent:o,failed:s}=this.tryParseConditionalConsequent()),[c,l]=this.getArrowLikeExpressions(o)}s&&c.length>1&&this.raise(Z.AmbiguousConditionalArrow,r.startLoc),s&&c.length===1&&(this.state=r,e.push(c[0].start),this.state.noArrowAt=e,{consequent:o,failed:s}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(o,!0),this.state.noArrowAt=i,this.expect(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,[]]):FF(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){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(Z.DeclareClassElement,r):t.value&&this.raise(Z.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(G.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):wF(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,t){return e.type===`TypeCastExpression`?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){!t&&e.type===`AssignmentExpression`&&e.left.type===`TypeCastExpression`&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,n){for(let t=0;t<e.length;t++){let n=e[t];n?.type===`TypeCastExpression`&&(e[t]=this.typeCastToParameter(n))}super.toAssignableList(e,t,n)}toReferencedList(e,t){for(let n=0;n<e.length;n++){let r=e[n];r&&r.type===`TypeCastExpression`&&!r.extra?.parenthesized&&(e.length>1||!t)&&this.raise(Z.TypeCastInPattern,r.typeAnnotation)}return e}parseArrayLike(e,t){let n=super.parseArrayLike(e,t);return t!=null&&!this.state.maybeInArrowParameters&&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.loc.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(Z.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(Z.ThisParamBannedInConstructor,t)}}pushClassPrivateMethod(e,t,n,r){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(43)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,n,r)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.match(43)||this.match(47))&&(e.superTypeArguments=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(109)){this.next();let t=e.implements=[];do{let e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),this.match(43)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,t.push(this.finishNode(e,`ClassImplements`))}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(Z.GetterMayNotHaveThisParam,n):this.isThisParam(n)&&this.raise(Z.SetterMayNotHaveThisParam,n)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,n,r,i,a,o){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let s;this.match(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(Z.PatternIsOptional,e),this.isThisParam(e)&&this.raise(Z.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(10)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(Z.ThisParamAnnotationRequired,e),this.match(25)&&this.isThisParam(e)&&this.raise(Z.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(Z.TypeBeforeInitializer,n.typeAnnotation),n}parseImportSpecifierLocal(e,t,n){t.local=NF(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&&!VP(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&&VP(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=o;else{if(t)throw this.raise(G.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=NF(e);return n&&c&&this.raise(Z.ImportTypeShorthandOnlyInPureImport,e),(n||c)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),s&&!n&&!c&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,`ImportSpecifier`)}parseBindingAtom(){switch(this.state.type){case 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===X.j_oTag||a===X.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(Z.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(Z.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(),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(Z.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(Z.UnterminatedFlowComment,this.state.curPosition()),n}skipBlockComment(){if(this.hasPlugin(`flowComments`)&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Z.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(G.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:n}){this.raise(Z.EnumBooleanMemberNotInitialized,e,{memberName:n,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?t.explicitType===`symbol`?Z.EnumInvalidMemberInitializerSymbolType:Z.EnumInvalidMemberInitializerPrimaryType:Z.EnumInvalidMemberInitializerUnknownType,e,t)}flowEnumErrorNumberMemberNotInitialized(e,t){this.raise(Z.EnumNumberMemberNotInitialized,e,t)}flowEnumErrorStringMemberInconsistentlyInitialized(e,t){this.raise(Z.EnumStringMemberInconsistentlyInitialized,e,t)}flowEnumMemberInit(){let e=this.state.startLoc,t=()=>this.match(8)||this.match(4);switch(this.state.type){case 131:{let n=this.parseNumericLiteral(this.state.value);return t()?{type:`number`,loc:n.loc.start,value:n}:{type:`invalid`,loc:e}}case 130:{let n=this.parseStringLiteral(this.state.value);return t()?{type:`string`,loc:n.loc.start,value:n}:{type:`invalid`,loc:e}}case 81:case 82:{let n=this.parseBooleanLiteral(this.match(81));return t()?{type:`boolean`,loc:n.loc.start,value:n}:{type:`invalid`,loc:e}}default:return{type:`invalid`,loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(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(Z.EnumInvalidMemberName,o,{memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),n.has(c)&&this.raise(Z.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(!Y(this.state.type))throw this.raise(Z.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:t}=this.state;return this.next(),t!==`boolean`&&t!==`number`&&t!==`string`&&t!==`symbol`&&this.raise(Z.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){let n=t.name,r=t.loc.start,i=this.flowEnumParseExplicitType({enumName:n});this.expect(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.loc.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.loc.start,{enumName:n,memberName:e.id.name});return e.members=a.numberMembers,this.expect(4),this.finishNode(e,`EnumNumberBody`)}else return this.raise(Z.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}};const RF={__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:`♦`},zF=RegExp(`\\r\\n|[\\r\\n\\u2028\\u2029]`,`g`);function BF(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function VF(e,t,n){for(let r=t;r<n;r++)if(BF(e.charCodeAt(r)))return!0;return!1}const HF=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,UF=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function WF(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 GF=SP`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 KF(e){return e?e.type===`JSXOpeningFragment`||e.type===`JSXClosingFragment`:!1}function qF(e){if(e.type===`JSXIdentifier`)return e.name;if(e.type===`JSXNamespacedName`)return e.namespace.name+`:`+e.name.name;if(e.type===`JSXMemberExpression`)return qF(e.object)+`.`+qF(e.property);throw Error(`Node had unexpected type: `+e.type)}var JF=e=>class extends e{jsxReadToken(){let e=``,t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(GF.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(GF.UnexpectedToken,this.state.curPosition(),{unexpected:this.input[this.state.pos],HTMLEntity:n===125?`}`:`>`});default:BF(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(G.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):BF(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=RF[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(mF(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:JP(this.state.type)?e.name=eF(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(X.brace),this.next(),e=this.jsxParseExpressionContainer(e,X.j_oTag),e.expression.type===`JSXEmptyExpression`&&this.raise(GF.AttributeIsEmpty,e),e;case 138:case 130:return this.parseExprAtom();default:throw this.raise(GF.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(X.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(GF.UnexpectedSequenceExpression,t.expressions[1]),e.expression=t}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(e,`JSXExpressionContainer`)}jsxParseAttribute(){let e=this.startNode();return this.match(2)?(this.setContext(X.brace),this.next(),this.expect(17),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(X.j_oTag),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(e,`JSXSpreadAttribute`)):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(25)?this.jsxParseAttributeValue():null,this.finishNode(e,`JSXAttribute`))}jsxParseOpeningElementAt(e){let t=this.startNodeAt(e);return this.eat(139)?this.finishNode(t,`JSXOpeningFragment`):(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){let t=this.startNodeAt(e);return this.eat(139)?this.finishNode(t,`JSXClosingFragment`):(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)){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(X.brace),this.next(),this.match(17)?n.push(this.jsxParseSpreadChild(e)):n.push(this.jsxParseExpressionContainer(e,X.j_expr));break}default:this.unexpected()}KF(r)&&!KF(i)&&i!==null?this.raise(GF.MissingClosingTagFragment,i):(!KF(r)&&KF(i)||!KF(r)&&!KF(i)&&qF(i.name)!==qF(r.name))&&this.raise(GF.MissingClosingTagElement,i,{openingTagName:qF(r.name)})}if(KF(r)?(t.openingFragment=r,t.closingFragment=i):(t.openingElement=r,t.closingElement=i),t.children=n,this.match(43))throw this.raise(GF.UnwrappedAdjacentJSXElements,this.state.startLoc);return KF(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===X.j_expr){this.jsxReadToken();return}if(t===X.j_oTag||t===X.j_cTag){if(pF(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(139);return}if((e===34||e===39)&&t===X.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,X.j_cTag),this.state.canStartJSXElement=!1;else if(n===138)t.push(X.j_oTag);else if(n===139){let n=t[t.length-1];n===X.j_oTag&&e===52||n===X.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===X.j_expr):(this.setContext(X.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=UP(n)}},YF=class extends DF{tsNames=new Map},XF=class extends OF{importsStack=[];createScope(e){return this.importsStack.push(new Set),new YF(e)}enter(e){e===1024&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return e===1024&&this.importsStack.pop(),e}hasImport(e,t){let n=this.importsStack.length;if(this.importsStack[n-1].has(e))return!0;if(!t&&n>1){for(let t=0;t<n-1;t++)if(this.importsStack[t].has(e))return!0}return!1}declareName(e,t,n){if(t&4096){this.hasImport(e,!0)&&this.parser.raise(G.VarRedeclaration,n,{identifierName:e}),this.importsStack[this.importsStack.length-1].add(e);return}let r=this.currentScope(),i=r.tsNames.get(e)||0;if(t&1024){this.maybeExportDefined(r,e),r.tsNames.set(e,i|16);return}super.declareName(e,t,n),t&2&&(t&1||(this.checkRedeclarationInScope(r,e,t,n),this.maybeExportDefined(r,e)),i|=1),t&256&&(i|=2),t&512&&(i|=4),t&128&&(i|=8),i&&r.tsNames.set(e,i)}isRedeclaredInScope(e,t,n){let r=e.tsNames.get(t);return(r&2)>0?n&256?!!(n&512)!=(r&4)>0:!0:n&128&&(r&8)>0?e.names.get(t)&2?!!(n&1):!1:n&2&&(r&1)>0?!0:super.isRedeclaredInScope(e,t,n)}checkLocalExport(e){let{name:t}=e;if(this.hasImport(t))return;let n=this.scopeStack.length;for(let e=n-1;e>=0;e--){let n=this.scopeStack[e].tsNames.get(t);if((n&1)>0||(n&16)>0)return}super.checkLocalExport(e)}},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}};function QF(e,t){return(e?2:0)|(t?1:0)}var $F=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 eI(e,t){e.trailingComments===void 0?e.trailingComments=t:e.trailingComments.unshift(...t)}function tI(e,t){e.leadingComments===void 0?e.leadingComments=t:e.leadingComments.unshift(...t)}function nI(e,t){e.innerComments===void 0?e.innerComments=t:e.innerComments.unshift(...t)}function rI(e,t,n){let r=null,i=t.length;for(;r===null&&i>0;)r=t[--i];r===null||r.start>n.start?nI(e,n.comments):eI(r,n.comments)}var iI=class extends $F{addComment(e){this.filename&&(e.loc.filename=this.filename);let{commentsLen:t}=this.state;this.comments.length!==t&&(this.comments.length=t),this.comments.push(e),this.state.commentsLen++}processComment(e){let{commentStack:t}=this.state,n=t.length;if(n===0)return;let r=n-1,i=t[r];i.start===e.end&&(i.leadingNode=e,r--);let{start:a}=e;for(;r>=0;r--){let n=t[r],i=n.end;if(i>a)n.containingNode=e,this.finalizeComment(n),t.splice(r,1);else{i===a&&(n.trailingNode=e);break}}}finalizeComment(e){let{comments:t}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&eI(e.leadingNode,t),e.trailingNode!==null&&tI(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`:rI(n,n.properties,e);break;case`CallExpression`:case`OptionalCallExpression`:rI(n,n.arguments,e);break;case`ImportExpression`:rI(n,[n.source,n.options??null],e);break;case`FunctionDeclaration`:case`FunctionExpression`:case`ArrowFunctionExpression`:case`ObjectMethod`:case`ClassMethod`:case`ClassPrivateMethod`:rI(n,n.params,e);break;case`ArrayExpression`:case`ArrayPattern`:rI(n,n.elements,e);break;case`ExportNamedDeclaration`:case`ImportDeclaration`:rI(n,n.specifiers,e);break;case`TSEnumDeclaration`:nI(n,t);break;case`TSEnumBody`:rI(n,n.members,e);break;default:nI(n,t)}else nI(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}}},aI=class e{flags=1024;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 cP(r,i,n)}errors=[];potentialArrowAt=-1;noArrowAt=[];noArrowParamsConversionAt=[];get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};get soloAwait(){return(this.flags&256)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}labels=[];commentsLen=0;commentStack=[];pos=0;type=135;value=null;start=0;end=0;lastTokEndLoc=null;lastTokStartLoc=null;context=[X.brace];get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}firstInvalidTemplateEscapePos=null;get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}strictErrors=new Map;tokensLength=0;curPosition(){return new cP(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let t=new e;return t.flags=this.flags,t.startIndex=this.startIndex,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}},oI=function(e){return e>=48&&e<=57};const sI={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},cI={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 lI(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(uI(e,p,t,n)){l+=t.slice(d,n);break}if(p===92){l+=t.slice(d,n);let o=dI(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 uI(e,t,n,r){return e===`template`?t===96||t===36&&n.charCodeAt(r+1)===123:t===(e===`double`?34:39)}function dI(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}=fI(e,t,n,r,2,!1,o,a),s(i===null?null:String.fromCharCode(i))}case 117:{let i;return{code:i,pos:t}=mI(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 fI(e,t,n,r,i,a,o,s){let c=t,l;return{n:l,pos:t}=pI(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 pI(e,t,n,r,i,a,o,s,c,l){let u=t,d=i===16?sI.hex:sI.decBinOct,f=i===16?cI.hex:i===10?cI.dec:i===8?cI.oct:cI.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:oI(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 mI(e,t,n,r,i,a){let o=e.charCodeAt(t),s;if(o===123){if(++t,{code:s,pos:t}=fI(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}=fI(e,t,n,r,4,!1,i,a));return{code:s,pos:t}}function hI(e,t,n){return new cP(n,e-t,e)}const gI=new Set([103,109,115,105,121,117,100,118]);var _I=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 lP(e.startLoc,e.endLoc)}},vI=class extends iI{isLookahead;tokens=[];constructor(e,t){super(),this.state=new aI,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new _I(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 HF.lastIndex=e,HF.test(this.input)?HF.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 UF.lastIndex=e,UF.test(this.input)?UF.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(G.UnterminatedComment,this.state.curPosition());for(this.state.pos=r+e.length,zF.lastIndex=n+2;zF.test(this.input)&&zF.lastIndex<=r;)++this.state.curLine,this.state.lineStart=zF.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 lP(t,this.state.curPosition())};return this.optionFlags&256&&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(;!BF(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 lP(n,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(a),a}skipSpace(){let e=this.state.pos,t=this.optionFlags&4096?[]:null;loop:for(;this.state.pos<this.length;){let n=this.input.charCodeAt(this.state.pos);switch(n){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let e=this.skipBlockComment(`*/`);e!==void 0&&(this.addComment(e),t?.push(e));break}case 47:{let e=this.skipLineComment(2);e!==void 0&&(this.addComment(e),t?.push(e));break}default:break loop}break;default:if(WF(n))++this.state.pos;else if(n===45&&!this.inModule&&this.optionFlags&8192){let n=this.state.pos;if(this.input.charCodeAt(n+1)===45&&this.input.charCodeAt(n+2)===62&&(e===0||this.state.lineStart>e)){let e=this.skipLineComment(3);e!==void 0&&(this.addComment(e),t?.push(e))}else break loop}else if(n===60&&!this.inModule&&this.optionFlags&8192){let e=this.state.pos;if(this.input.charCodeAt(e+1)===33&&this.input.charCodeAt(e+2)===45&&this.input.charCodeAt(e+3)===45){let e=this.skipLineComment(4);e!==void 0&&(this.addComment(e),t?.push(e))}else break loop}else break loop}}if(t?.length>0){let n=this.state.pos,r={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(n),comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let n=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(n)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(G.UnexpectedDigitAfterHash,this.state.curPosition());pF(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;!BF(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(pF(e)){this.readWord(e);return}}throw this.raise(G.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(G.UnterminatedRegExp,uP(e,1));let t=this.input.charCodeAt(i);if(BF(t))throw this.raise(G.UnterminatedRegExp,uP(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=()=>uP(e,i+2-t);for(;i<this.length;){let e=this.codePointAtPos(i),t=String.fromCharCode(e);if(gI.has(e))e===118?o.includes(`u`)&&this.raise(G.IncompatibleRegExpUVFlags,s()):e===117&&o.includes(`v`)&&this.raise(G.IncompatibleRegExpUVFlags,s()),o.includes(t)&&this.raise(G.DuplicateRegExpFlags,s());else if(mF(e)||e===92)this.raise(G.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}=pI(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(G.InvalidDigit,uP(n,2),{radix:e}),this.input.charCodeAt(this.state.pos)===110&&(++this.state.pos,r=!0),pF(this.codePointAtPos(this.state.pos)))throw this.raise(G.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(G.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(G.StrictOctalLiteral,n),!this.state.strict){let t=e.indexOf(`_`);t>0&&this.raise(G.ZeroDigitNumericSeparator,uP(n,t))}a=o&&!/[89]/.test(e)}let s=this.input.charCodeAt(this.state.pos);if(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(G.InvalidOrMissingExponent,n),r=!0,s=this.input.charCodeAt(this.state.pos)),s===110&&((r||o)&&this.raise(G.InvalidBigIntLiteral,n),++this.state.pos,i=!0),pF(this.codePointAtPos(this.state.pos)))throw this.raise(G.NumberIdentifier,this.state.curPosition());let c=this.input.slice(t,this.state.pos).replace(/[_mn]/g,``);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}=mI(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}=lI(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}=lI(`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 cP(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(mF(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?pF:mF;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(G.MissingUnicodeEscape,this.state.curPosition()),r=this.state.pos-1;continue}++this.state.pos;let a=this.readCodePoint(!0);a!==null&&(i(a)||this.raise(G.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=AP.get(t);n===void 0?this.finishToken(128,t):this.finishToken(n,eF(n))}checkKeywordEscapes(){let{type:e}=this.state;JP(e)&&this.state.containsEsc&&this.raise(G.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:eF(e)})}raise(e,t,n={}){let r=e(t instanceof cP?t:t.loc.start,n);if(!(this.optionFlags&2048))throw r;return this.isLookahead||this.state.errors.push(r),r}raiseOverwrite(e,t,n={}){let r=t instanceof cP?t:t.loc.start,i=r.index,a=this.state.errors;for(let t=a.length-1;t>=0;t--){let o=a[t];if(o.loc.index===i)return a[t]=e(r,n);if(o.loc.index<i)break}return this.raise(e,t,n)}updateContext(e){}unexpected(e,t){throw this.raise(G.UnexpectedToken,e??this.state.startLoc,{expected:t?eF(t):null})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(G.MissingPlugin,t??this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(e=>this.hasPlugin(e)))throw this.raise(G.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(t,n,r)=>{this.raise(e,hI(t,n,r))}}errorHandlers_readInt={invalidDigit:(e,t,n,r)=>this.optionFlags&2048?(this.raise(G.InvalidDigit,hI(e,t,n),{radix:r}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(G.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(G.UnexpectedNumericSeparator)};errorHandlers_readCodePoint={...this.errorHandlers_readInt,invalidEscapeSequence:this.errorBuilder(G.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(G.InvalidCodePoint)};errorHandlers_readStringContents_string={...this.errorHandlers_readCodePoint,strictNumericEscape:(e,t,n)=>{this.recordStrictModeErrors(G.StrictNumericEscape,hI(e,t,n))},unterminated:(e,t,n)=>{throw this.raise(G.UnterminatedString,hI(e-1,t,n))}};errorHandlers_readStringContents_template={...this.errorHandlers_readCodePoint,strictNumericEscape:this.errorBuilder(G.StrictNumericEscape),unterminated:(e,t,n)=>{throw this.raise(G.UnterminatedTemplate,hI(e,t,n))}}},yI=class{privateNames=new Set;loneAccessors=new Map;undefinedPrivateNames=new Map},bI=class{parser;stack=[];undefinedPrivateNames=new Map;constructor(e){this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new yI)}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(G.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(G.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(G.InvalidPrivateFieldResolution,t,{identifierName:e})}},xI=class{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},SI=class extends xI{declarationErrors=new Map;constructor(e){super(e)}recordDeclarationError(e,t){let n=t.index;this.declarationErrors.set(n,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}},CI=class{parser;stack=[new xI];constructor(e){this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){let n=t.loc.start,{stack:r}=this,i=r.length-1,a=r[i];for(;!a.isCertainlyParameterDeclaration();){if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(e,n);else return;a=r[--i]}this.parser.raise(e,n)}recordArrowParameterBindingError(e,t){let{stack:n}=this,r=n[n.length-1],i=t.loc.start;if(r.isCertainlyParameterDeclaration())this.parser.raise(e,i);else if(r.canBeArrowParameterDeclaration())r.recordDeclarationError(e,i);else return}recordAsyncArrowParametersError(e){let{stack:t}=this,n=t.length-1,r=t[n];for(;r.canBeArrowParameterDeclaration();)r.type===2&&r.recordDeclarationError(G.AwaitBindingIdentifier,e),r=t[--n]}validateAsPattern(){let{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors(([t,n])=>{this.parser.raise(t,n);let r=e.length-2,i=e[r];for(;i.canBeArrowParameterDeclaration();)i.clearDeclarationError(n.index),i=e[--r]})}};function wI(){return new xI(3)}function TI(){return new SI(1)}function EI(){return new SI(2)}function DI(){return new xI}var OI=class extends vI{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!(mF(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 VF(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return VF(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(G.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(G.InvalidCoverInitializedName,n),r!=null&&this.raise(G.DuplicateProto,r),i!=null&&this.raise(G.UnexpectedPrivateField,i),a!=null&&this.unexpected(a),o!=null&&this.raise(G.InvalidCoverDiscardElement,o)}isLiteralPropertyName(){return HP(this.state.type)}isPrivateName(e){return e.type===`PrivateName`}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return(e.type===`MemberExpression`||e.type===`OptionalMemberExpression`)&&this.isPrivateName(e.property)}isObjectProperty(e){return e.type===`ObjectProperty`}isObjectMethod(e){return e.type===`ObjectMethod`}initializeScopes(e=this.options.sourceType===`module`){let t=this.state.labels;this.state.labels=[];let n=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let r=this.inModule;this.inModule=e;let i=this.scope;this.scope=new(this.getScopeHandler())(this,e);let a=this.prodParam;this.prodParam=new ZF;let o=this.classScope;this.classScope=new bI(this);let s=this.expressionScope;return this.expressionScope=new CI(this),()=>{this.state.labels=t,this.exportedIdentifiers=n,this.inModule=r,this.scope=i,this.prodParam=a,this.classScope=o,this.expressionScope=s}}enterInitialScopes(){let e=0;(this.inModule||this.optionFlags&1)&&(e|=2),this.optionFlags&32&&(e|=1);let t=!this.inModule&&this.options.sourceType===`commonjs`;(t||this.optionFlags&2)&&(e|=4),this.prodParam.enter(e);let n=t?514:1;this.optionFlags&4&&(n|=512),this.optionFlags&16&&(n|=48),this.scope.enter(n)}checkDestructuringPrivate(e){let{privateKeyLoc:t}=e;t!==null&&this.expectPlugin(`destructuringPrivate`,t)}},kI=class{shorthandAssignLoc=null;doubleProtoLoc=null;privateKeyLoc=null;optionalParametersLoc=null;voidPatternLoc=null},AI=class{constructor(e,t,n){this.start=t,this.end=0,this.loc=new lP(n),e?.optionFlags&128&&(this.range=[t,0]),e?.filename&&(this.loc.filename=e.filename)}type=``};const jI=AI.prototype;var MI=class extends OI{startNode(){let e=this.state.startLoc;return new AI(this,e.index,e)}startNodeAt(e){return new AI(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,n){return e.type=t,e.end=n.index,e.loc.end=n,this.optionFlags&128&&(e.range[1]=n.index),this.optionFlags&4096&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,this.optionFlags&128&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,this.optionFlags&128&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}castNodeTo(e,t){return e.type=t,e}cloneIdentifier(e){let{type:t,start:n,end:r,loc:i,range:a,name:o}=e,s=Object.create(jI);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(jI);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 NI=e=>e.type===`ParenthesizedExpression`?NI(e.expression):e;var PI=class extends MI{toAssignable(e,t=!1){let n;switch((e.type===`ParenthesizedExpression`||e.extra?.parenthesized)&&(n=NI(e),t?n.type===`Identifier`?this.expressionScope.recordArrowParameterBindingError(G.InvalidParenthesizedAssignment,e):n.type!==`CallExpression`&&n.type!==`MemberExpression`&&!this.isOptionalMemberExpression(n)&&this.raise(G.InvalidParenthesizedAssignment,e):this.raise(G.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(G.RestTrailingComma,e.extra.trailingCommaLoc)}break;case`ObjectProperty`:{let{key:n,value:r}=e;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.loc.start),this.toAssignable(r,t);break}case`SpreadElement`:throw Error(`Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.`);case`ArrayExpression`:this.castNodeTo(e,`ArrayPattern`),this.toAssignableList(e.elements,e.extra?.trailingCommaLoc,t);break;case`AssignmentExpression`:e.operator!==`=`&&this.raise(G.MissingEqInAssignment,e.left.loc.end),this.castNodeTo(e,`AssignmentPattern`),delete e.operator,e.left.type===`VoidPattern`&&this.raise(G.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`?G.PatternHasAccessor:G.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(G.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(G.RestTrailingComma,a):t&&this.raise(G.RestTrailingComma,t)))}}toAssignableListItem(e,t,n){let r=e[t];if(r.type===`SpreadElement`){this.castNodeTo(r,`RestElement`);let e=r.argument;this.checkToRestConversion(e,!0),this.toAssignable(e,n)}else this.toAssignable(r,n)}isAssignable(e,t){switch(e.type){case`Identifier`:case`ObjectPattern`:case`ArrayPattern`:case`AssignmentPattern`:case`RestElement`:case`VoidPattern`:return!0;case`ObjectExpression`:{let t=e.properties.length-1;return e.properties.every((e,n)=>e.type!==`ObjectMethod`&&(n===t||e.type!==`SpreadElement`)&&this.isAssignable(e))}case`ObjectProperty`:return this.isAssignable(e.value);case`SpreadElement`:return this.isAssignable(e.argument);case`ArrayExpression`:return e.elements.every(e=>e===null||this.isAssignable(e));case`AssignmentExpression`:return e.operator===`=`;case`ParenthesizedExpression`:return this.isAssignable(e.expression);case`MemberExpression`:case`OptionalMemberExpression`:return!t;default:return!1}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(let t of e)t?.type===`ArrayExpression`&&this.toReferencedListDeep(t.elements)}parseSpread(e){let t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(t,`SpreadElement`)}parseRestBinding(){let e=this.startNode();this.next();let t=this.parseBindingAtom();return t.type===`VoidPattern`&&this.raise(G.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(G.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(G.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 n=this.parseMaybeDefault();return e&2&&this.parseFunctionParamType(n),t.length&&(n.decorators=t,this.resetStartLocationFromNode(n,t[0])),this.parseMaybeDefault(n.loc.start,n)}parseFunctionParamType(e){return e}parseMaybeDefault(e,t){if(e??=this.state.startLoc,t??=this.parseBindingAtom(),!this.eat(25))return t;let n=this.startNodeAt(e);return t.type===`VoidPattern`&&this.raise(G.VoidPatternInitializer,t),n.left=t,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,`AssignmentPattern`)}isValidLVal(e,t,n,r){switch(e){case`AssignmentPattern`:return`left`;case`RestElement`:return`argument`;case`ObjectProperty`:return`value`;case`ParenthesizedExpression`:return`expression`;case`ArrayPattern`:return`elements`;case`ObjectPattern`:return`properties`;case`VoidPattern`:return!0;case`CallExpression`:if(!t&&!this.state.strict&&this.optionFlags&8192)return!0}return!1}isOptionalMemberExpression(e){return e.type===`OptionalMemberExpression`}checkLVal(e,t,n=64,r=!1,i=!1,a=!1,o=!1){let s=e.type;if(this.isObjectMethod(e))return;let c=this.isOptionalMemberExpression(e);if(c||s===`MemberExpression`){c&&(this.expectPlugin(`optionalChainingAssign`,e.loc.start),t.type!==`AssignmentExpression`&&this.raise(G.InvalidLhsOptionalChaining,e,{ancestor:t})),n!==64&&this.raise(G.InvalidPropertyBindingPattern,e);return}if(s===`Identifier`){this.checkIdentifier(e,n,i);let{name:t}=e;r&&(r.has(t)?this.raise(G.ParamDupe,e):r.add(t));return}else s===`VoidPattern`&&t.type===`CatchClause`&&this.raise(G.VoidPatternCatchClauseParam,e);let l=NI(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?G.InvalidLhs:G.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?SF(e.name,this.inModule):xF(e.name))&&(t===64?this.raise(G.StrictEvalArguments,e,{referenceName:e.name}):this.raise(G.StrictEvalArgumentsBinding,e,{bindingName:e.name})),t&8192&&e.name===`let`&&this.raise(G.LetInLexicalBinding,e),t&64||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.loc.start)}checkToRestConversion(e,t){switch(e.type){case`ParenthesizedExpression`:this.checkToRestConversion(e.expression,t);break;case`Identifier`:case`MemberExpression`:break;case`ArrayExpression`:case`ObjectExpression`:if(t)break;default:this.raise(G.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return this.match(8)?(this.raise(this.lookaheadCharCode()===e?G.RestTrailingComma:G.ElementAfterRest,this.state.startLoc),!0):!1}};const FI=/in(?:stanceof)?|as|satisfies/y;function II(e){if(e==null)throw Error(`Unexpected ${e} value.`);return e}function LI(e){if(!e)throw Error(`Assert fail`)}const Q=SP`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.`});function RI(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 zI(e){return e===`private`||e===`public`||e===`protected`}function BI(e){return e===`in`||e===`out`}function VI(e){if(e.extra?.parenthesized)return!1;switch(e.type){case`Identifier`:return!0;case`MemberExpression`:return!e.computed&&VI(e.object);case`TSInstantiationExpression`:return VI(e.expression);default:return!1}}var HI=e=>class extends e{getScopeHandler(){return XF}tsIsIdentifier(){return Y(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(!Y(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=Q.InvalidModifierOnTypeMember},i){let a=(e,t,n,r)=>{t===n&&i[r]&&this.raise(Q.InvalidModifiersOrder,e,{orderedModifiers:[n,r]})},o=(e,t,n,r)=>{(i[n]&&t===r||i[r]&&t===n)&&this.raise(Q.IncompatibleModifiers,e,{modifiers:[n,r]})};for(;;){let{startLoc:s}=this.state,c=this.tsParseModifier(e.concat(t??[]),n,i.static);if(!c)break;zI(c)?i.accessibility?this.raise(Q.DuplicateAccessibilityModifier,s,{modifier:c}):(a(s,c,c,`override`),a(s,c,c,`static`),a(s,c,c,`readonly`),i.accessibility=c):BI(c)?(i[c]&&this.raise(Q.DuplicateModifier,s,{modifier:c}),i[c]=!0,a(s,c,`in`,`out`)):(Object.hasOwn(i,c)?this.raise(Q.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 II(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(Q.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;Y(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:Q.InvalidModifierOnTypeParameter});tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:[`const`],disallowedModifiers:[`in`,`out`],errorTemplate:Q.InvalidModifierOnTypeParameterPositions});tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:[`in`,`out`,`const`],disallowedModifiers:[`public`,`private`,`protected`,`readonly`,`declare`,`abstract`,`override`],errorTemplate:Q.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(Q.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(Q.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(),Y(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(Q.ReadonlyForMethodSignature,e);let n=e;if(n.kind&&this.match(43)&&this.raise(Q.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(10,n),this.tsParseTypeMemberSemicolon(),n.kind===`get`)n.params.length>0&&(this.raise(G.BadGetterArity,this.state.curPosition()),this.isThisParam(n.params[0])&&this.raise(Q.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(n.kind===`set`){if(n.params.length!==1)this.raise(G.BadSetterArity,this.state.curPosition());else{let e=n.params[0];this.isThisParam(e)&&this.raise(Q.AccessorCannotDeclareThisParameter,this.state.curPosition()),e.type===`Identifier`&&e.optional&&this.raise(Q.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),e.type===`RestElement`&&this.raise(Q.SetAccessorCannotHaveRestParameter,this.state.curPosition())}n.returnType&&this.raise(Q.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(Q.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=VP(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(Q.TupleOptionalAfterType,this.state.lastTokStartLoc))):(e=this.startNodeAt(n),e.optional=a,this.raise(Q.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&1024)){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(Y(e)||e===84||e===80){let t=e===84?`TSVoidKeyword`:e===80?`TSNullKeyword`:RI(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(Q.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 QP(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(Y(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(),!Y(this.state.type)&&!this.match(74)?!1:(e&&this.raise(G.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(){LI(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(Q.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=super.parseExprSubscripts();VI(t)||this.raise(Q.InvalidHeritageClauseType,t.loc.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(Q.EmptyHeritageClauseType,t,{token:e}),n}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(125),t.declare&&(e.declare=!0),Y(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(Q.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()!==X.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(){let e=this.startNode();return this.scope.enter(0),this.expect(2),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,4),this.scope.exit(),this.finishNode(e,`TSModuleBlock`)}tsParseNamespaceDeclaration(e){return e.id=this.tsParseEntityName(1),e.id.type===`Identifier`&&this.checkIdentifier(e.id,1024),this.scope.enter(1024),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit(),this.finishNode(e,`TSModuleDeclaration`)}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(108)?(e.kind=`global`,e.id=this.parseIdentifier()):(e.kind=`module`,e.id=super.parseStringLiteral(this.state.value)),this.match(2)?(this.scope.enter(1024),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,`TSModuleDeclaration`)}tsParseImportEqualsDeclaration(e,t){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(Q.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(Q.InvalidModifierOnUsingDeclaration,this.state.startLoc,`declare`),e.declare=!0,this.parseVarStatement(e,`using`,!0);break;case 92:if(this.isAwaitUsing())return this.raise(Q.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(Y(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)||Y(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)&&Y(this.state.type))return e.kind=`namespace`,this.tsParseNamespaceDeclaration(e);break;case 126:if(this.tsCheckLineTerminator(n)&&Y(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.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let n=this.tsTryParseAndCatch(()=>{let t=this.startNodeAt(e);return t.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(t),t.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(15),t});if(this.state.maybeInArrowParameters=t,n)return super.parseArrowExpression(n,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(Q.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===X.brace&&this.reScan_lt_gt(),this.expect(44),this.finishNode(e,`TSTypeParameterInstantiation`)}tsIsDeclarationStart(){return $P(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(e,t){let n=t.length?t[0].loc.start:this.state.startLoc,r={};this.tsParseModifiers({allowedModifiers:[`public`,`private`,`protected`,`override`,`readonly`]},r);let i=r.accessibility,a=r.override,o=r.readonly;!(e&4)&&(i||o||a)&&this.raise(Q.UnexpectedParameterModifier,n);let s=this.parseMaybeDefault();e&2&&this.parseFunctionParamType(s);let c=this.parseMaybeDefault(s.loc.start,s);if(i||o||a){let e=this.startNodeAt(n);return t.length&&(e.decorators=t),i&&(e.accessibility=i),o&&(e.readonly=o),a&&(e.override=a),c.type!==`Identifier`&&c.type!==`AssignmentPattern`&&this.raise(Q.UnsupportedParameterPropertyKind,e),e.parameter=c,this.finishNode(e,`TSParameterProperty`)}return t.length&&(s.decorators=t),c}isSimpleParameter(e){return e.type===`TSParameterProperty`&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let t of e.params)t.type!==`Identifier`&&t.optional&&!this.state.isAmbientContext&&this.raise(Q.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;return r&&!this.match(2)&&this.isLineTerminator()?this.finishNode(e,r):r===`TSDeclareFunction`&&this.state.isAmbientContext&&(this.raise(Q.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,r,n):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,n))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(e=>{e?.type===`TSTypeCastExpression`&&this.raise(Q.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(rF(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&&WP(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(Q.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(tF(54)>n&&!this.hasPrecedingLineBreak()&&(this.isContextual(89)||(r=this.isContextual(116)))){let i=this.startNodeAt(t);return i.expression=e,i.typeAnnotation=this.tsInType(()=>(this.next(),this.match(71)?(r&&this.raise(G.UnexpectedKeyword,this.state.startLoc,{keyword:`const`}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(i,r?`TSSatisfiesExpression`:`TSAsExpression`),this.reScan_lt_gt(),this.parseExprOp(i,t,n)}return super.parseExprOp(e,t,n)}checkReservedWord(e,t,n,r){this.state.isAmbientContext||super.checkReservedWord(e,t,n,r)}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`,super.parseImport(e);let t;if(Y(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind=`value`,this.tsParseImportEqualsDeclaration(e);if(this.isContextual(126)){let n=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,n);t=super.parseImportSpecifiersAndAfter(e,n)}else t=super.parseImport(e);return t.importKind===`type`&&t.specifiers.length>1&&t.specifiers[0].type===`ImportDefaultSpecifier`&&this.raise(Q.TypeImportCannotSpecifyDefaultAndNamed,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.finishNode(t,`TSExportAssignment`)}else if(this.eatContextual(89)){let t=e;return this.expectContextual(124),t.id=this.parseIdentifier(),this.semicolon(),this.finishNode(t,`TSNamespaceExportDeclaration`)}else return super.parseExport(e,t)}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(Q.UsingDeclarationInAmbientContext,e,t),i;for(let{id:e,init:n}of i.declarations)n&&(t===`var`||t===`let`||e.typeAnnotation?this.raise(Q.InitializerNotAllowedInAmbientContext,n):WI(n,this.hasPlugin(`estree`))||this.raise(Q.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,n));return i}parseStatementContent(e,t){if(!this.state.containsEsc)switch(this.state.type){case 71:if(this.isLookaheadContextual(`enum`)){let e=this.startNode();return this.expect(71),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.startNodeAt(n.loc.start),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 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(Q.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 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=>zI(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:Q.InvalidModifierOnTypeParameterPositions},t);let i=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,r)&&this.raise(Q.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(Q.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(Q.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(Q.IndexSignatureHasDeclare,t),t.override&&this.raise(Q.IndexSignatureHasOverride,t);return}!this.state.inAbstractClass&&t.abstract&&this.raise(Q.NonAbstractClassHasAbstractMethod,t),t.override&&(n.hadSuperClass||this.raise(Q.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,n,r)}parsePostMemberNameModifiers(e){this.eat(13)&&(e.optional=!0),e.readonly&&this.match(6)&&this.raise(Q.ClassMethodHasReadonly,e),e.declare&&this.match(6)&&this.raise(Q.ClassMethodHasDeclare,e)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,t,n){if(!this.match(13))return e;if(this.state.maybeInArrowParameters){let t=this.lookaheadCharCode();if(t===44||t===61||t===58||t===41)return this.setOptionalParametersError(n),e}return super.parseConditional(e,t,n)}parseParenItem(e,t){let n=super.parseParenItem(e,t);if(this.eat(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(Q.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let r=Y(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))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(Q.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(25)){let{key:t}=e;this.raise(Q.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(Q.PrivateElementHasAbstract,e),e.accessibility&&this.raise(Q.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(Q.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,n,r,i,a){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&i&&this.raise(Q.ConstructorHasTypeParameters,o);let{declare:s=!1,kind:c}=t;s&&(c===`get`||c===`set`)&&this.raise(Q.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){super.parseClassSuper(e),e.superClass&&(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===X.j_oTag||a===X.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(Q.SingleTypeParameterWithoutTrailingComma,uP(e.loc.end,1),{typeParameterName:e.name.name})}return r},n);if(!o.error&&!o.aborted)return a&&this.reportReservedArrowTypeParam(a),o.node;if(!r&&(LI(!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(Q.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(Q.UnexpectedTypeCastInParameter,e):this.raise(Q.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(Q.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.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(10)?e.every(e=>this.isAssignable(e,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(10)||super.shouldParseAsyncArrow()}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(Q.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(Q.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.loc.start;if(this.isContextual(89)){let e=this.parseIdentifier();if(this.isContextual(89)){let n=this.parseIdentifier();VP(this.state.type)?(s=!0,a=e,o=t?this.parseIdentifier():this.parseModuleExportName(),c=!1):(o=n,c=!1)}else VP(this.state.type)?(c=!1,o=t?this.parseIdentifier():this.parseModuleExportName()):(s=!0,a=e)}else VP(this.state.type)&&(s=!0,t?(a=this.parseIdentifier(!0),this.isContextual(89)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());s&&n&&this.raise(t?Q.TypeModifierIsUsedInTypeImports:Q.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(pF(e)){if(FI.lastIndex=t,FI.test(this.input)){let e=this.codePointAtPos(FI.lastIndex);if(!mF(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 UI(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:qI(e.object)}function WI(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!!(GI(e,t)||KI(e,t)||n===`TemplateLiteral`&&e.expressions.length===0||UI(e))}function GI(e,t){return t?e.type===`Literal`&&(typeof e.value==`number`||`bigint`in e):e.type===`NumericLiteral`||e.type===`BigIntLiteral`}function KI(e,t){if(e.type===`UnaryExpression`){let{operator:n,argument:r}=e;if(n===`-`&&GI(r,t))return!0}return!1}function qI(e){return e.type===`Identifier`?!0:e.type!==`MemberExpression`||e.computed?!1:qI(e.object)}const JI=SP`placeholders`({ClassNameIsRequired:`A class name is required.`,UnexpectedSpace:`Unexpected space in placeholder.`});var YI=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(JI.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(eF(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(JI.UnexpectedSpace,this.state.lastTokEndLoc)}},XI=e=>class extends e{parseV8Intrinsic(){if(this.match(50)){let e=this.state.startLoc,t=this.startNode();if(this.next(),Y(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)}};const ZI=[`fsharp`,`hack`],QI=[`^^`,`@@`,`^`,`%`,`#`];function $I(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(!ZI.includes(t)){let e=ZI.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(!QI.includes(t)){let e=QI.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 eL={estree:OP,jsx:JF,flow:LF,typescript:HI,v8intrinsic:XI,placeholders:YI},tL=Object.keys(eL);var nL=class extends PI{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=r.loc.start):this.raise(G.DuplicateProto,r)),!0):t}shouldExitDescending(e,t){return e.type===`ArrowFunctionExpression`&&this.offsetToSourcePos(e.start)===t}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(135))throw this.raise(G.ParseExpressionEmptyInput,this.state.startLoc);let e=this.parseExpression();if(!this.match(135))throw this.raise(G.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,this.optionFlags&256&&(e.tokens=sL(this.tokens)),e}parseExpression(e,t){return e?this.disallowInAnd(()=>this.parseExpressionBase(t)):this.allowInAnd(()=>this.parseExpressionBase(t))}parseExpressionBase(e){let t=this.state.startLoc,n=this.parseMaybeAssign(e);if(this.match(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 kI,i=!0);let{type:a}=this.state;(a===6||Y(a))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(e);if(t&&(o=t.call(this,o,n)),GP(this.state.type)){let t=this.startNodeAt(n),r=this.state.value;if(t.operator=r,this.match(25)){this.toAssignable(o,!0),t.left=o;let r=n.index;e.doubleProtoLoc!=null&&e.doubleProtoLoc.index>=r&&(e.doubleProtoLoc=null),e.shorthandAssignLoc!=null&&e.shorthandAssignLoc.index>=r&&(e.shorthandAssignLoc=null),e.privateKeyLoc!=null&&e.privateKeyLoc.index>=r&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null),e.voidPatternLoc!=null&&e.voidPatternLoc.index>=r&&(e.voidPatternLoc=null)}else t.left=o;return this.next(),t.right=this.parseMaybeAssign(),this.checkLVal(o,this.finishNode(t,`AssignmentExpression`),void 0,void 0,void 0,void 0,r===`||=`||r===`&&=`||r===`??=`),t}else i&&this.checkExpressionErrors(e,!0);if(r){let{type:e}=this.state;if((this.hasPlugin(`v8intrinsic`)?WP(e):WP(e)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(G.YieldNotInGeneratorFunction,n),this.parseYield(n)}return o}parseMaybeConditional(e){let t=this.state.startLoc,n=this.state.potentialArrowAt,r=this.parseExprOps(e);return this.shouldExitDescending(r,n)?r:this.parseConditional(r,t,e)}parseConditional(e,t,n){if(this.eat(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.state.potentialArrowAt,r=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(r,n)?r:this.parseExprOp(r,t,-1)}parseExprOp(e,t,n){if(this.isPrivateName(e)){let t=this.getPrivateNameSV(e);(n>=tF(54)||!this.prodParam.hasIn||!this.match(54))&&this.raise(G.PrivateInExpectedIn,e,{identifierName:t}),this.classScope.usePrivateName(t,e.loc.start)}let r=this.state.type;if(YP(r)&&(this.prodParam.hasIn||!this.match(54))){let i=tF(r);if(i>n){if(r===35&&(this.expectPlugin(`pipelineOperator`),this.state.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=tF(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(G.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.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(t))}default:return this.parseExprOpBaseRightExpr(e,t)}}parseExprOpBaseRightExpr(e,t){let n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),n,nF(e)?t-1:t)}parseHackPipeBody(){let{startLoc:e}=this.state,t=this.parseMaybeAssign();return vP.has(t.type)&&!t.extra?.parenthesized&&this.raise(G.PipeUnparenthesizedBody,e,{type:t.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(G.PipeTopicUnused,e),t}checkExponentialAfterUnary(e){this.match(53)&&this.raise(G.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(ZP(this.state.type)){a.operator=this.state.value,a.prefix=!0,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(G.StrictDelete,a):this.hasPropertyAsPrivateName(e)&&this.raise(G.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`)?WP(e):WP(e)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(G.AwaitNotInAsyncContext,n),this.parseAwait(n)}return o}parseUpdate(e,t,n){if(t){let t=e;return this.checkLVal(t.argument,this.finishNode(t,`UpdateExpression`)),e}let r=this.state.startLoc,i=this.parseExprSubscripts(n);if(this.checkExpressionErrors(n,!1))return i;for(;XP(this.state.type)&&!this.canInsertSemicolon();){let e=this.startNodeAt(r);e.operator=this.state.value,e.prefix=!1,e.argument=i,this.next(),this.checkLVal(i,i=this.finishNode(e,`UpdateExpression`))}return i}parseExprSubscripts(e){let t=this.state.startLoc,n=this.state.potentialArrowAt,r=this.parseExprAtom(e);return this.shouldExitDescending(r,n)?r:this.parseSubscripts(r,t)}parseSubscripts(e,t,n){let r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do e=this.parseSubscript(e,t,n,r),r.maybeAsyncArrow=!1;while(!r.stop);return e}parseSubscript(e,t,n,r){let{type:i}=this.state;if(!n&&i===11)return this.parseBind(e,t,n,r);if(rF(i))return this.parseTaggedTemplateExpression(e,t,r);let a=!1;if(i===14){if(n&&(this.raise(G.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(G.SuperPrivateField,t),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),n.optionalChainMember?(a.optional=i,this.finishNode(a,`OptionalMemberExpression`)):this.finishNode(a,`MemberExpression`)}parseBind(e,t,n,r){let i=this.startNodeAt(t);return i.object=e,this.next(),i.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(i,`BindExpression`),t,n)}parseCoverCallAndAsyncArrowHead(e,t,n,r){let i=this.state.maybeInArrowParameters,a=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(t);o.callee=e;let{maybeAsyncArrow:s,optionalChainMember:c}=n;s&&(this.expressionScope.enter(EI()),a=new kI),c&&(o.optional=r),r?o.arguments=this.parseCallExpressionArguments():o.arguments=this.parseCallExpressionArguments(e.type!==`Super`,o,a);let l=this.finishCallExpression(o,c);return s&&this.shouldParseAsyncArrow()&&!r?(n.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),l=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),l)):(s&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(l)),this.state.maybeInArrowParameters=i,l}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,n){let r=this.startNodeAt(t);return r.tag=e,r.quasi=this.parseTemplate(!0),n.optionalChainMember&&this.raise(G.OptionalChainingNoTemplate,t),this.finishNode(r,`TaggedTemplateExpression`)}atPossibleAsyncArrow(e){return e.type===`Identifier`&&e.name===`async`&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.offsetToSourcePos(e.start)===this.state.potentialArrowAt}finishCallExpression(e,t){if(e.callee.type===`Import`)if(e.arguments.length===0||e.arguments.length>2)this.raise(G.ImportCallArity,e);else for(let t of e.arguments)t.type===`SpreadElement`&&this.raise(G.ImportCallSpreadArgument,t);return this.finishNode(e,t?`OptionalCallExpression`:`CallExpression`)}parseCallExpressionArguments(e,t,n){let r=[],i=!0,a=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(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 this.state.inFSharpPipelineDirectBody=a,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&&nI(e,t.innerComments),t.callee.trailingComments&&nI(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&512?this.parseImportCall(t):this.finishNode(t,`Import`):(this.raise(G.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:{let e=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(e)}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(G.UnsupportedBind,e)}case 134:return this.raise(G.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 pF(e)||e===62?this.expectOnePlugin([`jsx`,`flow`,`typescript`]):this.unexpected()}default:if(Y(r)){if(this.isContextual(123)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let e=this.state.potentialArrowAt===this.state.start,t=this.state.containsEsc,n=this.parseIdentifier();if(!t&&n.name===`async`&&!this.canInsertSemicolon()){let{type:e}=this.state;if(e===64)return this.resetPreviousNodeTrailingComments(n),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(n));if(Y(e))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(n)):n;if(e===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=uP(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(G.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(e,`TopicReference`);throw this.raise(G.PipeTopicUnconfiguredToken,t,{token:eF(r)})}testTopicReferenceConfiguration(e,t,n){switch(e){case`hack`:return this.hasPlugin([`pipelineOperator`,{topicToken:eF(n)}]);default:throw this.raise(G.PipeTopicRequiresHackPipes,t)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(QF(!0,this.prodParam.hasYield));let t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(G.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(G.SuperNotAllowed,e):this.scope.allowSuper||this.raise(G.UnexpectedSuper,e),!this.match(6)&&!this.match(0)&&!this.match(12)&&this.raise(G.UnsupportedSuper,e),this.finishNode(e,`Super`)}parsePrivateName(){let e=this.startNode(),t=this.startNodeAt(uP(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(G.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(G.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(TI());let r=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let a=this.state.startLoc,o=[],s=new kI,c=!0,l,u;for(;!this.match(7);){if(c)c=!1;else if(this.expect(8,s.optionalParametersLoc===null?null:s.optionalParametersLoc),this.match(7)){u=this.state.startLoc;break}if(this.match(17)){let e=this.state.startLoc;if(l=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),e)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowInOrVoidPattern(7,s,this.parseParenItem))}let d=this.state.lastTokEndLoc;this.expect(7),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=i;let f=this.startNodeAt(t);return e&&this.shouldParseArrow(o)&&(f=this.parseArrow(f))?(this.checkDestructuringPrivate(s),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(f,o,!1),f):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),u&&this.unexpected(u),l&&this.unexpected(l),this.checkExpressionErrors(s,!0),this.toReferencedListDeep(o,!0),o.length>1?(n=this.startNodeAt(a),n.expressions=o,this.finishNode(n,`SequenceExpression`),this.resetEndLocation(n,d)):n=o[0],this.wrapParenthesis(t,n))}wrapParenthesis(e,t){if(!(this.optionFlags&1024))return this.addExtra(t,`parenthesized`,!0),this.addExtra(t,`parenStart`,e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;let n=this.startNodeAt(e);return n.expression=t,this.finishNode(n,`ParenthesizedExpression`)}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(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(G.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===`Import`||n.type===`ImportExpression`)&&this.raise(G.ImportCallNotNewExpression,n)}parseTemplateElement(e){let{start:t,startLoc:n,end:r,value:i}=this.state,a=t+1,o=this.startNodeAt(uP(n,1));i===null&&(e||this.raise(G.InvalidEscapeSequenceTemplate,uP(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,uP(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=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let i=!1,a=!0,o=this.startNode();for(o.properties=[],this.next();!this.match(e);){if(a)a=!1;else if(this.expect(8),this.match(e)){this.addTrailingCommaExtraToNode(o);break}let r;t?r=this.parseBindingProperty():(r=this.parsePropertyDefinition(n),i=this.checkProto(r,i,n)),o.properties.push(r)}this.next(),this.state.inFSharpPipelineDirectBody=r;let s=t?`ObjectPattern`:`ObjectExpression`;return this.finishNode(o,s)}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(G.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,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(G.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`?G.BadGetterArity:G.BadSetterArity,e),e.kind===`set`&&n[n.length-1]?.type===`RestElement`&&this.raise(G.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.loc.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(G.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(VP(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(G.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(QF(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.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let r=this.startNode();return this.next(),r.elements=this.parseExprList(e,!0,t,r),this.state.inFSharpPipelineDirectBody=n,this.finishNode(r,`ArrayExpression`)}parseArrowExpression(e,t,n,r){this.scope.enter(518);let i=QF(n,!1);!this.match(2)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(e,n);let a=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(e,`ArrowFunctionExpression`)}setArrowFunctionParameters(e,t,n){this.toAssignableList(t,n,!1),e.params=t}parseFunctionBodyAndFinish(e,t,n=!1){return this.parseFunctionBody(e,!1,n),this.finishNode(e,t)}parseFunctionBody(e,t,n=!1){let r=t&&!this.match(2);if(this.expressionScope.enter(DI()),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(G.IllegalLanguageModeDirective,(e.kind===`method`||e.kind===`constructor`)&&e.key?e.key.loc.end:e);let o=!r&&this.state.strict;this.checkParams(e,!this.state.strict&&!t&&!n&&!a,t,o),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,o)}),this.prodParam.exit(),this.state.labels=i}this.expressionScope.exit()}isSimpleParameter(e){return e.type===`Identifier`}isSimpleParamList(e){for(let t=0,n=e.length;t<n;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,n,r=!0){let i=!t&&new Set,a={type:`FormalParameters`};for(let t of e.params)this.checkLVal(t,a,5,i,r)}parseExprList(e,t,n,r){let i=[],a=!0;for(;!this.eat(e);){if(a)a=!1;else if(this.expect(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(G.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(G.UnexpectedArgumentPlaceholder,this.state.startLoc);let e=this.startNode();this.next(),i=this.finishNode(e,`ArgumentPlaceholder`)}else i=this.parseMaybeAssignAllowInOrVoidPattern(e,n,this.parseParenItem);return i}parseIdentifier(e){let t=this.startNode(),n=this.parseIdentifierName(e);return this.createIdentifier(t,n)}createIdentifier(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,`Identifier`)}createIdentifierAt(e,t,n){return e.name=t,e.loc.identifierName=t,this.finishNodeAt(e,`Identifier`,n)}parseIdentifierName(e){let t,{startLoc:n,type:r}=this.state;VP(r)?t=this.state.value:this.unexpected();let i=BP(r);return e?i&&this.replaceToken(128):this.checkReservedWord(t,n,i,!1),this.next(),t}checkReservedWord(e,t,n,r){if(!(e.length>10)&&EF(e)){if(n&&CF(e)){this.raise(G.UnexpectedKeyword,t,{keyword:e});return}if((this.state.strict?r?SF:bF:yF)(e,this.inModule)){this.raise(G.UnexpectedReservedWord,t,{reservedWord:e});return}else if(e===`yield`){if(this.prodParam.hasYield){this.raise(G.YieldBindingIdentifier,t);return}}else if(e===`await`){if(this.prodParam.hasAwait){this.raise(G.AwaitBindingIdentifier,t);return}if(this.scope.inStaticBlock){this.raise(G.AwaitBindingIdentifierInStaticBlock,t);return}this.expressionScope.recordAsyncArrowParametersError(t)}else if(e===`arguments`&&this.scope.inClassAndNotInNonArrowFunction){this.raise(G.ArgumentsInClass,t);return}}}recordAwaitIfAllowed(){let e=this.prodParam.hasAwait;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e){let t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(G.AwaitExpressionFormalParameter,t),this.eat(51)&&this.raise(G.ObsoleteAwaitStar,t),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,`AwaitExpression`)}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return e===49||e===6||e===0||rF(e)||e===98&&!this.state.containsEsc||e===133||e===52||this.hasPlugin(`v8intrinsic`)&&e===50}parseYield(e){let t=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError(G.YieldInParameter,t);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){if(this.next(),e.source=this.parseMaybeAssignAllowIn(),e.options=null,this.eat(8)){if(this.match(7))this.addTrailingCommaExtraToNode(e.source);else if(e.options=this.parseMaybeAssignAllowIn(),this.eat(8)&&(this.addTrailingCommaExtraToNode(e.options),!this.match(7))){do this.parseMaybeAssignAllowIn();while(this.eat(8)&&!this.match(7));this.raise(G.ImportCallArity,e)}}return this.expect(7),this.finishNode(e,`ImportExpression`)}withTopicBindingContext(e){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSoloAwaitPermittingContext(e){let t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){let t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(t|8);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(t&-9);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){let t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=n,r}parseModuleExpression(){this.expectPlugin(`moduleBlocks`);let e=this.startNode();this.next(),this.match(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 rL={kind:1},iL={kind:2},aL=/[\uD800-\uDFFF]/u,oL=/in(?:stanceof)?/y;function sL(e){for(let t=0;t<e.length;t++){let n=e[t],{type:r}=n;typeof r==`number`&&(n.type=iF(r))}return e}var cL=class extends nL{parseTopLevel(e,t){return e.program=this.parseProgram(t,135,this.options.sourceType===`module`?`module`:`script`),e.comments=this.comments,this.optionFlags&256&&(e.tokens=sL(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(G.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`,uP(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(pF(e)){if(oL.lastIndex=t,oL.test(this.input)){let e=this.codePointAtPos(oL.lastIndex);if(!mF(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?G.StrictFunction:this.options.annexB?G.SloppyFunctionAnnexB:G.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(G.AwaitUsingNotInAsyncContext,r):this.raise(G.UnexpectedLexicalDeclaration,r):this.raise(G.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(G.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(G.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(G.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(G.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(G.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!i&&a)}let s=this.state.value,c=this.parseExpression();return Y(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(G.ImportOutsideModule,e)}maybeTakeDecorators(e,t,n){return e&&(t.decorators?.length?(this.raise(G.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(G.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(G.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 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(G.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(rL),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(rL);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(G.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(G.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 kI,a=this.parseExpression(!0,i),o=this.isContextual(98);if(o&&(n&&this.raise(G.ForOfLet,a),t===null&&r&&a.type===`Identifier`&&this.raise(G.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(G.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(iL),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(G.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(G.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(G.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(rL),e.body=this.parseStatement(),this.state.labels.pop(),this.finishNode(e,`WhileStatement`)}parseWithStatement(e){return this.state.strict&&this.raise(G.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(G.LabelRedeclaration,n,{labelName:t});let i=qP(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(G.ForInOfLoopInitializer,t,{type:r?`ForInStatement`:`ForOfStatement`}),t.type===`AssignmentPattern`&&this.raise(G.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(G.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:`destructuring`}):(n===`const`||n===`using`||n===`await using`)&&!(this.match(54)||this.isContextual(98))&&this.raise(G.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(G.UsingDeclarationHasBindingPattern,n.loc.start):n.type===`VoidPattern`&&this.raise(G.UnexpectedVoidPattern,n.loc.start),this.checkLVal(n,{type:`VariableDeclarator`},t===`var`?5:8201),e.id=n}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){let n=t&2,r=!!(t&1),i=r&&!(t&4),a=!!(t&8);this.initFunction(e,a),this.match(51)&&(n&&this.raise(G.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),r&&(e.id=this.parseFunctionId(i));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter(QF(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),this.state.maybeInArrowParameters=o,e}parseFunctionId(e){return e||Y(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(6),this.expressionScope.enter(wI()),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.loc.start)}parseClass(e,t,n){this.next();let r=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,n),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,r),this.finishNode(e,t?`ClassDeclaration`:`ClassExpression`)}isClassProperty(){return this.match(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(G.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.kind===`constructor`&&e.decorators&&e.decorators.length>0&&this.raise(G.DecoratorConstructor,e)}if(this.state.strict=t,this.next(),r.length)throw this.raise(G.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(G.ConstructorIsGenerator,i.key),this.pushClassMethod(e,i,!0,!1,!1,!1);return}let d=!this.state.containsEsc&&Y(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(G.DuplicateConstructor,f),r&&this.hasPlugin(`typescript`)&&t.override&&this.raise(G.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(G.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(G.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(G.StaticPrototype,this.state.startLoc),t===134){n===`constructor`&&this.raise(G.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(G.DecoratorStaticBlock,t)}pushClassProperty(e,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(G.ConstructorClassField,t.key),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){let n=this.parseClassPrivateProperty(t);e.body.push(n),this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassAccessorProperty(e,t,n){!n&&!t.computed&&this.nameIsConstructor(t.key)&&this.raise(G.ConstructorClassField,t.key);let r=this.parseClassAccessorProperty(t);e.body.push(r),n&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassMethod(e,t,n,r,i,a){e.body.push(this.parseMethod(t,n,r,i,a,`ClassMethod`,!0))}pushClassPrivateMethod(e,t,n,r){let i=this.parseMethod(t,n,r,!1,!1,`ClassPrivateMethod`,!0);e.body.push(i);let a=i.kind===`get`?i.static?6:2:i.kind===`set`?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,a)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,`ClassPrivateProperty`)}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,`ClassProperty`)}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,`ClassAccessorProperty`)}parseInitializer(e){this.scope.enter(592),this.expressionScope.enter(DI()),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(Y(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,r);else if(n||!t)e.id=null;else throw this.raise(G.MissingClassName,this.state.startLoc)}parseClassSuper(e){e.superClass=this.eat(77)?this.parseExprSubscripts():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(G.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(G.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(G.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(G.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?.loc.start);let n=t||this.parseIdentifier(!0),r=this.startNodeAtNode(n);return r.exported=n,e.specifiers=[this.finishNode(r,`ExportDefaultSpecifier`)],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(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(G.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(Y(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||Y(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(G.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(G.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.loc.start,!0,!1),this.scope.checkLocalExport(e)):this.raise(G.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(G.DuplicateDefaultExport,e):this.raise(G.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=aL.exec(e.value);return t&&this.raise(G.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(G.SourcePhaseImportRequiresDefault,t[0].loc.start):e.phase===`defer`&&n!==`ImportNamespaceSpecifier`&&this.raise(G.DeferImportRequiresNamespace,t[0].loc.start)}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(VP(i)?i!==94||this.lookaheadCharCode()===102:i!==8)?(this.applyImportPhase(e,t,r,n.loc.start),null):(this.applyImportPhase(e,t,null),this.createIdentifier(n,r))}isPrecedingIdImportPhase(e){let{type:t}=this.state;return Y(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(G.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(G.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(VP(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(G.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(G.ImportBindingIsString,e,{importName:n.value});this.checkReservedWord(n.name,e.loc.start,!0,!0),e.local||=this.cloneIdentifier(n)}return this.finishImportSpecifier(e,`ImportSpecifier`,i)}isThisParam(e){return e.type===`Identifier`&&e.name===`this`}},lL=class extends cL{constructor(e,t,n){let r=wP(e);super(r,t),this.options=r,this.initializeScopes(),this.plugins=n,this.filename=r.sourceFilename,this.startIndex=r.startIndex;let i=0;r.allowAwaitOutsideFunction&&(i|=1),r.allowReturnOutsideFunction&&(i|=2),r.allowImportExportEverywhere&&(i|=8),r.allowSuperOutsideMethod&&(i|=16),r.allowUndeclaredExports&&(i|=64),r.allowNewTargetOutsideFunction&&(i|=4),r.allowYieldOutsideFunction&&(i|=32),r.ranges&&(i|=128),r.tokens&&(i|=256),r.createImportExpressions&&(i|=512),r.createParenthesizedExpressions&&(i|=1024),r.errorRecovery&&(i|=2048),r.attachComment&&(i|=4096),r.annexB&&(i|=8192),this.optionFlags=i}getScopeHandler(){return OF}parse(){this.enterInitialScopes();let e=this.startNode(),t=this.startNode();this.nextToken(),e.errors=null;let n=this.parseTopLevel(e,t);return n.errors=this.state.errors,n.comments.length=this.state.commentsLen,n}};function uL(e,t){if(t?.sourceType===`unambiguous`){t={...t};try{t.sourceType=`module`;let n=fL(t,e),r=n.parse();if(n.sawUnambiguousESM)return r;if(n.ambiguousScriptDifferentAst)try{return t.sourceType=`script`,fL(t,e).parse()}catch{}else r.program.sourceType=`script`;return r}catch(n){try{return t.sourceType=`script`,fL(t,e).parse()}catch{}throw n}}else return fL(t,e).parse()}function dL(e){let t={};for(let n of Object.keys(e))t[n]=iF(e[n]);return t}dL(zP);function fL(e,t){let n=lL,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||{})}$I(r),n=mL(r)}return new n(e,t,r)}const pL=new Map;function mL(e){let t=[];for(let n of tL)e.has(n)&&t.push(n);let n=t.join(`|`),r=pL.get(n);if(!r){r=lL;for(let e of t)r=eL[e](r);pL.set(n,r)}return r}var hL=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))}},gL=class extends hL{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];_L(r)&&(this.visit(r,e,i,t)||t--)}}else _L(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 _L(e){return typeof e==`object`&&!!e&&`type`in e&&typeof e.type==`string`}function vL(e,{enter:t,leave:n}){return new gL(t,n).visit(e,null)}function yL(e,t){return e?[].concat(t).some(t=>{switch(t){case`Function`:return SL(e);case`Literal`:return xL(e);case`Expression`:return wL(e);default:return e.type===t}}):!1}function bL(e,t){return EL(e)&&TL(e.name,t)}function xL(e){return!!e&&e.type.endsWith(`Literal`)}function SL(e){return!!e&&!e.type.startsWith(`TS`)&&/Function(?:Expression|Declaration)$|Method$/.test(e.type)}function CL(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 wL(e){return!!e&&(e.type.endsWith(`Expression`)||xL(e)||[`Identifier`,`MetaProperty`,`Super`,`Import`,`JSXElement`,`JSXFragment`,`TopicReference`,`PipelineBareFunction`,`PipelinePrimaryTopicReference`,`TSTypeAssertion`].includes(e.type))}function TL(e,t){return Array.isArray(t)?t.includes(e):typeof t==`function`?t(e):e===t}function EL(e){return!!e&&(e.type===`Identifier`||e.type===`JSXIdentifier`)}function DL(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(OL(e))}function OL(e){switch(e.type){case`TemplateLiteral`:return kL(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 kL(e){return e.quasis.reduce((t,n,r)=>{let i=e.expressions[r];if(i){if(!xL(i))throw TypeError(`TemplateLiteral expression must be a literal`);return t+n.value.cooked+OL(i)}return t+n.value.cooked},``)}const AL=vL,jL=e=>typeof e==`object`&&!!e,ML=(e,t)=>Object.assign(Error(`[${e}]: ${t}`),{code:e}),NL=`ERR_INVALID_PACKAGE_CONFIG`,PL=`ERR_INVALID_PACKAGE_TARGET`,FL=/^\d+$/,IL=/^(\.{1,2}|node_modules)$/i,LL=/\/|\\/;var RL=(e=>(e.Export=`exports`,e.Import=`imports`,e))(RL||{});const zL=(e,t,n,r,i)=>{if(t==null)return[];if(typeof t==`string`){let[n,...r]=t.split(LL);if(n===`..`||r.some(e=>IL.test(e)))throw ML(PL,`Invalid "${e}" target "${t}" defined in the package config`);return[i?t.replace(/\*/g,i):t]}if(Array.isArray(t))return t.flatMap(t=>zL(e,t,n,r,i));if(jL(t)){for(let a of Object.keys(t)){if(FL.test(a))throw ML(NL,`Cannot contain numeric property keys`);if(a===`default`||r.includes(a))return zL(e,t[a],n,r,i)}return[]}throw ML(PL,`Invalid "${e}" target "${t}"`)},BL=(e,t)=>{let n=e.indexOf(`*`),r=t.indexOf(`*`);return n===r?t.length>e.length:r>n};function VL(e,t){if(!t.includes(`*`)&&e.hasOwnProperty(t))return[t];let n,r;for(let i of Object.keys(e))if(i.includes(`*`)){let[e,a,o]=i.split(`*`);if(o===void 0&&t.startsWith(e)&&t.endsWith(a)){let o=t.slice(e.length,-a.length||void 0);o&&(!n||BL(n,i))&&(n=i,r=o)}}return[n,r]}const HL=e=>Object.keys(e).reduce((e,t)=>{let n=t===``||t[0]!==`.`;if(e===void 0||e===n)return n;throw ML(NL,`"exports" cannot contain some keys starting with "." and some not`)},void 0),UL=/^\w+:/,WL=(e,t,n)=>{if(!e)throw Error(`"exports" is required`);t=t===``?`.`:`./${t}`,(typeof e==`string`||Array.isArray(e)||jL(e)&&HL(e))&&(e={".":e});let[r,i]=VL(e,t),a=zL(RL.Export,e[r],t,n,i);if(a.length===0)throw ML(`ERR_PACKAGE_PATH_NOT_EXPORTED`,t===`.`?`No "exports" main defined`:`Package subpath '${t}' is not defined by "exports"`);for(let e of a)if(!e.startsWith(`./`)&&!UL.test(e))throw ML(PL,`Invalid "exports" target "${e}" defined in the package config`);return a};var GL=Object.defineProperty,$=(e,t)=>GL(e,`name`,{value:t,configurable:!0});function KL(e){return e.startsWith(`\\\\?\\`)?e:e.replace(/\\/g,`/`)}$(KL,`slash`);const qL=$(e=>{let t=le[e];return(n,...r)=>{let i=`${e}:${r.join(`:`)}`,a=n?.get(i);return a===void 0&&(a=Reflect.apply(t,le,r),n?.set(i,a)),a}},`cacheFs`),JL=qL(`existsSync`),YL=qL(`readFileSync`),XL=qL(`statSync`),ZL=$((e,t,n)=>{for(;;){let r=b.posix.join(e,t);if(JL(n,r))return r;let i=b.dirname(e);if(i===e)return;e=i}},`findUp`),QL=/^\.{1,2}(\/.*)?$/,$L=$(e=>{let t=KL(e);return QL.test(t)?t:`./${t}`},`normalizeRelativePath`);function eR(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i<t;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i<t&&(a=-1),a}$(f,`scanHexDigits`);function p(e){r=e,i=``,a=0,o=16,d=0}$(p,`setPosition`);function m(){let t=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&rR(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&rR(e.charCodeAt(r)))for(r++;r<e.length&&rR(e.charCodeAt(r));)r++;else return d=3,e.substring(t,r);let n=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&rR(e.charCodeAt(r))){for(r++;r<e.length&&rR(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}$(m,`scanNumber`);function h(){let t=``,i=r;for(;;){if(r>=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=`
|
|
16
|
-
`;break;case 114:t+=`\r`;break;case 116:t+=` `;break;case 117:let e=f(4);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}i=r;continue}if(a>=0&&a<=31)if(nR(a)){t+=e.substring(i,r),d=2;break}else d=6;r++}return t}$(h,`scanString`);function g(){if(i=``,d=0,a=r,c=s,u=l,r>=n)return a=n,o=17;let t=e.charCodeAt(r);if(tR(t)){do r++,i+=String.fromCharCode(t),t=e.charCodeAt(r);while(tR(t));return o=15}if(nR(t))return r++,i+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,i+=`
|
|
17
|
-
`),s++,l=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=h(),o=10;case 47:let c=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!nR(e.charCodeAt(r));)r++;return i=e.substring(c,r),o=12}if(e.charCodeAt(r+1)===42){r+=2;let t=n-1,a=!1;for(;r<t;){let t=e.charCodeAt(r);if(t===42&&e.charCodeAt(r+1)===47){r+=2,a=!0;break}r++,nR(t)&&(t===13&&e.charCodeAt(r)===10&&r++,s++,l=r)}return a||(r++,d=1),i=e.substring(c,r),o=13}return i+=String.fromCharCode(t),r++,o=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!rR(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),o=11;default:for(;r<n&&ee(t);)r++,t=e.charCodeAt(r);if(a!==r){switch(i=e.substring(a,r),i){case`true`:return o=8;case`false`:return o=9;case`null`:return o=7}return o=16}return i+=String.fromCharCode(t),r++,o=16}}$(g,`scanNext`);function ee(e){if(tR(e)||nR(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}$(ee,`isUnknownContentCharacter`);function _(){let e;do e=g();while(e>=12&&e<=15);return e}return $(_,`scanNextNonTrivia`),{setPosition:p,getPosition:$(()=>r,`getPosition`),scan:t?_:g,getToken:$(()=>o,`getToken`),getTokenValue:$(()=>i,`getTokenValue`),getTokenOffset:$(()=>a,`getTokenOffset`),getTokenLength:$(()=>r-a,`getTokenLength`),getTokenStartLine:$(()=>c,`getTokenStartLine`),getTokenStartCharacter:$(()=>a-u,`getTokenStartCharacter`),getTokenError:$(()=>d,`getTokenError`)}}$(eR,`createScanner`);function tR(e){return e===32||e===9}$(tR,`isWhiteSpace`);function nR(e){return e===10||e===13}$(nR,`isLineBreak`);function rR(e){return e>=48&&e<=57}$(rR,`isDigit`);var iR;(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(iR||={}),Array(20).fill(0).map((e,t)=>` `.repeat(t)),Array(200).fill(0).map((e,t)=>`
|
|
18
|
-
`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r
|
|
19
|
-
`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`
|
|
20
|
-
`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r
|
|
21
|
-
`+` `.repeat(t));var aR;(function(e){e.DEFAULT={allowTrailingComma:!1}})(aR||={});function oR(e,t=[],n=aR.DEFAULT){let r=null,i=[],a=[];function o(e){Array.isArray(i)?i.push(e):r!==null&&(i[r]=e)}return $(o,`onValue`),sR(e,{onObjectBegin:$(()=>{let e={};o(e),a.push(i),i=e,r=null},`onObjectBegin`),onObjectProperty:$(e=>{r=e},`onObjectProperty`),onObjectEnd:$(()=>{i=a.pop()},`onObjectEnd`),onArrayBegin:$(()=>{let e=[];o(e),a.push(i),i=e,r=null},`onArrayBegin`),onArrayEnd:$(()=>{i=a.pop()},`onArrayEnd`),onLiteralValue:o,onError:$((e,n,r)=>{t.push({error:e,offset:n,length:r})},`onError`)},n),i[0]}$(oR,`parse$1`);function sR(e,t,n=aR.DEFAULT){let r=eR(e,!1),i=[],a=0;function o(e){return e?()=>a===0&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}$(o,`toNoArgVisit`);function s(e){return e?t=>a===0&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}$(s,`toOneArgVisit`);function c(e){return e?t=>a===0&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}$(c,`toOneArgVisitWithPath`);function l(e){return e?()=>{a>0?a++:e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice())===!1&&(a=1)}:()=>!0}$(l,`toBeginVisit`);function u(e){return e?()=>{a>0&&a--,a===0&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}$(u,`toEndVisit`);let d=l(t.onObjectBegin),f=c(t.onObjectProperty),p=u(t.onObjectEnd),m=l(t.onArrayBegin),h=u(t.onArrayEnd),g=c(t.onLiteralValue),ee=s(t.onSeparator),_=o(t.onComment),te=s(t.onError),ne=n&&n.disallowComments,re=n&&n.allowTrailingComma;function v(){for(;;){let e=r.scan();switch(r.getTokenError()){case 4:y(14);break;case 5:y(15);break;case 3:y(13);break;case 1:ne||y(11);break;case 2:y(12);break;case 6:y(16);break}switch(e){case 12:case 13:ne?y(10):_();break;case 16:y(1);break;case 15:case 14:break;default:return e}}}$(v,`scanNext`);function y(e,t=[],n=[]){if(te(e),t.length+n.length>0){let e=r.getToken();for(;e!==17;){if(t.indexOf(e)!==-1){v();break}else if(n.indexOf(e)!==-1)break;e=v()}}}$(y,`handleError`);function ie(e){let t=r.getTokenValue();return e?g(t):(f(t),i.push(t)),v(),!0}$(ie,`parseString`);function ae(){switch(r.getToken()){case 11:let e=r.getTokenValue(),t=Number(e);isNaN(t)&&(y(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return v(),!0}$(ae,`parseLiteral`);function b(){return r.getToken()===10?(ie(!1),r.getToken()===6?(ee(`:`),v(),ce()||y(4,[],[2,5])):y(5,[],[2,5]),i.pop(),!0):(y(3,[],[2,5]),!1)}$(b,`parseProperty`);function oe(){d(),v();let e=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(e||y(4,[],[]),ee(`,`),v(),r.getToken()===2&&re)break}else e&&y(6,[],[]);b()||y(4,[],[2,5]),e=!0}return p(),r.getToken()===2?v():y(7,[2],[]),!0}$(oe,`parseObject`);function se(){m(),v();let e=!0,t=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(t||y(4,[],[]),ee(`,`),v(),r.getToken()===4&&re)break}else t&&y(6,[],[]);e?(i.push(0),e=!1):i[i.length-1]++,ce()||y(4,[],[4,5]),t=!0}return h(),e||i.pop(),r.getToken()===4?v():y(8,[4],[]),!0}$(se,`parseArray`);function ce(){switch(r.getToken()){case 3:return se();case 1:return oe();case 10:return ie(!0);default:return ae()}}return $(ce,`parseValue`),v(),r.getToken()===17?n.allowEmptyContent?!0:(y(4,[],[]),!1):ce()?(r.getToken()!==17&&y(9,[],[]),!0):(y(4,[],[]),!1)}$(sR,`visit`);var cR;(function(e){e[e.None=0]=`None`,e[e.UnexpectedEndOfComment=1]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=2]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=3]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=4]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=5]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=6]=`InvalidCharacter`})(cR||={});var lR;(function(e){e[e.OpenBraceToken=1]=`OpenBraceToken`,e[e.CloseBraceToken=2]=`CloseBraceToken`,e[e.OpenBracketToken=3]=`OpenBracketToken`,e[e.CloseBracketToken=4]=`CloseBracketToken`,e[e.CommaToken=5]=`CommaToken`,e[e.ColonToken=6]=`ColonToken`,e[e.NullKeyword=7]=`NullKeyword`,e[e.TrueKeyword=8]=`TrueKeyword`,e[e.FalseKeyword=9]=`FalseKeyword`,e[e.StringLiteral=10]=`StringLiteral`,e[e.NumericLiteral=11]=`NumericLiteral`,e[e.LineCommentTrivia=12]=`LineCommentTrivia`,e[e.BlockCommentTrivia=13]=`BlockCommentTrivia`,e[e.LineBreakTrivia=14]=`LineBreakTrivia`,e[e.Trivia=15]=`Trivia`,e[e.Unknown=16]=`Unknown`,e[e.EOF=17]=`EOF`})(lR||={});const uR=oR;var dR;(function(e){e[e.InvalidSymbol=1]=`InvalidSymbol`,e[e.InvalidNumberFormat=2]=`InvalidNumberFormat`,e[e.PropertyNameExpected=3]=`PropertyNameExpected`,e[e.ValueExpected=4]=`ValueExpected`,e[e.ColonExpected=5]=`ColonExpected`,e[e.CommaExpected=6]=`CommaExpected`,e[e.CloseBraceExpected=7]=`CloseBraceExpected`,e[e.CloseBracketExpected=8]=`CloseBracketExpected`,e[e.EndOfFileExpected=9]=`EndOfFileExpected`,e[e.InvalidCommentToken=10]=`InvalidCommentToken`,e[e.UnexpectedEndOfComment=11]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=12]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=13]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=14]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=15]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=16]=`InvalidCharacter`})(dR||={});const fR=$((e,t)=>uR(YL(t,e,`utf8`)),`readJsonc`),pR=Symbol(`implicitBaseUrl`),mR="${configDir}",hR=$(()=>{let{findPnpApi:e}=ie;return e&&e(process.cwd())},`getPnpApi`),gR=$((e,t,n,r)=>{let i=`resolveFromPackageJsonPath:${e}:${t}:${n}`;if(r!=null&&r.has(i))return r.get(i);let a=fR(e,r);if(!a)return;let o=t||`tsconfig.json`;if(!n&&a.exports)try{let[e]=WL(a.exports,t,[`require`,`types`]);o=e}catch{return!1}else !t&&a.tsconfig&&(o=a.tsconfig);return o=b.join(e,`..`,o),r?.set(i,o),o},`resolveFromPackageJsonPath`),_R=`package.json`,vR=`tsconfig.json`,yR=$((e,t,n)=>{let r=e;if(e===`..`&&(r=b.join(r,vR)),e[0]===`.`&&(r=b.resolve(t,r)),b.isAbsolute(r)){if(JL(n,r)){if(XL(n,r).isFile())return r}else if(!r.endsWith(`.json`)){let e=`${r}.json`;if(JL(n,e))return e}return}let[i,...a]=e.split(`/`),o=i[0]===`@`?`${i}/${a.shift()}`:i,s=a.join(`/`),c=hR();if(c){let{resolveRequest:r}=c;try{if(o===e){let e=r(b.join(o,_R),t);if(e){let t=gR(e,s,!1,n);if(t&&JL(n,t))return t}}else{let n;try{n=r(e,t,{extensions:[`.json`]})}catch{n=r(b.join(e,vR),t)}if(n)return n}}catch{}}let l=ZL(b.resolve(t),b.join(`node_modules`,o),n);if(!l||!XL(n,l).isDirectory())return;let u=b.join(l,_R);if(JL(n,u)){let e=gR(u,s,!1,n);if(e===!1)return;if(e&&JL(n,e)&&XL(n,e).isFile())return e}let d=b.join(l,s),f=d.endsWith(`.json`);if(!f){let e=`${d}.json`;if(JL(n,e))return e}if(JL(n,d)){if(XL(n,d).isDirectory()){let e=b.join(d,_R);if(JL(n,e)){let t=gR(e,``,!0,n);if(t&&JL(n,t))return t}let t=b.join(d,vR);if(JL(n,t))return t}else if(f)return d}},`resolveExtendsPath`),bR=$((e,t)=>$L(b.relative(e,t)),`pathRelative`),xR=[`files`,`include`,`exclude`],SR=$((e,t,n)=>{let r=b.join(t,n);return KL(b.relative(e,r))||`./`},`resolveAndRelativize`),CR=$((e,t,n)=>{let r=b.relative(e,t);return r?KL(`${r}/${n.startsWith(`./`)?n.slice(2):n}`):n},`prefixPattern`),wR=$((e,t,n,r)=>{let i=yR(e,t,r);if(!i)throw Error(`File '${e}' not found.`);if(n.has(i))throw Error(`Circularity detected while resolving configuration: ${i}`);n.add(i);let a=b.dirname(i),o=ER(i,r,n);delete o.references;let{compilerOptions:s}=o;if(s){let{baseUrl:e}=s;e&&!e.startsWith(mR)&&(s.baseUrl=SR(t,a,e));let{outDir:n}=s;n&&!n.startsWith(mR)&&(s.outDir=SR(t,a,n))}for(let e of xR){let n=o[e];n&&(o[e]=n.map(e=>e.startsWith(mR)?e:CR(t,a,e)))}return o},`resolveExtends`),TR=[`outDir`,`declarationDir`],ER=$((e,t,n=new Set)=>{let r;try{r=fR(e,t)||{}}catch{throw Error(`Cannot resolve tsconfig at path: ${e}`)}if(typeof r!=`object`)throw SyntaxError(`Failed to parse tsconfig at: ${e}`);let i=b.dirname(e);if(r.compilerOptions){let{compilerOptions:e}=r;e.paths&&!e.baseUrl&&(e[pR]=i)}if(r.extends){let e=Array.isArray(r.extends)?r.extends:[r.extends];delete r.extends;for(let a of e.reverse()){let e=wR(a,i,new Set(n),t),o={...e,...r,compilerOptions:{...e.compilerOptions,...r.compilerOptions}};e.watchOptions&&(o.watchOptions={...e.watchOptions,...r.watchOptions}),r=o}}if(r.compilerOptions){let{compilerOptions:e}=r;for(let t of[`baseUrl`,`rootDir`]){let n=e[t];n&&!n.startsWith(mR)&&(e[t]=bR(i,b.resolve(i,n)))}for(let t of TR){let n=e[t];n&&(Array.isArray(r.exclude)||(r.exclude=[]),r.exclude.includes(n)||r.exclude.push(n),n.startsWith(mR)||(n=$L(n)),e[t]=n)}}else r.compilerOptions={};if(r.include?(r.include=r.include.map(KL),r.files&&delete r.files):r.files&&=r.files.map(e=>e.startsWith(mR)?e:$L(e)),r.watchOptions){let{watchOptions:e}=r;e.excludeDirectories&&=e.excludeDirectories.map(e=>KL(b.resolve(i,e)))}return r},`_parseTsconfig`),DR=$((e,t)=>{if(e.startsWith(mR))return KL(b.join(t,e.slice(12)))},`interpolateConfigDir`),OR=[`outDir`,`declarationDir`,`outFile`,`rootDir`,`baseUrl`,`tsBuildInfoFile`],kR=$(e=>{if(e.strict)for(let t of[`noImplicitAny`,`noImplicitThis`,`strictNullChecks`,`strictFunctionTypes`,`strictBindCallApply`,`strictPropertyInitialization`,`strictBuiltinIteratorReturn`,`alwaysStrict`,`useUnknownInCatchVariables`])e[t]===void 0&&(e[t]=!0);if(e.target){let t=e.target.toLowerCase();t===`es2015`&&(t=`es6`),e.target=t,t===`esnext`&&(e.module??=`es6`,e.useDefineForClassFields??=!0),(t===`es6`||t===`es2016`||t===`es2017`||t===`es2018`||t===`es2019`||t===`es2020`||t===`es2021`||t===`es2022`||t===`es2023`||t===`es2024`)&&(e.module??=`es6`),(t===`es2022`||t===`es2023`||t===`es2024`)&&(e.useDefineForClassFields??=!0)}if(e.module){let t=e.module.toLowerCase();t===`es2015`&&(t=`es6`),e.module=t,(t===`es6`||t===`es2020`||t===`es2022`||t===`esnext`||t===`none`||t===`system`||t===`umd`||t===`amd`)&&(e.moduleResolution??=`classic`),t===`system`&&(e.allowSyntheticDefaultImports??=!0),(t===`node16`||t===`nodenext`||t===`preserve`)&&(e.esModuleInterop??=!0,e.allowSyntheticDefaultImports??=!0),(t===`node16`||t===`nodenext`)&&(e.moduleDetection??=`force`,e.useDefineForClassFields??=!0),t===`node16`&&(e.target??=`es2022`,e.moduleResolution??=`node16`),t===`nodenext`&&(e.target??=`esnext`,e.moduleResolution??=`nodenext`),t===`preserve`&&(e.moduleResolution??=`bundler`)}if(e.moduleResolution){let t=e.moduleResolution.toLowerCase();t===`node`&&(t=`node10`),e.moduleResolution=t,(t===`node16`||t===`nodenext`||t===`bundler`)&&(e.resolvePackageJsonExports??=!0,e.resolvePackageJsonImports??=!0),t===`bundler`&&(e.allowSyntheticDefaultImports??=!0,e.resolveJsonModule??=!0)}e.esModuleInterop&&(e.allowSyntheticDefaultImports??=!0),e.verbatimModuleSyntax&&(e.isolatedModules??=!0,e.preserveConstEnums??=!0),e.isolatedModules&&(e.preserveConstEnums??=!0),e.rewriteRelativeImportExtensions&&(e.allowImportingTsExtensions??=!0)},`normalizeCompilerOptions`),AR=$((e,t=new Map)=>{let n=b.resolve(e),r=ER(n,t),i=b.dirname(n),{compilerOptions:a}=r;if(a){for(let e of OR){let t=a[e];if(t){let n=DR(t,i);a[e]=n?bR(i,n):t}}for(let e of[`rootDirs`,`typeRoots`]){let t=a[e];t&&(a[e]=t.map(e=>{let t=DR(e,i);return t?bR(i,t):e}))}let{paths:e}=a;if(e)for(let t of Object.keys(e))e[t]=e[t].map(e=>DR(e,i)??e);kR(a)}for(let e of xR){let t=r[e];t&&(r[e]=t.map(e=>DR(e,i)??e))}return r},`parseTsconfig`),jR=$((e=process.cwd(),t=`tsconfig.json`,n=new Map)=>{let r=ZL(KL(e),t,n);return r?{path:r,config:AR(r,n)}:null},`getTsconfig`),MR=/\*/g,NR=$((e,t)=>{let n=e.match(MR);if(n&&n.length>1)throw Error(t)},`assertStarCount`),PR=$(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{prefix:t,suffix:n}}return e},`parsePattern`),FR=$(({prefix:e,suffix:t},n)=>n.startsWith(e)&&n.endsWith(t),`isPatternMatch`),IR=$((e,t,n)=>Object.entries(e).map(([e,r])=>(NR(e,`Pattern '${e}' can have at most one '*' character.`),{pattern:PR(e),substitutions:r.map(r=>{if(NR(r,`Substitution '${r}' in pattern '${e}' can have at most one '*' character.`),!t&&!QL.test(r))throw Error(`Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?`);return b.resolve(n,r)})})),`parsePaths`);$(e=>{let{compilerOptions:t}=e.config;if(!t)return null;let{baseUrl:n,paths:r}=t;if(!n&&!r)return null;let i=pR in t&&t[pR],a=b.resolve(b.dirname(e.path),n||i||`.`),o=r?IR(r,n,a):[];return e=>{if(QL.test(e))return[];let t=[];for(let n of o){if(n.pattern===e)return n.substitutions.map(KL);typeof n.pattern!=`string`&&t.push(n)}let r,i=-1;for(let n of t)FR(n.pattern,e)&&n.pattern.prefix.length>i&&(i=n.pattern.prefix.length,r=n);if(!r)return n?[KL(b.join(a,e))]:[];let s=e.slice(r.pattern.prefix.length,e.length-r.pattern.suffix.length);return r.substitutions.map(e=>KL(e.replace(`*`,s)))}},`createPathsMatcher`);var LR=Object.defineProperty,RR=$((e,t)=>LR(e,`name`,{value:t,configurable:!0}),`s`);const zR=RR(e=>{let t=``;for(let n=0;n<e.length;n+=1){let r=e[n],i=r.toUpperCase();t+=r===i?r.toLowerCase():i}return t},`invertCase`),BR=new Map,VR=RR((e,t)=>{let n=de.join(e,`.is-fs-case-sensitive-test-${process.pid}`);try{return t.writeFileSync(n,``),!t.existsSync(zR(n))}finally{try{t.unlinkSync(n)}catch{}}},`checkDirectoryCaseWithWrite`),HR=RR((e,t,n)=>{try{return VR(e,n)}catch(e){if(t===void 0)return VR(fe.tmpdir(),n);throw e}},`checkDirectoryCaseWithFallback`),UR=RR((e,t=ue,n=!0)=>{let r=e??process.cwd();if(n&&BR.has(r))return BR.get(r);let i,a=zR(r);return i=a!==r&&t.existsSync(r)?!t.existsSync(a):HR(r,e,t),n&&BR.set(r,i),i},`isFsCaseSensitive`),{join:WR}=b.posix,GR={ts:[`.ts`,`.tsx`,`.d.ts`],cts:[`.cts`,`.d.cts`],mts:[`.mts`,`.d.mts`]},KR=$(e=>{let t=[...GR.ts],n=[...GR.cts],r=[...GR.mts];return e!=null&&e.allowJs&&(t.push(`.js`,`.jsx`),n.push(`.cjs`),r.push(`.mjs`)),[...t,...n,...r]},`getSupportedExtensions`),qR=$(e=>{let t=[];if(!e)return t;let{outDir:n,declarationDir:r}=e;return n&&t.push(n),r&&t.push(r),t},`getDefaultExcludeSpec`),JR=$(e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),`escapeForRegexp`),YR=`(?!(${[`node_modules`,`bower_components`,`jspm_packages`].join(`|`)})(/|$))`,XR=/(?:^|\/)[^.*?]+$/,ZR=`**/*`,QR=`[^/]`,$R=`[^./]`,ez=process.platform===`win32`;$(({config:e,path:t},n=UR())=>{if(`extends`in e)throw Error(`tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.`);if(!b.isAbsolute(t))throw Error(`The tsconfig path must be absolute`);ez&&(t=KL(t));let r=b.dirname(t),{files:i,include:a,exclude:o,compilerOptions:s}=e,c=i?.map(e=>WR(r,e)),l=KR(s),u=n?``:`i`,d=(o||qR(s)).map(e=>{let t=JR(WR(r,e)).replaceAll(String.raw`\*\*/`,`(.+/)?`).replaceAll(String.raw`\*`,`${QR}*`).replaceAll(String.raw`\?`,QR);return RegExp(`^${t}($|/)`,u)}),f=i||a?a:[ZR],p=f?f.map(e=>{let t=WR(r,e);XR.test(t)&&(t=WR(t,ZR));let n=JR(t).replaceAll(String.raw`/\*\*`,`(/${YR}${$R}${QR}*)*?`).replaceAll(/(\/)?\\\*/g,(e,t)=>{let n=`(${$R}|(\\.(?!min\\.js$))?)*`;return t?`/${YR}${$R}${n}`:n}).replaceAll(/(\/)?\\\?/g,(e,t)=>{let n=QR;return t?`/${YR}${n}`:n});return RegExp(`^${n}$`,u)}):void 0;return t=>{if(!b.isAbsolute(t))throw Error(`filePath must be absolute`);if(ez&&(t=KL(t)),c!=null&&c.includes(t)||!(!l.some(e=>t.endsWith(e))||d.some(e=>e.test(t)))&&p&&p.some(e=>e.test(t)))return e}},`createFilesMatcher`);var tz=ae(import.meta.url);function nz({tsconfig:e,cwd:t=ce.cwd(),resolveNodeModules:n=!1,ResolverFactory:r}={}){r||=tz(`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?oe(n):t,a=i.sync(r,e);if(!a.path)return null;let o=a.path;return iz(o)}}const rz=new Set([`.js`,`.cjs`,`.mjs`,`.jsx`,`.ts`,`.cts`,`.mts`,`.tsx`,`.json`,`.vue`,`.svelte`,`.astro`]);function iz(e){return e&&rz.has(se(e))?e.replaceAll(`\\`,`/`):null}const{fork:az,spawn:oz}=globalThis.process.getBuiltinModule(`node:child_process`),{existsSync:sz}=globalThis.process.getBuiltinModule(`node:fs`),{mkdtemp:cz,readFile:lz,rm:uz}=globalThis.process.getBuiltinModule(`node:fs/promises`),dz=globalThis.process.getBuiltinModule(`node:path`),{tmpdir:fz}=globalThis.process.getBuiltinModule(`node:os`),pz=globalThis.process;function mz({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(n){let{entryFileNames:r}=e;if(r){let e=_(r,n),i=t(e,n.name);if(h.test(i))return e;let a=t(e,`${n.name}.d`);if(h.test(a))return a}return h.test(n.name)?n.name:n.name.endsWith(`.d`)?`[name].ts`:`[name].d.ts`}}}}}function hz({sourcemap:e,cjsDefault:n,sideEffects:r}){let a=0,o=Object.create(null),s=new Map,l=new Map,u=new Map;return{name:`rolldown-plugin-dts:fake-js`,outputOptions(n){if(n.format===`cjs`||n.format===`commonjs`)throw Error("[rolldown-plugin-dts] Cannot bundle dts files with `cjs` format.");let{chunkFileNames:r,entryFileNames:i}=n;return{...n,sourcemap:n.sourcemap||e,chunkFileNames(e){let n=_(e.isEntry?i||`[name].js`:r||`[name]-[hash].js`,e);if(e.name.endsWith(`.d`)){let r=c(t(n,e.name.slice(0,-2)));if(h.test(r))return r;let i=c(t(n,e.name));if(h.test(i))return i}return n}}},transform:{filter:{id:h},handler:d},renderChunk:f,generateBundle(t,n){for(let t of Object.values(n))if(i.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 d(t,n){let i=uL(t,{plugins:[[`typescript`,{dts:!0}]],sourceType:`module`,errorRecovery:!0,createParenthesizedExpressions:!0}),{program:a,comments:o}=i,s=[];if(o){let e=yz(o);l.set(n,e)}let c=[],d=new Map;for(let[e,r]of a.body.entries()){let i=t=>a.body[e]=t;if(Mz(r,i,s))continue;let o=r.type===`TSModuleDeclaration`&&r.kind!==`namespace`;if(o&&r.id.type===`StringLiteral`&&r.id.value[0]===`.`&&this.warn(`\`declare module ${JSON.stringify(r.id.value)}\` will be kept as-is in the output. Relative module declaration may cause unexpected issues. Found in ${n}.`),o&&n.endsWith(`.vue.d.ts`)&&t.slice(r.start,r.end).includes(`__VLS_`))continue;let l=r.type===`ExportDefaultDeclaration`,u=yL(r,[`ExportNamedDeclaration`,`ExportDefaultDeclaration`])&&!!r.declaration,f=u?r.declaration:r,h=u?e=>r.declaration=e:i;if(f.type!==`TSDeclareFunction`&&!CL(f))continue;yL(f,[`TSEnumDeclaration`,`ClassDeclaration`,`FunctionDeclaration`,`TSDeclareFunction`,`TSModuleDeclaration`,`VariableDeclaration`])&&(f.declare=!0);let g=[];if(f.type===`VariableDeclaration`)g.push(...f.declarations.map(e=>e.id));else if(`id`in f&&f.id){let e=f.id;if(e.type===`TSQualifiedName`&&(e=Ez(e)),e=o?V(`_${p(``)}`):e,e.type!==`Identifier`)throw Error(`Unexpected ${e.type} declaration id`);g.push(e)}else{let e=V(`export_default`);g.push(e),f.id=e}let _=ee(f),ne=new Set,re=te(f,d,ne),v=Array.from(ne).filter(e=>g.every(t=>e!==t));f!==r&&(f.leadingComments=r.leadingComments);let y=Wl(m({decl:f,deps:re,bindings:g,params:_,children:v})),ie=vu(_.map(({name:e})=>V(e)),bl(re)),ae=bl(v.map(e=>({type:`StringLiteral`,value:``,start:e.start,end:e.end,loc:e.loc}))),b=o&&Ol(V(`sideEffect`),[g[0]]),oe=Cz([y,ie,ae,...b?[b]:[]]),se={type:`VariableDeclaration`,kind:`var`,declarations:[{type:`VariableDeclarator`,id:{...g[0],typeAnnotation:null},init:oe},...g.slice(1).map(e=>({type:`VariableDeclarator`,id:{...e,typeAnnotation:null}}))]};l?(c.push(wu(null,[Tu(g[0],V(`default`))])),i(se)):h(se)}r&&c.push(Fl(Ol(V(`sideEffect`),[]))),a.body=[...Array.from(d.values()).map(({stmt:e})=>e),...a.body,...c],u.set(n,s);let f=sP(i,{comments:!1,sourceMaps:e,sourceFileName:n});return{code:f.code,map:f.map}}function f(t,r){if(!h.test(r.fileName))return;let i=[];for(let e of r.moduleIds){let t=u.get(e);t&&i.push(...t)}let a=uL(t,{sourceType:`module`}),{program:o}=a;if(o.body=Az(o.body),o.body=jz(o.body),o.body=o.body.map(e=>{if(Oz(e)||e.type===`ExpressionStatement`)return null;let t=kz(e,i,n);if(t||t===!1)return t;if(e.type!==`VariableDeclaration`)return e;if(!bz(e))return null;let[r,a,o]=e.declarations[0].init.elements,s=r.value,c=g(s);AL(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};Nz(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={...V(`undefined`),loc:n.loc,start:n.start,end:n.end}),t.replace?t.replace(n):Object.assign(t,n)}return Pz(e,c.decl)}).filter(e=>!!e),o.body.length===0)return`export { };`;let s=new Set,c=new Set;for(let e of r.moduleIds){let t=l.get(e);t&&(t.forEach(e=>{let t=e.type+e.value;c.has(t)||(c.add(t),s.add(e))}),l.delete(e))}s.size&&(o.body[0].leadingComments||=[],o.body[0].leadingComments.unshift(...s));let d=sP(a,{sourceMaps:e,sourceFileName:r.fileName});return{code:d.code,map:d.map}}function p(e){return e in o?o[e]++:o[e]=0}function m(e){let t=a++;return s.set(t,e),t}function g(e){return s.get(e)}function ee(e){let t=[];AL(e,{leave(e){`typeParameters`in e&&e.typeParameters?.type===`TSTypeParameterDeclaration`&&t.push(...e.typeParameters.params.map(e=>e.name))}});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){let r=new Set,i=new Set,a=[],o=new Set;function s(e){return e.type===`Identifier`&&o.has(e.name)}return AL(e,{enter(e){if(e.type===`TSConditionalType`){let t=_z(e.extendsType);a.push(t)}},leave(e,s){if(e.type===`TSConditionalType`)a.pop();else if(s?.type===`TSConditionalType`){let t=s.trueType===e;o=new Set((t?a:a.slice(0,-1)).flat())}else o=new Set;if(e.type===`ExportNamedDeclaration`)for(let t of e.specifiers)t.type===`ExportSpecifier`&&c(t.local);else if(e.type===`TSInterfaceDeclaration`&&e.extends)for(let t of e.extends||[])c(t.expression);else if(e.type===`ClassDeclaration`){if(e.superClass&&c(e.superClass),e.implements)for(let t of e.implements){if(t.type===`ClassImplements`)throw Error(`Unexpected Flow syntax`);c(t.expression)}}else if(yL(e,[`ObjectMethod`,`ObjectProperty`,`ClassProperty`,`TSPropertySignature`,`TSDeclareMethod`]))e.computed&&Dz(e.key)&&c(e.key),`value`in e&&Dz(e.value)&&c(e.value);else switch(e.type){case`TSTypeReference`:c(Tz(e.typeName));break;case`TSTypeQuery`:if(i.has(e.exprName))return;if(e.exprName.type===`TSImportType`)break;c(Tz(e.exprName));break;case`TSImportType`:{i.add(e);let{source:n,qualifier:r}=e;c(ne(e,r,n,t));break}}s&&!r.has(e)&&gz(e,s)&&n.add(e)}}),Array.from(r);function c(e){wz(e)||s(e)||r.add(e)}}function ne(e,t,n,r){let i=n.value.replaceAll(/\W/g,`_`),a=V(`${i}${p(i)}`);if(r.has(n.value)?a=r.get(n.value).local:r.set(n.value,{stmt:Du([ku(a)],n),local:a}),t){let e=Ez(t);if(t.type===`ThisExpression`||e.type===`ThisExpression`)throw Error("Cannot import `this` from module.");Nz(e,Uf(a,{...e})),a=t}let o=e;return e.typeArguments?(Nz(e,dp(a,e.typeArguments)),o=a):Nz(e,a),{...Tz(a),replace(e){Nz(o,e)}}}}function gz(e,t){return!!(e.type===`Identifier`||yL(t,[`TSPropertySignature`,`TSMethodSignature`])&&t.key===e)}function _z(e){let t=[];return AL(e,{enter(e){e.type===`TSInferType`&&e.typeParameter&&t.push(e.typeParameter.name.name)}}),t}const vz=/\/\s*<reference\s+(?:path|types)=/;function yz(e,t=!1){return e.filter(e=>vz.test(e.value)!==t)}function bz(e){return e?.type===`VariableDeclaration`&&e.declarations.length>0&&e.declarations[0].type===`VariableDeclarator`&&xz(e.declarations[0].init)}function xz(e){return e?.type===`ArrayExpression`&&Sz(e.elements)}function Sz(e){let[t,n,r,i]=e;return t?.type===`NumericLiteral`&&n?.type===`ArrowFunctionExpression`&&r?.type===`ArrayExpression`&&(!i||i.type===`CallExpression`)}function Cz(e){return bl(e)}function wz(e){return bL(e,`this`)||e.type===`ThisExpression`||e.type===`MemberExpression`&&wz(e.object)}function Tz(e){if(e.type===`Identifier`||e.type===`ThisExpression`)return e;let t=Tz(e.left);return Object.assign(e,Yl(t,e.right))}function Ez(e){return e.type===`Identifier`||e.type===`ThisExpression`?e:Ez(e.left)}function Dz(e){return yL(e,[`Identifier`,`MemberExpression`])}function Oz(e){return e.type===`ImportDeclaration`&&e.specifiers.length===1&&e.specifiers.every(e=>e.type===`ImportSpecifier`&&e.imported.type===`Identifier`&&[`__exportAll`,`__reExport`].includes(e.local.name))}function kz(e,t,n){if(e.type===`ExportNamedDeclaration`&&!e.declaration&&!e.source&&!e.specifiers.length&&!e.attributes?.length)return!1;if(yL(e,[`ImportDeclaration`,`ExportAllDeclaration`,`ExportNamedDeclaration`])){if(e.type===`ExportNamedDeclaration`&&t.length)for(let n of e.specifiers){let r=DL(n.exported);t.includes(r)&&(n.type===`ExportSpecifier`?n.exportKind=`type`:e.exportKind=`type`)}if(e.source?.value&&h.test(e.source.value))return e.source.value=d(e.source.value,`js`),e;if(n&&e.type===`ExportNamedDeclaration`&&!e.source&&e.specifiers.length===1&&e.specifiers[0].type===`ExportSpecifier`&&DL(e.specifiers[0].exported)===`default`)return{type:`TSExportAssignment`,expression:e.specifiers[0].local}}}function Az(e){let t=new Set;for(let[t,r]of e.entries()){let i=n(r);if(!i)continue;let[a,o]=i;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=>{let t=e.value.body,n=e.key;return Tu(t,n)}),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 jz(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`&&bL(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 Mz(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(DL(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:V(`default`)}]}),!0;return!1}function Nz(e,t){for(let t of Object.keys(e))delete e[t];return Object.assign(e,t),e}function Pz(e,t){t.leadingComments||=[];let n=e.leadingComments?.filter(e=>e.value.startsWith(`#`));return n&&t.leadingComments.unshift(...n),t.leadingComments=yz(t.leadingComments,!0),t}const Fz=ne(`rolldown-plugin-dts:tsgo`),Iz=(...e)=>new Promise((t,n)=>{let r=oz(...e);r.on(`close`,()=>t()),r.on(`error`,e=>n(e))});async function Lz(){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 Rz(e,t,n,r){Fz(`[tsgo] rootDir`,e);let i;r?(i=r,Fz(`[tsgo] using custom path`,i)):(i=await Lz(),Fz(`[tsgo] using tsgo from node_modules`,i));let a=await cz(dz.join(fz(),`rolldown-plugin-dts-`));Fz(`[tsgo] tsgoDist`,a);let o=[`--noEmit`,`false`,`--declaration`,`--emitDeclarationOnly`,...t?[`-p`,t]:[],`--outDir`,a,`--rootDir`,e,`--noCheck`,...n?[`--declarationMap`]:[]];return Fz(`[tsgo] args %o`,o),await Iz(i,o,{stdio:`inherit`}),a}const zz=ne(`rolldown-plugin-dts:generate`);function Bz({tsconfig:e,tsconfigRaw:n,build:r,incremental:c,cwd:l,oxc:d,emitDtsOnly:p,vue:g,tsMacro:te,parallel:ne,eager:ie,tsgo:ae,newContext:b,emitJs:oe,sourcemap:se}){let ce=new Map,le=new Map,ue,de,fe,x,pe,me=e?dz.dirname(e):l;return{name:`rolldown-plugin-dts:generate`,async buildStart(t){if(ae?pe=await Rz(me,e,se,ae.path):d||(ne?(ue=az(new URL(`./tsc-worker.mjs`,import.meta.url),{stdio:`inherit`}),de=(await import(`./dist-DHF5Otz1.js`)).createBirpc({},{post:e=>ue.send(e),on:e=>ue.on(`message`,e)})):(fe=await import(`./tsc-By9Scnlt.js`),b&&(x=y()))),!Array.isArray(t.input))for(let[e,n]of Object.entries(t.input)){zz(`resolving input alias %s -> %s`,e,n);let t=await this.resolve(n);n.startsWith(`./`)||(t||=await this.resolve(`./${n}`));let r=t?.id||n;zz(`resolved input alias %s -> %s`,n,r),le.set(r,e)}},outputOptions(e){return{...e,entryFileNames(n){let{entryFileNames:r}=e,i=_(r||`[name].js`,n);if(n.name.endsWith(`.d`)){if(h.test(i))return t(i,n.name.slice(0,-2));if(u.test(i))return i.replace(u,`.$1ts`)}return i}}},resolveId(e){if(ce.has(e))return zz(`resolve dts id %s`,e),{id:e}},transform:{order:`pre`,filter:{id:{include:[u,o,m,ee],exclude:[h,a]}},handler(e,t){if(!u.test(t)||oe){let n=!!this.getModuleInfo(t)?.isEntry,r=s(t);if(ce.set(r,{code:e,id:t,isEntry:n}),zz(`register dts source: %s`,t),n){let e=le.get(t);this.emitFile({type:`chunk`,id:r,name:e?`${e}.d`:void 0})}}if(p)return ee.test(t)?`{}`:`export { }`}},load:{filter:{id:{include:[h],exclude:[a]}},async handler(t){if(!ce.has(t))return;let{code:i,id:a}=ce.get(t),o,u;if(zz(`generate dts %s from %s`,t,a),ae){if(m.test(a))throw Error(`tsgo does not support Vue files.`);let e=dz.resolve(pe,dz.relative(dz.resolve(me),s(a)));if(!sz(e))throw zz(`[tsgo]`,e,`is missing`),Error(`tsgo did not generate dts file for ${a}, please check your tsconfig.`);o=await lz(e,`utf8`);let t=`${e}.map`;if(sz(t)){let e=await lz(t,`utf8`);u={...JSON.parse(e),sources:[a]}}}else if(d&&!m.test(a)){let e=f(a,i,d);if(e.errors.length){let[t]=e.errors;return this.error({message:t.message,frame:t.codeframe||void 0})}o=e.code,e.map&&(u=e.map,u.sourcesContent=void 0)}else{let t={tsconfig:e,tsconfigRaw:n,build:r,incremental:c,cwd:l,entries:ie?void 0:Array.from(ce.values()).filter(e=>e.isEntry).map(e=>e.id),id:a,sourcemap:se,vue:g,tsMacro:te,context:x},i;if(i=ne?await de.tscEmit(t):fe.tscEmit(t),i.error)return this.error(i.error);if(o=i.code,u=i.map,o&&ee.test(a))if(o.includes(`declare const _exports`)){if(o.includes(`declare const _exports: {`)&&!o.includes(`
|
|
22
|
-
}[];`)){let e=Hz(o),t=0;o+=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(`
|
|
23
|
-
`)}}else{let e=Vz(o);o+=`
|
|
24
|
-
declare namespace __json_default_export {
|
|
25
|
-
export { ${Array.from(e.entries()).map(([e,t])=>e===t?e:`${t} as ${e}`).join(`, `)} }
|
|
26
|
-
}
|
|
27
|
-
export { __json_default_export as default }`}}return{code:o||``,map:u}}},generateBundle:p?(e,t)=>{for(let e of Object.keys(t))t[e].type===`chunk`&&!h.test(e)&&!i.test(e)&&delete t[e]}:void 0,async buildEnd(){ue?.kill(),!zz.enabled&&pe&&await uz(pe,{recursive:!0,force:!0}).catch(()=>{}),pe=void 0,b&&(x=void 0)},watchChange(e){fe&&v(x||re,e)}}}function Vz(e){let t=new Map,{program:n}=uL(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 Hz(e){let t=[],{program:n}=uL(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 Uz=!1;function Wz({cwd:e=pz.cwd(),dtsInput:t=!1,emitDtsOnly:n=!1,tsconfig:r,tsconfigRaw:i={},compilerOptions:a={},sourcemap:o,resolver:s=`oxc`,cjsDefault:c=!1,sideEffects:l=!1,build:u=!1,incremental:d=!1,vue:f=!1,tsMacro:p=!1,parallel:m=!1,eager:h=!1,newContext:g=!1,emitJs:ee,oxc:_,tsgo:te=!1}){te===!0?te={}:typeof te==`object`&&te.enabled===!1&&(te=!1);let ne;if(r===!0||r==null){let{config:t,path:n}=jR(e)||{};r=n,ne=t}else typeof r==`string`?(r=dz.resolve(e||pz.cwd(),r),ne=AR(r)):r=void 0;a={...ne?.compilerOptions,...a},d||=a.incremental||!!a.tsBuildInfoFile,o??=!!a.declarationMap,a.declarationMap=o;let re={...ne,...i,compilerOptions:a};if(_??=!!(a?.isolatedDeclarations&&!f&&!te&&!p),_===!0&&(_={}),_&&(_.stripInternal??=!!a?.stripInternal,_.sourcemap=!!a.declarationMap),ee??=!!(a.checkJs||a.allowJs),te){if(f)throw Error("[rolldown-plugin-dts] The `tsgo` option is not compatible with the `vue` option. Please disable one of them.");if(p)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(_&&f)throw Error("[rolldown-plugin-dts] The `oxc` option is not compatible with the `vue` option. Please disable one of them.");if(_&&p)throw Error("[rolldown-plugin-dts] The `oxc` option is not compatible with the `tsMacro` option. Please disable one of them.");return te&&!Uz&&(console.warn("The `tsgo` option is experimental and may change in the future."),Uz=!0),{cwd:e,dtsInput:t,emitDtsOnly:n,tsconfig:r,tsconfigRaw:re,sourcemap:o,resolver:s,cjsDefault:c,sideEffects:l,build:u,incremental:d,vue:f,tsMacro:p,parallel:m,eager:h,newContext:g,emitJs:ee,oxc:_,tsgo:te}}const Gz=ne(`rolldown-plugin-dts:resolver`);function Kz(e){return o.test(e)||m.test(e)||ee.test(e)}function qz({cwd:e,tsconfig:t,tsconfigRaw:r,resolver:i,sideEffects:a}){let o=nz({tsconfig:t,resolveNodeModules:!0,ResolverFactory:g}),c=a?!0:null;return{name:`rolldown-plugin-dts:resolver`,resolveId:{order:`pre`,filter:[n(l(h))],async handler(e,t,n){if(!t)return;let r={id:e,external:!0,moduleSideEffects:a},i=await this.resolve(e,t,n);if(Gz(`Rolldown resolution for dts import %O from %O: %O`,e,t,i),i?.external)return Gz(`Rolldown marked dts import as external:`,e),r;let o=await u(e,t,i);if(Gz(`Dts resolution for dts import %O from %O: %O`,e,t,o),!o)return p.test(e)?(Gz(`Externalizing css import:`,e),r):(Gz(`Unresolvable dts import:`,e,`from`,t),Jz(e)?null:r);if(h.test(o))return Gz(`Resolving dts import to declaration file:`,e),{id:o,moduleSideEffects:c};if(Kz(o))return Gz(`Resolving dts import to source file:`,e),await this.load({id:o}),{id:s(o),moduleSideEffects:c}}}};async function u(n,a,s){let c;if(i===`tsc`){let{tscResolve:i}=await import(`./resolver-o20sdYK5-D5TGopbk.js`);c=i(n,a,e,t,r)}else c=o(n,a);return Gz(`Using %s for dts import: %O -> %O`,i,n,c),c&&=dz.normalize(c),!c||!Kz(c)?s&&Jz(s.id)&&Kz(s.id)&&!s.external?s.id:null:c}}function Jz(e){return e.startsWith(`.`)||dz.isAbsolute(e)}const Yz=ne(`rolldown-plugin-dts:options`);function Xz(e={}){Yz(`resolving dts options`);let t=Wz(e);Yz(`resolved dts options %o`,t);let n=[];return e.dtsInput?n.push(mz(t)):n.push(Bz(t)),n.push(qz(t),hz(t)),n}export{Xz as dts};
|