@iwsdk/vite-plugin-dev 1.1.0 → 1.2.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{S as e,N as t,R as s,T as i,g as n,c as r,I as a,M as o,a as c,B as h,C as l,L as p,b as u,d,P as f,e as m,f as y,h as x,i as g}from"./injection-template-0HSd4CcE.js";class k extends Error{url;phase;importChain;constructor(e,t,s){const i=t.importChain??[],n=i.length>1?`\nImport chain: ${i.join(" -> ")}`:"";super(`[GLTS:${t.phase}] ${e}\nURL: ${t.url}${n}`,{cause:s}),this.name="GLTSError",this.url=t.url,this.phase=t.phase,this.importChain=i}}function T(e,t,s){return e instanceof k?e:new k(t,s,e)}function b(e,t){const s=[];for(const e of t)try{e()}catch(e){s.push(e)}if(s.length>0)throw new AggregateError(s,e)}function S(e,t,s){try{s()}catch(s){throw new k("GLTS operation and cleanup both failed",{phase:"dispose",url:t},new AggregateError([e,s]))}throw e}function w(e){const t=new URL(e);return t.hash="",t.href}async function v(e,t,s,i){let n;try{n=await e(t,{cache:s?"no-cache":"default"})}catch(e){throw new k("Network request failed",{importChain:i,phase:"fetch",url:t},e)}if(!n.ok)throw new k(`Request failed with ${n.status} ${n.statusText}`,{importChain:i,phase:"fetch",url:t});try{return{source:await n.text(),url:w(new URL(n.url||t))}}catch(e){throw new k("Unable to read response body",{importChain:i,phase:"fetch",url:t},e)}}function C(e){return!e.startsWith(".")&&!e.startsWith("/")&&!/^[A-Za-z][A-Za-z\d+.-]*:/.test(e)}let P,E,A,I=2<<19;const _=1===new Uint8Array(new Uint16Array([1]).buffer)[0]?function(e,t){const s=e.length;let i=0;for(;i<s;)t[i]=e.charCodeAt(i++)}:function(e,t){const s=e.length;let i=0;for(;i<s;){const s=e.charCodeAt(i);t[i++]=(255&s)<<8|s>>>8}};let N,L,D;function M(e,t){D=e;let s="",i=D;for(;;){D>=N.length&&B();const e=N.charCodeAt(D);if(e===t)break;92===e?(s+=N.slice(i,D),s+=O(),i=D):(8232===e||8233===e||R(e)&&96!==t&&B(),++D)}return s+=N.slice(i,D++),s}function O(){let e=N.charCodeAt(++D);switch(++D,e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(F(2));case 117:return function(){let e;return 123===N.charCodeAt(D)?(++D,e=F(N.indexOf("}",D)-D),++D,e>1114111&&B()):e=F(4),e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}();case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===N.charCodeAt(D)&&++D;case 10:return"";case 56:case 57:B();default:if(e>=48&&e<=55){let t=N.substr(D-1,3).match(/^[0-7]+/)[0],s=parseInt(t,8);return s>255&&(t=t.slice(0,-1),s=parseInt(t,8)),D+=t.length-1,e=N.charCodeAt(D),"0"===t&&56!==e&&57!==e||B(),String.fromCharCode(s)}return R(e)?"":String.fromCharCode(e)}}function F(e){const t=D;let s=0,i=0;for(let t=0;t<e;++t,++D){let e,n=N.charCodeAt(D);if(95!==n){if(n>=97)e=n-97+10;else if(n>=65)e=n-65+10;else{if(!(n>=48&&n<=57))break;e=n-48}if(e>=16)break;i=n,s=16*s+e}else 95!==i&&0!==t||B(),i=n}return 95!==i&&D-t===e||B(),s}function R(e){return 13===e||10===e}function B(){throw Object.assign(Error(`Parse error ${L}:${N.slice(0,D).split("\n").length}:${D-N.lastIndexOf("\n",D-1)}`),{idx:D})}var j=",".charCodeAt(0),U=";".charCodeAt(0),q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$=new Uint8Array(64),V=new Uint8Array(128);for(let e=0;e<64;e++){const t=q.charCodeAt(e);$[e]=t,V[t]=e}function H(e,t){let s=0,i=0,n=0;do{const t=e.next();n=V[t],s|=(31&n)<<i,i+=5}while(32&n);const r=1&s;return s>>>=1,r&&(s=-2147483648|-s),t+s}function K(e,t,s){let i=t-s;i=i<0?-i<<1|1:i<<1;do{let t=31&i;i>>>=5,i>0&&(t|=32),e.write($[t])}while(i>0);return t}function z(e,t){return!(e.pos>=t)&&e.peek()!==j}var J="undefined"!=typeof TextDecoder?new TextDecoder:"undefined"!=typeof Buffer?{decode:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e[s]);return t}},W=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(16384)}write(e){const{buffer:t}=this;t[this.pos++]=e,16384===this.pos&&(this.out+=J.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:s}=this;return s>0?t+J.decode(e.subarray(0,s)):t}},X=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){const{buffer:t,pos:s}=this,i=t.indexOf(e,s);return-1===i?t.length:i}};function G(e){e.sort(Y)}function Y(e,t){return e[0]-t[0]}function Q(e){const t=new W;let s=0,i=0,n=0,r=0;for(let a=0;a<e.length;a++){const o=e[a];if(a>0&&t.write(U),0===o.length)continue;let c=0;for(let e=0;e<o.length;e++){const a=o[e];e>0&&t.write(j),c=K(t,a[0],c),1!==a.length&&(s=K(t,a[1],s),i=K(t,a[2],i),n=K(t,a[3],n),4!==a.length&&(r=K(t,a[4],r)))}}return t.flush()}class Z{constructor(e){this.bits=e instanceof Z?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}class ee{constructor(e,t,s){this.start=e,this.end=t,this.original=s,this.intro="",this.outro="",this.content=s,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new ee(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let t=this;for(;t;)e(t),t=t.next}eachPrevious(e){let t=this;for(;t;)e(t),t=t.previous}edit(e,t,s){return this.content=e,s||(this.intro="",this.outro=""),this.storeName=t,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){const t=e-this.start,s=this.original.slice(0,t),i=this.original.slice(t);this.original=s;const n=new ee(e,this.end,i);return n.outro=this.outro,this.outro="",this.end=e,this.edited?(n.edit("",!1),this.content=""):this.content=s,n.next=this.next,n.next&&(n.next.previous=n),n.previous=this,this.next=n,n}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.split(this.start+t.length).edit("",void 0,!0),this.edited&&this.edit(t,this.storeName,!0)),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const t=this.content.replace(e,"");if(t.length){if(t!==this.content){const e=this.split(this.end-t.length);this.edited&&e.edit(t,this.storeName,!0),this.edit("",void 0,!0)}return!0}return this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0}}function te(){return"undefined"!=typeof globalThis&&"function"==typeof globalThis.btoa?e=>globalThis.btoa(unescape(encodeURIComponent(e))):"function"==typeof Buffer?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const se=te();let ie=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Q(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList),void 0!==e.debugId&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+se(this.toString())}};function ne(e,t){const s=e.split(/[/\\]/),i=t.split(/[/\\]/);for(s.pop();s[0]===i[0];)s.shift(),i.shift();if(s.length){let e=s.length;for(;e--;)s[e]=".."}return s.concat(i).join("/")}const re=Object.prototype.toString;function ae(e){const t=e.split("\n"),s=[];for(let e=0,i=0;e<t.length;e++)s.push(i),i+=t[e].length+1;return function(e){let t=0,i=s.length;for(;t<i;){const n=t+i>>1;e<s[n]?i=n:t=n+1}const n=t-1;return{line:n,column:e-s[n]}}}const oe=/\w/;class ce{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,t,s,i){if(t.length){const n=t.length-1;let r=t.indexOf("\n",0),a=-1;for(;r>=0&&n>r;){const n=[this.generatedCodeColumn,e,s.line,s.column];i>=0&&n.push(i),this.rawSegments.push(n),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=r,r=t.indexOf("\n",r+1)}const o=[this.generatedCodeColumn,e,s.line,s.column];i>=0&&o.push(i),this.rawSegments.push(o),this.advance(t.slice(a+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(t));this.pending=null}addUneditedChunk(e,t,s,i,n){let r=t.start,a=!0,o=!1;for(;r<t.end;){if("\n"===s[r])i.line+=1,i.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=!0,o=!1;else{if(this.hires||a||n.has(r)){const t=[this.generatedCodeColumn,e,i.line,i.column];"boundary"===this.hires?oe.test(s[r])?o||(this.rawSegments.push(t),o=!0):(this.rawSegments.push(t),o=!1):this.rawSegments.push(t)}i.column+=1,this.generatedCodeColumn+=1,a=!1}r+=1}this.pending=null}advance(e){if(!e)return;const t=e.split("\n");if(t.length>1){for(let e=0;e<t.length-1;e++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}}const he="\n",le={insertLeft:!1,insertRight:!1,storeName:!1};class pe{constructor(e,t={}){const s=new ee(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:s},lastChunk:{writable:!0,value:s},lastSearchedChunk:{writable:!0,value:s},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new Z},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList},offset:{writable:!0,value:t.offset||0}}),this.byStart[0]=s,this.byEnd[e.length]=s}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byEnd[e];return s?s.appendLeft(t):this.intro+=t,this}appendRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byStart[e];return s?s.appendRight(t):this.outro+=t,this}clone(){const e=new pe(this.original,{filename:this.filename,offset:this.offset});let t=this.firstChunk,s=e.firstChunk=e.lastSearchedChunk=t.clone();for(;t;){e.byStart[s.start]=s,e.byEnd[s.end]=s;const i=t.next,n=i&&i.clone();n&&(s.next=n,n.previous=s,s=n),t=i}return e.lastChunk=s,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new Z(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const t=Object.keys(this.storedNames),s=new ce(e.hires),i=ae(this.original);return this.intro&&s.advance(this.intro),this.firstChunk.eachNext(e=>{const n=i(e.start);e.intro.length&&s.advance(e.intro),e.edited?s.addEdit(0,e.content,n,e.storeName?t.indexOf(e.original):-1):s.addUneditedChunk(0,e,this.original,n,this.sourcemapLocations),e.outro.length&&s.advance(e.outro)}),this.outro&&s.advance(this.outro),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?ne(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,mappings:s.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new ie(this.generateDecodedMap(e))}_ensureindentStr(){void 0===this.indentStr&&(this.indentStr=function(e){const t=e.split("\n"),s=t.filter(e=>/^\t+/.test(e)),i=t.filter(e=>/^ {2,}/.test(e));if(0===s.length&&0===i.length)return null;if(s.length>=i.length)return"\t";const n=i.reduce((e,t)=>{const s=/^ +/.exec(t)[0].length;return Math.min(s,e)},1/0);return new Array(n+1).join(" ")}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),null===this.indentStr?"\t":this.indentStr}indent(e,t){const s=/^[^\r\n]/gm;var i;if(i=e,"[object Object]"===re.call(i)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const n={};if((t=t||{}).exclude){("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(e=>{for(let t=e[0];t<e[1];t+=1)n[t]=!0})}let r=!1!==t.indentStart;const a=t=>r?`${e}${t}`:(r=!0,t);this.intro=this.intro.replace(s,a);let o=0,c=this.firstChunk;for(;c;){const t=c.end;if(c.edited)n[o]||(c.content=c.content.replace(s,a),c.content.length&&(r="\n"===c.content[c.content.length-1]));else for(o=c.start;o<t;){if(!n[o]){const t=this.original[o];"\n"===t?r=!0:"\r"!==t&&r&&(r=!1,o===c.start||(this._splitChunk(c,o),c=c.next),c.prependRight(e))}o+=1}o=c.end,c=c.next}return this.outro=this.outro.replace(s,a),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,t){return le.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),le.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return le.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),le.insertRight=!0),this.prependRight(e,t)}move(e,t,s){if(e+=this.offset,t+=this.offset,(s+=this.offset)>=e&&s<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(s);const i=this.byStart[e],n=this.byEnd[t],r=i.previous,a=n.next,o=this.byStart[s];if(!o&&n===this.lastChunk)return this;const c=o?o.previous:this.lastChunk;return r&&(r.next=a),a&&(a.previous=r),c&&(c.next=i),o&&(o.previous=n),i.previous||(this.firstChunk=n.next),n.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=c,n.next=o||null,c||(this.firstChunk=i),o||(this.lastChunk=n),this}overwrite(e,t,s,i){return i=i||{},this.update(e,t,s,{...i,overwrite:!i.contentOnly})}update(e,t,s,i){if(e+=this.offset,t+=this.offset,"string"!=typeof s)throw new TypeError("replacement content must be a string");if(0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(t),!0===i&&(le.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),le.storeName=!0),i={storeName:!0});const n=void 0!==i&&i.storeName,r=void 0!==i&&i.overwrite;if(n){const s=this.original.slice(e,t);Object.defineProperty(this.storedNames,s,{writable:!0,value:!0,enumerable:!0})}const a=this.byStart[e],o=this.byEnd[t];if(a){let e=a;for(;e!==o;){if(e.next!==this.byStart[e.end])throw new Error("Cannot overwrite across a split point");e=e.next,e.edit("",!1)}a.edit(s,n,!r)}else{const i=new ee(e,t,"").edit(s,n);o.next=i,i.previous=o}return this}prepend(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byEnd[e];return s?s.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byStart[e];return s?s.prependRight(t):this.outro=t+this.outro,this}remove(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let s=this.byStart[e];for(;s;)s.intro="",s.outro="",s.edit(""),s=t>s.end?this.byStart[s.end]:null;return this}reset(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let s=this.byStart[e];for(;s;)s.reset(),s=t>s.end?this.byStart[s.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(he);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,s=this.lastChunk;do{if(s.outro.length>0){if(e=s.outro.lastIndexOf(he),-1!==e)return s.outro.substr(e+1)+t;t=s.outro+t}if(s.content.length>0){if(e=s.content.lastIndexOf(he),-1!==e)return s.content.substr(e+1)+t;t=s.content+t}if(s.intro.length>0){if(e=s.intro.lastIndexOf(he),-1!==e)return s.intro.substr(e+1)+t;t=s.intro+t}}while(s=s.previous);return e=this.intro.lastIndexOf(he),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length-this.offset){if(e+=this.offset,t+=this.offset,0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}let s="",i=this.firstChunk;for(;i&&(i.start>e||i.end<=e);){if(i.start<t&&i.end>=t)return s;i=i.next}if(i&&i.edited&&i.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const n=i;for(;i;){!i.intro||n===i&&i.start!==e||(s+=i.intro);const r=i.start<t&&i.end>=t;if(r&&i.edited&&i.end!==t)throw new Error(`Cannot use replaced character ${t} as slice end anchor.`);const a=n===i?e-i.start:0,o=r?i.content.length+t-i.end:i.content.length;if(s+=i.content.slice(a,o),!i.outro||r&&i.end!==t||(s+=i.outro),r)break;i=i.next}return s}snip(e,t){const s=this.clone();return s.remove(0,e),s.remove(t,s.original.length),s}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk,s=t;const i=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);if(t=i?this.byStart[t.end]:this.byEnd[t.start],t===s)return;s=t}}_splitChunk(e,t){if(e.edited&&e.content.length){const s=ae(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${s.line}:${s.column} – "${e.original}")`)}const s=e.split(t);return this.byEnd[t]=e,this.byStart[t]=s,this.byEnd[s.end]=s,e===this.lastChunk&&(this.lastChunk=s),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,t=this.firstChunk;for(;t;)e+=t.toString(),t=t.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do{if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1}while(e=e.next);return!0}length(){let e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(e=e.next);return t}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const t=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let s=this.lastChunk;do{const e=s.end,i=s.trimEnd(t);if(s.end!==e&&(this.lastChunk===s&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),i)return!0;s=s.previous}while(s);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let s=this.firstChunk;do{const e=s.end,i=s.trimStart(t);if(s.end!==e&&(s===this.lastChunk&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),i)return!0;s=s.next}while(s);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function s(e,s){return"string"==typeof t?t.replace(/\$(\$|&|\d+)/g,(t,s)=>{if("$"===s)return"$";if("&"===s)return e[0];return+s<e.length?e[+s]:`$${s}`}):t(...e,e.index,s,e.groups)}if(e.global){const t=function(e,t){let s;const i=[];for(;s=e.exec(t);)i.push(s);return i}(e,this.original);t.forEach(e=>{if(null!=e.index){const t=s(e,this.original);t!==e[0]&&this.overwrite(e.index,e.index+e[0].length,t)}})}else{const t=this.original.match(e);if(t&&null!=t.index){const e=s(t,this.original);e!==t[0]&&this.overwrite(t.index,t.index+t[0].length,e)}}return this}_replaceString(e,t){const{original:s}=this,i=s.indexOf(e);return-1!==i&&("function"==typeof t&&(t=t(e,i,s)),e!==t&&this.overwrite(i,i+e.length,t)),this}replace(e,t){return"string"==typeof e?this._replaceString(e,t):this._replaceRegexp(e,t)}_replaceAllString(e,t){const{original:s}=this,i=e.length;for(let n=s.indexOf(e);-1!==n;n=s.indexOf(e,n+i)){const e=s.slice(n,n+i);let r=t;"function"==typeof t&&(r=t(e,n,s)),e!==r&&this.overwrite(n,n+i,r)}return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,t)}}function ue(e,t){const s=e.slice(0,t);return`${s.split("\n").length}:${t-s.lastIndexOf("\n")}`}function de({source:e,url:t,importChain:s}){const i=(e,i,n)=>new k(e,{importChain:s,phase:i,url:t},n);let n;try{[n]=function(e,t="@"){N=e,L=t;const s=2*N.length+(2<<18);if(s>I||!P){for(;s>I;)I*=2;E=new ArrayBuffer(I),_("xportportetaourceeferromsyncunctionlassvoyiedelecontininstantybreareturdebuggeawaithrwhileforifcatcfinallels",new Uint16Array(E,16,108)),P=function(e,t,s){"use asm";var i=new e.Int8Array(s),n=new e.Int16Array(s),r=new e.Int32Array(s),a=new e.Uint8Array(s),o=new e.Uint16Array(s),c=1040;function h(){var e=0,t=0,s=0,a=0,o=0,h=0,l=0,d=0,f=0;f=c;c=c+10240|0;i[808]=1;i[807]=0;n[401]=0;n[402]=0;r[70]=r[2];i[809]=0;r[68]=0;i[806]=0;r[71]=f+2048;r[72]=f;i[810]=0;e=(r[3]|0)+-2|0;r[73]=e;t=e+(r[66]<<1)|0;r[74]=t;e:while(1){s=e+2|0;r[73]=s;if(e>>>0>=t>>>0){a=19;break}t:do{switch(n[s>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if((((n[402]|0)==0?J(s)|0:0)?(E(e+4|0,16,10)|0)==0:0)?(u(),(i[808]|0)==0):0){a=9;break e}else a=18;break}case 105:{if(((n[e+4>>1]|0)==109?J(s)|0:0)?(E(e+6|0,26,8)|0)==0:0){p();a=18}else a=18;break}case 59:{a=18;break}case 47:switch(n[e+4>>1]|0){case 47:{B();break t}case 42:{P(1);break t}default:{a=17;break e}}default:{a=17;break e}}}while(0);if((a|0)==18){a=0;r[70]=r[73]}e=r[73]|0;t=r[74]|0}if((a|0)==9){e=r[73]|0;r[70]=e;a=20}else if((a|0)==17){i[808]=0;r[73]=e;a=20}else if((a|0)==19)if(!(i[806]|0)){e=s;a=20}else e=0;do{if((a|0)==20){e:while(1){s=e+2|0;r[73]=s;if(e>>>0>=(r[74]|0)>>>0){a=104;break}t=n[s>>1]|0;t:do{switch(t<<16>>16){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if(((n[402]|0)==0?J(s)|0:0)?(E(e+4|0,16,10)|0)==0:0){u();a=103}else a=103;break}case 105:{if(((n[e+4>>1]|0)==109?J(s)|0:0)?(E(e+6|0,26,8)|0)==0:0){p();a=103}else a=103;break}case 99:{if((((n[e+4>>1]|0)==108?J(s)|0:0)?(E(e+6|0,88,6)|0)==0:0)?V(n[e+12>>1]|0)|0:0){i[810]=1;a=103}else a=103;break}case 40:{s=r[71]|0;a=n[402]|0;r[s+((a&65535)<<3)>>2]=1;t=r[70]|0;n[402]=a+1<<16>>16;r[s+((a&65535)<<3)+4>>2]=t;a=103;break}case 91:{s=r[71]|0;a=n[402]|0;r[s+((a&65535)<<3)>>2]=8;t=r[70]|0;n[402]=a+1<<16>>16;r[s+((a&65535)<<3)+4>>2]=t;a=103;break}case 93:{e=n[402]|0;if(!(e<<16>>16)){a=40;break e}n[402]=e+-1<<16>>16;a=103;break}case 44:{t=n[401]|0;if(((t<<16>>16!=0?(o=n[402]|0,o<<16>>16!=0):0)?(r[(r[71]|0)+((o&65535)+-1<<3)>>2]|0)==5:0)?(h=r[(r[72]|0)+((t&65535)+-1<<2)>>2]|0,(r[h+4>>2]|0)==0):0){r[h+4>>2]=(r[70]|0)+2;r[73]=e+4;x(1)|0;a=r[73]|0;r[h+16>>2]=a;r[73]=a+-2;a=103}else a=103;break}case 41:{t=n[402]|0;if(!(t<<16>>16)){a=48;break e}n[402]=t+-1<<16>>16;s=n[401]|0;if(s<<16>>16!=0?(r[(r[71]|0)+((t+-1&65535)<<3)>>2]|0)==5:0){t=r[(r[72]|0)+((s&65535)+-1<<2)>>2]|0;if(!(r[t+4>>2]|0))r[t+4>>2]=(r[70]|0)+2;r[t+12>>2]=e+4;n[401]=s+-1<<16>>16;a=103}else a=103;break}case 123:{e=r[70]|0;a=r[62]|0;do{if((n[e>>1]|0)==41&(a|0)!=0?(r[a+12>>2]|0)==(e+2|0):0){t=r[63]|0;r[62]=t;if(!t){r[58]=0;break}else{r[t+36>>2]=0;break}}}while(0);s=r[71]|0;a=n[402]|0;r[s+((a&65535)<<3)>>2]=(i[810]|0)==0?2:6;n[402]=a+1<<16>>16;r[s+((a&65535)<<3)+4>>2]=e;i[810]=0;a=103;break}case 125:{e=n[402]|0;if(!(e<<16>>16)){a=61;break e}a=r[71]|0;n[402]=e+-1<<16>>16;if((r[a+((e+-1&65535)<<3)>>2]|0)==4){y();a=103}else a=103;break}case 34:case 39:{k(t);a=103;break}case 47:switch(n[e+4>>1]|0){case 47:{B();break t}case 42:{P(1);break t}default:{e=r[70]|0;t=n[e>>1]|0;s:do{if(!(I(t)|0))if(t<<16>>16==41){s=n[402]|0;if(!($(r[(r[71]|0)+((s&65535)<<3)+4>>2]|0)|0))a=76}else a=75;else switch(t<<16>>16){case 46:if(((n[e+-2>>1]|0)+-48&65535)<10){a=75;break s}else break s;case 43:if((n[e+-2>>1]|0)==43){a=75;break s}else break s;case 45:if((n[e+-2>>1]|0)==45){a=75;break s}else break s;default:break s}}while(0);if((a|0)==75){s=n[402]|0;a=76}s:do{if((a|0)==76){a=0;if(s<<16>>16!=0?(l=r[71]|0,d=(s&65535)+-1|0,t<<16>>16==102?(r[l+(d<<3)>>2]|0)==1:0):0){if(((n[e+-2>>1]|0)==111?T(e+-4|0)|0:0)?D(r[l+(d<<3)+4>>2]|0,196,3)|0:0)break}else a=81;if((a|0)==81?(0,t<<16>>16==125):0){a=r[71]|0;s=s&65535;if(C(r[a+(s<<3)+4>>2]|0)|0)break;if((r[a+(s<<3)>>2]|0)==6)break}if(!(m(e)|0)){switch(t<<16>>16){case 0:break s;case 47:{if(i[809]|0)break s;break}default:{}}a=r[64]|0;if((a|0?e>>>0>=(r[a>>2]|0)>>>0:0)?e>>>0<=(r[a+4>>2]|0)>>>0:0){v();i[809]=0;a=103;break t}s=r[3]|0;do{if(e>>>0<=s>>>0)break;e=e+-2|0;r[70]=e;t=n[e>>1]|0}while(!(R(t)|0));if(H(t)|0){do{if(e>>>0<=s>>>0)break;e=e+-2|0;r[70]=e}while(H(n[e>>1]|0)|0);if(O(e)|0){v();i[809]=0;a=103;break t}}i[809]=1;a=103;break t}}}while(0);v();i[809]=0;a=103;break t}}case 96:{s=r[71]|0;a=n[402]|0;r[s+((a&65535)<<3)+4>>2]=r[70];n[402]=a+1<<16>>16;r[s+((a&65535)<<3)>>2]=3;y();a=103;break}default:a=103}}while(0);if((a|0)==103){a=0;r[70]=r[73]}e=r[73]|0}if((a|0)==40){te();e=0;break}else if((a|0)==48){te();e=0;break}else if((a|0)==61){te();e=0;break}else if((a|0)==104){e=(i[806]|0)==0?(n[401]|n[402])<<16>>16==0:0;break}}}while(0);c=f;return e|0}function l(e){e=e|0;var t=0,s=0,a=0,o=0,c=0,h=0,l=0,d=0,f=0,g=0,b=0,S=0,w=0,A=0,_=0;S=n[402]|0;t=r[73]|0;r[70]=t;l=t;b=t;d=S;g=0;e:while(1){s=r[74]|0;o=d<<16>>16==S<<16>>16;a=g&e;h=t;while(1){c=h+2|0;if(h>>>0>=s>>>0){t=0;f=100;break e}t=n[c>>1]|0;if(!(H(t)|0)){if(o){switch(t<<16>>16){case 125:case 93:case 41:case 59:case 44:{f=100;break e}default:{}}if(a?he(t)|0:0){f=100;break e}}if(!(he(t)|0))break}h=c}r[73]=c;t:do{switch(t<<16>>16){case 101:{if((d<<16>>16==0?J(c)|0:0)?(E(h+4|0,16,10)|0)==0:0){u();f=89}else f=89;break}case 105:{if(((n[h+4>>1]|0)==109?J(c)|0:0)?(E(h+6|0,26,8)|0)==0:0){p();f=89}else f=89;break}case 99:{if((((n[h+4>>1]|0)==108?J(c)|0:0)?(E(h+6|0,88,6)|0)==0:0)?V(n[h+12>>1]|0)|0:0){i[810]=1;f=89}else f=89;break}case 40:{h=r[71]|0;f=d&65535;r[h+(f<<3)>>2]=1;n[402]=d+1<<16>>16;r[h+(f<<3)+4>>2]=l;f=89;break}case 91:{h=r[71]|0;f=d&65535;r[h+(f<<3)>>2]=8;n[402]=d+1<<16>>16;r[h+(f<<3)+4>>2]=l;f=89;break}case 93:if(!(d<<16>>16)){te();break t}else{n[402]=d+-1<<16>>16;f=89;break t}case 44:{s=n[401]|0;if((!(d<<16>>16==0|s<<16>>16==0)?(r[(r[71]|0)+((d&65535)+-1<<3)>>2]|0)==5:0)?(w=r[(r[72]|0)+((s&65535)+-1<<2)>>2]|0,(r[w+4>>2]|0)==0):0){r[w+4>>2]=b+2;r[73]=h+4;x(1)|0;f=r[73]|0;r[w+16>>2]=f;r[73]=f+-2;f=89}else f=89;break}case 41:{if(!(d<<16>>16)){te();break t}f=d+-1<<16>>16;n[402]=f;s=n[401]|0;if(s<<16>>16!=0?(r[(r[71]|0)+((f&65535)<<3)>>2]|0)==5:0){a=r[(r[72]|0)+((s&65535)+-1<<2)>>2]|0;if(!(r[a+4>>2]|0))r[a+4>>2]=b+2;r[a+12>>2]=h+4;n[401]=s+-1<<16>>16;f=89}else f=89;break}case 123:{f=r[62]|0;do{if((n[b>>1]|0)==41&(f|0)!=0?(r[f+12>>2]|0)==(b+2|0):0){s=r[63]|0;r[62]=s;if(!s){r[58]=0;break}else{r[s+36>>2]=0;break}}}while(0);h=r[71]|0;f=d&65535;r[h+(f<<3)>>2]=(i[810]|0)==0?2:6;n[402]=d+1<<16>>16;r[h+(f<<3)+4>>2]=l;i[810]=0;f=89;break}case 125:{if(!(d<<16>>16)){te();break t}l=r[71]|0;f=d+-1<<16>>16;n[402]=f;if((r[l+((f&65535)<<3)>>2]|0)==4){y();f=89}else f=89;break}case 34:case 39:{k(t);f=89;break}case 47:switch(n[h+4>>1]|0){case 47:{B();break t}case 42:{P(1);break t}default:{a=n[b>>1]|0;s:do{if(!(I(a)|0)){if(!(a<<16>>16==41?$(r[(r[71]|0)+((d&65535)<<3)+4>>2]|0)|0:0))f=62}else switch(a<<16>>16){case 46:if(((n[b+-2>>1]|0)+-48&65535)<10){f=62;break s}else break s;case 43:if((n[b+-2>>1]|0)==43){f=62;break s}else break s;case 45:if((n[b+-2>>1]|0)==45){f=62;break s}else break s;default:break s}}while(0);s:do{if((f|0)==62){f=0;if(d<<16>>16!=0?(A=r[71]|0,_=(d&65535)+-1|0,a<<16>>16==102?(r[A+(_<<3)>>2]|0)==1:0):0){if(((n[b+-2>>1]|0)==111?T(b+-4|0)|0:0)?D(r[A+(_<<3)+4>>2]|0,196,3)|0:0)break}else f=67;if((f|0)==67?(0,a<<16>>16==125):0){o=r[71]|0;s=d&65535;if(C(r[o+(s<<3)+4>>2]|0)|0)break;if((r[o+(s<<3)>>2]|0)==6)break}if(!(m(b)|0)){switch(a<<16>>16){case 0:break s;case 47:{if(i[809]|0)break s;break}default:{}}f=r[64]|0;if((f|0?b>>>0>=(r[f>>2]|0)>>>0:0)?b>>>0<=(r[f+4>>2]|0)>>>0:0){v();i[809]=0;f=89;break t}o=r[3]|0;s=b;do{if(s>>>0<=o>>>0)break;s=s+-2|0;r[70]=s;a=n[s>>1]|0}while(!(R(a)|0));if(H(a)|0){do{if(s>>>0<=o>>>0)break;s=s+-2|0;r[70]=s}while(H(n[s>>1]|0)|0);if(O(s)|0){v();i[809]=0;f=89;break t}}i[809]=1;f=89;break t}}}while(0);v();i[809]=0;f=89;break t}}case 96:{h=r[71]|0;f=d&65535;r[h+(f<<3)+4>>2]=l;n[402]=d+1<<16>>16;r[h+(f<<3)>>2]=3;y();f=89;break}default:f=89}}while(0);if((f|0)==89){f=0;r[70]=r[73]}if(i[806]|0){t=0;break}s=r[70]|0;t:do{if((s|0)==(b|0))if(g&((n[402]|0)==S<<16>>16&e)){t=n[r[73]>>1]|0;if(he(t)|0)break e;else t=1}else t=g;else{if(t<<16>>16==47){t=(i[809]|0)==0;break}if(j(t)|0)t=1;else{switch(t<<16>>16){case 96:case 34:case 39:case 41:case 93:case 125:{t=1;break t}default:{}}t=0}}}while(0);l=s;b=s;d=n[402]|0;g=t;t=r[73]|0}if((f|0)==100)r[73]=c;return t|0}function p(){var e=0,t=0,s=0,a=0,o=0,c=0;c=r[73]|0;r[73]=c+12;e=x(1)|0;s=r[73]|0;e:do{if(e<<16>>16!=46){if(!(e<<16>>16==115&s>>>0>(c+12|0)>>>0)){if(!(e<<16>>16==100&s>>>0>(c+10|0)>>>0)){s=0;o=28;break}if(E(s+2|0,50,8)|0){t=s;e=100;s=0;o=60;break}if(!(V(n[s+10>>1]|0)|0)){t=s;e=100;s=0;o=60;break}r[73]=s+10;e=x(1)|0;if(e<<16>>16==42){e=42;a=2;o=62;break}r[73]=s;s=0;o=28;break}if((E(s+2|0,40,10)|0)==0?V(n[s+12>>1]|0)|0:0){r[73]=s+12;e=x(1)|0;t=r[73]|0;if((t|0)!=(s+12|0)){if(e<<16>>16!=102){s=1;o=28;break}if(E(t+2|0,58,6)|0){e=102;s=1;o=60;break}if(!(R(n[t+8>>1]|0)|0)){e=102;s=1;o=60;break}}r[73]=s;s=0;o=28}else{t=s;e=115;s=0;o=60}}else{r[73]=s+2;switch((x(1)|0)<<16>>16){case 109:{e=r[73]|0;if(E(e+2|0,34,6)|0)break e;t=r[70]|0;if(!(K(t)|0)?(n[t>>1]|0)==46:0)break e;g(c,c,e+8|0,2);break e}case 115:{e=r[73]|0;if(E(e+2|0,40,10)|0)break e;t=r[70]|0;if(!(K(t)|0)?(n[t>>1]|0)==46:0)break e;r[73]=e+12;e=x(1)|0;s=1;o=28;break e}case 100:{e=r[73]|0;if(E(e+2|0,50,8)|0)break e;t=r[70]|0;if(!(K(t)|0)?(n[t>>1]|0)==46:0)break e;r[73]=e+10;e=x(1)|0;s=2;o=28;break e}default:break e}}}while(0);e:do{if((o|0)==28){if(e<<16>>16==40){t=r[71]|0;a=n[402]|0;r[t+((a&65535)<<3)>>2]=5;e=r[73]|0;n[402]=a+1<<16>>16;r[t+((a&65535)<<3)+4>>2]=e;if((n[r[70]>>1]|0)==46)break;r[73]=e+2;t=x(1)|0;g(c,r[73]|0,0,e);if(!s)e=r[62]|0;else{e=r[62]|0;r[e+28>>2]=(s|0)==1?5:7}a=r[72]|0;c=n[401]|0;n[401]=c+1<<16>>16;r[a+((c&65535)<<2)>>2]=e;switch(t<<16>>16){case 39:{k(39);break}case 34:{k(34);break}case 96:{if(!(S()|0))o=37;break}default:o=37}if((o|0)==37){r[73]=(r[73]|0)+-2;break}e=(r[73]|0)+2|0;r[73]=e;switch((x(1)|0)<<16>>16){case 44:{r[73]=(r[73]|0)+2;x(1)|0;a=r[62]|0;r[a+4>>2]=e;c=r[73]|0;r[a+16>>2]=c;i[a+24>>0]=1;r[73]=c+-2;break e}case 41:{n[402]=(n[402]|0)+-1<<16>>16;c=r[62]|0;r[c+4>>2]=e;r[c+12>>2]=(r[73]|0)+2;i[c+24>>0]=1;n[401]=(n[401]|0)+-1<<16>>16;break e}default:{r[73]=(r[73]|0)+-2;break e}}}if(!((s|0)==0&e<<16>>16==123)){switch(e<<16>>16){case 42:case 39:case 34:{a=s;o=62;break e}default:{}}t=r[73]|0;o=60;break}e=r[73]|0;if(n[402]|0){r[73]=e+-2;break}while(1){if(e>>>0>=(r[74]|0)>>>0)break;e=x(1)|0;if(!(se(e)|0)){if(e<<16>>16==125){o=50;break}}else k(e);e=(r[73]|0)+2|0;r[73]=e}if((o|0)==50)r[73]=(r[73]|0)+2;a=(x(1)|0)<<16>>16==102;e=r[73]|0;if(a?E(e+2|0,58,6)|0:0){te();break}r[73]=e+8;e=x(1)|0;if(se(e)|0){d(c,e,0);break}else{te();break}}}while(0);if((o|0)==60)if((t|0)==(c+12|0))r[73]=c+10;else{a=s;o=62}do{if((o|0)==62){if(!((e<<16>>16==42|(a|0)!=2)&(n[402]|0)==0)){r[73]=(r[73]|0)+-2;break}e=r[74]|0;t=r[73]|0;while(1){if(t>>>0>=e>>>0){o=69;break}s=n[t>>1]|0;if(se(s)|0){o=67;break}o=t+2|0;r[73]=o;t=o}if((o|0)==67){d(c,s,a);break}else if((o|0)==69){te();break}}}while(0);return}function u(){var e=0,t=0,s=0,a=0,o=0,c=0,h=0,p=0,u=0,f=0;p=r[73]|0;u=r[64]|0;r[73]=p+12;t=x(1)|0;e=r[73]|0;if(!((e|0)==(p+12|0)?!(A(t)|0):0))f=3;e:do{if((f|0)==3){r[65]=p;t:do{switch(t<<16>>16){case 123:{r[73]=e+2;e=x(1)|0;t=r[73]|0;while(1){if(se(e)|0){k(e);e=(r[73]|0)+2|0;r[73]=e}else{U(e)|0;e=r[73]|0}x(1)|0;e=b(t,e)|0;if(e<<16>>16==44){r[73]=(r[73]|0)+2;e=x(1)|0}if(e<<16>>16==125){f=15;break}f=t;t=r[73]|0;if((t|0)==(f|0)){f=12;break}if(t>>>0>(r[74]|0)>>>0){f=14;break}}if((f|0)==12){te();break e}else if((f|0)==14){te();break e}else if((f|0)==15){i[807]=1;r[73]=(r[73]|0)+2;break t}break}case 42:{r[73]=e+2;x(1)|0;f=r[73]|0;b(f,f)|0;break}default:{i[808]=0;switch(t<<16>>16){case 100:{r[73]=e+14;switch((x(1)|0)<<16>>16){case 97:{t=r[73]|0;if((E(t+2|0,64,8)|0)==0?H(n[t+10>>1]|0)|0:0){r[73]=t+10;x(0)|0;f=22}break}case 102:{f=22;break}case 99:{t=r[73]|0;if(((E(t+2|0,86,8)|0)==0?(u=n[t+10>>1]|0,V(u)|0|u<<16>>16==123):0)?(r[73]=t+10,s=x(1)|0,s<<16>>16!=123):0){h=s;f=31}break}default:{}}s:do{if((f|0)==22?(a=r[73]|0,(E(a+2|0,72,14)|0)==0):0){t=n[a+16>>1]|0;if(!(V(t)|0))switch(t<<16>>16){case 40:case 42:break;default:break s}r[73]=a+16;t=x(1)|0;if(t<<16>>16==42){r[73]=(r[73]|0)+2;t=x(1)|0}if(t<<16>>16!=40){h=t;f=31}}}while(0);if((f|0)==31?(o=r[73]|0,U(h)|0,c=r[73]|0,c>>>0>o>>>0):0){_(e,e+14|0,o,c);r[73]=(r[73]|0)+-2;break e}_(e,e+14|0,0,0);r[73]=e+12;break e}case 97:{r[73]=e+10;x(0)|0;e=r[73]|0;f=35;break}case 102:{f=35;break}case 99:{if((E(e+2|0,86,8)|0)==0?R(n[e+10>>1]|0)|0:0){r[73]=e+10;f=x(1)|0;u=r[73]|0;U(f)|0;f=r[73]|0;_(u,f,u,f);r[73]=(r[73]|0)+-2;break e}r[73]=e+4;e=e+4|0;break}case 108:case 118:break;default:break e}if((f|0)==35){r[73]=e+16;e=x(1)|0;if(e<<16>>16==42){r[73]=(r[73]|0)+2;e=x(1)|0}u=r[73]|0;U(e)|0;f=r[73]|0;_(u,f,u,f);r[73]=(r[73]|0)+-2;break e}r[73]=e+6;i[808]=0;while(1){t=x(1)|0;e=r[73]|0;if(e>>>0>(r[74]|0)>>>0)break;t=M(t)|0;if((r[73]|0)==(e|0))break;if(t<<16>>16==61)t=l(1)|0;e=r[73]|0;if(t<<16>>16!=44)break;r[73]=e+2}r[73]=e+-2;break e}}}while(0);f=(x(1)|0)<<16>>16==102;e=r[73]|0;if(f?(E(e+2|0,58,6)|0)==0:0){r[73]=e+8;d(p,x(1)|0,0);e=(u|0)==0?236:u+20|0;while(1){e=r[e>>2]|0;if(!e)break e;r[e+12>>2]=0;r[e+8>>2]=0;e=e+20|0}}r[73]=e+-2}}while(0);return}function d(e,t,s){e=e|0;t=t|0;s=s|0;var i=0,a=0,o=0,c=0,h=0;i=(r[73]|0)+2|0;switch(t<<16>>16){case 39:{k(39);a=5;break}case 34:{k(34);a=5;break}default:te()}do{if((a|0)==5){g(e,i,r[73]|0,1);if((s|0)>0)r[(r[62]|0)+28>>2]=(s|0)==1?4:6;r[73]=(r[73]|0)+2;c=(x(0)|0)<<16>>16==119;o=r[73]|0;if(((c?(n[o+2>>1]|0)==105:0)?(n[o+4>>1]|0)==116:0)?(n[o+6>>1]|0)==104:0){r[73]=o+8;if((x(1)|0)<<16>>16!=123){r[73]=o;break}c=r[73]|0;i=c;a=0;e:while(1){r[73]=i+2;i=x(1)|0;do{if(i<<16>>16!=39){t=r[73]|0;if(i<<16>>16==34){k(34);e=(r[73]|0)+2|0;r[73]=e;i=x(1)|0;break}else{i=U(i)|0;e=r[73]|0;break}}else{t=r[73]|0;k(39);e=(r[73]|0)+2|0;r[73]=e;i=x(1)|0}}while(0);if(i<<16>>16!=58){a=21;break}r[73]=(r[73]|0)+2;switch((x(1)|0)<<16>>16){case 39:{i=r[73]|0;k(39);break}case 34:{i=r[73]|0;k(34);break}default:{a=25;break e}}h=(r[73]|0)+2|0;s=r[67]|0;r[67]=s+20;r[s>>2]=t;r[s+4>>2]=e;r[s+8>>2]=i;r[s+12>>2]=h;r[s+16>>2]=0;r[((a|0)==0?(r[62]|0)+32|0:a+16|0)>>2]=s;r[73]=(r[73]|0)+2;switch((x(1)|0)<<16>>16){case 125:{a=29;break e}case 44:break;default:{a=27;break e}}i=(r[73]|0)+2|0;r[73]=i;a=s}if((a|0)==21){r[73]=o;break}else if((a|0)==25){r[73]=o;break}else if((a|0)==27){r[73]=o;break}else if((a|0)==29){h=r[62]|0;r[h+16>>2]=c;r[h+12>>2]=(r[73]|0)+2;break}}r[73]=o+-2}}while(0);return}function f(){var e=0,t=0,s=0,i=0,a=0,o=0,c=0;e=r[73]|0;a=(n[e>>1]|0)==123;r[73]=e+2;e=x(1)|0;o=a?125:93;e:while(1){if((o|0)==(e&65535|0))break;i=r[73]|0;if(i>>>0>(r[74]|0)>>>0)break;if((e<<16>>16==46?(n[i+2>>1]|0)==46:0)?(n[i+4>>1]|0)==46:0){r[73]=i+6;e=M(x(1)|0)|0}else c=9;t:do{if((c|0)==9){c=0;do{if(a){do{if(e<<16>>16==91){l(0)|0;r[73]=(r[73]|0)+2;t=i}else{if(se(e)|0){k(e);r[73]=(r[73]|0)+2;t=i;break}if((e+-48&65535)>=10){U(e)|0;t=r[73]|0;break}e=i;s:while(1){s=e+2|0;t=n[s>>1]|0;i:do{if((t+-48&65535)>=10){switch(t<<16>>16){case 67:case 68:case 70:case 97:case 65:case 99:case 100:case 102:case 46:case 66:case 69:case 79:case 88:case 95:case 98:case 101:case 110:case 111:case 120:break i;case 43:case 45:break;default:break s}switch(n[e>>1]|0){case 69:case 101:break;default:break s}}}while(0);e=s}r[73]=s;t=i}}while(0);e=x(1)|0;if(e<<16>>16==58){r[73]=(r[73]|0)+2;e=M(x(1)|0)|0;break}if(t>>>0>i>>>0)_(i,t,i,t)}else if(e<<16>>16==44){r[73]=i+2;e=x(1)|0;break t}else{e=M(e)|0;break}}while(0);if(e<<16>>16==61)e=l(0)|0;if(e<<16>>16!=44)break e;r[73]=(r[73]|0)+2;e=x(1)|0}}while(0)}return}function m(e){e=e|0;e:do{switch(n[e>>1]|0){case 100:switch(n[e+-2>>1]|0){case 105:{e=D(e+-4|0,94,2)|0;break e}case 108:{e=D(e+-4|0,98,3)|0;break e}default:{e=0;break e}}case 101:switch(n[e+-2>>1]|0){case 115:switch(n[e+-4>>1]|0){case 108:{e=F(e+-6|0,101)|0;break e}case 97:{e=F(e+-6|0,99)|0;break e}default:{e=0;break e}}case 116:{e=D(e+-4|0,104,4)|0;break e}case 117:{e=D(e+-4|0,112,6)|0;break e}default:{e=0;break e}}case 102:{if((n[e+-2>>1]|0)==111?(n[e+-4>>1]|0)==101:0)switch(n[e+-6>>1]|0){case 99:{e=D(e+-8|0,124,6)|0;break e}case 112:{e=D(e+-8|0,136,2)|0;break e}default:{e=0;break e}}else e=0;break}case 107:{e=D(e+-2|0,140,4)|0;break}case 110:{if(F(e+-2|0,105)|0)e=1;else e=D(e+-2|0,148,5)|0;break}case 111:{e=F(e+-2|0,100)|0;break}case 114:{e=D(e+-2|0,158,7)|0;break}case 116:{e=D(e+-2|0,172,4)|0;break}case 119:switch(n[e+-2>>1]|0){case 101:{e=F(e+-4|0,110)|0;break e}case 111:{e=D(e+-4|0,180,3)|0;break e}default:{e=0;break e}}default:e=0}}while(0);return e|0}function y(){var e=0,t=0,s=0;t=r[74]|0;s=r[73]|0;e:while(1){e=s+2|0;if(s>>>0>=t>>>0){t=10;break}switch(n[e>>1]|0){case 96:{t=7;break e}case 36:{if((n[s+4>>1]|0)==123){t=6;break e}break}case 92:{e=s+4|0;break}default:{}}s=e}if((t|0)==6){e=s+4|0;r[73]=e;t=r[71]|0;s=n[402]|0;r[t+((s&65535)<<3)>>2]=4;n[402]=s+1<<16>>16;r[t+((s&65535)<<3)+4>>2]=e}else if((t|0)==7){r[73]=e;t=r[71]|0;s=(n[402]|0)+-1<<16>>16;n[402]=s;if((r[t+((s&65535)<<3)>>2]|0)!=3)te()}else if((t|0)==10){r[73]=e;te()}return}function x(e){e=e|0;var t=0,s=0,i=0;s=r[73]|0;e:do{t=n[s>>1]|0;t:do{if(t<<16>>16!=47)if(e)if(V(t)|0)break;else break e;else if(H(t)|0)break;else break e;else switch(n[s+2>>1]|0){case 47:{B();break t}case 42:{P(e);break t}default:{t=47;break e}}}while(0);i=r[73]|0;s=i+2|0;r[73]=s}while(i>>>0<(r[74]|0)>>>0);return t|0}function g(e,t,s,n){e=e|0;t=t|0;s=s|0;n=n|0;var a=0,o=0;o=r[67]|0;r[67]=o+40;a=r[62]|0;r[((a|0)==0?232:a+36|0)>>2]=o;r[63]=a;r[62]=o;r[o+8>>2]=e;if(2==(n|0)){e=3;a=s}else{e=1==(n|0)?1:2;a=1==(n|0)?s+2|0:0}r[o+12>>2]=a;r[o+28>>2]=e;r[o>>2]=t;r[o+4>>2]=s;r[o+16>>2]=0;r[o+20>>2]=n;i[o+24>>0]=1==(n|0)&1;r[o+32>>2]=0;r[o+36>>2]=0;if(1==(n|0)|2==(n|0))i[807]=1;return}function k(e){e=e|0;var t=0,s=0,i=0,a=0;a=r[74]|0;t=r[73]|0;while(1){i=t+2|0;if(t>>>0>=a>>>0){t=9;break}s=n[i>>1]|0;if(s<<16>>16==e<<16>>16){t=10;break}if(s<<16>>16==92){s=t+4|0;if((n[s>>1]|0)==13){t=t+6|0;t=(n[t>>1]|0)==10?t:s}else t=s}else if(he(s)|0){t=9;break}else t=i}if((t|0)==9){r[73]=i;te()}else if((t|0)==10)r[73]=i;return}function T(e){e=e|0;var t=0,s=0;t=n[e>>1]|0;if(V(t)|0)s=3;else switch(t<<16>>16){case 41:case 125:case 93:{s=3;break}default:e=0}e:do{if((s|0)==3){s=r[3]|0;while(1){if(e>>>0<=s>>>0)break;e=e+-2|0;if(!(V(t)|0))break;t=n[e>>1]|0}switch(t<<16>>16){case 41:case 125:case 93:{e=1;break e}default:{}}e=(A(t)|0)^1}}while(0);return e|0}function b(e,t){e=e|0;t=t|0;var s=0,i=0,a=0,o=0;s=r[73]|0;i=n[s>>1]|0;a=(e|0)==(t|0)?0:e;o=(e|0)==(t|0)?0:t;if(i<<16>>16==97){r[73]=s+4;s=x(1)|0;e=r[73]|0;if(se(s)|0){k(s);t=(r[73]|0)+2|0;r[73]=t}else{U(s)|0;t=r[73]|0}i=x(1)|0;s=r[73]|0}if((s|0)!=(e|0))_(e,t,a,o);return i|0}function S(){var e=0,t=0,s=0,i=0;i=r[73]|0;s=r[74]|0;t=i;e:while(1){e=t+2|0;if(t>>>0>=s>>>0){t=7;break}switch(n[e>>1]|0){case 96:{t=8;break e}case 92:{e=t+4|0;break}case 36:{if((n[t+4>>1]|0)==123){t=7;break e}break}default:{}}t=e}if((t|0)==7){r[73]=i;e=0}else if((t|0)==8){r[73]=e;e=1}return e|0}function w(){var e=0,t=0,s=0;s=r[74]|0;t=r[73]|0;e:while(1){e=t+2|0;if(t>>>0>=s>>>0){t=6;break}switch(n[e>>1]|0){case 13:case 10:{t=6;break e}case 93:{t=7;break e}case 92:{e=t+4|0;break}default:{}}t=e}if((t|0)==6){r[73]=e;te();e=0}else if((t|0)==7){r[73]=e;e=93}return e|0}function v(){var e=0,t=0;e:while(1){e=r[73]|0;r[73]=e+2;if(e>>>0>=(r[74]|0)>>>0){t=7;break}switch(n[e+2>>1]|0){case 13:case 10:{t=7;break e}case 47:break e;case 91:{w()|0;break}case 92:{r[73]=e+4;break}default:{}}}if((t|0)==7)te();return}function C(e){e=e|0;switch(n[e>>1]|0){case 62:{e=(n[e+-2>>1]|0)==61;break}case 41:case 59:{e=1;break}case 104:{e=D(e+-2|0,206,4)|0;break}case 121:{e=D(e+-2|0,214,6)|0;break}case 101:{e=D(e+-2|0,226,3)|0;break}default:e=0}return e|0}function P(e){e=e|0;var t=0,s=0,i=0,a=0,o=0;a=(r[73]|0)+2|0;r[73]=a;s=r[74]|0;while(1){t=a+2|0;if(a>>>0>=s>>>0)break;i=n[t>>1]|0;if(!e?he(i)|0:0)break;if(i<<16>>16==42?(n[a+4>>1]|0)==47:0){o=8;break}a=t}if((o|0)==8){r[73]=t;t=a+4|0}r[73]=t;return}function E(e,t,s){e=e|0;t=t|0;s=s|0;var n=0,r=0;e:do{if(!s)e=0;else{while(1){n=i[e>>0]|0;r=i[t>>0]|0;if(n<<24>>24!=r<<24>>24)break;s=s+-1|0;if(!s){e=0;break e}else{e=e+1|0;t=t+1|0}}e=(n&255)-(r&255)|0}}while(0);return e|0}function A(e){e=e|0;e:do{switch(e<<16>>16){case 38:case 37:case 33:{e=1;break}default:if((e&-8)<<16>>16==40|(e+-58&65535)<6)e=1;else{switch(e<<16>>16){case 91:case 93:case 94:{e=1;break e}default:{}}e=(e+-123&65535)<4}}}while(0);return e|0}function I(e){e=e|0;e:do{switch(e<<16>>16){case 38:case 37:case 33:break;default:if(!((e+-58&65535)<6|(e+-40&65535)<7&e<<16>>16!=41)){switch(e<<16>>16){case 91:case 94:break e;default:{}}return e<<16>>16!=125&(e+-123&65535)<4|0}}}while(0);return 1}function _(e,t,s,n){e=e|0;t=t|0;s=s|0;n=n|0;var a=0,o=0;a=r[67]|0;r[67]=a+24;o=r[64]|0;r[((o|0)==0?236:o+20|0)>>2]=a;r[64]=a;r[a>>2]=e;r[a+4>>2]=t;r[a+8>>2]=s;r[a+12>>2]=n;r[a+16>>2]=r[65];r[a+20>>2]=0;i[807]=1;return}function N(e){e=e|0;var t=0;t=n[e>>1]|0;e:do{if((t+-9&65535)>=5){switch(t<<16>>16){case 160:case 32:{t=1;break e}default:{}}if(A(t)|0)return t<<16>>16!=46|(K(e)|0)|0;else t=0}else t=1}while(0);return t|0}function L(e){e=e|0;var t=0,s=0;s=c;c=c+16|0;r[s>>2]=0;r[66]=e;t=r[3]|0;n[t+(e<<1)>>1]=0;r[s>>2]=t+(e<<1)+2;r[67]=t+(e<<1)+2;r[58]=0;r[62]=0;r[60]=0;r[59]=0;r[64]=0;r[61]=0;c=s;return t|0}function D(e,t,s){e=e|0;t=t|0;s=s|0;var i=0,n=0;n=e+(0-s<<1)+2|0;i=r[3]|0;if(n>>>0>=i>>>0?(E(n,t,s<<1)|0)==0:0)if((n|0)==(i|0))i=1;else i=N(e+(0-s<<1)|0)|0;else i=0;return i|0}function M(e){e=e|0;var t=0;switch(e<<16>>16){case 91:case 123:{f();r[73]=(r[73]|0)+2;break}default:{t=r[73]|0;U(e)|0;e=r[73]|0;if(e>>>0>t>>>0)_(t,e,t,e)}}return x(1)|0}function O(e){e=e|0;switch(n[e>>1]|0){case 107:{e=D(e+-2|0,140,4)|0;break}case 101:{if((n[e+-2>>1]|0)==117)e=D(e+-4|0,112,6)|0;else e=0;break}default:e=0}return e|0}function F(e,t){e=e|0;t=t|0;var s=0;s=r[3]|0;if(s>>>0<=e>>>0?(n[e>>1]|0)==t<<16>>16:0)if((s|0)==(e|0))s=1;else s=R(n[e+-2>>1]|0)|0;else s=0;return s|0}function R(e){e=e|0;e:do{if((e+-9&65535)<5)e=1;else{switch(e<<16>>16){case 32:case 160:{e=1;break e}default:{}}e=e<<16>>16!=46&(A(e)|0)}}while(0);return e|0}function B(){var e=0,t=0,s=0;e=r[74]|0;s=r[73]|0;e:while(1){t=s+2|0;if(s>>>0>=e>>>0)break;switch(n[t>>1]|0){case 13:case 10:break e;default:s=t}}r[73]=t;return}function j(e){e=e|0;e:do{if(((e&-33)+-65&65535)<26|(e+-48&65535)<10)e=1;else{switch(e<<16>>16){case 36:case 95:{e=1;break e}default:{}}e=(e&65535)>127}}while(0);return e|0}function U(e){e=e|0;while(1){if(V(e)|0)break;if(A(e)|0)break;e=(r[73]|0)+2|0;r[73]=e;e=n[e>>1]|0;if(!(e<<16>>16)){e=0;break}}return e|0}function q(){var e=0;e=r[(r[60]|0)+20>>2]|0;switch(e|0){case 1:{e=-1;break}case 2:{e=-2;break}default:e=e-(r[3]|0)>>1}return e|0}function $(e){e=e|0;if(!(D(e,186,5)|0)?!(D(e,196,3)|0):0)e=D(e,202,2)|0;else e=1;return e|0}function V(e){e=e|0;switch(e<<16>>16){case 160:case 9:case 10:case 11:case 12:case 13:case 32:{e=1;break}default:e=0}return e|0}function H(e){e=e|0;switch(e<<16>>16){case 160:case 32:case 12:case 11:case 9:{e=1;break}default:e=0}return e|0}function K(e){e=e|0;if((n[e>>1]|0)==46?(n[e+-2>>1]|0)==46:0)e=(n[e+-4>>1]|0)==46;else e=0;return e|0}function z(){var e=0;e=r[69]|0;e=r[((e|0)==0?(r[60]|0)+32|0:e+16|0)>>2]|0;r[69]=e;return(e|0)!=0|0}function J(e){e=e|0;if((r[3]|0)==(e|0))e=1;else e=N(e+-2|0)|0;return e|0}function W(){var e=0;e=r[(r[61]|0)+12>>2]|0;if(!e)e=-1;else e=e-(r[3]|0)>>1;return e|0}function X(){var e=0;e=r[(r[60]|0)+12>>2]|0;if(!e)e=-1;else e=e-(r[3]|0)>>1;return e|0}function G(){var e=0;e=r[(r[61]|0)+8>>2]|0;if(!e)e=-1;else e=e-(r[3]|0)>>1;return e|0}function Y(){var e=0;e=r[(r[60]|0)+16>>2]|0;if(!e)e=-1;else e=e-(r[3]|0)>>1;return e|0}function Q(){var e=0;e=r[(r[60]|0)+4>>2]|0;if(!e)e=-1;else e=e-(r[3]|0)>>1;return e|0}function Z(){var e=0;e=r[60]|0;e=r[((e|0)==0?232:e+36|0)>>2]|0;r[60]=e;return(e|0)!=0|0}function ee(){var e=0;e=r[61]|0;e=r[((e|0)==0?236:e+20|0)>>2]|0;r[61]=e;return(e|0)!=0|0}function te(){i[806]=1;r[68]=(r[73]|0)-(r[3]|0)>>1;r[73]=(r[74]|0)+2;return}function se(e){e=e|0;return e<<16>>16==39|e<<16>>16==34|0}function ie(){return(r[(r[61]|0)+16>>2]|0)-(r[3]|0)>>1|0}function ne(){return(r[(r[69]|0)+12>>2]|0)-(r[3]|0)>>1|0}function re(){return(r[(r[69]|0)+8>>2]|0)-(r[3]|0)>>1|0}function ae(){return(r[(r[69]|0)+4>>2]|0)-(r[3]|0)>>1|0}function oe(){return(r[(r[60]|0)+8>>2]|0)-(r[3]|0)>>1|0}function ce(){return(r[(r[61]|0)+4>>2]|0)-(r[3]|0)>>1|0}function he(e){e=e|0;return e<<16>>16==13|e<<16>>16==10|0}function le(){return(r[r[69]>>2]|0)-(r[3]|0)>>1|0}function pe(){return(r[r[60]>>2]|0)-(r[3]|0)>>1|0}function ue(){return(r[r[61]>>2]|0)-(r[3]|0)>>1|0}function de(){return a[(r[60]|0)+24>>0]|0|0}function fe(e){e=e|0;r[3]=e;return}function me(){return r[(r[60]|0)+28>>2]|0}function ye(){return(i[807]|0)!=0|0}function xe(){return(i[808]|0)!=0|0}function ge(){r[69]=0;return}function ke(){return r[68]|0}function Te(e,t){e=e|0;t=t|0;c=e+t+15&-16;return t}return{su:Te,ai:Y,ake:ae,aks:le,ave:ne,avs:re,e:ke,ee:ce,ele:W,els:G,es:ue,ess:ie,f:xe,id:q,ie:Q,ip:de,is:pe,it:me,ms:ye,p:h,ra:z,re:ee,ri:Z,rsa:ge,sa:L,se:X,ses:fe,ss:oe}}("undefined"!=typeof globalThis?globalThis:self,{},E),A=P.su(I-(2<<17),1040)}const i=N.length+1;P.ses(A),P.sa(i-1),_(N,new Uint16Array(E,A,i)),P.p()||(D=P.e(),B());const n=[],r=[];for(;P.ri();){const e=P.is(),t=P.ie(),s=P.ai(),i=P.id(),r=P.ss(),o=P.se(),c=P.it();let h;P.ip()&&(h=M(-1===i?e:e+1,N.charCodeAt(-1===i?e-1:e)));let l=null;for(l=[],P.rsa();P.ra();){const e=P.aks(),t=P.ake(),s=P.avs(),i=P.ave();l.push([a(e,t),a(s,i)])}l=l.length>0?l:null,n.push({t:c,n:h,s:e,e:t,ss:r,se:o,d:i,a:s,at:l})}for(;P.re();){const e=P.es(),t=P.ee(),s=P.els(),i=P.ele(),n=s<0?void 0:a(s,i),o=a(e,t);r.push({s:e,e:t,ls:s,le:i,ss:P.ess(),n:o,ln:n})}return[n,r,!!P.f(),!!P.ms()];function a(e,t){const s=N.charCodeAt(e);return 34===s||39===s?M(e+1,s):N.slice(e,t)}}(e,t)}catch(e){throw i("Unable to parse module imports","transform",e)}const r=[];for(const t of n)if(3!==t.t){if(1!==t.t)throw i(`Dynamic and source-phase imports are not supported (${ue(e,t.ss)})`,"transform");if(t.at)throw i(`Import attributes are not supported (${ue(e,t.ss)})`,"transform");if(!t.n)throw i(`Static import has no resolvable specifier (${ue(e,t.ss)})`,"resolve");r.push({specifier:t.n,start:t.s,end:t.e})}return{imports:r,usesImportMeta:n.some(e=>3===e.t)}}async function fe(e,t){const{imports:s,usesImportMeta:i}=de(e),n=new pe(e.source,{filename:e.url});for(const{specifier:e,start:i,end:r}of s)n.overwrite(i,r,await t(e));if(i){const t=e.source.match(/^#![^\r\n\u2028\u2029]*(?:\r\n|[\r\n\u2028\u2029])/)?.[0].length??0;n.appendLeft(t,`import.meta.url = ${JSON.stringify(e.url)};\n`)}const r=e.url.replace(/[\n\r\u2028\u2029]/g,"");return n.append(`\n//# sourceURL=${r}\n`),n.toString()}class me{#e;#t;#s;#i;#n=new Map;#r=new Map;constructor({cdnURL:e,fetch:t,bridge:s,urls:i}){this.#e=e,this.#t=t,this.#s=s,this.#i=i}async linkImport(e,t,i){const n=this.#s.getHostModuleURL(e);if(n)return n;if(e.startsWith("#"))throw new k(`Unsupported CDN package import: ${e}`,{importChain:i,phase:"resolve",url:t});const r=C(e)?function(e,t,s){const i=new URL(e,t);return i.searchParams.set("bundle",""),i.searchParams.set("external",s.join(",")),i.searchParams.set("target","es2022"),i}(function(e){return e.startsWith("three/addons/")?`three@0.${s}.0/examples/jsm/${e.slice(13)}`:e.startsWith("three/examples/")?`three@0.${s}.0/${e.slice(6)}`:e}(e),this.#e,this.#s.hostSpecifiers):new URL(e,t);return"http:"!==r.protocol&&"https:"!==r.protocol?r.href:this.#a(w(r),i)}async#a(e,t){const s=this.#r.get(e);if(s)return s;const i=[...t,e];if(t.includes(e))throw new k("Cyclic CDN modules are not supported",{importChain:i,phase:"resolve",url:e});let n=this.#n.get(e);n||(n=v(this.#t,e,!1,i),this.#n.set(e,n),n.catch(()=>this.#n.delete(e)));const r=await n,a=this.#r.get(r.url);if(a)return this.#r.set(e,a),a;let o;try{o=await fe({...r,importChain:i},e=>this.linkImport(e,r.url,i))}catch(e){throw T(e,"Unable to transform CDN module",{importChain:i,phase:"transform",url:r.url})}const c=this.#r.get(e)??this.#r.get(r.url);if(c)return c;const h=this.#i.create(o);return this.#r.set(e,h),this.#r.set(r.url,h),h}}let ye=0;class xe{namespaces;#i;#o=new Map;#c=new Map;#h=function(){return ye+=1,`__glts_bridge_${Date.now()}_${ye}`}();#l=[`const bridge = globalThis[${JSON.stringify(this.#h)}];`,"if (!bridge) throw new Error('GLTS bridge is unavailable');"];contextToken=`glts-context:${this.#h}`;#p=0;constructor(e,t){this.#i=t,this.namespaces={...e,three:i},Reflect.set(globalThis,this.#h,this);for(const[e,s]of Object.entries(this.namespaces))this.#o.set(e,t.create(this.#u(e,s)))}createContextModule(e){this.#p+=1;const t=this.#p,s=this.#i.create([...this.#l,`const context = bridge.takeContext(${t});`,"let scene = context.scene;","context.bindScene((next) => { scene = next; });","const {"," gltsLoader, instanceCount, loadingManager,"," isPreview, onDispose, onFrame, onMatrixUpdateAt","} = context;","export {"," gltsLoader, instanceCount, loadingManager,"," isPreview, onDispose, onFrame, onMatrixUpdateAt, scene","};"].join("\n"));return this.#c.set(t,e),{release:()=>{this.#c.delete(t),this.#i.release(s)},url:s}}get hostSpecifiers(){return[...this.#o.keys()]}getHostModuleURL(e){return this.#o.get(e)}takeContext(e){const t=this.#c.get(e);if(!t)throw new Error(`GLTS execution context is unavailable: ${e}`);return this.#c.delete(e),t}dispose(){Reflect.deleteProperty(globalThis,this.#h)}#u(e,t){const s=Object.keys(t).filter(e=>/^[$A-Z_a-z][$\w]*$/.test(e));return[...this.#l,`const namespace = bridge.namespaces[${JSON.stringify(e)}];`,...s.map((e,t)=>`const moduleExport${t} = namespace[${JSON.stringify(e)}];`),`export { ${s.map((e,t)=>`moduleExport${t} as ${e}`).join(", ")} };`].join("\n")}}var ge=",".charCodeAt(0),ke=";".charCodeAt(0),Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",be=new Uint8Array(64),Se=new Uint8Array(128);for(let e=0;e<64;e++){const t=Te.charCodeAt(e);be[e]=t,Se[t]=e}function we(e,t){do{let s=31&t;(t>>>=5)>0&&(s|=32),e.write(be[s])}while(t>0)}function ve(e){return e<0?-e<<1|1:e<<1}var Ce="undefined"!=typeof TextDecoder?new TextDecoder:"undefined"!=typeof Buffer?{decode:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e[s]);return t}},Pe=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(16384)}write(e){const{buffer:t}=this;t[this.pos++]=e,16384===this.pos&&(this.out+=Ce.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:s}=this;return s>0?t+Ce.decode(e.subarray(0,s)):t}};var Ee={exports:{}};Ee.exports=function(){const e=/^[\w+.-]+:\/\//,t=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,s=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function i(t){return e.test(t)}function n(e){return e.startsWith("//")}function r(e){return e.startsWith("/")}function a(e){return e.startsWith("file:")}function o(e){return/^[.?#]/.test(e)}function c(e){const s=t.exec(e);return l(s[1],s[2]||"",s[3],s[4]||"",s[5]||"/",s[6]||"",s[7]||"")}function h(e){const t=s.exec(e),i=t[2];return l("file:","",t[1]||"","",r(i)?i:"/"+i,t[3]||"",t[4]||"")}function l(e,t,s,i,n,r,a){return{scheme:e,user:t,host:s,port:i,path:n,query:r,hash:a,type:7}}function p(e){if(n(e)){const t=c("http:"+e);return t.scheme="",t.type=6,t}if(r(e)){const t=c("http://foo.com"+e);return t.scheme="",t.host="",t.type=5,t}if(a(e))return h(e);if(i(e))return c(e);const t=c("http://foo.com/"+e);return t.scheme="",t.host="",t.type=e?e.startsWith("?")?3:e.startsWith("#")?2:4:1,t}function u(e){if(e.endsWith("/.."))return e;const t=e.lastIndexOf("/");return e.slice(0,t+1)}function d(e,t){f(t,t.type),"/"===e.path?e.path=t.path:e.path=u(t.path)+e.path}function f(e,t){const s=t<=4,i=e.path.split("/");let n=1,r=0,a=!1;for(let e=1;e<i.length;e++){const t=i[e];t?(a=!1,"."!==t&&(".."!==t?(i[n++]=t,r++):r?(a=!0,r--,n--):s&&(i[n++]=t))):a=!0}let o="";for(let e=1;e<n;e++)o+="/"+i[e];(!o||a&&!o.endsWith("/.."))&&(o+="/"),e.path=o}function m(e,t){if(!e&&!t)return"";const s=p(e);let i=s.type;if(t&&7!==i){const e=p(t),n=e.type;switch(i){case 1:s.hash=e.hash;case 2:s.query=e.query;case 3:case 4:d(s,e);case 5:s.user=e.user,s.host=e.host,s.port=e.port;case 6:s.scheme=e.scheme}n>i&&(i=n)}f(s,i);const n=s.query+s.hash;switch(i){case 2:case 3:return n;case 4:{const i=s.path.slice(1);return i?o(t||e)&&!o(i)?"./"+i+n:i+n:n||"."}case 5:return s.path+n;default:return s.scheme+"//"+s.user+s.host+s.port+s.path+n}}return m}();var Ae=n(Ee.exports);function Ie(e,t){for(let s=t;s<e.length;s++)if(!_e(e[s]))return s;return e.length}function _e(e){for(let t=1;t<e.length;t++)if(e[t][0]<e[t-1][0])return!1;return!0}function Ne(e,t){return t||(e=e.slice()),e.sort(Le)}function Le(e,t){return e[0]-t[0]}var De=!1;function Me(e,t,s){for(let i=s+1;i<e.length&&e[i][0]===t;s=i++);return s}function Oe(e,t,s){for(let i=s-1;i>=0&&e[i][0]===t;s=i--);return s}function Fe(e,t,s,i){const{lastKey:n,lastNeedle:r,lastIndex:a}=s;let o=0,c=e.length-1;if(i===n){if(t===r)return De=-1!==a&&e[a][0]===t,a;t>=r?o=-1===a?0:a:c=a}return s.lastKey=i,s.lastNeedle=t,s.lastIndex=function(e,t,s,i){for(;s<=i;){const n=s+(i-s>>1),r=e[n][0]-t;if(0===r)return De=!0,n;r<0?s=n+1:i=n-1}return De=!1,s-1}(e,t,o,c)}var Re=class{constructor(e,t){const s="string"==typeof e;if(!s&&e._decodedMemo)return e;const i=function(e){return"string"==typeof e?JSON.parse(e):e}(e),{version:n,file:r,names:a,sourceRoot:o,sources:c,sourcesContent:h}=i;this.version=n,this.file=r,this.names=a||[],this.sourceRoot=o,this.sources=c,this.sourcesContent=h,this.ignoreList=i.ignoreList||i.x_google_ignoreList||void 0;const l=function(e,t){const s=function(e){if(!e)return"";const t=e.lastIndexOf("/");return e.slice(0,t+1)}(e),i=t?t+"/":"";return e=>Ae(i+(e||""),s)}(t,o);this.resolvedSources=c.map(l);const{mappings:p}=i;if("string"==typeof p)this._encoded=p,this._decoded=void 0;else{if(!Array.isArray(p))throw i.sections?new Error("TraceMap passed sectioned source map, please use FlattenMap export instead"):new Error(`invalid source map: ${JSON.stringify(i)}`);this._encoded=void 0,this._decoded=function(e,t){const s=Ie(e,0);if(s===e.length)return e;t||(e=e.slice());for(let i=s;i<e.length;i=Ie(e,i+1))e[i]=Ne(e[i],t);return e}(p,s)}this._decodedMemo={lastKey:-1,lastNeedle:-1,lastIndex:-1},this._bySources=void 0,this._bySourceMemos=void 0}};function Be(e){var t;return(t=e)._decoded||(t._decoded=function(e){const{length:t}=e,s=new X(e),i=[];let n=0,r=0,a=0,o=0,c=0;do{const e=s.indexOf(";"),t=[];let h=!0,l=0;for(n=0;s.pos<e;){let i;n=H(s,n),n<l&&(h=!1),l=n,z(s,e)?(r=H(s,r),a=H(s,a),o=H(s,o),z(s,e)?(c=H(s,c),i=[n,r,a,o,c]):i=[n,r,a,o]):i=[n],t.push(i),s.pos++}h||G(t),i.push(t),s.pos=e+1}while(s.pos<=t);return i}(e._encoded))}function je(e,t){let{line:s,column:i,bias:n}=t;if(s--,s<0)throw new Error("`line` must be greater than 0 (lines start at line 1)");if(i<0)throw new Error("`column` must be greater than or equal to 0 (columns start at column 0)");const r=Be(e);if(s>=r.length)return Ue(null,null,null,null);const a=r[s],o=function(e,t,s,i,n){let r=Fe(e,i,t,s);De?r=(-1===n?Me:Oe)(e,i,r):-1===n&&r++;return-1===r||r===e.length?-1:r}(a,e._decodedMemo,s,i,n||1);if(-1===o)return Ue(null,null,null,null);const c=a[o];if(1===c.length)return Ue(null,null,null,null);const{names:h,resolvedSources:l}=e;return Ue(l[c[1]],c[2]+1,c[3],5===c.length?h[c[4]]:null)}function Ue(e,t,s,i){return{source:e,line:t,column:s,name:i}}var qe=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function $e(e,t){const s=function(e,t){return e._indexes[t]}(e,t);if(void 0!==s)return s;const{array:i,_indexes:n}=e,r=i.push(t);return n[t]=r-1}var Ve=class{constructor({file:e,sourceRoot:t}={}){this._names=new qe,this._sources=new qe,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new qe,this._rangeMappings=[]}};var He=(e,t)=>function(e,t,s){const{generated:i,source:n,original:r,name:a,content:o,isRange:c}=s;n?We(e,t,i.line-1,i.column,n,r.line-1,r.column,a,o):We(e,t,i.line-1,i.column,null,null,null,null,null);c&&function(e,t,s,i=!0){const{_mappings:n,_rangeMappings:r}=e,a=Ge(Xe(n,t),s)-1,o=Xe(r,t),c=et(o,a);if(i){if(c>=0)return;Qe(o,~c,a)}else{if(c<0)return;o.splice(c,1)}}(t,i.line-1,i.column)}(!0,e,t);function Ke(e,t,s){const{_sources:i,_sourcesContent:n}=e;n[$e(i,t)]=s}function ze(e){const{_mappings:t,_sources:s,_sourcesContent:i,_names:n,_ignoreList:{array:r},_rangeMappings:a}=e;return Ze(t),Ze(a),{version:3,file:e.file||void 0,names:n.array,sourceRoot:e.sourceRoot||void 0,sources:s.array,sourcesContent:i,mappings:t,ignoreList:r.length>0?r:void 0,rangeMappings:a.length>0?a:void 0}}function Je(e){const t=ze(e),s=t;return s.mappings=function(e){const t=new Pe;let s=0,i=0,n=0,r=0;for(let a=0;a<e.length;a++){const o=e[a];if(a>0&&t.write(ke),0===o.length)continue;let c=0;for(let e=0;e<o.length;e++){const a=o[e];e>0&&t.write(ge),we(t,ve(a[0]-c)),c=a[0],1!==a.length&&(we(t,ve(a[1]-s)),we(t,ve(a[2]-i)),we(t,ve(a[3]-n)),s=a[1],i=a[2],n=a[3],4!==a.length&&(we(t,ve(a[4]-r)),r=a[4]))}}return t.flush()}(t.mappings),t.rangeMappings&&(s.rangeMappings=function(e){if(0===e.length)return"";const t=new Pe;for(let s=0;s<e.length;s++){const i=e[s];s>0&&t.write(ke);let n=0;for(let e=0;e<i.length;e++){const s=i[e];we(t,s-n),n=s}}return t.flush()}(t.rangeMappings)),s}function We(e,t,s,i,n,r,a,o,c){const{_mappings:h,_sources:l,_sourcesContent:p,_names:u,_rangeMappings:d}=t,f=Xe(h,s),m=Ge(f,i);if(!n){if(function(e,t){if(0===t)return!0;const s=e[t-1];return 1===s.length}(f,m)&&!Ye(h,d,s,m-1))return;return m<f.length&&tt(d,s,m),void Qe(f,m,[i])}const y=$e(l,n),x=o?$e(u,o):-1;y===p.length&&(p[y]=null!=c?c:null),function(e,t,s,i,n,r){if(0===t)return!1;const a=e[t-1];return 1!==a.length&&(s===a[1]&&i===a[2]&&n===a[3]&&r===(5===a.length?a[4]:-1))}(f,m,y,r,a,x)&&!Ye(h,d,s,m-1)||(m<f.length&&tt(d,s,m),Qe(f,m,o?[i,y,r,a,x]:[i,y,r,a]))}function Xe(e,t){for(let s=e.length;s<=t;s++)e[s]=[];return e[t]}function Ge(e,t){for(let s=e.length;s>0;s--){if(t>=e[s-1][0])return s}return 0}function Ye(e,t,s,i){if(0===t.length)return!1;if(i<0)for(;--s>=0;){const t=e[s];if(t.length>0){i=t.length-1;break}}if(s<0)return!1;if(s>=t.length)return!1;return et(t[s],i)>=0}function Qe(e,t,s){for(let s=e.length;s>t;s--)e[s]=e[s-1];e[t]=s}function Ze(e){for(let t=e.length-1;t>=0&&!(e[t].length>0);t--)e.pop()}function et(e,t){for(let s=e.length;s>0;s--){const i=e[s-1];if(i===t)return s-1;if(i<t)return~s}return-1}function tt(e,t,s){if(t>=e.length)return;const i=e[t];for(let e=i.length-1;e>=0&&!(i[e]<s);e--)i[e]++}const st="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆ՘ՙՠ-ֈ֋֌א-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿ₏-₟ℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-꟝꟢꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩ꭬꭭ꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",it=new RegExp("["+st+"]"),nt=new RegExp("["+st+"·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄ-׉ؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୓-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫰ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]"),rt=[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,13,65,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,18,21,18,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,18,0,182,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,22,0,239,18,16,0,2,12,2,33,125,0,80,921,103,111,6,206,13,310,2314,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,7386,37,33,96,114,14,913,15,50,7710,3,2,6,2,1,2,296,10,0,30,2,3,0,15,4,8,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,340,2,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,129,15,6,55,50,49,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,4382,2,5773,3,7472,16,621,2467,541,1507,4938,6,8489,39815,11327],at=[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,31,4,33,15,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,7,0,259,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,481,1,61,4,4,5,9,7,3,6,31,3,149,2,12,2,9,1,3,0,33,1,1357,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 ot(e,t){let s=65536;for(let i=0,n=t.length;i<n;i+=2){if(s+=t[i],s>e)return!1;if(s+=t[i+1],s>=e)return!0}return!1}function ct(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&it.test(String.fromCharCode(e)):ot(e,rt)))}function ht(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&nt.test(String.fromCharCode(e)):ot(e,rt)||ot(e,at))))}const lt=["implements","interface","let","package","private","protected","public","static","yield"],pt=["eval","arguments"],ut=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"]),dt=new Set(lt);function ft(e,t){return t&&"await"===e||"enum"===e}function mt(e){return ut.has(e)}new Set(pt);var yt=function(e){return e>=48&&e<=57};function xt(e,t,s,i){return 96===t||36===t&&123===s.charCodeAt(i+1)}function gt(e,t,s,i,n,r){t++;const a=e=>({pos:t,ch:e,lineStart:s,curLine:i}),o=e.charCodeAt(t++);switch(o){case 110:return a("\n");case 114:return a("\r");case 120:{let n;return({code:n,pos:t}=kt(e,t,s,i,2,!1)),a(null===n?null:String.fromCharCode(n))}case 117:{let n;return({code:n,pos:t}=function(e,t,s,i){const n=e.charCodeAt(t);let r;if(123===n){if(++t,({code:r,pos:t}=kt(e,t,s,i,e.indexOf("}",t)-t,!0)),++t,null!==r&&r>1114111)return{code:null,pos:t}}else({code:r,pos:t}=kt(e,t,s,i,4,!1));return{code:r,pos:t}}(e,t,s,i)),a(null===n?null:String.fromCodePoint(n))}case 116:return a("\t");case 98:return a("\b");case 118:return a("\v");case 102:return a("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:s=t,++i;case 8232:case 8233:return a("");case 56:case 57:return a(null);default:if(o>=48&&o<=55){const s=t-1;let i=/^[0-7]+/.exec(e.slice(s,t+2))[0],n=parseInt(i,8);n>255&&(i=i.slice(0,-1),n=parseInt(i,8)),t+=i.length-1;const r=e.charCodeAt(t);return a("0"!==i||56===r||57===r?null:String.fromCharCode(n))}return a(String.fromCharCode(o))}}function kt(e,t,s,i,n,r,a,o){const c=t;let h;return({n:h,pos:t}=function(e,t,s,i,n,r,a,o){const c=t;let h=!1,l=0;for(let s=0,i=null==r?1/0:r;s<i;++s){const s=e.charCodeAt(t);let i;if(95===s&&"bail"!==o)return e.charCodeAt(t-1),e.charCodeAt(t+1),{n:null,pos:t};if(i=s>=97?s-97+10:s>=65?s-65+10:yt(s)?s-48:1/0,i>=n){if(i<=9)return{n:null,pos:t};if(!a)break;i=0,h=!0}++t,l=l*n+i}if(t===c||null!=r&&t-c!==r||h)return{n:null,pos:t};return{n:l,pos:t}}(e,t,0,0,16,n,r,!1)),null===h&&(t=c-1),{code:h,pos:t}}function Tt(e,t){const s=Object.keys(t);for(const i of s)if(e[i]!==t[i])return!1;return!0}function bt(e,t,s){return t?.type===e&&(null==s||Tt(t,s))}function St(e,t){return bt("ExportNamedDeclaration",e,t)}function wt(e,t){if(!e)return!1;switch(e.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":break;default:return!1}return null==t||Tt(e,t)}function vt(e,t){if(e===t)return!0;if(null==e)return!1;if($t[t])return!1;const s=Vt[t];return!!s?.includes(e)}function Ct(e,t){if(e===t)return!0;const s=Os[e];return!!s?.includes(t)}function Pt(e,t,s){if(!t)return!1;return vt(t.type,e)?void 0===s||Tt(t,s):!s&&"Placeholder"===t.type&&e in Vt&&Ct(t.expectedNode,e)}function Et(e,t=!0){return"string"==typeof e&&((!t||!(mt(e)||(ft(s=e,!0)||dt.has(s))))&&function(e){let t=!0;for(let s=0;s<e.length;s++){let i=e.charCodeAt(s);if(55296==(64512&i)&&s+1<e.length){const t=e.charCodeAt(++s);56320==(64512&t)&&(i=65536+((1023&i)<<10)+(1023&t))}if(t){if(t=!1,!ct(i))return!1}else if(!ht(i))return!1}return!t}(e));var s}const At=["||","&&","??"],It=["++","--"],_t=[">","<",">=","<="],Nt=["==","===","!=","!=="],Lt=[...Nt,"in","instanceof"],Dt=[...Lt,..._t],Mt=["-","/","%","*","**","&","|",">>",">>>","<<","^"],Ot=["+",...Mt,...Dt,"|>"],Ft=["=","+=",...Mt.map(e=>e+"="),...At.map(e=>e+"=")],Rt=["delete","!"],Bt=["+","-","~"],jt=["typeof"],Ut=["void","throw",...Rt,...Bt,...jt],qt={},$t={},Vt={},Ht={},Kt={},zt={},Jt={},Wt={};function Xt(e){return Array.isArray(e)?"array":null===e?"null":typeof e}function Gt(e,...t){return Object.assign(e,...t)}function Yt(e){return{validate:e}}function Qt(...e){return Yt(cs(...e))}function Zt(e){return{validate:e,optional:!0}}function es(e,t){return{validate:e,default:t,optional:!1}}function ts(...e){return{validate:cs(...e),optional:!0}}function ss(e){return ds(ls("array"),rs(e))}function is(...e){return ss(cs(...e))}function ns(...e){return Yt(is(...e))}function rs(e){const t=Ys;function s(s,i,n){if(!Array.isArray(n))return;let r=0;const a={toString:()=>`${i}[${r}]`};for(;r<n.length;r++){const i=n[r];e(s,a,i),t(s,a,i)}}return s.each=e,s}function as(...e){function t(t,s,i){if(!e.includes(i))throw new TypeError(`Property ${s} expected value to be one of ${JSON.stringify(e)} but got ${JSON.stringify(i)}`)}return t.oneOf=e,t}const os=[];function cs(...e){const t=new Set;function s(s,i,n){const r=n?.type;if(null!=r){if(t.has(r))return void Ys(s,i,n);if("Placeholder"===r)for(const t of e)if(Pt(t,n))return void Ys(s,i,n)}throw new TypeError(`Property ${i} of ${s.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(r)}`)}return os.push({types:e,set:t}),s.oneOfNodeTypes=e,s}function hs(...e){function t(t,s,i){const n=Xt(i);for(const r of e)if(n===r||Pt(r,i))return void Ys(t,s,i);throw new TypeError(`Property ${s} of ${t.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(i?.type)}`)}return t.oneOfNodeOrValueTypes=e,t}function ls(e){function t(t,s,i){if(Xt(i)!==e)throw new TypeError(`Property ${s} expected type of ${e} but got ${Xt(i)}`)}return t.type=e,t}function ps(e){const t=Object.keys(e);function s(s,i,n){const r=[];for(const i of t)try{Gs(s,i,n[i],e[i])}catch(e){if(e instanceof TypeError){r.push(e.message);continue}throw e}if(r.length)throw new TypeError(`Property ${i} of ${s.type} expected to have the following:\n${r.join("\n")}`)}return s.shapeOf=e,s}function us(){return function(e){let t=e;for(;e;){const{type:e}=t;if("OptionalCallExpression"!==e){if("OptionalMemberExpression"!==e)break;if(t.optional)return;t=t.object}else{if(t.optional)return;t=t.callee}}throw new TypeError(`Non-optional ${e.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${t?.type}`)}}function ds(...e){function t(...t){for(const s of e)s(...t)}if(t.chainOf=e,e.length>=2&&"type"in e[0]&&"array"===e[0].type&&!("each"in e[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return t}const fs=new Set(["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate","unionShape"]),ms=new Set(["default","optional","deprecated","validate"]),ys={};function xs(...e){return(t,s={})=>{let i=s.aliases;i||(s.inherits&&(i=ys[s.inherits].aliases?.slice()),i??=[],s.aliases=i);const n=e.filter(e=>!i.includes(e));i.unshift(...n),gs(t,s)}}function gs(e,t={}){const s=t.inherits&&ys[t.inherits]||{},i=t.visitor||s.visitor||[],n=t.aliases||s.aliases||[],r=t.builder||s.builder||t.visitor||[];let a=t.fields;if(!a&&(a={},s.fields)){const e=Object.getOwnPropertyNames(s.fields);for(const t of e){const e=s.fields[t],i=e.default;if(Array.isArray(i)?i.length>0:i&&"object"==typeof i)throw new Error("field defaults can only be primitives or empty arrays currently");a[t]={default:Array.isArray(i)?[]:i,optional:e.optional,deprecated:e.deprecated,validate:e.validate}}}for(const s of Object.keys(t))if(!fs.has(s))throw new Error(`Unknown type option "${s}" on ${e}`);t.deprecatedAlias&&(zt[t.deprecatedAlias]=e);for(const e of i.concat(r))a[e]=a[e]||{};for(const t of Object.keys(a)){const s=a[t];null===s.default&&(s.optional??=!0),void 0===s.default?(s.default=null,s.optional??=!1):s.validate||null==s.default||(s.validate=ls(Xt(s.default)));for(const i of Object.keys(s))if(!ms.has(i))throw new Error(`Unknown field key "${i}" on ${e}.${t}`)}qt[e]=t.visitor=i,Kt[e]=t.builder=r,Ht[e]=t.fields=a,$t[e]=t.aliases=n,n.forEach(t=>{Vt[t]=Vt[t]||[],Vt[t].push(e)}),t.validate&&(Jt[e]=t.validate),t.unionShape&&(Wt[e]=t.unionShape),ys[e]=t}const ks=Object.defineProperty({__proto__:null,ALIAS_KEYS:$t,BUILDER_KEYS:Kt,DEPRECATED_KEYS:zt,FLIPPED_ALIAS_KEYS:Vt,NODE_FIELDS:Ht,NODE_PARENT_VALIDATIONS:Jt,NODE_UNION_SHAPES__PRIVATE:Wt,VISITOR_KEYS:qt,allExpandedTypes:os,arrayOf:ss,arrayOfType:is,assertEach:rs,assertNodeOrValueType:hs,assertNodeType:cs,assertOneOf:as,assertOptionalChainStart:us,assertShape:ps,assertValueType:ls,chain:ds,combine:Gt,default:gs,defineAliasedType:xs,validate:Yt,validateArrayOfType:ns,validateDefault:es,validateOptional:Zt,validateOptionalType:ts,validateType:Qt},Symbol.toStringTag,{value:"Module"}),Ts=(e=!1)=>({unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:cs("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:e?cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"):cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral")}}}]}}),bs={unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{property:{validate:cs("Expression")}}},{name:"nonComputed",value:[!1],properties:{property:{validate:cs("Identifier","PrivateName")}}}]}},Ss=xs("Standardized");Ss("ArrayExpression",{fields:{elements:{validate:ss(hs("null","Expression","SpreadElement")),default:void 0}},visitor:["elements"],aliases:["Expression"]}),Ss("AssignmentExpression",{fields:{operator:{validate:Gt(function(){const e=as(...Ft),t=as("=");return function(s,i,n){(Pt("Pattern",s.left)?t:e)(s,i,n)}}(),{oneOf:Ft})},left:{validate:cs("Identifier","MemberExpression","OptionalMemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:cs("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),Ss("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:as(...Ot)},left:{validate:function(){const e=cs("Expression"),t=cs("Expression","PrivateName");return Gt(function(s,i,n){("in"===s.operator?t:e)(s,i,n)},{oneOfNodeTypes:["Expression","PrivateName"]})}()},right:{validate:cs("Expression")}},unionShape:{discriminator:"operator",shapes:[{name:"in",value:["in"],properties:{left:{validate:cs("Expression","PrivateName")}}},{name:"notIn",value:Ot.filter(e=>"in"!==e),properties:{left:{validate:cs("Expression")}}}]},visitor:["left","right"],aliases:["Binary","Expression"]}),Ss("InterpreterDirective",{builder:["value"],fields:{value:{validate:ls("string")}}}),Ss("Directive",{visitor:["value"],fields:{value:{validate:cs("DirectiveLiteral")}}}),Ss("DirectiveLiteral",{builder:["value"],fields:{value:{validate:ls("string")}}}),Ss("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:is("Directive"),default:[]},body:ns("Statement")},aliases:["Scopable","BlockParent","Block","Statement"]}),Ss("BreakStatement",{visitor:["label"],fields:{label:{validate:cs("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),Ss("CallExpression",{visitor:["callee","typeArguments","arguments"],builder:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:cs("Expression","Super","Import","V8IntrinsicIdentifier")},arguments:ns("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:cs("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),Ss("CatchClause",{visitor:["param","body"],fields:{param:{validate:cs("Identifier","ArrayPattern","ObjectPattern"),optional:!0},body:{validate:cs("BlockStatement")}},aliases:["Scopable","BlockParent"]}),Ss("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:cs("Expression")},consequent:{validate:cs("Expression")},alternate:{validate:cs("Expression")}},aliases:["Expression","Conditional"]}),Ss("ContinueStatement",{visitor:["label"],fields:{label:{validate:cs("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),Ss("DebuggerStatement",{aliases:["Statement"]}),Ss("DoWhileStatement",{builder:["test","body"],visitor:["body","test"],fields:{test:{validate:cs("Expression")},body:{validate:cs("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),Ss("EmptyStatement",{aliases:["Statement"]}),Ss("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:cs("Expression")}},aliases:["Statement","ExpressionWrapper"]}),Ss("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:cs("Program")},comments:{validate:rs(cs("CommentBlock","CommentLine")),optional:!0},tokens:{validate:rs(Object.assign(()=>{},{type:"any"})),optional:!0}}}),Ss("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:cs("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:cs("Expression")},body:{validate:cs("Statement")}}}),Ss("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:cs("VariableDeclaration","Expression"),optional:!0},test:{validate:cs("Expression"),optional:!0},update:{validate:cs("Expression"),optional:!0},body:{validate:cs("Statement")}}});const ws=()=>({params:ns("FunctionParameter"),generator:{default:!1},async:{default:!1}}),vs=()=>({returnType:{validate:cs("TypeAnnotation","TSTypeAnnotation"),optional:!0},typeParameters:{validate:cs("TypeParameterDeclaration","TSTypeParameterDeclaration"),optional:!0}}),Cs=()=>({...ws(),declare:{validate:ls("boolean"),optional:!0},id:{validate:cs("Identifier"),optional:!0}});Ss("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","typeParameters","params","predicate","returnType","body"],fields:{...Cs(),...vs(),body:{validate:cs("BlockStatement")},predicate:{validate:cs("FlowPredicate"),optional:!0}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:function(){const e=cs("Identifier");return function(t,s,i){Pt("ExportDefaultDeclaration",t)||e(i,"id",i.id)}}()}),Ss("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{...ws(),...vs(),id:{validate:cs("Identifier"),optional:!0},body:{validate:cs("BlockStatement")},predicate:{validate:cs("FlowPredicate"),optional:!0}}});const Ps=()=>({typeAnnotation:{validate:cs("TypeAnnotation","TSTypeAnnotation"),optional:!0},optional:{validate:ls("boolean"),optional:!0},decorators:{validate:is("Decorator"),optional:!0}});Ss("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","FunctionParameter","PatternLike","LVal","TSEntityName"],fields:{...Ps(),name:{validate:ds(ls("string"),Gt(function(e,t,s){if(!Et(s,!1))throw new TypeError(`"${s}" is not a valid identifier name`)},{type:"string"}))}},validate:function(e,t,s){const i=/\.(\w+)$/.exec(t.toString());if(!i)return;const[,n]=i,r={computed:!1};if("property"===n){if(Pt("MemberExpression",e,r))return;if(Pt("OptionalMemberExpression",e,r))return}else if("key"===n){if(Pt("Property",e,r))return;if(Pt("Method",e,r))return}else if("exported"===n){if(Pt("ExportSpecifier",e))return}else if("imported"===n){if(Pt("ImportSpecifier",e,{imported:s}))return}else if("meta"===n&&Pt("MetaProperty",e,{meta:s}))return;if((mt(s.name)||ft(s.name,!1))&&"this"!==s.name)throw new TypeError(`"${s.name}" is not a valid identifier`)}}),Ss("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:cs("Expression")},consequent:{validate:cs("Statement")},alternate:{optional:!0,validate:cs("Statement")}}}),Ss("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:cs("Identifier")},body:{validate:cs("Statement")}}}),Ss("StringLiteral",{builder:["value"],fields:{value:{validate:ls("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),Ss("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:ds(ls("number"),Gt(function(e,t,s){if(1/s<0||!Number.isFinite(s)){const e=new Error(`NumericLiterals must be non-negative finite numbers. You can use t.valueToNode(${s}) instead.`);if(!(new Error).stack.includes("regenerator"))throw e}},{type:"number"}))}},aliases:["Expression","Pureish","Literal","Immutable"]}),Ss("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),Ss("BooleanLiteral",{builder:["value"],fields:{value:{validate:ls("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),Ss("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:ls("string")},flags:{validate:ds(ls("string"),Gt(function(e,t,s){const i=/[^dgimsuvy]/.exec(s);if(i)throw new TypeError(`"${i[0]}" is not a valid RegExp flag`)},{type:"string"})),default:""}}}),Ss("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:as(...At)},left:{validate:cs("Expression")},right:{validate:cs("Expression")}}}),Ss("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal","PatternLike"],...bs,fields:{object:{validate:cs("Expression","Super")},property:{validate:function(){const e=cs("Identifier","PrivateName"),t=cs("Expression");return Gt(function(s,i,n){(s.computed?t:e)(s,i,n)},{oneOfNodeTypes:["Expression","Identifier","PrivateName"]})}()},computed:{default:!1}}}),Ss("NewExpression",{inherits:"CallExpression",fields:{callee:{validate:cs("Expression","V8IntrinsicIdentifier")},arguments:ns("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:cs("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),Ss("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceType:{validate:as("script","module"),default:"script"},interpreter:{validate:cs("InterpreterDirective"),default:null,optional:!0},directives:{validate:is("Directive"),default:[]},body:ns("Statement")},aliases:["Scopable","BlockParent","Block"]}),Ss("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:ns("ObjectMethod","ObjectProperty","SpreadElement")}}),Ss("ObjectMethod",{builder:["kind","key","params","body","computed","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"],...Ts(),fields:{...ws(),...vs(),kind:{validate:as("method","get","set")},computed:{default:!1},key:{validate:function(){const e=cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),t=cs("Expression");return Gt(function(s,i,n){(s.computed?t:e)(s,i,n)},{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral"]})}()},decorators:{validate:is("Decorator"),optional:!0},body:{validate:cs("BlockStatement")}},aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),Ss("ObjectProperty",{builder:["key","value","computed","shorthand"],...Ts(!0),fields:{computed:{default:!1},key:{validate:function(){const e=cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),t=cs("Expression");return Gt(function(s,i,n){(s.computed?t:e)(s,i,n)},{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"]})}()},value:{validate:cs("Expression","PatternLike")},shorthand:{validate:ds(ls("boolean"),Gt(function(e,t,s){if(s){if(e.computed)throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");if(!Pt("Identifier",e.key))throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}},{type:"boolean"})),default:!1},decorators:{validate:is("Decorator"),optional:!0}},visitor:["decorators","key","value"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:function(){const e=cs("Identifier","Pattern","TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"),t=cs("Expression");return function(s,i,n){(Pt("ObjectPattern",s)?e:t)(n,"value",n.value)}}()}),Ss("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["FunctionParameter","PatternLike"],deprecatedAlias:"RestProperty",fields:{...Ps(),argument:{validate:cs("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")}},validate:function(e,t){const s=/(\w+)\[(\d+)\]/.exec(t.toString());if(!s)throw new Error("Internal Babel error: malformed key.");const[,i,n]=s;if(e[i].length>+n+1)throw new TypeError(`RestElement must be last element of ${i}`)}}),Ss("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:cs("Expression"),optional:!0}}}),Ss("SequenceExpression",{visitor:["expressions"],fields:{expressions:ns("Expression")},aliases:["Expression"]}),Ss("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:cs("Expression")}}}),Ss("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:cs("Expression"),optional:!0},consequent:ns("Statement")}}),Ss("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:cs("Expression")},cases:ns("SwitchCase")}}),Ss("ThisExpression",{aliases:["Expression","TSEntityName"]}),Ss("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:cs("Expression")}}}),Ss("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:ds(cs("BlockStatement"),Gt(function(e){if(!e.handler&&!e.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")},{oneOfNodeTypes:["BlockStatement"]}))},handler:{optional:!0,validate:cs("CatchClause")},finalizer:{optional:!0,validate:cs("BlockStatement")}}}),Ss("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:cs("Expression")},operator:{validate:as(...Ut)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),Ss("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:cs("Identifier","MemberExpression")},operator:{validate:as(...It)}},visitor:["argument"],aliases:["Expression"]}),Ss("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:ls("boolean"),optional:!0},kind:{validate:as("var","let","const","using","await using")},declarations:ns("VariableDeclarator")},validate:(()=>{const e=cs("Identifier","Placeholder"),t=cs("Identifier","ArrayPattern","ObjectPattern","Placeholder"),s=cs("Identifier","VoidPattern","Placeholder");return function(i,n,r){const{kind:a,declarations:o}=r,c=Pt("ForXStatement",i,{left:r});if(c&&1!==o.length)throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${i.type}`);for(const i of o)"const"===a||"let"===a||"var"===a?c||i.init?t(i,"id",i.id):e(i,"id",i.id):s(i,"id",i.id)}})()}),Ss("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:cs("Identifier","ArrayPattern","ObjectPattern","VoidPattern")},definite:{optional:!0,validate:ls("boolean")},init:{optional:!0,validate:cs("Expression")}}}),Ss("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:cs("Expression")},body:{validate:cs("Statement")}}}),Ss("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:cs("Expression")},body:{validate:cs("Statement")}}}),Ss("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["FunctionParameter","Pattern","PatternLike"],fields:{...Ps(),left:{validate:cs("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:cs("Expression")}}}),Ss("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:{...Ps(),elements:{validate:ds(ls("array"),rs(hs("null","PatternLike")))}}}),Ss("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["typeParameters","params","predicate","returnType","body"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{...ws(),generator:{default:null,optional:!0,validate:Gt((e,t,s)=>{if(s)throw new TypeError("ArrowFunctionExpression cannot be a generator")},{type:"boolean"})},...vs(),expression:{optional:!0,validate:ls("boolean")},body:{validate:cs("BlockStatement","Expression")},predicate:{validate:cs("FlowPredicate"),optional:!0}}}),Ss("ClassBody",{visitor:["body"],fields:{body:ns("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")}}),Ss("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:cs("Identifier"),optional:!0},typeParameters:{validate:cs("TypeParameterDeclaration","TSTypeParameterDeclaration"),optional:!0},body:{validate:cs("ClassBody")},superClass:{optional:!0,validate:cs("Expression")},superTypeArguments:{validate:cs("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:is("TSClassImplements","ClassImplements"),optional:!0},decorators:{validate:is("Decorator"),optional:!0},mixins:{validate:cs("InterfaceExtends"),optional:!0}}}),Ss("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:cs("Identifier"),optional:!0},typeParameters:{validate:cs("TypeParameterDeclaration","TSTypeParameterDeclaration"),optional:!0},body:{validate:cs("ClassBody")},superClass:{optional:!0,validate:cs("Expression")},superTypeArguments:{validate:cs("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:is("TSClassImplements","ClassImplements"),optional:!0},decorators:{validate:is("Decorator"),optional:!0},mixins:{validate:cs("InterfaceExtends"),optional:!0},declare:{validate:ls("boolean"),optional:!0},abstract:{validate:ls("boolean"),optional:!0}},validate:function(){const e=cs("Identifier");return function(t,s,i){Pt("ExportDefaultDeclaration",t)||e(i,"id",i.id)}}()});const Es={attributes:{optional:!0,validate:is("ImportAttribute")}};Ss("ExportAllDeclaration",{visitor:["source","attributes"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{source:{validate:cs("StringLiteral")},exportKind:Zt(as("type","value")),...Es}}),Ss("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:Qt("FunctionDeclaration","ClassDeclaration","Expression","TSDeclareFunction","TSInterfaceDeclaration","EnumDeclaration"),exportKind:Zt(as("value"))}}),Ss("ExportNamedDeclaration",{builder:["declaration","specifiers","source","attributes"],visitor:["declaration","specifiers","source","attributes"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:{optional:!0,validate:ds(cs("Declaration"),Gt(function(e,t,s){if(s&&e.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");if(s&&e.source)throw new TypeError("Cannot export a declaration from a source")},{oneOfNodeTypes:["VariableDeclaration","FunctionDeclaration","ClassDeclaration","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSTypeAliasDeclaration","EnumDeclaration","InterfaceDeclaration","OpaqueType","TypeAlias"]}))},...Es,specifiers:{default:[],validate:ss(function(){const e=cs("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),t=cs("ExportSpecifier");return Gt(function(s,i,n){(s.source?e:t)(s,i,n)},{oneOfNodeTypes:["ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"]})}())},source:{validate:cs("StringLiteral"),optional:!0},exportKind:Zt(as("type","value"))}}),Ss("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:cs("Identifier","StringLiteral")},exported:{validate:cs("Identifier","StringLiteral")},exportKind:{validate:as("type","value"),optional:!0}}}),Ss("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){const e=cs("VariableDeclaration"),t=cs("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return Gt(function(s,i,n){Pt("VariableDeclaration",n)?e(s,i,n):t(s,i,n)},{oneOfNodeTypes:["VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"]})}()},right:{validate:cs("Expression")},body:{validate:cs("Statement")},await:{default:!1}}}),Ss("ImportDeclaration",{builder:["specifiers","source","attributes"],visitor:["specifiers","source","attributes"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:{...Es,module:{optional:!0,validate:ls("boolean")},phase:{default:null,validate:as("source","defer")},specifiers:ns("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier"),source:{validate:cs("StringLiteral")},importKind:{validate:as("type","typeof","value"),optional:!0}}}),Ss("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:cs("Identifier")}}}),Ss("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:cs("Identifier")}}}),Ss("ImportSpecifier",{visitor:["imported","local"],builder:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:cs("Identifier")},imported:{validate:cs("Identifier","StringLiteral")},importKind:{validate:as("type","typeof","value"),optional:!0}}}),Ss("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:ds(cs("Identifier"),Gt(function(e,t,s){let i;switch(s.name){case"function":i="sent";break;case"new":i="target";break;case"import":i="meta"}if(!Pt("Identifier",e.property,{name:i}))throw new TypeError("Unrecognised MetaProperty")},{oneOfNodeTypes:["Identifier"]}))},property:{validate:cs("Identifier")}}});const As=()=>({abstract:{validate:ls("boolean"),default:!1,optional:!0},accessibility:{validate:as("public","private","protected"),optional:!0},static:{default:!1},override:{optional:!0,validate:ls("boolean"),default:!1},computed:{default:!1},optional:{validate:ls("boolean"),optional:!0},key:{validate:ds(function(){const e=cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),t=cs("Expression","PrivateName");return function(s,i,n){(s.computed?t:e)(s,i,n)}}(),cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))}}),Is=(e=!0)=>({...ws(),...As(),params:ns("FunctionParameter","TSParameterProperty"),kind:{validate:as("get","set","method","constructor"),default:"method"},access:{validate:ds(ls("string"),as("public","private","protected")),optional:!0},...e?{decorators:{validate:is("Decorator"),optional:!0}}:{}});Ss("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"],...Ts(),fields:{...Is(),...vs(),body:{validate:cs("BlockStatement")}}}),Ss("ObjectPattern",{visitor:["decorators","properties","typeAnnotation"],builder:["properties"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:{...Ps(),properties:ns("RestElement","ObjectProperty")}}),Ss("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:cs("Expression")}}}),Ss("Super"),Ss("TaggedTemplateExpression",{visitor:["tag","typeArguments","quasi"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:cs("Expression")},quasi:{validate:cs("TemplateLiteral")},typeArguments:{validate:cs("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),Ss("TemplateElement",{builder:["value","tail"],fields:{value:{validate:ds(ps({raw:{validate:ls("string")},cooked:{validate:ls("string"),optional:!0}}),function(e){const t=e.value.raw;let s=!1;const i=()=>{throw new Error("Internal @babel/types error.")},{str:n,firstInvalidLoc:r}=function(e,t,s,i,n,r){const a=s,o=i,c=n;let h="",l=null,p=s;const{length:u}=t;for(;;){if(s>=u){r.unterminated(a,o,c),h+=t.slice(p,s);break}const e=t.charCodeAt(s);if(xt(0,e,t,s)){h+=t.slice(p,s);break}if(92===e){h+=t.slice(p,s);const e=gt(t,s,i,n);null!==e.ch||l?h+=e.ch:l={pos:s,lineStart:i,curLine:n},({pos:s,lineStart:i,curLine:n}=e),p=s}else 8232===e||8233===e?(++n,i=++s):10===e||13===e?(h+=t.slice(p,s)+"\n",++s,13===e&&10===t.charCodeAt(s)&&++s,++n,p=i=s):++s}return{pos:s,str:h,firstInvalidLoc:l,lineStart:i,curLine:n}}(0,t,0,0,0,{unterminated(){s=!0},strictNumericEscape:i,invalidEscapeSequence:i,numericSeparatorInEscapeSequence:i,unexpectedNumericSeparator:i,invalidDigit:i,invalidCodePoint:i});if(!s)throw new Error("Invalid raw");e.value.cooked=r?null:n})},tail:{default:!1}}}),Ss("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:ns("TemplateElement"),expressions:{validate:ds(ls("array"),rs(cs("Expression","TSType")),function(e,t,s){if(e.quasis.length!==s.length+1)throw new TypeError(`Number of ${e.type} quasis should be exactly one more than the number of expressions.\nExpected ${s.length+1} quasis but got ${e.quasis.length}`)})}}}),Ss("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:ds(ls("boolean"),Gt(function(e,t,s){if(s&&!e.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")},{type:"boolean"})),default:!1},argument:{optional:!0,validate:cs("Expression")}}}),Ss("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:cs("Expression")}}}),Ss("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:as("source","defer")},source:{validate:cs("Expression")},options:{validate:cs("Expression"),optional:!0}}}),Ss("Import"),Ss("BigIntLiteral",{builder:["value"],fields:{value:{validate:ls("bigint")}},aliases:["Expression","Pureish","Literal","Immutable"]}),Ss("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:cs("Identifier","StringLiteral")}}}),Ss("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],...bs,fields:{object:{validate:cs("Expression")},property:{validate:function(){const e=cs("Identifier","PrivateName"),t=cs("Expression");return Gt(function(s,i,n){(s.computed?t:e)(s,i,n)},{oneOfNodeTypes:["Expression","PrivateName"]})}()},computed:{default:!1},optional:{validate:ds(ls("boolean"),us())}}}),Ss("OptionalCallExpression",{visitor:["callee","typeArguments","arguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:{callee:{validate:cs("Expression")},arguments:ns("Expression","SpreadElement","ArgumentPlaceholder"),optional:{validate:ds(ls("boolean"),us())},typeArguments:{validate:cs("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),Ss("ClassProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"],...Ts(),fields:{...As(),value:{validate:cs("Expression"),optional:!0},definite:{validate:ls("boolean"),optional:!0},typeAnnotation:{validate:cs("TypeAnnotation","TSTypeAnnotation"),optional:!0},decorators:{validate:is("Decorator"),optional:!0},readonly:{validate:ls("boolean"),optional:!0},declare:{validate:ls("boolean"),optional:!0},variance:{validate:cs("Variance"),optional:!0}}}),Ss("ClassPrivateProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:cs("PrivateName")},value:{validate:cs("Expression"),optional:!0},typeAnnotation:{validate:cs("TypeAnnotation","TSTypeAnnotation"),optional:!0},decorators:{validate:is("Decorator"),optional:!0},static:{validate:ls("boolean"),default:!1},readonly:{validate:ls("boolean"),optional:!0},optional:{validate:ls("boolean"),optional:!0},definite:{validate:ls("boolean"),optional:!0},variance:{validate:cs("Variance"),optional:!0}}}),Ss("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["decorators","key","typeParameters","params","returnType","body"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:{...Is(),...vs(),kind:{validate:as("get","set","method"),default:"method"},key:{validate:cs("PrivateName")},body:{validate:cs("BlockStatement")}}}),Ss("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:cs("Identifier")}}}),Ss("StaticBlock",{visitor:["body"],fields:{body:ns("Statement")},aliases:["Scopable","BlockParent","FunctionParent"]}),Ss("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:cs("Identifier","StringLiteral")},value:{validate:cs("StringLiteral")}}});const _s=xs("Flow"),Ns=e=>{const t="DeclareClass"===e;_s(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends",...t?["mixins","implements"]:[],"body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier"),typeParameters:ts("TypeParameterDeclaration"),extends:Zt(is("InterfaceExtends")),...t?{mixins:Zt(is("InterfaceExtends")),implements:Zt(is("ClassImplements"))}:{},body:Qt("ObjectTypeAnnotation")}})};_s("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:Qt("FlowType")}}),_s("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Yt(ls("boolean"))}}),_s("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("ClassImplements",{visitor:["id","typeParameters"],fields:{id:Qt("Identifier"),typeParameters:ts("TypeParameterInstantiation")}}),Ns("DeclareClass"),_s("DeclareFunction",{builder:["id"],visitor:["id","predicate"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier"),predicate:ts("FlowPredicate")}}),Ns("DeclareInterface"),_s("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier","StringLiteral"),body:Qt("BlockStatement"),kind:Zt(as("CommonJS","ES"))}}),_s("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:Qt("TypeAnnotation")}}),_s("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier"),typeParameters:ts("TypeParameterDeclaration"),right:Qt("FlowType")}}),_s("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier"),typeParameters:ts("TypeParameterDeclaration"),supertype:ts("FlowType"),impltype:ts("FlowType")}}),_s("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier")}}),_s("DeclareExportDeclaration",{visitor:["declaration","specifiers","source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{declaration:ts("Flow"),specifiers:Zt(is("ExportSpecifier","ExportNamespaceSpecifier")),source:ts("StringLiteral"),default:Zt(ls("boolean")),...Es}}),_s("DeclareExportAllDeclaration",{visitor:["source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{source:Qt("StringLiteral"),exportKind:Zt(as("type","value")),...Es}}),_s("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:Qt("Expression")}}),_s("ExistsTypeAnnotation",{aliases:["FlowType"]}),_s("FunctionTypeAnnotation",{builder:["typeParameters","params","rest","returnType"],visitor:["typeParameters","this","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:ts("TypeParameterDeclaration"),params:ns("FunctionTypeParam"),rest:ts("FunctionTypeParam"),this:ts("FunctionTypeParam"),returnType:Qt("FlowType")}}),_s("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:ts("Identifier"),typeAnnotation:Qt("FlowType"),optional:Zt(ls("boolean"))}}),_s("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:Qt("Identifier","QualifiedTypeIdentifier"),typeParameters:ts("TypeParameterInstantiation")}}),_s("InferredPredicate",{aliases:["FlowPredicate"]}),_s("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:Qt("Identifier","QualifiedTypeIdentifier"),typeParameters:ts("TypeParameterInstantiation")}}),Ns("InterfaceDeclaration"),_s("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:Zt(is("InterfaceExtends")),body:Qt("ObjectTypeAnnotation")}}),_s("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Yt(is("FlowType"))}}),_s("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:Qt("FlowType")}}),_s("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Yt(ls("number"))}}),_s("BigIntLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Yt(ls("bigint"))}}),_s("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:Yt(is("ObjectTypeProperty","ObjectTypeSpreadProperty")),indexers:{validate:is("ObjectTypeIndexer"),optional:!1,default:[]},callProperties:{validate:is("ObjectTypeCallProperty"),optional:!1,default:[]},internalSlots:{validate:is("ObjectTypeInternalSlot"),optional:!1,default:[]},exact:{validate:ls("boolean"),default:!1},inexact:Zt(ls("boolean"))}}),_s("ObjectTypeInternalSlot",{visitor:["id","value"],builder:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:Qt("Identifier"),value:Qt("FlowType"),optional:Yt(ls("boolean")),static:Yt(ls("boolean")),method:Yt(ls("boolean"))}}),_s("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:Qt("FlowType"),static:es(ls("boolean"),!1)}}),_s("ObjectTypeIndexer",{visitor:["variance","id","key","value"],builder:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:ts("Identifier"),key:Qt("FlowType"),value:Qt("FlowType"),static:es(ls("boolean"),!1),variance:ts("Variance")}}),_s("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:Qt("Identifier","StringLiteral","NumericLiteral"),value:Qt("FlowType"),kind:{validate:as("init","get","set"),default:"init",optional:!1},static:es(ls("boolean"),!1),proto:es(ls("boolean"),!1),optional:es(ls("boolean"),!1),variance:ts("Variance"),method:es(ls("boolean"),!1)}}),_s("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:Qt("FlowType")}}),_s("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier"),typeParameters:ts("TypeParameterDeclaration"),supertype:ts("FlowType"),impltype:Qt("FlowType")}}),_s("QualifiedTypeIdentifier",{visitor:["qualification","id"],builder:["id","qualification"],fields:{id:Qt("Identifier"),qualification:Qt("Identifier","QualifiedTypeIdentifier")}}),_s("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Yt(ls("string"))}}),_s("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Yt(is("FlowType"))}}),_s("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:Qt("FlowType","Identifier")}}),_s("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier"),typeParameters:ts("TypeParameterDeclaration"),right:Qt("FlowType")}}),_s("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:Qt("FlowType","Identifier")}}),_s("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:Qt("Expression"),typeAnnotation:Qt("TypeAnnotation")}}),_s("TypeParameter",{builder:["name","bound","default","variance"],visitor:["bound","default","variance"],fields:{name:Yt(ls("string")),bound:ts("TypeAnnotation"),default:ts("FlowType"),variance:ts("Variance")}}),_s("TypeParameterDeclaration",{visitor:["params"],fields:{params:Yt(is("TypeParameter"))}}),_s("TypeParameterInstantiation",{visitor:["params"],fields:{params:Yt(is("FlowType"))}}),_s("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Yt(is("FlowType"))}}),_s("Variance",{builder:["kind"],fields:{kind:Yt(as("minus","plus"))}}),_s("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:Qt("Identifier"),body:Qt("EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody")}});const Ls={explicitType:es(ls("boolean"),!1),hasUnknownMembers:es(ls("boolean"),!1)};_s("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{...Ls,members:ns("EnumBooleanMember")}}),_s("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{...Ls,members:ns("EnumNumberMember")}}),_s("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{...Ls,members:ns("EnumStringMember","EnumDefaultedMember")}}),_s("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:ns("EnumDefaultedMember"),hasUnknownMembers:es(ls("boolean"),!1)}}),_s("EnumBooleanMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:Qt("Identifier"),init:Qt("BooleanLiteral")}}),_s("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:Qt("Identifier"),init:Qt("NumericLiteral")}}),_s("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:Qt("Identifier"),init:Qt("StringLiteral")}}),_s("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:Qt("Identifier")}}),_s("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:Qt("FlowType"),indexType:Qt("FlowType")}}),_s("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:Qt("FlowType"),indexType:Qt("FlowType"),optional:es(ls("boolean"),!1)}});const Ds=xs("JSX");Ds("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:cs("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:cs("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),Ds("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:cs("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}}),Ds("JSXElement",{builder:["openingElement","closingElement","children"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:{openingElement:{validate:cs("JSXOpeningElement")},closingElement:{optional:!0,validate:cs("JSXClosingElement")},children:ns("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}}),Ds("JSXEmptyExpression",{}),Ds("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:cs("Expression","JSXEmptyExpression")}}}),Ds("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:cs("Expression")}}}),Ds("JSXIdentifier",{builder:["name"],fields:{name:{validate:ls("string")}}}),Ds("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:cs("JSXMemberExpression","JSXIdentifier")},property:{validate:cs("JSXIdentifier")}}}),Ds("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:cs("JSXIdentifier")},name:{validate:cs("JSXIdentifier")}}}),Ds("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","typeArguments","attributes"],aliases:["Immutable"],fields:{name:{validate:cs("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:ns("JSXAttribute","JSXSpreadAttribute"),typeArguments:{validate:cs("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),Ds("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:cs("Expression")}}}),Ds("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:ls("string")}}}),Ds("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:cs("JSXOpeningFragment")},closingFragment:{validate:cs("JSXClosingFragment")},children:ns("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}}),Ds("JSXOpeningFragment",{aliases:["Immutable"]}),Ds("JSXClosingFragment",{aliases:["Immutable"]});const Ms=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],Os={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};for(const e of Ms){const t=$t[e];t?.length&&(Os[e]=t)}const Fs={};Object.keys(Os).forEach(e=>{Os[e].forEach(t=>{Object.hasOwn(Fs,t)||(Fs[t]=[]),Fs[t].push(e)})});const Rs=xs("Miscellaneous");Rs("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:{name:{validate:cs("Identifier")},expectedNode:{validate:as(...Ms)},...Ps()}}),Rs("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:ls("string")}}}),gs("ArgumentPlaceholder",{}),gs("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{object:{validate:hs("null","Expression")},callee:{validate:cs("Expression")}}}),gs("ClassAccessorProperty",{visitor:["decorators","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"],...Ts(!0),fields:{...As(),key:{validate:ds(function(){const e=cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),t=cs("Expression");return function(s,i,n){(s.computed?t:e)(s,i,n)}}(),cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:cs("Expression"),optional:!0},definite:{validate:ls("boolean"),optional:!0},typeAnnotation:{validate:cs("TypeAnnotation","TSTypeAnnotation"),optional:!0},decorators:{validate:is("Decorator"),optional:!0},readonly:{validate:ls("boolean"),optional:!0},declare:{validate:ls("boolean"),optional:!0},variance:{validate:cs("Variance"),optional:!0}}}),gs("Decorator",{visitor:["expression"],fields:{expression:{validate:cs("Expression")}}}),gs("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:cs("BlockStatement")},async:{validate:ls("boolean"),default:!1}}}),gs("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:cs("Identifier")}}}),gs("ModuleExpression",{visitor:["body"],fields:{body:{validate:cs("Program")}},aliases:["Expression"]}),gs("TopicReference",{aliases:["Expression"]}),gs("VoidPattern",{aliases:["Pattern","PatternLike","FunctionParameter"]});const Bs=xs("TypeScript"),js=ls("boolean"),Us=()=>({returnType:{validate:cs("TSTypeAnnotation"),optional:!0},typeParameters:{validate:cs("TSTypeParameterDeclaration"),optional:!0}});Bs("TSParameterProperty",{aliases:[],visitor:["parameter"],fields:{accessibility:{validate:as("public","private","protected"),optional:!0},readonly:{validate:ls("boolean"),optional:!0},parameter:{validate:cs("Identifier","AssignmentPattern")},override:{validate:ls("boolean"),optional:!0},decorators:{validate:is("Decorator"),optional:!0}}}),Bs("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:{...Cs(),...Us()}}),Bs("TSDeclareMethod",{visitor:["key","typeParameters","params","returnType"],...Ts(!0),fields:{...Is(!1),...Us()}}),Bs("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:Qt("TSEntityName"),right:Qt("Identifier")}});const qs=()=>({typeParameters:ts("TSTypeParameterDeclaration"),params:ns("ArrayPattern","Identifier","ObjectPattern","RestElement"),returnType:ts("TSTypeAnnotation")}),$s={aliases:["TSTypeElement"],visitor:["typeParameters","params","returnType"],fields:qs()};Bs("TSCallSignatureDeclaration",$s),Bs("TSConstructSignatureDeclaration",$s);const Vs=()=>({key:Qt("Expression"),computed:{default:!1},optional:Zt(js)});Bs("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation"],fields:{...Vs(),readonly:Zt(js),typeAnnotation:ts("TSTypeAnnotation"),kind:{optional:!0,validate:as("get","set")}}}),Bs("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","params","returnType"],fields:{...qs(),...Vs(),kind:{validate:as("method","get","set"),default:"method"}}}),Bs("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:Zt(js),static:Zt(js),parameters:ns("Identifier"),typeAnnotation:ts("TSTypeAnnotation")}});const Hs=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(const e of Hs)Bs(e,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});Bs("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});const Ks={aliases:["TSType"],visitor:["typeParameters","params","returnType"]};Bs("TSFunctionType",{...Ks,fields:qs()}),Bs("TSConstructorType",{...Ks,fields:{...qs(),abstract:Zt(js)}}),Bs("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeArguments"],fields:{typeName:Qt("TSEntityName"),typeArguments:ts("TSTypeParameterInstantiation")}}),Bs("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:Qt("Identifier","TSThisType"),typeAnnotation:ts("TSTypeAnnotation"),asserts:Zt(js)}}),Bs("TSTypeQuery",{aliases:["TSType"],visitor:["exprName","typeArguments"],fields:{exprName:Qt("TSEntityName","TSImportType"),typeArguments:ts("TSTypeParameterInstantiation")}}),Bs("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:ns("TSTypeElement")}}),Bs("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:Qt("TSType")}}),Bs("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:ns("TSType","TSNamedTupleMember")}}),Bs("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:Qt("TSType")}}),Bs("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:Qt("TSType")}}),Bs("TSNamedTupleMember",{aliases:["TSType"],visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:Qt("Identifier"),optional:{validate:js,default:!1},elementType:Qt("TSType")}});const zs={aliases:["TSType"],visitor:["types"],fields:{types:ns("TSType")}};Bs("TSUnionType",zs),Bs("TSIntersectionType",zs),Bs("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:Qt("TSType"),extendsType:Qt("TSType"),trueType:Qt("TSType"),falseType:Qt("TSType")}}),Bs("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:Qt("TSTypeParameter")}}),Bs("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:Qt("TSType")}}),Bs("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],builder:["typeAnnotation","operator"],fields:{operator:{validate:as("keyof","readonly","unique"),default:void 0},typeAnnotation:Qt("TSType")}}),Bs("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:Qt("TSType"),indexType:Qt("TSType")}}),Bs("TSMappedType",{aliases:["TSType"],visitor:["key","constraint","nameType","typeAnnotation"],builder:["key","constraint","nameType","typeAnnotation"],fields:{key:Qt("Identifier"),constraint:Qt("TSType"),readonly:Zt(as(!0,!1,"+","-")),optional:Zt(as(!0,!1,"+","-")),typeAnnotation:ts("TSType"),nameType:ts("TSType")}}),Bs("TSTemplateLiteralType",{aliases:["TSType","TSBaseType"],visitor:["quasis","types"],fields:{quasis:ns("TemplateElement"),types:{validate:ds(ls("array"),rs(cs("TSType")),function(e,t,s){if(e.quasis.length!==s.length+1)throw new TypeError(`Number of ${e.type} quasis should be exactly one more than the number of types.\nExpected ${s.length+1} quasis but got ${e.quasis.length}`)})}}}),Bs("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:{validate:function(){const e=cs("NumericLiteral","BigIntLiteral"),t=as("-"),s=cs("NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral");return Gt(function(i,n,r){Pt("UnaryExpression",r)?(t(r,"operator",r.operator),e(r,"argument",r.argument)):s(i,n,r)},{oneOfNodeTypes:["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral","UnaryExpression"]})}()}}}),Bs("TSClassImplements",{aliases:["TSType"],visitor:["expression","typeArguments"],fields:{expression:Qt("Expression"),typeArguments:ts("TSTypeParameterInstantiation")}}),Bs("TSInterfaceHeritage",{aliases:["TSType"],visitor:["expression","typeArguments"],fields:{expression:Qt("Expression"),typeArguments:ts("TSTypeParameterInstantiation")}}),Bs("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:Zt(js),id:Qt("Identifier"),typeParameters:ts("TSTypeParameterDeclaration"),extends:Zt(is("TSInterfaceHeritage")),body:Qt("TSInterfaceBody")}}),Bs("TSInterfaceBody",{visitor:["body"],fields:{body:ns("TSTypeElement")}}),Bs("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:Zt(js),id:Qt("Identifier"),typeParameters:ts("TSTypeParameterDeclaration"),typeAnnotation:Qt("TSType")}}),Bs("TSInstantiationExpression",{aliases:["Expression"],visitor:["expression","typeArguments"],fields:{expression:Qt("Expression"),typeArguments:ts("TSTypeParameterInstantiation")}});const Js={aliases:["Expression","LVal","PatternLike"],visitor:["expression","typeAnnotation"],fields:{expression:Qt("Expression"),typeAnnotation:Qt("TSType")}};Bs("TSAsExpression",Js),Bs("TSSatisfiesExpression",Js),Bs("TSTypeAssertion",{aliases:["Expression","LVal","PatternLike"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:Qt("TSType"),expression:Qt("Expression")}}),Bs("TSEnumBody",{visitor:["members"],fields:{members:ns("TSEnumMember")}}),Bs("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{declare:Zt(js),const:Zt(js),id:Qt("Identifier"),body:Qt("TSEnumBody")}}),Bs("TSEnumMember",{visitor:["id","initializer"],fields:{id:Qt("Identifier","StringLiteral"),initializer:ts("Expression")}}),Bs("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{kind:{validate:as("global","namespace","module"),default:"namespace"},declare:Zt(js),id:{validate:ds(cs("TSEntityName","StringLiteral"),Gt(function(e,t,s){if("namespace"===e.kind&&Pt("StringLiteral",s))throw new TypeError("TSModuleDeclaration of kind 'namespace' cannot have a StringLiteral id.")},{oneOfNodeTypes:["TSEntityName","StringLiteral"]}))},body:Qt("TSModuleBlock")}}),Bs("TSModuleBlock",{aliases:["Scopable","Block","BlockParent","FunctionParent"],visitor:["body"],fields:{body:ns("Statement")}}),Bs("TSImportType",{aliases:["TSType"],builder:["source","qualifier","typeArguments"],visitor:["source","options","qualifier","typeArguments"],fields:{source:Qt("StringLiteral"),qualifier:ts("TSEntityName"),typeArguments:ts("TSTypeParameterInstantiation"),options:{validate:cs("ObjectExpression"),optional:!0}}}),Bs("TSImportEqualsDeclaration",{aliases:["Statement","Declaration"],visitor:["id","moduleReference"],fields:{id:Qt("Identifier"),moduleReference:Qt("TSEntityName","TSExternalModuleReference"),importKind:{validate:as("type","value"),optional:!0}}}),Bs("TSExternalModuleReference",{visitor:["expression"],fields:{expression:Qt("StringLiteral")}}),Bs("TSNonNullExpression",{aliases:["Expression","LVal","PatternLike"],visitor:["expression"],fields:{expression:Qt("Expression")}}),Bs("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:Qt("Expression")}}),Bs("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:Qt("Identifier")}}),Bs("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:cs("TSType")}}}),Bs("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:ns("TSType")}}),Bs("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:ns("TSTypeParameter")}}),Bs("TSTypeParameter",{builder:["constraint","default","name"],visitor:["name","constraint","default"],fields:{name:{validate:cs("Identifier")},in:{validate:ls("boolean"),optional:!0},out:{validate:ls("boolean"),optional:!0},const:{validate:ls("boolean"),optional:!0},constraint:{validate:cs("TSType"),optional:!0},default:{validate:cs("TSType"),optional:!0}}});const Ws={ModuleDeclaration:"ImportOrExportDeclaration"};Object.keys(Ws).forEach(e=>{Vt[e]=Vt[Ws[e]]});for(const{types:e,set:t}of os)for(const s of e){const e=Vt[s];e?e.forEach(t.add,t):t.add(s)}function Xs(e,t,s){if(!e)return;const i=Ht[e.type];if(!i)return;Gs(e,t,s,i[t]),Ys(e,t,s)}function Gs(e,t,s,i){i?.validate&&(i.optional&&null==s||i.validate(e,t,s))}function Ys(e,t,s){const i=s?.type;null!=i&&Jt[i]?.(e,t,s)}const Qs=Object.defineProperty({__proto__:null,default:Xs,validateChild:Ys,validateField:Gs,validateInternal:function(e,t,s,i,n){if(e?.validate&&(!e.optional||null!=i)&&(e.validate(t,s,i),n)){const e=i.type;if(null==e)return;Jt[e]?.(t,s,i)}}},Symbol.toStringTag,{value:"Module"}),{validateInternal:Zs}=Qs,{NODE_FIELDS:ei}=ks;function ti(e,t=[]){const s={type:"BlockStatement",body:e,directives:t},i=ei.BlockStatement;return Zs(i.body,s,"body",e,1),Zs(i.directives,s,"directives",t,1),s}function si(e,t){const s={type:"CallExpression",callee:e,arguments:t},i=ei.CallExpression;return Zs(i.callee,s,"callee",e,1),Zs(i.arguments,s,"arguments",t,1),s}function ii(e){const t={type:"ExpressionStatement",expression:e},s=ei.ExpressionStatement;return Zs(s.expression,t,"expression",e,1),t}function ni(e,t,s=!1){const i={type:"ArrowFunctionExpression",params:e,body:t,async:s},n=ei.ArrowFunctionExpression;return Zs(n.params,i,"params",e,1),Zs(n.body,i,"body",t,1),Zs(n.async,i,"async",s),i}function ri(e){const t={type:"AwaitExpression",argument:e},s=ei.AwaitExpression;return Zs(s.argument,t,"argument",e,1),t}Vt.Standardized,Vt.Expression,Vt.Binary,Vt.Scopable,Vt.BlockParent,Vt.Block,Vt.Statement,Vt.Terminatorless,Vt.CompletionStatement,Vt.Conditional,Vt.Loop,Vt.While,Vt.ExpressionWrapper,Vt.For,Vt.ForXStatement,Vt.Function,Vt.FunctionParent,Vt.Pureish,Vt.Declaration,Vt.FunctionParameter,Vt.PatternLike,Vt.LVal,Vt.TSEntityName,Vt.Literal,Vt.Immutable,Vt.UserWhitespacable,Vt.Method,Vt.ObjectMember,Vt.Property,Vt.UnaryLike,Vt.Pattern,Vt.Class,Vt.ImportOrExportDeclaration,Vt.ExportDeclaration,Vt.ModuleSpecifier,Vt.Private,Vt.Flow,Vt.FlowType,Vt.FlowBaseAnnotation,Vt.FlowDeclaration,Vt.FlowPredicate,Vt.EnumBody,Vt.EnumMember,Vt.JSX,Vt.Miscellaneous,Vt.Accessor,Vt.TypeScript,Vt.TSTypeElement,Vt.TSType,Vt.TSBaseType;const ai=Symbol(),oi=Symbol();function ci(e,t,s){if(!e)return!1;const i=qt[e.type];if(!i)return!1;const n=t(e,s=s||{});if(void 0!==n)switch(n){case ai:return!1;case oi:return!0}for(const n of i){const i=e[n];if(i)if(Array.isArray(i)){for(const e of i)if(ci(e,t,s))return!0}else if(ci(i,t,s))return!0}return!1}ci.skip=ai,ci.stop=oi,Function.call.bind(Object.prototype.toString);var hi=Object.freeze({__proto__:null,ALIAS_KEYS:$t,ASSIGNMENT_OPERATORS:Ft,BINARY_OPERATORS:Ot,BOOLEAN_BINARY_OPERATORS:Dt,BOOLEAN_NUMBER_BINARY_OPERATORS:_t,BOOLEAN_UNARY_OPERATORS:Rt,BUILDER_KEYS:Kt,COMPARISON_BINARY_OPERATORS:Lt,DEPRECATED_ALIASES:Ws,DEPRECATED_KEYS:zt,EQUALITY_BINARY_OPERATORS:Nt,FLIPPED_ALIAS_KEYS:Vt,LOGICAL_OPERATORS:At,NODE_FIELDS:Ht,NODE_PARENT_VALIDATIONS:Jt,NODE_UNION_SHAPES__PRIVATE:Wt,NUMBER_BINARY_OPERATORS:Mt,NUMBER_UNARY_OPERATORS:Bt,PLACEHOLDERS:Ms,PLACEHOLDERS_ALIAS:Os,PLACEHOLDERS_FLIPPED_ALIAS:Fs,STRING_UNARY_OPERATORS:jt,UNARY_OPERATORS:Ut,UPDATE_OPERATORS:It,VISITOR_KEYS:qt,arrowFunctionExpression:ni,awaitExpression:ri,blockStatement:ti,callExpression:si,expressionStatement:ii,is:Pt,isAssignmentPattern:function(e,t){return bt("AssignmentPattern",e,t)},isCallExpression:function(e,t){return bt("CallExpression",e,t)},isClassBody:function(e,t){return bt("ClassBody",e,t)},isClassDeclaration:function(e,t){return bt("ClassDeclaration",e,t)},isDeclareExportDeclaration:function(e,t){return bt("DeclareExportDeclaration",e,t)},isExportDeclaration:wt,isExportDefaultDeclaration:function(e,t){return bt("ExportDefaultDeclaration",e,t)},isExportDefaultSpecifier:function(e,t){return bt("ExportDefaultSpecifier",e,t)},isExportNamedDeclaration:St,isExportNamespaceSpecifier:function(e,t){return bt("ExportNamespaceSpecifier",e,t)},isExpression:function(e,t){if(!e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ParenthesizedExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":case"ArrowFunctionExpression":case"ClassExpression":case"MetaProperty":case"TaggedTemplateExpression":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"ImportExpression":case"BigIntLiteral":case"OptionalMemberExpression":case"OptionalCallExpression":case"TypeCastExpression":case"JSXElement":case"JSXFragment":case"BindExpression":case"DoExpression":case"ModuleExpression":case"TopicReference":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(e.expectedNode){case"Expression":case"Identifier":case"StringLiteral":break;default:return!1}break;default:return!1}return null==t},isFor:function(e,t){if(!e)return!1;switch(e.type){case"ForInStatement":case"ForStatement":case"ForOfStatement":break;default:return!1}return null==t},isFunction:function(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 null==t},isIdentifier:function(e,t){return bt("Identifier",e,t)},isIfStatement:function(e,t){return bt("IfStatement",e,t)},isImportDefaultSpecifier:function(e,t){return bt("ImportDefaultSpecifier",e,t)},isImportNamespaceSpecifier:function(e,t){return bt("ImportNamespaceSpecifier",e,t)},isLiteral:function(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("StringLiteral"===e.expectedNode)break;default:return!1}return null==t},isMemberExpression:function(e,t){return bt("MemberExpression",e,t)},isNewExpression:function(e,t){return bt("NewExpression",e,t)},isOptionalMemberExpression:function(e,t){return bt("OptionalMemberExpression",e,t)},isPattern:function(e,t){if(!e)return!1;switch(e.type){case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if("Pattern"===e.expectedNode)break;default:return!1}return null==t},isPlaceholderType:Ct,isStatement:function(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 null==t},isTSEnumMember:function(e,t){return bt("TSEnumMember",e,t)},isTSInterfaceBody:function(e,t){return bt("TSInterfaceBody",e,t)},isType:vt,isValidIdentifier:Et,isVoidPattern:function(e,t){return bt("VoidPattern",e,t)},isYieldExpression:function(e,t){return bt("YieldExpression",e,t)},shallowEqual:Tt,traverseFast:ci,validate:Xs});const li={},pi=li.hasOwnProperty,ui=(e,t)=>{for(const s in e)pi.call(e,s)&&t(s,e[s])},di=e=>"\\u"+("0000"+e).slice(-4),fi=(e,t)=>{let s=e.toString(16);return t?s:s.toUpperCase()},mi=li.toString,yi=Array.isArray,xi=e=>"bigint"==typeof e,gi={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},ki=/[\\\b\f\n\r\t]/,Ti=/[0-9]/,bi=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Si=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,wi=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,vi=(e,t)=>{const s=()=>{p=l,++t.indentLevel,l=t.indent.repeat(t.indentLevel)},i={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:"\t",indentLevel:0,__inline1__:!1,__inline2__:!1},n=t&&t.json;var r,a;n&&(i.quotes="double",i.wrap=!0),r=i,t=(a=t)?(ui(a,(e,t)=>{r[e]=t}),r):r,"single"!=t.quotes&&"double"!=t.quotes&&"backtick"!=t.quotes&&(t.quotes="single");const o="double"==t.quotes?'"':"backtick"==t.quotes?"`":"'",c=t.compact,h=t.lowercaseHex;let l=t.indent.repeat(t.indentLevel),p="";const u=t.__inline1__,d=t.__inline2__,f=c?"":"\n";let m,y=!0;const x="binary"==t.numbers,g="octal"==t.numbers,k="decimal"==t.numbers,T="hexadecimal"==t.numbers;if(n&&e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!(e=>"string"==typeof e||"[object String]"==mi.call(e))(e)){if((e=>"[object Map]"==mi.call(e))(e))return 0==e.size?"new Map()":(c||(t.__inline1__=!0,t.__inline2__=!1),"new Map("+vi(Array.from(e),t)+")");if((e=>"[object Set]"==mi.call(e))(e))return 0==e.size?"new Set()":"new Set("+vi(Array.from(e),t)+")";if((e=>"function"==typeof Buffer&&Buffer.isBuffer(e))(e))return 0==e.length?"Buffer.from([])":"Buffer.from("+vi(Array.from(e),t)+")";if(yi(e))return m=[],t.wrap=!0,u&&(t.__inline1__=!1,t.__inline2__=!0),d||s(),((e,t)=>{const s=e.length;let i=-1;for(;++i<s;)t(e[i])})(e,e=>{y=!1,d&&(t.__inline2__=!1),m.push((c||d?"":l)+vi(e,t))}),y?"[]":d?"["+m.join(", ")+"]":"["+f+m.join(","+f)+f+(c?"":p)+"]";if((e=>"number"==typeof e||"[object Number]"==mi.call(e))(e)||xi(e)){if(n)return JSON.stringify(Number(e));let t;if(k)t=String(e);else if(T){let s=e.toString(16);h||(s=s.toUpperCase()),t="0x"+s}else x?t="0b"+e.toString(2):g&&(t="0o"+e.toString(8));return xi(e)?t+"n":t}return xi(e)?n?JSON.stringify(Number(e)):e+"n":(e=>"[object Object]"==mi.call(e))(e)?(m=[],t.wrap=!0,s(),ui(e,(e,s)=>{y=!1,m.push((c?"":l)+vi(e,t)+":"+(c?"":" ")+vi(s,t))}),y?"{}":"{"+f+m.join(","+f)+f+(c?"":p)+"}"):n?JSON.stringify(e)||"null":String(e)}const b=t.escapeEverything?Si:wi;return m=e.replace(b,(e,s,i,r,a,c)=>{if(s){if(t.minimal)return s;const e=s.charCodeAt(0),i=s.charCodeAt(1);if(t.es6){return"\\u{"+fi(1024*(e-55296)+i-56320+65536,h)+"}"}return di(fi(e,h))+di(fi(i,h))}if(i)return di(fi(i.charCodeAt(0),h));if("\0"==e&&!n&&!Ti.test(c.charAt(a+1)))return"\\0";if(r)return r==o||t.escapeEverything?"\\"+r:r;if(ki.test(e))return gi[e];if(t.minimal&&!bi.test(e))return e;const l=fi(e.charCodeAt(0),h);return n||l.length>2?di(l):"\\x"+("00"+l).slice(-2)}),"`"==o&&(m=m.replace(/\$\{/g,"\\${")),t.isScriptContext&&(m=m.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,n?"\\u003C!--":"\\x3C!--")),t.wrap&&(m=o+m+o),m};vi.version="3.0.2";var Ci=n(vi);class Pi{_map;_rawMappings;_sourceFileName;_lastGenLine=0;_lastSourceLine=0;_lastSourceColumn=0;_inputMap=null;constructor(e,t){const s=this._map=new Ve({sourceRoot:e.sourceRoot});if(this._sourceFileName=e.sourceFileName?.replace(/\\/g,"/"),this._rawMappings=void 0,e.inputSourceMap){this._inputMap=new Re(e.inputSourceMap);const t=this._inputMap.resolvedSources;if(t.length)for(let e=0;e<t.length;e++)Ke(s,t[e],this._inputMap.sourcesContent?.[e])}if("string"!=typeof t||e.inputSourceMap){if("object"==typeof t)for(const e of Object.keys(t))Ke(s,e.replace(/\\/g,"/"),t[e])}else Ke(s,this._sourceFileName,t)}get(){const e=Je(this._map);return e.ignoreList??=[],e}getDecoded(){const e=ze(this._map);return e.ignoreList??=[],e}getRawMappings(){return this._rawMappings||=function(e){const t=[],{_mappings:s,_sources:{array:i},_names:{array:n}}=e;for(let e=0;e<s.length;e++){const r=s[e];for(let s=0;s<r.length;s++){const a=r[s],o={line:e+1,column:a[0]};let c,h,l;1!==a.length&&(c=i[a[1]],h={line:a[2]+1,column:a[3]},5===a.length&&(l=n[a[4]])),t.push({generated:o,source:c,original:h,name:l})}}return t}(this._map)}mark(e,t,s,i,n,r,a){let o;if(this._rawMappings=void 0,null!=s)if(this._inputMap){if(o=je(this._inputMap,{line:s,column:i}),o.name&&(r||null!=n&&o.column===i))n=o.name;else if(r){const e=je(this._inputMap,r);e.name&&(n=e.name)}}else o={name:null,source:a?.replace(/\\/g,"/")||this._sourceFileName,line:s,column:i};null!=n&&n===t&&(n=null),He(this._map,{name:n,generated:e,source:o?.source,original:o})}}const Ei=[];for(let e=0;e<32;e++)Ei.push(" ".repeat(2*e));let Ai=class{constructor(e,t){this._map=e,this._indentChar=t}_map=null;_buf="";_str="";_appendCount=0;_last=0;_canMarkIdName=!0;_indentChar="";_queuedChar=0;_position={line:1,column:0};_sourcePosition={identifierName:void 0,identifierNamePos:void 0,line:void 0,column:void 0,filename:void 0};get(){const{_map:e,_last:t}=this;32!==this._queuedChar&&this._flush();const s=10===t?(this._buf+this._str).trimRight():this._buf+this._str;if(null===e)return{code:s,decodedMap:void 0,map:null,rawMappings:void 0};const i={code:s,decodedMap:e.getDecoded(),get map(){const t=e.get();return i.map=t,t},set map(e){Object.defineProperty(i,"map",{value:e,writable:!0})},get rawMappings(){const t=e.getRawMappings();return i.rawMappings=t,t},set rawMappings(e){Object.defineProperty(i,"rawMappings",{value:e,writable:!0})}};return i}append(e,t,s=!1){this._flush(),this._append(e,t,s)}appendChar(e){this._flush(),this._appendChar(e,1,!0)}queue(e){this._flush(),this._queuedChar=e}_flush(){const e=this._queuedChar;0!==e&&(this._appendChar(e,1,!0),this._queuedChar=0)}_appendChar(e,t,s){if(this._last=e,-1===e){const e=t>=64?this._indentChar.repeat(t):Ei[t/2];this._str+=e}else this._str+=t>1?String.fromCharCode(e).repeat(t):String.fromCharCode(e);const i=32===e,n=this._position;if(10!==e){if(this._map){const e=this._sourcePosition;s&&e?(this._map.mark(n,null,e.line,e.column,i?void 0:e.identifierName,i?void 0:e.identifierNamePos,e.filename),!i&&this._canMarkIdName&&(e.identifierName=void 0,e.identifierNamePos=void 0)):this._map.mark(n,null)}n.column+=t}else n.line++,n.column=0}_append(e,t,s){const i=e.length,n=this._position,r=this._sourcePosition;this._last=-1,++this._appendCount>4096?(this._str,this._buf+=this._str,this._str=e,this._appendCount=0):this._str+=e;const a=!s&&null!==this._map;if(!t&&!a)return void(n.column+=i);const{column:o,identifierName:c,identifierNamePos:h,filename:l}=r;let p=r.line;null==c&&null==h||!this._canMarkIdName||(r.identifierName=void 0,r.identifierNamePos=void 0);let u=e.indexOf("\n"),d=0;for(a&&0!==u&&this._map.mark(n,e,p,o,c,h,l);-1!==u;)n.line++,n.column=0,d=u+1,d<i&&void 0!==p&&(p++,a&&this._map.mark(n,e,p,0,void 0,void 0,l)),u=e.indexOf("\n",d);n.column+=i-d}removeLastSemicolon(){59===this._queuedChar&&(this._queuedChar=0)}getLastChar(e){if(!e)return this._last;const t=this._queuedChar;return 0!==t?t:this._last}getNewlineCount(){return 0===this._queuedChar&&10===this._last?1:0}hasContent(){return 0!==this._last}exactSource(e,t){if(!this._map)return void t();this.source("start",e);const s=e.identifierName,i=this._sourcePosition;null!=s&&(this._canMarkIdName=!1,i.identifierName=s),t(),null!=s&&(this._canMarkIdName=!0,i.identifierName=void 0,i.identifierNamePos=void 0),this.source("end",e)}source(e,t){this._map&&this._normalizePosition(e,t,0)}sourceWithOffset(e,t,s){this._map&&this._normalizePosition(e,t,s)}_normalizePosition(e,t,s){this._flush();const i=t[e];i&&(this.setSourcePosition(i.line,Math.max(i.column+s,0)),this._sourcePosition.filename=t.filename)}setSourcePosition(e,t){const s=this._sourcePosition;s.line=e,s.column=t}getCurrentColumn(){return this._position.column+(this._queuedChar?1:0)}getCurrentLine(){return this._position.line}};const{isMemberExpression:Ii,isOptionalMemberExpression:_i,isYieldExpression:Ni,isStatement:Li}=hi,Di=new Map([["||",0],["??",1],["&&",2],["|",3],["^",4],["&",5],["==",6],["===",6],["!=",6],["!==",6],["<",7],[">",7],["<=",7],[">=",7],["in",7],["instanceof",7],[">>",8],["<<",8],[">>>",8],["+",9],["-",9],["*",10],["/",10],["%",10],["**",11]]);function Mi(e){return 154===e||199===e||207===e}const Oi=(e,t,s)=>(22===s||23===s)&&t.superClass===e,Fi=(e,t,s)=>{switch(s){case 109:case 133:return t.object===e;case 18:case 131:case 113:return t.callee===e;case 220:return t.tag===e;case 189:return!0}return!1};function Ri(e){return(3&e)>0}function Bi(e,t,s,i){if(Oi(e,t,s))return!0;if(Fi(e,t,s)||236===s||143===s||8===s)return!0;let n;switch(s){case 11:case 108:n=Di.get(t.operator);break;case 154:case 199:n=7}if(void 0!==n){const r=2===i?7:Di.get(e.operator);if(n>r)return!0;if(n===r&&11===s&&(11===r?t.left===e:t.right===e))return!0;if(1===i&&108===s&&(1===r&&1!==n||1===n&&1!==r))return!0}return!1}function ji(e,t,s){switch(s){case 4:case 116:case 91:case 237:return!0}return!1}function Ui(e,t,s){return(6===s||7===s)&&t.left===e||(11===s&&("|"===t.operator||"&"===t.operator)&&e===t.left||Bi(e,t,s,2))}function qi(e,t,s){switch(s){case 179:case 209:case 153:case 193:return!0;case 173:return t.objectType===e}return!1}function $i(e,t,s){switch(s){case 153:case 193:return!0;case 173:if(t.objectType===e)return!0}return!1}function Vi(e,t,s){return!!qi(e,t,s)||(217===s||159===s&&(t.checkType===e||t.extendsType===e))}function Hi(e,t,s){return 11===s||108===s||236===s||143===s||Fi(e,t,s)||8===s&&Ni(e)||29===s&&e===t.test||Oi(e,t,s)||Mi(s)}function Ki(e,t,s){return Fi(e,t,s)||11===s&&"**"===t.operator&&t.left===e||Oi(e,t,s)}function zi(e,t,s){switch(s){case 236:case 143:case 11:case 108:case 8:return!0;case 29:if(t.test===e)return!0}return!!Mi(s)||Ki(e,t,s)}function Ji(e,t,s){switch(s){case 18:return t.callee===e;case 109:return t.object===e}return!1}const Wi=Object.defineProperty({__proto__:null,ArrowFunctionExpression:zi,AssignmentExpression:function(e,t,s,i){return!(!Ri(i)||"ObjectPattern"!==e.left.type)||zi(e,t,s)},AwaitExpression:Hi,BinaryExpression:function(e,t,s,i){return!!Bi(e,t,s,0)||(128&i)>0&&"in"===e.operator},ClassExpression:function(e,t,s,i){return(5&i)>0},ConditionalExpression:zi,DoExpression:function(e,t,s,i){return(1&i)>0&&!e.async},FunctionExpression:function(e,t,s,i){return(5&i)>0},FunctionTypeAnnotation:function(e,t,s,i){return 237===s||91===s||4===s||(8&i)>0},Identifier:function(e,t,s,i,n){if(n&&n(e)!==e.name)return!1;if(6===s&&e.extra?.parenthesized&&t.left===e){const e=t.right.type;if(("FunctionExpression"===e||"ClassExpression"===e)&&null==t.right.id)return!0}if((64&i||(109===s||133===s)&&49&i)&&"let"===e.name){return!!((Ii(t,{object:e,computed:!0})||_i(t,{object:e,computed:!0,optional:!1}))&&49&i)||(64&i)>0}return 69===s&&t.left===e&&"async"===e.name&&!t.await},IntersectionTypeAnnotation:ji,LogicalExpression:function(e,t,s){return Bi(e,t,s,1)},NullableTypeAnnotation:function(e,t,s){return 4===s},ObjectExpression:function(e,t,s,i){return Ri(i)},OptionalCallExpression:Ji,OptionalIndexedAccessType:function(e,t,s){return 85===s&&t.objectType===e},OptionalMemberExpression:Ji,SequenceExpression:function(e,t,s){return!(142===s||134===s||109===s&&t.property===e||133===s&&t.property===e||222===s)&&(22===s||(69===s?t.right===e:61===s||!Li(t)))},SpreadElement:Ki,TSAsExpression:Ui,TSConditionalType:function(e,t,s){switch(s){case 153:case 193:case 209:case 210:case 179:case 217:return!0;case 173:return t.objectType===e;case 159:return t.checkType===e||t.extendsType===e}return!1},TSConstructorType:Vi,TSFunctionType:Vi,TSInferType:function(e,t,s){return!!$i(e,t,s)||(179===s||217===s)&&null!=e.typeParameter.constraint},TSInstantiationExpression:function(e,t,s){switch(s){case 18:case 131:case 113:case 175:return null!=t.typeArguments}return!1},TSIntersectionType:function(e,t,s){return 209===s||$i(e,t,s)},TSSatisfiesExpression:Ui,TSTypeAssertion:Ki,TSTypeOperator:$i,TSUnionType:qi,UnaryExpression:Ki,UnionTypeAnnotation:ji,UpdateExpression:function(e,t,s){return Fi(e,t,s)||Oi(e,t,s)},YieldExpression:Hi},Symbol.toStringTag,{value:"Module"});function Xi(e,t){const s=e.quasis;let i="`";for(let e=0;e<s.length-1;e++)i+=s[e].value.raw,this.token(i+"${",!0),this.print(t[e]),i="}";i+=s[s.length-1].value.raw,this.token(i+"`",!0)}const{isCallExpression:Gi,isLiteral:Yi,isMemberExpression:Qi,isNewExpression:Zi,isPattern:en}=hi;function tn(e){this.tokenChar(40);const t=this.enterDelimited();this.printList(e.arguments,this.shouldPrintTrailingComma(")"),void 0,void 0,void 0,!0),this._noLineTerminatorAfterNode=t,this.rightParens(e)}function sn(e){return"number"==typeof e.start&&e.start===e.declaration.start}function nn(e){this.print(e.left),this.space(),this.token(e.operator,!1,0,!0),this.space(),this.print(e.right)}const{isFor:rn,isIfStatement:an,isStatement:on,isVoidPattern:cn}=hi;function hn(e){const{body:t}=e;return!1===on(t)?e:hn(t)}function ln(e,t){t&&(e.space(),e.printTerminatorless(t)),e.semicolon()}function pn(e){this.tokenChar(44,e),this.newline()}const{isIdentifier:un}=hi;function dn(e,t,s,i){if(this.print(e.typeParameters),void 0!==s||void 0!==i){const e=Sn.call(this,s,i);e&&this.sourceIdentifierName(e.name,e.pos)}this.tokenChar(40),fn.call(this,e.params,41),this.print(e.returnType,t),this._noLineTerminator=t}function fn(e,t){const s=this.enterDelimited(),i=this.shouldPrintTrailingComma(t),n=e.length;for(let t=0;t<n;t++)mn.call(this,e[t]),(i||t<n-1)&&(this.tokenChar(44,t),this.space());this.tokenChar(t),this._noLineTerminatorAfterNode=s}function mn(e){this.printJoin(e.decorators,void 0,void 0,void 0,void 0,!0),this.print(e,void 0,!0),e.optional&&this.tokenChar(63),this.print(e.typeAnnotation,void 0,!0)}function yn(e){const t=e.kind,s=e.key;"get"!==t&&"set"!==t||(this.word(t),this.space()),e.async&&(this.word("async",!0),this.space()),"method"!==t&&"init"!==t||e.generator&&this.tokenChar(42),e.computed?(this.tokenChar(91),this.print(s),this.tokenChar(93)):this.print(s),e.optional&&this.tokenChar(63),this._buf._map?dn.call(this,e,!1,e.computed&&"StringLiteral"!==e.key.type?void 0:e.key):dn.call(this,e,!1)}function xn(e,t){e.predicate&&(e.returnType||this.tokenChar(58),this.space(),this.print(e.predicate,t))}function gn(e,t,s){e.async&&(this.word("async"),this.format.preserveFormat||(this._innerCommentsState=0),this.space()),this.word("function"),e.generator&&(this.format.preserveFormat||(this._innerCommentsState=0),this.tokenChar(42)),this.space(),e.id&&this.print(e.id),this._buf._map?dn.call(this,e,!1,e.id,t):dn.call(this,e,!1),s&&xn.call(this,e)}function kn(e,t){gn.call(this,e,t,!0),this.space(),this.print(e.body)}function Tn(e){if(1!==e.params.length)return!0;if(e.typeParameters||e.returnType||e.predicate)return!0;const t=e.params[0];if(!un(t)||t.typeAnnotation||t.optional||t.leadingComments?.length||t.trailingComments?.length)return!0;if(this.tokenMap){if(null==e.loc)return!0;if(null!==this.tokenMap.findMatching(e,"("))return!0;const t=this.tokenMap.findMatching(e,"=>");return null==t?.loc||t.loc.start.line!==e.loc.start.line}return!!this.format.retainLines}function bn(e){return!!e.loc?.identifierName&&e.loc.identifierName!==e.name}function Sn(e,t){let s,i=e;if(!i&&t){const e=t.type;"VariableDeclarator"===e?i=t.id:"AssignmentExpression"===e||"AssignmentPattern"===e?i=t.left:"ObjectProperty"===e||"ClassProperty"===e?t.computed&&"StringLiteral"!==t.key.type||(i=t.key):"ClassPrivateProperty"!==e&&"ClassAccessorProperty"!==e||(i=t.key)}if(i?.loc){if("Identifier"===i.type){if(!bn(i))return;s={pos:i.loc.start,name:i.loc.identifierName}}else if("PrivateName"===i.type){if(!bn(i.id))return;s={pos:i.loc.start,name:"#"+i.id.loc.identifierName}}else"StringLiteral"===i.type&&(s={pos:i.loc.start,name:i.value});return s}}function wn(e,t){this.tokenChar(60);let s="ArrowFunctionExpression"===t.type&&1===e.params.length;this.tokenMap&&null!=e.start&&null!=e.end&&(s&&=!!this.tokenMap.find(e,e=>this.tokenMap.matchesOriginal(e,",")),s||=this.shouldPrintTrailingComma(">")),this.printList(e.params,s),this.tokenChar(62)}function vn(e,t){e.tokenMap&&t.start&&t.end?e.tokenMap.endMatches(t,",")?e.token(","):e.tokenMap.endMatches(t,";")&&e.semicolon():e.semicolon()}function Cn(e){e.computed&&this.tokenChar(91),this.print(e.key),e.computed&&this.tokenChar(93),e.optional&&this.tokenChar(63)}function Pn(e){const{typeParameters:t}=e,s=e.params;this.print(t),this.tokenChar(40),fn.call(this,s,41),this.space();const i=e.returnType;this.print(i)}function En(e,t,s){let i=0;e.tokenMap?.startMatches(t,s)&&(i=1,e.token(s)),e.printJoin(t.types,void 0,void 0,function(e){this.space(),this.token(s,void 0,e+i),this.space()})}function An(e,t){!0!==t&&e.token(t)}function In(e){this.print(e.expression),this.print(e.typeArguments)}function _n(e){const{typeParameters:t}=e,s=e.params;this.print(t),this.tokenChar(40),fn.call(this,s,41),this.print(e.returnType)}function Nn(e){const t="ClassPrivateProperty"===e.type,s="ClassAccessorProperty"===e.type||"ClassProperty"===e.type;Dn(this,e,[s&&e.declare&&"declare",!t&&e.accessibility]),e.static&&(this.word("static"),this.space()),Dn(this,e,[!t&&e.abstract&&"abstract",!t&&e.override&&"override",(s||t)&&e.readonly&&"readonly"])}function Ln(e,t,s){e.token("{");const i=e.enterDelimited();s(),e._noLineTerminatorAfterNode=i,e.rightBrace(t)}function Dn(e,t,s){const i=new Set;for(const e of s)e&&i.add(e);e.tokenMap?.find(t,t=>!!i.has(t.value)&&(e.token(t.value),e.space(),i.delete(t.value),0===i.size));for(const t of i)e.word(t),e.space()}const{isClassDeclaration:Mn,isExportDefaultSpecifier:On,isExportNamespaceSpecifier:Fn,isImportDefaultSpecifier:Rn,isImportNamespaceSpecifier:Bn,isStatement:jn}=hi;function Un(e,t){const{attributes:s}=e;this.word("with"),this.space();const i=t?1:0;this.token("{",void 0,i),this.space(),this.printList(s,this.shouldPrintTrailingComma("}")),this.space(),this.token("}",void 0,i)}function qn(e){this.word("export"),this.space(),"type"===e.exportKind&&(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(),Un.call(this,e,!1)):this.print(e.source),this.semicolon()}function $n(e,t){Mn(t.declaration)&&sn.call(e,t)&&e.printJoin(t.declaration.decorators)}const{isAssignmentPattern:Vn,isIdentifier:Hn}=hi;let Kn="";function zn(e){const{name:t}=e,s=this.tokenMap.find(e,e=>e.value===t);return s?(Kn=this._originalCode.slice(s.start,s.end),Kn):Kn=e.name}function Jn(e){this.token("..."),this.print(e.argument)}function Wn(e){const t=e.properties;if(this.tokenChar(123),t.length){const e=this.enterDelimited();this.space(),this.printList(t,this.shouldPrintTrailingComma("}"),!0,!0,void 0,!0),this.space(),this._noLineTerminatorAfterNode=e}this.rightBrace(e)}function Xn(e){const t=e.elements,s=t.length;this.tokenChar(91);const i=this.enterDelimited();for(let e=0;e<t.length;e++){const i=t[e];i?(e>0&&this.space(),this.print(i,void 0,!0),(e<s-1||this.shouldPrintTrailingComma("]"))&&this.tokenChar(44,e)):this.tokenChar(44,e)}this._noLineTerminatorAfterNode=i,this.tokenChar(93)}function Gn(e){const t=this.getPossibleRaw(e),s=this.format.jsescOption,i=e.value,n=i+"";s.numbers?this.number(Ci(i,s),i):null==t?this.number(n,i):this.format.minified?this.number(t.length<n.length?t:n,i):this.number(t,i)}function Yn(e){const t=this.getPossibleRaw(e);if(!this.format.minified&&void 0!==t)return void this.token(t);const s=Ci(e.value,this.format.jsescOption);this.token(s)}function Qn(e){const t=this.getPossibleRaw(e);this.format.minified||void 0===t?this.word(e.value+"n"):this.word(t)}const Zn=new Set(["^^","@@","^","%","#"]);const{isDeclareExportDeclaration:er,isStatement:tr}=hi;function sr(e,t,s){s&&(e.space(),e.word("of"),e.space(),e.word(t)),e.space()}function ir(e,t){const{members:s}=t;e.token("{"),e.indent(),e.newline();for(const t of s)e.print(t),e.newline();t.hasUnknownMembers&&(e.token("..."),e.newline()),e.dedent(),e.token("}")}function nr(e,t){e.print(t.id),e.space(),e.token("="),e.space(),e.print(t.init),e.token(",")}function rr(e){if(e.declaration){const t=e.declaration;this.print(t),tr(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 ar(e){this.print(e.id),this.print(e.typeParameters,!0)}function or(e){this.print(e.id),this.print(e.typeParameters),e.extends?.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends)),"DeclareClass"===e.type&&(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 cr(e){const t=e.variance?.kind;null!=t&&("plus"===t?this.tokenChar(43):"minus"===t&&this.tokenChar(45))}function hr(e){this.word("interface"),this.space(),or.call(this,e)}function lr(e){this.space(),this.token("&",!1,e),this.space()}function pr(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 ur(e){this.tokenChar(60),this.printList(e.params),this.tokenChar(62)}function dr(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 fr(e){this.space(),this.token("|",!1,e),this.space()}const{isExportDefaultDeclaration:mr,isExportNamedDeclaration:yr}=hi;function xr(e,t){(mr(t)||yr(t))&&sn.call(this,t)||this.printJoin(e.decorators),e.declare&&(this.word("declare"),this.space()),e.abstract&&(this.word("abstract"),this.space()),this.word("class"),e.id&&(this.space(),this.print(e.id)),this.print(e.typeParameters),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass),this.print(e.superTypeArguments)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements)),this.space(),this.print(e.body)}function gr(e,t=!0){if(t&&this.printJoin(e.decorators),!this.format.preserveFormat){const t=e.key.loc?.end?.line;t&&this.catchUp(t)}Nn.call(this,e),yn.call(this,e)}const kr=/(?:^|[^\\])(?:\\\\)*'/,Tr=/(?:^|[^\\])(?:\\\\)*"/;function br(){this.space()}const Sr=Object.defineProperty({__proto__:null,AnyTypeAnnotation:function(){this.word("any")},ArgumentPlaceholder:function(){this.tokenChar(63)},ArrayExpression:Xn,ArrayPattern:Xn,ArrayTypeAnnotation:function(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)},ArrowFunctionExpression:function(e,t){e.async&&(this.word("async",!0),this.space()),Tn.call(this,e)?dn.call(this,e,!0,void 0,this._buf._map?t:void 0):this.print(e.params[0],!0),xn.call(this,e,!0),this.space(),this.printInnerComments(),this.token("=>"),this.space(),this.tokenContext|=2,this.print(e.body)},AssignmentExpression:nn,AssignmentPattern:function(e){this.print(e.left),("Identifier"===e.left.type||en(e.left))&&(e.left.optional&&this.tokenChar(63),this.print(e.left.typeAnnotation)),this.space(),this.tokenChar(61),this.space(),this.print(e.right)},AwaitExpression:function(e){this.word("await"),this.space(),this.print(e.argument)},BigIntLiteral:Qn,BigIntLiteralTypeAnnotation:Qn,BinaryExpression:function(e){this.print(e.left),this.space();const{operator:t}=e;105===t.charCodeAt(0)?this.word(t):(this.token(t,!1,0,!0),this.setLastChar(t.charCodeAt(t.length-1))),this.space(),this.print(e.right)},BindExpression:function(e){this.print(e.object),this.token("::"),this.print(e.callee)},BlockStatement:function(e){this.tokenChar(123);const t=this.enterDelimited(),s=e.directives?.length;if(s){const t=e.body.length?2:1;this.printSequence(e.directives,!0,!0,t),e.directives[s-1].trailingComments?.length||this.newline(t)}this.printSequence(e.body,!0,!0),this._noLineTerminatorAfterNode=t,this.rightBrace(e)},BooleanLiteral:function(e){this.word(e.value?"true":"false")},BooleanLiteralTypeAnnotation:function(e){this.word(e.value?"true":"false")},BooleanTypeAnnotation:function(){this.word("boolean")},BreakStatement:function(e){this.word("break"),ln(this,e.label)},CallExpression:function(e){this.print(e.callee),this.print(e.typeArguments),tn.call(this,e)},CatchClause:function(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)},ClassAccessorProperty:function(e){this.printJoin(e.decorators);const t=e.key.loc?.end?.line;t&&this.catchUp(t),Nn.call(this,e),this.word("accessor",!0),this.space(),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(cr.call(this,e),this.print(e.key)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()},ClassBody:function(e){if(this.tokenChar(123),0===e.body.length)this.tokenChar(125);else{const t=function(e,t){if(!e.tokenMap||null==t.start||null==t.end)return null;const s=e.tokenMap.getIndexes(t);if(!s)return null;let i=1,n=0,r=0;const a=()=>{for(;r<t.body.length&&null==t.body[r].start;)r++};return a(),o=>{r<=o&&(r=o+1,a());const c=r===t.body.length?t.end:t.body[r].start;let h;for(;i<s.length&&e.tokenMap.matchesOriginal(h=e._tokens[s[i]],";")&&h.start<c;)e.tokenChar(59,n++),i++}}(this,e);t?.(-1);const s=this.enterDelimited();this.printJoin(e.body,!0,!0,t,!0,!0),this._noLineTerminatorAfterNode=s,this.endsWith(10)||this.newline(),this.rightBrace(e)}},ClassDeclaration:xr,ClassExpression:xr,ClassImplements:ar,ClassMethod:function(e){gr.call(this,e),this.space(),this.print(e.body)},ClassPrivateMethod:function(e){gr.call(this,e),this.space(),this.print(e.body)},ClassPrivateProperty:function(e){this.printJoin(e.decorators),Nn.call(this,e),this.print(e.key),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()},ClassProperty:function(e){if(this.printJoin(e.decorators),!e.static&&!this.format.preserveFormat){const t=e.key.loc?.end?.line;t&&this.catchUp(t)}Nn.call(this,e),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(cr.call(this,e),this.print(e.key)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()},ConditionalExpression:function(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)},ContinueStatement:function(e){this.word("continue"),ln(this,e.label)},DebuggerStatement:function(){this.word("debugger"),this.semicolon()},DeclareClass:function(e,t){er(t)||(this.word("declare"),this.space()),this.word("class"),this.space(),or.call(this,e)},DeclareExportAllDeclaration:function(e){this.word("declare"),this.space(),qn.call(this,e)},DeclareExportDeclaration:function(e){this.word("declare"),this.space(),this.word("export"),this.space(),e.default&&(this.word("default"),this.space()),rr.call(this,e)},DeclareFunction:function(e,t){er(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()},DeclareInterface:function(e){this.word("declare"),this.space(),hr.call(this,e)},DeclareModule:function(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id),this.space(),this.print(e.body)},DeclareModuleExports:function(e){this.word("declare"),this.space(),this.word("module"),this.tokenChar(46),this.word("exports"),this.print(e.typeAnnotation)},DeclareOpaqueType:function(e,t){er(t)||(this.word("declare"),this.space()),dr.call(this,e)},DeclareTypeAlias:function(e){this.word("declare"),this.space(),pr.call(this,e)},DeclareVariable:function(e,t){er(t)||(this.word("declare"),this.space()),this.word("var"),this.space(),this.print(e.id),this.print(e.id.typeAnnotation),this.semicolon()},DeclaredPredicate:function(e){this.tokenChar(37),this.word("checks"),this.tokenChar(40),this.print(e.value),this.tokenChar(41)},Decorator:function(e){this.tokenChar(64);const{expression:t}=e;this.print(t),this.newline()},Directive:function(e){this.print(e.value),this.semicolon()},DirectiveLiteral:function(e){const t=this.getPossibleRaw(e);if(!this.format.minified&&void 0!==t)return void this.token(t);const{value:s}=e;if(Tr.test(s)){if(kr.test(s))throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.");this.token(`'${s}'`)}else this.token(`"${s}"`)},DoExpression:function(e){e.async&&(this.word("async",!0),this.space()),this.word("do"),this.space(),this.print(e.body)},DoWhileStatement:function(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()},EmptyStatement:function(){this.semicolon(!0)},EmptyTypeAnnotation:function(){this.word("empty")},EnumBooleanBody:function(e){const{explicitType:t}=e;sr(this,"boolean",t),ir(this,e)},EnumBooleanMember:function(e){nr(this,e)},EnumDeclaration:function(e){const{id:t,body:s}=e;this.word("enum"),this.space(),this.print(t),this.print(s)},EnumDefaultedMember:function(e){const{id:t}=e;this.print(t),this.tokenChar(44)},EnumNumberBody:function(e){const{explicitType:t}=e;sr(this,"number",t),ir(this,e)},EnumNumberMember:function(e){nr(this,e)},EnumStringBody:function(e){const{explicitType:t}=e;sr(this,"string",t),ir(this,e)},EnumStringMember:function(e){nr(this,e)},EnumSymbolBody:function(e){sr(this,"symbol",!0),ir(this,e)},ExistsTypeAnnotation:function(){this.tokenChar(42)},ExportAllDeclaration:qn,ExportDefaultDeclaration:function(e){$n(this,e),this.word("export"),this.noIndentInnerCommentsHere(),this.space(),this.word("default"),this.space(),this.tokenContext|=4;const t=e.declaration;this.print(t),jn(t)||this.semicolon()},ExportDefaultSpecifier:function(e){this.print(e.exported)},ExportNamedDeclaration:function(e){if($n(this,e),this.word("export"),this.space(),e.declaration){const t=e.declaration;this.print(t),jn(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());const t=e.specifiers.slice(0);let s=!1;for(;;){const e=t[0];if(!On(e)&&!Fn(e))break;s=!0,this.print(t.shift()),t.length&&(this.tokenChar(44),this.space())}let i=!1;(t.length||!t.length&&!s)&&(i=!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(),Un.call(this,e,i)):this.print(e.source)),this.semicolon()}},ExportNamespaceSpecifier:function(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.exported)},ExportSpecifier:function(e){"type"===e.exportKind&&(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))},ExpressionStatement:function(e){this.tokenContext|=1,this.print(e.expression),this.semicolon()},File:function(e){e.program&&this.print(e.program.interpreter),this.print(e.program)},ForInStatement:function(e){this.word("for"),this.space(),this.noIndentInnerCommentsHere(),this.tokenChar(40),this.tokenContext|=160,this.print(e.left),this.tokenContext=0,this.space(),this.word("in"),this.space(),this.print(e.right),this.tokenChar(41),this.printBlock(e.body)},ForOfStatement:function(e){this.word("for"),this.space(),e.await&&(this.word("await"),this.space()),this.noIndentInnerCommentsHere(),this.tokenChar(40),this.tokenContext|=64,this.print(e.left),this.space(),this.word("of"),this.space(),this.print(e.right),this.tokenChar(41),this.printBlock(e.body)},ForStatement:function(e){this.word("for"),this.space(),this.tokenChar(40),this.tokenContext|=144,this.print(e.init),this.tokenContext=0,this.tokenChar(59),e.test&&(this.space(),this.print(e.test)),this.tokenChar(59,1),e.update&&(this.space(),this.print(e.update)),this.tokenChar(41),this.printBlock(e.body)},FunctionDeclaration:kn,FunctionExpression:kn,FunctionTypeAnnotation:function(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);const s=t?.type;null!=s&&("ObjectTypeCallProperty"===s||"ObjectTypeInternalSlot"===s||"DeclareFunction"===s||"ObjectTypeProperty"===s&&t.method)?this.tokenChar(58):(this.space(),this.token("=>")),this.space(),this.print(e.returnType)},FunctionTypeParam:function(e){this.print(e.name),e.optional&&this.tokenChar(63),e.name&&(this.tokenChar(58),this.space()),this.print(e.typeAnnotation)},GenericTypeAnnotation:ar,Identifier:function(e){this._buf._map&&e.loc?.identifierName&&e.loc.identifierName!==e.name&&this.sourceIdentifierName(e.loc.identifierName),this.word(this.tokenMap?Kn:e.name)},IfStatement:function(e){this.word("if"),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.space();const t=e.alternate&&an(hn(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))},Import:function(){this.word("import")},ImportAttribute:function(e){this.print(e.key),this.tokenChar(58),this.space(),this.print(e.value)},ImportDeclaration:function(e){this.word("import"),this.space();const t="type"===e.importKind||"typeof"===e.importKind;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());const s=e.specifiers.slice(0),i=!!s.length;for(;i;){const e=s[0];if(!Rn(e)&&!Bn(e))break;this.print(s.shift()),s.length&&(this.tokenChar(44),this.space())}let n=!1;s.length?(n=!0,this.tokenChar(123),this.space(),this.printList(s,this.shouldPrintTrailingComma("}")),this.space(),this.tokenChar(125)):t&&!i&&(n=!0,this.tokenChar(123),this.tokenChar(125)),(i||t)&&(this.space(),this.word("from"),this.space()),e.attributes?.length?(this.print(e.source,!0),this.space(),Un.call(this,e,n)):this.print(e.source),this.semicolon()},ImportDefaultSpecifier:function(e){this.print(e.local)},ImportExpression:function(e){this.word("import"),e.phase&&(this.tokenChar(46),this.word(e.phase)),this.tokenChar(40);const t=this.shouldPrintTrailingComma(")");this.print(e.source),null!=e.options&&(this.tokenChar(44),this.space(),this.print(e.options)),t&&this.tokenChar(44),this.rightParens(e)},ImportNamespaceSpecifier:function(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.local)},ImportSpecifier:function(e){"type"!==e.importKind&&"typeof"!==e.importKind||(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))},IndexedAccessType:function(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)},InferredPredicate:function(){this.tokenChar(37),this.word("checks")},InterfaceDeclaration:hr,InterfaceExtends:ar,InterfaceTypeAnnotation:function(e){this.word("interface"),e.extends?.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends)),this.space(),this.print(e.body)},InterpreterDirective:function(e){this.token(`#!${e.value}`),this._newline()},IntersectionTypeAnnotation:function(e){this.printJoin(e.types,void 0,void 0,lr)},JSXAttribute:function(e){this.print(e.name),e.value&&(this.tokenChar(61),this.print(e.value))},JSXClosingElement:function(e){this.tokenChar(60),this.tokenChar(47),this.print(e.name),this.tokenChar(62)},JSXClosingFragment:function(){this.token("</"),this.tokenChar(62)},JSXElement:function(e){const t=e.openingElement;if(this.print(t),!t.selfClosing){this.indent();for(const t of e.children)this.print(t);this.dedent(),this.print(e.closingElement)}},JSXEmptyExpression:function(){this.printInnerComments()},JSXExpressionContainer:function(e){this.tokenChar(123),this.print(e.expression),this.rightBrace(e)},JSXFragment:function(e){this.print(e.openingFragment),this.indent();for(const t of e.children)this.print(t);this.dedent(),this.print(e.closingFragment)},JSXIdentifier:function(e){this.word(e.name)},JSXMemberExpression:function(e){this.print(e.object),this.tokenChar(46),this.print(e.property)},JSXNamespacedName:function(e){this.print(e.namespace),this.tokenChar(58),this.print(e.name)},JSXOpeningElement:function(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,br)),e.selfClosing&&(this.space(),this.tokenChar(47)),this.tokenChar(62)},JSXOpeningFragment:function(){this.tokenChar(60),this.tokenChar(62)},JSXSpreadAttribute:function(e){this.tokenChar(123),this.token("..."),this.print(e.argument),this.rightBrace(e)},JSXSpreadChild:function(e){this.tokenChar(123),this.token("..."),this.print(e.expression),this.rightBrace(e)},JSXText:function(e){const t=this.getPossibleRaw(e);void 0!==t?this.token(t,!0):this.token(e.value,!0)},LabeledStatement:function(e){this.print(e.label),this.tokenChar(58),this.space(),this.print(e.body)},LogicalExpression:nn,MemberExpression:function(e){if(this.print(e.object),!e.computed&&Qi(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");let t=e.computed;if(Yi(e.property)&&"number"==typeof e.property.value&&(t=!0),t){const t=this.enterDelimited();this.tokenChar(91),this.print(e.property,void 0,!0),this.tokenChar(93),this._noLineTerminatorAfterNode=t}else this.tokenChar(46),this.print(e.property)},MetaProperty:function(e){this.print(e.meta),this.tokenChar(46),this.print(e.property)},MixedTypeAnnotation:function(){this.word("mixed")},ModuleExpression:function(e){this.word("module",!0),this.space(),this.tokenChar(123),this.indent();const{body:t}=e;(t.body.length||t.directives.length)&&this.newline(),this.print(t),this.dedent(),this.rightBrace(e)},NewExpression:function(e,t){this.word("new"),this.space(),this.print(e.callee),(!this.format.minified||0!==e.arguments.length||Gi(t,{callee:e})||Qi(t)||Zi(t))&&(this.print(e.typeArguments),0===e.arguments.length&&this.tokenMap&&!this.tokenMap.endMatches(e,")")||tn.call(this,e))},NullLiteral:function(){this.word("null")},NullLiteralTypeAnnotation:function(){this.word("null")},NullableTypeAnnotation:function(e){this.tokenChar(63),this.print(e.typeAnnotation)},NumberLiteralTypeAnnotation:Gn,NumberTypeAnnotation:function(){this.word("number")},NumericLiteral:Gn,ObjectExpression:Wn,ObjectMethod:function(e){this.printJoin(e.decorators),yn.call(this,e),this.space(),this.print(e.body)},ObjectPattern:Wn,ObjectProperty:function(e){if(this.printJoin(e.decorators),e.computed)this.tokenChar(91),this.print(e.key),this.tokenChar(93);else{if(Vn(e.value)&&Hn(e.key)&&e.key.name===e.value.left.name)return void this.print(e.value);if(this.print(e.key),e.shorthand&&Hn(e.key)&&Hn(e.value)&&e.key.name===e.value.name)return}this.tokenChar(58),this.space(),this.print(e.value)},ObjectTypeAnnotation:function(e){e.exact?this.token("{|"):this.tokenChar(123);const t=[...e.properties,...e.callProperties||[],...e.indexers||[],...e.internalSlots||[]];t.length&&(this.newline(),this.space(),this.printJoin(t,!0,!0,()=>{(1!==t.length||e.inexact)&&(this.tokenChar(44),this.space())},!0),this.space()),e.inexact&&(this.indent(),this.token("..."),t.length&&this.newline(),this.dedent()),e.exact?this.token("|}"):this.tokenChar(125)},ObjectTypeCallProperty:function(e){e.static&&(this.word("static"),this.space()),this.print(e.value)},ObjectTypeIndexer:function(e){e.static&&(this.word("static"),this.space()),cr.call(this,e),this.tokenChar(91),e.id&&(this.print(e.id),this.tokenChar(58),this.space()),this.print(e.key),this.tokenChar(93),this.tokenChar(58),this.space(),this.print(e.value)},ObjectTypeInternalSlot:function(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)},ObjectTypeProperty:function(e){e.proto&&(this.word("proto"),this.space()),e.static&&(this.word("static"),this.space()),"get"!==e.kind&&"set"!==e.kind||(this.word(e.kind),this.space()),cr.call(this,e),this.print(e.key),e.optional&&this.tokenChar(63),e.method||(this.tokenChar(58),this.space()),this.print(e.value)},ObjectTypeSpreadProperty:function(e){this.token("..."),this.print(e.argument)},OpaqueType:dr,OptionalCallExpression:function(e){this.print(e.callee),e.optional&&this.token("?."),this.print(e.typeArguments),tn.call(this,e)},OptionalIndexedAccessType:function(e){this.print(e.objectType),e.optional&&this.token("?."),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)},OptionalMemberExpression:function(e){let{computed:t}=e;const{optional:s,property:i}=e;if(this.print(e.object),!t&&Qi(i))throw new TypeError("Got a MemberExpression for MemberExpression property");Yi(i)&&"number"==typeof i.value&&(t=!0),s&&this.token("?."),t?(this.tokenChar(91),this.print(i),this.tokenChar(93)):(s||this.tokenChar(46),this.print(i))},ParenthesizedExpression:function(e){this.tokenChar(40);const t=this.enterDelimited();this.print(e.expression,void 0,!0),this._noLineTerminatorAfterNode=t,this.rightParens(e)},Placeholder:function(e){this.token("%%"),this.print(e.name),this.token("%%"),"Statement"===e.expectedNode&&this.semicolon()},PrivateName:function(e){this.tokenChar(35),this.print(e.id)},Program:function(e){this.printInnerComments(!1);const t=e.directives?.length;if(t){const s=e.body.length?2:1;this.printSequence(e.directives,void 0,void 0,s),e.directives[t-1].trailingComments?.length||this.newline(s)}this.printSequence(e.body)},QualifiedTypeIdentifier:function(e){this.print(e.qualification),this.tokenChar(46),this.print(e.id)},RegExpLiteral:function(e){this.word(`/${e.pattern}/${e.flags}`,!1)},RestElement:Jn,ReturnStatement:function(e){this.word("return"),ln(this,e.argument)},SequenceExpression:function(e){this.printList(e.expressions)},SpreadElement:Jn,StaticBlock:function(e){this.word("static"),this.space(),this.tokenChar(123),0===e.body.length?this.tokenChar(125):(this.newline(),this.printSequence(e.body,!0),this.rightBrace(e))},StringLiteral:Yn,StringLiteralTypeAnnotation:Yn,StringTypeAnnotation:function(){this.word("string")},Super:function(){this.word("super")},SwitchCase:function(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))},SwitchStatement:function(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)},SymbolTypeAnnotation:function(){this.word("symbol")},TSAnyKeyword:function(){this.word("any")},TSArrayType:function(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)},TSAsExpression:function(e){const{expression:t,typeAnnotation:s}=e;this.print(t,!0),this.space(),this.word("as"),this.space(),this.print(s)},TSBigIntKeyword:function(){this.word("bigint")},TSBooleanKeyword:function(){this.word("boolean")},TSCallSignatureDeclaration:function(e){_n.call(this,e),vn(this,e)},TSClassImplements:In,TSConditionalType:function(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)},TSConstructSignatureDeclaration:function(e){this.word("new"),this.space(),_n.call(this,e),vn(this,e)},TSConstructorType:function(e){e.abstract&&(this.word("abstract"),this.space()),this.word("new"),this.space(),Pn.call(this,e)},TSDeclareFunction:function(e,t){e.declare&&(this.word("declare"),this.space()),gn.call(this,e,t,!1),this.semicolon()},TSDeclareMethod:function(e){gr.call(this,e,!1),this.semicolon()},TSEnumBody:function(e){Ln(this,e,()=>this.printList(e.members,this.shouldPrintTrailingComma("}")??!1,!0,!0,void 0,!0))},TSEnumDeclaration:function(e){const{declare:t,const:s,id:i}=e;t&&(this.word("declare"),this.space()),s&&(this.word("const"),this.space()),this.word("enum"),this.space(),this.print(i),this.space(),this.print(e.body)},TSEnumMember:function(e){const{id:t,initializer:s}=e;this.print(t),s&&(this.space(),this.tokenChar(61),this.space(),this.print(s))},TSExportAssignment:function(e){this.word("export"),this.space(),this.tokenChar(61),this.space(),this.print(e.expression),this.semicolon()},TSExternalModuleReference:function(e){this.token("require("),this.print(e.expression),this.tokenChar(41)},TSFunctionType:function(e){Pn.call(this,e)},TSImportEqualsDeclaration:function(e){const{id:t,moduleReference:s}=e;this.word("import"),this.space(),this.print(t),this.space(),this.tokenChar(61),this.space(),this.print(s),this.semicolon()},TSImportType:function(e){const{qualifier:t,options:s}=e;this.word("import"),this.tokenChar(40),this.print(e.source),s&&(this.tokenChar(44),this.print(s)),this.tokenChar(41),t&&(this.tokenChar(46),this.print(t));const i=e.typeArguments;i&&this.print(i)},TSIndexSignature:function(e){const{readonly:t,static:s}=e;s&&(this.word("static"),this.space()),t&&(this.word("readonly"),this.space()),this.tokenChar(91),fn.call(this,e.parameters,93),this.print(e.typeAnnotation),vn(this,e)},TSIndexedAccessType:function(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)},TSInferType:function(e){this.word("infer"),this.print(e.typeParameter)},TSInstantiationExpression:function(e){this.print(e.expression),this.print(e.typeArguments)},TSInterfaceBody:function(e){Ln(this,e,()=>this.printJoin(e.body,!0,!0,void 0,void 0,!0))},TSInterfaceDeclaration:function(e){const{declare:t,id:s,typeParameters:i,extends:n,body:r}=e;t&&(this.word("declare"),this.space()),this.word("interface"),this.space(),this.print(s),this.print(i),n?.length&&(this.space(),this.word("extends"),this.space(),this.printList(n)),this.space(),this.print(r)},TSInterfaceHeritage:In,TSIntersectionType:function(e){En(this,e,"&")},TSIntrinsicKeyword:function(){this.word("intrinsic")},TSLiteralType:function(e){this.print(e.literal)},TSMappedType:function(e){const{nameType:t,optional:s,readonly:i,typeAnnotation:n}=e;this.tokenChar(123);const r=this.enterDelimited();this.space(),i&&(An(this,i),this.word("readonly"),this.space()),this.tokenChar(91),this.word(e.key.name),this.space(),this.word("in"),this.space(),this.print(e.constraint),t&&(this.space(),this.word("as"),this.space(),this.print(t,void 0,!0)),this.tokenChar(93),s&&(An(this,s),this.tokenChar(63)),n&&(this.tokenChar(58),this.space(),this.print(n,void 0,!0)),this.space(),this._noLineTerminatorAfterNode=r,this.tokenChar(125)},TSMethodSignature:function(e){const{kind:t}=e;"set"!==t&&"get"!==t||(this.word(t),this.space()),Cn.call(this,e),_n.call(this,e),vn(this,e)},TSModuleBlock:function(e){Ln(this,e,()=>this.printSequence(e.body,!0,!0))},TSModuleDeclaration:function(e){const{declare:t,kind:s}=e;t&&(this.word("declare"),this.space()),"global"!==s&&(this.word(s),this.space()),this.print(e.id),e.body?(this.space(),this.print(e.body)):this.semicolon()},TSNamedTupleMember:function(e){this.print(e.label),e.optional&&this.tokenChar(63),this.tokenChar(58),this.space(),this.print(e.elementType)},TSNamespaceExportDeclaration:function(e){this.word("export"),this.space(),this.word("as"),this.space(),this.word("namespace"),this.space(),this.print(e.id),this.semicolon()},TSNeverKeyword:function(){this.word("never")},TSNonNullExpression:function(e){this.print(e.expression),this.tokenChar(33),this.setLastChar(33)},TSNullKeyword:function(){this.word("null")},TSNumberKeyword:function(){this.word("number")},TSObjectKeyword:function(){this.word("object")},TSOptionalType:function(e){this.print(e.typeAnnotation),this.tokenChar(63)},TSParameterProperty:function(e){e.accessibility&&(this.word(e.accessibility),this.space()),e.readonly&&(this.word("readonly"),this.space()),mn.call(this,e.parameter)},TSParenthesizedType:function(e){this.tokenChar(40),this.print(e.typeAnnotation),this.tokenChar(41)},TSPropertySignature:function(e){const{readonly:t}=e;t&&(this.word("readonly"),this.space()),Cn.call(this,e),this.print(e.typeAnnotation),vn(this,e)},TSQualifiedName:function(e){this.print(e.left),this.tokenChar(46),this.print(e.right)},TSRestType:function(e){this.token("..."),this.print(e.typeAnnotation)},TSSatisfiesExpression:function(e){const{expression:t,typeAnnotation:s}=e;this.print(t,!0),this.space(),this.word("satisfies"),this.space(),this.print(s)},TSStringKeyword:function(){this.word("string")},TSSymbolKeyword:function(){this.word("symbol")},TSTemplateLiteralType:function(e){Xi.call(this,e,e.types)},TSThisType:function(){this.word("this")},TSTupleType:function(e){this.tokenChar(91),this.printList(e.elementTypes,this.shouldPrintTrailingComma("]")),this.tokenChar(93)},TSTypeAliasDeclaration:function(e){const{declare:t,id:s,typeParameters:i,typeAnnotation:n}=e;t&&(this.word("declare"),this.space()),this.word("type"),this.space(),this.print(s),this.print(i),this.space(),this.tokenChar(61),this.space(),this.print(n),this.semicolon()},TSTypeAnnotation:function(e,t){this.token("TSFunctionType"!==t.type&&"TSConstructorType"!==t.type||t.returnType!==e?":":"=>"),this.space(),e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)},TSTypeAssertion:function(e){const{typeAnnotation:t,expression:s}=e;this.tokenChar(60),this.print(t),this.tokenChar(62),this.space(),this.print(s)},TSTypeLiteral:function(e){Ln(this,e,()=>this.printJoin(e.members,!0,!0,void 0,void 0,!0))},TSTypeOperator:function(e){this.word(e.operator),this.space(),this.print(e.typeAnnotation)},TSTypeParameter:function(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))},TSTypeParameterDeclaration:wn,TSTypeParameterInstantiation:wn,TSTypePredicate:function(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))},TSTypeQuery:function(e){this.word("typeof"),this.space(),this.print(e.exprName);const t=e.typeArguments;t&&this.print(t)},TSTypeReference:function(e){const t=e.typeArguments;this.print(e.typeName,!!t),this.print(t)},TSUndefinedKeyword:function(){this.word("undefined")},TSUnionType:function(e){En(this,e,"|")},TSUnknownKeyword:function(){this.word("unknown")},TSVoidKeyword:function(){this.word("void")},TaggedTemplateExpression:function(e){this.print(e.tag),this.print(e.typeArguments),this.print(e.quasi)},TemplateElement:function(){throw new Error("TemplateElement printing is handled in TemplateLiteral")},TemplateLiteral:function(e){Xi.call(this,e,e.expressions)},ThisExpression:function(){this.word("this")},ThisTypeAnnotation:function(){this.word("this")},ThrowStatement:function(e){this.word("throw"),ln(this,e.argument)},TopicReference:function(){const{topicToken:e}=this.format;if(!Zn.has(e)){const t=JSON.stringify(e),s=Array.from(Zn,e=>JSON.stringify(e));throw new Error(`The "topicToken" generator option must be one of ${s.join(", ")} (${t} received instead).`)}this.token(e)},TryStatement:function(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))},TupleTypeAnnotation:function(e){this.tokenChar(91),this.printList(e.types),this.tokenChar(93)},TypeAlias:pr,TypeAnnotation:function(e,t){this.tokenChar(58),this.space(),"ArrowFunctionExpression"===t.type?this.tokenContext|=8:e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)},TypeCastExpression:function(e){this.tokenChar(40),this.print(e.expression),this.print(e.typeAnnotation),this.tokenChar(41)},TypeParameter:function(e){cr.call(this,e),this.word(e.name),e.bound&&this.print(e.bound),e.default&&(this.space(),this.tokenChar(61),this.space(),this.print(e.default))},TypeParameterDeclaration:ur,TypeParameterInstantiation:ur,TypeofTypeAnnotation:function(e){this.word("typeof"),this.space(),this.print(e.argument)},UnaryExpression:function(e){const{operator:t}=e,s=t.charCodeAt(0);s>=97&&s<=122?(this.word(t),this.space()):this.tokenChar(s),this.print(e.argument)},UnionTypeAnnotation:function(e){this.printJoin(e.types,void 0,void 0,fr)},UpdateExpression:function(e){e.prefix?(this.token(e.operator,!1,0,!0),this.print(e.argument)):(this.print(e.argument,!0),this.token(e.operator,!1,0,!0))},V8IntrinsicIdentifier:function(e){this.tokenChar(37),this.word(e.name)},VariableDeclaration:function(e,t){e.declare&&(this.word("declare"),this.space());const{kind:s}=e;switch(s){case"await using":this.word("await"),this.space();case"using":this.word("using",!0);break;default:this.word(s)}this.space();let i=!1;if(!rn(t))for(const t of e.declarations)if(t.init){i=!0;break}if(this.printList(e.declarations,void 0,void 0,e.declarations.length>1,i?pn:void 0),null!=t)switch(t.type){case"ForStatement":if(t.init===e)return;break;case"ForInStatement":case"ForOfStatement":if(t.left===e)return}this.semicolon()},VariableDeclarator:function(e){this.print(e.id),e.definite&&this.tokenChar(33),cn(e.id)||this.print(e.id.typeAnnotation),e.init&&(this.space(),this.tokenChar(61),this.space(),this.print(e.init))},Variance:function(e){"plus"===e.kind?this.tokenChar(43):this.tokenChar(45)},VoidPattern:function(){this.word("void")},VoidTypeAnnotation:function(){this.word("void")},WhileStatement:function(e){this.word("while"),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.printBlock(e.body)},WithStatement:function(e){this.word("with"),this.space(),this.tokenChar(40),this.print(e.object),this.tokenChar(41),this.printBlock(e.body)},YieldExpression:function(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")},_classMethodHead:gr,_functionHead:gn,_getRawIdentifier:zn,_interfaceish:or,_methodHead:yn,_param:mn,_parameters:fn,_params:dn,_predicate:xn,_printAttributes:Un,_printTemplate:Xi,_shouldPrintArrowParamsParens:Tn,_shouldPrintDecoratorsBeforeExport:sn,_tsPrintClassMemberModifiers:Nn,_variance:cr},Symbol.toStringTag,{value:"Module"}),wr=new Map;let vr=0;for(const e of Object.keys(Sr).sort())e.startsWith("_")||wr.set(e,[Sr[e],vr++,void 0]);const{VISITOR_KEYS:Cr}=hi;for(const e of Object.keys(Wi)){const t=Wi[e];wr.has(e)&&(wr.get(e)[2]=t)}function Pr(e){switch(e.type){case"Identifier":return!0;case"MemberExpression":return!e.computed&&"Identifier"===e.property.type&&Pr(e.object);default:return!1}}const{traverseFast:Er,VISITOR_KEYS:Ar}=hi;class Ir{_tokens;_source;_nodesToTokenIndexes=new Map;_nodesOccurrencesCountCache=new Map;_tokensCache=new Map;constructor(e,t,s){this._tokens=t,this._source=s,Er(e,e=>{const 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){const s=this._nodesToTokenIndexes.get(e);if(s)for(let e=0;e<s.length;e++){const i=s[e],n=this._tokens[i];if(t(n,i))return n}return null}findLastIndex(e,t){const s=this._nodesToTokenIndexes.get(e);if(s)for(let e=s.length-1;e>=0;e--){const i=s[e];if(t(this._tokens[i],i))return i}return-1}findMatching(e,t,s=0){const i=this._nodesToTokenIndexes.get(e);if(i){"number"==typeof t&&(t=String.fromCharCode(t));let n=0;const r=s;if(r>1){const i=this._nodesOccurrencesCountCache.get(e);i?.test===t&&i.count<r&&(n=i.i+1,s-=i.count+1)}for(;n<i.length;n++){const a=this._tokens[i[n]];if(this.matchesOriginal(a,t)){if(0===s)return r>0&&this._nodesOccurrencesCountCache.set(e,{test:t,count:r,i:n}),a;s--}}}return null}matchesOriginal(e,t){return e.end-e.start===t.length&&(null!=e.value?e.value===t:this._source.startsWith(t,e.start))}startMatches(e,t){const s=this._nodesToTokenIndexes.get(e);if(!s)return!1;const i=this._tokens[s[0]];return i.start===e.start&&this.matchesOriginal(i,t)}endMatches(e,t){const s=this._nodesToTokenIndexes.get(e);if(!s)return!1;const i=this._tokens[s[s.length-1]];return i.end===e.end&&this.matchesOriginal(i,t)}_getTokensIndexesOfNode(e){if(null==e.start||null==e.end)return[];const{first:t,last:s}=this._findTokensOfNode(e,0,this._tokens.length-1);let i=t;const n=function*(e){if("TemplateLiteral"===e.type){yield e.quasis[0];for(let t=1;t<e.quasis.length;t++)yield e.expressions[t-1],yield e.quasis[t];return}const t=Ar[e.type];for(const s of t){const t=e[s];t&&(Array.isArray(t)?yield*t:yield t)}}(e);"ExportNamedDeclaration"!==e.type&&"ExportDefaultDeclaration"!==e.type||"ClassDeclaration"!==e.declaration?.type||n.next();const r=[];for(const e of n){if(null==e)continue;if(null==e.start||null==e.end)continue;const t=this._findTokensOfNode(e,i,s),n=t.first;for(let e=i;e<n;e++)r.push(e);i=t.last+1}for(let e=i;e<=s;e++)r.push(e);return r}_findTokensOfNode(e,t,s){const i=this._tokensCache.get(e);if(i)return i;const n=this._findFirstTokenOfNode(e.start,t,s),r=this._findLastTokenOfNode(e.end,n,s);return this._tokensCache.set(e,{first:n,last:r}),{first:n,last:r}}_findFirstTokenOfNode(e,t,s){for(;t<=s;){const i=s+t>>1;if(e<this._tokens[i].start)s=i-1;else{if(!(e>this._tokens[i].start))return i;t=i+1}}return t}_findLastTokenOfNode(e,t,s){for(;t<=s;){const i=s+t>>1;if(e<this._tokens[i].end)s=i-1;else{if(!(e>this._tokens[i].end))return i;t=i+1}}return s}}const{isExpression:_r,isFunction:Nr,isStatement:Lr,isClassBody:Dr,isTSInterfaceBody:Mr,isTSEnumMember:Or}=hi,Fr=/e/i,Rr=/\.0+$/,Br=/[\n\r\u2028\u2029]/,jr=/[\n\r\u2028\u2029]|\*\//;function Ur(e){return"CommentLine"===e.type||Br.test(e.value)}class qr{constructor(e,t,s=null,i=null){this.format=e,this._tokens=s,this._originalCode=i,this._indentRepeat=e.indent.style.length,this._inputMap=t?._inputMap||null,this._buf=new Ai(t,e.indent.style[0]);const{preserveFormat:n,compact:r,concise:a,retainLines:o,retainFunctionParens:c}=e;n&&(this._flags|=1),r&&(this._flags|=2),a&&(this._flags|=4),o&&(this._flags|=8),c&&(this._flags|=16),(e.auxiliaryCommentBefore||e.auxiliaryCommentAfter)&&(this._flags|=32)}enterDelimited(){const e=this._noLineTerminatorAfterNode;return null!==e&&(this._noLineTerminatorAfterNode=null),e}tokenContext=0;_tokens=null;_originalCode=null;_currentNode=null;_currentTypeId=null;_indent=0;_indentRepeat=0;_insideAux=!1;_noLineTerminator=!1;_noLineTerminatorAfterNode=null;_printAuxAfterOnNextUserNode=!1;_printedComments=new Set;_lastCommentLine=0;_innerCommentsState=0;_flags=0;tokenMap=null;_boundGetRawIdentifier=null;generate(e){return this.format.preserveFormat&&(this.tokenMap=new Ir(e,this._tokens,this._originalCode),this._boundGetRawIdentifier=zn.bind(this)),this.print(e),this._maybeAddAuxComment(),this._buf.get()}indent(e=this._flags){7&e||(this._indent+=this._indentRepeat)}dedent(e=this._flags){7&e||(this._indent-=this._indentRepeat)}_printSemicolonBeforeNextNode=-1;_printSemicolonBeforeNextToken=-1;semicolon(e=!1){const t=this._flags;if(32&t&&this._maybeAddAuxComment(),1&t){const e=this._currentNode;if(null!=e.start&&null!=e.end){if(!this.tokenMap.endMatches(e,";"))return void(this._printSemicolonBeforeNextNode=this._buf.getCurrentLine());const t=this.tokenMap.getIndexes(this._currentNode);this._catchUpTo(this._tokens[t[t.length-1]].loc.start)}}e?this._appendChar(59):this._queue(59),this._noLineTerminator=!1}rightBrace(e){this.format.minified&&this._buf.removeLastSemicolon(),this.sourceWithOffset("end",e.loc,-1),this.tokenChar(125)}rightParens(e){this.sourceWithOffset("end",e.loc,-1),this.tokenChar(41)}space(e=!1){if(!(3&this._flags))if(e)this._space();else{const e=this.getLastChar(!0);0!==e&&32!==e&&10!==e&&this._space()}}word(e,t=!1){this.tokenContext&=128,this._maybePrintInnerComments(e);const s=this._flags;32&s&&this._maybeAddAuxComment(),1&s&&this._catchUpToCurrentToken(e);const i=this.getLastChar();(-2===i||-3===i||47===i&&47===e.charCodeAt(0))&&this._space(),this._append(e,!1),this.setLastChar(-3),this._noLineTerminator=t}number(e,t){this.word(e),!Number.isInteger(t)||function(e){if(e.length>2&&48===e.charCodeAt(0)){const t=e.charCodeAt(1);return 98===t||111===t||120===t}return!1}(e)||Fr.test(e)||Rr.test(e)||46===e.charCodeAt(e.length-1)||this.setLastChar(-2)}token(e,t=!1,s=0,i=!1){this.tokenContext&=128,this._maybePrintInnerComments(e,s);const n=this._flags;if(32&n&&this._maybeAddAuxComment(),1&n&&this._catchUpToCurrentToken(e,s),i){const t=e.charCodeAt(0);((45===t&&"--"===e||61===t)&&33===this.getLastChar()||43===t&&43===this.getLastChar()||45===t&&45===this.getLastChar()||46===t&&-2===this.getLastChar())&&this._space()}this._append(e,t),this._noLineTerminator=!1}tokenChar(e,t=0){this.tokenContext&=128,this._maybePrintInnerComments(e,t);const s=this._flags;32&s&&this._maybeAddAuxComment(),1&s&&this._catchUpToCurrentToken(e,t),(43===e&&43===this.getLastChar()||45===e&&45===this.getLastChar()||46===e&&-2===this.getLastChar())&&this._space(),this._appendChar(e),this._noLineTerminator=!1}newline(e=1,t=this._flags){if(!(e<=0||10&t))if(4&t)this.space();else{e>2&&(e=2),e-=this._buf.getNewlineCount();for(let t=0;t<e;t++)this._newline()}}endsWith(e){return this.getLastChar(!0)===e}getLastChar(e){return this._buf.getLastChar(e)}setLastChar(e){this._buf._last=e}exactSource(e,t){e?(this._catchUp("start",e),this._buf.exactSource(e,t)):t()}source(e,t){t&&(this._catchUp(e,t),this._buf.source(e,t))}sourceWithOffset(e,t,s){t&&!this.format.preserveFormat&&(this._catchUp(e,t),this._buf.sourceWithOffset(e,t,s))}sourceIdentifierName(e,t){if(!this._buf._canMarkIdName)return;const s=this._buf._sourcePosition;s.identifierNamePos=t,s.identifierName=e}_space(){this._queue(32)}_newline(){32===this._buf._queuedChar&&(this._buf._queuedChar=0),this._appendChar(10,!0)}_catchUpToCurrentToken(e,t=0){const s=this.tokenMap.findMatching(this._currentNode,e,t);s&&this._catchUpTo(s.loc.start),-1!==this._printSemicolonBeforeNextToken&&this._printSemicolonBeforeNextToken===this._buf.getCurrentLine()&&this._appendChar(59,!0),this._printSemicolonBeforeNextToken=-1,this._printSemicolonBeforeNextNode=-1}_append(e,t){this._maybeIndent(),this._buf.append(e,t)}_appendChar(e,t){t||this._maybeIndent(),this._buf.appendChar(e)}_queue(e){this._buf.queue(e),this.setLastChar(-1)}_maybeIndent(){const e=this._shouldIndent();e>0&&this._buf._appendChar(-1,e,!1)}_shouldIndent(){return this.endsWith(10)?this._indent:0}catchUp(e){if(!this.format.retainLines)return;const t=e-this._buf.getCurrentLine();for(let e=0;e<t;e++)this._newline()}_catchUp(e,t){const s=this._flags;if(!(1&s))return void(8&s&&t?.[e]&&this.catchUp(t[e].line));const i=t?.[e];null!=i&&this._catchUpTo(i)}_catchUpTo({line:e,column:t,index:s}){const i=e-this._buf.getCurrentLine();if(i>0&&this._noLineTerminator)return;for(let e=0;e<i;e++)this._newline();const n=i>0?t:t-this._buf.getCurrentColumn();if(n>0){const i=this._originalCode?this._originalCode.slice(s-n,s).replace(/[^\t\v\f\uFEFF\p{Space_Separator}]/gu," "):" ".repeat(n);this._buf.append(i,!1,!0),this._buf.setSourcePosition(e,t),this.setLastChar(32)}}printTerminatorless(e){this._noLineTerminator=!0,this.print(e)}print(e,t=!1,s=!1,i){if(!e)return;this._innerCommentsState=0;const{type:n,loc:r,extra:a}=e,o=this._flags;let c=!1;e._compact&&(this._flags|=4,c=!0);const h=wr.get(n);if(void 0===h)throw new ReferenceError(`unknown node of type ${JSON.stringify(n)} with constructor ${JSON.stringify(e.constructor.name)}`);const[l,p,u]=h,d=this._currentNode,f=this._currentTypeId;let m;this._currentNode=e,this._currentTypeId=p,1&o&&(this._printSemicolonBeforeNextToken=this._printSemicolonBeforeNextNode),32&o&&(m=this._insideAux,this._insideAux=null==r,this._maybeAddAuxComment(this._insideAux&&!m));let y=0;s&&(y=this.tokenContext,128&y?this.tokenContext=0:y=0);const x=null!=a&&a.parenthesized;let g=x&&1&o||x&&16&o&&72===p||d&&(function(e,t,s){switch(s){case 113:if(t.callee===e)return function(e){let t=e;for(;;)switch(t.type){case"CallExpression":case"ImportExpression":case"OptionalCallExpression":case"OptionalMemberExpression":return!0;case"MemberExpression":t=t.object;break;case"TaggedTemplateExpression":t=t.tag;break;case"TSInstantiationExpression":case"TSNonNullExpression":t=t.expression;break;default:return!1}}(e);break;case 220:if(t.tag===e)return function(e){let t=e;for(;;)switch(t.type){case"OptionalCallExpression":case"OptionalMemberExpression":return!0;case"TSInstantiationExpression":case"TSNonNullExpression":t=t.expression;break;default:return!1}}(e);break;case 43:return!(Pr(e)||"CallExpression"===e.type&&Pr(e.callee)||"ParenthesizedExpression"===e.type)}return!1}(e,d,f)||null!=u&&u(e,d,f,this.tokenContext,1&o?this._boundGetRawIdentifier:void 0));if(!g&&x&&e.leadingComments?.length&&"CommentBlock"===e.leadingComments[0].type)switch(f){case 66:case 241:case 6:case 141:break;case 18:case 131:case 113:if(d.callee!==e)break;default:g=!0}let k,T=!1;!g&&this._noLineTerminator&&(e.leadingComments?.some(Ur)||8&o&&r&&r.start.line>this._buf.getCurrentLine())&&(g=!0,T=!0),g||(t||=!!d&&this._noLineTerminatorAfterNode===d&&function(e,t){const s=Cr[e.type];for(let i=s.length-1;i>=0;i--){const n=e[s[i]];if(n===t)return!0;if(Array.isArray(n)){let e=n.length-1;for(;e>=0&&null===n[e];)e--;return e>=0&&n[e]===t}if(n)return!1}return!1}(d,e),t&&(e.trailingComments?.some(Ur)?_r(e)&&(g=!0):(k=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=e))),g&&(this.tokenChar(40),T&&this.indent(),this._innerCommentsState=0,s||(y=this.tokenContext),128&y&&(this.tokenContext=0),k=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=null),this._printLeadingComments(e,d),this.exactSource(137===p||67===p?null:r,l.bind(this,e,d)),g?(this._printTrailingComments(e,d),T&&(this.dedent(),this.newline()),this.tokenChar(41),this._noLineTerminator=t):t&&!this._noLineTerminator?(this._noLineTerminator=!0,this._printTrailingComments(e,d)):this._printTrailingComments(e,d,i),y&&(this.tokenContext=y),this._currentNode=d,this._currentTypeId=f,c&&(this._flags=o),32&o&&(this._insideAux=m),null!=k&&(this._noLineTerminatorAfterNode=k),this._innerCommentsState=0}_maybeAddAuxComment(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!0;const e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:"CommentBlock",value:e},0)}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!1;const e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:"CommentBlock",value:e},0)}getPossibleRaw(e){const t=e.extra;if(null!=t?.raw&&null!=t.rawValue&&e.value===t.rawValue)return t.raw}printJoin(e,t,s,i,n,r,a){if(!e?.length)return;const o=this._flags;if(null==s&&8&o){const t=e[0].loc?.start.line;null!=t&&t!==this._buf.getCurrentLine()&&(s=!0)}s&&this.indent(o);const c=e.length;for(let s=0;s<c;s++){const h=e[s];if(h&&(t&&0===s&&this._buf.hasContent()&&this.newline(1,o),this.print(h,!1,r,a||0),null!=i&&(s<c-1?i.call(this,s,!1):n&&i.call(this,s,!0)),t))if(s+1===c)this.newline(1,o);else{const t=this._lastCommentLine;if(t>0){const i=(e[s+1].loc?.start.line||0)-t;if(i>=0){this.newline(i||1,o);continue}}this.newline(1,o)}}s&&this.dedent(o)}printAndIndentOnComments(e){const t=e.leadingComments&&e.leadingComments.length>0;t&&this.indent(),this.print(e),t&&this.dedent()}printBlock(e){"EmptyStatement"!==e.type&&this.space(),this.print(e)}_printTrailingComments(e,t,s){const{innerComments:i,trailingComments:n}=e;i?.length&&this._printComments(2,i,e,t,s),n?.length?this._printComments(2,n,e,t,s):this._lastCommentLine=0}_printLeadingComments(e,t){const s=e.leadingComments;s?.length&&this._printComments(0,s,e,t)}_maybePrintInnerComments(e,t){const s=this._innerCommentsState;switch(3&s){case 0:return void(this._innerCommentsState=5);case 1:this.printInnerComments((4&s)>0,this.tokenMap?.findMatching(this._currentNode,e,t))}}printInnerComments(e=!0,t){const s=this._currentNode,i=s.innerComments;if(!i?.length)return void(this._innerCommentsState=2);const n=this.endsWith(32);switch(e&&this.indent(),this._printComments(1,i,s,void 0,void 0,t)){case 2:this._innerCommentsState=2;case 1:n&&this.space()}e&&this.dedent()}noIndentInnerCommentsHere(){this._innerCommentsState&=-5}printSequence(e,t,s,i){this.printJoin(e,!0,t??!1,void 0,void 0,s,i)}printList(e,t,s,i,n,r){this.printJoin(e,s,i,n??$r,t,r)}shouldPrintTrailingComma(e){if(!this.tokenMap)return null;const t=this.tokenMap.findLastIndex(this._currentNode,t=>this.tokenMap.matchesOriginal(t,"number"==typeof e?String.fromCharCode(e):e));return t<=0?null:this.tokenMap.matchesOriginal(this._tokens[t-1],",")}_shouldPrintComment(e,t){if(e.ignore)return 0;if(this._printedComments.has(e))return 0;if(this._noLineTerminator&&jr.test(e.value))return 2;if(t&&this.tokenMap){const s=this.tokenMap.find(this._currentNode,t=>t.value===e.value);if(s&&s.start>t.start)return 2}return this._printedComments.add(e),this.format.shouldPrintComment(e.value)?1:0}_printComment(e,t){const s=this._noLineTerminator,i="CommentBlock"===e.type,n=i&&1!==t&&!s;switch(n&&this._buf.hasContent()&&2!==t&&this.newline(1),this.getLastChar(!0)){case 47:this._space();case 91:case 123:case 40:break;default:this.space()}let r;if(i){if(r=`/*${e.value}*/`,this.format.indent.adjustMultilineComment){const t=e.loc?.start.column;if(t){const e=new RegExp("\\n\\s{1,"+t+"}","g");r=r.replace(e,"\n")}if(4&this._flags)r=r.replace(/\n(?!$)/g,"\n");else{let e=this.format.retainLines?0:this._buf.getCurrentColumn();(this._shouldIndent()||this.format.retainLines)&&(e+=this._indent),r=r.replace(/\n(?!$)/g,`\n${" ".repeat(e)}`)}}}else r=s?`/*${e.value}*/`:`//${e.value}`;this.source("start",e.loc),this._append(r,i),i||s||this._newline(),n&&3!==t&&this.newline(1)}_printComments(e,t,s,i,n=0,r){const a=s.loc,o=t.length;let c=!!a;const h=c?a.start.line:0,l=c?a.end.line:0;let p=0,u=0;const{_noLineTerminator:d,_flags:f}=this;for(let a=0;a<o;a++){const m=t[a],y=this._shouldPrintComment(m,r);if(2===y)return 0===a?0:1;if(c&&m.loc&&1===y){const t=m.loc.start.line,s=m.loc.end.line;if(0===e){let e=0;if(0===a?!this._buf.hasContent()||"CommentLine"!==m.type&&t===s||(e=u=1):e=t-p,p=s,e>0&&!d&&this.newline(e,f),this._printComment(m,1),a+1===o){const e=Math.max(h-p,u);e>0&&!d&&this.newline(e,f),p=h}}else if(1===e){const e=t-(0===a?h:p);if(p=s,e>0&&!d&&this.newline(e,f),this._printComment(m,1),a+1===o){const e=Math.min(1,l-p);e>0&&!d&&this.newline(e,f),p=l}}else{const e=t-(0===a?l-n:p);p=s,e>0&&!d&&this.newline(e,f),this._printComment(m,1)}}else{if(c=!1,1!==y)continue;if(1===o){const t=m.loc?m.loc.start.line===m.loc.end.line:!Br.test(m.value),n=t&&!Lr(s)&&!Dr(i)&&!Mr(i)&&!Or(s);0===e?this._printComment(m,n&&"ObjectExpression"!==s.type||t&&Nr(i)&&i.body===s?1:0):n&&2===e?this._printComment(m,1):this._printComment(m,0)}else 1!==e||"ObjectExpression"===s.type&&s.properties.length>1||"ClassBody"===s.type||"TSInterfaceBody"===s.type?this._printComment(m,0):this._printComment(m,0===a?2:a===o-1?3:0)}}return 2===e&&c&&p&&(this._lastCommentLine=p),2}}function $r(e,t){this.tokenChar(44,e),t||this.space()}function Vr(e,t={},s){const i=function(e,t){if(t.experimental_preserveFormat)throw new Error("`experimental_preserveFormat` requires the original `code` to be passed to @babel/generator as a string");const s={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,preserveFormat:t.experimental_preserveFormat,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:null==t.comments||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};s.minified?(s.compact=!0,s.shouldPrintComment=s.shouldPrintComment||(()=>s.comments)):s.shouldPrintComment=s.shouldPrintComment||(e=>s.comments||e.includes("@license")||e.includes("@preserve")),"auto"===s.compact&&(s.compact=!1,s.compact&&console.error(`[BABEL] Note: The code generator has deoptimised the styling of ${t.filename} as it exceeds the max of 500KB.`)),(s.compact||s.preserveFormat)&&(s.indent.adjustMultilineComment=!1);const{auxiliaryCommentBefore:i,auxiliaryCommentAfter:n,shouldPrintComment:r}=s;return i&&!r(i)&&(s.auxiliaryCommentBefore=void 0),n&&!r(n)&&(s.auxiliaryCommentAfter=void 0),s}(0,t),n=t.sourceMaps?new Pi(t,s):null;return new qr(i,n,e.tokens,null).generate(e)}class Hr{constructor(e,t,s){this.line=void 0,this.column=void 0,void 0!==s&&(this.index=void 0),this.line=e,this.column=t,void 0!==s&&(this.index=s)}}class Kr{start;end;filename;identifierName;constructor(e,t){this.start=e,this.end=t}}function zr(e,t){const{line:s,column:i,index:n}=e;return new Hr(s,i+t,n+t)}const Jr="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Wr={ImportMetaOutsideModule:{message:"import.meta may appear only with 'sourceType: \"module\"'",code:Jr},ImportOutsideModule:{message:"'import' and 'export' may appear only with 'sourceType: \"module\"'",code:Jr}},Xr={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"},Gr=e=>"UpdateExpression"===e.type?Xr.UpdateExpression[`${e.prefix}`]:Xr[e.type],Yr={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})=>`'${"ForInStatement"===e?"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 ${"BreakStatement"===e?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArity:({phase:e})=>`\`import${e?`.${e}`:""}()\` requires exactly one or two arguments.`,ImportCallNotNewExpression:({phase:e})=>`Cannot use new with import${e?`.${e}`:""}().`,ImportCallSpreadArgument:({phase:e})=>`\`...\` is not allowed in \`import${e?`.${e}`:""}()\`.`,IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${Gr(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${Gr(e)}.`,InvalidLhsOptionalChaining:({ancestor:e})=>`Invalid optional chaining in the left-hand side of ${Gr(e)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperCallNotNewExpression:"Cannot use new with super(...).",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Qr={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)}\`.`},Zr=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),ea={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 ${Gr({type:e})}; please wrap it in parentheses.`,PipelineUnparenthesized:"Cannot mix binary operator with solo-await F#-style pipeline. Please wrap the pipeline in parentheses."};function ta(e,t,s){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:s})}function sa({toMessage:e,code:t,reasonCode:s,syntaxPlugin:i}){const n="MissingPlugin"===s||"MissingOneOfPlugins"===s;return function r(a,o,c){const h=new SyntaxError;return h.code=t,h.reasonCode=s,h.loc=a,h.pos=o,h.syntaxPlugin=i,n&&(h.missingPlugin=c.missingPlugin),ta(h,"clone",function(e={}){const{line:t,column:s,index:i=o}=e.loc??a;return r(new Hr(t,s),i,{...c,...e.details})}),ta(h,"details",c),Object.defineProperty(h,"message",{configurable:!0,get(){const t=`${e(c)} (${a.line}:${a.column})`;return this.message=t,t},set(e){Object.defineProperty(this,"message",{value:e,writable:!0})}}),h}}function ia(e,t){if(Array.isArray(e))return t=>ia(t,e[0]);const s={};for(const i of Object.keys(e)){const n=e[i],{message:r,...a}="string"==typeof n?{message:()=>n}:"function"==typeof n?{message:n}:n,o="string"==typeof r?()=>r:r;s[i]=sa({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:i,toMessage:o,...t?{syntaxPlugin:t}:{},...a})}return s}const na={...ia(Wr),...ia(Yr),...ia({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."}),...ia(Qr),...ia`pipelineOperator`(ea),...ia`functionBind`({UnsupportedBind:"Binding should be performed on object property.",UnsupportedBindRHS:"The right-hand side of binding can not be super or import."})};function ra(e){const{start:t,end:s}=e.loc;return e.loc.start=new Hr(t.line,t.column),e.loc.end=new Hr(s.line,s.column),e}const aa=!0,oa=!0,ca=!0,ha=!0,la=!0;class pa{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=null!=t.binop?t.binop:null}}const ua=new Map;function da(e,t={}){t.keyword=e;const s=Sa(e,t);return ua.set(e,s),s}function fa(e,t){return Sa(e,{beforeExpr:aa,binop:t})}let ma=-1;const ya=[],xa=[],ga=[],ka=[],Ta=[],ba=[];function Sa(e,t={}){return++ma,xa.push(e),ga.push(t.binop??-1),ka.push(t.beforeExpr??!1),Ta.push(t.startsExpr??!1),ba.push(t.prefix??!1),ya.push(new pa(e,t)),ma}function wa(e,t={}){return++ma,ua.set(e,ma),xa.push(e),ga.push(t.binop??-1),ka.push(t.beforeExpr??!1),Ta.push(t.startsExpr??!1),ba.push(t.prefix??!1),ya.push(new pa("name",t)),ma}const va={bracketL:Sa("[",{beforeExpr:aa,startsExpr:oa}),bracketR:Sa("]"),braceL:Sa("{",{beforeExpr:aa,startsExpr:oa}),braceBarL:Sa("{|",{beforeExpr:aa,startsExpr:oa}),braceR:Sa("}"),braceBarR:Sa("|}"),parenL:Sa("(",{beforeExpr:aa,startsExpr:oa}),parenR:Sa(")"),comma:Sa(",",{beforeExpr:aa}),semi:Sa(";",{beforeExpr:aa}),colon:Sa(":",{beforeExpr:aa}),doubleColon:Sa("::",{beforeExpr:aa}),dot:Sa("."),question:Sa("?",{beforeExpr:aa}),questionDot:Sa("?."),arrow:Sa("=>",{beforeExpr:aa}),template:Sa("template"),ellipsis:Sa("...",{beforeExpr:aa}),backQuote:Sa("`",{startsExpr:oa}),dollarBraceL:Sa("${",{beforeExpr:aa,startsExpr:oa}),templateTail:Sa("...`",{startsExpr:oa}),templateNonTail:Sa("...${",{beforeExpr:aa,startsExpr:oa}),at:Sa("@"),hash:Sa("#",{startsExpr:oa}),interpreterDirective:Sa("#!..."),eq:Sa("=",{beforeExpr:aa,isAssign:ha}),assign:Sa("_=",{beforeExpr:aa,isAssign:ha}),slashAssign:Sa("_=",{beforeExpr:aa,isAssign:ha}),xorAssign:Sa("_=",{beforeExpr:aa,isAssign:ha}),moduloAssign:Sa("_=",{beforeExpr:aa,isAssign:ha}),incDec:Sa("++/--",{prefix:la,postfix:!0,startsExpr:oa}),bang:Sa("!",{beforeExpr:aa,prefix:la,startsExpr:oa}),tilde:Sa("~",{beforeExpr:aa,prefix:la,startsExpr:oa}),doubleCaret:Sa("^^",{startsExpr:oa}),doubleAt:Sa("@@",{startsExpr:oa}),pipeline:fa("|>",0),nullishCoalescing:fa("??",1),logicalOR:fa("||",1),logicalAND:fa("&&",2),bitwiseOR:fa("|",3),bitwiseXOR:fa("^",4),bitwiseAND:fa("&",5),equality:fa("==/!=/===/!==",6),lt:fa("</>/<=/>=",7),gt:fa("</>/<=/>=",7),relational:fa("</>/<=/>=",7),bitShift:fa("<</>>/>>>",8),bitShiftL:fa("<</>>/>>>",8),bitShiftR:fa("<</>>/>>>",8),plusMin:Sa("+/-",{beforeExpr:aa,binop:9,prefix:la,startsExpr:oa}),modulo:Sa("%",{binop:10,startsExpr:oa}),star:Sa("*",{binop:10}),slash:fa("/",10),exponent:Sa("**",{beforeExpr:aa,binop:11,rightAssociative:!0}),_in:da("in",{beforeExpr:aa,binop:7}),_instanceof:da("instanceof",{beforeExpr:aa,binop:7}),_break:da("break"),_case:da("case",{beforeExpr:aa}),_catch:da("catch"),_continue:da("continue"),_debugger:da("debugger"),_default:da("default",{beforeExpr:aa}),_else:da("else",{beforeExpr:aa}),_finally:da("finally"),_function:da("function",{startsExpr:oa}),_if:da("if"),_return:da("return",{beforeExpr:aa}),_switch:da("switch"),_throw:da("throw",{beforeExpr:aa,prefix:la,startsExpr:oa}),_try:da("try"),_var:da("var"),_const:da("const"),_with:da("with"),_new:da("new",{beforeExpr:aa,startsExpr:oa}),_this:da("this",{startsExpr:oa}),_super:da("super",{startsExpr:oa}),_class:da("class",{startsExpr:oa}),_extends:da("extends",{beforeExpr:aa}),_export:da("export"),_import:da("import",{startsExpr:oa}),_null:da("null",{startsExpr:oa}),_true:da("true",{startsExpr:oa}),_false:da("false",{startsExpr:oa}),_typeof:da("typeof",{beforeExpr:aa,prefix:la,startsExpr:oa}),_void:da("void",{beforeExpr:aa,prefix:la,startsExpr:oa}),_delete:da("delete",{beforeExpr:aa,prefix:la,startsExpr:oa}),_do:da("do",{isLoop:ca,beforeExpr:aa}),_for:da("for",{isLoop:ca}),_while:da("while",{isLoop:ca}),_as:wa("as",{startsExpr:oa}),_assert:wa("assert",{startsExpr:oa}),_async:wa("async",{startsExpr:oa}),_await:wa("await",{startsExpr:oa}),_defer:wa("defer",{startsExpr:oa}),_from:wa("from",{startsExpr:oa}),_get:wa("get",{startsExpr:oa}),_let:wa("let",{startsExpr:oa}),_meta:wa("meta",{startsExpr:oa}),_of:wa("of",{startsExpr:oa}),_sent:wa("sent",{startsExpr:oa}),_set:wa("set",{startsExpr:oa}),_source:wa("source",{startsExpr:oa}),_static:wa("static",{startsExpr:oa}),_using:wa("using",{startsExpr:oa}),_yield:wa("yield",{startsExpr:oa}),_asserts:wa("asserts",{startsExpr:oa}),_checks:wa("checks",{startsExpr:oa}),_exports:wa("exports",{startsExpr:oa}),_global:wa("global",{startsExpr:oa}),_implements:wa("implements",{startsExpr:oa}),_intrinsic:wa("intrinsic",{startsExpr:oa}),_infer:wa("infer",{startsExpr:oa}),_is:wa("is",{startsExpr:oa}),_mixins:wa("mixins",{startsExpr:oa}),_proto:wa("proto",{startsExpr:oa}),_require:wa("require",{startsExpr:oa}),_satisfies:wa("satisfies",{startsExpr:oa}),_keyof:wa("keyof",{startsExpr:oa}),_readonly:wa("readonly",{startsExpr:oa}),_unique:wa("unique",{startsExpr:oa}),_abstract:wa("abstract",{startsExpr:oa}),_declare:wa("declare",{startsExpr:oa}),_enum:wa("enum",{startsExpr:oa}),_module:wa("module",{startsExpr:oa}),_namespace:wa("namespace",{startsExpr:oa}),_interface:wa("interface",{startsExpr:oa}),_type:wa("type",{startsExpr:oa}),_opaque:wa("opaque",{startsExpr:oa}),name:Sa("name",{startsExpr:oa}),placeholder:Sa("%%",{startsExpr:oa}),string:Sa("string",{startsExpr:oa}),num:Sa("num",{startsExpr:oa}),bigint:Sa("bigint",{startsExpr:oa}),regexp:Sa("regexp",{startsExpr:oa}),privateName:Sa("#name",{startsExpr:oa}),eof:Sa("eof"),jsxName:Sa("jsxName"),jsxText:Sa("jsxText",{beforeExpr:aa}),jsxTagStart:Sa("jsxTagStart",{startsExpr:oa}),jsxTagEnd:Sa("jsxTagEnd")};function Ca(e){return e>=89&&e<=129}function Pa(e){return e>=54&&e<=129}function Ea(e){return e>=54&&e<=132}function Aa(e){return Ta[e]}function Ia(e){return e>=125&&e<=127}function _a(e){return e>=54&&e<=88}function Na(e){return e>=35&&e<=55}function La(e){return 30===e}function Da(e){return xa[e]}function Ma(e){return ga[e]}function Oa(e){return e>=20&&e<=21}function Fa(e){return ya[e]}class Ra{constructor(e,t){this.token=e,this.preserveSpace=!!t}token;preserveSpace}const Ba={brace:new Ra("{"),j_oTag:new Ra("<tag"),j_cTag:new Ra("</tag"),j_expr:new Ra("<tag>...</tag>",!0)},ja=/[\p{ID_Start}\u0558\u058b\u058c\u088f\u0c5c\u0cdc\u208f\u209d-\u209f\ua7ce\ua7cf\ua7d2\ua7d4\ua7dd\ua7e2\ua7f1\uab6c\uab6d]/u,Ua=/[\p{ID_Continue}\u0558\u058b\u058c\u088f\u0c5c\u0cdc\u208f\u209d-\u209f\ua7ce\ua7cf\ua7d2\ua7d4\ua7dd\ua7e2\ua7f1\uab6c\uab6d\u05c8\u05c9\u0b53\u0b54\u1acf-\u1af0]/u,qa=[1979,4,385,25,1388,2,18,21,3100,0,678,43,22,0,1662,0,6,10,209,310,18458,24,3,24,287,4,6146,7,1239,4,47,23,96,114,14,913,15,50,8017,5,64,0,9534,0,2169,5,7,86,15,6,55,50,1729,30,2,2,2,1,2,6,3,4,10,1,53307,5,223,0,5764,11,21763,4297,39815,11327],$a=[3787,4,33,11,3173,7,633,9,7,0,45879,1,296,2,9,1,3,0,33,1,5218,0,3,0,8,1,6,0];function Va(e,t){let s=65536;for(let i=0,n=t.length;i<n;i+=2){if(s+=t[i],s>e)return!1;if(s+=t[i+1],s>=e)return!0}return!1}function Ha(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&ja.test(String.fromCharCode(e)):!isNaN(e)&&e<=1114111&&(ja.test(String.fromCodePoint(e))||Va(e,qa))))}function Ka(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&Ua.test(String.fromCharCode(e)):!isNaN(e)&&e<=1114111&&(Ua.test(String.fromCodePoint(e))||Va(e,qa)||Va(e,$a)))))}const za=["implements","interface","let","package","private","protected","public","static","yield"],Ja=["eval","arguments"],Wa=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"]),Xa=new Set(za),Ga=new Set(Ja);function Ya(e,t){return t&&"await"===e||"enum"===e}function Qa(e,t){return Ya(e,t)||Xa.has(e)}function Za(e){return Ga.has(e)}function eo(e,t){return Qa(e,t)||Za(e)}const to=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"]);let so=class{flags=0;names=new Map;firstLexicalName="";constructor(e){this.flags=e}};class io{parser;scopeStack=[];inModule;undefinedExports=new Map;constructor(e,t){this.parser=e,this.inModule=t}get inTopLevel(){return(1&this.currentScope().flags)>0}get inFunction(){return(2&this.currentVarScopeFlags())>0}get allowSuper(){return(16&this.currentThisScopeFlags())>0}get allowDirectSuper(){return(32&this.currentThisScopeFlags())>0}get allowNewTarget(){return(512&this.currentThisScopeFlags())>0}get inClass(){return(64&this.currentThisScopeFlags())>0}get inClassAndNotInNonArrowFunction(){const e=this.currentThisScopeFlags();return(64&e)>0&&!(2&e)}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(128&t)return!0;if(3779&t)return!1}}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get inBareCaseStatement(){return(256&this.currentScope().flags)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new so(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(130&e.flags||!this.parser.inModule&&1&e.flags)}declareName(e,t,s){let i=this.currentScope();if(8&t||16&t){this.checkRedeclarationInScope(i,e,t,s);let n=i.names.get(e)||0;16&t?n|=4:(i.firstLexicalName||(i.firstLexicalName=e),n|=2),i.names.set(e,n),8&t&&this.maybeExportDefined(i,e)}else if(4&t)for(let n=this.scopeStack.length-1;n>=0&&(i=this.scopeStack[n],this.checkRedeclarationInScope(i,e,t,s),i.names.set(e,1|(i.names.get(e)||0)),this.maybeExportDefined(i,e),!(3715&i.flags));--n);this.parser.inModule&&1&i.flags&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&1&e.flags&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,s,i){this.isRedeclaredInScope(e,t,s)&&this.parser.raise(na.VarRedeclaration,i,{identifierName:t})}isRedeclaredInScope(e,t,s){if(!(1&s))return!1;if(8&s)return e.names.has(t);const i=e.names.get(t)||0;return 16&s?(2&i)>0||!this.treatFunctionsAsVarInScope(e)&&(1&i)>0:(2&i)>0&&!(8&e.flags&&e.firstLexicalName===t)||!this.treatFunctionsAsVarInScope(e)&&(4&i)>0}checkLocalExport(e){const{name:t}=e;this.scopeStack[0].names.has(t)||this.undefinedExports.set(t,e.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(3715&t)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(3779&t&&!(4&t))return t}}}class no extends so{declareFunctions=new Set}class ro extends io{createScope(e){return new no(e)}declareName(e,t,s){const i=this.currentScope();if(2048&t)return this.checkRedeclarationInScope(i,e,t,s),this.maybeExportDefined(i,e),void i.declareFunctions.add(e);super.declareName(e,t,s)}isRedeclaredInScope(e,t,s){if(super.isRedeclaredInScope(e,t,s))return!0;if(2048&s&&!e.declareFunctions.has(t)){const s=e.names.get(t);return(4&s)>0||(2&s)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}}const ao=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),oo=ia`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:s})=>`Enum \`${e}\` has type \`${s}\`, so the initializer of \`${t}\` needs to be a ${s} 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:s})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${s}\`, 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 co(e){return"type"===e.importKind||"typeof"===e.importKind}const ho={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};const lo=/\*?\s*@((?:no)?flow)\b/,po={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",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:"♦"},uo=/\r\n|[\r\n\u2028\u2029]/g;function fo(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function mo(e,t,s){for(let i=t;i<s;i++)if(fo(e.charCodeAt(i)))return!0;return!1}const yo=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,xo=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function go(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 ko=ia`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 To(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function bo(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return bo(e.object)+"."+bo(e.property);throw new Error("Node had unexpected type: "+e.type)}class So extends so{tsNames=new Map}class wo extends io{get inTSNamespace(){const e=this.scopeStack;return e.length>=2&&0===e[e.length-1].flags&&(2048&e[e.length-2].flags)>0}importsStack=[];createScope(e){return this.importsStack.push(new Set),new So(e)}enter(e){3072&e&&this.importsStack.push(new Set),super.enter(e)}exit(){const e=super.exit();return 3072&e&&this.importsStack.pop(),e}hasImport(e,t){const s=this.importsStack.length;if(this.importsStack[s-1].has(e))return!0;if(!t&&s>1)for(let t=0;t<s-1;t++)if(this.importsStack[t].has(e))return!0;return!1}declareName(e,t,s){if(4096&t)return this.hasImport(e,!0)&&this.parser.raise(na.VarRedeclaration,s,{identifierName:e}),void this.importsStack[this.importsStack.length-1].add(e);const i=this.currentScope();let n=i.tsNames.get(e)||0;if(1024&t)return this.maybeExportDefined(i,e),void i.tsNames.set(e,16|n);super.declareName(e,t,s),2&t&&(1&t||(this.checkRedeclarationInScope(i,e,t,s),this.maybeExportDefined(i,e)),n|=1),256&t&&(n|=2),512&t&&(n|=4),128&t&&(n|=8),n&&i.tsNames.set(e,n)}isRedeclaredInScope(e,t,s){const i=e.tsNames.get(t);if((2&i)>0){if(256&s){return(512&s)>0!==(4&i)>0}return!0}return 128&s&&(8&i)>0?!!(2&e.names.get(t))&&!!(1&s):!!(2&s&&(1&i)>0)||super.isRedeclaredInScope(e,t,s)}checkLocalExport(e){const{name:t}=e;if(this.hasImport(t))return;for(let e=this.scopeStack.length-1;e>=0;e--){const s=this.scopeStack[e].tsNames.get(t);if((1&s)>0||(16&s)>0)return}super.checkLocalExport(e)}}class vo{sawUnambiguousESM=!1;ambiguousScriptDifferentAst=!1;sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if("string"==typeof e)return this.plugins.has(e);{const[t,s]=e;if(!this.hasPlugin(t))return!1;const i=this.plugins.get(t);for(const e of Object.keys(s))if(i?.[e]!==s[e])return!1;return!0}}getPluginOption(e,t){return this.plugins.get(e)?.[t]}}function Co(e,t){void 0===e.trailingComments?e.trailingComments=t:e.trailingComments.unshift(...t)}function Po(e,t){void 0===e.innerComments?e.innerComments=t:e.innerComments.unshift(...t)}function Eo(e,t,s){let i=null,n=t.length;for(;null===i&&n>0;)i=t[--n];null===i||i.start>s.start?Po(e,s.comments):Co(i,s.comments)}class Ao extends vo{addComment(e){this.filename&&(e.loc.filename=this.filename);const{commentsLen:t}=this.state;this.comments.length!==t&&(this.comments.length=t),this.comments.push(e),this.state.commentsLen++}processComment(e){const{commentStack:t}=this.state,s=t.length;if(0===s)return;let i=s-1;const n=t[i];n.start===e.end&&(n.leadingNode=e,i--);const r=e.start;for(;i>=0;i--){const s=t[i],n=s.end;if(!(n>r)){n===r&&(s.trailingNode=e);break}s.containingNode=e,this.finalizeComment(s),t.splice(i,1)}}finalizeComment(e){const{comments:t}=e;if(null!==e.leadingNode||null!==e.trailingNode)null!==e.leadingNode&&Co(e.leadingNode,t),null!==e.trailingNode&&function(e,t){void 0===e.leadingComments?e.leadingComments=t:e.leadingComments.unshift(...t)}(e.trailingNode,t);else{const s=e.containingNode,i=e.start;if(44===this.input.charCodeAt(this.offsetToSourcePos(i)-1))switch(s.type){case"ObjectExpression":case"ObjectPattern":Eo(s,s.properties,e);break;case"CallExpression":case"NewExpression":case"OptionalCallExpression":Eo(s,s.arguments,e);break;case"ImportExpression":Eo(s,[s.source,s.options??null],e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":case"TSTypeParameterDeclaration":Eo(s,s.params,e);break;case"ArrayExpression":case"ArrayPattern":Eo(s,s.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":Eo(s,s.specifiers,e);break;case"TSEnumBody":Eo(s,s.members,e);break;case"TSInterfaceBody":Eo(s,s.body,e);break;default:Po(s,t)}else Po(s,t)}}finalizeRemainingComments(){const{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){const{commentStack:t}=this.state,{length:s}=t;if(0===s)return;const i=t[s-1];i.leadingNode===e&&(i.leadingNode=null)}takeSurroundingComments(e,t,s){const{commentStack:i}=this.state,n=i.length;if(0===n)return;let r=n-1;for(;r>=0;r--){const n=i[r],a=n.end;if(n.start===s)n.leadingNode=e;else if(a===t)n.trailingNode=e;else if(a<t)break}}}let Io=class e{flags=2048;get strict(){return(1&this.flags)>0}set strict(e){e?this.flags|=1:this.flags&=-2}startIndex;curLine;lineStart;startLoc;endLoc;init({strictMode:e,sourceType:t,startIndex:s,startLine:i,startColumn:n}){this.strict=!1!==e&&(!0===e||"module"===t),this.startIndex=s,this.curLine=i,this.lineStart=-n,this.startLoc=this.endLoc=new Hr(i,n,s)}errors=[];noArrowAt=[];noArrowParamsConversionAt=[];get canStartArrow(){return(2&this.flags)>0}set canStartArrow(e){e?this.flags|=2:this.flags&=-3}get inType(){return(4&this.flags)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(8&this.flags)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(16&this.flags)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(32&this.flags)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(64&this.flags)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(128&this.flags)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get inConditionalConsequent(){return(256&this.flags)>0}set inConditionalConsequent(e){e?this.flags|=256:this.flags&=-257}get inHackPipelineBody(){return(512&this.flags)>0}set inHackPipelineBody(e){e?this.flags|=512:this.flags&=-513}get seenTopicReference(){return(1024&this.flags)>0}set seenTopicReference(e){e?this.flags|=1024:this.flags&=-1025}labels=[];commentsLen=0;commentStack=[];pos=0;type=135;value=null;start=0;end=0;lastTokEndLoc=null;lastTokStartLoc=null;context=[Ba.brace];get canStartJSXElement(){return(2048&this.flags)>0}set canStartJSXElement(e){e?this.flags|=2048:this.flags&=-2049}get containsEsc(){return(4096&this.flags)>0}set containsEsc(e){e?this.flags|=4096:this.flags&=-4097}firstInvalidTemplateEscapePos=null;get hasTopLevelAwait(){return(8192&this.flags)>0}set hasTopLevelAwait(e){e?this.flags|=8192:this.flags&=-8193}strictErrors=new Map;tokensLength=0;curPosition(){return new Hr(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){const t=new e;return t.flags=this.flags,t.startIndex=this.startIndex,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}};var _o=function(e){return e>=48&&e<=57};const No={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Lo={bin:e=>48===e||49===e,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 Do(e,t,s,i,n,r){const a=s,o=i,c=n;let h="",l=null,p=s;const{length:u}=t;for(;;){if(s>=u){r.unterminated(a,o,c),h+=t.slice(p,s);break}const d=t.charCodeAt(s);if(Mo(e,d,t,s)){h+=t.slice(p,s);break}if(92===d){h+=t.slice(p,s);const a=Oo(t,s,i,n,"template"===e,r);null!==a.ch||l?h+=a.ch:l={pos:s,lineStart:i,curLine:n},({pos:s,lineStart:i,curLine:n}=a),p=s}else 8232===d||8233===d?(++n,i=++s):10===d||13===d?"template"===e?(h+=t.slice(p,s)+"\n",++s,13===d&&10===t.charCodeAt(s)&&++s,++n,p=i=s):r.unterminated(a,o,c):++s}return{pos:s,str:h,firstInvalidLoc:l,lineStart:i,curLine:n}}function Mo(e,t,s,i){return"template"===e?96===t||36===t&&123===s.charCodeAt(i+1):t===("double"===e?34:39)}function Oo(e,t,s,i,n,r){const a=!n;t++;const o=e=>({pos:t,ch:e,lineStart:s,curLine:i}),c=e.charCodeAt(t++);switch(c){case 110:return o("\n");case 114:return o("\r");case 120:{let n;return({code:n,pos:t}=Fo(e,t,s,i,2,!1,a,r)),o(null===n?null:String.fromCharCode(n))}case 117:{let n;return({code:n,pos:t}=Bo(e,t,s,i,a,r)),o(null===n?null:String.fromCodePoint(n))}case 116:return o("\t");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:s=t,++i;case 8232:case 8233:return o("");case 56:case 57:if(n)return o(null);r.strictNumericEscape(t-1,s,i);default:if(c>=48&&c<=55){const a=t-1;let c=/^[0-7]+/.exec(e.slice(a,t+2))[0],h=parseInt(c,8);h>255&&(c=c.slice(0,-1),h=parseInt(c,8)),t+=c.length-1;const l=e.charCodeAt(t);if("0"!==c||56===l||57===l){if(n)return o(null);r.strictNumericEscape(a,s,i)}return o(String.fromCharCode(h))}return o(String.fromCharCode(c))}}function Fo(e,t,s,i,n,r,a,o){const c=t;let h;return({n:h,pos:t}=Ro(e,t,s,i,16,n,r,!1,o,!a)),null===h&&(a?o.invalidEscapeSequence(c,s,i):t=c-1),{code:h,pos:t}}function Ro(e,t,s,i,n,r,a,o,c,h){const l=t,p=16===n?No.hex:No.decBinOct,u=16===n?Lo.hex:10===n?Lo.dec:8===n?Lo.oct:Lo.bin;let d=!1,f=0;for(let l=0,m=null==r?1/0:r;l<m;++l){const r=e.charCodeAt(t);let l;if(95===r&&"bail"!==o){const n=e.charCodeAt(t-1),r=e.charCodeAt(t+1);if(o){if(Number.isNaN(r)||!u(r)||p.has(n)||p.has(r)){if(h)return{n:null,pos:t};c.unexpectedNumericSeparator(t,s,i)}}else{if(h)return{n:null,pos:t};c.numericSeparatorInEscapeSequence(t,s,i)}++t;continue}if(l=r>=97?r-97+10:r>=65?r-65+10:_o(r)?r-48:1/0,l>=n)if(l<=9){if(h)return{n:null,pos:t};c.invalidDigit(t,s,i,n),l=0}else{if(!a)break;l=0,d=!0}++t,f=f*n+l}return t===l||null!=r&&t-l!==r||d?{n:null,pos:t}:{n:f,pos:t}}function Bo(e,t,s,i,n,r){let a;if(123===e.charCodeAt(t)){if(++t,({code:a,pos:t}=Fo(e,t,s,i,e.indexOf("}",t)-t,!0,n,r)),++t,null!==a&&a>1114111){if(!n)return{code:null,pos:t};r.invalidCodePoint(t,s,i)}}else({code:a,pos:t}=Fo(e,t,s,i,4,!1,n,r));return{code:a,pos:t}}function jo(e,t,s){return new Hr(s,e-t,e)}const Uo=new Set([103,109,115,105,121,117,100,118]);let qo,$o=class{constructor(e){const 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 Kr(e.startLoc,e.endLoc)}};class Vo extends Ao{isLookahead;tokens=[];constructor(e,t){super(),this.state=new Io,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1,(!qo||qo.length<2*(this.length+1))&&(qo=new Uint32Array(2*(this.length+1))),this.locData=qo}setLoc(e){const t=this.offsetToSourcePos(e.index);this.locData[2*t]=e.line,this.locData[2*t+1]=e.column}getLoc(e){const t=this.offsetToSourcePos(e);return new Hr(this.locData[2*t],this.locData[2*t+1],e)}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),512&this.optionFlags&&this.pushToken(new $o(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)}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(){const e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return yo.lastIndex=e,yo.test(this.input)?yo.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 xo.lastIndex=e,xo.test(this.input)?xo.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if(55296==(64512&t)&&++e<this.input.length){const s=this.input.charCodeAt(e);56320==(64512&s)&&(t=65536+((1023&t)<<10)+(1023&s))}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(){this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length?this.finishToken(135):this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());const s=this.state.pos,i=this.input.indexOf(e,s+2);if(-1===i)throw this.raise(na.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+e.length,uo.lastIndex=s+2;uo.test(this.input)&&uo.lastIndex<=i;)++this.state.curLine,this.state.lineStart=uo.lastIndex;if(this.isLookahead)return;const n={type:"CommentBlock",value:this.input.slice(s+2,i),start:this.sourceToOffsetPos(s),end:this.sourceToOffsetPos(i+e.length),loc:new Kr(t,this.state.curPosition())};return 512&this.optionFlags&&this.pushToken(n),n}skipLineComment(e){const t=this.state.pos;let s;this.isLookahead||(s=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!fo(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;const n=this.state.pos,r={type:"CommentLine",value:this.input.slice(t+e,n),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(n),loc:new Kr(s,this.state.curPosition())};return 512&this.optionFlags&&this.pushToken(r),r}skipSpace(){const e=this.state.pos,t=(8192&this.optionFlags)>0;let s;e:for(;this.state.pos<this.length;){const i=this.input.charCodeAt(this.state.pos);switch(i){case 32:case 160:case 9:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++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:{const e=this.skipBlockComment("*/");void 0!==e&&(this.addComment(e),t&&(s??=[]).push(e));break}case 47:{const e=this.skipLineComment(2);void 0!==e&&(this.addComment(e),t&&(s??=[]).push(e));break}default:break e}break;default:if(go(i))++this.state.pos;else if(45===i&&!this.inModule&&16384&this.optionFlags){const i=this.state.pos;if(45!==this.input.charCodeAt(i+1)||62!==this.input.charCodeAt(i+2)||!(0===e||this.state.lineStart>e))break e;{const e=this.skipLineComment(3);void 0!==e&&(this.addComment(e),t&&(s??=[]).push(e))}}else{if(60!==i||this.inModule||!(16384&this.optionFlags))break e;{const e=this.state.pos;if(33!==this.input.charCodeAt(e+1)||45!==this.input.charCodeAt(e+2)||45!==this.input.charCodeAt(e+3))break e;{const e=this.skipLineComment(4);void 0!==e&&(this.addComment(e),t&&(s??=[]).push(e))}}}}}if(s?.length){const t=this.state.pos,i={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(t),comments:s,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(i)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const s=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(s)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;const e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(na.UnexpectedDigitAfterHash,this.state.curPosition());Ha(t)?(++this.state.pos,this.finishToken(134,this.readWord1(t))):92===t?(++this.state.pos,this.finishToken(134,this.readWord1())):this.finishOp(23,1)}readToken_dot(){const e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(17)):(++this.state.pos,this.finishToken(12))}readToken_slash(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(27,2):this.finishOp(52,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(33!==e)return!1;const t=this.state.pos;for(this.state.pos+=1;!fo(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);const s=this.input.slice(t+2,this.state.pos);return this.finishToken(24,s),!0}readToken_mult_modulo(e){let t=42===e?51:50,s=1,i=this.input.charCodeAt(this.state.pos+1);42===e&&42===i&&(s++,i=this.input.charCodeAt(this.state.pos+2),t=53),61!==i||this.state.inType||(s++,t=37===e?29:26),this.finishOp(t,s)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);t!==e?124!==e||62!==t?61!==t?this.finishOp(124===e?39:41,1):this.finishOp(26,2):this.finishOp(35,2):61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(26,3):this.finishOp(124===e?37:38,2)}readToken_caret(){const e=this.input.charCodeAt(this.state.pos+1);if(61!==e||this.state.inType)if(94===e&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])){this.finishOp(33,2);94===this.input.codePointAt(this.state.pos)&&this.unexpected()}else this.finishOp(40,1);else this.finishOp(28,2)}readToken_atSign(){64===this.input.charCodeAt(this.state.pos+1)&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(34,2):this.finishOp(22,1)}readToken_plus_min(e){const t=this.input.charCodeAt(this.state.pos+1);t!==e?61===t?this.finishOp(26,2):this.finishOp(49,1):this.finishOp(30,2)}readToken_lt(){const{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(60===t)return 61===this.input.charCodeAt(e+2)?void this.finishOp(26,3):void this.finishOp(47,2);61!==t?this.finishOp(43,1):this.finishOp(45,2)}readToken_gt(){const{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(62===t){const t=62===this.input.charCodeAt(e+2)?3:2;return 61===this.input.charCodeAt(e+t)?void this.finishOp(26,t+1):void this.finishOp(48,t)}61!==t?this.finishOp(44,1):this.finishOp(45,2)}readToken_eq_excl(e){const t=this.input.charCodeAt(this.state.pos+1);if(61!==t)return 61===e&&62===t?(this.state.pos+=2,void this.finishToken(15)):void this.finishOp(61===e?25:31,1);this.finishOp(42,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){const e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);63===e?61===t?this.finishOp(26,3):this.finishOp(36,2):46!==e||t>=48&&t<=57?(++this.state.pos,this.finishToken(13)):(this.state.pos+=2,this.finishToken(14))}getTokenFromCode(e){switch(e){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(6);case 41:return++this.state.pos,void this.finishToken(7);case 59:return++this.state.pos,void this.finishToken(9);case 44:return++this.state.pos,void this.finishToken(8);case 91:return++this.state.pos,void this.finishToken(0);case 93:return++this.state.pos,void this.finishToken(1);case 123:return++this.state.pos,void this.finishToken(2);case 125:return++this.state.pos,void this.finishToken(4);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(11,2):(++this.state.pos,this.finishToken(10)));case 63:return void this.readToken_question();case 96:return void this.readTemplateToken();case 48:{const e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:return void this.readToken_lt();case 62:return void this.readToken_gt();case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(32,1);case 64:return void this.readToken_atSign();case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(Ha(e))return void this.readWord(e)}throw this.raise(na.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,t){const s=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,s)}readRegexp(){const e=this.state.startLoc,t=this.state.start+1;let s,i,{pos:n}=this.state;for(;;++n){if(n>=this.length)throw this.raise(na.UnterminatedRegExp,zr(e,1));const t=this.input.charCodeAt(n);if(fo(t))throw this.raise(na.UnterminatedRegExp,zr(e,1));if(s)s=!1;else{if(91===t)i=!0;else if(93===t&&i)i=!1;else if(47===t&&!i)break;s=92===t}}const r=this.input.slice(t,n);++n;let a="";const o=()=>zr(e,n+2-t);for(;n<this.length;){const e=this.codePointAtPos(n),t=String.fromCharCode(e);if(Uo.has(e))118===e?a.includes("u")&&this.raise(na.IncompatibleRegExpUVFlags,o()):117===e&&a.includes("v")&&this.raise(na.IncompatibleRegExpUVFlags,o()),a.includes(t)&&this.raise(na.DuplicateRegExpFlags,o());else{if(!Ka(e)&&92!==e)break;this.raise(na.MalformedRegExpFlags,o())}++n,a+=t}this.state.pos=n,this.finishToken(133,{pattern:r,flags:a})}readInt(e,t,s=!1,i=!0){const{n:n,pos:r}=Ro(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,s,i,this.errorHandlers_readInt,!1);return this.state.pos=r,n}readRadixNumber(e){const t=this.state.pos,s=this.state.curPosition();let i=!1;this.state.pos+=2;const n=this.readInt(e);null==n&&this.raise(na.InvalidDigit,zr(s,2),{radix:e});if(110===this.input.charCodeAt(this.state.pos)&&(++this.state.pos,i=!0),Ha(this.codePointAtPos(this.state.pos)))throw this.raise(na.NumberIdentifier,this.state.curPosition());if(i){const e=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");return void this.finishToken(132,e)}this.finishToken(131,n)}readNumber(e){const t=this.state.pos,s=this.state.curPosition();let i=!1,n=!1,r=!1;e||null!==this.readInt(10)||this.raise(na.InvalidNumber,this.state.curPosition());const a=this.state.pos-t>=2&&48===this.input.charCodeAt(t);if(a){const e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(na.StrictOctalLiteral,s),!this.state.strict){const t=e.indexOf("_");t>0&&this.raise(na.ZeroDigitNumericSeparator,zr(s,t))}r=a&&!/[89]/.test(e)}let o=this.input.charCodeAt(this.state.pos);46!==o||r||(++this.state.pos,this.readInt(10),i=!0,o=this.input.charCodeAt(this.state.pos)),69!==o&&101!==o||r||(o=this.input.charCodeAt(++this.state.pos),43!==o&&45!==o||++this.state.pos,null===this.readInt(10)&&this.raise(na.InvalidOrMissingExponent,s),i=!0,o=this.input.charCodeAt(this.state.pos));const c=this.input.slice(t,this.state.pos).replaceAll("_","");if(110===o&&((i||a)&&this.raise(na.InvalidBigIntLiteral,s),++this.state.pos,n=!0),Ha(this.codePointAtPos(this.state.pos)))throw this.raise(na.NumberIdentifier,this.state.curPosition());if(n)return void this.finishToken(132,c);const h=r?parseInt(c,8):parseFloat(c);this.finishToken(131,h)}readCodePoint(e){const{code:t,pos:s}=Bo(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=s,t}readString(e){const{str:t,pos:s,curLine:i,lineStart:n}=Do(34===e?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=s+1,this.state.lineStart=n,this.state.curLine=i,this.finishToken(130,t)}readTemplateContinuation(){this.match(4)||this.unexpected(null,4),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const e=this.input[this.state.pos],{str:t,firstInvalidLoc:s,pos:i,curLine:n,lineStart:r}=Do("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=r,this.state.curLine=n,s&&(this.state.firstInvalidTemplateEscapePos=new Hr(s.curLine,s.pos-s.lineStart,this.sourceToOffsetPos(s.pos))),96===this.input.codePointAt(i)?this.finishToken(20,s?null:e+t+"`"):(this.state.pos++,this.finishToken(21,s?null:e+t+"${"))}recordStrictModeErrors(e,t){const s=t.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(e,t):this.state.strictErrors.set(s,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="";const s=this.state.pos;let i=this.state.pos;for(void 0!==e&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){const e=this.codePointAtPos(this.state.pos);if(Ka(e))this.state.pos+=e<=65535?1:2;else{if(92!==e)break;{this.state.containsEsc=!0,t+=this.input.slice(i,this.state.pos);const e=this.state.curPosition(),n=this.state.pos===s?Ha:Ka;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(na.MissingUnicodeEscape,this.state.curPosition()),i=this.state.pos-1;continue}++this.state.pos;const r=this.readCodePoint(!0);null!==r&&(n(r)||this.raise(na.EscapedCharNotAnIdentifier,e),t+=String.fromCodePoint(r)),i=this.state.pos}}}return t+this.input.slice(i,this.state.pos)}readWord(e){const t=this.readWord1(e),s=ua.get(t);void 0!==s?this.finishToken(s,Da(s)):this.finishToken(128,t)}checkKeywordEscapes(){const{type:e}=this.state;_a(e)&&this.state.containsEsc&&this.raise(na.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Da(e)})}raise(e,t,s={}){const i=t instanceof Hr?t:"number"==typeof t?this.getLoc(t):256&this.optionFlags?t.loc.start:this.getLoc(t.start),n=e(i,t instanceof Hr?i.index:"number"==typeof t?t:t.start,s);if(!(4096&this.optionFlags))throw n;return this.isLookahead||this.state.errors.push(n),n}raiseOverwrite(e,t,s={}){const i=t instanceof Hr?t:256&this.optionFlags?t.loc.start:this.getLoc(t.start),n=t instanceof Hr?i.index:t.start,r=this.state.errors;for(let t=r.length-1;t>=0;t--){const a=r[t];if(a.pos===n)return r[t]=e(i,n,s);if(a.pos<n)break}return this.raise(e,i,s)}updateContext(e){}unexpected(e,t){throw this.raise(na.UnexpectedToken,null!=e?e:this.state.startLoc,{expected:t?Da(t):null})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(na.MissingPlugin,null!=t?t:this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(e=>this.hasPlugin(e)))throw this.raise(na.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(t,s,i)=>{this.raise(e,jo(t,s,i))}}errorHandlers_readInt={invalidDigit:(e,t,s,i)=>{this.raise(na.InvalidDigit,jo(e,t,s),{radix:i})},numericSeparatorInEscapeSequence:this.errorBuilder(na.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(na.UnexpectedNumericSeparator)};errorHandlers_readCodePoint={...this.errorHandlers_readInt,invalidEscapeSequence:this.errorBuilder(na.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(na.InvalidCodePoint)};errorHandlers_readStringContents_string={...this.errorHandlers_readCodePoint,strictNumericEscape:(e,t,s)=>{this.recordStrictModeErrors(na.StrictNumericEscape,jo(e,t,s))},unterminated:(e,t,s)=>{throw this.raise(na.UnterminatedString,jo(e-1,t,s))}};errorHandlers_readStringContents_template={...this.errorHandlers_readCodePoint,strictNumericEscape:this.errorBuilder(na.StrictNumericEscape),unterminated:(e,t,s)=>{throw this.raise(na.UnterminatedTemplate,jo(e,t,s))}}}class Ho{privateNames=new Set;loneAccessors=new Map;undefinedPrivateNames=new Map}class Ko{parser;stack=[];constructor(e){this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Ho)}exit(){const e=this.stack.pop(),t=this.current();for(const[s,i]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(s)||t.undefinedPrivateNames.set(s,i):this.parser.raise(na.InvalidPrivateFieldResolution,i,{identifierName:s})}declarePrivateName(e,t,s){const{privateNames:i,loneAccessors:n,undefinedPrivateNames:r}=this.current();let a=i.has(e);if(3&t){const s=a&&n.get(e);if(s){a=(3&s)===(3&t)||(4&s)!==(4&t),a||n.delete(e)}else a||n.set(e,t)}a&&this.parser.raise(na.PrivateNameRedeclaration,s,{identifierName:e}),i.add(e),r.delete(e)}usePrivateName(e,t){let s;for(s of this.stack)if(s.privateNames.has(e))return;s?s.undefinedPrivateNames.set(e,t):this.parser.raise(na.InvalidPrivateFieldResolution,t,{identifierName:e})}}class zo{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}}class Jo extends zo{declarationErrors=new Map;constructor(e){super(e)}recordDeclarationError(e,t){this.declarationErrors.set(t,e)}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}}class Wo{parser;stack=[new zo];constructor(e){this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){const{stack:s}=this;let i=s.length-1,n=s[i];for(;!n.isCertainlyParameterDeclaration();){if(!n.canBeArrowParameterDeclaration())return;n.recordDeclarationError(e,t),n=s[--i]}this.parser.raise(e,t)}recordArrowParameterBindingError(e,t){const{stack:s}=this,i=s[s.length-1],n=t.start;if(i.isCertainlyParameterDeclaration())this.parser.raise(e,n);else{if(!i.canBeArrowParameterDeclaration())return;i.recordDeclarationError(e,n)}}recordAsyncArrowParametersError(e){const{stack:t}=this;let s=t.length-1,i=t[s];for(;i.canBeArrowParameterDeclaration();)2===i.type&&i.recordDeclarationError(na.AwaitBindingIdentifier,e),i=t[--s]}validateAsPattern(){const{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors((t,s)=>{this.parser.raise(t,s);let i=e.length-2,n=e[i];for(;n.canBeArrowParameterDeclaration();)n.clearDeclarationError(s),n=e[--i]})}}function Xo(){return new zo}class Go{stacks=[];enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}get hasIn(){return(8&this.currentFlags())>0}get inFSharpPipelineDirectBody(){return!(16&this.currentFlags())}}function Yo(e,t){return(e?2:0)|(t?1:0)}class Qo extends Vo{addExtra(e,t,s,i=!0){if(!e)return;let{extra:n}=e;null==n&&(n={},e.extra=n),i?n[t]=s:Object.defineProperty(n,t,{enumerable:i,value:s})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){if(this.input.startsWith(t,e)){const s=this.input.charCodeAt(e+t.length);return!(Ka(s)||55296==(64512&s))}return!1}isLookaheadContextual(e){const t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return!!this.isContextual(e)&&(this.next(),!0)}expectContextual(e,t){if(!this.eatContextual(e)){if(null!=t)throw this.raise(t,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(135)||this.match(4)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return mo(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return mo(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(na.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){const s={node:null};try{const i=e((e=null)=>{throw s.node=e,s});if(this.state.errors.length>t.errors.length){const e=this.state;return this.state=t,this.state.tokensLength=e.tokensLength,{node:i,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){const i=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:i};if(e===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:i};throw e}}checkExpressionErrors(e,t){if(!e)return!1;const{shorthandAssignLoc:s,doubleProtoLoc:i,privateKeyLoc:n,optionalParametersLoc:r,voidPatternLoc:a}=e;if(!t)return!!(s||i||r||n||a);null!=s&&this.raise(na.InvalidCoverInitializedName,s),null!=i&&this.raise(na.DuplicateProto,i),null!=n&&this.raise(na.UnexpectedPrivateField,n),null!=r&&this.unexpected(r),null!=a&&this.raise(na.InvalidCoverDiscardElement,a)}isLiteralPropertyName(){return Ea(this.state.type)}isPrivateName(e){return"PrivateName"===e.type}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return("MemberExpression"===e.type||"OptionalMemberExpression"===e.type)&&this.isPrivateName(e.property)}isObjectProperty(e){return"ObjectProperty"===e.type}isObjectMethod(e){return"ObjectMethod"===e.type}initializeScopes(e="module"===this.options.sourceType){const t=this.state.labels;this.state.labels=[];const s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const i=this.inModule;this.inModule=e;const n=this.scope,r=this.getScopeHandler();this.scope=new r(this,e);const a=this.prodParam;this.prodParam=new Go;const o=this.classScope;this.classScope=new Ko(this);const c=this.expressionScope;return this.expressionScope=new Wo(this),()=>{this.state.labels=t,this.exportedIdentifiers=s,this.inModule=i,this.scope=n,this.prodParam=a,this.classScope=o,this.expressionScope=c}}enterInitialScopes(){let e=0;(this.inModule||1&this.optionFlags)&&(e|=2),32&this.optionFlags&&(e|=1);const t=!this.inModule&&"commonjs"===this.options.sourceType;(t||2&this.optionFlags)&&(e|=4),this.prodParam.enter(e);let s=t?514:1;4&this.optionFlags&&(s|=512),16&this.optionFlags&&(s|=48),this.scope.enter(s)}checkDestructuringPrivate(e){const{privateKeyLoc:t}=e;null!==t&&this.expectPlugin("destructuringPrivate",t)}}class Zo{shorthandAssignLoc=null;doubleProtoLoc=null;privateKeyLoc=null;optionalParametersLoc=null;voidPatternLoc=null}class ec{constructor(e,t,s,i){this.start=s,this.end=0,void 0!==i&&(this.loc=new Kr(i)),128&e&&(this.range=[s,0]),void 0!==i&&t&&(this.loc.filename=t)}type=""}const tc=ec.prototype;class sc extends Qo{createPosition(e){return e}startNode(){const{startLoc:e}=this.state;return this.setLoc(e),this.startNodeAt(e)}startNodeAt(e){const{optionFlags:t,filename:s}=this;return 256&t?new ec(t,s,e.index,this.createPosition(e)):new ec(t,s,e.index)}startNodeAtNode(e){const{optionFlags:t,filename:s}=this;return 256&t?new ec(t,s,e.start,e.loc.start):new ec(t,s,e.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,s){e.type=t,e.end=s.index;const{optionFlags:i}=this;return 256&i&&(e.loc.end=this.createPosition(s)),128&i&&(e.range[1]=s.index),8192&i&&this.processComment(e),e}finishNodeAtNode(e,t,s){e.type=t,e.end=s.end;const{optionFlags:i}=this;return 256&i&&(e.loc.end=s.loc.end),128&i&&(e.range[1]=e.end),8192&i&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index;const{optionFlags:s}=this;256&s&&(e.loc.start=this.createPosition(t)),128&s&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index;const{optionFlags:s}=this;256&s&&(e.loc.end=this.createPosition(t)),128&s&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){e.start=t.start;const{optionFlags:s}=this;256&s&&(e.loc.start=t.loc.start),128&s&&(e.range[0]=t.start)}resetEndLocationFromNode(e,t){e.end=t.end;const{optionFlags:s}=this;256&s&&(e.loc.end=t.loc.end),128&s&&(e.range[1]=t.end)}castNodeTo(e,t){return e.type=t,e}cloneIdentifier(e){const{type:t,start:s,end:i,loc:n,range:r,name:a}=e,o=Object.create(tc);return o.type=t,o.start=s,o.end=i,o.loc=n,o.range=r,o.name=a,e.extra&&(o.extra=e.extra),o}cloneStringLiteral(e){const{type:t,start:s,end:i,loc:n,range:r,extra:a}=e,o=Object.create(tc);return o.type=t,o.start=s,o.end=i,o.loc=n,o.range=r,o.extra=a,o.value=e.value,o}}const ic=e=>"ParenthesizedExpression"===e.type?ic(e.expression):e;class nc extends sc{toAssignable(e,t=!1){let s;switch(("ParenthesizedExpression"===e.type||e.extra?.parenthesized)&&(s=ic(e),t?"Identifier"===s.type?this.expressionScope.recordArrowParameterBindingError(na.InvalidParenthesizedAssignment,e):"CallExpression"===s.type||"MemberExpression"===s.type||this.isOptionalMemberExpression(s)||this.raise(na.InvalidParenthesizedAssignment,e):this.raise(na.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 s=0,i=e.properties.length,n=i-1;s<i;s++){const i=e.properties[s],r=s===n;this.toAssignableObjectExpressionProp(i,r,t),r&&"RestElement"===i.type&&e.extra?.trailingCommaLoc&&this.raise(na.RestTrailingComma,e.extra.trailingCommaLoc)}break;case"ObjectProperty":{const{key:s,value:i}=e;this.isPrivateName(s)&&this.classScope.usePrivateName(this.getPrivateNameSV(s),s.start),this.toAssignable(i,t);break}case"SpreadElement":throw new 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(na.MissingEqInAssignment,256&this.optionFlags?e.left.loc.end:e.left),this.castNodeTo(e,"AssignmentPattern"),delete e.operator,"VoidPattern"===e.left.type&&this.raise(na.VoidPatternInitializer,e.left),this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(s,t)}}toAssignableObjectExpressionProp(e,t,s){if("ObjectMethod"===e.type)this.raise("get"===e.kind||"set"===e.kind?na.PatternHasAccessor:na.PatternHasMethod,e.key);else if("SpreadElement"===e.type){this.castNodeTo(e,"RestElement");const i=e.argument;this.checkToRestConversion(i,!1),this.toAssignable(i,s),t||this.raise(na.RestTrailingComma,e)}else this.toAssignable(e,s)}toAssignableList(e,t,s){const i=e.length-1;for(let n=0;n<=i;n++){const r=e[n];r&&(this.toAssignableListItem(e,n,s),"RestElement"===r.type&&(n<i?this.raise(na.RestTrailingComma,r):t&&this.raise(na.RestTrailingComma,t)))}}toAssignableListItem(e,t,s){const i=e[t];if("SpreadElement"===i.type){this.castNodeTo(i,"RestElement");const e=i.argument;this.checkToRestConversion(e,!0),this.toAssignable(e,s)}else this.toAssignable(i,s)}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":return!0;case"ObjectExpression":{const t=e.properties.length-1;return e.properties.every((e,s)=>"ObjectMethod"!==e.type&&(s===t||"SpreadElement"!==e.type)&&this.isAssignable(e))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every(e=>null===e||this.isAssignable(e));case"AssignmentExpression":return"="===e.operator;case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}parseSpread(e){const t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e),this.finishNode(t,"SpreadElement")}parseRestBinding(){const e=this.startNode();this.next();const t=this.parseBindingAtom();return"VoidPattern"===t.type&&this.raise(na.UnexpectedVoidPattern,t),e.argument=t,this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const 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,s){const i=1&s,n=[];let r=!0;for(;!this.eat(e);)if(r?r=!1:this.expect(8),i&&this.match(8))n.push(null);else{if(this.eat(e))break;if(this.match(17)){let i=this.parseRestBinding();if(2&s&&(i=this.parseFunctionParamType(i)),n.push(i),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{const e=[];if(2&s)for(this.match(22)&&this.hasPlugin("decorators")&&this.raise(na.UnsupportedParameterDecorator,this.state.startLoc);this.match(22);)e.push(this.parseDecorator());n.push(this.parseBindingElement(s,e))}}return n}parseBindingRestProperty(e){return this.next(),this.hasPlugin("discardBinding")&&this.match(84)?(e.argument=this.parseVoidPattern(null),this.raise(na.UnexpectedVoidPattern,e.argument)):e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){const{type:e,startLoc:t}=this.state;if(17===e)return this.parseBindingRestProperty(this.startNode());const s=this.startNode();return 134===e?(this.expectPlugin("destructuringPrivate",t),this.classScope.usePrivateName(this.state.value,t),s.key=this.parsePrivateName()):this.parsePropertyName(s),s.method=!1,this.parseObjPropValue(s,t,!1,!1,!0,!1)}parseBindingElement(e,t){const{startLoc:s}=this.state,i=this.parseMaybeDefault();2&e&&this.parseFunctionParamType(i),t.length&&(i.decorators=t,this.resetStartLocationFromNode(i,t[0]));return this.parseMaybeDefault(s,i)}parseFunctionParamType(e){return e}parseMaybeDefault(e,t){if(e??=this.state.startLoc,t=t??this.parseBindingAtom(),!this.eat(25))return t;const s=this.startNodeAt(e);return"VoidPattern"===t.type&&this.raise(na.VoidPatternInitializer,t),s.left=t,s.right=this.parseMaybeAssignAllowIn(),this.finishNode(s,"AssignmentPattern")}isValidLVal(e,t,s,i){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&&16384&this.optionFlags)return!0}return!1}isOptionalMemberExpression(e){return"OptionalMemberExpression"===e.type}checkLVal(e,t,s=64,i=!1,n=!1,r=!1,a=!1){const o=e.type;if(this.isObjectMethod(e))return;const c=this.isOptionalMemberExpression(e);if(c||"MemberExpression"===o)return c&&(this.expectPlugin("optionalChainingAssign",e.start),"AssignmentExpression"!==t.type&&this.raise(na.InvalidLhsOptionalChaining,e,{ancestor:t})),void(64!==s&&this.raise(na.InvalidPropertyBindingPattern,e));if("Identifier"===o){this.checkIdentifier(e,s,n);const{name:t}=e;return void(i&&(i.has(t)?this.raise(na.ParamDupe,e):i.add(t)))}"VoidPattern"===o&&"CatchClause"===t.type&&this.raise(na.VoidPatternCatchClauseParam,e);const h=ic(e);a||="CallExpression"===h.type&&("Import"===h.callee.type||"Super"===h.callee.type);const l=this.isValidLVal(o,a,!(r||e.extra?.parenthesized)&&"AssignmentExpression"===t.type,s);if(!0===l)return;if(!1===l){const i=64===s?na.InvalidLhs:na.InvalidLhsBinding;return void this.raise(i,e,{ancestor:t})}let p,u;"string"==typeof l?(p=l,u="ParenthesizedExpression"===o):[p,u]=l;const d="ArrayPattern"===o||"ObjectPattern"===o?{type:o}:t,f=e[p];if(Array.isArray(f))for(const e of f)e&&this.checkLVal(e,d,s,i,n,u,!0);else f&&this.checkLVal(f,d,s,i,n,u,a)}checkIdentifier(e,t,s=!1){this.state.strict&&(s?eo(e.name,this.inModule):Za(e.name))&&(64===t?this.raise(na.StrictEvalArguments,e,{referenceName:e.name}):this.raise(na.StrictEvalArgumentsBinding,e,{bindingName:e.name})),8192&t&&"let"===e.name&&this.raise(na.LetInLexicalBinding,e),64&t||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(na.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return!!this.match(8)&&(this.raise(this.lookaheadCharCode()===e?na.RestTrailingComma:na.ElementAfterRest,this.state.startLoc),!0)}}class rc extends nc{checkProto(e,t,s){if("SpreadElement"===e.type||this.isObjectMethod(e)||e.computed||e.shorthand)return t;const i=e.key;return"__proto__"===("Identifier"===i.type?i.name:i.value)?(t&&(s?null===s.doubleProtoLoc&&(s.doubleProtoLoc=this.getLoc(i.start)):this.raise(na.DuplicateProto,i)),!0):t}shouldExitDescending(e){return"ArrowFunctionExpression"===e.type&&!e.extra?.parenthesized}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(135))throw this.raise(na.ParseExpressionEmptyInput,this.state.startLoc);const e=this.parseExpression();if(!this.match(135))throw this.raise(na.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,512&this.optionFlags&&(e.tokens=lc(this.tokens)),e}parseExpression(e,t){return e?this.disallowInAnd(()=>this.parseExpressionBase(t)):this.allowInAnd(()=>this.parseExpressionBase(t))}parseExpressionBase(e){const t=this.state.startLoc,s=this.parseMaybeAssign(e);if(this.match(8)){const i=this.startNodeAt(t);for(i.expressions=[s];this.eat(8);)i.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(e){return this.disallowInAnd(()=>this.parseMaybeAssign(e))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd(()=>this.parseMaybeAssign(e,t))}setOptionalParametersError(e){e.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(e,t){const s=this.state.startLoc,i=this.isContextual(104);if(i&&this.prodParam.hasYield){this.next();let e=this.parseYield(s);return t&&(e=this.parseParenItem(e,s)),e}let n;e?n=!1:(e=new Zo,n=!0),this.state.canStartArrow=!0;let r=this.parseMaybeConditional(e);if(t&&(r=this.parseParenItem(r,s)),(a=this.state.type)>=25&&a<=29){const t=this.startNodeAt(s),i=this.state.value;if(t.operator=i,this.match(25)){this.toAssignable(r,!0),t.left=r;const i=s.index;null!=e.doubleProtoLoc&&e.doubleProtoLoc.index>=i&&(e.doubleProtoLoc=null),null!=e.shorthandAssignLoc&&e.shorthandAssignLoc.index>=i&&(e.shorthandAssignLoc=null),null!=e.privateKeyLoc&&e.privateKeyLoc.index>=i&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null),null!=e.voidPatternLoc&&e.voidPatternLoc.index>=i&&(e.voidPatternLoc=null)}else t.left=r;return this.next(),t.right=this.parseMaybeAssign(),this.checkLVal(r,this.finishNode(t,"AssignmentExpression"),void 0,void 0,void 0,void 0,"||="===i||"&&="===i||"??="===i),t}var a;if(n&&this.checkExpressionErrors(e,!0),i){const{type:e}=this.state;if((this.hasPlugin("v8intrinsic")?Aa(e):Aa(e)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(na.YieldNotInGeneratorFunction,s),this.parseYield(s)}return r}parseMaybeConditional(e){const t=this.state.startLoc,s=this.parseExprOps(e);return this.shouldExitDescending(s)?s:this.parseConditional(s,t,e)}parseConditional(e,t,s){if(this.eat(13)){const s=this.startNodeAt(t);return s.test=e,s.consequent=this.parseMaybeAssignAllowIn(),this.expect(10),s.alternate=this.parseMaybeAssign(),this.finishNode(s,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(134)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){const t=this.state.startLoc,s=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(s)?s:(this.state.canStartArrow=!1,this.parseExprOp(s,t,-1))}parseExprOp(e,t,s){if(this.isPrivateName(e)){const i=this.getPrivateNameSV(e);(s>=Ma(54)||!this.prodParam.hasIn||!this.match(54))&&this.raise(na.PrivateInExpectedIn,t,{identifierName:i}),this.classScope.usePrivateName(i,t)}const i=this.state.type;if(Na(i)&&(this.prodParam.hasIn||!this.match(54))){let n=Ma(i);if(n>s){if(35===i&&(this.expectPlugin("pipelineOperator"),this.prodParam.inFSharpPipelineDirectBody))return e;const r=this.startNodeAt(t);r.left=e,r.operator=this.state.value;const a=37===i||38===i,o=36===i;o&&(n=Ma(38)),this.next(),r.right=this.parseExprOpRightExpr(i,n);const c=this.finishNode(r,a||o?"LogicalExpression":"BinaryExpression"),h=this.state.type;if(o&&(37===h||38===h)||a&&36===h)throw this.raise(na.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,t,s)}}return e}parseExprOpRightExpr(e,t){if(35===e)switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.parseFSharpPipelineBody(t)}return this.parseExprOpBaseRightExpr(e,t)}parseExprOpBaseRightExpr(e,t){const s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,53===e?t-1:t)}parseHackPipeBody(){const{startLoc:e}=this.state,t=this.parseMaybeAssign();return Zr.has(t.type)&&!t.extra?.parenthesized&&this.raise(na.PipeUnparenthesizedBody,e,{type:t.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(na.PipeTopicUnused,e),t}checkExponentialAfterUnary(e){this.match(53)&&this.raise(na.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,t){const s=this.state.startLoc,i=this.isContextual(92);if(i&&this.recordAwaitIfAllowed()){this.next();const e=this.parseAwait(s);return t||this.checkExponentialAfterUnary(e),e}const n=this.match(30),r=this.startNode();if(a=this.state.type,ba[a]){r.operator=this.state.value,r.prefix=!0,this.state.canStartArrow=!1,this.match(68)&&this.expectPlugin("throwExpressions");const s=this.match(85);if(this.next(),r.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&s){const e=r.argument;"Identifier"===e.type?this.raise(na.StrictDelete,r):this.hasPropertyAsPrivateName(e)&&this.raise(na.DeletePrivateField,r)}if(!n)return t||this.checkExponentialAfterUnary(r),this.finishNode(r,"UnaryExpression")}var a;const o=this.parseUpdate(r,n,e);if(i){const{type:e}=this.state;if((this.hasPlugin("v8intrinsic")?Aa(e):Aa(e)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(na.AwaitNotInAsyncContext,s),this.parseAwait(s)}return o}parseUpdate(e,t,s){if(t){const t=this.finishNode(e,"UpdateExpression");return this.checkLVal(t.argument,t),t}const i=this.state.startLoc;let n=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return n;for(;La(this.state.type)&&!this.canInsertSemicolon();){const e=this.startNodeAt(i);e.operator=this.state.value,e.prefix=!1,e.argument=n,this.next(),this.checkLVal(n,n=this.finishNode(e,"UpdateExpression"))}return n}parseExprSubscripts(e){const t=this.state.startLoc;this.setLoc(t);const s=this.parseExprAtom(e);return this.shouldExitDescending(s)?s:this.parseSubscripts(s,t)}parseSubscripts(e,t,s){const i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do{e=this.parseSubscript(e,t,s,i),i.maybeAsyncArrow=!1}while(!i.stop);return e}parseSubscript(e,t,s,i){const{type:n}=this.state;if(!s&&11===n)return this.parseBind(e,t,i);if(Oa(n))return this.parseTaggedTemplateExpression(e,t,i);let r=!1;if(14===n){if(s&&(this.raise(na.OptionalChainingNoNew,this.state.startLoc),40===this.lookaheadCharCode()))return this.stopParseSubscript(e,i);i.optionalChainMember=r=!0,this.next()}if(!s&&this.match(6))return this.parseCoverCallAndAsyncArrowHead(e,t,i,r);{const s=this.eat(0);return s||r||this.eat(12)?this.parseMember(e,t,i,s,r):this.stopParseSubscript(e,i)}}stopParseSubscript(e,t){return t.stop=!0,e}parseMember(e,t,s,i,n){const r=this.startNodeAt(t);return r.object=e,r.computed=i,i?(r.property=this.parseExpression(),this.expect(1)):this.match(134)?("Super"===e.type&&this.raise(na.SuperPrivateField,t),this.classScope.usePrivateName(this.state.value,this.state.startLoc),r.property=this.parsePrivateName()):r.property=this.parseIdentifier(!0),s.optionalChainMember?(r.optional=n,this.finishNode(r,"OptionalMemberExpression")):this.finishNode(r,"MemberExpression")}parseBind(e,t,s){const i=this.startNodeAt(t);i.object=e,this.next();const n=this.parseNoCallExpr(e=>{throw this.raise(na.UnsupportedBindRHS,e)});if("Super"===n.type||"Import"===n.type)throw this.raise(na.UnsupportedBindRHS,n);return i.callee=n,s.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),t,!1)}parseCoverCallAndAsyncArrowHead(e,t,s,i){let n=null;this.next();const r=this.startNodeAt(t);r.callee=e;const{maybeAsyncArrow:a,optionalChainMember:o}=s;a&&(this.expressionScope.enter(new Jo(2)),n=new Zo),o&&(r.optional=i),r.arguments=i?this.parseCallExpressionArguments():this.parseCallExpressionArguments("Super"!==e.type,r,n);let c=this.finishCallExpression(r,o);return a&&this.shouldParseAsyncArrow()&&!i?(s.stop=!0,this.checkDestructuringPrivate(n),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),c=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),c)):(a&&(this.checkExpressionErrors(n,!0),this.expressionScope.exit()),this.toReferencedList(r.arguments)),c}parseTaggedTemplateExpression(e,t,s){const i=this.startNodeAt(t);return i.tag=e,i.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(na.OptionalChainingNoTemplate,t),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return"Identifier"===e.type&&"async"===e.name&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.state.canStartArrow}finishCallExpression(e,t){if("Import"===e.callee.type)if(0===e.arguments.length||e.arguments.length>2)this.raise(na.ImportCallArity,e);else for(const t of e.arguments)"SpreadElement"===t.type&&this.raise(na.ImportCallSpreadArgument,t);return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,s){const i=[];let n=!0;for(;!this.eat(7);){if(n)n=!1;else if(this.expect(8),this.match(7)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}i.push(this.parseExprListItem(7,!1,s,e))}return i}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&&Po(e,t.innerComments),t.callee.trailingComments&&Po(e,t.callee.trailingComments),e}parseNoCallExpr(e){const t=this.state.startLoc,s=this.match(79),i=this.parseExprAtom();return s&&"ImportExpression"===i.type&&e(i),this.parseSubscripts(i,t,!0)}parseExprAtom(e){let t,s=null;const{type:i}=this.state;switch(i){case 75:return this.parseSuper();case 79:return t=this.startNode(),this.next(),this.match(12)?this.parseImportMetaPropertyOrPhaseCall(t):this.match(6)?1024&this.optionFlags?this.parseImportCall(t):this.finishNode(t,"Import"):(this.raise(na.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(t,"Import"));case 74:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 86:return this.parseDo(this.startNode(),!1);case 52:case 27:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 131:return this.parseNumericLiteral(this.state.value);case 132:return this.parseBigIntLiteral(this.state.value);case 130:return this.parseStringLiteral(this.state.value);case 80:return this.parseNullLiteral();case 81:return this.parseBooleanLiteral(!0);case 82:return this.parseBooleanLiteral(!1);case 6:return this.parseParenAndDistinguishExpression(this.state.canStartArrow);case 0:return this.parseArrayLike(1,e);case 2:return this.parseObjectLike(4,!1,e);case 64:return this.parseFunctionOrFunctionSent();case 22:s=this.parseDecorators();case 76:return this.parseClass(this.maybeTakeDecorators(s,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;const e=t.callee=this.parseNoCallExpr(e=>{throw this.raise(na.UnsupportedBind,e)});if("MemberExpression"===e.type)return this.finishNode(t,"BindExpression");throw this.raise(na.UnsupportedBind,e)}case 134:return this.raise(na.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:{const e=this.getPluginOption("pipelineOperator","proposal");if(e)return this.parseTopicReference(e);throw this.unexpected()}case 43:{const e=this.input.codePointAt(this.nextTokenStart());if(Ha(e)||62===e)throw this.expectOnePlugin(["jsx","flow","typescript"]);throw this.unexpected()}default:if(Ca(i)){if(this.isContextual(123)&&123===this.lookaheadInLineCharCode())return this.parseModuleExpression();const{canStartArrow:e,containsEsc:t}=this.state,s=this.parseIdentifier();if(!t&&"async"===s.name&&!this.canInsertSemicolon()){const{type:t}=this.state;if(64===t)return this.resetPreviousNodeTrailingComments(s),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(s));if(Ca(t))return e&&61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(s)):s;if(86===t)return this.resetPreviousNodeTrailingComments(s),this.parseDo(this.startNodeAtNode(s),!0)}return e&&this.match(15)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(s),[s],!1)):s}throw this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){const s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=zr(this.state.endLoc,-1),this.parseTopicReference(s);throw this.unexpected()}parseTopicReference(e){const t=this.startNode(),s=this.state.startLoc,i=this.state.type;return this.next(),this.finishTopicReference(t,s,e,i)}finishTopicReference(e,t,s,i){if(this.testTopicReferenceConfiguration(s,t,i))return this.topicReferenceIsAllowedInCurrentContext()||this.raise(na.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(e,"TopicReference");throw this.raise(na.PipeTopicUnconfiguredToken,t,{token:Da(i)})}testTopicReferenceConfiguration(e,t,s){if("hack"===e)return this.hasPlugin(["pipelineOperator",{topicToken:Da(s)}]);throw this.raise(na.PipeTopicRequiresHackPipes,t)}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(Yo(!0,this.prodParam.hasYield));const t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(na.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();const s=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=s,this.finishNode(e,"DoExpression")}parseSuper(){const e=this.startNode();return this.next(),this.match(6)&&!this.scope.allowDirectSuper?this.raise(na.SuperNotAllowed,e):this.scope.allowSuper||this.raise(na.UnexpectedSuper,e),this.match(6)||this.match(0)||this.match(12)||this.raise(na.UnsupportedSuper,e),this.finishNode(e,"Super")}parsePrivateName(){const e=this.startNode(),t=this.startNodeAt(zr(this.state.startLoc,1)),s=this.state.value;return this.next(),e.id=this.createIdentifier(t,s),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){const e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(12)){const 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,s){e.meta=t;const i=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==s||i)&&this.raise(na.UnsupportedMetaProperty,e.property,{target:t.name,onlyValidPropertyName:s}),this.finishNode(e,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(e){if(this.next(),this.isContextual(101)||this.isContextual(93)){const t=this.isContextual(101);return this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),e.phase=t?"source":"defer",this.parseImportCall(e)}{const t=this.createIdentifierAt(this.startNodeAtNode(e),"import",this.state.lastTokStartLoc);return this.isContextual(97)&&(this.inModule||this.raise(na.ImportMetaOutsideModule,t),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}}parseLiteralAtNode(e,t,s){return this.addExtra(s,"rawValue",e),this.addExtra(s,"raw",this.input.slice(this.offsetToSourcePos(s.start),this.state.end)),s.value=e,this.next(),this.finishNode(s,t)}parseLiteral(e,t){const s=this.startNode();return this.parseLiteralAtNode(e,t,s)}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){const 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){const t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){const e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){const t=this.state.startLoc;let s;this.next(),this.expressionScope.enter(new Jo(1));const i=this.state.startLoc,n=[],r=new Zo;let a,o,c=!0;for(;!this.match(7);){if(c)c=!1;else if(this.expect(8,null===r.optionalParametersLoc?null:r.optionalParametersLoc),this.match(7)){o=this.state.startLoc;break}if(this.match(17)){const e=this.state.startLoc;if(a=this.state.startLoc,n.push(this.parseParenItem(this.parseRestBinding(),e)),!this.checkCommaAfterRest(41))break}else n.push(this.parseMaybeAssignAllowInOrVoidPattern(7,r,!0))}const h=this.state.lastTokEndLoc;this.expect(7);let l=this.startNodeAt(t);return e&&this.shouldParseArrow(n)&&(l=this.parseArrow(l))?(this.checkDestructuringPrivate(r),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(l,n,!1),l):(this.expressionScope.exit(),n.length||this.unexpected(this.state.lastTokStartLoc),o&&this.unexpected(o),a&&this.unexpected(a),this.checkExpressionErrors(r,!0),this.toReferencedList(n,!0),n.length>1?(s=this.startNodeAt(i),s.expressions=n,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,h)):s=n[0],this.wrapParenthesis(t,s))}wrapParenthesis(e,t){if(!(2048&this.optionFlags))return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;const s=this.startNodeAt(e);return s.expression=t,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(15))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){const e=this.startNode();if(this.next(),this.match(12)){const t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();const s=this.parseMetaProperty(e,t,"target");return this.scope.allowNewTarget||this.raise(na.UnexpectedNewTarget,s),s}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(6)){const t=this.parseExprList(7);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){const t=this.parseNoCallExpr(e=>{this.raise(na.ImportCallNotNewExpression,e,e)});e.callee=t,"Import"===t.type&&this.raise(na.ImportCallNotNewExpression,t),"Super"===t.type&&this.raise(na.SuperCallNotNewExpression,t)}parseTemplateElement(e){const{start:t,startLoc:s,end:i,value:n}=this.state,r=t+1,a=this.startNodeAt(zr(s,1));null===n&&(e||this.raise(na.InvalidEscapeSequenceTemplate,zr(this.state.firstInvalidTemplateEscapePos,1)));const o=this.match(20),c=o?-1:-2,h=i+c;a.value={raw:this.input.slice(r,h).replace(/\r\n?/g,"\n"),cooked:null===n?null:n.slice(1,c)},a.tail=o,this.next();const l=this.finishNode(a,"TemplateElement");return this.resetEndLocation(l,zr(this.state.lastTokEndLoc,c)),l}parseTemplate(e){const t=this.startNode();let s=this.parseTemplateElement(e);const i=[s],n=[];for(;!s.tail;)n.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(e));return t.expressions=n,t.quasis=i,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,s){let i=!1,n=!0;const r=this.startNode();for(r.properties=[],this.next();!this.match(e);){if(n)n=!1;else if(this.expect(8),this.match(e)){this.addTrailingCommaExtraToNode(r);break}let a;t?a=this.parseBindingProperty():(a=this.parsePropertyDefinition(s),i=this.checkProto(a,i,s)),r.properties.push(a)}this.next();const a=t?"ObjectPattern":"ObjectExpression";return this.finishNode(r,a)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&"Identifier"===e.key.type&&(this.isLiteralPropertyName()||this.match(0)||this.match(51))}parsePropertyDefinition(e){const t=[];if(this.match(22))for(this.hasPlugin("decorators")&&this.raise(na.UnsupportedPropertyDecorator,this.state.startLoc);this.match(22);)t.push(this.parseDecorator());const s=this.startNode();let i,n=!1,r=!1;if(this.match(17))return t.length&&this.unexpected(),this.parseSpread();t.length&&(s.decorators=t),s.method=!1,e&&(i=this.state.startLoc);let a=this.eat(51);this.parsePropertyNamePrefixOperator(s);const o=this.state.containsEsc;if(this.parsePropertyName(s,e),!a&&!o&&this.maybeAsyncOrAccessorProp(s)){const{key:e}=s,t=e.name;"async"!==t||this.hasPrecedingLineBreak()||(n=!0,this.resetPreviousNodeTrailingComments(e),a=this.eat(51),this.parsePropertyName(s)),"get"!==t&&"set"!==t||(r=!0,this.resetPreviousNodeTrailingComments(e),s.kind=t,this.match(51)&&(a=!0,this.raise(na.AccessorIsGenerator,this.state.curPosition(),{kind:t}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,i,a,n,!1,r,e)}getGetterSetterExpectedParamCount(e){return"get"===e.kind?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){const t=this.getGetterSetterExpectedParamCount(e),s=this.getObjectOrClassMethodParams(e);s.length!==t&&this.raise("get"===e.kind?na.BadGetterArity:na.BadSetterArity,e),"set"===e.kind&&"RestElement"===s[s.length-1]?.type&&this.raise(na.BadSetterRestParameter,e)}parseObjectMethod(e,t,s,i,n){if(n){const s=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(s),s}if(s||t||this.match(6))return i&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,s,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,s,i){if(e.shorthand=!1,this.eat(10))return e.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(4,i),this.finishObjectProperty(e);if(!e.computed&&"Identifier"===e.key.type){if(this.checkReservedWord(e.key.name,e.key.start,!0,!1),s)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(25)){const s=this.state.startLoc;null!=i?null===i.shorthandAssignLoc&&(i.shorthandAssignLoc=s):this.raise(na.InvalidCoverInitializedName,s),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,s,i,n,r,a){const o=this.parseObjectMethod(e,s,i,n,r)||this.parseObjectProperty(e,t,n,a);return o||this.unexpected(),o}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(1);else{const{type:s,value:i}=this.state;let n;if(Pa(s))n=this.parseIdentifier(!0);else switch(s){case 131:n=this.parseNumericLiteral(i);break;case 130:n=this.parseStringLiteral(i);break;case 132:n=this.parseBigIntLiteral(i);break;case 134:{const e=this.state.startLoc;null!=t?null===t.privateKeyLoc&&(t.privateKeyLoc=e):this.raise(na.UnexpectedPrivateField,e),n=this.parsePrivateName();break}default:throw this.unexpected()}e.key=n,134!==s&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,s,i,n,r,a=!1){this.initFunction(e,s),e.generator=t,this.scope.enter(530|(a?576:0)|(n?32:0)),this.prodParam.enter(Yo(s,e.generator)),this.parseFunctionParams(e,i);const o=this.parseFunctionBodyAndFinish(e,r,!0);return this.prodParam.exit(),this.scope.exit(),o}parseArrayLike(e,t){const s=this.startNode();return this.next(),s.elements=this.parseExprList(e,!0,t,s),this.finishNode(s,"ArrayExpression")}parseArrowExpression(e,t,s,i){this.scope.enter(518);let n=Yo(s,!1);return this.match(2)||(n|=24&this.prodParam.currentFlags()),this.prodParam.enter(n),this.initFunction(e,s),t&&this.setArrowFunctionParameters(e,t,i),this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,s){this.toAssignableList(t,s,!1),e.params=t}parseFunctionBodyAndFinish(e,t,s=!1){return this.parseFunctionBody(e,!1,s),this.finishNode(e,t)}parseFunctionBody(e,t,s=!1){const i=t&&!this.match(2);if(this.expressionScope.enter(Xo()),i)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{const i=this.state.strict,n=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),e.body=this.parseBlock(!0,!1,n=>{const r=!this.isSimpleParamList(e.params);n&&r&&this.raise(na.IllegalLanguageModeDirective,"method"!==e.kind&&"constructor"!==e.kind||!e.key?e:256&this.optionFlags?e.key.loc.end:e.key);const a=!i&&this.state.strict;this.checkParams(e,!(this.state.strict||t||s||r),t,a),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,a)}),this.prodParam.exit(),this.state.labels=n}this.expressionScope.exit()}isSimpleParameter(e){return"Identifier"===e.type}isSimpleParamList(e){for(let t=0,s=e.length;t<s;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,s,i=!0){const n=!t&&new Set,r={type:"FormalParameters"};for(const t of e.params)this.checkLVal(t,r,5,n,i)}parseExprList(e,t,s,i){const n=[];let r=!0;for(;!this.eat(e);){if(r)r=!1;else if(this.expect(8),this.match(e)){i&&this.addTrailingCommaExtraToNode(i),this.next();break}n.push(this.parseExprListItem(e,t,s))}return n}parseExprListItem(e,t,s,i){let n;if(this.match(8))t||this.raise(na.UnexpectedToken,this.state.curPosition(),{unexpected:","}),n=null;else if(this.match(17)){const e=this.state.startLoc;n=this.parseParenItem(this.parseSpread(s),e)}else if(this.match(13)){this.expectPlugin("partialApplication"),i||this.raise(na.UnexpectedArgumentPlaceholder,this.state.startLoc);const e=this.startNode();this.next(),n=this.finishNode(e,"ArgumentPlaceholder")}else n=this.parseMaybeAssignAllowInOrVoidPattern(e,s,!0);return n}parseIdentifier(e){const t=this.startNode(),s=this.parseIdentifierName(e);return this.createIdentifier(t,s)}createIdentifier(e,t){return e.name=t,256&this.optionFlags&&(e.loc.identifierName=t),this.finishNode(e,"Identifier")}createIdentifierAt(e,t,s){return e.name=t,256&this.optionFlags&&(e.loc.identifierName=t),this.finishNodeAt(e,"Identifier",s)}parseIdentifierName(e){let t;const{start:s,type:i}=this.state;Pa(i)?t=this.state.value:this.unexpected();const n=i<=88;return e?n&&this.replaceToken(128):this.checkReservedWord(t,this.sourceToOffsetPos(s),n,!1),this.next(),t}checkReservedWord(e,t,s,i){if(e.length>10)return;if(!function(e){return to.has(e)}(e))return;if(s&&function(e){return Wa.has(e)}(e))return void this.raise(na.UnexpectedKeyword,t,{keyword:e});if((this.state.strict?i?eo:Qa:Ya)(e,this.inModule))this.raise(na.UnexpectedReservedWord,t,{reservedWord:e});else if("yield"===e){if(this.prodParam.hasYield)return void this.raise(na.YieldBindingIdentifier,t)}else if("await"===e){if(this.prodParam.hasAwait)return void this.raise(na.AwaitBindingIdentifier,t);if(this.scope.inStaticBlock)return void this.raise(na.AwaitBindingIdentifierInStaticBlock,t);this.expressionScope.recordAsyncArrowParametersError(t)}else if("arguments"===e&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(na.ArgumentsInClass,t)}recordAwaitIfAllowed(){const e=this.prodParam.hasAwait;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e,t){const s=e.index;this.setLoc(e);const i=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(na.AwaitExpressionFormalParameter,s),this.eat(51)&&this.raise(na.ObsoleteAwaitStar,e),this.scope.inFunction||1&this.optionFlags||(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),t||(i.argument=this.parseMaybeUnary(null,!0)),this.finishNode(i,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;const{type:e}=this.state;return 49===e||6===e||0===e||Oa(e)||98===e&&!this.state.containsEsc||133===e||52===e||this.hasPlugin("v8intrinsic")&&50===e}parseYield(e){this.setLoc(e);const t=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError(na.YieldInParameter,e.index);let s=!1,i=null;if(!this.hasPrecedingLineBreak())switch(s=this.eat(51),this.state.type){case 9:case 135:case 4:case 7:case 1:case 5:case 10:case 8:if(!s)break;default:i=this.parseMaybeAssign()}return t.delegate=s,t.argument=i,this.finishNode(t,"YieldExpression")}parseImportCall(e){this.next();const t=this.parseCallExpressionArguments();if(0===t.length||t.length>2)this.raise(na.ImportCallArity,e,e);else for(const s of t)"SpreadElement"===s.type&&this.raise(na.ImportCallSpreadArgument,s,e);return e.source=t[0],e.options=t[1]??null,this.finishNode(e,"ImportExpression")}withTopicBindingContext(e){const t=this.state.inHackPipelineBody;this.state.inHackPipelineBody=!0;const s=this.state.seenTopicReference;this.state.seenTopicReference=!1;try{return e()}finally{this.state.inHackPipelineBody=t,this.state.seenTopicReference=s}}allowInAnd(e){const t=this.prodParam.currentFlags();if(24&~t){this.prodParam.enter(24|t);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){const t=this.prodParam.currentFlags();if(8&t||16&~t){this.prodParam.enter(-9&t|16);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.seenTopicReference=!0}topicReferenceIsAllowedInCurrentContext(){return this.state.inHackPipelineBody}topicReferenceWasUsedInCurrentContext(){return this.state.seenTopicReference}parseFSharpPipelineBody(e){const t=this.state.startLoc;let s;if(this.prodParam.enter(-17&this.prodParam.currentFlags()),this.isContextual(92)&&this.recordAwaitIfAllowed()){this.next(),s=this.parseAwait(t,!0);const e=this.state.type;Na(e)&&35!==e&&(this.prodParam.hasIn||54!==e)&&this.raise(na.PipelineUnparenthesized,t)}else this.state.canStartArrow=!0,s=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.prodParam.exit(),s}parseModuleExpression(){this.expectPlugin("moduleBlocks");const e=this.startNode();this.next(),this.match(2)||this.unexpected(null,2);const t=this.startNodeAt(this.state.endLoc);this.next();const s=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,4,"module")}finally{s()}return this.finishNode(e,"ModuleExpression")}parseVoidPattern(e){this.expectPlugin("discardBinding");const t=this.startNode();return null!=e&&(e.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(t,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(e,t,s){if(null!=t&&this.match(84)){const s=this.lookaheadCharCode();if(44===s||s===(1===e?93:4===e?125:41)||61===s)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(t))}return this.parseMaybeAssignAllowIn(t,s)}parsePropertyNamePrefixOperator(e){}}const ac={kind:1},oc={kind:2},cc=/[\uD800-\uDFFF]/u,hc=/in(?:stanceof)?/y;function lc(e){for(let t=0;t<e.length;t++){const s=e[t],{type:i}=s;"number"==typeof i&&(s.type=Fa(i))}return e}class pc extends rc{parseTopLevel(e,t){return e.program=this.parseProgram(t,135,"module"===this.options.sourceType?"module":"script"),e.comments=this.comments,512&this.optionFlags&&(e.tokens=lc(this.tokens)),this.finishNode(e,"File")}parseProgram(e,t,s){if(e.sourceType=s,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule){if(!(64&this.optionFlags)&&this.scope.undefinedExports.size>0)for(const[e,t]of Array.from(this.scope.undefinedExports))this.raise(na.ModuleExportUndefined,t,{localName:e});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let i;return i=135===t?this.finishNode(e,"Program"):this.finishNodeAt(e,"Program",zr(this.state.startLoc,-1)),i}stmtToDirective(e){const t=this.castNodeTo(e,"Directive"),s=this.castNodeTo(e.expression,"DirectiveLiteral"),i=s.value,n=this.input.slice(this.offsetToSourcePos(s.start),this.offsetToSourcePos(s.end)),r=s.value=n.slice(1,-1);return this.addExtra(s,"raw",n),this.addExtra(s,"rawValue",r),this.addExtra(s,"expressionValue",i),t.value=s,delete e.expression,t}parseInterpreterDirective(){if(!this.match(24))return null;const e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return!!this.isContextual(96)&&this.hasFollowingBindingAtom()}isUsing(){return!!this.isContextual(103)&&this.nextTokenIsIdentifierOnSameLine()}isForUsing(){if(!this.isContextual(103))return!1;const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);if(this.isUnparsedContextual(e,"of")){const t=this.lookaheadCharCodeSince(e+2);if(61!==t&&58!==t&&59!==t)return!1}return!(!this.chStartsBindingIdentifier(t,e)&&!this.isUnparsedContextual(e,"void"))}nextTokenIsIdentifierOnSameLine(){const 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);const t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return!0}return!1}chStartsBindingIdentifier(e,t){if(Ha(e)){if(hc.lastIndex=t,hc.test(this.input)){const e=this.codePointAtPos(hc.lastIndex);if(!Ka(e)&&92!==e)return!1}return!0}return 92===e}chStartsBindingPattern(e){return 91===e||123===e}hasFollowingBindingAtom(){const e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifierOrBrace(){const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return 123===t||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){const s=this.state.type,i=this.startNode(),n=!!(2&e),r=!!(4&e),a=1&e;switch(s){case 56:return this.parseBreakContinueStatement(i,!0);case 59:return this.parseBreakContinueStatement(i,!1);case 60:return this.parseDebuggerStatement(i);case 86:return this.parseDoWhileStatement(i);case 87:return this.parseForStatement(i);case 64:if(46===this.lookaheadCharCode())break;return r||this.raise(this.state.strict?na.StrictFunction:this.options.annexB?na.SloppyFunctionAnnexB:na.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(i,!1,!n&&r);case 76:return n||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,i),!0);case 65:return this.parseIfStatement(i);case 66:return this.parseReturnStatement(i);case 67:return this.parseSwitchStatement(i);case 68:return this.parseThrowStatement(i);case 69:return this.parseTryStatement(i);case 92:if(this.isAwaitUsing())return this.allowsUsing()?n?this.recordAwaitIfAllowed()||this.raise(na.AwaitUsingNotInAsyncContext,i):this.raise(na.UnexpectedLexicalDeclaration,i):this.raise(na.UnexpectedUsingDeclaration,i),this.next(),this.parseVarStatement(i,"await using");break;case 103:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?n||this.raise(na.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(na.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 96:{if(this.state.containsEsc)break;const e=this.nextTokenStart(),t=this.codePointAtPos(e);if(91!==t){if(!n&&this.hasFollowingLineBreak())break;if(!this.chStartsBindingIdentifier(t,e)&&123!==t)break}}case 71:n||this.raise(na.UnexpectedLexicalDeclaration,this.state.startLoc);case 70:{const e=this.state.value;return this.parseVarStatement(i,e)}case 88:return this.parseWhileStatement(i);case 72:return this.parseWithStatement(i);case 2:return this.parseBlock();case 9:return this.parseEmptyStatement(i);case 79:{const e=this.lookaheadCharCode();if(40===e||46===e)break}case 78:{let e;return 8&this.optionFlags||a||this.raise(na.UnexpectedImportExport,this.state.startLoc),this.next(),e=79===s?this.parseImport(i):this.parseExport(i,t),this.assertModuleNodeAllowed(e),e}default:if(this.isAsyncFunction())return n||this.raise(na.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!n&&r)}const o=this.state.value,c=this.parseExpression();return Ca(s)&&"Identifier"===c.type&&this.eat(10)?this.parseLabeledStatement(i,o,c,e):this.parseExpressionStatement(i,c)}assertModuleNodeAllowed(e){8&this.optionFlags||this.inModule||this.raise(na.ImportOutsideModule,e)}maybeTakeDecorators(e,t,s){return e&&(t.decorators?.length?(this.raise(na.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),s&&this.resetStartLocationFromNode(s,t)),t}canHaveLeadingDecorator(){return this.match(76)}parseDecorators(e){const t=[];do{t.push(this.parseDecorator())}while(this.match(22));if(this.match(78))e||this.unexpected();else if(!this.canHaveLeadingDecorator())throw this.raise(na.UnexpectedLeadingDecorator,this.state.startLoc);return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const e=this.startNode();if(this.next(),this.hasPlugin("decorators")){const t=this.state.startLoc;let s;if(this.match(6)){const t=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(7),s=this.wrapParenthesis(t,s);const i=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(s,t),e.expression!==s&&this.raise(na.DecoratorArgumentsOutsideParentheses,i)}else{for(s=this.parseIdentifier(!1);this.eat(12);){const e=this.startNodeAt(t);e.object=s,this.match(134)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),e.property=this.parsePrivateName()):e.property=this.parseIdentifier(!0),e.computed=!1,s=this.finishNode(e,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(s,t)}}else this.state.canStartArrow=!1,e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e,t){if(this.eat(6)){const s=this.startNodeAt(t);return s.callee=e,s.arguments=this.parseCallExpressionArguments(),this.toReferencedList(s.arguments),this.finishNode(s,"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 s;for(s=0;s<this.state.labels.length;++s){const i=this.state.labels[s];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(t||1===i.kind))break;if(e.label&&t)break}}if(s===this.state.labels.length){const s=t?"BreakStatement":"ContinueStatement";this.raise(na.IllegalBreakContinue,e,{type:s})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(6);const e=this.parseExpression();return this.expect(7),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(ac),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(ac);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 null!==t&&this.unexpected(t),this.parseFor(e,null);const s=this.isContextual(96);{const i=this.isAwaitUsing(),n=i||this.isForUsing(),r=s&&this.hasFollowingBindingAtom()||n;if(this.match(70)||this.match(71)||r){const s=this.startNode();let r;i?(r="await using",this.recordAwaitIfAllowed()||this.raise(na.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):r=this.state.value,this.next(),this.parseVar(s,!0,r);const a=this.finishNode(s,"VariableDeclaration"),o=this.match(54);return o&&n&&this.raise(na.ForInUsing,a),(o||this.isContextual(98))&&1===a.declarations.length?this.parseForX(e,a,t):(null!==t&&this.unexpected(t),this.parseFor(e,a))}}const i=this.isContextual(91),n=new Zo,r=this.parseExpression(!0,n),a=this.isContextual(98);if(a&&(s&&this.raise(na.ForOfLet,r),null===t&&i&&"Identifier"===r.type&&this.raise(na.ForOfAsync,r)),a||this.match(54)){this.checkDestructuringPrivate(n),this.toAssignable(r,!0);const s=a?"ForOfStatement":"ForInStatement";return this.checkLVal(r,{type:s}),this.parseForX(e,r,t)}return this.checkExpressionErrors(n,!0),null!==t&&this.unexpected(t),this.parseFor(e,r)}parseFunctionStatement(e,t,s){return this.next(),this.parseFunction(e,1|(s?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(na.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();const t=e.cases=[];let s;this.expect(2),this.state.labels.push(oc),this.scope.enter(256);for(let e;!this.match(4);)if(this.match(57)||this.match(61)){const i=this.match(57);s&&this.finishNode(s,"SwitchCase"),t.push(s=this.startNode()),s.consequent=[],this.next(),i?s.test=this.parseExpression():(e&&this.raise(na.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),e=!0,s.test=null),this.expect(10)}else s?s.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(na.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){const e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&"Identifier"===e.type?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(58)){const 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(na.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,s=!1){return this.next(),this.parseVar(e,!1,t,s),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(ac),e.body=this.parseStatement(),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(na.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,s,i){for(const e of this.state.labels)e.name===t&&this.raise(na.LabelRedeclaration,s,{labelName:t});const n=(r=this.state.type)>=86&&r<=88?1:this.match(67)?2:null;var r;for(let t=this.state.labels.length-1;t>=0;t--){const s=this.state.labels[t];if(s.statementStart!==e.start)break;s.statementStart=this.sourceToOffsetPos(this.state.start),s.kind=n}return this.state.labels.push({name:t,kind:n,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=8&i?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=s,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,s){const i=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(2),t&&this.scope.enter(0),this.parseBlockBody(i,e,!1,4,s),t&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized}parseBlockBody(e,t,s,i,n){const r=e.body=[],a=e.directives=[];this.parseBlockOrModuleBlockBody(r,t?a:void 0,s,i,n)}parseBlockOrModuleBlockBody(e,t,s,i,n){const r=this.state.strict;let a=!1,o=!1;for(;!this.match(i);){const i=s?this.parseModuleItem():this.parseStatementListItem();if(t&&!o){if(this.isValidDirective(i)){const e=this.stmtToDirective(i);t.push(e),a||"use strict"!==e.value.value||(a=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}e.push(i)}n?.call(this,a),r||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")}parseForX(e,t,s){const i=this.match(54);return this.next(),i?null!==s&&this.unexpected(s):e.await=null!==s,"VariableDeclaration"!==t.type||null==t.declarations[0].init||i&&this.options.annexB&&!this.state.strict&&"var"===t.kind&&"Identifier"===t.declarations[0].id.type||this.raise(na.ForInOfLoopInitializer,t,{type:i?"ForInStatement":"ForOfStatement"}),"AssignmentPattern"===t.type&&this.raise(na.InvalidLhs,t,{ancestor:{type:"ForStatement"}}),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(7),e.body=this.parseStatement(),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")}parseVar(e,t,s,i=!1){const n=e.declarations=[];for(e.kind=s;;){const e=this.startNode();if(this.parseVarId(e,s),e.init=this.eat(25)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,null!==e.init||i||("Identifier"===e.id.type||t&&(this.match(54)||this.isContextual(98))?"const"!==s&&"using"!==s&&"await using"!==s||this.match(54)||this.isContextual(98)||this.raise(na.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:s}):this.raise(na.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"})),n.push(this.finishNode(e,"VariableDeclarator")),!this.eat(8))break}return e}parseVarId(e,t){const s=this.parseBindingAtom();"using"===t||"await using"===t?"ArrayPattern"!==s.type&&"ObjectPattern"!==s.type||this.raise(na.UsingDeclarationHasBindingPattern,s):"VoidPattern"===s.type&&this.raise(na.UnexpectedVoidPattern,s),this.checkLVal(s,{type:"VariableDeclarator"},"var"===t?5:8201),e.id=s}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){const s=2&t,i=!!(1&t),n=i&&!(4&t),r=!!(8&t);return this.initFunction(e,r),this.match(51)&&(s&&this.raise(na.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),i&&(e.id=this.parseFunctionId(n)),this.scope.enter(514),this.prodParam.enter(Yo(r,e.generator)),!i&&Ca(this.state.type)&&(this.expressionScope.enter(Xo()),e.id=this.parseFunctionId(),this.expressionScope.exit()),this.parseFunctionParams(e,!1),this.parseFunctionBodyAndFinish(e,i?"FunctionDeclaration":"FunctionExpression"),this.prodParam.exit(),this.scope.exit(),i&&!s&&this.registerFunctionStatementId(e),e}parseFunctionId(e){return e||Ca(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(6),this.expressionScope.enter(new zo(3)),e.params=this.parseBindingList(7,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.start)}parseClass(e,t,s){this.next();const i=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,s),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,i),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"Identifier"===e.type&&"constructor"===e.name||"StringLiteral"===e.type&&"constructor"===e.value}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,t){this.classScope.enter();const s={hadConstructor:!1,hadSuperClass:e};let i=[];const n=this.startNode();for(n.body=[],this.expect(2);!this.match(4);){if(this.eat(9)){if(i.length>0)throw this.raise(na.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(22)){i.push(this.parseDecorator());continue}const e=this.startNode();i.length&&(e.decorators=i,this.resetStartLocationFromNode(e,i[0]),i=[]),this.parseClassMember(n,e,s)}if(this.state.strict=t,this.next(),i.length)throw this.raise(na.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(n,"ClassBody")}parseClassMemberFromModifier(e,t){const s=this.parseIdentifier(!0);if(this.isClassMethod()){const i=t;return i.kind="method",i.computed=!1,i.key=s,i.static=!1,this.pushClassMethod(e,i,!1,!1,!1,!1),!0}if(this.isClassProperty()){const i=t;return i.computed=!1,i.key=s,i.static=!1,e.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(e,t,s){const i=this.isContextual(102);if(i){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(2))return void this.parseClassStaticBlock(e,t)}this.parseClassMemberWithIsStatic(e,t,s,i)}parseClassMemberWithIsStatic(e,t,s,i){const n=t,r=t,a=t,o=t,c=t,h=n,l=n;if(t.static=i,this.parsePropertyNamePrefixOperator(t),this.eat(51)){h.kind="method";const t=this.match(134);return this.parseClassElementName(h),this.parsePostMemberNameModifiers(h),t?void this.pushClassPrivateMethod(e,r,!0,!1):(this.isNonstaticConstructor(n)&&this.raise(na.ConstructorIsGenerator,n.key),void this.pushClassMethod(e,n,!0,!1,!1,!1))}const p=!this.state.containsEsc&&Ca(this.state.type),u=this.parseClassElementName(t),d=p?u.name:null,f=this.isPrivateName(u),m=this.state.startLoc;if(this.parsePostMemberNameModifiers(l),this.isClassMethod()){if(h.kind="method",f)return void this.pushClassPrivateMethod(e,r,!1,!1);const i=this.isNonstaticConstructor(n);let a=!1;i&&(n.kind="constructor",n.decorators&&n.decorators.length>0&&this.raise(na.DecoratorConstructor,t),s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(na.DuplicateConstructor,u),i&&this.hasPlugin("typescript")&&t.override&&this.raise(na.OverrideOnConstructor,u),s.hadConstructor=!0,a=s.hadSuperClass),this.pushClassMethod(e,n,!1,!1,i,a)}else if(this.isClassProperty())f?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a);else if("async"!==d||this.isLineTerminator())if("get"!==d&&"set"!==d||this.match(51)&&this.isLineTerminator())if("accessor"!==d||this.isLineTerminator())this.isLineTerminator()?f?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a):this.unexpected();else{this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(u);const t=this.match(134);this.parseClassElementName(a),this.pushClassAccessorProperty(e,c,t)}else{this.resetPreviousNodeTrailingComments(u),h.kind=d;const t=this.match(134);this.parseClassElementName(n),t?this.pushClassPrivateMethod(e,r,!1,!1):(this.isNonstaticConstructor(n)&&this.raise(na.ConstructorIsAccessor,n.key),this.pushClassMethod(e,n,!1,!1,!1,!1)),this.checkGetterSetterParams(n)}else{this.resetPreviousNodeTrailingComments(u);const t=this.eat(51);l.optional&&this.unexpected(m),h.kind="method";const s=this.match(134);this.parseClassElementName(h),this.parsePostMemberNameModifiers(l),s?this.pushClassPrivateMethod(e,r,t,!0):(this.isNonstaticConstructor(n)&&this.raise(na.ConstructorIsAsync,n.key),this.pushClassMethod(e,n,t,!0,!1,!1))}}parseClassElementName(e){const{type:t,value:s}=this.state;if(128!==t&&130!==t||!e.static||"prototype"!==s||this.raise(na.StaticPrototype,this.state.startLoc),134===t){"constructor"===s&&this.raise(na.ConstructorClassPrivateField,this.state.startLoc);const t=this.parsePrivateName();return e.key=t,t}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,t){this.scope.enter(720);const s=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const i=t.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,4),this.prodParam.exit(),this.scope.exit(),this.state.labels=s,e.body.push(this.finishNode(t,"StaticBlock")),t.decorators?.length&&this.raise(na.DecoratorStaticBlock,t)}pushClassProperty(e,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(na.ConstructorClassField,t.key),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){const s=this.parseClassPrivateProperty(t);e.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.start)}pushClassAccessorProperty(e,t,s){s||t.computed||!this.nameIsConstructor(t.key)||this.raise(na.ConstructorClassField,t.key);const i=this.parseClassAccessorProperty(t);e.body.push(i),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.start)}pushClassMethod(e,t,s,i,n,r){e.body.push(this.parseMethod(t,s,i,n,r,"ClassMethod",!0))}pushClassPrivateMethod(e,t,s,i){const n=this.parseMethod(t,s,i,!1,!1,"ClassPrivateMethod",!0);e.body.push(n);const r="get"===n.kind?n.static?6:2:"set"===n.kind?n.static?5:1:0;this.declareClassPrivateMethodInScope(n,r)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(592),this.expressionScope.enter(Xo()),this.prodParam.enter(0),e.value=this.eat(25)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,s,i=8331){if(Ca(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,i);else{if(!s&&t)throw this.raise(na.MissingClassName,this.state.startLoc);e.id=null}}parseClassSuper(e){this.eat(77)?(this.state.canStartArrow=!1,e.superClass=this.parseExprSubscripts()):e.superClass=null}parseExport(e,t){const s=this.parseMaybeImportPhase(e,!0),i=this.maybeParseExportDefaultSpecifier(e,s),n=!i||this.eat(8),r=n&&this.eatExportStar(e),a=r&&this.maybeParseExportNamespaceSpecifier(e),o=n&&(!a||this.eat(8)),c=i||r;if(r&&!a){if(i&&this.unexpected(),t)throw this.raise(na.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.sawUnambiguousESM=!0,this.finishNode(e,"ExportAllDeclaration")}const h=this.maybeParseExportNamedSpecifiers(e);let l;if(i&&n&&!r&&!h&&this.unexpected(null,2),a&&o&&this.unexpected(null,94),c||h){if(l=!1,t)throw this.raise(na.UnsupportedDecoratorExport,e);this.parseExportFrom(e,c)}else l=this.maybeParseExportDeclaration(e);if(c||h||l){const s=e;if(this.checkNamedExport(s,!!s.source),"ClassDeclaration"===s.declaration?.type)this.maybeTakeDecorators(t,s.declaration,s);else if(t)throw this.raise(na.UnsupportedDecoratorExport,e);return this.sawUnambiguousESM=!0,this.finishNode(s,"ExportNamedDeclaration")}if(this.eat(61)){const s=e,i=this.parseExportDefaultExpression();if(s.declaration=i,"ClassDeclaration"===i.type)this.maybeTakeDecorators(t,i,s);else if(t)throw this.raise(na.UnsupportedDecoratorExport,e);return this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")&&("Identifier"!==i.type||"from"!==i.name||i.end-i.start!==4||i.extra?.parenthesized||this.raise(na.ExportDefaultFromAsIdentifier,i)),this.sawUnambiguousESM=!0,this.finishNode(s,"ExportDefaultDeclaration")}throw this.unexpected(null,2)}eatExportStar(e){return this.eat(51)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",t?.start);const s=t||this.parseIdentifier(!0),i=this.startNodeAtNode(s);return i.exported=s,e.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(89)){e.specifiers??=[];const 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)){const t=e;t.specifiers||(t.specifiers=[]);const s="type"===t.exportKind;return t.specifiers.push(...this.parseExportSpecifiers(s)),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)}isAsyncFunction(){if(!this.isContextual(91))return!1;const e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){const 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(na.UnsupportedDefaultExport,this.state.startLoc);const t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){if(this.match(76)){return this.parseClass(this.startNode(),!0,!1)}return this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:e}=this.state;if(Ca(e)){if(91===e&&!this.state.containsEsc||96===e)return!1;if((126===e||125===e)&&!this.state.containsEsc){const e=this.nextTokenStart(),t=this.input.charCodeAt(e);if(123===t||this.chStartsBindingIdentifier(t,e)&&!this.input.startsWith("from",e))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(61))return!1;const t=this.nextTokenStart(),s=this.isUnparsedContextual(t,"from");if(44===this.input.charCodeAt(t)||Ca(this.state.type)&&s)return!0;if(this.match(61)&&s){const e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return 34===e||39===e}return!1}parseExportFrom(e,t){this.eatContextual(94)?(e.source=this.parseImportSource(),this.maybeParseImportAttributes(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:e}=this.state;return!(22!==e||(this.expectOnePlugin(["decorators","decorators-legacy"]),!this.hasPlugin("decorators")))||(this.isUsing()||this.isAwaitUsing()?(this.raise(na.UsingDeclarationExport,this.state.startLoc),!0):70===e||71===e||64===e||76===e||this.isLet()||this.isAsyncFunction())}checkNamedExport(e,t){if(e.specifiers?.length)for(const s of e.specifiers){const{exported:e}=s,i="Identifier"===e.type?e.name:e.value;if(this.checkDuplicateExports(s,i),!t&&"ExportSpecifier"===s.type){const{local:e}=s;"Identifier"!==e.type?this.raise(na.ExportBindingIsString,s,{localName:e.value,exportName:i}):(this.checkReservedWord(e.name,e.start,!0,!1),this.scope.checkLocalExport(e))}}else if(e.declaration){const t=e.declaration;if("FunctionDeclaration"===t.type||"ClassDeclaration"===t.type){const{id:s}=t;if(!s)throw new Error("Assertion failure");this.checkDuplicateExports(e,s.name)}else if("VariableDeclaration"===t.type)for(const e of t.declarations)this.checkDeclaration(e.id)}}checkDeclaration(e){if("Identifier"===e.type)this.checkDuplicateExports(e,e.name);else if("ObjectPattern"===e.type)for(const t of e.properties)this.checkDeclaration(t);else if("ArrayPattern"===e.type)for(const t of e.elements)t&&this.checkDeclaration(t);else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type?this.checkDeclaration(e.argument):"AssignmentPattern"===e.type&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&("default"===t?this.raise(na.DuplicateDefaultExport,e):this.raise(na.DuplicateExport,e,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){const t=[];let s=!0;for(this.expect(2);!this.eat(4);){if(s)s=!1;else if(this.expect(8),this.eat(4))break;const i=this.isContextual(126),n=this.match(130),r=this.startNode();r.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(r,n,e,i))}return t}parseExportSpecifier(e,t,s,i){return this.eatContextual(89)?e.exported=this.parseModuleExportName():t?e.exported=this.cloneStringLiteral(e.local):e.exported||(e.exported=this.cloneIdentifier(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(130)){const e=this.parseStringLiteral(this.state.value),t=cc.exec(e.value);return t&&this.raise(na.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}checkImportPhase(e){const{specifiers:t}=e,s=1===t.length?t[0].type:null;"source"===e.phase?"ImportDefaultSpecifier"!==s&&this.raise(na.SourcePhaseImportRequiresDefault,t[0]):"defer"===e.phase&&"ImportNamespaceSpecifier"!==s&&this.raise(na.DeferImportRequiresNamespace,t[0])}isPotentialImportPhase(e){return!e&&(this.isContextual(101)||this.isContextual(93))}applyImportPhase(e,t,s,i){t||("source"===s?(this.expectPlugin("sourcePhaseImports",i),e.phase="source"):"defer"===s?(this.expectPlugin("deferredImportEvaluation",i),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;const s=this.startNode(),i=this.parseIdentifierName(!0),{type:n}=this.state;return(Pa(n)?94!==n||102===this.lookaheadCharCode():8!==n)?(this.applyImportPhase(e,t,i,s.start),null):(this.applyImportPhase(e,t,null),this.createIdentifier(s,i))}isPrecedingIdImportPhase(e){const{type:t}=this.state;return Ca(t)?94!==t||102===this.lookaheadCharCode():8!==t}parseImport(e){return this.match(130)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];const s=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(8),i=s&&this.maybeParseStarImportSpecifier(e);return s&&!i&&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,s){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,s))}finishImportSpecifier(e,t,s=8201){return this.checkLVal(e.local,{type:t},s),this.finishNode(e,t)}parseImportAttributes(){this.expect(2);const e=[],t=new Set;do{if(this.match(4))break;const s=this.startNode(),i=this.state.value;if(t.has(i)&&this.raise(na.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:i}),t.add(i),this.match(130)?s.key=this.parseStringLiteral(i):s.key=this.parseIdentifier(!0),this.expect(10),!this.match(130))throw this.raise(na.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(8));return this.expect(4),e}maybeParseImportAttributes(e){let t;if(this.match(72)){if(this.hasPrecedingLineBreak()&&40===this.lookaheadCharCode())return;this.next(),t=this.parseImportAttributes()}else t=[];e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){const s=this.startNodeAtNode(t);return s.local=t,e.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}return!!Pa(this.state.type)&&(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0)}maybeParseStarImportSpecifier(e){if(this.match(51)){const 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(na.DestructureNamedImport,this.state.startLoc);if(this.expect(8),this.eat(4))break}const s=this.startNode(),i=this.match(130),n=this.isContextual(126);s.imported=this.parseModuleExportName();const r=this.parseImportSpecifier(s,i,"type"===e.importKind||"typeof"===e.importKind,n,void 0);e.specifiers.push(r)}}parseImportSpecifier(e,t,s,i,n){if(this.eatContextual(89))e.local=this.parseIdentifier();else{const{imported:s}=e;if(t)throw this.raise(na.ImportBindingIsString,e,{importName:s.value});this.checkReservedWord(s.name,e.start,!0,!0),e.local||(e.local=this.cloneIdentifier(s))}return this.finishImportSpecifier(e,"ImportSpecifier",n)}isThisParam(e){return"Identifier"===e.type&&"this"===e.name}}const uc=/in(?:stanceof)?|as|satisfies/y;function dc(e){if(!e)throw new Error("Assert fail")}const fc=ia`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.",DeclaratorDefiniteAssertionRequiresTypeAnnotation:"Declarations with definite assignment assertions must also have type annotations.",DeclaratorDefiniteAssertionWithInitializer:"Declarations with initializers cannot also have definite assignment assertions.",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.",DecoratorAbstractMethod:({kind:e})=>`Decorators can't be used with ${e.startsWith("a")?"an":"a"} ${e}.`,DuplicateAccessibilityModifier:({modifier:e})=>`Accessibility modifier already seen: '${e}'.`,DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyNamespaceName:"Namespace must be given a name.",EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ExportAssignmentInTSNamespace:"An export assignment cannot be used in a namespace.",ExportInTSNamespace:"Export declarations are not permitted in a namespace.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportInTSNamespace:"Import declarations in a namespace cannot reference a module.",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InlineModuleDeclarationMustUseString:"`module ... {}` declarations must have a string name. Use `namespace ... {}` instead.",InvalidHeritageClauseType:({token:e})=>`'${e}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:e=>`'${e}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:e=>`'${e}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidNamespaceName:e=>`Namespace name cannot be '${e}'.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NamespaceExportInTSNamespace:"Global module exports may only appear at top level.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterInitializer:"A parameter initializer is only allowed in a function or constructor implementation.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnexpectedTypeDeclaration:e=>`'${e}' declarations can only be declared inside a block.`,UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`,UsingDeclarationInAmbientContext:e=>`'${e}' declarations are not allowed in ambient contexts.`});function mc(e){return"private"===e||"public"===e||"protected"===e}function yc(e){return"in"===e||"out"===e}function xc(e){if(e.extra?.parenthesized)return!1;switch(e.type){case"Identifier":return!0;case"MemberExpression":return!e.computed&&xc(e.object);case"TSInstantiationExpression":return xc(e.expression);default:return!1}}const gc=Pc(["declare","private","public","protected","override","abstract","readonly","static"],["in","out"]),kc=Pc(["readonly"],["declare","abstract","private","protected","public","static","override"]),Tc=Pc(["public","private","protected","override","readonly"]),bc=Pc(["private","public","protected"]);function Sc(e){if("MemberExpression"!==e.type)return!1;const{computed:t,property:s}=e;return(!t||"StringLiteral"===s.type||!("TemplateLiteral"!==s.type||s.expressions.length>0))&&Cc(e.object)}function wc(e,t){const{type:s}=e;if(e.extra?.parenthesized)return!1;if(t){if("Literal"===s){const{value:t}=e;if("string"==typeof t||"boolean"==typeof t)return!0}}else if("StringLiteral"===s||"BooleanLiteral"===s)return!0;return!(!vc(e,t)&&!function(e,t){if("UnaryExpression"===e.type){const{operator:s,argument:i}=e;if("-"===s&&vc(i,t))return!0}return!1}(e,t))||("TemplateLiteral"===s&&0===e.expressions.length||!!Sc(e))}function vc(e,t){return t?"Literal"===e.type&&("number"==typeof e.value||"bigint"in e):"NumericLiteral"===e.type||"BigIntLiteral"===e.type}function Cc(e){return"Identifier"===e.type||"MemberExpression"===e.type&&!e.computed&&Cc(e.object)}function Pc(e,t=[]){const s=new Map;for(const t of e)s.set(t,!0);for(const e of t)s.set(e,!1);return s}const Ec=ia`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),Ac=["fsharp","hack"],Ic=["^^","@@","^","%","#"];const _c={estree:e=>class extends e{createPosition(e){return new Hr(e.line,e.column)}parse(){const e=super.parse();return 512&this.optionFlags&&(e.tokens=e.tokens.map(ra)),ra(e)}parseRegExpLiteral({pattern:e,flags:t}){let s=null;try{s=new RegExp(e,t)}catch(e){}const i=this.estreeParseLiteral(s);return i.regex={pattern:e,flags:t},i}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}const s=this.estreeParseLiteral(t);return s.bigint=null!==s.value?String(s.value):e,s}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){const s=this.startNodeAtNode(e);return s.expression=e,this.finishNodeAtNode(s,"ChainExpression",t)}directiveToStmt(e){const t=e.value;delete e.value,this.castNodeTo(t,"Literal"),t.raw=t.extra.raw,t.value=t.extra.expressionValue;const s=this.castNodeTo(e,"ExpressionStatement");return s.expression=t,s.directive=t.extra.rawValue,delete t.extra,s}fillOptionalPropertiesForTSESLint(e){}cloneEstreeStringLiteral(e){const{start:t,end:s,loc:i,range:n,raw:r,value:a}=e,o=Object.create(e.constructor.prototype);return o.type="Literal",o.start=t,o.end=s,o.loc=i,o.range=n,o.raw=r,o.value=a,o}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){null!=e&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&!e.expression.extra?.parenthesized}parseBlockBody(e,t,s,i,n){super.parseBlockBody(e,t,s,i,n);const r=e.directives.map(e=>this.directiveToStmt(e));e.body=r.concat(e.body),delete e.directives}parsePrivateName(){const e=super.parsePrivateName();return this.convertPrivateNameToPrivateIdentifier(e)}convertPrivateNameToPrivateIdentifier(e){const t=super.getPrivateNameSV(e);return delete e.id,e.name=t,this.castNodeTo(e,"PrivateIdentifier")}isPrivateName(e){return"PrivateIdentifier"===e.type}getPrivateNameSV(e){return e.name}parseLiteral(e,t){const s=super.parseLiteral(e,t);return s.raw=s.extra.raw,delete s.extra,s}parseFunctionBody(e,t,s=!1){super.parseFunctionBody(e,t,s),e.expression="BlockStatement"!==e.body.type}parseMethod(e,t,s,i,n,r,a=!1){let o=this.startNode();o.kind=e.kind,o=super.parseMethod(o,t,s,i,n,r,a),delete o.kind;const{typeParameters:c}=e;c&&(delete e.typeParameters,o.typeParameters=c,this.resetStartLocationFromNode(o,c));const h=this.castNodeTo(o,this.hasPlugin("typescript")&&!o.body?"TSEmptyBodyFunctionExpression":"FunctionExpression");return e.value=h,"ClassPrivateMethod"===r&&(e.computed=!1),this.hasPlugin("typescript")&&e.abstract?(delete e.abstract,this.finishNode(e,"TSAbstractMethodDefinition")):"ObjectMethod"===r?("method"===e.kind&&(e.kind="init"),e.shorthand=!1,this.finishNode(e,"Property")):this.finishNode(e,"MethodDefinition")}nameIsConstructor(e){return"Literal"===e.type?"constructor"===e.value:super.nameIsConstructor(e)}parseClassProperty(...e){const t=super.parseClassProperty(...e);return t.abstract&&this.hasPlugin("typescript")?(delete t.abstract,this.castNodeTo(t,"TSAbstractPropertyDefinition")):this.castNodeTo(t,"PropertyDefinition"),t}parseClassPrivateProperty(...e){const t=super.parseClassPrivateProperty(...e);return t.abstract&&this.hasPlugin("typescript")?this.castNodeTo(t,"TSAbstractPropertyDefinition"):this.castNodeTo(t,"PropertyDefinition"),t.computed=!1,t}parseClassAccessorProperty(e){const 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,s,i){const n=super.parseObjectProperty(e,t,s,i);return n&&(n.kind="init",this.castNodeTo(n,"Property")),n}finishObjectProperty(e){return e.kind="init",this.finishNode(e,"Property")}isValidLVal(e,t,s,i){return"Property"===e?"value":super.isValidLVal(e,t,s,i)}isAssignable(e,t){return null!=e&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(null!=e&&this.isObjectProperty(e)){const{key:s,value:i}=e;this.isPrivateName(s)&&this.classScope.usePrivateName(this.getPrivateNameSV(s),s.start),this.toAssignable(i,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,s){"Property"!==e.type||"get"!==e.kind&&"set"!==e.kind?"Property"===e.type&&e.method?this.raise(na.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,t,s):this.raise(na.PatternHasAccessor,e.key)}finishCallExpression(e,t){const s=super.finishCallExpression(e,t);return"Import"===s.callee.type?(this.castNodeTo(s,"ImportExpression"),s.source=s.arguments[0],s.options=s.arguments[1]??null,delete s.arguments,delete s.callee):"OptionalCallExpression"===s.type?this.castNodeTo(s,"CallExpression"):s.optional=!1,s}parseExport(e,t){const s=this.state.lastTokStartLoc,i=super.parseExport(e,t);switch(i.type){case"ExportAllDeclaration":i.exported=null;break;case"ExportNamedDeclaration":1===i.specifiers.length&&"ExportNamespaceSpecifier"===i.specifiers[0].type&&(this.castNodeTo(i,"ExportAllDeclaration"),i.exported=i.specifiers[0].exported,delete i.specifiers);case"ExportDefaultDeclaration":{const{declaration:e}=i;"ClassDeclaration"===e?.type&&e.decorators?.length>0&&e.start===i.start&&this.resetStartLocation(i,s)}}return i}stopParseSubscript(e,t){const s=super.stopParseSubscript(e,t);return t.optionalChainMember?this.estreeParseChainExpression(s,e):s}parseMember(e,t,s,i,n){const r=super.parseMember(e,t,s,i,n);return"OptionalMemberExpression"===r.type?this.castNodeTo(r,"MemberExpression"):r.optional=!1,r}isOptionalMemberExpression(e){return"ChainExpression"===e.type?"MemberExpression"===e.expression.type:super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return"ChainExpression"===e.type&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return"Property"===e.type&&"init"===e.kind&&!e.method}isObjectMethod(e){return"Property"===e.type&&(e.method||"get"===e.kind||"set"===e.kind)}castNodeTo(e,t){const s=super.castNodeTo(e,t);return this.fillOptionalPropertiesForTSESLint(s),s}cloneIdentifier(e){const t=super.cloneIdentifier(e);return this.fillOptionalPropertiesForTSESLint(t),t}cloneStringLiteral(e){return"Literal"===e.type?this.cloneEstreeStringLiteral(e):super.cloneStringLiteral(e)}finishNodeAt(e,t,s){return ra(super.finishNodeAt(e,t,s))}finishNodeAtNode(e,t,s){return ra(super.finishNodeAtNode(e,t,s))}finishNode(e,t){const s=super.finishNode(e,t);return this.fillOptionalPropertiesForTSESLint(s),s}resetStartLocation(e,t){super.resetStartLocation(e,t),ra(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),ra(e)}},jsx:e=>class extends e{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(ko.UnterminatedJsxContent,this.state.startLoc);const s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:return this.state.pos===this.state.start?void(60===s&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(138)):super.getTokenFromCode(s)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(137,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;case 62:case 125:this.raise(ko.UnexpectedToken,this.state.curPosition(),{unexpected:this.input[this.state.pos],HTMLEntity:125===s?"&rbrace;":"&gt;"});default:fo(s)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){const t=this.input.charCodeAt(this.state.pos);let s;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,s=e?"\n":"\r\n"):s=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,s}jsxReadString(e){let t="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(na.UnterminatedString,this.state.startLoc);const i=this.input.charCodeAt(this.state.pos);if(i===e)break;38===i?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadEntity(),s=this.state.pos):fo(i)?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}t+=this.input.slice(s,this.state.pos++),this.finishToken(130,t)}jsxReadEntity(){const e=++this.state.pos;if(35===this.codePointAtPos(this.state.pos)){++this.state.pos;let e=10;120===this.codePointAtPos(this.state.pos)&&(e=16,++this.state.pos);const t=this.readInt(e,void 0,!1,"bail");if(null!==t&&t<=1114111&&59===this.codePointAtPos(this.state.pos))return++this.state.pos,String.fromCodePoint(t)}else{let t=0,s=!1;for(;t++<10&&this.state.pos<this.length&&!(s=59===this.codePointAtPos(this.state.pos));)++this.state.pos;if(s){const t=this.input.slice(e,this.state.pos),s=po[t];if(++this.state.pos,s)return s}}return this.state.pos=e,"&"}jsxReadWord(){let e;const t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(Ka(e)||45===e);this.finishToken(136,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){const e=this.startNode();return this.match(136)?e.name=this.state.value:_a(this.state.type)?e.name=Da(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){const e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(10))return t;const s=this.startNodeAt(e);return s.namespace=t,s.name=this.jsxParseIdentifier(),this.finishNode(s,"JSXNamespacedName")}jsxParseElementName(){const e=this.state.startLoc;let t=this.jsxParseNamespacedName();if("JSXNamespacedName"===t.type)return t;for(;this.eat(12);){const s=this.startNodeAt(e);s.object=t,s.property=this.jsxParseIdentifier(),t=this.finishNode(s,"JSXMemberExpression")}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 2:return e=this.startNode(),this.setContext(Ba.brace),this.next(),e=this.jsxParseExpressionContainer(e,Ba.j_oTag),"JSXEmptyExpression"===e.expression.type&&this.raise(ko.AttributeIsEmpty,e),e;case 138:case 130:return this.parseExprAtom();default:throw this.raise(ko.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){const 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(Ba.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{const t=this.parseExpression();"SequenceExpression"!==t.type||t.extra?.parenthesized||this.raise(ko.UnexpectedSequenceExpression,t.expressions[1]),e.expression=t}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){if(this.match(2)){const e=this.startNode();return this.setContext(Ba.brace),this.next(),this.expect(17),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(Ba.j_oTag),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(e,"JSXSpreadAttribute")}const e=this.startNode();return e.name=this.jsxParseNamespacedName(),e.value=this.eat(25)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute")}jsxParseOpeningElementAt(e){if(this.eat(139)){const t=this.startNodeAt(e);return this.finishNode(t,"JSXOpeningFragment")}const t=this.startNodeAt(e);return t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t)}jsxParseOpeningElementAfterName(e){const t=[];for(;!this.match(52)&&!this.match(139);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(52),this.expect(139),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){if(this.eat(139)){const t=this.startNodeAt(e);return this.finishNode(t,"JSXClosingFragment")}const t=this.startNodeAt(e);return t.name=this.jsxParseElementName(),this.expect(139),this.finishNode(t,"JSXClosingElement")}jsxParseElementAt(e){const t=this.startNodeAt(e),s=[],i=this.jsxParseOpeningElementAt(e);let n=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case 138:if(e=this.state.startLoc,this.next(),this.eat(52)){this.setLoc(e),n=this.jsxParseClosingElementAt(e);break e}s.push(this.jsxParseElementAt(e));break;case 137:s.push(this.parseLiteral(this.state.value,"JSXText"));break;case 2:{const e=this.startNode();this.setContext(Ba.brace),this.next(),this.match(17)?s.push(this.jsxParseSpreadChild(e)):s.push(this.jsxParseExpressionContainer(e,Ba.j_expr));break}default:this.unexpected()}To(i)&&!To(n)&&null!==n?this.raise(ko.MissingClosingTagFragment,n):!To(i)&&To(n)?this.raise(ko.MissingClosingTagElement,n,{openingTagName:bo(i.name)}):To(i)||To(n)||bo(n.name)!==bo(i.name)&&this.raise(ko.MissingClosingTagElement,n,{openingTagName:bo(i.name)})}if(To(i)?(t.openingFragment=i,t.closingFragment=n):(t.openingElement=i,t.closingElement=n),t.children=s,this.match(43))throw this.raise(ko.UnwrappedAdjacentJSXElements,this.state.startLoc);return To(i)?this.finishNode(t,"JSXFragment"):this.finishNode(t,"JSXElement")}jsxParseElement(){const e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){const{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(138)?this.jsxParseElement():this.match(43)&&33!==this.input.charCodeAt(this.state.pos)?(this.replaceToken(138),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){const t=this.curContext();if(t!==Ba.j_expr){if(t===Ba.j_oTag||t===Ba.j_cTag){if(Ha(e))return void this.jsxReadWord();if(62===e)return++this.state.pos,void this.finishToken(139);if((34===e||39===e)&&t===Ba.j_oTag)return void this.jsxReadString(e)}if(60===e&&this.state.canStartJSXElement&&33!==this.input.charCodeAt(this.state.pos+1))return++this.state.pos,void this.finishToken(138);super.getTokenFromCode(e)}else this.jsxReadToken()}updateContext(e){const{context:t,type:s}=this.state;if(52===s&&138===e)t.splice(-2,2,Ba.j_cTag),this.state.canStartJSXElement=!1;else if(138===s)t.push(Ba.j_oTag);else if(139===s){const s=t[t.length-1];s===Ba.j_oTag&&52===e||s===Ba.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===Ba.j_expr):(this.setContext(Ba.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=ka[s]}},flow:e=>class extends e{flowPragma=void 0;getScopeHandler(){return ro}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}finishToken(e,t){130!==e&&9!==e&&24!==e&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(void 0===this.flowPragma){const t=lo.exec(e.value);if(t)if("flow"===t[1])this.flowPragma="flow";else{if("noflow"!==t[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else;}super.addComment(e)}flowParseTypeInitialiser(e){const t=this.state.inType;this.state.inType=!0,this.expect(e||10);const s=this.flowParseType();return this.state.inType=t,s}flowParsePredicate(){const e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(106),this.state.lastTokStartLoc.index>t.index+1&&this.raise(oo.UnexpectedSpaceBetweenModuloChecks,t),this.eat(6)?(e.value=super.parseExpression(),this.expect(7),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(e){const t=this.state.inType;this.state.inType=!0,this.expect(10);let s=null,i=null;return e&&this.match(50)?(this.state.inType=t,i=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=t,this.match(50)&&(i=this.flowParsePredicate())),[s,i]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();const t=e.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.match(43)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(6);const n=this.flowParseFunctionTypeParams();return s.params=n.params,s.rest=n.rest,s.this=n._this,this.expect(7),[s.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(!1),i.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){if(this.match(76))return this.flowParseDeclareClass(e);if(this.match(64))return this.flowParseDeclareFunction(e);if(this.match(70))return this.flowParseDeclareVariable(e);if(this.eatContextual(123))return this.match(12)?this.flowParseDeclareModuleExports(e):(t&&this.raise(oo.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(126))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(127))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(125))return this.flowParseDeclareInterface(e);if(this.match(78))return this.flowParseDeclareExportDeclaration(e,t);throw this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.scope.declareName(e.id.name,5,e.id.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(130)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();const t=this.startNode(),s=t.body=[];for(this.expect(2);!this.match(4);){const e=this.startNode();this.match(79)?(this.next(),this.isContextual(126)||this.match(83)||this.raise(oo.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),s.push(super.parseImport(e))):(this.expectContextual(121,oo.UnsupportedStatementInDeclareModule),s.push(this.flowParseDeclare(e,!0)))}this.scope.exit(),this.expect(4),e.body=this.finishNode(t,"BlockStatement");let i=null,n=!1;return s.forEach(e=>{!function(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}(e)?"DeclareModuleExports"===e.type&&(n&&this.raise(oo.DuplicateDeclareModuleExports,e),"ES"===i&&this.raise(oo.AmbiguousDeclareModuleKind,e),i="CommonJS",n=!0):("CommonJS"===i&&this.raise(oo.AmbiguousDeclareModuleKind,e),i="ES")}),e.kind=i||"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){const e=this.state.value;throw this.raise(oo.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:e,suggestion:ho[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)){const t=this.parseExport(e,null);return"ExportNamedDeclaration"===t.type?(t.default=!1,delete t.exportKind,this.castNodeTo(t,"DeclareExportDeclaration")):this.castNodeTo(t,"DeclareExportAllDeclaration")}throw this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(107),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();const t=this.flowParseTypeAlias(e);return this.castNodeTo(t,"DeclareTypeAlias"),t}flowParseDeclareOpaqueType(e){return this.next(),this.flowParseOpaqueType(e,!0)}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:8201,e.id.start),this.match(43)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(77))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(8));if(t){const t=[],s=[];if(this.eatContextual(113))do{s.push(this.flowParseInterfaceExtends())}while(this.eat(8));if(this.eatContextual(109))do{t.push(this.flowParseClassImplements())}while(this.eat(8));e.implements=t,e.mixins=s}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){const 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(oo.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,t,s){ao.has(e)&&this.raise(s?oo.AssignReservedType:oo.UnexpectedReservedType,t,{reservedType:e})}flowParseRestrictedIdentifierName(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifierName(e)}flowParseRestrictedIdentifier(e,t){const s=this.startNode(),i=this.flowParseRestrictedIdentifierName(e,t);return this.createIdentifier(s,i)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.start),this.match(43)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(25),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual(126),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.start),this.match(43)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(10)&&(e.supertype=this.flowParseTypeInitialiser(10)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(25)),this.semicolon(),this.finishNode(e,t?"DeclareOpaqueType":"OpaqueType")}flowParseTypeParameterBound(){if(this.match(10)||this.isContextual(77)){const e=this.startNode();return this.next(),e.typeAnnotation=this.flowParseType(),this.finishNode(e,"TypeAnnotation")}}flowParseTypeParameter(e=!1){const t=this.state.startLoc,s=this.startNode(),i=this.flowParseVariance();return s.name=this.flowParseRestrictedIdentifierName(),s.variance=i,s.bound=this.flowParseTypeParameterBound(),this.match(25)?(this.eat(25),s.default=this.flowParseType()):e&&this.raise(oo.MissingTypeParamDefault,t),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){const e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(43)||this.match(138)?this.next():this.unexpected();let s=!1;do{const e=this.flowParseTypeParameter(s);t.params.push(e),e.default&&(s=!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()===Ba.brace)return e();{const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}}flowParseTypeParameterInstantiationInExpression(){if(43===this.reScan_lt())return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){const e=this.startNode(),t=this.state.inType;return this.state.inType=!0,e.params=[],this.flowInTopLevelContext(()=>{this.expect(43);const 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()!==Ba.brace||this.reScan_lt_gt(),this.expect(44),this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(43!==this.reScan_lt())return null;const 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(){const 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,s){return e.static=t,10===this.lookahead().type?(e.id=this.parseIdentifier(!0),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(1),e.value=this.flowParseTypeInitialiser(),e.variance=s,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.parseIdentifier(!0),this.expect(1),this.expect(1),this.match(43)||this.match(6)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAtNode(e))):(e.method=!1,this.eat(13)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(43)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(6),this.match(74)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(7)||this.expect(8));!this.match(7)&&!this.match(17);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(7)||this.expect(8);return this.eat(17)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(7),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){const s=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(s),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:s,allowProto:i,allowInexact:n}){const r=this.state.inType;this.state.inType=!0;const a=this.startNode();let o,c;a.callProperties=[],a.properties=[],a.indexers=[],a.internalSlots=[];let h=!1;for(t&&this.match(3)?(this.expect(3),o=5,c=!0):(this.expect(2),o=4,c=!1),a.exact=c;!this.match(o);){let t=!1,r=null,o=null;const l=this.startNode();if(i&&this.isContextual(114)){const t=this.lookahead();10!==t.type&&13!==t.type&&(this.next(),r=this.state.startLoc,e=!1)}if(e&&this.isContextual(102)){const e=this.lookahead();10!==e.type&&13!==e.type&&(this.next(),t=!0)}const p=this.flowParseVariance();if(this.eat(0))null!=r&&this.unexpected(r),this.eat(0)?(p&&this.unexpected(p.start),a.internalSlots.push(this.flowParseObjectTypeInternalSlot(l,t))):a.indexers.push(this.flowParseObjectTypeIndexer(l,t,p));else if(this.match(6)||this.match(43))null!=r&&this.unexpected(r),p&&this.unexpected(p.start),a.callProperties.push(this.flowParseObjectTypeCallProperty(l,t));else{let e="init";if(this.isContextual(95)||this.isContextual(100)){Ea(this.lookahead().type)&&(e=this.state.value,this.next())}const i=this.flowParseObjectTypeProperty(l,t,r,p,e,s,n??!c);null===i?(h=!0,o=this.state.lastTokStartLoc):a.properties.push(i)}this.flowObjectTypeSemicolon(),!o||this.match(4)||this.match(5)||this.raise(oo.UnexpectedExplicitInexactInObject,o)}this.expect(o),s&&(a.inexact=h);const l=this.finishNode(a,"ObjectTypeAnnotation");return this.state.inType=r,l}flowParseObjectTypeProperty(e,t,s,i,n,r,a){if(this.eat(17)){return this.match(8)||this.match(9)||this.match(4)||this.match(5)?(r?a||this.raise(oo.InexactInsideExact,this.state.lastTokStartLoc):this.raise(oo.InexactInsideNonObject,this.state.lastTokStartLoc),i&&this.raise(oo.InexactVariance,i),null):(r||this.raise(oo.UnexpectedSpreadType,this.state.lastTokStartLoc),null!=s&&this.unexpected(s),i&&this.raise(oo.SpreadVariance,i),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"))}{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=s,e.kind=n;let a=!1;return this.match(43)||this.match(6)?(e.method=!0,null!=s&&this.unexpected(s),i&&this.unexpected(i.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAtNode(e)),"get"===n||"set"===n?this.flowCheckGetterSetterParams(e):t||r||"constructor"!==e.key.name||!e.value.this||this.raise(oo.ThisParamBannedInConstructor,e.value.this)):("init"!==n&&this.unexpected(),e.method=!1,this.eat(13)&&(a=!0),e.value=this.flowParseTypeInitialiser(),e.variance=i),e.optional=a,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){const t="get"===e.kind?0:1,s=e.value,i=s.params.length+(s.rest?1:0);s.this&&this.raise("get"===e.kind?oo.GetterMayNotHaveThisParam:oo.SetterMayNotHaveThisParam,s.this),i!==t&&this.raise("get"===e.kind?na.BadGetterArity:na.BadSetterArity,e),"set"===e.kind&&s.rest&&this.raise(na.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 s=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(12);){const t=this.startNodeAt(e);t.qualification=s,t.id=this.flowParseRestrictedIdentifier(!0),s=this.finishNode(t,"QualifiedTypeIdentifier")}return s}flowParseGenericType(e,t){const s=this.startNodeAt(e);return s.typeParameters=null,s.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(43)&&(s.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(s,"GenericTypeAnnotation")}flowParseTypeofType(){const e=this.startNode();return this.expect(83),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){const 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,s=null,i=!1;const n=this.startNode(),r=this.lookahead(),a=74===this.state.type;return 10===r.type||13===r.type?(a&&!e&&this.raise(oo.ThisParamMustBeFirst,n),s=this.parseIdentifier(a),this.eat(13)&&(i=!0,a&&this.raise(oo.ThisParamMayNotBeOptional,n)),t=this.flowParseTypeInitialiser()):t=this.flowParseType(),n.name=s,n.optional=i,n.typeAnnotation=t,this.finishNode(n,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){const t=this.startNodeAtNode(e);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let t=null,s=null;for(this.match(74)&&(s=this.flowParseFunctionTypeParam(!0),s.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:s}}flowIdentToTypeAnnotation(e,t,s){switch(s.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(s.name),this.flowParseGenericType(e,s)}}flowParsePrimaryType(){const e=this.state.startLoc,t=this.startNode();let s,i,n=!1;const r=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,i=this.flowParseTupleType(),this.state.noAnonFunctionType=r,i;case 43:{const e=this.startNode();return e.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(6),s=this.flowParseFunctionTypeParams(),e.params=s.params,e.rest=s.rest,e.this=s._this,this.expect(7),this.expect(15),e.returnType=this.flowParseType(),this.finishNode(e,"FunctionTypeAnnotation")}case 6:{const e=this.startNode();if(this.next(),!this.match(7)&&!this.match(17))if(Ca(this.state.type)||this.match(74)){const e=this.lookahead().type;n=13!==e&&10!==e}else n=!0;if(n){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=r,this.state.noAnonFunctionType||!(this.match(8)||this.match(7)&&15===this.lookahead().type))return this.expect(7),i;this.eat(8)}return s=i?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):this.flowParseFunctionTypeParams(),e.params=s.params,e.rest=s.rest,e.this=s._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(oo.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(_a(this.state.type)){const e=Da(this.state.type);return this.next(),super.createIdentifier(t,e)}if(Ca(this.state.type))return this.isContextual(125)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,t,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){const e=this.state.startLoc;let t=this.flowParsePrimaryType(),s=!1;for(;(this.match(0)||this.match(14))&&!this.canInsertSemicolon();){const i=this.startNodeAt(e),n=this.eat(14);s=s||n,this.expect(0),!n&&this.match(1)?(i.elementType=t,this.next(),t=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=t,i.indexType=this.flowParseType(),this.expect(1),s?(i.optional=n,t=this.finishNode(i,"OptionalIndexedAccessType")):t=this.finishNode(i,"IndexedAccessType"))}return t}flowParsePrefixType(){const e=this.startNode();return this.eat(13)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(15)){const t=this.startNodeAtNode(e);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){const e=this.startNode();this.eat(41);const t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(41);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){const e=this.startNode();this.eat(39);const t=this.flowParseIntersectionType();for(e.types=[t];this.eat(39);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){const e=this.state.inType;this.state.inType=!0;const t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(128===this.state.type&&"_"===this.state.value){const e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}return this.flowParseType()}flowParseTypeAnnotation(){const e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(){const e=this.startNode(),t=this.parseIdentifierName();return this.match(10)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.createIdentifier(e,t)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocationFromNode(e.expression,e.typeAnnotation),e.expression}flowParseVariance(){let e=null;return this.match(49)?(e=this.startNode(),"+"===this.state.value?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,t,s=!1){t?this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,s)):super.parseFunctionBody(e,!1,s)}parseFunctionBodyAndFinish(e,t,s=!1){if(this.match(10)){const s=this.startNode();"FunctionDeclaration"===t||"FunctionExpression"===t||"ArrowFunctionExpression"===t?[s.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(!0):s.typeAnnotation=this.flowParseTypeInitialiser(),e.returnType=s.typeAnnotation?this.finishNode(s,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,t,s)}parseStatementLike(e){if(this.state.strict&&this.isContextual(125)){if(Pa(this.lookahead().type)){const e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.isContextual(122)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}const t=super.parseStatementLike(e);return void 0!==this.flowPragma||this.isValidDirective(t)||(this.flowPragma=null),t}parseExpressionStatement(e,t){if("Identifier"===t.type)if("declare"===t.name){if(this.match(76)||Ca(this.state.type)||this.match(64)||this.match(70)||this.match(78))return this.flowParseDeclare(e)}else if(Ca(this.state.type)){if("interface"===t.name)return this.flowParseInterface(e);if("type"===t.name)return this.flowParseTypeAlias(e);if("opaque"===t.name)return this.flowParseOpaqueType(e,!1)}return super.parseExpressionStatement(e,t)}shouldParseExportDeclaration(){const{type:e}=this.state;return 122===e||Ia(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:e}=this.state;return 122===e||Ia(e)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(122)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,s){if(!this.match(13))return e;if(null!=s){const t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(s),e}this.expect(13);const i=this.state.clone(),n=this.state.noArrowAt,r=this.startNodeAt(t);let{consequent:a,failed:o}=this.tryParseConditionalConsequent();const c=this.getArrowLikeExpressions(a);let h=c[0];const l=c[1];if(o||l.length>0){const e=[...n];if(l.length>0){this.state=i,this.state.noArrowAt=e;for(let t=0;t<l.length;t++)e.push(l[t].start);({consequent:a,failed:o}=this.tryParseConditionalConsequent()),[h]=this.getArrowLikeExpressions(a)}o&&h.length>1&&this.raise(oo.AmbiguousConditionalArrow,i.startLoc),o&&1===h.length&&(this.state=i,e.push(h[0].start),this.state.noArrowAt=e,({consequent:a}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(a,!0),this.state.noArrowAt=n,this.expect(10),r.test=e,r.consequent=a,r.alternate=this.forwardNoArrowParamsConversionAt(r,()=>this.parseMaybeAssign()),this.finishNode(r,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const e=this.parseMaybeAssignAllowIn(),t=!this.match(10);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){const s=[e],i=[];for(;0!==s.length;){const e=s.pop();"ArrowFunctionExpression"===e.type?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):i.push(e),"BlockStatement"!==e.body.type&&s.push(e.body)):"ConditionalExpression"===e.type&&(s.push(e.consequent),s.push(e.alternate))}return t?(i.forEach(e=>this.finishArrowValidation(e)),[i,[]]):function(e,t){const s=[],i=[];for(let n=0;n<e.length;n++)(t(e[n],n,e)?s:i).push(e[n]);return[s,i]}(i,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 s;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),s=t(),this.state.noArrowParamsConversionAt.pop()):s=t(),s}parseParenItem(e,t){const s=super.parseParenItem(e,t);if(this.eat(13)&&(s.optional=!0,this.resetEndLocation(e)),this.match(10)){const e=this.startNodeAt(t);return e.expression=s,e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,"TypeCastExpression")}return s}assertModuleNodeAllowed(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(126)){e.exportKind="type";const t=this.startNode();return this.next(),this.match(2)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}if(this.isContextual(127)){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}if(this.isContextual(125)){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.isContextual(122)){e.exportKind="value";const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDeclaration(e)}eatExportStar(e){return!!super.eatExportStar(e)||!(!this.isContextual(126)||51!==this.lookahead().type)&&(e.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(e){const{startLoc:t}=this.state,s=super.maybeParseExportNamespaceSpecifier(e);return s&&"type"===e.exportKind&&this.unexpected(t),s}parseClassId(e,t,s){t&&!s||!this.isContextual(109)?(super.parseClassId(e,t,s),this.match(43)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())):e.id=null}parseClassMember(e,t,s){const{startLoc:i}=this.state;if(this.isContextual(121)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,s),t.declare&&("ClassProperty"!==t.type&&"ClassPrivateProperty"!==t.type&&"PropertyDefinition"!==t.type?this.raise(oo.DeclareClassElement,i):t.value&&this.raise(oo.DeclareClassFieldInitializer,t.value))}isIterator(e){return"iterator"===e||"asyncIterator"===e}readIterator(){const e=super.readWord1(),t="@@"+e;this.isIterator(e)&&this.state.inType||this.raise(na.InvalidIdentifier,this.state.curPosition(),{identifierName:t}),this.finishToken(128,t)}getTokenFromCode(e){const t=this.input.charCodeAt(this.state.pos+1);123===e&&124===t?this.finishOp(3,2):!this.state.inType||62!==e&&60!==e?this.state.inType&&63===e?46===t?this.finishOp(14,2):this.finishOp(13,1):!function(e,t,s){return 64===e&&64===t&&Ha(s)}(e,t,this.input.charCodeAt(this.state.pos+2))?super.getTokenFromCode(e):(this.state.pos+=2,this.readIterator()):this.finishOp(62===e?44:43,1)}isAssignable(e,t){return"TypeCastExpression"===e.type?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){t||"AssignmentExpression"!==e.type||"TypeCastExpression"!==e.left.type||(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableListItem(e,t,s){const i=e[t];"TypeCastExpression"===i.type&&(e[t]=this.typeCastToParameter(i)),super.toAssignableListItem(e,t,s)}toReferencedList(e,t){for(let s=0;s<e.length;s++){const i=e[s];"TypeCastExpression"!==i?.type||i.extra?.parenthesized||!(e.length>1)&&t||this.raise(oo.TypeCastInPattern,i.typeAnnotation)}return e}parseArrayLike(e,t){const s=super.parseArrayLike(e,t);return"ArrayExpression"===s.type&&this.toReferencedList(s.elements),s}isValidLVal(e,t,s,i){return"TypeCastExpression"===e||super.isValidLVal(e,t,s,i)}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,s,i,n,r){if(t.variance&&this.unexpected(t.variance.start),delete t.variance,this.match(43)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,s,i,n,r),t.params&&n){const e=t.params;e.length>0&&this.isThisParam(e[0])&&this.raise(oo.ThisParamBannedInConstructor,t)}else if("MethodDefinition"===t.type&&n&&t.value.params){const e=t.value.params;e.length>0&&this.isThisParam(e[0])&&this.raise(oo.ThisParamBannedInConstructor,t)}}pushClassPrivateMethod(e,t,s,i){t.variance&&this.unexpected(t.variance.start),delete t.variance,this.match(43)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,s,i)}flowParseClassImplements(){const e=this.startNode();return e.id=this.flowParseRestrictedIdentifier(!0),this.match(43)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"ClassImplements")}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.match(43)||this.match(47))&&(e.superTypeArguments=this.flowParseTypeParameterInstantiationInExpression()),this.eatContextual(109)){const t=e.implements=[];do{t.push(this.flowParseClassImplements())}while(this.eat(8))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);const t=this.getObjectOrClassMethodParams(e);if(t.length>0){const s=t[0];this.isThisParam(s)&&"get"===e.kind?this.raise(oo.GetterMayNotHaveThisParam,s):this.isThisParam(s)&&this.raise(oo.SetterMayNotHaveThisParam,s)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,s,i,n,r,a){let o;e.variance&&this.unexpected(e.variance.start),delete e.variance,this.match(43)&&!r&&(o=this.flowParseTypeParameterDeclaration(),this.match(6)||this.unexpected());const c=super.parseObjPropValue(e,t,s,i,n,r,a);return o&&((c.value||c).typeParameters=o),c}parseFunctionParamType(e){return this.eat(13)&&("Identifier"!==e.type&&this.raise(oo.PatternIsOptional,e),this.isThisParam(e)&&this.raise(oo.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(10)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(oo.ThisParamAnnotationRequired,e),this.match(25)&&this.isThisParam(e)&&this.raise(oo.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,t){const s=super.parseMaybeDefault(e,t);return"AssignmentPattern"===s.type&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(oo.TypeBeforeInitializer,s.typeAnnotation),s}parseImportSpecifierLocal(e,t,s){t.local=co(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,s))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(126)){if(!e)return!0;const t=this.lookaheadCharCode();return 123===t||42===t}return!e&&this.isContextual(83)}applyImportPhase(e,t,s,i){if(super.applyImportPhase(e,t,s,i),t){if(!s&&this.match(61))return;e.exportKind="type"===s?s:"value"}else"type"===s&&this.match(51)&&this.unexpected(),e.importKind="type"===s||"typeof"===s?s:"value"}parseImportSpecifier(e,t,s,i,n){const r=e.imported;let a=null;"Identifier"===r.type&&("type"===r.name?a="type":"typeof"===r.name&&(a="typeof"));let o=!1;if(this.isContextual(89)&&!this.isLookaheadContextual("as")){const t=this.parseIdentifier(!0);null===a||Pa(this.state.type)?(e.imported=r,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=t,e.importKind=a,e.local=this.cloneIdentifier(t))}else{if(null!==a&&Pa(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=a;else{if(t)throw this.raise(na.ImportBindingIsString,e,{importName:r.value});e.imported=r,e.importKind=null}this.eatContextual(89)?e.local=this.parseIdentifier():(o=!0,e.local=this.cloneIdentifier(e.imported))}const c=co(e);return s&&c&&this.raise(oo.ImportTypeShorthandOnlyInPureImport,e),(s||c)&&this.checkReservedType(e.local.name,e.local.start,!0),!o||s||c||this.checkReservedWord(e.local.name,e.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){return 74===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(e,t){const s=e.kind;"get"!==s&&"set"!==s&&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)){const 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 s,i=null;if(this.hasPlugin("jsx")&&(this.match(138)||this.match(43))){if(i=this.state.clone(),s=this.tryParse(()=>super.parseMaybeAssign(e,t),i),!s.error)return s.node;const{context:n}=this.state,r=n[n.length-1];r!==Ba.j_oTag&&r!==Ba.j_expr||n.pop()}if(s?.error||this.match(43)){let n;i=i||this.state.clone();const r=this.tryParse(s=>{n=this.flowParseTypeParameterDeclaration();const i=this.forwardNoArrowParamsConversionAt(n,()=>{const s=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(s,n),s});i.extra?.parenthesized&&s();const r=this.maybeUnwrapTypeCastExpression(i);return"ArrowFunctionExpression"!==r.type&&s(),r.typeParameters=n,this.resetStartLocationFromNode(r,n),i},i);let a=null;if(r.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(r.node).type){if(!r.error&&!r.aborted)return r.node.async&&this.raise(oo.UnexpectedTypeParameterBeforeAsyncArrowFunction,n),r.node;a=r.node}if(s?.node)return this.state=s.failState,s.node;if(a)return this.state=r.failState,a;if(s?.thrown)throw s.error;if(r.thrown)throw r.error;throw this.raise(oo.UnexpectedTokenAfterTypeParameter,n)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(10)){const t=this.tryParse(()=>{const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const s=this.startNode();return[s.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(!0),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(15)||this.unexpected(),s});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,s,i=!0){if(!s||!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(oo.ThisParamMustBeFirst,e.params[t]);super.checkParams(e,t,s,i)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(e,t,s){if("Identifier"===e.type&&"async"===e.name&&this.state.noArrowAt.includes(t.index)){this.next();const s=this.startNodeAt(t);s.callee=e,s.arguments=super.parseCallExpressionArguments(),e=this.finishNode(s,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.match(43)){const i=this.state.clone(),n=this.tryParse(e=>this.parseAsyncArrowWithTypeParameters(t)||e(),i);if(!n.error&&!n.aborted)return n.node;const r=this.tryParse(()=>super.parseSubscripts(e,t,s),i);if(r.node&&!r.error)return r.node;if(n.node)return this.state=n.failState,n.node;if(r.node)return this.state=r.failState,r.node;throw n.error||r.error}return super.parseSubscripts(e,t,s)}parseSubscript(e,t,s,i){if(this.match(14)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,s)return i.stop=!0,e;this.next();const n=this.startNodeAt(t);return n.callee=e,n.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(6),n.arguments=this.parseCallExpressionArguments(),n.optional=!0,this.finishCallExpression(n,!0)}if(!s&&this.shouldParseTypes()&&(this.match(43)||this.match(47))){const s=this.startNodeAt(t);s.callee=e;const n=this.tryParse(()=>(s.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(6),s.arguments=super.parseCallExpressionArguments(),i.optionalChainMember&&(s.optional=!1),this.finishCallExpression(s,i.optionalChainMember)));if(n.node)return n.error&&(this.state=n.failState),n.node}return super.parseSubscript(e,t,s,i)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(43)&&(t=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){const t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){const t=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===t&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(e)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);124!==e||125!==t?super.readToken_pipe_amp(e):this.finishOp(5,2)}parseTopLevel(e,t){const s=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(oo.UnterminatedFlowComment,this.state.curPosition()),s}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(oo.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const e=this.skipFlowComment();return void(e&&(this.state.pos+=e,this.state.hasFlowComment=!0))}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){const{pos:e}=this.state;let t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;const s=this.input.charCodeAt(t+e),i=this.input.charCodeAt(t+e+1);return 58===s&&58===i?t+2:"flow-include"===this.input.slice(t+e,t+e+12)?t+12:58===s&&58!==i&&t}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(na.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,t){this.raise(oo.EnumBooleanMemberNotInitialized,e,t)}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?"symbol"===t.explicitType?oo.EnumInvalidMemberInitializerSymbolType:oo.EnumInvalidMemberInitializerPrimaryType:oo.EnumInvalidMemberInitializerUnknownType,e,t)}flowEnumErrorNumberMemberNotInitialized(e,t){this.raise(oo.EnumNumberMemberNotInitialized,e,t)}flowEnumErrorStringMemberInconsistentlyInitialized(e,t){this.raise(oo.EnumStringMemberInconsistentlyInitialized,e,t)}flowEnumMemberInit(){const e=this.state.startLoc,t=()=>this.match(8)||this.match(4);switch(this.state.type){case 131:{const e=this.parseNumericLiteral(this.state.value);if(t())return{type:"number",loc:e.start,value:e};break}case 130:{const e=this.parseStringLiteral(this.state.value);if(t())return{type:"string",loc:e.start,value:e};break}case 81:case 82:{const e=this.parseBooleanLiteral(this.match(81));if(t())return{type:"boolean",loc:e.start,value:e}}}return{type:"invalid",loc:e}}flowEnumMemberRaw(){const e=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(25)?this.flowEnumMemberInit():{type:"none",loc:e}}}flowEnumCheckExplicitTypeMismatch(e,t,s){const{explicitType:i}=t;null!==i&&i!==s&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){const s=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let n=!1;for(;!this.match(4);){if(this.eat(17)){n=!0;break}const r=this.startNode(),{id:a,init:o}=this.flowEnumMemberRaw(),c=a.name;if(""===c)continue;/^[a-z]/.test(c)&&this.raise(oo.EnumInvalidMemberName,a,{memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),s.has(c)&&this.raise(oo.EnumDuplicateMemberName,a,{memberName:c,enumName:e}),s.add(c);const h={enumName:e,explicitType:t,memberName:c};switch(r.id=a,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.loc,h,"boolean"),r.init=o.value,i.booleanMembers.push(this.finishNode(r,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.loc,h,"number"),r.init=o.value,i.numberMembers.push(this.finishNode(r,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.loc,h,"string"),r.init=o.value,i.stringMembers.push(this.finishNode(r,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.loc,h);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.loc,h);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.loc,h);break;default:i.defaultedMembers.push(this.finishNode(r,"EnumDefaultedMember"))}}this.match(4)||this.expect(8)}return{members:i,hasUnknownMembers:n}}flowEnumStringMembers(e,t,{enumName:s}){if(0===e.length)return t;if(0===t.length)return e;if(t.length>e.length){for(const t of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(t,{enumName:s});return t}for(const e of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(e,{enumName:s});return e}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(98))return null;if(!Ca(this.state.type))throw this.raise(oo.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});const{value:t}=this.state;return this.next(),"boolean"!==t&&"number"!==t&&"string"!==t&&"symbol"!==t&&this.raise(oo.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){const s=t.name,i=t.start,n=this.flowEnumParseExplicitType({enumName:s});this.expect(2);const{members:r,hasUnknownMembers:a}=this.flowEnumMembers({enumName:s,explicitType:n});switch(e.hasUnknownMembers=a,n){case"boolean":return e.explicitType=!0,e.members=r.booleanMembers,this.expect(4),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=r.numberMembers,this.expect(4),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(r.stringMembers,r.defaultedMembers,{enumName:s}),this.expect(4),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=r.defaultedMembers,this.expect(4),this.finishNode(e,"EnumSymbolBody");default:{const t=()=>(e.members=[],this.expect(4),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;const n=r.booleanMembers.length,a=r.numberMembers.length,o=r.stringMembers.length,c=r.defaultedMembers.length;if(n||a||o||c){if(n||a){if(!a&&!o&&n>=c){for(const e of r.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.start,{enumName:s,memberName:e.id.name});return e.members=r.booleanMembers,this.expect(4),this.finishNode(e,"EnumBooleanBody")}if(!n&&!o&&a>=c){for(const e of r.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.start,{enumName:s,memberName:e.id.name});return e.members=r.numberMembers,this.expect(4),this.finishNode(e,"EnumNumberBody")}return this.raise(oo.EnumInconsistentMemberValues,i,{enumName:s}),t()}return e.members=this.flowEnumStringMembers(r.stringMembers,r.defaultedMembers,{enumName:s}),this.expect(4),this.finishNode(e,"EnumStringBody")}return t()}}}flowParseEnumDeclaration(e){const 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(){const e=this.nextTokenStart();if(60===this.input.charCodeAt(e)){const t=this.input.charCodeAt(e+1);return 60!==t&&61!==t}return!1}reScan_lt_gt(){const{type:e}=this.state;43===e?(this.state.pos-=1,this.readToken_lt()):44===e&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:e}=this.state;return 47===e?(this.state.pos-=2,this.finishOp(43,1),43):e}maybeUnwrapTypeCastExpression(e){return"TypeCastExpression"===e.type?e.expression:e}},typescript:e=>class extends e{getScopeHandler(){return wo}tsIsIdentifier(){return Ca(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()&&this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(102)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(e,t,s){if(!Ca(this.state.type)&&54!==this.state.type&&71!==this.state.type)return;const i=this.state.value;if(e.has(i)){if(s&&this.match(102))return;if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers(e,t=fc.InvalidModifierOnTypeMember,s,i=!1){const n=(e,t,i,n)=>{t===i&&s[n]&&this.raise(fc.InvalidModifiersOrder,e,{orderedModifiers:[i,n]})},r=(e,t,i,n)=>{(s[i]&&t===n||s[n]&&t===i)&&this.raise(fc.IncompatibleModifiers,e,{modifiers:[i,n]})};for(;;){const{startLoc:a}=this.state,o=this.tsParseModifier(e,i,s.static);if(!o)break;mc(o)?s.accessibility?this.raise(fc.DuplicateAccessibilityModifier,a,{modifier:o}):(n(a,o,o,"override"),n(a,o,o,"static"),n(a,o,o,"readonly"),s.accessibility=o):yc(o)?(s[o]&&this.raise(fc.DuplicateModifier,a,{modifier:o}),s[o]=!0,n(a,o,"in","out")):(Object.hasOwn(s,o)?this.raise(fc.DuplicateModifier,a,{modifier:o}):(n(a,o,"static","readonly"),n(a,o,"static","override"),n(a,o,"override","readonly"),n(a,o,"abstract","override"),r(a,o,"declare","override"),r(a,o,"static","abstract")),s[o]=!0),e.get(o)||this.raise(t,a,{modifier:o})}}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){const s=[];for(;!this.tsIsListTerminator(e);)s.push(t());return s}tsParseDelimitedList(e,t,s){return function(e){if(null==e)throw new Error(`Unexpected ${e} value.`);return e}(this.tsParseDelimitedListWorker(e,t,!0,s))}tsParseDelimitedListWorker(e,t,s,i){const n=[];let r=-1;for(;!this.tsIsListTerminator(e);){r=-1;const i=t();if(null==i)return;if(n.push(i),!this.eat(8)){if(this.tsIsListTerminator(e))break;return void(s&&this.expect(8))}r=this.state.lastTokStartLoc.index}return i&&(i.value=r),n}tsParseBracketedList(e,t,s,i,n){i||(s?this.expect(0):this.expect(43));const r=this.tsParseDelimitedList(e,t,n);return s?this.expect(1):this.expect(44),r}tsParseImportType(){const e=this.startNode();return this.expect(79),this.expect(6),this.match(130)?e.source=this.parseStringLiteral(this.state.value):(this.raise(fc.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(){const e=this.startNode();this.expect(2);const 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(){const e=this.startNode(),t=[];for(this.expect(2);!this.match(4);){const e=this.state.type;Ca(e)||130===e?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(1&e&&this.match(74))if(2&e)t=this.parseIdentifier(!0);else{const e=this.startNode();this.next(),t=this.finishNode(e,"ThisExpression")}else t=this.parseIdentifier(!!(1&e));for(;this.eat(12);){const s=this.startNodeAtNode(t);s.left=t,s.right=this.parseIdentifier(!!(1&e)),t=this.finishNode(s,"TSQualifiedName")}return t}tsParseTypeReference(){const 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();const t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){const e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){const 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,Pc(["in","out"],["const","public","private","protected","readonly","declare","abstract","override"]),fc.InvalidModifierOnTypeParameter);tsParseConstModifier=this.tsParseModifiers.bind(this,Pc(["const"],["in","out"]),fc.InvalidModifierOnTypeParameterPositions);tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,Pc(["in","out","const"],["public","private","protected","readonly","declare","abstract","override"]),fc.InvalidModifierOnTypeParameter);tsParseTypeParameter(e){const 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){const t=this.startNode();this.match(43)||this.match(138)?this.next():this.unexpected();const s={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,s),0===t.params.length&&this.raise(fc.EmptyTypeParameters,t),-1!==s.value&&this.addExtra(t,"trailingComma",s.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){const s=15===e,i="returnType";t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(6),t.params=this.tsParseBindingListForSignature(),(s||this.match(e))&&(t[i]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){const e=super.parseBindingList(7,41,2);for(const t of e){const{type:e}=t;"AssignmentPattern"!==e&&"TSParameterProperty"!==e||this.raise(fc.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(),!!Ca(this.state.type)&&(this.next(),this.match(10))}tsTryParseIndexSignature(e){if(!this.match(0)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(0);const t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(1),e.parameters=[t];const s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),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(fc.ReadonlyForMethodSignature,e);const s=e;if(s.kind&&this.match(43)&&this.raise(fc.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(10,s),this.tsParseTypeMemberSemicolon(),"get"===s.kind)s.params.length>0&&(this.raise(na.BadGetterArity,this.state.curPosition()),this.isThisParam(s.params[0])&&this.raise(fc.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if("set"===s.kind){if(1!==s.params.length)this.raise(na.BadSetterArity,this.state.curPosition());else{const e=s.params[0];this.isThisParam(e)&&this.raise(fc.AccessorCannotDeclareThisParameter,this.state.curPosition()),"Identifier"===e.type&&e.optional&&this.raise(fc.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),"RestElement"===e.type&&this.raise(fc.SetAccessorCannotHaveRestParameter,this.state.curPosition())}s.returnType&&this.raise(fc.SetAccessorCannotHaveReturnType,s.returnType)}else s.kind="method";return this.finishNode(s,"TSMethodSignature")}{const s=e;t&&(s.readonly=!0);const i=this.tsTryParseTypeAnnotation();return i&&(s.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(s,"TSPropertySignature")}}tsParseTypeMember(){const e=this.startNode();if(this.match(6)||this.match(43))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(73)){const 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))}this.tsParseModifiers(kc,void 0,e);const t=this.tsTryParseIndexSignature(e);return t||(super.parsePropertyName(e),e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||!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(){const e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(2);const 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()&&(this.next(),this.match(54))))}tsParseMappedType(){const 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(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1;return e.elementTypes.forEach(e=>{const{type:s}=e;!t||"TSRestType"===s||"TSOptionalType"===s||"TSNamedTupleMember"===s&&e.optional||this.raise(fc.OptionalTypeBeforeRequired,e),t||="TSNamedTupleMember"===s&&e.optional||"TSOptionalType"===s}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){const e=this.state.startLoc,t=this.eat(17),{startLoc:s}=this.state;let i,n,r,a;const o=Pa(this.state.type)?this.lookaheadCharCode():null;if(58===o)i=!0,r=!1,n=this.parseIdentifier(!0),this.expect(10),a=this.tsParseType();else if(63===o){r=!0;const e=this.state.value,t=this.tsParseNonArrayType();58===this.lookaheadCharCode()?(i=!0,n=this.createIdentifier(this.startNodeAt(s),e),this.expect(13),this.expect(10),a=this.tsParseType()):(i=!1,a=t,this.expect(13))}else a=this.tsParseType(),r=this.eat(13),i=this.eat(10);if(i){let e;n?(e=this.startNodeAt(s),e.optional=r,e.label=n,e.elementType=a,this.eat(13)&&(e.optional=!0,this.raise(fc.TupleOptionalAfterType,this.state.lastTokStartLoc))):(e=this.startNodeAt(s),e.optional=r,this.raise(fc.InvalidTupleMemberLabel,a),e.label=a,e.elementType=this.tsParseType()),a=this.finishNode(e,"TSNamedTupleMember")}else if(r){const e=this.startNodeAt(s);e.typeAnnotation=a,a=this.finishNode(e,"TSOptionalType")}if(t){const t=this.startNodeAt(e);t.typeAnnotation=a,a=this.finishNode(t,"TSRestType")}return a}tsParseParenthesizedType(){const e=this.startNode();return this.expect(6),e.typeAnnotation=this.tsParseType(),this.expect(7),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){const s=this.startNode();return"TSConstructorType"===e&&(s.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(15,s)),this.finishNode(s,e)}tsParseLiteralTypeNode(){const 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(){const e=this.state.startLoc;let t=this.parseTemplateElement(!1);const s=[t];if(t.tail){const t=this.startNodeAt(e),i=this.startNodeAt(e);return i.expressions=[],i.quasis=s,t.literal=this.finishNode(i,"TemplateLiteral"),this.finishNode(t,"TSLiteralType")}{const i=[];for(;!t.tail;)i.push(this.tsParseType()),this.readTemplateContinuation(),s.push(t=this.parseTemplateElement(!1));const n=this.startNodeAt(e);return n.types=i,n.quasis=s,this.finishNode(n,"TSTemplateLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const 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){const e=this.startNode(),t=this.lookahead();return 131!==t.type&&132!==t.type&&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(!(2048&this.optionFlags)){const e=this.state.startLoc;this.next();const 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:{const{type:e}=this.state;if(Ca(e)||84===e||80===e){const t=84===e?"TSVoidKeyword":80===e?"TSNullKeyword":function(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}}(this.state.value);if(void 0!==t&&46!==this.lookaheadCharCode()){const e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){const{startLoc:e}=this.state;let t=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(1)){const s=this.startNodeAt(e);s.elementType=t,this.expect(1),t=this.finishNode(s,"TSArrayType")}else{const s=this.startNodeAt(e);s.objectType=t,s.indexType=this.tsParseType(),this.expect(1),t=this.finishNode(s,"TSIndexedAccessType")}return t}tsParseTypeOperator(){const e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(fc.UnexpectedReadonly,e)}}tsParseInferType(){const e=this.startNode();this.expectContextual(111);const 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)){const e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(13))return e}}tsParseTypeOperatorOrHigher(){var e;return(e=this.state.type)>=117&&e<=119&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(111)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,t,s){const i=this.startNode(),n=this.eat(s),r=[];do{r.push(t())}while(this.eat(s));return 1!==r.length||n?(i.types=r,this.finishNode(i,e)):r[0]}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)||this.match(6)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(Ca(this.state.type)||this.match(74))return this.next(),!0;if(this.match(2)){const{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();const{errors:e}=this.state,t=e.length;try{return super.parseBindingList(1,93,1),e.length===t}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(7)||this.match(17))return!0;if(this.tsSkipParameterStart()){if(this.match(10)||this.match(8)||this.match(13)||this.match(25))return!0;if(this.match(7)&&(this.next(),this.match(15)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{const t=this.startNode();this.expect(e);const s=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(74)){let e=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===e.type?(s.parameterName=e,s.asserts=!0,s.typeAnnotation=null,e=this.finishNode(s,"TSTypePredicate")):(this.resetStartLocationFromNode(e,s),e.asserts=!0),t.typeAnnotation=e,this.finishNode(t,"TSTypeAnnotation")}const n=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!n)return i?(s.parameterName=this.parseIdentifier(),s.asserts=i,s.typeAnnotation=null,t.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);const r=this.tsParseTypeAnnotation(!1);return s.parameterName=n,s.typeAnnotation=r,s.asserts=i,t.typeAnnotation=this.finishNode(s,"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(){const e=this.parseIdentifier();if(this.isContextual(112)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(105!==this.state.type)return!1;const e=this.state.containsEsc;return this.next(),!(!Ca(this.state.type)&&!this.match(74))&&(e&&this.raise(na.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(){dc(this.state.inType);const e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(77))return e;const 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(fc.ReservedTypeAssertion,this.state.startLoc);const 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){const t=this.state.startLoc,s=this.tsParseDelimitedList("HeritageClauseElement",()=>{const t=(this.state.canStartArrow=!1,super.parseExprSubscripts());xc(t)||this.raise(fc.InvalidHeritageClauseType,t.start,{token:e});const s="extends"===e?"TSInterfaceHeritage":"TSClassImplements";if("TSInstantiationExpression"===t.type)return t.type=s,t;const i=this.startNodeAtNode(t);return i.expression=t,(this.match(43)||this.match(47))&&(i.typeArguments=this.tsParseTypeArgumentsInExpression()),this.finishNode(i,s)});return s.length||this.raise(fc.EmptyHeritageClauseType,t,{token:e}),s}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(125),t.declare&&(e.declare=!0),Ca(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(fc.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(77)&&(e.extends=this.tsParseHeritageClause("extends"));const s=this.startNode();return s.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(s,"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)&&46!==this.lookaheadCharCode()){const e=this.startNode();return this.next(),this.finishNode(e,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInTopLevelContext(e){if(this.curContext()===Ba.brace)return e();{const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}}tsInType(e){const t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){const t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){const 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(){const 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(){const e=this.startNode();return this.expect(2),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(4),this.finishNode(e,"TSEnumBody")}tsParseModuleBlock(e){const t=this.startNode();return e||this.scope.enter(0),this.expect(2),super.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,4),e||this.scope.exit(),this.finishNode(t,"TSModuleBlock")}tsParseNamespaceDeclaration(e){return e.id=this.tsParseEntityName(0),"Identifier"===e.id.type&&this.checkIdentifier(e.id,1024),this.scope.enter(2048),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(!1),this.prodParam.exit(),this.scope.exit(),this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){const t=this.isContextual(108);if(t)e.kind="global",e.id=this.parseIdentifier();else{e.kind="module";const{type:t,value:s}=this.state;130===t?e.id=super.parseStringLiteral(s):Ca(t)?(this.raise(fc.InlineModuleDeclarationMustUseString,this.state.startLoc),e.id=this.tsParseEntityName(0)):2===t?this.raise(fc.EmptyNamespaceName,this.state.startLoc):(this.raise(fc.InvalidNamespaceName,this.state.startLoc,s),e.id=super.parseExprAtom())}return this.match(2)?(t||this.scope.enter(1024),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(t),this.prodParam.exit(),t||this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t){e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(25);const s=this.tsParseModuleReference();return"type"===e.importKind&&"TSExternalModuleReference"!==s.type&&this.raise(fc.ImportAliasHasImportType,s),e.moduleReference=s,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(115)&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){const 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){const t=this.state.clone(),s=e();return this.state=t,s}tsTryParseAndCatch(e){const t=this.tryParse(t=>e()||t());if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}tsTryParse(e){const t=this.state.clone(),s=e();if(void 0!==s&&!1!==s)return s;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;const 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")?(this.expect(71),this.tsParseEnumDeclaration(e,{const:!0,declare:!0})):(e.declare=!0,this.parseVarStatement(e,this.state.value,!0));case 103:if(this.isUsing())return this.raise(fc.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),e.declare=!0,this.parseVarStatement(e,"using",!0);break;case 92:if(this.isAwaitUsing())return this.raise(fc.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),e.declare=!0,this.next(),this.parseVarStatement(e,"await using",!0);break;case 125:{const t=this.tsParseInterfaceDeclaration(e,{declare:!0});if(t)return t}default:if(Ca(t))return this.tsParseDeclaration(e,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(e,t,s,i){switch(t){case 120:if(this.tsCheckLineTerminator(s)&&(this.match(76)||Ca(this.state.type)))return this.tsParseAbstractDeclaration(e,i);break;case 123:if(this.tsCheckLineTerminator(s))return this.tsParseAmbientExternalModuleDeclaration(e);break;case 124:if(this.tsCheckLineTerminator(s)&&Ca(this.state.type))return e.kind="namespace",this.tsParseNamespaceDeclaration(e);break;case 126:if(this.tsCheckLineTerminator(s)&&Ca(this.state.type))return this.tsParseTypeAliasDeclaration(e)}}tsCheckLineTerminator(e){return e?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(43))return;const t=this.tsTryParseAndCatch(()=>{const t=this.startNodeAt(e);return t.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(t),t.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(15),t});return t?super.parseArrowExpression(t,null,!0):void 0}tsParseTypeArgumentsInExpression(){if(43===this.reScan_lt())return this.tsParseTypeArguments()}tsParseTypeArguments(){const e=this.startNode();return e.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(43),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),0===e.params.length?this.raise(fc.EmptyTypeArguments,e):this.state.inType||this.curContext()!==Ba.brace||this.reScan_lt_gt(),this.expect(44),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return(e=this.state.type)>=120&&e<=126;var e}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseBindingElement(e,t){const s=t.length?null:this.state.startLoc,i={};this.tsParseModifiers(Tc,void 0,i);const n=i.accessibility,r=i.override,a=i.readonly;4&e||!(n||a||r)||this.raise(fc.UnexpectedParameterModifier,s||t[0]);const o=this.state.startLoc,c=this.parseMaybeDefault(o);2&e&&this.parseFunctionParamType(c);const h=this.parseMaybeDefault(o,c);if(n||a||r){const e=s?this.startNodeAt(s):this.startNodeAtNode(t[0]);return t.length?e.decorators=t:this.setLoc(s),n&&(e.accessibility=n),a&&(e.readonly=a),r&&(e.override=r),"Identifier"!==h.type&&"AssignmentPattern"!==h.type&&this.raise(fc.UnsupportedParameterPropertyKind,s||t[0]),e.parameter=h,this.finishNode(e,"TSParameterProperty")}return t.length&&(c.decorators=t),h}isSimpleParameter(e){return"TSParameterProperty"===e.type&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(const t of e.params)"Identifier"!==t.type&&t.optional&&!this.state.isAmbientContext&&this.raise(fc.PatternIsOptional,t)}setArrowFunctionParameters(e,t,s){super.setArrowFunctionParameters(e,t,s),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,s=!1){this.match(10)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(10));const i="FunctionDeclaration"===t?"TSDeclareFunction":"ClassMethod"===t||"ClassPrivateMethod"===t?"TSDeclareMethod":void 0;if(i&&!this.match(2)&&this.isLineTerminator()){if("TSDeclareMethod"===i&&"constructor"===e.kind)for(const t of e.params)"TSParameterProperty"===t.type?this.raise(fc.UnexpectedParameterModifier,t):"AssignmentPattern"===t.type&&this.raise(fc.UnexpectedParameterInitializer,t);else for(const t of e.params)"AssignmentPattern"===t.type&&this.raise(fc.UnexpectedParameterInitializer,t);return this.finishNode(e,i)}return i&&this.state.isAmbientContext&&(this.raise(fc.DeclareFunctionHasImplementation,this.state.startLoc),"TSDeclareFunction"===i&&e.declare)?super.parseFunctionBodyAndFinish(e,i,s):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,s))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(e=>{"TSTypeCastExpression"===e?.type&&this.raise(fc.UnexpectedTypeAnnotation,e.typeAnnotation)})}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t){const s=super.parseArrayLike(e,t);return"ArrayExpression"===s.type&&this.tsCheckForInvalidTypeCasts(s.elements),s}parseSubscript(e,t,s,i){if(!this.hasPrecedingLineBreak()&&this.match(31)){this.state.canStartJSXElement=!1,this.next();const s=this.startNodeAt(t);return s.expression=e,this.finishNode(s,"TSNonNullExpression")}let n=!1;if(this.match(14)&&60===this.lookaheadCharCode()){if(s)return i.stop=!0,e;i.optionalChainMember=n=!0,this.next()}if(this.match(43)||this.match(47)){let r;const a=this.tsTryParseAndCatch(()=>{if(!s&&this.atPossibleAsyncArrow(e)){const e=this.tsTryParseGenericAsyncArrowFunction(t);if(e)return i.stop=!0,e}const a=this.tsParseTypeArgumentsInExpression();if(!a)return;if(n&&!this.match(6))return void(r=this.state.curPosition());if(Oa(this.state.type)){const s=super.parseTaggedTemplateExpression(e,t,i);return s.typeArguments=a,s}if(!s&&this.eat(6)){const s=this.startNodeAt(t);return s.callee=e,s.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(s.arguments),s.typeArguments=a,i.optionalChainMember&&(s.optional=n),this.finishCallExpression(s,i.optionalChainMember)}const o=this.state.type;if(44===o||48===o||6!==o&&89!==o&&116!==o&&Aa(o)&&!this.hasPrecedingLineBreak())return;const c=this.startNodeAt(t);return c.expression=e,c.typeArguments=a,this.finishNode(c,"TSInstantiationExpression")});if(r&&this.unexpected(r,6),a)return"TSInstantiationExpression"===a.type&&((this.match(12)||this.match(14)&&40!==this.lookaheadCharCode())&&this.raise(fc.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),this.match(12)||this.match(14)||(a.expression=super.stopParseSubscript(e,i))),a}return super.parseSubscript(e,t,s,i)}parseNewCallee(e){super.parseNewCallee(e);const{callee:t}=e;"TSInstantiationExpression"!==t.type||t.extra?.parenthesized||(e.typeArguments=t.typeArguments,e.callee=t.expression)}parseExprOp(e,t,s){let i;if(Ma(54)>s&&!this.hasPrecedingLineBreak()&&(this.isContextual(89)||(i=this.isContextual(116)))){const n=this.startNodeAt(t);n.expression=e,n.typeAnnotation=this.tsInType(()=>(this.next(),this.match(71)?(i&&this.raise(na.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType()));const r=this.finishNode(n,i?"TSSatisfiesExpression":"TSAsExpression");return this.reScan_lt_gt(),this.parseExprOp(r,t,s)}return super.parseExprOp(e,t,s)}checkReservedWord(e,t,s,i){this.state.isAmbientContext||super.checkReservedWord(e,t,s,i)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(126)){const t=this.lookaheadCharCode();return e?123===t||42===t:61!==t}return!e&&this.isContextual(83)}applyImportPhase(e,t,s,i){super.applyImportPhase(e,t,s,i),t?e.exportKind="type"===s?"type":"value":e.importKind="type"===s||"typeof"===s?s:"value"}parseImport(e){if(this.match(130))return e.importKind="value",this.scope.inTSNamespace&&this.raise(fc.ImportInTSNamespace,e),super.parseImport(e);let t;if(Ca(this.state.type)&&61===this.lookaheadCharCode()){e.importKind="value";const t=this.tsParseImportEqualsDeclaration(e);return this.scope.inTSNamespace&&"TSExternalModuleReference"===t.moduleReference.type&&this.raise(fc.ImportInTSNamespace,e),t}if(this.isContextual(126)){const s=this.parseMaybeImportPhase(e,!1);if(61===this.lookaheadCharCode())return this.scope.inTSNamespace&&this.raise(fc.ImportInTSNamespace,e),this.tsParseImportEqualsDeclaration(e,s);t=super.parseImportSpecifiersAndAfter(e,s)}else t=super.parseImport(e);return"type"===t.importKind&&t.specifiers.length>1&&"ImportDefaultSpecifier"===t.specifiers[0].type?this.raise(fc.TypeImportCannotSpecifyDefaultAndNamed,t):this.scope.inTSNamespace&&this.raise(fc.ImportInTSNamespace,t),t}parseExport(e,t){if(this.match(79)){const t=this.startNode();this.next();let s=null;this.isContextual(126)&&this.isPotentialImportPhase(!1)?s=this.parseMaybeImportPhase(t,!1):t.importKind="value";const i=this.tsParseImportEqualsDeclaration(t,s);return e.attributes=[],e.declaration=i,e.exportKind="value",e.source=null,e.specifiers=[],this.finishNode(e,"ExportNamedDeclaration")}if(this.eat(25)){const t=e;return t.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.scope.inTSNamespace&&this.raise(fc.ExportAssignmentInTSNamespace,t),this.finishNode(t,"TSExportAssignment")}if(this.eatContextual(89)){const t=e;return this.expectContextual(124),t.id=this.parseIdentifier(),this.checkIdentifier(t.id,8201),this.semicolon(),this.scope.inTSNamespace&&this.raise(fc.NamespaceExportInTSNamespace,t),this.finishNode(t,"TSNamespaceExportDeclaration")}{const s=super.parseExport(e,t);return this.scope.inTSNamespace&&("ExportNamedDeclaration"!==s.type||s.source||!s.declaration&&!this.state.isAmbientContext)&&this.raise(fc.ExportInTSNamespace,s),s}}isAbstractClass(){return this.isContextual(120)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){const e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(125)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,s=!1){const{isAmbientContext:i}=this.state,n=super.parseVarStatement(e,t,s||i);if(i&&!e.declare&&("using"===t||"await using"===t))return this.raiseOverwrite(fc.UsingDeclarationInAmbientContext,e,t),n;for(const e of n.declarations){const{id:s,init:n,definite:r}=e;r&&(n?this.raise(fc.DeclaratorDefiniteAssertionWithInitializer,s):s.typeAnnotation||this.raise(fc.DeclaratorDefiniteAssertionRequiresTypeAnnotation,s)),i&&n&&("var"===t||"let"===t||s.typeAnnotation?this.raise(fc.InitializerNotAllowedInAmbientContext,n):wc(n,this.hasPlugin("estree"))||this.raise(fc.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,n))}return n}parseStatementContent(e,t){const s=!!(2&e);if(!this.state.containsEsc)switch(this.state.type){case 71:if(this.isLookaheadContextual("enum")){const e=this.startNode();return this.next(),this.tsParseEnumDeclaration(e,{const:!0})}break;case 120:case 121:if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){const e=this.state.type,s=this.startNode();this.next();const i=121===e?this.tsTryParseDeclare(s):this.tsParseAbstractDeclaration(s,t);return i?(121===e&&(i.declare=!0),i):(s.expression=this.createIdentifier(this.startNodeAtNode(s),121===e?"declare":"abstract"),this.semicolon(!1),this.finishNode(s,"ExpressionStatement"))}break;case 122:return this.tsParseEnumDeclaration(this.startNode());case 108:if(123===this.lookaheadCharCode()){const e=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(e)}break;case 125:{const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return s||this.raise(fc.UnexpectedTypeDeclaration,e,"interface"),e;break}case 123:if(this.nextTokenIsStringLiteralOnSameLine()){const e=this.startNode();return this.next(),this.tsParseDeclaration(e,123,!1,t)}if(this.nextTokenIsIdentifierOnSameLine()){this.raise(fc.InlineModuleDeclarationMustUseString,this.state.startLoc);const e=this.startNode();return this.next(),this.tsParseDeclaration(e,124,!1,t)}break;case 124:if(this.nextTokenIsIdentifierOnSameLine()){const e=this.startNode();return this.next(),this.tsParseDeclaration(e,124,!1,t)}break;case 126:if(this.nextTokenIsIdentifierOnSameLine()){const e=this.startNode();return s||this.raise(fc.UnexpectedTypeDeclaration,e,"type"),this.next(),this.tsParseTypeAliasDeclaration(e)}}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(bc)}tsHasSomeModifiers(e,t){return t.some(t=>mc(t)?e.accessibility===t:!!e[t])}tsIsStartOfStaticBlocks(){return this.isContextual(102)&&123===this.lookaheadCharCode()}parseClassMember(e,t,s){this.tsParseModifiers(gc,fc.InvalidModifierOnTypeParameterPositions,t,!0);const i=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,["declare","private","public","protected","override","abstract","readonly","static"])&&this.raise(fc.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,s,!!t.static)};t.declare?this.tsInAmbientContext(i):i(),t.decorators&&t.decorators.length>0&&!this.hasPlugin("decorators-legacy")&&("TSAbstractMethodDefinition"===t.type||"TSDeclareMethod"===t.type?this.raise(fc.DecoratorAbstractMethod,t,{kind:"abstract method"}):("ClassProperty"===t.type&&t.abstract||"ClassProperty"===t.type&&t.declare||"TSAbstractPropertyDefinition"===t.type||"PropertyDefinition"===t.type&&t.declare)&&this.raise(fc.DecoratorAbstractMethod,t,{kind:t.declare?"declare field":"abstract field"}))}parseClassMemberWithIsStatic(e,t,s,i){const n=this.tsTryParseIndexSignature(t);if(n)return e.body.push(n),t.abstract&&this.raise(fc.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(fc.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(fc.IndexSignatureHasDeclare,t),void(t.override&&this.raise(fc.IndexSignatureHasOverride,t));!this.state.inAbstractClass&&t.abstract&&this.raise(fc.NonAbstractClassHasAbstractMethod,t),t.override&&(s.hadSuperClass||this.raise(fc.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,s,i)}parsePostMemberNameModifiers(e){this.eat(13)&&(e.optional=!0),e.readonly&&this.match(6)&&this.raise(fc.ClassMethodHasReadonly,e),e.declare&&this.match(6)&&this.raise(fc.ClassMethodHasDeclare,e)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(e,t,s){if(!this.match(13))return e;if(null!=s){const t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(s),e}this.next();const i=this.startNodeAt(t);i.test=e;const n=this.state.inConditionalConsequent;return this.state.inConditionalConsequent=!0,i.consequent=this.parseMaybeAssignAllowIn(),this.state.inConditionalConsequent=n,this.expect(10),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}parseParenItem(e,t){const s=super.parseParenItem(e,t);if(this.eat(13)&&(s.optional=!0,this.resetEndLocation(e)),this.match(10)){const s=this.startNodeAt(t);return s.expression=e,s.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(s,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(121))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));const t=this.state.startLoc,s=this.eatContextual(121);if(s&&(this.isContextual(121)||!this.shouldParseExportDeclaration()))throw this.raise(fc.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const i=Ca(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return i?(("TSInterfaceDeclaration"===i.type||"TSTypeAliasDeclaration"===i.type||s)&&(e.exportKind="type"),s&&"TSImportEqualsDeclaration"!==i.type&&(this.resetStartLocation(i,t),i.declare=!0),i):null}parseClassId(e,t,s,i){if((!t||s)&&this.isContextual(109))return void(e.id=null);super.parseClassId(e,t,s,e.declare?1024:8331);const n=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);n&&(e.typeParameters=n)}parseClassPropertyAnnotation(e){e.optional||(this.eat(31)?e.definite=!0:this.eat(13)&&(e.optional=!0));const t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t),e.definite&&(this.match(25)?this.raise(fc.DeclaratorDefiniteAssertionWithInitializer,e):t||this.raise(fc.DeclaratorDefiniteAssertionRequiresTypeAnnotation,e))}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&(!e.readonly||e.typeAnnotation)&&this.match(25)&&this.raise(fc.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(25)){const{key:t}=e;this.raise(fc.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:"Identifier"!==t.type||e.computed?`[${this.input.slice(this.offsetToSourcePos(t.start),this.offsetToSourcePos(t.end))}]`:t.name})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(fc.PrivateElementHasAbstract,e),e.accessibility&&this.raise(fc.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(fc.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,s,i,n,r){const a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&n&&this.raise(fc.ConstructorHasTypeParameters,a);const{declare:o=!1,kind:c}=t;!o||"get"!==c&&"set"!==c||this.raise(fc.DeclareAccessor,t,{kind:c}),a&&(t.typeParameters=a),super.pushClassMethod(e,t,s,i,n,r)}pushClassPrivateMethod(e,t,s,i){const n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(t.typeParameters=n),super.pushClassPrivateMethod(e,t,s,i)}declareClassPrivateMethodInScope(e,t){"TSDeclareMethod"!==e.type&&("MethodDefinition"===e.type&&null==e.value.body||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass)if("TSInstantiationExpression"===e.superClass.type){const t=e.superClass,s=t.expression;this.takeSurroundingComments(s,s.start,s.end);const i=t.typeArguments;this.takeSurroundingComments(i,i.start,i.end),e.superClass=s,e.superTypeArguments=i}else(this.match(43)||this.match(47))&&(e.superTypeArguments=this.tsParseTypeArgumentsInExpression());this.eatContextual(109)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,t,s,i,n,r,a){const o=this.tsTryParseTypeParameters(this.tsParseConstModifier);return o&&(e.typeParameters=o),super.parseObjPropValue(e,t,s,i,n,r,a)}parseFunctionParams(e,t){const s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&(e.typeParameters=s),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),"Identifier"===e.id.type&&!this.hasPrecedingLineBreak()&&this.eat(31)&&(e.definite=!0);const s=this.tsTryParseTypeAnnotation();s&&(e.id.typeAnnotation=s,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(10)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){let s,i,n,r;if(this.hasPlugin("jsx")&&(this.match(138)||this.match(43))){if(s=this.state.clone(),i=this.tryParse(()=>super.parseMaybeAssign(e,t),s),!i.error)return i.node;const{context:n}=this.state,r=n[n.length-1];r!==Ba.j_oTag&&r!==Ba.j_expr||n.pop()}if(!i?.error&&!this.match(43))return super.parseMaybeAssign(e,t);s&&s!==this.state||(s=this.state.clone());const a=this.tryParse(s=>{r=this.tsParseTypeParameters(this.tsParseConstModifier);const i=super.parseMaybeAssign(e,t);if(("ArrowFunctionExpression"!==i.type||i.extra?.parenthesized)&&s(),0!==r?.params.length&&this.resetStartLocationFromNode(i,r),i.typeParameters=r,this.hasPlugin("jsx")&&1===i.typeParameters.params.length&&!i.typeParameters.extra?.trailingComma){const e=i.typeParameters.params[0];e.constraint||this.raise(fc.SingleTypeParameterWithoutTrailingComma,256&this.optionFlags?zr(e.loc.end,1):e,{typeParameterName:e.name.name})}return i},s);if(!a.error&&!a.aborted)return r&&this.reportReservedArrowTypeParam(r),a.node;if(!i&&(dc(!this.hasPlugin("jsx")),n=this.tryParse(()=>super.parseMaybeAssign(e,t),s),!n.error))return n.node;if(i?.node)return this.state=i.failState,i.node;if(a.node)return this.state=a.failState,r&&this.reportReservedArrowTypeParam(r),a.node;if(n?.node)return this.state=n.failState,n.node;throw i?.error||a.error||n?.error}reportReservedArrowTypeParam(e){1!==e.params.length||e.params[0].constraint||e.extra?.trailingComma||!this.getPluginOption("typescript","disallowAmbiguousJSXLike")||this.raise(fc.ReservedArrowTypeParam,e)}parseMaybeUnary(e,t){return!this.hasPlugin("jsx")&&this.match(43)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(10)){const t=this.tryParse(e=>{const 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);const 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(fc.UnexpectedTypeCastInParameter,e):this.raise(fc.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,t);break;case"AssignmentExpression":t||"TSTypeCastExpression"!==e.left.type||(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,s,i){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(64!==i||!s)&&["expression",!0];default:return super.isValidLVal(e,t,s,i)}}parseBindingAtom(){return 74===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e,t){if(this.match(43)||this.match(47)){const s=this.tsParseTypeArgumentsInExpression();if(this.match(6)){const i=super.parseMaybeDecoratorArguments(e,t);return i.typeArguments=s,i}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){const s=super.parseMaybeDefault(e,t);return"AssignmentPattern"===s.type&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(fc.TypeAnnotationAfterAssign,s.typeAnnotation),s}getTokenFromCode(e){if(this.state.inType){if(62===e)return void this.finishOp(44,1);if(60===e)return void this.finishOp(43,1)}super.getTokenFromCode(e)}reScan_lt_gt(){const{type:e}=this.state;43===e?(this.state.pos-=1,this.readToken_lt()):44===e&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:e}=this.state;return 47===e?(this.state.pos-=2,this.finishOp(43,1),43):e}toAssignableListItem(e,t,s){const i=e[t];"TSTypeCastExpression"===i.type&&(e[t]=this.typeCastToParameter(i)),super.toAssignableListItem(e,t,s)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocationFromNode(e.expression,e.typeAnnotation),e.expression}shouldParseArrow(e){return this.match(10)?e.every(e=>this.isAssignable(e,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(10)?!this.state.inConditionalConsequent:super.shouldParseAsyncArrow()}parseParenAndDistinguishExpression(e){const t=this.state.inConditionalConsequent;this.state.inConditionalConsequent=!1;const s=super.parseParenAndDistinguishExpression(e);return this.state.inConditionalConsequent=t,s}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(43)||this.match(47)){const t=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());t&&(e.typeArguments=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){const t=super.getGetterSetterExpectedParamCount(e),s=this.getObjectOrClassMethodParams(e)[0];return s&&this.isThisParam(s)?t+1:t}parseCatchClauseParam(){const e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){const{isAmbientContext:t,strict:s}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return e()}finally{this.state.isAmbientContext=t,this.state.strict=s}}parseClass(e,t,s){const i=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,s)}finally{this.state.inAbstractClass=i}}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(fc.NonClassMethodPropertyHasAbstractModifier,e),this.tsParseInterfaceDeclaration(e));throw this.unexpected(null,76)}parseMethod(e,t,s,i,n,r,a){const o=super.parseMethod(e,t,s,i,n,r,a);if(o.abstract||"TSAbstractMethodDefinition"===o.type){if((this.hasPlugin("estree")?o.value:o).body){const{key:e}=o;this.raise(fc.AbstractMethodHasImplementation,o,{methodName:"Identifier"!==e.type||o.computed?`[${this.input.slice(this.offsetToSourcePos(e.start),this.offsetToSourcePos(e.end))}]`:e.name})}}return o}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,s,i){return!t&&i?(this.parseTypeOnlyExportSpecifier(e,s),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,s,i))}parseImportSpecifier(e,t,s,i,n){return!t&&i?(this.parseTypeOnlyImportSpecifier(e,s),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,s,i,s?4098:4096))}parseTypeOnlyImportSpecifier(e,t){let s=e.imported,i=!1;if(this.isContextual(89)){const t=this.parseIdentifier();if(this.isContextual(89)){const n=this.parseIdentifier();Pa(this.state.type)?(i=!0,s=t,e.local=this.parseIdentifier()):e.local=n}else Pa(this.state.type)?e.local=this.parseIdentifier():(i=!0,s=t)}else Pa(this.state.type)&&(i=!0,s=this.parseIdentifier(!0),this.isContextual(89)||this.checkReservedWord(s.name,s.start,!0,!0));i&&t&&this.raise(fc.TypeModifierIsUsedInTypeImports,e.imported),e.imported=s,e.importKind=i?"type":"value",this.checkIdentifier(e.local??=this.eatContextual(89)?this.parseIdentifier():this.cloneIdentifier(e.imported),i?4098:4096)}parseTypeOnlyExportSpecifier(e,t){const s=e.local;let i=!1;if(this.isContextual(89)){const t=this.parseIdentifier();if(this.isContextual(89)){const s=this.parseIdentifier();Pa(this.state.type)?(i=!0,e.local=t,e.exported=this.parseModuleExportName()):e.exported=s}else Pa(this.state.type)?e.exported=this.parseModuleExportName():(i=!0,e.local=t)}else Pa(this.state.type)&&(i=!0,e.local=this.parseModuleExportName());i&&t&&this.raise(fc.TypeModifierIsUsedInTypeExports,s),e.exportKind=i?"type":"value",e.exported??=this.eatContextual(89)?this.parseModuleExportName():this.cloneIdentifier(e.local)}fillOptionalPropertiesForTSESLint(e){switch(e.type){case"ImportDeclaration":return void(e.phase??=null);case"ExpressionStatement":return void(e.directive??=void 0);case"RestElement":e.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":return e.decorators??=[],e.optional??=!1,void(e.typeAnnotation??=void 0);case"TSParameterProperty":return e.accessibility??=void 0,e.decorators??=[],e.override??=!1,e.readonly??=!1,void(e.static??=!1);case"TSEmptyBodyFunctionExpression":e.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":return e.declare??=!1,e.returnType??=void 0,void(e.typeParameters??=void 0);case"Property":return void(e.optional??=!1);case"TSMethodSignature":case"TSPropertySignature":e.optional??=!1;case"TSIndexSignature":return e.accessibility??=void 0,e.readonly??=!1,void(e.static??=!1);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":return e.accessibility??=void 0,e.decorators??=[],e.override??=!1,void(e.optional??=!1);case"ClassExpression":e.id??=null;case"ClassDeclaration":return e.abstract??=!1,e.declare??=!1,e.decorators??=[],e.implements??=[],e.superTypeArguments??=void 0,void(e.typeParameters??=void 0);case"TSTypeAliasDeclaration":case"VariableDeclaration":return void(e.declare??=!1);case"VariableDeclarator":return void(e.definite??=!1);case"TSEnumDeclaration":return e.const??=!1,void(e.declare??=!1);case"TSEnumMember":return void(e.computed??=!1);case"TSImportType":return e.qualifier??=null,e.options??=null,void(e.typeArguments??=null);case"TSInterfaceDeclaration":return e.declare??=!1,void(e.extends??=[]);case"TSMappedType":return e.optional??=!1,void(e.readonly??=void 0);case"TSModuleDeclaration":return e.declare??=!1,void(e.global??="global"===e.kind);case"TSTypeParameter":return e.const??=!1,e.in??=!1,void(e.out??=!1)}}chStartsBindingIdentifierAndNotRelationalOperator(e,t){if(Ha(e)){if(uc.lastIndex=t,uc.test(this.input)){const e=this.codePointAtPos(uc.lastIndex);if(!Ka(e)&&92!==e)return!1}return!0}return 92===e}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifierAndNotRelationalOperator(t,e)}nextTokenIsStringLiteralOnSameLine(){const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return 34===t||39===t}},v8intrinsic:e=>class extends e{parseV8Intrinsic(){if(this.match(50)){const e=this.state.startLoc,t=this.startNode();if(this.next(),Ca(this.state.type)){const e=this.parseIdentifierName(),s=this.createIdentifier(t,e);if(this.castNodeTo(s,"V8IntrinsicIdentifier"),this.match(6))return s}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},placeholders:e=>class extends e{parsePlaceholder(e){if(this.match(129)){const 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 s=e;return s.expectedNode&&s.type||(s=this.finishNode(s,"Placeholder")),s.expectedNode=t,s}getTokenFromCode(e){37===e&&37===this.input.charCodeAt(this.state.pos+1)?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,s,i){void 0!==e&&super.checkReservedWord(e,t,s,i)}cloneIdentifier(e){const t=super.cloneIdentifier(e);return"Placeholder"===t.type&&(t.expectedNode=e.expectedNode),t}cloneStringLiteral(e){return"Placeholder"===e.type?this.cloneIdentifier(e):super.cloneStringLiteral(e)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,s,i){return"Placeholder"===e||super.isValidLVal(e,t,s,i)}toAssignable(e,t){e&&"Placeholder"===e.type&&"Expression"===e.expectedNode?e.expectedNode="Pattern":super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){if(super.chStartsBindingIdentifier(e,t))return!0;const s=this.nextTokenStart();return 37===this.input.charCodeAt(s)&&37===this.input.charCodeAt(s+1)}verifyBreakContinue(e,t){"Placeholder"!==e.label?.type&&super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){if("Placeholder"!==t.type||t.extra?.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(10)){const s=e;return s.label=this.finishPlaceholder(t,"Identifier"),this.next(),s.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(s,"LabeledStatement")}this.semicolon();const s=e;return s.name=t.name,this.finishPlaceholder(s,"Statement")}parseBlock(e,t,s){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,t,s)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,t,s){const i=t?"ClassDeclaration":"ClassExpression";this.next();const n=this.state.strict,r=this.parsePlaceholder("Identifier");if(r){if(!(this.match(77)||this.match(129)||this.match(2))){if(s||!t)return e.id=null,e.body=this.finishPlaceholder(r,"ClassBody"),this.finishNode(e,i);throw this.raise(Ec.ClassNameIsRequired,this.state.startLoc)}e.id=r}else this.parseClassId(e,t,s);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,n),this.finishNode(e,i)}parseExport(e,t){const s=this.parsePlaceholder("Identifier");if(!s)return super.parseExport(e,t);const i=e;if(!this.isContextual(94)&&!this.match(8))return i.specifiers=[],i.source=null,i.declaration=this.finishPlaceholder(s,"Declaration"),this.finishNode(i,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const n=this.startNode();return n.exported=s,i.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],super.parseExport(i,t)}isExportDefaultSpecifier(){if(this.match(61)){const e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(Da(129),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){return!!e.specifiers?.length||super.maybeParseExportDefaultSpecifier(e,t)}checkNamedExport(){}parseImport(e){const 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");const s=this.startNodeAtNode(t);if(s.local=t,e.specifiers.push(this.finishNode(s,"ImportDefaultSpecifier")),this.eat(8)){this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)}return 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(Ec.UnexpectedSpace,this.state.lastTokEndLoc)}}},Nc=Object.keys(_c);class Lc extends pc{constructor(e,t,s){const i=function(e){const t={sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,locations:!0,tokens:!1,createImportExpressions:!0,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};if(null==e)return t;if(null!=e.annexB&&!1!==e.annexB)throw new Error("The `annexB` option can only be set to `false`.");for(const s of Object.keys(t))null!=e[s]&&(t[s]=e[s]);if(1===t.startLine)null==e.startIndex&&t.startColumn>0?t.startIndex=t.startColumn:null==e.startColumn&&t.startIndex>0&&(t.startColumn=t.startIndex);else if(null==e.startColumn||null==e.startIndex)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if("commonjs"===t.sourceType){if(null!=e.allowAwaitOutsideFunction)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(null!=e.allowReturnOutsideFunction)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(null!=e.allowNewTargetOutsideFunction)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return t}(e);super(i,t),this.options=i,this.initializeScopes(),this.plugins=s,this.filename=i.sourceFilename,this.startIndex=i.startIndex;let n=0;i.allowAwaitOutsideFunction&&(n|=1),i.allowReturnOutsideFunction&&(n|=2),i.allowImportExportEverywhere&&(n|=8),i.allowSuperOutsideMethod&&(n|=16),i.allowUndeclaredExports&&(n|=64),i.allowNewTargetOutsideFunction&&(n|=4),i.allowYieldOutsideFunction&&(n|=32),i.ranges&&(n|=128),!0===i.locations&&(n|=256),i.tokens&&(n|=512),i.createImportExpressions&&(n|=1024),i.createParenthesizedExpressions&&(n|=2048),i.errorRecovery&&(n|=4096),i.attachComment&&(n|=8192),i.annexB&&(n|=16384),this.optionFlags=n}getScopeHandler(){return io}parse(){this.enterInitialScopes();const e=this.startNode(),t=this.startNode();this.nextToken(),e.errors=[];const s=this.parseTopLevel(e,t);return s.errors=this.state.errors,s.comments.length=this.state.commentsLen,s}}function Dc(e,t){let s=Lc;const i=new Map;if(e?.plugins){for(const t of e.plugins){let e,s;"string"==typeof t?e=t:[e,s]=t,i.has(e)||i.set(e,s||{})}!function(e){if(e.has("decorators")&&e.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");if(e.has("flow")&&e.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(e.has("placeholders")&&e.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(e.has("pipelineOperator")){const t=e.get("pipelineOperator").proposal;if(!Ac.includes(t)){const e=Ac.map(e=>`"${e}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`)}if("hack"===t){if(e.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(e.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const t=e.get("pipelineOperator").topicToken;if(!Ic.includes(t)){const e=Ic.map(e=>`"${e}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${e}.`)}}}if(e.has("moduleAttributes"))throw new Error("`moduleAttributes` has been removed in Babel 8, please migrate to import attributes instead.");if(e.has("importAssertions"))throw new 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 new Error("The 'recordAndTuple' plugin has been removed in Babel 8. Please remove it from your configuration.");if(e.has("asyncDoExpressions")&&!e.has("doExpressions")){const e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(e.has("optionalChainingAssign")&&"2023-07"!==e.get("optionalChainingAssign").version)throw new 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")&&"void"!==e.get("discardBinding").syntaxType)throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.");if(e.has("decimal"))throw new Error("The 'decimal' plugin has been removed in Babel 8. Please remove it from your configuration.");if(e.has("importReflection"))throw new Error("The 'importReflection' plugin has been removed in Babel 8. Use 'sourcePhaseImports' instead, and replace 'import module' with 'import source' in your code.")}(i),s=function(e){const t=[];for(const s of Nc)e.has(s)&&t.push(s);const s=t.join("|");let i=Mc.get(s);if(!i){i=Lc;for(const e of t)i=_c[e](i);Mc.set(s,i)}return i}(i)}return new s(e,t,i)}!function(e){const t={};for(const s of Object.keys(e))t[s]=Fa(e[s])}(va);const Mc=new Map;var Oc,Fc,Rc;!function(e){e[e.NONE=0]="NONE";e[e._abstract=1]="_abstract";e[e._accessor=2]="_accessor";e[e._as=3]="_as";e[e._assert=4]="_assert";e[e._asserts=5]="_asserts";e[e._async=6]="_async";e[e._await=7]="_await";e[e._checks=8]="_checks";e[e._constructor=9]="_constructor";e[e._declare=10]="_declare";e[e._enum=11]="_enum";e[e._exports=12]="_exports";e[e._from=13]="_from";e[e._get=14]="_get";e[e._global=15]="_global";e[e._implements=16]="_implements";e[e._infer=17]="_infer";e[e._interface=18]="_interface";e[e._is=19]="_is";e[e._keyof=20]="_keyof";e[e._mixins=21]="_mixins";e[e._module=22]="_module";e[e._namespace=23]="_namespace";e[e._of=24]="_of";e[e._opaque=25]="_opaque";e[e._out=26]="_out";e[e._override=27]="_override";e[e._private=28]="_private";e[e._protected=29]="_protected";e[e._proto=30]="_proto";e[e._public=31]="_public";e[e._readonly=32]="_readonly";e[e._require=33]="_require";e[e._satisfies=34]="_satisfies";e[e._set=35]="_set";e[e._static=36]="_static";e[e._symbol=37]="_symbol";e[e._type=38]="_type";e[e._unique=39]="_unique";e[e._using=40]="_using"}(Oc||(Oc={})),function(e){e[e.PRECEDENCE_MASK=15]="PRECEDENCE_MASK";e[e.IS_KEYWORD=16]="IS_KEYWORD";e[e.IS_ASSIGN=32]="IS_ASSIGN";e[e.IS_RIGHT_ASSOCIATIVE=64]="IS_RIGHT_ASSOCIATIVE";e[e.IS_PREFIX=128]="IS_PREFIX";e[e.IS_POSTFIX=256]="IS_POSTFIX";e[e.IS_EXPRESSION_START=512]="IS_EXPRESSION_START";e[e.num=512]="num";e[e.bigint=1536]="bigint";e[e.decimal=2560]="decimal";e[e.regexp=3584]="regexp";e[e.string=4608]="string";e[e.name=5632]="name";e[e.eof=6144]="eof";e[e.bracketL=7680]="bracketL";e[e.bracketR=8192]="bracketR";e[e.braceL=9728]="braceL";e[e.braceBarL=10752]="braceBarL";e[e.braceR=11264]="braceR";e[e.braceBarR=12288]="braceBarR";e[e.parenL=13824]="parenL";e[e.parenR=14336]="parenR";e[e.comma=15360]="comma";e[e.semi=16384]="semi";e[e.colon=17408]="colon";e[e.doubleColon=18432]="doubleColon";e[e.dot=19456]="dot";e[e.question=20480]="question";e[e.questionDot=21504]="questionDot";e[e.arrow=22528]="arrow";e[e.template=23552]="template";e[e.ellipsis=24576]="ellipsis";e[e.backQuote=25600]="backQuote";e[e.dollarBraceL=27136]="dollarBraceL";e[e.at=27648]="at";e[e.hash=29184]="hash";e[e.eq=29728]="eq";e[e.assign=30752]="assign";e[e.preIncDec=32640]="preIncDec";e[e.postIncDec=33664]="postIncDec";e[e.bang=34432]="bang";e[e.tilde=35456]="tilde";e[e.pipeline=35841]="pipeline";e[e.nullishCoalescing=36866]="nullishCoalescing";e[e.logicalOR=37890]="logicalOR";e[e.logicalAND=38915]="logicalAND";e[e.bitwiseOR=39940]="bitwiseOR";e[e.bitwiseXOR=40965]="bitwiseXOR";e[e.bitwiseAND=41990]="bitwiseAND";e[e.equality=43015]="equality";e[e.lessThan=44040]="lessThan";e[e.greaterThan=45064]="greaterThan";e[e.relationalOrEqual=46088]="relationalOrEqual";e[e.bitShiftL=47113]="bitShiftL";e[e.bitShiftR=48137]="bitShiftR";e[e.plus=49802]="plus";e[e.minus=50826]="minus";e[e.modulo=51723]="modulo";e[e.star=52235]="star";e[e.slash=53259]="slash";e[e.exponent=54348]="exponent";e[e.jsxName=55296]="jsxName";e[e.jsxText=56320]="jsxText";e[e.jsxEmptyText=57344]="jsxEmptyText";e[e.jsxTagStart=58880]="jsxTagStart";e[e.jsxTagEnd=59392]="jsxTagEnd";e[e.typeParameterStart=60928]="typeParameterStart";e[e.nonNullAssertion=61440]="nonNullAssertion";e[e._break=62480]="_break";e[e._case=63504]="_case";e[e._catch=64528]="_catch";e[e._continue=65552]="_continue";e[e._debugger=66576]="_debugger";e[e._default=67600]="_default";e[e._do=68624]="_do";e[e._else=69648]="_else";e[e._finally=70672]="_finally";e[e._for=71696]="_for";e[e._function=73232]="_function";e[e._if=73744]="_if";e[e._return=74768]="_return";e[e._switch=75792]="_switch";e[e._throw=77456]="_throw";e[e._try=77840]="_try";e[e._var=78864]="_var";e[e._let=79888]="_let";e[e._const=80912]="_const";e[e._while=81936]="_while";e[e._with=82960]="_with";e[e._new=84496]="_new";e[e._this=85520]="_this";e[e._super=86544]="_super";e[e._class=87568]="_class";e[e._extends=88080]="_extends";e[e._export=89104]="_export";e[e._import=90640]="_import";e[e._yield=91664]="_yield";e[e._null=92688]="_null";e[e._true=93712]="_true";e[e._false=94736]="_false";e[e._in=95256]="_in";e[e._instanceof=96280]="_instanceof";e[e._typeof=97936]="_typeof";e[e._void=98960]="_void";e[e._delete=99984]="_delete";e[e._async=100880]="_async";e[e._get=101904]="_get";e[e._set=102928]="_set";e[e._declare=103952]="_declare";e[e._readonly=104976]="_readonly";e[e._abstract=106e3]="_abstract";e[e._static=107024]="_static";e[e._public=107536]="_public";e[e._private=108560]="_private";e[e._protected=109584]="_protected";e[e._override=110608]="_override";e[e._as=112144]="_as";e[e._enum=113168]="_enum";e[e._type=114192]="_type";e[e._implements=115216]="_implements"}(Fc||(Fc={}));class Bc{constructor(e,t,s){this.startTokenIndex=e,this.endTokenIndex=t,this.isFunctionScope=s}}class jc{constructor(e,t,s,i,n,r,a,o,c,h,l,p,u){this.potentialArrowAt=e,this.noAnonFunctionType=t,this.inDisallowConditionalTypesContext=s,this.tokensLength=i,this.scopesLength=n,this.pos=r,this.type=a,this.contextualKeyword=o,this.start=c,this.end=h,this.isType=l,this.scopeDepth=p,this.error=u}}class Uc{constructor(){Uc.prototype.__init.call(this),Uc.prototype.__init2.call(this),Uc.prototype.__init3.call(this),Uc.prototype.__init4.call(this),Uc.prototype.__init5.call(this),Uc.prototype.__init6.call(this),Uc.prototype.__init7.call(this),Uc.prototype.__init8.call(this),Uc.prototype.__init9.call(this),Uc.prototype.__init10.call(this),Uc.prototype.__init11.call(this),Uc.prototype.__init12.call(this),Uc.prototype.__init13.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.inDisallowConditionalTypesContext=!1}__init4(){this.tokens=[]}__init5(){this.scopes=[]}__init6(){this.pos=0}__init7(){this.type=Fc.eof}__init8(){this.contextualKeyword=Oc.NONE}__init9(){this.start=0}__init10(){this.end=0}__init11(){this.isType=!1}__init12(){this.scopeDepth=0}__init13(){this.error=null}snapshot(){return new jc(this.potentialArrowAt,this.noAnonFunctionType,this.inDisallowConditionalTypesContext,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(e){this.potentialArrowAt=e.potentialArrowAt,this.noAnonFunctionType=e.noAnonFunctionType,this.inDisallowConditionalTypesContext=e.inDisallowConditionalTypesContext,this.tokens.length=e.tokensLength,this.scopes.length=e.scopesLength,this.pos=e.pos,this.type=e.type,this.contextualKeyword=e.contextualKeyword,this.start=e.start,this.end=e.end,this.isType=e.isType,this.scopeDepth=e.scopeDepth,this.error=e.error}}let qc,$c,Vc,Hc,Kc,zc;function Jc(){return zc++}function Wc(e){if("pos"in e){const t=function(e){let t=1,s=1;for(let i=0;i<e;i++)Kc.charCodeAt(i)===Rc.lineFeed?(t++,s=1):s++;return new Xc(t,s)}(e.pos);e.message+=` (${t.line}:${t.column})`,e.loc=t}return e}!function(e){e[e.backSpace=8]="backSpace";e[e.lineFeed=10]="lineFeed";e[e.tab=9]="tab";e[e.carriageReturn=13]="carriageReturn";e[e.shiftOut=14]="shiftOut";e[e.space=32]="space";e[e.exclamationMark=33]="exclamationMark";e[e.quotationMark=34]="quotationMark";e[e.numberSign=35]="numberSign";e[e.dollarSign=36]="dollarSign";e[e.percentSign=37]="percentSign";e[e.ampersand=38]="ampersand";e[e.apostrophe=39]="apostrophe";e[e.leftParenthesis=40]="leftParenthesis";e[e.rightParenthesis=41]="rightParenthesis";e[e.asterisk=42]="asterisk";e[e.plusSign=43]="plusSign";e[e.comma=44]="comma";e[e.dash=45]="dash";e[e.dot=46]="dot";e[e.slash=47]="slash";e[e.digit0=48]="digit0";e[e.digit1=49]="digit1";e[e.digit2=50]="digit2";e[e.digit3=51]="digit3";e[e.digit4=52]="digit4";e[e.digit5=53]="digit5";e[e.digit6=54]="digit6";e[e.digit7=55]="digit7";e[e.digit8=56]="digit8";e[e.digit9=57]="digit9";e[e.colon=58]="colon";e[e.semicolon=59]="semicolon";e[e.lessThan=60]="lessThan";e[e.equalsTo=61]="equalsTo";e[e.greaterThan=62]="greaterThan";e[e.questionMark=63]="questionMark";e[e.atSign=64]="atSign";e[e.uppercaseA=65]="uppercaseA";e[e.uppercaseB=66]="uppercaseB";e[e.uppercaseC=67]="uppercaseC";e[e.uppercaseD=68]="uppercaseD";e[e.uppercaseE=69]="uppercaseE";e[e.uppercaseF=70]="uppercaseF";e[e.uppercaseG=71]="uppercaseG";e[e.uppercaseH=72]="uppercaseH";e[e.uppercaseI=73]="uppercaseI";e[e.uppercaseJ=74]="uppercaseJ";e[e.uppercaseK=75]="uppercaseK";e[e.uppercaseL=76]="uppercaseL";e[e.uppercaseM=77]="uppercaseM";e[e.uppercaseN=78]="uppercaseN";e[e.uppercaseO=79]="uppercaseO";e[e.uppercaseP=80]="uppercaseP";e[e.uppercaseQ=81]="uppercaseQ";e[e.uppercaseR=82]="uppercaseR";e[e.uppercaseS=83]="uppercaseS";e[e.uppercaseT=84]="uppercaseT";e[e.uppercaseU=85]="uppercaseU";e[e.uppercaseV=86]="uppercaseV";e[e.uppercaseW=87]="uppercaseW";e[e.uppercaseX=88]="uppercaseX";e[e.uppercaseY=89]="uppercaseY";e[e.uppercaseZ=90]="uppercaseZ";e[e.leftSquareBracket=91]="leftSquareBracket";e[e.backslash=92]="backslash";e[e.rightSquareBracket=93]="rightSquareBracket";e[e.caret=94]="caret";e[e.underscore=95]="underscore";e[e.graveAccent=96]="graveAccent";e[e.lowercaseA=97]="lowercaseA";e[e.lowercaseB=98]="lowercaseB";e[e.lowercaseC=99]="lowercaseC";e[e.lowercaseD=100]="lowercaseD";e[e.lowercaseE=101]="lowercaseE";e[e.lowercaseF=102]="lowercaseF";e[e.lowercaseG=103]="lowercaseG";e[e.lowercaseH=104]="lowercaseH";e[e.lowercaseI=105]="lowercaseI";e[e.lowercaseJ=106]="lowercaseJ";e[e.lowercaseK=107]="lowercaseK";e[e.lowercaseL=108]="lowercaseL";e[e.lowercaseM=109]="lowercaseM";e[e.lowercaseN=110]="lowercaseN";e[e.lowercaseO=111]="lowercaseO";e[e.lowercaseP=112]="lowercaseP";e[e.lowercaseQ=113]="lowercaseQ";e[e.lowercaseR=114]="lowercaseR";e[e.lowercaseS=115]="lowercaseS";e[e.lowercaseT=116]="lowercaseT";e[e.lowercaseU=117]="lowercaseU";e[e.lowercaseV=118]="lowercaseV";e[e.lowercaseW=119]="lowercaseW";e[e.lowercaseX=120]="lowercaseX";e[e.lowercaseY=121]="lowercaseY";e[e.lowercaseZ=122]="lowercaseZ";e[e.leftCurlyBrace=123]="leftCurlyBrace";e[e.verticalBar=124]="verticalBar";e[e.rightCurlyBrace=125]="rightCurlyBrace";e[e.tilde=126]="tilde";e[e.nonBreakingSpace=160]="nonBreakingSpace";e[e.oghamSpaceMark=5760]="oghamSpaceMark";e[e.lineSeparator=8232]="lineSeparator";e[e.paragraphSeparator=8233]="paragraphSeparator"}(Rc||(Rc={}));class Xc{constructor(e,t){this.line=e,this.column=t}}function Gc(e,t,s,i){Kc=e,Hc=new Uc,zc=1,qc=t,$c=s,Vc=i}function Yc(e){return Hc.contextualKeyword===e}function Qc(e){const t=Mh();return t.type===Fc.name&&t.contextualKeyword===e}function Zc(e){return Hc.contextualKeyword===e&&Ih(Fc.name)}function eh(e){Zc(e)||oh()}function th(){return Nh(Fc.eof)||Nh(Fc.braceR)||sh()}function sh(){const e=Hc.tokens[Hc.tokens.length-1];for(let t=e?e.end:0;t<Hc.start;t++){const e=Kc.charCodeAt(t);if(e===Rc.lineFeed||e===Rc.carriageReturn||8232===e||8233===e)return!0}return!1}function ih(){const e=Oh();for(let t=Hc.end;t<e;t++){const e=Kc.charCodeAt(t);if(e===Rc.lineFeed||e===Rc.carriageReturn||8232===e||8233===e)return!0}return!1}function nh(){return Ih(Fc.semi)||th()}function rh(){nh()||oh('Unexpected token, expected ";"')}function ah(e){Ih(e)||oh(`Unexpected token, expected "${function(e){switch(e){case Fc.num:return"num";case Fc.bigint:return"bigint";case Fc.decimal:return"decimal";case Fc.regexp:return"regexp";case Fc.string:return"string";case Fc.name:return"name";case Fc.eof:return"eof";case Fc.bracketL:return"[";case Fc.bracketR:return"]";case Fc.braceL:return"{";case Fc.braceBarL:return"{|";case Fc.braceR:return"}";case Fc.braceBarR:return"|}";case Fc.parenL:return"(";case Fc.parenR:return")";case Fc.comma:return",";case Fc.semi:return";";case Fc.colon:return":";case Fc.doubleColon:return"::";case Fc.dot:return".";case Fc.question:return"?";case Fc.questionDot:return"?.";case Fc.arrow:return"=>";case Fc.template:return"template";case Fc.ellipsis:return"...";case Fc.backQuote:return"`";case Fc.dollarBraceL:return"${";case Fc.at:return"@";case Fc.hash:return"#";case Fc.eq:return"=";case Fc.assign:return"_=";case Fc.preIncDec:case Fc.postIncDec:return"++/--";case Fc.bang:return"!";case Fc.tilde:return"~";case Fc.pipeline:return"|>";case Fc.nullishCoalescing:return"??";case Fc.logicalOR:return"||";case Fc.logicalAND:return"&&";case Fc.bitwiseOR:return"|";case Fc.bitwiseXOR:return"^";case Fc.bitwiseAND:return"&";case Fc.equality:return"==/!=";case Fc.lessThan:return"<";case Fc.greaterThan:return">";case Fc.relationalOrEqual:return"<=/>=";case Fc.bitShiftL:return"<<";case Fc.bitShiftR:return">>/>>>";case Fc.plus:return"+";case Fc.minus:return"-";case Fc.modulo:return"%";case Fc.star:return"*";case Fc.slash:return"/";case Fc.exponent:return"**";case Fc.jsxName:return"jsxName";case Fc.jsxText:return"jsxText";case Fc.jsxEmptyText:return"jsxEmptyText";case Fc.jsxTagStart:return"jsxTagStart";case Fc.jsxTagEnd:return"jsxTagEnd";case Fc.typeParameterStart:return"typeParameterStart";case Fc.nonNullAssertion:return"nonNullAssertion";case Fc._break:return"break";case Fc._case:return"case";case Fc._catch:return"catch";case Fc._continue:return"continue";case Fc._debugger:return"debugger";case Fc._default:return"default";case Fc._do:return"do";case Fc._else:return"else";case Fc._finally:return"finally";case Fc._for:return"for";case Fc._function:return"function";case Fc._if:return"if";case Fc._return:return"return";case Fc._switch:return"switch";case Fc._throw:return"throw";case Fc._try:return"try";case Fc._var:return"var";case Fc._let:return"let";case Fc._const:return"const";case Fc._while:return"while";case Fc._with:return"with";case Fc._new:return"new";case Fc._this:return"this";case Fc._super:return"super";case Fc._class:return"class";case Fc._extends:return"extends";case Fc._export:return"export";case Fc._import:return"import";case Fc._yield:return"yield";case Fc._null:return"null";case Fc._true:return"true";case Fc._false:return"false";case Fc._in:return"in";case Fc._instanceof:return"instanceof";case Fc._typeof:return"typeof";case Fc._void:return"void";case Fc._delete:return"delete";case Fc._async:return"async";case Fc._get:return"get";case Fc._set:return"set";case Fc._declare:return"declare";case Fc._readonly:return"readonly";case Fc._abstract:return"abstract";case Fc._static:return"static";case Fc._public:return"public";case Fc._private:return"private";case Fc._protected:return"protected";case Fc._override:return"override";case Fc._as:return"as";case Fc._enum:return"enum";case Fc._type:return"type";case Fc._implements:return"implements";default:return""}}(e)}"`)}function oh(e="Unexpected token",t=Hc.start){if(Hc.error)return;const s=new SyntaxError(e);s.pos=t,Hc.error=s,Hc.pos=Kc.length,$h(Fc.eof)}const ch=[9,11,12,Rc.space,Rc.nonBreakingSpace,Rc.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],hh=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,lh=new Uint8Array(65536);for(const e of ch)lh[e]=1;function ph(e){if(e<48)return 36===e;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return 95===e;if(e<123)return!0;if(e<128)return!1;throw new Error("Should not be called with non-ASCII char code.")}const uh=new Uint8Array(65536);for(let e=0;e<128;e++)uh[e]=ph(e)?1:0;for(let e=128;e<65536;e++)uh[e]=1;for(const e of ch)uh[e]=0;uh[8232]=0,uh[8233]=0;const dh=uh.slice();for(let e=Rc.digit0;e<=Rc.digit9;e++)dh[e]=0;const fh=new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8451,8613,-1,8829,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1,-1,-1,-1,-1,-1,162,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,189,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,216,-1,-1,-1,-1,-1,-1,Oc._abstract<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,270,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,297,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,324,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,351,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,378,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,405,-1,-1,-1,-1,-1,-1,-1,-1,Oc._accessor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._as<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,459,-1,-1,-1,-1,-1,594,-1,-1,-1,-1,-1,-1,486,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,513,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,540,-1,-1,-1,-1,-1,-1,Oc._assert<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,567,-1,-1,-1,-1,-1,-1,-1,Oc._asserts<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,621,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,648,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._async<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,702,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,729,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,756,-1,-1,-1,-1,-1,-1,Oc._await<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,810,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,837,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,864,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,891,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._break<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,945,-1,-1,-1,-1,-1,-1,1107,-1,-1,-1,1242,-1,-1,1350,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,972,1026,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,999,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._case<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1053,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1080,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._catch<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1134,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1161,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1188,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1215,-1,-1,-1,-1,-1,-1,-1,Oc._checks<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1269,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1296,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1323,-1,-1,-1,-1,-1,-1,-1,1+(Fc._class<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1377,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1404,1620,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1431,-1,-1,-1,-1,-1,-1,1+(Fc._const<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1458,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1485,-1,-1,-1,-1,-1,-1,-1,-1,1512,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1539,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1566,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1593,-1,-1,-1,-1,-1,-1,-1,-1,Oc._constructor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1647,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1674,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1701,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1728,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._continue<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1782,-1,-1,-1,-1,-1,-1,-1,-1,-1,2349,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1809,1971,-1,-1,2106,-1,-1,-1,-1,-1,2241,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1836,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1863,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1890,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1917,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1944,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._debugger<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1998,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2025,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2052,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2079,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._declare<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2133,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2160,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2187,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2214,-1,-1,-1,-1,-1,-1,1+(Fc._default<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2268,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2295,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2322,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._delete<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._do<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2403,-1,2484,-1,-1,-1,-1,-1,-1,-1,-1,-1,2565,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2430,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2457,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._else<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2511,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2538,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._enum<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2592,-1,-1,-1,2727,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2619,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2646,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2673,-1,-1,-1,-1,-1,-1,1+(Fc._export<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2700,-1,-1,-1,-1,-1,-1,-1,Oc._exports<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2754,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2781,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2808,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2835,-1,-1,-1,-1,-1,-1,-1,1+(Fc._extends<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2889,-1,-1,-1,-1,-1,-1,-1,2997,-1,-1,-1,-1,-1,3159,-1,-1,3213,-1,-1,3294,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2916,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2943,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2970,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._false<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3024,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3051,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3078,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3105,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3132,-1,1+(Fc._finally<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3186,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._for<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3240,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3267,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._from<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3321,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3348,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3375,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3402,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3429,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3456,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._function<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3510,-1,-1,-1,-1,-1,-1,3564,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3537,-1,-1,-1,-1,-1,-1,Oc._get<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3591,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3618,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3645,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3672,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._global<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3726,-1,-1,-1,-1,-1,-1,3753,4077,-1,-1,-1,-1,4590,-1,-1,-1,-1,-1,-1,-1,1+(Fc._if<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3780,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3807,-1,-1,3996,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3834,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3861,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3888,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3915,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3942,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3969,-1,-1,-1,-1,-1,-1,-1,Oc._implements<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4023,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4050,-1,-1,-1,-1,-1,-1,1+(Fc._import<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._in<<1),-1,-1,-1,-1,-1,4104,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4185,4401,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4131,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4158,-1,-1,-1,-1,-1,-1,-1,-1,Oc._infer<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4212,-1,-1,-1,-1,-1,-1,-1,4239,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4266,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4293,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4320,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4347,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4374,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._instanceof<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4428,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4455,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4482,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4509,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4563,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._interface<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._is<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4644,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4671,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4698,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4725,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._keyof<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4779,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4806,-1,-1,-1,-1,-1,-1,1+(Fc._let<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4860,-1,-1,-1,-1,-1,4995,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4887,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4914,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4941,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4968,-1,-1,-1,-1,-1,-1,-1,Oc._mixins<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5022,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5049,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5076,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5103,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._module<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5157,-1,-1,-1,5373,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5427,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5184,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5211,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5238,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5265,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5292,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5319,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5346,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._namespace<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5400,-1,-1,-1,1+(Fc._new<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5454,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5481,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._null<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5535,-1,-1,-1,-1,-1,-1,-1,-1,-1,5562,-1,-1,-1,-1,5697,5751,-1,-1,-1,-1,Oc._of<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5589,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5643,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5670,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._opaque<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5724,-1,-1,-1,-1,-1,-1,Oc._out<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5778,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5805,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5832,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5859,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5886,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5913,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._override<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5967,-1,-1,6345,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5994,-1,-1,-1,-1,-1,6129,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6021,-1,-1,-1,-1,-1,6048,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6075,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6102,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._private<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6156,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6183,-1,-1,-1,-1,-1,-1,-1,-1,-1,6318,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6210,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6237,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6264,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6291,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._protected<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._proto<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6372,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6399,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6426,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6453,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._public<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6507,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6534,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6696,-1,-1,6831,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6561,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6588,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6615,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6642,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6669,-1,Oc._readonly<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6723,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6750,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6777,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6804,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._require<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6858,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6885,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6912,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._return<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6966,-1,-1,-1,7182,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7236,7371,-1,7479,-1,7614,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6993,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7020,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7047,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7074,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7101,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7128,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7155,-1,-1,-1,-1,-1,-1,-1,Oc._satisfies<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7209,-1,-1,-1,-1,-1,-1,Oc._set<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7263,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7290,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7317,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7344,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._static<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7398,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7425,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7452,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._super<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7506,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7533,-1,-1,-1,-1,-1,-1,-1,-1,-1,7560,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7587,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._switch<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7641,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7668,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7695,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7722,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._symbol<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7776,-1,-1,-1,-1,-1,-1,-1,-1,-1,7938,-1,-1,-1,-1,-1,-1,8046,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7803,-1,-1,-1,-1,-1,-1,-1,-1,7857,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7830,-1,-1,-1,-1,-1,-1,-1,1+(Fc._this<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7884,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7911,-1,-1,-1,1+(Fc._throw<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7965,-1,-1,-1,8019,-1,-1,-1,-1,-1,-1,7992,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._true<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._try<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8073,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8100,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._type<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8127,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8154,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._typeof<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8208,-1,-1,-1,-1,8343,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8235,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8262,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8289,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8316,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._unique<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8370,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8397,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8424,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._using<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8478,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8532,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8505,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._var<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8559,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8586,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._void<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8640,8748,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8667,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8694,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8721,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._while<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8775,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8802,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._with<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8856,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8883,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8910,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8937,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._yield<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);var mh,yh;function xh(e){const t=e.identifierRole;return t===mh.TopLevelDeclaration||t===mh.FunctionScopedDeclaration||t===mh.BlockScopedDeclaration||t===mh.ObjectShorthandTopLevelDeclaration||t===mh.ObjectShorthandFunctionScopedDeclaration||t===mh.ObjectShorthandBlockScopedDeclaration}function gh(e){const t=e.identifierRole;return t===mh.FunctionScopedDeclaration||t===mh.BlockScopedDeclaration||t===mh.ObjectShorthandFunctionScopedDeclaration||t===mh.ObjectShorthandBlockScopedDeclaration}function kh(e){const t=e.identifierRole;return t===mh.TopLevelDeclaration||t===mh.ObjectShorthandTopLevelDeclaration||t===mh.ImportDeclaration}function Th(e){const t=e.identifierRole;return t===mh.TopLevelDeclaration||t===mh.BlockScopedDeclaration||t===mh.ObjectShorthandTopLevelDeclaration||t===mh.ObjectShorthandBlockScopedDeclaration}function bh(e){const t=e.identifierRole;return t===mh.FunctionScopedDeclaration||t===mh.ObjectShorthandFunctionScopedDeclaration}function Sh(e){return e.identifierRole===mh.ObjectShorthandTopLevelDeclaration||e.identifierRole===mh.ObjectShorthandBlockScopedDeclaration||e.identifierRole===mh.ObjectShorthandFunctionScopedDeclaration}!function(e){e[e.Access=0]="Access";e[e.ExportAccess=1]="ExportAccess";e[e.TopLevelDeclaration=2]="TopLevelDeclaration";e[e.FunctionScopedDeclaration=3]="FunctionScopedDeclaration";e[e.BlockScopedDeclaration=4]="BlockScopedDeclaration";e[e.ObjectShorthandTopLevelDeclaration=5]="ObjectShorthandTopLevelDeclaration";e[e.ObjectShorthandFunctionScopedDeclaration=6]="ObjectShorthandFunctionScopedDeclaration";e[e.ObjectShorthandBlockScopedDeclaration=7]="ObjectShorthandBlockScopedDeclaration";e[e.ObjectShorthand=8]="ObjectShorthand";e[e.ImportDeclaration=9]="ImportDeclaration";e[e.ObjectKey=10]="ObjectKey";e[e.ImportAccess=11]="ImportAccess"}(mh||(mh={})),function(e){e[e.NoChildren=0]="NoChildren";e[e.OneChild=1]="OneChild";e[e.StaticChildren=2]="StaticChildren";e[e.KeyAfterPropSpread=3]="KeyAfterPropSpread"}(yh||(yh={}));class wh{constructor(){this.type=Hc.type,this.contextualKeyword=Hc.contextualKeyword,this.start=Hc.start,this.end=Hc.end,this.scopeDepth=Hc.scopeDepth,this.isType=Hc.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}}function vh(){Hc.tokens.push(new wh),Bh()}function Ch(){Hc.tokens.push(new wh),Hc.start=Hc.pos,function(){for(;;){if(Hc.pos>=Kc.length)return void oh("Unterminated template");const e=Kc.charCodeAt(Hc.pos);if(e===Rc.graveAccent||e===Rc.dollarSign&&Kc.charCodeAt(Hc.pos+1)===Rc.leftCurlyBrace)return Hc.pos===Hc.start&&Nh(Fc.template)?e===Rc.dollarSign?(Hc.pos+=2,void $h(Fc.dollarBraceL)):(++Hc.pos,void $h(Fc.backQuote)):void $h(Fc.template);e===Rc.backslash&&Hc.pos++,Hc.pos++}}()}function Ph(){Hc.type===Fc.assign&&--Hc.pos,function(){const e=Hc.pos;let t=!1,s=!1;for(;;){if(Hc.pos>=Kc.length)return void oh("Unterminated regular expression",e);const i=Kc.charCodeAt(Hc.pos);if(t)t=!1;else{if(i===Rc.leftSquareBracket)s=!0;else if(i===Rc.rightSquareBracket&&s)s=!1;else if(i===Rc.slash&&!s)break;t=i===Rc.backslash}++Hc.pos}++Hc.pos,function(){for(;Hc.pos<Kc.length;){const e=Kc.charCodeAt(Hc.pos);if(uh[e])Hc.pos++;else{if(e!==Rc.backslash)break;if(Hc.pos+=2,Kc.charCodeAt(Hc.pos)===Rc.leftCurlyBrace){for(;Hc.pos<Kc.length&&Kc.charCodeAt(Hc.pos)!==Rc.rightCurlyBrace;)Hc.pos++;Hc.pos++}}}}(),$h(Fc.regexp)}()}function Eh(e){for(let t=Hc.tokens.length-e;t<Hc.tokens.length;t++)Hc.tokens[t].isType=!0;const t=Hc.isType;return Hc.isType=!0,t}function Ah(e){Hc.isType=e}function Ih(e){return!!Nh(e)&&(vh(),!0)}function _h(e){const t=Hc.isType;Hc.isType=!0,Ih(e),Hc.isType=t}function Nh(e){return Hc.type===e}function Lh(){const e=Hc.snapshot();vh();const t=Hc.type;return Hc.restoreFromSnapshot(e),t}class Dh{constructor(e,t){this.type=e,this.contextualKeyword=t}}function Mh(){const e=Hc.snapshot();vh();const t=Hc.type,s=Hc.contextualKeyword;return Hc.restoreFromSnapshot(e),new Dh(t,s)}function Oh(){return Fh(Hc.pos)}function Fh(e){hh.lastIndex=e;return e+hh.exec(Kc)[0].length}function Rh(){return Kc.charCodeAt(Oh())}function Bh(){if(qh(),Hc.start=Hc.pos,Hc.pos>=Kc.length){const e=Hc.tokens;return e.length>=2&&e[e.length-1].start>=Kc.length&&e[e.length-2].start>=Kc.length&&oh("Unexpectedly reached the end of input."),void $h(Fc.eof)}!function(e){dh[e]||e===Rc.backslash||e===Rc.atSign&&Kc.charCodeAt(Hc.pos+1)===Rc.atSign?function(){let e=0,t=0,s=Hc.pos;for(;s<Kc.length&&(t=Kc.charCodeAt(s),!(t<Rc.lowercaseA||t>Rc.lowercaseZ));){const i=fh[e+(t-Rc.lowercaseA)+1];if(-1===i)break;e=i,s++}const i=fh[e];if(i>-1&&!uh[t])return Hc.pos=s,void(1&i?$h(i>>>1):$h(Fc.name,i>>>1));for(;s<Kc.length;){const e=Kc.charCodeAt(s);if(uh[e])s++;else if(e===Rc.backslash){if(s+=2,Kc.charCodeAt(s)===Rc.leftCurlyBrace){for(;s<Kc.length&&Kc.charCodeAt(s)!==Rc.rightCurlyBrace;)s++;s++}}else{if(e!==Rc.atSign||Kc.charCodeAt(s+1)!==Rc.atSign)break;s+=2}}Hc.pos=s,$h(Fc.name)}():Kh(e)}(Kc.charCodeAt(Hc.pos))}function jh(){for(;Kc.charCodeAt(Hc.pos)!==Rc.asterisk||Kc.charCodeAt(Hc.pos+1)!==Rc.slash;)if(Hc.pos++,Hc.pos>Kc.length)return void oh("Unterminated comment",Hc.pos-2);Hc.pos+=2}function Uh(e){let t=Kc.charCodeAt(Hc.pos+=e);if(Hc.pos<Kc.length)for(;t!==Rc.lineFeed&&t!==Rc.carriageReturn&&t!==Rc.lineSeparator&&t!==Rc.paragraphSeparator&&++Hc.pos<Kc.length;)t=Kc.charCodeAt(Hc.pos)}function qh(){for(;Hc.pos<Kc.length;){const e=Kc.charCodeAt(Hc.pos);switch(e){case Rc.carriageReturn:Kc.charCodeAt(Hc.pos+1)===Rc.lineFeed&&++Hc.pos;case Rc.lineFeed:case Rc.lineSeparator:case Rc.paragraphSeparator:++Hc.pos;break;case Rc.slash:switch(Kc.charCodeAt(Hc.pos+1)){case Rc.asterisk:Hc.pos+=2,jh();break;case Rc.slash:Uh(2);break;default:return}break;default:if(!lh[e])return;++Hc.pos}}}function $h(e,t=Oc.NONE){Hc.end=Hc.pos,Hc.type=e,Hc.contextualKeyword=t}function Vh(){if(Hc.isType)return void zh(Fc.greaterThan,1);const e=Kc.charCodeAt(Hc.pos+1);if(e===Rc.greaterThan){const e=Kc.charCodeAt(Hc.pos+2)===Rc.greaterThan?3:2;return Kc.charCodeAt(Hc.pos+e)===Rc.equalsTo?void zh(Fc.assign,e+1):void zh(Fc.bitShiftR,e)}e===Rc.equalsTo?zh(Fc.relationalOrEqual,2):zh(Fc.greaterThan,1)}function Hh(){Hc.type===Fc.greaterThan&&(Hc.pos-=1,Vh())}function Kh(e){switch(e){case Rc.numberSign:return++Hc.pos,void $h(Fc.hash);case Rc.dot:return void function(){const e=Kc.charCodeAt(Hc.pos+1);e>=Rc.digit0&&e<=Rc.digit9?Wh(!0):e===Rc.dot&&Kc.charCodeAt(Hc.pos+2)===Rc.dot?(Hc.pos+=3,$h(Fc.ellipsis)):(++Hc.pos,$h(Fc.dot))}();case Rc.leftParenthesis:return++Hc.pos,void $h(Fc.parenL);case Rc.rightParenthesis:return++Hc.pos,void $h(Fc.parenR);case Rc.semicolon:return++Hc.pos,void $h(Fc.semi);case Rc.comma:return++Hc.pos,void $h(Fc.comma);case Rc.leftSquareBracket:return++Hc.pos,void $h(Fc.bracketL);case Rc.rightSquareBracket:return++Hc.pos,void $h(Fc.bracketR);case Rc.leftCurlyBrace:return void(Vc&&Kc.charCodeAt(Hc.pos+1)===Rc.verticalBar?zh(Fc.braceBarL,2):(++Hc.pos,$h(Fc.braceL)));case Rc.rightCurlyBrace:return++Hc.pos,void $h(Fc.braceR);case Rc.colon:return void(Kc.charCodeAt(Hc.pos+1)===Rc.colon?zh(Fc.doubleColon,2):(++Hc.pos,$h(Fc.colon)));case Rc.questionMark:return void function(){const e=Kc.charCodeAt(Hc.pos+1),t=Kc.charCodeAt(Hc.pos+2);e!==Rc.questionMark||Vc&&Hc.isType?e!==Rc.dot||t>=Rc.digit0&&t<=Rc.digit9?(++Hc.pos,$h(Fc.question)):(Hc.pos+=2,$h(Fc.questionDot)):t===Rc.equalsTo?zh(Fc.assign,3):zh(Fc.nullishCoalescing,2)}();case Rc.atSign:return++Hc.pos,void $h(Fc.at);case Rc.graveAccent:return++Hc.pos,void $h(Fc.backQuote);case Rc.digit0:{const e=Kc.charCodeAt(Hc.pos+1);if(e===Rc.lowercaseX||e===Rc.uppercaseX||e===Rc.lowercaseO||e===Rc.uppercaseO||e===Rc.lowercaseB||e===Rc.uppercaseB)return void function(){Hc.pos+=2;for(;;){const e=Kc.charCodeAt(Hc.pos);if(!(e>=Rc.digit0&&e<=Rc.digit9||e>=Rc.lowercaseA&&e<=Rc.lowercaseF||e>=Rc.uppercaseA&&e<=Rc.uppercaseF||e===Rc.underscore))break;Hc.pos++}const e=Kc.charCodeAt(Hc.pos);e===Rc.lowercaseN?(++Hc.pos,$h(Fc.bigint)):$h(Fc.num)}()}case Rc.digit1:case Rc.digit2:case Rc.digit3:case Rc.digit4:case Rc.digit5:case Rc.digit6:case Rc.digit7:case Rc.digit8:case Rc.digit9:return void Wh(!1);case Rc.quotationMark:case Rc.apostrophe:return void function(e){for(Hc.pos++;;){if(Hc.pos>=Kc.length)return void oh("Unterminated string constant");const t=Kc.charCodeAt(Hc.pos);if(t===Rc.backslash)Hc.pos++;else if(t===e)break;Hc.pos++}Hc.pos++,$h(Fc.string)}(e);case Rc.slash:return void(Kc.charCodeAt(Hc.pos+1)===Rc.equalsTo?zh(Fc.assign,2):zh(Fc.slash,1));case Rc.percentSign:case Rc.asterisk:return void function(e){let t=e===Rc.asterisk?Fc.star:Fc.modulo,s=1,i=Kc.charCodeAt(Hc.pos+1);e===Rc.asterisk&&i===Rc.asterisk&&(s++,i=Kc.charCodeAt(Hc.pos+2),t=Fc.exponent),i===Rc.equalsTo&&Kc.charCodeAt(Hc.pos+2)!==Rc.greaterThan&&(s++,t=Fc.assign),zh(t,s)}(e);case Rc.verticalBar:case Rc.ampersand:return void function(e){const t=Kc.charCodeAt(Hc.pos+1);if(t!==e){if(e===Rc.verticalBar){if(t===Rc.greaterThan)return void zh(Fc.pipeline,2);if(t===Rc.rightCurlyBrace&&Vc)return void zh(Fc.braceBarR,2)}t!==Rc.equalsTo?zh(e===Rc.verticalBar?Fc.bitwiseOR:Fc.bitwiseAND,1):zh(Fc.assign,2)}else Kc.charCodeAt(Hc.pos+2)===Rc.equalsTo?zh(Fc.assign,3):zh(e===Rc.verticalBar?Fc.logicalOR:Fc.logicalAND,2)}(e);case Rc.caret:return void(Kc.charCodeAt(Hc.pos+1)===Rc.equalsTo?zh(Fc.assign,2):zh(Fc.bitwiseXOR,1));case Rc.plusSign:case Rc.dash:return void function(e){const t=Kc.charCodeAt(Hc.pos+1);t!==e?t===Rc.equalsTo?zh(Fc.assign,2):e===Rc.plusSign?zh(Fc.plus,1):zh(Fc.minus,1):zh(Fc.preIncDec,2)}(e);case Rc.lessThan:return void function(){const e=Kc.charCodeAt(Hc.pos+1);if(e===Rc.lessThan)return Kc.charCodeAt(Hc.pos+2)===Rc.equalsTo?void zh(Fc.assign,3):void(Hc.isType?zh(Fc.lessThan,1):zh(Fc.bitShiftL,2));e===Rc.equalsTo?zh(Fc.relationalOrEqual,2):zh(Fc.lessThan,1)}();case Rc.greaterThan:return void Vh();case Rc.equalsTo:case Rc.exclamationMark:return void function(e){const t=Kc.charCodeAt(Hc.pos+1);if(t!==Rc.equalsTo)return e===Rc.equalsTo&&t===Rc.greaterThan?(Hc.pos+=2,void $h(Fc.arrow)):void zh(e===Rc.equalsTo?Fc.eq:Fc.bang,1);zh(Fc.equality,Kc.charCodeAt(Hc.pos+2)===Rc.equalsTo?3:2)}(e);case Rc.tilde:return void zh(Fc.tilde,1)}oh(`Unexpected character '${String.fromCharCode(e)}'`,Hc.pos)}function zh(e,t){Hc.pos+=t,$h(e)}function Jh(){for(;;){const e=Kc.charCodeAt(Hc.pos);if(!(e>=Rc.digit0&&e<=Rc.digit9||e===Rc.underscore))break;Hc.pos++}}function Wh(e){let t=!1,s=!1;e||Jh();let i=Kc.charCodeAt(Hc.pos);i===Rc.dot&&(++Hc.pos,Jh(),i=Kc.charCodeAt(Hc.pos)),i!==Rc.uppercaseE&&i!==Rc.lowercaseE||(i=Kc.charCodeAt(++Hc.pos),i!==Rc.plusSign&&i!==Rc.dash||++Hc.pos,Jh(),i=Kc.charCodeAt(Hc.pos)),i===Rc.lowercaseN?(++Hc.pos,t=!0):i===Rc.lowercaseM&&(++Hc.pos,s=!0),$h(t?Fc.bigint:s?Fc.decimal:Fc.num)}function Xh(e,t=e.currentIndex()){let s=t+1;if(Gh(e,s)){const i=e.identifierNameAtIndex(t);return{isType:!1,leftName:i,rightName:i,endIndex:s}}if(s++,Gh(e,s))return{isType:!0,leftName:null,rightName:null,endIndex:s};if(s++,Gh(e,s))return{isType:!1,leftName:e.identifierNameAtIndex(t),rightName:e.identifierNameAtIndex(t+2),endIndex:s};if(s++,Gh(e,s))return{isType:!0,leftName:null,rightName:null,endIndex:s};throw new Error(`Unexpected import/export specifier at ${t}`)}function Gh(e,t){const s=e.tokens[t];return s.type===Fc.braceR||s.type===Fc.comma}var Yh=new Map([["quot",'"'],["amp","&"],["apos","'"],["lt","<"],["gt",">"],["nbsp"," "],["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","♦"]]);function Qh(e){const[t,s]=Zh(e.jsxPragma||"React.createElement"),[i,n]=Zh(e.jsxFragmentPragma||"React.Fragment");return{base:t,suffix:s,fragmentBase:i,fragmentSuffix:n}}function Zh(e){let t=e.indexOf(".");return-1===t&&(t=e.length),[e.slice(0,t),e.slice(t)]}class el{getPrefixCode(){return""}getHoistedCode(){return""}getSuffixCode(){return""}}class tl extends el{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(e,t,s,i,n){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=s,this.nameManager=i,this.options=n,tl.prototype.__init.call(this),tl.prototype.__init2.call(this),tl.prototype.__init3.call(this),tl.prototype.__init4.call(this),tl.prototype.__init5.call(this),this.jsxPragmaInfo=Qh(n),this.isAutomaticRuntime="automatic"===n.jsxRuntime,this.jsxImportSource=n.jsxImportSource||"react"}process(){return!!this.tokens.matches1(Fc.jsxTagStart)&&(this.processJSXTag(),!0)}getPrefixCode(){let e="";if(this.filenameVarName&&(e+=`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||"")};`),this.isAutomaticRuntime)if(this.importProcessor)for(const[t,s]of Object.entries(this.cjsAutomaticModuleNameResolutions))e+=`var ${s} = require("${t}");`;else{const{createElement:t,...s}=this.esmAutomaticImportNameResolutions;t&&(e+=`import {createElement as ${t}} from "${this.jsxImportSource}";`);const i=Object.entries(s).map(([e,t])=>`${e} as ${t}`).join(", ");if(i){e+=`import {${i}} from "${this.jsxImportSource+(this.options.production?"/jsx-runtime":"/jsx-dev-runtime")}";`}}return e}processJSXTag(){const{jsxRole:e,start:t}=this.tokens.currentToken(),s=this.options.production?null:this.getElementLocationCode(t);this.isAutomaticRuntime&&e!==yh.KeyAfterPropSpread?this.transformTagToJSXFunc(s,e):this.transformTagToCreateElement(s)}getElementLocationCode(e){return`lineNumber: ${this.getLineNumberForIndex(e)}`}getLineNumberForIndex(e){const t=this.tokens.code;for(;this.lastIndex<e&&this.lastIndex<t.length;)"\n"===t[this.lastIndex]&&this.lastLineNumber++,this.lastIndex++;return this.lastLineNumber}transformTagToJSXFunc(e,t){const s=t===yh.StaticChildren;this.tokens.replaceToken(this.getJSXFuncInvocationCode(s));let i=null;if(this.tokens.matches1(Fc.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, {`),this.processAutomaticChildrenAndEndProps(t);else{if(this.processTagIntro(),this.tokens.appendCode(", {"),i=this.processProps(!0),this.tokens.matches2(Fc.slash,Fc.jsxTagEnd))this.tokens.appendCode("}");else{if(!this.tokens.matches1(Fc.jsxTagEnd))throw new Error("Expected either /> or > at the end of the tag.");this.tokens.removeToken(),this.processAutomaticChildrenAndEndProps(t)}i&&this.tokens.appendCode(`, ${i}`)}for(this.options.production||(null===i&&this.tokens.appendCode(", void 0"),this.tokens.appendCode(`, ${s}, ${this.getDevSource(e)}, this`)),this.tokens.removeInitialToken();!this.tokens.matches1(Fc.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}transformTagToCreateElement(e){if(this.tokens.replaceToken(this.getCreateElementInvocationCode()),this.tokens.matches1(Fc.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, null`),this.processChildren(!0);else if(this.processTagIntro(),this.processPropsObjectWithDevInfo(e),this.tokens.matches2(Fc.slash,Fc.jsxTagEnd));else{if(!this.tokens.matches1(Fc.jsxTagEnd))throw new Error("Expected either /> or > at the end of the tag.");this.tokens.removeToken(),this.processChildren(!0)}for(this.tokens.removeInitialToken();!this.tokens.matches1(Fc.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}getJSXFuncInvocationCode(e){return this.options.production?e?this.claimAutoImportedFuncInvocation("jsxs","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsx","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsxDEV","/jsx-dev-runtime")}getCreateElementInvocationCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedFuncInvocation("createElement","");{const{jsxPragmaInfo:e}=this;return`${this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.base)||e.base}${e.suffix}(`}}getFragmentCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedName("Fragment",this.options.production?"/jsx-runtime":"/jsx-dev-runtime");{const{jsxPragmaInfo:e}=this;return(this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.fragmentBase)||e.fragmentBase)+e.fragmentSuffix}}claimAutoImportedFuncInvocation(e,t){const s=this.claimAutoImportedName(e,t);return this.importProcessor?`${s}.call(void 0, `:`${s}(`}claimAutoImportedName(e,t){if(this.importProcessor){const s=this.jsxImportSource+t;return this.cjsAutomaticModuleNameResolutions[s]||(this.cjsAutomaticModuleNameResolutions[s]=this.importProcessor.getFreeIdentifierForPath(s)),`${this.cjsAutomaticModuleNameResolutions[s]}.${e}`}return this.esmAutomaticImportNameResolutions[e]||(this.esmAutomaticImportNameResolutions[e]=this.nameManager.claimFreeName(`_${e}`)),this.esmAutomaticImportNameResolutions[e]}processTagIntro(){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType||!this.tokens.matches2AtIndex(e-1,Fc.jsxName,Fc.jsxName)&&!this.tokens.matches2AtIndex(e-1,Fc.greaterThan,Fc.jsxName)&&!this.tokens.matches1AtIndex(e,Fc.braceL)&&!this.tokens.matches1AtIndex(e,Fc.jsxTagEnd)&&!this.tokens.matches2AtIndex(e,Fc.slash,Fc.jsxTagEnd);)e++;if(e===this.tokens.currentIndex()+1){const e=this.tokens.identifierName();sl(e)&&this.tokens.replaceToken(`'${e}'`)}for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}processPropsObjectWithDevInfo(e){const t=this.options.production?"":`__self: this, __source: ${this.getDevSource(e)}`;this.tokens.matches1(Fc.jsxName)||this.tokens.matches1(Fc.braceL)?(this.tokens.appendCode(", {"),this.processProps(!1),t?this.tokens.appendCode(` ${t}}`):this.tokens.appendCode("}")):t?this.tokens.appendCode(`, {${t}}`):this.tokens.appendCode(", null")}processProps(e){let t=null;for(;;){if(this.tokens.matches2(Fc.jsxName,Fc.eq)){const s=this.tokens.identifierName();if(e&&"key"===s){null!==t&&this.tokens.appendCode(t.replace(/[^\n]/g,"")),this.tokens.removeToken(),this.tokens.removeToken();const e=this.tokens.snapshot();this.processPropValue(),t=this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(e);continue}this.processPropName(s),this.tokens.replaceToken(": "),this.processPropValue()}else if(this.tokens.matches1(Fc.jsxName)){const e=this.tokens.identifierName();this.processPropName(e),this.tokens.appendCode(": true")}else{if(!this.tokens.matches1(Fc.braceL))break;this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("")}this.tokens.appendCode(",")}return t}processPropName(e){e.includes("-")?this.tokens.replaceToken(`'${e}'`):this.tokens.copyToken()}processPropValue(){this.tokens.matches1(Fc.braceL)?(this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("")):this.tokens.matches1(Fc.jsxTagStart)?this.processJSXTag():this.processStringPropValue()}processStringPropValue(){const e=this.tokens.currentToken(),t=this.tokens.code.slice(e.start+1,e.end-1),s=il(t),i=function(e){let t="";for(let s=0;s<e.length;s++){const i=e[s];if("\n"===i)if(/\s/.test(e[s+1]))for(t+=" ";s<e.length&&/\s/.test(e[s+1]);)s++;else t+="\n";else if("&"===i){const{entity:i,newI:n}=nl(e,s+1);t+=i,s=n-1}else t+=i}return JSON.stringify(t)}(t);this.tokens.replaceToken(i+s)}processAutomaticChildrenAndEndProps(e){e===yh.StaticChildren?(this.tokens.appendCode(" children: ["),this.processChildren(!1),this.tokens.appendCode("]}")):(e===yh.OneChild&&this.tokens.appendCode(" children: "),this.processChildren(!1),this.tokens.appendCode("}"))}processChildren(e){let t=e;for(;;){if(this.tokens.matches2(Fc.jsxTagStart,Fc.slash))return;let e=!1;if(this.tokens.matches1(Fc.braceL))this.tokens.matches2(Fc.braceL,Fc.braceR)?(this.tokens.replaceToken(""),this.tokens.replaceToken("")):(this.tokens.replaceToken(t?", ":""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(""),e=!0);else if(this.tokens.matches1(Fc.jsxTagStart))this.tokens.appendCode(t?", ":""),this.processJSXTag(),e=!0;else{if(!this.tokens.matches1(Fc.jsxText)&&!this.tokens.matches1(Fc.jsxEmptyText))throw new Error("Unexpected token when processing JSX children.");e=this.processChildTextElement(t)}e&&(t=!0)}}processChildTextElement(e){const t=this.tokens.currentToken(),s=this.tokens.code.slice(t.start,t.end),i=il(s),n=function(e){let t="",s="",i=!1,n=!1;for(let r=0;r<e.length;r++){const a=e[r];if(" "===a||"\t"===a||"\r"===a)i||(s+=a);else if("\n"===a)s="",i=!0;else{if(n&&i&&(t+=" "),t+=s,s="","&"===a){const{entity:s,newI:i}=nl(e,r+1);r=i-1,t+=s}else t+=a;n=!0,i=!1}}i||(t+=s);return JSON.stringify(t)}(s);return'""'===n?(this.tokens.replaceToken(i),!1):(this.tokens.replaceToken(`${e?", ":""}${n}${i}`),!0)}getDevSource(e){return`{fileName: ${this.getFilenameVarName()}, ${e}}`}getFilenameVarName(){return this.filenameVarName||(this.filenameVarName=this.nameManager.claimFreeName("_jsxFileName")),this.filenameVarName}}function sl(e){const t=e.charCodeAt(0);return t>=Rc.lowercaseA&&t<=Rc.lowercaseZ}function il(e){let t=0,s=0;for(const i of e)"\n"===i?(t++,s=0):" "===i&&s++;return"\n".repeat(t)+" ".repeat(s)}function nl(e,t){let s,i="",n=0,r=t;if("#"===e[r]){let t,i=10;if(r++,"x"===e[r])for(i=16,r++,t=r;r<e.length&&al(e.charCodeAt(r));)r++;else for(t=r;r<e.length&&rl(e.charCodeAt(r));)r++;if(";"===e[r]){const n=e.slice(t,r);n&&(r++,s=String.fromCodePoint(parseInt(n,i)))}}else for(;r<e.length&&n++<10;){const t=e[r];if(r++,";"===t){s=Yh.get(i);break}i+=t}return s?{entity:s,newI:r}:{entity:"&",newI:t}}function rl(e){return e>=Rc.digit0&&e<=Rc.digit9}function al(e){return e>=Rc.digit0&&e<=Rc.digit9||e>=Rc.lowercaseA&&e<=Rc.lowercaseF||e>=Rc.uppercaseA&&e<=Rc.uppercaseF}function ol(e,t){const s=Qh(t),i=new Set;for(let t=0;t<e.tokens.length;t++){const n=e.tokens[t];if(n.type!==Fc.name||n.isType||n.identifierRole!==mh.Access&&n.identifierRole!==mh.ObjectShorthand&&n.identifierRole!==mh.ExportAccess||n.shadowsGlobal||i.add(e.identifierNameForToken(n)),n.type===Fc.jsxTagStart&&i.add(s.base),n.type===Fc.jsxTagStart&&t+1<e.tokens.length&&e.tokens[t+1].type===Fc.jsxTagEnd&&(i.add(s.base),i.add(s.fragmentBase)),n.type===Fc.jsxName&&n.identifierRole===mh.Access){sl(e.identifierNameForToken(n))&&e.tokens[t+1].type!==Fc.dot||i.add(e.identifierNameForToken(n))}}return i}class cl{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(e,t,s,i,n,r,a){this.nameManager=e,this.tokens=t,this.enableLegacyTypeScriptModuleInterop=s,this.options=i,this.isTypeScriptTransformEnabled=n,this.keepUnusedImports=r,this.helperManager=a,cl.prototype.__init.call(this),cl.prototype.__init2.call(this),cl.prototype.__init3.call(this),cl.prototype.__init4.call(this),cl.prototype.__init5.call(this)}preprocessTokens(){for(let e=0;e<this.tokens.tokens.length;e++)this.tokens.matches1AtIndex(e,Fc._import)&&!this.tokens.matches3AtIndex(e,Fc._import,Fc.name,Fc.eq)&&this.preprocessImportAtIndex(e),this.tokens.matches1AtIndex(e,Fc._export)&&!this.tokens.matches2AtIndex(e,Fc._export,Fc.eq)&&this.preprocessExportAtIndex(e);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=ol(this.tokens,this.options);for(const[e,t]of this.importInfoByPath.entries()){if(t.hasBareImport||t.hasStarExport||t.exportStarNames.length>0||t.namedExports.length>0)continue;[...t.defaultNames,...t.wildcardNames,...t.namedImports.map(({localName:e})=>e)].every(e=>this.shouldAutomaticallyElideImportedName(e))&&this.importsToReplace.set(e,"")}}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}generateImportReplacements(){for(const[e,t]of this.importInfoByPath.entries()){const{defaultNames:s,wildcardNames:i,namedImports:n,namedExports:r,exportStarNames:a,hasStarExport:o}=t;if(0===s.length&&0===i.length&&0===n.length&&0===r.length&&0===a.length&&!o){this.importsToReplace.set(e,`require('${e}');`);continue}const c=this.getFreeIdentifierForPath(e);let h;h=this.enableLegacyTypeScriptModuleInterop?c:i.length>0?i[0]:this.getFreeIdentifierForPath(e);let l=`var ${c} = require('${e}');`;if(i.length>0)for(const e of i){l+=` var ${e} = ${this.enableLegacyTypeScriptModuleInterop?c:`${this.helperManager.getHelperName("interopRequireWildcard")}(${c})`};`}else a.length>0&&h!==c?l+=` var ${h} = ${this.helperManager.getHelperName("interopRequireWildcard")}(${c});`:s.length>0&&h!==c&&(l+=` var ${h} = ${this.helperManager.getHelperName("interopRequireDefault")}(${c});`);for(const{importedName:e,localName:t}of r)l+=` ${this.helperManager.getHelperName("createNamedExportFrom")}(${c}, '${t}', '${e}');`;for(const e of a)l+=` exports.${e} = ${h};`;o&&(l+=` ${this.helperManager.getHelperName("createStarExport")}(${c});`),this.importsToReplace.set(e,l);for(const e of s)this.identifierReplacements.set(e,`${h}.default`);for(const{importedName:e,localName:t}of n)this.identifierReplacements.set(t,`${c}.${e}`)}}getFreeIdentifierForPath(e){const t=e.split("/"),s=t[t.length-1].replace(/\W/g,"");return this.nameManager.claimFreeName(`_${s}`)}preprocessImportAtIndex(e){const t=[],s=[],i=[];if(e++,(this.tokens.matchesContextualAtIndex(e,Oc._type)||this.tokens.matches1AtIndex(e,Fc._typeof))&&!this.tokens.matches1AtIndex(e+1,Fc.comma)&&!this.tokens.matchesContextualAtIndex(e+1,Oc._from))return;if(this.tokens.matches1AtIndex(e,Fc.parenL))return;if(this.tokens.matches1AtIndex(e,Fc.name)&&(t.push(this.tokens.identifierNameAtIndex(e)),e++,this.tokens.matches1AtIndex(e,Fc.comma)&&e++),this.tokens.matches1AtIndex(e,Fc.star)&&(e+=2,s.push(this.tokens.identifierNameAtIndex(e)),e++),this.tokens.matches1AtIndex(e,Fc.braceL)){const s=this.getNamedImports(e+1);e=s.newIndex;for(const e of s.namedImports)"default"===e.importedName?t.push(e.localName):i.push(e)}if(this.tokens.matchesContextualAtIndex(e,Oc._from)&&e++,!this.tokens.matches1AtIndex(e,Fc.string))throw new Error("Expected string token at the end of import statement.");const n=this.tokens.stringValueAtIndex(e),r=this.getImportInfo(n);r.defaultNames.push(...t),r.wildcardNames.push(...s),r.namedImports.push(...i),0===t.length&&0===s.length&&0===i.length&&(r.hasBareImport=!0)}preprocessExportAtIndex(e){if(this.tokens.matches2AtIndex(e,Fc._export,Fc._var)||this.tokens.matches2AtIndex(e,Fc._export,Fc._let)||this.tokens.matches2AtIndex(e,Fc._export,Fc._const))this.preprocessVarExportAtIndex(e);else if(this.tokens.matches2AtIndex(e,Fc._export,Fc._function)||this.tokens.matches2AtIndex(e,Fc._export,Fc._class)){const t=this.tokens.identifierNameAtIndex(e+2);this.addExportBinding(t,t)}else if(this.tokens.matches3AtIndex(e,Fc._export,Fc.name,Fc._function)){const t=this.tokens.identifierNameAtIndex(e+3);this.addExportBinding(t,t)}else this.tokens.matches2AtIndex(e,Fc._export,Fc.braceL)?this.preprocessNamedExportAtIndex(e):this.tokens.matches2AtIndex(e,Fc._export,Fc.star)&&this.preprocessExportStarAtIndex(e)}preprocessVarExportAtIndex(e){let t=0;for(let s=e+2;;s++)if(this.tokens.matches1AtIndex(s,Fc.braceL)||this.tokens.matches1AtIndex(s,Fc.dollarBraceL)||this.tokens.matches1AtIndex(s,Fc.bracketL))t++;else if(this.tokens.matches1AtIndex(s,Fc.braceR)||this.tokens.matches1AtIndex(s,Fc.bracketR))t--;else{if(0===t&&!this.tokens.matches1AtIndex(s,Fc.name))break;if(this.tokens.matches1AtIndex(1,Fc.eq)){const e=this.tokens.currentToken().rhsEndIndex;if(null==e)throw new Error("Expected = token with an end index.");s=e-1}else{if(xh(this.tokens.tokens[s])){const e=this.tokens.identifierNameAtIndex(s);this.identifierReplacements.set(e,`exports.${e}`)}}}}preprocessNamedExportAtIndex(e){e+=2;const{newIndex:t,namedImports:s}=this.getNamedImports(e);if(e=t,!this.tokens.matchesContextualAtIndex(e,Oc._from)){for(const{importedName:e,localName:t}of s)this.addExportBinding(e,t);return}if(e++,!this.tokens.matches1AtIndex(e,Fc.string))throw new Error("Expected string token at the end of import statement.");const i=this.tokens.stringValueAtIndex(e);this.getImportInfo(i).namedExports.push(...s)}preprocessExportStarAtIndex(e){let t=null;if(this.tokens.matches3AtIndex(e,Fc._export,Fc.star,Fc._as)?(e+=3,t=this.tokens.identifierNameAtIndex(e),e+=2):e+=3,!this.tokens.matches1AtIndex(e,Fc.string))throw new Error("Expected string token at the end of star export statement.");const s=this.tokens.stringValueAtIndex(e),i=this.getImportInfo(s);null!==t?i.exportStarNames.push(t):i.hasStarExport=!0}getNamedImports(e){const t=[];for(;;){if(this.tokens.matches1AtIndex(e,Fc.braceR)){e++;break}const s=Xh(this.tokens,e);if(e=s.endIndex,s.isType||t.push({importedName:s.leftName,localName:s.rightName}),this.tokens.matches2AtIndex(e,Fc.comma,Fc.braceR)){e+=2;break}if(this.tokens.matches1AtIndex(e,Fc.braceR)){e++;break}if(!this.tokens.matches1AtIndex(e,Fc.comma))throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[e])}`);e++}return{newIndex:e,namedImports:t}}getImportInfo(e){const t=this.importInfoByPath.get(e);if(t)return t;const s={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(e,s),s}addExportBinding(e,t){this.exportBindingsByLocalName.has(e)||this.exportBindingsByLocalName.set(e,[]),this.exportBindingsByLocalName.get(e).push(t)}claimImportCode(e){const t=this.importsToReplace.get(e);return this.importsToReplace.set(e,""),t||""}getIdentifierReplacement(e){return this.identifierReplacements.get(e)||null}resolveExportBinding(e){const t=this.exportBindingsByLocalName.get(e);return t&&0!==t.length?t.map(e=>`exports.${e}`).join(" = "):null}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}}var hl=class{constructor(){this._indexes={__proto__:null},this.array=[]}};var ll=class{constructor({file:e,sourceRoot:t}={}){this._names=new hl,this._sources=new hl,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new hl}};var pl=(e,t,s,i,n,r,a,o)=>function(e,t,s,i,n,r,a){const{_mappings:o,_sources:c,_sourcesContent:h,_names:l}=t,p=function(e,t){for(let s=e.length;s<=t;s++)e[s]=[];return e[t]}(o,s),u=function(e,t){let s=e.length;for(let i=s-1;i>=0;s=i--){if(t>=e[i][0])break}return s}(p,i);if(!n){if(function(e,t){if(0===t)return!0;const s=e[t-1];return 1===s.length}(p,u))return;return ul(p,u,[i])}const d=function(e,t){const s=function(e,t){return e._indexes[t]}(e,t);if(void 0!==s)return s;const{array:i,_indexes:n}=e,r=i.push(t);return n[t]=r-1}(c,n),f=-1;d===h.length&&(h[d]=null);if(function(e,t,s,i,n,r){if(0===t)return!1;const a=e[t-1];return 1!==a.length&&(s===a[1]&&i===a[2]&&n===a[3]&&r===(5===a.length?a[4]:-1))}(p,u,d,r,a,f))return;return ul(p,u,[i,d,r,a])}(0,e,t,s,i,n,r);function ul(e,t,s){for(let s=e.length;s>t;s--)e[s]=e[s-1];e[t]=s}function dl({code:e,mappings:t},s,i,n,r){const a=function(e,t){const s=new Array(t.length);let i=0,n=t[i].start,r=0;for(let a=0;a<e.length;a++)a===n&&(s[i]=n-r,i++,n=t[i].start),e.charCodeAt(a)===Rc.lineFeed&&(r=a+1);return s}(n,r),o=new ll({file:i.compiledFilename});let c=0,h=t[0];for(;void 0===h&&c<t.length-1;)c++,h=t[c];let l=0,p=0;h!==p&&pl(o,l,0,s,l,0);for(let i=0;i<e.length;i++){if(i===h){const e=h-p,n=a[c];for(pl(o,l,e,s,l,n);(h===i||void 0===h)&&c<t.length-1;)c++,h=t[c]}e.charCodeAt(i)===Rc.lineFeed&&(l++,p=i+1,h!==p&&pl(o,l,0,s,l,0))}const{sourceRoot:u,sourcesContent:d,...f}=function(e){const t=function(e){const{_mappings:t,_sources:s,_sourcesContent:i,_names:n,_ignoreList:r}=e;return function(e){const{length:t}=e;let s=t;for(let t=s-1;t>=0&&!(e[t].length>0);s=t,t--);s<t&&(e.length=s)}(t),{version:3,file:e.file||void 0,names:n.array,sourceRoot:e.sourceRoot||void 0,sources:s.array,sourcesContent:i,mappings:t,ignoreList:r.array}}(e);return Object.assign({},t,{mappings:Q(t.mappings)})}(o);return f}const fl={require:'\n import {createRequire as CREATE_REQUIRE_NAME} from "module";\n const require = CREATE_REQUIRE_NAME(import.meta.url);\n ',interopRequireWildcard:"\n function interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n return newObj;\n }\n }\n ",interopRequireDefault:"\n function interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n }\n ",createNamedExportFrom:"\n function createNamedExportFrom(obj, localName, importedName) {\n Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]});\n }\n ",createStarExport:'\n function createStarExport(obj) {\n Object.keys(obj)\n .filter((key) => key !== "default" && key !== "__esModule")\n .forEach((key) => {\n if (exports.hasOwnProperty(key)) {\n return;\n }\n Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});\n });\n }\n ',nullishCoalesce:"\n function nullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return rhsFn();\n }\n }\n ",asyncNullishCoalesce:"\n async function asyncNullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return await rhsFn();\n }\n }\n ",optionalChain:"\n function optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n return undefined;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n ",asyncOptionalChain:"\n async function asyncOptionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n return undefined;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = await fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = await fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n ",optionalChainDelete:"\n function optionalChainDelete(ops) {\n const result = OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n ",asyncOptionalChainDelete:"\n async function asyncOptionalChainDelete(ops) {\n const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n "};class ml{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(e){this.nameManager=e,ml.prototype.__init.call(this),ml.prototype.__init2.call(this)}getHelperName(e){let t=this.helperNames[e];return t||(t=this.nameManager.claimFreeName(`_${e}`),this.helperNames[e]=t,t)}emitHelpers(){let e="";this.helperNames.optionalChainDelete&&this.getHelperName("optionalChain"),this.helperNames.asyncOptionalChainDelete&&this.getHelperName("asyncOptionalChain");for(const[t,s]of Object.entries(fl)){const i=this.helperNames[t];let n=s;"optionalChainDelete"===t?n=n.replace("OPTIONAL_CHAIN_NAME",this.helperNames.optionalChain):"asyncOptionalChainDelete"===t?n=n.replace("ASYNC_OPTIONAL_CHAIN_NAME",this.helperNames.asyncOptionalChain):"require"===t&&(null===this.createRequireName&&(this.createRequireName=this.nameManager.claimFreeName("_createRequire")),n=n.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),i&&(e+=" ",e+=n.replace(t,i).replace(/\s+/g," ").trim())}return e}}function yl(e,t,s){(function(e,t){for(const s of e.tokens)if(s.type===Fc.name&&!s.isType&&gh(s)&&t.has(e.identifierNameForToken(s)))return!0;return!1})(e,s)&&function(e,t,s){const i=[];let n=t.length-1;for(let r=e.tokens.length-1;;r--){for(;i.length>0&&i[i.length-1].startTokenIndex===r+1;)i.pop();for(;n>=0&&t[n].endTokenIndex===r+1;)i.push(t[n]),n--;if(r<0)break;const a=e.tokens[r],o=e.identifierNameForToken(a);if(i.length>1&&!a.isType&&a.type===Fc.name&&s.has(o))if(Th(a))xl(i[i.length-1],e,o);else if(bh(a)){let t=i.length-1;for(;t>0&&!i[t].isFunctionScope;)t--;if(t<0)throw new Error("Did not find parent function scope.");xl(i[t],e,o)}}if(i.length>0)throw new Error("Expected empty scope stack after processing file.")}(e,t,s)}function xl(e,t,s){for(let i=e.startTokenIndex;i<e.endTokenIndex;i++){const e=t.tokens[i];e.type!==Fc.name&&e.type!==Fc.jsxName||t.identifierNameForToken(e)!==s||(e.shadowsGlobal=!0)}}class gl{__init(){this.usedNames=new Set}constructor(e,t){gl.prototype.__init.call(this),this.usedNames=new Set(function(e,t){const s=[];for(const i of t)i.type===Fc.name&&s.push(e.slice(i.start,i.end));return s}(e,t))}claimFreeName(e){const t=this.findFreeName(e);return this.usedNames.add(t),t}findFreeName(e){if(!this.usedNames.has(e))return e;let t=2;for(;this.usedNames.has(e+String(t));)t++;return e+String(t)}}var kl,Tl={},bl={},Sl={},wl=r&&r.__extends||(kl=function(e,t){return kl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},kl(e,t)},function(e,t){function s(){this.constructor=e}kl(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)});Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.DetailContext=Sl.NoopContext=Sl.VError=void 0;var vl=function(e){function t(s,i){var n=e.call(this,i)||this;return n.path=s,Object.setPrototypeOf(n,t.prototype),n}return wl(t,e),t}(Error);Sl.VError=vl;var Cl=function(){function e(){}return e.prototype.fail=function(e,t,s){return!1},e.prototype.unionResolver=function(){return this},e.prototype.createContext=function(){return this},e.prototype.resolveUnion=function(e){},e}();Sl.NoopContext=Cl;var Pl=function(){function e(){this._propNames=[""],this._messages=[null],this._score=0}return e.prototype.fail=function(e,t,s){return this._propNames.push(e),this._messages.push(t),this._score+=s,!1},e.prototype.unionResolver=function(){return new El},e.prototype.resolveUnion=function(e){for(var t,s,i=null,n=0,r=e.contexts;n<r.length;n++){var a=r[n];(!i||a._score>=i._score)&&(i=a)}i&&i._score>0&&((t=this._propNames).push.apply(t,i._propNames),(s=this._messages).push.apply(s,i._messages))},e.prototype.getError=function(e){for(var t=[],s=this._propNames.length-1;s>=0;s--){var i=this._propNames[s];e+="number"==typeof i?"["+i+"]":i?"."+i:"";var n=this._messages[s];n&&t.push(e+" "+n)}return new vl(e,t.join("; "))},e.prototype.getErrorDetail=function(e){for(var t=[],s=this._propNames.length-1;s>=0;s--){var i=this._propNames[s];e+="number"==typeof i?"["+i+"]":i?"."+i:"";var n=this._messages[s];n&&t.push({path:e,message:n})}var r=null;for(s=t.length-1;s>=0;s--)r&&(t[s].nested=[r]),r=t[s];return r},e}();Sl.DetailContext=Pl;var El=function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var e=new Pl;return this.contexts.push(e),e},e}();!function(e){var t=r&&r.__extends||function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.basicTypes=e.BasicType=e.TParamList=e.TParam=e.param=e.TFunc=e.func=e.TProp=e.TOptional=e.opt=e.TIface=e.iface=e.TEnumLiteral=e.enumlit=e.TEnumType=e.enumtype=e.TIntersection=e.intersection=e.TUnion=e.union=e.TTuple=e.tuple=e.TArray=e.array=e.TLiteral=e.lit=e.TName=e.name=e.TType=void 0;var s=Sl,i=function(){};function n(e){return"string"==typeof e?o(e):e}function a(e,t){var s=e[t];if(!s)throw new Error("Unknown type "+t);return s}function o(e){return new c(e)}e.TType=i,e.name=o;var c=function(e){function s(t){var s=e.call(this)||this;return s.name=t,s._failMsg="is not a "+t,s}return t(s,e),s.prototype.getChecker=function(e,t,i){var n=this,r=a(e,this.name),o=r.getChecker(e,t,i);return r instanceof w||r instanceof s?o:function(e,t){return!!o(e,t)||t.fail(null,n._failMsg,0)}},s}(i);e.TName=c,e.lit=function(e){return new h(e)};var h=function(e){function s(t){var s=e.call(this)||this;return s.value=t,s.name=JSON.stringify(t),s._failMsg="is not "+s.name,s}return t(s,e),s.prototype.getChecker=function(e,t){var s=this;return function(e,t){return e===s.value||t.fail(null,s._failMsg,-1)}},s}(i);e.TLiteral=h,e.array=function(e){return new l(n(e))};var l=function(e){function s(t){var s=e.call(this)||this;return s.ttype=t,s}return t(s,e),s.prototype.getChecker=function(e,t){var s=this.ttype.getChecker(e,t);return function(e,t){if(!Array.isArray(e))return t.fail(null,"is not an array",0);for(var i=0;i<e.length;i++){if(!s(e[i],t))return t.fail(i,null,1)}return!0}},s}(i);e.TArray=l,e.tuple=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new p(e.map(function(e){return n(e)}))};var p=function(e){function s(t){var s=e.call(this)||this;return s.ttypes=t,s}return t(s,e),s.prototype.getChecker=function(e,t){var s=this.ttypes.map(function(s){return s.getChecker(e,t)}),i=function(e,t){if(!Array.isArray(e))return t.fail(null,"is not an array",0);for(var i=0;i<s.length;i++){if(!s[i](e[i],t))return t.fail(i,null,1)}return!0};return t?function(e,t){return!!i(e,t)&&(e.length<=s.length||t.fail(s.length,"is extraneous",2))}:i},s}(i);e.TTuple=p,e.union=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new u(e.map(function(e){return n(e)}))};var u=function(e){function s(t){var s=e.call(this)||this;s.ttypes=t;var i=t.map(function(e){return e instanceof c||e instanceof h?e.name:null}).filter(function(e){return e}),n=t.length-i.length;return i.length?(n>0&&i.push(n+" more"),s._failMsg="is none of "+i.join(", ")):s._failMsg="is none of "+n+" types",s}return t(s,e),s.prototype.getChecker=function(e,t){var s=this,i=this.ttypes.map(function(s){return s.getChecker(e,t)});return function(e,t){for(var n=t.unionResolver(),r=0;r<i.length;r++){if(i[r](e,n.createContext()))return!0}return t.resolveUnion(n),t.fail(null,s._failMsg,0)}},s}(i);e.TUnion=u,e.intersection=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new d(e.map(function(e){return n(e)}))};var d=function(e){function s(t){var s=e.call(this)||this;return s.ttypes=t,s}return t(s,e),s.prototype.getChecker=function(e,t){var s=new Set,i=this.ttypes.map(function(i){return i.getChecker(e,t,s)});return function(e,t){return!!i.every(function(s){return s(e,t)})||t.fail(null,null,0)}},s}(i);e.TIntersection=d,e.enumtype=function(e){return new f(e)};var f=function(e){function s(t){var s=e.call(this)||this;return s.members=t,s.validValues=new Set,s._failMsg="is not a valid enum value",s.validValues=new Set(Object.keys(t).map(function(e){return t[e]})),s}return t(s,e),s.prototype.getChecker=function(e,t){var s=this;return function(e,t){return!!s.validValues.has(e)||t.fail(null,s._failMsg,0)}},s}(i);e.TEnumType=f,e.enumlit=function(e,t){return new m(e,t)};var m=function(e){function s(t,s){var i=e.call(this)||this;return i.enumName=t,i.prop=s,i._failMsg="is not "+t+"."+s,i}return t(s,e),s.prototype.getChecker=function(e,t){var s=this,i=a(e,this.enumName);if(!(i instanceof f))throw new Error("Type "+this.enumName+" used in enumlit is not an enum type");var n=i.members[this.prop];if(!i.members.hasOwnProperty(this.prop))throw new Error("Unknown value "+this.enumName+"."+this.prop+" used in enumlit");return function(e,t){return e===n||t.fail(null,s._failMsg,-1)}},s}(i);function y(e){return Object.keys(e).map(function(t){return function(e,t){return t instanceof g?new k(e,t.ttype,!0):new k(e,n(t),!1)}(t,e[t])})}e.TEnumLiteral=m,e.iface=function(e,t){return new x(e,y(t))};var x=function(e){function i(t,s){var i=e.call(this)||this;return i.bases=t,i.props=s,i.propSet=new Set(s.map(function(e){return e.name})),i}return t(i,e),i.prototype.getChecker=function(e,t,i){var n=this,r=this.bases.map(function(s){return a(e,s).getChecker(e,t)}),o=this.props.map(function(s){return s.ttype.getChecker(e,t)}),c=new s.NoopContext,h=this.props.map(function(e,t){return!e.isOpt&&!o[t](void 0,c)}),l=function(e,t){if("object"!=typeof e||null===e)return t.fail(null,"is not an object",0);for(var s=0;s<r.length;s++)if(!r[s](e,t))return!1;for(s=0;s<o.length;s++){var i=n.props[s].name,a=e[i];if(void 0===a){if(h[s])return t.fail(i,"is missing",1)}else if(!o[s](a,t))return t.fail(i,null,1)}return!0};if(!t)return l;var p=this.propSet;return i&&(this.propSet.forEach(function(e){return i.add(e)}),p=i),function(e,t){if(!l(e,t))return!1;for(var s in e)if(!p.has(s))return t.fail(s,"is extraneous",2);return!0}},i}(i);e.TIface=x,e.opt=function(e){return new g(n(e))};var g=function(e){function s(t){var s=e.call(this)||this;return s.ttype=t,s}return t(s,e),s.prototype.getChecker=function(e,t){var s=this.ttype.getChecker(e,t);return function(e,t){return void 0===e||s(e,t)}},s}(i);e.TOptional=g;var k=function(e,t,s){this.name=e,this.ttype=t,this.isOpt=s};e.TProp=k,e.func=function(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];return new T(new S(t),n(e))};var T=function(e){function s(t,s){var i=e.call(this)||this;return i.paramList=t,i.result=s,i}return t(s,e),s.prototype.getChecker=function(e,t){return function(e,t){return"function"==typeof e||t.fail(null,"is not a function",0)}},s}(i);e.TFunc=T,e.param=function(e,t,s){return new b(e,n(t),Boolean(s))};var b=function(e,t,s){this.name=e,this.ttype=t,this.isOpt=s};e.TParam=b;var S=function(e){function i(t){var s=e.call(this)||this;return s.params=t,s}return t(i,e),i.prototype.getChecker=function(e,t){var i=this,n=this.params.map(function(s){return s.ttype.getChecker(e,t)}),r=new s.NoopContext,a=this.params.map(function(e,t){return!e.isOpt&&!n[t](void 0,r)}),o=function(e,t){if(!Array.isArray(e))return t.fail(null,"is not an array",0);for(var s=0;s<n.length;s++){var r=i.params[s];if(void 0===e[s]){if(a[s])return t.fail(r.name,"is missing",1)}else if(!n[s](e[s],t))return t.fail(r.name,null,1)}return!0};return t?function(e,t){return!!o(e,t)&&(e.length<=n.length||t.fail(n.length,"is extraneous",2))}:o},i}(i);e.TParamList=S;var w=function(e){function s(t,s){var i=e.call(this)||this;return i.validator=t,i.message=s,i}return t(s,e),s.prototype.getChecker=function(e,t){var s=this;return function(e,t){return!!s.validator(e)||t.fail(null,s.message,0)}},s}(i);e.BasicType=w,e.basicTypes={any:new w(function(e){return!0},"is invalid"),number:new w(function(e){return"number"==typeof e},"is not a number"),object:new w(function(e){return"object"==typeof e&&e},"is not an object"),boolean:new w(function(e){return"boolean"==typeof e},"is not a boolean"),string:new w(function(e){return"string"==typeof e},"is not a string"),symbol:new w(function(e){return"symbol"==typeof e},"is not a symbol"),void:new w(function(e){return null==e},"is not void"),undefined:new w(function(e){return void 0===e},"is not undefined"),null:new w(function(e){return null===e},"is not null"),never:new w(function(e){return!1},"is unexpected"),Date:new w(C("[object Date]"),"is not a Date"),RegExp:new w(C("[object RegExp]"),"is not a RegExp")};var v=Object.prototype.toString;function C(e){return function(t){return"object"==typeof t&&t&&v.call(t)===e}}"undefined"!=typeof Buffer&&(e.basicTypes.Buffer=new w(function(e){return Buffer.isBuffer(e)},"is not a Buffer"));for(var P=function(t){e.basicTypes[t.name]=new w(function(e){return e instanceof t},"is not a "+t.name)},E=0,A=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];E<A.length;E++){P(A[E])}}(bl),function(e){var t=r&&r.__spreadArrays||function(){for(var e=0,t=0,s=arguments.length;t<s;t++)e+=arguments[t].length;var i=Array(e),n=0;for(t=0;t<s;t++)for(var r=arguments[t],a=0,o=r.length;a<o;a++,n++)i[n]=r[a];return i};Object.defineProperty(e,"__esModule",{value:!0}),e.Checker=e.createCheckers=void 0;var s=bl,i=Sl,n=bl;Object.defineProperty(e,"TArray",{enumerable:!0,get:function(){return n.TArray}}),Object.defineProperty(e,"TEnumType",{enumerable:!0,get:function(){return n.TEnumType}}),Object.defineProperty(e,"TEnumLiteral",{enumerable:!0,get:function(){return n.TEnumLiteral}}),Object.defineProperty(e,"TFunc",{enumerable:!0,get:function(){return n.TFunc}}),Object.defineProperty(e,"TIface",{enumerable:!0,get:function(){return n.TIface}}),Object.defineProperty(e,"TLiteral",{enumerable:!0,get:function(){return n.TLiteral}}),Object.defineProperty(e,"TName",{enumerable:!0,get:function(){return n.TName}}),Object.defineProperty(e,"TOptional",{enumerable:!0,get:function(){return n.TOptional}}),Object.defineProperty(e,"TParam",{enumerable:!0,get:function(){return n.TParam}}),Object.defineProperty(e,"TParamList",{enumerable:!0,get:function(){return n.TParamList}}),Object.defineProperty(e,"TProp",{enumerable:!0,get:function(){return n.TProp}}),Object.defineProperty(e,"TTuple",{enumerable:!0,get:function(){return n.TTuple}}),Object.defineProperty(e,"TType",{enumerable:!0,get:function(){return n.TType}}),Object.defineProperty(e,"TUnion",{enumerable:!0,get:function(){return n.TUnion}}),Object.defineProperty(e,"TIntersection",{enumerable:!0,get:function(){return n.TIntersection}}),Object.defineProperty(e,"array",{enumerable:!0,get:function(){return n.array}}),Object.defineProperty(e,"enumlit",{enumerable:!0,get:function(){return n.enumlit}}),Object.defineProperty(e,"enumtype",{enumerable:!0,get:function(){return n.enumtype}}),Object.defineProperty(e,"func",{enumerable:!0,get:function(){return n.func}}),Object.defineProperty(e,"iface",{enumerable:!0,get:function(){return n.iface}}),Object.defineProperty(e,"lit",{enumerable:!0,get:function(){return n.lit}}),Object.defineProperty(e,"name",{enumerable:!0,get:function(){return n.name}}),Object.defineProperty(e,"opt",{enumerable:!0,get:function(){return n.opt}}),Object.defineProperty(e,"param",{enumerable:!0,get:function(){return n.param}}),Object.defineProperty(e,"tuple",{enumerable:!0,get:function(){return n.tuple}}),Object.defineProperty(e,"union",{enumerable:!0,get:function(){return n.union}}),Object.defineProperty(e,"intersection",{enumerable:!0,get:function(){return n.intersection}}),Object.defineProperty(e,"BasicType",{enumerable:!0,get:function(){return n.BasicType}});var a=Sl;Object.defineProperty(e,"VError",{enumerable:!0,get:function(){return a.VError}}),e.createCheckers=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];for(var n=Object.assign.apply(Object,t([{},s.basicTypes],e)),r={},a=0,c=e;a<c.length;a++)for(var h=c[a],l=0,p=Object.keys(h);l<p.length;l++){var u=p[l];r[u]=new o(n,h[u])}return r};var o=function(){function e(e,t,i){if(void 0===i&&(i="value"),this.suite=e,this.ttype=t,this._path=i,this.props=new Map,t instanceof s.TIface)for(var n=0,r=t.props;n<r.length;n++){var a=r[n];this.props.set(a.name,a.ttype)}this.checkerPlain=this.ttype.getChecker(e,!1),this.checkerStrict=this.ttype.getChecker(e,!0)}return e.prototype.setReportedPath=function(e){this._path=e},e.prototype.check=function(e){return this._doCheck(this.checkerPlain,e)},e.prototype.test=function(e){return this.checkerPlain(e,new i.NoopContext)},e.prototype.validate=function(e){return this._doValidate(this.checkerPlain,e)},e.prototype.strictCheck=function(e){return this._doCheck(this.checkerStrict,e)},e.prototype.strictTest=function(e){return this.checkerStrict(e,new i.NoopContext)},e.prototype.strictValidate=function(e){return this._doValidate(this.checkerStrict,e)},e.prototype.getProp=function(t){var s=this.props.get(t);if(!s)throw new Error("Type has no property "+t);return new e(this.suite,s,this._path+"."+t)},e.prototype.methodArgs=function(t){var s=this._getMethod(t);return new e(this.suite,s.paramList)},e.prototype.methodResult=function(t){var s=this._getMethod(t);return new e(this.suite,s.result)},e.prototype.getArgs=function(){if(!(this.ttype instanceof s.TFunc))throw new Error("getArgs() applied to non-function");return new e(this.suite,this.ttype.paramList)},e.prototype.getResult=function(){if(!(this.ttype instanceof s.TFunc))throw new Error("getResult() applied to non-function");return new e(this.suite,this.ttype.result)},e.prototype.getType=function(){return this.ttype},e.prototype._doCheck=function(e,t){if(!e(t,new i.NoopContext)){var s=new i.DetailContext;throw e(t,s),s.getError(this._path)}},e.prototype._doValidate=function(e,t){if(e(t,new i.NoopContext))return null;var s=new i.DetailContext;return e(t,s),s.getErrorDetail(this._path)},e.prototype._getMethod=function(e){var t=this.props.get(e);if(!t)throw new Error("Type has no property "+e);if(!(t instanceof s.TFunc))throw new Error("Property "+e+" is not a method");return t},e}();e.Checker=o}(Tl);const Al={Transform:Tl.union(Tl.lit("jsx"),Tl.lit("typescript"),Tl.lit("flow"),Tl.lit("imports"),Tl.lit("react-hot-loader"),Tl.lit("jest")),SourceMapOptions:Tl.iface([],{compiledFilename:"string"}),Options:Tl.iface([],{transforms:Tl.array("Transform"),disableESTransforms:Tl.opt("boolean"),jsxRuntime:Tl.opt(Tl.union(Tl.lit("classic"),Tl.lit("automatic"),Tl.lit("preserve"))),production:Tl.opt("boolean"),jsxImportSource:Tl.opt("string"),jsxPragma:Tl.opt("string"),jsxFragmentPragma:Tl.opt("string"),keepUnusedImports:Tl.opt("boolean"),preserveDynamicImport:Tl.opt("boolean"),injectCreateRequireForImportRequire:Tl.opt("boolean"),enableLegacyTypeScriptModuleInterop:Tl.opt("boolean"),enableLegacyBabel5ModuleInterop:Tl.opt("boolean"),sourceMapOptions:Tl.opt("SourceMapOptions"),filePath:Tl.opt("string")})},{Options:Il}=Tl.createCheckers(Al);function _l(){vh(),zp(!1)}function Nl(e){vh(),Ol(e)}function Ll(e){wu(),Ml(e)}function Dl(){wu(),Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ImportDeclaration}function Ml(e){let t;t=0===Hc.scopeDepth?mh.TopLevelDeclaration:e?mh.BlockScopedDeclaration:mh.FunctionScopedDeclaration,Hc.tokens[Hc.tokens.length-1].identifierRole=t}function Ol(e){switch(Hc.type){case Fc._this:{const e=Eh(0);return vh(),void Ah(e)}case Fc._yield:case Fc.name:return Hc.type=Fc.name,void Ll(e);case Fc.bracketL:return vh(),void Fl(Fc.bracketR,e,!0);case Fc.braceL:return void du(!0,e);default:oh()}}function Fl(e,t,s=!1,i=!1,n=0){let r=!0,a=!1;const o=Hc.tokens.length;for(;!Ih(e)&&!Hc.error;)if(r?r=!1:(ah(Fc.comma),Hc.tokens[Hc.tokens.length-1].contextId=n,!a&&Hc.tokens[o].isType&&(Hc.tokens[Hc.tokens.length-1].isType=!0,a=!0)),s&&Nh(Fc.comma));else{if(Ih(e))break;if(Nh(Fc.ellipsis)){Nl(t),Bl(),Ih(Fc.comma),ah(e);break}Rl(i,t)}}function Rl(e,t){e&&$l([Oc._public,Oc._protected,Oc._private,Oc._readonly,Oc._override]),jl(t),Bl(),jl(t,!0)}function Bl(){Vc?function(){const e=Eh(0);Ih(Fc.question),Nh(Fc.colon)&&Zu();Ah(e)}():$c&&function(){const e=Eh(0);Ih(Fc.question),up(),Ah(e)}()}function jl(e,t=!1){if(t||Ol(e),!Ih(Fc.eq))return;const s=Hc.tokens.length-1;zp(),Hc.tokens[s].rhsEndIndex=Hc.tokens.length}function Ul(){return Nh(Fc.name)}function ql(){const e=Hc.snapshot();vh();return!!((Nh(Fc.bracketL)||Nh(Fc.braceL)||Nh(Fc.star)||Nh(Fc.ellipsis)||Nh(Fc.hash)||Nh(Fc.name)||Boolean(Hc.type&Fc.IS_KEYWORD)||Nh(Fc.string)||Nh(Fc.num)||Nh(Fc.bigint)||Nh(Fc.decimal))&&!sh())||(Hc.restoreFromSnapshot(e),!1)}function $l(e){for(;;){if(null===Vl(e))break}}function Vl(e){if(!Nh(Fc.name))return null;const t=Hc.contextualKeyword;if(-1!==e.indexOf(t)&&ql()){switch(t){case Oc._readonly:Hc.tokens[Hc.tokens.length-1].type=Fc._readonly;break;case Oc._abstract:Hc.tokens[Hc.tokens.length-1].type=Fc._abstract;break;case Oc._static:Hc.tokens[Hc.tokens.length-1].type=Fc._static;break;case Oc._public:Hc.tokens[Hc.tokens.length-1].type=Fc._public;break;case Oc._private:Hc.tokens[Hc.tokens.length-1].type=Fc._private;break;case Oc._protected:Hc.tokens[Hc.tokens.length-1].type=Fc._protected;break;case Oc._override:Hc.tokens[Hc.tokens.length-1].type=Fc._override;break;case Oc._declare:Hc.tokens[Hc.tokens.length-1].type=Fc._declare}return t}return null}function Hl(){for(wu();Ih(Fc.dot);)wu()}function Kl(){ah(Fc._import),ah(Fc.parenL),ah(Fc.string),ah(Fc.parenR),Ih(Fc.dot)&&Hl(),Nh(Fc.lessThan)&&_p()}function zl(){Ih(Fc._const);const e=Ih(Fc._in),t=Zc(Oc._out);Ih(Fc._const),!e&&!t||Nh(Fc.name)?wu():Hc.tokens[Hc.tokens.length-1].type=Fc.name,Ih(Fc._extends)&&fp(),Ih(Fc.eq)&&fp()}function Jl(){Nh(Fc.lessThan)&&Wl()}function Wl(){const e=Eh(0);for(Nh(Fc.lessThan)||Nh(Fc.typeParameterStart)?vh():oh();!Ih(Fc.greaterThan)&&!Hc.error;)zl(),Ih(Fc.comma);Ah(e)}function Xl(e){const t=e===Fc.arrow;var s;Jl(),ah(Fc.parenL),Hc.scopeDepth++,s=!1,Fl(Fc.parenR,s),Hc.scopeDepth--,(t||Nh(e))&&pp(e)}function Gl(){Ih(Fc.comma)||rh()}function Yl(){Xl(Fc.colon),Gl()}function Ql(){if(!Nh(Fc.bracketL)||!function(){const e=Hc.snapshot();vh();const t=Ih(Fc.name)&&Nh(Fc.colon);return Hc.restoreFromSnapshot(e),t}())return!1;const e=Eh(0);return ah(Fc.bracketL),wu(),dp(),ah(Fc.bracketR),up(),Gl(),Ah(e),!0}function Zl(e){Ih(Fc.question),e||!Nh(Fc.parenL)&&!Nh(Fc.lessThan)?(up(),Gl()):(Xl(Fc.colon),Gl())}function ep(){if(Nh(Fc.parenL)||Nh(Fc.lessThan))return void Yl();if(Nh(Fc._new))return vh(),void(Nh(Fc.parenL)||Nh(Fc.lessThan)?Yl():Zl(!1));const e=!!Vl([Oc._readonly]);Ql()||((Yc(Oc._get)||Yc(Oc._set))&&ql(),yu(-1),Zl(e))}function tp(){for(ah(Fc.braceL);!Ih(Fc.braceR)&&!Hc.error;)ep()}function sp(){const e=Hc.snapshot(),t=function(){if(vh(),Ih(Fc.plus)||Ih(Fc.minus))return Yc(Oc._readonly);Yc(Oc._readonly)&&vh();if(!Nh(Fc.bracketL))return!1;if(vh(),!Ul())return!1;return vh(),Nh(Fc._in)}();return Hc.restoreFromSnapshot(e),t}function ip(){ah(Fc.braceL),Nh(Fc.plus)||Nh(Fc.minus)?(vh(),eh(Oc._readonly)):Zc(Oc._readonly),ah(Fc.bracketL),wu(),ah(Fc._in),fp(),Zc(Oc._as)&&fp(),ah(Fc.bracketR),Nh(Fc.plus)||Nh(Fc.minus)?(vh(),ah(Fc.question)):Ih(Fc.question),Ih(Fc.colon)&&fp(),rh(),ah(Fc.braceR)}function np(){Ih(Fc.ellipsis)?fp():(fp(),Ih(Fc.question)),Ih(Fc.colon)&&fp()}var rp;function ap(e){e===rp.TSAbstractConstructorType&&eh(Oc._abstract),e!==rp.TSConstructorType&&e!==rp.TSAbstractConstructorType||ah(Fc._new);const t=Hc.inDisallowConditionalTypesContext;Hc.inDisallowConditionalTypesContext=!1,Xl(Fc.arrow),Hc.inDisallowConditionalTypesContext=t}function op(){switch(Hc.type){case Fc.name:return Hl(),void(!sh()&&Nh(Fc.lessThan)&&_p());case Fc._void:case Fc._null:return void vh();case Fc.string:case Fc.num:case Fc.bigint:case Fc.decimal:case Fc._true:case Fc._false:return void ou();case Fc.minus:return vh(),void ou();case Fc._this:return vh(),void(Yc(Oc._is)&&!sh()&&(vh(),dp()));case Fc._typeof:return ah(Fc._typeof),Nh(Fc._import)?Kl():Hl(),void(!sh()&&Nh(Fc.lessThan)&&_p());case Fc._import:return void Kl();case Fc.braceL:return void(sp()?ip():tp());case Fc.bracketL:return void function(){for(ah(Fc.bracketL);!Ih(Fc.bracketR)&&!Hc.error;)np(),Ih(Fc.comma)}();case Fc.parenL:return ah(Fc.parenL),fp(),void ah(Fc.parenR);case Fc.backQuote:return void function(){for(Ch(),Ch();!Nh(Fc.backQuote)&&!Hc.error;)ah(Fc.dollarBraceL),fp(),Ch(),Ch();vh()}();default:if(Hc.type&Fc.IS_KEYWORD)return vh(),void(Hc.tokens[Hc.tokens.length-1].type=Fc.name)}oh()}function cp(){if(Yc(Oc._keyof)||Yc(Oc._unique)||Yc(Oc._readonly))vh(),cp();else if(Yc(Oc._infer))!function(){if(eh(Oc._infer),wu(),Nh(Fc._extends)){const e=Hc.snapshot();ah(Fc._extends);const t=Hc.inDisallowConditionalTypesContext;Hc.inDisallowConditionalTypesContext=!0,fp(),Hc.inDisallowConditionalTypesContext=t,(Hc.error||!Hc.inDisallowConditionalTypesContext&&Nh(Fc.question))&&Hc.restoreFromSnapshot(e)}}();else{const e=Hc.inDisallowConditionalTypesContext;Hc.inDisallowConditionalTypesContext=!1,function(){for(op();!sh()&&Ih(Fc.bracketL);)Ih(Fc.bracketR)||(fp(),ah(Fc.bracketR))}(),Hc.inDisallowConditionalTypesContext=e}}function hp(){if(Ih(Fc.bitwiseAND),cp(),Nh(Fc.bitwiseAND))for(;Ih(Fc.bitwiseAND);)cp()}function lp(){return!!Nh(Fc.lessThan)||Nh(Fc.parenL)&&function(){const e=Hc.snapshot(),t=function(){if(vh(),Nh(Fc.parenR)||Nh(Fc.ellipsis))return!0;if(function(){if(Nh(Fc.name)||Nh(Fc._this))return vh(),!0;if(Nh(Fc.braceL)||Nh(Fc.bracketL)){let e=1;for(vh();e>0&&!Hc.error;)Nh(Fc.braceL)||Nh(Fc.bracketL)?e++:(Nh(Fc.braceR)||Nh(Fc.bracketR))&&e--,vh();return!0}return!1}()){if(Nh(Fc.colon)||Nh(Fc.comma)||Nh(Fc.question)||Nh(Fc.eq))return!0;if(Nh(Fc.parenR)&&(vh(),Nh(Fc.arrow)))return!0}return!1}();return Hc.restoreFromSnapshot(e),t}()}function pp(e){const t=Eh(0);ah(e);(function(){const e=Hc.snapshot();if(Yc(Oc._asserts))return vh(),Zc(Oc._is)?(fp(),!0):Ul()||Nh(Fc._this)?(vh(),Zc(Oc._is)&&fp(),!0):(Hc.restoreFromSnapshot(e),!1);if(Ul()||Nh(Fc._this))return vh(),Yc(Oc._is)&&!sh()?(vh(),fp(),!0):(Hc.restoreFromSnapshot(e),!1);return!1})()||fp(),Ah(t)}function up(){Nh(Fc.colon)&&dp()}function dp(){const e=Eh(0);ah(Fc.colon),fp(),Ah(e)}function fp(){if(mp(),Hc.inDisallowConditionalTypesContext||sh()||!Ih(Fc._extends))return;const e=Hc.inDisallowConditionalTypesContext;Hc.inDisallowConditionalTypesContext=!0,mp(),Hc.inDisallowConditionalTypesContext=e,ah(Fc.question),fp(),ah(Fc.colon),fp()}function mp(){lp()?ap(rp.TSFunctionType):Nh(Fc._new)?ap(rp.TSConstructorType):Yc(Oc._abstract)&&Lh()===Fc._new?ap(rp.TSAbstractConstructorType):function(){if(Ih(Fc.bitwiseOR),hp(),Nh(Fc.bitwiseOR))for(;Ih(Fc.bitwiseOR);)hp()}()}function yp(){for(;!Nh(Fc.braceL)&&!Hc.error;)xp(),Ih(Fc.comma)}function xp(){Hl(),Nh(Fc.lessThan)&&_p()}function gp(){if(Nh(Fc.string)?ou():wu(),Ih(Fc.eq)){const e=Hc.tokens.length-1;zp(),Hc.tokens[e].rhsEndIndex=Hc.tokens.length}}function kp(){for(Ll(!1),ah(Fc.braceL);!Ih(Fc.braceR)&&!Hc.error;)gp(),Ih(Fc.comma)}function Tp(){ah(Fc.braceL),ud(Fc.braceR)}function bp(){Ll(!1),Ih(Fc.dot)?bp():Tp()}function Sp(){Yc(Oc._global)?wu():Nh(Fc.string)?ru():oh(),Nh(Fc.braceL)?Tp():rh()}function wp(){Dl(),ah(Fc.eq),Yc(Oc._require)&&Lh()===Fc.parenL?(eh(Oc._require),ah(Fc.parenL),Nh(Fc.string)||oh(),ou(),ah(Fc.parenR)):Hl(),rh()}function vp(){return Pp(Hc.contextualKeyword,!0)}function Cp(e){switch(e){case Oc._declare:{const e=Hc.tokens.length-1,t=function(){if(nh())return!1;switch(Hc.type){case Fc._function:{const e=Eh(1);return vh(),xd(Hc.start,!0),Ah(e),!0}case Fc._class:{const e=Eh(1);return kd(!0,!1),Ah(e),!0}case Fc._const:if(Nh(Fc._const)&&Qc(Oc._enum)){const e=Eh(1);return ah(Fc._const),eh(Oc._enum),Hc.tokens[Hc.tokens.length-1].type=Fc._enum,kp(),Ah(e),!0}case Fc._var:case Fc._let:{const e=Eh(1);return ld(Hc.type!==Fc._var),Ah(e),!0}case Fc.name:{const e=Eh(1),t=Hc.contextualKeyword;let s=!1;return t===Oc._global?(Sp(),s=!0):s=Pp(t,!0),Ah(e),s}default:return!1}}();if(t)return Hc.tokens[e].type=Fc._declare,!0;break}case Oc._global:if(Nh(Fc.braceL))return Tp(),!0;break;default:return Pp(e,!1)}return!1}function Pp(e,t){switch(e){case Oc._abstract:if(Ep(t)&&Nh(Fc._class))return Hc.tokens[Hc.tokens.length-1].type=Fc._abstract,kd(!0,!1),!0;break;case Oc._enum:if(Ep(t)&&Nh(Fc.name))return Hc.tokens[Hc.tokens.length-1].type=Fc._enum,kp(),!0;break;case Oc._interface:if(Ep(t)&&Nh(Fc.name)){const e=Eh(t?2:1);return Ll(!1),Jl(),Ih(Fc._extends)&&yp(),tp(),Ah(e),!0}break;case Oc._module:if(Ep(t)){if(Nh(Fc.string)){const e=Eh(t?2:1);return Sp(),Ah(e),!0}if(Nh(Fc.name)){const e=Eh(t?2:1);return bp(),Ah(e),!0}}break;case Oc._namespace:if(Ep(t)&&Nh(Fc.name)){const e=Eh(t?2:1);return bp(),Ah(e),!0}break;case Oc._type:if(Ep(t)&&Nh(Fc.name)){const e=Eh(t?2:1);return Ll(!1),Jl(),ah(Fc.eq),fp(),rh(),Ah(e),!0}}return!1}function Ep(e){return e?(vh(),!0):!nh()}function Ap(){const e=Hc.snapshot();return Wl(),gd(),Nh(Fc.colon)&&pp(Fc.colon),ah(Fc.arrow),Hc.error?(Hc.restoreFromSnapshot(e),!1):(Tu(!0),!0)}function Ip(){Hc.type===Fc.bitShiftL&&(Hc.pos-=1,$h(Fc.lessThan)),_p()}function _p(){const e=Eh(0);for(ah(Fc.lessThan);!Nh(Fc.greaterThan)&&!Hc.error;)fp(),Ih(Fc.comma);e?(ah(Fc.greaterThan),Ah(e)):(Ah(e),Hh(),ah(Fc.greaterThan),Hc.tokens[Hc.tokens.length-1].isType=!0)}function Np(){if(Nh(Fc.name))switch(Hc.contextualKeyword){case Oc._abstract:case Oc._declare:case Oc._enum:case Oc._interface:case Oc._module:case Oc._namespace:case Oc._type:return!0}return!1}function Lp(e,t){return qc?function(e,t){if(!Nh(Fc.lessThan))return Jp(e,t);const s=Hc.snapshot();let i=Jp(e,t);if(!Hc.error)return i;Hc.restoreFromSnapshot(s);Hc.type=Fc.typeParameterStart,Wl(),i=Jp(e,t),i||oh();return i}(e,t):function(e,t){if(!Nh(Fc.lessThan))return Jp(e,t);const s=Hc.snapshot();Wl();const i=Jp(e,t);i||oh();if(!Hc.error)return i;Hc.restoreFromSnapshot(s);return Jp(e,t)}(e,t)}function Dp(){$p()}function Mp(e){Dp(),Ih(Fc.colon)?Dp():Hc.tokens[Hc.tokens.length-1].identifierRole=e}function Op(){const e=Hc.tokens.length;Mp(mh.Access);let t=!1;for(;Nh(Fc.dot);)t=!0,$p(),Dp();if(!t){const t=Hc.tokens[e],s=Kc.charCodeAt(t.start);s>=Rc.lowercaseA&&s<=Rc.lowercaseZ&&(t.identifierRole=null)}}function Fp(){switch(Hc.type){case Fc.braceL:return vh(),Kp(),void $p();case Fc.jsxTagStart:return qp(),void $p();case Fc.string:return void $p();default:oh("JSX value should be either an expression or a quoted JSX text")}}function Rp(){ah(Fc.ellipsis),Kp()}function Bp(e){if(Nh(Fc.jsxTagEnd))return!1;Op(),$c&&function(){if(Ih(Fc.jsxTagStart)){Hc.tokens[Hc.tokens.length-1].type=Fc.typeParameterStart;const e=Eh(1);for(;!Nh(Fc.greaterThan)&&!Hc.error;)fp(),Ih(Fc.comma);$p(),Ah(e)}}();let t=!1;for(;!Nh(Fc.slash)&&!Nh(Fc.jsxTagEnd)&&!Hc.error;)Ih(Fc.braceL)?(t=!0,ah(Fc.ellipsis),zp(),$p()):(t&&Hc.end-Hc.start===3&&Kc.charCodeAt(Hc.start)===Rc.lowercaseK&&Kc.charCodeAt(Hc.start+1)===Rc.lowercaseE&&Kc.charCodeAt(Hc.start+2)===Rc.lowercaseY&&(Hc.tokens[e].jsxRole=yh.KeyAfterPropSpread),Mp(mh.ObjectKey),Nh(Fc.eq)&&($p(),Fp()));const s=Nh(Fc.slash);return s&&$p(),s}function jp(){Nh(Fc.jsxTagEnd)||Op()}function Up(){const e=Hc.tokens.length-1;Hc.tokens[e].jsxRole=yh.NoChildren;let t=0;if(!Bp(e))for(Vp();;)switch(Hc.type){case Fc.jsxTagStart:if($p(),Nh(Fc.slash))return $p(),jp(),void(Hc.tokens[e].jsxRole!==yh.KeyAfterPropSpread&&(1===t?Hc.tokens[e].jsxRole=yh.OneChild:t>1&&(Hc.tokens[e].jsxRole=yh.StaticChildren)));t++,Up(),Vp();break;case Fc.jsxText:t++,Vp();break;case Fc.jsxEmptyText:Vp();break;case Fc.braceL:vh(),Nh(Fc.ellipsis)?(Rp(),Vp(),t+=2):(Nh(Fc.braceR)||(t++,Kp()),Vp());break;default:return void oh()}}function qp(){$p(),Up()}function $p(){Hc.tokens.push(new wh),qh(),Hc.start=Hc.pos;const e=Kc.charCodeAt(Hc.pos);if(dh[e])!function(){let e;do{if(Hc.pos>Kc.length)return void oh("Unexpectedly reached the end of input.");e=Kc.charCodeAt(++Hc.pos)}while(uh[e]||e===Rc.dash);$h(Fc.jsxName)}();else if(e===Rc.quotationMark||e===Rc.apostrophe)!function(e){for(Hc.pos++;;){if(Hc.pos>=Kc.length)return void oh("Unterminated string constant");if(Kc.charCodeAt(Hc.pos)===e){Hc.pos++;break}Hc.pos++}$h(Fc.string)}(e);else switch(++Hc.pos,e){case Rc.greaterThan:$h(Fc.jsxTagEnd);break;case Rc.lessThan:$h(Fc.jsxTagStart);break;case Rc.slash:$h(Fc.slash);break;case Rc.equalsTo:$h(Fc.eq);break;case Rc.leftCurlyBrace:$h(Fc.braceL);break;case Rc.dot:$h(Fc.dot);break;case Rc.colon:$h(Fc.colon);break;default:oh()}}function Vp(){Hc.tokens.push(new wh),Hc.start=Hc.pos,function(){let e=!1,t=!1;for(;;){if(Hc.pos>=Kc.length)return void oh("Unterminated JSX contents");const s=Kc.charCodeAt(Hc.pos);if(s===Rc.lessThan||s===Rc.leftCurlyBrace)return Hc.pos===Hc.start?s===Rc.lessThan?(Hc.pos++,void $h(Fc.jsxTagStart)):void Kh(s):void $h(e&&!t?Fc.jsxEmptyText:Fc.jsxText);s===Rc.lineFeed?e=!0:s!==Rc.space&&s!==Rc.carriageReturn&&s!==Rc.tab&&(t=!0),Hc.pos++}}()}!function(e){e[e.TSFunctionType=0]="TSFunctionType";e[e.TSConstructorType=1]="TSConstructorType";e[e.TSAbstractConstructorType=2]="TSAbstractConstructorType"}(rp||(rp={}));class Hp{constructor(e){this.stop=e}}function Kp(e=!1){if(zp(e),Nh(Fc.comma))for(;Ih(Fc.comma);)zp(e)}function zp(e=!1,t=!1){return $c?Lp(e,t):Vc?function(e,t){if(Nh(Fc.lessThan)){const s=Hc.snapshot();let i=Jp(e,t);if(!Hc.error)return i;Hc.restoreFromSnapshot(s),Hc.type=Fc.typeParameterStart;const n=Eh(0);if(Ou(),Ah(n),i=Jp(e,t),i)return!0;oh()}return Jp(e,t)}(e,t):Jp(e,t)}function Jp(e,t){if(Nh(Fc._yield))return vh(),Nh(Fc.semi)||th()||(Ih(Fc.star),zp()),!1;(Nh(Fc.parenL)||Nh(Fc.name)||Nh(Fc._yield))&&(Hc.potentialArrowAt=Hc.start);const s=function(e){const t=function(e){const t=Hc.tokens.length,s=Gp();if(s)return!0;return Xp(t,-1,e),!1}(e);if(t)return!0;return function(e){$c||Vc?function(e){if(Nh(Fc.question)){const e=Lh();if(e===Fc.colon||e===Fc.comma||e===Fc.parenR)return}Wp(e)}(e):Wp(e)}(e),!1}(e);return t&&pu(),Hc.type&Fc.IS_ASSIGN?(vh(),zp(e),!1):s}function Wp(e){Ih(Fc.question)&&(zp(),ah(Fc.colon),zp(e))}function Xp(e,t,s){if($c&&(Fc._in&Fc.PRECEDENCE_MASK)>t&&!sh()&&(Zc(Oc._as)||Zc(Oc._satisfies))){const i=Eh(1);return fp(),Ah(i),Hh(),void Xp(e,t,s)}const i=Hc.type&Fc.PRECEDENCE_MASK;if(i>0&&(!s||!Nh(Fc._in))&&i>t){const n=Hc.type;vh(),n===Fc.nullishCoalescing&&(Hc.tokens[Hc.tokens.length-1].nullishStartIndex=e);const r=Hc.tokens.length;Gp(),Xp(r,n&Fc.IS_RIGHT_ASSOCIATIVE?i-1:i,s),n===Fc.nullishCoalescing&&(Hc.tokens[e].numNullishCoalesceStarts++,Hc.tokens[Hc.tokens.length-1].numNullishCoalesceEnds++),Xp(e,t,s)}}function Gp(){if($c&&!qc&&Ih(Fc.lessThan))return function(){const e=Eh(1);fp(),ah(Fc.greaterThan),Ah(e),Gp()}(),!1;if(Yc(Oc._module)&&Rh()===Rc.leftCurlyBrace&&!ih())return eh(Oc._module),ah(Fc.braceL),ud(Fc.braceR),!1;if(Hc.type&Fc.IS_PREFIX)return vh(),Gp(),!1;if(Yp())return!0;for(;Hc.type&Fc.IS_POSTFIX&&!th();)Hc.type===Fc.preIncDec&&(Hc.type=Fc.postIncDec),vh();return!1}function Yp(){const e=Hc.tokens.length;return!!ru()||(Qp(e),Hc.tokens.length>e&&Hc.tokens[e].isOptionalChainStart&&(Hc.tokens[Hc.tokens.length-1].isOptionalChainEnd=!0),!1)}function Qp(e,t=!1){Vc?function(e,t=!1){if(Hc.tokens[Hc.tokens.length-1].contextualKeyword===Oc._async&&Nh(Fc.lessThan)){const e=Hc.snapshot(),t=function(){Hc.scopeDepth++;const e=Hc.tokens.length;if(gd(),!lu())return!1;return gu(e),!0}();if(t&&!Hc.error)return;Hc.restoreFromSnapshot(e)}Zp(e,t)}(e,t):Zp(e,t)}function Zp(e,t=!1){const s=new Hp(!1);do{eu(e,t,s)}while(!s.stop&&!Hc.error)}function eu(e,t,s){$c?function(e,t,s){if(sh()||!Ih(Fc.bang)){if(Nh(Fc.lessThan)||Nh(Fc.bitShiftL)){const s=Hc.snapshot();if(!t&&su()&&Ap())return;if(Ip(),!t&&Ih(Fc.parenL)?(Hc.tokens[Hc.tokens.length-1].subscriptStartIndex=e,iu()):Nh(Fc.backQuote)?uu():(Hc.type===Fc.greaterThan||Hc.type!==Fc.parenL&&Boolean(Hc.type&Fc.IS_EXPRESSION_START)&&!sh())&&oh(),!Hc.error)return;Hc.restoreFromSnapshot(s)}else!t&&Nh(Fc.questionDot)&&Lh()===Fc.lessThan&&(vh(),Hc.tokens[e].isOptionalChainStart=!0,Hc.tokens[Hc.tokens.length-1].subscriptStartIndex=e,_p(),ah(Fc.parenL),iu());tu(e,t,s)}else Hc.tokens[Hc.tokens.length-1].type=Fc.nonNullAssertion}(e,t,s):Vc?function(e,t,s){if(Nh(Fc.questionDot)&&Lh()===Fc.lessThan)return t?void(s.stop=!0):(vh(),Fu(),ah(Fc.parenL),void iu());if(!t&&Nh(Fc.lessThan)){const e=Hc.snapshot();if(Fu(),ah(Fc.parenL),iu(),!Hc.error)return;Hc.restoreFromSnapshot(e)}tu(e,t,s)}(e,t,s):tu(e,t,s)}function tu(e,t,s){if(!t&&Ih(Fc.doubleColon))nu(),s.stop=!0,Qp(e,t);else if(Nh(Fc.questionDot)){if(Hc.tokens[e].isOptionalChainStart=!0,t&&Lh()===Fc.parenL)return void(s.stop=!0);vh(),Hc.tokens[Hc.tokens.length-1].subscriptStartIndex=e,Ih(Fc.bracketL)?(Kp(),ah(Fc.bracketR)):Ih(Fc.parenL)?iu():au()}else if(Ih(Fc.dot))Hc.tokens[Hc.tokens.length-1].subscriptStartIndex=e,au();else if(Ih(Fc.bracketL))Hc.tokens[Hc.tokens.length-1].subscriptStartIndex=e,Kp(),ah(Fc.bracketR);else if(!t&&Nh(Fc.parenL))if(su()){const t=Hc.snapshot(),i=Hc.tokens.length;vh(),Hc.tokens[Hc.tokens.length-1].subscriptStartIndex=e;const n=Jc();Hc.tokens[Hc.tokens.length-1].contextId=n,iu(),Hc.tokens[Hc.tokens.length-1].contextId=n,(Nh(Fc.colon)||Nh(Fc.arrow))&&(Hc.restoreFromSnapshot(t),s.stop=!0,Hc.scopeDepth++,gd(),function(e){$c?Nh(Fc.colon)&&dp():Vc&&function(){if(Nh(Fc.colon)){const e=Hc.noAnonFunctionType;Hc.noAnonFunctionType=!0,Zu(),Hc.noAnonFunctionType=e}}();ah(Fc.arrow),gu(e)}(i))}else{vh(),Hc.tokens[Hc.tokens.length-1].subscriptStartIndex=e;const t=Jc();Hc.tokens[Hc.tokens.length-1].contextId=t,iu(),Hc.tokens[Hc.tokens.length-1].contextId=t}else Nh(Fc.backQuote)?uu():s.stop=!0}function su(){return Hc.tokens[Hc.tokens.length-1].contextualKeyword===Oc._async&&!th()}function iu(){let e=!0;for(;!Ih(Fc.parenR)&&!Hc.error;){if(e)e=!1;else if(ah(Fc.comma),Ih(Fc.parenR))break;Su(!1)}}function nu(){const e=Hc.tokens.length;ru(),Qp(e,!0)}function ru(){if(Ih(Fc.modulo))return wu(),!1;if(Nh(Fc.jsxText)||Nh(Fc.jsxEmptyText))return ou(),!1;if(Nh(Fc.lessThan)&&qc)return Hc.type=Fc.jsxTagStart,qp(),vh(),!1;const e=Hc.potentialArrowAt===Hc.start;switch(Hc.type){case Fc.slash:case Fc.assign:Ph();case Fc._super:case Fc._this:case Fc.regexp:case Fc.num:case Fc.bigint:case Fc.decimal:case Fc.string:case Fc._null:case Fc._true:case Fc._false:return vh(),!1;case Fc._import:return vh(),Nh(Fc.dot)&&(Hc.tokens[Hc.tokens.length-1].type=Fc.name,vh(),wu()),!1;case Fc.name:{const t=Hc.tokens.length,s=Hc.start,i=Hc.contextualKeyword;return wu(),i===Oc._await?(Gp(),!1):i===Oc._async&&Nh(Fc._function)&&!th()?(vh(),xd(s,!1),!1):e&&i===Oc._async&&!th()&&Nh(Fc.name)?(Hc.scopeDepth++,Ll(!1),ah(Fc.arrow),gu(t),!0):Nh(Fc._do)&&!th()?(vh(),pd(),!1):e&&!th()&&Nh(Fc.arrow)?(Hc.scopeDepth++,Ml(!1),ah(Fc.arrow),gu(t),!0):(Hc.tokens[Hc.tokens.length-1].identifierRole=mh.Access,!1)}case Fc._do:return vh(),pd(),!1;case Fc.parenL:return hu(e);case Fc.bracketL:return vh(),bu(Fc.bracketR,!0),!1;case Fc.braceL:return du(!1,!1),!1;case Fc._function:return function(){const e=Hc.start;wu(),Ih(Fc.dot)&&wu();xd(e,!1)}(),!1;case Fc.at:od();case Fc._class:return kd(!1),!1;case Fc._new:return function(){if(ah(Fc._new),Ih(Fc.dot))return void wu();nu(),void Ih(Fc.questionDot),Vc&&function(){if(Nh(Fc.lessThan)){const e=Hc.snapshot();Fu(),Hc.error&&Hc.restoreFromSnapshot(e)}}();Ih(Fc.parenL)&&bu(Fc.parenR)}(),!1;case Fc.backQuote:return uu(),!1;case Fc.doubleColon:return vh(),nu(),!1;case Fc.hash:{const e=Rh();return dh[e]||e===Rc.backslash?au():vh(),!1}default:return oh(),!1}}function au(){Ih(Fc.hash),wu()}function ou(){vh()}function cu(){ah(Fc.parenL),Kp(),ah(Fc.parenR)}function hu(e){const t=Hc.snapshot(),s=Hc.tokens.length;ah(Fc.parenL);let i=!0;for(;!Nh(Fc.parenR)&&!Hc.error;){if(i)i=!1;else if(ah(Fc.comma),Nh(Fc.parenR))break;if(Nh(Fc.ellipsis)){Nl(!1),pu();break}zp(!1,!0)}if(ah(Fc.parenR),e&&(Nh(Fc.colon)||!th())){if(lu())return Hc.restoreFromSnapshot(t),Hc.scopeDepth++,gd(),lu(),gu(s),!Hc.error||(Hc.restoreFromSnapshot(t),hu(!1),!1)}return!1}function lu(){return $c?function(){if(Nh(Fc.colon)){const e=Hc.snapshot();pp(Fc.colon),th()&&oh(),Nh(Fc.arrow)||oh(),Hc.error&&Hc.restoreFromSnapshot(e)}return Ih(Fc.arrow)}():Vc?function(){if(Nh(Fc.colon)){const e=Eh(0),t=Hc.snapshot(),s=Hc.noAnonFunctionType;Hc.noAnonFunctionType=!0,Pu(),Hc.noAnonFunctionType=s,th()&&oh(),Nh(Fc.arrow)||oh(),Hc.error&&Hc.restoreFromSnapshot(t),Ah(e)}return Ih(Fc.arrow)}():Ih(Fc.arrow)}function pu(){($c||Vc)&&(_h(Fc.question),Nh(Fc.colon)&&($c?dp():Vc&&Zu()))}function uu(){for(Ch(),Ch();!Nh(Fc.backQuote)&&!Hc.error;)ah(Fc.dollarBraceL),Kp(),Ch(),Ch();vh()}function du(e,t){const s=Jc();let i=!0;for(vh(),Hc.tokens[Hc.tokens.length-1].contextId=s;!Ih(Fc.braceR)&&!Hc.error;){if(i)i=!1;else if(ah(Fc.comma),Ih(Fc.braceR))break;let n=!1;if(Nh(Fc.ellipsis)){const s=Hc.tokens.length;if(_l(),e&&(Hc.tokens.length===s+2&&Ml(t),Ih(Fc.braceR)))break;continue}e||(n=Ih(Fc.star)),!e&&Yc(Oc._async)?(n&&oh(),wu(),Nh(Fc.colon)||Nh(Fc.parenL)||Nh(Fc.braceR)||Nh(Fc.eq)||Nh(Fc.comma)||(Nh(Fc.star)&&(vh(),n=!0),yu(s))):yu(s),mu(e,t,s)}Hc.tokens[Hc.tokens.length-1].contextId=s}function fu(e,t){const s=Hc.start;return Nh(Fc.parenL)?(e&&oh(),xu(s,!1),!0):!!function(e){return!e&&(Nh(Fc.string)||Nh(Fc.num)||Nh(Fc.bracketL)||Nh(Fc.name)||!!(Hc.type&Fc.IS_KEYWORD))}(e)&&(yu(t),xu(s,!1),!0)}function mu(e,t,s){$c?Jl():Vc&&Nh(Fc.lessThan)&&(Ou(),Nh(Fc.parenL)||oh());fu(e,s)||function(e,t){if(Ih(Fc.colon))return void(e?jl(t):zp(!1));let s;s=e?0===Hc.scopeDepth?mh.ObjectShorthandTopLevelDeclaration:t?mh.ObjectShorthandBlockScopedDeclaration:mh.ObjectShorthandFunctionScopedDeclaration:mh.ObjectShorthand,Hc.tokens[Hc.tokens.length-1].identifierRole=s,jl(t,!0)}(e,t)}function yu(e){Vc&&td(),Ih(Fc.bracketL)?(Hc.tokens[Hc.tokens.length-1].contextId=e,zp(),ah(Fc.bracketR),Hc.tokens[Hc.tokens.length-1].contextId=e):(Nh(Fc.num)||Nh(Fc.string)||Nh(Fc.bigint)||Nh(Fc.decimal)?ru():au(),Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ObjectKey,Hc.tokens[Hc.tokens.length-1].contextId=e)}function xu(e,t){const s=Jc();Hc.scopeDepth++;const i=Hc.tokens.length;gd(t,s),ku(e,s);const n=Hc.tokens.length;Hc.scopes.push(new Bc(i,n,!0)),Hc.scopeDepth--}function gu(e){Tu(!0);const t=Hc.tokens.length;Hc.scopes.push(new Bc(e,t,!0)),Hc.scopeDepth--}function ku(e,t=0){$c?function(e,t){if(Nh(Fc.colon)&&pp(Fc.colon),!Nh(Fc.braceL)&&nh()){let t=Hc.tokens.length-1;for(;t>=0&&(Hc.tokens[t].start>=e||Hc.tokens[t].type===Fc._default||Hc.tokens[t].type===Fc._export);)Hc.tokens[t].isType=!0,t--;return}Tu(!1,t)}(e,t):Vc?function(e){Nh(Fc.colon)&&Pu();Tu(!1,e)}(t):Tu(!1,t)}function Tu(e,t=0){e&&!Nh(Fc.braceL)?zp():pd(!0,t)}function bu(e,t=!1){let s=!0;for(;!Ih(e)&&!Hc.error;){if(s)s=!1;else if(ah(Fc.comma),Ih(e))break;Su(t)}}function Su(e){e&&Nh(Fc.comma)||(Nh(Fc.ellipsis)?(_l(),pu()):Nh(Fc.question)?vh():zp(!1,!0))}function wu(){vh(),Hc.tokens[Hc.tokens.length-1].type=Fc.name}function vu(e){const t=Eh(0);ah(e||Fc.colon),Qu(),Ah(t)}function Cu(){ah(Fc.modulo),eh(Oc._checks),Ih(Fc.parenL)&&(Kp(),ah(Fc.parenR))}function Pu(){const e=Eh(0);ah(Fc.colon),Nh(Fc.modulo)?Cu():(Qu(),Nh(Fc.modulo)&&Cu()),Ah(e)}function Eu(){Nh(Fc._class)?(vh(),Au(!0)):Nh(Fc._function)?(vh(),wu(),Nh(Fc.lessThan)&&Ou(),ah(Fc.parenL),Ju(),ah(Fc.parenR),Pu(),rh()):Nh(Fc._var)?(vh(),ed(),rh()):Zc(Oc._module)?Ih(Fc.dot)?(eh(Oc._exports),Zu(),rh()):function(){Nh(Fc.string)?ru():wu();ah(Fc.braceL);for(;!Nh(Fc.braceR)&&!Hc.error;)Nh(Fc._import)?(vh(),Md()):oh();ah(Fc.braceR)}():Yc(Oc._type)?(vh(),Lu()):Yc(Oc._opaque)?(vh(),Du(!0)):Yc(Oc._interface)?(vh(),Au()):Nh(Fc._export)?(ah(Fc._export),Ih(Fc._default)?Nh(Fc._function)||Nh(Fc._class)?Eu():(Qu(),rh()):Nh(Fc._var)||Nh(Fc._function)||Nh(Fc._class)||Yc(Oc._opaque)?Eu():Nh(Fc.star)||Nh(Fc.braceL)||Yc(Oc._interface)||Yc(Oc._type)||Yc(Oc._opaque)?Ed():oh()):oh()}function Au(e=!1){if(Nu(),Nh(Fc.lessThan)&&Ou(),Ih(Fc._extends))do{Iu()}while(!e&&Ih(Fc.comma));if(Yc(Oc._mixins)){vh();do{Iu()}while(Ih(Fc.comma))}if(Yc(Oc._implements)){vh();do{Iu()}while(Ih(Fc.comma))}$u(e,!1,e)}function Iu(){Ku(!1),Nh(Fc.lessThan)&&Fu()}function _u(){Au()}function Nu(){wu()}function Lu(){Nu(),Nh(Fc.lessThan)&&Ou(),vu(Fc.eq),rh()}function Du(e){eh(Oc._type),Nu(),Nh(Fc.lessThan)&&Ou(),Nh(Fc.colon)&&vu(Fc.colon),e||vu(Fc.eq),rh()}function Mu(){td(),ed(),Ih(Fc.eq)&&Qu()}function Ou(){const e=Eh(0);Nh(Fc.lessThan)||Nh(Fc.typeParameterStart)?vh():oh();do{Mu(),Nh(Fc.greaterThan)||ah(Fc.comma)}while(!Nh(Fc.greaterThan)&&!Hc.error);ah(Fc.greaterThan),Ah(e)}function Fu(){const e=Eh(0);for(ah(Fc.lessThan);!Nh(Fc.greaterThan)&&!Hc.error;)Qu(),Nh(Fc.greaterThan)||ah(Fc.comma);ah(Fc.greaterThan),Ah(e)}function Ru(){Nh(Fc.num)||Nh(Fc.string)?ru():wu()}function Bu(){Lh()===Fc.colon?(Ru(),vu()):Qu(),ah(Fc.bracketR),vu()}function ju(){Ru(),ah(Fc.bracketR),ah(Fc.bracketR),Nh(Fc.lessThan)||Nh(Fc.parenL)?Uu():(Ih(Fc.question),vu())}function Uu(){for(Nh(Fc.lessThan)&&Ou(),ah(Fc.parenL);!Nh(Fc.parenR)&&!Nh(Fc.ellipsis)&&!Hc.error;)zu(),Nh(Fc.parenR)||ah(Fc.comma);Ih(Fc.ellipsis)&&zu(),ah(Fc.parenR),vu()}function qu(){Uu()}function $u(e,t,s){let i;for(t&&Nh(Fc.braceBarL)?(ah(Fc.braceBarL),i=Fc.braceBarR):(ah(Fc.braceL),i=Fc.braceR);!Nh(i)&&!Hc.error;){if(s&&Yc(Oc._proto)){const t=Lh();t!==Fc.colon&&t!==Fc.question&&(vh(),e=!1)}if(e&&Yc(Oc._static)){const e=Lh();e!==Fc.colon&&e!==Fc.question&&vh()}if(td(),Ih(Fc.bracketL))Ih(Fc.bracketL)?ju():Bu();else if(Nh(Fc.parenL)||Nh(Fc.lessThan))qu();else{if(Yc(Oc._get)||Yc(Oc._set)){const e=Lh();e!==Fc.name&&e!==Fc.string&&e!==Fc.num||vh()}Vu()}Hu()}ah(i)}function Vu(){if(Nh(Fc.ellipsis)){if(ah(Fc.ellipsis),Ih(Fc.comma)||Ih(Fc.semi),Nh(Fc.braceR))return;Qu()}else Ru(),Nh(Fc.lessThan)||Nh(Fc.parenL)?Uu():(Ih(Fc.question),vu())}function Hu(){Ih(Fc.semi)||Ih(Fc.comma)||Nh(Fc.braceR)||Nh(Fc.braceBarR)||oh()}function Ku(e){for(e||wu();Ih(Fc.dot);)wu()}function zu(){const e=Lh();e===Fc.colon||e===Fc.question?(wu(),Ih(Fc.question),vu()):Qu()}function Ju(){for(;!Nh(Fc.parenR)&&!Nh(Fc.ellipsis)&&!Hc.error;)zu(),Nh(Fc.parenR)||ah(Fc.comma);Ih(Fc.ellipsis)&&zu()}function Wu(){let e=!1;const t=Hc.noAnonFunctionType;switch(Hc.type){case Fc.name:return Yc(Oc._interface)?void function(){if(eh(Oc._interface),Ih(Fc._extends))do{Iu()}while(Ih(Fc.comma));$u(!1,!1,!1)}():(wu(),Ku(!0),void(Nh(Fc.lessThan)&&Fu()));case Fc.braceL:return void $u(!1,!1,!1);case Fc.braceBarL:return void $u(!1,!0,!1);case Fc.bracketL:return void function(){for(ah(Fc.bracketL);Hc.pos<Kc.length&&!Nh(Fc.bracketR)&&(Qu(),!Nh(Fc.bracketR));)ah(Fc.comma);ah(Fc.bracketR)}();case Fc.lessThan:return Ou(),ah(Fc.parenL),Ju(),ah(Fc.parenR),ah(Fc.arrow),void Qu();case Fc.parenL:if(vh(),!Nh(Fc.parenR)&&!Nh(Fc.ellipsis))if(Nh(Fc.name)){const t=Lh();e=t!==Fc.question&&t!==Fc.colon}else e=!0;if(e){if(Hc.noAnonFunctionType=!1,Qu(),Hc.noAnonFunctionType=t,Hc.noAnonFunctionType||!(Nh(Fc.comma)||Nh(Fc.parenR)&&Lh()===Fc.arrow))return void ah(Fc.parenR);Ih(Fc.comma)}return Ju(),ah(Fc.parenR),ah(Fc.arrow),void Qu();case Fc.minus:return vh(),void ou();case Fc.string:case Fc.num:case Fc._true:case Fc._false:case Fc._null:case Fc._this:case Fc._void:case Fc.star:return void vh();default:if(Hc.type===Fc._typeof)return ah(Fc._typeof),void Wu();if(Hc.type&Fc.IS_KEYWORD)return vh(),void(Hc.tokens[Hc.tokens.length-1].type=Fc.name)}oh()}function Xu(){Ih(Fc.question)?Xu():function(){for(Wu();!th()&&(Nh(Fc.bracketL)||Nh(Fc.questionDot));)Ih(Fc.questionDot),ah(Fc.bracketL),Ih(Fc.bracketR)||(Qu(),ah(Fc.bracketR))}()}function Gu(){Xu(),!Hc.noAnonFunctionType&&Ih(Fc.arrow)&&Qu()}function Yu(){for(Ih(Fc.bitwiseAND),Gu();Ih(Fc.bitwiseAND);)Gu()}function Qu(){!function(){for(Ih(Fc.bitwiseOR),Yu();Ih(Fc.bitwiseOR);)Yu()}()}function Zu(){vu()}function ed(){wu(),Nh(Fc.colon)&&Zu()}function td(){(Nh(Fc.plus)||Nh(Fc.minus))&&(vh(),Hc.tokens[Hc.tokens.length-1].isType=!0)}function sd(){if(Nh(Fc._typeof)||Yc(Oc._type)){const t=Mh();(((e=t).type===Fc.name||e.type&Fc.IS_KEYWORD)&&e.contextualKeyword!==Oc._from||t.type===Fc.braceL||t.type===Fc.star)&&vh()}var e}function id(){eh(Oc._enum),Hc.tokens[Hc.tokens.length-1].type=Fc._enum,wu(),function(){Zc(Oc._of)&&vh();ah(Fc.braceL),function(){for(;!Nh(Fc.braceR)&&!Hc.error&&!Ih(Fc.ellipsis);)nd(),Nh(Fc.braceR)||ah(Fc.comma)}(),ah(Fc.braceR)}()}function nd(){wu(),Ih(Fc.eq)&&vh()}function rd(e){Vc&&function(){if(Nh(Fc.name)&&Hc.contextualKeyword===Oc._interface){const e=Eh(0);return vh(),_u(),Ah(e),!0}return!!Yc(Oc._enum)&&(id(),!0)}()||(Nh(Fc.at)&&od(),function(e){if($c&&function(){if(Hc.type===Fc._const){const e=Mh();if(e.type===Fc.name&&e.contextualKeyword===Oc._enum)return ah(Fc._const),eh(Oc._enum),Hc.tokens[Hc.tokens.length-1].type=Fc._enum,kp(),!0}return!1}())return;const t=Hc.type;switch(t){case Fc._break:case Fc._continue:return vh(),void(nh()||(wu(),rh()));case Fc._debugger:return vh(),void rh();case Fc._do:return vh(),rd(!1),ah(Fc._while),cu(),void Ih(Fc.semi);case Fc._for:return void function(){Hc.scopeDepth++;const e=Hc.tokens.length;!function(){vh();let e=!1;Yc(Oc._await)&&(e=!0,vh());if(ah(Fc.parenL),Nh(Fc.semi))return e&&oh(),void dd();const t=ad();if(t||Nh(Fc._var)||Nh(Fc._let)||Nh(Fc._const)||function(){if(!Yc(Oc._using))return!1;if(Qc(Oc._of))return!1;return!0}())return t&&eh(Oc._await),vh(),md(!0,Hc.type!==Fc._var),Nh(Fc._in)||Yc(Oc._of)?void fd(e):void dd();if(Kp(!0),Nh(Fc._in)||Yc(Oc._of))return void fd(e);e&&oh();dd()}();const t=Hc.tokens.length;Hc.scopes.push(new Bc(e,t,!1)),Hc.scopeDepth--}();case Fc._function:if(Lh()===Fc.dot)break;return e||oh(),void function(){const e=Hc.start;vh(),xd(e,!0)}();case Fc._class:return e||oh(),void kd(!0);case Fc._if:return vh(),cu(),rd(!1),void(Ih(Fc._else)&&rd(!1));case Fc._return:return vh(),void(nh()||(Kp(),rh()));case Fc._switch:return void function(){vh(),cu(),Hc.scopeDepth++;const e=Hc.tokens.length;ah(Fc.braceL);for(;!Nh(Fc.braceR)&&!Hc.error;)if(Nh(Fc._case)||Nh(Fc._default)){const e=Nh(Fc._case);vh(),e&&Kp(),ah(Fc.colon)}else rd(!0);vh();const t=Hc.tokens.length;Hc.scopes.push(new Bc(e,t,!1)),Hc.scopeDepth--}();case Fc._throw:return vh(),Kp(),void rh();case Fc._try:return void function(){if(vh(),pd(),Nh(Fc._catch)){vh();let e=null;if(Nh(Fc.parenL)&&(Hc.scopeDepth++,e=Hc.tokens.length,ah(Fc.parenL),Ol(!0),$c&&up(),ah(Fc.parenR)),pd(),null!=e){const t=Hc.tokens.length;Hc.scopes.push(new Bc(e,t,!1)),Hc.scopeDepth--}}Ih(Fc._finally)&&pd()}();case Fc._let:case Fc._const:e||oh();case Fc._var:return void ld(t!==Fc._var);case Fc._while:return vh(),cu(),void rd(!1);case Fc.braceL:return void pd();case Fc.semi:return void vh();case Fc._export:case Fc._import:{const e=Lh();if(e===Fc.parenL||e===Fc.dot)break;return vh(),void(t===Fc._import?Md():Ed())}case Fc.name:if(Hc.contextualKeyword===Oc._async){const e=Hc.start,t=Hc.snapshot();if(vh(),Nh(Fc._function)&&!th())return ah(Fc._function),void xd(e,!0);Hc.restoreFromSnapshot(t)}else{if(Hc.contextualKeyword===Oc._using&&!ih()&&Lh()===Fc.name)return void ld(!0);if(ad())return eh(Oc._await),void ld(!0)}}const s=Hc.tokens.length;Kp();let i=null;if(Hc.tokens.length===s+1){const e=Hc.tokens[Hc.tokens.length-1];e.type===Fc.name&&(i=e.contextualKeyword)}if(null==i)return void rh();Ih(Fc.colon)?rd(!0):(n=i,$c?function(e){Cp(e)||rh()}(n):Vc?function(e){if(e===Oc._declare){if(Nh(Fc._class)||Nh(Fc.name)||Nh(Fc._function)||Nh(Fc._var)||Nh(Fc._export)){const e=Eh(1);Eu(),Ah(e)}}else if(Nh(Fc.name))if(e===Oc._interface){const e=Eh(1);_u(),Ah(e)}else if(e===Oc._type){const e=Eh(1);Lu(),Ah(e)}else if(e===Oc._opaque){const e=Eh(1);Du(!1),Ah(e)}rh()}(n):rh());var n}(e))}function ad(){if(!Yc(Oc._await))return!1;const e=Hc.snapshot();return vh(),!Yc(Oc._using)||sh()?(Hc.restoreFromSnapshot(e),!1):(vh(),!Nh(Fc.name)||sh()?(Hc.restoreFromSnapshot(e),!1):(Hc.restoreFromSnapshot(e),!0))}function od(){for(;Nh(Fc.at);)cd()}function cd(){if(vh(),Ih(Fc.parenL))Kp(),ah(Fc.parenR);else{for(wu();Ih(Fc.dot);)wu();$c?((Nh(Fc.lessThan)||Nh(Fc.bitShiftL))&&Ip(),hd()):hd()}}function hd(){Ih(Fc.parenL)&&iu()}function ld(e){vh(),md(!1,e),rh()}function pd(e=!1,t=0){const s=Hc.tokens.length;Hc.scopeDepth++,ah(Fc.braceL),t&&(Hc.tokens[Hc.tokens.length-1].contextId=t),ud(Fc.braceR),t&&(Hc.tokens[Hc.tokens.length-1].contextId=t);const i=Hc.tokens.length;Hc.scopes.push(new Bc(s,i,e)),Hc.scopeDepth--}function ud(e){for(;!Ih(e)&&!Hc.error;)rd(!0)}function dd(){ah(Fc.semi),Nh(Fc.semi)||Kp(),ah(Fc.semi),Nh(Fc.parenR)||Kp(),ah(Fc.parenR),rd(!1)}function fd(e){e?Zc(Oc._of):vh(),Kp(),ah(Fc.parenR),rd(!1)}function md(e,t){for(;;){if(yd(t),Ih(Fc.eq)){const t=Hc.tokens.length-1;zp(e),Hc.tokens[t].rhsEndIndex=Hc.tokens.length}if(!Ih(Fc.comma))break}}function yd(e){Ol(e),$c?function(){const e=Eh(0);sh()||Ih(Fc.bang),up(),Ah(e)}():Vc&&Nh(Fc.colon)&&Zu()}function xd(e,t,s=!1){Nh(Fc.star)&&vh(),!t||s||Nh(Fc.name)||Nh(Fc._yield)||oh();let i=null;Nh(Fc.name)&&(t||(i=Hc.tokens.length,Hc.scopeDepth++),Ll(!1));const n=Hc.tokens.length;Hc.scopeDepth++,gd(),ku(e);const r=Hc.tokens.length;Hc.scopes.push(new Bc(n,r,!0)),Hc.scopeDepth--,null!==i&&(Hc.scopes.push(new Bc(i,r,!0)),Hc.scopeDepth--)}function gd(e=!1,t=0){$c?Jl():Vc&&function(){if(Nh(Fc.lessThan)){const e=Eh(0);Ou(),Ah(e)}}(),ah(Fc.parenL),t&&(Hc.tokens[Hc.tokens.length-1].contextId=t),Fl(Fc.parenR,!1,!1,e,t),t&&(Hc.tokens[Hc.tokens.length-1].contextId=t)}function kd(e,t=!1){const s=Jc();vh(),Hc.tokens[Hc.tokens.length-1].contextId=s,Hc.tokens[Hc.tokens.length-1].isExpression=!e;let i=null;e||(i=Hc.tokens.length,Hc.scopeDepth++),function(e,t=!1){if($c&&(!e||t)&&Yc(Oc._implements))return;Nh(Fc.name)&&Ll(!0);$c?Jl():Vc&&Nh(Fc.lessThan)&&Ou()}(e,t),function(){let e=!1;Ih(Fc._extends)?(Yp(),e=!0):e=!1;$c?function(e){if(e&&(Nh(Fc.lessThan)||Nh(Fc.bitShiftL))&&Ip(),Zc(Oc._implements)){Hc.tokens[Hc.tokens.length-1].type=Fc._implements;const e=Eh(1);yp(),Ah(e)}}(e):Vc&&function(e){if(e&&Nh(Fc.lessThan)&&Fu(),Yc(Oc._implements)){const e=Eh(0);vh(),Hc.tokens[Hc.tokens.length-1].type=Fc._implements;do{Nu(),Nh(Fc.lessThan)&&Fu()}while(Ih(Fc.comma));Ah(e)}}(e)}();const n=Hc.tokens.length;if(function(e){ah(Fc.braceL);for(;!Ih(Fc.braceR)&&!Hc.error;){if(Ih(Fc.semi))continue;if(Nh(Fc.at)){cd();continue}Sd(Hc.start,e)}}(s),!Hc.error&&(Hc.tokens[n].contextId=s,Hc.tokens[Hc.tokens.length-1].contextId=s,null!==i)){const e=Hc.tokens.length;Hc.scopes.push(new Bc(i,e,!1)),Hc.scopeDepth--}}function Td(){return Nh(Fc.eq)||Nh(Fc.semi)||Nh(Fc.braceR)||Nh(Fc.bang)||Nh(Fc.colon)}function bd(){return Nh(Fc.parenL)||Nh(Fc.lessThan)}function Sd(e,t){$c&&$l([Oc._declare,Oc._public,Oc._protected,Oc._private,Oc._override]);let s=!1;if(Nh(Fc.name)&&Hc.contextualKeyword===Oc._static){if(wu(),bd())return void wd(e,!1);if(Td())return void Pd();if(Hc.tokens[Hc.tokens.length-1].type=Fc._static,s=!0,Nh(Fc.braceL))return Hc.tokens[Hc.tokens.length-1].contextId=t,void pd()}!function(e,t,s){if($c&&function(e){const t=Hc.tokens.length;$l([Oc._abstract,Oc._readonly,Oc._declare,Oc._static,Oc._override]);const s=Hc.tokens.length;if(Ql()){for(let i=e?t-1:t;i<s;i++)Hc.tokens[i].isType=!0;return!0}return!1}(t))return;if(Ih(Fc.star))return vd(s),void wd(e,!1);vd(s);let i=!1;const n=Hc.tokens[Hc.tokens.length-1];n.contextualKeyword===Oc._constructor&&(i=!0);if(Cd(),bd())wd(e,i);else if(Td())Pd();else if(n.contextualKeyword!==Oc._async||nh())n.contextualKeyword!==Oc._get&&n.contextualKeyword!==Oc._set||nh()&&Nh(Fc.star)?n.contextualKeyword!==Oc._accessor||nh()?nh()?Pd():oh():(vd(s),Pd()):(n.contextualKeyword===Oc._get?Hc.tokens[Hc.tokens.length-1].type=Fc._get:Hc.tokens[Hc.tokens.length-1].type=Fc._set,vd(s),wd(e,!1));else{Hc.tokens[Hc.tokens.length-1].type=Fc._async;Nh(Fc.star)&&vh(),vd(s),Cd(),wd(e,!1)}}(e,s,t)}function wd(e,t){$c?Jl():Vc&&Nh(Fc.lessThan)&&Ou(),xu(e,t)}function vd(e){yu(e)}function Cd(){if($c){const e=Eh(0);Ih(Fc.question),Ah(e)}}function Pd(){if($c?(_h(Fc.bang),up()):Vc&&Nh(Fc.colon)&&Zu(),Nh(Fc.eq)){const e=Hc.tokens.length;vh(),zp(),Hc.tokens[e].rhsEndIndex=Hc.tokens.length}rh()}function Ed(){const e=Hc.tokens.length-1;$c&&function(){if(Ih(Fc._import))return Yc(Oc._type)&&Lh()!==Fc.eq&&eh(Oc._type),wp(),!0;if(Ih(Fc.eq))return Kp(),rh(),!0;if(Zc(Oc._as))return eh(Oc._namespace),wu(),rh(),!0;if(Yc(Oc._type)){const e=Lh();e!==Fc.braceL&&e!==Fc.star||vh()}return!1}()||((Vc?Nh(Fc.star)||Yc(Oc._type)&&Lh()===Fc.star:Nh(Fc.star))?Vc?function(){if(Zc(Oc._type)){const e=Eh(2);_d(),Ah(e)}else _d()}():_d():function(){if($c&&Np())return!1;if(Vc&&Nh(Fc.name)&&(Hc.contextualKeyword===Oc._type||Hc.contextualKeyword===Oc._interface||Hc.contextualKeyword===Oc._opaque||Hc.contextualKeyword===Oc._enum))return!1;if(Nh(Fc.name))return Hc.contextualKeyword!==Oc._async;if(!Nh(Fc._default))return!1;const e=Oh(),t=Mh(),s=t.type===Fc.name&&t.contextualKeyword===Oc._from;if(t.type===Fc.comma)return!0;if(s){const t=Kc.charCodeAt(Fh(e+4));return t===Rc.quotationMark||t===Rc.apostrophe}return!1}()?(wu(),Nh(Fc.comma)&&Lh()===Fc.star?(ah(Fc.comma),ah(Fc.star),eh(Oc._as),wu()):Ad(),Id()):Ih(Fc._default)?function(){if($c&&function(){if(Yc(Oc._abstract)&&Lh()===Fc._class)return Hc.type=Fc._abstract,vh(),kd(!0,!0),!0;if(Yc(Oc._interface)){const e=Eh(2);return Pp(Oc._interface,!0),Ah(e),!0}return!1}())return;if(Vc&&Yc(Oc._enum)&&(id(),1))return;const e=Hc.start;Ih(Fc._function)?xd(e,!0,!0):Yc(Oc._async)&&Lh()===Fc._function?(Zc(Oc._async),Ih(Fc._function),xd(e,!0,!0)):Nh(Fc._class)?kd(!0,!0):Nh(Fc.at)?(od(),kd(!0,!0)):(zp(),rh())}():$c&&Np()||Vc&&(Yc(Oc._type)||Yc(Oc._interface)||Yc(Oc._opaque)||Yc(Oc._enum))||Hc.type===Fc._var||Hc.type===Fc._const||Hc.type===Fc._let||Hc.type===Fc._function||Hc.type===Fc._class||Yc(Oc._async)||Nh(Fc.at)?$c?function(){const e=Zc(Oc._declare);e&&(Hc.tokens[Hc.tokens.length-1].type=Fc._declare);let t=!1;if(Nh(Fc.name))if(e){const e=Eh(2);t=vp(),Ah(e)}else t=vp();if(!t)if(e){const e=Eh(2);rd(!0),Ah(e)}else rd(!0)}():Vc?function(){if(Yc(Oc._type)){const e=Eh(1);vh(),Nh(Fc.braceL)?(Nd(),Id()):Lu(),Ah(e)}else if(Yc(Oc._opaque)){const e=Eh(1);vh(),Du(!1),Ah(e)}else if(Yc(Oc._interface)){const e=Eh(1);vh(),_u(),Ah(e)}else rd(!0)}():rd(!0):(Nd(),Id()),Hc.tokens[e].rhsEndIndex=Hc.tokens.length)}function Ad(){Ih(Fc.comma)&&Nd()}function Id(){Zc(Oc._from)&&(ru(),Rd()),rh()}function _d(){ah(Fc.star),Yc(Oc._as)?(vh(),Hc.tokens[Hc.tokens.length-1].type=Fc._as,wu(),Ad(),Id()):Id()}function Nd(){let e=!0;for(ah(Fc.braceL);!Ih(Fc.braceR)&&!Hc.error;){if(e)e=!1;else if(ah(Fc.comma),Ih(Fc.braceR))break;Ld()}}function Ld(){$c?function(){if(wu(),Nh(Fc.comma)||Nh(Fc.braceR))Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ExportAccess;else{if(wu(),Nh(Fc.comma)||Nh(Fc.braceR))return Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ExportAccess,Hc.tokens[Hc.tokens.length-2].isType=!0,void(Hc.tokens[Hc.tokens.length-1].isType=!0);wu(),Nh(Fc.comma)||Nh(Fc.braceR)?Hc.tokens[Hc.tokens.length-3].identifierRole=mh.ExportAccess:(wu(),Hc.tokens[Hc.tokens.length-3].identifierRole=mh.ExportAccess,Hc.tokens[Hc.tokens.length-4].isType=!0,Hc.tokens[Hc.tokens.length-3].isType=!0,Hc.tokens[Hc.tokens.length-2].isType=!0,Hc.tokens[Hc.tokens.length-1].isType=!0)}}():(wu(),Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ExportAccess,Zc(Oc._as)&&wu())}function Dd(){Yc(Oc._module)&&function(){const e=Hc.snapshot();return eh(Oc._module),Zc(Oc._from)?Yc(Oc._from)?(Hc.restoreFromSnapshot(e),!0):(Hc.restoreFromSnapshot(e),!1):Nh(Fc.comma)?(Hc.restoreFromSnapshot(e),!1):(Hc.restoreFromSnapshot(e),!0)}()&&vh()}function Md(){if($c&&Nh(Fc.name)&&Lh()===Fc.eq)wp();else{if($c&&Yc(Oc._type)){const e=Mh();if(e.type===Fc.name&&e.contextualKeyword!==Oc._from){if(eh(Oc._type),Lh()===Fc.eq)return void wp()}else e.type!==Fc.star&&e.type!==Fc.braceL||eh(Oc._type)}Nh(Fc.string)||(Dd(),function(){Vc&&sd();let e=!0;if(Nh(Fc.name)&&(Od(),!Ih(Fc.comma)))return;if(Nh(Fc.star))return vh(),eh(Oc._as),void Od();ah(Fc.braceL);for(;!Ih(Fc.braceR)&&!Hc.error;){if(e)e=!1;else if(Ih(Fc.colon)&&oh("ES2015 named imports do not destructure. Use another statement for destructuring after the import."),ah(Fc.comma),Ih(Fc.braceR))break;Fd()}}(),eh(Oc._from)),ru(),Rd(),rh()}}function Od(){Dl()}function Fd(){$c?function(){if(wu(),Nh(Fc.comma)||Nh(Fc.braceR))Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ImportDeclaration;else{if(wu(),Nh(Fc.comma)||Nh(Fc.braceR))return Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ImportDeclaration,Hc.tokens[Hc.tokens.length-2].isType=!0,void(Hc.tokens[Hc.tokens.length-1].isType=!0);if(wu(),Nh(Fc.comma)||Nh(Fc.braceR))return Hc.tokens[Hc.tokens.length-3].identifierRole=mh.ImportAccess,void(Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ImportDeclaration);wu(),Hc.tokens[Hc.tokens.length-3].identifierRole=mh.ImportAccess,Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ImportDeclaration,Hc.tokens[Hc.tokens.length-4].isType=!0,Hc.tokens[Hc.tokens.length-3].isType=!0,Hc.tokens[Hc.tokens.length-2].isType=!0,Hc.tokens[Hc.tokens.length-1].isType=!0}}():Vc?function(){const e=Hc.contextualKeyword===Oc._type||Hc.type===Fc._typeof;e?vh():wu(),Yc(Oc._as)&&!Qc(Oc._as)?(wu(),(!e||Nh(Fc.name)||Hc.type&Fc.IS_KEYWORD)&&wu()):(e&&(Nh(Fc.name)||Hc.type&Fc.IS_KEYWORD)&&wu(),Zc(Oc._as)&&wu())}():(Dl(),Yc(Oc._as)&&(Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ImportAccess,vh(),Dl()))}function Rd(){(Nh(Fc._with)||Yc(Oc._assert)&&!sh())&&(vh(),du(!1,!1))}function Bd(){return 0===Hc.pos&&Kc.charCodeAt(0)===Rc.numberSign&&Kc.charCodeAt(1)===Rc.exclamationMark&&Uh(2),Bh(),function(){if(ud(Fc.eof),Hc.scopes.push(new Bc(0,Hc.tokens.length,!0)),0!==Hc.scopeDepth)throw new Error(`Invalid scope depth at end of file: ${Hc.scopeDepth}`);return new jd(Hc.tokens,Hc.scopes)}()}class jd{constructor(e,t){this.tokens=e,this.scopes=t}}class Ud{__init(){this.resultCode=""}__init2(){this.resultMappings=new Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(e,t,s,i,n){this.code=e,this.tokens=t,this.isFlowEnabled=s,this.disableESTransforms=i,this.helperManager=n,Ud.prototype.__init.call(this),Ud.prototype.__init2.call(this),Ud.prototype.__init3.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(e){this.resultCode=e.resultCode,this.tokenIndex=e.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(e){const t=this.resultCode.slice(e.resultCode.length);return this.resultCode=e.resultCode,t}reset(){this.resultCode="",this.resultMappings=new Array(this.tokens.length),this.tokenIndex=0}matchesContextualAtIndex(e,t){return this.matches1AtIndex(e,Fc.name)&&this.tokens[e].contextualKeyword===t}identifierNameAtIndex(e){return this.identifierNameForToken(this.tokens[e])}identifierNameAtRelativeIndex(e){return this.identifierNameForToken(this.tokenAtRelativeIndex(e))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(e){return this.code.slice(e.start,e.end)}rawCodeForToken(e){return this.code.slice(e.start,e.end)}stringValueAtIndex(e){return this.stringValueForToken(this.tokens[e])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(e){return this.code.slice(e.start+1,e.end-1)}matches1AtIndex(e,t){return this.tokens[e].type===t}matches2AtIndex(e,t,s){return this.tokens[e].type===t&&this.tokens[e+1].type===s}matches3AtIndex(e,t,s,i){return this.tokens[e].type===t&&this.tokens[e+1].type===s&&this.tokens[e+2].type===i}matches1(e){return this.tokens[this.tokenIndex].type===e}matches2(e,t){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t}matches3(e,t,s){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===s}matches4(e,t,s,i){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===s&&this.tokens[this.tokenIndex+3].type===i}matches5(e,t,s,i,n){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===s&&this.tokens[this.tokenIndex+3].type===i&&this.tokens[this.tokenIndex+4].type===n}matchesContextual(e){return this.matchesContextualAtIndex(this.tokenIndex,e)}matchesContextIdAndLabel(e,t){return this.matches1(e)&&this.currentToken().contextId===t}previousWhitespaceAndComments(){let e=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(e=e.replace(/@flow/g,"")),e}replaceToken(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(e){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\r\n]/g,""),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken("")}removeToken(){this.replaceTokenTrimmingLeftWhitespace("")}removeBalancedCode(){let e=0;for(;!this.isAtEnd();){if(this.matches1(Fc.braceL))e++;else if(this.matches1(Fc.braceR)){if(0===e)return;e--}this.removeToken()}}copyExpectedToken(e){if(this.tokens[this.tokenIndex].type!==e)throw new Error(`Expected token ${e}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=e,this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){const e=this.currentToken();if((e.numNullishCoalesceStarts||e.isOptionalChainStart)&&(e.isAsyncOperation=function(e){let t=e.currentIndex(),s=0;const i=e.currentToken();do{const n=e.tokens[t];if(n.isOptionalChainStart&&s++,n.isOptionalChainEnd&&s--,s+=n.numNullishCoalesceStarts,s-=n.numNullishCoalesceEnds,n.contextualKeyword===Oc._await&&null==n.identifierRole&&n.scopeDepth===i.scopeDepth)return!0;t+=1}while(s>0&&t<e.tokens.length);return!1}(this)),!this.disableESTransforms){if(e.numNullishCoalesceStarts)for(let t=0;t<e.numNullishCoalesceStarts;t++)e.isAsyncOperation?(this.resultCode+="await ",this.resultCode+=this.helperManager.getHelperName("asyncNullishCoalesce")):this.resultCode+=this.helperManager.getHelperName("nullishCoalesce"),this.resultCode+="(";e.isOptionalChainStart&&(e.isAsyncOperation&&(this.resultCode+="await "),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===Fc._delete?e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChainDelete"):this.resultCode+=this.helperManager.getHelperName("optionalChainDelete"):e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChain"):this.resultCode+=this.helperManager.getHelperName("optionalChain"),this.resultCode+="([")}}appendTokenSuffix(){const e=this.currentToken();if(e.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+="])"),e.numNullishCoalesceEnds&&!this.disableESTransforms)for(let t=0;t<e.numNullishCoalesceEnds;t++)this.resultCode+="))"}appendCode(e){this.resultCode+=e}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){const e=this.currentToken();return this.code.slice(e.start,e.end)}tokenAtRelativeIndex(e){return this.tokens[this.tokenIndex+e]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw new Error("Unexpectedly reached end of input.");this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw new Error("Tried to finish processing tokens before reaching the end.");return this.resultCode+=this.previousWhitespaceAndComments(),{code:this.resultCode,mappings:this.resultMappings}}isAtEnd(){return this.tokenIndex===this.tokens.length}}function qd(e,t,s,i){const n=t.snapshot(),r=function(e){const t=e.currentToken(),s=t.contextId;if(null==s)throw new Error("Expected context ID on class token.");const i=t.isExpression;if(null==i)throw new Error("Expected isExpression on class token.");let n=null,r=!1;e.nextToken(),e.matches1(Fc.name)&&(n=e.identifierName());for(;!e.matchesContextIdAndLabel(Fc.braceL,s);)e.matches1(Fc._extends)&&!e.currentToken().isType&&(r=!0),e.nextToken();return{isExpression:i,className:n,hasSuperclass:r}}(t);let a=[];const o=[],c=[];let h=null;const l=[],p=[],u=t.currentToken().contextId;if(null==u)throw new Error("Expected non-null class context ID on class open-brace.");for(t.nextToken();!t.matchesContextIdAndLabel(Fc.braceR,u);)if(t.matchesContextual(Oc._constructor)&&!t.currentToken().isType)({constructorInitializerStatements:a,constructorInsertPos:h}=Vd(t));else if(t.matches1(Fc.semi))i||p.push({start:t.currentIndex(),end:t.currentIndex()+1}),t.nextToken();else if(t.currentToken().isType)t.nextToken();else{const n=t.currentIndex();let r=!1,d=!1,f=!1;for(;Hd(t.currentToken());)t.matches1(Fc._static)&&(r=!0),t.matches1(Fc.hash)&&(d=!0),(t.matches1(Fc._declare)||t.matches1(Fc._abstract))&&(f=!0),t.nextToken();if(r&&t.matches1(Fc.braceL)){$d(t,u);continue}if(d){$d(t,u);continue}if(t.matchesContextual(Oc._constructor)&&!t.currentToken().isType){({constructorInitializerStatements:a,constructorInsertPos:h}=Vd(t));continue}const m=t.currentIndex();if(Kd(t),t.matches1(Fc.lessThan)||t.matches1(Fc.parenL)){$d(t,u);continue}for(;t.currentToken().isType;)t.nextToken();if(t.matches1(Fc.eq)){const i=t.currentIndex(),n=t.currentToken().rhsEndIndex;if(null==n)throw new Error("Expected rhsEndIndex on class field assignment.");for(t.nextToken();t.currentIndex()<n;)e.processToken();let a;r?(a=s.claimFreeName("__initStatic"),c.push(a)):(a=s.claimFreeName("__init"),o.push(a)),l.push({initializerName:a,equalsIndex:i,start:m,end:t.currentIndex()})}else i&&!f||p.push({start:n,end:t.currentIndex()})}return t.restoreToSnapshot(n),i?{headerInfo:r,constructorInitializerStatements:a,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:h,fields:[],rangesToRemove:p}:{headerInfo:r,constructorInitializerStatements:a,instanceInitializerNames:o,staticInitializerNames:c,constructorInsertPos:h,fields:l,rangesToRemove:p}}function $d(e,t){for(e.nextToken();e.currentToken().contextId!==t;)e.nextToken();for(;Hd(e.tokenAtRelativeIndex(-1));)e.previousToken()}function Vd(e){const t=[];e.nextToken();const s=e.currentToken().contextId;if(null==s)throw new Error("Expected context ID on open-paren starting constructor params.");for(;!e.matchesContextIdAndLabel(Fc.parenR,s);)if(e.currentToken().contextId===s){if(e.nextToken(),Hd(e.currentToken())){for(e.nextToken();Hd(e.currentToken());)e.nextToken();const s=e.currentToken();if(s.type!==Fc.name)throw new Error("Expected identifier after access modifiers in constructor arg.");const i=e.identifierNameForToken(s);t.push(`this.${i} = ${i}`)}}else e.nextToken();for(e.nextToken();e.currentToken().isType;)e.nextToken();let i=e.currentIndex(),n=!1;for(;!e.matchesContextIdAndLabel(Fc.braceR,s);){if(!n&&e.matches2(Fc._super,Fc.parenL)){e.nextToken();const t=e.currentToken().contextId;if(null==t)throw new Error("Expected a context ID on the super call");for(;!e.matchesContextIdAndLabel(Fc.parenR,t);)e.nextToken();i=e.currentIndex(),n=!0}e.nextToken()}return e.nextToken(),{constructorInitializerStatements:t,constructorInsertPos:i}}function Hd(e){return[Fc._async,Fc._get,Fc._set,Fc.plus,Fc.minus,Fc._readonly,Fc._static,Fc._public,Fc._private,Fc._protected,Fc._override,Fc._abstract,Fc.star,Fc._declare,Fc.hash].includes(e.type)}function Kd(e){if(e.matches1(Fc.bracketL)){const t=e.currentToken().contextId;if(null==t)throw new Error("Expected class context ID on computed name open bracket.");for(;!e.matchesContextIdAndLabel(Fc.bracketR,t);)e.nextToken();e.nextToken()}else e.nextToken()}function zd(e){if(e.removeInitialToken(),e.removeToken(),e.removeToken(),e.removeToken(),e.matches1(Fc.parenL))e.removeToken(),e.removeToken(),e.removeToken();else for(;e.matches1(Fc.dot);)e.removeToken(),e.removeToken()}const Jd={typeDeclarations:new Set,valueDeclarations:new Set};function Wd(e){const t=new Set,s=new Set;for(let i=0;i<e.tokens.length;i++){const n=e.tokens[i];n.type===Fc.name&&kh(n)&&(n.isType?t.add(e.identifierNameForToken(n)):s.add(e.identifierNameForToken(n)))}return{typeDeclarations:t,valueDeclarations:s}}function Xd(e){let t=e.currentIndex();for(;!e.matches1AtIndex(t,Fc.braceR);)t++;return e.matchesContextualAtIndex(t+1,Oc._from)&&e.matches1AtIndex(t+2,Fc.string)}function Gd(e){(e.matches2(Fc._with,Fc.braceL)||e.matches2(Fc.name,Fc.braceL)&&e.matchesContextual(Oc._assert))&&(e.removeToken(),e.removeToken(),e.removeBalancedCode(),e.removeToken())}function Yd(e,t,s,i){if(!e||t)return!1;const n=s.currentToken();if(null==n.rhsEndIndex)throw new Error("Expected non-null rhsEndIndex on export token.");const r=n.rhsEndIndex-s.currentIndex();if(3!==r&&(4!==r||!s.matches1AtIndex(n.rhsEndIndex-1,Fc.semi)))return!1;const a=s.tokenAtRelativeIndex(2);if(a.type!==Fc.name)return!1;const o=s.identifierNameForToken(a);return i.typeDeclarations.has(o)&&!i.valueDeclarations.has(o)}class Qd extends el{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(e,t,s,i,n,r,a,o,c,h,l,p){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=s,this.nameManager=i,this.helperManager=n,this.reactHotLoaderTransformer=r,this.enableLegacyBabel5ModuleInterop=a,this.enableLegacyTypeScriptModuleInterop=o,this.isTypeScriptTransformEnabled=c,this.isFlowTransformEnabled=h,this.preserveDynamicImport=l,this.keepUnusedImports=p,Qd.prototype.__init.call(this),Qd.prototype.__init2.call(this),Qd.prototype.__init3.call(this),this.declarationInfo=c?Wd(t):Jd}getPrefixCode(){let e="";return this.hadExport&&(e+='Object.defineProperty(exports, "__esModule", {value: true});'),e}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?"\nmodule.exports = exports.default;\n":""}process(){return this.tokens.matches3(Fc._import,Fc.name,Fc.eq)?this.processImportEquals():this.tokens.matches1(Fc._import)?(this.processImport(),!0):this.tokens.matches2(Fc._export,Fc.eq)?(this.tokens.replaceToken("module.exports"),!0):this.tokens.matches1(Fc._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):!(!this.tokens.matches2(Fc.name,Fc.postIncDec)||!this.processPostIncDec())||(this.tokens.matches1(Fc.name)||this.tokens.matches1(Fc.jsxName)?this.processIdentifier():this.tokens.matches1(Fc.eq)?this.processAssignment():this.tokens.matches1(Fc.assign)?this.processComplexAssignment():!!this.tokens.matches1(Fc.preIncDec)&&this.processPreIncDec())}processImportEquals(){const e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.shouldAutomaticallyElideImportedName(e)?zd(this.tokens):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(Fc._import,Fc.parenL)){if(this.preserveDynamicImport)return void this.tokens.copyToken();const e=this.enableLegacyTypeScriptModuleInterop?"":`${this.helperManager.getHelperName("interopRequireWildcard")}(`;this.tokens.replaceToken(`Promise.resolve().then(() => ${e}require`);const t=this.tokens.currentToken().contextId;if(null==t)throw new Error("Expected context ID on dynamic import invocation.");for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(Fc.parenR,t);)this.rootTransformer.processToken();return void this.tokens.replaceToken(e?")))":"))")}if(this.removeImportAndDetectIfShouldElide())this.tokens.removeToken();else{const e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),this.tokens.appendCode(this.importProcessor.claimImportCode(e))}Gd(this.tokens),this.tokens.matches1(Fc.semi)&&this.tokens.removeToken()}removeImportAndDetectIfShouldElide(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(Oc._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,Fc.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,Oc._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(Fc.name)||this.tokens.matches1(Fc.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(Fc.string))return!1;let e=!1,t=!1;for(;!this.tokens.matches1(Fc.string);)(!e&&this.tokens.matches1(Fc.braceL)||this.tokens.matches1(Fc.comma))&&(this.tokens.removeToken(),this.tokens.matches1(Fc.braceR)||(t=!0),(this.tokens.matches2(Fc.name,Fc.comma)||this.tokens.matches2(Fc.name,Fc.braceR)||this.tokens.matches4(Fc.name,Fc.name,Fc.name,Fc.comma)||this.tokens.matches4(Fc.name,Fc.name,Fc.name,Fc.braceR))&&(e=!0)),this.tokens.removeToken();return!this.keepUnusedImports&&(this.isTypeScriptTransformEnabled?!e:!!this.isFlowTransformEnabled&&(t&&!e))}removeRemainingImport(){for(;!this.tokens.matches1(Fc.string);)this.tokens.removeToken()}processIdentifier(){const e=this.tokens.currentToken();if(e.shadowsGlobal)return!1;if(e.identifierRole===mh.ObjectShorthand)return this.processObjectShorthand();if(e.identifierRole!==mh.Access)return!1;const t=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(e));if(!t)return!1;let s=this.tokens.currentIndex()+1;for(;s<this.tokens.tokens.length&&this.tokens.tokens[s].type===Fc.parenR;)s++;return this.tokens.tokens[s].type===Fc.parenL?this.tokens.tokenAtRelativeIndex(1).type===Fc.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==Fc._new?(this.tokens.replaceToken(`${t}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.parenR)):this.tokens.replaceToken(`(0, ${t})`):this.tokens.replaceToken(t),!0}processObjectShorthand(){const e=this.tokens.identifierName(),t=this.importProcessor.getIdentifierReplacement(e);return!!t&&(this.tokens.replaceToken(`${e}: ${t}`),!0)}processExport(){if(this.tokens.matches2(Fc._export,Fc._enum)||this.tokens.matches3(Fc._export,Fc._const,Fc._enum))return this.hadNamedExport=!0,!1;if(this.tokens.matches2(Fc._export,Fc._default))return this.tokens.matches3(Fc._export,Fc._default,Fc._enum)?(this.hadDefaultExport=!0,!1):(this.processExportDefault(),!0);if(this.tokens.matches2(Fc._export,Fc.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(Fc._export,Fc.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,Oc._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(Fc.braceL)){for(;!this.tokens.matches1(Fc.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(Fc._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(Oc._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,Fc.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),Gd(this.tokens)),!0}if(this.hadNamedExport=!0,this.tokens.matches2(Fc._export,Fc._var)||this.tokens.matches2(Fc._export,Fc._let)||this.tokens.matches2(Fc._export,Fc._const))return this.processExportVar(),!0;if(this.tokens.matches2(Fc._export,Fc._function)||this.tokens.matches3(Fc._export,Fc.name,Fc._function))return this.processExportFunction(),!0;if(this.tokens.matches2(Fc._export,Fc._class)||this.tokens.matches3(Fc._export,Fc._abstract,Fc._class)||this.tokens.matches2(Fc._export,Fc.at))return this.processExportClass(),!0;if(this.tokens.matches2(Fc._export,Fc.star))return this.processExportStar(),!0;throw new Error("Unrecognized export syntax.")}processAssignment(){const e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.isType||t.type!==Fc.name)return!1;if(t.shadowsGlobal)return!1;if(e>=2&&this.tokens.matches1AtIndex(e-2,Fc.dot))return!1;if(e>=2&&[Fc._var,Fc._let,Fc._const].includes(this.tokens.tokens[e-2].type))return!1;const s=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return!!s&&(this.tokens.copyToken(),this.tokens.appendCode(` ${s} =`),!0)}processComplexAssignment(){const e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.type!==Fc.name)return!1;if(t.shadowsGlobal)return!1;if(e>=2&&this.tokens.matches1AtIndex(e-2,Fc.dot))return!1;const s=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return!!s&&(this.tokens.appendCode(` = ${s}`),this.tokens.copyToken(),!0)}processPreIncDec(){const e=this.tokens.currentIndex(),t=this.tokens.tokens[e+1];if(t.type!==Fc.name)return!1;if(t.shadowsGlobal)return!1;if(e+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(e+2,Fc.dot)||this.tokens.matches1AtIndex(e+2,Fc.bracketL)||this.tokens.matches1AtIndex(e+2,Fc.parenL)))return!1;const s=this.tokens.identifierNameForToken(t),i=this.importProcessor.resolveExportBinding(s);return!!i&&(this.tokens.appendCode(`${i} = `),this.tokens.copyToken(),!0)}processPostIncDec(){const e=this.tokens.currentIndex(),t=this.tokens.tokens[e],s=this.tokens.tokens[e+1];if(t.type!==Fc.name)return!1;if(t.shadowsGlobal)return!1;if(e>=1&&this.tokens.matches1AtIndex(e-1,Fc.dot))return!1;const i=this.tokens.identifierNameForToken(t),n=this.importProcessor.resolveExportBinding(i);if(!n)return!1;const r=this.tokens.rawCodeForToken(s),a=this.importProcessor.getIdentifierReplacement(i)||i;if("++"===r)this.tokens.replaceToken(`(${a} = ${n} = ${a} + 1, ${a} - 1)`);else{if("--"!==r)throw new Error(`Unexpected operator: ${r}`);this.tokens.replaceToken(`(${a} = ${n} = ${a} - 1, ${a} + 1)`)}return this.tokens.removeToken(),!0}processExportDefault(){let e=!0;if(this.tokens.matches4(Fc._export,Fc._default,Fc._function,Fc.name)||this.tokens.matches5(Fc._export,Fc._default,Fc.name,Fc._function,Fc.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,Oc._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();const e=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${e};`)}else if(this.tokens.matches4(Fc._export,Fc._default,Fc._class,Fc.name)||this.tokens.matches5(Fc._export,Fc._default,Fc._abstract,Fc._class,Fc.name)||this.tokens.matches3(Fc._export,Fc._default,Fc.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(Fc._abstract)&&this.tokens.removeToken();const e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${e};`)}else if(Yd(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))e=!1,this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){const e=this.nameManager.claimFreeName("_default");this.tokens.replaceToken(`let ${e}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e)}else this.tokens.replaceToken("exports."),this.tokens.copyToken(),this.tokens.appendCode(" =");e&&(this.hadDefaultExport=!0)}copyDecorators(){for(;this.tokens.matches1(Fc.at);)if(this.tokens.copyToken(),this.tokens.matches1(Fc.parenL))this.tokens.copyExpectedToken(Fc.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.parenR);else{for(this.tokens.copyExpectedToken(Fc.name);this.tokens.matches1(Fc.dot);)this.tokens.copyExpectedToken(Fc.dot),this.tokens.copyExpectedToken(Fc.name);this.tokens.matches1(Fc.parenL)&&(this.tokens.copyExpectedToken(Fc.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.parenR))}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let e=this.tokens.currentIndex();if(e++,e++,!this.tokens.matches1AtIndex(e,Fc.name))return!1;for(e++;e<this.tokens.tokens.length&&this.tokens.tokens[e].isType;)e++;return!!this.tokens.matches1AtIndex(e,Fc.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();const e=this.tokens.identifierName();for(;!this.tokens.matches1(Fc.eq);)this.rootTransformer.processToken();const t=this.tokens.currentToken().rhsEndIndex;if(null==t)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<t;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${e} = ${e}`)}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();const e=this.tokens.matches1(Fc.braceL);e&&this.tokens.appendCode("(");let t=0;for(;;)if(this.tokens.matches1(Fc.braceL)||this.tokens.matches1(Fc.dollarBraceL)||this.tokens.matches1(Fc.bracketL))t++,this.tokens.copyToken();else if(this.tokens.matches1(Fc.braceR)||this.tokens.matches1(Fc.bracketR))t--,this.tokens.copyToken();else{if(0===t&&!this.tokens.matches1(Fc.name)&&!this.tokens.currentToken().isType)break;if(this.tokens.matches1(Fc.eq)){const e=this.tokens.currentToken().rhsEndIndex;if(null==e)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}else{const e=this.tokens.currentToken();if(xh(e)){const t=this.tokens.identifierName();let s=this.importProcessor.getIdentifierReplacement(t);if(null===s)throw new Error(`Expected a replacement for ${t} in \`export var\` syntax.`);Sh(e)&&(s=`${t}: ${s}`),this.tokens.replaceToken(s)}else this.rootTransformer.processToken()}}if(e){const e=this.tokens.currentToken().rhsEndIndex;if(null==e)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken();this.tokens.appendCode(")")}}processExportFunction(){this.tokens.replaceToken("");const e=this.processNamedFunction();this.tokens.appendCode(` exports.${e} = ${e};`)}processNamedFunction(){if(this.tokens.matches1(Fc._function))this.tokens.copyToken();else if(this.tokens.matches2(Fc.name,Fc._function)){if(!this.tokens.matchesContextual(Oc._async))throw new Error("Expected async keyword in function export.");this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(Fc.star)&&this.tokens.copyToken(),!this.tokens.matches1(Fc.name))throw new Error("Expected identifier for exported function name.");const e=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(Fc.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(Fc.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.braceR),e}processExportClass(){this.tokens.removeInitialToken(),this.copyDecorators(),this.tokens.matches1(Fc._abstract)&&this.tokens.removeToken();const e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${e} = ${e};`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();const e=Xd(this.tokens),t=[];for(;;){if(this.tokens.matches1(Fc.braceR)){this.tokens.removeToken();break}const s=Xh(this.tokens);for(;this.tokens.currentIndex()<s.endIndex;)this.tokens.removeToken();if(!(s.isType||!e&&this.shouldElideExportedIdentifier(s.leftName))){const e=s.rightName;"default"===e?this.hadDefaultExport=!0:this.hadNamedExport=!0;const i=s.leftName,n=this.importProcessor.getIdentifierReplacement(i);t.push(`exports.${e} = ${n||i};`)}if(this.tokens.matches1(Fc.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(Fc.comma,Fc.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}if(!this.tokens.matches1(Fc.comma))throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`);this.tokens.removeToken()}if(this.tokens.matchesContextual(Oc._from)){this.tokens.removeToken();const e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),Gd(this.tokens)}else this.tokens.appendCode(t.join(" "));this.tokens.matches1(Fc.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(Fc.string);)this.tokens.removeToken();const e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),Gd(this.tokens),this.tokens.matches1(Fc.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.declarationInfo.valueDeclarations.has(e)}}class Zd extends el{constructor(e,t,s,i,n,r,a,o){super(),this.tokens=e,this.nameManager=t,this.helperManager=s,this.reactHotLoaderTransformer=i,this.isTypeScriptTransformEnabled=n,this.isFlowTransformEnabled=r,this.keepUnusedImports=a,this.nonTypeIdentifiers=n&&!a?ol(e,o):new Set,this.declarationInfo=n&&!a?Wd(e):Jd,this.injectCreateRequireForImportRequire=Boolean(o.injectCreateRequireForImportRequire)}process(){if(this.tokens.matches3(Fc._import,Fc.name,Fc.eq))return this.processImportEquals();if(this.tokens.matches4(Fc._import,Fc.name,Fc.name,Fc.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,Oc._type)){this.tokens.removeInitialToken();for(let e=0;e<7;e++)this.tokens.removeToken();return!0}if(this.tokens.matches2(Fc._export,Fc.eq))return this.tokens.replaceToken("module.exports"),!0;if(this.tokens.matches5(Fc._export,Fc._import,Fc.name,Fc.name,Fc.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,Oc._type)){this.tokens.removeInitialToken();for(let e=0;e<8;e++)this.tokens.removeToken();return!0}if(this.tokens.matches1(Fc._import))return this.processImport();if(this.tokens.matches2(Fc._export,Fc._default))return this.processExportDefault();if(this.tokens.matches2(Fc._export,Fc.braceL))return this.processNamedExports();if(this.tokens.matches2(Fc._export,Fc.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,Oc._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(Fc.braceL)){for(;!this.tokens.matches1(Fc.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(Fc._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(Oc._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,Fc.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),Gd(this.tokens)),!0}return!1}processImportEquals(){const e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.shouldAutomaticallyElideImportedName(e)?zd(this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken("const"),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName("require"))):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(Fc._import,Fc.parenL))return!1;const e=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(e);!this.tokens.matches1(Fc.string);)this.tokens.removeToken();this.tokens.removeToken(),Gd(this.tokens),this.tokens.matches1(Fc.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(Fc._import),this.tokens.matchesContextual(Oc._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,Fc.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,Oc._from))return!0;if(this.tokens.matches1(Fc.string))return this.tokens.copyToken(),!1;this.tokens.matchesContextual(Oc._module)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,Oc._from)&&this.tokens.copyToken();let e=!1,t=!1,s=!1;if(this.tokens.matches1(Fc.name)&&(this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(Fc.comma)&&this.tokens.removeToken()):(e=!0,this.tokens.copyToken(),this.tokens.matches1(Fc.comma)&&(s=!0,this.tokens.removeToken()))),this.tokens.matches1(Fc.star))this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(s&&this.tokens.appendCode(","),e=!0,this.tokens.copyExpectedToken(Fc.star),this.tokens.copyExpectedToken(Fc.name),this.tokens.copyExpectedToken(Fc.name));else if(this.tokens.matches1(Fc.braceL)){for(s&&this.tokens.appendCode(","),this.tokens.copyToken();!this.tokens.matches1(Fc.braceR);){t=!0;const s=Xh(this.tokens);if(s.isType||this.shouldAutomaticallyElideImportedName(s.rightName)){for(;this.tokens.currentIndex()<s.endIndex;)this.tokens.removeToken();this.tokens.matches1(Fc.comma)&&this.tokens.removeToken()}else{for(e=!0;this.tokens.currentIndex()<s.endIndex;)this.tokens.copyToken();this.tokens.matches1(Fc.comma)&&this.tokens.copyToken()}}this.tokens.copyExpectedToken(Fc.braceR)}return!this.keepUnusedImports&&(this.isTypeScriptTransformEnabled?!e:!!this.isFlowTransformEnabled&&(t&&!e))}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}processExportDefault(){if(Yd(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(Fc._export,Fc._default,Fc._function,Fc.name)||this.tokens.matches5(Fc._export,Fc._default,Fc.name,Fc._function,Fc.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,Oc._async)||this.tokens.matches4(Fc._export,Fc._default,Fc._class,Fc.name)||this.tokens.matches5(Fc._export,Fc._default,Fc._abstract,Fc._class,Fc.name))&&this.reactHotLoaderTransformer){const e=this.nameManager.claimFreeName("_default");return this.tokens.replaceToken(`let ${e}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e),!0}return!1}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;this.tokens.copyExpectedToken(Fc._export),this.tokens.copyExpectedToken(Fc.braceL);const e=Xd(this.tokens);let t=!1;for(;!this.tokens.matches1(Fc.braceR);){const s=Xh(this.tokens);if(s.isType||!e&&this.shouldElideExportedName(s.leftName)){for(;this.tokens.currentIndex()<s.endIndex;)this.tokens.removeToken();this.tokens.matches1(Fc.comma)&&this.tokens.removeToken()}else{for(t=!0;this.tokens.currentIndex()<s.endIndex;)this.tokens.copyToken();this.tokens.matches1(Fc.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(Fc.braceR),this.keepUnusedImports||!e||t||(this.tokens.removeToken(),this.tokens.removeToken(),Gd(this.tokens)),!0}shouldElideExportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&this.declarationInfo.typeDeclarations.has(e)&&!this.declarationInfo.valueDeclarations.has(e)}}class ef extends el{constructor(e,t,s){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=s}process(){return!!(this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange())||(this.tokens.matches1(Fc._enum)?(this.processEnum(),!0):this.tokens.matches2(Fc._export,Fc._enum)?(this.processNamedExportEnum(),!0):!!this.tokens.matches3(Fc._export,Fc._default,Fc._enum)&&(this.processDefaultExportEnum(),!0))}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();const e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${e} = ${e};`)}else this.tokens.copyToken(),this.processEnum()}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();const e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${e};`):this.tokens.appendCode(` export default ${e};`)}processEnum(){this.tokens.replaceToken("const"),this.tokens.copyExpectedToken(Fc.name);let e=!1;this.tokens.matchesContextual(Oc._of)&&(this.tokens.removeToken(),e=this.tokens.matchesContextual(Oc._symbol),this.tokens.removeToken());const t=this.tokens.matches3(Fc.braceL,Fc.name,Fc.eq);this.tokens.appendCode(' = require("flow-enums-runtime")');const s=!e&&!t;for(this.tokens.replaceTokenTrimmingLeftWhitespace(s?".Mirrored([":"({");!this.tokens.matches1(Fc.braceR);){if(this.tokens.matches1(Fc.ellipsis)){this.tokens.removeToken();break}this.processEnumElement(e,t),this.tokens.matches1(Fc.comma)&&this.tokens.copyToken()}this.tokens.replaceToken(s?"]);":"});")}processEnumElement(e,t){if(e){const e=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${e}")`)}else t?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(":"),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`)}}const tf="jest",sf=["mock","unmock","enableAutomock","disableAutomock"];class nf extends el{__init(){this.hoistedFunctionNames=[]}constructor(e,t,s,i){super(),this.rootTransformer=e,this.tokens=t,this.nameManager=s,this.importProcessor=i,nf.prototype.__init.call(this)}process(){return!(0!==this.tokens.currentToken().scopeDepth||!this.tokens.matches4(Fc.name,Fc.dot,Fc.name,Fc.parenL)||this.tokens.identifierName()!==tf)&&(!function(e){let t,s=e[0],i=1;for(;i<e.length;){const n=e[i],r=e[i+1];if(i+=2,("optionalAccess"===n||"optionalCall"===n)&&null==s)return;"access"===n||"optionalAccess"===n?(t=s,s=r(s)):"call"!==n&&"optionalCall"!==n||(s=r((...e)=>s.call(t,...e)),t=void 0)}return s}([this,"access",e=>e.importProcessor,"optionalAccess",e=>e.getGlobalNames,"call",e=>e(),"optionalAccess",e=>e.has,"call",e=>e(tf)])&&this.extractHoistedCalls())}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(e=>`${e}();`).join(""):""}extractHoistedCalls(){this.tokens.removeToken();let e=!1;for(;this.tokens.matches3(Fc.dot,Fc.name,Fc.parenL);){const t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(sf.includes(t)){const t=this.nameManager.claimFreeName("__jestHoist");this.hoistedFunctionNames.push(t),this.tokens.replaceToken(`function ${t}(){${tf}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.parenR),this.tokens.appendCode(";}"),e=!1}else e?this.tokens.copyToken():this.tokens.replaceToken(`${tf}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.parenR),e=!0}return!0}}class rf extends el{constructor(e){super(),this.tokens=e}process(){if(this.tokens.matches1(Fc.num)){const e=this.tokens.currentTokenCode();if(e.includes("_"))return this.tokens.replaceToken(e.replace(/_/g,"")),!0}return!1}}class af extends el{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){return!!this.tokens.matches2(Fc._catch,Fc.braceL)&&(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`),!0)}}class of extends el{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){if(this.tokens.matches1(Fc.nullishCoalescing)){const e=this.tokens.currentToken();return this.tokens.tokens[e.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(", async () => ("):this.tokens.replaceTokenTrimmingLeftWhitespace(", () => ("),!0}if(this.tokens.matches1(Fc._delete)){if(this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0}const e=this.tokens.currentToken().subscriptStartIndex;if(null!=e&&this.tokens.tokens[e].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==Fc._super){const t=this.nameManager.claimFreeName("_");let s;if(s=e>0&&this.tokens.matches1AtIndex(e-1,Fc._delete)&&this.isLastSubscriptInChain()?`${t} => delete ${t}`:`${t} => ${t}`,this.tokens.tokens[e].isAsyncOperation&&(s=`async ${s}`),this.tokens.matches2(Fc.questionDot,Fc.parenL)||this.tokens.matches2(Fc.questionDot,Fc.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalCall', ${s}`);else if(this.tokens.matches2(Fc.questionDot,Fc.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${s}`);else if(this.tokens.matches1(Fc.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${s}.`);else if(this.tokens.matches1(Fc.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${s}.`);else if(this.tokens.matches1(Fc.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${s}[`);else{if(!this.tokens.matches1(Fc.parenL))throw new Error("Unexpected subscript operator in optional chain.");this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${s}(`)}return!0}return!1}isLastSubscriptInChain(){let e=0;for(let t=this.tokens.currentIndex()+1;;t++){if(t>=this.tokens.tokens.length)throw new Error("Reached the end of the code while finding the end of the access chain.");if(this.tokens.tokens[t].isOptionalChainStart?e++:this.tokens.tokens[t].isOptionalChainEnd&&e--,e<0)return!0;if(0===e&&null!=this.tokens.tokens[t].subscriptStartIndex)return!1}}justSkippedSuper(){let e=0,t=this.tokens.currentIndex()-1;for(;;){if(t<0)throw new Error("Reached the start of the code while finding the start of the access chain.");if(this.tokens.tokens[t].isOptionalChainStart?e--:this.tokens.tokens[t].isOptionalChainEnd&&e++,e<0)return!1;if(0===e&&null!=this.tokens.tokens[t].subscriptStartIndex)return this.tokens.tokens[t-1].type===Fc._super;t--}}}class cf extends el{constructor(e,t,s,i){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=s,this.options=i}process(){const e=this.tokens.currentIndex();if("createReactClass"===this.tokens.identifierName()){const t=this.importProcessor&&this.importProcessor.getIdentifierReplacement("createReactClass");return t?this.tokens.replaceToken(`(0, ${t})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(e),!0}if(this.tokens.matches3(Fc.name,Fc.dot,Fc.name)&&"React"===this.tokens.identifierName()&&"createClass"===this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)){const t=this.importProcessor&&this.importProcessor.getIdentifierReplacement("React")||"React";return this.tokens.replaceToken(t),this.tokens.copyToken(),this.tokens.copyToken(),this.tryProcessCreateClassCall(e),!0}return!1}tryProcessCreateClassCall(e){const t=this.findDisplayName(e);t&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(Fc.parenL),this.tokens.copyExpectedToken(Fc.braceL),this.tokens.appendCode(`displayName: '${t}',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.braceR),this.tokens.copyExpectedToken(Fc.parenR))}findDisplayName(e){return e<2?null:this.tokens.matches2AtIndex(e-2,Fc.name,Fc.eq)||e>=2&&this.tokens.tokens[e-2].identifierRole===mh.ObjectKey?this.tokens.identifierNameAtIndex(e-2):this.tokens.matches2AtIndex(e-2,Fc._export,Fc._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){const e=(this.options.filePath||"unknown").split("/"),t=e[e.length-1],s=t.lastIndexOf("."),i=-1===s?t:t.slice(0,s);return"index"===i&&e[e.length-2]?e[e.length-2]:i}classNeedsDisplayName(){let e=this.tokens.currentIndex();if(!this.tokens.matches2(Fc.parenL,Fc.braceL))return!1;const t=e+1,s=this.tokens.tokens[t].contextId;if(null==s)throw new Error("Expected non-null context ID on object open-brace.");for(;e<this.tokens.tokens.length;e++){const t=this.tokens.tokens[e];if(t.type===Fc.braceR&&t.contextId===s){e++;break}if("displayName"===this.tokens.identifierNameAtIndex(e)&&this.tokens.tokens[e].identifierRole===mh.ObjectKey&&t.contextId===s)return!1}if(e===this.tokens.tokens.length)throw new Error("Unexpected end of input when processing React class.");return this.tokens.matches1AtIndex(e,Fc.parenR)||this.tokens.matches2AtIndex(e,Fc.comma,Fc.parenR)}}class hf extends el{__init(){this.extractedDefaultExportName=null}constructor(e,t){super(),this.tokens=e,this.filePath=t,hf.prototype.__init.call(this)}setExtractedDefaultExportName(e){this.extractedDefaultExportName=e}getPrefixCode(){return"\n (function () {\n var enterModule = require('react-hot-loader').enterModule;\n enterModule && enterModule(module);\n })();".replace(/\s+/g," ").trim()}getSuffixCode(){const e=new Set;for(const t of this.tokens.tokens)!t.isType&&kh(t)&&t.identifierRole!==mh.ImportDeclaration&&e.add(this.tokens.identifierNameForToken(t));const t=Array.from(e).map(e=>({variableName:e,uniqueLocalName:e}));return this.extractedDefaultExportName&&t.push({variableName:this.extractedDefaultExportName,uniqueLocalName:"default"}),`\n;(function () {\n var reactHotLoader = require('react-hot-loader').default;\n var leaveModule = require('react-hot-loader').leaveModule;\n if (!reactHotLoader) {\n return;\n }\n${t.map(({variableName:e,uniqueLocalName:t})=>` reactHotLoader.register(${e}, "${t}", ${JSON.stringify(this.filePath||"")});`).join("\n")}\n leaveModule(module);\n})();`}process(){return!1}}const lf=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","enum","implements","interface","let","package","private","protected","public","static","await","false","null","true"]);function pf(e){if(0===e.length)return!1;if(!dh[e.charCodeAt(0)])return!1;for(let t=1;t<e.length;t++)if(!uh[e.charCodeAt(t)])return!1;return!lf.has(e)}class uf extends el{constructor(e,t,s){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=s}process(){return!!(this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange())||(this.tokens.matches1(Fc._public)||this.tokens.matches1(Fc._protected)||this.tokens.matches1(Fc._private)||this.tokens.matches1(Fc._abstract)||this.tokens.matches1(Fc._readonly)||this.tokens.matches1(Fc._override)||this.tokens.matches1(Fc.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(Fc._enum)||this.tokens.matches2(Fc._const,Fc._enum)?(this.processEnum(),!0):!(!this.tokens.matches2(Fc._export,Fc._enum)&&!this.tokens.matches3(Fc._export,Fc._const,Fc._enum))&&(this.processEnum(!0),!0))}processEnum(e=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(Fc._const)||this.tokens.matches1(Fc._enum);)this.tokens.removeToken();const t=this.tokens.identifierName();this.tokens.removeToken(),e&&!this.isImportsTransformEnabled&&this.tokens.appendCode("export "),this.tokens.appendCode(`var ${t}; (function (${t})`),this.tokens.copyExpectedToken(Fc.braceL),this.processEnumBody(t),this.tokens.copyExpectedToken(Fc.braceR),e&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${t} || (exports.${t} = ${t} = {}));`):this.tokens.appendCode(`)(${t} || (${t} = {}));`)}processEnumBody(e){let t=null;for(;!this.tokens.matches1(Fc.braceR);){const{nameStringCode:s,variableName:i}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(Fc.eq,Fc.string,Fc.comma)||this.tokens.matches3(Fc.eq,Fc.string,Fc.braceR)?this.processStringLiteralEnumMember(e,s,i):this.tokens.matches1(Fc.eq)?this.processExplicitValueEnumMember(e,s,i):this.processImplicitValueEnumMember(e,s,i,t),this.tokens.matches1(Fc.comma)&&this.tokens.removeToken(),t=null!=i?i:`${e}[${s}]`}}extractEnumKeyInfo(e){if(e.type===Fc.name){const t=this.tokens.identifierNameForToken(e);return{nameStringCode:`"${t}"`,variableName:pf(t)?t:null}}if(e.type===Fc.string){const t=this.tokens.stringValueForToken(e);return{nameStringCode:this.tokens.code.slice(e.start,e.end),variableName:pf(t)?t:null}}throw new Error("Expected name or string at beginning of enum element.")}processStringLiteralEnumMember(e,t,s){null!=s?(this.tokens.appendCode(`const ${s}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${e}[${t}] = ${s};`)):(this.tokens.appendCode(`${e}[${t}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(";"))}processExplicitValueEnumMember(e,t,s){const i=this.tokens.currentToken().rhsEndIndex;if(null==i)throw new Error("Expected rhsEndIndex on enum assign.");if(null!=s){for(this.tokens.appendCode(`const ${s}`),this.tokens.copyToken();this.tokens.currentIndex()<i;)this.rootTransformer.processToken();this.tokens.appendCode(`; ${e}[${e}[${t}] = ${s}] = ${t};`)}else{for(this.tokens.appendCode(`${e}[${e}[${t}]`),this.tokens.copyToken();this.tokens.currentIndex()<i;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${t};`)}}processImplicitValueEnumMember(e,t,s,i){let n=null!=i?`${i} + 1`:"0";null!=s&&(this.tokens.appendCode(`const ${s} = ${n}; `),n=s),this.tokens.appendCode(`${e}[${e}[${t}] = ${n}] = ${t};`)}}class df{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(e,t,s,i){df.prototype.__init.call(this),df.prototype.__init2.call(this),this.nameManager=e.nameManager,this.helperManager=e.helperManager;const{tokenProcessor:n,importProcessor:r}=e;this.tokens=n,this.isImportsTransformEnabled=t.includes("imports"),this.isReactHotLoaderTransformEnabled=t.includes("react-hot-loader"),this.disableESTransforms=Boolean(i.disableESTransforms),i.disableESTransforms||(this.transformers.push(new of(n,this.nameManager)),this.transformers.push(new rf(n)),this.transformers.push(new af(n,this.nameManager))),t.includes("jsx")&&("preserve"!==i.jsxRuntime&&this.transformers.push(new tl(this,n,r,this.nameManager,i)),this.transformers.push(new cf(this,n,r,i)));let a=null;if(t.includes("react-hot-loader")){if(!i.filePath)throw new Error("filePath is required when using the react-hot-loader transform.");a=new hf(n,i.filePath),this.transformers.push(a)}if(t.includes("imports")){if(null===r)throw new Error("Expected non-null importProcessor with imports transform enabled.");this.transformers.push(new Qd(this,n,r,this.nameManager,this.helperManager,a,s,Boolean(i.enableLegacyTypeScriptModuleInterop),t.includes("typescript"),t.includes("flow"),Boolean(i.preserveDynamicImport),Boolean(i.keepUnusedImports)))}else this.transformers.push(new Zd(n,this.nameManager,this.helperManager,a,t.includes("typescript"),t.includes("flow"),Boolean(i.keepUnusedImports),i));t.includes("flow")&&this.transformers.push(new ef(this,n,t.includes("imports"))),t.includes("typescript")&&this.transformers.push(new uf(this,n,t.includes("imports"))),t.includes("jest")&&this.transformers.push(new nf(this,n,this.nameManager,r))}transform(){this.tokens.reset(),this.processBalancedCode();let e=this.isImportsTransformEnabled?'"use strict";':"";for(const t of this.transformers)e+=t.getPrefixCode();e+=this.helperManager.emitHelpers(),e+=this.generatedVariables.map(e=>` var ${e};`).join("");for(const t of this.transformers)e+=t.getHoistedCode();let t="";for(const e of this.transformers)t+=e.getSuffixCode();const s=this.tokens.finish();let{code:i}=s;if(i.startsWith("#!")){let n=i.indexOf("\n");return-1===n&&(n=i.length,i+="\n"),{code:i.slice(0,n+1)+e+i.slice(n+1)+t,mappings:this.shiftMappings(s.mappings,e.length)}}return{code:e+i+t,mappings:this.shiftMappings(s.mappings,e.length)}}processBalancedCode(){let e=0,t=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(Fc.braceL)||this.tokens.matches1(Fc.dollarBraceL))e++;else if(this.tokens.matches1(Fc.braceR)){if(0===e)return;e--}if(this.tokens.matches1(Fc.parenL))t++;else if(this.tokens.matches1(Fc.parenR)){if(0===t)return;t--}this.processToken()}}processToken(){if(this.tokens.matches1(Fc._class))this.processClass();else{for(const e of this.transformers){if(e.process())return}this.tokens.copyToken()}}processNamedClass(){if(!this.tokens.matches2(Fc._class,Fc.name))throw new Error("Expected identifier for exported class name.");const e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),e}processClass(){const e=qd(this,this.tokens,this.nameManager,this.disableESTransforms),t=(e.headerInfo.isExpression||!e.headerInfo.className)&&e.staticInitializerNames.length+e.instanceInitializerNames.length>0;let s=e.headerInfo.className;t&&(s=this.nameManager.claimFreeName("_class"),this.generatedVariables.push(s),this.tokens.appendCode(` (${s} =`));const i=this.tokens.currentToken().contextId;if(null==i)throw new Error("Expected class to have a context ID.");for(this.tokens.copyExpectedToken(Fc._class);!this.tokens.matchesContextIdAndLabel(Fc.braceL,i);)this.processToken();this.processClassBody(e,s);const n=e.staticInitializerNames.map(e=>`${s}.${e}()`);t?this.tokens.appendCode(`, ${n.map(e=>`${e}, `).join("")}${s})`):e.staticInitializerNames.length>0&&this.tokens.appendCode(` ${n.map(e=>`${e};`).join(" ")}`)}processClassBody(e,t){const{headerInfo:s,constructorInsertPos:i,constructorInitializerStatements:n,fields:r,instanceInitializerNames:a,rangesToRemove:o}=e;let c=0,h=0;const l=this.tokens.currentToken().contextId;if(null==l)throw new Error("Expected non-null context ID on class.");this.tokens.copyExpectedToken(Fc.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode("__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}");const p=n.length+a.length>0;if(null===i&&p){const e=this.makeConstructorInitCode(n,a,t);if(s.hasSuperclass){const t=this.nameManager.claimFreeName("args");this.tokens.appendCode(`constructor(...${t}) { super(...${t}); ${e}; }`)}else this.tokens.appendCode(`constructor() { ${e}; }`)}for(;!this.tokens.matchesContextIdAndLabel(Fc.braceR,l);)if(c<r.length&&this.tokens.currentIndex()===r[c].start){let e=!1;for(this.tokens.matches1(Fc.bracketL)?this.tokens.copyTokenWithPrefix(`${r[c].initializerName}() {this`):this.tokens.matches1(Fc.string)||this.tokens.matches1(Fc.num)?(this.tokens.copyTokenWithPrefix(`${r[c].initializerName}() {this[`),e=!0):this.tokens.copyTokenWithPrefix(`${r[c].initializerName}() {this.`);this.tokens.currentIndex()<r[c].end;)e&&this.tokens.currentIndex()===r[c].equalsIndex&&this.tokens.appendCode("]"),this.processToken();this.tokens.appendCode("}"),c++}else if(h<o.length&&this.tokens.currentIndex()>=o[h].start){for(this.tokens.currentIndex()<o[h].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<o[h].end;)this.tokens.removeToken();h++}else this.tokens.currentIndex()===i?(this.tokens.copyToken(),p&&this.tokens.appendCode(`;${this.makeConstructorInitCode(n,a,t)};`),this.processToken()):this.processToken();this.tokens.copyExpectedToken(Fc.braceR)}makeConstructorInitCode(e,t,s){return[...e,...t.map(e=>`${s}.prototype.${e}.call(this)`)].join(";")}processPossibleArrowParamEnd(){if(this.tokens.matches2(Fc.parenR,Fc.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType;)e++;if(this.tokens.matches1AtIndex(e,Fc.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<e;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(") =>"),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(Oc._async)&&!this.tokens.matches1(Fc._async))return!1;const e=this.tokens.tokenAtRelativeIndex(1);if(e.type!==Fc.lessThan||!e.isType)return!1;let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType;)t++;if(this.tokens.matches1AtIndex(t,Fc.parenL)){for(this.tokens.replaceToken("async ("),this.tokens.removeInitialToken();this.tokens.currentIndex()<t;)this.tokens.removeToken();return this.tokens.removeToken(),this.processBalancedCode(),this.processToken(),!0}return!1}processPossibleTypeRange(){if(this.tokens.currentToken().isType){for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return!0}return!1}shiftMappings(e,t){for(let s=0;s<e.length;s++){const i=e[s];void 0!==i&&(e[s]=i+t)}return e}}function ff(e,t,s){t++,e.matches1AtIndex(t,Fc.parenL)||(e.matches1AtIndex(t,Fc.name)&&(s.add(e.identifierNameAtIndex(t)),t++,e.matches1AtIndex(t,Fc.comma)&&t++),e.matches1AtIndex(t,Fc.star)&&(t+=2,s.add(e.identifierNameAtIndex(t)),t++),e.matches1AtIndex(t,Fc.braceL)&&function(e,t,s){for(;;){if(e.matches1AtIndex(t,Fc.braceR))return;const i=Xh(e,t);if(t=i.endIndex,i.isType||s.add(i.rightName),e.matches2AtIndex(t,Fc.comma,Fc.braceR))return;if(e.matches1AtIndex(t,Fc.braceR))return;if(!e.matches1AtIndex(t,Fc.comma))throw new Error(`Unexpected token: ${JSON.stringify(e.tokens[t])}`);t++}}(e,++t,s))}function mf(e,t){!function(e){Il.strictCheck(e)}(t);try{const s=function(e,t){const s=t.transforms.includes("jsx"),i=t.transforms.includes("typescript"),n=t.transforms.includes("flow"),r=!0===t.disableESTransforms,a=function(e,t,s,i){if(i&&s)throw new Error("Cannot combine flow and typescript plugins.");Gc(e,t,s,i);const n=Bd();if(Hc.error)throw Wc(Hc.error);return n}(e,s,i,n),o=a.tokens,c=a.scopes,h=new gl(e,o),l=new ml(h),p=new Ud(e,o,n,r,l),u=Boolean(t.enableLegacyTypeScriptModuleInterop);let d=null;t.transforms.includes("imports")?(d=new cl(h,p,u,t,t.transforms.includes("typescript"),Boolean(t.keepUnusedImports),l),d.preprocessTokens(),yl(p,c,d.getGlobalNames()),t.transforms.includes("typescript")&&!t.keepUnusedImports&&d.pruneTypeOnlyImports()):t.transforms.includes("typescript")&&!t.keepUnusedImports&&yl(p,c,function(e){const t=new Set;for(let s=0;s<e.tokens.length;s++)e.matches1AtIndex(s,Fc._import)&&!e.matches3AtIndex(s,Fc._import,Fc.name,Fc.eq)&&ff(e,s,t);return t}(p));return{tokenProcessor:p,scopes:c,nameManager:h,importProcessor:d,helperManager:l}}(e,t),i=new df(s,t.transforms,Boolean(t.enableLegacyBabel5ModuleInterop),t).transform();let n={code:i.code};if(t.sourceMapOptions){if(!t.filePath)throw new Error("filePath must be specified when generating a source map.");n={...n,sourceMap:dl(i,t.filePath,t.sourceMapOptions,e,s.tokenProcessor.tokens)}}return n}catch(e){throw t.filePath&&(e.message=`Error transforming ${t.filePath}: ${e.message}`),e}}function yf(e){return mf(e,{disableESTransforms:!0,transforms:["typescript"]}).code}function xf(e,t){try{const{program:s}=function(e,t){if("unambiguous"!==t?.sourceType)return Dc(t,e).parse();t={...t};try{t.sourceType="module";const s=Dc(t,e),i=s.parse();if(s.sawUnambiguousESM)return i;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",Dc(t,e).parse()}catch{}else i.program.sourceType="script";return i}catch(s){try{return t.sourceType="script",Dc(t,e).parse()}catch{}throw s}}(yf(e),{sourceFilename:t,sourceType:"module"});return function(e,t){if(e.body.some(e=>wt(e)&&!function(e){return St(e)&&!e.declaration&&!e.source&&0===e.specifiers.length}(e)))throw new k("GLTS scripts must not export values",{importChain:[t],phase:"transform",url:t});const s=e.body.filter(e=>"ImportDeclaration"===e.type),i=e.body.filter(e=>"ImportDeclaration"!==e.type),n=ti(i,e.directives),r=ni([],n,!0);e.body=[...s,ii(ri(si(r,[])))],e.directives=[]}(s,t),Vr(s,{retainLines:!0}).code}catch(e){throw T(e,"Unable to compile GLTS script",{importChain:[t],phase:"transform",url:t})}}!function(e){e.__esModule=!0,e.LinesAndColumns=void 0;var t="\n",s=function(){function e(e){this.string=e;for(var s=[0],i=0;i<e.length;)switch(e[i]){case t:i+=1,s.push(i);break;case"\r":e[i+=1]===t&&(i+=1),s.push(i);break;default:i++}this.offsets=s}return e.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,s=this.offsets;s[t+1]<=e;)t++;return{line:t,column:e-s[t]}},e.prototype.indexForLocation=function(e){var t=e.line,s=e.column;return t<0||t>=this.offsets.length||s<0||s>this.lengthOfLine(t)?null:this.offsets[t]+s},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}();e.LinesAndColumns=s,e.default=s}({});class gf{#i=new Set;#d=!1;create(e){if(this.#d)throw new Error("Module URL store has been disposed");const t=new Blob([e],{type:"text/javascript"}),s=URL.createObjectURL(t);return this.#i.add(s),s}release(e){this.#i.delete(e)&&URL.revokeObjectURL(e)}dispose(){if(!this.#d){this.#d=!0;for(const e of this.#i)URL.revokeObjectURL(e);this.#i.clear()}}}class kf{#t;#i=new gf;#s;#f;#m=new Map;#y=new Map;constructor({cdnURL:e,fetch:t,modules:s}){this.#t=t,this.#s=new xe(s??{},this.#i),this.#f=new me({cdnURL:e,fetch:t,bridge:this.#s,urls:this.#i})}async getScript(e){const t=this.#m.get(e);if(t)return t;const s=this.fetchScript(e);this.#m.set(e,s);try{return await s}catch(t){throw this.#m.delete(e),t}}commitScript(e,t){this.#m.set(e,Promise.resolve(t))}invalidateScript(e){this.#m.delete(e)}dependents(e){return[...this.#y].filter(([,t])=>t.has(e)).map(([e])=>e)}async evaluate(e,t){const s=this.#s.createContextModule(t),i=e.source.replaceAll(this.#s.contextToken,s.url),n=this.#i.create(i);try{await import(/* @vite-ignore */ /* webpackIgnore: true */n)}catch(t){throw T(t,"Unable to execute GLTS script",{importChain:[e.url],phase:"evaluate",url:e.url})}finally{this.#i.release(n),s.release()}}async fetchScript(e){const{source:t,url:s}=await v(this.#t,e,!0,[e]),i=xf(t,s),n=this.#y.get(e)??new Set;this.#y.set(e,n);const r={modules:new Map,urls:n},a=[s];try{const e=await fe({source:i,url:s,importChain:a},async e=>"@drawcall/glts"===e?this.#s.contextToken:this.#x(e,s,a,r));return{url:s,source:e}}catch(e){throw T(e,"Unable to transform GLTS script",{importChain:a,phase:"transform",url:s})}}async#x(e,t,s,i){const n=function(e,t){if(!e.startsWith("./")&&!e.startsWith("../"))return;const s=new URL(e,t);return s.pathname.endsWith(".ts")?s:void 0}(e,t);if(!n)return function(e,t,s){const i={importChain:s,phase:"resolve",url:t};if(e.startsWith("#"))throw new k(`Unsupported package import: ${e}`,i);if(!C(e)){if(new URL(e,t).pathname.endsWith(".glts"))throw new k(`Static GLTS imports are not supported: ${e}; use gltsLoader.loadAsync()`,i);if(!/^https?:/i.test(e))throw new k(`Unsupported local import: ${e}; import helpers as ./*.ts files and load other files with import.meta.url`,i)}}(e,t,s),this.#f.linkImport(e,t,s);const r=w(n);if(s.includes(r))throw new k("Cyclic helper imports are not supported",{importChain:[...s,r],phase:"resolve",url:r});i.urls.add(r);let a=i.modules.get(r);return a||(a=this.#g(r,[...s,r],i),i.modules.set(r,a)),a}async#g(e,t,s){const i=await v(this.#t,e,!0,t);let n;try{const e=function(e,t,s){try{return yf(e)}catch(e){throw T(e,"Unable to compile helper",{importChain:s,phase:"transform",url:t})}}(i.source,i.url,t);n=await fe({source:e,url:i.url,importChain:t},async e=>{if("@drawcall/glts"===e)throw new k("Helpers cannot import runtime values from @drawcall/glts; pass them from the script",{importChain:t,phase:"resolve",url:i.url});return this.#x(e,i.url,t,s)})}catch(e){throw T(e,"Unable to transform helper",{importChain:t,phase:"transform",url:i.url})}return this.#i.create(n)}dispose(){this.#s.dispose(),this.#i.dispose()}}function Tf(e,t){const s=[];let i;if(e.traverse(t=>{if(t!==e&&!i)if(function(e){return e instanceof h||e instanceof l||e instanceof a||e instanceof p||e instanceof u||e instanceof d||e instanceof f||e instanceof m||e instanceof y}(t))i=t;else if(t instanceof c){if(t.morphTargetInfluences)return void(i=t);s.push(t)}}),i)throw new k(`Automatic instancing does not support THREE.${i.type}; implement native instancing with onMatrixUpdateAt()`,{phase:"construct",url:t});if(0===s.length)throw new k("Automatic instancing requires at least one mesh; implement native instancing with onMatrixUpdateAt()",{phase:"construct",url:t});return s}class bf{#k;#T=new Set;#b=new Set;#S=[];#w=!0;constructor(e,t){this.#k=new Set([...t?t.#k:[],...e])}close(){this.#w=!1}assertCanLoad(e){if(this.#k.has(e))throw new k("Cyclic nested GLTS load",{importChain:[...this.#k,e],phase:"resolve",url:e});if(!this.#w)throw new k("The contextual gltsLoader is no longer active",{phase:"resolve",url:e})}own(e){return this.#v(e.then(e=>(this.#T.add(e),e)))}get nodes(){return[...this.#T]}async finish(){for(;this.#b.size>0;)await Promise.allSettled([...this.#b]);this.close();const e=this.#S.splice(0);if(e.length>0)throw new AggregateError(e,"Nested GLTS operation failed")}assertAttached(e){const t=new Set;e.traverse(e=>t.add(e));const s=[...this.#T].find(e=>!t.has(e));if(s)throw new k("Nested GLTS scenes must be added to scene",{phase:"construct",url:s.url})}#v(e){return this.#b.add(e),e.then(()=>this.#b.delete(e),t=>{this.#b.delete(e),this.#S.push(t)}),e}}function Sf(e,t){if("function"!=typeof e)throw new TypeError(`${t} expects a function`)}class wf{scene=function(){return Object.assign(new e,{defaultCamera:void 0,rendering:{effects:[],localClippingEnabled:!1,shadows:!1,toneMapping:t,toneMappingExposure:1}})}();nested;#C=[];#P=[];#E=[];#A;#I;#_;#N;#d=!1;constructor(e,t,s,i){this.#A=e,this.#I=s,this.nested=new bf(t,i?.nested)}context(e){return{bindScene:e=>{this.#N=e},gltsLoader:e.gltsLoader,instanceCount:this.#A.length,loadingManager:e.loadingManager,onDispose:e=>{this.#L(),Sf(e,"onDispose"),this.#C.push(e)},onFrame:e=>{this.#L(),Sf(e,"onFrame"),this.#P.push(e)},onMatrixUpdateAt:e=>{this.#L(),Sf(e,"onMatrixUpdateAt"),this.#E.push(e);for(const[t,s]of this.#A.entries())e(t,s.clone())},isPreview:e.isPreview,scene:this.scene}}bindScene(e){this.#N?.(e)}autoInstance(e){if(!(this.#E.length>0)){if(this.#P.length>0)throw new k("Automatically instanced scripts cannot use onFrame(); implement native instancing with onMatrixUpdateAt()",{phase:"construct",url:e});if(this.nested.nodes.length>0)throw new k("Automatically instanced scripts cannot contain nested GLTS scenes; implement native instancing with onMatrixUpdateAt()",{phase:"construct",url:e});this.#_=function(e,t,s){e.updateMatrixWorld(!0);const i=Tf(e,s),n=e.matrixWorld.clone().invert(),r=i.map(s=>{const i=n.clone().multiply(s.matrixWorld),r=new a(s.geometry,s.material,t.length);return function(e,t){t.castShadow=e.castShadow,t.customDepthMaterial=e.customDepthMaterial,t.customDistanceMaterial=e.customDistanceMaterial,t.frustumCulled=e.frustumCulled,t.layers.mask=e.layers.mask,t.name=e.name,t.onAfterRender=e.onAfterRender,t.onAfterShadow=e.onAfterShadow,t.onBeforeRender=e.onBeforeRender,t.onBeforeShadow=e.onBeforeShadow,t.receiveShadow=e.receiveShadow,t.renderOrder=e.renderOrder,t.userData=e.userData,t.visible=e.visible}(s,r),r.visible=function(e,t){let s=e;for(;s&&s!==t;){if(!s.visible)return!1;s=s.parent}return!0}(s,e),{relative:i,target:r}});e.clear(),e.add(...r.map(({target:e})=>e));const c=new o,h=(e,t)=>{for(const{relative:s,target:i}of r)c.multiplyMatrices(t,s),i.setMatrixAt(e,c),i.instanceMatrix.needsUpdate=!0,i.boundingBox=null,i.boundingSphere=null};for(const[e,s]of t.entries())h(e,s);return{dispose:()=>b("Automatic instance disposal failed",r.map(({target:e})=>()=>e.dispose())),setMatrixAt:h}}(this.scene,this.#A,e)}}dispose(e=this.scene){if(this.#d)return void e.clear();this.#d=!0,this.nested.close();const t=this.#C.splice(0).reverse();this.#P.length=0,this.#E.length=0,b("GLTS execution disposal failed",[()=>this.#I(e,this.nested.nodes),()=>this.#_?.dispose(),...t,()=>e.clear()])}setMatrixAt(e,t){if(this.#_)this.#_.setMatrixAt(e,t);else for(const s of this.#E)s(e,t.clone())}update(e){for(const t of this.#P)t(e)}#L(){if(this.#d)throw new Error("GLTS execution has been disposed")}}function vf(t){return t instanceof e&&"rendering"in t&&"string"==typeof Reflect.get(t,"url")&&"function"==typeof Reflect.get(t,"dispose")&&"function"==typeof Reflect.get(t,"update")}const Cf=new WeakMap;class Pf{#D=new Map;createScene(e,t){const s=this.#M(e.scene,t.url);return this.#D.set(s,{...t,disposed:!1,execution:e,node:s}),s}createInstances(e,t){const s=this.#M(e.scene,t.url),i=e=>{const i=this.#O(s,t.url).matrices[e];if(!Number.isSafeInteger(e)||!i)throw new RangeError(`GLTS instance index is out of range: ${e}`);return i};if(Object.defineProperties(s,{count:{value:t.matrices.length},getMatrixAt:{value:(e,t)=>t.copy(i(e))},setMatrixAt:{value:(e,n)=>(this.#O(s,t.url).execution.setMatrixAt(e,i(e).copy(n)),s)}}),!vf(n=s)||"number"!=typeof Reflect.get(n,"count")||"function"!=typeof Reflect.get(n,"getMatrixAt")||"function"!=typeof Reflect.get(n,"setMatrixAt"))throw new Error("Unable to create a managed GLTS instances node");var n;return this.#D.set(s,{...t,disposed:!1,execution:e,node:s}),s}recordsForURL(e){return[...this.#D.values()].filter(t=>t.url===e)}getRecord(e){return this.#O(e,e.url)}#F(e,t,s){const i=this.#O(e,t);if(!Number.isFinite(s)||s<0)throw new RangeError("GLTS update delta must be a non-negative finite number");i.execution.update(s);for(const t of this.#R(e))t.execution.update(s)}dispose(e){const t=this.#D.get(e);if(!t)return;t.disposed=!0,this.#D.delete(e);const s=[...Cf.get(e)??[]];Cf.delete(e),b("GLTS node disposal failed",[()=>t.execution.dispose(e),...s])}disposeNested(e,t){const s=new Set([...t,...this.#R(e).map(({node:e})=>e)]);this.#I([...s].reverse())}disposeAll(){this.#I([...this.#D.keys()])}#M(e,t){if(Object.defineProperties(e,{dispose:{value:()=>this.dispose(e)},update:{value:s=>this.#F(e,t,s)},url:{value:t}}),!vf(e))throw new Error("Unable to create a managed GLTS scene");return e}#O(e,t){const s=this.#D.get(e);if(!s)throw new k("GLTS node has been disposed",{phase:"dispose",url:t});return s}#I(e){b("GLTS node disposal failed",e.map(e=>()=>this.dispose(e)))}#R(e){const t=[];return e.traverse(s=>{const i=this.#D.get(s);i&&s!==e&&t.push(i)}),t}}function Ef(e,t){try{t()}catch(t){e.push(t)}}function Af(e,t,s){const i=T(t,"Unable to load GLTS script",{phase:"evaluate",url:e});return 0===s.length?i:new k("GLTS operation and LoadingManager callback both failed",i,new AggregateError([i,...s]))}async function If(e,t,s,i,n=()=>{}){s.throwIfAborted();const r=[];let a=()=>{};const o=new Promise((e,t)=>{a=()=>t(s.reason),s.addEventListener("abort",a)});let c;Ef(r,()=>e.itemStart(t));try{c=await Promise.race([i(),o])}catch(h){throw Ef(r,()=>e.itemError(t)),Ef(r,()=>e.itemEnd(t)),Af(t,h,r)}finally{s.removeEventListener("abort",a)}if(Ef(r,()=>e.itemEnd(t)),!s.aborted&&0===r.length)return c;const h=undefined;return S(s.aborted?Af(t,s.reason,r):new k("LoadingManager callback failed",{phase:"resource",url:t},new AggregateError(r)),t,()=>n(c))}class _f{manager;#B=[];#j=[];#U;#q=!0;#$;#b=0;constructor(e,t){this.#U=t;const s=new x,i=s.itemStart.bind(s),n=s.itemEnd.bind(s),r=s.itemError.bind(s),a=s.getHandler.bind(s);s.resolveURL=t=>e.resolveURL(t),s.getHandler=t=>{const s=a(t);if(s)return s;if(e.getHandler(t))throw new k("Host LoadingManager handlers cannot be scoped; register the handler with the contextual loadingManager",{phase:"resource",url:this.#U});return null},s.itemStart=t=>{this.#L(),this.#b+=1,Ef(this.#B,()=>i(t)),Ef(this.#B,()=>e.itemStart(t))},s.itemError=t=>{this.#j.push(t),Ef(this.#B,()=>r(t)),Ef(this.#B,()=>e.itemError(t))},s.itemEnd=t=>{if(0===this.#b)throw new Error(`LoadingManager item ended without a matching start: ${t}`);this.#b-=1,Ef(this.#B,()=>n(t)),Ef(this.#B,()=>e.itemEnd(t)),this.#V()},this.manager=s}cancel(e){this.#q&&(this.#q=!1,this.manager.abort(),this.#$?.reject(e),this.#$=void 0)}async waitAndClose(){await Promise.resolve(),this.#L(),this.#b>0&&await new Promise((e,t)=>{this.#$={reject:t,resolve:e}}),this.#q=!1,this.#H()}#L(){if(!this.#q)throw new k("Loading scope is no longer active",{phase:"dispose",url:this.#U})}#V(){if(0!==this.#b||!this.#$)return;const e=this.#$;this.#$=void 0,e.resolve()}#H(){if(0===this.#j.length&&0===this.#B.length)return;const e=this.#j.map(e=>`- ${e}`).join("\n"),t=e?`Resources failed to load:\n${e}`:"LoadingManager callback failed",s=this.#B.length>0?new AggregateError(this.#B,"LoadingManager callbacks failed"):void 0;throw new k(t,{phase:"resource",url:this.#U},s)}}class Nf{#K=[];#z=[];#J=[];acquireRead(e){return this.#W(e,()=>this.#z.every(t=>t.url!==e))}acquireReadBeforeQueuedWrite(e){return this.#W(e,()=>this.#z[0]?.url!==e)}async acquireWrite(e){const t={url:e};return this.#z.push(t),await this.#X(()=>this.#z[0]===t&&!this.#K.includes(e)),this.#G(()=>this.#z.shift())}async#W(e,t){return await this.#X(t,()=>this.#K.push(e)),this.#G(()=>this.#K.splice(this.#K.indexOf(e),1))}async#X(e,t){for(;!e();)await new Promise(e=>this.#J.push(e));t?.()}#G(e){let t=!1;return()=>{if(t)return;t=!0,e();const s=this.#J;this.#J=[];for(const e of s)e()}}}async function Lf(e,t,s,i){const n=await s.fetchScript(e),r=[];try{for(const e of t)r.push({record:e,execution:await i(n,e)});const e=t.find(e=>e.disposed);if(e)throw new k("GLTS node was disposed during reload",{phase:"reload",url:e.url})}catch(t){S(t,e,()=>b("GLTS reload discard failed",r.map(({execution:e})=>()=>e.dispose())))}s.commitScript(e,n);try{b("GLTS reload commit failed",r.map(({record:e,execution:t})=>()=>function(e,t){b("GLTS execution replacement failed",[()=>e.execution.dispose(e.node),()=>{var s,i;e.disposed&&S(new k("GLTS node was disposed during reload",{phase:"reload",url:e.url}),e.url,()=>t.dispose()),e.execution=t,s=e.node,i=t.scene,s.name=i.name,s.layers.mask=i.layers.mask,s.visible=i.visible,s.castShadow=i.castShadow,s.receiveShadow=i.receiveShadow,s.frustumCulled=i.frustumCulled,s.renderOrder=i.renderOrder,s.animations=i.animations.slice(),s.userData=i.userData,s.defaultCamera=i.defaultCamera,s.background=i.background,s.backgroundBlurriness=i.backgroundBlurriness,s.backgroundIntensity=i.backgroundIntensity,s.backgroundRotation.copy(i.backgroundRotation),s.environment=i.environment,s.environmentIntensity=i.environmentIntensity,s.environmentRotation.copy(i.environmentRotation),s.fog=i.fog,s.overrideMaterial=i.overrideMaterial,Object.assign(s.rendering,i.rendering,{effects:i.rendering.effects.slice()});for(const s of[...t.scene.children])e.node.add(s);t.bindScene(e.node)}])}(e,t)))}catch(t){throw new k("Reload committed, but replacing its nodes failed",{phase:"reload",url:e},t)}}function Df(e){const t="undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0;if(void 0!==t)return new URL(e,t);if(URL.canParse(e))return new URL(e);throw new k("A relative URL needs document.baseURI or location.href to resolve against",{phase:"resolve",url:String(e)})}class Mf extends g{#Y;#r;#Q=new AbortController;#Z=new Nf;#T=new Pf;constructor(e,t={}){if(super(e),!e)throw new TypeError("GLTSLoader requires a Three.js LoadingManager");this.#Y=t.isPreview??!1,this.#r=new kf({cdnURL:Df(t.cdnURL??"https://esm.sh/"),fetch:(e,t)=>this.#t(e,t),modules:t.modules})}load(e,t,s,i){this.loadAsync(e,s).then(t,e=>{i?i(e):console.error(e)})}async loadAsync(e,t){const s=this.#ee(e);if(t)throw new k("GLTSLoader does not support per-load progress callbacks; use LoadingManager.onProgress",{phase:"resolve",url:s});return this.#te(s,this.#Y)}async loadInstancesAsync(e,t){return this.#se(this.#ee(e),t)}async reload(e){const t=this.#ee(e);this.#Q.signal.throwIfAborted();const s=this.#r.dependents(t);if(0===s.length)return this.#ie(t);const i=(await Promise.allSettled(s.map(e=>this.#ie(e)))).flatMap(e=>"rejected"===e.status?[e.reason]:[]);if(1===i.length)throw i[0];if(i.length>1)throw new k("Reloading the helper's scripts failed",{phase:"reload",url:t},new AggregateError(i))}dispose(){this.#Q.signal.aborted||(this.#Q.abort(new k("Loader has been disposed",{phase:"dispose",url:"glts://loader"})),b("Loader disposal failed",[()=>this.#T.disposeAll(),()=>this.#r.dispose()]))}#te(e,t,s){const i={url:e,matrices:[new o],isPreview:t,instances:!1};return this.#a(i,s,e=>this.#T.createScene(e,i))}async#se(e,t,s){if(!Number.isSafeInteger(t)||t<1)throw new RangeError("GLTS instance count must be a positive integer");const i={url:e,matrices:Array.from({length:t},()=>new o),isPreview:!1,instances:!0};return this.#a(i,s,e=>this.#T.createInstances(e,i))}#a(e,t,s){const{url:i}=e,n=t?this.#Z.acquireReadBeforeQueuedWrite(i):this.#Z.acquireRead(i);return this.#ne(n,()=>If(this.manager,i,this.#Q.signal,async()=>{const n=await this.#re(await this.#r.getScript(i),e,t);try{return this.#Q.signal.throwIfAborted(),s(n)}catch(t){S(T(t,"Unable to construct GLTS "+(e.instances?"instances":"scene"),{phase:"construct",url:i}),i,()=>n.dispose())}},e=>e.dispose()))}async#re(e,t,s){const i=this.#Q.signal;i.throwIfAborted();const n=new wf(t.matrices,[t.url,e.url],(e,t)=>this.#T.disposeNested(e,t),s),r=new _f(this.manager,e.url),a=()=>r.cancel(i.reason);i.addEventListener("abort",a);try{return await this.#r.evaluate(e,n.context({gltsLoader:this.#ae(n,e.url),isPreview:t.isPreview,loadingManager:r.manager})),await n.nested.finish(),n.nested.assertAttached(n.scene),await r.waitAndClose(),t.instances&&n.autoInstance(e.url),n}catch(t){let s=t;r.cancel(s);try{await n.nested.finish()}catch(t){s=function(e,t,s){const i=T(t,"Unable to execute GLTS script",{phase:"evaluate",url:e});return s instanceof AggregateError&&1===s.errors.length&&s.errors[0]===t?i:new k("GLTS execution and nested operation both failed",i,new AggregateError([i,s]))}(e.url,s,t)}S(s,e.url,()=>n.dispose())}finally{i.removeEventListener("abort",a)}}#ie(e){return this.#ne(this.#Z.acquireWrite(e),async()=>{this.#r.invalidateScript(e);const t=this.#T.recordsForURL(e);0!==t.length&&await If(this.manager,e,this.#Q.signal,()=>Lf(e,t,this.#r,(e,t)=>this.#re(e,t)))})}async#ne(e,t){const s=await e;try{return this.#Q.signal.throwIfAborted(),await t()}finally{s()}}#ae(e,t){const s=s=>{const i=w(new URL(this.manager.resolveURL(String(s)),t));return e.nested.assertCanLoad(i),i};return{loadAsync:t=>e.nested.own(this.#te(s(t),!1,e)),loadInstancesAsync:(t,i)=>e.nested.own(this.#se(s(t),i,e))}}#ee(e){const t=e instanceof URL?e.href:`${this.path}${e}`;return w(Df(this.manager.resolveURL(t)))}#t(e,t){const s=new Headers(t?.headers);for(const[e,t]of Object.entries(this.requestHeader))s.set(e,t);const i={...t,headers:s};return this.withCredentials&&(i.credentials="include"),globalThis.fetch(e,i)}}export{k as GLTSError,Mf as GLTSLoader};
1
+ import{S as e,N as t,R as s,T as i,g as n,c as r,I as a,M as o,a as c,B as h,C as l,L as p,b as u,d,P as f,e as m,f as y,h as x,i as g}from"./injection-template-zNpCmzi9.js";class k extends Error{url;phase;importChain;constructor(e,t,s){const i=t.importChain??[],n=i.length>1?`\nImport chain: ${i.join(" -> ")}`:"";super(`[GLTS:${t.phase}] ${e}\nURL: ${t.url}${n}`,{cause:s}),this.name="GLTSError",this.url=t.url,this.phase=t.phase,this.importChain=i}}function T(e,t,s){return e instanceof k?e:new k(t,s,e)}function b(e,t){const s=[];for(const e of t)try{e()}catch(e){s.push(e)}if(s.length>0)throw new AggregateError(s,e)}function S(e,t,s){try{s()}catch(s){throw new k("GLTS operation and cleanup both failed",{phase:"dispose",url:t},new AggregateError([e,s]))}throw e}function w(e){const t=new URL(e);return t.hash="",t.href}async function v(e,t,s,i){let n;try{n=await e(t,{cache:s?"no-cache":"default"})}catch(e){throw new k("Network request failed",{importChain:i,phase:"fetch",url:t},e)}if(!n.ok)throw new k(`Request failed with ${n.status} ${n.statusText}`,{importChain:i,phase:"fetch",url:t});try{return{source:await n.text(),url:w(new URL(n.url||t))}}catch(e){throw new k("Unable to read response body",{importChain:i,phase:"fetch",url:t},e)}}function C(e){return!e.startsWith(".")&&!e.startsWith("/")&&!/^[A-Za-z][A-Za-z\d+.-]*:/.test(e)}let P,E,A,I=2<<19;const _=1===new Uint8Array(new Uint16Array([1]).buffer)[0]?function(e,t){const s=e.length;let i=0;for(;i<s;)t[i]=e.charCodeAt(i++)}:function(e,t){const s=e.length;let i=0;for(;i<s;){const s=e.charCodeAt(i);t[i++]=(255&s)<<8|s>>>8}};let N,L,D;function M(e,t){D=e;let s="",i=D;for(;;){D>=N.length&&B();const e=N.charCodeAt(D);if(e===t)break;92===e?(s+=N.slice(i,D),s+=O(),i=D):(8232===e||8233===e||R(e)&&96!==t&&B(),++D)}return s+=N.slice(i,D++),s}function O(){let e=N.charCodeAt(++D);switch(++D,e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(F(2));case 117:return function(){let e;return 123===N.charCodeAt(D)?(++D,e=F(N.indexOf("}",D)-D),++D,e>1114111&&B()):e=F(4),e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}();case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===N.charCodeAt(D)&&++D;case 10:return"";case 56:case 57:B();default:if(e>=48&&e<=55){let t=N.substr(D-1,3).match(/^[0-7]+/)[0],s=parseInt(t,8);return s>255&&(t=t.slice(0,-1),s=parseInt(t,8)),D+=t.length-1,e=N.charCodeAt(D),"0"===t&&56!==e&&57!==e||B(),String.fromCharCode(s)}return R(e)?"":String.fromCharCode(e)}}function F(e){const t=D;let s=0,i=0;for(let t=0;t<e;++t,++D){let e,n=N.charCodeAt(D);if(95!==n){if(n>=97)e=n-97+10;else if(n>=65)e=n-65+10;else{if(!(n>=48&&n<=57))break;e=n-48}if(e>=16)break;i=n,s=16*s+e}else 95!==i&&0!==t||B(),i=n}return 95!==i&&D-t===e||B(),s}function R(e){return 13===e||10===e}function B(){throw Object.assign(Error(`Parse error ${L}:${N.slice(0,D).split("\n").length}:${D-N.lastIndexOf("\n",D-1)}`),{idx:D})}var j=",".charCodeAt(0),U=";".charCodeAt(0),q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$=new Uint8Array(64),V=new Uint8Array(128);for(let e=0;e<64;e++){const t=q.charCodeAt(e);$[e]=t,V[t]=e}function H(e,t){let s=0,i=0,n=0;do{const t=e.next();n=V[t],s|=(31&n)<<i,i+=5}while(32&n);const r=1&s;return s>>>=1,r&&(s=-2147483648|-s),t+s}function K(e,t,s){let i=t-s;i=i<0?-i<<1|1:i<<1;do{let t=31&i;i>>>=5,i>0&&(t|=32),e.write($[t])}while(i>0);return t}function z(e,t){return!(e.pos>=t)&&e.peek()!==j}var J="undefined"!=typeof TextDecoder?new TextDecoder:"undefined"!=typeof Buffer?{decode:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e[s]);return t}},W=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(16384)}write(e){const{buffer:t}=this;t[this.pos++]=e,16384===this.pos&&(this.out+=J.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:s}=this;return s>0?t+J.decode(e.subarray(0,s)):t}},X=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){const{buffer:t,pos:s}=this,i=t.indexOf(e,s);return-1===i?t.length:i}};function G(e){e.sort(Y)}function Y(e,t){return e[0]-t[0]}function Q(e){const t=new W;let s=0,i=0,n=0,r=0;for(let a=0;a<e.length;a++){const o=e[a];if(a>0&&t.write(U),0===o.length)continue;let c=0;for(let e=0;e<o.length;e++){const a=o[e];e>0&&t.write(j),c=K(t,a[0],c),1!==a.length&&(s=K(t,a[1],s),i=K(t,a[2],i),n=K(t,a[3],n),4!==a.length&&(r=K(t,a[4],r)))}}return t.flush()}class Z{constructor(e){this.bits=e instanceof Z?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}class ee{constructor(e,t,s){this.start=e,this.end=t,this.original=s,this.intro="",this.outro="",this.content=s,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new ee(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let t=this;for(;t;)e(t),t=t.next}eachPrevious(e){let t=this;for(;t;)e(t),t=t.previous}edit(e,t,s){return this.content=e,s||(this.intro="",this.outro=""),this.storeName=t,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){const t=e-this.start,s=this.original.slice(0,t),i=this.original.slice(t);this.original=s;const n=new ee(e,this.end,i);return n.outro=this.outro,this.outro="",this.end=e,this.edited?(n.edit("",!1),this.content=""):this.content=s,n.next=this.next,n.next&&(n.next.previous=n),n.previous=this,this.next=n,n}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.split(this.start+t.length).edit("",void 0,!0),this.edited&&this.edit(t,this.storeName,!0)),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const t=this.content.replace(e,"");if(t.length){if(t!==this.content){const e=this.split(this.end-t.length);this.edited&&e.edit(t,this.storeName,!0),this.edit("",void 0,!0)}return!0}return this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0}}function te(){return"undefined"!=typeof globalThis&&"function"==typeof globalThis.btoa?e=>globalThis.btoa(unescape(encodeURIComponent(e))):"function"==typeof Buffer?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const se=te();let ie=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Q(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList),void 0!==e.debugId&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+se(this.toString())}};function ne(e,t){const s=e.split(/[/\\]/),i=t.split(/[/\\]/);for(s.pop();s[0]===i[0];)s.shift(),i.shift();if(s.length){let e=s.length;for(;e--;)s[e]=".."}return s.concat(i).join("/")}const re=Object.prototype.toString;function ae(e){const t=e.split("\n"),s=[];for(let e=0,i=0;e<t.length;e++)s.push(i),i+=t[e].length+1;return function(e){let t=0,i=s.length;for(;t<i;){const n=t+i>>1;e<s[n]?i=n:t=n+1}const n=t-1;return{line:n,column:e-s[n]}}}const oe=/\w/;class ce{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,t,s,i){if(t.length){const n=t.length-1;let r=t.indexOf("\n",0),a=-1;for(;r>=0&&n>r;){const n=[this.generatedCodeColumn,e,s.line,s.column];i>=0&&n.push(i),this.rawSegments.push(n),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=r,r=t.indexOf("\n",r+1)}const o=[this.generatedCodeColumn,e,s.line,s.column];i>=0&&o.push(i),this.rawSegments.push(o),this.advance(t.slice(a+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(t));this.pending=null}addUneditedChunk(e,t,s,i,n){let r=t.start,a=!0,o=!1;for(;r<t.end;){if("\n"===s[r])i.line+=1,i.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=!0,o=!1;else{if(this.hires||a||n.has(r)){const t=[this.generatedCodeColumn,e,i.line,i.column];"boundary"===this.hires?oe.test(s[r])?o||(this.rawSegments.push(t),o=!0):(this.rawSegments.push(t),o=!1):this.rawSegments.push(t)}i.column+=1,this.generatedCodeColumn+=1,a=!1}r+=1}this.pending=null}advance(e){if(!e)return;const t=e.split("\n");if(t.length>1){for(let e=0;e<t.length-1;e++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}}const he="\n",le={insertLeft:!1,insertRight:!1,storeName:!1};class pe{constructor(e,t={}){const s=new ee(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:s},lastChunk:{writable:!0,value:s},lastSearchedChunk:{writable:!0,value:s},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new Z},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList},offset:{writable:!0,value:t.offset||0}}),this.byStart[0]=s,this.byEnd[e.length]=s}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byEnd[e];return s?s.appendLeft(t):this.intro+=t,this}appendRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byStart[e];return s?s.appendRight(t):this.outro+=t,this}clone(){const e=new pe(this.original,{filename:this.filename,offset:this.offset});let t=this.firstChunk,s=e.firstChunk=e.lastSearchedChunk=t.clone();for(;t;){e.byStart[s.start]=s,e.byEnd[s.end]=s;const i=t.next,n=i&&i.clone();n&&(s.next=n,n.previous=s,s=n),t=i}return e.lastChunk=s,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new Z(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const t=Object.keys(this.storedNames),s=new ce(e.hires),i=ae(this.original);return this.intro&&s.advance(this.intro),this.firstChunk.eachNext(e=>{const n=i(e.start);e.intro.length&&s.advance(e.intro),e.edited?s.addEdit(0,e.content,n,e.storeName?t.indexOf(e.original):-1):s.addUneditedChunk(0,e,this.original,n,this.sourcemapLocations),e.outro.length&&s.advance(e.outro)}),this.outro&&s.advance(this.outro),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?ne(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,mappings:s.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new ie(this.generateDecodedMap(e))}_ensureindentStr(){void 0===this.indentStr&&(this.indentStr=function(e){const t=e.split("\n"),s=t.filter(e=>/^\t+/.test(e)),i=t.filter(e=>/^ {2,}/.test(e));if(0===s.length&&0===i.length)return null;if(s.length>=i.length)return"\t";const n=i.reduce((e,t)=>{const s=/^ +/.exec(t)[0].length;return Math.min(s,e)},1/0);return new Array(n+1).join(" ")}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),null===this.indentStr?"\t":this.indentStr}indent(e,t){const s=/^[^\r\n]/gm;var i;if(i=e,"[object Object]"===re.call(i)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const n={};if((t=t||{}).exclude){("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(e=>{for(let t=e[0];t<e[1];t+=1)n[t]=!0})}let r=!1!==t.indentStart;const a=t=>r?`${e}${t}`:(r=!0,t);this.intro=this.intro.replace(s,a);let o=0,c=this.firstChunk;for(;c;){const t=c.end;if(c.edited)n[o]||(c.content=c.content.replace(s,a),c.content.length&&(r="\n"===c.content[c.content.length-1]));else for(o=c.start;o<t;){if(!n[o]){const t=this.original[o];"\n"===t?r=!0:"\r"!==t&&r&&(r=!1,o===c.start||(this._splitChunk(c,o),c=c.next),c.prependRight(e))}o+=1}o=c.end,c=c.next}return this.outro=this.outro.replace(s,a),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,t){return le.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),le.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return le.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),le.insertRight=!0),this.prependRight(e,t)}move(e,t,s){if(e+=this.offset,t+=this.offset,(s+=this.offset)>=e&&s<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(s);const i=this.byStart[e],n=this.byEnd[t],r=i.previous,a=n.next,o=this.byStart[s];if(!o&&n===this.lastChunk)return this;const c=o?o.previous:this.lastChunk;return r&&(r.next=a),a&&(a.previous=r),c&&(c.next=i),o&&(o.previous=n),i.previous||(this.firstChunk=n.next),n.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=c,n.next=o||null,c||(this.firstChunk=i),o||(this.lastChunk=n),this}overwrite(e,t,s,i){return i=i||{},this.update(e,t,s,{...i,overwrite:!i.contentOnly})}update(e,t,s,i){if(e+=this.offset,t+=this.offset,"string"!=typeof s)throw new TypeError("replacement content must be a string");if(0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(t),!0===i&&(le.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),le.storeName=!0),i={storeName:!0});const n=void 0!==i&&i.storeName,r=void 0!==i&&i.overwrite;if(n){const s=this.original.slice(e,t);Object.defineProperty(this.storedNames,s,{writable:!0,value:!0,enumerable:!0})}const a=this.byStart[e],o=this.byEnd[t];if(a){let e=a;for(;e!==o;){if(e.next!==this.byStart[e.end])throw new Error("Cannot overwrite across a split point");e=e.next,e.edit("",!1)}a.edit(s,n,!r)}else{const i=new ee(e,t,"").edit(s,n);o.next=i,i.previous=o}return this}prepend(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byEnd[e];return s?s.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byStart[e];return s?s.prependRight(t):this.outro=t+this.outro,this}remove(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let s=this.byStart[e];for(;s;)s.intro="",s.outro="",s.edit(""),s=t>s.end?this.byStart[s.end]:null;return this}reset(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let s=this.byStart[e];for(;s;)s.reset(),s=t>s.end?this.byStart[s.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(he);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,s=this.lastChunk;do{if(s.outro.length>0){if(e=s.outro.lastIndexOf(he),-1!==e)return s.outro.substr(e+1)+t;t=s.outro+t}if(s.content.length>0){if(e=s.content.lastIndexOf(he),-1!==e)return s.content.substr(e+1)+t;t=s.content+t}if(s.intro.length>0){if(e=s.intro.lastIndexOf(he),-1!==e)return s.intro.substr(e+1)+t;t=s.intro+t}}while(s=s.previous);return e=this.intro.lastIndexOf(he),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length-this.offset){if(e+=this.offset,t+=this.offset,0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}let s="",i=this.firstChunk;for(;i&&(i.start>e||i.end<=e);){if(i.start<t&&i.end>=t)return s;i=i.next}if(i&&i.edited&&i.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const n=i;for(;i;){!i.intro||n===i&&i.start!==e||(s+=i.intro);const r=i.start<t&&i.end>=t;if(r&&i.edited&&i.end!==t)throw new Error(`Cannot use replaced character ${t} as slice end anchor.`);const a=n===i?e-i.start:0,o=r?i.content.length+t-i.end:i.content.length;if(s+=i.content.slice(a,o),!i.outro||r&&i.end!==t||(s+=i.outro),r)break;i=i.next}return s}snip(e,t){const s=this.clone();return s.remove(0,e),s.remove(t,s.original.length),s}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk,s=t;const i=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);if(t=i?this.byStart[t.end]:this.byEnd[t.start],t===s)return;s=t}}_splitChunk(e,t){if(e.edited&&e.content.length){const s=ae(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${s.line}:${s.column} – "${e.original}")`)}const s=e.split(t);return this.byEnd[t]=e,this.byStart[t]=s,this.byEnd[s.end]=s,e===this.lastChunk&&(this.lastChunk=s),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,t=this.firstChunk;for(;t;)e+=t.toString(),t=t.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do{if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1}while(e=e.next);return!0}length(){let e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(e=e.next);return t}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const t=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let s=this.lastChunk;do{const e=s.end,i=s.trimEnd(t);if(s.end!==e&&(this.lastChunk===s&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),i)return!0;s=s.previous}while(s);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let s=this.firstChunk;do{const e=s.end,i=s.trimStart(t);if(s.end!==e&&(s===this.lastChunk&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),i)return!0;s=s.next}while(s);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function s(e,s){return"string"==typeof t?t.replace(/\$(\$|&|\d+)/g,(t,s)=>{if("$"===s)return"$";if("&"===s)return e[0];return+s<e.length?e[+s]:`$${s}`}):t(...e,e.index,s,e.groups)}if(e.global){const t=function(e,t){let s;const i=[];for(;s=e.exec(t);)i.push(s);return i}(e,this.original);t.forEach(e=>{if(null!=e.index){const t=s(e,this.original);t!==e[0]&&this.overwrite(e.index,e.index+e[0].length,t)}})}else{const t=this.original.match(e);if(t&&null!=t.index){const e=s(t,this.original);e!==t[0]&&this.overwrite(t.index,t.index+t[0].length,e)}}return this}_replaceString(e,t){const{original:s}=this,i=s.indexOf(e);return-1!==i&&("function"==typeof t&&(t=t(e,i,s)),e!==t&&this.overwrite(i,i+e.length,t)),this}replace(e,t){return"string"==typeof e?this._replaceString(e,t):this._replaceRegexp(e,t)}_replaceAllString(e,t){const{original:s}=this,i=e.length;for(let n=s.indexOf(e);-1!==n;n=s.indexOf(e,n+i)){const e=s.slice(n,n+i);let r=t;"function"==typeof t&&(r=t(e,n,s)),e!==r&&this.overwrite(n,n+i,r)}return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,t)}}function ue(e,t){const s=e.slice(0,t);return`${s.split("\n").length}:${t-s.lastIndexOf("\n")}`}function de({source:e,url:t,importChain:s}){const i=(e,i,n)=>new k(e,{importChain:s,phase:i,url:t},n);let n;try{[n]=function(e,t="@"){N=e,L=t;const s=2*N.length+(2<<18);if(s>I||!P){for(;s>I;)I*=2;E=new ArrayBuffer(I),_("xportportetaourceeferromsyncunctionlassvoyiedelecontininstantybreareturdebuggeawaithrwhileforifcatcfinallels",new Uint16Array(E,16,108)),P=function(e,t,s){"use asm";var i=new e.Int8Array(s),n=new e.Int16Array(s),r=new e.Int32Array(s),a=new e.Uint8Array(s),o=new e.Uint16Array(s),c=1040;function h(){var e=0,t=0,s=0,a=0,o=0,h=0,l=0,d=0,f=0;f=c;c=c+10240|0;i[808]=1;i[807]=0;n[401]=0;n[402]=0;r[70]=r[2];i[809]=0;r[68]=0;i[806]=0;r[71]=f+2048;r[72]=f;i[810]=0;e=(r[3]|0)+-2|0;r[73]=e;t=e+(r[66]<<1)|0;r[74]=t;e:while(1){s=e+2|0;r[73]=s;if(e>>>0>=t>>>0){a=19;break}t:do{switch(n[s>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if((((n[402]|0)==0?J(s)|0:0)?(E(e+4|0,16,10)|0)==0:0)?(u(),(i[808]|0)==0):0){a=9;break e}else a=18;break}case 105:{if(((n[e+4>>1]|0)==109?J(s)|0:0)?(E(e+6|0,26,8)|0)==0:0){p();a=18}else a=18;break}case 59:{a=18;break}case 47:switch(n[e+4>>1]|0){case 47:{B();break t}case 42:{P(1);break t}default:{a=17;break e}}default:{a=17;break e}}}while(0);if((a|0)==18){a=0;r[70]=r[73]}e=r[73]|0;t=r[74]|0}if((a|0)==9){e=r[73]|0;r[70]=e;a=20}else if((a|0)==17){i[808]=0;r[73]=e;a=20}else if((a|0)==19)if(!(i[806]|0)){e=s;a=20}else e=0;do{if((a|0)==20){e:while(1){s=e+2|0;r[73]=s;if(e>>>0>=(r[74]|0)>>>0){a=104;break}t=n[s>>1]|0;t:do{switch(t<<16>>16){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if(((n[402]|0)==0?J(s)|0:0)?(E(e+4|0,16,10)|0)==0:0){u();a=103}else a=103;break}case 105:{if(((n[e+4>>1]|0)==109?J(s)|0:0)?(E(e+6|0,26,8)|0)==0:0){p();a=103}else a=103;break}case 99:{if((((n[e+4>>1]|0)==108?J(s)|0:0)?(E(e+6|0,88,6)|0)==0:0)?V(n[e+12>>1]|0)|0:0){i[810]=1;a=103}else a=103;break}case 40:{s=r[71]|0;a=n[402]|0;r[s+((a&65535)<<3)>>2]=1;t=r[70]|0;n[402]=a+1<<16>>16;r[s+((a&65535)<<3)+4>>2]=t;a=103;break}case 91:{s=r[71]|0;a=n[402]|0;r[s+((a&65535)<<3)>>2]=8;t=r[70]|0;n[402]=a+1<<16>>16;r[s+((a&65535)<<3)+4>>2]=t;a=103;break}case 93:{e=n[402]|0;if(!(e<<16>>16)){a=40;break e}n[402]=e+-1<<16>>16;a=103;break}case 44:{t=n[401]|0;if(((t<<16>>16!=0?(o=n[402]|0,o<<16>>16!=0):0)?(r[(r[71]|0)+((o&65535)+-1<<3)>>2]|0)==5:0)?(h=r[(r[72]|0)+((t&65535)+-1<<2)>>2]|0,(r[h+4>>2]|0)==0):0){r[h+4>>2]=(r[70]|0)+2;r[73]=e+4;x(1)|0;a=r[73]|0;r[h+16>>2]=a;r[73]=a+-2;a=103}else a=103;break}case 41:{t=n[402]|0;if(!(t<<16>>16)){a=48;break e}n[402]=t+-1<<16>>16;s=n[401]|0;if(s<<16>>16!=0?(r[(r[71]|0)+((t+-1&65535)<<3)>>2]|0)==5:0){t=r[(r[72]|0)+((s&65535)+-1<<2)>>2]|0;if(!(r[t+4>>2]|0))r[t+4>>2]=(r[70]|0)+2;r[t+12>>2]=e+4;n[401]=s+-1<<16>>16;a=103}else a=103;break}case 123:{e=r[70]|0;a=r[62]|0;do{if((n[e>>1]|0)==41&(a|0)!=0?(r[a+12>>2]|0)==(e+2|0):0){t=r[63]|0;r[62]=t;if(!t){r[58]=0;break}else{r[t+36>>2]=0;break}}}while(0);s=r[71]|0;a=n[402]|0;r[s+((a&65535)<<3)>>2]=(i[810]|0)==0?2:6;n[402]=a+1<<16>>16;r[s+((a&65535)<<3)+4>>2]=e;i[810]=0;a=103;break}case 125:{e=n[402]|0;if(!(e<<16>>16)){a=61;break e}a=r[71]|0;n[402]=e+-1<<16>>16;if((r[a+((e+-1&65535)<<3)>>2]|0)==4){y();a=103}else a=103;break}case 34:case 39:{k(t);a=103;break}case 47:switch(n[e+4>>1]|0){case 47:{B();break t}case 42:{P(1);break t}default:{e=r[70]|0;t=n[e>>1]|0;s:do{if(!(I(t)|0))if(t<<16>>16==41){s=n[402]|0;if(!($(r[(r[71]|0)+((s&65535)<<3)+4>>2]|0)|0))a=76}else a=75;else switch(t<<16>>16){case 46:if(((n[e+-2>>1]|0)+-48&65535)<10){a=75;break s}else break s;case 43:if((n[e+-2>>1]|0)==43){a=75;break s}else break s;case 45:if((n[e+-2>>1]|0)==45){a=75;break s}else break s;default:break s}}while(0);if((a|0)==75){s=n[402]|0;a=76}s:do{if((a|0)==76){a=0;if(s<<16>>16!=0?(l=r[71]|0,d=(s&65535)+-1|0,t<<16>>16==102?(r[l+(d<<3)>>2]|0)==1:0):0){if(((n[e+-2>>1]|0)==111?T(e+-4|0)|0:0)?D(r[l+(d<<3)+4>>2]|0,196,3)|0:0)break}else a=81;if((a|0)==81?(0,t<<16>>16==125):0){a=r[71]|0;s=s&65535;if(C(r[a+(s<<3)+4>>2]|0)|0)break;if((r[a+(s<<3)>>2]|0)==6)break}if(!(m(e)|0)){switch(t<<16>>16){case 0:break s;case 47:{if(i[809]|0)break s;break}default:{}}a=r[64]|0;if((a|0?e>>>0>=(r[a>>2]|0)>>>0:0)?e>>>0<=(r[a+4>>2]|0)>>>0:0){v();i[809]=0;a=103;break t}s=r[3]|0;do{if(e>>>0<=s>>>0)break;e=e+-2|0;r[70]=e;t=n[e>>1]|0}while(!(R(t)|0));if(H(t)|0){do{if(e>>>0<=s>>>0)break;e=e+-2|0;r[70]=e}while(H(n[e>>1]|0)|0);if(O(e)|0){v();i[809]=0;a=103;break t}}i[809]=1;a=103;break t}}}while(0);v();i[809]=0;a=103;break t}}case 96:{s=r[71]|0;a=n[402]|0;r[s+((a&65535)<<3)+4>>2]=r[70];n[402]=a+1<<16>>16;r[s+((a&65535)<<3)>>2]=3;y();a=103;break}default:a=103}}while(0);if((a|0)==103){a=0;r[70]=r[73]}e=r[73]|0}if((a|0)==40){te();e=0;break}else if((a|0)==48){te();e=0;break}else if((a|0)==61){te();e=0;break}else if((a|0)==104){e=(i[806]|0)==0?(n[401]|n[402])<<16>>16==0:0;break}}}while(0);c=f;return e|0}function l(e){e=e|0;var t=0,s=0,a=0,o=0,c=0,h=0,l=0,d=0,f=0,g=0,b=0,S=0,w=0,A=0,_=0;S=n[402]|0;t=r[73]|0;r[70]=t;l=t;b=t;d=S;g=0;e:while(1){s=r[74]|0;o=d<<16>>16==S<<16>>16;a=g&e;h=t;while(1){c=h+2|0;if(h>>>0>=s>>>0){t=0;f=100;break e}t=n[c>>1]|0;if(!(H(t)|0)){if(o){switch(t<<16>>16){case 125:case 93:case 41:case 59:case 44:{f=100;break e}default:{}}if(a?he(t)|0:0){f=100;break e}}if(!(he(t)|0))break}h=c}r[73]=c;t:do{switch(t<<16>>16){case 101:{if((d<<16>>16==0?J(c)|0:0)?(E(h+4|0,16,10)|0)==0:0){u();f=89}else f=89;break}case 105:{if(((n[h+4>>1]|0)==109?J(c)|0:0)?(E(h+6|0,26,8)|0)==0:0){p();f=89}else f=89;break}case 99:{if((((n[h+4>>1]|0)==108?J(c)|0:0)?(E(h+6|0,88,6)|0)==0:0)?V(n[h+12>>1]|0)|0:0){i[810]=1;f=89}else f=89;break}case 40:{h=r[71]|0;f=d&65535;r[h+(f<<3)>>2]=1;n[402]=d+1<<16>>16;r[h+(f<<3)+4>>2]=l;f=89;break}case 91:{h=r[71]|0;f=d&65535;r[h+(f<<3)>>2]=8;n[402]=d+1<<16>>16;r[h+(f<<3)+4>>2]=l;f=89;break}case 93:if(!(d<<16>>16)){te();break t}else{n[402]=d+-1<<16>>16;f=89;break t}case 44:{s=n[401]|0;if((!(d<<16>>16==0|s<<16>>16==0)?(r[(r[71]|0)+((d&65535)+-1<<3)>>2]|0)==5:0)?(w=r[(r[72]|0)+((s&65535)+-1<<2)>>2]|0,(r[w+4>>2]|0)==0):0){r[w+4>>2]=b+2;r[73]=h+4;x(1)|0;f=r[73]|0;r[w+16>>2]=f;r[73]=f+-2;f=89}else f=89;break}case 41:{if(!(d<<16>>16)){te();break t}f=d+-1<<16>>16;n[402]=f;s=n[401]|0;if(s<<16>>16!=0?(r[(r[71]|0)+((f&65535)<<3)>>2]|0)==5:0){a=r[(r[72]|0)+((s&65535)+-1<<2)>>2]|0;if(!(r[a+4>>2]|0))r[a+4>>2]=b+2;r[a+12>>2]=h+4;n[401]=s+-1<<16>>16;f=89}else f=89;break}case 123:{f=r[62]|0;do{if((n[b>>1]|0)==41&(f|0)!=0?(r[f+12>>2]|0)==(b+2|0):0){s=r[63]|0;r[62]=s;if(!s){r[58]=0;break}else{r[s+36>>2]=0;break}}}while(0);h=r[71]|0;f=d&65535;r[h+(f<<3)>>2]=(i[810]|0)==0?2:6;n[402]=d+1<<16>>16;r[h+(f<<3)+4>>2]=l;i[810]=0;f=89;break}case 125:{if(!(d<<16>>16)){te();break t}l=r[71]|0;f=d+-1<<16>>16;n[402]=f;if((r[l+((f&65535)<<3)>>2]|0)==4){y();f=89}else f=89;break}case 34:case 39:{k(t);f=89;break}case 47:switch(n[h+4>>1]|0){case 47:{B();break t}case 42:{P(1);break t}default:{a=n[b>>1]|0;s:do{if(!(I(a)|0)){if(!(a<<16>>16==41?$(r[(r[71]|0)+((d&65535)<<3)+4>>2]|0)|0:0))f=62}else switch(a<<16>>16){case 46:if(((n[b+-2>>1]|0)+-48&65535)<10){f=62;break s}else break s;case 43:if((n[b+-2>>1]|0)==43){f=62;break s}else break s;case 45:if((n[b+-2>>1]|0)==45){f=62;break s}else break s;default:break s}}while(0);s:do{if((f|0)==62){f=0;if(d<<16>>16!=0?(A=r[71]|0,_=(d&65535)+-1|0,a<<16>>16==102?(r[A+(_<<3)>>2]|0)==1:0):0){if(((n[b+-2>>1]|0)==111?T(b+-4|0)|0:0)?D(r[A+(_<<3)+4>>2]|0,196,3)|0:0)break}else f=67;if((f|0)==67?(0,a<<16>>16==125):0){o=r[71]|0;s=d&65535;if(C(r[o+(s<<3)+4>>2]|0)|0)break;if((r[o+(s<<3)>>2]|0)==6)break}if(!(m(b)|0)){switch(a<<16>>16){case 0:break s;case 47:{if(i[809]|0)break s;break}default:{}}f=r[64]|0;if((f|0?b>>>0>=(r[f>>2]|0)>>>0:0)?b>>>0<=(r[f+4>>2]|0)>>>0:0){v();i[809]=0;f=89;break t}o=r[3]|0;s=b;do{if(s>>>0<=o>>>0)break;s=s+-2|0;r[70]=s;a=n[s>>1]|0}while(!(R(a)|0));if(H(a)|0){do{if(s>>>0<=o>>>0)break;s=s+-2|0;r[70]=s}while(H(n[s>>1]|0)|0);if(O(s)|0){v();i[809]=0;f=89;break t}}i[809]=1;f=89;break t}}}while(0);v();i[809]=0;f=89;break t}}case 96:{h=r[71]|0;f=d&65535;r[h+(f<<3)+4>>2]=l;n[402]=d+1<<16>>16;r[h+(f<<3)>>2]=3;y();f=89;break}default:f=89}}while(0);if((f|0)==89){f=0;r[70]=r[73]}if(i[806]|0){t=0;break}s=r[70]|0;t:do{if((s|0)==(b|0))if(g&((n[402]|0)==S<<16>>16&e)){t=n[r[73]>>1]|0;if(he(t)|0)break e;else t=1}else t=g;else{if(t<<16>>16==47){t=(i[809]|0)==0;break}if(j(t)|0)t=1;else{switch(t<<16>>16){case 96:case 34:case 39:case 41:case 93:case 125:{t=1;break t}default:{}}t=0}}}while(0);l=s;b=s;d=n[402]|0;g=t;t=r[73]|0}if((f|0)==100)r[73]=c;return t|0}function p(){var e=0,t=0,s=0,a=0,o=0,c=0;c=r[73]|0;r[73]=c+12;e=x(1)|0;s=r[73]|0;e:do{if(e<<16>>16!=46){if(!(e<<16>>16==115&s>>>0>(c+12|0)>>>0)){if(!(e<<16>>16==100&s>>>0>(c+10|0)>>>0)){s=0;o=28;break}if(E(s+2|0,50,8)|0){t=s;e=100;s=0;o=60;break}if(!(V(n[s+10>>1]|0)|0)){t=s;e=100;s=0;o=60;break}r[73]=s+10;e=x(1)|0;if(e<<16>>16==42){e=42;a=2;o=62;break}r[73]=s;s=0;o=28;break}if((E(s+2|0,40,10)|0)==0?V(n[s+12>>1]|0)|0:0){r[73]=s+12;e=x(1)|0;t=r[73]|0;if((t|0)!=(s+12|0)){if(e<<16>>16!=102){s=1;o=28;break}if(E(t+2|0,58,6)|0){e=102;s=1;o=60;break}if(!(R(n[t+8>>1]|0)|0)){e=102;s=1;o=60;break}}r[73]=s;s=0;o=28}else{t=s;e=115;s=0;o=60}}else{r[73]=s+2;switch((x(1)|0)<<16>>16){case 109:{e=r[73]|0;if(E(e+2|0,34,6)|0)break e;t=r[70]|0;if(!(K(t)|0)?(n[t>>1]|0)==46:0)break e;g(c,c,e+8|0,2);break e}case 115:{e=r[73]|0;if(E(e+2|0,40,10)|0)break e;t=r[70]|0;if(!(K(t)|0)?(n[t>>1]|0)==46:0)break e;r[73]=e+12;e=x(1)|0;s=1;o=28;break e}case 100:{e=r[73]|0;if(E(e+2|0,50,8)|0)break e;t=r[70]|0;if(!(K(t)|0)?(n[t>>1]|0)==46:0)break e;r[73]=e+10;e=x(1)|0;s=2;o=28;break e}default:break e}}}while(0);e:do{if((o|0)==28){if(e<<16>>16==40){t=r[71]|0;a=n[402]|0;r[t+((a&65535)<<3)>>2]=5;e=r[73]|0;n[402]=a+1<<16>>16;r[t+((a&65535)<<3)+4>>2]=e;if((n[r[70]>>1]|0)==46)break;r[73]=e+2;t=x(1)|0;g(c,r[73]|0,0,e);if(!s)e=r[62]|0;else{e=r[62]|0;r[e+28>>2]=(s|0)==1?5:7}a=r[72]|0;c=n[401]|0;n[401]=c+1<<16>>16;r[a+((c&65535)<<2)>>2]=e;switch(t<<16>>16){case 39:{k(39);break}case 34:{k(34);break}case 96:{if(!(S()|0))o=37;break}default:o=37}if((o|0)==37){r[73]=(r[73]|0)+-2;break}e=(r[73]|0)+2|0;r[73]=e;switch((x(1)|0)<<16>>16){case 44:{r[73]=(r[73]|0)+2;x(1)|0;a=r[62]|0;r[a+4>>2]=e;c=r[73]|0;r[a+16>>2]=c;i[a+24>>0]=1;r[73]=c+-2;break e}case 41:{n[402]=(n[402]|0)+-1<<16>>16;c=r[62]|0;r[c+4>>2]=e;r[c+12>>2]=(r[73]|0)+2;i[c+24>>0]=1;n[401]=(n[401]|0)+-1<<16>>16;break e}default:{r[73]=(r[73]|0)+-2;break e}}}if(!((s|0)==0&e<<16>>16==123)){switch(e<<16>>16){case 42:case 39:case 34:{a=s;o=62;break e}default:{}}t=r[73]|0;o=60;break}e=r[73]|0;if(n[402]|0){r[73]=e+-2;break}while(1){if(e>>>0>=(r[74]|0)>>>0)break;e=x(1)|0;if(!(se(e)|0)){if(e<<16>>16==125){o=50;break}}else k(e);e=(r[73]|0)+2|0;r[73]=e}if((o|0)==50)r[73]=(r[73]|0)+2;a=(x(1)|0)<<16>>16==102;e=r[73]|0;if(a?E(e+2|0,58,6)|0:0){te();break}r[73]=e+8;e=x(1)|0;if(se(e)|0){d(c,e,0);break}else{te();break}}}while(0);if((o|0)==60)if((t|0)==(c+12|0))r[73]=c+10;else{a=s;o=62}do{if((o|0)==62){if(!((e<<16>>16==42|(a|0)!=2)&(n[402]|0)==0)){r[73]=(r[73]|0)+-2;break}e=r[74]|0;t=r[73]|0;while(1){if(t>>>0>=e>>>0){o=69;break}s=n[t>>1]|0;if(se(s)|0){o=67;break}o=t+2|0;r[73]=o;t=o}if((o|0)==67){d(c,s,a);break}else if((o|0)==69){te();break}}}while(0);return}function u(){var e=0,t=0,s=0,a=0,o=0,c=0,h=0,p=0,u=0,f=0;p=r[73]|0;u=r[64]|0;r[73]=p+12;t=x(1)|0;e=r[73]|0;if(!((e|0)==(p+12|0)?!(A(t)|0):0))f=3;e:do{if((f|0)==3){r[65]=p;t:do{switch(t<<16>>16){case 123:{r[73]=e+2;e=x(1)|0;t=r[73]|0;while(1){if(se(e)|0){k(e);e=(r[73]|0)+2|0;r[73]=e}else{U(e)|0;e=r[73]|0}x(1)|0;e=b(t,e)|0;if(e<<16>>16==44){r[73]=(r[73]|0)+2;e=x(1)|0}if(e<<16>>16==125){f=15;break}f=t;t=r[73]|0;if((t|0)==(f|0)){f=12;break}if(t>>>0>(r[74]|0)>>>0){f=14;break}}if((f|0)==12){te();break e}else if((f|0)==14){te();break e}else if((f|0)==15){i[807]=1;r[73]=(r[73]|0)+2;break t}break}case 42:{r[73]=e+2;x(1)|0;f=r[73]|0;b(f,f)|0;break}default:{i[808]=0;switch(t<<16>>16){case 100:{r[73]=e+14;switch((x(1)|0)<<16>>16){case 97:{t=r[73]|0;if((E(t+2|0,64,8)|0)==0?H(n[t+10>>1]|0)|0:0){r[73]=t+10;x(0)|0;f=22}break}case 102:{f=22;break}case 99:{t=r[73]|0;if(((E(t+2|0,86,8)|0)==0?(u=n[t+10>>1]|0,V(u)|0|u<<16>>16==123):0)?(r[73]=t+10,s=x(1)|0,s<<16>>16!=123):0){h=s;f=31}break}default:{}}s:do{if((f|0)==22?(a=r[73]|0,(E(a+2|0,72,14)|0)==0):0){t=n[a+16>>1]|0;if(!(V(t)|0))switch(t<<16>>16){case 40:case 42:break;default:break s}r[73]=a+16;t=x(1)|0;if(t<<16>>16==42){r[73]=(r[73]|0)+2;t=x(1)|0}if(t<<16>>16!=40){h=t;f=31}}}while(0);if((f|0)==31?(o=r[73]|0,U(h)|0,c=r[73]|0,c>>>0>o>>>0):0){_(e,e+14|0,o,c);r[73]=(r[73]|0)+-2;break e}_(e,e+14|0,0,0);r[73]=e+12;break e}case 97:{r[73]=e+10;x(0)|0;e=r[73]|0;f=35;break}case 102:{f=35;break}case 99:{if((E(e+2|0,86,8)|0)==0?R(n[e+10>>1]|0)|0:0){r[73]=e+10;f=x(1)|0;u=r[73]|0;U(f)|0;f=r[73]|0;_(u,f,u,f);r[73]=(r[73]|0)+-2;break e}r[73]=e+4;e=e+4|0;break}case 108:case 118:break;default:break e}if((f|0)==35){r[73]=e+16;e=x(1)|0;if(e<<16>>16==42){r[73]=(r[73]|0)+2;e=x(1)|0}u=r[73]|0;U(e)|0;f=r[73]|0;_(u,f,u,f);r[73]=(r[73]|0)+-2;break e}r[73]=e+6;i[808]=0;while(1){t=x(1)|0;e=r[73]|0;if(e>>>0>(r[74]|0)>>>0)break;t=M(t)|0;if((r[73]|0)==(e|0))break;if(t<<16>>16==61)t=l(1)|0;e=r[73]|0;if(t<<16>>16!=44)break;r[73]=e+2}r[73]=e+-2;break e}}}while(0);f=(x(1)|0)<<16>>16==102;e=r[73]|0;if(f?(E(e+2|0,58,6)|0)==0:0){r[73]=e+8;d(p,x(1)|0,0);e=(u|0)==0?236:u+20|0;while(1){e=r[e>>2]|0;if(!e)break e;r[e+12>>2]=0;r[e+8>>2]=0;e=e+20|0}}r[73]=e+-2}}while(0);return}function d(e,t,s){e=e|0;t=t|0;s=s|0;var i=0,a=0,o=0,c=0,h=0;i=(r[73]|0)+2|0;switch(t<<16>>16){case 39:{k(39);a=5;break}case 34:{k(34);a=5;break}default:te()}do{if((a|0)==5){g(e,i,r[73]|0,1);if((s|0)>0)r[(r[62]|0)+28>>2]=(s|0)==1?4:6;r[73]=(r[73]|0)+2;c=(x(0)|0)<<16>>16==119;o=r[73]|0;if(((c?(n[o+2>>1]|0)==105:0)?(n[o+4>>1]|0)==116:0)?(n[o+6>>1]|0)==104:0){r[73]=o+8;if((x(1)|0)<<16>>16!=123){r[73]=o;break}c=r[73]|0;i=c;a=0;e:while(1){r[73]=i+2;i=x(1)|0;do{if(i<<16>>16!=39){t=r[73]|0;if(i<<16>>16==34){k(34);e=(r[73]|0)+2|0;r[73]=e;i=x(1)|0;break}else{i=U(i)|0;e=r[73]|0;break}}else{t=r[73]|0;k(39);e=(r[73]|0)+2|0;r[73]=e;i=x(1)|0}}while(0);if(i<<16>>16!=58){a=21;break}r[73]=(r[73]|0)+2;switch((x(1)|0)<<16>>16){case 39:{i=r[73]|0;k(39);break}case 34:{i=r[73]|0;k(34);break}default:{a=25;break e}}h=(r[73]|0)+2|0;s=r[67]|0;r[67]=s+20;r[s>>2]=t;r[s+4>>2]=e;r[s+8>>2]=i;r[s+12>>2]=h;r[s+16>>2]=0;r[((a|0)==0?(r[62]|0)+32|0:a+16|0)>>2]=s;r[73]=(r[73]|0)+2;switch((x(1)|0)<<16>>16){case 125:{a=29;break e}case 44:break;default:{a=27;break e}}i=(r[73]|0)+2|0;r[73]=i;a=s}if((a|0)==21){r[73]=o;break}else if((a|0)==25){r[73]=o;break}else if((a|0)==27){r[73]=o;break}else if((a|0)==29){h=r[62]|0;r[h+16>>2]=c;r[h+12>>2]=(r[73]|0)+2;break}}r[73]=o+-2}}while(0);return}function f(){var e=0,t=0,s=0,i=0,a=0,o=0,c=0;e=r[73]|0;a=(n[e>>1]|0)==123;r[73]=e+2;e=x(1)|0;o=a?125:93;e:while(1){if((o|0)==(e&65535|0))break;i=r[73]|0;if(i>>>0>(r[74]|0)>>>0)break;if((e<<16>>16==46?(n[i+2>>1]|0)==46:0)?(n[i+4>>1]|0)==46:0){r[73]=i+6;e=M(x(1)|0)|0}else c=9;t:do{if((c|0)==9){c=0;do{if(a){do{if(e<<16>>16==91){l(0)|0;r[73]=(r[73]|0)+2;t=i}else{if(se(e)|0){k(e);r[73]=(r[73]|0)+2;t=i;break}if((e+-48&65535)>=10){U(e)|0;t=r[73]|0;break}e=i;s:while(1){s=e+2|0;t=n[s>>1]|0;i:do{if((t+-48&65535)>=10){switch(t<<16>>16){case 67:case 68:case 70:case 97:case 65:case 99:case 100:case 102:case 46:case 66:case 69:case 79:case 88:case 95:case 98:case 101:case 110:case 111:case 120:break i;case 43:case 45:break;default:break s}switch(n[e>>1]|0){case 69:case 101:break;default:break s}}}while(0);e=s}r[73]=s;t=i}}while(0);e=x(1)|0;if(e<<16>>16==58){r[73]=(r[73]|0)+2;e=M(x(1)|0)|0;break}if(t>>>0>i>>>0)_(i,t,i,t)}else if(e<<16>>16==44){r[73]=i+2;e=x(1)|0;break t}else{e=M(e)|0;break}}while(0);if(e<<16>>16==61)e=l(0)|0;if(e<<16>>16!=44)break e;r[73]=(r[73]|0)+2;e=x(1)|0}}while(0)}return}function m(e){e=e|0;e:do{switch(n[e>>1]|0){case 100:switch(n[e+-2>>1]|0){case 105:{e=D(e+-4|0,94,2)|0;break e}case 108:{e=D(e+-4|0,98,3)|0;break e}default:{e=0;break e}}case 101:switch(n[e+-2>>1]|0){case 115:switch(n[e+-4>>1]|0){case 108:{e=F(e+-6|0,101)|0;break e}case 97:{e=F(e+-6|0,99)|0;break e}default:{e=0;break e}}case 116:{e=D(e+-4|0,104,4)|0;break e}case 117:{e=D(e+-4|0,112,6)|0;break e}default:{e=0;break e}}case 102:{if((n[e+-2>>1]|0)==111?(n[e+-4>>1]|0)==101:0)switch(n[e+-6>>1]|0){case 99:{e=D(e+-8|0,124,6)|0;break e}case 112:{e=D(e+-8|0,136,2)|0;break e}default:{e=0;break e}}else e=0;break}case 107:{e=D(e+-2|0,140,4)|0;break}case 110:{if(F(e+-2|0,105)|0)e=1;else e=D(e+-2|0,148,5)|0;break}case 111:{e=F(e+-2|0,100)|0;break}case 114:{e=D(e+-2|0,158,7)|0;break}case 116:{e=D(e+-2|0,172,4)|0;break}case 119:switch(n[e+-2>>1]|0){case 101:{e=F(e+-4|0,110)|0;break e}case 111:{e=D(e+-4|0,180,3)|0;break e}default:{e=0;break e}}default:e=0}}while(0);return e|0}function y(){var e=0,t=0,s=0;t=r[74]|0;s=r[73]|0;e:while(1){e=s+2|0;if(s>>>0>=t>>>0){t=10;break}switch(n[e>>1]|0){case 96:{t=7;break e}case 36:{if((n[s+4>>1]|0)==123){t=6;break e}break}case 92:{e=s+4|0;break}default:{}}s=e}if((t|0)==6){e=s+4|0;r[73]=e;t=r[71]|0;s=n[402]|0;r[t+((s&65535)<<3)>>2]=4;n[402]=s+1<<16>>16;r[t+((s&65535)<<3)+4>>2]=e}else if((t|0)==7){r[73]=e;t=r[71]|0;s=(n[402]|0)+-1<<16>>16;n[402]=s;if((r[t+((s&65535)<<3)>>2]|0)!=3)te()}else if((t|0)==10){r[73]=e;te()}return}function x(e){e=e|0;var t=0,s=0,i=0;s=r[73]|0;e:do{t=n[s>>1]|0;t:do{if(t<<16>>16!=47)if(e)if(V(t)|0)break;else break e;else if(H(t)|0)break;else break e;else switch(n[s+2>>1]|0){case 47:{B();break t}case 42:{P(e);break t}default:{t=47;break e}}}while(0);i=r[73]|0;s=i+2|0;r[73]=s}while(i>>>0<(r[74]|0)>>>0);return t|0}function g(e,t,s,n){e=e|0;t=t|0;s=s|0;n=n|0;var a=0,o=0;o=r[67]|0;r[67]=o+40;a=r[62]|0;r[((a|0)==0?232:a+36|0)>>2]=o;r[63]=a;r[62]=o;r[o+8>>2]=e;if(2==(n|0)){e=3;a=s}else{e=1==(n|0)?1:2;a=1==(n|0)?s+2|0:0}r[o+12>>2]=a;r[o+28>>2]=e;r[o>>2]=t;r[o+4>>2]=s;r[o+16>>2]=0;r[o+20>>2]=n;i[o+24>>0]=1==(n|0)&1;r[o+32>>2]=0;r[o+36>>2]=0;if(1==(n|0)|2==(n|0))i[807]=1;return}function k(e){e=e|0;var t=0,s=0,i=0,a=0;a=r[74]|0;t=r[73]|0;while(1){i=t+2|0;if(t>>>0>=a>>>0){t=9;break}s=n[i>>1]|0;if(s<<16>>16==e<<16>>16){t=10;break}if(s<<16>>16==92){s=t+4|0;if((n[s>>1]|0)==13){t=t+6|0;t=(n[t>>1]|0)==10?t:s}else t=s}else if(he(s)|0){t=9;break}else t=i}if((t|0)==9){r[73]=i;te()}else if((t|0)==10)r[73]=i;return}function T(e){e=e|0;var t=0,s=0;t=n[e>>1]|0;if(V(t)|0)s=3;else switch(t<<16>>16){case 41:case 125:case 93:{s=3;break}default:e=0}e:do{if((s|0)==3){s=r[3]|0;while(1){if(e>>>0<=s>>>0)break;e=e+-2|0;if(!(V(t)|0))break;t=n[e>>1]|0}switch(t<<16>>16){case 41:case 125:case 93:{e=1;break e}default:{}}e=(A(t)|0)^1}}while(0);return e|0}function b(e,t){e=e|0;t=t|0;var s=0,i=0,a=0,o=0;s=r[73]|0;i=n[s>>1]|0;a=(e|0)==(t|0)?0:e;o=(e|0)==(t|0)?0:t;if(i<<16>>16==97){r[73]=s+4;s=x(1)|0;e=r[73]|0;if(se(s)|0){k(s);t=(r[73]|0)+2|0;r[73]=t}else{U(s)|0;t=r[73]|0}i=x(1)|0;s=r[73]|0}if((s|0)!=(e|0))_(e,t,a,o);return i|0}function S(){var e=0,t=0,s=0,i=0;i=r[73]|0;s=r[74]|0;t=i;e:while(1){e=t+2|0;if(t>>>0>=s>>>0){t=7;break}switch(n[e>>1]|0){case 96:{t=8;break e}case 92:{e=t+4|0;break}case 36:{if((n[t+4>>1]|0)==123){t=7;break e}break}default:{}}t=e}if((t|0)==7){r[73]=i;e=0}else if((t|0)==8){r[73]=e;e=1}return e|0}function w(){var e=0,t=0,s=0;s=r[74]|0;t=r[73]|0;e:while(1){e=t+2|0;if(t>>>0>=s>>>0){t=6;break}switch(n[e>>1]|0){case 13:case 10:{t=6;break e}case 93:{t=7;break e}case 92:{e=t+4|0;break}default:{}}t=e}if((t|0)==6){r[73]=e;te();e=0}else if((t|0)==7){r[73]=e;e=93}return e|0}function v(){var e=0,t=0;e:while(1){e=r[73]|0;r[73]=e+2;if(e>>>0>=(r[74]|0)>>>0){t=7;break}switch(n[e+2>>1]|0){case 13:case 10:{t=7;break e}case 47:break e;case 91:{w()|0;break}case 92:{r[73]=e+4;break}default:{}}}if((t|0)==7)te();return}function C(e){e=e|0;switch(n[e>>1]|0){case 62:{e=(n[e+-2>>1]|0)==61;break}case 41:case 59:{e=1;break}case 104:{e=D(e+-2|0,206,4)|0;break}case 121:{e=D(e+-2|0,214,6)|0;break}case 101:{e=D(e+-2|0,226,3)|0;break}default:e=0}return e|0}function P(e){e=e|0;var t=0,s=0,i=0,a=0,o=0;a=(r[73]|0)+2|0;r[73]=a;s=r[74]|0;while(1){t=a+2|0;if(a>>>0>=s>>>0)break;i=n[t>>1]|0;if(!e?he(i)|0:0)break;if(i<<16>>16==42?(n[a+4>>1]|0)==47:0){o=8;break}a=t}if((o|0)==8){r[73]=t;t=a+4|0}r[73]=t;return}function E(e,t,s){e=e|0;t=t|0;s=s|0;var n=0,r=0;e:do{if(!s)e=0;else{while(1){n=i[e>>0]|0;r=i[t>>0]|0;if(n<<24>>24!=r<<24>>24)break;s=s+-1|0;if(!s){e=0;break e}else{e=e+1|0;t=t+1|0}}e=(n&255)-(r&255)|0}}while(0);return e|0}function A(e){e=e|0;e:do{switch(e<<16>>16){case 38:case 37:case 33:{e=1;break}default:if((e&-8)<<16>>16==40|(e+-58&65535)<6)e=1;else{switch(e<<16>>16){case 91:case 93:case 94:{e=1;break e}default:{}}e=(e+-123&65535)<4}}}while(0);return e|0}function I(e){e=e|0;e:do{switch(e<<16>>16){case 38:case 37:case 33:break;default:if(!((e+-58&65535)<6|(e+-40&65535)<7&e<<16>>16!=41)){switch(e<<16>>16){case 91:case 94:break e;default:{}}return e<<16>>16!=125&(e+-123&65535)<4|0}}}while(0);return 1}function _(e,t,s,n){e=e|0;t=t|0;s=s|0;n=n|0;var a=0,o=0;a=r[67]|0;r[67]=a+24;o=r[64]|0;r[((o|0)==0?236:o+20|0)>>2]=a;r[64]=a;r[a>>2]=e;r[a+4>>2]=t;r[a+8>>2]=s;r[a+12>>2]=n;r[a+16>>2]=r[65];r[a+20>>2]=0;i[807]=1;return}function N(e){e=e|0;var t=0;t=n[e>>1]|0;e:do{if((t+-9&65535)>=5){switch(t<<16>>16){case 160:case 32:{t=1;break e}default:{}}if(A(t)|0)return t<<16>>16!=46|(K(e)|0)|0;else t=0}else t=1}while(0);return t|0}function L(e){e=e|0;var t=0,s=0;s=c;c=c+16|0;r[s>>2]=0;r[66]=e;t=r[3]|0;n[t+(e<<1)>>1]=0;r[s>>2]=t+(e<<1)+2;r[67]=t+(e<<1)+2;r[58]=0;r[62]=0;r[60]=0;r[59]=0;r[64]=0;r[61]=0;c=s;return t|0}function D(e,t,s){e=e|0;t=t|0;s=s|0;var i=0,n=0;n=e+(0-s<<1)+2|0;i=r[3]|0;if(n>>>0>=i>>>0?(E(n,t,s<<1)|0)==0:0)if((n|0)==(i|0))i=1;else i=N(e+(0-s<<1)|0)|0;else i=0;return i|0}function M(e){e=e|0;var t=0;switch(e<<16>>16){case 91:case 123:{f();r[73]=(r[73]|0)+2;break}default:{t=r[73]|0;U(e)|0;e=r[73]|0;if(e>>>0>t>>>0)_(t,e,t,e)}}return x(1)|0}function O(e){e=e|0;switch(n[e>>1]|0){case 107:{e=D(e+-2|0,140,4)|0;break}case 101:{if((n[e+-2>>1]|0)==117)e=D(e+-4|0,112,6)|0;else e=0;break}default:e=0}return e|0}function F(e,t){e=e|0;t=t|0;var s=0;s=r[3]|0;if(s>>>0<=e>>>0?(n[e>>1]|0)==t<<16>>16:0)if((s|0)==(e|0))s=1;else s=R(n[e+-2>>1]|0)|0;else s=0;return s|0}function R(e){e=e|0;e:do{if((e+-9&65535)<5)e=1;else{switch(e<<16>>16){case 32:case 160:{e=1;break e}default:{}}e=e<<16>>16!=46&(A(e)|0)}}while(0);return e|0}function B(){var e=0,t=0,s=0;e=r[74]|0;s=r[73]|0;e:while(1){t=s+2|0;if(s>>>0>=e>>>0)break;switch(n[t>>1]|0){case 13:case 10:break e;default:s=t}}r[73]=t;return}function j(e){e=e|0;e:do{if(((e&-33)+-65&65535)<26|(e+-48&65535)<10)e=1;else{switch(e<<16>>16){case 36:case 95:{e=1;break e}default:{}}e=(e&65535)>127}}while(0);return e|0}function U(e){e=e|0;while(1){if(V(e)|0)break;if(A(e)|0)break;e=(r[73]|0)+2|0;r[73]=e;e=n[e>>1]|0;if(!(e<<16>>16)){e=0;break}}return e|0}function q(){var e=0;e=r[(r[60]|0)+20>>2]|0;switch(e|0){case 1:{e=-1;break}case 2:{e=-2;break}default:e=e-(r[3]|0)>>1}return e|0}function $(e){e=e|0;if(!(D(e,186,5)|0)?!(D(e,196,3)|0):0)e=D(e,202,2)|0;else e=1;return e|0}function V(e){e=e|0;switch(e<<16>>16){case 160:case 9:case 10:case 11:case 12:case 13:case 32:{e=1;break}default:e=0}return e|0}function H(e){e=e|0;switch(e<<16>>16){case 160:case 32:case 12:case 11:case 9:{e=1;break}default:e=0}return e|0}function K(e){e=e|0;if((n[e>>1]|0)==46?(n[e+-2>>1]|0)==46:0)e=(n[e+-4>>1]|0)==46;else e=0;return e|0}function z(){var e=0;e=r[69]|0;e=r[((e|0)==0?(r[60]|0)+32|0:e+16|0)>>2]|0;r[69]=e;return(e|0)!=0|0}function J(e){e=e|0;if((r[3]|0)==(e|0))e=1;else e=N(e+-2|0)|0;return e|0}function W(){var e=0;e=r[(r[61]|0)+12>>2]|0;if(!e)e=-1;else e=e-(r[3]|0)>>1;return e|0}function X(){var e=0;e=r[(r[60]|0)+12>>2]|0;if(!e)e=-1;else e=e-(r[3]|0)>>1;return e|0}function G(){var e=0;e=r[(r[61]|0)+8>>2]|0;if(!e)e=-1;else e=e-(r[3]|0)>>1;return e|0}function Y(){var e=0;e=r[(r[60]|0)+16>>2]|0;if(!e)e=-1;else e=e-(r[3]|0)>>1;return e|0}function Q(){var e=0;e=r[(r[60]|0)+4>>2]|0;if(!e)e=-1;else e=e-(r[3]|0)>>1;return e|0}function Z(){var e=0;e=r[60]|0;e=r[((e|0)==0?232:e+36|0)>>2]|0;r[60]=e;return(e|0)!=0|0}function ee(){var e=0;e=r[61]|0;e=r[((e|0)==0?236:e+20|0)>>2]|0;r[61]=e;return(e|0)!=0|0}function te(){i[806]=1;r[68]=(r[73]|0)-(r[3]|0)>>1;r[73]=(r[74]|0)+2;return}function se(e){e=e|0;return e<<16>>16==39|e<<16>>16==34|0}function ie(){return(r[(r[61]|0)+16>>2]|0)-(r[3]|0)>>1|0}function ne(){return(r[(r[69]|0)+12>>2]|0)-(r[3]|0)>>1|0}function re(){return(r[(r[69]|0)+8>>2]|0)-(r[3]|0)>>1|0}function ae(){return(r[(r[69]|0)+4>>2]|0)-(r[3]|0)>>1|0}function oe(){return(r[(r[60]|0)+8>>2]|0)-(r[3]|0)>>1|0}function ce(){return(r[(r[61]|0)+4>>2]|0)-(r[3]|0)>>1|0}function he(e){e=e|0;return e<<16>>16==13|e<<16>>16==10|0}function le(){return(r[r[69]>>2]|0)-(r[3]|0)>>1|0}function pe(){return(r[r[60]>>2]|0)-(r[3]|0)>>1|0}function ue(){return(r[r[61]>>2]|0)-(r[3]|0)>>1|0}function de(){return a[(r[60]|0)+24>>0]|0|0}function fe(e){e=e|0;r[3]=e;return}function me(){return r[(r[60]|0)+28>>2]|0}function ye(){return(i[807]|0)!=0|0}function xe(){return(i[808]|0)!=0|0}function ge(){r[69]=0;return}function ke(){return r[68]|0}function Te(e,t){e=e|0;t=t|0;c=e+t+15&-16;return t}return{su:Te,ai:Y,ake:ae,aks:le,ave:ne,avs:re,e:ke,ee:ce,ele:W,els:G,es:ue,ess:ie,f:xe,id:q,ie:Q,ip:de,is:pe,it:me,ms:ye,p:h,ra:z,re:ee,ri:Z,rsa:ge,sa:L,se:X,ses:fe,ss:oe}}("undefined"!=typeof globalThis?globalThis:self,{},E),A=P.su(I-(2<<17),1040)}const i=N.length+1;P.ses(A),P.sa(i-1),_(N,new Uint16Array(E,A,i)),P.p()||(D=P.e(),B());const n=[],r=[];for(;P.ri();){const e=P.is(),t=P.ie(),s=P.ai(),i=P.id(),r=P.ss(),o=P.se(),c=P.it();let h;P.ip()&&(h=M(-1===i?e:e+1,N.charCodeAt(-1===i?e-1:e)));let l=null;for(l=[],P.rsa();P.ra();){const e=P.aks(),t=P.ake(),s=P.avs(),i=P.ave();l.push([a(e,t),a(s,i)])}l=l.length>0?l:null,n.push({t:c,n:h,s:e,e:t,ss:r,se:o,d:i,a:s,at:l})}for(;P.re();){const e=P.es(),t=P.ee(),s=P.els(),i=P.ele(),n=s<0?void 0:a(s,i),o=a(e,t);r.push({s:e,e:t,ls:s,le:i,ss:P.ess(),n:o,ln:n})}return[n,r,!!P.f(),!!P.ms()];function a(e,t){const s=N.charCodeAt(e);return 34===s||39===s?M(e+1,s):N.slice(e,t)}}(e,t)}catch(e){throw i("Unable to parse module imports","transform",e)}const r=[];for(const t of n)if(3!==t.t){if(1!==t.t)throw i(`Dynamic and source-phase imports are not supported (${ue(e,t.ss)})`,"transform");if(t.at)throw i(`Import attributes are not supported (${ue(e,t.ss)})`,"transform");if(!t.n)throw i(`Static import has no resolvable specifier (${ue(e,t.ss)})`,"resolve");r.push({specifier:t.n,start:t.s,end:t.e})}return{imports:r,usesImportMeta:n.some(e=>3===e.t)}}async function fe(e,t){const{imports:s,usesImportMeta:i}=de(e),n=new pe(e.source,{filename:e.url});for(const{specifier:e,start:i,end:r}of s)n.overwrite(i,r,await t(e));if(i){const t=e.source.match(/^#![^\r\n\u2028\u2029]*(?:\r\n|[\r\n\u2028\u2029])/)?.[0].length??0;n.appendLeft(t,`import.meta.url = ${JSON.stringify(e.url)};\n`)}const r=e.url.replace(/[\n\r\u2028\u2029]/g,"");return n.append(`\n//# sourceURL=${r}\n`),n.toString()}class me{#e;#t;#s;#i;#n=new Map;#r=new Map;constructor({cdnURL:e,fetch:t,bridge:s,urls:i}){this.#e=e,this.#t=t,this.#s=s,this.#i=i}async linkImport(e,t,i){const n=this.#s.getHostModuleURL(e);if(n)return n;if(e.startsWith("#"))throw new k(`Unsupported CDN package import: ${e}`,{importChain:i,phase:"resolve",url:t});const r=C(e)?function(e,t,s){const i=new URL(e,t);return i.searchParams.set("bundle",""),i.searchParams.set("external",s.join(",")),i.searchParams.set("target","es2022"),i}(function(e){return e.startsWith("three/addons/")?`three@0.${s}.0/examples/jsm/${e.slice(13)}`:e.startsWith("three/examples/")?`three@0.${s}.0/${e.slice(6)}`:e}(e),this.#e,this.#s.hostSpecifiers):new URL(e,t);return"http:"!==r.protocol&&"https:"!==r.protocol?r.href:this.#a(w(r),i)}async#a(e,t){const s=this.#r.get(e);if(s)return s;const i=[...t,e];if(t.includes(e))throw new k("Cyclic CDN modules are not supported",{importChain:i,phase:"resolve",url:e});let n=this.#n.get(e);n||(n=v(this.#t,e,!1,i),this.#n.set(e,n),n.catch(()=>this.#n.delete(e)));const r=await n,a=this.#r.get(r.url);if(a)return this.#r.set(e,a),a;let o;try{o=await fe({...r,importChain:i},e=>this.linkImport(e,r.url,i))}catch(e){throw T(e,"Unable to transform CDN module",{importChain:i,phase:"transform",url:r.url})}const c=this.#r.get(e)??this.#r.get(r.url);if(c)return c;const h=this.#i.create(o);return this.#r.set(e,h),this.#r.set(r.url,h),h}}let ye=0;class xe{namespaces;#i;#o=new Map;#c=new Map;#h=function(){return ye+=1,`__glts_bridge_${Date.now()}_${ye}`}();#l=[`const bridge = globalThis[${JSON.stringify(this.#h)}];`,"if (!bridge) throw new Error('GLTS bridge is unavailable');"];contextToken=`glts-context:${this.#h}`;#p=0;constructor(e,t){this.#i=t,this.namespaces={...e,three:i},Reflect.set(globalThis,this.#h,this);for(const[e,s]of Object.entries(this.namespaces))this.#o.set(e,t.create(this.#u(e,s)))}createContextModule(e){this.#p+=1;const t=this.#p,s=this.#i.create([...this.#l,`const context = bridge.takeContext(${t});`,"let scene = context.scene;","context.bindScene((next) => { scene = next; });","const {"," gltsLoader, instanceCount, loadingManager,"," isPreview, onDispose, onFrame, onMatrixUpdateAt","} = context;","export {"," gltsLoader, instanceCount, loadingManager,"," isPreview, onDispose, onFrame, onMatrixUpdateAt, scene","};"].join("\n"));return this.#c.set(t,e),{release:()=>{this.#c.delete(t),this.#i.release(s)},url:s}}get hostSpecifiers(){return[...this.#o.keys()]}getHostModuleURL(e){return this.#o.get(e)}takeContext(e){const t=this.#c.get(e);if(!t)throw new Error(`GLTS execution context is unavailable: ${e}`);return this.#c.delete(e),t}dispose(){Reflect.deleteProperty(globalThis,this.#h)}#u(e,t){const s=Object.keys(t).filter(e=>/^[$A-Z_a-z][$\w]*$/.test(e));return[...this.#l,`const namespace = bridge.namespaces[${JSON.stringify(e)}];`,...s.map((e,t)=>`const moduleExport${t} = namespace[${JSON.stringify(e)}];`),`export { ${s.map((e,t)=>`moduleExport${t} as ${e}`).join(", ")} };`].join("\n")}}var ge=",".charCodeAt(0),ke=";".charCodeAt(0),Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",be=new Uint8Array(64),Se=new Uint8Array(128);for(let e=0;e<64;e++){const t=Te.charCodeAt(e);be[e]=t,Se[t]=e}function we(e,t){do{let s=31&t;(t>>>=5)>0&&(s|=32),e.write(be[s])}while(t>0)}function ve(e){return e<0?-e<<1|1:e<<1}var Ce="undefined"!=typeof TextDecoder?new TextDecoder:"undefined"!=typeof Buffer?{decode:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e[s]);return t}},Pe=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(16384)}write(e){const{buffer:t}=this;t[this.pos++]=e,16384===this.pos&&(this.out+=Ce.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:s}=this;return s>0?t+Ce.decode(e.subarray(0,s)):t}};var Ee={exports:{}};Ee.exports=function(){const e=/^[\w+.-]+:\/\//,t=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,s=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function i(t){return e.test(t)}function n(e){return e.startsWith("//")}function r(e){return e.startsWith("/")}function a(e){return e.startsWith("file:")}function o(e){return/^[.?#]/.test(e)}function c(e){const s=t.exec(e);return l(s[1],s[2]||"",s[3],s[4]||"",s[5]||"/",s[6]||"",s[7]||"")}function h(e){const t=s.exec(e),i=t[2];return l("file:","",t[1]||"","",r(i)?i:"/"+i,t[3]||"",t[4]||"")}function l(e,t,s,i,n,r,a){return{scheme:e,user:t,host:s,port:i,path:n,query:r,hash:a,type:7}}function p(e){if(n(e)){const t=c("http:"+e);return t.scheme="",t.type=6,t}if(r(e)){const t=c("http://foo.com"+e);return t.scheme="",t.host="",t.type=5,t}if(a(e))return h(e);if(i(e))return c(e);const t=c("http://foo.com/"+e);return t.scheme="",t.host="",t.type=e?e.startsWith("?")?3:e.startsWith("#")?2:4:1,t}function u(e){if(e.endsWith("/.."))return e;const t=e.lastIndexOf("/");return e.slice(0,t+1)}function d(e,t){f(t,t.type),"/"===e.path?e.path=t.path:e.path=u(t.path)+e.path}function f(e,t){const s=t<=4,i=e.path.split("/");let n=1,r=0,a=!1;for(let e=1;e<i.length;e++){const t=i[e];t?(a=!1,"."!==t&&(".."!==t?(i[n++]=t,r++):r?(a=!0,r--,n--):s&&(i[n++]=t))):a=!0}let o="";for(let e=1;e<n;e++)o+="/"+i[e];(!o||a&&!o.endsWith("/.."))&&(o+="/"),e.path=o}function m(e,t){if(!e&&!t)return"";const s=p(e);let i=s.type;if(t&&7!==i){const e=p(t),n=e.type;switch(i){case 1:s.hash=e.hash;case 2:s.query=e.query;case 3:case 4:d(s,e);case 5:s.user=e.user,s.host=e.host,s.port=e.port;case 6:s.scheme=e.scheme}n>i&&(i=n)}f(s,i);const n=s.query+s.hash;switch(i){case 2:case 3:return n;case 4:{const i=s.path.slice(1);return i?o(t||e)&&!o(i)?"./"+i+n:i+n:n||"."}case 5:return s.path+n;default:return s.scheme+"//"+s.user+s.host+s.port+s.path+n}}return m}();var Ae=n(Ee.exports);function Ie(e,t){for(let s=t;s<e.length;s++)if(!_e(e[s]))return s;return e.length}function _e(e){for(let t=1;t<e.length;t++)if(e[t][0]<e[t-1][0])return!1;return!0}function Ne(e,t){return t||(e=e.slice()),e.sort(Le)}function Le(e,t){return e[0]-t[0]}var De=!1;function Me(e,t,s){for(let i=s+1;i<e.length&&e[i][0]===t;s=i++);return s}function Oe(e,t,s){for(let i=s-1;i>=0&&e[i][0]===t;s=i--);return s}function Fe(e,t,s,i){const{lastKey:n,lastNeedle:r,lastIndex:a}=s;let o=0,c=e.length-1;if(i===n){if(t===r)return De=-1!==a&&e[a][0]===t,a;t>=r?o=-1===a?0:a:c=a}return s.lastKey=i,s.lastNeedle=t,s.lastIndex=function(e,t,s,i){for(;s<=i;){const n=s+(i-s>>1),r=e[n][0]-t;if(0===r)return De=!0,n;r<0?s=n+1:i=n-1}return De=!1,s-1}(e,t,o,c)}var Re=class{constructor(e,t){const s="string"==typeof e;if(!s&&e._decodedMemo)return e;const i=function(e){return"string"==typeof e?JSON.parse(e):e}(e),{version:n,file:r,names:a,sourceRoot:o,sources:c,sourcesContent:h}=i;this.version=n,this.file=r,this.names=a||[],this.sourceRoot=o,this.sources=c,this.sourcesContent=h,this.ignoreList=i.ignoreList||i.x_google_ignoreList||void 0;const l=function(e,t){const s=function(e){if(!e)return"";const t=e.lastIndexOf("/");return e.slice(0,t+1)}(e),i=t?t+"/":"";return e=>Ae(i+(e||""),s)}(t,o);this.resolvedSources=c.map(l);const{mappings:p}=i;if("string"==typeof p)this._encoded=p,this._decoded=void 0;else{if(!Array.isArray(p))throw i.sections?new Error("TraceMap passed sectioned source map, please use FlattenMap export instead"):new Error(`invalid source map: ${JSON.stringify(i)}`);this._encoded=void 0,this._decoded=function(e,t){const s=Ie(e,0);if(s===e.length)return e;t||(e=e.slice());for(let i=s;i<e.length;i=Ie(e,i+1))e[i]=Ne(e[i],t);return e}(p,s)}this._decodedMemo={lastKey:-1,lastNeedle:-1,lastIndex:-1},this._bySources=void 0,this._bySourceMemos=void 0}};function Be(e){var t;return(t=e)._decoded||(t._decoded=function(e){const{length:t}=e,s=new X(e),i=[];let n=0,r=0,a=0,o=0,c=0;do{const e=s.indexOf(";"),t=[];let h=!0,l=0;for(n=0;s.pos<e;){let i;n=H(s,n),n<l&&(h=!1),l=n,z(s,e)?(r=H(s,r),a=H(s,a),o=H(s,o),z(s,e)?(c=H(s,c),i=[n,r,a,o,c]):i=[n,r,a,o]):i=[n],t.push(i),s.pos++}h||G(t),i.push(t),s.pos=e+1}while(s.pos<=t);return i}(e._encoded))}function je(e,t){let{line:s,column:i,bias:n}=t;if(s--,s<0)throw new Error("`line` must be greater than 0 (lines start at line 1)");if(i<0)throw new Error("`column` must be greater than or equal to 0 (columns start at column 0)");const r=Be(e);if(s>=r.length)return Ue(null,null,null,null);const a=r[s],o=function(e,t,s,i,n){let r=Fe(e,i,t,s);De?r=(-1===n?Me:Oe)(e,i,r):-1===n&&r++;return-1===r||r===e.length?-1:r}(a,e._decodedMemo,s,i,n||1);if(-1===o)return Ue(null,null,null,null);const c=a[o];if(1===c.length)return Ue(null,null,null,null);const{names:h,resolvedSources:l}=e;return Ue(l[c[1]],c[2]+1,c[3],5===c.length?h[c[4]]:null)}function Ue(e,t,s,i){return{source:e,line:t,column:s,name:i}}var qe=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function $e(e,t){const s=function(e,t){return e._indexes[t]}(e,t);if(void 0!==s)return s;const{array:i,_indexes:n}=e,r=i.push(t);return n[t]=r-1}var Ve=class{constructor({file:e,sourceRoot:t}={}){this._names=new qe,this._sources=new qe,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new qe,this._rangeMappings=[]}};var He=(e,t)=>function(e,t,s){const{generated:i,source:n,original:r,name:a,content:o,isRange:c}=s;n?We(e,t,i.line-1,i.column,n,r.line-1,r.column,a,o):We(e,t,i.line-1,i.column,null,null,null,null,null);c&&function(e,t,s,i=!0){const{_mappings:n,_rangeMappings:r}=e,a=Ge(Xe(n,t),s)-1,o=Xe(r,t),c=et(o,a);if(i){if(c>=0)return;Qe(o,~c,a)}else{if(c<0)return;o.splice(c,1)}}(t,i.line-1,i.column)}(!0,e,t);function Ke(e,t,s){const{_sources:i,_sourcesContent:n}=e;n[$e(i,t)]=s}function ze(e){const{_mappings:t,_sources:s,_sourcesContent:i,_names:n,_ignoreList:{array:r},_rangeMappings:a}=e;return Ze(t),Ze(a),{version:3,file:e.file||void 0,names:n.array,sourceRoot:e.sourceRoot||void 0,sources:s.array,sourcesContent:i,mappings:t,ignoreList:r.length>0?r:void 0,rangeMappings:a.length>0?a:void 0}}function Je(e){const t=ze(e),s=t;return s.mappings=function(e){const t=new Pe;let s=0,i=0,n=0,r=0;for(let a=0;a<e.length;a++){const o=e[a];if(a>0&&t.write(ke),0===o.length)continue;let c=0;for(let e=0;e<o.length;e++){const a=o[e];e>0&&t.write(ge),we(t,ve(a[0]-c)),c=a[0],1!==a.length&&(we(t,ve(a[1]-s)),we(t,ve(a[2]-i)),we(t,ve(a[3]-n)),s=a[1],i=a[2],n=a[3],4!==a.length&&(we(t,ve(a[4]-r)),r=a[4]))}}return t.flush()}(t.mappings),t.rangeMappings&&(s.rangeMappings=function(e){if(0===e.length)return"";const t=new Pe;for(let s=0;s<e.length;s++){const i=e[s];s>0&&t.write(ke);let n=0;for(let e=0;e<i.length;e++){const s=i[e];we(t,s-n),n=s}}return t.flush()}(t.rangeMappings)),s}function We(e,t,s,i,n,r,a,o,c){const{_mappings:h,_sources:l,_sourcesContent:p,_names:u,_rangeMappings:d}=t,f=Xe(h,s),m=Ge(f,i);if(!n){if(function(e,t){if(0===t)return!0;const s=e[t-1];return 1===s.length}(f,m)&&!Ye(h,d,s,m-1))return;return m<f.length&&tt(d,s,m),void Qe(f,m,[i])}const y=$e(l,n),x=o?$e(u,o):-1;y===p.length&&(p[y]=null!=c?c:null),function(e,t,s,i,n,r){if(0===t)return!1;const a=e[t-1];return 1!==a.length&&(s===a[1]&&i===a[2]&&n===a[3]&&r===(5===a.length?a[4]:-1))}(f,m,y,r,a,x)&&!Ye(h,d,s,m-1)||(m<f.length&&tt(d,s,m),Qe(f,m,o?[i,y,r,a,x]:[i,y,r,a]))}function Xe(e,t){for(let s=e.length;s<=t;s++)e[s]=[];return e[t]}function Ge(e,t){for(let s=e.length;s>0;s--){if(t>=e[s-1][0])return s}return 0}function Ye(e,t,s,i){if(0===t.length)return!1;if(i<0)for(;--s>=0;){const t=e[s];if(t.length>0){i=t.length-1;break}}if(s<0)return!1;if(s>=t.length)return!1;return et(t[s],i)>=0}function Qe(e,t,s){for(let s=e.length;s>t;s--)e[s]=e[s-1];e[t]=s}function Ze(e){for(let t=e.length-1;t>=0&&!(e[t].length>0);t--)e.pop()}function et(e,t){for(let s=e.length;s>0;s--){const i=e[s-1];if(i===t)return s-1;if(i<t)return~s}return-1}function tt(e,t,s){if(t>=e.length)return;const i=e[t];for(let e=i.length-1;e>=0&&!(i[e]<s);e--)i[e]++}const st="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆ՘ՙՠ-ֈ֋֌א-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿ₏-₟ℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-꟝꟢꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩ꭬꭭ꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",it=new RegExp("["+st+"]"),nt=new RegExp("["+st+"·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄ-׉ؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୓-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫰ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]"),rt=[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,13,65,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,18,21,18,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,18,0,182,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,22,0,239,18,16,0,2,12,2,33,125,0,80,921,103,111,6,206,13,310,2314,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,7386,37,33,96,114,14,913,15,50,7710,3,2,6,2,1,2,296,10,0,30,2,3,0,15,4,8,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,340,2,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,129,15,6,55,50,49,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,4382,2,5773,3,7472,16,621,2467,541,1507,4938,6,8489,39815,11327],at=[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,31,4,33,15,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,7,0,259,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,481,1,61,4,4,5,9,7,3,6,31,3,149,2,12,2,9,1,3,0,33,1,1357,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 ot(e,t){let s=65536;for(let i=0,n=t.length;i<n;i+=2){if(s+=t[i],s>e)return!1;if(s+=t[i+1],s>=e)return!0}return!1}function ct(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&it.test(String.fromCharCode(e)):ot(e,rt)))}function ht(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&nt.test(String.fromCharCode(e)):ot(e,rt)||ot(e,at))))}const lt=["implements","interface","let","package","private","protected","public","static","yield"],pt=["eval","arguments"],ut=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"]),dt=new Set(lt);function ft(e,t){return t&&"await"===e||"enum"===e}function mt(e){return ut.has(e)}new Set(pt);var yt=function(e){return e>=48&&e<=57};function xt(e,t,s,i){return 96===t||36===t&&123===s.charCodeAt(i+1)}function gt(e,t,s,i,n,r){t++;const a=e=>({pos:t,ch:e,lineStart:s,curLine:i}),o=e.charCodeAt(t++);switch(o){case 110:return a("\n");case 114:return a("\r");case 120:{let n;return({code:n,pos:t}=kt(e,t,s,i,2,!1)),a(null===n?null:String.fromCharCode(n))}case 117:{let n;return({code:n,pos:t}=function(e,t,s,i){const n=e.charCodeAt(t);let r;if(123===n){if(++t,({code:r,pos:t}=kt(e,t,s,i,e.indexOf("}",t)-t,!0)),++t,null!==r&&r>1114111)return{code:null,pos:t}}else({code:r,pos:t}=kt(e,t,s,i,4,!1));return{code:r,pos:t}}(e,t,s,i)),a(null===n?null:String.fromCodePoint(n))}case 116:return a("\t");case 98:return a("\b");case 118:return a("\v");case 102:return a("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:s=t,++i;case 8232:case 8233:return a("");case 56:case 57:return a(null);default:if(o>=48&&o<=55){const s=t-1;let i=/^[0-7]+/.exec(e.slice(s,t+2))[0],n=parseInt(i,8);n>255&&(i=i.slice(0,-1),n=parseInt(i,8)),t+=i.length-1;const r=e.charCodeAt(t);return a("0"!==i||56===r||57===r?null:String.fromCharCode(n))}return a(String.fromCharCode(o))}}function kt(e,t,s,i,n,r,a,o){const c=t;let h;return({n:h,pos:t}=function(e,t,s,i,n,r,a,o){const c=t;let h=!1,l=0;for(let s=0,i=null==r?1/0:r;s<i;++s){const s=e.charCodeAt(t);let i;if(95===s&&"bail"!==o)return e.charCodeAt(t-1),e.charCodeAt(t+1),{n:null,pos:t};if(i=s>=97?s-97+10:s>=65?s-65+10:yt(s)?s-48:1/0,i>=n){if(i<=9)return{n:null,pos:t};if(!a)break;i=0,h=!0}++t,l=l*n+i}if(t===c||null!=r&&t-c!==r||h)return{n:null,pos:t};return{n:l,pos:t}}(e,t,0,0,16,n,r,!1)),null===h&&(t=c-1),{code:h,pos:t}}function Tt(e,t){const s=Object.keys(t);for(const i of s)if(e[i]!==t[i])return!1;return!0}function bt(e,t,s){return t?.type===e&&(null==s||Tt(t,s))}function St(e,t){return bt("ExportNamedDeclaration",e,t)}function wt(e,t){if(!e)return!1;switch(e.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":break;default:return!1}return null==t||Tt(e,t)}function vt(e,t){if(e===t)return!0;if(null==e)return!1;if($t[t])return!1;const s=Vt[t];return!!s?.includes(e)}function Ct(e,t){if(e===t)return!0;const s=Os[e];return!!s?.includes(t)}function Pt(e,t,s){if(!t)return!1;return vt(t.type,e)?void 0===s||Tt(t,s):!s&&"Placeholder"===t.type&&e in Vt&&Ct(t.expectedNode,e)}function Et(e,t=!0){return"string"==typeof e&&((!t||!(mt(e)||(ft(s=e,!0)||dt.has(s))))&&function(e){let t=!0;for(let s=0;s<e.length;s++){let i=e.charCodeAt(s);if(55296==(64512&i)&&s+1<e.length){const t=e.charCodeAt(++s);56320==(64512&t)&&(i=65536+((1023&i)<<10)+(1023&t))}if(t){if(t=!1,!ct(i))return!1}else if(!ht(i))return!1}return!t}(e));var s}const At=["||","&&","??"],It=["++","--"],_t=[">","<",">=","<="],Nt=["==","===","!=","!=="],Lt=[...Nt,"in","instanceof"],Dt=[...Lt,..._t],Mt=["-","/","%","*","**","&","|",">>",">>>","<<","^"],Ot=["+",...Mt,...Dt,"|>"],Ft=["=","+=",...Mt.map(e=>e+"="),...At.map(e=>e+"=")],Rt=["delete","!"],Bt=["+","-","~"],jt=["typeof"],Ut=["void","throw",...Rt,...Bt,...jt],qt={},$t={},Vt={},Ht={},Kt={},zt={},Jt={},Wt={};function Xt(e){return Array.isArray(e)?"array":null===e?"null":typeof e}function Gt(e,...t){return Object.assign(e,...t)}function Yt(e){return{validate:e}}function Qt(...e){return Yt(cs(...e))}function Zt(e){return{validate:e,optional:!0}}function es(e,t){return{validate:e,default:t,optional:!1}}function ts(...e){return{validate:cs(...e),optional:!0}}function ss(e){return ds(ls("array"),rs(e))}function is(...e){return ss(cs(...e))}function ns(...e){return Yt(is(...e))}function rs(e){const t=Ys;function s(s,i,n){if(!Array.isArray(n))return;let r=0;const a={toString:()=>`${i}[${r}]`};for(;r<n.length;r++){const i=n[r];e(s,a,i),t(s,a,i)}}return s.each=e,s}function as(...e){function t(t,s,i){if(!e.includes(i))throw new TypeError(`Property ${s} expected value to be one of ${JSON.stringify(e)} but got ${JSON.stringify(i)}`)}return t.oneOf=e,t}const os=[];function cs(...e){const t=new Set;function s(s,i,n){const r=n?.type;if(null!=r){if(t.has(r))return void Ys(s,i,n);if("Placeholder"===r)for(const t of e)if(Pt(t,n))return void Ys(s,i,n)}throw new TypeError(`Property ${i} of ${s.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(r)}`)}return os.push({types:e,set:t}),s.oneOfNodeTypes=e,s}function hs(...e){function t(t,s,i){const n=Xt(i);for(const r of e)if(n===r||Pt(r,i))return void Ys(t,s,i);throw new TypeError(`Property ${s} of ${t.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(i?.type)}`)}return t.oneOfNodeOrValueTypes=e,t}function ls(e){function t(t,s,i){if(Xt(i)!==e)throw new TypeError(`Property ${s} expected type of ${e} but got ${Xt(i)}`)}return t.type=e,t}function ps(e){const t=Object.keys(e);function s(s,i,n){const r=[];for(const i of t)try{Gs(s,i,n[i],e[i])}catch(e){if(e instanceof TypeError){r.push(e.message);continue}throw e}if(r.length)throw new TypeError(`Property ${i} of ${s.type} expected to have the following:\n${r.join("\n")}`)}return s.shapeOf=e,s}function us(){return function(e){let t=e;for(;e;){const{type:e}=t;if("OptionalCallExpression"!==e){if("OptionalMemberExpression"!==e)break;if(t.optional)return;t=t.object}else{if(t.optional)return;t=t.callee}}throw new TypeError(`Non-optional ${e.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${t?.type}`)}}function ds(...e){function t(...t){for(const s of e)s(...t)}if(t.chainOf=e,e.length>=2&&"type"in e[0]&&"array"===e[0].type&&!("each"in e[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return t}const fs=new Set(["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate","unionShape"]),ms=new Set(["default","optional","deprecated","validate"]),ys={};function xs(...e){return(t,s={})=>{let i=s.aliases;i||(s.inherits&&(i=ys[s.inherits].aliases?.slice()),i??=[],s.aliases=i);const n=e.filter(e=>!i.includes(e));i.unshift(...n),gs(t,s)}}function gs(e,t={}){const s=t.inherits&&ys[t.inherits]||{},i=t.visitor||s.visitor||[],n=t.aliases||s.aliases||[],r=t.builder||s.builder||t.visitor||[];let a=t.fields;if(!a&&(a={},s.fields)){const e=Object.getOwnPropertyNames(s.fields);for(const t of e){const e=s.fields[t],i=e.default;if(Array.isArray(i)?i.length>0:i&&"object"==typeof i)throw new Error("field defaults can only be primitives or empty arrays currently");a[t]={default:Array.isArray(i)?[]:i,optional:e.optional,deprecated:e.deprecated,validate:e.validate}}}for(const s of Object.keys(t))if(!fs.has(s))throw new Error(`Unknown type option "${s}" on ${e}`);t.deprecatedAlias&&(zt[t.deprecatedAlias]=e);for(const e of i.concat(r))a[e]=a[e]||{};for(const t of Object.keys(a)){const s=a[t];null===s.default&&(s.optional??=!0),void 0===s.default?(s.default=null,s.optional??=!1):s.validate||null==s.default||(s.validate=ls(Xt(s.default)));for(const i of Object.keys(s))if(!ms.has(i))throw new Error(`Unknown field key "${i}" on ${e}.${t}`)}qt[e]=t.visitor=i,Kt[e]=t.builder=r,Ht[e]=t.fields=a,$t[e]=t.aliases=n,n.forEach(t=>{Vt[t]=Vt[t]||[],Vt[t].push(e)}),t.validate&&(Jt[e]=t.validate),t.unionShape&&(Wt[e]=t.unionShape),ys[e]=t}const ks=Object.defineProperty({__proto__:null,ALIAS_KEYS:$t,BUILDER_KEYS:Kt,DEPRECATED_KEYS:zt,FLIPPED_ALIAS_KEYS:Vt,NODE_FIELDS:Ht,NODE_PARENT_VALIDATIONS:Jt,NODE_UNION_SHAPES__PRIVATE:Wt,VISITOR_KEYS:qt,allExpandedTypes:os,arrayOf:ss,arrayOfType:is,assertEach:rs,assertNodeOrValueType:hs,assertNodeType:cs,assertOneOf:as,assertOptionalChainStart:us,assertShape:ps,assertValueType:ls,chain:ds,combine:Gt,default:gs,defineAliasedType:xs,validate:Yt,validateArrayOfType:ns,validateDefault:es,validateOptional:Zt,validateOptionalType:ts,validateType:Qt},Symbol.toStringTag,{value:"Module"}),Ts=(e=!1)=>({unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:cs("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:e?cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"):cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral")}}}]}}),bs={unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{property:{validate:cs("Expression")}}},{name:"nonComputed",value:[!1],properties:{property:{validate:cs("Identifier","PrivateName")}}}]}},Ss=xs("Standardized");Ss("ArrayExpression",{fields:{elements:{validate:ss(hs("null","Expression","SpreadElement")),default:void 0}},visitor:["elements"],aliases:["Expression"]}),Ss("AssignmentExpression",{fields:{operator:{validate:Gt(function(){const e=as(...Ft),t=as("=");return function(s,i,n){(Pt("Pattern",s.left)?t:e)(s,i,n)}}(),{oneOf:Ft})},left:{validate:cs("Identifier","MemberExpression","OptionalMemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:cs("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),Ss("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:as(...Ot)},left:{validate:function(){const e=cs("Expression"),t=cs("Expression","PrivateName");return Gt(function(s,i,n){("in"===s.operator?t:e)(s,i,n)},{oneOfNodeTypes:["Expression","PrivateName"]})}()},right:{validate:cs("Expression")}},unionShape:{discriminator:"operator",shapes:[{name:"in",value:["in"],properties:{left:{validate:cs("Expression","PrivateName")}}},{name:"notIn",value:Ot.filter(e=>"in"!==e),properties:{left:{validate:cs("Expression")}}}]},visitor:["left","right"],aliases:["Binary","Expression"]}),Ss("InterpreterDirective",{builder:["value"],fields:{value:{validate:ls("string")}}}),Ss("Directive",{visitor:["value"],fields:{value:{validate:cs("DirectiveLiteral")}}}),Ss("DirectiveLiteral",{builder:["value"],fields:{value:{validate:ls("string")}}}),Ss("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:is("Directive"),default:[]},body:ns("Statement")},aliases:["Scopable","BlockParent","Block","Statement"]}),Ss("BreakStatement",{visitor:["label"],fields:{label:{validate:cs("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),Ss("CallExpression",{visitor:["callee","typeArguments","arguments"],builder:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:cs("Expression","Super","Import","V8IntrinsicIdentifier")},arguments:ns("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:cs("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),Ss("CatchClause",{visitor:["param","body"],fields:{param:{validate:cs("Identifier","ArrayPattern","ObjectPattern"),optional:!0},body:{validate:cs("BlockStatement")}},aliases:["Scopable","BlockParent"]}),Ss("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:cs("Expression")},consequent:{validate:cs("Expression")},alternate:{validate:cs("Expression")}},aliases:["Expression","Conditional"]}),Ss("ContinueStatement",{visitor:["label"],fields:{label:{validate:cs("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),Ss("DebuggerStatement",{aliases:["Statement"]}),Ss("DoWhileStatement",{builder:["test","body"],visitor:["body","test"],fields:{test:{validate:cs("Expression")},body:{validate:cs("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),Ss("EmptyStatement",{aliases:["Statement"]}),Ss("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:cs("Expression")}},aliases:["Statement","ExpressionWrapper"]}),Ss("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:cs("Program")},comments:{validate:rs(cs("CommentBlock","CommentLine")),optional:!0},tokens:{validate:rs(Object.assign(()=>{},{type:"any"})),optional:!0}}}),Ss("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:cs("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:cs("Expression")},body:{validate:cs("Statement")}}}),Ss("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:cs("VariableDeclaration","Expression"),optional:!0},test:{validate:cs("Expression"),optional:!0},update:{validate:cs("Expression"),optional:!0},body:{validate:cs("Statement")}}});const ws=()=>({params:ns("FunctionParameter"),generator:{default:!1},async:{default:!1}}),vs=()=>({returnType:{validate:cs("TypeAnnotation","TSTypeAnnotation"),optional:!0},typeParameters:{validate:cs("TypeParameterDeclaration","TSTypeParameterDeclaration"),optional:!0}}),Cs=()=>({...ws(),declare:{validate:ls("boolean"),optional:!0},id:{validate:cs("Identifier"),optional:!0}});Ss("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","typeParameters","params","predicate","returnType","body"],fields:{...Cs(),...vs(),body:{validate:cs("BlockStatement")},predicate:{validate:cs("FlowPredicate"),optional:!0}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:function(){const e=cs("Identifier");return function(t,s,i){Pt("ExportDefaultDeclaration",t)||e(i,"id",i.id)}}()}),Ss("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{...ws(),...vs(),id:{validate:cs("Identifier"),optional:!0},body:{validate:cs("BlockStatement")},predicate:{validate:cs("FlowPredicate"),optional:!0}}});const Ps=()=>({typeAnnotation:{validate:cs("TypeAnnotation","TSTypeAnnotation"),optional:!0},optional:{validate:ls("boolean"),optional:!0},decorators:{validate:is("Decorator"),optional:!0}});Ss("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","FunctionParameter","PatternLike","LVal","TSEntityName"],fields:{...Ps(),name:{validate:ds(ls("string"),Gt(function(e,t,s){if(!Et(s,!1))throw new TypeError(`"${s}" is not a valid identifier name`)},{type:"string"}))}},validate:function(e,t,s){const i=/\.(\w+)$/.exec(t.toString());if(!i)return;const[,n]=i,r={computed:!1};if("property"===n){if(Pt("MemberExpression",e,r))return;if(Pt("OptionalMemberExpression",e,r))return}else if("key"===n){if(Pt("Property",e,r))return;if(Pt("Method",e,r))return}else if("exported"===n){if(Pt("ExportSpecifier",e))return}else if("imported"===n){if(Pt("ImportSpecifier",e,{imported:s}))return}else if("meta"===n&&Pt("MetaProperty",e,{meta:s}))return;if((mt(s.name)||ft(s.name,!1))&&"this"!==s.name)throw new TypeError(`"${s.name}" is not a valid identifier`)}}),Ss("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:cs("Expression")},consequent:{validate:cs("Statement")},alternate:{optional:!0,validate:cs("Statement")}}}),Ss("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:cs("Identifier")},body:{validate:cs("Statement")}}}),Ss("StringLiteral",{builder:["value"],fields:{value:{validate:ls("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),Ss("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:ds(ls("number"),Gt(function(e,t,s){if(1/s<0||!Number.isFinite(s)){const e=new Error(`NumericLiterals must be non-negative finite numbers. You can use t.valueToNode(${s}) instead.`);if(!(new Error).stack.includes("regenerator"))throw e}},{type:"number"}))}},aliases:["Expression","Pureish","Literal","Immutable"]}),Ss("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),Ss("BooleanLiteral",{builder:["value"],fields:{value:{validate:ls("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),Ss("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:ls("string")},flags:{validate:ds(ls("string"),Gt(function(e,t,s){const i=/[^dgimsuvy]/.exec(s);if(i)throw new TypeError(`"${i[0]}" is not a valid RegExp flag`)},{type:"string"})),default:""}}}),Ss("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:as(...At)},left:{validate:cs("Expression")},right:{validate:cs("Expression")}}}),Ss("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal","PatternLike"],...bs,fields:{object:{validate:cs("Expression","Super")},property:{validate:function(){const e=cs("Identifier","PrivateName"),t=cs("Expression");return Gt(function(s,i,n){(s.computed?t:e)(s,i,n)},{oneOfNodeTypes:["Expression","Identifier","PrivateName"]})}()},computed:{default:!1}}}),Ss("NewExpression",{inherits:"CallExpression",fields:{callee:{validate:cs("Expression","V8IntrinsicIdentifier")},arguments:ns("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:cs("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),Ss("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceType:{validate:as("script","module"),default:"script"},interpreter:{validate:cs("InterpreterDirective"),default:null,optional:!0},directives:{validate:is("Directive"),default:[]},body:ns("Statement")},aliases:["Scopable","BlockParent","Block"]}),Ss("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:ns("ObjectMethod","ObjectProperty","SpreadElement")}}),Ss("ObjectMethod",{builder:["kind","key","params","body","computed","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"],...Ts(),fields:{...ws(),...vs(),kind:{validate:as("method","get","set")},computed:{default:!1},key:{validate:function(){const e=cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),t=cs("Expression");return Gt(function(s,i,n){(s.computed?t:e)(s,i,n)},{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral"]})}()},decorators:{validate:is("Decorator"),optional:!0},body:{validate:cs("BlockStatement")}},aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),Ss("ObjectProperty",{builder:["key","value","computed","shorthand"],...Ts(!0),fields:{computed:{default:!1},key:{validate:function(){const e=cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),t=cs("Expression");return Gt(function(s,i,n){(s.computed?t:e)(s,i,n)},{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"]})}()},value:{validate:cs("Expression","PatternLike")},shorthand:{validate:ds(ls("boolean"),Gt(function(e,t,s){if(s){if(e.computed)throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");if(!Pt("Identifier",e.key))throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}},{type:"boolean"})),default:!1},decorators:{validate:is("Decorator"),optional:!0}},visitor:["decorators","key","value"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:function(){const e=cs("Identifier","Pattern","TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"),t=cs("Expression");return function(s,i,n){(Pt("ObjectPattern",s)?e:t)(n,"value",n.value)}}()}),Ss("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["FunctionParameter","PatternLike"],deprecatedAlias:"RestProperty",fields:{...Ps(),argument:{validate:cs("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")}},validate:function(e,t){const s=/(\w+)\[(\d+)\]/.exec(t.toString());if(!s)throw new Error("Internal Babel error: malformed key.");const[,i,n]=s;if(e[i].length>+n+1)throw new TypeError(`RestElement must be last element of ${i}`)}}),Ss("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:cs("Expression"),optional:!0}}}),Ss("SequenceExpression",{visitor:["expressions"],fields:{expressions:ns("Expression")},aliases:["Expression"]}),Ss("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:cs("Expression")}}}),Ss("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:cs("Expression"),optional:!0},consequent:ns("Statement")}}),Ss("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:cs("Expression")},cases:ns("SwitchCase")}}),Ss("ThisExpression",{aliases:["Expression","TSEntityName"]}),Ss("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:cs("Expression")}}}),Ss("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:ds(cs("BlockStatement"),Gt(function(e){if(!e.handler&&!e.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")},{oneOfNodeTypes:["BlockStatement"]}))},handler:{optional:!0,validate:cs("CatchClause")},finalizer:{optional:!0,validate:cs("BlockStatement")}}}),Ss("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:cs("Expression")},operator:{validate:as(...Ut)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),Ss("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:cs("Identifier","MemberExpression")},operator:{validate:as(...It)}},visitor:["argument"],aliases:["Expression"]}),Ss("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:ls("boolean"),optional:!0},kind:{validate:as("var","let","const","using","await using")},declarations:ns("VariableDeclarator")},validate:(()=>{const e=cs("Identifier","Placeholder"),t=cs("Identifier","ArrayPattern","ObjectPattern","Placeholder"),s=cs("Identifier","VoidPattern","Placeholder");return function(i,n,r){const{kind:a,declarations:o}=r,c=Pt("ForXStatement",i,{left:r});if(c&&1!==o.length)throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${i.type}`);for(const i of o)"const"===a||"let"===a||"var"===a?c||i.init?t(i,"id",i.id):e(i,"id",i.id):s(i,"id",i.id)}})()}),Ss("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:cs("Identifier","ArrayPattern","ObjectPattern","VoidPattern")},definite:{optional:!0,validate:ls("boolean")},init:{optional:!0,validate:cs("Expression")}}}),Ss("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:cs("Expression")},body:{validate:cs("Statement")}}}),Ss("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:cs("Expression")},body:{validate:cs("Statement")}}}),Ss("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["FunctionParameter","Pattern","PatternLike"],fields:{...Ps(),left:{validate:cs("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:cs("Expression")}}}),Ss("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:{...Ps(),elements:{validate:ds(ls("array"),rs(hs("null","PatternLike")))}}}),Ss("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["typeParameters","params","predicate","returnType","body"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{...ws(),generator:{default:null,optional:!0,validate:Gt((e,t,s)=>{if(s)throw new TypeError("ArrowFunctionExpression cannot be a generator")},{type:"boolean"})},...vs(),expression:{optional:!0,validate:ls("boolean")},body:{validate:cs("BlockStatement","Expression")},predicate:{validate:cs("FlowPredicate"),optional:!0}}}),Ss("ClassBody",{visitor:["body"],fields:{body:ns("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")}}),Ss("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:cs("Identifier"),optional:!0},typeParameters:{validate:cs("TypeParameterDeclaration","TSTypeParameterDeclaration"),optional:!0},body:{validate:cs("ClassBody")},superClass:{optional:!0,validate:cs("Expression")},superTypeArguments:{validate:cs("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:is("TSClassImplements","ClassImplements"),optional:!0},decorators:{validate:is("Decorator"),optional:!0},mixins:{validate:cs("InterfaceExtends"),optional:!0}}}),Ss("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:cs("Identifier"),optional:!0},typeParameters:{validate:cs("TypeParameterDeclaration","TSTypeParameterDeclaration"),optional:!0},body:{validate:cs("ClassBody")},superClass:{optional:!0,validate:cs("Expression")},superTypeArguments:{validate:cs("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:is("TSClassImplements","ClassImplements"),optional:!0},decorators:{validate:is("Decorator"),optional:!0},mixins:{validate:cs("InterfaceExtends"),optional:!0},declare:{validate:ls("boolean"),optional:!0},abstract:{validate:ls("boolean"),optional:!0}},validate:function(){const e=cs("Identifier");return function(t,s,i){Pt("ExportDefaultDeclaration",t)||e(i,"id",i.id)}}()});const Es={attributes:{optional:!0,validate:is("ImportAttribute")}};Ss("ExportAllDeclaration",{visitor:["source","attributes"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{source:{validate:cs("StringLiteral")},exportKind:Zt(as("type","value")),...Es}}),Ss("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:Qt("FunctionDeclaration","ClassDeclaration","Expression","TSDeclareFunction","TSInterfaceDeclaration","EnumDeclaration"),exportKind:Zt(as("value"))}}),Ss("ExportNamedDeclaration",{builder:["declaration","specifiers","source","attributes"],visitor:["declaration","specifiers","source","attributes"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:{optional:!0,validate:ds(cs("Declaration"),Gt(function(e,t,s){if(s&&e.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");if(s&&e.source)throw new TypeError("Cannot export a declaration from a source")},{oneOfNodeTypes:["VariableDeclaration","FunctionDeclaration","ClassDeclaration","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSTypeAliasDeclaration","EnumDeclaration","InterfaceDeclaration","OpaqueType","TypeAlias"]}))},...Es,specifiers:{default:[],validate:ss(function(){const e=cs("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),t=cs("ExportSpecifier");return Gt(function(s,i,n){(s.source?e:t)(s,i,n)},{oneOfNodeTypes:["ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"]})}())},source:{validate:cs("StringLiteral"),optional:!0},exportKind:Zt(as("type","value"))}}),Ss("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:cs("Identifier","StringLiteral")},exported:{validate:cs("Identifier","StringLiteral")},exportKind:{validate:as("type","value"),optional:!0}}}),Ss("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){const e=cs("VariableDeclaration"),t=cs("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return Gt(function(s,i,n){Pt("VariableDeclaration",n)?e(s,i,n):t(s,i,n)},{oneOfNodeTypes:["VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"]})}()},right:{validate:cs("Expression")},body:{validate:cs("Statement")},await:{default:!1}}}),Ss("ImportDeclaration",{builder:["specifiers","source","attributes"],visitor:["specifiers","source","attributes"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:{...Es,module:{optional:!0,validate:ls("boolean")},phase:{default:null,validate:as("source","defer")},specifiers:ns("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier"),source:{validate:cs("StringLiteral")},importKind:{validate:as("type","typeof","value"),optional:!0}}}),Ss("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:cs("Identifier")}}}),Ss("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:cs("Identifier")}}}),Ss("ImportSpecifier",{visitor:["imported","local"],builder:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:cs("Identifier")},imported:{validate:cs("Identifier","StringLiteral")},importKind:{validate:as("type","typeof","value"),optional:!0}}}),Ss("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:ds(cs("Identifier"),Gt(function(e,t,s){let i;switch(s.name){case"function":i="sent";break;case"new":i="target";break;case"import":i="meta"}if(!Pt("Identifier",e.property,{name:i}))throw new TypeError("Unrecognised MetaProperty")},{oneOfNodeTypes:["Identifier"]}))},property:{validate:cs("Identifier")}}});const As=()=>({abstract:{validate:ls("boolean"),default:!1,optional:!0},accessibility:{validate:as("public","private","protected"),optional:!0},static:{default:!1},override:{optional:!0,validate:ls("boolean"),default:!1},computed:{default:!1},optional:{validate:ls("boolean"),optional:!0},key:{validate:ds(function(){const e=cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),t=cs("Expression","PrivateName");return function(s,i,n){(s.computed?t:e)(s,i,n)}}(),cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))}}),Is=(e=!0)=>({...ws(),...As(),params:ns("FunctionParameter","TSParameterProperty"),kind:{validate:as("get","set","method","constructor"),default:"method"},access:{validate:ds(ls("string"),as("public","private","protected")),optional:!0},...e?{decorators:{validate:is("Decorator"),optional:!0}}:{}});Ss("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"],...Ts(),fields:{...Is(),...vs(),body:{validate:cs("BlockStatement")}}}),Ss("ObjectPattern",{visitor:["decorators","properties","typeAnnotation"],builder:["properties"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:{...Ps(),properties:ns("RestElement","ObjectProperty")}}),Ss("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:cs("Expression")}}}),Ss("Super"),Ss("TaggedTemplateExpression",{visitor:["tag","typeArguments","quasi"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:cs("Expression")},quasi:{validate:cs("TemplateLiteral")},typeArguments:{validate:cs("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),Ss("TemplateElement",{builder:["value","tail"],fields:{value:{validate:ds(ps({raw:{validate:ls("string")},cooked:{validate:ls("string"),optional:!0}}),function(e){const t=e.value.raw;let s=!1;const i=()=>{throw new Error("Internal @babel/types error.")},{str:n,firstInvalidLoc:r}=function(e,t,s,i,n,r){const a=s,o=i,c=n;let h="",l=null,p=s;const{length:u}=t;for(;;){if(s>=u){r.unterminated(a,o,c),h+=t.slice(p,s);break}const e=t.charCodeAt(s);if(xt(0,e,t,s)){h+=t.slice(p,s);break}if(92===e){h+=t.slice(p,s);const e=gt(t,s,i,n);null!==e.ch||l?h+=e.ch:l={pos:s,lineStart:i,curLine:n},({pos:s,lineStart:i,curLine:n}=e),p=s}else 8232===e||8233===e?(++n,i=++s):10===e||13===e?(h+=t.slice(p,s)+"\n",++s,13===e&&10===t.charCodeAt(s)&&++s,++n,p=i=s):++s}return{pos:s,str:h,firstInvalidLoc:l,lineStart:i,curLine:n}}(0,t,0,0,0,{unterminated(){s=!0},strictNumericEscape:i,invalidEscapeSequence:i,numericSeparatorInEscapeSequence:i,unexpectedNumericSeparator:i,invalidDigit:i,invalidCodePoint:i});if(!s)throw new Error("Invalid raw");e.value.cooked=r?null:n})},tail:{default:!1}}}),Ss("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:ns("TemplateElement"),expressions:{validate:ds(ls("array"),rs(cs("Expression","TSType")),function(e,t,s){if(e.quasis.length!==s.length+1)throw new TypeError(`Number of ${e.type} quasis should be exactly one more than the number of expressions.\nExpected ${s.length+1} quasis but got ${e.quasis.length}`)})}}}),Ss("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:ds(ls("boolean"),Gt(function(e,t,s){if(s&&!e.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")},{type:"boolean"})),default:!1},argument:{optional:!0,validate:cs("Expression")}}}),Ss("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:cs("Expression")}}}),Ss("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:as("source","defer")},source:{validate:cs("Expression")},options:{validate:cs("Expression"),optional:!0}}}),Ss("Import"),Ss("BigIntLiteral",{builder:["value"],fields:{value:{validate:ls("bigint")}},aliases:["Expression","Pureish","Literal","Immutable"]}),Ss("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:cs("Identifier","StringLiteral")}}}),Ss("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],...bs,fields:{object:{validate:cs("Expression")},property:{validate:function(){const e=cs("Identifier","PrivateName"),t=cs("Expression");return Gt(function(s,i,n){(s.computed?t:e)(s,i,n)},{oneOfNodeTypes:["Expression","PrivateName"]})}()},computed:{default:!1},optional:{validate:ds(ls("boolean"),us())}}}),Ss("OptionalCallExpression",{visitor:["callee","typeArguments","arguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:{callee:{validate:cs("Expression")},arguments:ns("Expression","SpreadElement","ArgumentPlaceholder"),optional:{validate:ds(ls("boolean"),us())},typeArguments:{validate:cs("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),Ss("ClassProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"],...Ts(),fields:{...As(),value:{validate:cs("Expression"),optional:!0},definite:{validate:ls("boolean"),optional:!0},typeAnnotation:{validate:cs("TypeAnnotation","TSTypeAnnotation"),optional:!0},decorators:{validate:is("Decorator"),optional:!0},readonly:{validate:ls("boolean"),optional:!0},declare:{validate:ls("boolean"),optional:!0},variance:{validate:cs("Variance"),optional:!0}}}),Ss("ClassPrivateProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:cs("PrivateName")},value:{validate:cs("Expression"),optional:!0},typeAnnotation:{validate:cs("TypeAnnotation","TSTypeAnnotation"),optional:!0},decorators:{validate:is("Decorator"),optional:!0},static:{validate:ls("boolean"),default:!1},readonly:{validate:ls("boolean"),optional:!0},optional:{validate:ls("boolean"),optional:!0},definite:{validate:ls("boolean"),optional:!0},variance:{validate:cs("Variance"),optional:!0}}}),Ss("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["decorators","key","typeParameters","params","returnType","body"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:{...Is(),...vs(),kind:{validate:as("get","set","method"),default:"method"},key:{validate:cs("PrivateName")},body:{validate:cs("BlockStatement")}}}),Ss("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:cs("Identifier")}}}),Ss("StaticBlock",{visitor:["body"],fields:{body:ns("Statement")},aliases:["Scopable","BlockParent","FunctionParent"]}),Ss("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:cs("Identifier","StringLiteral")},value:{validate:cs("StringLiteral")}}});const _s=xs("Flow"),Ns=e=>{const t="DeclareClass"===e;_s(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends",...t?["mixins","implements"]:[],"body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier"),typeParameters:ts("TypeParameterDeclaration"),extends:Zt(is("InterfaceExtends")),...t?{mixins:Zt(is("InterfaceExtends")),implements:Zt(is("ClassImplements"))}:{},body:Qt("ObjectTypeAnnotation")}})};_s("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:Qt("FlowType")}}),_s("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Yt(ls("boolean"))}}),_s("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("ClassImplements",{visitor:["id","typeParameters"],fields:{id:Qt("Identifier"),typeParameters:ts("TypeParameterInstantiation")}}),Ns("DeclareClass"),_s("DeclareFunction",{builder:["id"],visitor:["id","predicate"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier"),predicate:ts("FlowPredicate")}}),Ns("DeclareInterface"),_s("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier","StringLiteral"),body:Qt("BlockStatement"),kind:Zt(as("CommonJS","ES"))}}),_s("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:Qt("TypeAnnotation")}}),_s("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier"),typeParameters:ts("TypeParameterDeclaration"),right:Qt("FlowType")}}),_s("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier"),typeParameters:ts("TypeParameterDeclaration"),supertype:ts("FlowType"),impltype:ts("FlowType")}}),_s("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier")}}),_s("DeclareExportDeclaration",{visitor:["declaration","specifiers","source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{declaration:ts("Flow"),specifiers:Zt(is("ExportSpecifier","ExportNamespaceSpecifier")),source:ts("StringLiteral"),default:Zt(ls("boolean")),...Es}}),_s("DeclareExportAllDeclaration",{visitor:["source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{source:Qt("StringLiteral"),exportKind:Zt(as("type","value")),...Es}}),_s("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:Qt("Expression")}}),_s("ExistsTypeAnnotation",{aliases:["FlowType"]}),_s("FunctionTypeAnnotation",{builder:["typeParameters","params","rest","returnType"],visitor:["typeParameters","this","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:ts("TypeParameterDeclaration"),params:ns("FunctionTypeParam"),rest:ts("FunctionTypeParam"),this:ts("FunctionTypeParam"),returnType:Qt("FlowType")}}),_s("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:ts("Identifier"),typeAnnotation:Qt("FlowType"),optional:Zt(ls("boolean"))}}),_s("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:Qt("Identifier","QualifiedTypeIdentifier"),typeParameters:ts("TypeParameterInstantiation")}}),_s("InferredPredicate",{aliases:["FlowPredicate"]}),_s("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:Qt("Identifier","QualifiedTypeIdentifier"),typeParameters:ts("TypeParameterInstantiation")}}),Ns("InterfaceDeclaration"),_s("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:Zt(is("InterfaceExtends")),body:Qt("ObjectTypeAnnotation")}}),_s("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Yt(is("FlowType"))}}),_s("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:Qt("FlowType")}}),_s("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Yt(ls("number"))}}),_s("BigIntLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Yt(ls("bigint"))}}),_s("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:Yt(is("ObjectTypeProperty","ObjectTypeSpreadProperty")),indexers:{validate:is("ObjectTypeIndexer"),optional:!1,default:[]},callProperties:{validate:is("ObjectTypeCallProperty"),optional:!1,default:[]},internalSlots:{validate:is("ObjectTypeInternalSlot"),optional:!1,default:[]},exact:{validate:ls("boolean"),default:!1},inexact:Zt(ls("boolean"))}}),_s("ObjectTypeInternalSlot",{visitor:["id","value"],builder:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:Qt("Identifier"),value:Qt("FlowType"),optional:Yt(ls("boolean")),static:Yt(ls("boolean")),method:Yt(ls("boolean"))}}),_s("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:Qt("FlowType"),static:es(ls("boolean"),!1)}}),_s("ObjectTypeIndexer",{visitor:["variance","id","key","value"],builder:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:ts("Identifier"),key:Qt("FlowType"),value:Qt("FlowType"),static:es(ls("boolean"),!1),variance:ts("Variance")}}),_s("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:Qt("Identifier","StringLiteral","NumericLiteral"),value:Qt("FlowType"),kind:{validate:as("init","get","set"),default:"init",optional:!1},static:es(ls("boolean"),!1),proto:es(ls("boolean"),!1),optional:es(ls("boolean"),!1),variance:ts("Variance"),method:es(ls("boolean"),!1)}}),_s("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:Qt("FlowType")}}),_s("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier"),typeParameters:ts("TypeParameterDeclaration"),supertype:ts("FlowType"),impltype:Qt("FlowType")}}),_s("QualifiedTypeIdentifier",{visitor:["qualification","id"],builder:["id","qualification"],fields:{id:Qt("Identifier"),qualification:Qt("Identifier","QualifiedTypeIdentifier")}}),_s("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Yt(ls("string"))}}),_s("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Yt(is("FlowType"))}}),_s("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:Qt("FlowType","Identifier")}}),_s("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Qt("Identifier"),typeParameters:ts("TypeParameterDeclaration"),right:Qt("FlowType")}}),_s("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:Qt("FlowType","Identifier")}}),_s("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:Qt("Expression"),typeAnnotation:Qt("TypeAnnotation")}}),_s("TypeParameter",{builder:["name","bound","default","variance"],visitor:["bound","default","variance"],fields:{name:Yt(ls("string")),bound:ts("TypeAnnotation"),default:ts("FlowType"),variance:ts("Variance")}}),_s("TypeParameterDeclaration",{visitor:["params"],fields:{params:Yt(is("TypeParameter"))}}),_s("TypeParameterInstantiation",{visitor:["params"],fields:{params:Yt(is("FlowType"))}}),_s("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Yt(is("FlowType"))}}),_s("Variance",{builder:["kind"],fields:{kind:Yt(as("minus","plus"))}}),_s("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),_s("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:Qt("Identifier"),body:Qt("EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody")}});const Ls={explicitType:es(ls("boolean"),!1),hasUnknownMembers:es(ls("boolean"),!1)};_s("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{...Ls,members:ns("EnumBooleanMember")}}),_s("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{...Ls,members:ns("EnumNumberMember")}}),_s("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{...Ls,members:ns("EnumStringMember","EnumDefaultedMember")}}),_s("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:ns("EnumDefaultedMember"),hasUnknownMembers:es(ls("boolean"),!1)}}),_s("EnumBooleanMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:Qt("Identifier"),init:Qt("BooleanLiteral")}}),_s("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:Qt("Identifier"),init:Qt("NumericLiteral")}}),_s("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:Qt("Identifier"),init:Qt("StringLiteral")}}),_s("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:Qt("Identifier")}}),_s("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:Qt("FlowType"),indexType:Qt("FlowType")}}),_s("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:Qt("FlowType"),indexType:Qt("FlowType"),optional:es(ls("boolean"),!1)}});const Ds=xs("JSX");Ds("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:cs("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:cs("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),Ds("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:cs("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}}),Ds("JSXElement",{builder:["openingElement","closingElement","children"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:{openingElement:{validate:cs("JSXOpeningElement")},closingElement:{optional:!0,validate:cs("JSXClosingElement")},children:ns("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}}),Ds("JSXEmptyExpression",{}),Ds("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:cs("Expression","JSXEmptyExpression")}}}),Ds("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:cs("Expression")}}}),Ds("JSXIdentifier",{builder:["name"],fields:{name:{validate:ls("string")}}}),Ds("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:cs("JSXMemberExpression","JSXIdentifier")},property:{validate:cs("JSXIdentifier")}}}),Ds("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:cs("JSXIdentifier")},name:{validate:cs("JSXIdentifier")}}}),Ds("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","typeArguments","attributes"],aliases:["Immutable"],fields:{name:{validate:cs("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:ns("JSXAttribute","JSXSpreadAttribute"),typeArguments:{validate:cs("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),Ds("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:cs("Expression")}}}),Ds("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:ls("string")}}}),Ds("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:cs("JSXOpeningFragment")},closingFragment:{validate:cs("JSXClosingFragment")},children:ns("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}}),Ds("JSXOpeningFragment",{aliases:["Immutable"]}),Ds("JSXClosingFragment",{aliases:["Immutable"]});const Ms=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],Os={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};for(const e of Ms){const t=$t[e];t?.length&&(Os[e]=t)}const Fs={};Object.keys(Os).forEach(e=>{Os[e].forEach(t=>{Object.hasOwn(Fs,t)||(Fs[t]=[]),Fs[t].push(e)})});const Rs=xs("Miscellaneous");Rs("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:{name:{validate:cs("Identifier")},expectedNode:{validate:as(...Ms)},...Ps()}}),Rs("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:ls("string")}}}),gs("ArgumentPlaceholder",{}),gs("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{object:{validate:hs("null","Expression")},callee:{validate:cs("Expression")}}}),gs("ClassAccessorProperty",{visitor:["decorators","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"],...Ts(!0),fields:{...As(),key:{validate:ds(function(){const e=cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),t=cs("Expression");return function(s,i,n){(s.computed?t:e)(s,i,n)}}(),cs("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:cs("Expression"),optional:!0},definite:{validate:ls("boolean"),optional:!0},typeAnnotation:{validate:cs("TypeAnnotation","TSTypeAnnotation"),optional:!0},decorators:{validate:is("Decorator"),optional:!0},readonly:{validate:ls("boolean"),optional:!0},declare:{validate:ls("boolean"),optional:!0},variance:{validate:cs("Variance"),optional:!0}}}),gs("Decorator",{visitor:["expression"],fields:{expression:{validate:cs("Expression")}}}),gs("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:cs("BlockStatement")},async:{validate:ls("boolean"),default:!1}}}),gs("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:cs("Identifier")}}}),gs("ModuleExpression",{visitor:["body"],fields:{body:{validate:cs("Program")}},aliases:["Expression"]}),gs("TopicReference",{aliases:["Expression"]}),gs("VoidPattern",{aliases:["Pattern","PatternLike","FunctionParameter"]});const Bs=xs("TypeScript"),js=ls("boolean"),Us=()=>({returnType:{validate:cs("TSTypeAnnotation"),optional:!0},typeParameters:{validate:cs("TSTypeParameterDeclaration"),optional:!0}});Bs("TSParameterProperty",{aliases:[],visitor:["parameter"],fields:{accessibility:{validate:as("public","private","protected"),optional:!0},readonly:{validate:ls("boolean"),optional:!0},parameter:{validate:cs("Identifier","AssignmentPattern")},override:{validate:ls("boolean"),optional:!0},decorators:{validate:is("Decorator"),optional:!0}}}),Bs("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:{...Cs(),...Us()}}),Bs("TSDeclareMethod",{visitor:["key","typeParameters","params","returnType"],...Ts(!0),fields:{...Is(!1),...Us()}}),Bs("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:Qt("TSEntityName"),right:Qt("Identifier")}});const qs=()=>({typeParameters:ts("TSTypeParameterDeclaration"),params:ns("ArrayPattern","Identifier","ObjectPattern","RestElement"),returnType:ts("TSTypeAnnotation")}),$s={aliases:["TSTypeElement"],visitor:["typeParameters","params","returnType"],fields:qs()};Bs("TSCallSignatureDeclaration",$s),Bs("TSConstructSignatureDeclaration",$s);const Vs=()=>({key:Qt("Expression"),computed:{default:!1},optional:Zt(js)});Bs("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation"],fields:{...Vs(),readonly:Zt(js),typeAnnotation:ts("TSTypeAnnotation"),kind:{optional:!0,validate:as("get","set")}}}),Bs("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","params","returnType"],fields:{...qs(),...Vs(),kind:{validate:as("method","get","set"),default:"method"}}}),Bs("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:Zt(js),static:Zt(js),parameters:ns("Identifier"),typeAnnotation:ts("TSTypeAnnotation")}});const Hs=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(const e of Hs)Bs(e,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});Bs("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});const Ks={aliases:["TSType"],visitor:["typeParameters","params","returnType"]};Bs("TSFunctionType",{...Ks,fields:qs()}),Bs("TSConstructorType",{...Ks,fields:{...qs(),abstract:Zt(js)}}),Bs("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeArguments"],fields:{typeName:Qt("TSEntityName"),typeArguments:ts("TSTypeParameterInstantiation")}}),Bs("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:Qt("Identifier","TSThisType"),typeAnnotation:ts("TSTypeAnnotation"),asserts:Zt(js)}}),Bs("TSTypeQuery",{aliases:["TSType"],visitor:["exprName","typeArguments"],fields:{exprName:Qt("TSEntityName","TSImportType"),typeArguments:ts("TSTypeParameterInstantiation")}}),Bs("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:ns("TSTypeElement")}}),Bs("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:Qt("TSType")}}),Bs("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:ns("TSType","TSNamedTupleMember")}}),Bs("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:Qt("TSType")}}),Bs("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:Qt("TSType")}}),Bs("TSNamedTupleMember",{aliases:["TSType"],visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:Qt("Identifier"),optional:{validate:js,default:!1},elementType:Qt("TSType")}});const zs={aliases:["TSType"],visitor:["types"],fields:{types:ns("TSType")}};Bs("TSUnionType",zs),Bs("TSIntersectionType",zs),Bs("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:Qt("TSType"),extendsType:Qt("TSType"),trueType:Qt("TSType"),falseType:Qt("TSType")}}),Bs("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:Qt("TSTypeParameter")}}),Bs("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:Qt("TSType")}}),Bs("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],builder:["typeAnnotation","operator"],fields:{operator:{validate:as("keyof","readonly","unique"),default:void 0},typeAnnotation:Qt("TSType")}}),Bs("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:Qt("TSType"),indexType:Qt("TSType")}}),Bs("TSMappedType",{aliases:["TSType"],visitor:["key","constraint","nameType","typeAnnotation"],builder:["key","constraint","nameType","typeAnnotation"],fields:{key:Qt("Identifier"),constraint:Qt("TSType"),readonly:Zt(as(!0,!1,"+","-")),optional:Zt(as(!0,!1,"+","-")),typeAnnotation:ts("TSType"),nameType:ts("TSType")}}),Bs("TSTemplateLiteralType",{aliases:["TSType","TSBaseType"],visitor:["quasis","types"],fields:{quasis:ns("TemplateElement"),types:{validate:ds(ls("array"),rs(cs("TSType")),function(e,t,s){if(e.quasis.length!==s.length+1)throw new TypeError(`Number of ${e.type} quasis should be exactly one more than the number of types.\nExpected ${s.length+1} quasis but got ${e.quasis.length}`)})}}}),Bs("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:{validate:function(){const e=cs("NumericLiteral","BigIntLiteral"),t=as("-"),s=cs("NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral");return Gt(function(i,n,r){Pt("UnaryExpression",r)?(t(r,"operator",r.operator),e(r,"argument",r.argument)):s(i,n,r)},{oneOfNodeTypes:["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral","UnaryExpression"]})}()}}}),Bs("TSClassImplements",{aliases:["TSType"],visitor:["expression","typeArguments"],fields:{expression:Qt("Expression"),typeArguments:ts("TSTypeParameterInstantiation")}}),Bs("TSInterfaceHeritage",{aliases:["TSType"],visitor:["expression","typeArguments"],fields:{expression:Qt("Expression"),typeArguments:ts("TSTypeParameterInstantiation")}}),Bs("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:Zt(js),id:Qt("Identifier"),typeParameters:ts("TSTypeParameterDeclaration"),extends:Zt(is("TSInterfaceHeritage")),body:Qt("TSInterfaceBody")}}),Bs("TSInterfaceBody",{visitor:["body"],fields:{body:ns("TSTypeElement")}}),Bs("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:Zt(js),id:Qt("Identifier"),typeParameters:ts("TSTypeParameterDeclaration"),typeAnnotation:Qt("TSType")}}),Bs("TSInstantiationExpression",{aliases:["Expression"],visitor:["expression","typeArguments"],fields:{expression:Qt("Expression"),typeArguments:ts("TSTypeParameterInstantiation")}});const Js={aliases:["Expression","LVal","PatternLike"],visitor:["expression","typeAnnotation"],fields:{expression:Qt("Expression"),typeAnnotation:Qt("TSType")}};Bs("TSAsExpression",Js),Bs("TSSatisfiesExpression",Js),Bs("TSTypeAssertion",{aliases:["Expression","LVal","PatternLike"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:Qt("TSType"),expression:Qt("Expression")}}),Bs("TSEnumBody",{visitor:["members"],fields:{members:ns("TSEnumMember")}}),Bs("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{declare:Zt(js),const:Zt(js),id:Qt("Identifier"),body:Qt("TSEnumBody")}}),Bs("TSEnumMember",{visitor:["id","initializer"],fields:{id:Qt("Identifier","StringLiteral"),initializer:ts("Expression")}}),Bs("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{kind:{validate:as("global","namespace","module"),default:"namespace"},declare:Zt(js),id:{validate:ds(cs("TSEntityName","StringLiteral"),Gt(function(e,t,s){if("namespace"===e.kind&&Pt("StringLiteral",s))throw new TypeError("TSModuleDeclaration of kind 'namespace' cannot have a StringLiteral id.")},{oneOfNodeTypes:["TSEntityName","StringLiteral"]}))},body:Qt("TSModuleBlock")}}),Bs("TSModuleBlock",{aliases:["Scopable","Block","BlockParent","FunctionParent"],visitor:["body"],fields:{body:ns("Statement")}}),Bs("TSImportType",{aliases:["TSType"],builder:["source","qualifier","typeArguments"],visitor:["source","options","qualifier","typeArguments"],fields:{source:Qt("StringLiteral"),qualifier:ts("TSEntityName"),typeArguments:ts("TSTypeParameterInstantiation"),options:{validate:cs("ObjectExpression"),optional:!0}}}),Bs("TSImportEqualsDeclaration",{aliases:["Statement","Declaration"],visitor:["id","moduleReference"],fields:{id:Qt("Identifier"),moduleReference:Qt("TSEntityName","TSExternalModuleReference"),importKind:{validate:as("type","value"),optional:!0}}}),Bs("TSExternalModuleReference",{visitor:["expression"],fields:{expression:Qt("StringLiteral")}}),Bs("TSNonNullExpression",{aliases:["Expression","LVal","PatternLike"],visitor:["expression"],fields:{expression:Qt("Expression")}}),Bs("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:Qt("Expression")}}),Bs("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:Qt("Identifier")}}),Bs("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:cs("TSType")}}}),Bs("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:ns("TSType")}}),Bs("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:ns("TSTypeParameter")}}),Bs("TSTypeParameter",{builder:["constraint","default","name"],visitor:["name","constraint","default"],fields:{name:{validate:cs("Identifier")},in:{validate:ls("boolean"),optional:!0},out:{validate:ls("boolean"),optional:!0},const:{validate:ls("boolean"),optional:!0},constraint:{validate:cs("TSType"),optional:!0},default:{validate:cs("TSType"),optional:!0}}});const Ws={ModuleDeclaration:"ImportOrExportDeclaration"};Object.keys(Ws).forEach(e=>{Vt[e]=Vt[Ws[e]]});for(const{types:e,set:t}of os)for(const s of e){const e=Vt[s];e?e.forEach(t.add,t):t.add(s)}function Xs(e,t,s){if(!e)return;const i=Ht[e.type];if(!i)return;Gs(e,t,s,i[t]),Ys(e,t,s)}function Gs(e,t,s,i){i?.validate&&(i.optional&&null==s||i.validate(e,t,s))}function Ys(e,t,s){const i=s?.type;null!=i&&Jt[i]?.(e,t,s)}const Qs=Object.defineProperty({__proto__:null,default:Xs,validateChild:Ys,validateField:Gs,validateInternal:function(e,t,s,i,n){if(e?.validate&&(!e.optional||null!=i)&&(e.validate(t,s,i),n)){const e=i.type;if(null==e)return;Jt[e]?.(t,s,i)}}},Symbol.toStringTag,{value:"Module"}),{validateInternal:Zs}=Qs,{NODE_FIELDS:ei}=ks;function ti(e,t=[]){const s={type:"BlockStatement",body:e,directives:t},i=ei.BlockStatement;return Zs(i.body,s,"body",e,1),Zs(i.directives,s,"directives",t,1),s}function si(e,t){const s={type:"CallExpression",callee:e,arguments:t},i=ei.CallExpression;return Zs(i.callee,s,"callee",e,1),Zs(i.arguments,s,"arguments",t,1),s}function ii(e){const t={type:"ExpressionStatement",expression:e},s=ei.ExpressionStatement;return Zs(s.expression,t,"expression",e,1),t}function ni(e,t,s=!1){const i={type:"ArrowFunctionExpression",params:e,body:t,async:s},n=ei.ArrowFunctionExpression;return Zs(n.params,i,"params",e,1),Zs(n.body,i,"body",t,1),Zs(n.async,i,"async",s),i}function ri(e){const t={type:"AwaitExpression",argument:e},s=ei.AwaitExpression;return Zs(s.argument,t,"argument",e,1),t}Vt.Standardized,Vt.Expression,Vt.Binary,Vt.Scopable,Vt.BlockParent,Vt.Block,Vt.Statement,Vt.Terminatorless,Vt.CompletionStatement,Vt.Conditional,Vt.Loop,Vt.While,Vt.ExpressionWrapper,Vt.For,Vt.ForXStatement,Vt.Function,Vt.FunctionParent,Vt.Pureish,Vt.Declaration,Vt.FunctionParameter,Vt.PatternLike,Vt.LVal,Vt.TSEntityName,Vt.Literal,Vt.Immutable,Vt.UserWhitespacable,Vt.Method,Vt.ObjectMember,Vt.Property,Vt.UnaryLike,Vt.Pattern,Vt.Class,Vt.ImportOrExportDeclaration,Vt.ExportDeclaration,Vt.ModuleSpecifier,Vt.Private,Vt.Flow,Vt.FlowType,Vt.FlowBaseAnnotation,Vt.FlowDeclaration,Vt.FlowPredicate,Vt.EnumBody,Vt.EnumMember,Vt.JSX,Vt.Miscellaneous,Vt.Accessor,Vt.TypeScript,Vt.TSTypeElement,Vt.TSType,Vt.TSBaseType;const ai=Symbol(),oi=Symbol();function ci(e,t,s){if(!e)return!1;const i=qt[e.type];if(!i)return!1;const n=t(e,s=s||{});if(void 0!==n)switch(n){case ai:return!1;case oi:return!0}for(const n of i){const i=e[n];if(i)if(Array.isArray(i)){for(const e of i)if(ci(e,t,s))return!0}else if(ci(i,t,s))return!0}return!1}ci.skip=ai,ci.stop=oi,Function.call.bind(Object.prototype.toString);var hi=Object.freeze({__proto__:null,ALIAS_KEYS:$t,ASSIGNMENT_OPERATORS:Ft,BINARY_OPERATORS:Ot,BOOLEAN_BINARY_OPERATORS:Dt,BOOLEAN_NUMBER_BINARY_OPERATORS:_t,BOOLEAN_UNARY_OPERATORS:Rt,BUILDER_KEYS:Kt,COMPARISON_BINARY_OPERATORS:Lt,DEPRECATED_ALIASES:Ws,DEPRECATED_KEYS:zt,EQUALITY_BINARY_OPERATORS:Nt,FLIPPED_ALIAS_KEYS:Vt,LOGICAL_OPERATORS:At,NODE_FIELDS:Ht,NODE_PARENT_VALIDATIONS:Jt,NODE_UNION_SHAPES__PRIVATE:Wt,NUMBER_BINARY_OPERATORS:Mt,NUMBER_UNARY_OPERATORS:Bt,PLACEHOLDERS:Ms,PLACEHOLDERS_ALIAS:Os,PLACEHOLDERS_FLIPPED_ALIAS:Fs,STRING_UNARY_OPERATORS:jt,UNARY_OPERATORS:Ut,UPDATE_OPERATORS:It,VISITOR_KEYS:qt,arrowFunctionExpression:ni,awaitExpression:ri,blockStatement:ti,callExpression:si,expressionStatement:ii,is:Pt,isAssignmentPattern:function(e,t){return bt("AssignmentPattern",e,t)},isCallExpression:function(e,t){return bt("CallExpression",e,t)},isClassBody:function(e,t){return bt("ClassBody",e,t)},isClassDeclaration:function(e,t){return bt("ClassDeclaration",e,t)},isDeclareExportDeclaration:function(e,t){return bt("DeclareExportDeclaration",e,t)},isExportDeclaration:wt,isExportDefaultDeclaration:function(e,t){return bt("ExportDefaultDeclaration",e,t)},isExportDefaultSpecifier:function(e,t){return bt("ExportDefaultSpecifier",e,t)},isExportNamedDeclaration:St,isExportNamespaceSpecifier:function(e,t){return bt("ExportNamespaceSpecifier",e,t)},isExpression:function(e,t){if(!e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ParenthesizedExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":case"ArrowFunctionExpression":case"ClassExpression":case"MetaProperty":case"TaggedTemplateExpression":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"ImportExpression":case"BigIntLiteral":case"OptionalMemberExpression":case"OptionalCallExpression":case"TypeCastExpression":case"JSXElement":case"JSXFragment":case"BindExpression":case"DoExpression":case"ModuleExpression":case"TopicReference":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(e.expectedNode){case"Expression":case"Identifier":case"StringLiteral":break;default:return!1}break;default:return!1}return null==t},isFor:function(e,t){if(!e)return!1;switch(e.type){case"ForInStatement":case"ForStatement":case"ForOfStatement":break;default:return!1}return null==t},isFunction:function(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 null==t},isIdentifier:function(e,t){return bt("Identifier",e,t)},isIfStatement:function(e,t){return bt("IfStatement",e,t)},isImportDefaultSpecifier:function(e,t){return bt("ImportDefaultSpecifier",e,t)},isImportNamespaceSpecifier:function(e,t){return bt("ImportNamespaceSpecifier",e,t)},isLiteral:function(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("StringLiteral"===e.expectedNode)break;default:return!1}return null==t},isMemberExpression:function(e,t){return bt("MemberExpression",e,t)},isNewExpression:function(e,t){return bt("NewExpression",e,t)},isOptionalMemberExpression:function(e,t){return bt("OptionalMemberExpression",e,t)},isPattern:function(e,t){if(!e)return!1;switch(e.type){case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if("Pattern"===e.expectedNode)break;default:return!1}return null==t},isPlaceholderType:Ct,isStatement:function(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 null==t},isTSEnumMember:function(e,t){return bt("TSEnumMember",e,t)},isTSInterfaceBody:function(e,t){return bt("TSInterfaceBody",e,t)},isType:vt,isValidIdentifier:Et,isVoidPattern:function(e,t){return bt("VoidPattern",e,t)},isYieldExpression:function(e,t){return bt("YieldExpression",e,t)},shallowEqual:Tt,traverseFast:ci,validate:Xs});const li={},pi=li.hasOwnProperty,ui=(e,t)=>{for(const s in e)pi.call(e,s)&&t(s,e[s])},di=e=>"\\u"+("0000"+e).slice(-4),fi=(e,t)=>{let s=e.toString(16);return t?s:s.toUpperCase()},mi=li.toString,yi=Array.isArray,xi=e=>"bigint"==typeof e,gi={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},ki=/[\\\b\f\n\r\t]/,Ti=/[0-9]/,bi=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Si=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,wi=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,vi=(e,t)=>{const s=()=>{p=l,++t.indentLevel,l=t.indent.repeat(t.indentLevel)},i={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:"\t",indentLevel:0,__inline1__:!1,__inline2__:!1},n=t&&t.json;var r,a;n&&(i.quotes="double",i.wrap=!0),r=i,t=(a=t)?(ui(a,(e,t)=>{r[e]=t}),r):r,"single"!=t.quotes&&"double"!=t.quotes&&"backtick"!=t.quotes&&(t.quotes="single");const o="double"==t.quotes?'"':"backtick"==t.quotes?"`":"'",c=t.compact,h=t.lowercaseHex;let l=t.indent.repeat(t.indentLevel),p="";const u=t.__inline1__,d=t.__inline2__,f=c?"":"\n";let m,y=!0;const x="binary"==t.numbers,g="octal"==t.numbers,k="decimal"==t.numbers,T="hexadecimal"==t.numbers;if(n&&e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!(e=>"string"==typeof e||"[object String]"==mi.call(e))(e)){if((e=>"[object Map]"==mi.call(e))(e))return 0==e.size?"new Map()":(c||(t.__inline1__=!0,t.__inline2__=!1),"new Map("+vi(Array.from(e),t)+")");if((e=>"[object Set]"==mi.call(e))(e))return 0==e.size?"new Set()":"new Set("+vi(Array.from(e),t)+")";if((e=>"function"==typeof Buffer&&Buffer.isBuffer(e))(e))return 0==e.length?"Buffer.from([])":"Buffer.from("+vi(Array.from(e),t)+")";if(yi(e))return m=[],t.wrap=!0,u&&(t.__inline1__=!1,t.__inline2__=!0),d||s(),((e,t)=>{const s=e.length;let i=-1;for(;++i<s;)t(e[i])})(e,e=>{y=!1,d&&(t.__inline2__=!1),m.push((c||d?"":l)+vi(e,t))}),y?"[]":d?"["+m.join(", ")+"]":"["+f+m.join(","+f)+f+(c?"":p)+"]";if((e=>"number"==typeof e||"[object Number]"==mi.call(e))(e)||xi(e)){if(n)return JSON.stringify(Number(e));let t;if(k)t=String(e);else if(T){let s=e.toString(16);h||(s=s.toUpperCase()),t="0x"+s}else x?t="0b"+e.toString(2):g&&(t="0o"+e.toString(8));return xi(e)?t+"n":t}return xi(e)?n?JSON.stringify(Number(e)):e+"n":(e=>"[object Object]"==mi.call(e))(e)?(m=[],t.wrap=!0,s(),ui(e,(e,s)=>{y=!1,m.push((c?"":l)+vi(e,t)+":"+(c?"":" ")+vi(s,t))}),y?"{}":"{"+f+m.join(","+f)+f+(c?"":p)+"}"):n?JSON.stringify(e)||"null":String(e)}const b=t.escapeEverything?Si:wi;return m=e.replace(b,(e,s,i,r,a,c)=>{if(s){if(t.minimal)return s;const e=s.charCodeAt(0),i=s.charCodeAt(1);if(t.es6){return"\\u{"+fi(1024*(e-55296)+i-56320+65536,h)+"}"}return di(fi(e,h))+di(fi(i,h))}if(i)return di(fi(i.charCodeAt(0),h));if("\0"==e&&!n&&!Ti.test(c.charAt(a+1)))return"\\0";if(r)return r==o||t.escapeEverything?"\\"+r:r;if(ki.test(e))return gi[e];if(t.minimal&&!bi.test(e))return e;const l=fi(e.charCodeAt(0),h);return n||l.length>2?di(l):"\\x"+("00"+l).slice(-2)}),"`"==o&&(m=m.replace(/\$\{/g,"\\${")),t.isScriptContext&&(m=m.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,n?"\\u003C!--":"\\x3C!--")),t.wrap&&(m=o+m+o),m};vi.version="3.0.2";var Ci=n(vi);class Pi{_map;_rawMappings;_sourceFileName;_lastGenLine=0;_lastSourceLine=0;_lastSourceColumn=0;_inputMap=null;constructor(e,t){const s=this._map=new Ve({sourceRoot:e.sourceRoot});if(this._sourceFileName=e.sourceFileName?.replace(/\\/g,"/"),this._rawMappings=void 0,e.inputSourceMap){this._inputMap=new Re(e.inputSourceMap);const t=this._inputMap.resolvedSources;if(t.length)for(let e=0;e<t.length;e++)Ke(s,t[e],this._inputMap.sourcesContent?.[e])}if("string"!=typeof t||e.inputSourceMap){if("object"==typeof t)for(const e of Object.keys(t))Ke(s,e.replace(/\\/g,"/"),t[e])}else Ke(s,this._sourceFileName,t)}get(){const e=Je(this._map);return e.ignoreList??=[],e}getDecoded(){const e=ze(this._map);return e.ignoreList??=[],e}getRawMappings(){return this._rawMappings||=function(e){const t=[],{_mappings:s,_sources:{array:i},_names:{array:n}}=e;for(let e=0;e<s.length;e++){const r=s[e];for(let s=0;s<r.length;s++){const a=r[s],o={line:e+1,column:a[0]};let c,h,l;1!==a.length&&(c=i[a[1]],h={line:a[2]+1,column:a[3]},5===a.length&&(l=n[a[4]])),t.push({generated:o,source:c,original:h,name:l})}}return t}(this._map)}mark(e,t,s,i,n,r,a){let o;if(this._rawMappings=void 0,null!=s)if(this._inputMap){if(o=je(this._inputMap,{line:s,column:i}),o.name&&(r||null!=n&&o.column===i))n=o.name;else if(r){const e=je(this._inputMap,r);e.name&&(n=e.name)}}else o={name:null,source:a?.replace(/\\/g,"/")||this._sourceFileName,line:s,column:i};null!=n&&n===t&&(n=null),He(this._map,{name:n,generated:e,source:o?.source,original:o})}}const Ei=[];for(let e=0;e<32;e++)Ei.push(" ".repeat(2*e));let Ai=class{constructor(e,t){this._map=e,this._indentChar=t}_map=null;_buf="";_str="";_appendCount=0;_last=0;_canMarkIdName=!0;_indentChar="";_queuedChar=0;_position={line:1,column:0};_sourcePosition={identifierName:void 0,identifierNamePos:void 0,line:void 0,column:void 0,filename:void 0};get(){const{_map:e,_last:t}=this;32!==this._queuedChar&&this._flush();const s=10===t?(this._buf+this._str).trimRight():this._buf+this._str;if(null===e)return{code:s,decodedMap:void 0,map:null,rawMappings:void 0};const i={code:s,decodedMap:e.getDecoded(),get map(){const t=e.get();return i.map=t,t},set map(e){Object.defineProperty(i,"map",{value:e,writable:!0})},get rawMappings(){const t=e.getRawMappings();return i.rawMappings=t,t},set rawMappings(e){Object.defineProperty(i,"rawMappings",{value:e,writable:!0})}};return i}append(e,t,s=!1){this._flush(),this._append(e,t,s)}appendChar(e){this._flush(),this._appendChar(e,1,!0)}queue(e){this._flush(),this._queuedChar=e}_flush(){const e=this._queuedChar;0!==e&&(this._appendChar(e,1,!0),this._queuedChar=0)}_appendChar(e,t,s){if(this._last=e,-1===e){const e=t>=64?this._indentChar.repeat(t):Ei[t/2];this._str+=e}else this._str+=t>1?String.fromCharCode(e).repeat(t):String.fromCharCode(e);const i=32===e,n=this._position;if(10!==e){if(this._map){const e=this._sourcePosition;s&&e?(this._map.mark(n,null,e.line,e.column,i?void 0:e.identifierName,i?void 0:e.identifierNamePos,e.filename),!i&&this._canMarkIdName&&(e.identifierName=void 0,e.identifierNamePos=void 0)):this._map.mark(n,null)}n.column+=t}else n.line++,n.column=0}_append(e,t,s){const i=e.length,n=this._position,r=this._sourcePosition;this._last=-1,++this._appendCount>4096?(this._str,this._buf+=this._str,this._str=e,this._appendCount=0):this._str+=e;const a=!s&&null!==this._map;if(!t&&!a)return void(n.column+=i);const{column:o,identifierName:c,identifierNamePos:h,filename:l}=r;let p=r.line;null==c&&null==h||!this._canMarkIdName||(r.identifierName=void 0,r.identifierNamePos=void 0);let u=e.indexOf("\n"),d=0;for(a&&0!==u&&this._map.mark(n,e,p,o,c,h,l);-1!==u;)n.line++,n.column=0,d=u+1,d<i&&void 0!==p&&(p++,a&&this._map.mark(n,e,p,0,void 0,void 0,l)),u=e.indexOf("\n",d);n.column+=i-d}removeLastSemicolon(){59===this._queuedChar&&(this._queuedChar=0)}getLastChar(e){if(!e)return this._last;const t=this._queuedChar;return 0!==t?t:this._last}getNewlineCount(){return 0===this._queuedChar&&10===this._last?1:0}hasContent(){return 0!==this._last}exactSource(e,t){if(!this._map)return void t();this.source("start",e);const s=e.identifierName,i=this._sourcePosition;null!=s&&(this._canMarkIdName=!1,i.identifierName=s),t(),null!=s&&(this._canMarkIdName=!0,i.identifierName=void 0,i.identifierNamePos=void 0),this.source("end",e)}source(e,t){this._map&&this._normalizePosition(e,t,0)}sourceWithOffset(e,t,s){this._map&&this._normalizePosition(e,t,s)}_normalizePosition(e,t,s){this._flush();const i=t[e];i&&(this.setSourcePosition(i.line,Math.max(i.column+s,0)),this._sourcePosition.filename=t.filename)}setSourcePosition(e,t){const s=this._sourcePosition;s.line=e,s.column=t}getCurrentColumn(){return this._position.column+(this._queuedChar?1:0)}getCurrentLine(){return this._position.line}};const{isMemberExpression:Ii,isOptionalMemberExpression:_i,isYieldExpression:Ni,isStatement:Li}=hi,Di=new Map([["||",0],["??",1],["&&",2],["|",3],["^",4],["&",5],["==",6],["===",6],["!=",6],["!==",6],["<",7],[">",7],["<=",7],[">=",7],["in",7],["instanceof",7],[">>",8],["<<",8],[">>>",8],["+",9],["-",9],["*",10],["/",10],["%",10],["**",11]]);function Mi(e){return 154===e||199===e||207===e}const Oi=(e,t,s)=>(22===s||23===s)&&t.superClass===e,Fi=(e,t,s)=>{switch(s){case 109:case 133:return t.object===e;case 18:case 131:case 113:return t.callee===e;case 220:return t.tag===e;case 189:return!0}return!1};function Ri(e){return(3&e)>0}function Bi(e,t,s,i){if(Oi(e,t,s))return!0;if(Fi(e,t,s)||236===s||143===s||8===s)return!0;let n;switch(s){case 11:case 108:n=Di.get(t.operator);break;case 154:case 199:n=7}if(void 0!==n){const r=2===i?7:Di.get(e.operator);if(n>r)return!0;if(n===r&&11===s&&(11===r?t.left===e:t.right===e))return!0;if(1===i&&108===s&&(1===r&&1!==n||1===n&&1!==r))return!0}return!1}function ji(e,t,s){switch(s){case 4:case 116:case 91:case 237:return!0}return!1}function Ui(e,t,s){return(6===s||7===s)&&t.left===e||(11===s&&("|"===t.operator||"&"===t.operator)&&e===t.left||Bi(e,t,s,2))}function qi(e,t,s){switch(s){case 179:case 209:case 153:case 193:return!0;case 173:return t.objectType===e}return!1}function $i(e,t,s){switch(s){case 153:case 193:return!0;case 173:if(t.objectType===e)return!0}return!1}function Vi(e,t,s){return!!qi(e,t,s)||(217===s||159===s&&(t.checkType===e||t.extendsType===e))}function Hi(e,t,s){return 11===s||108===s||236===s||143===s||Fi(e,t,s)||8===s&&Ni(e)||29===s&&e===t.test||Oi(e,t,s)||Mi(s)}function Ki(e,t,s){return Fi(e,t,s)||11===s&&"**"===t.operator&&t.left===e||Oi(e,t,s)}function zi(e,t,s){switch(s){case 236:case 143:case 11:case 108:case 8:return!0;case 29:if(t.test===e)return!0}return!!Mi(s)||Ki(e,t,s)}function Ji(e,t,s){switch(s){case 18:return t.callee===e;case 109:return t.object===e}return!1}const Wi=Object.defineProperty({__proto__:null,ArrowFunctionExpression:zi,AssignmentExpression:function(e,t,s,i){return!(!Ri(i)||"ObjectPattern"!==e.left.type)||zi(e,t,s)},AwaitExpression:Hi,BinaryExpression:function(e,t,s,i){return!!Bi(e,t,s,0)||(128&i)>0&&"in"===e.operator},ClassExpression:function(e,t,s,i){return(5&i)>0},ConditionalExpression:zi,DoExpression:function(e,t,s,i){return(1&i)>0&&!e.async},FunctionExpression:function(e,t,s,i){return(5&i)>0},FunctionTypeAnnotation:function(e,t,s,i){return 237===s||91===s||4===s||(8&i)>0},Identifier:function(e,t,s,i,n){if(n&&n(e)!==e.name)return!1;if(6===s&&e.extra?.parenthesized&&t.left===e){const e=t.right.type;if(("FunctionExpression"===e||"ClassExpression"===e)&&null==t.right.id)return!0}if((64&i||(109===s||133===s)&&49&i)&&"let"===e.name){return!!((Ii(t,{object:e,computed:!0})||_i(t,{object:e,computed:!0,optional:!1}))&&49&i)||(64&i)>0}return 69===s&&t.left===e&&"async"===e.name&&!t.await},IntersectionTypeAnnotation:ji,LogicalExpression:function(e,t,s){return Bi(e,t,s,1)},NullableTypeAnnotation:function(e,t,s){return 4===s},ObjectExpression:function(e,t,s,i){return Ri(i)},OptionalCallExpression:Ji,OptionalIndexedAccessType:function(e,t,s){return 85===s&&t.objectType===e},OptionalMemberExpression:Ji,SequenceExpression:function(e,t,s){return!(142===s||134===s||109===s&&t.property===e||133===s&&t.property===e||222===s)&&(22===s||(69===s?t.right===e:61===s||!Li(t)))},SpreadElement:Ki,TSAsExpression:Ui,TSConditionalType:function(e,t,s){switch(s){case 153:case 193:case 209:case 210:case 179:case 217:return!0;case 173:return t.objectType===e;case 159:return t.checkType===e||t.extendsType===e}return!1},TSConstructorType:Vi,TSFunctionType:Vi,TSInferType:function(e,t,s){return!!$i(e,t,s)||(179===s||217===s)&&null!=e.typeParameter.constraint},TSInstantiationExpression:function(e,t,s){switch(s){case 18:case 131:case 113:case 175:return null!=t.typeArguments}return!1},TSIntersectionType:function(e,t,s){return 209===s||$i(e,t,s)},TSSatisfiesExpression:Ui,TSTypeAssertion:Ki,TSTypeOperator:$i,TSUnionType:qi,UnaryExpression:Ki,UnionTypeAnnotation:ji,UpdateExpression:function(e,t,s){return Fi(e,t,s)||Oi(e,t,s)},YieldExpression:Hi},Symbol.toStringTag,{value:"Module"});function Xi(e,t){const s=e.quasis;let i="`";for(let e=0;e<s.length-1;e++)i+=s[e].value.raw,this.token(i+"${",!0),this.print(t[e]),i="}";i+=s[s.length-1].value.raw,this.token(i+"`",!0)}const{isCallExpression:Gi,isLiteral:Yi,isMemberExpression:Qi,isNewExpression:Zi,isPattern:en}=hi;function tn(e){this.tokenChar(40);const t=this.enterDelimited();this.printList(e.arguments,this.shouldPrintTrailingComma(")"),void 0,void 0,void 0,!0),this._noLineTerminatorAfterNode=t,this.rightParens(e)}function sn(e){return"number"==typeof e.start&&e.start===e.declaration.start}function nn(e){this.print(e.left),this.space(),this.token(e.operator,!1,0,!0),this.space(),this.print(e.right)}const{isFor:rn,isIfStatement:an,isStatement:on,isVoidPattern:cn}=hi;function hn(e){const{body:t}=e;return!1===on(t)?e:hn(t)}function ln(e,t){t&&(e.space(),e.printTerminatorless(t)),e.semicolon()}function pn(e){this.tokenChar(44,e),this.newline()}const{isIdentifier:un}=hi;function dn(e,t,s,i){if(this.print(e.typeParameters),void 0!==s||void 0!==i){const e=Sn.call(this,s,i);e&&this.sourceIdentifierName(e.name,e.pos)}this.tokenChar(40),fn.call(this,e.params,41),this.print(e.returnType,t),this._noLineTerminator=t}function fn(e,t){const s=this.enterDelimited(),i=this.shouldPrintTrailingComma(t),n=e.length;for(let t=0;t<n;t++)mn.call(this,e[t]),(i||t<n-1)&&(this.tokenChar(44,t),this.space());this.tokenChar(t),this._noLineTerminatorAfterNode=s}function mn(e){this.printJoin(e.decorators,void 0,void 0,void 0,void 0,!0),this.print(e,void 0,!0),e.optional&&this.tokenChar(63),this.print(e.typeAnnotation,void 0,!0)}function yn(e){const t=e.kind,s=e.key;"get"!==t&&"set"!==t||(this.word(t),this.space()),e.async&&(this.word("async",!0),this.space()),"method"!==t&&"init"!==t||e.generator&&this.tokenChar(42),e.computed?(this.tokenChar(91),this.print(s),this.tokenChar(93)):this.print(s),e.optional&&this.tokenChar(63),this._buf._map?dn.call(this,e,!1,e.computed&&"StringLiteral"!==e.key.type?void 0:e.key):dn.call(this,e,!1)}function xn(e,t){e.predicate&&(e.returnType||this.tokenChar(58),this.space(),this.print(e.predicate,t))}function gn(e,t,s){e.async&&(this.word("async"),this.format.preserveFormat||(this._innerCommentsState=0),this.space()),this.word("function"),e.generator&&(this.format.preserveFormat||(this._innerCommentsState=0),this.tokenChar(42)),this.space(),e.id&&this.print(e.id),this._buf._map?dn.call(this,e,!1,e.id,t):dn.call(this,e,!1),s&&xn.call(this,e)}function kn(e,t){gn.call(this,e,t,!0),this.space(),this.print(e.body)}function Tn(e){if(1!==e.params.length)return!0;if(e.typeParameters||e.returnType||e.predicate)return!0;const t=e.params[0];if(!un(t)||t.typeAnnotation||t.optional||t.leadingComments?.length||t.trailingComments?.length)return!0;if(this.tokenMap){if(null==e.loc)return!0;if(null!==this.tokenMap.findMatching(e,"("))return!0;const t=this.tokenMap.findMatching(e,"=>");return null==t?.loc||t.loc.start.line!==e.loc.start.line}return!!this.format.retainLines}function bn(e){return!!e.loc?.identifierName&&e.loc.identifierName!==e.name}function Sn(e,t){let s,i=e;if(!i&&t){const e=t.type;"VariableDeclarator"===e?i=t.id:"AssignmentExpression"===e||"AssignmentPattern"===e?i=t.left:"ObjectProperty"===e||"ClassProperty"===e?t.computed&&"StringLiteral"!==t.key.type||(i=t.key):"ClassPrivateProperty"!==e&&"ClassAccessorProperty"!==e||(i=t.key)}if(i?.loc){if("Identifier"===i.type){if(!bn(i))return;s={pos:i.loc.start,name:i.loc.identifierName}}else if("PrivateName"===i.type){if(!bn(i.id))return;s={pos:i.loc.start,name:"#"+i.id.loc.identifierName}}else"StringLiteral"===i.type&&(s={pos:i.loc.start,name:i.value});return s}}function wn(e,t){this.tokenChar(60);let s="ArrowFunctionExpression"===t.type&&1===e.params.length;this.tokenMap&&null!=e.start&&null!=e.end&&(s&&=!!this.tokenMap.find(e,e=>this.tokenMap.matchesOriginal(e,",")),s||=this.shouldPrintTrailingComma(">")),this.printList(e.params,s),this.tokenChar(62)}function vn(e,t){e.tokenMap&&t.start&&t.end?e.tokenMap.endMatches(t,",")?e.token(","):e.tokenMap.endMatches(t,";")&&e.semicolon():e.semicolon()}function Cn(e){e.computed&&this.tokenChar(91),this.print(e.key),e.computed&&this.tokenChar(93),e.optional&&this.tokenChar(63)}function Pn(e){const{typeParameters:t}=e,s=e.params;this.print(t),this.tokenChar(40),fn.call(this,s,41),this.space();const i=e.returnType;this.print(i)}function En(e,t,s){let i=0;e.tokenMap?.startMatches(t,s)&&(i=1,e.token(s)),e.printJoin(t.types,void 0,void 0,function(e){this.space(),this.token(s,void 0,e+i),this.space()})}function An(e,t){!0!==t&&e.token(t)}function In(e){this.print(e.expression),this.print(e.typeArguments)}function _n(e){const{typeParameters:t}=e,s=e.params;this.print(t),this.tokenChar(40),fn.call(this,s,41),this.print(e.returnType)}function Nn(e){const t="ClassPrivateProperty"===e.type,s="ClassAccessorProperty"===e.type||"ClassProperty"===e.type;Dn(this,e,[s&&e.declare&&"declare",!t&&e.accessibility]),e.static&&(this.word("static"),this.space()),Dn(this,e,[!t&&e.abstract&&"abstract",!t&&e.override&&"override",(s||t)&&e.readonly&&"readonly"])}function Ln(e,t,s){e.token("{");const i=e.enterDelimited();s(),e._noLineTerminatorAfterNode=i,e.rightBrace(t)}function Dn(e,t,s){const i=new Set;for(const e of s)e&&i.add(e);e.tokenMap?.find(t,t=>!!i.has(t.value)&&(e.token(t.value),e.space(),i.delete(t.value),0===i.size));for(const t of i)e.word(t),e.space()}const{isClassDeclaration:Mn,isExportDefaultSpecifier:On,isExportNamespaceSpecifier:Fn,isImportDefaultSpecifier:Rn,isImportNamespaceSpecifier:Bn,isStatement:jn}=hi;function Un(e,t){const{attributes:s}=e;this.word("with"),this.space();const i=t?1:0;this.token("{",void 0,i),this.space(),this.printList(s,this.shouldPrintTrailingComma("}")),this.space(),this.token("}",void 0,i)}function qn(e){this.word("export"),this.space(),"type"===e.exportKind&&(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(),Un.call(this,e,!1)):this.print(e.source),this.semicolon()}function $n(e,t){Mn(t.declaration)&&sn.call(e,t)&&e.printJoin(t.declaration.decorators)}const{isAssignmentPattern:Vn,isIdentifier:Hn}=hi;let Kn="";function zn(e){const{name:t}=e,s=this.tokenMap.find(e,e=>e.value===t);return s?(Kn=this._originalCode.slice(s.start,s.end),Kn):Kn=e.name}function Jn(e){this.token("..."),this.print(e.argument)}function Wn(e){const t=e.properties;if(this.tokenChar(123),t.length){const e=this.enterDelimited();this.space(),this.printList(t,this.shouldPrintTrailingComma("}"),!0,!0,void 0,!0),this.space(),this._noLineTerminatorAfterNode=e}this.rightBrace(e)}function Xn(e){const t=e.elements,s=t.length;this.tokenChar(91);const i=this.enterDelimited();for(let e=0;e<t.length;e++){const i=t[e];i?(e>0&&this.space(),this.print(i,void 0,!0),(e<s-1||this.shouldPrintTrailingComma("]"))&&this.tokenChar(44,e)):this.tokenChar(44,e)}this._noLineTerminatorAfterNode=i,this.tokenChar(93)}function Gn(e){const t=this.getPossibleRaw(e),s=this.format.jsescOption,i=e.value,n=i+"";s.numbers?this.number(Ci(i,s),i):null==t?this.number(n,i):this.format.minified?this.number(t.length<n.length?t:n,i):this.number(t,i)}function Yn(e){const t=this.getPossibleRaw(e);if(!this.format.minified&&void 0!==t)return void this.token(t);const s=Ci(e.value,this.format.jsescOption);this.token(s)}function Qn(e){const t=this.getPossibleRaw(e);this.format.minified||void 0===t?this.word(e.value+"n"):this.word(t)}const Zn=new Set(["^^","@@","^","%","#"]);const{isDeclareExportDeclaration:er,isStatement:tr}=hi;function sr(e,t,s){s&&(e.space(),e.word("of"),e.space(),e.word(t)),e.space()}function ir(e,t){const{members:s}=t;e.token("{"),e.indent(),e.newline();for(const t of s)e.print(t),e.newline();t.hasUnknownMembers&&(e.token("..."),e.newline()),e.dedent(),e.token("}")}function nr(e,t){e.print(t.id),e.space(),e.token("="),e.space(),e.print(t.init),e.token(",")}function rr(e){if(e.declaration){const t=e.declaration;this.print(t),tr(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 ar(e){this.print(e.id),this.print(e.typeParameters,!0)}function or(e){this.print(e.id),this.print(e.typeParameters),e.extends?.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends)),"DeclareClass"===e.type&&(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 cr(e){const t=e.variance?.kind;null!=t&&("plus"===t?this.tokenChar(43):"minus"===t&&this.tokenChar(45))}function hr(e){this.word("interface"),this.space(),or.call(this,e)}function lr(e){this.space(),this.token("&",!1,e),this.space()}function pr(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 ur(e){this.tokenChar(60),this.printList(e.params),this.tokenChar(62)}function dr(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 fr(e){this.space(),this.token("|",!1,e),this.space()}const{isExportDefaultDeclaration:mr,isExportNamedDeclaration:yr}=hi;function xr(e,t){(mr(t)||yr(t))&&sn.call(this,t)||this.printJoin(e.decorators),e.declare&&(this.word("declare"),this.space()),e.abstract&&(this.word("abstract"),this.space()),this.word("class"),e.id&&(this.space(),this.print(e.id)),this.print(e.typeParameters),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass),this.print(e.superTypeArguments)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements)),this.space(),this.print(e.body)}function gr(e,t=!0){if(t&&this.printJoin(e.decorators),!this.format.preserveFormat){const t=e.key.loc?.end?.line;t&&this.catchUp(t)}Nn.call(this,e),yn.call(this,e)}const kr=/(?:^|[^\\])(?:\\\\)*'/,Tr=/(?:^|[^\\])(?:\\\\)*"/;function br(){this.space()}const Sr=Object.defineProperty({__proto__:null,AnyTypeAnnotation:function(){this.word("any")},ArgumentPlaceholder:function(){this.tokenChar(63)},ArrayExpression:Xn,ArrayPattern:Xn,ArrayTypeAnnotation:function(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)},ArrowFunctionExpression:function(e,t){e.async&&(this.word("async",!0),this.space()),Tn.call(this,e)?dn.call(this,e,!0,void 0,this._buf._map?t:void 0):this.print(e.params[0],!0),xn.call(this,e,!0),this.space(),this.printInnerComments(),this.token("=>"),this.space(),this.tokenContext|=2,this.print(e.body)},AssignmentExpression:nn,AssignmentPattern:function(e){this.print(e.left),("Identifier"===e.left.type||en(e.left))&&(e.left.optional&&this.tokenChar(63),this.print(e.left.typeAnnotation)),this.space(),this.tokenChar(61),this.space(),this.print(e.right)},AwaitExpression:function(e){this.word("await"),this.space(),this.print(e.argument)},BigIntLiteral:Qn,BigIntLiteralTypeAnnotation:Qn,BinaryExpression:function(e){this.print(e.left),this.space();const{operator:t}=e;105===t.charCodeAt(0)?this.word(t):(this.token(t,!1,0,!0),this.setLastChar(t.charCodeAt(t.length-1))),this.space(),this.print(e.right)},BindExpression:function(e){this.print(e.object),this.token("::"),this.print(e.callee)},BlockStatement:function(e){this.tokenChar(123);const t=this.enterDelimited(),s=e.directives?.length;if(s){const t=e.body.length?2:1;this.printSequence(e.directives,!0,!0,t),e.directives[s-1].trailingComments?.length||this.newline(t)}this.printSequence(e.body,!0,!0),this._noLineTerminatorAfterNode=t,this.rightBrace(e)},BooleanLiteral:function(e){this.word(e.value?"true":"false")},BooleanLiteralTypeAnnotation:function(e){this.word(e.value?"true":"false")},BooleanTypeAnnotation:function(){this.word("boolean")},BreakStatement:function(e){this.word("break"),ln(this,e.label)},CallExpression:function(e){this.print(e.callee),this.print(e.typeArguments),tn.call(this,e)},CatchClause:function(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)},ClassAccessorProperty:function(e){this.printJoin(e.decorators);const t=e.key.loc?.end?.line;t&&this.catchUp(t),Nn.call(this,e),this.word("accessor",!0),this.space(),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(cr.call(this,e),this.print(e.key)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()},ClassBody:function(e){if(this.tokenChar(123),0===e.body.length)this.tokenChar(125);else{const t=function(e,t){if(!e.tokenMap||null==t.start||null==t.end)return null;const s=e.tokenMap.getIndexes(t);if(!s)return null;let i=1,n=0,r=0;const a=()=>{for(;r<t.body.length&&null==t.body[r].start;)r++};return a(),o=>{r<=o&&(r=o+1,a());const c=r===t.body.length?t.end:t.body[r].start;let h;for(;i<s.length&&e.tokenMap.matchesOriginal(h=e._tokens[s[i]],";")&&h.start<c;)e.tokenChar(59,n++),i++}}(this,e);t?.(-1);const s=this.enterDelimited();this.printJoin(e.body,!0,!0,t,!0,!0),this._noLineTerminatorAfterNode=s,this.endsWith(10)||this.newline(),this.rightBrace(e)}},ClassDeclaration:xr,ClassExpression:xr,ClassImplements:ar,ClassMethod:function(e){gr.call(this,e),this.space(),this.print(e.body)},ClassPrivateMethod:function(e){gr.call(this,e),this.space(),this.print(e.body)},ClassPrivateProperty:function(e){this.printJoin(e.decorators),Nn.call(this,e),this.print(e.key),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()},ClassProperty:function(e){if(this.printJoin(e.decorators),!e.static&&!this.format.preserveFormat){const t=e.key.loc?.end?.line;t&&this.catchUp(t)}Nn.call(this,e),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(cr.call(this,e),this.print(e.key)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()},ConditionalExpression:function(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)},ContinueStatement:function(e){this.word("continue"),ln(this,e.label)},DebuggerStatement:function(){this.word("debugger"),this.semicolon()},DeclareClass:function(e,t){er(t)||(this.word("declare"),this.space()),this.word("class"),this.space(),or.call(this,e)},DeclareExportAllDeclaration:function(e){this.word("declare"),this.space(),qn.call(this,e)},DeclareExportDeclaration:function(e){this.word("declare"),this.space(),this.word("export"),this.space(),e.default&&(this.word("default"),this.space()),rr.call(this,e)},DeclareFunction:function(e,t){er(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()},DeclareInterface:function(e){this.word("declare"),this.space(),hr.call(this,e)},DeclareModule:function(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id),this.space(),this.print(e.body)},DeclareModuleExports:function(e){this.word("declare"),this.space(),this.word("module"),this.tokenChar(46),this.word("exports"),this.print(e.typeAnnotation)},DeclareOpaqueType:function(e,t){er(t)||(this.word("declare"),this.space()),dr.call(this,e)},DeclareTypeAlias:function(e){this.word("declare"),this.space(),pr.call(this,e)},DeclareVariable:function(e,t){er(t)||(this.word("declare"),this.space()),this.word("var"),this.space(),this.print(e.id),this.print(e.id.typeAnnotation),this.semicolon()},DeclaredPredicate:function(e){this.tokenChar(37),this.word("checks"),this.tokenChar(40),this.print(e.value),this.tokenChar(41)},Decorator:function(e){this.tokenChar(64);const{expression:t}=e;this.print(t),this.newline()},Directive:function(e){this.print(e.value),this.semicolon()},DirectiveLiteral:function(e){const t=this.getPossibleRaw(e);if(!this.format.minified&&void 0!==t)return void this.token(t);const{value:s}=e;if(Tr.test(s)){if(kr.test(s))throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.");this.token(`'${s}'`)}else this.token(`"${s}"`)},DoExpression:function(e){e.async&&(this.word("async",!0),this.space()),this.word("do"),this.space(),this.print(e.body)},DoWhileStatement:function(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()},EmptyStatement:function(){this.semicolon(!0)},EmptyTypeAnnotation:function(){this.word("empty")},EnumBooleanBody:function(e){const{explicitType:t}=e;sr(this,"boolean",t),ir(this,e)},EnumBooleanMember:function(e){nr(this,e)},EnumDeclaration:function(e){const{id:t,body:s}=e;this.word("enum"),this.space(),this.print(t),this.print(s)},EnumDefaultedMember:function(e){const{id:t}=e;this.print(t),this.tokenChar(44)},EnumNumberBody:function(e){const{explicitType:t}=e;sr(this,"number",t),ir(this,e)},EnumNumberMember:function(e){nr(this,e)},EnumStringBody:function(e){const{explicitType:t}=e;sr(this,"string",t),ir(this,e)},EnumStringMember:function(e){nr(this,e)},EnumSymbolBody:function(e){sr(this,"symbol",!0),ir(this,e)},ExistsTypeAnnotation:function(){this.tokenChar(42)},ExportAllDeclaration:qn,ExportDefaultDeclaration:function(e){$n(this,e),this.word("export"),this.noIndentInnerCommentsHere(),this.space(),this.word("default"),this.space(),this.tokenContext|=4;const t=e.declaration;this.print(t),jn(t)||this.semicolon()},ExportDefaultSpecifier:function(e){this.print(e.exported)},ExportNamedDeclaration:function(e){if($n(this,e),this.word("export"),this.space(),e.declaration){const t=e.declaration;this.print(t),jn(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());const t=e.specifiers.slice(0);let s=!1;for(;;){const e=t[0];if(!On(e)&&!Fn(e))break;s=!0,this.print(t.shift()),t.length&&(this.tokenChar(44),this.space())}let i=!1;(t.length||!t.length&&!s)&&(i=!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(),Un.call(this,e,i)):this.print(e.source)),this.semicolon()}},ExportNamespaceSpecifier:function(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.exported)},ExportSpecifier:function(e){"type"===e.exportKind&&(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))},ExpressionStatement:function(e){this.tokenContext|=1,this.print(e.expression),this.semicolon()},File:function(e){e.program&&this.print(e.program.interpreter),this.print(e.program)},ForInStatement:function(e){this.word("for"),this.space(),this.noIndentInnerCommentsHere(),this.tokenChar(40),this.tokenContext|=160,this.print(e.left),this.tokenContext=0,this.space(),this.word("in"),this.space(),this.print(e.right),this.tokenChar(41),this.printBlock(e.body)},ForOfStatement:function(e){this.word("for"),this.space(),e.await&&(this.word("await"),this.space()),this.noIndentInnerCommentsHere(),this.tokenChar(40),this.tokenContext|=64,this.print(e.left),this.space(),this.word("of"),this.space(),this.print(e.right),this.tokenChar(41),this.printBlock(e.body)},ForStatement:function(e){this.word("for"),this.space(),this.tokenChar(40),this.tokenContext|=144,this.print(e.init),this.tokenContext=0,this.tokenChar(59),e.test&&(this.space(),this.print(e.test)),this.tokenChar(59,1),e.update&&(this.space(),this.print(e.update)),this.tokenChar(41),this.printBlock(e.body)},FunctionDeclaration:kn,FunctionExpression:kn,FunctionTypeAnnotation:function(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);const s=t?.type;null!=s&&("ObjectTypeCallProperty"===s||"ObjectTypeInternalSlot"===s||"DeclareFunction"===s||"ObjectTypeProperty"===s&&t.method)?this.tokenChar(58):(this.space(),this.token("=>")),this.space(),this.print(e.returnType)},FunctionTypeParam:function(e){this.print(e.name),e.optional&&this.tokenChar(63),e.name&&(this.tokenChar(58),this.space()),this.print(e.typeAnnotation)},GenericTypeAnnotation:ar,Identifier:function(e){this._buf._map&&e.loc?.identifierName&&e.loc.identifierName!==e.name&&this.sourceIdentifierName(e.loc.identifierName),this.word(this.tokenMap?Kn:e.name)},IfStatement:function(e){this.word("if"),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.space();const t=e.alternate&&an(hn(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))},Import:function(){this.word("import")},ImportAttribute:function(e){this.print(e.key),this.tokenChar(58),this.space(),this.print(e.value)},ImportDeclaration:function(e){this.word("import"),this.space();const t="type"===e.importKind||"typeof"===e.importKind;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());const s=e.specifiers.slice(0),i=!!s.length;for(;i;){const e=s[0];if(!Rn(e)&&!Bn(e))break;this.print(s.shift()),s.length&&(this.tokenChar(44),this.space())}let n=!1;s.length?(n=!0,this.tokenChar(123),this.space(),this.printList(s,this.shouldPrintTrailingComma("}")),this.space(),this.tokenChar(125)):t&&!i&&(n=!0,this.tokenChar(123),this.tokenChar(125)),(i||t)&&(this.space(),this.word("from"),this.space()),e.attributes?.length?(this.print(e.source,!0),this.space(),Un.call(this,e,n)):this.print(e.source),this.semicolon()},ImportDefaultSpecifier:function(e){this.print(e.local)},ImportExpression:function(e){this.word("import"),e.phase&&(this.tokenChar(46),this.word(e.phase)),this.tokenChar(40);const t=this.shouldPrintTrailingComma(")");this.print(e.source),null!=e.options&&(this.tokenChar(44),this.space(),this.print(e.options)),t&&this.tokenChar(44),this.rightParens(e)},ImportNamespaceSpecifier:function(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.local)},ImportSpecifier:function(e){"type"!==e.importKind&&"typeof"!==e.importKind||(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))},IndexedAccessType:function(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)},InferredPredicate:function(){this.tokenChar(37),this.word("checks")},InterfaceDeclaration:hr,InterfaceExtends:ar,InterfaceTypeAnnotation:function(e){this.word("interface"),e.extends?.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends)),this.space(),this.print(e.body)},InterpreterDirective:function(e){this.token(`#!${e.value}`),this._newline()},IntersectionTypeAnnotation:function(e){this.printJoin(e.types,void 0,void 0,lr)},JSXAttribute:function(e){this.print(e.name),e.value&&(this.tokenChar(61),this.print(e.value))},JSXClosingElement:function(e){this.tokenChar(60),this.tokenChar(47),this.print(e.name),this.tokenChar(62)},JSXClosingFragment:function(){this.token("</"),this.tokenChar(62)},JSXElement:function(e){const t=e.openingElement;if(this.print(t),!t.selfClosing){this.indent();for(const t of e.children)this.print(t);this.dedent(),this.print(e.closingElement)}},JSXEmptyExpression:function(){this.printInnerComments()},JSXExpressionContainer:function(e){this.tokenChar(123),this.print(e.expression),this.rightBrace(e)},JSXFragment:function(e){this.print(e.openingFragment),this.indent();for(const t of e.children)this.print(t);this.dedent(),this.print(e.closingFragment)},JSXIdentifier:function(e){this.word(e.name)},JSXMemberExpression:function(e){this.print(e.object),this.tokenChar(46),this.print(e.property)},JSXNamespacedName:function(e){this.print(e.namespace),this.tokenChar(58),this.print(e.name)},JSXOpeningElement:function(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,br)),e.selfClosing&&(this.space(),this.tokenChar(47)),this.tokenChar(62)},JSXOpeningFragment:function(){this.tokenChar(60),this.tokenChar(62)},JSXSpreadAttribute:function(e){this.tokenChar(123),this.token("..."),this.print(e.argument),this.rightBrace(e)},JSXSpreadChild:function(e){this.tokenChar(123),this.token("..."),this.print(e.expression),this.rightBrace(e)},JSXText:function(e){const t=this.getPossibleRaw(e);void 0!==t?this.token(t,!0):this.token(e.value,!0)},LabeledStatement:function(e){this.print(e.label),this.tokenChar(58),this.space(),this.print(e.body)},LogicalExpression:nn,MemberExpression:function(e){if(this.print(e.object),!e.computed&&Qi(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");let t=e.computed;if(Yi(e.property)&&"number"==typeof e.property.value&&(t=!0),t){const t=this.enterDelimited();this.tokenChar(91),this.print(e.property,void 0,!0),this.tokenChar(93),this._noLineTerminatorAfterNode=t}else this.tokenChar(46),this.print(e.property)},MetaProperty:function(e){this.print(e.meta),this.tokenChar(46),this.print(e.property)},MixedTypeAnnotation:function(){this.word("mixed")},ModuleExpression:function(e){this.word("module",!0),this.space(),this.tokenChar(123),this.indent();const{body:t}=e;(t.body.length||t.directives.length)&&this.newline(),this.print(t),this.dedent(),this.rightBrace(e)},NewExpression:function(e,t){this.word("new"),this.space(),this.print(e.callee),(!this.format.minified||0!==e.arguments.length||Gi(t,{callee:e})||Qi(t)||Zi(t))&&(this.print(e.typeArguments),0===e.arguments.length&&this.tokenMap&&!this.tokenMap.endMatches(e,")")||tn.call(this,e))},NullLiteral:function(){this.word("null")},NullLiteralTypeAnnotation:function(){this.word("null")},NullableTypeAnnotation:function(e){this.tokenChar(63),this.print(e.typeAnnotation)},NumberLiteralTypeAnnotation:Gn,NumberTypeAnnotation:function(){this.word("number")},NumericLiteral:Gn,ObjectExpression:Wn,ObjectMethod:function(e){this.printJoin(e.decorators),yn.call(this,e),this.space(),this.print(e.body)},ObjectPattern:Wn,ObjectProperty:function(e){if(this.printJoin(e.decorators),e.computed)this.tokenChar(91),this.print(e.key),this.tokenChar(93);else{if(Vn(e.value)&&Hn(e.key)&&e.key.name===e.value.left.name)return void this.print(e.value);if(this.print(e.key),e.shorthand&&Hn(e.key)&&Hn(e.value)&&e.key.name===e.value.name)return}this.tokenChar(58),this.space(),this.print(e.value)},ObjectTypeAnnotation:function(e){e.exact?this.token("{|"):this.tokenChar(123);const t=[...e.properties,...e.callProperties||[],...e.indexers||[],...e.internalSlots||[]];t.length&&(this.newline(),this.space(),this.printJoin(t,!0,!0,()=>{(1!==t.length||e.inexact)&&(this.tokenChar(44),this.space())},!0),this.space()),e.inexact&&(this.indent(),this.token("..."),t.length&&this.newline(),this.dedent()),e.exact?this.token("|}"):this.tokenChar(125)},ObjectTypeCallProperty:function(e){e.static&&(this.word("static"),this.space()),this.print(e.value)},ObjectTypeIndexer:function(e){e.static&&(this.word("static"),this.space()),cr.call(this,e),this.tokenChar(91),e.id&&(this.print(e.id),this.tokenChar(58),this.space()),this.print(e.key),this.tokenChar(93),this.tokenChar(58),this.space(),this.print(e.value)},ObjectTypeInternalSlot:function(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)},ObjectTypeProperty:function(e){e.proto&&(this.word("proto"),this.space()),e.static&&(this.word("static"),this.space()),"get"!==e.kind&&"set"!==e.kind||(this.word(e.kind),this.space()),cr.call(this,e),this.print(e.key),e.optional&&this.tokenChar(63),e.method||(this.tokenChar(58),this.space()),this.print(e.value)},ObjectTypeSpreadProperty:function(e){this.token("..."),this.print(e.argument)},OpaqueType:dr,OptionalCallExpression:function(e){this.print(e.callee),e.optional&&this.token("?."),this.print(e.typeArguments),tn.call(this,e)},OptionalIndexedAccessType:function(e){this.print(e.objectType),e.optional&&this.token("?."),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)},OptionalMemberExpression:function(e){let{computed:t}=e;const{optional:s,property:i}=e;if(this.print(e.object),!t&&Qi(i))throw new TypeError("Got a MemberExpression for MemberExpression property");Yi(i)&&"number"==typeof i.value&&(t=!0),s&&this.token("?."),t?(this.tokenChar(91),this.print(i),this.tokenChar(93)):(s||this.tokenChar(46),this.print(i))},ParenthesizedExpression:function(e){this.tokenChar(40);const t=this.enterDelimited();this.print(e.expression,void 0,!0),this._noLineTerminatorAfterNode=t,this.rightParens(e)},Placeholder:function(e){this.token("%%"),this.print(e.name),this.token("%%"),"Statement"===e.expectedNode&&this.semicolon()},PrivateName:function(e){this.tokenChar(35),this.print(e.id)},Program:function(e){this.printInnerComments(!1);const t=e.directives?.length;if(t){const s=e.body.length?2:1;this.printSequence(e.directives,void 0,void 0,s),e.directives[t-1].trailingComments?.length||this.newline(s)}this.printSequence(e.body)},QualifiedTypeIdentifier:function(e){this.print(e.qualification),this.tokenChar(46),this.print(e.id)},RegExpLiteral:function(e){this.word(`/${e.pattern}/${e.flags}`,!1)},RestElement:Jn,ReturnStatement:function(e){this.word("return"),ln(this,e.argument)},SequenceExpression:function(e){this.printList(e.expressions)},SpreadElement:Jn,StaticBlock:function(e){this.word("static"),this.space(),this.tokenChar(123),0===e.body.length?this.tokenChar(125):(this.newline(),this.printSequence(e.body,!0),this.rightBrace(e))},StringLiteral:Yn,StringLiteralTypeAnnotation:Yn,StringTypeAnnotation:function(){this.word("string")},Super:function(){this.word("super")},SwitchCase:function(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))},SwitchStatement:function(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)},SymbolTypeAnnotation:function(){this.word("symbol")},TSAnyKeyword:function(){this.word("any")},TSArrayType:function(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)},TSAsExpression:function(e){const{expression:t,typeAnnotation:s}=e;this.print(t,!0),this.space(),this.word("as"),this.space(),this.print(s)},TSBigIntKeyword:function(){this.word("bigint")},TSBooleanKeyword:function(){this.word("boolean")},TSCallSignatureDeclaration:function(e){_n.call(this,e),vn(this,e)},TSClassImplements:In,TSConditionalType:function(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)},TSConstructSignatureDeclaration:function(e){this.word("new"),this.space(),_n.call(this,e),vn(this,e)},TSConstructorType:function(e){e.abstract&&(this.word("abstract"),this.space()),this.word("new"),this.space(),Pn.call(this,e)},TSDeclareFunction:function(e,t){e.declare&&(this.word("declare"),this.space()),gn.call(this,e,t,!1),this.semicolon()},TSDeclareMethod:function(e){gr.call(this,e,!1),this.semicolon()},TSEnumBody:function(e){Ln(this,e,()=>this.printList(e.members,this.shouldPrintTrailingComma("}")??!1,!0,!0,void 0,!0))},TSEnumDeclaration:function(e){const{declare:t,const:s,id:i}=e;t&&(this.word("declare"),this.space()),s&&(this.word("const"),this.space()),this.word("enum"),this.space(),this.print(i),this.space(),this.print(e.body)},TSEnumMember:function(e){const{id:t,initializer:s}=e;this.print(t),s&&(this.space(),this.tokenChar(61),this.space(),this.print(s))},TSExportAssignment:function(e){this.word("export"),this.space(),this.tokenChar(61),this.space(),this.print(e.expression),this.semicolon()},TSExternalModuleReference:function(e){this.token("require("),this.print(e.expression),this.tokenChar(41)},TSFunctionType:function(e){Pn.call(this,e)},TSImportEqualsDeclaration:function(e){const{id:t,moduleReference:s}=e;this.word("import"),this.space(),this.print(t),this.space(),this.tokenChar(61),this.space(),this.print(s),this.semicolon()},TSImportType:function(e){const{qualifier:t,options:s}=e;this.word("import"),this.tokenChar(40),this.print(e.source),s&&(this.tokenChar(44),this.print(s)),this.tokenChar(41),t&&(this.tokenChar(46),this.print(t));const i=e.typeArguments;i&&this.print(i)},TSIndexSignature:function(e){const{readonly:t,static:s}=e;s&&(this.word("static"),this.space()),t&&(this.word("readonly"),this.space()),this.tokenChar(91),fn.call(this,e.parameters,93),this.print(e.typeAnnotation),vn(this,e)},TSIndexedAccessType:function(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)},TSInferType:function(e){this.word("infer"),this.print(e.typeParameter)},TSInstantiationExpression:function(e){this.print(e.expression),this.print(e.typeArguments)},TSInterfaceBody:function(e){Ln(this,e,()=>this.printJoin(e.body,!0,!0,void 0,void 0,!0))},TSInterfaceDeclaration:function(e){const{declare:t,id:s,typeParameters:i,extends:n,body:r}=e;t&&(this.word("declare"),this.space()),this.word("interface"),this.space(),this.print(s),this.print(i),n?.length&&(this.space(),this.word("extends"),this.space(),this.printList(n)),this.space(),this.print(r)},TSInterfaceHeritage:In,TSIntersectionType:function(e){En(this,e,"&")},TSIntrinsicKeyword:function(){this.word("intrinsic")},TSLiteralType:function(e){this.print(e.literal)},TSMappedType:function(e){const{nameType:t,optional:s,readonly:i,typeAnnotation:n}=e;this.tokenChar(123);const r=this.enterDelimited();this.space(),i&&(An(this,i),this.word("readonly"),this.space()),this.tokenChar(91),this.word(e.key.name),this.space(),this.word("in"),this.space(),this.print(e.constraint),t&&(this.space(),this.word("as"),this.space(),this.print(t,void 0,!0)),this.tokenChar(93),s&&(An(this,s),this.tokenChar(63)),n&&(this.tokenChar(58),this.space(),this.print(n,void 0,!0)),this.space(),this._noLineTerminatorAfterNode=r,this.tokenChar(125)},TSMethodSignature:function(e){const{kind:t}=e;"set"!==t&&"get"!==t||(this.word(t),this.space()),Cn.call(this,e),_n.call(this,e),vn(this,e)},TSModuleBlock:function(e){Ln(this,e,()=>this.printSequence(e.body,!0,!0))},TSModuleDeclaration:function(e){const{declare:t,kind:s}=e;t&&(this.word("declare"),this.space()),"global"!==s&&(this.word(s),this.space()),this.print(e.id),e.body?(this.space(),this.print(e.body)):this.semicolon()},TSNamedTupleMember:function(e){this.print(e.label),e.optional&&this.tokenChar(63),this.tokenChar(58),this.space(),this.print(e.elementType)},TSNamespaceExportDeclaration:function(e){this.word("export"),this.space(),this.word("as"),this.space(),this.word("namespace"),this.space(),this.print(e.id),this.semicolon()},TSNeverKeyword:function(){this.word("never")},TSNonNullExpression:function(e){this.print(e.expression),this.tokenChar(33),this.setLastChar(33)},TSNullKeyword:function(){this.word("null")},TSNumberKeyword:function(){this.word("number")},TSObjectKeyword:function(){this.word("object")},TSOptionalType:function(e){this.print(e.typeAnnotation),this.tokenChar(63)},TSParameterProperty:function(e){e.accessibility&&(this.word(e.accessibility),this.space()),e.readonly&&(this.word("readonly"),this.space()),mn.call(this,e.parameter)},TSParenthesizedType:function(e){this.tokenChar(40),this.print(e.typeAnnotation),this.tokenChar(41)},TSPropertySignature:function(e){const{readonly:t}=e;t&&(this.word("readonly"),this.space()),Cn.call(this,e),this.print(e.typeAnnotation),vn(this,e)},TSQualifiedName:function(e){this.print(e.left),this.tokenChar(46),this.print(e.right)},TSRestType:function(e){this.token("..."),this.print(e.typeAnnotation)},TSSatisfiesExpression:function(e){const{expression:t,typeAnnotation:s}=e;this.print(t,!0),this.space(),this.word("satisfies"),this.space(),this.print(s)},TSStringKeyword:function(){this.word("string")},TSSymbolKeyword:function(){this.word("symbol")},TSTemplateLiteralType:function(e){Xi.call(this,e,e.types)},TSThisType:function(){this.word("this")},TSTupleType:function(e){this.tokenChar(91),this.printList(e.elementTypes,this.shouldPrintTrailingComma("]")),this.tokenChar(93)},TSTypeAliasDeclaration:function(e){const{declare:t,id:s,typeParameters:i,typeAnnotation:n}=e;t&&(this.word("declare"),this.space()),this.word("type"),this.space(),this.print(s),this.print(i),this.space(),this.tokenChar(61),this.space(),this.print(n),this.semicolon()},TSTypeAnnotation:function(e,t){this.token("TSFunctionType"!==t.type&&"TSConstructorType"!==t.type||t.returnType!==e?":":"=>"),this.space(),e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)},TSTypeAssertion:function(e){const{typeAnnotation:t,expression:s}=e;this.tokenChar(60),this.print(t),this.tokenChar(62),this.space(),this.print(s)},TSTypeLiteral:function(e){Ln(this,e,()=>this.printJoin(e.members,!0,!0,void 0,void 0,!0))},TSTypeOperator:function(e){this.word(e.operator),this.space(),this.print(e.typeAnnotation)},TSTypeParameter:function(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))},TSTypeParameterDeclaration:wn,TSTypeParameterInstantiation:wn,TSTypePredicate:function(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))},TSTypeQuery:function(e){this.word("typeof"),this.space(),this.print(e.exprName);const t=e.typeArguments;t&&this.print(t)},TSTypeReference:function(e){const t=e.typeArguments;this.print(e.typeName,!!t),this.print(t)},TSUndefinedKeyword:function(){this.word("undefined")},TSUnionType:function(e){En(this,e,"|")},TSUnknownKeyword:function(){this.word("unknown")},TSVoidKeyword:function(){this.word("void")},TaggedTemplateExpression:function(e){this.print(e.tag),this.print(e.typeArguments),this.print(e.quasi)},TemplateElement:function(){throw new Error("TemplateElement printing is handled in TemplateLiteral")},TemplateLiteral:function(e){Xi.call(this,e,e.expressions)},ThisExpression:function(){this.word("this")},ThisTypeAnnotation:function(){this.word("this")},ThrowStatement:function(e){this.word("throw"),ln(this,e.argument)},TopicReference:function(){const{topicToken:e}=this.format;if(!Zn.has(e)){const t=JSON.stringify(e),s=Array.from(Zn,e=>JSON.stringify(e));throw new Error(`The "topicToken" generator option must be one of ${s.join(", ")} (${t} received instead).`)}this.token(e)},TryStatement:function(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))},TupleTypeAnnotation:function(e){this.tokenChar(91),this.printList(e.types),this.tokenChar(93)},TypeAlias:pr,TypeAnnotation:function(e,t){this.tokenChar(58),this.space(),"ArrowFunctionExpression"===t.type?this.tokenContext|=8:e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)},TypeCastExpression:function(e){this.tokenChar(40),this.print(e.expression),this.print(e.typeAnnotation),this.tokenChar(41)},TypeParameter:function(e){cr.call(this,e),this.word(e.name),e.bound&&this.print(e.bound),e.default&&(this.space(),this.tokenChar(61),this.space(),this.print(e.default))},TypeParameterDeclaration:ur,TypeParameterInstantiation:ur,TypeofTypeAnnotation:function(e){this.word("typeof"),this.space(),this.print(e.argument)},UnaryExpression:function(e){const{operator:t}=e,s=t.charCodeAt(0);s>=97&&s<=122?(this.word(t),this.space()):this.tokenChar(s),this.print(e.argument)},UnionTypeAnnotation:function(e){this.printJoin(e.types,void 0,void 0,fr)},UpdateExpression:function(e){e.prefix?(this.token(e.operator,!1,0,!0),this.print(e.argument)):(this.print(e.argument,!0),this.token(e.operator,!1,0,!0))},V8IntrinsicIdentifier:function(e){this.tokenChar(37),this.word(e.name)},VariableDeclaration:function(e,t){e.declare&&(this.word("declare"),this.space());const{kind:s}=e;switch(s){case"await using":this.word("await"),this.space();case"using":this.word("using",!0);break;default:this.word(s)}this.space();let i=!1;if(!rn(t))for(const t of e.declarations)if(t.init){i=!0;break}if(this.printList(e.declarations,void 0,void 0,e.declarations.length>1,i?pn:void 0),null!=t)switch(t.type){case"ForStatement":if(t.init===e)return;break;case"ForInStatement":case"ForOfStatement":if(t.left===e)return}this.semicolon()},VariableDeclarator:function(e){this.print(e.id),e.definite&&this.tokenChar(33),cn(e.id)||this.print(e.id.typeAnnotation),e.init&&(this.space(),this.tokenChar(61),this.space(),this.print(e.init))},Variance:function(e){"plus"===e.kind?this.tokenChar(43):this.tokenChar(45)},VoidPattern:function(){this.word("void")},VoidTypeAnnotation:function(){this.word("void")},WhileStatement:function(e){this.word("while"),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.printBlock(e.body)},WithStatement:function(e){this.word("with"),this.space(),this.tokenChar(40),this.print(e.object),this.tokenChar(41),this.printBlock(e.body)},YieldExpression:function(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")},_classMethodHead:gr,_functionHead:gn,_getRawIdentifier:zn,_interfaceish:or,_methodHead:yn,_param:mn,_parameters:fn,_params:dn,_predicate:xn,_printAttributes:Un,_printTemplate:Xi,_shouldPrintArrowParamsParens:Tn,_shouldPrintDecoratorsBeforeExport:sn,_tsPrintClassMemberModifiers:Nn,_variance:cr},Symbol.toStringTag,{value:"Module"}),wr=new Map;let vr=0;for(const e of Object.keys(Sr).sort())e.startsWith("_")||wr.set(e,[Sr[e],vr++,void 0]);const{VISITOR_KEYS:Cr}=hi;for(const e of Object.keys(Wi)){const t=Wi[e];wr.has(e)&&(wr.get(e)[2]=t)}function Pr(e){switch(e.type){case"Identifier":return!0;case"MemberExpression":return!e.computed&&"Identifier"===e.property.type&&Pr(e.object);default:return!1}}const{traverseFast:Er,VISITOR_KEYS:Ar}=hi;class Ir{_tokens;_source;_nodesToTokenIndexes=new Map;_nodesOccurrencesCountCache=new Map;_tokensCache=new Map;constructor(e,t,s){this._tokens=t,this._source=s,Er(e,e=>{const 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){const s=this._nodesToTokenIndexes.get(e);if(s)for(let e=0;e<s.length;e++){const i=s[e],n=this._tokens[i];if(t(n,i))return n}return null}findLastIndex(e,t){const s=this._nodesToTokenIndexes.get(e);if(s)for(let e=s.length-1;e>=0;e--){const i=s[e];if(t(this._tokens[i],i))return i}return-1}findMatching(e,t,s=0){const i=this._nodesToTokenIndexes.get(e);if(i){"number"==typeof t&&(t=String.fromCharCode(t));let n=0;const r=s;if(r>1){const i=this._nodesOccurrencesCountCache.get(e);i?.test===t&&i.count<r&&(n=i.i+1,s-=i.count+1)}for(;n<i.length;n++){const a=this._tokens[i[n]];if(this.matchesOriginal(a,t)){if(0===s)return r>0&&this._nodesOccurrencesCountCache.set(e,{test:t,count:r,i:n}),a;s--}}}return null}matchesOriginal(e,t){return e.end-e.start===t.length&&(null!=e.value?e.value===t:this._source.startsWith(t,e.start))}startMatches(e,t){const s=this._nodesToTokenIndexes.get(e);if(!s)return!1;const i=this._tokens[s[0]];return i.start===e.start&&this.matchesOriginal(i,t)}endMatches(e,t){const s=this._nodesToTokenIndexes.get(e);if(!s)return!1;const i=this._tokens[s[s.length-1]];return i.end===e.end&&this.matchesOriginal(i,t)}_getTokensIndexesOfNode(e){if(null==e.start||null==e.end)return[];const{first:t,last:s}=this._findTokensOfNode(e,0,this._tokens.length-1);let i=t;const n=function*(e){if("TemplateLiteral"===e.type){yield e.quasis[0];for(let t=1;t<e.quasis.length;t++)yield e.expressions[t-1],yield e.quasis[t];return}const t=Ar[e.type];for(const s of t){const t=e[s];t&&(Array.isArray(t)?yield*t:yield t)}}(e);"ExportNamedDeclaration"!==e.type&&"ExportDefaultDeclaration"!==e.type||"ClassDeclaration"!==e.declaration?.type||n.next();const r=[];for(const e of n){if(null==e)continue;if(null==e.start||null==e.end)continue;const t=this._findTokensOfNode(e,i,s),n=t.first;for(let e=i;e<n;e++)r.push(e);i=t.last+1}for(let e=i;e<=s;e++)r.push(e);return r}_findTokensOfNode(e,t,s){const i=this._tokensCache.get(e);if(i)return i;const n=this._findFirstTokenOfNode(e.start,t,s),r=this._findLastTokenOfNode(e.end,n,s);return this._tokensCache.set(e,{first:n,last:r}),{first:n,last:r}}_findFirstTokenOfNode(e,t,s){for(;t<=s;){const i=s+t>>1;if(e<this._tokens[i].start)s=i-1;else{if(!(e>this._tokens[i].start))return i;t=i+1}}return t}_findLastTokenOfNode(e,t,s){for(;t<=s;){const i=s+t>>1;if(e<this._tokens[i].end)s=i-1;else{if(!(e>this._tokens[i].end))return i;t=i+1}}return s}}const{isExpression:_r,isFunction:Nr,isStatement:Lr,isClassBody:Dr,isTSInterfaceBody:Mr,isTSEnumMember:Or}=hi,Fr=/e/i,Rr=/\.0+$/,Br=/[\n\r\u2028\u2029]/,jr=/[\n\r\u2028\u2029]|\*\//;function Ur(e){return"CommentLine"===e.type||Br.test(e.value)}class qr{constructor(e,t,s=null,i=null){this.format=e,this._tokens=s,this._originalCode=i,this._indentRepeat=e.indent.style.length,this._inputMap=t?._inputMap||null,this._buf=new Ai(t,e.indent.style[0]);const{preserveFormat:n,compact:r,concise:a,retainLines:o,retainFunctionParens:c}=e;n&&(this._flags|=1),r&&(this._flags|=2),a&&(this._flags|=4),o&&(this._flags|=8),c&&(this._flags|=16),(e.auxiliaryCommentBefore||e.auxiliaryCommentAfter)&&(this._flags|=32)}enterDelimited(){const e=this._noLineTerminatorAfterNode;return null!==e&&(this._noLineTerminatorAfterNode=null),e}tokenContext=0;_tokens=null;_originalCode=null;_currentNode=null;_currentTypeId=null;_indent=0;_indentRepeat=0;_insideAux=!1;_noLineTerminator=!1;_noLineTerminatorAfterNode=null;_printAuxAfterOnNextUserNode=!1;_printedComments=new Set;_lastCommentLine=0;_innerCommentsState=0;_flags=0;tokenMap=null;_boundGetRawIdentifier=null;generate(e){return this.format.preserveFormat&&(this.tokenMap=new Ir(e,this._tokens,this._originalCode),this._boundGetRawIdentifier=zn.bind(this)),this.print(e),this._maybeAddAuxComment(),this._buf.get()}indent(e=this._flags){7&e||(this._indent+=this._indentRepeat)}dedent(e=this._flags){7&e||(this._indent-=this._indentRepeat)}_printSemicolonBeforeNextNode=-1;_printSemicolonBeforeNextToken=-1;semicolon(e=!1){const t=this._flags;if(32&t&&this._maybeAddAuxComment(),1&t){const e=this._currentNode;if(null!=e.start&&null!=e.end){if(!this.tokenMap.endMatches(e,";"))return void(this._printSemicolonBeforeNextNode=this._buf.getCurrentLine());const t=this.tokenMap.getIndexes(this._currentNode);this._catchUpTo(this._tokens[t[t.length-1]].loc.start)}}e?this._appendChar(59):this._queue(59),this._noLineTerminator=!1}rightBrace(e){this.format.minified&&this._buf.removeLastSemicolon(),this.sourceWithOffset("end",e.loc,-1),this.tokenChar(125)}rightParens(e){this.sourceWithOffset("end",e.loc,-1),this.tokenChar(41)}space(e=!1){if(!(3&this._flags))if(e)this._space();else{const e=this.getLastChar(!0);0!==e&&32!==e&&10!==e&&this._space()}}word(e,t=!1){this.tokenContext&=128,this._maybePrintInnerComments(e);const s=this._flags;32&s&&this._maybeAddAuxComment(),1&s&&this._catchUpToCurrentToken(e);const i=this.getLastChar();(-2===i||-3===i||47===i&&47===e.charCodeAt(0))&&this._space(),this._append(e,!1),this.setLastChar(-3),this._noLineTerminator=t}number(e,t){this.word(e),!Number.isInteger(t)||function(e){if(e.length>2&&48===e.charCodeAt(0)){const t=e.charCodeAt(1);return 98===t||111===t||120===t}return!1}(e)||Fr.test(e)||Rr.test(e)||46===e.charCodeAt(e.length-1)||this.setLastChar(-2)}token(e,t=!1,s=0,i=!1){this.tokenContext&=128,this._maybePrintInnerComments(e,s);const n=this._flags;if(32&n&&this._maybeAddAuxComment(),1&n&&this._catchUpToCurrentToken(e,s),i){const t=e.charCodeAt(0);((45===t&&"--"===e||61===t)&&33===this.getLastChar()||43===t&&43===this.getLastChar()||45===t&&45===this.getLastChar()||46===t&&-2===this.getLastChar())&&this._space()}this._append(e,t),this._noLineTerminator=!1}tokenChar(e,t=0){this.tokenContext&=128,this._maybePrintInnerComments(e,t);const s=this._flags;32&s&&this._maybeAddAuxComment(),1&s&&this._catchUpToCurrentToken(e,t),(43===e&&43===this.getLastChar()||45===e&&45===this.getLastChar()||46===e&&-2===this.getLastChar())&&this._space(),this._appendChar(e),this._noLineTerminator=!1}newline(e=1,t=this._flags){if(!(e<=0||10&t))if(4&t)this.space();else{e>2&&(e=2),e-=this._buf.getNewlineCount();for(let t=0;t<e;t++)this._newline()}}endsWith(e){return this.getLastChar(!0)===e}getLastChar(e){return this._buf.getLastChar(e)}setLastChar(e){this._buf._last=e}exactSource(e,t){e?(this._catchUp("start",e),this._buf.exactSource(e,t)):t()}source(e,t){t&&(this._catchUp(e,t),this._buf.source(e,t))}sourceWithOffset(e,t,s){t&&!this.format.preserveFormat&&(this._catchUp(e,t),this._buf.sourceWithOffset(e,t,s))}sourceIdentifierName(e,t){if(!this._buf._canMarkIdName)return;const s=this._buf._sourcePosition;s.identifierNamePos=t,s.identifierName=e}_space(){this._queue(32)}_newline(){32===this._buf._queuedChar&&(this._buf._queuedChar=0),this._appendChar(10,!0)}_catchUpToCurrentToken(e,t=0){const s=this.tokenMap.findMatching(this._currentNode,e,t);s&&this._catchUpTo(s.loc.start),-1!==this._printSemicolonBeforeNextToken&&this._printSemicolonBeforeNextToken===this._buf.getCurrentLine()&&this._appendChar(59,!0),this._printSemicolonBeforeNextToken=-1,this._printSemicolonBeforeNextNode=-1}_append(e,t){this._maybeIndent(),this._buf.append(e,t)}_appendChar(e,t){t||this._maybeIndent(),this._buf.appendChar(e)}_queue(e){this._buf.queue(e),this.setLastChar(-1)}_maybeIndent(){const e=this._shouldIndent();e>0&&this._buf._appendChar(-1,e,!1)}_shouldIndent(){return this.endsWith(10)?this._indent:0}catchUp(e){if(!this.format.retainLines)return;const t=e-this._buf.getCurrentLine();for(let e=0;e<t;e++)this._newline()}_catchUp(e,t){const s=this._flags;if(!(1&s))return void(8&s&&t?.[e]&&this.catchUp(t[e].line));const i=t?.[e];null!=i&&this._catchUpTo(i)}_catchUpTo({line:e,column:t,index:s}){const i=e-this._buf.getCurrentLine();if(i>0&&this._noLineTerminator)return;for(let e=0;e<i;e++)this._newline();const n=i>0?t:t-this._buf.getCurrentColumn();if(n>0){const i=this._originalCode?this._originalCode.slice(s-n,s).replace(/[^\t\v\f\uFEFF\p{Space_Separator}]/gu," "):" ".repeat(n);this._buf.append(i,!1,!0),this._buf.setSourcePosition(e,t),this.setLastChar(32)}}printTerminatorless(e){this._noLineTerminator=!0,this.print(e)}print(e,t=!1,s=!1,i){if(!e)return;this._innerCommentsState=0;const{type:n,loc:r,extra:a}=e,o=this._flags;let c=!1;e._compact&&(this._flags|=4,c=!0);const h=wr.get(n);if(void 0===h)throw new ReferenceError(`unknown node of type ${JSON.stringify(n)} with constructor ${JSON.stringify(e.constructor.name)}`);const[l,p,u]=h,d=this._currentNode,f=this._currentTypeId;let m;this._currentNode=e,this._currentTypeId=p,1&o&&(this._printSemicolonBeforeNextToken=this._printSemicolonBeforeNextNode),32&o&&(m=this._insideAux,this._insideAux=null==r,this._maybeAddAuxComment(this._insideAux&&!m));let y=0;s&&(y=this.tokenContext,128&y?this.tokenContext=0:y=0);const x=null!=a&&a.parenthesized;let g=x&&1&o||x&&16&o&&72===p||d&&(function(e,t,s){switch(s){case 113:if(t.callee===e)return function(e){let t=e;for(;;)switch(t.type){case"CallExpression":case"ImportExpression":case"OptionalCallExpression":case"OptionalMemberExpression":return!0;case"MemberExpression":t=t.object;break;case"TaggedTemplateExpression":t=t.tag;break;case"TSInstantiationExpression":case"TSNonNullExpression":t=t.expression;break;default:return!1}}(e);break;case 220:if(t.tag===e)return function(e){let t=e;for(;;)switch(t.type){case"OptionalCallExpression":case"OptionalMemberExpression":return!0;case"TSInstantiationExpression":case"TSNonNullExpression":t=t.expression;break;default:return!1}}(e);break;case 43:return!(Pr(e)||"CallExpression"===e.type&&Pr(e.callee)||"ParenthesizedExpression"===e.type)}return!1}(e,d,f)||null!=u&&u(e,d,f,this.tokenContext,1&o?this._boundGetRawIdentifier:void 0));if(!g&&x&&e.leadingComments?.length&&"CommentBlock"===e.leadingComments[0].type)switch(f){case 66:case 241:case 6:case 141:break;case 18:case 131:case 113:if(d.callee!==e)break;default:g=!0}let k,T=!1;!g&&this._noLineTerminator&&(e.leadingComments?.some(Ur)||8&o&&r&&r.start.line>this._buf.getCurrentLine())&&(g=!0,T=!0),g||(t||=!!d&&this._noLineTerminatorAfterNode===d&&function(e,t){const s=Cr[e.type];for(let i=s.length-1;i>=0;i--){const n=e[s[i]];if(n===t)return!0;if(Array.isArray(n)){let e=n.length-1;for(;e>=0&&null===n[e];)e--;return e>=0&&n[e]===t}if(n)return!1}return!1}(d,e),t&&(e.trailingComments?.some(Ur)?_r(e)&&(g=!0):(k=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=e))),g&&(this.tokenChar(40),T&&this.indent(),this._innerCommentsState=0,s||(y=this.tokenContext),128&y&&(this.tokenContext=0),k=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=null),this._printLeadingComments(e,d),this.exactSource(137===p||67===p?null:r,l.bind(this,e,d)),g?(this._printTrailingComments(e,d),T&&(this.dedent(),this.newline()),this.tokenChar(41),this._noLineTerminator=t):t&&!this._noLineTerminator?(this._noLineTerminator=!0,this._printTrailingComments(e,d)):this._printTrailingComments(e,d,i),y&&(this.tokenContext=y),this._currentNode=d,this._currentTypeId=f,c&&(this._flags=o),32&o&&(this._insideAux=m),null!=k&&(this._noLineTerminatorAfterNode=k),this._innerCommentsState=0}_maybeAddAuxComment(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!0;const e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:"CommentBlock",value:e},0)}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!1;const e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:"CommentBlock",value:e},0)}getPossibleRaw(e){const t=e.extra;if(null!=t?.raw&&null!=t.rawValue&&e.value===t.rawValue)return t.raw}printJoin(e,t,s,i,n,r,a){if(!e?.length)return;const o=this._flags;if(null==s&&8&o){const t=e[0].loc?.start.line;null!=t&&t!==this._buf.getCurrentLine()&&(s=!0)}s&&this.indent(o);const c=e.length;for(let s=0;s<c;s++){const h=e[s];if(h&&(t&&0===s&&this._buf.hasContent()&&this.newline(1,o),this.print(h,!1,r,a||0),null!=i&&(s<c-1?i.call(this,s,!1):n&&i.call(this,s,!0)),t))if(s+1===c)this.newline(1,o);else{const t=this._lastCommentLine;if(t>0){const i=(e[s+1].loc?.start.line||0)-t;if(i>=0){this.newline(i||1,o);continue}}this.newline(1,o)}}s&&this.dedent(o)}printAndIndentOnComments(e){const t=e.leadingComments&&e.leadingComments.length>0;t&&this.indent(),this.print(e),t&&this.dedent()}printBlock(e){"EmptyStatement"!==e.type&&this.space(),this.print(e)}_printTrailingComments(e,t,s){const{innerComments:i,trailingComments:n}=e;i?.length&&this._printComments(2,i,e,t,s),n?.length?this._printComments(2,n,e,t,s):this._lastCommentLine=0}_printLeadingComments(e,t){const s=e.leadingComments;s?.length&&this._printComments(0,s,e,t)}_maybePrintInnerComments(e,t){const s=this._innerCommentsState;switch(3&s){case 0:return void(this._innerCommentsState=5);case 1:this.printInnerComments((4&s)>0,this.tokenMap?.findMatching(this._currentNode,e,t))}}printInnerComments(e=!0,t){const s=this._currentNode,i=s.innerComments;if(!i?.length)return void(this._innerCommentsState=2);const n=this.endsWith(32);switch(e&&this.indent(),this._printComments(1,i,s,void 0,void 0,t)){case 2:this._innerCommentsState=2;case 1:n&&this.space()}e&&this.dedent()}noIndentInnerCommentsHere(){this._innerCommentsState&=-5}printSequence(e,t,s,i){this.printJoin(e,!0,t??!1,void 0,void 0,s,i)}printList(e,t,s,i,n,r){this.printJoin(e,s,i,n??$r,t,r)}shouldPrintTrailingComma(e){if(!this.tokenMap)return null;const t=this.tokenMap.findLastIndex(this._currentNode,t=>this.tokenMap.matchesOriginal(t,"number"==typeof e?String.fromCharCode(e):e));return t<=0?null:this.tokenMap.matchesOriginal(this._tokens[t-1],",")}_shouldPrintComment(e,t){if(e.ignore)return 0;if(this._printedComments.has(e))return 0;if(this._noLineTerminator&&jr.test(e.value))return 2;if(t&&this.tokenMap){const s=this.tokenMap.find(this._currentNode,t=>t.value===e.value);if(s&&s.start>t.start)return 2}return this._printedComments.add(e),this.format.shouldPrintComment(e.value)?1:0}_printComment(e,t){const s=this._noLineTerminator,i="CommentBlock"===e.type,n=i&&1!==t&&!s;switch(n&&this._buf.hasContent()&&2!==t&&this.newline(1),this.getLastChar(!0)){case 47:this._space();case 91:case 123:case 40:break;default:this.space()}let r;if(i){if(r=`/*${e.value}*/`,this.format.indent.adjustMultilineComment){const t=e.loc?.start.column;if(t){const e=new RegExp("\\n\\s{1,"+t+"}","g");r=r.replace(e,"\n")}if(4&this._flags)r=r.replace(/\n(?!$)/g,"\n");else{let e=this.format.retainLines?0:this._buf.getCurrentColumn();(this._shouldIndent()||this.format.retainLines)&&(e+=this._indent),r=r.replace(/\n(?!$)/g,`\n${" ".repeat(e)}`)}}}else r=s?`/*${e.value}*/`:`//${e.value}`;this.source("start",e.loc),this._append(r,i),i||s||this._newline(),n&&3!==t&&this.newline(1)}_printComments(e,t,s,i,n=0,r){const a=s.loc,o=t.length;let c=!!a;const h=c?a.start.line:0,l=c?a.end.line:0;let p=0,u=0;const{_noLineTerminator:d,_flags:f}=this;for(let a=0;a<o;a++){const m=t[a],y=this._shouldPrintComment(m,r);if(2===y)return 0===a?0:1;if(c&&m.loc&&1===y){const t=m.loc.start.line,s=m.loc.end.line;if(0===e){let e=0;if(0===a?!this._buf.hasContent()||"CommentLine"!==m.type&&t===s||(e=u=1):e=t-p,p=s,e>0&&!d&&this.newline(e,f),this._printComment(m,1),a+1===o){const e=Math.max(h-p,u);e>0&&!d&&this.newline(e,f),p=h}}else if(1===e){const e=t-(0===a?h:p);if(p=s,e>0&&!d&&this.newline(e,f),this._printComment(m,1),a+1===o){const e=Math.min(1,l-p);e>0&&!d&&this.newline(e,f),p=l}}else{const e=t-(0===a?l-n:p);p=s,e>0&&!d&&this.newline(e,f),this._printComment(m,1)}}else{if(c=!1,1!==y)continue;if(1===o){const t=m.loc?m.loc.start.line===m.loc.end.line:!Br.test(m.value),n=t&&!Lr(s)&&!Dr(i)&&!Mr(i)&&!Or(s);0===e?this._printComment(m,n&&"ObjectExpression"!==s.type||t&&Nr(i)&&i.body===s?1:0):n&&2===e?this._printComment(m,1):this._printComment(m,0)}else 1!==e||"ObjectExpression"===s.type&&s.properties.length>1||"ClassBody"===s.type||"TSInterfaceBody"===s.type?this._printComment(m,0):this._printComment(m,0===a?2:a===o-1?3:0)}}return 2===e&&c&&p&&(this._lastCommentLine=p),2}}function $r(e,t){this.tokenChar(44,e),t||this.space()}function Vr(e,t={},s){const i=function(e,t){if(t.experimental_preserveFormat)throw new Error("`experimental_preserveFormat` requires the original `code` to be passed to @babel/generator as a string");const s={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,preserveFormat:t.experimental_preserveFormat,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:null==t.comments||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};s.minified?(s.compact=!0,s.shouldPrintComment=s.shouldPrintComment||(()=>s.comments)):s.shouldPrintComment=s.shouldPrintComment||(e=>s.comments||e.includes("@license")||e.includes("@preserve")),"auto"===s.compact&&(s.compact=!1,s.compact&&console.error(`[BABEL] Note: The code generator has deoptimised the styling of ${t.filename} as it exceeds the max of 500KB.`)),(s.compact||s.preserveFormat)&&(s.indent.adjustMultilineComment=!1);const{auxiliaryCommentBefore:i,auxiliaryCommentAfter:n,shouldPrintComment:r}=s;return i&&!r(i)&&(s.auxiliaryCommentBefore=void 0),n&&!r(n)&&(s.auxiliaryCommentAfter=void 0),s}(0,t),n=t.sourceMaps?new Pi(t,s):null;return new qr(i,n,e.tokens,null).generate(e)}class Hr{constructor(e,t,s){this.line=void 0,this.column=void 0,void 0!==s&&(this.index=void 0),this.line=e,this.column=t,void 0!==s&&(this.index=s)}}class Kr{start;end;filename;identifierName;constructor(e,t){this.start=e,this.end=t}}function zr(e,t){const{line:s,column:i,index:n}=e;return new Hr(s,i+t,n+t)}const Jr="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Wr={ImportMetaOutsideModule:{message:"import.meta may appear only with 'sourceType: \"module\"'",code:Jr},ImportOutsideModule:{message:"'import' and 'export' may appear only with 'sourceType: \"module\"'",code:Jr}},Xr={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"},Gr=e=>"UpdateExpression"===e.type?Xr.UpdateExpression[`${e.prefix}`]:Xr[e.type],Yr={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})=>`'${"ForInStatement"===e?"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 ${"BreakStatement"===e?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArity:({phase:e})=>`\`import${e?`.${e}`:""}()\` requires exactly one or two arguments.`,ImportCallNotNewExpression:({phase:e})=>`Cannot use new with import${e?`.${e}`:""}().`,ImportCallSpreadArgument:({phase:e})=>`\`...\` is not allowed in \`import${e?`.${e}`:""}()\`.`,IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${Gr(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${Gr(e)}.`,InvalidLhsOptionalChaining:({ancestor:e})=>`Invalid optional chaining in the left-hand side of ${Gr(e)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperCallNotNewExpression:"Cannot use new with super(...).",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Qr={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)}\`.`},Zr=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),ea={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 ${Gr({type:e})}; please wrap it in parentheses.`,PipelineUnparenthesized:"Cannot mix binary operator with solo-await F#-style pipeline. Please wrap the pipeline in parentheses."};function ta(e,t,s){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:s})}function sa({toMessage:e,code:t,reasonCode:s,syntaxPlugin:i}){const n="MissingPlugin"===s||"MissingOneOfPlugins"===s;return function r(a,o,c){const h=new SyntaxError;return h.code=t,h.reasonCode=s,h.loc=a,h.pos=o,h.syntaxPlugin=i,n&&(h.missingPlugin=c.missingPlugin),ta(h,"clone",function(e={}){const{line:t,column:s,index:i=o}=e.loc??a;return r(new Hr(t,s),i,{...c,...e.details})}),ta(h,"details",c),Object.defineProperty(h,"message",{configurable:!0,get(){const t=`${e(c)} (${a.line}:${a.column})`;return this.message=t,t},set(e){Object.defineProperty(this,"message",{value:e,writable:!0})}}),h}}function ia(e,t){if(Array.isArray(e))return t=>ia(t,e[0]);const s={};for(const i of Object.keys(e)){const n=e[i],{message:r,...a}="string"==typeof n?{message:()=>n}:"function"==typeof n?{message:n}:n,o="string"==typeof r?()=>r:r;s[i]=sa({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:i,toMessage:o,...t?{syntaxPlugin:t}:{},...a})}return s}const na={...ia(Wr),...ia(Yr),...ia({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."}),...ia(Qr),...ia`pipelineOperator`(ea),...ia`functionBind`({UnsupportedBind:"Binding should be performed on object property.",UnsupportedBindRHS:"The right-hand side of binding can not be super or import."})};function ra(e){const{start:t,end:s}=e.loc;return e.loc.start=new Hr(t.line,t.column),e.loc.end=new Hr(s.line,s.column),e}const aa=!0,oa=!0,ca=!0,ha=!0,la=!0;class pa{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=null!=t.binop?t.binop:null}}const ua=new Map;function da(e,t={}){t.keyword=e;const s=Sa(e,t);return ua.set(e,s),s}function fa(e,t){return Sa(e,{beforeExpr:aa,binop:t})}let ma=-1;const ya=[],xa=[],ga=[],ka=[],Ta=[],ba=[];function Sa(e,t={}){return++ma,xa.push(e),ga.push(t.binop??-1),ka.push(t.beforeExpr??!1),Ta.push(t.startsExpr??!1),ba.push(t.prefix??!1),ya.push(new pa(e,t)),ma}function wa(e,t={}){return++ma,ua.set(e,ma),xa.push(e),ga.push(t.binop??-1),ka.push(t.beforeExpr??!1),Ta.push(t.startsExpr??!1),ba.push(t.prefix??!1),ya.push(new pa("name",t)),ma}const va={bracketL:Sa("[",{beforeExpr:aa,startsExpr:oa}),bracketR:Sa("]"),braceL:Sa("{",{beforeExpr:aa,startsExpr:oa}),braceBarL:Sa("{|",{beforeExpr:aa,startsExpr:oa}),braceR:Sa("}"),braceBarR:Sa("|}"),parenL:Sa("(",{beforeExpr:aa,startsExpr:oa}),parenR:Sa(")"),comma:Sa(",",{beforeExpr:aa}),semi:Sa(";",{beforeExpr:aa}),colon:Sa(":",{beforeExpr:aa}),doubleColon:Sa("::",{beforeExpr:aa}),dot:Sa("."),question:Sa("?",{beforeExpr:aa}),questionDot:Sa("?."),arrow:Sa("=>",{beforeExpr:aa}),template:Sa("template"),ellipsis:Sa("...",{beforeExpr:aa}),backQuote:Sa("`",{startsExpr:oa}),dollarBraceL:Sa("${",{beforeExpr:aa,startsExpr:oa}),templateTail:Sa("...`",{startsExpr:oa}),templateNonTail:Sa("...${",{beforeExpr:aa,startsExpr:oa}),at:Sa("@"),hash:Sa("#",{startsExpr:oa}),interpreterDirective:Sa("#!..."),eq:Sa("=",{beforeExpr:aa,isAssign:ha}),assign:Sa("_=",{beforeExpr:aa,isAssign:ha}),slashAssign:Sa("_=",{beforeExpr:aa,isAssign:ha}),xorAssign:Sa("_=",{beforeExpr:aa,isAssign:ha}),moduloAssign:Sa("_=",{beforeExpr:aa,isAssign:ha}),incDec:Sa("++/--",{prefix:la,postfix:!0,startsExpr:oa}),bang:Sa("!",{beforeExpr:aa,prefix:la,startsExpr:oa}),tilde:Sa("~",{beforeExpr:aa,prefix:la,startsExpr:oa}),doubleCaret:Sa("^^",{startsExpr:oa}),doubleAt:Sa("@@",{startsExpr:oa}),pipeline:fa("|>",0),nullishCoalescing:fa("??",1),logicalOR:fa("||",1),logicalAND:fa("&&",2),bitwiseOR:fa("|",3),bitwiseXOR:fa("^",4),bitwiseAND:fa("&",5),equality:fa("==/!=/===/!==",6),lt:fa("</>/<=/>=",7),gt:fa("</>/<=/>=",7),relational:fa("</>/<=/>=",7),bitShift:fa("<</>>/>>>",8),bitShiftL:fa("<</>>/>>>",8),bitShiftR:fa("<</>>/>>>",8),plusMin:Sa("+/-",{beforeExpr:aa,binop:9,prefix:la,startsExpr:oa}),modulo:Sa("%",{binop:10,startsExpr:oa}),star:Sa("*",{binop:10}),slash:fa("/",10),exponent:Sa("**",{beforeExpr:aa,binop:11,rightAssociative:!0}),_in:da("in",{beforeExpr:aa,binop:7}),_instanceof:da("instanceof",{beforeExpr:aa,binop:7}),_break:da("break"),_case:da("case",{beforeExpr:aa}),_catch:da("catch"),_continue:da("continue"),_debugger:da("debugger"),_default:da("default",{beforeExpr:aa}),_else:da("else",{beforeExpr:aa}),_finally:da("finally"),_function:da("function",{startsExpr:oa}),_if:da("if"),_return:da("return",{beforeExpr:aa}),_switch:da("switch"),_throw:da("throw",{beforeExpr:aa,prefix:la,startsExpr:oa}),_try:da("try"),_var:da("var"),_const:da("const"),_with:da("with"),_new:da("new",{beforeExpr:aa,startsExpr:oa}),_this:da("this",{startsExpr:oa}),_super:da("super",{startsExpr:oa}),_class:da("class",{startsExpr:oa}),_extends:da("extends",{beforeExpr:aa}),_export:da("export"),_import:da("import",{startsExpr:oa}),_null:da("null",{startsExpr:oa}),_true:da("true",{startsExpr:oa}),_false:da("false",{startsExpr:oa}),_typeof:da("typeof",{beforeExpr:aa,prefix:la,startsExpr:oa}),_void:da("void",{beforeExpr:aa,prefix:la,startsExpr:oa}),_delete:da("delete",{beforeExpr:aa,prefix:la,startsExpr:oa}),_do:da("do",{isLoop:ca,beforeExpr:aa}),_for:da("for",{isLoop:ca}),_while:da("while",{isLoop:ca}),_as:wa("as",{startsExpr:oa}),_assert:wa("assert",{startsExpr:oa}),_async:wa("async",{startsExpr:oa}),_await:wa("await",{startsExpr:oa}),_defer:wa("defer",{startsExpr:oa}),_from:wa("from",{startsExpr:oa}),_get:wa("get",{startsExpr:oa}),_let:wa("let",{startsExpr:oa}),_meta:wa("meta",{startsExpr:oa}),_of:wa("of",{startsExpr:oa}),_sent:wa("sent",{startsExpr:oa}),_set:wa("set",{startsExpr:oa}),_source:wa("source",{startsExpr:oa}),_static:wa("static",{startsExpr:oa}),_using:wa("using",{startsExpr:oa}),_yield:wa("yield",{startsExpr:oa}),_asserts:wa("asserts",{startsExpr:oa}),_checks:wa("checks",{startsExpr:oa}),_exports:wa("exports",{startsExpr:oa}),_global:wa("global",{startsExpr:oa}),_implements:wa("implements",{startsExpr:oa}),_intrinsic:wa("intrinsic",{startsExpr:oa}),_infer:wa("infer",{startsExpr:oa}),_is:wa("is",{startsExpr:oa}),_mixins:wa("mixins",{startsExpr:oa}),_proto:wa("proto",{startsExpr:oa}),_require:wa("require",{startsExpr:oa}),_satisfies:wa("satisfies",{startsExpr:oa}),_keyof:wa("keyof",{startsExpr:oa}),_readonly:wa("readonly",{startsExpr:oa}),_unique:wa("unique",{startsExpr:oa}),_abstract:wa("abstract",{startsExpr:oa}),_declare:wa("declare",{startsExpr:oa}),_enum:wa("enum",{startsExpr:oa}),_module:wa("module",{startsExpr:oa}),_namespace:wa("namespace",{startsExpr:oa}),_interface:wa("interface",{startsExpr:oa}),_type:wa("type",{startsExpr:oa}),_opaque:wa("opaque",{startsExpr:oa}),name:Sa("name",{startsExpr:oa}),placeholder:Sa("%%",{startsExpr:oa}),string:Sa("string",{startsExpr:oa}),num:Sa("num",{startsExpr:oa}),bigint:Sa("bigint",{startsExpr:oa}),regexp:Sa("regexp",{startsExpr:oa}),privateName:Sa("#name",{startsExpr:oa}),eof:Sa("eof"),jsxName:Sa("jsxName"),jsxText:Sa("jsxText",{beforeExpr:aa}),jsxTagStart:Sa("jsxTagStart",{startsExpr:oa}),jsxTagEnd:Sa("jsxTagEnd")};function Ca(e){return e>=89&&e<=129}function Pa(e){return e>=54&&e<=129}function Ea(e){return e>=54&&e<=132}function Aa(e){return Ta[e]}function Ia(e){return e>=125&&e<=127}function _a(e){return e>=54&&e<=88}function Na(e){return e>=35&&e<=55}function La(e){return 30===e}function Da(e){return xa[e]}function Ma(e){return ga[e]}function Oa(e){return e>=20&&e<=21}function Fa(e){return ya[e]}class Ra{constructor(e,t){this.token=e,this.preserveSpace=!!t}token;preserveSpace}const Ba={brace:new Ra("{"),j_oTag:new Ra("<tag"),j_cTag:new Ra("</tag"),j_expr:new Ra("<tag>...</tag>",!0)},ja=/[\p{ID_Start}\u0558\u058b\u058c\u088f\u0c5c\u0cdc\u208f\u209d-\u209f\ua7ce\ua7cf\ua7d2\ua7d4\ua7dd\ua7e2\ua7f1\uab6c\uab6d]/u,Ua=/[\p{ID_Continue}\u0558\u058b\u058c\u088f\u0c5c\u0cdc\u208f\u209d-\u209f\ua7ce\ua7cf\ua7d2\ua7d4\ua7dd\ua7e2\ua7f1\uab6c\uab6d\u05c8\u05c9\u0b53\u0b54\u1acf-\u1af0]/u,qa=[1979,4,385,25,1388,2,18,21,3100,0,678,43,22,0,1662,0,6,10,209,310,18458,24,3,24,287,4,6146,7,1239,4,47,23,96,114,14,913,15,50,8017,5,64,0,9534,0,2169,5,7,86,15,6,55,50,1729,30,2,2,2,1,2,6,3,4,10,1,53307,5,223,0,5764,11,21763,4297,39815,11327],$a=[3787,4,33,11,3173,7,633,9,7,0,45879,1,296,2,9,1,3,0,33,1,5218,0,3,0,8,1,6,0];function Va(e,t){let s=65536;for(let i=0,n=t.length;i<n;i+=2){if(s+=t[i],s>e)return!1;if(s+=t[i+1],s>=e)return!0}return!1}function Ha(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&ja.test(String.fromCharCode(e)):!isNaN(e)&&e<=1114111&&(ja.test(String.fromCodePoint(e))||Va(e,qa))))}function Ka(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&Ua.test(String.fromCharCode(e)):!isNaN(e)&&e<=1114111&&(Ua.test(String.fromCodePoint(e))||Va(e,qa)||Va(e,$a)))))}const za=["implements","interface","let","package","private","protected","public","static","yield"],Ja=["eval","arguments"],Wa=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"]),Xa=new Set(za),Ga=new Set(Ja);function Ya(e,t){return t&&"await"===e||"enum"===e}function Qa(e,t){return Ya(e,t)||Xa.has(e)}function Za(e){return Ga.has(e)}function eo(e,t){return Qa(e,t)||Za(e)}const to=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"]);let so=class{flags=0;names=new Map;firstLexicalName="";constructor(e){this.flags=e}};class io{parser;scopeStack=[];inModule;undefinedExports=new Map;constructor(e,t){this.parser=e,this.inModule=t}get inTopLevel(){return(1&this.currentScope().flags)>0}get inFunction(){return(2&this.currentVarScopeFlags())>0}get allowSuper(){return(16&this.currentThisScopeFlags())>0}get allowDirectSuper(){return(32&this.currentThisScopeFlags())>0}get allowNewTarget(){return(512&this.currentThisScopeFlags())>0}get inClass(){return(64&this.currentThisScopeFlags())>0}get inClassAndNotInNonArrowFunction(){const e=this.currentThisScopeFlags();return(64&e)>0&&!(2&e)}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(128&t)return!0;if(3779&t)return!1}}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get inBareCaseStatement(){return(256&this.currentScope().flags)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new so(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(130&e.flags||!this.parser.inModule&&1&e.flags)}declareName(e,t,s){let i=this.currentScope();if(8&t||16&t){this.checkRedeclarationInScope(i,e,t,s);let n=i.names.get(e)||0;16&t?n|=4:(i.firstLexicalName||(i.firstLexicalName=e),n|=2),i.names.set(e,n),8&t&&this.maybeExportDefined(i,e)}else if(4&t)for(let n=this.scopeStack.length-1;n>=0&&(i=this.scopeStack[n],this.checkRedeclarationInScope(i,e,t,s),i.names.set(e,1|(i.names.get(e)||0)),this.maybeExportDefined(i,e),!(3715&i.flags));--n);this.parser.inModule&&1&i.flags&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&1&e.flags&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,s,i){this.isRedeclaredInScope(e,t,s)&&this.parser.raise(na.VarRedeclaration,i,{identifierName:t})}isRedeclaredInScope(e,t,s){if(!(1&s))return!1;if(8&s)return e.names.has(t);const i=e.names.get(t)||0;return 16&s?(2&i)>0||!this.treatFunctionsAsVarInScope(e)&&(1&i)>0:(2&i)>0&&!(8&e.flags&&e.firstLexicalName===t)||!this.treatFunctionsAsVarInScope(e)&&(4&i)>0}checkLocalExport(e){const{name:t}=e;this.scopeStack[0].names.has(t)||this.undefinedExports.set(t,e.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(3715&t)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(3779&t&&!(4&t))return t}}}class no extends so{declareFunctions=new Set}class ro extends io{createScope(e){return new no(e)}declareName(e,t,s){const i=this.currentScope();if(2048&t)return this.checkRedeclarationInScope(i,e,t,s),this.maybeExportDefined(i,e),void i.declareFunctions.add(e);super.declareName(e,t,s)}isRedeclaredInScope(e,t,s){if(super.isRedeclaredInScope(e,t,s))return!0;if(2048&s&&!e.declareFunctions.has(t)){const s=e.names.get(t);return(4&s)>0||(2&s)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}}const ao=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),oo=ia`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:s})=>`Enum \`${e}\` has type \`${s}\`, so the initializer of \`${t}\` needs to be a ${s} 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:s})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${s}\`, 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 co(e){return"type"===e.importKind||"typeof"===e.importKind}const ho={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};const lo=/\*?\s*@((?:no)?flow)\b/,po={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",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:"♦"},uo=/\r\n|[\r\n\u2028\u2029]/g;function fo(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function mo(e,t,s){for(let i=t;i<s;i++)if(fo(e.charCodeAt(i)))return!0;return!1}const yo=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,xo=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function go(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 ko=ia`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 To(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function bo(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return bo(e.object)+"."+bo(e.property);throw new Error("Node had unexpected type: "+e.type)}class So extends so{tsNames=new Map}class wo extends io{get inTSNamespace(){const e=this.scopeStack;return e.length>=2&&0===e[e.length-1].flags&&(2048&e[e.length-2].flags)>0}importsStack=[];createScope(e){return this.importsStack.push(new Set),new So(e)}enter(e){3072&e&&this.importsStack.push(new Set),super.enter(e)}exit(){const e=super.exit();return 3072&e&&this.importsStack.pop(),e}hasImport(e,t){const s=this.importsStack.length;if(this.importsStack[s-1].has(e))return!0;if(!t&&s>1)for(let t=0;t<s-1;t++)if(this.importsStack[t].has(e))return!0;return!1}declareName(e,t,s){if(4096&t)return this.hasImport(e,!0)&&this.parser.raise(na.VarRedeclaration,s,{identifierName:e}),void this.importsStack[this.importsStack.length-1].add(e);const i=this.currentScope();let n=i.tsNames.get(e)||0;if(1024&t)return this.maybeExportDefined(i,e),void i.tsNames.set(e,16|n);super.declareName(e,t,s),2&t&&(1&t||(this.checkRedeclarationInScope(i,e,t,s),this.maybeExportDefined(i,e)),n|=1),256&t&&(n|=2),512&t&&(n|=4),128&t&&(n|=8),n&&i.tsNames.set(e,n)}isRedeclaredInScope(e,t,s){const i=e.tsNames.get(t);if((2&i)>0){if(256&s){return(512&s)>0!==(4&i)>0}return!0}return 128&s&&(8&i)>0?!!(2&e.names.get(t))&&!!(1&s):!!(2&s&&(1&i)>0)||super.isRedeclaredInScope(e,t,s)}checkLocalExport(e){const{name:t}=e;if(this.hasImport(t))return;for(let e=this.scopeStack.length-1;e>=0;e--){const s=this.scopeStack[e].tsNames.get(t);if((1&s)>0||(16&s)>0)return}super.checkLocalExport(e)}}class vo{sawUnambiguousESM=!1;ambiguousScriptDifferentAst=!1;sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if("string"==typeof e)return this.plugins.has(e);{const[t,s]=e;if(!this.hasPlugin(t))return!1;const i=this.plugins.get(t);for(const e of Object.keys(s))if(i?.[e]!==s[e])return!1;return!0}}getPluginOption(e,t){return this.plugins.get(e)?.[t]}}function Co(e,t){void 0===e.trailingComments?e.trailingComments=t:e.trailingComments.unshift(...t)}function Po(e,t){void 0===e.innerComments?e.innerComments=t:e.innerComments.unshift(...t)}function Eo(e,t,s){let i=null,n=t.length;for(;null===i&&n>0;)i=t[--n];null===i||i.start>s.start?Po(e,s.comments):Co(i,s.comments)}class Ao extends vo{addComment(e){this.filename&&(e.loc.filename=this.filename);const{commentsLen:t}=this.state;this.comments.length!==t&&(this.comments.length=t),this.comments.push(e),this.state.commentsLen++}processComment(e){const{commentStack:t}=this.state,s=t.length;if(0===s)return;let i=s-1;const n=t[i];n.start===e.end&&(n.leadingNode=e,i--);const r=e.start;for(;i>=0;i--){const s=t[i],n=s.end;if(!(n>r)){n===r&&(s.trailingNode=e);break}s.containingNode=e,this.finalizeComment(s),t.splice(i,1)}}finalizeComment(e){const{comments:t}=e;if(null!==e.leadingNode||null!==e.trailingNode)null!==e.leadingNode&&Co(e.leadingNode,t),null!==e.trailingNode&&function(e,t){void 0===e.leadingComments?e.leadingComments=t:e.leadingComments.unshift(...t)}(e.trailingNode,t);else{const s=e.containingNode,i=e.start;if(44===this.input.charCodeAt(this.offsetToSourcePos(i)-1))switch(s.type){case"ObjectExpression":case"ObjectPattern":Eo(s,s.properties,e);break;case"CallExpression":case"NewExpression":case"OptionalCallExpression":Eo(s,s.arguments,e);break;case"ImportExpression":Eo(s,[s.source,s.options??null],e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":case"TSTypeParameterDeclaration":Eo(s,s.params,e);break;case"ArrayExpression":case"ArrayPattern":Eo(s,s.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":Eo(s,s.specifiers,e);break;case"TSEnumBody":Eo(s,s.members,e);break;case"TSInterfaceBody":Eo(s,s.body,e);break;default:Po(s,t)}else Po(s,t)}}finalizeRemainingComments(){const{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){const{commentStack:t}=this.state,{length:s}=t;if(0===s)return;const i=t[s-1];i.leadingNode===e&&(i.leadingNode=null)}takeSurroundingComments(e,t,s){const{commentStack:i}=this.state,n=i.length;if(0===n)return;let r=n-1;for(;r>=0;r--){const n=i[r],a=n.end;if(n.start===s)n.leadingNode=e;else if(a===t)n.trailingNode=e;else if(a<t)break}}}let Io=class e{flags=2048;get strict(){return(1&this.flags)>0}set strict(e){e?this.flags|=1:this.flags&=-2}startIndex;curLine;lineStart;startLoc;endLoc;init({strictMode:e,sourceType:t,startIndex:s,startLine:i,startColumn:n}){this.strict=!1!==e&&(!0===e||"module"===t),this.startIndex=s,this.curLine=i,this.lineStart=-n,this.startLoc=this.endLoc=new Hr(i,n,s)}errors=[];noArrowAt=[];noArrowParamsConversionAt=[];get canStartArrow(){return(2&this.flags)>0}set canStartArrow(e){e?this.flags|=2:this.flags&=-3}get inType(){return(4&this.flags)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(8&this.flags)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(16&this.flags)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(32&this.flags)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(64&this.flags)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(128&this.flags)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get inConditionalConsequent(){return(256&this.flags)>0}set inConditionalConsequent(e){e?this.flags|=256:this.flags&=-257}get inHackPipelineBody(){return(512&this.flags)>0}set inHackPipelineBody(e){e?this.flags|=512:this.flags&=-513}get seenTopicReference(){return(1024&this.flags)>0}set seenTopicReference(e){e?this.flags|=1024:this.flags&=-1025}labels=[];commentsLen=0;commentStack=[];pos=0;type=135;value=null;start=0;end=0;lastTokEndLoc=null;lastTokStartLoc=null;context=[Ba.brace];get canStartJSXElement(){return(2048&this.flags)>0}set canStartJSXElement(e){e?this.flags|=2048:this.flags&=-2049}get containsEsc(){return(4096&this.flags)>0}set containsEsc(e){e?this.flags|=4096:this.flags&=-4097}firstInvalidTemplateEscapePos=null;get hasTopLevelAwait(){return(8192&this.flags)>0}set hasTopLevelAwait(e){e?this.flags|=8192:this.flags&=-8193}strictErrors=new Map;tokensLength=0;curPosition(){return new Hr(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){const t=new e;return t.flags=this.flags,t.startIndex=this.startIndex,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}};var _o=function(e){return e>=48&&e<=57};const No={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Lo={bin:e=>48===e||49===e,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 Do(e,t,s,i,n,r){const a=s,o=i,c=n;let h="",l=null,p=s;const{length:u}=t;for(;;){if(s>=u){r.unterminated(a,o,c),h+=t.slice(p,s);break}const d=t.charCodeAt(s);if(Mo(e,d,t,s)){h+=t.slice(p,s);break}if(92===d){h+=t.slice(p,s);const a=Oo(t,s,i,n,"template"===e,r);null!==a.ch||l?h+=a.ch:l={pos:s,lineStart:i,curLine:n},({pos:s,lineStart:i,curLine:n}=a),p=s}else 8232===d||8233===d?(++n,i=++s):10===d||13===d?"template"===e?(h+=t.slice(p,s)+"\n",++s,13===d&&10===t.charCodeAt(s)&&++s,++n,p=i=s):r.unterminated(a,o,c):++s}return{pos:s,str:h,firstInvalidLoc:l,lineStart:i,curLine:n}}function Mo(e,t,s,i){return"template"===e?96===t||36===t&&123===s.charCodeAt(i+1):t===("double"===e?34:39)}function Oo(e,t,s,i,n,r){const a=!n;t++;const o=e=>({pos:t,ch:e,lineStart:s,curLine:i}),c=e.charCodeAt(t++);switch(c){case 110:return o("\n");case 114:return o("\r");case 120:{let n;return({code:n,pos:t}=Fo(e,t,s,i,2,!1,a,r)),o(null===n?null:String.fromCharCode(n))}case 117:{let n;return({code:n,pos:t}=Bo(e,t,s,i,a,r)),o(null===n?null:String.fromCodePoint(n))}case 116:return o("\t");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:s=t,++i;case 8232:case 8233:return o("");case 56:case 57:if(n)return o(null);r.strictNumericEscape(t-1,s,i);default:if(c>=48&&c<=55){const a=t-1;let c=/^[0-7]+/.exec(e.slice(a,t+2))[0],h=parseInt(c,8);h>255&&(c=c.slice(0,-1),h=parseInt(c,8)),t+=c.length-1;const l=e.charCodeAt(t);if("0"!==c||56===l||57===l){if(n)return o(null);r.strictNumericEscape(a,s,i)}return o(String.fromCharCode(h))}return o(String.fromCharCode(c))}}function Fo(e,t,s,i,n,r,a,o){const c=t;let h;return({n:h,pos:t}=Ro(e,t,s,i,16,n,r,!1,o,!a)),null===h&&(a?o.invalidEscapeSequence(c,s,i):t=c-1),{code:h,pos:t}}function Ro(e,t,s,i,n,r,a,o,c,h){const l=t,p=16===n?No.hex:No.decBinOct,u=16===n?Lo.hex:10===n?Lo.dec:8===n?Lo.oct:Lo.bin;let d=!1,f=0;for(let l=0,m=null==r?1/0:r;l<m;++l){const r=e.charCodeAt(t);let l;if(95===r&&"bail"!==o){const n=e.charCodeAt(t-1),r=e.charCodeAt(t+1);if(o){if(Number.isNaN(r)||!u(r)||p.has(n)||p.has(r)){if(h)return{n:null,pos:t};c.unexpectedNumericSeparator(t,s,i)}}else{if(h)return{n:null,pos:t};c.numericSeparatorInEscapeSequence(t,s,i)}++t;continue}if(l=r>=97?r-97+10:r>=65?r-65+10:_o(r)?r-48:1/0,l>=n)if(l<=9){if(h)return{n:null,pos:t};c.invalidDigit(t,s,i,n),l=0}else{if(!a)break;l=0,d=!0}++t,f=f*n+l}return t===l||null!=r&&t-l!==r||d?{n:null,pos:t}:{n:f,pos:t}}function Bo(e,t,s,i,n,r){let a;if(123===e.charCodeAt(t)){if(++t,({code:a,pos:t}=Fo(e,t,s,i,e.indexOf("}",t)-t,!0,n,r)),++t,null!==a&&a>1114111){if(!n)return{code:null,pos:t};r.invalidCodePoint(t,s,i)}}else({code:a,pos:t}=Fo(e,t,s,i,4,!1,n,r));return{code:a,pos:t}}function jo(e,t,s){return new Hr(s,e-t,e)}const Uo=new Set([103,109,115,105,121,117,100,118]);let qo,$o=class{constructor(e){const 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 Kr(e.startLoc,e.endLoc)}};class Vo extends Ao{isLookahead;tokens=[];constructor(e,t){super(),this.state=new Io,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1,(!qo||qo.length<2*(this.length+1))&&(qo=new Uint32Array(2*(this.length+1))),this.locData=qo}setLoc(e){const t=this.offsetToSourcePos(e.index);this.locData[2*t]=e.line,this.locData[2*t+1]=e.column}getLoc(e){const t=this.offsetToSourcePos(e);return new Hr(this.locData[2*t],this.locData[2*t+1],e)}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),512&this.optionFlags&&this.pushToken(new $o(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)}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(){const e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return yo.lastIndex=e,yo.test(this.input)?yo.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 xo.lastIndex=e,xo.test(this.input)?xo.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if(55296==(64512&t)&&++e<this.input.length){const s=this.input.charCodeAt(e);56320==(64512&s)&&(t=65536+((1023&t)<<10)+(1023&s))}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(){this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length?this.finishToken(135):this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());const s=this.state.pos,i=this.input.indexOf(e,s+2);if(-1===i)throw this.raise(na.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+e.length,uo.lastIndex=s+2;uo.test(this.input)&&uo.lastIndex<=i;)++this.state.curLine,this.state.lineStart=uo.lastIndex;if(this.isLookahead)return;const n={type:"CommentBlock",value:this.input.slice(s+2,i),start:this.sourceToOffsetPos(s),end:this.sourceToOffsetPos(i+e.length),loc:new Kr(t,this.state.curPosition())};return 512&this.optionFlags&&this.pushToken(n),n}skipLineComment(e){const t=this.state.pos;let s;this.isLookahead||(s=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!fo(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;const n=this.state.pos,r={type:"CommentLine",value:this.input.slice(t+e,n),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(n),loc:new Kr(s,this.state.curPosition())};return 512&this.optionFlags&&this.pushToken(r),r}skipSpace(){const e=this.state.pos,t=(8192&this.optionFlags)>0;let s;e:for(;this.state.pos<this.length;){const i=this.input.charCodeAt(this.state.pos);switch(i){case 32:case 160:case 9:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++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:{const e=this.skipBlockComment("*/");void 0!==e&&(this.addComment(e),t&&(s??=[]).push(e));break}case 47:{const e=this.skipLineComment(2);void 0!==e&&(this.addComment(e),t&&(s??=[]).push(e));break}default:break e}break;default:if(go(i))++this.state.pos;else if(45===i&&!this.inModule&&16384&this.optionFlags){const i=this.state.pos;if(45!==this.input.charCodeAt(i+1)||62!==this.input.charCodeAt(i+2)||!(0===e||this.state.lineStart>e))break e;{const e=this.skipLineComment(3);void 0!==e&&(this.addComment(e),t&&(s??=[]).push(e))}}else{if(60!==i||this.inModule||!(16384&this.optionFlags))break e;{const e=this.state.pos;if(33!==this.input.charCodeAt(e+1)||45!==this.input.charCodeAt(e+2)||45!==this.input.charCodeAt(e+3))break e;{const e=this.skipLineComment(4);void 0!==e&&(this.addComment(e),t&&(s??=[]).push(e))}}}}}if(s?.length){const t=this.state.pos,i={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(t),comments:s,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(i)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const s=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(s)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;const e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(na.UnexpectedDigitAfterHash,this.state.curPosition());Ha(t)?(++this.state.pos,this.finishToken(134,this.readWord1(t))):92===t?(++this.state.pos,this.finishToken(134,this.readWord1())):this.finishOp(23,1)}readToken_dot(){const e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(17)):(++this.state.pos,this.finishToken(12))}readToken_slash(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(27,2):this.finishOp(52,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(33!==e)return!1;const t=this.state.pos;for(this.state.pos+=1;!fo(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);const s=this.input.slice(t+2,this.state.pos);return this.finishToken(24,s),!0}readToken_mult_modulo(e){let t=42===e?51:50,s=1,i=this.input.charCodeAt(this.state.pos+1);42===e&&42===i&&(s++,i=this.input.charCodeAt(this.state.pos+2),t=53),61!==i||this.state.inType||(s++,t=37===e?29:26),this.finishOp(t,s)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);t!==e?124!==e||62!==t?61!==t?this.finishOp(124===e?39:41,1):this.finishOp(26,2):this.finishOp(35,2):61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(26,3):this.finishOp(124===e?37:38,2)}readToken_caret(){const e=this.input.charCodeAt(this.state.pos+1);if(61!==e||this.state.inType)if(94===e&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])){this.finishOp(33,2);94===this.input.codePointAt(this.state.pos)&&this.unexpected()}else this.finishOp(40,1);else this.finishOp(28,2)}readToken_atSign(){64===this.input.charCodeAt(this.state.pos+1)&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(34,2):this.finishOp(22,1)}readToken_plus_min(e){const t=this.input.charCodeAt(this.state.pos+1);t!==e?61===t?this.finishOp(26,2):this.finishOp(49,1):this.finishOp(30,2)}readToken_lt(){const{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(60===t)return 61===this.input.charCodeAt(e+2)?void this.finishOp(26,3):void this.finishOp(47,2);61!==t?this.finishOp(43,1):this.finishOp(45,2)}readToken_gt(){const{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(62===t){const t=62===this.input.charCodeAt(e+2)?3:2;return 61===this.input.charCodeAt(e+t)?void this.finishOp(26,t+1):void this.finishOp(48,t)}61!==t?this.finishOp(44,1):this.finishOp(45,2)}readToken_eq_excl(e){const t=this.input.charCodeAt(this.state.pos+1);if(61!==t)return 61===e&&62===t?(this.state.pos+=2,void this.finishToken(15)):void this.finishOp(61===e?25:31,1);this.finishOp(42,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){const e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);63===e?61===t?this.finishOp(26,3):this.finishOp(36,2):46!==e||t>=48&&t<=57?(++this.state.pos,this.finishToken(13)):(this.state.pos+=2,this.finishToken(14))}getTokenFromCode(e){switch(e){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(6);case 41:return++this.state.pos,void this.finishToken(7);case 59:return++this.state.pos,void this.finishToken(9);case 44:return++this.state.pos,void this.finishToken(8);case 91:return++this.state.pos,void this.finishToken(0);case 93:return++this.state.pos,void this.finishToken(1);case 123:return++this.state.pos,void this.finishToken(2);case 125:return++this.state.pos,void this.finishToken(4);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(11,2):(++this.state.pos,this.finishToken(10)));case 63:return void this.readToken_question();case 96:return void this.readTemplateToken();case 48:{const e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:return void this.readToken_lt();case 62:return void this.readToken_gt();case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(32,1);case 64:return void this.readToken_atSign();case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(Ha(e))return void this.readWord(e)}throw this.raise(na.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,t){const s=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,s)}readRegexp(){const e=this.state.startLoc,t=this.state.start+1;let s,i,{pos:n}=this.state;for(;;++n){if(n>=this.length)throw this.raise(na.UnterminatedRegExp,zr(e,1));const t=this.input.charCodeAt(n);if(fo(t))throw this.raise(na.UnterminatedRegExp,zr(e,1));if(s)s=!1;else{if(91===t)i=!0;else if(93===t&&i)i=!1;else if(47===t&&!i)break;s=92===t}}const r=this.input.slice(t,n);++n;let a="";const o=()=>zr(e,n+2-t);for(;n<this.length;){const e=this.codePointAtPos(n),t=String.fromCharCode(e);if(Uo.has(e))118===e?a.includes("u")&&this.raise(na.IncompatibleRegExpUVFlags,o()):117===e&&a.includes("v")&&this.raise(na.IncompatibleRegExpUVFlags,o()),a.includes(t)&&this.raise(na.DuplicateRegExpFlags,o());else{if(!Ka(e)&&92!==e)break;this.raise(na.MalformedRegExpFlags,o())}++n,a+=t}this.state.pos=n,this.finishToken(133,{pattern:r,flags:a})}readInt(e,t,s=!1,i=!0){const{n:n,pos:r}=Ro(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,s,i,this.errorHandlers_readInt,!1);return this.state.pos=r,n}readRadixNumber(e){const t=this.state.pos,s=this.state.curPosition();let i=!1;this.state.pos+=2;const n=this.readInt(e);null==n&&this.raise(na.InvalidDigit,zr(s,2),{radix:e});if(110===this.input.charCodeAt(this.state.pos)&&(++this.state.pos,i=!0),Ha(this.codePointAtPos(this.state.pos)))throw this.raise(na.NumberIdentifier,this.state.curPosition());if(i){const e=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");return void this.finishToken(132,e)}this.finishToken(131,n)}readNumber(e){const t=this.state.pos,s=this.state.curPosition();let i=!1,n=!1,r=!1;e||null!==this.readInt(10)||this.raise(na.InvalidNumber,this.state.curPosition());const a=this.state.pos-t>=2&&48===this.input.charCodeAt(t);if(a){const e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(na.StrictOctalLiteral,s),!this.state.strict){const t=e.indexOf("_");t>0&&this.raise(na.ZeroDigitNumericSeparator,zr(s,t))}r=a&&!/[89]/.test(e)}let o=this.input.charCodeAt(this.state.pos);46!==o||r||(++this.state.pos,this.readInt(10),i=!0,o=this.input.charCodeAt(this.state.pos)),69!==o&&101!==o||r||(o=this.input.charCodeAt(++this.state.pos),43!==o&&45!==o||++this.state.pos,null===this.readInt(10)&&this.raise(na.InvalidOrMissingExponent,s),i=!0,o=this.input.charCodeAt(this.state.pos));const c=this.input.slice(t,this.state.pos).replaceAll("_","");if(110===o&&((i||a)&&this.raise(na.InvalidBigIntLiteral,s),++this.state.pos,n=!0),Ha(this.codePointAtPos(this.state.pos)))throw this.raise(na.NumberIdentifier,this.state.curPosition());if(n)return void this.finishToken(132,c);const h=r?parseInt(c,8):parseFloat(c);this.finishToken(131,h)}readCodePoint(e){const{code:t,pos:s}=Bo(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=s,t}readString(e){const{str:t,pos:s,curLine:i,lineStart:n}=Do(34===e?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=s+1,this.state.lineStart=n,this.state.curLine=i,this.finishToken(130,t)}readTemplateContinuation(){this.match(4)||this.unexpected(null,4),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const e=this.input[this.state.pos],{str:t,firstInvalidLoc:s,pos:i,curLine:n,lineStart:r}=Do("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=r,this.state.curLine=n,s&&(this.state.firstInvalidTemplateEscapePos=new Hr(s.curLine,s.pos-s.lineStart,this.sourceToOffsetPos(s.pos))),96===this.input.codePointAt(i)?this.finishToken(20,s?null:e+t+"`"):(this.state.pos++,this.finishToken(21,s?null:e+t+"${"))}recordStrictModeErrors(e,t){const s=t.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(e,t):this.state.strictErrors.set(s,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="";const s=this.state.pos;let i=this.state.pos;for(void 0!==e&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){const e=this.codePointAtPos(this.state.pos);if(Ka(e))this.state.pos+=e<=65535?1:2;else{if(92!==e)break;{this.state.containsEsc=!0,t+=this.input.slice(i,this.state.pos);const e=this.state.curPosition(),n=this.state.pos===s?Ha:Ka;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(na.MissingUnicodeEscape,this.state.curPosition()),i=this.state.pos-1;continue}++this.state.pos;const r=this.readCodePoint(!0);null!==r&&(n(r)||this.raise(na.EscapedCharNotAnIdentifier,e),t+=String.fromCodePoint(r)),i=this.state.pos}}}return t+this.input.slice(i,this.state.pos)}readWord(e){const t=this.readWord1(e),s=ua.get(t);void 0!==s?this.finishToken(s,Da(s)):this.finishToken(128,t)}checkKeywordEscapes(){const{type:e}=this.state;_a(e)&&this.state.containsEsc&&this.raise(na.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Da(e)})}raise(e,t,s={}){const i=t instanceof Hr?t:"number"==typeof t?this.getLoc(t):256&this.optionFlags?t.loc.start:this.getLoc(t.start),n=e(i,t instanceof Hr?i.index:"number"==typeof t?t:t.start,s);if(!(4096&this.optionFlags))throw n;return this.isLookahead||this.state.errors.push(n),n}raiseOverwrite(e,t,s={}){const i=t instanceof Hr?t:256&this.optionFlags?t.loc.start:this.getLoc(t.start),n=t instanceof Hr?i.index:t.start,r=this.state.errors;for(let t=r.length-1;t>=0;t--){const a=r[t];if(a.pos===n)return r[t]=e(i,n,s);if(a.pos<n)break}return this.raise(e,i,s)}updateContext(e){}unexpected(e,t){throw this.raise(na.UnexpectedToken,null!=e?e:this.state.startLoc,{expected:t?Da(t):null})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(na.MissingPlugin,null!=t?t:this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(e=>this.hasPlugin(e)))throw this.raise(na.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(t,s,i)=>{this.raise(e,jo(t,s,i))}}errorHandlers_readInt={invalidDigit:(e,t,s,i)=>{this.raise(na.InvalidDigit,jo(e,t,s),{radix:i})},numericSeparatorInEscapeSequence:this.errorBuilder(na.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(na.UnexpectedNumericSeparator)};errorHandlers_readCodePoint={...this.errorHandlers_readInt,invalidEscapeSequence:this.errorBuilder(na.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(na.InvalidCodePoint)};errorHandlers_readStringContents_string={...this.errorHandlers_readCodePoint,strictNumericEscape:(e,t,s)=>{this.recordStrictModeErrors(na.StrictNumericEscape,jo(e,t,s))},unterminated:(e,t,s)=>{throw this.raise(na.UnterminatedString,jo(e-1,t,s))}};errorHandlers_readStringContents_template={...this.errorHandlers_readCodePoint,strictNumericEscape:this.errorBuilder(na.StrictNumericEscape),unterminated:(e,t,s)=>{throw this.raise(na.UnterminatedTemplate,jo(e,t,s))}}}class Ho{privateNames=new Set;loneAccessors=new Map;undefinedPrivateNames=new Map}class Ko{parser;stack=[];constructor(e){this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Ho)}exit(){const e=this.stack.pop(),t=this.current();for(const[s,i]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(s)||t.undefinedPrivateNames.set(s,i):this.parser.raise(na.InvalidPrivateFieldResolution,i,{identifierName:s})}declarePrivateName(e,t,s){const{privateNames:i,loneAccessors:n,undefinedPrivateNames:r}=this.current();let a=i.has(e);if(3&t){const s=a&&n.get(e);if(s){a=(3&s)===(3&t)||(4&s)!==(4&t),a||n.delete(e)}else a||n.set(e,t)}a&&this.parser.raise(na.PrivateNameRedeclaration,s,{identifierName:e}),i.add(e),r.delete(e)}usePrivateName(e,t){let s;for(s of this.stack)if(s.privateNames.has(e))return;s?s.undefinedPrivateNames.set(e,t):this.parser.raise(na.InvalidPrivateFieldResolution,t,{identifierName:e})}}class zo{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}}class Jo extends zo{declarationErrors=new Map;constructor(e){super(e)}recordDeclarationError(e,t){this.declarationErrors.set(t,e)}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}}class Wo{parser;stack=[new zo];constructor(e){this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){const{stack:s}=this;let i=s.length-1,n=s[i];for(;!n.isCertainlyParameterDeclaration();){if(!n.canBeArrowParameterDeclaration())return;n.recordDeclarationError(e,t),n=s[--i]}this.parser.raise(e,t)}recordArrowParameterBindingError(e,t){const{stack:s}=this,i=s[s.length-1],n=t.start;if(i.isCertainlyParameterDeclaration())this.parser.raise(e,n);else{if(!i.canBeArrowParameterDeclaration())return;i.recordDeclarationError(e,n)}}recordAsyncArrowParametersError(e){const{stack:t}=this;let s=t.length-1,i=t[s];for(;i.canBeArrowParameterDeclaration();)2===i.type&&i.recordDeclarationError(na.AwaitBindingIdentifier,e),i=t[--s]}validateAsPattern(){const{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors((t,s)=>{this.parser.raise(t,s);let i=e.length-2,n=e[i];for(;n.canBeArrowParameterDeclaration();)n.clearDeclarationError(s),n=e[--i]})}}function Xo(){return new zo}class Go{stacks=[];enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}get hasIn(){return(8&this.currentFlags())>0}get inFSharpPipelineDirectBody(){return!(16&this.currentFlags())}}function Yo(e,t){return(e?2:0)|(t?1:0)}class Qo extends Vo{addExtra(e,t,s,i=!0){if(!e)return;let{extra:n}=e;null==n&&(n={},e.extra=n),i?n[t]=s:Object.defineProperty(n,t,{enumerable:i,value:s})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){if(this.input.startsWith(t,e)){const s=this.input.charCodeAt(e+t.length);return!(Ka(s)||55296==(64512&s))}return!1}isLookaheadContextual(e){const t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return!!this.isContextual(e)&&(this.next(),!0)}expectContextual(e,t){if(!this.eatContextual(e)){if(null!=t)throw this.raise(t,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(135)||this.match(4)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return mo(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return mo(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(na.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){const s={node:null};try{const i=e((e=null)=>{throw s.node=e,s});if(this.state.errors.length>t.errors.length){const e=this.state;return this.state=t,this.state.tokensLength=e.tokensLength,{node:i,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){const i=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:i};if(e===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:i};throw e}}checkExpressionErrors(e,t){if(!e)return!1;const{shorthandAssignLoc:s,doubleProtoLoc:i,privateKeyLoc:n,optionalParametersLoc:r,voidPatternLoc:a}=e;if(!t)return!!(s||i||r||n||a);null!=s&&this.raise(na.InvalidCoverInitializedName,s),null!=i&&this.raise(na.DuplicateProto,i),null!=n&&this.raise(na.UnexpectedPrivateField,n),null!=r&&this.unexpected(r),null!=a&&this.raise(na.InvalidCoverDiscardElement,a)}isLiteralPropertyName(){return Ea(this.state.type)}isPrivateName(e){return"PrivateName"===e.type}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return("MemberExpression"===e.type||"OptionalMemberExpression"===e.type)&&this.isPrivateName(e.property)}isObjectProperty(e){return"ObjectProperty"===e.type}isObjectMethod(e){return"ObjectMethod"===e.type}initializeScopes(e="module"===this.options.sourceType){const t=this.state.labels;this.state.labels=[];const s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const i=this.inModule;this.inModule=e;const n=this.scope,r=this.getScopeHandler();this.scope=new r(this,e);const a=this.prodParam;this.prodParam=new Go;const o=this.classScope;this.classScope=new Ko(this);const c=this.expressionScope;return this.expressionScope=new Wo(this),()=>{this.state.labels=t,this.exportedIdentifiers=s,this.inModule=i,this.scope=n,this.prodParam=a,this.classScope=o,this.expressionScope=c}}enterInitialScopes(){let e=0;(this.inModule||1&this.optionFlags)&&(e|=2),32&this.optionFlags&&(e|=1);const t=!this.inModule&&"commonjs"===this.options.sourceType;(t||2&this.optionFlags)&&(e|=4),this.prodParam.enter(e);let s=t?514:1;4&this.optionFlags&&(s|=512),16&this.optionFlags&&(s|=48),this.scope.enter(s)}checkDestructuringPrivate(e){const{privateKeyLoc:t}=e;null!==t&&this.expectPlugin("destructuringPrivate",t)}}class Zo{shorthandAssignLoc=null;doubleProtoLoc=null;privateKeyLoc=null;optionalParametersLoc=null;voidPatternLoc=null}class ec{constructor(e,t,s,i){this.start=s,this.end=0,void 0!==i&&(this.loc=new Kr(i)),128&e&&(this.range=[s,0]),void 0!==i&&t&&(this.loc.filename=t)}type=""}const tc=ec.prototype;class sc extends Qo{createPosition(e){return e}startNode(){const{startLoc:e}=this.state;return this.setLoc(e),this.startNodeAt(e)}startNodeAt(e){const{optionFlags:t,filename:s}=this;return 256&t?new ec(t,s,e.index,this.createPosition(e)):new ec(t,s,e.index)}startNodeAtNode(e){const{optionFlags:t,filename:s}=this;return 256&t?new ec(t,s,e.start,e.loc.start):new ec(t,s,e.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,s){e.type=t,e.end=s.index;const{optionFlags:i}=this;return 256&i&&(e.loc.end=this.createPosition(s)),128&i&&(e.range[1]=s.index),8192&i&&this.processComment(e),e}finishNodeAtNode(e,t,s){e.type=t,e.end=s.end;const{optionFlags:i}=this;return 256&i&&(e.loc.end=s.loc.end),128&i&&(e.range[1]=e.end),8192&i&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index;const{optionFlags:s}=this;256&s&&(e.loc.start=this.createPosition(t)),128&s&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index;const{optionFlags:s}=this;256&s&&(e.loc.end=this.createPosition(t)),128&s&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){e.start=t.start;const{optionFlags:s}=this;256&s&&(e.loc.start=t.loc.start),128&s&&(e.range[0]=t.start)}resetEndLocationFromNode(e,t){e.end=t.end;const{optionFlags:s}=this;256&s&&(e.loc.end=t.loc.end),128&s&&(e.range[1]=t.end)}castNodeTo(e,t){return e.type=t,e}cloneIdentifier(e){const{type:t,start:s,end:i,loc:n,range:r,name:a}=e,o=Object.create(tc);return o.type=t,o.start=s,o.end=i,o.loc=n,o.range=r,o.name=a,e.extra&&(o.extra=e.extra),o}cloneStringLiteral(e){const{type:t,start:s,end:i,loc:n,range:r,extra:a}=e,o=Object.create(tc);return o.type=t,o.start=s,o.end=i,o.loc=n,o.range=r,o.extra=a,o.value=e.value,o}}const ic=e=>"ParenthesizedExpression"===e.type?ic(e.expression):e;class nc extends sc{toAssignable(e,t=!1){let s;switch(("ParenthesizedExpression"===e.type||e.extra?.parenthesized)&&(s=ic(e),t?"Identifier"===s.type?this.expressionScope.recordArrowParameterBindingError(na.InvalidParenthesizedAssignment,e):"CallExpression"===s.type||"MemberExpression"===s.type||this.isOptionalMemberExpression(s)||this.raise(na.InvalidParenthesizedAssignment,e):this.raise(na.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 s=0,i=e.properties.length,n=i-1;s<i;s++){const i=e.properties[s],r=s===n;this.toAssignableObjectExpressionProp(i,r,t),r&&"RestElement"===i.type&&e.extra?.trailingCommaLoc&&this.raise(na.RestTrailingComma,e.extra.trailingCommaLoc)}break;case"ObjectProperty":{const{key:s,value:i}=e;this.isPrivateName(s)&&this.classScope.usePrivateName(this.getPrivateNameSV(s),s.start),this.toAssignable(i,t);break}case"SpreadElement":throw new 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(na.MissingEqInAssignment,256&this.optionFlags?e.left.loc.end:e.left),this.castNodeTo(e,"AssignmentPattern"),delete e.operator,"VoidPattern"===e.left.type&&this.raise(na.VoidPatternInitializer,e.left),this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(s,t)}}toAssignableObjectExpressionProp(e,t,s){if("ObjectMethod"===e.type)this.raise("get"===e.kind||"set"===e.kind?na.PatternHasAccessor:na.PatternHasMethod,e.key);else if("SpreadElement"===e.type){this.castNodeTo(e,"RestElement");const i=e.argument;this.checkToRestConversion(i,!1),this.toAssignable(i,s),t||this.raise(na.RestTrailingComma,e)}else this.toAssignable(e,s)}toAssignableList(e,t,s){const i=e.length-1;for(let n=0;n<=i;n++){const r=e[n];r&&(this.toAssignableListItem(e,n,s),"RestElement"===r.type&&(n<i?this.raise(na.RestTrailingComma,r):t&&this.raise(na.RestTrailingComma,t)))}}toAssignableListItem(e,t,s){const i=e[t];if("SpreadElement"===i.type){this.castNodeTo(i,"RestElement");const e=i.argument;this.checkToRestConversion(e,!0),this.toAssignable(e,s)}else this.toAssignable(i,s)}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":return!0;case"ObjectExpression":{const t=e.properties.length-1;return e.properties.every((e,s)=>"ObjectMethod"!==e.type&&(s===t||"SpreadElement"!==e.type)&&this.isAssignable(e))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every(e=>null===e||this.isAssignable(e));case"AssignmentExpression":return"="===e.operator;case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}parseSpread(e){const t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e),this.finishNode(t,"SpreadElement")}parseRestBinding(){const e=this.startNode();this.next();const t=this.parseBindingAtom();return"VoidPattern"===t.type&&this.raise(na.UnexpectedVoidPattern,t),e.argument=t,this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const 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,s){const i=1&s,n=[];let r=!0;for(;!this.eat(e);)if(r?r=!1:this.expect(8),i&&this.match(8))n.push(null);else{if(this.eat(e))break;if(this.match(17)){let i=this.parseRestBinding();if(2&s&&(i=this.parseFunctionParamType(i)),n.push(i),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{const e=[];if(2&s)for(this.match(22)&&this.hasPlugin("decorators")&&this.raise(na.UnsupportedParameterDecorator,this.state.startLoc);this.match(22);)e.push(this.parseDecorator());n.push(this.parseBindingElement(s,e))}}return n}parseBindingRestProperty(e){return this.next(),this.hasPlugin("discardBinding")&&this.match(84)?(e.argument=this.parseVoidPattern(null),this.raise(na.UnexpectedVoidPattern,e.argument)):e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){const{type:e,startLoc:t}=this.state;if(17===e)return this.parseBindingRestProperty(this.startNode());const s=this.startNode();return 134===e?(this.expectPlugin("destructuringPrivate",t),this.classScope.usePrivateName(this.state.value,t),s.key=this.parsePrivateName()):this.parsePropertyName(s),s.method=!1,this.parseObjPropValue(s,t,!1,!1,!0,!1)}parseBindingElement(e,t){const{startLoc:s}=this.state,i=this.parseMaybeDefault();2&e&&this.parseFunctionParamType(i),t.length&&(i.decorators=t,this.resetStartLocationFromNode(i,t[0]));return this.parseMaybeDefault(s,i)}parseFunctionParamType(e){return e}parseMaybeDefault(e,t){if(e??=this.state.startLoc,t=t??this.parseBindingAtom(),!this.eat(25))return t;const s=this.startNodeAt(e);return"VoidPattern"===t.type&&this.raise(na.VoidPatternInitializer,t),s.left=t,s.right=this.parseMaybeAssignAllowIn(),this.finishNode(s,"AssignmentPattern")}isValidLVal(e,t,s,i){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&&16384&this.optionFlags)return!0}return!1}isOptionalMemberExpression(e){return"OptionalMemberExpression"===e.type}checkLVal(e,t,s=64,i=!1,n=!1,r=!1,a=!1){const o=e.type;if(this.isObjectMethod(e))return;const c=this.isOptionalMemberExpression(e);if(c||"MemberExpression"===o)return c&&(this.expectPlugin("optionalChainingAssign",e.start),"AssignmentExpression"!==t.type&&this.raise(na.InvalidLhsOptionalChaining,e,{ancestor:t})),void(64!==s&&this.raise(na.InvalidPropertyBindingPattern,e));if("Identifier"===o){this.checkIdentifier(e,s,n);const{name:t}=e;return void(i&&(i.has(t)?this.raise(na.ParamDupe,e):i.add(t)))}"VoidPattern"===o&&"CatchClause"===t.type&&this.raise(na.VoidPatternCatchClauseParam,e);const h=ic(e);a||="CallExpression"===h.type&&("Import"===h.callee.type||"Super"===h.callee.type);const l=this.isValidLVal(o,a,!(r||e.extra?.parenthesized)&&"AssignmentExpression"===t.type,s);if(!0===l)return;if(!1===l){const i=64===s?na.InvalidLhs:na.InvalidLhsBinding;return void this.raise(i,e,{ancestor:t})}let p,u;"string"==typeof l?(p=l,u="ParenthesizedExpression"===o):[p,u]=l;const d="ArrayPattern"===o||"ObjectPattern"===o?{type:o}:t,f=e[p];if(Array.isArray(f))for(const e of f)e&&this.checkLVal(e,d,s,i,n,u,!0);else f&&this.checkLVal(f,d,s,i,n,u,a)}checkIdentifier(e,t,s=!1){this.state.strict&&(s?eo(e.name,this.inModule):Za(e.name))&&(64===t?this.raise(na.StrictEvalArguments,e,{referenceName:e.name}):this.raise(na.StrictEvalArgumentsBinding,e,{bindingName:e.name})),8192&t&&"let"===e.name&&this.raise(na.LetInLexicalBinding,e),64&t||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(na.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return!!this.match(8)&&(this.raise(this.lookaheadCharCode()===e?na.RestTrailingComma:na.ElementAfterRest,this.state.startLoc),!0)}}class rc extends nc{checkProto(e,t,s){if("SpreadElement"===e.type||this.isObjectMethod(e)||e.computed||e.shorthand)return t;const i=e.key;return"__proto__"===("Identifier"===i.type?i.name:i.value)?(t&&(s?null===s.doubleProtoLoc&&(s.doubleProtoLoc=this.getLoc(i.start)):this.raise(na.DuplicateProto,i)),!0):t}shouldExitDescending(e){return"ArrowFunctionExpression"===e.type&&!e.extra?.parenthesized}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(135))throw this.raise(na.ParseExpressionEmptyInput,this.state.startLoc);const e=this.parseExpression();if(!this.match(135))throw this.raise(na.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,512&this.optionFlags&&(e.tokens=lc(this.tokens)),e}parseExpression(e,t){return e?this.disallowInAnd(()=>this.parseExpressionBase(t)):this.allowInAnd(()=>this.parseExpressionBase(t))}parseExpressionBase(e){const t=this.state.startLoc,s=this.parseMaybeAssign(e);if(this.match(8)){const i=this.startNodeAt(t);for(i.expressions=[s];this.eat(8);)i.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(e){return this.disallowInAnd(()=>this.parseMaybeAssign(e))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd(()=>this.parseMaybeAssign(e,t))}setOptionalParametersError(e){e.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(e,t){const s=this.state.startLoc,i=this.isContextual(104);if(i&&this.prodParam.hasYield){this.next();let e=this.parseYield(s);return t&&(e=this.parseParenItem(e,s)),e}let n;e?n=!1:(e=new Zo,n=!0),this.state.canStartArrow=!0;let r=this.parseMaybeConditional(e);if(t&&(r=this.parseParenItem(r,s)),(a=this.state.type)>=25&&a<=29){const t=this.startNodeAt(s),i=this.state.value;if(t.operator=i,this.match(25)){this.toAssignable(r,!0),t.left=r;const i=s.index;null!=e.doubleProtoLoc&&e.doubleProtoLoc.index>=i&&(e.doubleProtoLoc=null),null!=e.shorthandAssignLoc&&e.shorthandAssignLoc.index>=i&&(e.shorthandAssignLoc=null),null!=e.privateKeyLoc&&e.privateKeyLoc.index>=i&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null),null!=e.voidPatternLoc&&e.voidPatternLoc.index>=i&&(e.voidPatternLoc=null)}else t.left=r;return this.next(),t.right=this.parseMaybeAssign(),this.checkLVal(r,this.finishNode(t,"AssignmentExpression"),void 0,void 0,void 0,void 0,"||="===i||"&&="===i||"??="===i),t}var a;if(n&&this.checkExpressionErrors(e,!0),i){const{type:e}=this.state;if((this.hasPlugin("v8intrinsic")?Aa(e):Aa(e)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(na.YieldNotInGeneratorFunction,s),this.parseYield(s)}return r}parseMaybeConditional(e){const t=this.state.startLoc,s=this.parseExprOps(e);return this.shouldExitDescending(s)?s:this.parseConditional(s,t,e)}parseConditional(e,t,s){if(this.eat(13)){const s=this.startNodeAt(t);return s.test=e,s.consequent=this.parseMaybeAssignAllowIn(),this.expect(10),s.alternate=this.parseMaybeAssign(),this.finishNode(s,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(134)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){const t=this.state.startLoc,s=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(s)?s:(this.state.canStartArrow=!1,this.parseExprOp(s,t,-1))}parseExprOp(e,t,s){if(this.isPrivateName(e)){const i=this.getPrivateNameSV(e);(s>=Ma(54)||!this.prodParam.hasIn||!this.match(54))&&this.raise(na.PrivateInExpectedIn,t,{identifierName:i}),this.classScope.usePrivateName(i,t)}const i=this.state.type;if(Na(i)&&(this.prodParam.hasIn||!this.match(54))){let n=Ma(i);if(n>s){if(35===i&&(this.expectPlugin("pipelineOperator"),this.prodParam.inFSharpPipelineDirectBody))return e;const r=this.startNodeAt(t);r.left=e,r.operator=this.state.value;const a=37===i||38===i,o=36===i;o&&(n=Ma(38)),this.next(),r.right=this.parseExprOpRightExpr(i,n);const c=this.finishNode(r,a||o?"LogicalExpression":"BinaryExpression"),h=this.state.type;if(o&&(37===h||38===h)||a&&36===h)throw this.raise(na.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,t,s)}}return e}parseExprOpRightExpr(e,t){if(35===e)switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.parseFSharpPipelineBody(t)}return this.parseExprOpBaseRightExpr(e,t)}parseExprOpBaseRightExpr(e,t){const s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,53===e?t-1:t)}parseHackPipeBody(){const{startLoc:e}=this.state,t=this.parseMaybeAssign();return Zr.has(t.type)&&!t.extra?.parenthesized&&this.raise(na.PipeUnparenthesizedBody,e,{type:t.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(na.PipeTopicUnused,e),t}checkExponentialAfterUnary(e){this.match(53)&&this.raise(na.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,t){const s=this.state.startLoc,i=this.isContextual(92);if(i&&this.recordAwaitIfAllowed()){this.next();const e=this.parseAwait(s);return t||this.checkExponentialAfterUnary(e),e}const n=this.match(30),r=this.startNode();if(a=this.state.type,ba[a]){r.operator=this.state.value,r.prefix=!0,this.state.canStartArrow=!1,this.match(68)&&this.expectPlugin("throwExpressions");const s=this.match(85);if(this.next(),r.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&s){const e=r.argument;"Identifier"===e.type?this.raise(na.StrictDelete,r):this.hasPropertyAsPrivateName(e)&&this.raise(na.DeletePrivateField,r)}if(!n)return t||this.checkExponentialAfterUnary(r),this.finishNode(r,"UnaryExpression")}var a;const o=this.parseUpdate(r,n,e);if(i){const{type:e}=this.state;if((this.hasPlugin("v8intrinsic")?Aa(e):Aa(e)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(na.AwaitNotInAsyncContext,s),this.parseAwait(s)}return o}parseUpdate(e,t,s){if(t){const t=this.finishNode(e,"UpdateExpression");return this.checkLVal(t.argument,t),t}const i=this.state.startLoc;let n=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return n;for(;La(this.state.type)&&!this.canInsertSemicolon();){const e=this.startNodeAt(i);e.operator=this.state.value,e.prefix=!1,e.argument=n,this.next(),this.checkLVal(n,n=this.finishNode(e,"UpdateExpression"))}return n}parseExprSubscripts(e){const t=this.state.startLoc;this.setLoc(t);const s=this.parseExprAtom(e);return this.shouldExitDescending(s)?s:this.parseSubscripts(s,t)}parseSubscripts(e,t,s){const i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do{e=this.parseSubscript(e,t,s,i),i.maybeAsyncArrow=!1}while(!i.stop);return e}parseSubscript(e,t,s,i){const{type:n}=this.state;if(!s&&11===n)return this.parseBind(e,t,i);if(Oa(n))return this.parseTaggedTemplateExpression(e,t,i);let r=!1;if(14===n){if(s&&(this.raise(na.OptionalChainingNoNew,this.state.startLoc),40===this.lookaheadCharCode()))return this.stopParseSubscript(e,i);i.optionalChainMember=r=!0,this.next()}if(!s&&this.match(6))return this.parseCoverCallAndAsyncArrowHead(e,t,i,r);{const s=this.eat(0);return s||r||this.eat(12)?this.parseMember(e,t,i,s,r):this.stopParseSubscript(e,i)}}stopParseSubscript(e,t){return t.stop=!0,e}parseMember(e,t,s,i,n){const r=this.startNodeAt(t);return r.object=e,r.computed=i,i?(r.property=this.parseExpression(),this.expect(1)):this.match(134)?("Super"===e.type&&this.raise(na.SuperPrivateField,t),this.classScope.usePrivateName(this.state.value,this.state.startLoc),r.property=this.parsePrivateName()):r.property=this.parseIdentifier(!0),s.optionalChainMember?(r.optional=n,this.finishNode(r,"OptionalMemberExpression")):this.finishNode(r,"MemberExpression")}parseBind(e,t,s){const i=this.startNodeAt(t);i.object=e,this.next();const n=this.parseNoCallExpr(e=>{throw this.raise(na.UnsupportedBindRHS,e)});if("Super"===n.type||"Import"===n.type)throw this.raise(na.UnsupportedBindRHS,n);return i.callee=n,s.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),t,!1)}parseCoverCallAndAsyncArrowHead(e,t,s,i){let n=null;this.next();const r=this.startNodeAt(t);r.callee=e;const{maybeAsyncArrow:a,optionalChainMember:o}=s;a&&(this.expressionScope.enter(new Jo(2)),n=new Zo),o&&(r.optional=i),r.arguments=i?this.parseCallExpressionArguments():this.parseCallExpressionArguments("Super"!==e.type,r,n);let c=this.finishCallExpression(r,o);return a&&this.shouldParseAsyncArrow()&&!i?(s.stop=!0,this.checkDestructuringPrivate(n),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),c=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),c)):(a&&(this.checkExpressionErrors(n,!0),this.expressionScope.exit()),this.toReferencedList(r.arguments)),c}parseTaggedTemplateExpression(e,t,s){const i=this.startNodeAt(t);return i.tag=e,i.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(na.OptionalChainingNoTemplate,t),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return"Identifier"===e.type&&"async"===e.name&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.state.canStartArrow}finishCallExpression(e,t){if("Import"===e.callee.type)if(0===e.arguments.length||e.arguments.length>2)this.raise(na.ImportCallArity,e);else for(const t of e.arguments)"SpreadElement"===t.type&&this.raise(na.ImportCallSpreadArgument,t);return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,s){const i=[];let n=!0;for(;!this.eat(7);){if(n)n=!1;else if(this.expect(8),this.match(7)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}i.push(this.parseExprListItem(7,!1,s,e))}return i}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&&Po(e,t.innerComments),t.callee.trailingComments&&Po(e,t.callee.trailingComments),e}parseNoCallExpr(e){const t=this.state.startLoc,s=this.match(79),i=this.parseExprAtom();return s&&"ImportExpression"===i.type&&e(i),this.parseSubscripts(i,t,!0)}parseExprAtom(e){let t,s=null;const{type:i}=this.state;switch(i){case 75:return this.parseSuper();case 79:return t=this.startNode(),this.next(),this.match(12)?this.parseImportMetaPropertyOrPhaseCall(t):this.match(6)?1024&this.optionFlags?this.parseImportCall(t):this.finishNode(t,"Import"):(this.raise(na.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(t,"Import"));case 74:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 86:return this.parseDo(this.startNode(),!1);case 52:case 27:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 131:return this.parseNumericLiteral(this.state.value);case 132:return this.parseBigIntLiteral(this.state.value);case 130:return this.parseStringLiteral(this.state.value);case 80:return this.parseNullLiteral();case 81:return this.parseBooleanLiteral(!0);case 82:return this.parseBooleanLiteral(!1);case 6:return this.parseParenAndDistinguishExpression(this.state.canStartArrow);case 0:return this.parseArrayLike(1,e);case 2:return this.parseObjectLike(4,!1,e);case 64:return this.parseFunctionOrFunctionSent();case 22:s=this.parseDecorators();case 76:return this.parseClass(this.maybeTakeDecorators(s,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;const e=t.callee=this.parseNoCallExpr(e=>{throw this.raise(na.UnsupportedBind,e)});if("MemberExpression"===e.type)return this.finishNode(t,"BindExpression");throw this.raise(na.UnsupportedBind,e)}case 134:return this.raise(na.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:{const e=this.getPluginOption("pipelineOperator","proposal");if(e)return this.parseTopicReference(e);throw this.unexpected()}case 43:{const e=this.input.codePointAt(this.nextTokenStart());if(Ha(e)||62===e)throw this.expectOnePlugin(["jsx","flow","typescript"]);throw this.unexpected()}default:if(Ca(i)){if(this.isContextual(123)&&123===this.lookaheadInLineCharCode())return this.parseModuleExpression();const{canStartArrow:e,containsEsc:t}=this.state,s=this.parseIdentifier();if(!t&&"async"===s.name&&!this.canInsertSemicolon()){const{type:t}=this.state;if(64===t)return this.resetPreviousNodeTrailingComments(s),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(s));if(Ca(t))return e&&61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(s)):s;if(86===t)return this.resetPreviousNodeTrailingComments(s),this.parseDo(this.startNodeAtNode(s),!0)}return e&&this.match(15)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(s),[s],!1)):s}throw this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){const s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=zr(this.state.endLoc,-1),this.parseTopicReference(s);throw this.unexpected()}parseTopicReference(e){const t=this.startNode(),s=this.state.startLoc,i=this.state.type;return this.next(),this.finishTopicReference(t,s,e,i)}finishTopicReference(e,t,s,i){if(this.testTopicReferenceConfiguration(s,t,i))return this.topicReferenceIsAllowedInCurrentContext()||this.raise(na.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(e,"TopicReference");throw this.raise(na.PipeTopicUnconfiguredToken,t,{token:Da(i)})}testTopicReferenceConfiguration(e,t,s){if("hack"===e)return this.hasPlugin(["pipelineOperator",{topicToken:Da(s)}]);throw this.raise(na.PipeTopicRequiresHackPipes,t)}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(Yo(!0,this.prodParam.hasYield));const t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(na.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();const s=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=s,this.finishNode(e,"DoExpression")}parseSuper(){const e=this.startNode();return this.next(),this.match(6)&&!this.scope.allowDirectSuper?this.raise(na.SuperNotAllowed,e):this.scope.allowSuper||this.raise(na.UnexpectedSuper,e),this.match(6)||this.match(0)||this.match(12)||this.raise(na.UnsupportedSuper,e),this.finishNode(e,"Super")}parsePrivateName(){const e=this.startNode(),t=this.startNodeAt(zr(this.state.startLoc,1)),s=this.state.value;return this.next(),e.id=this.createIdentifier(t,s),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){const e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(12)){const 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,s){e.meta=t;const i=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==s||i)&&this.raise(na.UnsupportedMetaProperty,e.property,{target:t.name,onlyValidPropertyName:s}),this.finishNode(e,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(e){if(this.next(),this.isContextual(101)||this.isContextual(93)){const t=this.isContextual(101);return this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),e.phase=t?"source":"defer",this.parseImportCall(e)}{const t=this.createIdentifierAt(this.startNodeAtNode(e),"import",this.state.lastTokStartLoc);return this.isContextual(97)&&(this.inModule||this.raise(na.ImportMetaOutsideModule,t),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}}parseLiteralAtNode(e,t,s){return this.addExtra(s,"rawValue",e),this.addExtra(s,"raw",this.input.slice(this.offsetToSourcePos(s.start),this.state.end)),s.value=e,this.next(),this.finishNode(s,t)}parseLiteral(e,t){const s=this.startNode();return this.parseLiteralAtNode(e,t,s)}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){const 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){const t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){const e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){const t=this.state.startLoc;let s;this.next(),this.expressionScope.enter(new Jo(1));const i=this.state.startLoc,n=[],r=new Zo;let a,o,c=!0;for(;!this.match(7);){if(c)c=!1;else if(this.expect(8,null===r.optionalParametersLoc?null:r.optionalParametersLoc),this.match(7)){o=this.state.startLoc;break}if(this.match(17)){const e=this.state.startLoc;if(a=this.state.startLoc,n.push(this.parseParenItem(this.parseRestBinding(),e)),!this.checkCommaAfterRest(41))break}else n.push(this.parseMaybeAssignAllowInOrVoidPattern(7,r,!0))}const h=this.state.lastTokEndLoc;this.expect(7);let l=this.startNodeAt(t);return e&&this.shouldParseArrow(n)&&(l=this.parseArrow(l))?(this.checkDestructuringPrivate(r),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(l,n,!1),l):(this.expressionScope.exit(),n.length||this.unexpected(this.state.lastTokStartLoc),o&&this.unexpected(o),a&&this.unexpected(a),this.checkExpressionErrors(r,!0),this.toReferencedList(n,!0),n.length>1?(s=this.startNodeAt(i),s.expressions=n,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,h)):s=n[0],this.wrapParenthesis(t,s))}wrapParenthesis(e,t){if(!(2048&this.optionFlags))return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;const s=this.startNodeAt(e);return s.expression=t,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(15))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){const e=this.startNode();if(this.next(),this.match(12)){const t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();const s=this.parseMetaProperty(e,t,"target");return this.scope.allowNewTarget||this.raise(na.UnexpectedNewTarget,s),s}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(6)){const t=this.parseExprList(7);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){const t=this.parseNoCallExpr(e=>{this.raise(na.ImportCallNotNewExpression,e,e)});e.callee=t,"Import"===t.type&&this.raise(na.ImportCallNotNewExpression,t),"Super"===t.type&&this.raise(na.SuperCallNotNewExpression,t)}parseTemplateElement(e){const{start:t,startLoc:s,end:i,value:n}=this.state,r=t+1,a=this.startNodeAt(zr(s,1));null===n&&(e||this.raise(na.InvalidEscapeSequenceTemplate,zr(this.state.firstInvalidTemplateEscapePos,1)));const o=this.match(20),c=o?-1:-2,h=i+c;a.value={raw:this.input.slice(r,h).replace(/\r\n?/g,"\n"),cooked:null===n?null:n.slice(1,c)},a.tail=o,this.next();const l=this.finishNode(a,"TemplateElement");return this.resetEndLocation(l,zr(this.state.lastTokEndLoc,c)),l}parseTemplate(e){const t=this.startNode();let s=this.parseTemplateElement(e);const i=[s],n=[];for(;!s.tail;)n.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(e));return t.expressions=n,t.quasis=i,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,s){let i=!1,n=!0;const r=this.startNode();for(r.properties=[],this.next();!this.match(e);){if(n)n=!1;else if(this.expect(8),this.match(e)){this.addTrailingCommaExtraToNode(r);break}let a;t?a=this.parseBindingProperty():(a=this.parsePropertyDefinition(s),i=this.checkProto(a,i,s)),r.properties.push(a)}this.next();const a=t?"ObjectPattern":"ObjectExpression";return this.finishNode(r,a)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&"Identifier"===e.key.type&&(this.isLiteralPropertyName()||this.match(0)||this.match(51))}parsePropertyDefinition(e){const t=[];if(this.match(22))for(this.hasPlugin("decorators")&&this.raise(na.UnsupportedPropertyDecorator,this.state.startLoc);this.match(22);)t.push(this.parseDecorator());const s=this.startNode();let i,n=!1,r=!1;if(this.match(17))return t.length&&this.unexpected(),this.parseSpread();t.length&&(s.decorators=t),s.method=!1,e&&(i=this.state.startLoc);let a=this.eat(51);this.parsePropertyNamePrefixOperator(s);const o=this.state.containsEsc;if(this.parsePropertyName(s,e),!a&&!o&&this.maybeAsyncOrAccessorProp(s)){const{key:e}=s,t=e.name;"async"!==t||this.hasPrecedingLineBreak()||(n=!0,this.resetPreviousNodeTrailingComments(e),a=this.eat(51),this.parsePropertyName(s)),"get"!==t&&"set"!==t||(r=!0,this.resetPreviousNodeTrailingComments(e),s.kind=t,this.match(51)&&(a=!0,this.raise(na.AccessorIsGenerator,this.state.curPosition(),{kind:t}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,i,a,n,!1,r,e)}getGetterSetterExpectedParamCount(e){return"get"===e.kind?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){const t=this.getGetterSetterExpectedParamCount(e),s=this.getObjectOrClassMethodParams(e);s.length!==t&&this.raise("get"===e.kind?na.BadGetterArity:na.BadSetterArity,e),"set"===e.kind&&"RestElement"===s[s.length-1]?.type&&this.raise(na.BadSetterRestParameter,e)}parseObjectMethod(e,t,s,i,n){if(n){const s=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(s),s}if(s||t||this.match(6))return i&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,s,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,s,i){if(e.shorthand=!1,this.eat(10))return e.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(4,i),this.finishObjectProperty(e);if(!e.computed&&"Identifier"===e.key.type){if(this.checkReservedWord(e.key.name,e.key.start,!0,!1),s)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(25)){const s=this.state.startLoc;null!=i?null===i.shorthandAssignLoc&&(i.shorthandAssignLoc=s):this.raise(na.InvalidCoverInitializedName,s),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,s,i,n,r,a){const o=this.parseObjectMethod(e,s,i,n,r)||this.parseObjectProperty(e,t,n,a);return o||this.unexpected(),o}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(1);else{const{type:s,value:i}=this.state;let n;if(Pa(s))n=this.parseIdentifier(!0);else switch(s){case 131:n=this.parseNumericLiteral(i);break;case 130:n=this.parseStringLiteral(i);break;case 132:n=this.parseBigIntLiteral(i);break;case 134:{const e=this.state.startLoc;null!=t?null===t.privateKeyLoc&&(t.privateKeyLoc=e):this.raise(na.UnexpectedPrivateField,e),n=this.parsePrivateName();break}default:throw this.unexpected()}e.key=n,134!==s&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,s,i,n,r,a=!1){this.initFunction(e,s),e.generator=t,this.scope.enter(530|(a?576:0)|(n?32:0)),this.prodParam.enter(Yo(s,e.generator)),this.parseFunctionParams(e,i);const o=this.parseFunctionBodyAndFinish(e,r,!0);return this.prodParam.exit(),this.scope.exit(),o}parseArrayLike(e,t){const s=this.startNode();return this.next(),s.elements=this.parseExprList(e,!0,t,s),this.finishNode(s,"ArrayExpression")}parseArrowExpression(e,t,s,i){this.scope.enter(518);let n=Yo(s,!1);return this.match(2)||(n|=24&this.prodParam.currentFlags()),this.prodParam.enter(n),this.initFunction(e,s),t&&this.setArrowFunctionParameters(e,t,i),this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,s){this.toAssignableList(t,s,!1),e.params=t}parseFunctionBodyAndFinish(e,t,s=!1){return this.parseFunctionBody(e,!1,s),this.finishNode(e,t)}parseFunctionBody(e,t,s=!1){const i=t&&!this.match(2);if(this.expressionScope.enter(Xo()),i)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{const i=this.state.strict,n=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),e.body=this.parseBlock(!0,!1,n=>{const r=!this.isSimpleParamList(e.params);n&&r&&this.raise(na.IllegalLanguageModeDirective,"method"!==e.kind&&"constructor"!==e.kind||!e.key?e:256&this.optionFlags?e.key.loc.end:e.key);const a=!i&&this.state.strict;this.checkParams(e,!(this.state.strict||t||s||r),t,a),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,a)}),this.prodParam.exit(),this.state.labels=n}this.expressionScope.exit()}isSimpleParameter(e){return"Identifier"===e.type}isSimpleParamList(e){for(let t=0,s=e.length;t<s;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,s,i=!0){const n=!t&&new Set,r={type:"FormalParameters"};for(const t of e.params)this.checkLVal(t,r,5,n,i)}parseExprList(e,t,s,i){const n=[];let r=!0;for(;!this.eat(e);){if(r)r=!1;else if(this.expect(8),this.match(e)){i&&this.addTrailingCommaExtraToNode(i),this.next();break}n.push(this.parseExprListItem(e,t,s))}return n}parseExprListItem(e,t,s,i){let n;if(this.match(8))t||this.raise(na.UnexpectedToken,this.state.curPosition(),{unexpected:","}),n=null;else if(this.match(17)){const e=this.state.startLoc;n=this.parseParenItem(this.parseSpread(s),e)}else if(this.match(13)){this.expectPlugin("partialApplication"),i||this.raise(na.UnexpectedArgumentPlaceholder,this.state.startLoc);const e=this.startNode();this.next(),n=this.finishNode(e,"ArgumentPlaceholder")}else n=this.parseMaybeAssignAllowInOrVoidPattern(e,s,!0);return n}parseIdentifier(e){const t=this.startNode(),s=this.parseIdentifierName(e);return this.createIdentifier(t,s)}createIdentifier(e,t){return e.name=t,256&this.optionFlags&&(e.loc.identifierName=t),this.finishNode(e,"Identifier")}createIdentifierAt(e,t,s){return e.name=t,256&this.optionFlags&&(e.loc.identifierName=t),this.finishNodeAt(e,"Identifier",s)}parseIdentifierName(e){let t;const{start:s,type:i}=this.state;Pa(i)?t=this.state.value:this.unexpected();const n=i<=88;return e?n&&this.replaceToken(128):this.checkReservedWord(t,this.sourceToOffsetPos(s),n,!1),this.next(),t}checkReservedWord(e,t,s,i){if(e.length>10)return;if(!function(e){return to.has(e)}(e))return;if(s&&function(e){return Wa.has(e)}(e))return void this.raise(na.UnexpectedKeyword,t,{keyword:e});if((this.state.strict?i?eo:Qa:Ya)(e,this.inModule))this.raise(na.UnexpectedReservedWord,t,{reservedWord:e});else if("yield"===e){if(this.prodParam.hasYield)return void this.raise(na.YieldBindingIdentifier,t)}else if("await"===e){if(this.prodParam.hasAwait)return void this.raise(na.AwaitBindingIdentifier,t);if(this.scope.inStaticBlock)return void this.raise(na.AwaitBindingIdentifierInStaticBlock,t);this.expressionScope.recordAsyncArrowParametersError(t)}else if("arguments"===e&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(na.ArgumentsInClass,t)}recordAwaitIfAllowed(){const e=this.prodParam.hasAwait;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e,t){const s=e.index;this.setLoc(e);const i=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(na.AwaitExpressionFormalParameter,s),this.eat(51)&&this.raise(na.ObsoleteAwaitStar,e),this.scope.inFunction||1&this.optionFlags||(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),t||(i.argument=this.parseMaybeUnary(null,!0)),this.finishNode(i,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;const{type:e}=this.state;return 49===e||6===e||0===e||Oa(e)||98===e&&!this.state.containsEsc||133===e||52===e||this.hasPlugin("v8intrinsic")&&50===e}parseYield(e){this.setLoc(e);const t=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError(na.YieldInParameter,e.index);let s=!1,i=null;if(!this.hasPrecedingLineBreak())switch(s=this.eat(51),this.state.type){case 9:case 135:case 4:case 7:case 1:case 5:case 10:case 8:if(!s)break;default:i=this.parseMaybeAssign()}return t.delegate=s,t.argument=i,this.finishNode(t,"YieldExpression")}parseImportCall(e){this.next();const t=this.parseCallExpressionArguments();if(0===t.length||t.length>2)this.raise(na.ImportCallArity,e,e);else for(const s of t)"SpreadElement"===s.type&&this.raise(na.ImportCallSpreadArgument,s,e);return e.source=t[0],e.options=t[1]??null,this.finishNode(e,"ImportExpression")}withTopicBindingContext(e){const t=this.state.inHackPipelineBody;this.state.inHackPipelineBody=!0;const s=this.state.seenTopicReference;this.state.seenTopicReference=!1;try{return e()}finally{this.state.inHackPipelineBody=t,this.state.seenTopicReference=s}}allowInAnd(e){const t=this.prodParam.currentFlags();if(24&~t){this.prodParam.enter(24|t);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){const t=this.prodParam.currentFlags();if(8&t||16&~t){this.prodParam.enter(-9&t|16);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.seenTopicReference=!0}topicReferenceIsAllowedInCurrentContext(){return this.state.inHackPipelineBody}topicReferenceWasUsedInCurrentContext(){return this.state.seenTopicReference}parseFSharpPipelineBody(e){const t=this.state.startLoc;let s;if(this.prodParam.enter(-17&this.prodParam.currentFlags()),this.isContextual(92)&&this.recordAwaitIfAllowed()){this.next(),s=this.parseAwait(t,!0);const e=this.state.type;Na(e)&&35!==e&&(this.prodParam.hasIn||54!==e)&&this.raise(na.PipelineUnparenthesized,t)}else this.state.canStartArrow=!0,s=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.prodParam.exit(),s}parseModuleExpression(){this.expectPlugin("moduleBlocks");const e=this.startNode();this.next(),this.match(2)||this.unexpected(null,2);const t=this.startNodeAt(this.state.endLoc);this.next();const s=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,4,"module")}finally{s()}return this.finishNode(e,"ModuleExpression")}parseVoidPattern(e){this.expectPlugin("discardBinding");const t=this.startNode();return null!=e&&(e.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(t,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(e,t,s){if(null!=t&&this.match(84)){const s=this.lookaheadCharCode();if(44===s||s===(1===e?93:4===e?125:41)||61===s)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(t))}return this.parseMaybeAssignAllowIn(t,s)}parsePropertyNamePrefixOperator(e){}}const ac={kind:1},oc={kind:2},cc=/[\uD800-\uDFFF]/u,hc=/in(?:stanceof)?/y;function lc(e){for(let t=0;t<e.length;t++){const s=e[t],{type:i}=s;"number"==typeof i&&(s.type=Fa(i))}return e}class pc extends rc{parseTopLevel(e,t){return e.program=this.parseProgram(t,135,"module"===this.options.sourceType?"module":"script"),e.comments=this.comments,512&this.optionFlags&&(e.tokens=lc(this.tokens)),this.finishNode(e,"File")}parseProgram(e,t,s){if(e.sourceType=s,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule){if(!(64&this.optionFlags)&&this.scope.undefinedExports.size>0)for(const[e,t]of Array.from(this.scope.undefinedExports))this.raise(na.ModuleExportUndefined,t,{localName:e});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let i;return i=135===t?this.finishNode(e,"Program"):this.finishNodeAt(e,"Program",zr(this.state.startLoc,-1)),i}stmtToDirective(e){const t=this.castNodeTo(e,"Directive"),s=this.castNodeTo(e.expression,"DirectiveLiteral"),i=s.value,n=this.input.slice(this.offsetToSourcePos(s.start),this.offsetToSourcePos(s.end)),r=s.value=n.slice(1,-1);return this.addExtra(s,"raw",n),this.addExtra(s,"rawValue",r),this.addExtra(s,"expressionValue",i),t.value=s,delete e.expression,t}parseInterpreterDirective(){if(!this.match(24))return null;const e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return!!this.isContextual(96)&&this.hasFollowingBindingAtom()}isUsing(){return!!this.isContextual(103)&&this.nextTokenIsIdentifierOnSameLine()}isForUsing(){if(!this.isContextual(103))return!1;const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);if(this.isUnparsedContextual(e,"of")){const t=this.lookaheadCharCodeSince(e+2);if(61!==t&&58!==t&&59!==t)return!1}return!(!this.chStartsBindingIdentifier(t,e)&&!this.isUnparsedContextual(e,"void"))}nextTokenIsIdentifierOnSameLine(){const 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);const t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return!0}return!1}chStartsBindingIdentifier(e,t){if(Ha(e)){if(hc.lastIndex=t,hc.test(this.input)){const e=this.codePointAtPos(hc.lastIndex);if(!Ka(e)&&92!==e)return!1}return!0}return 92===e}chStartsBindingPattern(e){return 91===e||123===e}hasFollowingBindingAtom(){const e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifierOrBrace(){const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return 123===t||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){const s=this.state.type,i=this.startNode(),n=!!(2&e),r=!!(4&e),a=1&e;switch(s){case 56:return this.parseBreakContinueStatement(i,!0);case 59:return this.parseBreakContinueStatement(i,!1);case 60:return this.parseDebuggerStatement(i);case 86:return this.parseDoWhileStatement(i);case 87:return this.parseForStatement(i);case 64:if(46===this.lookaheadCharCode())break;return r||this.raise(this.state.strict?na.StrictFunction:this.options.annexB?na.SloppyFunctionAnnexB:na.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(i,!1,!n&&r);case 76:return n||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,i),!0);case 65:return this.parseIfStatement(i);case 66:return this.parseReturnStatement(i);case 67:return this.parseSwitchStatement(i);case 68:return this.parseThrowStatement(i);case 69:return this.parseTryStatement(i);case 92:if(this.isAwaitUsing())return this.allowsUsing()?n?this.recordAwaitIfAllowed()||this.raise(na.AwaitUsingNotInAsyncContext,i):this.raise(na.UnexpectedLexicalDeclaration,i):this.raise(na.UnexpectedUsingDeclaration,i),this.next(),this.parseVarStatement(i,"await using");break;case 103:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?n||this.raise(na.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(na.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 96:{if(this.state.containsEsc)break;const e=this.nextTokenStart(),t=this.codePointAtPos(e);if(91!==t){if(!n&&this.hasFollowingLineBreak())break;if(!this.chStartsBindingIdentifier(t,e)&&123!==t)break}}case 71:n||this.raise(na.UnexpectedLexicalDeclaration,this.state.startLoc);case 70:{const e=this.state.value;return this.parseVarStatement(i,e)}case 88:return this.parseWhileStatement(i);case 72:return this.parseWithStatement(i);case 2:return this.parseBlock();case 9:return this.parseEmptyStatement(i);case 79:{const e=this.lookaheadCharCode();if(40===e||46===e)break}case 78:{let e;return 8&this.optionFlags||a||this.raise(na.UnexpectedImportExport,this.state.startLoc),this.next(),e=79===s?this.parseImport(i):this.parseExport(i,t),this.assertModuleNodeAllowed(e),e}default:if(this.isAsyncFunction())return n||this.raise(na.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!n&&r)}const o=this.state.value,c=this.parseExpression();return Ca(s)&&"Identifier"===c.type&&this.eat(10)?this.parseLabeledStatement(i,o,c,e):this.parseExpressionStatement(i,c)}assertModuleNodeAllowed(e){8&this.optionFlags||this.inModule||this.raise(na.ImportOutsideModule,e)}maybeTakeDecorators(e,t,s){return e&&(t.decorators?.length?(this.raise(na.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),s&&this.resetStartLocationFromNode(s,t)),t}canHaveLeadingDecorator(){return this.match(76)}parseDecorators(e){const t=[];do{t.push(this.parseDecorator())}while(this.match(22));if(this.match(78))e||this.unexpected();else if(!this.canHaveLeadingDecorator())throw this.raise(na.UnexpectedLeadingDecorator,this.state.startLoc);return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const e=this.startNode();if(this.next(),this.hasPlugin("decorators")){const t=this.state.startLoc;let s;if(this.match(6)){const t=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(7),s=this.wrapParenthesis(t,s);const i=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(s,t),e.expression!==s&&this.raise(na.DecoratorArgumentsOutsideParentheses,i)}else{for(s=this.parseIdentifier(!1);this.eat(12);){const e=this.startNodeAt(t);e.object=s,this.match(134)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),e.property=this.parsePrivateName()):e.property=this.parseIdentifier(!0),e.computed=!1,s=this.finishNode(e,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(s,t)}}else this.state.canStartArrow=!1,e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e,t){if(this.eat(6)){const s=this.startNodeAt(t);return s.callee=e,s.arguments=this.parseCallExpressionArguments(),this.toReferencedList(s.arguments),this.finishNode(s,"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 s;for(s=0;s<this.state.labels.length;++s){const i=this.state.labels[s];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(t||1===i.kind))break;if(e.label&&t)break}}if(s===this.state.labels.length){const s=t?"BreakStatement":"ContinueStatement";this.raise(na.IllegalBreakContinue,e,{type:s})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(6);const e=this.parseExpression();return this.expect(7),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(ac),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(ac);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 null!==t&&this.unexpected(t),this.parseFor(e,null);const s=this.isContextual(96);{const i=this.isAwaitUsing(),n=i||this.isForUsing(),r=s&&this.hasFollowingBindingAtom()||n;if(this.match(70)||this.match(71)||r){const s=this.startNode();let r;i?(r="await using",this.recordAwaitIfAllowed()||this.raise(na.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):r=this.state.value,this.next(),this.parseVar(s,!0,r);const a=this.finishNode(s,"VariableDeclaration"),o=this.match(54);return o&&n&&this.raise(na.ForInUsing,a),(o||this.isContextual(98))&&1===a.declarations.length?this.parseForX(e,a,t):(null!==t&&this.unexpected(t),this.parseFor(e,a))}}const i=this.isContextual(91),n=new Zo,r=this.parseExpression(!0,n),a=this.isContextual(98);if(a&&(s&&this.raise(na.ForOfLet,r),null===t&&i&&"Identifier"===r.type&&this.raise(na.ForOfAsync,r)),a||this.match(54)){this.checkDestructuringPrivate(n),this.toAssignable(r,!0);const s=a?"ForOfStatement":"ForInStatement";return this.checkLVal(r,{type:s}),this.parseForX(e,r,t)}return this.checkExpressionErrors(n,!0),null!==t&&this.unexpected(t),this.parseFor(e,r)}parseFunctionStatement(e,t,s){return this.next(),this.parseFunction(e,1|(s?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(na.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();const t=e.cases=[];let s;this.expect(2),this.state.labels.push(oc),this.scope.enter(256);for(let e;!this.match(4);)if(this.match(57)||this.match(61)){const i=this.match(57);s&&this.finishNode(s,"SwitchCase"),t.push(s=this.startNode()),s.consequent=[],this.next(),i?s.test=this.parseExpression():(e&&this.raise(na.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),e=!0,s.test=null),this.expect(10)}else s?s.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(na.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){const e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&"Identifier"===e.type?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(58)){const 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(na.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,s=!1){return this.next(),this.parseVar(e,!1,t,s),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(ac),e.body=this.parseStatement(),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(na.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,s,i){for(const e of this.state.labels)e.name===t&&this.raise(na.LabelRedeclaration,s,{labelName:t});const n=(r=this.state.type)>=86&&r<=88?1:this.match(67)?2:null;var r;for(let t=this.state.labels.length-1;t>=0;t--){const s=this.state.labels[t];if(s.statementStart!==e.start)break;s.statementStart=this.sourceToOffsetPos(this.state.start),s.kind=n}return this.state.labels.push({name:t,kind:n,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=8&i?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=s,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,s){const i=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(2),t&&this.scope.enter(0),this.parseBlockBody(i,e,!1,4,s),t&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized}parseBlockBody(e,t,s,i,n){const r=e.body=[],a=e.directives=[];this.parseBlockOrModuleBlockBody(r,t?a:void 0,s,i,n)}parseBlockOrModuleBlockBody(e,t,s,i,n){const r=this.state.strict;let a=!1,o=!1;for(;!this.match(i);){const i=s?this.parseModuleItem():this.parseStatementListItem();if(t&&!o){if(this.isValidDirective(i)){const e=this.stmtToDirective(i);t.push(e),a||"use strict"!==e.value.value||(a=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}e.push(i)}n?.call(this,a),r||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")}parseForX(e,t,s){const i=this.match(54);return this.next(),i?null!==s&&this.unexpected(s):e.await=null!==s,"VariableDeclaration"!==t.type||null==t.declarations[0].init||i&&this.options.annexB&&!this.state.strict&&"var"===t.kind&&"Identifier"===t.declarations[0].id.type||this.raise(na.ForInOfLoopInitializer,t,{type:i?"ForInStatement":"ForOfStatement"}),"AssignmentPattern"===t.type&&this.raise(na.InvalidLhs,t,{ancestor:{type:"ForStatement"}}),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(7),e.body=this.parseStatement(),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")}parseVar(e,t,s,i=!1){const n=e.declarations=[];for(e.kind=s;;){const e=this.startNode();if(this.parseVarId(e,s),e.init=this.eat(25)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,null!==e.init||i||("Identifier"===e.id.type||t&&(this.match(54)||this.isContextual(98))?"const"!==s&&"using"!==s&&"await using"!==s||this.match(54)||this.isContextual(98)||this.raise(na.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:s}):this.raise(na.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"})),n.push(this.finishNode(e,"VariableDeclarator")),!this.eat(8))break}return e}parseVarId(e,t){const s=this.parseBindingAtom();"using"===t||"await using"===t?"ArrayPattern"!==s.type&&"ObjectPattern"!==s.type||this.raise(na.UsingDeclarationHasBindingPattern,s):"VoidPattern"===s.type&&this.raise(na.UnexpectedVoidPattern,s),this.checkLVal(s,{type:"VariableDeclarator"},"var"===t?5:8201),e.id=s}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){const s=2&t,i=!!(1&t),n=i&&!(4&t),r=!!(8&t);return this.initFunction(e,r),this.match(51)&&(s&&this.raise(na.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),i&&(e.id=this.parseFunctionId(n)),this.scope.enter(514),this.prodParam.enter(Yo(r,e.generator)),!i&&Ca(this.state.type)&&(this.expressionScope.enter(Xo()),e.id=this.parseFunctionId(),this.expressionScope.exit()),this.parseFunctionParams(e,!1),this.parseFunctionBodyAndFinish(e,i?"FunctionDeclaration":"FunctionExpression"),this.prodParam.exit(),this.scope.exit(),i&&!s&&this.registerFunctionStatementId(e),e}parseFunctionId(e){return e||Ca(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(6),this.expressionScope.enter(new zo(3)),e.params=this.parseBindingList(7,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.start)}parseClass(e,t,s){this.next();const i=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,s),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,i),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"Identifier"===e.type&&"constructor"===e.name||"StringLiteral"===e.type&&"constructor"===e.value}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,t){this.classScope.enter();const s={hadConstructor:!1,hadSuperClass:e};let i=[];const n=this.startNode();for(n.body=[],this.expect(2);!this.match(4);){if(this.eat(9)){if(i.length>0)throw this.raise(na.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(22)){i.push(this.parseDecorator());continue}const e=this.startNode();i.length&&(e.decorators=i,this.resetStartLocationFromNode(e,i[0]),i=[]),this.parseClassMember(n,e,s)}if(this.state.strict=t,this.next(),i.length)throw this.raise(na.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(n,"ClassBody")}parseClassMemberFromModifier(e,t){const s=this.parseIdentifier(!0);if(this.isClassMethod()){const i=t;return i.kind="method",i.computed=!1,i.key=s,i.static=!1,this.pushClassMethod(e,i,!1,!1,!1,!1),!0}if(this.isClassProperty()){const i=t;return i.computed=!1,i.key=s,i.static=!1,e.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(e,t,s){const i=this.isContextual(102);if(i){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(2))return void this.parseClassStaticBlock(e,t)}this.parseClassMemberWithIsStatic(e,t,s,i)}parseClassMemberWithIsStatic(e,t,s,i){const n=t,r=t,a=t,o=t,c=t,h=n,l=n;if(t.static=i,this.parsePropertyNamePrefixOperator(t),this.eat(51)){h.kind="method";const t=this.match(134);return this.parseClassElementName(h),this.parsePostMemberNameModifiers(h),t?void this.pushClassPrivateMethod(e,r,!0,!1):(this.isNonstaticConstructor(n)&&this.raise(na.ConstructorIsGenerator,n.key),void this.pushClassMethod(e,n,!0,!1,!1,!1))}const p=!this.state.containsEsc&&Ca(this.state.type),u=this.parseClassElementName(t),d=p?u.name:null,f=this.isPrivateName(u),m=this.state.startLoc;if(this.parsePostMemberNameModifiers(l),this.isClassMethod()){if(h.kind="method",f)return void this.pushClassPrivateMethod(e,r,!1,!1);const i=this.isNonstaticConstructor(n);let a=!1;i&&(n.kind="constructor",n.decorators&&n.decorators.length>0&&this.raise(na.DecoratorConstructor,t),s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(na.DuplicateConstructor,u),i&&this.hasPlugin("typescript")&&t.override&&this.raise(na.OverrideOnConstructor,u),s.hadConstructor=!0,a=s.hadSuperClass),this.pushClassMethod(e,n,!1,!1,i,a)}else if(this.isClassProperty())f?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a);else if("async"!==d||this.isLineTerminator())if("get"!==d&&"set"!==d||this.match(51)&&this.isLineTerminator())if("accessor"!==d||this.isLineTerminator())this.isLineTerminator()?f?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a):this.unexpected();else{this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(u);const t=this.match(134);this.parseClassElementName(a),this.pushClassAccessorProperty(e,c,t)}else{this.resetPreviousNodeTrailingComments(u),h.kind=d;const t=this.match(134);this.parseClassElementName(n),t?this.pushClassPrivateMethod(e,r,!1,!1):(this.isNonstaticConstructor(n)&&this.raise(na.ConstructorIsAccessor,n.key),this.pushClassMethod(e,n,!1,!1,!1,!1)),this.checkGetterSetterParams(n)}else{this.resetPreviousNodeTrailingComments(u);const t=this.eat(51);l.optional&&this.unexpected(m),h.kind="method";const s=this.match(134);this.parseClassElementName(h),this.parsePostMemberNameModifiers(l),s?this.pushClassPrivateMethod(e,r,t,!0):(this.isNonstaticConstructor(n)&&this.raise(na.ConstructorIsAsync,n.key),this.pushClassMethod(e,n,t,!0,!1,!1))}}parseClassElementName(e){const{type:t,value:s}=this.state;if(128!==t&&130!==t||!e.static||"prototype"!==s||this.raise(na.StaticPrototype,this.state.startLoc),134===t){"constructor"===s&&this.raise(na.ConstructorClassPrivateField,this.state.startLoc);const t=this.parsePrivateName();return e.key=t,t}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,t){this.scope.enter(720);const s=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const i=t.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,4),this.prodParam.exit(),this.scope.exit(),this.state.labels=s,e.body.push(this.finishNode(t,"StaticBlock")),t.decorators?.length&&this.raise(na.DecoratorStaticBlock,t)}pushClassProperty(e,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(na.ConstructorClassField,t.key),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){const s=this.parseClassPrivateProperty(t);e.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.start)}pushClassAccessorProperty(e,t,s){s||t.computed||!this.nameIsConstructor(t.key)||this.raise(na.ConstructorClassField,t.key);const i=this.parseClassAccessorProperty(t);e.body.push(i),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.start)}pushClassMethod(e,t,s,i,n,r){e.body.push(this.parseMethod(t,s,i,n,r,"ClassMethod",!0))}pushClassPrivateMethod(e,t,s,i){const n=this.parseMethod(t,s,i,!1,!1,"ClassPrivateMethod",!0);e.body.push(n);const r="get"===n.kind?n.static?6:2:"set"===n.kind?n.static?5:1:0;this.declareClassPrivateMethodInScope(n,r)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(592),this.expressionScope.enter(Xo()),this.prodParam.enter(0),e.value=this.eat(25)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,s,i=8331){if(Ca(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,i);else{if(!s&&t)throw this.raise(na.MissingClassName,this.state.startLoc);e.id=null}}parseClassSuper(e){this.eat(77)?(this.state.canStartArrow=!1,e.superClass=this.parseExprSubscripts()):e.superClass=null}parseExport(e,t){const s=this.parseMaybeImportPhase(e,!0),i=this.maybeParseExportDefaultSpecifier(e,s),n=!i||this.eat(8),r=n&&this.eatExportStar(e),a=r&&this.maybeParseExportNamespaceSpecifier(e),o=n&&(!a||this.eat(8)),c=i||r;if(r&&!a){if(i&&this.unexpected(),t)throw this.raise(na.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.sawUnambiguousESM=!0,this.finishNode(e,"ExportAllDeclaration")}const h=this.maybeParseExportNamedSpecifiers(e);let l;if(i&&n&&!r&&!h&&this.unexpected(null,2),a&&o&&this.unexpected(null,94),c||h){if(l=!1,t)throw this.raise(na.UnsupportedDecoratorExport,e);this.parseExportFrom(e,c)}else l=this.maybeParseExportDeclaration(e);if(c||h||l){const s=e;if(this.checkNamedExport(s,!!s.source),"ClassDeclaration"===s.declaration?.type)this.maybeTakeDecorators(t,s.declaration,s);else if(t)throw this.raise(na.UnsupportedDecoratorExport,e);return this.sawUnambiguousESM=!0,this.finishNode(s,"ExportNamedDeclaration")}if(this.eat(61)){const s=e,i=this.parseExportDefaultExpression();if(s.declaration=i,"ClassDeclaration"===i.type)this.maybeTakeDecorators(t,i,s);else if(t)throw this.raise(na.UnsupportedDecoratorExport,e);return this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")&&("Identifier"!==i.type||"from"!==i.name||i.end-i.start!==4||i.extra?.parenthesized||this.raise(na.ExportDefaultFromAsIdentifier,i)),this.sawUnambiguousESM=!0,this.finishNode(s,"ExportDefaultDeclaration")}throw this.unexpected(null,2)}eatExportStar(e){return this.eat(51)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",t?.start);const s=t||this.parseIdentifier(!0),i=this.startNodeAtNode(s);return i.exported=s,e.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(89)){e.specifiers??=[];const 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)){const t=e;t.specifiers||(t.specifiers=[]);const s="type"===t.exportKind;return t.specifiers.push(...this.parseExportSpecifiers(s)),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)}isAsyncFunction(){if(!this.isContextual(91))return!1;const e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){const 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(na.UnsupportedDefaultExport,this.state.startLoc);const t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){if(this.match(76)){return this.parseClass(this.startNode(),!0,!1)}return this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:e}=this.state;if(Ca(e)){if(91===e&&!this.state.containsEsc||96===e)return!1;if((126===e||125===e)&&!this.state.containsEsc){const e=this.nextTokenStart(),t=this.input.charCodeAt(e);if(123===t||this.chStartsBindingIdentifier(t,e)&&!this.input.startsWith("from",e))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(61))return!1;const t=this.nextTokenStart(),s=this.isUnparsedContextual(t,"from");if(44===this.input.charCodeAt(t)||Ca(this.state.type)&&s)return!0;if(this.match(61)&&s){const e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return 34===e||39===e}return!1}parseExportFrom(e,t){this.eatContextual(94)?(e.source=this.parseImportSource(),this.maybeParseImportAttributes(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:e}=this.state;return!(22!==e||(this.expectOnePlugin(["decorators","decorators-legacy"]),!this.hasPlugin("decorators")))||(this.isUsing()||this.isAwaitUsing()?(this.raise(na.UsingDeclarationExport,this.state.startLoc),!0):70===e||71===e||64===e||76===e||this.isLet()||this.isAsyncFunction())}checkNamedExport(e,t){if(e.specifiers?.length)for(const s of e.specifiers){const{exported:e}=s,i="Identifier"===e.type?e.name:e.value;if(this.checkDuplicateExports(s,i),!t&&"ExportSpecifier"===s.type){const{local:e}=s;"Identifier"!==e.type?this.raise(na.ExportBindingIsString,s,{localName:e.value,exportName:i}):(this.checkReservedWord(e.name,e.start,!0,!1),this.scope.checkLocalExport(e))}}else if(e.declaration){const t=e.declaration;if("FunctionDeclaration"===t.type||"ClassDeclaration"===t.type){const{id:s}=t;if(!s)throw new Error("Assertion failure");this.checkDuplicateExports(e,s.name)}else if("VariableDeclaration"===t.type)for(const e of t.declarations)this.checkDeclaration(e.id)}}checkDeclaration(e){if("Identifier"===e.type)this.checkDuplicateExports(e,e.name);else if("ObjectPattern"===e.type)for(const t of e.properties)this.checkDeclaration(t);else if("ArrayPattern"===e.type)for(const t of e.elements)t&&this.checkDeclaration(t);else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type?this.checkDeclaration(e.argument):"AssignmentPattern"===e.type&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&("default"===t?this.raise(na.DuplicateDefaultExport,e):this.raise(na.DuplicateExport,e,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){const t=[];let s=!0;for(this.expect(2);!this.eat(4);){if(s)s=!1;else if(this.expect(8),this.eat(4))break;const i=this.isContextual(126),n=this.match(130),r=this.startNode();r.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(r,n,e,i))}return t}parseExportSpecifier(e,t,s,i){return this.eatContextual(89)?e.exported=this.parseModuleExportName():t?e.exported=this.cloneStringLiteral(e.local):e.exported||(e.exported=this.cloneIdentifier(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(130)){const e=this.parseStringLiteral(this.state.value),t=cc.exec(e.value);return t&&this.raise(na.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}checkImportPhase(e){const{specifiers:t}=e,s=1===t.length?t[0].type:null;"source"===e.phase?"ImportDefaultSpecifier"!==s&&this.raise(na.SourcePhaseImportRequiresDefault,t[0]):"defer"===e.phase&&"ImportNamespaceSpecifier"!==s&&this.raise(na.DeferImportRequiresNamespace,t[0])}isPotentialImportPhase(e){return!e&&(this.isContextual(101)||this.isContextual(93))}applyImportPhase(e,t,s,i){t||("source"===s?(this.expectPlugin("sourcePhaseImports",i),e.phase="source"):"defer"===s?(this.expectPlugin("deferredImportEvaluation",i),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;const s=this.startNode(),i=this.parseIdentifierName(!0),{type:n}=this.state;return(Pa(n)?94!==n||102===this.lookaheadCharCode():8!==n)?(this.applyImportPhase(e,t,i,s.start),null):(this.applyImportPhase(e,t,null),this.createIdentifier(s,i))}isPrecedingIdImportPhase(e){const{type:t}=this.state;return Ca(t)?94!==t||102===this.lookaheadCharCode():8!==t}parseImport(e){return this.match(130)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];const s=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(8),i=s&&this.maybeParseStarImportSpecifier(e);return s&&!i&&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,s){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,s))}finishImportSpecifier(e,t,s=8201){return this.checkLVal(e.local,{type:t},s),this.finishNode(e,t)}parseImportAttributes(){this.expect(2);const e=[],t=new Set;do{if(this.match(4))break;const s=this.startNode(),i=this.state.value;if(t.has(i)&&this.raise(na.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:i}),t.add(i),this.match(130)?s.key=this.parseStringLiteral(i):s.key=this.parseIdentifier(!0),this.expect(10),!this.match(130))throw this.raise(na.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(8));return this.expect(4),e}maybeParseImportAttributes(e){let t;if(this.match(72)){if(this.hasPrecedingLineBreak()&&40===this.lookaheadCharCode())return;this.next(),t=this.parseImportAttributes()}else t=[];e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){const s=this.startNodeAtNode(t);return s.local=t,e.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}return!!Pa(this.state.type)&&(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0)}maybeParseStarImportSpecifier(e){if(this.match(51)){const 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(na.DestructureNamedImport,this.state.startLoc);if(this.expect(8),this.eat(4))break}const s=this.startNode(),i=this.match(130),n=this.isContextual(126);s.imported=this.parseModuleExportName();const r=this.parseImportSpecifier(s,i,"type"===e.importKind||"typeof"===e.importKind,n,void 0);e.specifiers.push(r)}}parseImportSpecifier(e,t,s,i,n){if(this.eatContextual(89))e.local=this.parseIdentifier();else{const{imported:s}=e;if(t)throw this.raise(na.ImportBindingIsString,e,{importName:s.value});this.checkReservedWord(s.name,e.start,!0,!0),e.local||(e.local=this.cloneIdentifier(s))}return this.finishImportSpecifier(e,"ImportSpecifier",n)}isThisParam(e){return"Identifier"===e.type&&"this"===e.name}}const uc=/in(?:stanceof)?|as|satisfies/y;function dc(e){if(!e)throw new Error("Assert fail")}const fc=ia`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.",DeclaratorDefiniteAssertionRequiresTypeAnnotation:"Declarations with definite assignment assertions must also have type annotations.",DeclaratorDefiniteAssertionWithInitializer:"Declarations with initializers cannot also have definite assignment assertions.",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.",DecoratorAbstractMethod:({kind:e})=>`Decorators can't be used with ${e.startsWith("a")?"an":"a"} ${e}.`,DuplicateAccessibilityModifier:({modifier:e})=>`Accessibility modifier already seen: '${e}'.`,DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyNamespaceName:"Namespace must be given a name.",EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ExportAssignmentInTSNamespace:"An export assignment cannot be used in a namespace.",ExportInTSNamespace:"Export declarations are not permitted in a namespace.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportInTSNamespace:"Import declarations in a namespace cannot reference a module.",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InlineModuleDeclarationMustUseString:"`module ... {}` declarations must have a string name. Use `namespace ... {}` instead.",InvalidHeritageClauseType:({token:e})=>`'${e}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:e=>`'${e}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:e=>`'${e}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidNamespaceName:e=>`Namespace name cannot be '${e}'.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NamespaceExportInTSNamespace:"Global module exports may only appear at top level.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterInitializer:"A parameter initializer is only allowed in a function or constructor implementation.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnexpectedTypeDeclaration:e=>`'${e}' declarations can only be declared inside a block.`,UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`,UsingDeclarationInAmbientContext:e=>`'${e}' declarations are not allowed in ambient contexts.`});function mc(e){return"private"===e||"public"===e||"protected"===e}function yc(e){return"in"===e||"out"===e}function xc(e){if(e.extra?.parenthesized)return!1;switch(e.type){case"Identifier":return!0;case"MemberExpression":return!e.computed&&xc(e.object);case"TSInstantiationExpression":return xc(e.expression);default:return!1}}const gc=Pc(["declare","private","public","protected","override","abstract","readonly","static"],["in","out"]),kc=Pc(["readonly"],["declare","abstract","private","protected","public","static","override"]),Tc=Pc(["public","private","protected","override","readonly"]),bc=Pc(["private","public","protected"]);function Sc(e){if("MemberExpression"!==e.type)return!1;const{computed:t,property:s}=e;return(!t||"StringLiteral"===s.type||!("TemplateLiteral"!==s.type||s.expressions.length>0))&&Cc(e.object)}function wc(e,t){const{type:s}=e;if(e.extra?.parenthesized)return!1;if(t){if("Literal"===s){const{value:t}=e;if("string"==typeof t||"boolean"==typeof t)return!0}}else if("StringLiteral"===s||"BooleanLiteral"===s)return!0;return!(!vc(e,t)&&!function(e,t){if("UnaryExpression"===e.type){const{operator:s,argument:i}=e;if("-"===s&&vc(i,t))return!0}return!1}(e,t))||("TemplateLiteral"===s&&0===e.expressions.length||!!Sc(e))}function vc(e,t){return t?"Literal"===e.type&&("number"==typeof e.value||"bigint"in e):"NumericLiteral"===e.type||"BigIntLiteral"===e.type}function Cc(e){return"Identifier"===e.type||"MemberExpression"===e.type&&!e.computed&&Cc(e.object)}function Pc(e,t=[]){const s=new Map;for(const t of e)s.set(t,!0);for(const e of t)s.set(e,!1);return s}const Ec=ia`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),Ac=["fsharp","hack"],Ic=["^^","@@","^","%","#"];const _c={estree:e=>class extends e{createPosition(e){return new Hr(e.line,e.column)}parse(){const e=super.parse();return 512&this.optionFlags&&(e.tokens=e.tokens.map(ra)),ra(e)}parseRegExpLiteral({pattern:e,flags:t}){let s=null;try{s=new RegExp(e,t)}catch(e){}const i=this.estreeParseLiteral(s);return i.regex={pattern:e,flags:t},i}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}const s=this.estreeParseLiteral(t);return s.bigint=null!==s.value?String(s.value):e,s}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){const s=this.startNodeAtNode(e);return s.expression=e,this.finishNodeAtNode(s,"ChainExpression",t)}directiveToStmt(e){const t=e.value;delete e.value,this.castNodeTo(t,"Literal"),t.raw=t.extra.raw,t.value=t.extra.expressionValue;const s=this.castNodeTo(e,"ExpressionStatement");return s.expression=t,s.directive=t.extra.rawValue,delete t.extra,s}fillOptionalPropertiesForTSESLint(e){}cloneEstreeStringLiteral(e){const{start:t,end:s,loc:i,range:n,raw:r,value:a}=e,o=Object.create(e.constructor.prototype);return o.type="Literal",o.start=t,o.end=s,o.loc=i,o.range=n,o.raw=r,o.value=a,o}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){null!=e&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&!e.expression.extra?.parenthesized}parseBlockBody(e,t,s,i,n){super.parseBlockBody(e,t,s,i,n);const r=e.directives.map(e=>this.directiveToStmt(e));e.body=r.concat(e.body),delete e.directives}parsePrivateName(){const e=super.parsePrivateName();return this.convertPrivateNameToPrivateIdentifier(e)}convertPrivateNameToPrivateIdentifier(e){const t=super.getPrivateNameSV(e);return delete e.id,e.name=t,this.castNodeTo(e,"PrivateIdentifier")}isPrivateName(e){return"PrivateIdentifier"===e.type}getPrivateNameSV(e){return e.name}parseLiteral(e,t){const s=super.parseLiteral(e,t);return s.raw=s.extra.raw,delete s.extra,s}parseFunctionBody(e,t,s=!1){super.parseFunctionBody(e,t,s),e.expression="BlockStatement"!==e.body.type}parseMethod(e,t,s,i,n,r,a=!1){let o=this.startNode();o.kind=e.kind,o=super.parseMethod(o,t,s,i,n,r,a),delete o.kind;const{typeParameters:c}=e;c&&(delete e.typeParameters,o.typeParameters=c,this.resetStartLocationFromNode(o,c));const h=this.castNodeTo(o,this.hasPlugin("typescript")&&!o.body?"TSEmptyBodyFunctionExpression":"FunctionExpression");return e.value=h,"ClassPrivateMethod"===r&&(e.computed=!1),this.hasPlugin("typescript")&&e.abstract?(delete e.abstract,this.finishNode(e,"TSAbstractMethodDefinition")):"ObjectMethod"===r?("method"===e.kind&&(e.kind="init"),e.shorthand=!1,this.finishNode(e,"Property")):this.finishNode(e,"MethodDefinition")}nameIsConstructor(e){return"Literal"===e.type?"constructor"===e.value:super.nameIsConstructor(e)}parseClassProperty(...e){const t=super.parseClassProperty(...e);return t.abstract&&this.hasPlugin("typescript")?(delete t.abstract,this.castNodeTo(t,"TSAbstractPropertyDefinition")):this.castNodeTo(t,"PropertyDefinition"),t}parseClassPrivateProperty(...e){const t=super.parseClassPrivateProperty(...e);return t.abstract&&this.hasPlugin("typescript")?this.castNodeTo(t,"TSAbstractPropertyDefinition"):this.castNodeTo(t,"PropertyDefinition"),t.computed=!1,t}parseClassAccessorProperty(e){const 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,s,i){const n=super.parseObjectProperty(e,t,s,i);return n&&(n.kind="init",this.castNodeTo(n,"Property")),n}finishObjectProperty(e){return e.kind="init",this.finishNode(e,"Property")}isValidLVal(e,t,s,i){return"Property"===e?"value":super.isValidLVal(e,t,s,i)}isAssignable(e,t){return null!=e&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(null!=e&&this.isObjectProperty(e)){const{key:s,value:i}=e;this.isPrivateName(s)&&this.classScope.usePrivateName(this.getPrivateNameSV(s),s.start),this.toAssignable(i,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,s){"Property"!==e.type||"get"!==e.kind&&"set"!==e.kind?"Property"===e.type&&e.method?this.raise(na.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,t,s):this.raise(na.PatternHasAccessor,e.key)}finishCallExpression(e,t){const s=super.finishCallExpression(e,t);return"Import"===s.callee.type?(this.castNodeTo(s,"ImportExpression"),s.source=s.arguments[0],s.options=s.arguments[1]??null,delete s.arguments,delete s.callee):"OptionalCallExpression"===s.type?this.castNodeTo(s,"CallExpression"):s.optional=!1,s}parseExport(e,t){const s=this.state.lastTokStartLoc,i=super.parseExport(e,t);switch(i.type){case"ExportAllDeclaration":i.exported=null;break;case"ExportNamedDeclaration":1===i.specifiers.length&&"ExportNamespaceSpecifier"===i.specifiers[0].type&&(this.castNodeTo(i,"ExportAllDeclaration"),i.exported=i.specifiers[0].exported,delete i.specifiers);case"ExportDefaultDeclaration":{const{declaration:e}=i;"ClassDeclaration"===e?.type&&e.decorators?.length>0&&e.start===i.start&&this.resetStartLocation(i,s)}}return i}stopParseSubscript(e,t){const s=super.stopParseSubscript(e,t);return t.optionalChainMember?this.estreeParseChainExpression(s,e):s}parseMember(e,t,s,i,n){const r=super.parseMember(e,t,s,i,n);return"OptionalMemberExpression"===r.type?this.castNodeTo(r,"MemberExpression"):r.optional=!1,r}isOptionalMemberExpression(e){return"ChainExpression"===e.type?"MemberExpression"===e.expression.type:super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return"ChainExpression"===e.type&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return"Property"===e.type&&"init"===e.kind&&!e.method}isObjectMethod(e){return"Property"===e.type&&(e.method||"get"===e.kind||"set"===e.kind)}castNodeTo(e,t){const s=super.castNodeTo(e,t);return this.fillOptionalPropertiesForTSESLint(s),s}cloneIdentifier(e){const t=super.cloneIdentifier(e);return this.fillOptionalPropertiesForTSESLint(t),t}cloneStringLiteral(e){return"Literal"===e.type?this.cloneEstreeStringLiteral(e):super.cloneStringLiteral(e)}finishNodeAt(e,t,s){return ra(super.finishNodeAt(e,t,s))}finishNodeAtNode(e,t,s){return ra(super.finishNodeAtNode(e,t,s))}finishNode(e,t){const s=super.finishNode(e,t);return this.fillOptionalPropertiesForTSESLint(s),s}resetStartLocation(e,t){super.resetStartLocation(e,t),ra(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),ra(e)}},jsx:e=>class extends e{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(ko.UnterminatedJsxContent,this.state.startLoc);const s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:return this.state.pos===this.state.start?void(60===s&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(138)):super.getTokenFromCode(s)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(137,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;case 62:case 125:this.raise(ko.UnexpectedToken,this.state.curPosition(),{unexpected:this.input[this.state.pos],HTMLEntity:125===s?"&rbrace;":"&gt;"});default:fo(s)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){const t=this.input.charCodeAt(this.state.pos);let s;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,s=e?"\n":"\r\n"):s=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,s}jsxReadString(e){let t="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(na.UnterminatedString,this.state.startLoc);const i=this.input.charCodeAt(this.state.pos);if(i===e)break;38===i?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadEntity(),s=this.state.pos):fo(i)?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}t+=this.input.slice(s,this.state.pos++),this.finishToken(130,t)}jsxReadEntity(){const e=++this.state.pos;if(35===this.codePointAtPos(this.state.pos)){++this.state.pos;let e=10;120===this.codePointAtPos(this.state.pos)&&(e=16,++this.state.pos);const t=this.readInt(e,void 0,!1,"bail");if(null!==t&&t<=1114111&&59===this.codePointAtPos(this.state.pos))return++this.state.pos,String.fromCodePoint(t)}else{let t=0,s=!1;for(;t++<10&&this.state.pos<this.length&&!(s=59===this.codePointAtPos(this.state.pos));)++this.state.pos;if(s){const t=this.input.slice(e,this.state.pos),s=po[t];if(++this.state.pos,s)return s}}return this.state.pos=e,"&"}jsxReadWord(){let e;const t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(Ka(e)||45===e);this.finishToken(136,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){const e=this.startNode();return this.match(136)?e.name=this.state.value:_a(this.state.type)?e.name=Da(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){const e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(10))return t;const s=this.startNodeAt(e);return s.namespace=t,s.name=this.jsxParseIdentifier(),this.finishNode(s,"JSXNamespacedName")}jsxParseElementName(){const e=this.state.startLoc;let t=this.jsxParseNamespacedName();if("JSXNamespacedName"===t.type)return t;for(;this.eat(12);){const s=this.startNodeAt(e);s.object=t,s.property=this.jsxParseIdentifier(),t=this.finishNode(s,"JSXMemberExpression")}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 2:return e=this.startNode(),this.setContext(Ba.brace),this.next(),e=this.jsxParseExpressionContainer(e,Ba.j_oTag),"JSXEmptyExpression"===e.expression.type&&this.raise(ko.AttributeIsEmpty,e),e;case 138:case 130:return this.parseExprAtom();default:throw this.raise(ko.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){const 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(Ba.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{const t=this.parseExpression();"SequenceExpression"!==t.type||t.extra?.parenthesized||this.raise(ko.UnexpectedSequenceExpression,t.expressions[1]),e.expression=t}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){if(this.match(2)){const e=this.startNode();return this.setContext(Ba.brace),this.next(),this.expect(17),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(Ba.j_oTag),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(e,"JSXSpreadAttribute")}const e=this.startNode();return e.name=this.jsxParseNamespacedName(),e.value=this.eat(25)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute")}jsxParseOpeningElementAt(e){if(this.eat(139)){const t=this.startNodeAt(e);return this.finishNode(t,"JSXOpeningFragment")}const t=this.startNodeAt(e);return t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t)}jsxParseOpeningElementAfterName(e){const t=[];for(;!this.match(52)&&!this.match(139);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(52),this.expect(139),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){if(this.eat(139)){const t=this.startNodeAt(e);return this.finishNode(t,"JSXClosingFragment")}const t=this.startNodeAt(e);return t.name=this.jsxParseElementName(),this.expect(139),this.finishNode(t,"JSXClosingElement")}jsxParseElementAt(e){const t=this.startNodeAt(e),s=[],i=this.jsxParseOpeningElementAt(e);let n=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case 138:if(e=this.state.startLoc,this.next(),this.eat(52)){this.setLoc(e),n=this.jsxParseClosingElementAt(e);break e}s.push(this.jsxParseElementAt(e));break;case 137:s.push(this.parseLiteral(this.state.value,"JSXText"));break;case 2:{const e=this.startNode();this.setContext(Ba.brace),this.next(),this.match(17)?s.push(this.jsxParseSpreadChild(e)):s.push(this.jsxParseExpressionContainer(e,Ba.j_expr));break}default:this.unexpected()}To(i)&&!To(n)&&null!==n?this.raise(ko.MissingClosingTagFragment,n):!To(i)&&To(n)?this.raise(ko.MissingClosingTagElement,n,{openingTagName:bo(i.name)}):To(i)||To(n)||bo(n.name)!==bo(i.name)&&this.raise(ko.MissingClosingTagElement,n,{openingTagName:bo(i.name)})}if(To(i)?(t.openingFragment=i,t.closingFragment=n):(t.openingElement=i,t.closingElement=n),t.children=s,this.match(43))throw this.raise(ko.UnwrappedAdjacentJSXElements,this.state.startLoc);return To(i)?this.finishNode(t,"JSXFragment"):this.finishNode(t,"JSXElement")}jsxParseElement(){const e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){const{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(138)?this.jsxParseElement():this.match(43)&&33!==this.input.charCodeAt(this.state.pos)?(this.replaceToken(138),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){const t=this.curContext();if(t!==Ba.j_expr){if(t===Ba.j_oTag||t===Ba.j_cTag){if(Ha(e))return void this.jsxReadWord();if(62===e)return++this.state.pos,void this.finishToken(139);if((34===e||39===e)&&t===Ba.j_oTag)return void this.jsxReadString(e)}if(60===e&&this.state.canStartJSXElement&&33!==this.input.charCodeAt(this.state.pos+1))return++this.state.pos,void this.finishToken(138);super.getTokenFromCode(e)}else this.jsxReadToken()}updateContext(e){const{context:t,type:s}=this.state;if(52===s&&138===e)t.splice(-2,2,Ba.j_cTag),this.state.canStartJSXElement=!1;else if(138===s)t.push(Ba.j_oTag);else if(139===s){const s=t[t.length-1];s===Ba.j_oTag&&52===e||s===Ba.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===Ba.j_expr):(this.setContext(Ba.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=ka[s]}},flow:e=>class extends e{flowPragma=void 0;getScopeHandler(){return ro}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}finishToken(e,t){130!==e&&9!==e&&24!==e&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(void 0===this.flowPragma){const t=lo.exec(e.value);if(t)if("flow"===t[1])this.flowPragma="flow";else{if("noflow"!==t[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else;}super.addComment(e)}flowParseTypeInitialiser(e){const t=this.state.inType;this.state.inType=!0,this.expect(e||10);const s=this.flowParseType();return this.state.inType=t,s}flowParsePredicate(){const e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(106),this.state.lastTokStartLoc.index>t.index+1&&this.raise(oo.UnexpectedSpaceBetweenModuloChecks,t),this.eat(6)?(e.value=super.parseExpression(),this.expect(7),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(e){const t=this.state.inType;this.state.inType=!0,this.expect(10);let s=null,i=null;return e&&this.match(50)?(this.state.inType=t,i=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=t,this.match(50)&&(i=this.flowParsePredicate())),[s,i]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();const t=e.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.match(43)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(6);const n=this.flowParseFunctionTypeParams();return s.params=n.params,s.rest=n.rest,s.this=n._this,this.expect(7),[s.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(!1),i.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){if(this.match(76))return this.flowParseDeclareClass(e);if(this.match(64))return this.flowParseDeclareFunction(e);if(this.match(70))return this.flowParseDeclareVariable(e);if(this.eatContextual(123))return this.match(12)?this.flowParseDeclareModuleExports(e):(t&&this.raise(oo.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(126))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(127))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(125))return this.flowParseDeclareInterface(e);if(this.match(78))return this.flowParseDeclareExportDeclaration(e,t);throw this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.scope.declareName(e.id.name,5,e.id.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(130)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();const t=this.startNode(),s=t.body=[];for(this.expect(2);!this.match(4);){const e=this.startNode();this.match(79)?(this.next(),this.isContextual(126)||this.match(83)||this.raise(oo.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),s.push(super.parseImport(e))):(this.expectContextual(121,oo.UnsupportedStatementInDeclareModule),s.push(this.flowParseDeclare(e,!0)))}this.scope.exit(),this.expect(4),e.body=this.finishNode(t,"BlockStatement");let i=null,n=!1;return s.forEach(e=>{!function(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}(e)?"DeclareModuleExports"===e.type&&(n&&this.raise(oo.DuplicateDeclareModuleExports,e),"ES"===i&&this.raise(oo.AmbiguousDeclareModuleKind,e),i="CommonJS",n=!0):("CommonJS"===i&&this.raise(oo.AmbiguousDeclareModuleKind,e),i="ES")}),e.kind=i||"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){const e=this.state.value;throw this.raise(oo.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:e,suggestion:ho[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)){const t=this.parseExport(e,null);return"ExportNamedDeclaration"===t.type?(t.default=!1,delete t.exportKind,this.castNodeTo(t,"DeclareExportDeclaration")):this.castNodeTo(t,"DeclareExportAllDeclaration")}throw this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(107),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();const t=this.flowParseTypeAlias(e);return this.castNodeTo(t,"DeclareTypeAlias"),t}flowParseDeclareOpaqueType(e){return this.next(),this.flowParseOpaqueType(e,!0)}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:8201,e.id.start),this.match(43)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(77))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(8));if(t){const t=[],s=[];if(this.eatContextual(113))do{s.push(this.flowParseInterfaceExtends())}while(this.eat(8));if(this.eatContextual(109))do{t.push(this.flowParseClassImplements())}while(this.eat(8));e.implements=t,e.mixins=s}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){const 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(oo.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,t,s){ao.has(e)&&this.raise(s?oo.AssignReservedType:oo.UnexpectedReservedType,t,{reservedType:e})}flowParseRestrictedIdentifierName(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifierName(e)}flowParseRestrictedIdentifier(e,t){const s=this.startNode(),i=this.flowParseRestrictedIdentifierName(e,t);return this.createIdentifier(s,i)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.start),this.match(43)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(25),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual(126),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.start),this.match(43)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(10)&&(e.supertype=this.flowParseTypeInitialiser(10)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(25)),this.semicolon(),this.finishNode(e,t?"DeclareOpaqueType":"OpaqueType")}flowParseTypeParameterBound(){if(this.match(10)||this.isContextual(77)){const e=this.startNode();return this.next(),e.typeAnnotation=this.flowParseType(),this.finishNode(e,"TypeAnnotation")}}flowParseTypeParameter(e=!1){const t=this.state.startLoc,s=this.startNode(),i=this.flowParseVariance();return s.name=this.flowParseRestrictedIdentifierName(),s.variance=i,s.bound=this.flowParseTypeParameterBound(),this.match(25)?(this.eat(25),s.default=this.flowParseType()):e&&this.raise(oo.MissingTypeParamDefault,t),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){const e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(43)||this.match(138)?this.next():this.unexpected();let s=!1;do{const e=this.flowParseTypeParameter(s);t.params.push(e),e.default&&(s=!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()===Ba.brace)return e();{const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}}flowParseTypeParameterInstantiationInExpression(){if(43===this.reScan_lt())return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){const e=this.startNode(),t=this.state.inType;return this.state.inType=!0,e.params=[],this.flowInTopLevelContext(()=>{this.expect(43);const 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()!==Ba.brace||this.reScan_lt_gt(),this.expect(44),this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(43!==this.reScan_lt())return null;const 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(){const 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,s){return e.static=t,10===this.lookahead().type?(e.id=this.parseIdentifier(!0),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(1),e.value=this.flowParseTypeInitialiser(),e.variance=s,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.parseIdentifier(!0),this.expect(1),this.expect(1),this.match(43)||this.match(6)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAtNode(e))):(e.method=!1,this.eat(13)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(43)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(6),this.match(74)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(7)||this.expect(8));!this.match(7)&&!this.match(17);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(7)||this.expect(8);return this.eat(17)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(7),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){const s=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(s),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:s,allowProto:i,allowInexact:n}){const r=this.state.inType;this.state.inType=!0;const a=this.startNode();let o,c;a.callProperties=[],a.properties=[],a.indexers=[],a.internalSlots=[];let h=!1;for(t&&this.match(3)?(this.expect(3),o=5,c=!0):(this.expect(2),o=4,c=!1),a.exact=c;!this.match(o);){let t=!1,r=null,o=null;const l=this.startNode();if(i&&this.isContextual(114)){const t=this.lookahead();10!==t.type&&13!==t.type&&(this.next(),r=this.state.startLoc,e=!1)}if(e&&this.isContextual(102)){const e=this.lookahead();10!==e.type&&13!==e.type&&(this.next(),t=!0)}const p=this.flowParseVariance();if(this.eat(0))null!=r&&this.unexpected(r),this.eat(0)?(p&&this.unexpected(p.start),a.internalSlots.push(this.flowParseObjectTypeInternalSlot(l,t))):a.indexers.push(this.flowParseObjectTypeIndexer(l,t,p));else if(this.match(6)||this.match(43))null!=r&&this.unexpected(r),p&&this.unexpected(p.start),a.callProperties.push(this.flowParseObjectTypeCallProperty(l,t));else{let e="init";if(this.isContextual(95)||this.isContextual(100)){Ea(this.lookahead().type)&&(e=this.state.value,this.next())}const i=this.flowParseObjectTypeProperty(l,t,r,p,e,s,n??!c);null===i?(h=!0,o=this.state.lastTokStartLoc):a.properties.push(i)}this.flowObjectTypeSemicolon(),!o||this.match(4)||this.match(5)||this.raise(oo.UnexpectedExplicitInexactInObject,o)}this.expect(o),s&&(a.inexact=h);const l=this.finishNode(a,"ObjectTypeAnnotation");return this.state.inType=r,l}flowParseObjectTypeProperty(e,t,s,i,n,r,a){if(this.eat(17)){return this.match(8)||this.match(9)||this.match(4)||this.match(5)?(r?a||this.raise(oo.InexactInsideExact,this.state.lastTokStartLoc):this.raise(oo.InexactInsideNonObject,this.state.lastTokStartLoc),i&&this.raise(oo.InexactVariance,i),null):(r||this.raise(oo.UnexpectedSpreadType,this.state.lastTokStartLoc),null!=s&&this.unexpected(s),i&&this.raise(oo.SpreadVariance,i),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"))}{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=s,e.kind=n;let a=!1;return this.match(43)||this.match(6)?(e.method=!0,null!=s&&this.unexpected(s),i&&this.unexpected(i.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAtNode(e)),"get"===n||"set"===n?this.flowCheckGetterSetterParams(e):t||r||"constructor"!==e.key.name||!e.value.this||this.raise(oo.ThisParamBannedInConstructor,e.value.this)):("init"!==n&&this.unexpected(),e.method=!1,this.eat(13)&&(a=!0),e.value=this.flowParseTypeInitialiser(),e.variance=i),e.optional=a,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){const t="get"===e.kind?0:1,s=e.value,i=s.params.length+(s.rest?1:0);s.this&&this.raise("get"===e.kind?oo.GetterMayNotHaveThisParam:oo.SetterMayNotHaveThisParam,s.this),i!==t&&this.raise("get"===e.kind?na.BadGetterArity:na.BadSetterArity,e),"set"===e.kind&&s.rest&&this.raise(na.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 s=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(12);){const t=this.startNodeAt(e);t.qualification=s,t.id=this.flowParseRestrictedIdentifier(!0),s=this.finishNode(t,"QualifiedTypeIdentifier")}return s}flowParseGenericType(e,t){const s=this.startNodeAt(e);return s.typeParameters=null,s.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(43)&&(s.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(s,"GenericTypeAnnotation")}flowParseTypeofType(){const e=this.startNode();return this.expect(83),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){const 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,s=null,i=!1;const n=this.startNode(),r=this.lookahead(),a=74===this.state.type;return 10===r.type||13===r.type?(a&&!e&&this.raise(oo.ThisParamMustBeFirst,n),s=this.parseIdentifier(a),this.eat(13)&&(i=!0,a&&this.raise(oo.ThisParamMayNotBeOptional,n)),t=this.flowParseTypeInitialiser()):t=this.flowParseType(),n.name=s,n.optional=i,n.typeAnnotation=t,this.finishNode(n,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){const t=this.startNodeAtNode(e);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let t=null,s=null;for(this.match(74)&&(s=this.flowParseFunctionTypeParam(!0),s.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:s}}flowIdentToTypeAnnotation(e,t,s){switch(s.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(s.name),this.flowParseGenericType(e,s)}}flowParsePrimaryType(){const e=this.state.startLoc,t=this.startNode();let s,i,n=!1;const r=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,i=this.flowParseTupleType(),this.state.noAnonFunctionType=r,i;case 43:{const e=this.startNode();return e.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(6),s=this.flowParseFunctionTypeParams(),e.params=s.params,e.rest=s.rest,e.this=s._this,this.expect(7),this.expect(15),e.returnType=this.flowParseType(),this.finishNode(e,"FunctionTypeAnnotation")}case 6:{const e=this.startNode();if(this.next(),!this.match(7)&&!this.match(17))if(Ca(this.state.type)||this.match(74)){const e=this.lookahead().type;n=13!==e&&10!==e}else n=!0;if(n){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=r,this.state.noAnonFunctionType||!(this.match(8)||this.match(7)&&15===this.lookahead().type))return this.expect(7),i;this.eat(8)}return s=i?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):this.flowParseFunctionTypeParams(),e.params=s.params,e.rest=s.rest,e.this=s._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(oo.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(_a(this.state.type)){const e=Da(this.state.type);return this.next(),super.createIdentifier(t,e)}if(Ca(this.state.type))return this.isContextual(125)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,t,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){const e=this.state.startLoc;let t=this.flowParsePrimaryType(),s=!1;for(;(this.match(0)||this.match(14))&&!this.canInsertSemicolon();){const i=this.startNodeAt(e),n=this.eat(14);s=s||n,this.expect(0),!n&&this.match(1)?(i.elementType=t,this.next(),t=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=t,i.indexType=this.flowParseType(),this.expect(1),s?(i.optional=n,t=this.finishNode(i,"OptionalIndexedAccessType")):t=this.finishNode(i,"IndexedAccessType"))}return t}flowParsePrefixType(){const e=this.startNode();return this.eat(13)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(15)){const t=this.startNodeAtNode(e);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){const e=this.startNode();this.eat(41);const t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(41);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){const e=this.startNode();this.eat(39);const t=this.flowParseIntersectionType();for(e.types=[t];this.eat(39);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){const e=this.state.inType;this.state.inType=!0;const t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(128===this.state.type&&"_"===this.state.value){const e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}return this.flowParseType()}flowParseTypeAnnotation(){const e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(){const e=this.startNode(),t=this.parseIdentifierName();return this.match(10)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.createIdentifier(e,t)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocationFromNode(e.expression,e.typeAnnotation),e.expression}flowParseVariance(){let e=null;return this.match(49)?(e=this.startNode(),"+"===this.state.value?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,t,s=!1){t?this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,s)):super.parseFunctionBody(e,!1,s)}parseFunctionBodyAndFinish(e,t,s=!1){if(this.match(10)){const s=this.startNode();"FunctionDeclaration"===t||"FunctionExpression"===t||"ArrowFunctionExpression"===t?[s.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(!0):s.typeAnnotation=this.flowParseTypeInitialiser(),e.returnType=s.typeAnnotation?this.finishNode(s,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,t,s)}parseStatementLike(e){if(this.state.strict&&this.isContextual(125)){if(Pa(this.lookahead().type)){const e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.isContextual(122)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}const t=super.parseStatementLike(e);return void 0!==this.flowPragma||this.isValidDirective(t)||(this.flowPragma=null),t}parseExpressionStatement(e,t){if("Identifier"===t.type)if("declare"===t.name){if(this.match(76)||Ca(this.state.type)||this.match(64)||this.match(70)||this.match(78))return this.flowParseDeclare(e)}else if(Ca(this.state.type)){if("interface"===t.name)return this.flowParseInterface(e);if("type"===t.name)return this.flowParseTypeAlias(e);if("opaque"===t.name)return this.flowParseOpaqueType(e,!1)}return super.parseExpressionStatement(e,t)}shouldParseExportDeclaration(){const{type:e}=this.state;return 122===e||Ia(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:e}=this.state;return 122===e||Ia(e)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(122)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,s){if(!this.match(13))return e;if(null!=s){const t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(s),e}this.expect(13);const i=this.state.clone(),n=this.state.noArrowAt,r=this.startNodeAt(t);let{consequent:a,failed:o}=this.tryParseConditionalConsequent();const c=this.getArrowLikeExpressions(a);let h=c[0];const l=c[1];if(o||l.length>0){const e=[...n];if(l.length>0){this.state=i,this.state.noArrowAt=e;for(let t=0;t<l.length;t++)e.push(l[t].start);({consequent:a,failed:o}=this.tryParseConditionalConsequent()),[h]=this.getArrowLikeExpressions(a)}o&&h.length>1&&this.raise(oo.AmbiguousConditionalArrow,i.startLoc),o&&1===h.length&&(this.state=i,e.push(h[0].start),this.state.noArrowAt=e,({consequent:a}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(a,!0),this.state.noArrowAt=n,this.expect(10),r.test=e,r.consequent=a,r.alternate=this.forwardNoArrowParamsConversionAt(r,()=>this.parseMaybeAssign()),this.finishNode(r,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const e=this.parseMaybeAssignAllowIn(),t=!this.match(10);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){const s=[e],i=[];for(;0!==s.length;){const e=s.pop();"ArrowFunctionExpression"===e.type?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):i.push(e),"BlockStatement"!==e.body.type&&s.push(e.body)):"ConditionalExpression"===e.type&&(s.push(e.consequent),s.push(e.alternate))}return t?(i.forEach(e=>this.finishArrowValidation(e)),[i,[]]):function(e,t){const s=[],i=[];for(let n=0;n<e.length;n++)(t(e[n],n,e)?s:i).push(e[n]);return[s,i]}(i,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 s;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),s=t(),this.state.noArrowParamsConversionAt.pop()):s=t(),s}parseParenItem(e,t){const s=super.parseParenItem(e,t);if(this.eat(13)&&(s.optional=!0,this.resetEndLocation(e)),this.match(10)){const e=this.startNodeAt(t);return e.expression=s,e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,"TypeCastExpression")}return s}assertModuleNodeAllowed(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(126)){e.exportKind="type";const t=this.startNode();return this.next(),this.match(2)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}if(this.isContextual(127)){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}if(this.isContextual(125)){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.isContextual(122)){e.exportKind="value";const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDeclaration(e)}eatExportStar(e){return!!super.eatExportStar(e)||!(!this.isContextual(126)||51!==this.lookahead().type)&&(e.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(e){const{startLoc:t}=this.state,s=super.maybeParseExportNamespaceSpecifier(e);return s&&"type"===e.exportKind&&this.unexpected(t),s}parseClassId(e,t,s){t&&!s||!this.isContextual(109)?(super.parseClassId(e,t,s),this.match(43)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())):e.id=null}parseClassMember(e,t,s){const{startLoc:i}=this.state;if(this.isContextual(121)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,s),t.declare&&("ClassProperty"!==t.type&&"ClassPrivateProperty"!==t.type&&"PropertyDefinition"!==t.type?this.raise(oo.DeclareClassElement,i):t.value&&this.raise(oo.DeclareClassFieldInitializer,t.value))}isIterator(e){return"iterator"===e||"asyncIterator"===e}readIterator(){const e=super.readWord1(),t="@@"+e;this.isIterator(e)&&this.state.inType||this.raise(na.InvalidIdentifier,this.state.curPosition(),{identifierName:t}),this.finishToken(128,t)}getTokenFromCode(e){const t=this.input.charCodeAt(this.state.pos+1);123===e&&124===t?this.finishOp(3,2):!this.state.inType||62!==e&&60!==e?this.state.inType&&63===e?46===t?this.finishOp(14,2):this.finishOp(13,1):!function(e,t,s){return 64===e&&64===t&&Ha(s)}(e,t,this.input.charCodeAt(this.state.pos+2))?super.getTokenFromCode(e):(this.state.pos+=2,this.readIterator()):this.finishOp(62===e?44:43,1)}isAssignable(e,t){return"TypeCastExpression"===e.type?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){t||"AssignmentExpression"!==e.type||"TypeCastExpression"!==e.left.type||(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableListItem(e,t,s){const i=e[t];"TypeCastExpression"===i.type&&(e[t]=this.typeCastToParameter(i)),super.toAssignableListItem(e,t,s)}toReferencedList(e,t){for(let s=0;s<e.length;s++){const i=e[s];"TypeCastExpression"!==i?.type||i.extra?.parenthesized||!(e.length>1)&&t||this.raise(oo.TypeCastInPattern,i.typeAnnotation)}return e}parseArrayLike(e,t){const s=super.parseArrayLike(e,t);return"ArrayExpression"===s.type&&this.toReferencedList(s.elements),s}isValidLVal(e,t,s,i){return"TypeCastExpression"===e||super.isValidLVal(e,t,s,i)}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,s,i,n,r){if(t.variance&&this.unexpected(t.variance.start),delete t.variance,this.match(43)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,s,i,n,r),t.params&&n){const e=t.params;e.length>0&&this.isThisParam(e[0])&&this.raise(oo.ThisParamBannedInConstructor,t)}else if("MethodDefinition"===t.type&&n&&t.value.params){const e=t.value.params;e.length>0&&this.isThisParam(e[0])&&this.raise(oo.ThisParamBannedInConstructor,t)}}pushClassPrivateMethod(e,t,s,i){t.variance&&this.unexpected(t.variance.start),delete t.variance,this.match(43)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,s,i)}flowParseClassImplements(){const e=this.startNode();return e.id=this.flowParseRestrictedIdentifier(!0),this.match(43)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"ClassImplements")}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.match(43)||this.match(47))&&(e.superTypeArguments=this.flowParseTypeParameterInstantiationInExpression()),this.eatContextual(109)){const t=e.implements=[];do{t.push(this.flowParseClassImplements())}while(this.eat(8))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);const t=this.getObjectOrClassMethodParams(e);if(t.length>0){const s=t[0];this.isThisParam(s)&&"get"===e.kind?this.raise(oo.GetterMayNotHaveThisParam,s):this.isThisParam(s)&&this.raise(oo.SetterMayNotHaveThisParam,s)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,s,i,n,r,a){let o;e.variance&&this.unexpected(e.variance.start),delete e.variance,this.match(43)&&!r&&(o=this.flowParseTypeParameterDeclaration(),this.match(6)||this.unexpected());const c=super.parseObjPropValue(e,t,s,i,n,r,a);return o&&((c.value||c).typeParameters=o),c}parseFunctionParamType(e){return this.eat(13)&&("Identifier"!==e.type&&this.raise(oo.PatternIsOptional,e),this.isThisParam(e)&&this.raise(oo.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(10)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(oo.ThisParamAnnotationRequired,e),this.match(25)&&this.isThisParam(e)&&this.raise(oo.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,t){const s=super.parseMaybeDefault(e,t);return"AssignmentPattern"===s.type&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(oo.TypeBeforeInitializer,s.typeAnnotation),s}parseImportSpecifierLocal(e,t,s){t.local=co(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,s))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(126)){if(!e)return!0;const t=this.lookaheadCharCode();return 123===t||42===t}return!e&&this.isContextual(83)}applyImportPhase(e,t,s,i){if(super.applyImportPhase(e,t,s,i),t){if(!s&&this.match(61))return;e.exportKind="type"===s?s:"value"}else"type"===s&&this.match(51)&&this.unexpected(),e.importKind="type"===s||"typeof"===s?s:"value"}parseImportSpecifier(e,t,s,i,n){const r=e.imported;let a=null;"Identifier"===r.type&&("type"===r.name?a="type":"typeof"===r.name&&(a="typeof"));let o=!1;if(this.isContextual(89)&&!this.isLookaheadContextual("as")){const t=this.parseIdentifier(!0);null===a||Pa(this.state.type)?(e.imported=r,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=t,e.importKind=a,e.local=this.cloneIdentifier(t))}else{if(null!==a&&Pa(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=a;else{if(t)throw this.raise(na.ImportBindingIsString,e,{importName:r.value});e.imported=r,e.importKind=null}this.eatContextual(89)?e.local=this.parseIdentifier():(o=!0,e.local=this.cloneIdentifier(e.imported))}const c=co(e);return s&&c&&this.raise(oo.ImportTypeShorthandOnlyInPureImport,e),(s||c)&&this.checkReservedType(e.local.name,e.local.start,!0),!o||s||c||this.checkReservedWord(e.local.name,e.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){return 74===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(e,t){const s=e.kind;"get"!==s&&"set"!==s&&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)){const 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 s,i=null;if(this.hasPlugin("jsx")&&(this.match(138)||this.match(43))){if(i=this.state.clone(),s=this.tryParse(()=>super.parseMaybeAssign(e,t),i),!s.error)return s.node;const{context:n}=this.state,r=n[n.length-1];r!==Ba.j_oTag&&r!==Ba.j_expr||n.pop()}if(s?.error||this.match(43)){let n;i=i||this.state.clone();const r=this.tryParse(s=>{n=this.flowParseTypeParameterDeclaration();const i=this.forwardNoArrowParamsConversionAt(n,()=>{const s=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(s,n),s});i.extra?.parenthesized&&s();const r=this.maybeUnwrapTypeCastExpression(i);return"ArrowFunctionExpression"!==r.type&&s(),r.typeParameters=n,this.resetStartLocationFromNode(r,n),i},i);let a=null;if(r.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(r.node).type){if(!r.error&&!r.aborted)return r.node.async&&this.raise(oo.UnexpectedTypeParameterBeforeAsyncArrowFunction,n),r.node;a=r.node}if(s?.node)return this.state=s.failState,s.node;if(a)return this.state=r.failState,a;if(s?.thrown)throw s.error;if(r.thrown)throw r.error;throw this.raise(oo.UnexpectedTokenAfterTypeParameter,n)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(10)){const t=this.tryParse(()=>{const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const s=this.startNode();return[s.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(!0),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(15)||this.unexpected(),s});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,s,i=!0){if(!s||!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(oo.ThisParamMustBeFirst,e.params[t]);super.checkParams(e,t,s,i)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(e,t,s){if("Identifier"===e.type&&"async"===e.name&&this.state.noArrowAt.includes(t.index)){this.next();const s=this.startNodeAt(t);s.callee=e,s.arguments=super.parseCallExpressionArguments(),e=this.finishNode(s,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.match(43)){const i=this.state.clone(),n=this.tryParse(e=>this.parseAsyncArrowWithTypeParameters(t)||e(),i);if(!n.error&&!n.aborted)return n.node;const r=this.tryParse(()=>super.parseSubscripts(e,t,s),i);if(r.node&&!r.error)return r.node;if(n.node)return this.state=n.failState,n.node;if(r.node)return this.state=r.failState,r.node;throw n.error||r.error}return super.parseSubscripts(e,t,s)}parseSubscript(e,t,s,i){if(this.match(14)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,s)return i.stop=!0,e;this.next();const n=this.startNodeAt(t);return n.callee=e,n.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(6),n.arguments=this.parseCallExpressionArguments(),n.optional=!0,this.finishCallExpression(n,!0)}if(!s&&this.shouldParseTypes()&&(this.match(43)||this.match(47))){const s=this.startNodeAt(t);s.callee=e;const n=this.tryParse(()=>(s.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(6),s.arguments=super.parseCallExpressionArguments(),i.optionalChainMember&&(s.optional=!1),this.finishCallExpression(s,i.optionalChainMember)));if(n.node)return n.error&&(this.state=n.failState),n.node}return super.parseSubscript(e,t,s,i)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(43)&&(t=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){const t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){const t=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===t&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(e)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);124!==e||125!==t?super.readToken_pipe_amp(e):this.finishOp(5,2)}parseTopLevel(e,t){const s=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(oo.UnterminatedFlowComment,this.state.curPosition()),s}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(oo.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const e=this.skipFlowComment();return void(e&&(this.state.pos+=e,this.state.hasFlowComment=!0))}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){const{pos:e}=this.state;let t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;const s=this.input.charCodeAt(t+e),i=this.input.charCodeAt(t+e+1);return 58===s&&58===i?t+2:"flow-include"===this.input.slice(t+e,t+e+12)?t+12:58===s&&58!==i&&t}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(na.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,t){this.raise(oo.EnumBooleanMemberNotInitialized,e,t)}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?"symbol"===t.explicitType?oo.EnumInvalidMemberInitializerSymbolType:oo.EnumInvalidMemberInitializerPrimaryType:oo.EnumInvalidMemberInitializerUnknownType,e,t)}flowEnumErrorNumberMemberNotInitialized(e,t){this.raise(oo.EnumNumberMemberNotInitialized,e,t)}flowEnumErrorStringMemberInconsistentlyInitialized(e,t){this.raise(oo.EnumStringMemberInconsistentlyInitialized,e,t)}flowEnumMemberInit(){const e=this.state.startLoc,t=()=>this.match(8)||this.match(4);switch(this.state.type){case 131:{const e=this.parseNumericLiteral(this.state.value);if(t())return{type:"number",loc:e.start,value:e};break}case 130:{const e=this.parseStringLiteral(this.state.value);if(t())return{type:"string",loc:e.start,value:e};break}case 81:case 82:{const e=this.parseBooleanLiteral(this.match(81));if(t())return{type:"boolean",loc:e.start,value:e}}}return{type:"invalid",loc:e}}flowEnumMemberRaw(){const e=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(25)?this.flowEnumMemberInit():{type:"none",loc:e}}}flowEnumCheckExplicitTypeMismatch(e,t,s){const{explicitType:i}=t;null!==i&&i!==s&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){const s=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let n=!1;for(;!this.match(4);){if(this.eat(17)){n=!0;break}const r=this.startNode(),{id:a,init:o}=this.flowEnumMemberRaw(),c=a.name;if(""===c)continue;/^[a-z]/.test(c)&&this.raise(oo.EnumInvalidMemberName,a,{memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),s.has(c)&&this.raise(oo.EnumDuplicateMemberName,a,{memberName:c,enumName:e}),s.add(c);const h={enumName:e,explicitType:t,memberName:c};switch(r.id=a,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.loc,h,"boolean"),r.init=o.value,i.booleanMembers.push(this.finishNode(r,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.loc,h,"number"),r.init=o.value,i.numberMembers.push(this.finishNode(r,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.loc,h,"string"),r.init=o.value,i.stringMembers.push(this.finishNode(r,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.loc,h);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.loc,h);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.loc,h);break;default:i.defaultedMembers.push(this.finishNode(r,"EnumDefaultedMember"))}}this.match(4)||this.expect(8)}return{members:i,hasUnknownMembers:n}}flowEnumStringMembers(e,t,{enumName:s}){if(0===e.length)return t;if(0===t.length)return e;if(t.length>e.length){for(const t of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(t,{enumName:s});return t}for(const e of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(e,{enumName:s});return e}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(98))return null;if(!Ca(this.state.type))throw this.raise(oo.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});const{value:t}=this.state;return this.next(),"boolean"!==t&&"number"!==t&&"string"!==t&&"symbol"!==t&&this.raise(oo.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){const s=t.name,i=t.start,n=this.flowEnumParseExplicitType({enumName:s});this.expect(2);const{members:r,hasUnknownMembers:a}=this.flowEnumMembers({enumName:s,explicitType:n});switch(e.hasUnknownMembers=a,n){case"boolean":return e.explicitType=!0,e.members=r.booleanMembers,this.expect(4),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=r.numberMembers,this.expect(4),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(r.stringMembers,r.defaultedMembers,{enumName:s}),this.expect(4),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=r.defaultedMembers,this.expect(4),this.finishNode(e,"EnumSymbolBody");default:{const t=()=>(e.members=[],this.expect(4),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;const n=r.booleanMembers.length,a=r.numberMembers.length,o=r.stringMembers.length,c=r.defaultedMembers.length;if(n||a||o||c){if(n||a){if(!a&&!o&&n>=c){for(const e of r.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.start,{enumName:s,memberName:e.id.name});return e.members=r.booleanMembers,this.expect(4),this.finishNode(e,"EnumBooleanBody")}if(!n&&!o&&a>=c){for(const e of r.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.start,{enumName:s,memberName:e.id.name});return e.members=r.numberMembers,this.expect(4),this.finishNode(e,"EnumNumberBody")}return this.raise(oo.EnumInconsistentMemberValues,i,{enumName:s}),t()}return e.members=this.flowEnumStringMembers(r.stringMembers,r.defaultedMembers,{enumName:s}),this.expect(4),this.finishNode(e,"EnumStringBody")}return t()}}}flowParseEnumDeclaration(e){const 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(){const e=this.nextTokenStart();if(60===this.input.charCodeAt(e)){const t=this.input.charCodeAt(e+1);return 60!==t&&61!==t}return!1}reScan_lt_gt(){const{type:e}=this.state;43===e?(this.state.pos-=1,this.readToken_lt()):44===e&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:e}=this.state;return 47===e?(this.state.pos-=2,this.finishOp(43,1),43):e}maybeUnwrapTypeCastExpression(e){return"TypeCastExpression"===e.type?e.expression:e}},typescript:e=>class extends e{getScopeHandler(){return wo}tsIsIdentifier(){return Ca(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()&&this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(102)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(e,t,s){if(!Ca(this.state.type)&&54!==this.state.type&&71!==this.state.type)return;const i=this.state.value;if(e.has(i)){if(s&&this.match(102))return;if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers(e,t=fc.InvalidModifierOnTypeMember,s,i=!1){const n=(e,t,i,n)=>{t===i&&s[n]&&this.raise(fc.InvalidModifiersOrder,e,{orderedModifiers:[i,n]})},r=(e,t,i,n)=>{(s[i]&&t===n||s[n]&&t===i)&&this.raise(fc.IncompatibleModifiers,e,{modifiers:[i,n]})};for(;;){const{startLoc:a}=this.state,o=this.tsParseModifier(e,i,s.static);if(!o)break;mc(o)?s.accessibility?this.raise(fc.DuplicateAccessibilityModifier,a,{modifier:o}):(n(a,o,o,"override"),n(a,o,o,"static"),n(a,o,o,"readonly"),s.accessibility=o):yc(o)?(s[o]&&this.raise(fc.DuplicateModifier,a,{modifier:o}),s[o]=!0,n(a,o,"in","out")):(Object.hasOwn(s,o)?this.raise(fc.DuplicateModifier,a,{modifier:o}):(n(a,o,"static","readonly"),n(a,o,"static","override"),n(a,o,"override","readonly"),n(a,o,"abstract","override"),r(a,o,"declare","override"),r(a,o,"static","abstract")),s[o]=!0),e.get(o)||this.raise(t,a,{modifier:o})}}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){const s=[];for(;!this.tsIsListTerminator(e);)s.push(t());return s}tsParseDelimitedList(e,t,s){return function(e){if(null==e)throw new Error(`Unexpected ${e} value.`);return e}(this.tsParseDelimitedListWorker(e,t,!0,s))}tsParseDelimitedListWorker(e,t,s,i){const n=[];let r=-1;for(;!this.tsIsListTerminator(e);){r=-1;const i=t();if(null==i)return;if(n.push(i),!this.eat(8)){if(this.tsIsListTerminator(e))break;return void(s&&this.expect(8))}r=this.state.lastTokStartLoc.index}return i&&(i.value=r),n}tsParseBracketedList(e,t,s,i,n){i||(s?this.expect(0):this.expect(43));const r=this.tsParseDelimitedList(e,t,n);return s?this.expect(1):this.expect(44),r}tsParseImportType(){const e=this.startNode();return this.expect(79),this.expect(6),this.match(130)?e.source=this.parseStringLiteral(this.state.value):(this.raise(fc.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(){const e=this.startNode();this.expect(2);const 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(){const e=this.startNode(),t=[];for(this.expect(2);!this.match(4);){const e=this.state.type;Ca(e)||130===e?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(1&e&&this.match(74))if(2&e)t=this.parseIdentifier(!0);else{const e=this.startNode();this.next(),t=this.finishNode(e,"ThisExpression")}else t=this.parseIdentifier(!!(1&e));for(;this.eat(12);){const s=this.startNodeAtNode(t);s.left=t,s.right=this.parseIdentifier(!!(1&e)),t=this.finishNode(s,"TSQualifiedName")}return t}tsParseTypeReference(){const 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();const t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){const e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){const 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,Pc(["in","out"],["const","public","private","protected","readonly","declare","abstract","override"]),fc.InvalidModifierOnTypeParameter);tsParseConstModifier=this.tsParseModifiers.bind(this,Pc(["const"],["in","out"]),fc.InvalidModifierOnTypeParameterPositions);tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,Pc(["in","out","const"],["public","private","protected","readonly","declare","abstract","override"]),fc.InvalidModifierOnTypeParameter);tsParseTypeParameter(e){const 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){const t=this.startNode();this.match(43)||this.match(138)?this.next():this.unexpected();const s={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,s),0===t.params.length&&this.raise(fc.EmptyTypeParameters,t),-1!==s.value&&this.addExtra(t,"trailingComma",s.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){const s=15===e,i="returnType";t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(6),t.params=this.tsParseBindingListForSignature(),(s||this.match(e))&&(t[i]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){const e=super.parseBindingList(7,41,2);for(const t of e){const{type:e}=t;"AssignmentPattern"!==e&&"TSParameterProperty"!==e||this.raise(fc.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(),!!Ca(this.state.type)&&(this.next(),this.match(10))}tsTryParseIndexSignature(e){if(!this.match(0)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(0);const t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(1),e.parameters=[t];const s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),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(fc.ReadonlyForMethodSignature,e);const s=e;if(s.kind&&this.match(43)&&this.raise(fc.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(10,s),this.tsParseTypeMemberSemicolon(),"get"===s.kind)s.params.length>0&&(this.raise(na.BadGetterArity,this.state.curPosition()),this.isThisParam(s.params[0])&&this.raise(fc.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if("set"===s.kind){if(1!==s.params.length)this.raise(na.BadSetterArity,this.state.curPosition());else{const e=s.params[0];this.isThisParam(e)&&this.raise(fc.AccessorCannotDeclareThisParameter,this.state.curPosition()),"Identifier"===e.type&&e.optional&&this.raise(fc.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),"RestElement"===e.type&&this.raise(fc.SetAccessorCannotHaveRestParameter,this.state.curPosition())}s.returnType&&this.raise(fc.SetAccessorCannotHaveReturnType,s.returnType)}else s.kind="method";return this.finishNode(s,"TSMethodSignature")}{const s=e;t&&(s.readonly=!0);const i=this.tsTryParseTypeAnnotation();return i&&(s.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(s,"TSPropertySignature")}}tsParseTypeMember(){const e=this.startNode();if(this.match(6)||this.match(43))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(73)){const 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))}this.tsParseModifiers(kc,void 0,e);const t=this.tsTryParseIndexSignature(e);return t||(super.parsePropertyName(e),e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||!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(){const e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(2);const 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()&&(this.next(),this.match(54))))}tsParseMappedType(){const 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(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1;return e.elementTypes.forEach(e=>{const{type:s}=e;!t||"TSRestType"===s||"TSOptionalType"===s||"TSNamedTupleMember"===s&&e.optional||this.raise(fc.OptionalTypeBeforeRequired,e),t||="TSNamedTupleMember"===s&&e.optional||"TSOptionalType"===s}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){const e=this.state.startLoc,t=this.eat(17),{startLoc:s}=this.state;let i,n,r,a;const o=Pa(this.state.type)?this.lookaheadCharCode():null;if(58===o)i=!0,r=!1,n=this.parseIdentifier(!0),this.expect(10),a=this.tsParseType();else if(63===o){r=!0;const e=this.state.value,t=this.tsParseNonArrayType();58===this.lookaheadCharCode()?(i=!0,n=this.createIdentifier(this.startNodeAt(s),e),this.expect(13),this.expect(10),a=this.tsParseType()):(i=!1,a=t,this.expect(13))}else a=this.tsParseType(),r=this.eat(13),i=this.eat(10);if(i){let e;n?(e=this.startNodeAt(s),e.optional=r,e.label=n,e.elementType=a,this.eat(13)&&(e.optional=!0,this.raise(fc.TupleOptionalAfterType,this.state.lastTokStartLoc))):(e=this.startNodeAt(s),e.optional=r,this.raise(fc.InvalidTupleMemberLabel,a),e.label=a,e.elementType=this.tsParseType()),a=this.finishNode(e,"TSNamedTupleMember")}else if(r){const e=this.startNodeAt(s);e.typeAnnotation=a,a=this.finishNode(e,"TSOptionalType")}if(t){const t=this.startNodeAt(e);t.typeAnnotation=a,a=this.finishNode(t,"TSRestType")}return a}tsParseParenthesizedType(){const e=this.startNode();return this.expect(6),e.typeAnnotation=this.tsParseType(),this.expect(7),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){const s=this.startNode();return"TSConstructorType"===e&&(s.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(15,s)),this.finishNode(s,e)}tsParseLiteralTypeNode(){const 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(){const e=this.state.startLoc;let t=this.parseTemplateElement(!1);const s=[t];if(t.tail){const t=this.startNodeAt(e),i=this.startNodeAt(e);return i.expressions=[],i.quasis=s,t.literal=this.finishNode(i,"TemplateLiteral"),this.finishNode(t,"TSLiteralType")}{const i=[];for(;!t.tail;)i.push(this.tsParseType()),this.readTemplateContinuation(),s.push(t=this.parseTemplateElement(!1));const n=this.startNodeAt(e);return n.types=i,n.quasis=s,this.finishNode(n,"TSTemplateLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const 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){const e=this.startNode(),t=this.lookahead();return 131!==t.type&&132!==t.type&&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(!(2048&this.optionFlags)){const e=this.state.startLoc;this.next();const 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:{const{type:e}=this.state;if(Ca(e)||84===e||80===e){const t=84===e?"TSVoidKeyword":80===e?"TSNullKeyword":function(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}}(this.state.value);if(void 0!==t&&46!==this.lookaheadCharCode()){const e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){const{startLoc:e}=this.state;let t=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(1)){const s=this.startNodeAt(e);s.elementType=t,this.expect(1),t=this.finishNode(s,"TSArrayType")}else{const s=this.startNodeAt(e);s.objectType=t,s.indexType=this.tsParseType(),this.expect(1),t=this.finishNode(s,"TSIndexedAccessType")}return t}tsParseTypeOperator(){const e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(fc.UnexpectedReadonly,e)}}tsParseInferType(){const e=this.startNode();this.expectContextual(111);const 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)){const e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(13))return e}}tsParseTypeOperatorOrHigher(){var e;return(e=this.state.type)>=117&&e<=119&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(111)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,t,s){const i=this.startNode(),n=this.eat(s),r=[];do{r.push(t())}while(this.eat(s));return 1!==r.length||n?(i.types=r,this.finishNode(i,e)):r[0]}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)||this.match(6)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(Ca(this.state.type)||this.match(74))return this.next(),!0;if(this.match(2)){const{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();const{errors:e}=this.state,t=e.length;try{return super.parseBindingList(1,93,1),e.length===t}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(7)||this.match(17))return!0;if(this.tsSkipParameterStart()){if(this.match(10)||this.match(8)||this.match(13)||this.match(25))return!0;if(this.match(7)&&(this.next(),this.match(15)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{const t=this.startNode();this.expect(e);const s=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(74)){let e=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===e.type?(s.parameterName=e,s.asserts=!0,s.typeAnnotation=null,e=this.finishNode(s,"TSTypePredicate")):(this.resetStartLocationFromNode(e,s),e.asserts=!0),t.typeAnnotation=e,this.finishNode(t,"TSTypeAnnotation")}const n=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!n)return i?(s.parameterName=this.parseIdentifier(),s.asserts=i,s.typeAnnotation=null,t.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);const r=this.tsParseTypeAnnotation(!1);return s.parameterName=n,s.typeAnnotation=r,s.asserts=i,t.typeAnnotation=this.finishNode(s,"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(){const e=this.parseIdentifier();if(this.isContextual(112)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(105!==this.state.type)return!1;const e=this.state.containsEsc;return this.next(),!(!Ca(this.state.type)&&!this.match(74))&&(e&&this.raise(na.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(){dc(this.state.inType);const e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(77))return e;const 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(fc.ReservedTypeAssertion,this.state.startLoc);const 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){const t=this.state.startLoc,s=this.tsParseDelimitedList("HeritageClauseElement",()=>{const t=(this.state.canStartArrow=!1,super.parseExprSubscripts());xc(t)||this.raise(fc.InvalidHeritageClauseType,t.start,{token:e});const s="extends"===e?"TSInterfaceHeritage":"TSClassImplements";if("TSInstantiationExpression"===t.type)return t.type=s,t;const i=this.startNodeAtNode(t);return i.expression=t,(this.match(43)||this.match(47))&&(i.typeArguments=this.tsParseTypeArgumentsInExpression()),this.finishNode(i,s)});return s.length||this.raise(fc.EmptyHeritageClauseType,t,{token:e}),s}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(125),t.declare&&(e.declare=!0),Ca(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(fc.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(77)&&(e.extends=this.tsParseHeritageClause("extends"));const s=this.startNode();return s.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(s,"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)&&46!==this.lookaheadCharCode()){const e=this.startNode();return this.next(),this.finishNode(e,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInTopLevelContext(e){if(this.curContext()===Ba.brace)return e();{const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}}tsInType(e){const t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){const t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){const 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(){const 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(){const e=this.startNode();return this.expect(2),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(4),this.finishNode(e,"TSEnumBody")}tsParseModuleBlock(e){const t=this.startNode();return e||this.scope.enter(0),this.expect(2),super.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,4),e||this.scope.exit(),this.finishNode(t,"TSModuleBlock")}tsParseNamespaceDeclaration(e){return e.id=this.tsParseEntityName(0),"Identifier"===e.id.type&&this.checkIdentifier(e.id,1024),this.scope.enter(2048),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(!1),this.prodParam.exit(),this.scope.exit(),this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){const t=this.isContextual(108);if(t)e.kind="global",e.id=this.parseIdentifier();else{e.kind="module";const{type:t,value:s}=this.state;130===t?e.id=super.parseStringLiteral(s):Ca(t)?(this.raise(fc.InlineModuleDeclarationMustUseString,this.state.startLoc),e.id=this.tsParseEntityName(0)):2===t?this.raise(fc.EmptyNamespaceName,this.state.startLoc):(this.raise(fc.InvalidNamespaceName,this.state.startLoc,s),e.id=super.parseExprAtom())}return this.match(2)?(t||this.scope.enter(1024),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(t),this.prodParam.exit(),t||this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t){e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(25);const s=this.tsParseModuleReference();return"type"===e.importKind&&"TSExternalModuleReference"!==s.type&&this.raise(fc.ImportAliasHasImportType,s),e.moduleReference=s,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(115)&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){const 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){const t=this.state.clone(),s=e();return this.state=t,s}tsTryParseAndCatch(e){const t=this.tryParse(t=>e()||t());if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}tsTryParse(e){const t=this.state.clone(),s=e();if(void 0!==s&&!1!==s)return s;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;const 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")?(this.expect(71),this.tsParseEnumDeclaration(e,{const:!0,declare:!0})):(e.declare=!0,this.parseVarStatement(e,this.state.value,!0));case 103:if(this.isUsing())return this.raise(fc.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),e.declare=!0,this.parseVarStatement(e,"using",!0);break;case 92:if(this.isAwaitUsing())return this.raise(fc.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),e.declare=!0,this.next(),this.parseVarStatement(e,"await using",!0);break;case 125:{const t=this.tsParseInterfaceDeclaration(e,{declare:!0});if(t)return t}default:if(Ca(t))return this.tsParseDeclaration(e,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(e,t,s,i){switch(t){case 120:if(this.tsCheckLineTerminator(s)&&(this.match(76)||Ca(this.state.type)))return this.tsParseAbstractDeclaration(e,i);break;case 123:if(this.tsCheckLineTerminator(s))return this.tsParseAmbientExternalModuleDeclaration(e);break;case 124:if(this.tsCheckLineTerminator(s)&&Ca(this.state.type))return e.kind="namespace",this.tsParseNamespaceDeclaration(e);break;case 126:if(this.tsCheckLineTerminator(s)&&Ca(this.state.type))return this.tsParseTypeAliasDeclaration(e)}}tsCheckLineTerminator(e){return e?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(43))return;const t=this.tsTryParseAndCatch(()=>{const t=this.startNodeAt(e);return t.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(t),t.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(15),t});return t?super.parseArrowExpression(t,null,!0):void 0}tsParseTypeArgumentsInExpression(){if(43===this.reScan_lt())return this.tsParseTypeArguments()}tsParseTypeArguments(){const e=this.startNode();return e.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(43),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),0===e.params.length?this.raise(fc.EmptyTypeArguments,e):this.state.inType||this.curContext()!==Ba.brace||this.reScan_lt_gt(),this.expect(44),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return(e=this.state.type)>=120&&e<=126;var e}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseBindingElement(e,t){const s=t.length?null:this.state.startLoc,i={};this.tsParseModifiers(Tc,void 0,i);const n=i.accessibility,r=i.override,a=i.readonly;4&e||!(n||a||r)||this.raise(fc.UnexpectedParameterModifier,s||t[0]);const o=this.state.startLoc,c=this.parseMaybeDefault(o);2&e&&this.parseFunctionParamType(c);const h=this.parseMaybeDefault(o,c);if(n||a||r){const e=s?this.startNodeAt(s):this.startNodeAtNode(t[0]);return t.length?e.decorators=t:this.setLoc(s),n&&(e.accessibility=n),a&&(e.readonly=a),r&&(e.override=r),"Identifier"!==h.type&&"AssignmentPattern"!==h.type&&this.raise(fc.UnsupportedParameterPropertyKind,s||t[0]),e.parameter=h,this.finishNode(e,"TSParameterProperty")}return t.length&&(c.decorators=t),h}isSimpleParameter(e){return"TSParameterProperty"===e.type&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(const t of e.params)"Identifier"!==t.type&&t.optional&&!this.state.isAmbientContext&&this.raise(fc.PatternIsOptional,t)}setArrowFunctionParameters(e,t,s){super.setArrowFunctionParameters(e,t,s),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,s=!1){this.match(10)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(10));const i="FunctionDeclaration"===t?"TSDeclareFunction":"ClassMethod"===t||"ClassPrivateMethod"===t?"TSDeclareMethod":void 0;if(i&&!this.match(2)&&this.isLineTerminator()){if("TSDeclareMethod"===i&&"constructor"===e.kind)for(const t of e.params)"TSParameterProperty"===t.type?this.raise(fc.UnexpectedParameterModifier,t):"AssignmentPattern"===t.type&&this.raise(fc.UnexpectedParameterInitializer,t);else for(const t of e.params)"AssignmentPattern"===t.type&&this.raise(fc.UnexpectedParameterInitializer,t);return this.finishNode(e,i)}return i&&this.state.isAmbientContext&&(this.raise(fc.DeclareFunctionHasImplementation,this.state.startLoc),"TSDeclareFunction"===i&&e.declare)?super.parseFunctionBodyAndFinish(e,i,s):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,s))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(e=>{"TSTypeCastExpression"===e?.type&&this.raise(fc.UnexpectedTypeAnnotation,e.typeAnnotation)})}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t){const s=super.parseArrayLike(e,t);return"ArrayExpression"===s.type&&this.tsCheckForInvalidTypeCasts(s.elements),s}parseSubscript(e,t,s,i){if(!this.hasPrecedingLineBreak()&&this.match(31)){this.state.canStartJSXElement=!1,this.next();const s=this.startNodeAt(t);return s.expression=e,this.finishNode(s,"TSNonNullExpression")}let n=!1;if(this.match(14)&&60===this.lookaheadCharCode()){if(s)return i.stop=!0,e;i.optionalChainMember=n=!0,this.next()}if(this.match(43)||this.match(47)){let r;const a=this.tsTryParseAndCatch(()=>{if(!s&&this.atPossibleAsyncArrow(e)){const e=this.tsTryParseGenericAsyncArrowFunction(t);if(e)return i.stop=!0,e}const a=this.tsParseTypeArgumentsInExpression();if(!a)return;if(n&&!this.match(6))return void(r=this.state.curPosition());if(Oa(this.state.type)){const s=super.parseTaggedTemplateExpression(e,t,i);return s.typeArguments=a,s}if(!s&&this.eat(6)){const s=this.startNodeAt(t);return s.callee=e,s.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(s.arguments),s.typeArguments=a,i.optionalChainMember&&(s.optional=n),this.finishCallExpression(s,i.optionalChainMember)}const o=this.state.type;if(44===o||48===o||6!==o&&89!==o&&116!==o&&Aa(o)&&!this.hasPrecedingLineBreak())return;const c=this.startNodeAt(t);return c.expression=e,c.typeArguments=a,this.finishNode(c,"TSInstantiationExpression")});if(r&&this.unexpected(r,6),a)return"TSInstantiationExpression"===a.type&&((this.match(12)||this.match(14)&&40!==this.lookaheadCharCode())&&this.raise(fc.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),this.match(12)||this.match(14)||(a.expression=super.stopParseSubscript(e,i))),a}return super.parseSubscript(e,t,s,i)}parseNewCallee(e){super.parseNewCallee(e);const{callee:t}=e;"TSInstantiationExpression"!==t.type||t.extra?.parenthesized||(e.typeArguments=t.typeArguments,e.callee=t.expression)}parseExprOp(e,t,s){let i;if(Ma(54)>s&&!this.hasPrecedingLineBreak()&&(this.isContextual(89)||(i=this.isContextual(116)))){const n=this.startNodeAt(t);n.expression=e,n.typeAnnotation=this.tsInType(()=>(this.next(),this.match(71)?(i&&this.raise(na.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType()));const r=this.finishNode(n,i?"TSSatisfiesExpression":"TSAsExpression");return this.reScan_lt_gt(),this.parseExprOp(r,t,s)}return super.parseExprOp(e,t,s)}checkReservedWord(e,t,s,i){this.state.isAmbientContext||super.checkReservedWord(e,t,s,i)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(126)){const t=this.lookaheadCharCode();return e?123===t||42===t:61!==t}return!e&&this.isContextual(83)}applyImportPhase(e,t,s,i){super.applyImportPhase(e,t,s,i),t?e.exportKind="type"===s?"type":"value":e.importKind="type"===s||"typeof"===s?s:"value"}parseImport(e){if(this.match(130))return e.importKind="value",this.scope.inTSNamespace&&this.raise(fc.ImportInTSNamespace,e),super.parseImport(e);let t;if(Ca(this.state.type)&&61===this.lookaheadCharCode()){e.importKind="value";const t=this.tsParseImportEqualsDeclaration(e);return this.scope.inTSNamespace&&"TSExternalModuleReference"===t.moduleReference.type&&this.raise(fc.ImportInTSNamespace,e),t}if(this.isContextual(126)){const s=this.parseMaybeImportPhase(e,!1);if(61===this.lookaheadCharCode())return this.scope.inTSNamespace&&this.raise(fc.ImportInTSNamespace,e),this.tsParseImportEqualsDeclaration(e,s);t=super.parseImportSpecifiersAndAfter(e,s)}else t=super.parseImport(e);return"type"===t.importKind&&t.specifiers.length>1&&"ImportDefaultSpecifier"===t.specifiers[0].type?this.raise(fc.TypeImportCannotSpecifyDefaultAndNamed,t):this.scope.inTSNamespace&&this.raise(fc.ImportInTSNamespace,t),t}parseExport(e,t){if(this.match(79)){const t=this.startNode();this.next();let s=null;this.isContextual(126)&&this.isPotentialImportPhase(!1)?s=this.parseMaybeImportPhase(t,!1):t.importKind="value";const i=this.tsParseImportEqualsDeclaration(t,s);return e.attributes=[],e.declaration=i,e.exportKind="value",e.source=null,e.specifiers=[],this.finishNode(e,"ExportNamedDeclaration")}if(this.eat(25)){const t=e;return t.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.scope.inTSNamespace&&this.raise(fc.ExportAssignmentInTSNamespace,t),this.finishNode(t,"TSExportAssignment")}if(this.eatContextual(89)){const t=e;return this.expectContextual(124),t.id=this.parseIdentifier(),this.checkIdentifier(t.id,8201),this.semicolon(),this.scope.inTSNamespace&&this.raise(fc.NamespaceExportInTSNamespace,t),this.finishNode(t,"TSNamespaceExportDeclaration")}{const s=super.parseExport(e,t);return this.scope.inTSNamespace&&("ExportNamedDeclaration"!==s.type||s.source||!s.declaration&&!this.state.isAmbientContext)&&this.raise(fc.ExportInTSNamespace,s),s}}isAbstractClass(){return this.isContextual(120)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){const e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(125)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,s=!1){const{isAmbientContext:i}=this.state,n=super.parseVarStatement(e,t,s||i);if(i&&!e.declare&&("using"===t||"await using"===t))return this.raiseOverwrite(fc.UsingDeclarationInAmbientContext,e,t),n;for(const e of n.declarations){const{id:s,init:n,definite:r}=e;r&&(n?this.raise(fc.DeclaratorDefiniteAssertionWithInitializer,s):s.typeAnnotation||this.raise(fc.DeclaratorDefiniteAssertionRequiresTypeAnnotation,s)),i&&n&&("var"===t||"let"===t||s.typeAnnotation?this.raise(fc.InitializerNotAllowedInAmbientContext,n):wc(n,this.hasPlugin("estree"))||this.raise(fc.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,n))}return n}parseStatementContent(e,t){const s=!!(2&e);if(!this.state.containsEsc)switch(this.state.type){case 71:if(this.isLookaheadContextual("enum")){const e=this.startNode();return this.next(),this.tsParseEnumDeclaration(e,{const:!0})}break;case 120:case 121:if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){const e=this.state.type,s=this.startNode();this.next();const i=121===e?this.tsTryParseDeclare(s):this.tsParseAbstractDeclaration(s,t);return i?(121===e&&(i.declare=!0),i):(s.expression=this.createIdentifier(this.startNodeAtNode(s),121===e?"declare":"abstract"),this.semicolon(!1),this.finishNode(s,"ExpressionStatement"))}break;case 122:return this.tsParseEnumDeclaration(this.startNode());case 108:if(123===this.lookaheadCharCode()){const e=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(e)}break;case 125:{const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return s||this.raise(fc.UnexpectedTypeDeclaration,e,"interface"),e;break}case 123:if(this.nextTokenIsStringLiteralOnSameLine()){const e=this.startNode();return this.next(),this.tsParseDeclaration(e,123,!1,t)}if(this.nextTokenIsIdentifierOnSameLine()){this.raise(fc.InlineModuleDeclarationMustUseString,this.state.startLoc);const e=this.startNode();return this.next(),this.tsParseDeclaration(e,124,!1,t)}break;case 124:if(this.nextTokenIsIdentifierOnSameLine()){const e=this.startNode();return this.next(),this.tsParseDeclaration(e,124,!1,t)}break;case 126:if(this.nextTokenIsIdentifierOnSameLine()){const e=this.startNode();return s||this.raise(fc.UnexpectedTypeDeclaration,e,"type"),this.next(),this.tsParseTypeAliasDeclaration(e)}}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(bc)}tsHasSomeModifiers(e,t){return t.some(t=>mc(t)?e.accessibility===t:!!e[t])}tsIsStartOfStaticBlocks(){return this.isContextual(102)&&123===this.lookaheadCharCode()}parseClassMember(e,t,s){this.tsParseModifiers(gc,fc.InvalidModifierOnTypeParameterPositions,t,!0);const i=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,["declare","private","public","protected","override","abstract","readonly","static"])&&this.raise(fc.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,s,!!t.static)};t.declare?this.tsInAmbientContext(i):i(),t.decorators&&t.decorators.length>0&&!this.hasPlugin("decorators-legacy")&&("TSAbstractMethodDefinition"===t.type||"TSDeclareMethod"===t.type?this.raise(fc.DecoratorAbstractMethod,t,{kind:"abstract method"}):("ClassProperty"===t.type&&t.abstract||"ClassProperty"===t.type&&t.declare||"TSAbstractPropertyDefinition"===t.type||"PropertyDefinition"===t.type&&t.declare)&&this.raise(fc.DecoratorAbstractMethod,t,{kind:t.declare?"declare field":"abstract field"}))}parseClassMemberWithIsStatic(e,t,s,i){const n=this.tsTryParseIndexSignature(t);if(n)return e.body.push(n),t.abstract&&this.raise(fc.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(fc.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(fc.IndexSignatureHasDeclare,t),void(t.override&&this.raise(fc.IndexSignatureHasOverride,t));!this.state.inAbstractClass&&t.abstract&&this.raise(fc.NonAbstractClassHasAbstractMethod,t),t.override&&(s.hadSuperClass||this.raise(fc.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,s,i)}parsePostMemberNameModifiers(e){this.eat(13)&&(e.optional=!0),e.readonly&&this.match(6)&&this.raise(fc.ClassMethodHasReadonly,e),e.declare&&this.match(6)&&this.raise(fc.ClassMethodHasDeclare,e)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(e,t,s){if(!this.match(13))return e;if(null!=s){const t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(s),e}this.next();const i=this.startNodeAt(t);i.test=e;const n=this.state.inConditionalConsequent;return this.state.inConditionalConsequent=!0,i.consequent=this.parseMaybeAssignAllowIn(),this.state.inConditionalConsequent=n,this.expect(10),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}parseParenItem(e,t){const s=super.parseParenItem(e,t);if(this.eat(13)&&(s.optional=!0,this.resetEndLocation(e)),this.match(10)){const s=this.startNodeAt(t);return s.expression=e,s.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(s,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(121))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));const t=this.state.startLoc,s=this.eatContextual(121);if(s&&(this.isContextual(121)||!this.shouldParseExportDeclaration()))throw this.raise(fc.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const i=Ca(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return i?(("TSInterfaceDeclaration"===i.type||"TSTypeAliasDeclaration"===i.type||s)&&(e.exportKind="type"),s&&"TSImportEqualsDeclaration"!==i.type&&(this.resetStartLocation(i,t),i.declare=!0),i):null}parseClassId(e,t,s,i){if((!t||s)&&this.isContextual(109))return void(e.id=null);super.parseClassId(e,t,s,e.declare?1024:8331);const n=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);n&&(e.typeParameters=n)}parseClassPropertyAnnotation(e){e.optional||(this.eat(31)?e.definite=!0:this.eat(13)&&(e.optional=!0));const t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t),e.definite&&(this.match(25)?this.raise(fc.DeclaratorDefiniteAssertionWithInitializer,e):t||this.raise(fc.DeclaratorDefiniteAssertionRequiresTypeAnnotation,e))}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&(!e.readonly||e.typeAnnotation)&&this.match(25)&&this.raise(fc.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(25)){const{key:t}=e;this.raise(fc.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:"Identifier"!==t.type||e.computed?`[${this.input.slice(this.offsetToSourcePos(t.start),this.offsetToSourcePos(t.end))}]`:t.name})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(fc.PrivateElementHasAbstract,e),e.accessibility&&this.raise(fc.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(fc.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,s,i,n,r){const a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&n&&this.raise(fc.ConstructorHasTypeParameters,a);const{declare:o=!1,kind:c}=t;!o||"get"!==c&&"set"!==c||this.raise(fc.DeclareAccessor,t,{kind:c}),a&&(t.typeParameters=a),super.pushClassMethod(e,t,s,i,n,r)}pushClassPrivateMethod(e,t,s,i){const n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(t.typeParameters=n),super.pushClassPrivateMethod(e,t,s,i)}declareClassPrivateMethodInScope(e,t){"TSDeclareMethod"!==e.type&&("MethodDefinition"===e.type&&null==e.value.body||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass)if("TSInstantiationExpression"===e.superClass.type){const t=e.superClass,s=t.expression;this.takeSurroundingComments(s,s.start,s.end);const i=t.typeArguments;this.takeSurroundingComments(i,i.start,i.end),e.superClass=s,e.superTypeArguments=i}else(this.match(43)||this.match(47))&&(e.superTypeArguments=this.tsParseTypeArgumentsInExpression());this.eatContextual(109)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,t,s,i,n,r,a){const o=this.tsTryParseTypeParameters(this.tsParseConstModifier);return o&&(e.typeParameters=o),super.parseObjPropValue(e,t,s,i,n,r,a)}parseFunctionParams(e,t){const s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&(e.typeParameters=s),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),"Identifier"===e.id.type&&!this.hasPrecedingLineBreak()&&this.eat(31)&&(e.definite=!0);const s=this.tsTryParseTypeAnnotation();s&&(e.id.typeAnnotation=s,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(10)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){let s,i,n,r;if(this.hasPlugin("jsx")&&(this.match(138)||this.match(43))){if(s=this.state.clone(),i=this.tryParse(()=>super.parseMaybeAssign(e,t),s),!i.error)return i.node;const{context:n}=this.state,r=n[n.length-1];r!==Ba.j_oTag&&r!==Ba.j_expr||n.pop()}if(!i?.error&&!this.match(43))return super.parseMaybeAssign(e,t);s&&s!==this.state||(s=this.state.clone());const a=this.tryParse(s=>{r=this.tsParseTypeParameters(this.tsParseConstModifier);const i=super.parseMaybeAssign(e,t);if(("ArrowFunctionExpression"!==i.type||i.extra?.parenthesized)&&s(),0!==r?.params.length&&this.resetStartLocationFromNode(i,r),i.typeParameters=r,this.hasPlugin("jsx")&&1===i.typeParameters.params.length&&!i.typeParameters.extra?.trailingComma){const e=i.typeParameters.params[0];e.constraint||this.raise(fc.SingleTypeParameterWithoutTrailingComma,256&this.optionFlags?zr(e.loc.end,1):e,{typeParameterName:e.name.name})}return i},s);if(!a.error&&!a.aborted)return r&&this.reportReservedArrowTypeParam(r),a.node;if(!i&&(dc(!this.hasPlugin("jsx")),n=this.tryParse(()=>super.parseMaybeAssign(e,t),s),!n.error))return n.node;if(i?.node)return this.state=i.failState,i.node;if(a.node)return this.state=a.failState,r&&this.reportReservedArrowTypeParam(r),a.node;if(n?.node)return this.state=n.failState,n.node;throw i?.error||a.error||n?.error}reportReservedArrowTypeParam(e){1!==e.params.length||e.params[0].constraint||e.extra?.trailingComma||!this.getPluginOption("typescript","disallowAmbiguousJSXLike")||this.raise(fc.ReservedArrowTypeParam,e)}parseMaybeUnary(e,t){return!this.hasPlugin("jsx")&&this.match(43)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(10)){const t=this.tryParse(e=>{const 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);const 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(fc.UnexpectedTypeCastInParameter,e):this.raise(fc.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,t);break;case"AssignmentExpression":t||"TSTypeCastExpression"!==e.left.type||(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,s,i){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(64!==i||!s)&&["expression",!0];default:return super.isValidLVal(e,t,s,i)}}parseBindingAtom(){return 74===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e,t){if(this.match(43)||this.match(47)){const s=this.tsParseTypeArgumentsInExpression();if(this.match(6)){const i=super.parseMaybeDecoratorArguments(e,t);return i.typeArguments=s,i}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){const s=super.parseMaybeDefault(e,t);return"AssignmentPattern"===s.type&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(fc.TypeAnnotationAfterAssign,s.typeAnnotation),s}getTokenFromCode(e){if(this.state.inType){if(62===e)return void this.finishOp(44,1);if(60===e)return void this.finishOp(43,1)}super.getTokenFromCode(e)}reScan_lt_gt(){const{type:e}=this.state;43===e?(this.state.pos-=1,this.readToken_lt()):44===e&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:e}=this.state;return 47===e?(this.state.pos-=2,this.finishOp(43,1),43):e}toAssignableListItem(e,t,s){const i=e[t];"TSTypeCastExpression"===i.type&&(e[t]=this.typeCastToParameter(i)),super.toAssignableListItem(e,t,s)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocationFromNode(e.expression,e.typeAnnotation),e.expression}shouldParseArrow(e){return this.match(10)?e.every(e=>this.isAssignable(e,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(10)?!this.state.inConditionalConsequent:super.shouldParseAsyncArrow()}parseParenAndDistinguishExpression(e){const t=this.state.inConditionalConsequent;this.state.inConditionalConsequent=!1;const s=super.parseParenAndDistinguishExpression(e);return this.state.inConditionalConsequent=t,s}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(43)||this.match(47)){const t=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());t&&(e.typeArguments=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){const t=super.getGetterSetterExpectedParamCount(e),s=this.getObjectOrClassMethodParams(e)[0];return s&&this.isThisParam(s)?t+1:t}parseCatchClauseParam(){const e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){const{isAmbientContext:t,strict:s}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return e()}finally{this.state.isAmbientContext=t,this.state.strict=s}}parseClass(e,t,s){const i=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,s)}finally{this.state.inAbstractClass=i}}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(fc.NonClassMethodPropertyHasAbstractModifier,e),this.tsParseInterfaceDeclaration(e));throw this.unexpected(null,76)}parseMethod(e,t,s,i,n,r,a){const o=super.parseMethod(e,t,s,i,n,r,a);if(o.abstract||"TSAbstractMethodDefinition"===o.type){if((this.hasPlugin("estree")?o.value:o).body){const{key:e}=o;this.raise(fc.AbstractMethodHasImplementation,o,{methodName:"Identifier"!==e.type||o.computed?`[${this.input.slice(this.offsetToSourcePos(e.start),this.offsetToSourcePos(e.end))}]`:e.name})}}return o}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,s,i){return!t&&i?(this.parseTypeOnlyExportSpecifier(e,s),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,s,i))}parseImportSpecifier(e,t,s,i,n){return!t&&i?(this.parseTypeOnlyImportSpecifier(e,s),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,s,i,s?4098:4096))}parseTypeOnlyImportSpecifier(e,t){let s=e.imported,i=!1;if(this.isContextual(89)){const t=this.parseIdentifier();if(this.isContextual(89)){const n=this.parseIdentifier();Pa(this.state.type)?(i=!0,s=t,e.local=this.parseIdentifier()):e.local=n}else Pa(this.state.type)?e.local=this.parseIdentifier():(i=!0,s=t)}else Pa(this.state.type)&&(i=!0,s=this.parseIdentifier(!0),this.isContextual(89)||this.checkReservedWord(s.name,s.start,!0,!0));i&&t&&this.raise(fc.TypeModifierIsUsedInTypeImports,e.imported),e.imported=s,e.importKind=i?"type":"value",this.checkIdentifier(e.local??=this.eatContextual(89)?this.parseIdentifier():this.cloneIdentifier(e.imported),i?4098:4096)}parseTypeOnlyExportSpecifier(e,t){const s=e.local;let i=!1;if(this.isContextual(89)){const t=this.parseIdentifier();if(this.isContextual(89)){const s=this.parseIdentifier();Pa(this.state.type)?(i=!0,e.local=t,e.exported=this.parseModuleExportName()):e.exported=s}else Pa(this.state.type)?e.exported=this.parseModuleExportName():(i=!0,e.local=t)}else Pa(this.state.type)&&(i=!0,e.local=this.parseModuleExportName());i&&t&&this.raise(fc.TypeModifierIsUsedInTypeExports,s),e.exportKind=i?"type":"value",e.exported??=this.eatContextual(89)?this.parseModuleExportName():this.cloneIdentifier(e.local)}fillOptionalPropertiesForTSESLint(e){switch(e.type){case"ImportDeclaration":return void(e.phase??=null);case"ExpressionStatement":return void(e.directive??=void 0);case"RestElement":e.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":return e.decorators??=[],e.optional??=!1,void(e.typeAnnotation??=void 0);case"TSParameterProperty":return e.accessibility??=void 0,e.decorators??=[],e.override??=!1,e.readonly??=!1,void(e.static??=!1);case"TSEmptyBodyFunctionExpression":e.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":return e.declare??=!1,e.returnType??=void 0,void(e.typeParameters??=void 0);case"Property":return void(e.optional??=!1);case"TSMethodSignature":case"TSPropertySignature":e.optional??=!1;case"TSIndexSignature":return e.accessibility??=void 0,e.readonly??=!1,void(e.static??=!1);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":return e.accessibility??=void 0,e.decorators??=[],e.override??=!1,void(e.optional??=!1);case"ClassExpression":e.id??=null;case"ClassDeclaration":return e.abstract??=!1,e.declare??=!1,e.decorators??=[],e.implements??=[],e.superTypeArguments??=void 0,void(e.typeParameters??=void 0);case"TSTypeAliasDeclaration":case"VariableDeclaration":return void(e.declare??=!1);case"VariableDeclarator":return void(e.definite??=!1);case"TSEnumDeclaration":return e.const??=!1,void(e.declare??=!1);case"TSEnumMember":return void(e.computed??=!1);case"TSImportType":return e.qualifier??=null,e.options??=null,void(e.typeArguments??=null);case"TSInterfaceDeclaration":return e.declare??=!1,void(e.extends??=[]);case"TSMappedType":return e.optional??=!1,void(e.readonly??=void 0);case"TSModuleDeclaration":return e.declare??=!1,void(e.global??="global"===e.kind);case"TSTypeParameter":return e.const??=!1,e.in??=!1,void(e.out??=!1)}}chStartsBindingIdentifierAndNotRelationalOperator(e,t){if(Ha(e)){if(uc.lastIndex=t,uc.test(this.input)){const e=this.codePointAtPos(uc.lastIndex);if(!Ka(e)&&92!==e)return!1}return!0}return 92===e}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifierAndNotRelationalOperator(t,e)}nextTokenIsStringLiteralOnSameLine(){const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return 34===t||39===t}},v8intrinsic:e=>class extends e{parseV8Intrinsic(){if(this.match(50)){const e=this.state.startLoc,t=this.startNode();if(this.next(),Ca(this.state.type)){const e=this.parseIdentifierName(),s=this.createIdentifier(t,e);if(this.castNodeTo(s,"V8IntrinsicIdentifier"),this.match(6))return s}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},placeholders:e=>class extends e{parsePlaceholder(e){if(this.match(129)){const 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 s=e;return s.expectedNode&&s.type||(s=this.finishNode(s,"Placeholder")),s.expectedNode=t,s}getTokenFromCode(e){37===e&&37===this.input.charCodeAt(this.state.pos+1)?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,s,i){void 0!==e&&super.checkReservedWord(e,t,s,i)}cloneIdentifier(e){const t=super.cloneIdentifier(e);return"Placeholder"===t.type&&(t.expectedNode=e.expectedNode),t}cloneStringLiteral(e){return"Placeholder"===e.type?this.cloneIdentifier(e):super.cloneStringLiteral(e)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,s,i){return"Placeholder"===e||super.isValidLVal(e,t,s,i)}toAssignable(e,t){e&&"Placeholder"===e.type&&"Expression"===e.expectedNode?e.expectedNode="Pattern":super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){if(super.chStartsBindingIdentifier(e,t))return!0;const s=this.nextTokenStart();return 37===this.input.charCodeAt(s)&&37===this.input.charCodeAt(s+1)}verifyBreakContinue(e,t){"Placeholder"!==e.label?.type&&super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){if("Placeholder"!==t.type||t.extra?.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(10)){const s=e;return s.label=this.finishPlaceholder(t,"Identifier"),this.next(),s.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(s,"LabeledStatement")}this.semicolon();const s=e;return s.name=t.name,this.finishPlaceholder(s,"Statement")}parseBlock(e,t,s){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,t,s)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,t,s){const i=t?"ClassDeclaration":"ClassExpression";this.next();const n=this.state.strict,r=this.parsePlaceholder("Identifier");if(r){if(!(this.match(77)||this.match(129)||this.match(2))){if(s||!t)return e.id=null,e.body=this.finishPlaceholder(r,"ClassBody"),this.finishNode(e,i);throw this.raise(Ec.ClassNameIsRequired,this.state.startLoc)}e.id=r}else this.parseClassId(e,t,s);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,n),this.finishNode(e,i)}parseExport(e,t){const s=this.parsePlaceholder("Identifier");if(!s)return super.parseExport(e,t);const i=e;if(!this.isContextual(94)&&!this.match(8))return i.specifiers=[],i.source=null,i.declaration=this.finishPlaceholder(s,"Declaration"),this.finishNode(i,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const n=this.startNode();return n.exported=s,i.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],super.parseExport(i,t)}isExportDefaultSpecifier(){if(this.match(61)){const e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(Da(129),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){return!!e.specifiers?.length||super.maybeParseExportDefaultSpecifier(e,t)}checkNamedExport(){}parseImport(e){const 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");const s=this.startNodeAtNode(t);if(s.local=t,e.specifiers.push(this.finishNode(s,"ImportDefaultSpecifier")),this.eat(8)){this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)}return 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(Ec.UnexpectedSpace,this.state.lastTokEndLoc)}}},Nc=Object.keys(_c);class Lc extends pc{constructor(e,t,s){const i=function(e){const t={sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,locations:!0,tokens:!1,createImportExpressions:!0,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};if(null==e)return t;if(null!=e.annexB&&!1!==e.annexB)throw new Error("The `annexB` option can only be set to `false`.");for(const s of Object.keys(t))null!=e[s]&&(t[s]=e[s]);if(1===t.startLine)null==e.startIndex&&t.startColumn>0?t.startIndex=t.startColumn:null==e.startColumn&&t.startIndex>0&&(t.startColumn=t.startIndex);else if(null==e.startColumn||null==e.startIndex)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if("commonjs"===t.sourceType){if(null!=e.allowAwaitOutsideFunction)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(null!=e.allowReturnOutsideFunction)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(null!=e.allowNewTargetOutsideFunction)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return t}(e);super(i,t),this.options=i,this.initializeScopes(),this.plugins=s,this.filename=i.sourceFilename,this.startIndex=i.startIndex;let n=0;i.allowAwaitOutsideFunction&&(n|=1),i.allowReturnOutsideFunction&&(n|=2),i.allowImportExportEverywhere&&(n|=8),i.allowSuperOutsideMethod&&(n|=16),i.allowUndeclaredExports&&(n|=64),i.allowNewTargetOutsideFunction&&(n|=4),i.allowYieldOutsideFunction&&(n|=32),i.ranges&&(n|=128),!0===i.locations&&(n|=256),i.tokens&&(n|=512),i.createImportExpressions&&(n|=1024),i.createParenthesizedExpressions&&(n|=2048),i.errorRecovery&&(n|=4096),i.attachComment&&(n|=8192),i.annexB&&(n|=16384),this.optionFlags=n}getScopeHandler(){return io}parse(){this.enterInitialScopes();const e=this.startNode(),t=this.startNode();this.nextToken(),e.errors=[];const s=this.parseTopLevel(e,t);return s.errors=this.state.errors,s.comments.length=this.state.commentsLen,s}}function Dc(e,t){let s=Lc;const i=new Map;if(e?.plugins){for(const t of e.plugins){let e,s;"string"==typeof t?e=t:[e,s]=t,i.has(e)||i.set(e,s||{})}!function(e){if(e.has("decorators")&&e.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");if(e.has("flow")&&e.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(e.has("placeholders")&&e.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(e.has("pipelineOperator")){const t=e.get("pipelineOperator").proposal;if(!Ac.includes(t)){const e=Ac.map(e=>`"${e}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`)}if("hack"===t){if(e.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(e.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const t=e.get("pipelineOperator").topicToken;if(!Ic.includes(t)){const e=Ic.map(e=>`"${e}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${e}.`)}}}if(e.has("moduleAttributes"))throw new Error("`moduleAttributes` has been removed in Babel 8, please migrate to import attributes instead.");if(e.has("importAssertions"))throw new 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 new Error("The 'recordAndTuple' plugin has been removed in Babel 8. Please remove it from your configuration.");if(e.has("asyncDoExpressions")&&!e.has("doExpressions")){const e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(e.has("optionalChainingAssign")&&"2023-07"!==e.get("optionalChainingAssign").version)throw new 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")&&"void"!==e.get("discardBinding").syntaxType)throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.");if(e.has("decimal"))throw new Error("The 'decimal' plugin has been removed in Babel 8. Please remove it from your configuration.");if(e.has("importReflection"))throw new Error("The 'importReflection' plugin has been removed in Babel 8. Use 'sourcePhaseImports' instead, and replace 'import module' with 'import source' in your code.")}(i),s=function(e){const t=[];for(const s of Nc)e.has(s)&&t.push(s);const s=t.join("|");let i=Mc.get(s);if(!i){i=Lc;for(const e of t)i=_c[e](i);Mc.set(s,i)}return i}(i)}return new s(e,t,i)}!function(e){const t={};for(const s of Object.keys(e))t[s]=Fa(e[s])}(va);const Mc=new Map;var Oc,Fc,Rc;!function(e){e[e.NONE=0]="NONE";e[e._abstract=1]="_abstract";e[e._accessor=2]="_accessor";e[e._as=3]="_as";e[e._assert=4]="_assert";e[e._asserts=5]="_asserts";e[e._async=6]="_async";e[e._await=7]="_await";e[e._checks=8]="_checks";e[e._constructor=9]="_constructor";e[e._declare=10]="_declare";e[e._enum=11]="_enum";e[e._exports=12]="_exports";e[e._from=13]="_from";e[e._get=14]="_get";e[e._global=15]="_global";e[e._implements=16]="_implements";e[e._infer=17]="_infer";e[e._interface=18]="_interface";e[e._is=19]="_is";e[e._keyof=20]="_keyof";e[e._mixins=21]="_mixins";e[e._module=22]="_module";e[e._namespace=23]="_namespace";e[e._of=24]="_of";e[e._opaque=25]="_opaque";e[e._out=26]="_out";e[e._override=27]="_override";e[e._private=28]="_private";e[e._protected=29]="_protected";e[e._proto=30]="_proto";e[e._public=31]="_public";e[e._readonly=32]="_readonly";e[e._require=33]="_require";e[e._satisfies=34]="_satisfies";e[e._set=35]="_set";e[e._static=36]="_static";e[e._symbol=37]="_symbol";e[e._type=38]="_type";e[e._unique=39]="_unique";e[e._using=40]="_using"}(Oc||(Oc={})),function(e){e[e.PRECEDENCE_MASK=15]="PRECEDENCE_MASK";e[e.IS_KEYWORD=16]="IS_KEYWORD";e[e.IS_ASSIGN=32]="IS_ASSIGN";e[e.IS_RIGHT_ASSOCIATIVE=64]="IS_RIGHT_ASSOCIATIVE";e[e.IS_PREFIX=128]="IS_PREFIX";e[e.IS_POSTFIX=256]="IS_POSTFIX";e[e.IS_EXPRESSION_START=512]="IS_EXPRESSION_START";e[e.num=512]="num";e[e.bigint=1536]="bigint";e[e.decimal=2560]="decimal";e[e.regexp=3584]="regexp";e[e.string=4608]="string";e[e.name=5632]="name";e[e.eof=6144]="eof";e[e.bracketL=7680]="bracketL";e[e.bracketR=8192]="bracketR";e[e.braceL=9728]="braceL";e[e.braceBarL=10752]="braceBarL";e[e.braceR=11264]="braceR";e[e.braceBarR=12288]="braceBarR";e[e.parenL=13824]="parenL";e[e.parenR=14336]="parenR";e[e.comma=15360]="comma";e[e.semi=16384]="semi";e[e.colon=17408]="colon";e[e.doubleColon=18432]="doubleColon";e[e.dot=19456]="dot";e[e.question=20480]="question";e[e.questionDot=21504]="questionDot";e[e.arrow=22528]="arrow";e[e.template=23552]="template";e[e.ellipsis=24576]="ellipsis";e[e.backQuote=25600]="backQuote";e[e.dollarBraceL=27136]="dollarBraceL";e[e.at=27648]="at";e[e.hash=29184]="hash";e[e.eq=29728]="eq";e[e.assign=30752]="assign";e[e.preIncDec=32640]="preIncDec";e[e.postIncDec=33664]="postIncDec";e[e.bang=34432]="bang";e[e.tilde=35456]="tilde";e[e.pipeline=35841]="pipeline";e[e.nullishCoalescing=36866]="nullishCoalescing";e[e.logicalOR=37890]="logicalOR";e[e.logicalAND=38915]="logicalAND";e[e.bitwiseOR=39940]="bitwiseOR";e[e.bitwiseXOR=40965]="bitwiseXOR";e[e.bitwiseAND=41990]="bitwiseAND";e[e.equality=43015]="equality";e[e.lessThan=44040]="lessThan";e[e.greaterThan=45064]="greaterThan";e[e.relationalOrEqual=46088]="relationalOrEqual";e[e.bitShiftL=47113]="bitShiftL";e[e.bitShiftR=48137]="bitShiftR";e[e.plus=49802]="plus";e[e.minus=50826]="minus";e[e.modulo=51723]="modulo";e[e.star=52235]="star";e[e.slash=53259]="slash";e[e.exponent=54348]="exponent";e[e.jsxName=55296]="jsxName";e[e.jsxText=56320]="jsxText";e[e.jsxEmptyText=57344]="jsxEmptyText";e[e.jsxTagStart=58880]="jsxTagStart";e[e.jsxTagEnd=59392]="jsxTagEnd";e[e.typeParameterStart=60928]="typeParameterStart";e[e.nonNullAssertion=61440]="nonNullAssertion";e[e._break=62480]="_break";e[e._case=63504]="_case";e[e._catch=64528]="_catch";e[e._continue=65552]="_continue";e[e._debugger=66576]="_debugger";e[e._default=67600]="_default";e[e._do=68624]="_do";e[e._else=69648]="_else";e[e._finally=70672]="_finally";e[e._for=71696]="_for";e[e._function=73232]="_function";e[e._if=73744]="_if";e[e._return=74768]="_return";e[e._switch=75792]="_switch";e[e._throw=77456]="_throw";e[e._try=77840]="_try";e[e._var=78864]="_var";e[e._let=79888]="_let";e[e._const=80912]="_const";e[e._while=81936]="_while";e[e._with=82960]="_with";e[e._new=84496]="_new";e[e._this=85520]="_this";e[e._super=86544]="_super";e[e._class=87568]="_class";e[e._extends=88080]="_extends";e[e._export=89104]="_export";e[e._import=90640]="_import";e[e._yield=91664]="_yield";e[e._null=92688]="_null";e[e._true=93712]="_true";e[e._false=94736]="_false";e[e._in=95256]="_in";e[e._instanceof=96280]="_instanceof";e[e._typeof=97936]="_typeof";e[e._void=98960]="_void";e[e._delete=99984]="_delete";e[e._async=100880]="_async";e[e._get=101904]="_get";e[e._set=102928]="_set";e[e._declare=103952]="_declare";e[e._readonly=104976]="_readonly";e[e._abstract=106e3]="_abstract";e[e._static=107024]="_static";e[e._public=107536]="_public";e[e._private=108560]="_private";e[e._protected=109584]="_protected";e[e._override=110608]="_override";e[e._as=112144]="_as";e[e._enum=113168]="_enum";e[e._type=114192]="_type";e[e._implements=115216]="_implements"}(Fc||(Fc={}));class Bc{constructor(e,t,s){this.startTokenIndex=e,this.endTokenIndex=t,this.isFunctionScope=s}}class jc{constructor(e,t,s,i,n,r,a,o,c,h,l,p,u){this.potentialArrowAt=e,this.noAnonFunctionType=t,this.inDisallowConditionalTypesContext=s,this.tokensLength=i,this.scopesLength=n,this.pos=r,this.type=a,this.contextualKeyword=o,this.start=c,this.end=h,this.isType=l,this.scopeDepth=p,this.error=u}}class Uc{constructor(){Uc.prototype.__init.call(this),Uc.prototype.__init2.call(this),Uc.prototype.__init3.call(this),Uc.prototype.__init4.call(this),Uc.prototype.__init5.call(this),Uc.prototype.__init6.call(this),Uc.prototype.__init7.call(this),Uc.prototype.__init8.call(this),Uc.prototype.__init9.call(this),Uc.prototype.__init10.call(this),Uc.prototype.__init11.call(this),Uc.prototype.__init12.call(this),Uc.prototype.__init13.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.inDisallowConditionalTypesContext=!1}__init4(){this.tokens=[]}__init5(){this.scopes=[]}__init6(){this.pos=0}__init7(){this.type=Fc.eof}__init8(){this.contextualKeyword=Oc.NONE}__init9(){this.start=0}__init10(){this.end=0}__init11(){this.isType=!1}__init12(){this.scopeDepth=0}__init13(){this.error=null}snapshot(){return new jc(this.potentialArrowAt,this.noAnonFunctionType,this.inDisallowConditionalTypesContext,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(e){this.potentialArrowAt=e.potentialArrowAt,this.noAnonFunctionType=e.noAnonFunctionType,this.inDisallowConditionalTypesContext=e.inDisallowConditionalTypesContext,this.tokens.length=e.tokensLength,this.scopes.length=e.scopesLength,this.pos=e.pos,this.type=e.type,this.contextualKeyword=e.contextualKeyword,this.start=e.start,this.end=e.end,this.isType=e.isType,this.scopeDepth=e.scopeDepth,this.error=e.error}}let qc,$c,Vc,Hc,Kc,zc;function Jc(){return zc++}function Wc(e){if("pos"in e){const t=function(e){let t=1,s=1;for(let i=0;i<e;i++)Kc.charCodeAt(i)===Rc.lineFeed?(t++,s=1):s++;return new Xc(t,s)}(e.pos);e.message+=` (${t.line}:${t.column})`,e.loc=t}return e}!function(e){e[e.backSpace=8]="backSpace";e[e.lineFeed=10]="lineFeed";e[e.tab=9]="tab";e[e.carriageReturn=13]="carriageReturn";e[e.shiftOut=14]="shiftOut";e[e.space=32]="space";e[e.exclamationMark=33]="exclamationMark";e[e.quotationMark=34]="quotationMark";e[e.numberSign=35]="numberSign";e[e.dollarSign=36]="dollarSign";e[e.percentSign=37]="percentSign";e[e.ampersand=38]="ampersand";e[e.apostrophe=39]="apostrophe";e[e.leftParenthesis=40]="leftParenthesis";e[e.rightParenthesis=41]="rightParenthesis";e[e.asterisk=42]="asterisk";e[e.plusSign=43]="plusSign";e[e.comma=44]="comma";e[e.dash=45]="dash";e[e.dot=46]="dot";e[e.slash=47]="slash";e[e.digit0=48]="digit0";e[e.digit1=49]="digit1";e[e.digit2=50]="digit2";e[e.digit3=51]="digit3";e[e.digit4=52]="digit4";e[e.digit5=53]="digit5";e[e.digit6=54]="digit6";e[e.digit7=55]="digit7";e[e.digit8=56]="digit8";e[e.digit9=57]="digit9";e[e.colon=58]="colon";e[e.semicolon=59]="semicolon";e[e.lessThan=60]="lessThan";e[e.equalsTo=61]="equalsTo";e[e.greaterThan=62]="greaterThan";e[e.questionMark=63]="questionMark";e[e.atSign=64]="atSign";e[e.uppercaseA=65]="uppercaseA";e[e.uppercaseB=66]="uppercaseB";e[e.uppercaseC=67]="uppercaseC";e[e.uppercaseD=68]="uppercaseD";e[e.uppercaseE=69]="uppercaseE";e[e.uppercaseF=70]="uppercaseF";e[e.uppercaseG=71]="uppercaseG";e[e.uppercaseH=72]="uppercaseH";e[e.uppercaseI=73]="uppercaseI";e[e.uppercaseJ=74]="uppercaseJ";e[e.uppercaseK=75]="uppercaseK";e[e.uppercaseL=76]="uppercaseL";e[e.uppercaseM=77]="uppercaseM";e[e.uppercaseN=78]="uppercaseN";e[e.uppercaseO=79]="uppercaseO";e[e.uppercaseP=80]="uppercaseP";e[e.uppercaseQ=81]="uppercaseQ";e[e.uppercaseR=82]="uppercaseR";e[e.uppercaseS=83]="uppercaseS";e[e.uppercaseT=84]="uppercaseT";e[e.uppercaseU=85]="uppercaseU";e[e.uppercaseV=86]="uppercaseV";e[e.uppercaseW=87]="uppercaseW";e[e.uppercaseX=88]="uppercaseX";e[e.uppercaseY=89]="uppercaseY";e[e.uppercaseZ=90]="uppercaseZ";e[e.leftSquareBracket=91]="leftSquareBracket";e[e.backslash=92]="backslash";e[e.rightSquareBracket=93]="rightSquareBracket";e[e.caret=94]="caret";e[e.underscore=95]="underscore";e[e.graveAccent=96]="graveAccent";e[e.lowercaseA=97]="lowercaseA";e[e.lowercaseB=98]="lowercaseB";e[e.lowercaseC=99]="lowercaseC";e[e.lowercaseD=100]="lowercaseD";e[e.lowercaseE=101]="lowercaseE";e[e.lowercaseF=102]="lowercaseF";e[e.lowercaseG=103]="lowercaseG";e[e.lowercaseH=104]="lowercaseH";e[e.lowercaseI=105]="lowercaseI";e[e.lowercaseJ=106]="lowercaseJ";e[e.lowercaseK=107]="lowercaseK";e[e.lowercaseL=108]="lowercaseL";e[e.lowercaseM=109]="lowercaseM";e[e.lowercaseN=110]="lowercaseN";e[e.lowercaseO=111]="lowercaseO";e[e.lowercaseP=112]="lowercaseP";e[e.lowercaseQ=113]="lowercaseQ";e[e.lowercaseR=114]="lowercaseR";e[e.lowercaseS=115]="lowercaseS";e[e.lowercaseT=116]="lowercaseT";e[e.lowercaseU=117]="lowercaseU";e[e.lowercaseV=118]="lowercaseV";e[e.lowercaseW=119]="lowercaseW";e[e.lowercaseX=120]="lowercaseX";e[e.lowercaseY=121]="lowercaseY";e[e.lowercaseZ=122]="lowercaseZ";e[e.leftCurlyBrace=123]="leftCurlyBrace";e[e.verticalBar=124]="verticalBar";e[e.rightCurlyBrace=125]="rightCurlyBrace";e[e.tilde=126]="tilde";e[e.nonBreakingSpace=160]="nonBreakingSpace";e[e.oghamSpaceMark=5760]="oghamSpaceMark";e[e.lineSeparator=8232]="lineSeparator";e[e.paragraphSeparator=8233]="paragraphSeparator"}(Rc||(Rc={}));class Xc{constructor(e,t){this.line=e,this.column=t}}function Gc(e,t,s,i){Kc=e,Hc=new Uc,zc=1,qc=t,$c=s,Vc=i}function Yc(e){return Hc.contextualKeyword===e}function Qc(e){const t=Mh();return t.type===Fc.name&&t.contextualKeyword===e}function Zc(e){return Hc.contextualKeyword===e&&Ih(Fc.name)}function eh(e){Zc(e)||oh()}function th(){return Nh(Fc.eof)||Nh(Fc.braceR)||sh()}function sh(){const e=Hc.tokens[Hc.tokens.length-1];for(let t=e?e.end:0;t<Hc.start;t++){const e=Kc.charCodeAt(t);if(e===Rc.lineFeed||e===Rc.carriageReturn||8232===e||8233===e)return!0}return!1}function ih(){const e=Oh();for(let t=Hc.end;t<e;t++){const e=Kc.charCodeAt(t);if(e===Rc.lineFeed||e===Rc.carriageReturn||8232===e||8233===e)return!0}return!1}function nh(){return Ih(Fc.semi)||th()}function rh(){nh()||oh('Unexpected token, expected ";"')}function ah(e){Ih(e)||oh(`Unexpected token, expected "${function(e){switch(e){case Fc.num:return"num";case Fc.bigint:return"bigint";case Fc.decimal:return"decimal";case Fc.regexp:return"regexp";case Fc.string:return"string";case Fc.name:return"name";case Fc.eof:return"eof";case Fc.bracketL:return"[";case Fc.bracketR:return"]";case Fc.braceL:return"{";case Fc.braceBarL:return"{|";case Fc.braceR:return"}";case Fc.braceBarR:return"|}";case Fc.parenL:return"(";case Fc.parenR:return")";case Fc.comma:return",";case Fc.semi:return";";case Fc.colon:return":";case Fc.doubleColon:return"::";case Fc.dot:return".";case Fc.question:return"?";case Fc.questionDot:return"?.";case Fc.arrow:return"=>";case Fc.template:return"template";case Fc.ellipsis:return"...";case Fc.backQuote:return"`";case Fc.dollarBraceL:return"${";case Fc.at:return"@";case Fc.hash:return"#";case Fc.eq:return"=";case Fc.assign:return"_=";case Fc.preIncDec:case Fc.postIncDec:return"++/--";case Fc.bang:return"!";case Fc.tilde:return"~";case Fc.pipeline:return"|>";case Fc.nullishCoalescing:return"??";case Fc.logicalOR:return"||";case Fc.logicalAND:return"&&";case Fc.bitwiseOR:return"|";case Fc.bitwiseXOR:return"^";case Fc.bitwiseAND:return"&";case Fc.equality:return"==/!=";case Fc.lessThan:return"<";case Fc.greaterThan:return">";case Fc.relationalOrEqual:return"<=/>=";case Fc.bitShiftL:return"<<";case Fc.bitShiftR:return">>/>>>";case Fc.plus:return"+";case Fc.minus:return"-";case Fc.modulo:return"%";case Fc.star:return"*";case Fc.slash:return"/";case Fc.exponent:return"**";case Fc.jsxName:return"jsxName";case Fc.jsxText:return"jsxText";case Fc.jsxEmptyText:return"jsxEmptyText";case Fc.jsxTagStart:return"jsxTagStart";case Fc.jsxTagEnd:return"jsxTagEnd";case Fc.typeParameterStart:return"typeParameterStart";case Fc.nonNullAssertion:return"nonNullAssertion";case Fc._break:return"break";case Fc._case:return"case";case Fc._catch:return"catch";case Fc._continue:return"continue";case Fc._debugger:return"debugger";case Fc._default:return"default";case Fc._do:return"do";case Fc._else:return"else";case Fc._finally:return"finally";case Fc._for:return"for";case Fc._function:return"function";case Fc._if:return"if";case Fc._return:return"return";case Fc._switch:return"switch";case Fc._throw:return"throw";case Fc._try:return"try";case Fc._var:return"var";case Fc._let:return"let";case Fc._const:return"const";case Fc._while:return"while";case Fc._with:return"with";case Fc._new:return"new";case Fc._this:return"this";case Fc._super:return"super";case Fc._class:return"class";case Fc._extends:return"extends";case Fc._export:return"export";case Fc._import:return"import";case Fc._yield:return"yield";case Fc._null:return"null";case Fc._true:return"true";case Fc._false:return"false";case Fc._in:return"in";case Fc._instanceof:return"instanceof";case Fc._typeof:return"typeof";case Fc._void:return"void";case Fc._delete:return"delete";case Fc._async:return"async";case Fc._get:return"get";case Fc._set:return"set";case Fc._declare:return"declare";case Fc._readonly:return"readonly";case Fc._abstract:return"abstract";case Fc._static:return"static";case Fc._public:return"public";case Fc._private:return"private";case Fc._protected:return"protected";case Fc._override:return"override";case Fc._as:return"as";case Fc._enum:return"enum";case Fc._type:return"type";case Fc._implements:return"implements";default:return""}}(e)}"`)}function oh(e="Unexpected token",t=Hc.start){if(Hc.error)return;const s=new SyntaxError(e);s.pos=t,Hc.error=s,Hc.pos=Kc.length,$h(Fc.eof)}const ch=[9,11,12,Rc.space,Rc.nonBreakingSpace,Rc.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],hh=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,lh=new Uint8Array(65536);for(const e of ch)lh[e]=1;function ph(e){if(e<48)return 36===e;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return 95===e;if(e<123)return!0;if(e<128)return!1;throw new Error("Should not be called with non-ASCII char code.")}const uh=new Uint8Array(65536);for(let e=0;e<128;e++)uh[e]=ph(e)?1:0;for(let e=128;e<65536;e++)uh[e]=1;for(const e of ch)uh[e]=0;uh[8232]=0,uh[8233]=0;const dh=uh.slice();for(let e=Rc.digit0;e<=Rc.digit9;e++)dh[e]=0;const fh=new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8451,8613,-1,8829,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1,-1,-1,-1,-1,-1,162,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,189,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,216,-1,-1,-1,-1,-1,-1,Oc._abstract<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,270,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,297,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,324,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,351,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,378,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,405,-1,-1,-1,-1,-1,-1,-1,-1,Oc._accessor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._as<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,459,-1,-1,-1,-1,-1,594,-1,-1,-1,-1,-1,-1,486,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,513,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,540,-1,-1,-1,-1,-1,-1,Oc._assert<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,567,-1,-1,-1,-1,-1,-1,-1,Oc._asserts<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,621,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,648,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._async<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,702,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,729,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,756,-1,-1,-1,-1,-1,-1,Oc._await<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,810,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,837,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,864,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,891,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._break<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,945,-1,-1,-1,-1,-1,-1,1107,-1,-1,-1,1242,-1,-1,1350,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,972,1026,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,999,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._case<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1053,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1080,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._catch<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1134,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1161,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1188,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1215,-1,-1,-1,-1,-1,-1,-1,Oc._checks<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1269,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1296,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1323,-1,-1,-1,-1,-1,-1,-1,1+(Fc._class<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1377,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1404,1620,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1431,-1,-1,-1,-1,-1,-1,1+(Fc._const<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1458,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1485,-1,-1,-1,-1,-1,-1,-1,-1,1512,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1539,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1566,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1593,-1,-1,-1,-1,-1,-1,-1,-1,Oc._constructor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1647,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1674,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1701,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1728,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._continue<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1782,-1,-1,-1,-1,-1,-1,-1,-1,-1,2349,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1809,1971,-1,-1,2106,-1,-1,-1,-1,-1,2241,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1836,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1863,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1890,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1917,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1944,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._debugger<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1998,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2025,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2052,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2079,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._declare<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2133,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2160,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2187,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2214,-1,-1,-1,-1,-1,-1,1+(Fc._default<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2268,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2295,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2322,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._delete<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._do<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2403,-1,2484,-1,-1,-1,-1,-1,-1,-1,-1,-1,2565,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2430,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2457,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._else<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2511,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2538,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._enum<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2592,-1,-1,-1,2727,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2619,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2646,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2673,-1,-1,-1,-1,-1,-1,1+(Fc._export<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2700,-1,-1,-1,-1,-1,-1,-1,Oc._exports<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2754,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2781,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2808,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2835,-1,-1,-1,-1,-1,-1,-1,1+(Fc._extends<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2889,-1,-1,-1,-1,-1,-1,-1,2997,-1,-1,-1,-1,-1,3159,-1,-1,3213,-1,-1,3294,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2916,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2943,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2970,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._false<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3024,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3051,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3078,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3105,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3132,-1,1+(Fc._finally<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3186,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._for<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3240,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3267,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._from<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3321,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3348,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3375,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3402,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3429,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3456,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._function<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3510,-1,-1,-1,-1,-1,-1,3564,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3537,-1,-1,-1,-1,-1,-1,Oc._get<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3591,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3618,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3645,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3672,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._global<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3726,-1,-1,-1,-1,-1,-1,3753,4077,-1,-1,-1,-1,4590,-1,-1,-1,-1,-1,-1,-1,1+(Fc._if<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3780,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3807,-1,-1,3996,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3834,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3861,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3888,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3915,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3942,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3969,-1,-1,-1,-1,-1,-1,-1,Oc._implements<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4023,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4050,-1,-1,-1,-1,-1,-1,1+(Fc._import<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._in<<1),-1,-1,-1,-1,-1,4104,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4185,4401,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4131,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4158,-1,-1,-1,-1,-1,-1,-1,-1,Oc._infer<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4212,-1,-1,-1,-1,-1,-1,-1,4239,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4266,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4293,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4320,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4347,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4374,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._instanceof<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4428,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4455,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4482,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4509,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4563,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._interface<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._is<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4644,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4671,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4698,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4725,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._keyof<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4779,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4806,-1,-1,-1,-1,-1,-1,1+(Fc._let<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4860,-1,-1,-1,-1,-1,4995,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4887,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4914,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4941,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4968,-1,-1,-1,-1,-1,-1,-1,Oc._mixins<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5022,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5049,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5076,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5103,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._module<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5157,-1,-1,-1,5373,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5427,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5184,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5211,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5238,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5265,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5292,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5319,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5346,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._namespace<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5400,-1,-1,-1,1+(Fc._new<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5454,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5481,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._null<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5535,-1,-1,-1,-1,-1,-1,-1,-1,-1,5562,-1,-1,-1,-1,5697,5751,-1,-1,-1,-1,Oc._of<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5589,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5643,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5670,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._opaque<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5724,-1,-1,-1,-1,-1,-1,Oc._out<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5778,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5805,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5832,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5859,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5886,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5913,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._override<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5967,-1,-1,6345,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5994,-1,-1,-1,-1,-1,6129,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6021,-1,-1,-1,-1,-1,6048,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6075,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6102,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._private<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6156,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6183,-1,-1,-1,-1,-1,-1,-1,-1,-1,6318,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6210,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6237,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6264,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6291,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._protected<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._proto<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6372,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6399,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6426,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6453,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._public<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6507,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6534,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6696,-1,-1,6831,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6561,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6588,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6615,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6642,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6669,-1,Oc._readonly<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6723,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6750,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6777,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6804,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._require<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6858,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6885,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6912,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._return<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6966,-1,-1,-1,7182,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7236,7371,-1,7479,-1,7614,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6993,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7020,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7047,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7074,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7101,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7128,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7155,-1,-1,-1,-1,-1,-1,-1,Oc._satisfies<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7209,-1,-1,-1,-1,-1,-1,Oc._set<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7263,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7290,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7317,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7344,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._static<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7398,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7425,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7452,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._super<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7506,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7533,-1,-1,-1,-1,-1,-1,-1,-1,-1,7560,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7587,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._switch<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7641,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7668,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7695,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7722,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._symbol<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7776,-1,-1,-1,-1,-1,-1,-1,-1,-1,7938,-1,-1,-1,-1,-1,-1,8046,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7803,-1,-1,-1,-1,-1,-1,-1,-1,7857,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7830,-1,-1,-1,-1,-1,-1,-1,1+(Fc._this<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7884,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7911,-1,-1,-1,1+(Fc._throw<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7965,-1,-1,-1,8019,-1,-1,-1,-1,-1,-1,7992,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._true<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._try<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8073,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8100,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._type<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8127,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8154,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._typeof<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8208,-1,-1,-1,-1,8343,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8235,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8262,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8289,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8316,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._unique<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8370,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8397,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8424,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,Oc._using<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8478,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8532,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8505,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._var<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8559,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8586,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._void<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8640,8748,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8667,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8694,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8721,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._while<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8775,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8802,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._with<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8856,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8883,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8910,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8937,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(Fc._yield<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);var mh,yh;function xh(e){const t=e.identifierRole;return t===mh.TopLevelDeclaration||t===mh.FunctionScopedDeclaration||t===mh.BlockScopedDeclaration||t===mh.ObjectShorthandTopLevelDeclaration||t===mh.ObjectShorthandFunctionScopedDeclaration||t===mh.ObjectShorthandBlockScopedDeclaration}function gh(e){const t=e.identifierRole;return t===mh.FunctionScopedDeclaration||t===mh.BlockScopedDeclaration||t===mh.ObjectShorthandFunctionScopedDeclaration||t===mh.ObjectShorthandBlockScopedDeclaration}function kh(e){const t=e.identifierRole;return t===mh.TopLevelDeclaration||t===mh.ObjectShorthandTopLevelDeclaration||t===mh.ImportDeclaration}function Th(e){const t=e.identifierRole;return t===mh.TopLevelDeclaration||t===mh.BlockScopedDeclaration||t===mh.ObjectShorthandTopLevelDeclaration||t===mh.ObjectShorthandBlockScopedDeclaration}function bh(e){const t=e.identifierRole;return t===mh.FunctionScopedDeclaration||t===mh.ObjectShorthandFunctionScopedDeclaration}function Sh(e){return e.identifierRole===mh.ObjectShorthandTopLevelDeclaration||e.identifierRole===mh.ObjectShorthandBlockScopedDeclaration||e.identifierRole===mh.ObjectShorthandFunctionScopedDeclaration}!function(e){e[e.Access=0]="Access";e[e.ExportAccess=1]="ExportAccess";e[e.TopLevelDeclaration=2]="TopLevelDeclaration";e[e.FunctionScopedDeclaration=3]="FunctionScopedDeclaration";e[e.BlockScopedDeclaration=4]="BlockScopedDeclaration";e[e.ObjectShorthandTopLevelDeclaration=5]="ObjectShorthandTopLevelDeclaration";e[e.ObjectShorthandFunctionScopedDeclaration=6]="ObjectShorthandFunctionScopedDeclaration";e[e.ObjectShorthandBlockScopedDeclaration=7]="ObjectShorthandBlockScopedDeclaration";e[e.ObjectShorthand=8]="ObjectShorthand";e[e.ImportDeclaration=9]="ImportDeclaration";e[e.ObjectKey=10]="ObjectKey";e[e.ImportAccess=11]="ImportAccess"}(mh||(mh={})),function(e){e[e.NoChildren=0]="NoChildren";e[e.OneChild=1]="OneChild";e[e.StaticChildren=2]="StaticChildren";e[e.KeyAfterPropSpread=3]="KeyAfterPropSpread"}(yh||(yh={}));class wh{constructor(){this.type=Hc.type,this.contextualKeyword=Hc.contextualKeyword,this.start=Hc.start,this.end=Hc.end,this.scopeDepth=Hc.scopeDepth,this.isType=Hc.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}}function vh(){Hc.tokens.push(new wh),Bh()}function Ch(){Hc.tokens.push(new wh),Hc.start=Hc.pos,function(){for(;;){if(Hc.pos>=Kc.length)return void oh("Unterminated template");const e=Kc.charCodeAt(Hc.pos);if(e===Rc.graveAccent||e===Rc.dollarSign&&Kc.charCodeAt(Hc.pos+1)===Rc.leftCurlyBrace)return Hc.pos===Hc.start&&Nh(Fc.template)?e===Rc.dollarSign?(Hc.pos+=2,void $h(Fc.dollarBraceL)):(++Hc.pos,void $h(Fc.backQuote)):void $h(Fc.template);e===Rc.backslash&&Hc.pos++,Hc.pos++}}()}function Ph(){Hc.type===Fc.assign&&--Hc.pos,function(){const e=Hc.pos;let t=!1,s=!1;for(;;){if(Hc.pos>=Kc.length)return void oh("Unterminated regular expression",e);const i=Kc.charCodeAt(Hc.pos);if(t)t=!1;else{if(i===Rc.leftSquareBracket)s=!0;else if(i===Rc.rightSquareBracket&&s)s=!1;else if(i===Rc.slash&&!s)break;t=i===Rc.backslash}++Hc.pos}++Hc.pos,function(){for(;Hc.pos<Kc.length;){const e=Kc.charCodeAt(Hc.pos);if(uh[e])Hc.pos++;else{if(e!==Rc.backslash)break;if(Hc.pos+=2,Kc.charCodeAt(Hc.pos)===Rc.leftCurlyBrace){for(;Hc.pos<Kc.length&&Kc.charCodeAt(Hc.pos)!==Rc.rightCurlyBrace;)Hc.pos++;Hc.pos++}}}}(),$h(Fc.regexp)}()}function Eh(e){for(let t=Hc.tokens.length-e;t<Hc.tokens.length;t++)Hc.tokens[t].isType=!0;const t=Hc.isType;return Hc.isType=!0,t}function Ah(e){Hc.isType=e}function Ih(e){return!!Nh(e)&&(vh(),!0)}function _h(e){const t=Hc.isType;Hc.isType=!0,Ih(e),Hc.isType=t}function Nh(e){return Hc.type===e}function Lh(){const e=Hc.snapshot();vh();const t=Hc.type;return Hc.restoreFromSnapshot(e),t}class Dh{constructor(e,t){this.type=e,this.contextualKeyword=t}}function Mh(){const e=Hc.snapshot();vh();const t=Hc.type,s=Hc.contextualKeyword;return Hc.restoreFromSnapshot(e),new Dh(t,s)}function Oh(){return Fh(Hc.pos)}function Fh(e){hh.lastIndex=e;return e+hh.exec(Kc)[0].length}function Rh(){return Kc.charCodeAt(Oh())}function Bh(){if(qh(),Hc.start=Hc.pos,Hc.pos>=Kc.length){const e=Hc.tokens;return e.length>=2&&e[e.length-1].start>=Kc.length&&e[e.length-2].start>=Kc.length&&oh("Unexpectedly reached the end of input."),void $h(Fc.eof)}!function(e){dh[e]||e===Rc.backslash||e===Rc.atSign&&Kc.charCodeAt(Hc.pos+1)===Rc.atSign?function(){let e=0,t=0,s=Hc.pos;for(;s<Kc.length&&(t=Kc.charCodeAt(s),!(t<Rc.lowercaseA||t>Rc.lowercaseZ));){const i=fh[e+(t-Rc.lowercaseA)+1];if(-1===i)break;e=i,s++}const i=fh[e];if(i>-1&&!uh[t])return Hc.pos=s,void(1&i?$h(i>>>1):$h(Fc.name,i>>>1));for(;s<Kc.length;){const e=Kc.charCodeAt(s);if(uh[e])s++;else if(e===Rc.backslash){if(s+=2,Kc.charCodeAt(s)===Rc.leftCurlyBrace){for(;s<Kc.length&&Kc.charCodeAt(s)!==Rc.rightCurlyBrace;)s++;s++}}else{if(e!==Rc.atSign||Kc.charCodeAt(s+1)!==Rc.atSign)break;s+=2}}Hc.pos=s,$h(Fc.name)}():Kh(e)}(Kc.charCodeAt(Hc.pos))}function jh(){for(;Kc.charCodeAt(Hc.pos)!==Rc.asterisk||Kc.charCodeAt(Hc.pos+1)!==Rc.slash;)if(Hc.pos++,Hc.pos>Kc.length)return void oh("Unterminated comment",Hc.pos-2);Hc.pos+=2}function Uh(e){let t=Kc.charCodeAt(Hc.pos+=e);if(Hc.pos<Kc.length)for(;t!==Rc.lineFeed&&t!==Rc.carriageReturn&&t!==Rc.lineSeparator&&t!==Rc.paragraphSeparator&&++Hc.pos<Kc.length;)t=Kc.charCodeAt(Hc.pos)}function qh(){for(;Hc.pos<Kc.length;){const e=Kc.charCodeAt(Hc.pos);switch(e){case Rc.carriageReturn:Kc.charCodeAt(Hc.pos+1)===Rc.lineFeed&&++Hc.pos;case Rc.lineFeed:case Rc.lineSeparator:case Rc.paragraphSeparator:++Hc.pos;break;case Rc.slash:switch(Kc.charCodeAt(Hc.pos+1)){case Rc.asterisk:Hc.pos+=2,jh();break;case Rc.slash:Uh(2);break;default:return}break;default:if(!lh[e])return;++Hc.pos}}}function $h(e,t=Oc.NONE){Hc.end=Hc.pos,Hc.type=e,Hc.contextualKeyword=t}function Vh(){if(Hc.isType)return void zh(Fc.greaterThan,1);const e=Kc.charCodeAt(Hc.pos+1);if(e===Rc.greaterThan){const e=Kc.charCodeAt(Hc.pos+2)===Rc.greaterThan?3:2;return Kc.charCodeAt(Hc.pos+e)===Rc.equalsTo?void zh(Fc.assign,e+1):void zh(Fc.bitShiftR,e)}e===Rc.equalsTo?zh(Fc.relationalOrEqual,2):zh(Fc.greaterThan,1)}function Hh(){Hc.type===Fc.greaterThan&&(Hc.pos-=1,Vh())}function Kh(e){switch(e){case Rc.numberSign:return++Hc.pos,void $h(Fc.hash);case Rc.dot:return void function(){const e=Kc.charCodeAt(Hc.pos+1);e>=Rc.digit0&&e<=Rc.digit9?Wh(!0):e===Rc.dot&&Kc.charCodeAt(Hc.pos+2)===Rc.dot?(Hc.pos+=3,$h(Fc.ellipsis)):(++Hc.pos,$h(Fc.dot))}();case Rc.leftParenthesis:return++Hc.pos,void $h(Fc.parenL);case Rc.rightParenthesis:return++Hc.pos,void $h(Fc.parenR);case Rc.semicolon:return++Hc.pos,void $h(Fc.semi);case Rc.comma:return++Hc.pos,void $h(Fc.comma);case Rc.leftSquareBracket:return++Hc.pos,void $h(Fc.bracketL);case Rc.rightSquareBracket:return++Hc.pos,void $h(Fc.bracketR);case Rc.leftCurlyBrace:return void(Vc&&Kc.charCodeAt(Hc.pos+1)===Rc.verticalBar?zh(Fc.braceBarL,2):(++Hc.pos,$h(Fc.braceL)));case Rc.rightCurlyBrace:return++Hc.pos,void $h(Fc.braceR);case Rc.colon:return void(Kc.charCodeAt(Hc.pos+1)===Rc.colon?zh(Fc.doubleColon,2):(++Hc.pos,$h(Fc.colon)));case Rc.questionMark:return void function(){const e=Kc.charCodeAt(Hc.pos+1),t=Kc.charCodeAt(Hc.pos+2);e!==Rc.questionMark||Vc&&Hc.isType?e!==Rc.dot||t>=Rc.digit0&&t<=Rc.digit9?(++Hc.pos,$h(Fc.question)):(Hc.pos+=2,$h(Fc.questionDot)):t===Rc.equalsTo?zh(Fc.assign,3):zh(Fc.nullishCoalescing,2)}();case Rc.atSign:return++Hc.pos,void $h(Fc.at);case Rc.graveAccent:return++Hc.pos,void $h(Fc.backQuote);case Rc.digit0:{const e=Kc.charCodeAt(Hc.pos+1);if(e===Rc.lowercaseX||e===Rc.uppercaseX||e===Rc.lowercaseO||e===Rc.uppercaseO||e===Rc.lowercaseB||e===Rc.uppercaseB)return void function(){Hc.pos+=2;for(;;){const e=Kc.charCodeAt(Hc.pos);if(!(e>=Rc.digit0&&e<=Rc.digit9||e>=Rc.lowercaseA&&e<=Rc.lowercaseF||e>=Rc.uppercaseA&&e<=Rc.uppercaseF||e===Rc.underscore))break;Hc.pos++}const e=Kc.charCodeAt(Hc.pos);e===Rc.lowercaseN?(++Hc.pos,$h(Fc.bigint)):$h(Fc.num)}()}case Rc.digit1:case Rc.digit2:case Rc.digit3:case Rc.digit4:case Rc.digit5:case Rc.digit6:case Rc.digit7:case Rc.digit8:case Rc.digit9:return void Wh(!1);case Rc.quotationMark:case Rc.apostrophe:return void function(e){for(Hc.pos++;;){if(Hc.pos>=Kc.length)return void oh("Unterminated string constant");const t=Kc.charCodeAt(Hc.pos);if(t===Rc.backslash)Hc.pos++;else if(t===e)break;Hc.pos++}Hc.pos++,$h(Fc.string)}(e);case Rc.slash:return void(Kc.charCodeAt(Hc.pos+1)===Rc.equalsTo?zh(Fc.assign,2):zh(Fc.slash,1));case Rc.percentSign:case Rc.asterisk:return void function(e){let t=e===Rc.asterisk?Fc.star:Fc.modulo,s=1,i=Kc.charCodeAt(Hc.pos+1);e===Rc.asterisk&&i===Rc.asterisk&&(s++,i=Kc.charCodeAt(Hc.pos+2),t=Fc.exponent),i===Rc.equalsTo&&Kc.charCodeAt(Hc.pos+2)!==Rc.greaterThan&&(s++,t=Fc.assign),zh(t,s)}(e);case Rc.verticalBar:case Rc.ampersand:return void function(e){const t=Kc.charCodeAt(Hc.pos+1);if(t!==e){if(e===Rc.verticalBar){if(t===Rc.greaterThan)return void zh(Fc.pipeline,2);if(t===Rc.rightCurlyBrace&&Vc)return void zh(Fc.braceBarR,2)}t!==Rc.equalsTo?zh(e===Rc.verticalBar?Fc.bitwiseOR:Fc.bitwiseAND,1):zh(Fc.assign,2)}else Kc.charCodeAt(Hc.pos+2)===Rc.equalsTo?zh(Fc.assign,3):zh(e===Rc.verticalBar?Fc.logicalOR:Fc.logicalAND,2)}(e);case Rc.caret:return void(Kc.charCodeAt(Hc.pos+1)===Rc.equalsTo?zh(Fc.assign,2):zh(Fc.bitwiseXOR,1));case Rc.plusSign:case Rc.dash:return void function(e){const t=Kc.charCodeAt(Hc.pos+1);t!==e?t===Rc.equalsTo?zh(Fc.assign,2):e===Rc.plusSign?zh(Fc.plus,1):zh(Fc.minus,1):zh(Fc.preIncDec,2)}(e);case Rc.lessThan:return void function(){const e=Kc.charCodeAt(Hc.pos+1);if(e===Rc.lessThan)return Kc.charCodeAt(Hc.pos+2)===Rc.equalsTo?void zh(Fc.assign,3):void(Hc.isType?zh(Fc.lessThan,1):zh(Fc.bitShiftL,2));e===Rc.equalsTo?zh(Fc.relationalOrEqual,2):zh(Fc.lessThan,1)}();case Rc.greaterThan:return void Vh();case Rc.equalsTo:case Rc.exclamationMark:return void function(e){const t=Kc.charCodeAt(Hc.pos+1);if(t!==Rc.equalsTo)return e===Rc.equalsTo&&t===Rc.greaterThan?(Hc.pos+=2,void $h(Fc.arrow)):void zh(e===Rc.equalsTo?Fc.eq:Fc.bang,1);zh(Fc.equality,Kc.charCodeAt(Hc.pos+2)===Rc.equalsTo?3:2)}(e);case Rc.tilde:return void zh(Fc.tilde,1)}oh(`Unexpected character '${String.fromCharCode(e)}'`,Hc.pos)}function zh(e,t){Hc.pos+=t,$h(e)}function Jh(){for(;;){const e=Kc.charCodeAt(Hc.pos);if(!(e>=Rc.digit0&&e<=Rc.digit9||e===Rc.underscore))break;Hc.pos++}}function Wh(e){let t=!1,s=!1;e||Jh();let i=Kc.charCodeAt(Hc.pos);i===Rc.dot&&(++Hc.pos,Jh(),i=Kc.charCodeAt(Hc.pos)),i!==Rc.uppercaseE&&i!==Rc.lowercaseE||(i=Kc.charCodeAt(++Hc.pos),i!==Rc.plusSign&&i!==Rc.dash||++Hc.pos,Jh(),i=Kc.charCodeAt(Hc.pos)),i===Rc.lowercaseN?(++Hc.pos,t=!0):i===Rc.lowercaseM&&(++Hc.pos,s=!0),$h(t?Fc.bigint:s?Fc.decimal:Fc.num)}function Xh(e,t=e.currentIndex()){let s=t+1;if(Gh(e,s)){const i=e.identifierNameAtIndex(t);return{isType:!1,leftName:i,rightName:i,endIndex:s}}if(s++,Gh(e,s))return{isType:!0,leftName:null,rightName:null,endIndex:s};if(s++,Gh(e,s))return{isType:!1,leftName:e.identifierNameAtIndex(t),rightName:e.identifierNameAtIndex(t+2),endIndex:s};if(s++,Gh(e,s))return{isType:!0,leftName:null,rightName:null,endIndex:s};throw new Error(`Unexpected import/export specifier at ${t}`)}function Gh(e,t){const s=e.tokens[t];return s.type===Fc.braceR||s.type===Fc.comma}var Yh=new Map([["quot",'"'],["amp","&"],["apos","'"],["lt","<"],["gt",">"],["nbsp"," "],["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","♦"]]);function Qh(e){const[t,s]=Zh(e.jsxPragma||"React.createElement"),[i,n]=Zh(e.jsxFragmentPragma||"React.Fragment");return{base:t,suffix:s,fragmentBase:i,fragmentSuffix:n}}function Zh(e){let t=e.indexOf(".");return-1===t&&(t=e.length),[e.slice(0,t),e.slice(t)]}class el{getPrefixCode(){return""}getHoistedCode(){return""}getSuffixCode(){return""}}class tl extends el{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(e,t,s,i,n){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=s,this.nameManager=i,this.options=n,tl.prototype.__init.call(this),tl.prototype.__init2.call(this),tl.prototype.__init3.call(this),tl.prototype.__init4.call(this),tl.prototype.__init5.call(this),this.jsxPragmaInfo=Qh(n),this.isAutomaticRuntime="automatic"===n.jsxRuntime,this.jsxImportSource=n.jsxImportSource||"react"}process(){return!!this.tokens.matches1(Fc.jsxTagStart)&&(this.processJSXTag(),!0)}getPrefixCode(){let e="";if(this.filenameVarName&&(e+=`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||"")};`),this.isAutomaticRuntime)if(this.importProcessor)for(const[t,s]of Object.entries(this.cjsAutomaticModuleNameResolutions))e+=`var ${s} = require("${t}");`;else{const{createElement:t,...s}=this.esmAutomaticImportNameResolutions;t&&(e+=`import {createElement as ${t}} from "${this.jsxImportSource}";`);const i=Object.entries(s).map(([e,t])=>`${e} as ${t}`).join(", ");if(i){e+=`import {${i}} from "${this.jsxImportSource+(this.options.production?"/jsx-runtime":"/jsx-dev-runtime")}";`}}return e}processJSXTag(){const{jsxRole:e,start:t}=this.tokens.currentToken(),s=this.options.production?null:this.getElementLocationCode(t);this.isAutomaticRuntime&&e!==yh.KeyAfterPropSpread?this.transformTagToJSXFunc(s,e):this.transformTagToCreateElement(s)}getElementLocationCode(e){return`lineNumber: ${this.getLineNumberForIndex(e)}`}getLineNumberForIndex(e){const t=this.tokens.code;for(;this.lastIndex<e&&this.lastIndex<t.length;)"\n"===t[this.lastIndex]&&this.lastLineNumber++,this.lastIndex++;return this.lastLineNumber}transformTagToJSXFunc(e,t){const s=t===yh.StaticChildren;this.tokens.replaceToken(this.getJSXFuncInvocationCode(s));let i=null;if(this.tokens.matches1(Fc.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, {`),this.processAutomaticChildrenAndEndProps(t);else{if(this.processTagIntro(),this.tokens.appendCode(", {"),i=this.processProps(!0),this.tokens.matches2(Fc.slash,Fc.jsxTagEnd))this.tokens.appendCode("}");else{if(!this.tokens.matches1(Fc.jsxTagEnd))throw new Error("Expected either /> or > at the end of the tag.");this.tokens.removeToken(),this.processAutomaticChildrenAndEndProps(t)}i&&this.tokens.appendCode(`, ${i}`)}for(this.options.production||(null===i&&this.tokens.appendCode(", void 0"),this.tokens.appendCode(`, ${s}, ${this.getDevSource(e)}, this`)),this.tokens.removeInitialToken();!this.tokens.matches1(Fc.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}transformTagToCreateElement(e){if(this.tokens.replaceToken(this.getCreateElementInvocationCode()),this.tokens.matches1(Fc.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, null`),this.processChildren(!0);else if(this.processTagIntro(),this.processPropsObjectWithDevInfo(e),this.tokens.matches2(Fc.slash,Fc.jsxTagEnd));else{if(!this.tokens.matches1(Fc.jsxTagEnd))throw new Error("Expected either /> or > at the end of the tag.");this.tokens.removeToken(),this.processChildren(!0)}for(this.tokens.removeInitialToken();!this.tokens.matches1(Fc.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}getJSXFuncInvocationCode(e){return this.options.production?e?this.claimAutoImportedFuncInvocation("jsxs","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsx","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsxDEV","/jsx-dev-runtime")}getCreateElementInvocationCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedFuncInvocation("createElement","");{const{jsxPragmaInfo:e}=this;return`${this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.base)||e.base}${e.suffix}(`}}getFragmentCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedName("Fragment",this.options.production?"/jsx-runtime":"/jsx-dev-runtime");{const{jsxPragmaInfo:e}=this;return(this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.fragmentBase)||e.fragmentBase)+e.fragmentSuffix}}claimAutoImportedFuncInvocation(e,t){const s=this.claimAutoImportedName(e,t);return this.importProcessor?`${s}.call(void 0, `:`${s}(`}claimAutoImportedName(e,t){if(this.importProcessor){const s=this.jsxImportSource+t;return this.cjsAutomaticModuleNameResolutions[s]||(this.cjsAutomaticModuleNameResolutions[s]=this.importProcessor.getFreeIdentifierForPath(s)),`${this.cjsAutomaticModuleNameResolutions[s]}.${e}`}return this.esmAutomaticImportNameResolutions[e]||(this.esmAutomaticImportNameResolutions[e]=this.nameManager.claimFreeName(`_${e}`)),this.esmAutomaticImportNameResolutions[e]}processTagIntro(){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType||!this.tokens.matches2AtIndex(e-1,Fc.jsxName,Fc.jsxName)&&!this.tokens.matches2AtIndex(e-1,Fc.greaterThan,Fc.jsxName)&&!this.tokens.matches1AtIndex(e,Fc.braceL)&&!this.tokens.matches1AtIndex(e,Fc.jsxTagEnd)&&!this.tokens.matches2AtIndex(e,Fc.slash,Fc.jsxTagEnd);)e++;if(e===this.tokens.currentIndex()+1){const e=this.tokens.identifierName();sl(e)&&this.tokens.replaceToken(`'${e}'`)}for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}processPropsObjectWithDevInfo(e){const t=this.options.production?"":`__self: this, __source: ${this.getDevSource(e)}`;this.tokens.matches1(Fc.jsxName)||this.tokens.matches1(Fc.braceL)?(this.tokens.appendCode(", {"),this.processProps(!1),t?this.tokens.appendCode(` ${t}}`):this.tokens.appendCode("}")):t?this.tokens.appendCode(`, {${t}}`):this.tokens.appendCode(", null")}processProps(e){let t=null;for(;;){if(this.tokens.matches2(Fc.jsxName,Fc.eq)){const s=this.tokens.identifierName();if(e&&"key"===s){null!==t&&this.tokens.appendCode(t.replace(/[^\n]/g,"")),this.tokens.removeToken(),this.tokens.removeToken();const e=this.tokens.snapshot();this.processPropValue(),t=this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(e);continue}this.processPropName(s),this.tokens.replaceToken(": "),this.processPropValue()}else if(this.tokens.matches1(Fc.jsxName)){const e=this.tokens.identifierName();this.processPropName(e),this.tokens.appendCode(": true")}else{if(!this.tokens.matches1(Fc.braceL))break;this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("")}this.tokens.appendCode(",")}return t}processPropName(e){e.includes("-")?this.tokens.replaceToken(`'${e}'`):this.tokens.copyToken()}processPropValue(){this.tokens.matches1(Fc.braceL)?(this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("")):this.tokens.matches1(Fc.jsxTagStart)?this.processJSXTag():this.processStringPropValue()}processStringPropValue(){const e=this.tokens.currentToken(),t=this.tokens.code.slice(e.start+1,e.end-1),s=il(t),i=function(e){let t="";for(let s=0;s<e.length;s++){const i=e[s];if("\n"===i)if(/\s/.test(e[s+1]))for(t+=" ";s<e.length&&/\s/.test(e[s+1]);)s++;else t+="\n";else if("&"===i){const{entity:i,newI:n}=nl(e,s+1);t+=i,s=n-1}else t+=i}return JSON.stringify(t)}(t);this.tokens.replaceToken(i+s)}processAutomaticChildrenAndEndProps(e){e===yh.StaticChildren?(this.tokens.appendCode(" children: ["),this.processChildren(!1),this.tokens.appendCode("]}")):(e===yh.OneChild&&this.tokens.appendCode(" children: "),this.processChildren(!1),this.tokens.appendCode("}"))}processChildren(e){let t=e;for(;;){if(this.tokens.matches2(Fc.jsxTagStart,Fc.slash))return;let e=!1;if(this.tokens.matches1(Fc.braceL))this.tokens.matches2(Fc.braceL,Fc.braceR)?(this.tokens.replaceToken(""),this.tokens.replaceToken("")):(this.tokens.replaceToken(t?", ":""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(""),e=!0);else if(this.tokens.matches1(Fc.jsxTagStart))this.tokens.appendCode(t?", ":""),this.processJSXTag(),e=!0;else{if(!this.tokens.matches1(Fc.jsxText)&&!this.tokens.matches1(Fc.jsxEmptyText))throw new Error("Unexpected token when processing JSX children.");e=this.processChildTextElement(t)}e&&(t=!0)}}processChildTextElement(e){const t=this.tokens.currentToken(),s=this.tokens.code.slice(t.start,t.end),i=il(s),n=function(e){let t="",s="",i=!1,n=!1;for(let r=0;r<e.length;r++){const a=e[r];if(" "===a||"\t"===a||"\r"===a)i||(s+=a);else if("\n"===a)s="",i=!0;else{if(n&&i&&(t+=" "),t+=s,s="","&"===a){const{entity:s,newI:i}=nl(e,r+1);r=i-1,t+=s}else t+=a;n=!0,i=!1}}i||(t+=s);return JSON.stringify(t)}(s);return'""'===n?(this.tokens.replaceToken(i),!1):(this.tokens.replaceToken(`${e?", ":""}${n}${i}`),!0)}getDevSource(e){return`{fileName: ${this.getFilenameVarName()}, ${e}}`}getFilenameVarName(){return this.filenameVarName||(this.filenameVarName=this.nameManager.claimFreeName("_jsxFileName")),this.filenameVarName}}function sl(e){const t=e.charCodeAt(0);return t>=Rc.lowercaseA&&t<=Rc.lowercaseZ}function il(e){let t=0,s=0;for(const i of e)"\n"===i?(t++,s=0):" "===i&&s++;return"\n".repeat(t)+" ".repeat(s)}function nl(e,t){let s,i="",n=0,r=t;if("#"===e[r]){let t,i=10;if(r++,"x"===e[r])for(i=16,r++,t=r;r<e.length&&al(e.charCodeAt(r));)r++;else for(t=r;r<e.length&&rl(e.charCodeAt(r));)r++;if(";"===e[r]){const n=e.slice(t,r);n&&(r++,s=String.fromCodePoint(parseInt(n,i)))}}else for(;r<e.length&&n++<10;){const t=e[r];if(r++,";"===t){s=Yh.get(i);break}i+=t}return s?{entity:s,newI:r}:{entity:"&",newI:t}}function rl(e){return e>=Rc.digit0&&e<=Rc.digit9}function al(e){return e>=Rc.digit0&&e<=Rc.digit9||e>=Rc.lowercaseA&&e<=Rc.lowercaseF||e>=Rc.uppercaseA&&e<=Rc.uppercaseF}function ol(e,t){const s=Qh(t),i=new Set;for(let t=0;t<e.tokens.length;t++){const n=e.tokens[t];if(n.type!==Fc.name||n.isType||n.identifierRole!==mh.Access&&n.identifierRole!==mh.ObjectShorthand&&n.identifierRole!==mh.ExportAccess||n.shadowsGlobal||i.add(e.identifierNameForToken(n)),n.type===Fc.jsxTagStart&&i.add(s.base),n.type===Fc.jsxTagStart&&t+1<e.tokens.length&&e.tokens[t+1].type===Fc.jsxTagEnd&&(i.add(s.base),i.add(s.fragmentBase)),n.type===Fc.jsxName&&n.identifierRole===mh.Access){sl(e.identifierNameForToken(n))&&e.tokens[t+1].type!==Fc.dot||i.add(e.identifierNameForToken(n))}}return i}class cl{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(e,t,s,i,n,r,a){this.nameManager=e,this.tokens=t,this.enableLegacyTypeScriptModuleInterop=s,this.options=i,this.isTypeScriptTransformEnabled=n,this.keepUnusedImports=r,this.helperManager=a,cl.prototype.__init.call(this),cl.prototype.__init2.call(this),cl.prototype.__init3.call(this),cl.prototype.__init4.call(this),cl.prototype.__init5.call(this)}preprocessTokens(){for(let e=0;e<this.tokens.tokens.length;e++)this.tokens.matches1AtIndex(e,Fc._import)&&!this.tokens.matches3AtIndex(e,Fc._import,Fc.name,Fc.eq)&&this.preprocessImportAtIndex(e),this.tokens.matches1AtIndex(e,Fc._export)&&!this.tokens.matches2AtIndex(e,Fc._export,Fc.eq)&&this.preprocessExportAtIndex(e);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=ol(this.tokens,this.options);for(const[e,t]of this.importInfoByPath.entries()){if(t.hasBareImport||t.hasStarExport||t.exportStarNames.length>0||t.namedExports.length>0)continue;[...t.defaultNames,...t.wildcardNames,...t.namedImports.map(({localName:e})=>e)].every(e=>this.shouldAutomaticallyElideImportedName(e))&&this.importsToReplace.set(e,"")}}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}generateImportReplacements(){for(const[e,t]of this.importInfoByPath.entries()){const{defaultNames:s,wildcardNames:i,namedImports:n,namedExports:r,exportStarNames:a,hasStarExport:o}=t;if(0===s.length&&0===i.length&&0===n.length&&0===r.length&&0===a.length&&!o){this.importsToReplace.set(e,`require('${e}');`);continue}const c=this.getFreeIdentifierForPath(e);let h;h=this.enableLegacyTypeScriptModuleInterop?c:i.length>0?i[0]:this.getFreeIdentifierForPath(e);let l=`var ${c} = require('${e}');`;if(i.length>0)for(const e of i){l+=` var ${e} = ${this.enableLegacyTypeScriptModuleInterop?c:`${this.helperManager.getHelperName("interopRequireWildcard")}(${c})`};`}else a.length>0&&h!==c?l+=` var ${h} = ${this.helperManager.getHelperName("interopRequireWildcard")}(${c});`:s.length>0&&h!==c&&(l+=` var ${h} = ${this.helperManager.getHelperName("interopRequireDefault")}(${c});`);for(const{importedName:e,localName:t}of r)l+=` ${this.helperManager.getHelperName("createNamedExportFrom")}(${c}, '${t}', '${e}');`;for(const e of a)l+=` exports.${e} = ${h};`;o&&(l+=` ${this.helperManager.getHelperName("createStarExport")}(${c});`),this.importsToReplace.set(e,l);for(const e of s)this.identifierReplacements.set(e,`${h}.default`);for(const{importedName:e,localName:t}of n)this.identifierReplacements.set(t,`${c}.${e}`)}}getFreeIdentifierForPath(e){const t=e.split("/"),s=t[t.length-1].replace(/\W/g,"");return this.nameManager.claimFreeName(`_${s}`)}preprocessImportAtIndex(e){const t=[],s=[],i=[];if(e++,(this.tokens.matchesContextualAtIndex(e,Oc._type)||this.tokens.matches1AtIndex(e,Fc._typeof))&&!this.tokens.matches1AtIndex(e+1,Fc.comma)&&!this.tokens.matchesContextualAtIndex(e+1,Oc._from))return;if(this.tokens.matches1AtIndex(e,Fc.parenL))return;if(this.tokens.matches1AtIndex(e,Fc.name)&&(t.push(this.tokens.identifierNameAtIndex(e)),e++,this.tokens.matches1AtIndex(e,Fc.comma)&&e++),this.tokens.matches1AtIndex(e,Fc.star)&&(e+=2,s.push(this.tokens.identifierNameAtIndex(e)),e++),this.tokens.matches1AtIndex(e,Fc.braceL)){const s=this.getNamedImports(e+1);e=s.newIndex;for(const e of s.namedImports)"default"===e.importedName?t.push(e.localName):i.push(e)}if(this.tokens.matchesContextualAtIndex(e,Oc._from)&&e++,!this.tokens.matches1AtIndex(e,Fc.string))throw new Error("Expected string token at the end of import statement.");const n=this.tokens.stringValueAtIndex(e),r=this.getImportInfo(n);r.defaultNames.push(...t),r.wildcardNames.push(...s),r.namedImports.push(...i),0===t.length&&0===s.length&&0===i.length&&(r.hasBareImport=!0)}preprocessExportAtIndex(e){if(this.tokens.matches2AtIndex(e,Fc._export,Fc._var)||this.tokens.matches2AtIndex(e,Fc._export,Fc._let)||this.tokens.matches2AtIndex(e,Fc._export,Fc._const))this.preprocessVarExportAtIndex(e);else if(this.tokens.matches2AtIndex(e,Fc._export,Fc._function)||this.tokens.matches2AtIndex(e,Fc._export,Fc._class)){const t=this.tokens.identifierNameAtIndex(e+2);this.addExportBinding(t,t)}else if(this.tokens.matches3AtIndex(e,Fc._export,Fc.name,Fc._function)){const t=this.tokens.identifierNameAtIndex(e+3);this.addExportBinding(t,t)}else this.tokens.matches2AtIndex(e,Fc._export,Fc.braceL)?this.preprocessNamedExportAtIndex(e):this.tokens.matches2AtIndex(e,Fc._export,Fc.star)&&this.preprocessExportStarAtIndex(e)}preprocessVarExportAtIndex(e){let t=0;for(let s=e+2;;s++)if(this.tokens.matches1AtIndex(s,Fc.braceL)||this.tokens.matches1AtIndex(s,Fc.dollarBraceL)||this.tokens.matches1AtIndex(s,Fc.bracketL))t++;else if(this.tokens.matches1AtIndex(s,Fc.braceR)||this.tokens.matches1AtIndex(s,Fc.bracketR))t--;else{if(0===t&&!this.tokens.matches1AtIndex(s,Fc.name))break;if(this.tokens.matches1AtIndex(1,Fc.eq)){const e=this.tokens.currentToken().rhsEndIndex;if(null==e)throw new Error("Expected = token with an end index.");s=e-1}else{if(xh(this.tokens.tokens[s])){const e=this.tokens.identifierNameAtIndex(s);this.identifierReplacements.set(e,`exports.${e}`)}}}}preprocessNamedExportAtIndex(e){e+=2;const{newIndex:t,namedImports:s}=this.getNamedImports(e);if(e=t,!this.tokens.matchesContextualAtIndex(e,Oc._from)){for(const{importedName:e,localName:t}of s)this.addExportBinding(e,t);return}if(e++,!this.tokens.matches1AtIndex(e,Fc.string))throw new Error("Expected string token at the end of import statement.");const i=this.tokens.stringValueAtIndex(e);this.getImportInfo(i).namedExports.push(...s)}preprocessExportStarAtIndex(e){let t=null;if(this.tokens.matches3AtIndex(e,Fc._export,Fc.star,Fc._as)?(e+=3,t=this.tokens.identifierNameAtIndex(e),e+=2):e+=3,!this.tokens.matches1AtIndex(e,Fc.string))throw new Error("Expected string token at the end of star export statement.");const s=this.tokens.stringValueAtIndex(e),i=this.getImportInfo(s);null!==t?i.exportStarNames.push(t):i.hasStarExport=!0}getNamedImports(e){const t=[];for(;;){if(this.tokens.matches1AtIndex(e,Fc.braceR)){e++;break}const s=Xh(this.tokens,e);if(e=s.endIndex,s.isType||t.push({importedName:s.leftName,localName:s.rightName}),this.tokens.matches2AtIndex(e,Fc.comma,Fc.braceR)){e+=2;break}if(this.tokens.matches1AtIndex(e,Fc.braceR)){e++;break}if(!this.tokens.matches1AtIndex(e,Fc.comma))throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[e])}`);e++}return{newIndex:e,namedImports:t}}getImportInfo(e){const t=this.importInfoByPath.get(e);if(t)return t;const s={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(e,s),s}addExportBinding(e,t){this.exportBindingsByLocalName.has(e)||this.exportBindingsByLocalName.set(e,[]),this.exportBindingsByLocalName.get(e).push(t)}claimImportCode(e){const t=this.importsToReplace.get(e);return this.importsToReplace.set(e,""),t||""}getIdentifierReplacement(e){return this.identifierReplacements.get(e)||null}resolveExportBinding(e){const t=this.exportBindingsByLocalName.get(e);return t&&0!==t.length?t.map(e=>`exports.${e}`).join(" = "):null}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}}var hl=class{constructor(){this._indexes={__proto__:null},this.array=[]}};var ll=class{constructor({file:e,sourceRoot:t}={}){this._names=new hl,this._sources=new hl,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new hl}};var pl=(e,t,s,i,n,r,a,o)=>function(e,t,s,i,n,r,a){const{_mappings:o,_sources:c,_sourcesContent:h,_names:l}=t,p=function(e,t){for(let s=e.length;s<=t;s++)e[s]=[];return e[t]}(o,s),u=function(e,t){let s=e.length;for(let i=s-1;i>=0;s=i--){if(t>=e[i][0])break}return s}(p,i);if(!n){if(function(e,t){if(0===t)return!0;const s=e[t-1];return 1===s.length}(p,u))return;return ul(p,u,[i])}const d=function(e,t){const s=function(e,t){return e._indexes[t]}(e,t);if(void 0!==s)return s;const{array:i,_indexes:n}=e,r=i.push(t);return n[t]=r-1}(c,n),f=-1;d===h.length&&(h[d]=null);if(function(e,t,s,i,n,r){if(0===t)return!1;const a=e[t-1];return 1!==a.length&&(s===a[1]&&i===a[2]&&n===a[3]&&r===(5===a.length?a[4]:-1))}(p,u,d,r,a,f))return;return ul(p,u,[i,d,r,a])}(0,e,t,s,i,n,r);function ul(e,t,s){for(let s=e.length;s>t;s--)e[s]=e[s-1];e[t]=s}function dl({code:e,mappings:t},s,i,n,r){const a=function(e,t){const s=new Array(t.length);let i=0,n=t[i].start,r=0;for(let a=0;a<e.length;a++)a===n&&(s[i]=n-r,i++,n=t[i].start),e.charCodeAt(a)===Rc.lineFeed&&(r=a+1);return s}(n,r),o=new ll({file:i.compiledFilename});let c=0,h=t[0];for(;void 0===h&&c<t.length-1;)c++,h=t[c];let l=0,p=0;h!==p&&pl(o,l,0,s,l,0);for(let i=0;i<e.length;i++){if(i===h){const e=h-p,n=a[c];for(pl(o,l,e,s,l,n);(h===i||void 0===h)&&c<t.length-1;)c++,h=t[c]}e.charCodeAt(i)===Rc.lineFeed&&(l++,p=i+1,h!==p&&pl(o,l,0,s,l,0))}const{sourceRoot:u,sourcesContent:d,...f}=function(e){const t=function(e){const{_mappings:t,_sources:s,_sourcesContent:i,_names:n,_ignoreList:r}=e;return function(e){const{length:t}=e;let s=t;for(let t=s-1;t>=0&&!(e[t].length>0);s=t,t--);s<t&&(e.length=s)}(t),{version:3,file:e.file||void 0,names:n.array,sourceRoot:e.sourceRoot||void 0,sources:s.array,sourcesContent:i,mappings:t,ignoreList:r.array}}(e);return Object.assign({},t,{mappings:Q(t.mappings)})}(o);return f}const fl={require:'\n import {createRequire as CREATE_REQUIRE_NAME} from "module";\n const require = CREATE_REQUIRE_NAME(import.meta.url);\n ',interopRequireWildcard:"\n function interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n return newObj;\n }\n }\n ",interopRequireDefault:"\n function interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n }\n ",createNamedExportFrom:"\n function createNamedExportFrom(obj, localName, importedName) {\n Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]});\n }\n ",createStarExport:'\n function createStarExport(obj) {\n Object.keys(obj)\n .filter((key) => key !== "default" && key !== "__esModule")\n .forEach((key) => {\n if (exports.hasOwnProperty(key)) {\n return;\n }\n Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});\n });\n }\n ',nullishCoalesce:"\n function nullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return rhsFn();\n }\n }\n ",asyncNullishCoalesce:"\n async function asyncNullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return await rhsFn();\n }\n }\n ",optionalChain:"\n function optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n return undefined;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n ",asyncOptionalChain:"\n async function asyncOptionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n return undefined;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = await fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = await fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n ",optionalChainDelete:"\n function optionalChainDelete(ops) {\n const result = OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n ",asyncOptionalChainDelete:"\n async function asyncOptionalChainDelete(ops) {\n const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n "};class ml{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(e){this.nameManager=e,ml.prototype.__init.call(this),ml.prototype.__init2.call(this)}getHelperName(e){let t=this.helperNames[e];return t||(t=this.nameManager.claimFreeName(`_${e}`),this.helperNames[e]=t,t)}emitHelpers(){let e="";this.helperNames.optionalChainDelete&&this.getHelperName("optionalChain"),this.helperNames.asyncOptionalChainDelete&&this.getHelperName("asyncOptionalChain");for(const[t,s]of Object.entries(fl)){const i=this.helperNames[t];let n=s;"optionalChainDelete"===t?n=n.replace("OPTIONAL_CHAIN_NAME",this.helperNames.optionalChain):"asyncOptionalChainDelete"===t?n=n.replace("ASYNC_OPTIONAL_CHAIN_NAME",this.helperNames.asyncOptionalChain):"require"===t&&(null===this.createRequireName&&(this.createRequireName=this.nameManager.claimFreeName("_createRequire")),n=n.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),i&&(e+=" ",e+=n.replace(t,i).replace(/\s+/g," ").trim())}return e}}function yl(e,t,s){(function(e,t){for(const s of e.tokens)if(s.type===Fc.name&&!s.isType&&gh(s)&&t.has(e.identifierNameForToken(s)))return!0;return!1})(e,s)&&function(e,t,s){const i=[];let n=t.length-1;for(let r=e.tokens.length-1;;r--){for(;i.length>0&&i[i.length-1].startTokenIndex===r+1;)i.pop();for(;n>=0&&t[n].endTokenIndex===r+1;)i.push(t[n]),n--;if(r<0)break;const a=e.tokens[r],o=e.identifierNameForToken(a);if(i.length>1&&!a.isType&&a.type===Fc.name&&s.has(o))if(Th(a))xl(i[i.length-1],e,o);else if(bh(a)){let t=i.length-1;for(;t>0&&!i[t].isFunctionScope;)t--;if(t<0)throw new Error("Did not find parent function scope.");xl(i[t],e,o)}}if(i.length>0)throw new Error("Expected empty scope stack after processing file.")}(e,t,s)}function xl(e,t,s){for(let i=e.startTokenIndex;i<e.endTokenIndex;i++){const e=t.tokens[i];e.type!==Fc.name&&e.type!==Fc.jsxName||t.identifierNameForToken(e)!==s||(e.shadowsGlobal=!0)}}class gl{__init(){this.usedNames=new Set}constructor(e,t){gl.prototype.__init.call(this),this.usedNames=new Set(function(e,t){const s=[];for(const i of t)i.type===Fc.name&&s.push(e.slice(i.start,i.end));return s}(e,t))}claimFreeName(e){const t=this.findFreeName(e);return this.usedNames.add(t),t}findFreeName(e){if(!this.usedNames.has(e))return e;let t=2;for(;this.usedNames.has(e+String(t));)t++;return e+String(t)}}var kl,Tl={},bl={},Sl={},wl=r&&r.__extends||(kl=function(e,t){return kl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},kl(e,t)},function(e,t){function s(){this.constructor=e}kl(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)});Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.DetailContext=Sl.NoopContext=Sl.VError=void 0;var vl=function(e){function t(s,i){var n=e.call(this,i)||this;return n.path=s,Object.setPrototypeOf(n,t.prototype),n}return wl(t,e),t}(Error);Sl.VError=vl;var Cl=function(){function e(){}return e.prototype.fail=function(e,t,s){return!1},e.prototype.unionResolver=function(){return this},e.prototype.createContext=function(){return this},e.prototype.resolveUnion=function(e){},e}();Sl.NoopContext=Cl;var Pl=function(){function e(){this._propNames=[""],this._messages=[null],this._score=0}return e.prototype.fail=function(e,t,s){return this._propNames.push(e),this._messages.push(t),this._score+=s,!1},e.prototype.unionResolver=function(){return new El},e.prototype.resolveUnion=function(e){for(var t,s,i=null,n=0,r=e.contexts;n<r.length;n++){var a=r[n];(!i||a._score>=i._score)&&(i=a)}i&&i._score>0&&((t=this._propNames).push.apply(t,i._propNames),(s=this._messages).push.apply(s,i._messages))},e.prototype.getError=function(e){for(var t=[],s=this._propNames.length-1;s>=0;s--){var i=this._propNames[s];e+="number"==typeof i?"["+i+"]":i?"."+i:"";var n=this._messages[s];n&&t.push(e+" "+n)}return new vl(e,t.join("; "))},e.prototype.getErrorDetail=function(e){for(var t=[],s=this._propNames.length-1;s>=0;s--){var i=this._propNames[s];e+="number"==typeof i?"["+i+"]":i?"."+i:"";var n=this._messages[s];n&&t.push({path:e,message:n})}var r=null;for(s=t.length-1;s>=0;s--)r&&(t[s].nested=[r]),r=t[s];return r},e}();Sl.DetailContext=Pl;var El=function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var e=new Pl;return this.contexts.push(e),e},e}();!function(e){var t=r&&r.__extends||function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.basicTypes=e.BasicType=e.TParamList=e.TParam=e.param=e.TFunc=e.func=e.TProp=e.TOptional=e.opt=e.TIface=e.iface=e.TEnumLiteral=e.enumlit=e.TEnumType=e.enumtype=e.TIntersection=e.intersection=e.TUnion=e.union=e.TTuple=e.tuple=e.TArray=e.array=e.TLiteral=e.lit=e.TName=e.name=e.TType=void 0;var s=Sl,i=function(){};function n(e){return"string"==typeof e?o(e):e}function a(e,t){var s=e[t];if(!s)throw new Error("Unknown type "+t);return s}function o(e){return new c(e)}e.TType=i,e.name=o;var c=function(e){function s(t){var s=e.call(this)||this;return s.name=t,s._failMsg="is not a "+t,s}return t(s,e),s.prototype.getChecker=function(e,t,i){var n=this,r=a(e,this.name),o=r.getChecker(e,t,i);return r instanceof w||r instanceof s?o:function(e,t){return!!o(e,t)||t.fail(null,n._failMsg,0)}},s}(i);e.TName=c,e.lit=function(e){return new h(e)};var h=function(e){function s(t){var s=e.call(this)||this;return s.value=t,s.name=JSON.stringify(t),s._failMsg="is not "+s.name,s}return t(s,e),s.prototype.getChecker=function(e,t){var s=this;return function(e,t){return e===s.value||t.fail(null,s._failMsg,-1)}},s}(i);e.TLiteral=h,e.array=function(e){return new l(n(e))};var l=function(e){function s(t){var s=e.call(this)||this;return s.ttype=t,s}return t(s,e),s.prototype.getChecker=function(e,t){var s=this.ttype.getChecker(e,t);return function(e,t){if(!Array.isArray(e))return t.fail(null,"is not an array",0);for(var i=0;i<e.length;i++){if(!s(e[i],t))return t.fail(i,null,1)}return!0}},s}(i);e.TArray=l,e.tuple=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new p(e.map(function(e){return n(e)}))};var p=function(e){function s(t){var s=e.call(this)||this;return s.ttypes=t,s}return t(s,e),s.prototype.getChecker=function(e,t){var s=this.ttypes.map(function(s){return s.getChecker(e,t)}),i=function(e,t){if(!Array.isArray(e))return t.fail(null,"is not an array",0);for(var i=0;i<s.length;i++){if(!s[i](e[i],t))return t.fail(i,null,1)}return!0};return t?function(e,t){return!!i(e,t)&&(e.length<=s.length||t.fail(s.length,"is extraneous",2))}:i},s}(i);e.TTuple=p,e.union=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new u(e.map(function(e){return n(e)}))};var u=function(e){function s(t){var s=e.call(this)||this;s.ttypes=t;var i=t.map(function(e){return e instanceof c||e instanceof h?e.name:null}).filter(function(e){return e}),n=t.length-i.length;return i.length?(n>0&&i.push(n+" more"),s._failMsg="is none of "+i.join(", ")):s._failMsg="is none of "+n+" types",s}return t(s,e),s.prototype.getChecker=function(e,t){var s=this,i=this.ttypes.map(function(s){return s.getChecker(e,t)});return function(e,t){for(var n=t.unionResolver(),r=0;r<i.length;r++){if(i[r](e,n.createContext()))return!0}return t.resolveUnion(n),t.fail(null,s._failMsg,0)}},s}(i);e.TUnion=u,e.intersection=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new d(e.map(function(e){return n(e)}))};var d=function(e){function s(t){var s=e.call(this)||this;return s.ttypes=t,s}return t(s,e),s.prototype.getChecker=function(e,t){var s=new Set,i=this.ttypes.map(function(i){return i.getChecker(e,t,s)});return function(e,t){return!!i.every(function(s){return s(e,t)})||t.fail(null,null,0)}},s}(i);e.TIntersection=d,e.enumtype=function(e){return new f(e)};var f=function(e){function s(t){var s=e.call(this)||this;return s.members=t,s.validValues=new Set,s._failMsg="is not a valid enum value",s.validValues=new Set(Object.keys(t).map(function(e){return t[e]})),s}return t(s,e),s.prototype.getChecker=function(e,t){var s=this;return function(e,t){return!!s.validValues.has(e)||t.fail(null,s._failMsg,0)}},s}(i);e.TEnumType=f,e.enumlit=function(e,t){return new m(e,t)};var m=function(e){function s(t,s){var i=e.call(this)||this;return i.enumName=t,i.prop=s,i._failMsg="is not "+t+"."+s,i}return t(s,e),s.prototype.getChecker=function(e,t){var s=this,i=a(e,this.enumName);if(!(i instanceof f))throw new Error("Type "+this.enumName+" used in enumlit is not an enum type");var n=i.members[this.prop];if(!i.members.hasOwnProperty(this.prop))throw new Error("Unknown value "+this.enumName+"."+this.prop+" used in enumlit");return function(e,t){return e===n||t.fail(null,s._failMsg,-1)}},s}(i);function y(e){return Object.keys(e).map(function(t){return function(e,t){return t instanceof g?new k(e,t.ttype,!0):new k(e,n(t),!1)}(t,e[t])})}e.TEnumLiteral=m,e.iface=function(e,t){return new x(e,y(t))};var x=function(e){function i(t,s){var i=e.call(this)||this;return i.bases=t,i.props=s,i.propSet=new Set(s.map(function(e){return e.name})),i}return t(i,e),i.prototype.getChecker=function(e,t,i){var n=this,r=this.bases.map(function(s){return a(e,s).getChecker(e,t)}),o=this.props.map(function(s){return s.ttype.getChecker(e,t)}),c=new s.NoopContext,h=this.props.map(function(e,t){return!e.isOpt&&!o[t](void 0,c)}),l=function(e,t){if("object"!=typeof e||null===e)return t.fail(null,"is not an object",0);for(var s=0;s<r.length;s++)if(!r[s](e,t))return!1;for(s=0;s<o.length;s++){var i=n.props[s].name,a=e[i];if(void 0===a){if(h[s])return t.fail(i,"is missing",1)}else if(!o[s](a,t))return t.fail(i,null,1)}return!0};if(!t)return l;var p=this.propSet;return i&&(this.propSet.forEach(function(e){return i.add(e)}),p=i),function(e,t){if(!l(e,t))return!1;for(var s in e)if(!p.has(s))return t.fail(s,"is extraneous",2);return!0}},i}(i);e.TIface=x,e.opt=function(e){return new g(n(e))};var g=function(e){function s(t){var s=e.call(this)||this;return s.ttype=t,s}return t(s,e),s.prototype.getChecker=function(e,t){var s=this.ttype.getChecker(e,t);return function(e,t){return void 0===e||s(e,t)}},s}(i);e.TOptional=g;var k=function(e,t,s){this.name=e,this.ttype=t,this.isOpt=s};e.TProp=k,e.func=function(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];return new T(new S(t),n(e))};var T=function(e){function s(t,s){var i=e.call(this)||this;return i.paramList=t,i.result=s,i}return t(s,e),s.prototype.getChecker=function(e,t){return function(e,t){return"function"==typeof e||t.fail(null,"is not a function",0)}},s}(i);e.TFunc=T,e.param=function(e,t,s){return new b(e,n(t),Boolean(s))};var b=function(e,t,s){this.name=e,this.ttype=t,this.isOpt=s};e.TParam=b;var S=function(e){function i(t){var s=e.call(this)||this;return s.params=t,s}return t(i,e),i.prototype.getChecker=function(e,t){var i=this,n=this.params.map(function(s){return s.ttype.getChecker(e,t)}),r=new s.NoopContext,a=this.params.map(function(e,t){return!e.isOpt&&!n[t](void 0,r)}),o=function(e,t){if(!Array.isArray(e))return t.fail(null,"is not an array",0);for(var s=0;s<n.length;s++){var r=i.params[s];if(void 0===e[s]){if(a[s])return t.fail(r.name,"is missing",1)}else if(!n[s](e[s],t))return t.fail(r.name,null,1)}return!0};return t?function(e,t){return!!o(e,t)&&(e.length<=n.length||t.fail(n.length,"is extraneous",2))}:o},i}(i);e.TParamList=S;var w=function(e){function s(t,s){var i=e.call(this)||this;return i.validator=t,i.message=s,i}return t(s,e),s.prototype.getChecker=function(e,t){var s=this;return function(e,t){return!!s.validator(e)||t.fail(null,s.message,0)}},s}(i);e.BasicType=w,e.basicTypes={any:new w(function(e){return!0},"is invalid"),number:new w(function(e){return"number"==typeof e},"is not a number"),object:new w(function(e){return"object"==typeof e&&e},"is not an object"),boolean:new w(function(e){return"boolean"==typeof e},"is not a boolean"),string:new w(function(e){return"string"==typeof e},"is not a string"),symbol:new w(function(e){return"symbol"==typeof e},"is not a symbol"),void:new w(function(e){return null==e},"is not void"),undefined:new w(function(e){return void 0===e},"is not undefined"),null:new w(function(e){return null===e},"is not null"),never:new w(function(e){return!1},"is unexpected"),Date:new w(C("[object Date]"),"is not a Date"),RegExp:new w(C("[object RegExp]"),"is not a RegExp")};var v=Object.prototype.toString;function C(e){return function(t){return"object"==typeof t&&t&&v.call(t)===e}}"undefined"!=typeof Buffer&&(e.basicTypes.Buffer=new w(function(e){return Buffer.isBuffer(e)},"is not a Buffer"));for(var P=function(t){e.basicTypes[t.name]=new w(function(e){return e instanceof t},"is not a "+t.name)},E=0,A=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];E<A.length;E++){P(A[E])}}(bl),function(e){var t=r&&r.__spreadArrays||function(){for(var e=0,t=0,s=arguments.length;t<s;t++)e+=arguments[t].length;var i=Array(e),n=0;for(t=0;t<s;t++)for(var r=arguments[t],a=0,o=r.length;a<o;a++,n++)i[n]=r[a];return i};Object.defineProperty(e,"__esModule",{value:!0}),e.Checker=e.createCheckers=void 0;var s=bl,i=Sl,n=bl;Object.defineProperty(e,"TArray",{enumerable:!0,get:function(){return n.TArray}}),Object.defineProperty(e,"TEnumType",{enumerable:!0,get:function(){return n.TEnumType}}),Object.defineProperty(e,"TEnumLiteral",{enumerable:!0,get:function(){return n.TEnumLiteral}}),Object.defineProperty(e,"TFunc",{enumerable:!0,get:function(){return n.TFunc}}),Object.defineProperty(e,"TIface",{enumerable:!0,get:function(){return n.TIface}}),Object.defineProperty(e,"TLiteral",{enumerable:!0,get:function(){return n.TLiteral}}),Object.defineProperty(e,"TName",{enumerable:!0,get:function(){return n.TName}}),Object.defineProperty(e,"TOptional",{enumerable:!0,get:function(){return n.TOptional}}),Object.defineProperty(e,"TParam",{enumerable:!0,get:function(){return n.TParam}}),Object.defineProperty(e,"TParamList",{enumerable:!0,get:function(){return n.TParamList}}),Object.defineProperty(e,"TProp",{enumerable:!0,get:function(){return n.TProp}}),Object.defineProperty(e,"TTuple",{enumerable:!0,get:function(){return n.TTuple}}),Object.defineProperty(e,"TType",{enumerable:!0,get:function(){return n.TType}}),Object.defineProperty(e,"TUnion",{enumerable:!0,get:function(){return n.TUnion}}),Object.defineProperty(e,"TIntersection",{enumerable:!0,get:function(){return n.TIntersection}}),Object.defineProperty(e,"array",{enumerable:!0,get:function(){return n.array}}),Object.defineProperty(e,"enumlit",{enumerable:!0,get:function(){return n.enumlit}}),Object.defineProperty(e,"enumtype",{enumerable:!0,get:function(){return n.enumtype}}),Object.defineProperty(e,"func",{enumerable:!0,get:function(){return n.func}}),Object.defineProperty(e,"iface",{enumerable:!0,get:function(){return n.iface}}),Object.defineProperty(e,"lit",{enumerable:!0,get:function(){return n.lit}}),Object.defineProperty(e,"name",{enumerable:!0,get:function(){return n.name}}),Object.defineProperty(e,"opt",{enumerable:!0,get:function(){return n.opt}}),Object.defineProperty(e,"param",{enumerable:!0,get:function(){return n.param}}),Object.defineProperty(e,"tuple",{enumerable:!0,get:function(){return n.tuple}}),Object.defineProperty(e,"union",{enumerable:!0,get:function(){return n.union}}),Object.defineProperty(e,"intersection",{enumerable:!0,get:function(){return n.intersection}}),Object.defineProperty(e,"BasicType",{enumerable:!0,get:function(){return n.BasicType}});var a=Sl;Object.defineProperty(e,"VError",{enumerable:!0,get:function(){return a.VError}}),e.createCheckers=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];for(var n=Object.assign.apply(Object,t([{},s.basicTypes],e)),r={},a=0,c=e;a<c.length;a++)for(var h=c[a],l=0,p=Object.keys(h);l<p.length;l++){var u=p[l];r[u]=new o(n,h[u])}return r};var o=function(){function e(e,t,i){if(void 0===i&&(i="value"),this.suite=e,this.ttype=t,this._path=i,this.props=new Map,t instanceof s.TIface)for(var n=0,r=t.props;n<r.length;n++){var a=r[n];this.props.set(a.name,a.ttype)}this.checkerPlain=this.ttype.getChecker(e,!1),this.checkerStrict=this.ttype.getChecker(e,!0)}return e.prototype.setReportedPath=function(e){this._path=e},e.prototype.check=function(e){return this._doCheck(this.checkerPlain,e)},e.prototype.test=function(e){return this.checkerPlain(e,new i.NoopContext)},e.prototype.validate=function(e){return this._doValidate(this.checkerPlain,e)},e.prototype.strictCheck=function(e){return this._doCheck(this.checkerStrict,e)},e.prototype.strictTest=function(e){return this.checkerStrict(e,new i.NoopContext)},e.prototype.strictValidate=function(e){return this._doValidate(this.checkerStrict,e)},e.prototype.getProp=function(t){var s=this.props.get(t);if(!s)throw new Error("Type has no property "+t);return new e(this.suite,s,this._path+"."+t)},e.prototype.methodArgs=function(t){var s=this._getMethod(t);return new e(this.suite,s.paramList)},e.prototype.methodResult=function(t){var s=this._getMethod(t);return new e(this.suite,s.result)},e.prototype.getArgs=function(){if(!(this.ttype instanceof s.TFunc))throw new Error("getArgs() applied to non-function");return new e(this.suite,this.ttype.paramList)},e.prototype.getResult=function(){if(!(this.ttype instanceof s.TFunc))throw new Error("getResult() applied to non-function");return new e(this.suite,this.ttype.result)},e.prototype.getType=function(){return this.ttype},e.prototype._doCheck=function(e,t){if(!e(t,new i.NoopContext)){var s=new i.DetailContext;throw e(t,s),s.getError(this._path)}},e.prototype._doValidate=function(e,t){if(e(t,new i.NoopContext))return null;var s=new i.DetailContext;return e(t,s),s.getErrorDetail(this._path)},e.prototype._getMethod=function(e){var t=this.props.get(e);if(!t)throw new Error("Type has no property "+e);if(!(t instanceof s.TFunc))throw new Error("Property "+e+" is not a method");return t},e}();e.Checker=o}(Tl);const Al={Transform:Tl.union(Tl.lit("jsx"),Tl.lit("typescript"),Tl.lit("flow"),Tl.lit("imports"),Tl.lit("react-hot-loader"),Tl.lit("jest")),SourceMapOptions:Tl.iface([],{compiledFilename:"string"}),Options:Tl.iface([],{transforms:Tl.array("Transform"),disableESTransforms:Tl.opt("boolean"),jsxRuntime:Tl.opt(Tl.union(Tl.lit("classic"),Tl.lit("automatic"),Tl.lit("preserve"))),production:Tl.opt("boolean"),jsxImportSource:Tl.opt("string"),jsxPragma:Tl.opt("string"),jsxFragmentPragma:Tl.opt("string"),keepUnusedImports:Tl.opt("boolean"),preserveDynamicImport:Tl.opt("boolean"),injectCreateRequireForImportRequire:Tl.opt("boolean"),enableLegacyTypeScriptModuleInterop:Tl.opt("boolean"),enableLegacyBabel5ModuleInterop:Tl.opt("boolean"),sourceMapOptions:Tl.opt("SourceMapOptions"),filePath:Tl.opt("string")})},{Options:Il}=Tl.createCheckers(Al);function _l(){vh(),zp(!1)}function Nl(e){vh(),Ol(e)}function Ll(e){wu(),Ml(e)}function Dl(){wu(),Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ImportDeclaration}function Ml(e){let t;t=0===Hc.scopeDepth?mh.TopLevelDeclaration:e?mh.BlockScopedDeclaration:mh.FunctionScopedDeclaration,Hc.tokens[Hc.tokens.length-1].identifierRole=t}function Ol(e){switch(Hc.type){case Fc._this:{const e=Eh(0);return vh(),void Ah(e)}case Fc._yield:case Fc.name:return Hc.type=Fc.name,void Ll(e);case Fc.bracketL:return vh(),void Fl(Fc.bracketR,e,!0);case Fc.braceL:return void du(!0,e);default:oh()}}function Fl(e,t,s=!1,i=!1,n=0){let r=!0,a=!1;const o=Hc.tokens.length;for(;!Ih(e)&&!Hc.error;)if(r?r=!1:(ah(Fc.comma),Hc.tokens[Hc.tokens.length-1].contextId=n,!a&&Hc.tokens[o].isType&&(Hc.tokens[Hc.tokens.length-1].isType=!0,a=!0)),s&&Nh(Fc.comma));else{if(Ih(e))break;if(Nh(Fc.ellipsis)){Nl(t),Bl(),Ih(Fc.comma),ah(e);break}Rl(i,t)}}function Rl(e,t){e&&$l([Oc._public,Oc._protected,Oc._private,Oc._readonly,Oc._override]),jl(t),Bl(),jl(t,!0)}function Bl(){Vc?function(){const e=Eh(0);Ih(Fc.question),Nh(Fc.colon)&&Zu();Ah(e)}():$c&&function(){const e=Eh(0);Ih(Fc.question),up(),Ah(e)}()}function jl(e,t=!1){if(t||Ol(e),!Ih(Fc.eq))return;const s=Hc.tokens.length-1;zp(),Hc.tokens[s].rhsEndIndex=Hc.tokens.length}function Ul(){return Nh(Fc.name)}function ql(){const e=Hc.snapshot();vh();return!!((Nh(Fc.bracketL)||Nh(Fc.braceL)||Nh(Fc.star)||Nh(Fc.ellipsis)||Nh(Fc.hash)||Nh(Fc.name)||Boolean(Hc.type&Fc.IS_KEYWORD)||Nh(Fc.string)||Nh(Fc.num)||Nh(Fc.bigint)||Nh(Fc.decimal))&&!sh())||(Hc.restoreFromSnapshot(e),!1)}function $l(e){for(;;){if(null===Vl(e))break}}function Vl(e){if(!Nh(Fc.name))return null;const t=Hc.contextualKeyword;if(-1!==e.indexOf(t)&&ql()){switch(t){case Oc._readonly:Hc.tokens[Hc.tokens.length-1].type=Fc._readonly;break;case Oc._abstract:Hc.tokens[Hc.tokens.length-1].type=Fc._abstract;break;case Oc._static:Hc.tokens[Hc.tokens.length-1].type=Fc._static;break;case Oc._public:Hc.tokens[Hc.tokens.length-1].type=Fc._public;break;case Oc._private:Hc.tokens[Hc.tokens.length-1].type=Fc._private;break;case Oc._protected:Hc.tokens[Hc.tokens.length-1].type=Fc._protected;break;case Oc._override:Hc.tokens[Hc.tokens.length-1].type=Fc._override;break;case Oc._declare:Hc.tokens[Hc.tokens.length-1].type=Fc._declare}return t}return null}function Hl(){for(wu();Ih(Fc.dot);)wu()}function Kl(){ah(Fc._import),ah(Fc.parenL),ah(Fc.string),ah(Fc.parenR),Ih(Fc.dot)&&Hl(),Nh(Fc.lessThan)&&_p()}function zl(){Ih(Fc._const);const e=Ih(Fc._in),t=Zc(Oc._out);Ih(Fc._const),!e&&!t||Nh(Fc.name)?wu():Hc.tokens[Hc.tokens.length-1].type=Fc.name,Ih(Fc._extends)&&fp(),Ih(Fc.eq)&&fp()}function Jl(){Nh(Fc.lessThan)&&Wl()}function Wl(){const e=Eh(0);for(Nh(Fc.lessThan)||Nh(Fc.typeParameterStart)?vh():oh();!Ih(Fc.greaterThan)&&!Hc.error;)zl(),Ih(Fc.comma);Ah(e)}function Xl(e){const t=e===Fc.arrow;var s;Jl(),ah(Fc.parenL),Hc.scopeDepth++,s=!1,Fl(Fc.parenR,s),Hc.scopeDepth--,(t||Nh(e))&&pp(e)}function Gl(){Ih(Fc.comma)||rh()}function Yl(){Xl(Fc.colon),Gl()}function Ql(){if(!Nh(Fc.bracketL)||!function(){const e=Hc.snapshot();vh();const t=Ih(Fc.name)&&Nh(Fc.colon);return Hc.restoreFromSnapshot(e),t}())return!1;const e=Eh(0);return ah(Fc.bracketL),wu(),dp(),ah(Fc.bracketR),up(),Gl(),Ah(e),!0}function Zl(e){Ih(Fc.question),e||!Nh(Fc.parenL)&&!Nh(Fc.lessThan)?(up(),Gl()):(Xl(Fc.colon),Gl())}function ep(){if(Nh(Fc.parenL)||Nh(Fc.lessThan))return void Yl();if(Nh(Fc._new))return vh(),void(Nh(Fc.parenL)||Nh(Fc.lessThan)?Yl():Zl(!1));const e=!!Vl([Oc._readonly]);Ql()||((Yc(Oc._get)||Yc(Oc._set))&&ql(),yu(-1),Zl(e))}function tp(){for(ah(Fc.braceL);!Ih(Fc.braceR)&&!Hc.error;)ep()}function sp(){const e=Hc.snapshot(),t=function(){if(vh(),Ih(Fc.plus)||Ih(Fc.minus))return Yc(Oc._readonly);Yc(Oc._readonly)&&vh();if(!Nh(Fc.bracketL))return!1;if(vh(),!Ul())return!1;return vh(),Nh(Fc._in)}();return Hc.restoreFromSnapshot(e),t}function ip(){ah(Fc.braceL),Nh(Fc.plus)||Nh(Fc.minus)?(vh(),eh(Oc._readonly)):Zc(Oc._readonly),ah(Fc.bracketL),wu(),ah(Fc._in),fp(),Zc(Oc._as)&&fp(),ah(Fc.bracketR),Nh(Fc.plus)||Nh(Fc.minus)?(vh(),ah(Fc.question)):Ih(Fc.question),Ih(Fc.colon)&&fp(),rh(),ah(Fc.braceR)}function np(){Ih(Fc.ellipsis)?fp():(fp(),Ih(Fc.question)),Ih(Fc.colon)&&fp()}var rp;function ap(e){e===rp.TSAbstractConstructorType&&eh(Oc._abstract),e!==rp.TSConstructorType&&e!==rp.TSAbstractConstructorType||ah(Fc._new);const t=Hc.inDisallowConditionalTypesContext;Hc.inDisallowConditionalTypesContext=!1,Xl(Fc.arrow),Hc.inDisallowConditionalTypesContext=t}function op(){switch(Hc.type){case Fc.name:return Hl(),void(!sh()&&Nh(Fc.lessThan)&&_p());case Fc._void:case Fc._null:return void vh();case Fc.string:case Fc.num:case Fc.bigint:case Fc.decimal:case Fc._true:case Fc._false:return void ou();case Fc.minus:return vh(),void ou();case Fc._this:return vh(),void(Yc(Oc._is)&&!sh()&&(vh(),dp()));case Fc._typeof:return ah(Fc._typeof),Nh(Fc._import)?Kl():Hl(),void(!sh()&&Nh(Fc.lessThan)&&_p());case Fc._import:return void Kl();case Fc.braceL:return void(sp()?ip():tp());case Fc.bracketL:return void function(){for(ah(Fc.bracketL);!Ih(Fc.bracketR)&&!Hc.error;)np(),Ih(Fc.comma)}();case Fc.parenL:return ah(Fc.parenL),fp(),void ah(Fc.parenR);case Fc.backQuote:return void function(){for(Ch(),Ch();!Nh(Fc.backQuote)&&!Hc.error;)ah(Fc.dollarBraceL),fp(),Ch(),Ch();vh()}();default:if(Hc.type&Fc.IS_KEYWORD)return vh(),void(Hc.tokens[Hc.tokens.length-1].type=Fc.name)}oh()}function cp(){if(Yc(Oc._keyof)||Yc(Oc._unique)||Yc(Oc._readonly))vh(),cp();else if(Yc(Oc._infer))!function(){if(eh(Oc._infer),wu(),Nh(Fc._extends)){const e=Hc.snapshot();ah(Fc._extends);const t=Hc.inDisallowConditionalTypesContext;Hc.inDisallowConditionalTypesContext=!0,fp(),Hc.inDisallowConditionalTypesContext=t,(Hc.error||!Hc.inDisallowConditionalTypesContext&&Nh(Fc.question))&&Hc.restoreFromSnapshot(e)}}();else{const e=Hc.inDisallowConditionalTypesContext;Hc.inDisallowConditionalTypesContext=!1,function(){for(op();!sh()&&Ih(Fc.bracketL);)Ih(Fc.bracketR)||(fp(),ah(Fc.bracketR))}(),Hc.inDisallowConditionalTypesContext=e}}function hp(){if(Ih(Fc.bitwiseAND),cp(),Nh(Fc.bitwiseAND))for(;Ih(Fc.bitwiseAND);)cp()}function lp(){return!!Nh(Fc.lessThan)||Nh(Fc.parenL)&&function(){const e=Hc.snapshot(),t=function(){if(vh(),Nh(Fc.parenR)||Nh(Fc.ellipsis))return!0;if(function(){if(Nh(Fc.name)||Nh(Fc._this))return vh(),!0;if(Nh(Fc.braceL)||Nh(Fc.bracketL)){let e=1;for(vh();e>0&&!Hc.error;)Nh(Fc.braceL)||Nh(Fc.bracketL)?e++:(Nh(Fc.braceR)||Nh(Fc.bracketR))&&e--,vh();return!0}return!1}()){if(Nh(Fc.colon)||Nh(Fc.comma)||Nh(Fc.question)||Nh(Fc.eq))return!0;if(Nh(Fc.parenR)&&(vh(),Nh(Fc.arrow)))return!0}return!1}();return Hc.restoreFromSnapshot(e),t}()}function pp(e){const t=Eh(0);ah(e);(function(){const e=Hc.snapshot();if(Yc(Oc._asserts))return vh(),Zc(Oc._is)?(fp(),!0):Ul()||Nh(Fc._this)?(vh(),Zc(Oc._is)&&fp(),!0):(Hc.restoreFromSnapshot(e),!1);if(Ul()||Nh(Fc._this))return vh(),Yc(Oc._is)&&!sh()?(vh(),fp(),!0):(Hc.restoreFromSnapshot(e),!1);return!1})()||fp(),Ah(t)}function up(){Nh(Fc.colon)&&dp()}function dp(){const e=Eh(0);ah(Fc.colon),fp(),Ah(e)}function fp(){if(mp(),Hc.inDisallowConditionalTypesContext||sh()||!Ih(Fc._extends))return;const e=Hc.inDisallowConditionalTypesContext;Hc.inDisallowConditionalTypesContext=!0,mp(),Hc.inDisallowConditionalTypesContext=e,ah(Fc.question),fp(),ah(Fc.colon),fp()}function mp(){lp()?ap(rp.TSFunctionType):Nh(Fc._new)?ap(rp.TSConstructorType):Yc(Oc._abstract)&&Lh()===Fc._new?ap(rp.TSAbstractConstructorType):function(){if(Ih(Fc.bitwiseOR),hp(),Nh(Fc.bitwiseOR))for(;Ih(Fc.bitwiseOR);)hp()}()}function yp(){for(;!Nh(Fc.braceL)&&!Hc.error;)xp(),Ih(Fc.comma)}function xp(){Hl(),Nh(Fc.lessThan)&&_p()}function gp(){if(Nh(Fc.string)?ou():wu(),Ih(Fc.eq)){const e=Hc.tokens.length-1;zp(),Hc.tokens[e].rhsEndIndex=Hc.tokens.length}}function kp(){for(Ll(!1),ah(Fc.braceL);!Ih(Fc.braceR)&&!Hc.error;)gp(),Ih(Fc.comma)}function Tp(){ah(Fc.braceL),ud(Fc.braceR)}function bp(){Ll(!1),Ih(Fc.dot)?bp():Tp()}function Sp(){Yc(Oc._global)?wu():Nh(Fc.string)?ru():oh(),Nh(Fc.braceL)?Tp():rh()}function wp(){Dl(),ah(Fc.eq),Yc(Oc._require)&&Lh()===Fc.parenL?(eh(Oc._require),ah(Fc.parenL),Nh(Fc.string)||oh(),ou(),ah(Fc.parenR)):Hl(),rh()}function vp(){return Pp(Hc.contextualKeyword,!0)}function Cp(e){switch(e){case Oc._declare:{const e=Hc.tokens.length-1,t=function(){if(nh())return!1;switch(Hc.type){case Fc._function:{const e=Eh(1);return vh(),xd(Hc.start,!0),Ah(e),!0}case Fc._class:{const e=Eh(1);return kd(!0,!1),Ah(e),!0}case Fc._const:if(Nh(Fc._const)&&Qc(Oc._enum)){const e=Eh(1);return ah(Fc._const),eh(Oc._enum),Hc.tokens[Hc.tokens.length-1].type=Fc._enum,kp(),Ah(e),!0}case Fc._var:case Fc._let:{const e=Eh(1);return ld(Hc.type!==Fc._var),Ah(e),!0}case Fc.name:{const e=Eh(1),t=Hc.contextualKeyword;let s=!1;return t===Oc._global?(Sp(),s=!0):s=Pp(t,!0),Ah(e),s}default:return!1}}();if(t)return Hc.tokens[e].type=Fc._declare,!0;break}case Oc._global:if(Nh(Fc.braceL))return Tp(),!0;break;default:return Pp(e,!1)}return!1}function Pp(e,t){switch(e){case Oc._abstract:if(Ep(t)&&Nh(Fc._class))return Hc.tokens[Hc.tokens.length-1].type=Fc._abstract,kd(!0,!1),!0;break;case Oc._enum:if(Ep(t)&&Nh(Fc.name))return Hc.tokens[Hc.tokens.length-1].type=Fc._enum,kp(),!0;break;case Oc._interface:if(Ep(t)&&Nh(Fc.name)){const e=Eh(t?2:1);return Ll(!1),Jl(),Ih(Fc._extends)&&yp(),tp(),Ah(e),!0}break;case Oc._module:if(Ep(t)){if(Nh(Fc.string)){const e=Eh(t?2:1);return Sp(),Ah(e),!0}if(Nh(Fc.name)){const e=Eh(t?2:1);return bp(),Ah(e),!0}}break;case Oc._namespace:if(Ep(t)&&Nh(Fc.name)){const e=Eh(t?2:1);return bp(),Ah(e),!0}break;case Oc._type:if(Ep(t)&&Nh(Fc.name)){const e=Eh(t?2:1);return Ll(!1),Jl(),ah(Fc.eq),fp(),rh(),Ah(e),!0}}return!1}function Ep(e){return e?(vh(),!0):!nh()}function Ap(){const e=Hc.snapshot();return Wl(),gd(),Nh(Fc.colon)&&pp(Fc.colon),ah(Fc.arrow),Hc.error?(Hc.restoreFromSnapshot(e),!1):(Tu(!0),!0)}function Ip(){Hc.type===Fc.bitShiftL&&(Hc.pos-=1,$h(Fc.lessThan)),_p()}function _p(){const e=Eh(0);for(ah(Fc.lessThan);!Nh(Fc.greaterThan)&&!Hc.error;)fp(),Ih(Fc.comma);e?(ah(Fc.greaterThan),Ah(e)):(Ah(e),Hh(),ah(Fc.greaterThan),Hc.tokens[Hc.tokens.length-1].isType=!0)}function Np(){if(Nh(Fc.name))switch(Hc.contextualKeyword){case Oc._abstract:case Oc._declare:case Oc._enum:case Oc._interface:case Oc._module:case Oc._namespace:case Oc._type:return!0}return!1}function Lp(e,t){return qc?function(e,t){if(!Nh(Fc.lessThan))return Jp(e,t);const s=Hc.snapshot();let i=Jp(e,t);if(!Hc.error)return i;Hc.restoreFromSnapshot(s);Hc.type=Fc.typeParameterStart,Wl(),i=Jp(e,t),i||oh();return i}(e,t):function(e,t){if(!Nh(Fc.lessThan))return Jp(e,t);const s=Hc.snapshot();Wl();const i=Jp(e,t);i||oh();if(!Hc.error)return i;Hc.restoreFromSnapshot(s);return Jp(e,t)}(e,t)}function Dp(){$p()}function Mp(e){Dp(),Ih(Fc.colon)?Dp():Hc.tokens[Hc.tokens.length-1].identifierRole=e}function Op(){const e=Hc.tokens.length;Mp(mh.Access);let t=!1;for(;Nh(Fc.dot);)t=!0,$p(),Dp();if(!t){const t=Hc.tokens[e],s=Kc.charCodeAt(t.start);s>=Rc.lowercaseA&&s<=Rc.lowercaseZ&&(t.identifierRole=null)}}function Fp(){switch(Hc.type){case Fc.braceL:return vh(),Kp(),void $p();case Fc.jsxTagStart:return qp(),void $p();case Fc.string:return void $p();default:oh("JSX value should be either an expression or a quoted JSX text")}}function Rp(){ah(Fc.ellipsis),Kp()}function Bp(e){if(Nh(Fc.jsxTagEnd))return!1;Op(),$c&&function(){if(Ih(Fc.jsxTagStart)){Hc.tokens[Hc.tokens.length-1].type=Fc.typeParameterStart;const e=Eh(1);for(;!Nh(Fc.greaterThan)&&!Hc.error;)fp(),Ih(Fc.comma);$p(),Ah(e)}}();let t=!1;for(;!Nh(Fc.slash)&&!Nh(Fc.jsxTagEnd)&&!Hc.error;)Ih(Fc.braceL)?(t=!0,ah(Fc.ellipsis),zp(),$p()):(t&&Hc.end-Hc.start===3&&Kc.charCodeAt(Hc.start)===Rc.lowercaseK&&Kc.charCodeAt(Hc.start+1)===Rc.lowercaseE&&Kc.charCodeAt(Hc.start+2)===Rc.lowercaseY&&(Hc.tokens[e].jsxRole=yh.KeyAfterPropSpread),Mp(mh.ObjectKey),Nh(Fc.eq)&&($p(),Fp()));const s=Nh(Fc.slash);return s&&$p(),s}function jp(){Nh(Fc.jsxTagEnd)||Op()}function Up(){const e=Hc.tokens.length-1;Hc.tokens[e].jsxRole=yh.NoChildren;let t=0;if(!Bp(e))for(Vp();;)switch(Hc.type){case Fc.jsxTagStart:if($p(),Nh(Fc.slash))return $p(),jp(),void(Hc.tokens[e].jsxRole!==yh.KeyAfterPropSpread&&(1===t?Hc.tokens[e].jsxRole=yh.OneChild:t>1&&(Hc.tokens[e].jsxRole=yh.StaticChildren)));t++,Up(),Vp();break;case Fc.jsxText:t++,Vp();break;case Fc.jsxEmptyText:Vp();break;case Fc.braceL:vh(),Nh(Fc.ellipsis)?(Rp(),Vp(),t+=2):(Nh(Fc.braceR)||(t++,Kp()),Vp());break;default:return void oh()}}function qp(){$p(),Up()}function $p(){Hc.tokens.push(new wh),qh(),Hc.start=Hc.pos;const e=Kc.charCodeAt(Hc.pos);if(dh[e])!function(){let e;do{if(Hc.pos>Kc.length)return void oh("Unexpectedly reached the end of input.");e=Kc.charCodeAt(++Hc.pos)}while(uh[e]||e===Rc.dash);$h(Fc.jsxName)}();else if(e===Rc.quotationMark||e===Rc.apostrophe)!function(e){for(Hc.pos++;;){if(Hc.pos>=Kc.length)return void oh("Unterminated string constant");if(Kc.charCodeAt(Hc.pos)===e){Hc.pos++;break}Hc.pos++}$h(Fc.string)}(e);else switch(++Hc.pos,e){case Rc.greaterThan:$h(Fc.jsxTagEnd);break;case Rc.lessThan:$h(Fc.jsxTagStart);break;case Rc.slash:$h(Fc.slash);break;case Rc.equalsTo:$h(Fc.eq);break;case Rc.leftCurlyBrace:$h(Fc.braceL);break;case Rc.dot:$h(Fc.dot);break;case Rc.colon:$h(Fc.colon);break;default:oh()}}function Vp(){Hc.tokens.push(new wh),Hc.start=Hc.pos,function(){let e=!1,t=!1;for(;;){if(Hc.pos>=Kc.length)return void oh("Unterminated JSX contents");const s=Kc.charCodeAt(Hc.pos);if(s===Rc.lessThan||s===Rc.leftCurlyBrace)return Hc.pos===Hc.start?s===Rc.lessThan?(Hc.pos++,void $h(Fc.jsxTagStart)):void Kh(s):void $h(e&&!t?Fc.jsxEmptyText:Fc.jsxText);s===Rc.lineFeed?e=!0:s!==Rc.space&&s!==Rc.carriageReturn&&s!==Rc.tab&&(t=!0),Hc.pos++}}()}!function(e){e[e.TSFunctionType=0]="TSFunctionType";e[e.TSConstructorType=1]="TSConstructorType";e[e.TSAbstractConstructorType=2]="TSAbstractConstructorType"}(rp||(rp={}));class Hp{constructor(e){this.stop=e}}function Kp(e=!1){if(zp(e),Nh(Fc.comma))for(;Ih(Fc.comma);)zp(e)}function zp(e=!1,t=!1){return $c?Lp(e,t):Vc?function(e,t){if(Nh(Fc.lessThan)){const s=Hc.snapshot();let i=Jp(e,t);if(!Hc.error)return i;Hc.restoreFromSnapshot(s),Hc.type=Fc.typeParameterStart;const n=Eh(0);if(Ou(),Ah(n),i=Jp(e,t),i)return!0;oh()}return Jp(e,t)}(e,t):Jp(e,t)}function Jp(e,t){if(Nh(Fc._yield))return vh(),Nh(Fc.semi)||th()||(Ih(Fc.star),zp()),!1;(Nh(Fc.parenL)||Nh(Fc.name)||Nh(Fc._yield))&&(Hc.potentialArrowAt=Hc.start);const s=function(e){const t=function(e){const t=Hc.tokens.length,s=Gp();if(s)return!0;return Xp(t,-1,e),!1}(e);if(t)return!0;return function(e){$c||Vc?function(e){if(Nh(Fc.question)){const e=Lh();if(e===Fc.colon||e===Fc.comma||e===Fc.parenR)return}Wp(e)}(e):Wp(e)}(e),!1}(e);return t&&pu(),Hc.type&Fc.IS_ASSIGN?(vh(),zp(e),!1):s}function Wp(e){Ih(Fc.question)&&(zp(),ah(Fc.colon),zp(e))}function Xp(e,t,s){if($c&&(Fc._in&Fc.PRECEDENCE_MASK)>t&&!sh()&&(Zc(Oc._as)||Zc(Oc._satisfies))){const i=Eh(1);return fp(),Ah(i),Hh(),void Xp(e,t,s)}const i=Hc.type&Fc.PRECEDENCE_MASK;if(i>0&&(!s||!Nh(Fc._in))&&i>t){const n=Hc.type;vh(),n===Fc.nullishCoalescing&&(Hc.tokens[Hc.tokens.length-1].nullishStartIndex=e);const r=Hc.tokens.length;Gp(),Xp(r,n&Fc.IS_RIGHT_ASSOCIATIVE?i-1:i,s),n===Fc.nullishCoalescing&&(Hc.tokens[e].numNullishCoalesceStarts++,Hc.tokens[Hc.tokens.length-1].numNullishCoalesceEnds++),Xp(e,t,s)}}function Gp(){if($c&&!qc&&Ih(Fc.lessThan))return function(){const e=Eh(1);fp(),ah(Fc.greaterThan),Ah(e),Gp()}(),!1;if(Yc(Oc._module)&&Rh()===Rc.leftCurlyBrace&&!ih())return eh(Oc._module),ah(Fc.braceL),ud(Fc.braceR),!1;if(Hc.type&Fc.IS_PREFIX)return vh(),Gp(),!1;if(Yp())return!0;for(;Hc.type&Fc.IS_POSTFIX&&!th();)Hc.type===Fc.preIncDec&&(Hc.type=Fc.postIncDec),vh();return!1}function Yp(){const e=Hc.tokens.length;return!!ru()||(Qp(e),Hc.tokens.length>e&&Hc.tokens[e].isOptionalChainStart&&(Hc.tokens[Hc.tokens.length-1].isOptionalChainEnd=!0),!1)}function Qp(e,t=!1){Vc?function(e,t=!1){if(Hc.tokens[Hc.tokens.length-1].contextualKeyword===Oc._async&&Nh(Fc.lessThan)){const e=Hc.snapshot(),t=function(){Hc.scopeDepth++;const e=Hc.tokens.length;if(gd(),!lu())return!1;return gu(e),!0}();if(t&&!Hc.error)return;Hc.restoreFromSnapshot(e)}Zp(e,t)}(e,t):Zp(e,t)}function Zp(e,t=!1){const s=new Hp(!1);do{eu(e,t,s)}while(!s.stop&&!Hc.error)}function eu(e,t,s){$c?function(e,t,s){if(sh()||!Ih(Fc.bang)){if(Nh(Fc.lessThan)||Nh(Fc.bitShiftL)){const s=Hc.snapshot();if(!t&&su()&&Ap())return;if(Ip(),!t&&Ih(Fc.parenL)?(Hc.tokens[Hc.tokens.length-1].subscriptStartIndex=e,iu()):Nh(Fc.backQuote)?uu():(Hc.type===Fc.greaterThan||Hc.type!==Fc.parenL&&Boolean(Hc.type&Fc.IS_EXPRESSION_START)&&!sh())&&oh(),!Hc.error)return;Hc.restoreFromSnapshot(s)}else!t&&Nh(Fc.questionDot)&&Lh()===Fc.lessThan&&(vh(),Hc.tokens[e].isOptionalChainStart=!0,Hc.tokens[Hc.tokens.length-1].subscriptStartIndex=e,_p(),ah(Fc.parenL),iu());tu(e,t,s)}else Hc.tokens[Hc.tokens.length-1].type=Fc.nonNullAssertion}(e,t,s):Vc?function(e,t,s){if(Nh(Fc.questionDot)&&Lh()===Fc.lessThan)return t?void(s.stop=!0):(vh(),Fu(),ah(Fc.parenL),void iu());if(!t&&Nh(Fc.lessThan)){const e=Hc.snapshot();if(Fu(),ah(Fc.parenL),iu(),!Hc.error)return;Hc.restoreFromSnapshot(e)}tu(e,t,s)}(e,t,s):tu(e,t,s)}function tu(e,t,s){if(!t&&Ih(Fc.doubleColon))nu(),s.stop=!0,Qp(e,t);else if(Nh(Fc.questionDot)){if(Hc.tokens[e].isOptionalChainStart=!0,t&&Lh()===Fc.parenL)return void(s.stop=!0);vh(),Hc.tokens[Hc.tokens.length-1].subscriptStartIndex=e,Ih(Fc.bracketL)?(Kp(),ah(Fc.bracketR)):Ih(Fc.parenL)?iu():au()}else if(Ih(Fc.dot))Hc.tokens[Hc.tokens.length-1].subscriptStartIndex=e,au();else if(Ih(Fc.bracketL))Hc.tokens[Hc.tokens.length-1].subscriptStartIndex=e,Kp(),ah(Fc.bracketR);else if(!t&&Nh(Fc.parenL))if(su()){const t=Hc.snapshot(),i=Hc.tokens.length;vh(),Hc.tokens[Hc.tokens.length-1].subscriptStartIndex=e;const n=Jc();Hc.tokens[Hc.tokens.length-1].contextId=n,iu(),Hc.tokens[Hc.tokens.length-1].contextId=n,(Nh(Fc.colon)||Nh(Fc.arrow))&&(Hc.restoreFromSnapshot(t),s.stop=!0,Hc.scopeDepth++,gd(),function(e){$c?Nh(Fc.colon)&&dp():Vc&&function(){if(Nh(Fc.colon)){const e=Hc.noAnonFunctionType;Hc.noAnonFunctionType=!0,Zu(),Hc.noAnonFunctionType=e}}();ah(Fc.arrow),gu(e)}(i))}else{vh(),Hc.tokens[Hc.tokens.length-1].subscriptStartIndex=e;const t=Jc();Hc.tokens[Hc.tokens.length-1].contextId=t,iu(),Hc.tokens[Hc.tokens.length-1].contextId=t}else Nh(Fc.backQuote)?uu():s.stop=!0}function su(){return Hc.tokens[Hc.tokens.length-1].contextualKeyword===Oc._async&&!th()}function iu(){let e=!0;for(;!Ih(Fc.parenR)&&!Hc.error;){if(e)e=!1;else if(ah(Fc.comma),Ih(Fc.parenR))break;Su(!1)}}function nu(){const e=Hc.tokens.length;ru(),Qp(e,!0)}function ru(){if(Ih(Fc.modulo))return wu(),!1;if(Nh(Fc.jsxText)||Nh(Fc.jsxEmptyText))return ou(),!1;if(Nh(Fc.lessThan)&&qc)return Hc.type=Fc.jsxTagStart,qp(),vh(),!1;const e=Hc.potentialArrowAt===Hc.start;switch(Hc.type){case Fc.slash:case Fc.assign:Ph();case Fc._super:case Fc._this:case Fc.regexp:case Fc.num:case Fc.bigint:case Fc.decimal:case Fc.string:case Fc._null:case Fc._true:case Fc._false:return vh(),!1;case Fc._import:return vh(),Nh(Fc.dot)&&(Hc.tokens[Hc.tokens.length-1].type=Fc.name,vh(),wu()),!1;case Fc.name:{const t=Hc.tokens.length,s=Hc.start,i=Hc.contextualKeyword;return wu(),i===Oc._await?(Gp(),!1):i===Oc._async&&Nh(Fc._function)&&!th()?(vh(),xd(s,!1),!1):e&&i===Oc._async&&!th()&&Nh(Fc.name)?(Hc.scopeDepth++,Ll(!1),ah(Fc.arrow),gu(t),!0):Nh(Fc._do)&&!th()?(vh(),pd(),!1):e&&!th()&&Nh(Fc.arrow)?(Hc.scopeDepth++,Ml(!1),ah(Fc.arrow),gu(t),!0):(Hc.tokens[Hc.tokens.length-1].identifierRole=mh.Access,!1)}case Fc._do:return vh(),pd(),!1;case Fc.parenL:return hu(e);case Fc.bracketL:return vh(),bu(Fc.bracketR,!0),!1;case Fc.braceL:return du(!1,!1),!1;case Fc._function:return function(){const e=Hc.start;wu(),Ih(Fc.dot)&&wu();xd(e,!1)}(),!1;case Fc.at:od();case Fc._class:return kd(!1),!1;case Fc._new:return function(){if(ah(Fc._new),Ih(Fc.dot))return void wu();nu(),void Ih(Fc.questionDot),Vc&&function(){if(Nh(Fc.lessThan)){const e=Hc.snapshot();Fu(),Hc.error&&Hc.restoreFromSnapshot(e)}}();Ih(Fc.parenL)&&bu(Fc.parenR)}(),!1;case Fc.backQuote:return uu(),!1;case Fc.doubleColon:return vh(),nu(),!1;case Fc.hash:{const e=Rh();return dh[e]||e===Rc.backslash?au():vh(),!1}default:return oh(),!1}}function au(){Ih(Fc.hash),wu()}function ou(){vh()}function cu(){ah(Fc.parenL),Kp(),ah(Fc.parenR)}function hu(e){const t=Hc.snapshot(),s=Hc.tokens.length;ah(Fc.parenL);let i=!0;for(;!Nh(Fc.parenR)&&!Hc.error;){if(i)i=!1;else if(ah(Fc.comma),Nh(Fc.parenR))break;if(Nh(Fc.ellipsis)){Nl(!1),pu();break}zp(!1,!0)}if(ah(Fc.parenR),e&&(Nh(Fc.colon)||!th())){if(lu())return Hc.restoreFromSnapshot(t),Hc.scopeDepth++,gd(),lu(),gu(s),!Hc.error||(Hc.restoreFromSnapshot(t),hu(!1),!1)}return!1}function lu(){return $c?function(){if(Nh(Fc.colon)){const e=Hc.snapshot();pp(Fc.colon),th()&&oh(),Nh(Fc.arrow)||oh(),Hc.error&&Hc.restoreFromSnapshot(e)}return Ih(Fc.arrow)}():Vc?function(){if(Nh(Fc.colon)){const e=Eh(0),t=Hc.snapshot(),s=Hc.noAnonFunctionType;Hc.noAnonFunctionType=!0,Pu(),Hc.noAnonFunctionType=s,th()&&oh(),Nh(Fc.arrow)||oh(),Hc.error&&Hc.restoreFromSnapshot(t),Ah(e)}return Ih(Fc.arrow)}():Ih(Fc.arrow)}function pu(){($c||Vc)&&(_h(Fc.question),Nh(Fc.colon)&&($c?dp():Vc&&Zu()))}function uu(){for(Ch(),Ch();!Nh(Fc.backQuote)&&!Hc.error;)ah(Fc.dollarBraceL),Kp(),Ch(),Ch();vh()}function du(e,t){const s=Jc();let i=!0;for(vh(),Hc.tokens[Hc.tokens.length-1].contextId=s;!Ih(Fc.braceR)&&!Hc.error;){if(i)i=!1;else if(ah(Fc.comma),Ih(Fc.braceR))break;let n=!1;if(Nh(Fc.ellipsis)){const s=Hc.tokens.length;if(_l(),e&&(Hc.tokens.length===s+2&&Ml(t),Ih(Fc.braceR)))break;continue}e||(n=Ih(Fc.star)),!e&&Yc(Oc._async)?(n&&oh(),wu(),Nh(Fc.colon)||Nh(Fc.parenL)||Nh(Fc.braceR)||Nh(Fc.eq)||Nh(Fc.comma)||(Nh(Fc.star)&&(vh(),n=!0),yu(s))):yu(s),mu(e,t,s)}Hc.tokens[Hc.tokens.length-1].contextId=s}function fu(e,t){const s=Hc.start;return Nh(Fc.parenL)?(e&&oh(),xu(s,!1),!0):!!function(e){return!e&&(Nh(Fc.string)||Nh(Fc.num)||Nh(Fc.bracketL)||Nh(Fc.name)||!!(Hc.type&Fc.IS_KEYWORD))}(e)&&(yu(t),xu(s,!1),!0)}function mu(e,t,s){$c?Jl():Vc&&Nh(Fc.lessThan)&&(Ou(),Nh(Fc.parenL)||oh());fu(e,s)||function(e,t){if(Ih(Fc.colon))return void(e?jl(t):zp(!1));let s;s=e?0===Hc.scopeDepth?mh.ObjectShorthandTopLevelDeclaration:t?mh.ObjectShorthandBlockScopedDeclaration:mh.ObjectShorthandFunctionScopedDeclaration:mh.ObjectShorthand,Hc.tokens[Hc.tokens.length-1].identifierRole=s,jl(t,!0)}(e,t)}function yu(e){Vc&&td(),Ih(Fc.bracketL)?(Hc.tokens[Hc.tokens.length-1].contextId=e,zp(),ah(Fc.bracketR),Hc.tokens[Hc.tokens.length-1].contextId=e):(Nh(Fc.num)||Nh(Fc.string)||Nh(Fc.bigint)||Nh(Fc.decimal)?ru():au(),Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ObjectKey,Hc.tokens[Hc.tokens.length-1].contextId=e)}function xu(e,t){const s=Jc();Hc.scopeDepth++;const i=Hc.tokens.length;gd(t,s),ku(e,s);const n=Hc.tokens.length;Hc.scopes.push(new Bc(i,n,!0)),Hc.scopeDepth--}function gu(e){Tu(!0);const t=Hc.tokens.length;Hc.scopes.push(new Bc(e,t,!0)),Hc.scopeDepth--}function ku(e,t=0){$c?function(e,t){if(Nh(Fc.colon)&&pp(Fc.colon),!Nh(Fc.braceL)&&nh()){let t=Hc.tokens.length-1;for(;t>=0&&(Hc.tokens[t].start>=e||Hc.tokens[t].type===Fc._default||Hc.tokens[t].type===Fc._export);)Hc.tokens[t].isType=!0,t--;return}Tu(!1,t)}(e,t):Vc?function(e){Nh(Fc.colon)&&Pu();Tu(!1,e)}(t):Tu(!1,t)}function Tu(e,t=0){e&&!Nh(Fc.braceL)?zp():pd(!0,t)}function bu(e,t=!1){let s=!0;for(;!Ih(e)&&!Hc.error;){if(s)s=!1;else if(ah(Fc.comma),Ih(e))break;Su(t)}}function Su(e){e&&Nh(Fc.comma)||(Nh(Fc.ellipsis)?(_l(),pu()):Nh(Fc.question)?vh():zp(!1,!0))}function wu(){vh(),Hc.tokens[Hc.tokens.length-1].type=Fc.name}function vu(e){const t=Eh(0);ah(e||Fc.colon),Qu(),Ah(t)}function Cu(){ah(Fc.modulo),eh(Oc._checks),Ih(Fc.parenL)&&(Kp(),ah(Fc.parenR))}function Pu(){const e=Eh(0);ah(Fc.colon),Nh(Fc.modulo)?Cu():(Qu(),Nh(Fc.modulo)&&Cu()),Ah(e)}function Eu(){Nh(Fc._class)?(vh(),Au(!0)):Nh(Fc._function)?(vh(),wu(),Nh(Fc.lessThan)&&Ou(),ah(Fc.parenL),Ju(),ah(Fc.parenR),Pu(),rh()):Nh(Fc._var)?(vh(),ed(),rh()):Zc(Oc._module)?Ih(Fc.dot)?(eh(Oc._exports),Zu(),rh()):function(){Nh(Fc.string)?ru():wu();ah(Fc.braceL);for(;!Nh(Fc.braceR)&&!Hc.error;)Nh(Fc._import)?(vh(),Md()):oh();ah(Fc.braceR)}():Yc(Oc._type)?(vh(),Lu()):Yc(Oc._opaque)?(vh(),Du(!0)):Yc(Oc._interface)?(vh(),Au()):Nh(Fc._export)?(ah(Fc._export),Ih(Fc._default)?Nh(Fc._function)||Nh(Fc._class)?Eu():(Qu(),rh()):Nh(Fc._var)||Nh(Fc._function)||Nh(Fc._class)||Yc(Oc._opaque)?Eu():Nh(Fc.star)||Nh(Fc.braceL)||Yc(Oc._interface)||Yc(Oc._type)||Yc(Oc._opaque)?Ed():oh()):oh()}function Au(e=!1){if(Nu(),Nh(Fc.lessThan)&&Ou(),Ih(Fc._extends))do{Iu()}while(!e&&Ih(Fc.comma));if(Yc(Oc._mixins)){vh();do{Iu()}while(Ih(Fc.comma))}if(Yc(Oc._implements)){vh();do{Iu()}while(Ih(Fc.comma))}$u(e,!1,e)}function Iu(){Ku(!1),Nh(Fc.lessThan)&&Fu()}function _u(){Au()}function Nu(){wu()}function Lu(){Nu(),Nh(Fc.lessThan)&&Ou(),vu(Fc.eq),rh()}function Du(e){eh(Oc._type),Nu(),Nh(Fc.lessThan)&&Ou(),Nh(Fc.colon)&&vu(Fc.colon),e||vu(Fc.eq),rh()}function Mu(){td(),ed(),Ih(Fc.eq)&&Qu()}function Ou(){const e=Eh(0);Nh(Fc.lessThan)||Nh(Fc.typeParameterStart)?vh():oh();do{Mu(),Nh(Fc.greaterThan)||ah(Fc.comma)}while(!Nh(Fc.greaterThan)&&!Hc.error);ah(Fc.greaterThan),Ah(e)}function Fu(){const e=Eh(0);for(ah(Fc.lessThan);!Nh(Fc.greaterThan)&&!Hc.error;)Qu(),Nh(Fc.greaterThan)||ah(Fc.comma);ah(Fc.greaterThan),Ah(e)}function Ru(){Nh(Fc.num)||Nh(Fc.string)?ru():wu()}function Bu(){Lh()===Fc.colon?(Ru(),vu()):Qu(),ah(Fc.bracketR),vu()}function ju(){Ru(),ah(Fc.bracketR),ah(Fc.bracketR),Nh(Fc.lessThan)||Nh(Fc.parenL)?Uu():(Ih(Fc.question),vu())}function Uu(){for(Nh(Fc.lessThan)&&Ou(),ah(Fc.parenL);!Nh(Fc.parenR)&&!Nh(Fc.ellipsis)&&!Hc.error;)zu(),Nh(Fc.parenR)||ah(Fc.comma);Ih(Fc.ellipsis)&&zu(),ah(Fc.parenR),vu()}function qu(){Uu()}function $u(e,t,s){let i;for(t&&Nh(Fc.braceBarL)?(ah(Fc.braceBarL),i=Fc.braceBarR):(ah(Fc.braceL),i=Fc.braceR);!Nh(i)&&!Hc.error;){if(s&&Yc(Oc._proto)){const t=Lh();t!==Fc.colon&&t!==Fc.question&&(vh(),e=!1)}if(e&&Yc(Oc._static)){const e=Lh();e!==Fc.colon&&e!==Fc.question&&vh()}if(td(),Ih(Fc.bracketL))Ih(Fc.bracketL)?ju():Bu();else if(Nh(Fc.parenL)||Nh(Fc.lessThan))qu();else{if(Yc(Oc._get)||Yc(Oc._set)){const e=Lh();e!==Fc.name&&e!==Fc.string&&e!==Fc.num||vh()}Vu()}Hu()}ah(i)}function Vu(){if(Nh(Fc.ellipsis)){if(ah(Fc.ellipsis),Ih(Fc.comma)||Ih(Fc.semi),Nh(Fc.braceR))return;Qu()}else Ru(),Nh(Fc.lessThan)||Nh(Fc.parenL)?Uu():(Ih(Fc.question),vu())}function Hu(){Ih(Fc.semi)||Ih(Fc.comma)||Nh(Fc.braceR)||Nh(Fc.braceBarR)||oh()}function Ku(e){for(e||wu();Ih(Fc.dot);)wu()}function zu(){const e=Lh();e===Fc.colon||e===Fc.question?(wu(),Ih(Fc.question),vu()):Qu()}function Ju(){for(;!Nh(Fc.parenR)&&!Nh(Fc.ellipsis)&&!Hc.error;)zu(),Nh(Fc.parenR)||ah(Fc.comma);Ih(Fc.ellipsis)&&zu()}function Wu(){let e=!1;const t=Hc.noAnonFunctionType;switch(Hc.type){case Fc.name:return Yc(Oc._interface)?void function(){if(eh(Oc._interface),Ih(Fc._extends))do{Iu()}while(Ih(Fc.comma));$u(!1,!1,!1)}():(wu(),Ku(!0),void(Nh(Fc.lessThan)&&Fu()));case Fc.braceL:return void $u(!1,!1,!1);case Fc.braceBarL:return void $u(!1,!0,!1);case Fc.bracketL:return void function(){for(ah(Fc.bracketL);Hc.pos<Kc.length&&!Nh(Fc.bracketR)&&(Qu(),!Nh(Fc.bracketR));)ah(Fc.comma);ah(Fc.bracketR)}();case Fc.lessThan:return Ou(),ah(Fc.parenL),Ju(),ah(Fc.parenR),ah(Fc.arrow),void Qu();case Fc.parenL:if(vh(),!Nh(Fc.parenR)&&!Nh(Fc.ellipsis))if(Nh(Fc.name)){const t=Lh();e=t!==Fc.question&&t!==Fc.colon}else e=!0;if(e){if(Hc.noAnonFunctionType=!1,Qu(),Hc.noAnonFunctionType=t,Hc.noAnonFunctionType||!(Nh(Fc.comma)||Nh(Fc.parenR)&&Lh()===Fc.arrow))return void ah(Fc.parenR);Ih(Fc.comma)}return Ju(),ah(Fc.parenR),ah(Fc.arrow),void Qu();case Fc.minus:return vh(),void ou();case Fc.string:case Fc.num:case Fc._true:case Fc._false:case Fc._null:case Fc._this:case Fc._void:case Fc.star:return void vh();default:if(Hc.type===Fc._typeof)return ah(Fc._typeof),void Wu();if(Hc.type&Fc.IS_KEYWORD)return vh(),void(Hc.tokens[Hc.tokens.length-1].type=Fc.name)}oh()}function Xu(){Ih(Fc.question)?Xu():function(){for(Wu();!th()&&(Nh(Fc.bracketL)||Nh(Fc.questionDot));)Ih(Fc.questionDot),ah(Fc.bracketL),Ih(Fc.bracketR)||(Qu(),ah(Fc.bracketR))}()}function Gu(){Xu(),!Hc.noAnonFunctionType&&Ih(Fc.arrow)&&Qu()}function Yu(){for(Ih(Fc.bitwiseAND),Gu();Ih(Fc.bitwiseAND);)Gu()}function Qu(){!function(){for(Ih(Fc.bitwiseOR),Yu();Ih(Fc.bitwiseOR);)Yu()}()}function Zu(){vu()}function ed(){wu(),Nh(Fc.colon)&&Zu()}function td(){(Nh(Fc.plus)||Nh(Fc.minus))&&(vh(),Hc.tokens[Hc.tokens.length-1].isType=!0)}function sd(){if(Nh(Fc._typeof)||Yc(Oc._type)){const t=Mh();(((e=t).type===Fc.name||e.type&Fc.IS_KEYWORD)&&e.contextualKeyword!==Oc._from||t.type===Fc.braceL||t.type===Fc.star)&&vh()}var e}function id(){eh(Oc._enum),Hc.tokens[Hc.tokens.length-1].type=Fc._enum,wu(),function(){Zc(Oc._of)&&vh();ah(Fc.braceL),function(){for(;!Nh(Fc.braceR)&&!Hc.error&&!Ih(Fc.ellipsis);)nd(),Nh(Fc.braceR)||ah(Fc.comma)}(),ah(Fc.braceR)}()}function nd(){wu(),Ih(Fc.eq)&&vh()}function rd(e){Vc&&function(){if(Nh(Fc.name)&&Hc.contextualKeyword===Oc._interface){const e=Eh(0);return vh(),_u(),Ah(e),!0}return!!Yc(Oc._enum)&&(id(),!0)}()||(Nh(Fc.at)&&od(),function(e){if($c&&function(){if(Hc.type===Fc._const){const e=Mh();if(e.type===Fc.name&&e.contextualKeyword===Oc._enum)return ah(Fc._const),eh(Oc._enum),Hc.tokens[Hc.tokens.length-1].type=Fc._enum,kp(),!0}return!1}())return;const t=Hc.type;switch(t){case Fc._break:case Fc._continue:return vh(),void(nh()||(wu(),rh()));case Fc._debugger:return vh(),void rh();case Fc._do:return vh(),rd(!1),ah(Fc._while),cu(),void Ih(Fc.semi);case Fc._for:return void function(){Hc.scopeDepth++;const e=Hc.tokens.length;!function(){vh();let e=!1;Yc(Oc._await)&&(e=!0,vh());if(ah(Fc.parenL),Nh(Fc.semi))return e&&oh(),void dd();const t=ad();if(t||Nh(Fc._var)||Nh(Fc._let)||Nh(Fc._const)||function(){if(!Yc(Oc._using))return!1;if(Qc(Oc._of))return!1;return!0}())return t&&eh(Oc._await),vh(),md(!0,Hc.type!==Fc._var),Nh(Fc._in)||Yc(Oc._of)?void fd(e):void dd();if(Kp(!0),Nh(Fc._in)||Yc(Oc._of))return void fd(e);e&&oh();dd()}();const t=Hc.tokens.length;Hc.scopes.push(new Bc(e,t,!1)),Hc.scopeDepth--}();case Fc._function:if(Lh()===Fc.dot)break;return e||oh(),void function(){const e=Hc.start;vh(),xd(e,!0)}();case Fc._class:return e||oh(),void kd(!0);case Fc._if:return vh(),cu(),rd(!1),void(Ih(Fc._else)&&rd(!1));case Fc._return:return vh(),void(nh()||(Kp(),rh()));case Fc._switch:return void function(){vh(),cu(),Hc.scopeDepth++;const e=Hc.tokens.length;ah(Fc.braceL);for(;!Nh(Fc.braceR)&&!Hc.error;)if(Nh(Fc._case)||Nh(Fc._default)){const e=Nh(Fc._case);vh(),e&&Kp(),ah(Fc.colon)}else rd(!0);vh();const t=Hc.tokens.length;Hc.scopes.push(new Bc(e,t,!1)),Hc.scopeDepth--}();case Fc._throw:return vh(),Kp(),void rh();case Fc._try:return void function(){if(vh(),pd(),Nh(Fc._catch)){vh();let e=null;if(Nh(Fc.parenL)&&(Hc.scopeDepth++,e=Hc.tokens.length,ah(Fc.parenL),Ol(!0),$c&&up(),ah(Fc.parenR)),pd(),null!=e){const t=Hc.tokens.length;Hc.scopes.push(new Bc(e,t,!1)),Hc.scopeDepth--}}Ih(Fc._finally)&&pd()}();case Fc._let:case Fc._const:e||oh();case Fc._var:return void ld(t!==Fc._var);case Fc._while:return vh(),cu(),void rd(!1);case Fc.braceL:return void pd();case Fc.semi:return void vh();case Fc._export:case Fc._import:{const e=Lh();if(e===Fc.parenL||e===Fc.dot)break;return vh(),void(t===Fc._import?Md():Ed())}case Fc.name:if(Hc.contextualKeyword===Oc._async){const e=Hc.start,t=Hc.snapshot();if(vh(),Nh(Fc._function)&&!th())return ah(Fc._function),void xd(e,!0);Hc.restoreFromSnapshot(t)}else{if(Hc.contextualKeyword===Oc._using&&!ih()&&Lh()===Fc.name)return void ld(!0);if(ad())return eh(Oc._await),void ld(!0)}}const s=Hc.tokens.length;Kp();let i=null;if(Hc.tokens.length===s+1){const e=Hc.tokens[Hc.tokens.length-1];e.type===Fc.name&&(i=e.contextualKeyword)}if(null==i)return void rh();Ih(Fc.colon)?rd(!0):(n=i,$c?function(e){Cp(e)||rh()}(n):Vc?function(e){if(e===Oc._declare){if(Nh(Fc._class)||Nh(Fc.name)||Nh(Fc._function)||Nh(Fc._var)||Nh(Fc._export)){const e=Eh(1);Eu(),Ah(e)}}else if(Nh(Fc.name))if(e===Oc._interface){const e=Eh(1);_u(),Ah(e)}else if(e===Oc._type){const e=Eh(1);Lu(),Ah(e)}else if(e===Oc._opaque){const e=Eh(1);Du(!1),Ah(e)}rh()}(n):rh());var n}(e))}function ad(){if(!Yc(Oc._await))return!1;const e=Hc.snapshot();return vh(),!Yc(Oc._using)||sh()?(Hc.restoreFromSnapshot(e),!1):(vh(),!Nh(Fc.name)||sh()?(Hc.restoreFromSnapshot(e),!1):(Hc.restoreFromSnapshot(e),!0))}function od(){for(;Nh(Fc.at);)cd()}function cd(){if(vh(),Ih(Fc.parenL))Kp(),ah(Fc.parenR);else{for(wu();Ih(Fc.dot);)wu();$c?((Nh(Fc.lessThan)||Nh(Fc.bitShiftL))&&Ip(),hd()):hd()}}function hd(){Ih(Fc.parenL)&&iu()}function ld(e){vh(),md(!1,e),rh()}function pd(e=!1,t=0){const s=Hc.tokens.length;Hc.scopeDepth++,ah(Fc.braceL),t&&(Hc.tokens[Hc.tokens.length-1].contextId=t),ud(Fc.braceR),t&&(Hc.tokens[Hc.tokens.length-1].contextId=t);const i=Hc.tokens.length;Hc.scopes.push(new Bc(s,i,e)),Hc.scopeDepth--}function ud(e){for(;!Ih(e)&&!Hc.error;)rd(!0)}function dd(){ah(Fc.semi),Nh(Fc.semi)||Kp(),ah(Fc.semi),Nh(Fc.parenR)||Kp(),ah(Fc.parenR),rd(!1)}function fd(e){e?Zc(Oc._of):vh(),Kp(),ah(Fc.parenR),rd(!1)}function md(e,t){for(;;){if(yd(t),Ih(Fc.eq)){const t=Hc.tokens.length-1;zp(e),Hc.tokens[t].rhsEndIndex=Hc.tokens.length}if(!Ih(Fc.comma))break}}function yd(e){Ol(e),$c?function(){const e=Eh(0);sh()||Ih(Fc.bang),up(),Ah(e)}():Vc&&Nh(Fc.colon)&&Zu()}function xd(e,t,s=!1){Nh(Fc.star)&&vh(),!t||s||Nh(Fc.name)||Nh(Fc._yield)||oh();let i=null;Nh(Fc.name)&&(t||(i=Hc.tokens.length,Hc.scopeDepth++),Ll(!1));const n=Hc.tokens.length;Hc.scopeDepth++,gd(),ku(e);const r=Hc.tokens.length;Hc.scopes.push(new Bc(n,r,!0)),Hc.scopeDepth--,null!==i&&(Hc.scopes.push(new Bc(i,r,!0)),Hc.scopeDepth--)}function gd(e=!1,t=0){$c?Jl():Vc&&function(){if(Nh(Fc.lessThan)){const e=Eh(0);Ou(),Ah(e)}}(),ah(Fc.parenL),t&&(Hc.tokens[Hc.tokens.length-1].contextId=t),Fl(Fc.parenR,!1,!1,e,t),t&&(Hc.tokens[Hc.tokens.length-1].contextId=t)}function kd(e,t=!1){const s=Jc();vh(),Hc.tokens[Hc.tokens.length-1].contextId=s,Hc.tokens[Hc.tokens.length-1].isExpression=!e;let i=null;e||(i=Hc.tokens.length,Hc.scopeDepth++),function(e,t=!1){if($c&&(!e||t)&&Yc(Oc._implements))return;Nh(Fc.name)&&Ll(!0);$c?Jl():Vc&&Nh(Fc.lessThan)&&Ou()}(e,t),function(){let e=!1;Ih(Fc._extends)?(Yp(),e=!0):e=!1;$c?function(e){if(e&&(Nh(Fc.lessThan)||Nh(Fc.bitShiftL))&&Ip(),Zc(Oc._implements)){Hc.tokens[Hc.tokens.length-1].type=Fc._implements;const e=Eh(1);yp(),Ah(e)}}(e):Vc&&function(e){if(e&&Nh(Fc.lessThan)&&Fu(),Yc(Oc._implements)){const e=Eh(0);vh(),Hc.tokens[Hc.tokens.length-1].type=Fc._implements;do{Nu(),Nh(Fc.lessThan)&&Fu()}while(Ih(Fc.comma));Ah(e)}}(e)}();const n=Hc.tokens.length;if(function(e){ah(Fc.braceL);for(;!Ih(Fc.braceR)&&!Hc.error;){if(Ih(Fc.semi))continue;if(Nh(Fc.at)){cd();continue}Sd(Hc.start,e)}}(s),!Hc.error&&(Hc.tokens[n].contextId=s,Hc.tokens[Hc.tokens.length-1].contextId=s,null!==i)){const e=Hc.tokens.length;Hc.scopes.push(new Bc(i,e,!1)),Hc.scopeDepth--}}function Td(){return Nh(Fc.eq)||Nh(Fc.semi)||Nh(Fc.braceR)||Nh(Fc.bang)||Nh(Fc.colon)}function bd(){return Nh(Fc.parenL)||Nh(Fc.lessThan)}function Sd(e,t){$c&&$l([Oc._declare,Oc._public,Oc._protected,Oc._private,Oc._override]);let s=!1;if(Nh(Fc.name)&&Hc.contextualKeyword===Oc._static){if(wu(),bd())return void wd(e,!1);if(Td())return void Pd();if(Hc.tokens[Hc.tokens.length-1].type=Fc._static,s=!0,Nh(Fc.braceL))return Hc.tokens[Hc.tokens.length-1].contextId=t,void pd()}!function(e,t,s){if($c&&function(e){const t=Hc.tokens.length;$l([Oc._abstract,Oc._readonly,Oc._declare,Oc._static,Oc._override]);const s=Hc.tokens.length;if(Ql()){for(let i=e?t-1:t;i<s;i++)Hc.tokens[i].isType=!0;return!0}return!1}(t))return;if(Ih(Fc.star))return vd(s),void wd(e,!1);vd(s);let i=!1;const n=Hc.tokens[Hc.tokens.length-1];n.contextualKeyword===Oc._constructor&&(i=!0);if(Cd(),bd())wd(e,i);else if(Td())Pd();else if(n.contextualKeyword!==Oc._async||nh())n.contextualKeyword!==Oc._get&&n.contextualKeyword!==Oc._set||nh()&&Nh(Fc.star)?n.contextualKeyword!==Oc._accessor||nh()?nh()?Pd():oh():(vd(s),Pd()):(n.contextualKeyword===Oc._get?Hc.tokens[Hc.tokens.length-1].type=Fc._get:Hc.tokens[Hc.tokens.length-1].type=Fc._set,vd(s),wd(e,!1));else{Hc.tokens[Hc.tokens.length-1].type=Fc._async;Nh(Fc.star)&&vh(),vd(s),Cd(),wd(e,!1)}}(e,s,t)}function wd(e,t){$c?Jl():Vc&&Nh(Fc.lessThan)&&Ou(),xu(e,t)}function vd(e){yu(e)}function Cd(){if($c){const e=Eh(0);Ih(Fc.question),Ah(e)}}function Pd(){if($c?(_h(Fc.bang),up()):Vc&&Nh(Fc.colon)&&Zu(),Nh(Fc.eq)){const e=Hc.tokens.length;vh(),zp(),Hc.tokens[e].rhsEndIndex=Hc.tokens.length}rh()}function Ed(){const e=Hc.tokens.length-1;$c&&function(){if(Ih(Fc._import))return Yc(Oc._type)&&Lh()!==Fc.eq&&eh(Oc._type),wp(),!0;if(Ih(Fc.eq))return Kp(),rh(),!0;if(Zc(Oc._as))return eh(Oc._namespace),wu(),rh(),!0;if(Yc(Oc._type)){const e=Lh();e!==Fc.braceL&&e!==Fc.star||vh()}return!1}()||((Vc?Nh(Fc.star)||Yc(Oc._type)&&Lh()===Fc.star:Nh(Fc.star))?Vc?function(){if(Zc(Oc._type)){const e=Eh(2);_d(),Ah(e)}else _d()}():_d():function(){if($c&&Np())return!1;if(Vc&&Nh(Fc.name)&&(Hc.contextualKeyword===Oc._type||Hc.contextualKeyword===Oc._interface||Hc.contextualKeyword===Oc._opaque||Hc.contextualKeyword===Oc._enum))return!1;if(Nh(Fc.name))return Hc.contextualKeyword!==Oc._async;if(!Nh(Fc._default))return!1;const e=Oh(),t=Mh(),s=t.type===Fc.name&&t.contextualKeyword===Oc._from;if(t.type===Fc.comma)return!0;if(s){const t=Kc.charCodeAt(Fh(e+4));return t===Rc.quotationMark||t===Rc.apostrophe}return!1}()?(wu(),Nh(Fc.comma)&&Lh()===Fc.star?(ah(Fc.comma),ah(Fc.star),eh(Oc._as),wu()):Ad(),Id()):Ih(Fc._default)?function(){if($c&&function(){if(Yc(Oc._abstract)&&Lh()===Fc._class)return Hc.type=Fc._abstract,vh(),kd(!0,!0),!0;if(Yc(Oc._interface)){const e=Eh(2);return Pp(Oc._interface,!0),Ah(e),!0}return!1}())return;if(Vc&&Yc(Oc._enum)&&(id(),1))return;const e=Hc.start;Ih(Fc._function)?xd(e,!0,!0):Yc(Oc._async)&&Lh()===Fc._function?(Zc(Oc._async),Ih(Fc._function),xd(e,!0,!0)):Nh(Fc._class)?kd(!0,!0):Nh(Fc.at)?(od(),kd(!0,!0)):(zp(),rh())}():$c&&Np()||Vc&&(Yc(Oc._type)||Yc(Oc._interface)||Yc(Oc._opaque)||Yc(Oc._enum))||Hc.type===Fc._var||Hc.type===Fc._const||Hc.type===Fc._let||Hc.type===Fc._function||Hc.type===Fc._class||Yc(Oc._async)||Nh(Fc.at)?$c?function(){const e=Zc(Oc._declare);e&&(Hc.tokens[Hc.tokens.length-1].type=Fc._declare);let t=!1;if(Nh(Fc.name))if(e){const e=Eh(2);t=vp(),Ah(e)}else t=vp();if(!t)if(e){const e=Eh(2);rd(!0),Ah(e)}else rd(!0)}():Vc?function(){if(Yc(Oc._type)){const e=Eh(1);vh(),Nh(Fc.braceL)?(Nd(),Id()):Lu(),Ah(e)}else if(Yc(Oc._opaque)){const e=Eh(1);vh(),Du(!1),Ah(e)}else if(Yc(Oc._interface)){const e=Eh(1);vh(),_u(),Ah(e)}else rd(!0)}():rd(!0):(Nd(),Id()),Hc.tokens[e].rhsEndIndex=Hc.tokens.length)}function Ad(){Ih(Fc.comma)&&Nd()}function Id(){Zc(Oc._from)&&(ru(),Rd()),rh()}function _d(){ah(Fc.star),Yc(Oc._as)?(vh(),Hc.tokens[Hc.tokens.length-1].type=Fc._as,wu(),Ad(),Id()):Id()}function Nd(){let e=!0;for(ah(Fc.braceL);!Ih(Fc.braceR)&&!Hc.error;){if(e)e=!1;else if(ah(Fc.comma),Ih(Fc.braceR))break;Ld()}}function Ld(){$c?function(){if(wu(),Nh(Fc.comma)||Nh(Fc.braceR))Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ExportAccess;else{if(wu(),Nh(Fc.comma)||Nh(Fc.braceR))return Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ExportAccess,Hc.tokens[Hc.tokens.length-2].isType=!0,void(Hc.tokens[Hc.tokens.length-1].isType=!0);wu(),Nh(Fc.comma)||Nh(Fc.braceR)?Hc.tokens[Hc.tokens.length-3].identifierRole=mh.ExportAccess:(wu(),Hc.tokens[Hc.tokens.length-3].identifierRole=mh.ExportAccess,Hc.tokens[Hc.tokens.length-4].isType=!0,Hc.tokens[Hc.tokens.length-3].isType=!0,Hc.tokens[Hc.tokens.length-2].isType=!0,Hc.tokens[Hc.tokens.length-1].isType=!0)}}():(wu(),Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ExportAccess,Zc(Oc._as)&&wu())}function Dd(){Yc(Oc._module)&&function(){const e=Hc.snapshot();return eh(Oc._module),Zc(Oc._from)?Yc(Oc._from)?(Hc.restoreFromSnapshot(e),!0):(Hc.restoreFromSnapshot(e),!1):Nh(Fc.comma)?(Hc.restoreFromSnapshot(e),!1):(Hc.restoreFromSnapshot(e),!0)}()&&vh()}function Md(){if($c&&Nh(Fc.name)&&Lh()===Fc.eq)wp();else{if($c&&Yc(Oc._type)){const e=Mh();if(e.type===Fc.name&&e.contextualKeyword!==Oc._from){if(eh(Oc._type),Lh()===Fc.eq)return void wp()}else e.type!==Fc.star&&e.type!==Fc.braceL||eh(Oc._type)}Nh(Fc.string)||(Dd(),function(){Vc&&sd();let e=!0;if(Nh(Fc.name)&&(Od(),!Ih(Fc.comma)))return;if(Nh(Fc.star))return vh(),eh(Oc._as),void Od();ah(Fc.braceL);for(;!Ih(Fc.braceR)&&!Hc.error;){if(e)e=!1;else if(Ih(Fc.colon)&&oh("ES2015 named imports do not destructure. Use another statement for destructuring after the import."),ah(Fc.comma),Ih(Fc.braceR))break;Fd()}}(),eh(Oc._from)),ru(),Rd(),rh()}}function Od(){Dl()}function Fd(){$c?function(){if(wu(),Nh(Fc.comma)||Nh(Fc.braceR))Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ImportDeclaration;else{if(wu(),Nh(Fc.comma)||Nh(Fc.braceR))return Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ImportDeclaration,Hc.tokens[Hc.tokens.length-2].isType=!0,void(Hc.tokens[Hc.tokens.length-1].isType=!0);if(wu(),Nh(Fc.comma)||Nh(Fc.braceR))return Hc.tokens[Hc.tokens.length-3].identifierRole=mh.ImportAccess,void(Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ImportDeclaration);wu(),Hc.tokens[Hc.tokens.length-3].identifierRole=mh.ImportAccess,Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ImportDeclaration,Hc.tokens[Hc.tokens.length-4].isType=!0,Hc.tokens[Hc.tokens.length-3].isType=!0,Hc.tokens[Hc.tokens.length-2].isType=!0,Hc.tokens[Hc.tokens.length-1].isType=!0}}():Vc?function(){const e=Hc.contextualKeyword===Oc._type||Hc.type===Fc._typeof;e?vh():wu(),Yc(Oc._as)&&!Qc(Oc._as)?(wu(),(!e||Nh(Fc.name)||Hc.type&Fc.IS_KEYWORD)&&wu()):(e&&(Nh(Fc.name)||Hc.type&Fc.IS_KEYWORD)&&wu(),Zc(Oc._as)&&wu())}():(Dl(),Yc(Oc._as)&&(Hc.tokens[Hc.tokens.length-1].identifierRole=mh.ImportAccess,vh(),Dl()))}function Rd(){(Nh(Fc._with)||Yc(Oc._assert)&&!sh())&&(vh(),du(!1,!1))}function Bd(){return 0===Hc.pos&&Kc.charCodeAt(0)===Rc.numberSign&&Kc.charCodeAt(1)===Rc.exclamationMark&&Uh(2),Bh(),function(){if(ud(Fc.eof),Hc.scopes.push(new Bc(0,Hc.tokens.length,!0)),0!==Hc.scopeDepth)throw new Error(`Invalid scope depth at end of file: ${Hc.scopeDepth}`);return new jd(Hc.tokens,Hc.scopes)}()}class jd{constructor(e,t){this.tokens=e,this.scopes=t}}class Ud{__init(){this.resultCode=""}__init2(){this.resultMappings=new Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(e,t,s,i,n){this.code=e,this.tokens=t,this.isFlowEnabled=s,this.disableESTransforms=i,this.helperManager=n,Ud.prototype.__init.call(this),Ud.prototype.__init2.call(this),Ud.prototype.__init3.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(e){this.resultCode=e.resultCode,this.tokenIndex=e.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(e){const t=this.resultCode.slice(e.resultCode.length);return this.resultCode=e.resultCode,t}reset(){this.resultCode="",this.resultMappings=new Array(this.tokens.length),this.tokenIndex=0}matchesContextualAtIndex(e,t){return this.matches1AtIndex(e,Fc.name)&&this.tokens[e].contextualKeyword===t}identifierNameAtIndex(e){return this.identifierNameForToken(this.tokens[e])}identifierNameAtRelativeIndex(e){return this.identifierNameForToken(this.tokenAtRelativeIndex(e))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(e){return this.code.slice(e.start,e.end)}rawCodeForToken(e){return this.code.slice(e.start,e.end)}stringValueAtIndex(e){return this.stringValueForToken(this.tokens[e])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(e){return this.code.slice(e.start+1,e.end-1)}matches1AtIndex(e,t){return this.tokens[e].type===t}matches2AtIndex(e,t,s){return this.tokens[e].type===t&&this.tokens[e+1].type===s}matches3AtIndex(e,t,s,i){return this.tokens[e].type===t&&this.tokens[e+1].type===s&&this.tokens[e+2].type===i}matches1(e){return this.tokens[this.tokenIndex].type===e}matches2(e,t){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t}matches3(e,t,s){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===s}matches4(e,t,s,i){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===s&&this.tokens[this.tokenIndex+3].type===i}matches5(e,t,s,i,n){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===s&&this.tokens[this.tokenIndex+3].type===i&&this.tokens[this.tokenIndex+4].type===n}matchesContextual(e){return this.matchesContextualAtIndex(this.tokenIndex,e)}matchesContextIdAndLabel(e,t){return this.matches1(e)&&this.currentToken().contextId===t}previousWhitespaceAndComments(){let e=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(e=e.replace(/@flow/g,"")),e}replaceToken(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(e){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\r\n]/g,""),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken("")}removeToken(){this.replaceTokenTrimmingLeftWhitespace("")}removeBalancedCode(){let e=0;for(;!this.isAtEnd();){if(this.matches1(Fc.braceL))e++;else if(this.matches1(Fc.braceR)){if(0===e)return;e--}this.removeToken()}}copyExpectedToken(e){if(this.tokens[this.tokenIndex].type!==e)throw new Error(`Expected token ${e}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=e,this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){const e=this.currentToken();if((e.numNullishCoalesceStarts||e.isOptionalChainStart)&&(e.isAsyncOperation=function(e){let t=e.currentIndex(),s=0;const i=e.currentToken();do{const n=e.tokens[t];if(n.isOptionalChainStart&&s++,n.isOptionalChainEnd&&s--,s+=n.numNullishCoalesceStarts,s-=n.numNullishCoalesceEnds,n.contextualKeyword===Oc._await&&null==n.identifierRole&&n.scopeDepth===i.scopeDepth)return!0;t+=1}while(s>0&&t<e.tokens.length);return!1}(this)),!this.disableESTransforms){if(e.numNullishCoalesceStarts)for(let t=0;t<e.numNullishCoalesceStarts;t++)e.isAsyncOperation?(this.resultCode+="await ",this.resultCode+=this.helperManager.getHelperName("asyncNullishCoalesce")):this.resultCode+=this.helperManager.getHelperName("nullishCoalesce"),this.resultCode+="(";e.isOptionalChainStart&&(e.isAsyncOperation&&(this.resultCode+="await "),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===Fc._delete?e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChainDelete"):this.resultCode+=this.helperManager.getHelperName("optionalChainDelete"):e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChain"):this.resultCode+=this.helperManager.getHelperName("optionalChain"),this.resultCode+="([")}}appendTokenSuffix(){const e=this.currentToken();if(e.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+="])"),e.numNullishCoalesceEnds&&!this.disableESTransforms)for(let t=0;t<e.numNullishCoalesceEnds;t++)this.resultCode+="))"}appendCode(e){this.resultCode+=e}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){const e=this.currentToken();return this.code.slice(e.start,e.end)}tokenAtRelativeIndex(e){return this.tokens[this.tokenIndex+e]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw new Error("Unexpectedly reached end of input.");this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw new Error("Tried to finish processing tokens before reaching the end.");return this.resultCode+=this.previousWhitespaceAndComments(),{code:this.resultCode,mappings:this.resultMappings}}isAtEnd(){return this.tokenIndex===this.tokens.length}}function qd(e,t,s,i){const n=t.snapshot(),r=function(e){const t=e.currentToken(),s=t.contextId;if(null==s)throw new Error("Expected context ID on class token.");const i=t.isExpression;if(null==i)throw new Error("Expected isExpression on class token.");let n=null,r=!1;e.nextToken(),e.matches1(Fc.name)&&(n=e.identifierName());for(;!e.matchesContextIdAndLabel(Fc.braceL,s);)e.matches1(Fc._extends)&&!e.currentToken().isType&&(r=!0),e.nextToken();return{isExpression:i,className:n,hasSuperclass:r}}(t);let a=[];const o=[],c=[];let h=null;const l=[],p=[],u=t.currentToken().contextId;if(null==u)throw new Error("Expected non-null class context ID on class open-brace.");for(t.nextToken();!t.matchesContextIdAndLabel(Fc.braceR,u);)if(t.matchesContextual(Oc._constructor)&&!t.currentToken().isType)({constructorInitializerStatements:a,constructorInsertPos:h}=Vd(t));else if(t.matches1(Fc.semi))i||p.push({start:t.currentIndex(),end:t.currentIndex()+1}),t.nextToken();else if(t.currentToken().isType)t.nextToken();else{const n=t.currentIndex();let r=!1,d=!1,f=!1;for(;Hd(t.currentToken());)t.matches1(Fc._static)&&(r=!0),t.matches1(Fc.hash)&&(d=!0),(t.matches1(Fc._declare)||t.matches1(Fc._abstract))&&(f=!0),t.nextToken();if(r&&t.matches1(Fc.braceL)){$d(t,u);continue}if(d){$d(t,u);continue}if(t.matchesContextual(Oc._constructor)&&!t.currentToken().isType){({constructorInitializerStatements:a,constructorInsertPos:h}=Vd(t));continue}const m=t.currentIndex();if(Kd(t),t.matches1(Fc.lessThan)||t.matches1(Fc.parenL)){$d(t,u);continue}for(;t.currentToken().isType;)t.nextToken();if(t.matches1(Fc.eq)){const i=t.currentIndex(),n=t.currentToken().rhsEndIndex;if(null==n)throw new Error("Expected rhsEndIndex on class field assignment.");for(t.nextToken();t.currentIndex()<n;)e.processToken();let a;r?(a=s.claimFreeName("__initStatic"),c.push(a)):(a=s.claimFreeName("__init"),o.push(a)),l.push({initializerName:a,equalsIndex:i,start:m,end:t.currentIndex()})}else i&&!f||p.push({start:n,end:t.currentIndex()})}return t.restoreToSnapshot(n),i?{headerInfo:r,constructorInitializerStatements:a,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:h,fields:[],rangesToRemove:p}:{headerInfo:r,constructorInitializerStatements:a,instanceInitializerNames:o,staticInitializerNames:c,constructorInsertPos:h,fields:l,rangesToRemove:p}}function $d(e,t){for(e.nextToken();e.currentToken().contextId!==t;)e.nextToken();for(;Hd(e.tokenAtRelativeIndex(-1));)e.previousToken()}function Vd(e){const t=[];e.nextToken();const s=e.currentToken().contextId;if(null==s)throw new Error("Expected context ID on open-paren starting constructor params.");for(;!e.matchesContextIdAndLabel(Fc.parenR,s);)if(e.currentToken().contextId===s){if(e.nextToken(),Hd(e.currentToken())){for(e.nextToken();Hd(e.currentToken());)e.nextToken();const s=e.currentToken();if(s.type!==Fc.name)throw new Error("Expected identifier after access modifiers in constructor arg.");const i=e.identifierNameForToken(s);t.push(`this.${i} = ${i}`)}}else e.nextToken();for(e.nextToken();e.currentToken().isType;)e.nextToken();let i=e.currentIndex(),n=!1;for(;!e.matchesContextIdAndLabel(Fc.braceR,s);){if(!n&&e.matches2(Fc._super,Fc.parenL)){e.nextToken();const t=e.currentToken().contextId;if(null==t)throw new Error("Expected a context ID on the super call");for(;!e.matchesContextIdAndLabel(Fc.parenR,t);)e.nextToken();i=e.currentIndex(),n=!0}e.nextToken()}return e.nextToken(),{constructorInitializerStatements:t,constructorInsertPos:i}}function Hd(e){return[Fc._async,Fc._get,Fc._set,Fc.plus,Fc.minus,Fc._readonly,Fc._static,Fc._public,Fc._private,Fc._protected,Fc._override,Fc._abstract,Fc.star,Fc._declare,Fc.hash].includes(e.type)}function Kd(e){if(e.matches1(Fc.bracketL)){const t=e.currentToken().contextId;if(null==t)throw new Error("Expected class context ID on computed name open bracket.");for(;!e.matchesContextIdAndLabel(Fc.bracketR,t);)e.nextToken();e.nextToken()}else e.nextToken()}function zd(e){if(e.removeInitialToken(),e.removeToken(),e.removeToken(),e.removeToken(),e.matches1(Fc.parenL))e.removeToken(),e.removeToken(),e.removeToken();else for(;e.matches1(Fc.dot);)e.removeToken(),e.removeToken()}const Jd={typeDeclarations:new Set,valueDeclarations:new Set};function Wd(e){const t=new Set,s=new Set;for(let i=0;i<e.tokens.length;i++){const n=e.tokens[i];n.type===Fc.name&&kh(n)&&(n.isType?t.add(e.identifierNameForToken(n)):s.add(e.identifierNameForToken(n)))}return{typeDeclarations:t,valueDeclarations:s}}function Xd(e){let t=e.currentIndex();for(;!e.matches1AtIndex(t,Fc.braceR);)t++;return e.matchesContextualAtIndex(t+1,Oc._from)&&e.matches1AtIndex(t+2,Fc.string)}function Gd(e){(e.matches2(Fc._with,Fc.braceL)||e.matches2(Fc.name,Fc.braceL)&&e.matchesContextual(Oc._assert))&&(e.removeToken(),e.removeToken(),e.removeBalancedCode(),e.removeToken())}function Yd(e,t,s,i){if(!e||t)return!1;const n=s.currentToken();if(null==n.rhsEndIndex)throw new Error("Expected non-null rhsEndIndex on export token.");const r=n.rhsEndIndex-s.currentIndex();if(3!==r&&(4!==r||!s.matches1AtIndex(n.rhsEndIndex-1,Fc.semi)))return!1;const a=s.tokenAtRelativeIndex(2);if(a.type!==Fc.name)return!1;const o=s.identifierNameForToken(a);return i.typeDeclarations.has(o)&&!i.valueDeclarations.has(o)}class Qd extends el{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(e,t,s,i,n,r,a,o,c,h,l,p){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=s,this.nameManager=i,this.helperManager=n,this.reactHotLoaderTransformer=r,this.enableLegacyBabel5ModuleInterop=a,this.enableLegacyTypeScriptModuleInterop=o,this.isTypeScriptTransformEnabled=c,this.isFlowTransformEnabled=h,this.preserveDynamicImport=l,this.keepUnusedImports=p,Qd.prototype.__init.call(this),Qd.prototype.__init2.call(this),Qd.prototype.__init3.call(this),this.declarationInfo=c?Wd(t):Jd}getPrefixCode(){let e="";return this.hadExport&&(e+='Object.defineProperty(exports, "__esModule", {value: true});'),e}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?"\nmodule.exports = exports.default;\n":""}process(){return this.tokens.matches3(Fc._import,Fc.name,Fc.eq)?this.processImportEquals():this.tokens.matches1(Fc._import)?(this.processImport(),!0):this.tokens.matches2(Fc._export,Fc.eq)?(this.tokens.replaceToken("module.exports"),!0):this.tokens.matches1(Fc._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):!(!this.tokens.matches2(Fc.name,Fc.postIncDec)||!this.processPostIncDec())||(this.tokens.matches1(Fc.name)||this.tokens.matches1(Fc.jsxName)?this.processIdentifier():this.tokens.matches1(Fc.eq)?this.processAssignment():this.tokens.matches1(Fc.assign)?this.processComplexAssignment():!!this.tokens.matches1(Fc.preIncDec)&&this.processPreIncDec())}processImportEquals(){const e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.shouldAutomaticallyElideImportedName(e)?zd(this.tokens):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(Fc._import,Fc.parenL)){if(this.preserveDynamicImport)return void this.tokens.copyToken();const e=this.enableLegacyTypeScriptModuleInterop?"":`${this.helperManager.getHelperName("interopRequireWildcard")}(`;this.tokens.replaceToken(`Promise.resolve().then(() => ${e}require`);const t=this.tokens.currentToken().contextId;if(null==t)throw new Error("Expected context ID on dynamic import invocation.");for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(Fc.parenR,t);)this.rootTransformer.processToken();return void this.tokens.replaceToken(e?")))":"))")}if(this.removeImportAndDetectIfShouldElide())this.tokens.removeToken();else{const e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),this.tokens.appendCode(this.importProcessor.claimImportCode(e))}Gd(this.tokens),this.tokens.matches1(Fc.semi)&&this.tokens.removeToken()}removeImportAndDetectIfShouldElide(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(Oc._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,Fc.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,Oc._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(Fc.name)||this.tokens.matches1(Fc.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(Fc.string))return!1;let e=!1,t=!1;for(;!this.tokens.matches1(Fc.string);)(!e&&this.tokens.matches1(Fc.braceL)||this.tokens.matches1(Fc.comma))&&(this.tokens.removeToken(),this.tokens.matches1(Fc.braceR)||(t=!0),(this.tokens.matches2(Fc.name,Fc.comma)||this.tokens.matches2(Fc.name,Fc.braceR)||this.tokens.matches4(Fc.name,Fc.name,Fc.name,Fc.comma)||this.tokens.matches4(Fc.name,Fc.name,Fc.name,Fc.braceR))&&(e=!0)),this.tokens.removeToken();return!this.keepUnusedImports&&(this.isTypeScriptTransformEnabled?!e:!!this.isFlowTransformEnabled&&(t&&!e))}removeRemainingImport(){for(;!this.tokens.matches1(Fc.string);)this.tokens.removeToken()}processIdentifier(){const e=this.tokens.currentToken();if(e.shadowsGlobal)return!1;if(e.identifierRole===mh.ObjectShorthand)return this.processObjectShorthand();if(e.identifierRole!==mh.Access)return!1;const t=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(e));if(!t)return!1;let s=this.tokens.currentIndex()+1;for(;s<this.tokens.tokens.length&&this.tokens.tokens[s].type===Fc.parenR;)s++;return this.tokens.tokens[s].type===Fc.parenL?this.tokens.tokenAtRelativeIndex(1).type===Fc.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==Fc._new?(this.tokens.replaceToken(`${t}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.parenR)):this.tokens.replaceToken(`(0, ${t})`):this.tokens.replaceToken(t),!0}processObjectShorthand(){const e=this.tokens.identifierName(),t=this.importProcessor.getIdentifierReplacement(e);return!!t&&(this.tokens.replaceToken(`${e}: ${t}`),!0)}processExport(){if(this.tokens.matches2(Fc._export,Fc._enum)||this.tokens.matches3(Fc._export,Fc._const,Fc._enum))return this.hadNamedExport=!0,!1;if(this.tokens.matches2(Fc._export,Fc._default))return this.tokens.matches3(Fc._export,Fc._default,Fc._enum)?(this.hadDefaultExport=!0,!1):(this.processExportDefault(),!0);if(this.tokens.matches2(Fc._export,Fc.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(Fc._export,Fc.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,Oc._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(Fc.braceL)){for(;!this.tokens.matches1(Fc.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(Fc._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(Oc._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,Fc.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),Gd(this.tokens)),!0}if(this.hadNamedExport=!0,this.tokens.matches2(Fc._export,Fc._var)||this.tokens.matches2(Fc._export,Fc._let)||this.tokens.matches2(Fc._export,Fc._const))return this.processExportVar(),!0;if(this.tokens.matches2(Fc._export,Fc._function)||this.tokens.matches3(Fc._export,Fc.name,Fc._function))return this.processExportFunction(),!0;if(this.tokens.matches2(Fc._export,Fc._class)||this.tokens.matches3(Fc._export,Fc._abstract,Fc._class)||this.tokens.matches2(Fc._export,Fc.at))return this.processExportClass(),!0;if(this.tokens.matches2(Fc._export,Fc.star))return this.processExportStar(),!0;throw new Error("Unrecognized export syntax.")}processAssignment(){const e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.isType||t.type!==Fc.name)return!1;if(t.shadowsGlobal)return!1;if(e>=2&&this.tokens.matches1AtIndex(e-2,Fc.dot))return!1;if(e>=2&&[Fc._var,Fc._let,Fc._const].includes(this.tokens.tokens[e-2].type))return!1;const s=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return!!s&&(this.tokens.copyToken(),this.tokens.appendCode(` ${s} =`),!0)}processComplexAssignment(){const e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.type!==Fc.name)return!1;if(t.shadowsGlobal)return!1;if(e>=2&&this.tokens.matches1AtIndex(e-2,Fc.dot))return!1;const s=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return!!s&&(this.tokens.appendCode(` = ${s}`),this.tokens.copyToken(),!0)}processPreIncDec(){const e=this.tokens.currentIndex(),t=this.tokens.tokens[e+1];if(t.type!==Fc.name)return!1;if(t.shadowsGlobal)return!1;if(e+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(e+2,Fc.dot)||this.tokens.matches1AtIndex(e+2,Fc.bracketL)||this.tokens.matches1AtIndex(e+2,Fc.parenL)))return!1;const s=this.tokens.identifierNameForToken(t),i=this.importProcessor.resolveExportBinding(s);return!!i&&(this.tokens.appendCode(`${i} = `),this.tokens.copyToken(),!0)}processPostIncDec(){const e=this.tokens.currentIndex(),t=this.tokens.tokens[e],s=this.tokens.tokens[e+1];if(t.type!==Fc.name)return!1;if(t.shadowsGlobal)return!1;if(e>=1&&this.tokens.matches1AtIndex(e-1,Fc.dot))return!1;const i=this.tokens.identifierNameForToken(t),n=this.importProcessor.resolveExportBinding(i);if(!n)return!1;const r=this.tokens.rawCodeForToken(s),a=this.importProcessor.getIdentifierReplacement(i)||i;if("++"===r)this.tokens.replaceToken(`(${a} = ${n} = ${a} + 1, ${a} - 1)`);else{if("--"!==r)throw new Error(`Unexpected operator: ${r}`);this.tokens.replaceToken(`(${a} = ${n} = ${a} - 1, ${a} + 1)`)}return this.tokens.removeToken(),!0}processExportDefault(){let e=!0;if(this.tokens.matches4(Fc._export,Fc._default,Fc._function,Fc.name)||this.tokens.matches5(Fc._export,Fc._default,Fc.name,Fc._function,Fc.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,Oc._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();const e=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${e};`)}else if(this.tokens.matches4(Fc._export,Fc._default,Fc._class,Fc.name)||this.tokens.matches5(Fc._export,Fc._default,Fc._abstract,Fc._class,Fc.name)||this.tokens.matches3(Fc._export,Fc._default,Fc.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(Fc._abstract)&&this.tokens.removeToken();const e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${e};`)}else if(Yd(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))e=!1,this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){const e=this.nameManager.claimFreeName("_default");this.tokens.replaceToken(`let ${e}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e)}else this.tokens.replaceToken("exports."),this.tokens.copyToken(),this.tokens.appendCode(" =");e&&(this.hadDefaultExport=!0)}copyDecorators(){for(;this.tokens.matches1(Fc.at);)if(this.tokens.copyToken(),this.tokens.matches1(Fc.parenL))this.tokens.copyExpectedToken(Fc.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.parenR);else{for(this.tokens.copyExpectedToken(Fc.name);this.tokens.matches1(Fc.dot);)this.tokens.copyExpectedToken(Fc.dot),this.tokens.copyExpectedToken(Fc.name);this.tokens.matches1(Fc.parenL)&&(this.tokens.copyExpectedToken(Fc.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.parenR))}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let e=this.tokens.currentIndex();if(e++,e++,!this.tokens.matches1AtIndex(e,Fc.name))return!1;for(e++;e<this.tokens.tokens.length&&this.tokens.tokens[e].isType;)e++;return!!this.tokens.matches1AtIndex(e,Fc.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();const e=this.tokens.identifierName();for(;!this.tokens.matches1(Fc.eq);)this.rootTransformer.processToken();const t=this.tokens.currentToken().rhsEndIndex;if(null==t)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<t;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${e} = ${e}`)}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();const e=this.tokens.matches1(Fc.braceL);e&&this.tokens.appendCode("(");let t=0;for(;;)if(this.tokens.matches1(Fc.braceL)||this.tokens.matches1(Fc.dollarBraceL)||this.tokens.matches1(Fc.bracketL))t++,this.tokens.copyToken();else if(this.tokens.matches1(Fc.braceR)||this.tokens.matches1(Fc.bracketR))t--,this.tokens.copyToken();else{if(0===t&&!this.tokens.matches1(Fc.name)&&!this.tokens.currentToken().isType)break;if(this.tokens.matches1(Fc.eq)){const e=this.tokens.currentToken().rhsEndIndex;if(null==e)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}else{const e=this.tokens.currentToken();if(xh(e)){const t=this.tokens.identifierName();let s=this.importProcessor.getIdentifierReplacement(t);if(null===s)throw new Error(`Expected a replacement for ${t} in \`export var\` syntax.`);Sh(e)&&(s=`${t}: ${s}`),this.tokens.replaceToken(s)}else this.rootTransformer.processToken()}}if(e){const e=this.tokens.currentToken().rhsEndIndex;if(null==e)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken();this.tokens.appendCode(")")}}processExportFunction(){this.tokens.replaceToken("");const e=this.processNamedFunction();this.tokens.appendCode(` exports.${e} = ${e};`)}processNamedFunction(){if(this.tokens.matches1(Fc._function))this.tokens.copyToken();else if(this.tokens.matches2(Fc.name,Fc._function)){if(!this.tokens.matchesContextual(Oc._async))throw new Error("Expected async keyword in function export.");this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(Fc.star)&&this.tokens.copyToken(),!this.tokens.matches1(Fc.name))throw new Error("Expected identifier for exported function name.");const e=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(Fc.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(Fc.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.braceR),e}processExportClass(){this.tokens.removeInitialToken(),this.copyDecorators(),this.tokens.matches1(Fc._abstract)&&this.tokens.removeToken();const e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${e} = ${e};`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();const e=Xd(this.tokens),t=[];for(;;){if(this.tokens.matches1(Fc.braceR)){this.tokens.removeToken();break}const s=Xh(this.tokens);for(;this.tokens.currentIndex()<s.endIndex;)this.tokens.removeToken();if(!(s.isType||!e&&this.shouldElideExportedIdentifier(s.leftName))){const e=s.rightName;"default"===e?this.hadDefaultExport=!0:this.hadNamedExport=!0;const i=s.leftName,n=this.importProcessor.getIdentifierReplacement(i);t.push(`exports.${e} = ${n||i};`)}if(this.tokens.matches1(Fc.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(Fc.comma,Fc.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}if(!this.tokens.matches1(Fc.comma))throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`);this.tokens.removeToken()}if(this.tokens.matchesContextual(Oc._from)){this.tokens.removeToken();const e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),Gd(this.tokens)}else this.tokens.appendCode(t.join(" "));this.tokens.matches1(Fc.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(Fc.string);)this.tokens.removeToken();const e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),Gd(this.tokens),this.tokens.matches1(Fc.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.declarationInfo.valueDeclarations.has(e)}}class Zd extends el{constructor(e,t,s,i,n,r,a,o){super(),this.tokens=e,this.nameManager=t,this.helperManager=s,this.reactHotLoaderTransformer=i,this.isTypeScriptTransformEnabled=n,this.isFlowTransformEnabled=r,this.keepUnusedImports=a,this.nonTypeIdentifiers=n&&!a?ol(e,o):new Set,this.declarationInfo=n&&!a?Wd(e):Jd,this.injectCreateRequireForImportRequire=Boolean(o.injectCreateRequireForImportRequire)}process(){if(this.tokens.matches3(Fc._import,Fc.name,Fc.eq))return this.processImportEquals();if(this.tokens.matches4(Fc._import,Fc.name,Fc.name,Fc.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,Oc._type)){this.tokens.removeInitialToken();for(let e=0;e<7;e++)this.tokens.removeToken();return!0}if(this.tokens.matches2(Fc._export,Fc.eq))return this.tokens.replaceToken("module.exports"),!0;if(this.tokens.matches5(Fc._export,Fc._import,Fc.name,Fc.name,Fc.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,Oc._type)){this.tokens.removeInitialToken();for(let e=0;e<8;e++)this.tokens.removeToken();return!0}if(this.tokens.matches1(Fc._import))return this.processImport();if(this.tokens.matches2(Fc._export,Fc._default))return this.processExportDefault();if(this.tokens.matches2(Fc._export,Fc.braceL))return this.processNamedExports();if(this.tokens.matches2(Fc._export,Fc.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,Oc._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(Fc.braceL)){for(;!this.tokens.matches1(Fc.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(Fc._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(Oc._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,Fc.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),Gd(this.tokens)),!0}return!1}processImportEquals(){const e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.shouldAutomaticallyElideImportedName(e)?zd(this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken("const"),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName("require"))):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(Fc._import,Fc.parenL))return!1;const e=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(e);!this.tokens.matches1(Fc.string);)this.tokens.removeToken();this.tokens.removeToken(),Gd(this.tokens),this.tokens.matches1(Fc.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(Fc._import),this.tokens.matchesContextual(Oc._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,Fc.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,Oc._from))return!0;if(this.tokens.matches1(Fc.string))return this.tokens.copyToken(),!1;this.tokens.matchesContextual(Oc._module)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,Oc._from)&&this.tokens.copyToken();let e=!1,t=!1,s=!1;if(this.tokens.matches1(Fc.name)&&(this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(Fc.comma)&&this.tokens.removeToken()):(e=!0,this.tokens.copyToken(),this.tokens.matches1(Fc.comma)&&(s=!0,this.tokens.removeToken()))),this.tokens.matches1(Fc.star))this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(s&&this.tokens.appendCode(","),e=!0,this.tokens.copyExpectedToken(Fc.star),this.tokens.copyExpectedToken(Fc.name),this.tokens.copyExpectedToken(Fc.name));else if(this.tokens.matches1(Fc.braceL)){for(s&&this.tokens.appendCode(","),this.tokens.copyToken();!this.tokens.matches1(Fc.braceR);){t=!0;const s=Xh(this.tokens);if(s.isType||this.shouldAutomaticallyElideImportedName(s.rightName)){for(;this.tokens.currentIndex()<s.endIndex;)this.tokens.removeToken();this.tokens.matches1(Fc.comma)&&this.tokens.removeToken()}else{for(e=!0;this.tokens.currentIndex()<s.endIndex;)this.tokens.copyToken();this.tokens.matches1(Fc.comma)&&this.tokens.copyToken()}}this.tokens.copyExpectedToken(Fc.braceR)}return!this.keepUnusedImports&&(this.isTypeScriptTransformEnabled?!e:!!this.isFlowTransformEnabled&&(t&&!e))}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}processExportDefault(){if(Yd(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(Fc._export,Fc._default,Fc._function,Fc.name)||this.tokens.matches5(Fc._export,Fc._default,Fc.name,Fc._function,Fc.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,Oc._async)||this.tokens.matches4(Fc._export,Fc._default,Fc._class,Fc.name)||this.tokens.matches5(Fc._export,Fc._default,Fc._abstract,Fc._class,Fc.name))&&this.reactHotLoaderTransformer){const e=this.nameManager.claimFreeName("_default");return this.tokens.replaceToken(`let ${e}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e),!0}return!1}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;this.tokens.copyExpectedToken(Fc._export),this.tokens.copyExpectedToken(Fc.braceL);const e=Xd(this.tokens);let t=!1;for(;!this.tokens.matches1(Fc.braceR);){const s=Xh(this.tokens);if(s.isType||!e&&this.shouldElideExportedName(s.leftName)){for(;this.tokens.currentIndex()<s.endIndex;)this.tokens.removeToken();this.tokens.matches1(Fc.comma)&&this.tokens.removeToken()}else{for(t=!0;this.tokens.currentIndex()<s.endIndex;)this.tokens.copyToken();this.tokens.matches1(Fc.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(Fc.braceR),this.keepUnusedImports||!e||t||(this.tokens.removeToken(),this.tokens.removeToken(),Gd(this.tokens)),!0}shouldElideExportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&this.declarationInfo.typeDeclarations.has(e)&&!this.declarationInfo.valueDeclarations.has(e)}}class ef extends el{constructor(e,t,s){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=s}process(){return!!(this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange())||(this.tokens.matches1(Fc._enum)?(this.processEnum(),!0):this.tokens.matches2(Fc._export,Fc._enum)?(this.processNamedExportEnum(),!0):!!this.tokens.matches3(Fc._export,Fc._default,Fc._enum)&&(this.processDefaultExportEnum(),!0))}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();const e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${e} = ${e};`)}else this.tokens.copyToken(),this.processEnum()}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();const e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${e};`):this.tokens.appendCode(` export default ${e};`)}processEnum(){this.tokens.replaceToken("const"),this.tokens.copyExpectedToken(Fc.name);let e=!1;this.tokens.matchesContextual(Oc._of)&&(this.tokens.removeToken(),e=this.tokens.matchesContextual(Oc._symbol),this.tokens.removeToken());const t=this.tokens.matches3(Fc.braceL,Fc.name,Fc.eq);this.tokens.appendCode(' = require("flow-enums-runtime")');const s=!e&&!t;for(this.tokens.replaceTokenTrimmingLeftWhitespace(s?".Mirrored([":"({");!this.tokens.matches1(Fc.braceR);){if(this.tokens.matches1(Fc.ellipsis)){this.tokens.removeToken();break}this.processEnumElement(e,t),this.tokens.matches1(Fc.comma)&&this.tokens.copyToken()}this.tokens.replaceToken(s?"]);":"});")}processEnumElement(e,t){if(e){const e=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${e}")`)}else t?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(":"),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`)}}const tf="jest",sf=["mock","unmock","enableAutomock","disableAutomock"];class nf extends el{__init(){this.hoistedFunctionNames=[]}constructor(e,t,s,i){super(),this.rootTransformer=e,this.tokens=t,this.nameManager=s,this.importProcessor=i,nf.prototype.__init.call(this)}process(){return!(0!==this.tokens.currentToken().scopeDepth||!this.tokens.matches4(Fc.name,Fc.dot,Fc.name,Fc.parenL)||this.tokens.identifierName()!==tf)&&(!function(e){let t,s=e[0],i=1;for(;i<e.length;){const n=e[i],r=e[i+1];if(i+=2,("optionalAccess"===n||"optionalCall"===n)&&null==s)return;"access"===n||"optionalAccess"===n?(t=s,s=r(s)):"call"!==n&&"optionalCall"!==n||(s=r((...e)=>s.call(t,...e)),t=void 0)}return s}([this,"access",e=>e.importProcessor,"optionalAccess",e=>e.getGlobalNames,"call",e=>e(),"optionalAccess",e=>e.has,"call",e=>e(tf)])&&this.extractHoistedCalls())}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(e=>`${e}();`).join(""):""}extractHoistedCalls(){this.tokens.removeToken();let e=!1;for(;this.tokens.matches3(Fc.dot,Fc.name,Fc.parenL);){const t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(sf.includes(t)){const t=this.nameManager.claimFreeName("__jestHoist");this.hoistedFunctionNames.push(t),this.tokens.replaceToken(`function ${t}(){${tf}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.parenR),this.tokens.appendCode(";}"),e=!1}else e?this.tokens.copyToken():this.tokens.replaceToken(`${tf}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.parenR),e=!0}return!0}}class rf extends el{constructor(e){super(),this.tokens=e}process(){if(this.tokens.matches1(Fc.num)){const e=this.tokens.currentTokenCode();if(e.includes("_"))return this.tokens.replaceToken(e.replace(/_/g,"")),!0}return!1}}class af extends el{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){return!!this.tokens.matches2(Fc._catch,Fc.braceL)&&(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`),!0)}}class of extends el{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){if(this.tokens.matches1(Fc.nullishCoalescing)){const e=this.tokens.currentToken();return this.tokens.tokens[e.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(", async () => ("):this.tokens.replaceTokenTrimmingLeftWhitespace(", () => ("),!0}if(this.tokens.matches1(Fc._delete)){if(this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0}const e=this.tokens.currentToken().subscriptStartIndex;if(null!=e&&this.tokens.tokens[e].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==Fc._super){const t=this.nameManager.claimFreeName("_");let s;if(s=e>0&&this.tokens.matches1AtIndex(e-1,Fc._delete)&&this.isLastSubscriptInChain()?`${t} => delete ${t}`:`${t} => ${t}`,this.tokens.tokens[e].isAsyncOperation&&(s=`async ${s}`),this.tokens.matches2(Fc.questionDot,Fc.parenL)||this.tokens.matches2(Fc.questionDot,Fc.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalCall', ${s}`);else if(this.tokens.matches2(Fc.questionDot,Fc.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${s}`);else if(this.tokens.matches1(Fc.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${s}.`);else if(this.tokens.matches1(Fc.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${s}.`);else if(this.tokens.matches1(Fc.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${s}[`);else{if(!this.tokens.matches1(Fc.parenL))throw new Error("Unexpected subscript operator in optional chain.");this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${s}(`)}return!0}return!1}isLastSubscriptInChain(){let e=0;for(let t=this.tokens.currentIndex()+1;;t++){if(t>=this.tokens.tokens.length)throw new Error("Reached the end of the code while finding the end of the access chain.");if(this.tokens.tokens[t].isOptionalChainStart?e++:this.tokens.tokens[t].isOptionalChainEnd&&e--,e<0)return!0;if(0===e&&null!=this.tokens.tokens[t].subscriptStartIndex)return!1}}justSkippedSuper(){let e=0,t=this.tokens.currentIndex()-1;for(;;){if(t<0)throw new Error("Reached the start of the code while finding the start of the access chain.");if(this.tokens.tokens[t].isOptionalChainStart?e--:this.tokens.tokens[t].isOptionalChainEnd&&e++,e<0)return!1;if(0===e&&null!=this.tokens.tokens[t].subscriptStartIndex)return this.tokens.tokens[t-1].type===Fc._super;t--}}}class cf extends el{constructor(e,t,s,i){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=s,this.options=i}process(){const e=this.tokens.currentIndex();if("createReactClass"===this.tokens.identifierName()){const t=this.importProcessor&&this.importProcessor.getIdentifierReplacement("createReactClass");return t?this.tokens.replaceToken(`(0, ${t})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(e),!0}if(this.tokens.matches3(Fc.name,Fc.dot,Fc.name)&&"React"===this.tokens.identifierName()&&"createClass"===this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)){const t=this.importProcessor&&this.importProcessor.getIdentifierReplacement("React")||"React";return this.tokens.replaceToken(t),this.tokens.copyToken(),this.tokens.copyToken(),this.tryProcessCreateClassCall(e),!0}return!1}tryProcessCreateClassCall(e){const t=this.findDisplayName(e);t&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(Fc.parenL),this.tokens.copyExpectedToken(Fc.braceL),this.tokens.appendCode(`displayName: '${t}',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Fc.braceR),this.tokens.copyExpectedToken(Fc.parenR))}findDisplayName(e){return e<2?null:this.tokens.matches2AtIndex(e-2,Fc.name,Fc.eq)||e>=2&&this.tokens.tokens[e-2].identifierRole===mh.ObjectKey?this.tokens.identifierNameAtIndex(e-2):this.tokens.matches2AtIndex(e-2,Fc._export,Fc._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){const e=(this.options.filePath||"unknown").split("/"),t=e[e.length-1],s=t.lastIndexOf("."),i=-1===s?t:t.slice(0,s);return"index"===i&&e[e.length-2]?e[e.length-2]:i}classNeedsDisplayName(){let e=this.tokens.currentIndex();if(!this.tokens.matches2(Fc.parenL,Fc.braceL))return!1;const t=e+1,s=this.tokens.tokens[t].contextId;if(null==s)throw new Error("Expected non-null context ID on object open-brace.");for(;e<this.tokens.tokens.length;e++){const t=this.tokens.tokens[e];if(t.type===Fc.braceR&&t.contextId===s){e++;break}if("displayName"===this.tokens.identifierNameAtIndex(e)&&this.tokens.tokens[e].identifierRole===mh.ObjectKey&&t.contextId===s)return!1}if(e===this.tokens.tokens.length)throw new Error("Unexpected end of input when processing React class.");return this.tokens.matches1AtIndex(e,Fc.parenR)||this.tokens.matches2AtIndex(e,Fc.comma,Fc.parenR)}}class hf extends el{__init(){this.extractedDefaultExportName=null}constructor(e,t){super(),this.tokens=e,this.filePath=t,hf.prototype.__init.call(this)}setExtractedDefaultExportName(e){this.extractedDefaultExportName=e}getPrefixCode(){return"\n (function () {\n var enterModule = require('react-hot-loader').enterModule;\n enterModule && enterModule(module);\n })();".replace(/\s+/g," ").trim()}getSuffixCode(){const e=new Set;for(const t of this.tokens.tokens)!t.isType&&kh(t)&&t.identifierRole!==mh.ImportDeclaration&&e.add(this.tokens.identifierNameForToken(t));const t=Array.from(e).map(e=>({variableName:e,uniqueLocalName:e}));return this.extractedDefaultExportName&&t.push({variableName:this.extractedDefaultExportName,uniqueLocalName:"default"}),`\n;(function () {\n var reactHotLoader = require('react-hot-loader').default;\n var leaveModule = require('react-hot-loader').leaveModule;\n if (!reactHotLoader) {\n return;\n }\n${t.map(({variableName:e,uniqueLocalName:t})=>` reactHotLoader.register(${e}, "${t}", ${JSON.stringify(this.filePath||"")});`).join("\n")}\n leaveModule(module);\n})();`}process(){return!1}}const lf=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","enum","implements","interface","let","package","private","protected","public","static","await","false","null","true"]);function pf(e){if(0===e.length)return!1;if(!dh[e.charCodeAt(0)])return!1;for(let t=1;t<e.length;t++)if(!uh[e.charCodeAt(t)])return!1;return!lf.has(e)}class uf extends el{constructor(e,t,s){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=s}process(){return!!(this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange())||(this.tokens.matches1(Fc._public)||this.tokens.matches1(Fc._protected)||this.tokens.matches1(Fc._private)||this.tokens.matches1(Fc._abstract)||this.tokens.matches1(Fc._readonly)||this.tokens.matches1(Fc._override)||this.tokens.matches1(Fc.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(Fc._enum)||this.tokens.matches2(Fc._const,Fc._enum)?(this.processEnum(),!0):!(!this.tokens.matches2(Fc._export,Fc._enum)&&!this.tokens.matches3(Fc._export,Fc._const,Fc._enum))&&(this.processEnum(!0),!0))}processEnum(e=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(Fc._const)||this.tokens.matches1(Fc._enum);)this.tokens.removeToken();const t=this.tokens.identifierName();this.tokens.removeToken(),e&&!this.isImportsTransformEnabled&&this.tokens.appendCode("export "),this.tokens.appendCode(`var ${t}; (function (${t})`),this.tokens.copyExpectedToken(Fc.braceL),this.processEnumBody(t),this.tokens.copyExpectedToken(Fc.braceR),e&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${t} || (exports.${t} = ${t} = {}));`):this.tokens.appendCode(`)(${t} || (${t} = {}));`)}processEnumBody(e){let t=null;for(;!this.tokens.matches1(Fc.braceR);){const{nameStringCode:s,variableName:i}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(Fc.eq,Fc.string,Fc.comma)||this.tokens.matches3(Fc.eq,Fc.string,Fc.braceR)?this.processStringLiteralEnumMember(e,s,i):this.tokens.matches1(Fc.eq)?this.processExplicitValueEnumMember(e,s,i):this.processImplicitValueEnumMember(e,s,i,t),this.tokens.matches1(Fc.comma)&&this.tokens.removeToken(),t=null!=i?i:`${e}[${s}]`}}extractEnumKeyInfo(e){if(e.type===Fc.name){const t=this.tokens.identifierNameForToken(e);return{nameStringCode:`"${t}"`,variableName:pf(t)?t:null}}if(e.type===Fc.string){const t=this.tokens.stringValueForToken(e);return{nameStringCode:this.tokens.code.slice(e.start,e.end),variableName:pf(t)?t:null}}throw new Error("Expected name or string at beginning of enum element.")}processStringLiteralEnumMember(e,t,s){null!=s?(this.tokens.appendCode(`const ${s}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${e}[${t}] = ${s};`)):(this.tokens.appendCode(`${e}[${t}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(";"))}processExplicitValueEnumMember(e,t,s){const i=this.tokens.currentToken().rhsEndIndex;if(null==i)throw new Error("Expected rhsEndIndex on enum assign.");if(null!=s){for(this.tokens.appendCode(`const ${s}`),this.tokens.copyToken();this.tokens.currentIndex()<i;)this.rootTransformer.processToken();this.tokens.appendCode(`; ${e}[${e}[${t}] = ${s}] = ${t};`)}else{for(this.tokens.appendCode(`${e}[${e}[${t}]`),this.tokens.copyToken();this.tokens.currentIndex()<i;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${t};`)}}processImplicitValueEnumMember(e,t,s,i){let n=null!=i?`${i} + 1`:"0";null!=s&&(this.tokens.appendCode(`const ${s} = ${n}; `),n=s),this.tokens.appendCode(`${e}[${e}[${t}] = ${n}] = ${t};`)}}class df{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(e,t,s,i){df.prototype.__init.call(this),df.prototype.__init2.call(this),this.nameManager=e.nameManager,this.helperManager=e.helperManager;const{tokenProcessor:n,importProcessor:r}=e;this.tokens=n,this.isImportsTransformEnabled=t.includes("imports"),this.isReactHotLoaderTransformEnabled=t.includes("react-hot-loader"),this.disableESTransforms=Boolean(i.disableESTransforms),i.disableESTransforms||(this.transformers.push(new of(n,this.nameManager)),this.transformers.push(new rf(n)),this.transformers.push(new af(n,this.nameManager))),t.includes("jsx")&&("preserve"!==i.jsxRuntime&&this.transformers.push(new tl(this,n,r,this.nameManager,i)),this.transformers.push(new cf(this,n,r,i)));let a=null;if(t.includes("react-hot-loader")){if(!i.filePath)throw new Error("filePath is required when using the react-hot-loader transform.");a=new hf(n,i.filePath),this.transformers.push(a)}if(t.includes("imports")){if(null===r)throw new Error("Expected non-null importProcessor with imports transform enabled.");this.transformers.push(new Qd(this,n,r,this.nameManager,this.helperManager,a,s,Boolean(i.enableLegacyTypeScriptModuleInterop),t.includes("typescript"),t.includes("flow"),Boolean(i.preserveDynamicImport),Boolean(i.keepUnusedImports)))}else this.transformers.push(new Zd(n,this.nameManager,this.helperManager,a,t.includes("typescript"),t.includes("flow"),Boolean(i.keepUnusedImports),i));t.includes("flow")&&this.transformers.push(new ef(this,n,t.includes("imports"))),t.includes("typescript")&&this.transformers.push(new uf(this,n,t.includes("imports"))),t.includes("jest")&&this.transformers.push(new nf(this,n,this.nameManager,r))}transform(){this.tokens.reset(),this.processBalancedCode();let e=this.isImportsTransformEnabled?'"use strict";':"";for(const t of this.transformers)e+=t.getPrefixCode();e+=this.helperManager.emitHelpers(),e+=this.generatedVariables.map(e=>` var ${e};`).join("");for(const t of this.transformers)e+=t.getHoistedCode();let t="";for(const e of this.transformers)t+=e.getSuffixCode();const s=this.tokens.finish();let{code:i}=s;if(i.startsWith("#!")){let n=i.indexOf("\n");return-1===n&&(n=i.length,i+="\n"),{code:i.slice(0,n+1)+e+i.slice(n+1)+t,mappings:this.shiftMappings(s.mappings,e.length)}}return{code:e+i+t,mappings:this.shiftMappings(s.mappings,e.length)}}processBalancedCode(){let e=0,t=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(Fc.braceL)||this.tokens.matches1(Fc.dollarBraceL))e++;else if(this.tokens.matches1(Fc.braceR)){if(0===e)return;e--}if(this.tokens.matches1(Fc.parenL))t++;else if(this.tokens.matches1(Fc.parenR)){if(0===t)return;t--}this.processToken()}}processToken(){if(this.tokens.matches1(Fc._class))this.processClass();else{for(const e of this.transformers){if(e.process())return}this.tokens.copyToken()}}processNamedClass(){if(!this.tokens.matches2(Fc._class,Fc.name))throw new Error("Expected identifier for exported class name.");const e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),e}processClass(){const e=qd(this,this.tokens,this.nameManager,this.disableESTransforms),t=(e.headerInfo.isExpression||!e.headerInfo.className)&&e.staticInitializerNames.length+e.instanceInitializerNames.length>0;let s=e.headerInfo.className;t&&(s=this.nameManager.claimFreeName("_class"),this.generatedVariables.push(s),this.tokens.appendCode(` (${s} =`));const i=this.tokens.currentToken().contextId;if(null==i)throw new Error("Expected class to have a context ID.");for(this.tokens.copyExpectedToken(Fc._class);!this.tokens.matchesContextIdAndLabel(Fc.braceL,i);)this.processToken();this.processClassBody(e,s);const n=e.staticInitializerNames.map(e=>`${s}.${e}()`);t?this.tokens.appendCode(`, ${n.map(e=>`${e}, `).join("")}${s})`):e.staticInitializerNames.length>0&&this.tokens.appendCode(` ${n.map(e=>`${e};`).join(" ")}`)}processClassBody(e,t){const{headerInfo:s,constructorInsertPos:i,constructorInitializerStatements:n,fields:r,instanceInitializerNames:a,rangesToRemove:o}=e;let c=0,h=0;const l=this.tokens.currentToken().contextId;if(null==l)throw new Error("Expected non-null context ID on class.");this.tokens.copyExpectedToken(Fc.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode("__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}");const p=n.length+a.length>0;if(null===i&&p){const e=this.makeConstructorInitCode(n,a,t);if(s.hasSuperclass){const t=this.nameManager.claimFreeName("args");this.tokens.appendCode(`constructor(...${t}) { super(...${t}); ${e}; }`)}else this.tokens.appendCode(`constructor() { ${e}; }`)}for(;!this.tokens.matchesContextIdAndLabel(Fc.braceR,l);)if(c<r.length&&this.tokens.currentIndex()===r[c].start){let e=!1;for(this.tokens.matches1(Fc.bracketL)?this.tokens.copyTokenWithPrefix(`${r[c].initializerName}() {this`):this.tokens.matches1(Fc.string)||this.tokens.matches1(Fc.num)?(this.tokens.copyTokenWithPrefix(`${r[c].initializerName}() {this[`),e=!0):this.tokens.copyTokenWithPrefix(`${r[c].initializerName}() {this.`);this.tokens.currentIndex()<r[c].end;)e&&this.tokens.currentIndex()===r[c].equalsIndex&&this.tokens.appendCode("]"),this.processToken();this.tokens.appendCode("}"),c++}else if(h<o.length&&this.tokens.currentIndex()>=o[h].start){for(this.tokens.currentIndex()<o[h].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<o[h].end;)this.tokens.removeToken();h++}else this.tokens.currentIndex()===i?(this.tokens.copyToken(),p&&this.tokens.appendCode(`;${this.makeConstructorInitCode(n,a,t)};`),this.processToken()):this.processToken();this.tokens.copyExpectedToken(Fc.braceR)}makeConstructorInitCode(e,t,s){return[...e,...t.map(e=>`${s}.prototype.${e}.call(this)`)].join(";")}processPossibleArrowParamEnd(){if(this.tokens.matches2(Fc.parenR,Fc.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType;)e++;if(this.tokens.matches1AtIndex(e,Fc.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<e;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(") =>"),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(Oc._async)&&!this.tokens.matches1(Fc._async))return!1;const e=this.tokens.tokenAtRelativeIndex(1);if(e.type!==Fc.lessThan||!e.isType)return!1;let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType;)t++;if(this.tokens.matches1AtIndex(t,Fc.parenL)){for(this.tokens.replaceToken("async ("),this.tokens.removeInitialToken();this.tokens.currentIndex()<t;)this.tokens.removeToken();return this.tokens.removeToken(),this.processBalancedCode(),this.processToken(),!0}return!1}processPossibleTypeRange(){if(this.tokens.currentToken().isType){for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return!0}return!1}shiftMappings(e,t){for(let s=0;s<e.length;s++){const i=e[s];void 0!==i&&(e[s]=i+t)}return e}}function ff(e,t,s){t++,e.matches1AtIndex(t,Fc.parenL)||(e.matches1AtIndex(t,Fc.name)&&(s.add(e.identifierNameAtIndex(t)),t++,e.matches1AtIndex(t,Fc.comma)&&t++),e.matches1AtIndex(t,Fc.star)&&(t+=2,s.add(e.identifierNameAtIndex(t)),t++),e.matches1AtIndex(t,Fc.braceL)&&function(e,t,s){for(;;){if(e.matches1AtIndex(t,Fc.braceR))return;const i=Xh(e,t);if(t=i.endIndex,i.isType||s.add(i.rightName),e.matches2AtIndex(t,Fc.comma,Fc.braceR))return;if(e.matches1AtIndex(t,Fc.braceR))return;if(!e.matches1AtIndex(t,Fc.comma))throw new Error(`Unexpected token: ${JSON.stringify(e.tokens[t])}`);t++}}(e,++t,s))}function mf(e,t){!function(e){Il.strictCheck(e)}(t);try{const s=function(e,t){const s=t.transforms.includes("jsx"),i=t.transforms.includes("typescript"),n=t.transforms.includes("flow"),r=!0===t.disableESTransforms,a=function(e,t,s,i){if(i&&s)throw new Error("Cannot combine flow and typescript plugins.");Gc(e,t,s,i);const n=Bd();if(Hc.error)throw Wc(Hc.error);return n}(e,s,i,n),o=a.tokens,c=a.scopes,h=new gl(e,o),l=new ml(h),p=new Ud(e,o,n,r,l),u=Boolean(t.enableLegacyTypeScriptModuleInterop);let d=null;t.transforms.includes("imports")?(d=new cl(h,p,u,t,t.transforms.includes("typescript"),Boolean(t.keepUnusedImports),l),d.preprocessTokens(),yl(p,c,d.getGlobalNames()),t.transforms.includes("typescript")&&!t.keepUnusedImports&&d.pruneTypeOnlyImports()):t.transforms.includes("typescript")&&!t.keepUnusedImports&&yl(p,c,function(e){const t=new Set;for(let s=0;s<e.tokens.length;s++)e.matches1AtIndex(s,Fc._import)&&!e.matches3AtIndex(s,Fc._import,Fc.name,Fc.eq)&&ff(e,s,t);return t}(p));return{tokenProcessor:p,scopes:c,nameManager:h,importProcessor:d,helperManager:l}}(e,t),i=new df(s,t.transforms,Boolean(t.enableLegacyBabel5ModuleInterop),t).transform();let n={code:i.code};if(t.sourceMapOptions){if(!t.filePath)throw new Error("filePath must be specified when generating a source map.");n={...n,sourceMap:dl(i,t.filePath,t.sourceMapOptions,e,s.tokenProcessor.tokens)}}return n}catch(e){throw t.filePath&&(e.message=`Error transforming ${t.filePath}: ${e.message}`),e}}function yf(e){return mf(e,{disableESTransforms:!0,transforms:["typescript"]}).code}function xf(e,t){try{const{program:s}=function(e,t){if("unambiguous"!==t?.sourceType)return Dc(t,e).parse();t={...t};try{t.sourceType="module";const s=Dc(t,e),i=s.parse();if(s.sawUnambiguousESM)return i;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",Dc(t,e).parse()}catch{}else i.program.sourceType="script";return i}catch(s){try{return t.sourceType="script",Dc(t,e).parse()}catch{}throw s}}(yf(e),{sourceFilename:t,sourceType:"module"});return function(e,t){if(e.body.some(e=>wt(e)&&!function(e){return St(e)&&!e.declaration&&!e.source&&0===e.specifiers.length}(e)))throw new k("GLTS scripts must not export values",{importChain:[t],phase:"transform",url:t});const s=e.body.filter(e=>"ImportDeclaration"===e.type),i=e.body.filter(e=>"ImportDeclaration"!==e.type),n=ti(i,e.directives),r=ni([],n,!0);e.body=[...s,ii(ri(si(r,[])))],e.directives=[]}(s,t),Vr(s,{retainLines:!0}).code}catch(e){throw T(e,"Unable to compile GLTS script",{importChain:[t],phase:"transform",url:t})}}!function(e){e.__esModule=!0,e.LinesAndColumns=void 0;var t="\n",s=function(){function e(e){this.string=e;for(var s=[0],i=0;i<e.length;)switch(e[i]){case t:i+=1,s.push(i);break;case"\r":e[i+=1]===t&&(i+=1),s.push(i);break;default:i++}this.offsets=s}return e.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,s=this.offsets;s[t+1]<=e;)t++;return{line:t,column:e-s[t]}},e.prototype.indexForLocation=function(e){var t=e.line,s=e.column;return t<0||t>=this.offsets.length||s<0||s>this.lengthOfLine(t)?null:this.offsets[t]+s},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}();e.LinesAndColumns=s,e.default=s}({});class gf{#i=new Set;#d=!1;create(e){if(this.#d)throw new Error("Module URL store has been disposed");const t=new Blob([e],{type:"text/javascript"}),s=URL.createObjectURL(t);return this.#i.add(s),s}release(e){this.#i.delete(e)&&URL.revokeObjectURL(e)}dispose(){if(!this.#d){this.#d=!0;for(const e of this.#i)URL.revokeObjectURL(e);this.#i.clear()}}}class kf{#t;#i=new gf;#s;#f;#m=new Map;#y=new Map;constructor({cdnURL:e,fetch:t,modules:s}){this.#t=t,this.#s=new xe(s??{},this.#i),this.#f=new me({cdnURL:e,fetch:t,bridge:this.#s,urls:this.#i})}async getScript(e){const t=this.#m.get(e);if(t)return t;const s=this.fetchScript(e);this.#m.set(e,s);try{return await s}catch(t){throw this.#m.delete(e),t}}commitScript(e,t){this.#m.set(e,Promise.resolve(t))}invalidateScript(e){this.#m.delete(e)}dependents(e){return[...this.#y].filter(([,t])=>t.has(e)).map(([e])=>e)}async evaluate(e,t){const s=this.#s.createContextModule(t),i=e.source.replaceAll(this.#s.contextToken,s.url),n=this.#i.create(i);try{await import(/* @vite-ignore */ /* webpackIgnore: true */n)}catch(t){throw T(t,"Unable to execute GLTS script",{importChain:[e.url],phase:"evaluate",url:e.url})}finally{this.#i.release(n),s.release()}}async fetchScript(e){const{source:t,url:s}=await v(this.#t,e,!0,[e]),i=xf(t,s),n=this.#y.get(e)??new Set;this.#y.set(e,n);const r={modules:new Map,urls:n},a=[s];try{const e=await fe({source:i,url:s,importChain:a},async e=>"@drawcall/glts"===e?this.#s.contextToken:this.#x(e,s,a,r));return{url:s,source:e}}catch(e){throw T(e,"Unable to transform GLTS script",{importChain:a,phase:"transform",url:s})}}async#x(e,t,s,i){const n=function(e,t){if(!e.startsWith("./")&&!e.startsWith("../"))return;const s=new URL(e,t);return s.pathname.endsWith(".ts")?s:void 0}(e,t);if(!n)return function(e,t,s){const i={importChain:s,phase:"resolve",url:t};if(e.startsWith("#"))throw new k(`Unsupported package import: ${e}`,i);if(!C(e)){if(new URL(e,t).pathname.endsWith(".glts"))throw new k(`Static GLTS imports are not supported: ${e}; use gltsLoader.loadAsync()`,i);if(!/^https?:/i.test(e))throw new k(`Unsupported local import: ${e}; import helpers as ./*.ts files and load other files with import.meta.url`,i)}}(e,t,s),this.#f.linkImport(e,t,s);const r=w(n);if(s.includes(r))throw new k("Cyclic helper imports are not supported",{importChain:[...s,r],phase:"resolve",url:r});i.urls.add(r);let a=i.modules.get(r);return a||(a=this.#g(r,[...s,r],i),i.modules.set(r,a)),a}async#g(e,t,s){const i=await v(this.#t,e,!0,t);let n;try{const e=function(e,t,s){try{return yf(e)}catch(e){throw T(e,"Unable to compile helper",{importChain:s,phase:"transform",url:t})}}(i.source,i.url,t);n=await fe({source:e,url:i.url,importChain:t},async e=>{if("@drawcall/glts"===e)throw new k("Helpers cannot import runtime values from @drawcall/glts; pass them from the script",{importChain:t,phase:"resolve",url:i.url});return this.#x(e,i.url,t,s)})}catch(e){throw T(e,"Unable to transform helper",{importChain:t,phase:"transform",url:i.url})}return this.#i.create(n)}dispose(){this.#s.dispose(),this.#i.dispose()}}function Tf(e,t){const s=[];let i;if(e.traverse(t=>{if(t!==e&&!i)if(function(e){return e instanceof h||e instanceof l||e instanceof a||e instanceof p||e instanceof u||e instanceof d||e instanceof f||e instanceof m||e instanceof y}(t))i=t;else if(t instanceof c){if(t.morphTargetInfluences)return void(i=t);s.push(t)}}),i)throw new k(`Automatic instancing does not support THREE.${i.type}; implement native instancing with onMatrixUpdateAt()`,{phase:"construct",url:t});if(0===s.length)throw new k("Automatic instancing requires at least one mesh; implement native instancing with onMatrixUpdateAt()",{phase:"construct",url:t});return s}class bf{#k;#T=new Set;#b=new Set;#S=[];#w=!0;constructor(e,t){this.#k=new Set([...t?t.#k:[],...e])}close(){this.#w=!1}assertCanLoad(e){if(this.#k.has(e))throw new k("Cyclic nested GLTS load",{importChain:[...this.#k,e],phase:"resolve",url:e});if(!this.#w)throw new k("The contextual gltsLoader is no longer active",{phase:"resolve",url:e})}own(e){return this.#v(e.then(e=>(this.#T.add(e),e)))}get nodes(){return[...this.#T]}async finish(){for(;this.#b.size>0;)await Promise.allSettled([...this.#b]);this.close();const e=this.#S.splice(0);if(e.length>0)throw new AggregateError(e,"Nested GLTS operation failed")}assertAttached(e){const t=new Set;e.traverse(e=>t.add(e));const s=[...this.#T].find(e=>!t.has(e));if(s)throw new k("Nested GLTS scenes must be added to scene",{phase:"construct",url:s.url})}#v(e){return this.#b.add(e),e.then(()=>this.#b.delete(e),t=>{this.#b.delete(e),this.#S.push(t)}),e}}function Sf(e,t){if("function"!=typeof e)throw new TypeError(`${t} expects a function`)}class wf{scene=function(){return Object.assign(new e,{defaultCamera:void 0,rendering:{effects:[],localClippingEnabled:!1,shadows:!1,toneMapping:t,toneMappingExposure:1}})}();nested;#C=[];#P=[];#E=[];#A;#I;#_;#N;#d=!1;constructor(e,t,s,i){this.#A=e,this.#I=s,this.nested=new bf(t,i?.nested)}context(e){return{bindScene:e=>{this.#N=e},gltsLoader:e.gltsLoader,instanceCount:this.#A.length,loadingManager:e.loadingManager,onDispose:e=>{this.#L(),Sf(e,"onDispose"),this.#C.push(e)},onFrame:e=>{this.#L(),Sf(e,"onFrame"),this.#P.push(e)},onMatrixUpdateAt:e=>{this.#L(),Sf(e,"onMatrixUpdateAt"),this.#E.push(e);for(const[t,s]of this.#A.entries())e(t,s.clone())},isPreview:e.isPreview,scene:this.scene}}bindScene(e){this.#N?.(e)}autoInstance(e){if(!(this.#E.length>0)){if(this.#P.length>0)throw new k("Automatically instanced scripts cannot use onFrame(); implement native instancing with onMatrixUpdateAt()",{phase:"construct",url:e});if(this.nested.nodes.length>0)throw new k("Automatically instanced scripts cannot contain nested GLTS scenes; implement native instancing with onMatrixUpdateAt()",{phase:"construct",url:e});this.#_=function(e,t,s){e.updateMatrixWorld(!0);const i=Tf(e,s),n=e.matrixWorld.clone().invert(),r=i.map(s=>{const i=n.clone().multiply(s.matrixWorld),r=new a(s.geometry,s.material,t.length);return function(e,t){t.castShadow=e.castShadow,t.customDepthMaterial=e.customDepthMaterial,t.customDistanceMaterial=e.customDistanceMaterial,t.frustumCulled=e.frustumCulled,t.layers.mask=e.layers.mask,t.name=e.name,t.onAfterRender=e.onAfterRender,t.onAfterShadow=e.onAfterShadow,t.onBeforeRender=e.onBeforeRender,t.onBeforeShadow=e.onBeforeShadow,t.receiveShadow=e.receiveShadow,t.renderOrder=e.renderOrder,t.userData=e.userData,t.visible=e.visible}(s,r),r.visible=function(e,t){let s=e;for(;s&&s!==t;){if(!s.visible)return!1;s=s.parent}return!0}(s,e),{relative:i,target:r}});e.clear(),e.add(...r.map(({target:e})=>e));const c=new o,h=(e,t)=>{for(const{relative:s,target:i}of r)c.multiplyMatrices(t,s),i.setMatrixAt(e,c),i.instanceMatrix.needsUpdate=!0,i.boundingBox=null,i.boundingSphere=null};for(const[e,s]of t.entries())h(e,s);return{dispose:()=>b("Automatic instance disposal failed",r.map(({target:e})=>()=>e.dispose())),setMatrixAt:h}}(this.scene,this.#A,e)}}dispose(e=this.scene){if(this.#d)return void e.clear();this.#d=!0,this.nested.close();const t=this.#C.splice(0).reverse();this.#P.length=0,this.#E.length=0,b("GLTS execution disposal failed",[()=>this.#I(e,this.nested.nodes),()=>this.#_?.dispose(),...t,()=>e.clear()])}setMatrixAt(e,t){if(this.#_)this.#_.setMatrixAt(e,t);else for(const s of this.#E)s(e,t.clone())}update(e){for(const t of this.#P)t(e)}#L(){if(this.#d)throw new Error("GLTS execution has been disposed")}}function vf(t){return t instanceof e&&"rendering"in t&&"string"==typeof Reflect.get(t,"url")&&"function"==typeof Reflect.get(t,"dispose")&&"function"==typeof Reflect.get(t,"update")}const Cf=new WeakMap;class Pf{#D=new Map;createScene(e,t){const s=this.#M(e.scene,t.url);return this.#D.set(s,{...t,disposed:!1,execution:e,node:s}),s}createInstances(e,t){const s=this.#M(e.scene,t.url),i=e=>{const i=this.#O(s,t.url).matrices[e];if(!Number.isSafeInteger(e)||!i)throw new RangeError(`GLTS instance index is out of range: ${e}`);return i};if(Object.defineProperties(s,{count:{value:t.matrices.length},getMatrixAt:{value:(e,t)=>t.copy(i(e))},setMatrixAt:{value:(e,n)=>(this.#O(s,t.url).execution.setMatrixAt(e,i(e).copy(n)),s)}}),!vf(n=s)||"number"!=typeof Reflect.get(n,"count")||"function"!=typeof Reflect.get(n,"getMatrixAt")||"function"!=typeof Reflect.get(n,"setMatrixAt"))throw new Error("Unable to create a managed GLTS instances node");var n;return this.#D.set(s,{...t,disposed:!1,execution:e,node:s}),s}recordsForURL(e){return[...this.#D.values()].filter(t=>t.url===e)}getRecord(e){return this.#O(e,e.url)}#F(e,t,s){const i=this.#O(e,t);if(!Number.isFinite(s)||s<0)throw new RangeError("GLTS update delta must be a non-negative finite number");i.execution.update(s);for(const t of this.#R(e))t.execution.update(s)}dispose(e){const t=this.#D.get(e);if(!t)return;t.disposed=!0,this.#D.delete(e);const s=[...Cf.get(e)??[]];Cf.delete(e),b("GLTS node disposal failed",[()=>t.execution.dispose(e),...s])}disposeNested(e,t){const s=new Set([...t,...this.#R(e).map(({node:e})=>e)]);this.#I([...s].reverse())}disposeAll(){this.#I([...this.#D.keys()])}#M(e,t){if(Object.defineProperties(e,{dispose:{value:()=>this.dispose(e)},update:{value:s=>this.#F(e,t,s)},url:{value:t}}),!vf(e))throw new Error("Unable to create a managed GLTS scene");return e}#O(e,t){const s=this.#D.get(e);if(!s)throw new k("GLTS node has been disposed",{phase:"dispose",url:t});return s}#I(e){b("GLTS node disposal failed",e.map(e=>()=>this.dispose(e)))}#R(e){const t=[];return e.traverse(s=>{const i=this.#D.get(s);i&&s!==e&&t.push(i)}),t}}function Ef(e,t){try{t()}catch(t){e.push(t)}}function Af(e,t,s){const i=T(t,"Unable to load GLTS script",{phase:"evaluate",url:e});return 0===s.length?i:new k("GLTS operation and LoadingManager callback both failed",i,new AggregateError([i,...s]))}async function If(e,t,s,i,n=()=>{}){s.throwIfAborted();const r=[];let a=()=>{};const o=new Promise((e,t)=>{a=()=>t(s.reason),s.addEventListener("abort",a)});let c;Ef(r,()=>e.itemStart(t));try{c=await Promise.race([i(),o])}catch(h){throw Ef(r,()=>e.itemError(t)),Ef(r,()=>e.itemEnd(t)),Af(t,h,r)}finally{s.removeEventListener("abort",a)}if(Ef(r,()=>e.itemEnd(t)),!s.aborted&&0===r.length)return c;const h=undefined;return S(s.aborted?Af(t,s.reason,r):new k("LoadingManager callback failed",{phase:"resource",url:t},new AggregateError(r)),t,()=>n(c))}class _f{manager;#B=[];#j=[];#U;#q=!0;#$;#b=0;constructor(e,t){this.#U=t;const s=new x,i=s.itemStart.bind(s),n=s.itemEnd.bind(s),r=s.itemError.bind(s),a=s.getHandler.bind(s);s.resolveURL=t=>e.resolveURL(t),s.getHandler=t=>{const s=a(t);if(s)return s;if(e.getHandler(t))throw new k("Host LoadingManager handlers cannot be scoped; register the handler with the contextual loadingManager",{phase:"resource",url:this.#U});return null},s.itemStart=t=>{this.#L(),this.#b+=1,Ef(this.#B,()=>i(t)),Ef(this.#B,()=>e.itemStart(t))},s.itemError=t=>{this.#j.push(t),Ef(this.#B,()=>r(t)),Ef(this.#B,()=>e.itemError(t))},s.itemEnd=t=>{if(0===this.#b)throw new Error(`LoadingManager item ended without a matching start: ${t}`);this.#b-=1,Ef(this.#B,()=>n(t)),Ef(this.#B,()=>e.itemEnd(t)),this.#V()},this.manager=s}cancel(e){this.#q&&(this.#q=!1,this.manager.abort(),this.#$?.reject(e),this.#$=void 0)}async waitAndClose(){await Promise.resolve(),this.#L(),this.#b>0&&await new Promise((e,t)=>{this.#$={reject:t,resolve:e}}),this.#q=!1,this.#H()}#L(){if(!this.#q)throw new k("Loading scope is no longer active",{phase:"dispose",url:this.#U})}#V(){if(0!==this.#b||!this.#$)return;const e=this.#$;this.#$=void 0,e.resolve()}#H(){if(0===this.#j.length&&0===this.#B.length)return;const e=this.#j.map(e=>`- ${e}`).join("\n"),t=e?`Resources failed to load:\n${e}`:"LoadingManager callback failed",s=this.#B.length>0?new AggregateError(this.#B,"LoadingManager callbacks failed"):void 0;throw new k(t,{phase:"resource",url:this.#U},s)}}class Nf{#K=[];#z=[];#J=[];acquireRead(e){return this.#W(e,()=>this.#z.every(t=>t.url!==e))}acquireReadBeforeQueuedWrite(e){return this.#W(e,()=>this.#z[0]?.url!==e)}async acquireWrite(e){const t={url:e};return this.#z.push(t),await this.#X(()=>this.#z[0]===t&&!this.#K.includes(e)),this.#G(()=>this.#z.shift())}async#W(e,t){return await this.#X(t,()=>this.#K.push(e)),this.#G(()=>this.#K.splice(this.#K.indexOf(e),1))}async#X(e,t){for(;!e();)await new Promise(e=>this.#J.push(e));t?.()}#G(e){let t=!1;return()=>{if(t)return;t=!0,e();const s=this.#J;this.#J=[];for(const e of s)e()}}}async function Lf(e,t,s,i){const n=await s.fetchScript(e),r=[];try{for(const e of t)r.push({record:e,execution:await i(n,e)});const e=t.find(e=>e.disposed);if(e)throw new k("GLTS node was disposed during reload",{phase:"reload",url:e.url})}catch(t){S(t,e,()=>b("GLTS reload discard failed",r.map(({execution:e})=>()=>e.dispose())))}s.commitScript(e,n);try{b("GLTS reload commit failed",r.map(({record:e,execution:t})=>()=>function(e,t){b("GLTS execution replacement failed",[()=>e.execution.dispose(e.node),()=>{var s,i;e.disposed&&S(new k("GLTS node was disposed during reload",{phase:"reload",url:e.url}),e.url,()=>t.dispose()),e.execution=t,s=e.node,i=t.scene,s.name=i.name,s.layers.mask=i.layers.mask,s.visible=i.visible,s.castShadow=i.castShadow,s.receiveShadow=i.receiveShadow,s.frustumCulled=i.frustumCulled,s.renderOrder=i.renderOrder,s.animations=i.animations.slice(),s.userData=i.userData,s.defaultCamera=i.defaultCamera,s.background=i.background,s.backgroundBlurriness=i.backgroundBlurriness,s.backgroundIntensity=i.backgroundIntensity,s.backgroundRotation.copy(i.backgroundRotation),s.environment=i.environment,s.environmentIntensity=i.environmentIntensity,s.environmentRotation.copy(i.environmentRotation),s.fog=i.fog,s.overrideMaterial=i.overrideMaterial,Object.assign(s.rendering,i.rendering,{effects:i.rendering.effects.slice()});for(const s of[...t.scene.children])e.node.add(s);t.bindScene(e.node)}])}(e,t)))}catch(t){throw new k("Reload committed, but replacing its nodes failed",{phase:"reload",url:e},t)}}function Df(e){const t="undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0;if(void 0!==t)return new URL(e,t);if(URL.canParse(e))return new URL(e);throw new k("A relative URL needs document.baseURI or location.href to resolve against",{phase:"resolve",url:String(e)})}class Mf extends g{#Y;#r;#Q=new AbortController;#Z=new Nf;#T=new Pf;constructor(e,t={}){if(super(e),!e)throw new TypeError("GLTSLoader requires a Three.js LoadingManager");this.#Y=t.isPreview??!1,this.#r=new kf({cdnURL:Df(t.cdnURL??"https://esm.sh/"),fetch:(e,t)=>this.#t(e,t),modules:t.modules})}load(e,t,s,i){this.loadAsync(e,s).then(t,e=>{i?i(e):console.error(e)})}async loadAsync(e,t){const s=this.#ee(e);if(t)throw new k("GLTSLoader does not support per-load progress callbacks; use LoadingManager.onProgress",{phase:"resolve",url:s});return this.#te(s,this.#Y)}async loadInstancesAsync(e,t){return this.#se(this.#ee(e),t)}async reload(e){const t=this.#ee(e);this.#Q.signal.throwIfAborted();const s=this.#r.dependents(t);if(0===s.length)return this.#ie(t);const i=(await Promise.allSettled(s.map(e=>this.#ie(e)))).flatMap(e=>"rejected"===e.status?[e.reason]:[]);if(1===i.length)throw i[0];if(i.length>1)throw new k("Reloading the helper's scripts failed",{phase:"reload",url:t},new AggregateError(i))}dispose(){this.#Q.signal.aborted||(this.#Q.abort(new k("Loader has been disposed",{phase:"dispose",url:"glts://loader"})),b("Loader disposal failed",[()=>this.#T.disposeAll(),()=>this.#r.dispose()]))}#te(e,t,s){const i={url:e,matrices:[new o],isPreview:t,instances:!1};return this.#a(i,s,e=>this.#T.createScene(e,i))}async#se(e,t,s){if(!Number.isSafeInteger(t)||t<1)throw new RangeError("GLTS instance count must be a positive integer");const i={url:e,matrices:Array.from({length:t},()=>new o),isPreview:!1,instances:!0};return this.#a(i,s,e=>this.#T.createInstances(e,i))}#a(e,t,s){const{url:i}=e,n=t?this.#Z.acquireReadBeforeQueuedWrite(i):this.#Z.acquireRead(i);return this.#ne(n,()=>If(this.manager,i,this.#Q.signal,async()=>{const n=await this.#re(await this.#r.getScript(i),e,t);try{return this.#Q.signal.throwIfAborted(),s(n)}catch(t){S(T(t,"Unable to construct GLTS "+(e.instances?"instances":"scene"),{phase:"construct",url:i}),i,()=>n.dispose())}},e=>e.dispose()))}async#re(e,t,s){const i=this.#Q.signal;i.throwIfAborted();const n=new wf(t.matrices,[t.url,e.url],(e,t)=>this.#T.disposeNested(e,t),s),r=new _f(this.manager,e.url),a=()=>r.cancel(i.reason);i.addEventListener("abort",a);try{return await this.#r.evaluate(e,n.context({gltsLoader:this.#ae(n,e.url),isPreview:t.isPreview,loadingManager:r.manager})),await n.nested.finish(),n.nested.assertAttached(n.scene),await r.waitAndClose(),t.instances&&n.autoInstance(e.url),n}catch(t){let s=t;r.cancel(s);try{await n.nested.finish()}catch(t){s=function(e,t,s){const i=T(t,"Unable to execute GLTS script",{phase:"evaluate",url:e});return s instanceof AggregateError&&1===s.errors.length&&s.errors[0]===t?i:new k("GLTS execution and nested operation both failed",i,new AggregateError([i,s]))}(e.url,s,t)}S(s,e.url,()=>n.dispose())}finally{i.removeEventListener("abort",a)}}#ie(e){return this.#ne(this.#Z.acquireWrite(e),async()=>{this.#r.invalidateScript(e);const t=this.#T.recordsForURL(e);0!==t.length&&await If(this.manager,e,this.#Q.signal,()=>Lf(e,t,this.#r,(e,t)=>this.#re(e,t)))})}async#ne(e,t){const s=await e;try{return this.#Q.signal.throwIfAborted(),await t()}finally{s()}}#ae(e,t){const s=s=>{const i=w(new URL(this.manager.resolveURL(String(s)),t));return e.nested.assertCanLoad(i),i};return{loadAsync:t=>e.nested.own(this.#te(s(t),!1,e)),loadInstancesAsync:(t,i)=>e.nested.own(this.#se(s(t),i,e))}}#ee(e){const t=e instanceof URL?e.href:`${this.path}${e}`;return w(Df(this.manager.resolveURL(t)))}#t(e,t){const s=new Headers(t?.headers);for(const[e,t]of Object.entries(this.requestHeader))s.set(e,t);const i={...t,headers:s};return this.withCredentials&&(i.credentials="include"),globalThis.fetch(e,i)}}export{k as GLTSError,Mf as GLTSLoader};