ui-thing 0.1.32 → 0.1.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import{a as he,b as rn,f as be}from"./chunk-S2R3PAZ7.js";var xr=he(Xn=>{"use strict";var vr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Xn.encode=function(r){if(0<=r&&r<vr.length)return vr[r];throw new TypeError("Must be between 0 and 63: "+r)};Xn.decode=function(r){var n=65,e=90,t=97,s=122,i=48,o=57,a=43,l=47,c=26,p=52;return n<=r&&r<=e?r-n:t<=r&&r<=s?r-t+c:i<=r&&r<=o?r-i+p:r==a?62:r==l?63:-1}});var Qn=he(Yn=>{"use strict";var Pr=xr(),Jn=5,Tr=1<<Jn,wr=Tr-1,Cr=Tr;function Qo(r){return r<0?(-r<<1)+1:(r<<1)+0}function Zo(r){var n=(r&1)===1,e=r>>1;return n?-e:e}Yn.encode=function(n){var e="",t,s=Qo(n);do t=s&wr,s>>>=Jn,s>0&&(t|=Cr),e+=Pr.encode(t);while(s>0);return e};Yn.decode=function(n,e,t){var s=n.length,i=0,o=0,a,l;do{if(e>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(l=Pr.decode(n.charCodeAt(e++)),l===-1)throw new Error("Invalid base64 digit: "+n.charAt(e-1));a=!!(l&Cr),l&=wr,i=i+(l<<o),o+=Jn}while(a);t.value=Zo(i),t.rest=e}});var nt=he(Z=>{"use strict";function ea(r,n,e){if(n in r)return r[n];if(arguments.length===3)return e;throw new Error('"'+n+'" is a required argument.')}Z.getArg=ea;var Sr=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,ta=/^data:.+\,.+$/;function It(r){var n=r.match(Sr);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}Z.urlParse=It;function tt(r){var n="";return r.scheme&&(n+=r.scheme+":"),n+="//",r.auth&&(n+=r.auth+"@"),r.host&&(n+=r.host),r.port&&(n+=":"+r.port),r.path&&(n+=r.path),n}Z.urlGenerate=tt;var na=32;function sa(r){var n=[];return function(e){for(var t=0;t<n.length;t++)if(n[t].input===e){var s=n[0];return n[0]=n[t],n[t]=s,n[0].result}var i=r(e);return n.unshift({input:e,result:i}),n.length>na&&n.pop(),i}}var Zn=sa(function(n){var e=n,t=It(n);if(t){if(!t.path)return n;e=t.path}for(var s=Z.isAbsolute(e),i=[],o=0,a=0;;)if(o=a,a=e.indexOf("/",o),a===-1){i.push(e.slice(o));break}else for(i.push(e.slice(o,a));a<e.length&&e[a]==="/";)a++;for(var l,c=0,a=i.length-1;a>=0;a--)l=i[a],l==="."?i.splice(a,1):l===".."?c++:c>0&&(l===""?(i.splice(a+1,c),c=0):(i.splice(a,2),c--));return e=i.join("/"),e===""&&(e=s?"/":"."),t?(t.path=e,tt(t)):e});Z.normalize=Zn;function Ir(r,n){r===""&&(r="."),n===""&&(n=".");var e=It(n),t=It(r);if(t&&(r=t.path||"/"),e&&!e.scheme)return t&&(e.scheme=t.scheme),tt(e);if(e||n.match(ta))return n;if(t&&!t.host&&!t.path)return t.host=n,tt(t);var s=n.charAt(0)==="/"?n:Zn(r.replace(/\/+$/,"")+"/"+n);return t?(t.path=s,tt(t)):s}Z.join=Ir;Z.isAbsolute=function(r){return r.charAt(0)==="/"||Sr.test(r)};function ra(r,n){r===""&&(r="."),r=r.replace(/\/$/,"");for(var e=0;n.indexOf(r+"/")!==0;){var t=r.lastIndexOf("/");if(t<0||(r=r.slice(0,t),r.match(/^([^\/]+:\/)?\/*$/)))return n;++e}return Array(e+1).join("../")+n.substr(r.length+1)}Z.relative=ra;var Er=function(){var r=Object.create(null);return!("__proto__"in r)}();function Ar(r){return r}function ia(r){return kr(r)?"$"+r:r}Z.toSetString=Er?Ar:ia;function oa(r){return kr(r)?r.slice(1):r}Z.fromSetString=Er?Ar:oa;function kr(r){if(!r)return!1;var n=r.length;if(n<9||r.charCodeAt(n-1)!==95||r.charCodeAt(n-2)!==95||r.charCodeAt(n-3)!==111||r.charCodeAt(n-4)!==116||r.charCodeAt(n-5)!==111||r.charCodeAt(n-6)!==114||r.charCodeAt(n-7)!==112||r.charCodeAt(n-8)!==95||r.charCodeAt(n-9)!==95)return!1;for(var e=n-10;e>=0;e--)if(r.charCodeAt(e)!==36)return!1;return!0}function aa(r,n,e){var t=Me(r.source,n.source);return t!==0||(t=r.originalLine-n.originalLine,t!==0)||(t=r.originalColumn-n.originalColumn,t!==0||e)||(t=r.generatedColumn-n.generatedColumn,t!==0)||(t=r.generatedLine-n.generatedLine,t!==0)?t:Me(r.name,n.name)}Z.compareByOriginalPositions=aa;function la(r,n,e){var t;return t=r.originalLine-n.originalLine,t!==0||(t=r.originalColumn-n.originalColumn,t!==0||e)||(t=r.generatedColumn-n.generatedColumn,t!==0)||(t=r.generatedLine-n.generatedLine,t!==0)?t:Me(r.name,n.name)}Z.compareByOriginalPositionsNoSource=la;function ca(r,n,e){var t=r.generatedLine-n.generatedLine;return t!==0||(t=r.generatedColumn-n.generatedColumn,t!==0||e)||(t=Me(r.source,n.source),t!==0)||(t=r.originalLine-n.originalLine,t!==0)||(t=r.originalColumn-n.originalColumn,t!==0)?t:Me(r.name,n.name)}Z.compareByGeneratedPositionsDeflated=ca;function pa(r,n,e){var t=r.generatedColumn-n.generatedColumn;return t!==0||e||(t=Me(r.source,n.source),t!==0)||(t=r.originalLine-n.originalLine,t!==0)||(t=r.originalColumn-n.originalColumn,t!==0)?t:Me(r.name,n.name)}Z.compareByGeneratedPositionsDeflatedNoLine=pa;function Me(r,n){return r===n?0:r===null?1:n===null?-1:r>n?1:-1}function ua(r,n){var e=r.generatedLine-n.generatedLine;return e!==0||(e=r.generatedColumn-n.generatedColumn,e!==0)||(e=Me(r.source,n.source),e!==0)||(e=r.originalLine-n.originalLine,e!==0)||(e=r.originalColumn-n.originalColumn,e!==0)?e:Me(r.name,n.name)}Z.compareByGeneratedPositionsInflated=ua;function da(r){return JSON.parse(r.replace(/^\)]}'[^\n]*\n/,""))}Z.parseSourceMapInput=da;function fa(r,n,e){if(n=n||"",r&&(r[r.length-1]!=="/"&&n[0]!=="/"&&(r+="/"),n=r+n),e){var t=It(e);if(!t)throw new Error("sourceMapURL could not be parsed");if(t.path){var s=t.path.lastIndexOf("/");s>=0&&(t.path=t.path.substring(0,s+1))}n=Ir(tt(t),n)}return Zn(n)}Z.computeSourceURL=fa});var ns=he(Nr=>{"use strict";var es=nt(),ts=Object.prototype.hasOwnProperty,Ge=typeof Map<"u";function Le(){this._array=[],this._set=Ge?new Map:Object.create(null)}Le.fromArray=function(n,e){for(var t=new Le,s=0,i=n.length;s<i;s++)t.add(n[s],e);return t};Le.prototype.size=function(){return Ge?this._set.size:Object.getOwnPropertyNames(this._set).length};Le.prototype.add=function(n,e){var t=Ge?n:es.toSetString(n),s=Ge?this.has(n):ts.call(this._set,t),i=this._array.length;(!s||e)&&this._array.push(n),s||(Ge?this._set.set(n,i):this._set[t]=i)};Le.prototype.has=function(n){if(Ge)return this._set.has(n);var e=es.toSetString(n);return ts.call(this._set,e)};Le.prototype.indexOf=function(n){if(Ge){var e=this._set.get(n);if(e>=0)return e}else{var t=es.toSetString(n);if(ts.call(this._set,t))return this._set[t]}throw new Error('"'+n+'" is not in the set.')};Le.prototype.at=function(n){if(n>=0&&n<this._array.length)return this._array[n];throw new Error("No element indexed by "+n)};Le.prototype.toArray=function(){return this._array.slice()};Nr.ArraySet=Le});var Lr=he(Mr=>{"use strict";var Dr=nt();function ma(r,n){var e=r.generatedLine,t=n.generatedLine,s=r.generatedColumn,i=n.generatedColumn;return t>e||t==e&&i>=s||Dr.compareByGeneratedPositionsInflated(r,n)<=0}function on(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}on.prototype.unsortedForEach=function(n,e){this._array.forEach(n,e)};on.prototype.add=function(n){ma(this._last,n)?(this._last=n,this._array.push(n)):(this._sorted=!1,this._array.push(n))};on.prototype.toArray=function(){return this._sorted||(this._array.sort(Dr.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Mr.MappingList=on});var ss=he(Or=>{"use strict";var Et=Qn(),J=nt(),an=ns().ArraySet,ha=Lr().MappingList;function ge(r){r||(r={}),this._file=J.getArg(r,"file",null),this._sourceRoot=J.getArg(r,"sourceRoot",null),this._skipValidation=J.getArg(r,"skipValidation",!1),this._ignoreInvalidMapping=J.getArg(r,"ignoreInvalidMapping",!1),this._sources=new an,this._names=new an,this._mappings=new ha,this._sourcesContents=null}ge.prototype._version=3;ge.fromSourceMap=function(n,e){var t=n.sourceRoot,s=new ge(Object.assign(e||{},{file:n.file,sourceRoot:t}));return n.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,t!=null&&(o.source=J.relative(t,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),s.addMapping(o)}),n.sources.forEach(function(i){var o=i;t!==null&&(o=J.relative(t,i)),s._sources.has(o)||s._sources.add(o);var a=n.sourceContentFor(i);a!=null&&s.setSourceContent(i,a)}),s};ge.prototype.addMapping=function(n){var e=J.getArg(n,"generated"),t=J.getArg(n,"original",null),s=J.getArg(n,"source",null),i=J.getArg(n,"name",null);!this._skipValidation&&this._validateMapping(e,t,s,i)===!1||(s!=null&&(s=String(s),this._sources.has(s)||this._sources.add(s)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:t!=null&&t.line,originalColumn:t!=null&&t.column,source:s,name:i}))};ge.prototype.setSourceContent=function(n,e){var t=n;this._sourceRoot!=null&&(t=J.relative(this._sourceRoot,t)),e!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[J.toSetString(t)]=e):this._sourcesContents&&(delete this._sourcesContents[J.toSetString(t)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};ge.prototype.applySourceMap=function(n,e,t){var s=e;if(e==null){if(n.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);s=n.file}var i=this._sourceRoot;i!=null&&(s=J.relative(i,s));var o=new an,a=new an;this._mappings.unsortedForEach(function(l){if(l.source===s&&l.originalLine!=null){var c=n.originalPositionFor({line:l.originalLine,column:l.originalColumn});c.source!=null&&(l.source=c.source,t!=null&&(l.source=J.join(t,l.source)),i!=null&&(l.source=J.relative(i,l.source)),l.originalLine=c.line,l.originalColumn=c.column,c.name!=null&&(l.name=c.name))}var p=l.source;p!=null&&!o.has(p)&&o.add(p);var u=l.name;u!=null&&!a.has(u)&&a.add(u)},this),this._sources=o,this._names=a,n.sources.forEach(function(l){var c=n.sourceContentFor(l);c!=null&&(t!=null&&(l=J.join(t,l)),i!=null&&(l=J.relative(i,l)),this.setSourceContent(l,c))},this)};ge.prototype._validateMapping=function(n,e,t,s){if(e&&typeof e.line!="number"&&typeof e.column!="number"){var i="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(i),!1;throw new Error(i)}if(!(n&&"line"in n&&"column"in n&&n.line>0&&n.column>=0&&!e&&!t&&!s)){if(n&&"line"in n&&"column"in n&&e&&"line"in e&&"column"in e&&n.line>0&&n.column>=0&&e.line>0&&e.column>=0&&t)return;var i="Invalid mapping: "+JSON.stringify({generated:n,source:t,original:e,name:s});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(i),!1;throw new Error(i)}};ge.prototype._serializeMappings=function(){for(var n=0,e=1,t=0,s=0,i=0,o=0,a="",l,c,p,u,f=this._mappings.toArray(),m=0,d=f.length;m<d;m++){if(c=f[m],l="",c.generatedLine!==e)for(n=0;c.generatedLine!==e;)l+=";",e++;else if(m>0){if(!J.compareByGeneratedPositionsInflated(c,f[m-1]))continue;l+=","}l+=Et.encode(c.generatedColumn-n),n=c.generatedColumn,c.source!=null&&(u=this._sources.indexOf(c.source),l+=Et.encode(u-o),o=u,l+=Et.encode(c.originalLine-1-s),s=c.originalLine-1,l+=Et.encode(c.originalColumn-t),t=c.originalColumn,c.name!=null&&(p=this._names.indexOf(c.name),l+=Et.encode(p-i),i=p)),a+=l}return a};ge.prototype._generateSourcesContent=function(n,e){return n.map(function(t){if(!this._sourcesContents)return null;e!=null&&(t=J.relative(e,t));var s=J.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,s)?this._sourcesContents[s]:null},this)};ge.prototype.toJSON=function(){var n={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(n.file=this._file),this._sourceRoot!=null&&(n.sourceRoot=this._sourceRoot),this._sourcesContents&&(n.sourcesContent=this._generateSourcesContent(n.sources,n.sourceRoot)),n};ge.prototype.toString=function(){return JSON.stringify(this.toJSON())};Or.SourceMapGenerator=ge});var Fr=he(We=>{"use strict";We.GREATEST_LOWER_BOUND=1;We.LEAST_UPPER_BOUND=2;function rs(r,n,e,t,s,i){var o=Math.floor((n-r)/2)+r,a=s(e,t[o],!0);return a===0?o:a>0?n-o>1?rs(o,n,e,t,s,i):i==We.LEAST_UPPER_BOUND?n<t.length?n:-1:o:o-r>1?rs(r,o,e,t,s,i):i==We.LEAST_UPPER_BOUND?o:r<0?-1:r}We.search=function(n,e,t,s){if(e.length===0)return-1;var i=rs(-1,e.length,n,e,t,s||We.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&t(e[i],e[i-1],!0)===0;)--i;return i}});var _r=he(Rr=>{"use strict";function ba(r){function n(s,i,o){var a=s[i];s[i]=s[o],s[o]=a}function e(s,i){return Math.round(s+Math.random()*(i-s))}function t(s,i,o,a){if(o<a){var l=e(o,a),c=o-1;n(s,l,a);for(var p=s[a],u=o;u<a;u++)i(s[u],p,!1)<=0&&(c+=1,n(s,c,u));n(s,c+1,u);var f=c+1;t(s,i,o,f-1),t(s,i,f+1,a)}}return t}function ga(r){let n=ba.toString();return new Function(`return ${n}`)()(r)}var Ur=new WeakMap;Rr.quickSort=function(r,n,e=0){let t=Ur.get(n);t===void 0&&(t=ga(n),Ur.set(n,t)),t(r,n,e,r.length-1)}});var Vr=he(ln=>{"use strict";var D=nt(),os=Fr(),st=ns().ArraySet,ya=Qn(),At=_r().quickSort;function G(r,n){var e=r;return typeof r=="string"&&(e=D.parseSourceMapInput(r)),e.sections!=null?new Te(e,n):new ee(e,n)}G.fromSourceMap=function(r,n){return ee.fromSourceMap(r,n)};G.prototype._version=3;G.prototype.__generatedMappings=null;Object.defineProperty(G.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});G.prototype.__originalMappings=null;Object.defineProperty(G.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});G.prototype._charIsMappingSeparator=function(n,e){var t=n.charAt(e);return t===";"||t===","};G.prototype._parseMappings=function(n,e){throw new Error("Subclasses must implement _parseMappings")};G.GENERATED_ORDER=1;G.ORIGINAL_ORDER=2;G.GREATEST_LOWER_BOUND=1;G.LEAST_UPPER_BOUND=2;G.prototype.eachMapping=function(n,e,t){var s=e||null,i=t||G.GENERATED_ORDER,o;switch(i){case G.GENERATED_ORDER:o=this._generatedMappings;break;case G.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var a=this.sourceRoot,l=n.bind(s),c=this._names,p=this._sources,u=this._sourceMapURL,f=0,m=o.length;f<m;f++){var d=o[f],g=d.source===null?null:p.at(d.source);g!==null&&(g=D.computeSourceURL(a,g,u)),l({source:g,generatedLine:d.generatedLine,generatedColumn:d.generatedColumn,originalLine:d.originalLine,originalColumn:d.originalColumn,name:d.name===null?null:c.at(d.name)})}};G.prototype.allGeneratedPositionsFor=function(n){var e=D.getArg(n,"line"),t={source:D.getArg(n,"source"),originalLine:e,originalColumn:D.getArg(n,"column",0)};if(t.source=this._findSourceIndex(t.source),t.source<0)return[];var s=[],i=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",D.compareByOriginalPositions,os.LEAST_UPPER_BOUND);if(i>=0){var o=this._originalMappings[i];if(n.column===void 0)for(var a=o.originalLine;o&&o.originalLine===a;)s.push({line:D.getArg(o,"generatedLine",null),column:D.getArg(o,"generatedColumn",null),lastColumn:D.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++i];else for(var l=o.originalColumn;o&&o.originalLine===e&&o.originalColumn==l;)s.push({line:D.getArg(o,"generatedLine",null),column:D.getArg(o,"generatedColumn",null),lastColumn:D.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++i]}return s};ln.SourceMapConsumer=G;function ee(r,n){var e=r;typeof r=="string"&&(e=D.parseSourceMapInput(r));var t=D.getArg(e,"version"),s=D.getArg(e,"sources"),i=D.getArg(e,"names",[]),o=D.getArg(e,"sourceRoot",null),a=D.getArg(e,"sourcesContent",null),l=D.getArg(e,"mappings"),c=D.getArg(e,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);o&&(o=D.normalize(o)),s=s.map(String).map(D.normalize).map(function(p){return o&&D.isAbsolute(o)&&D.isAbsolute(p)?D.relative(o,p):p}),this._names=st.fromArray(i.map(String),!0),this._sources=st.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map(function(p){return D.computeSourceURL(o,p,n)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=n,this.file=c}ee.prototype=Object.create(G.prototype);ee.prototype.consumer=G;ee.prototype._findSourceIndex=function(r){var n=r;if(this.sourceRoot!=null&&(n=D.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);var e;for(e=0;e<this._absoluteSources.length;++e)if(this._absoluteSources[e]==r)return e;return-1};ee.fromSourceMap=function(n,e){var t=Object.create(ee.prototype),s=t._names=st.fromArray(n._names.toArray(),!0),i=t._sources=st.fromArray(n._sources.toArray(),!0);t.sourceRoot=n._sourceRoot,t.sourcesContent=n._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=n._file,t._sourceMapURL=e,t._absoluteSources=t._sources.toArray().map(function(m){return D.computeSourceURL(t.sourceRoot,m,e)});for(var o=n._mappings.toArray().slice(),a=t.__generatedMappings=[],l=t.__originalMappings=[],c=0,p=o.length;c<p;c++){var u=o[c],f=new jr;f.generatedLine=u.generatedLine,f.generatedColumn=u.generatedColumn,u.source&&(f.source=i.indexOf(u.source),f.originalLine=u.originalLine,f.originalColumn=u.originalColumn,u.name&&(f.name=s.indexOf(u.name)),l.push(f)),a.push(f)}return At(t.__originalMappings,D.compareByOriginalPositions),t};ee.prototype._version=3;Object.defineProperty(ee.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function jr(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var is=D.compareByGeneratedPositionsDeflatedNoLine;function Br(r,n){let e=r.length,t=r.length-n;if(!(t<=1))if(t==2){let s=r[n],i=r[n+1];is(s,i)>0&&(r[n]=i,r[n+1]=s)}else if(t<20)for(let s=n;s<e;s++)for(let i=s;i>n;i--){let o=r[i-1],a=r[i];if(is(o,a)<=0)break;r[i-1]=a,r[i]=o}else At(r,is,n)}ee.prototype._parseMappings=function(n,e){var t=1,s=0,i=0,o=0,a=0,l=0,c=n.length,p=0,u={},f={},m=[],d=[],g,h,y,P,E;let x=0;for(;p<c;)if(n.charAt(p)===";")t++,p++,s=0,Br(d,x),x=d.length;else if(n.charAt(p)===",")p++;else{for(g=new jr,g.generatedLine=t,P=p;P<c&&!this._charIsMappingSeparator(n,P);P++);for(h=n.slice(p,P),y=[];p<P;)ya.decode(n,p,f),E=f.value,p=f.rest,y.push(E);if(y.length===2)throw new Error("Found a source, but no line and column");if(y.length===3)throw new Error("Found a source and line, but no column");if(g.generatedColumn=s+y[0],s=g.generatedColumn,y.length>1&&(g.source=a+y[1],a+=y[1],g.originalLine=i+y[2],i=g.originalLine,g.originalLine+=1,g.originalColumn=o+y[3],o=g.originalColumn,y.length>4&&(g.name=l+y[4],l+=y[4])),d.push(g),typeof g.originalLine=="number"){let C=g.source;for(;m.length<=C;)m.push(null);m[C]===null&&(m[C]=[]),m[C].push(g)}}Br(d,x),this.__generatedMappings=d;for(var T=0;T<m.length;T++)m[T]!=null&&At(m[T],D.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...m)};ee.prototype._findMapping=function(n,e,t,s,i,o){if(n[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+n[t]);if(n[s]<0)throw new TypeError("Column must be greater than or equal to 0, got "+n[s]);return os.search(n,e,i,o)};ee.prototype.computeColumnSpans=function(){for(var n=0;n<this._generatedMappings.length;++n){var e=this._generatedMappings[n];if(n+1<this._generatedMappings.length){var t=this._generatedMappings[n+1];if(e.generatedLine===t.generatedLine){e.lastGeneratedColumn=t.generatedColumn-1;continue}}e.lastGeneratedColumn=1/0}};ee.prototype.originalPositionFor=function(n){var e={generatedLine:D.getArg(n,"line"),generatedColumn:D.getArg(n,"column")},t=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",D.compareByGeneratedPositionsDeflated,D.getArg(n,"bias",G.GREATEST_LOWER_BOUND));if(t>=0){var s=this._generatedMappings[t];if(s.generatedLine===e.generatedLine){var i=D.getArg(s,"source",null);i!==null&&(i=this._sources.at(i),i=D.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var o=D.getArg(s,"name",null);return o!==null&&(o=this._names.at(o)),{source:i,line:D.getArg(s,"originalLine",null),column:D.getArg(s,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};ee.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(n){return n==null}):!1};ee.prototype.sourceContentFor=function(n,e){if(!this.sourcesContent)return null;var t=this._findSourceIndex(n);if(t>=0)return this.sourcesContent[t];var s=n;this.sourceRoot!=null&&(s=D.relative(this.sourceRoot,s));var i;if(this.sourceRoot!=null&&(i=D.urlParse(this.sourceRoot))){var o=s.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!i.path||i.path=="/")&&this._sources.has("/"+s))return this.sourcesContent[this._sources.indexOf("/"+s)]}if(e)return null;throw new Error('"'+s+'" is not in the SourceMap.')};ee.prototype.generatedPositionFor=function(n){var e=D.getArg(n,"source");if(e=this._findSourceIndex(e),e<0)return{line:null,column:null,lastColumn:null};var t={source:e,originalLine:D.getArg(n,"line"),originalColumn:D.getArg(n,"column")},s=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",D.compareByOriginalPositions,D.getArg(n,"bias",G.GREATEST_LOWER_BOUND));if(s>=0){var i=this._originalMappings[s];if(i.source===t.source)return{line:D.getArg(i,"generatedLine",null),column:D.getArg(i,"generatedColumn",null),lastColumn:D.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};ln.BasicSourceMapConsumer=ee;function Te(r,n){var e=r;typeof r=="string"&&(e=D.parseSourceMapInput(r));var t=D.getArg(e,"version"),s=D.getArg(e,"sections");if(t!=this._version)throw new Error("Unsupported version: "+t);this._sources=new st,this._names=new st;var i={line:-1,column:0};this._sections=s.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var a=D.getArg(o,"offset"),l=D.getArg(a,"line"),c=D.getArg(a,"column");if(l<i.line||l===i.line&&c<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=a,{generatedOffset:{generatedLine:l+1,generatedColumn:c+1},consumer:new G(D.getArg(o,"map"),n)}})}Te.prototype=Object.create(G.prototype);Te.prototype.constructor=G;Te.prototype._version=3;Object.defineProperty(Te.prototype,"sources",{get:function(){for(var r=[],n=0;n<this._sections.length;n++)for(var e=0;e<this._sections[n].consumer.sources.length;e++)r.push(this._sections[n].consumer.sources[e]);return r}});Te.prototype.originalPositionFor=function(n){var e={generatedLine:D.getArg(n,"line"),generatedColumn:D.getArg(n,"column")},t=os.search(e,this._sections,function(i,o){var a=i.generatedLine-o.generatedOffset.generatedLine;return a||i.generatedColumn-o.generatedOffset.generatedColumn}),s=this._sections[t];return s?s.consumer.originalPositionFor({line:e.generatedLine-(s.generatedOffset.generatedLine-1),column:e.generatedColumn-(s.generatedOffset.generatedLine===e.generatedLine?s.generatedOffset.generatedColumn-1:0),bias:n.bias}):{source:null,line:null,column:null,name:null}};Te.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(n){return n.consumer.hasContentsOfAllSources()})};Te.prototype.sourceContentFor=function(n,e){for(var t=0;t<this._sections.length;t++){var s=this._sections[t],i=s.consumer.sourceContentFor(n,!0);if(i||i==="")return i}if(e)return null;throw new Error('"'+n+'" is not in the SourceMap.')};Te.prototype.generatedPositionFor=function(n){for(var e=0;e<this._sections.length;e++){var t=this._sections[e];if(t.consumer._findSourceIndex(D.getArg(n,"source"))!==-1){var s=t.consumer.generatedPositionFor(n);if(s){var i={line:s.line+(t.generatedOffset.generatedLine-1),column:s.column+(t.generatedOffset.generatedLine===s.line?t.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}};Te.prototype._parseMappings=function(n,e){this.__generatedMappings=[],this.__originalMappings=[];for(var t=0;t<this._sections.length;t++)for(var s=this._sections[t],i=s.consumer._generatedMappings,o=0;o<i.length;o++){var a=i[o],l=s.consumer._sources.at(a.source);l!==null&&(l=D.computeSourceURL(s.consumer.sourceRoot,l,this._sourceMapURL)),this._sources.add(l),l=this._sources.indexOf(l);var c=null;a.name&&(c=s.consumer._names.at(a.name),this._names.add(c),c=this._names.indexOf(c));var p={source:l,generatedLine:a.generatedLine+(s.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(s.generatedOffset.generatedLine===a.generatedLine?s.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:c};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}At(this.__generatedMappings,D.compareByGeneratedPositionsDeflated),At(this.__originalMappings,D.compareByOriginalPositions)};ln.IndexedSourceMapConsumer=Te});var $r=he(zr=>{"use strict";var va=ss().SourceMapGenerator,cn=nt(),xa=/(\r?\n)/,Pa=10,rt="$$$isSourceNode$$$";function ce(r,n,e,t,s){this.children=[],this.sourceContents={},this.line=r??null,this.column=n??null,this.source=e??null,this.name=s??null,this[rt]=!0,t!=null&&this.add(t)}ce.fromStringWithSourceMap=function(n,e,t){var s=new ce,i=n.split(xa),o=0,a=function(){var f=d(),m=d()||"";return f+m;function d(){return o<i.length?i[o++]:void 0}},l=1,c=0,p=null;return e.eachMapping(function(f){if(p!==null)if(l<f.generatedLine)u(p,a()),l++,c=0;else{var m=i[o]||"",d=m.substr(0,f.generatedColumn-c);i[o]=m.substr(f.generatedColumn-c),c=f.generatedColumn,u(p,d),p=f;return}for(;l<f.generatedLine;)s.add(a()),l++;if(c<f.generatedColumn){var m=i[o]||"";s.add(m.substr(0,f.generatedColumn)),i[o]=m.substr(f.generatedColumn),c=f.generatedColumn}p=f},this),o<i.length&&(p&&u(p,a()),s.add(i.splice(o).join(""))),e.sources.forEach(function(f){var m=e.sourceContentFor(f);m!=null&&(t!=null&&(f=cn.join(t,f)),s.setSourceContent(f,m))}),s;function u(f,m){if(f===null||f.source===void 0)s.add(m);else{var d=t?cn.join(t,f.source):f.source;s.add(new ce(f.originalLine,f.originalColumn,d,m,f.name))}}};ce.prototype.add=function(n){if(Array.isArray(n))n.forEach(function(e){this.add(e)},this);else if(n[rt]||typeof n=="string")n&&this.children.push(n);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+n);return this};ce.prototype.prepend=function(n){if(Array.isArray(n))for(var e=n.length-1;e>=0;e--)this.prepend(n[e]);else if(n[rt]||typeof n=="string")this.children.unshift(n);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+n);return this};ce.prototype.walk=function(n){for(var e,t=0,s=this.children.length;t<s;t++)e=this.children[t],e[rt]?e.walk(n):e!==""&&n(e,{source:this.source,line:this.line,column:this.column,name:this.name})};ce.prototype.join=function(n){var e,t,s=this.children.length;if(s>0){for(e=[],t=0;t<s-1;t++)e.push(this.children[t]),e.push(n);e.push(this.children[t]),this.children=e}return this};ce.prototype.replaceRight=function(n,e){var t=this.children[this.children.length-1];return t[rt]?t.replaceRight(n,e):typeof t=="string"?this.children[this.children.length-1]=t.replace(n,e):this.children.push("".replace(n,e)),this};ce.prototype.setSourceContent=function(n,e){this.sourceContents[cn.toSetString(n)]=e};ce.prototype.walkSourceContents=function(n){for(var e=0,t=this.children.length;e<t;e++)this.children[e][rt]&&this.children[e].walkSourceContents(n);for(var s=Object.keys(this.sourceContents),e=0,t=s.length;e<t;e++)n(cn.fromSetString(s[e]),this.sourceContents[s[e]])};ce.prototype.toString=function(){var n="";return this.walk(function(e){n+=e}),n};ce.prototype.toStringWithSourceMap=function(n){var e={code:"",line:1,column:0},t=new va(n),s=!1,i=null,o=null,a=null,l=null;return this.walk(function(c,p){e.code+=c,p.source!==null&&p.line!==null&&p.column!==null?((i!==p.source||o!==p.line||a!==p.column||l!==p.name)&&t.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:e.line,column:e.column},name:p.name}),i=p.source,o=p.line,a=p.column,l=p.name,s=!0):s&&(t.addMapping({generated:{line:e.line,column:e.column}}),i=null,s=!1);for(var u=0,f=c.length;u<f;u++)c.charCodeAt(u)===Pa?(e.line++,e.column=0,u+1===f?(i=null,s=!1):s&&t.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:e.line,column:e.column},name:p.name})):e.column++}),this.walkSourceContents(function(c,p){t.setSourceContent(c,p)}),{code:e.code,map:t}};zr.SourceNode=ce});var as=he(pn=>{"use strict";pn.SourceMapGenerator=ss().SourceMapGenerator;pn.SourceMapConsumer=Vr().SourceMapConsumer;pn.SourceNode=$r().SourceNode});var $s=he(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});function Ta(r,n){if(r==null)return{};var e={};for(var t in r)if({}.hasOwnProperty.call(r,t)){if(n.includes(t))continue;e[t]=r[t]}return e}var ke=class{constructor(n,e,t){this.line=void 0,this.column=void 0,this.index=void 0,this.line=n,this.column=e,this.index=t}},ct=class{constructor(n,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=n,this.end=e}};function se(r,n){let{line:e,column:t,index:s}=r;return new ke(e,t+n,s+n)}var qr="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",wa={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:qr},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:qr}},Hr={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"},fn=r=>r.type==="UpdateExpression"?Hr.UpdateExpression[`${r.prefix}`]:Hr[r.type],Ca={AccessorIsGenerator:({kind:r})=>`A ${r}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.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",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:r})=>`Missing initializer in ${r} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:r})=>`\`${r}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:r})=>`'import.${r}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:r,exportName:n})=>`A string literal cannot be used as an exported binding without \`from\`.
2
+ import{a as he,b as rn,f as be}from"./chunk-S2R3PAZ7.js";var xr=he(Xn=>{"use strict";var vr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Xn.encode=function(r){if(0<=r&&r<vr.length)return vr[r];throw new TypeError("Must be between 0 and 63: "+r)};Xn.decode=function(r){var n=65,e=90,t=97,s=122,i=48,o=57,a=43,l=47,c=26,p=52;return n<=r&&r<=e?r-n:t<=r&&r<=s?r-t+c:i<=r&&r<=o?r-i+p:r==a?62:r==l?63:-1}});var Qn=he(Yn=>{"use strict";var Pr=xr(),Jn=5,Tr=1<<Jn,wr=Tr-1,Cr=Tr;function Qo(r){return r<0?(-r<<1)+1:(r<<1)+0}function Zo(r){var n=(r&1)===1,e=r>>1;return n?-e:e}Yn.encode=function(n){var e="",t,s=Qo(n);do t=s&wr,s>>>=Jn,s>0&&(t|=Cr),e+=Pr.encode(t);while(s>0);return e};Yn.decode=function(n,e,t){var s=n.length,i=0,o=0,a,l;do{if(e>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(l=Pr.decode(n.charCodeAt(e++)),l===-1)throw new Error("Invalid base64 digit: "+n.charAt(e-1));a=!!(l&Cr),l&=wr,i=i+(l<<o),o+=Jn}while(a);t.value=Zo(i),t.rest=e}});var nt=he(Z=>{"use strict";function ea(r,n,e){if(n in r)return r[n];if(arguments.length===3)return e;throw new Error('"'+n+'" is a required argument.')}Z.getArg=ea;var Sr=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,ta=/^data:.+\,.+$/;function It(r){var n=r.match(Sr);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}Z.urlParse=It;function tt(r){var n="";return r.scheme&&(n+=r.scheme+":"),n+="//",r.auth&&(n+=r.auth+"@"),r.host&&(n+=r.host),r.port&&(n+=":"+r.port),r.path&&(n+=r.path),n}Z.urlGenerate=tt;var na=32;function sa(r){var n=[];return function(e){for(var t=0;t<n.length;t++)if(n[t].input===e){var s=n[0];return n[0]=n[t],n[t]=s,n[0].result}var i=r(e);return n.unshift({input:e,result:i}),n.length>na&&n.pop(),i}}var Zn=sa(function(n){var e=n,t=It(n);if(t){if(!t.path)return n;e=t.path}for(var s=Z.isAbsolute(e),i=[],o=0,a=0;;)if(o=a,a=e.indexOf("/",o),a===-1){i.push(e.slice(o));break}else for(i.push(e.slice(o,a));a<e.length&&e[a]==="/";)a++;for(var l,c=0,a=i.length-1;a>=0;a--)l=i[a],l==="."?i.splice(a,1):l===".."?c++:c>0&&(l===""?(i.splice(a+1,c),c=0):(i.splice(a,2),c--));return e=i.join("/"),e===""&&(e=s?"/":"."),t?(t.path=e,tt(t)):e});Z.normalize=Zn;function Ir(r,n){r===""&&(r="."),n===""&&(n=".");var e=It(n),t=It(r);if(t&&(r=t.path||"/"),e&&!e.scheme)return t&&(e.scheme=t.scheme),tt(e);if(e||n.match(ta))return n;if(t&&!t.host&&!t.path)return t.host=n,tt(t);var s=n.charAt(0)==="/"?n:Zn(r.replace(/\/+$/,"")+"/"+n);return t?(t.path=s,tt(t)):s}Z.join=Ir;Z.isAbsolute=function(r){return r.charAt(0)==="/"||Sr.test(r)};function ra(r,n){r===""&&(r="."),r=r.replace(/\/$/,"");for(var e=0;n.indexOf(r+"/")!==0;){var t=r.lastIndexOf("/");if(t<0||(r=r.slice(0,t),r.match(/^([^\/]+:\/)?\/*$/)))return n;++e}return Array(e+1).join("../")+n.substr(r.length+1)}Z.relative=ra;var Er=function(){var r=Object.create(null);return!("__proto__"in r)}();function Ar(r){return r}function ia(r){return kr(r)?"$"+r:r}Z.toSetString=Er?Ar:ia;function oa(r){return kr(r)?r.slice(1):r}Z.fromSetString=Er?Ar:oa;function kr(r){if(!r)return!1;var n=r.length;if(n<9||r.charCodeAt(n-1)!==95||r.charCodeAt(n-2)!==95||r.charCodeAt(n-3)!==111||r.charCodeAt(n-4)!==116||r.charCodeAt(n-5)!==111||r.charCodeAt(n-6)!==114||r.charCodeAt(n-7)!==112||r.charCodeAt(n-8)!==95||r.charCodeAt(n-9)!==95)return!1;for(var e=n-10;e>=0;e--)if(r.charCodeAt(e)!==36)return!1;return!0}function aa(r,n,e){var t=De(r.source,n.source);return t!==0||(t=r.originalLine-n.originalLine,t!==0)||(t=r.originalColumn-n.originalColumn,t!==0||e)||(t=r.generatedColumn-n.generatedColumn,t!==0)||(t=r.generatedLine-n.generatedLine,t!==0)?t:De(r.name,n.name)}Z.compareByOriginalPositions=aa;function la(r,n,e){var t;return t=r.originalLine-n.originalLine,t!==0||(t=r.originalColumn-n.originalColumn,t!==0||e)||(t=r.generatedColumn-n.generatedColumn,t!==0)||(t=r.generatedLine-n.generatedLine,t!==0)?t:De(r.name,n.name)}Z.compareByOriginalPositionsNoSource=la;function ca(r,n,e){var t=r.generatedLine-n.generatedLine;return t!==0||(t=r.generatedColumn-n.generatedColumn,t!==0||e)||(t=De(r.source,n.source),t!==0)||(t=r.originalLine-n.originalLine,t!==0)||(t=r.originalColumn-n.originalColumn,t!==0)?t:De(r.name,n.name)}Z.compareByGeneratedPositionsDeflated=ca;function pa(r,n,e){var t=r.generatedColumn-n.generatedColumn;return t!==0||e||(t=De(r.source,n.source),t!==0)||(t=r.originalLine-n.originalLine,t!==0)||(t=r.originalColumn-n.originalColumn,t!==0)?t:De(r.name,n.name)}Z.compareByGeneratedPositionsDeflatedNoLine=pa;function De(r,n){return r===n?0:r===null?1:n===null?-1:r>n?1:-1}function ua(r,n){var e=r.generatedLine-n.generatedLine;return e!==0||(e=r.generatedColumn-n.generatedColumn,e!==0)||(e=De(r.source,n.source),e!==0)||(e=r.originalLine-n.originalLine,e!==0)||(e=r.originalColumn-n.originalColumn,e!==0)?e:De(r.name,n.name)}Z.compareByGeneratedPositionsInflated=ua;function da(r){return JSON.parse(r.replace(/^\)]}'[^\n]*\n/,""))}Z.parseSourceMapInput=da;function fa(r,n,e){if(n=n||"",r&&(r[r.length-1]!=="/"&&n[0]!=="/"&&(r+="/"),n=r+n),e){var t=It(e);if(!t)throw new Error("sourceMapURL could not be parsed");if(t.path){var s=t.path.lastIndexOf("/");s>=0&&(t.path=t.path.substring(0,s+1))}n=Ir(tt(t),n)}return Zn(n)}Z.computeSourceURL=fa});var ns=he(Nr=>{"use strict";var es=nt(),ts=Object.prototype.hasOwnProperty,Ge=typeof Map<"u";function Le(){this._array=[],this._set=Ge?new Map:Object.create(null)}Le.fromArray=function(n,e){for(var t=new Le,s=0,i=n.length;s<i;s++)t.add(n[s],e);return t};Le.prototype.size=function(){return Ge?this._set.size:Object.getOwnPropertyNames(this._set).length};Le.prototype.add=function(n,e){var t=Ge?n:es.toSetString(n),s=Ge?this.has(n):ts.call(this._set,t),i=this._array.length;(!s||e)&&this._array.push(n),s||(Ge?this._set.set(n,i):this._set[t]=i)};Le.prototype.has=function(n){if(Ge)return this._set.has(n);var e=es.toSetString(n);return ts.call(this._set,e)};Le.prototype.indexOf=function(n){if(Ge){var e=this._set.get(n);if(e>=0)return e}else{var t=es.toSetString(n);if(ts.call(this._set,t))return this._set[t]}throw new Error('"'+n+'" is not in the set.')};Le.prototype.at=function(n){if(n>=0&&n<this._array.length)return this._array[n];throw new Error("No element indexed by "+n)};Le.prototype.toArray=function(){return this._array.slice()};Nr.ArraySet=Le});var Lr=he(Dr=>{"use strict";var Mr=nt();function ma(r,n){var e=r.generatedLine,t=n.generatedLine,s=r.generatedColumn,i=n.generatedColumn;return t>e||t==e&&i>=s||Mr.compareByGeneratedPositionsInflated(r,n)<=0}function on(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}on.prototype.unsortedForEach=function(n,e){this._array.forEach(n,e)};on.prototype.add=function(n){ma(this._last,n)?(this._last=n,this._array.push(n)):(this._sorted=!1,this._array.push(n))};on.prototype.toArray=function(){return this._sorted||(this._array.sort(Mr.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Dr.MappingList=on});var ss=he(Or=>{"use strict";var Et=Qn(),J=nt(),an=ns().ArraySet,ha=Lr().MappingList;function ge(r){r||(r={}),this._file=J.getArg(r,"file",null),this._sourceRoot=J.getArg(r,"sourceRoot",null),this._skipValidation=J.getArg(r,"skipValidation",!1),this._ignoreInvalidMapping=J.getArg(r,"ignoreInvalidMapping",!1),this._sources=new an,this._names=new an,this._mappings=new ha,this._sourcesContents=null}ge.prototype._version=3;ge.fromSourceMap=function(n,e){var t=n.sourceRoot,s=new ge(Object.assign(e||{},{file:n.file,sourceRoot:t}));return n.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,t!=null&&(o.source=J.relative(t,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),s.addMapping(o)}),n.sources.forEach(function(i){var o=i;t!==null&&(o=J.relative(t,i)),s._sources.has(o)||s._sources.add(o);var a=n.sourceContentFor(i);a!=null&&s.setSourceContent(i,a)}),s};ge.prototype.addMapping=function(n){var e=J.getArg(n,"generated"),t=J.getArg(n,"original",null),s=J.getArg(n,"source",null),i=J.getArg(n,"name",null);!this._skipValidation&&this._validateMapping(e,t,s,i)===!1||(s!=null&&(s=String(s),this._sources.has(s)||this._sources.add(s)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:t!=null&&t.line,originalColumn:t!=null&&t.column,source:s,name:i}))};ge.prototype.setSourceContent=function(n,e){var t=n;this._sourceRoot!=null&&(t=J.relative(this._sourceRoot,t)),e!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[J.toSetString(t)]=e):this._sourcesContents&&(delete this._sourcesContents[J.toSetString(t)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};ge.prototype.applySourceMap=function(n,e,t){var s=e;if(e==null){if(n.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);s=n.file}var i=this._sourceRoot;i!=null&&(s=J.relative(i,s));var o=new an,a=new an;this._mappings.unsortedForEach(function(l){if(l.source===s&&l.originalLine!=null){var c=n.originalPositionFor({line:l.originalLine,column:l.originalColumn});c.source!=null&&(l.source=c.source,t!=null&&(l.source=J.join(t,l.source)),i!=null&&(l.source=J.relative(i,l.source)),l.originalLine=c.line,l.originalColumn=c.column,c.name!=null&&(l.name=c.name))}var p=l.source;p!=null&&!o.has(p)&&o.add(p);var u=l.name;u!=null&&!a.has(u)&&a.add(u)},this),this._sources=o,this._names=a,n.sources.forEach(function(l){var c=n.sourceContentFor(l);c!=null&&(t!=null&&(l=J.join(t,l)),i!=null&&(l=J.relative(i,l)),this.setSourceContent(l,c))},this)};ge.prototype._validateMapping=function(n,e,t,s){if(e&&typeof e.line!="number"&&typeof e.column!="number"){var i="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(i),!1;throw new Error(i)}if(!(n&&"line"in n&&"column"in n&&n.line>0&&n.column>=0&&!e&&!t&&!s)){if(n&&"line"in n&&"column"in n&&e&&"line"in e&&"column"in e&&n.line>0&&n.column>=0&&e.line>0&&e.column>=0&&t)return;var i="Invalid mapping: "+JSON.stringify({generated:n,source:t,original:e,name:s});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(i),!1;throw new Error(i)}};ge.prototype._serializeMappings=function(){for(var n=0,e=1,t=0,s=0,i=0,o=0,a="",l,c,p,u,f=this._mappings.toArray(),m=0,d=f.length;m<d;m++){if(c=f[m],l="",c.generatedLine!==e)for(n=0;c.generatedLine!==e;)l+=";",e++;else if(m>0){if(!J.compareByGeneratedPositionsInflated(c,f[m-1]))continue;l+=","}l+=Et.encode(c.generatedColumn-n),n=c.generatedColumn,c.source!=null&&(u=this._sources.indexOf(c.source),l+=Et.encode(u-o),o=u,l+=Et.encode(c.originalLine-1-s),s=c.originalLine-1,l+=Et.encode(c.originalColumn-t),t=c.originalColumn,c.name!=null&&(p=this._names.indexOf(c.name),l+=Et.encode(p-i),i=p)),a+=l}return a};ge.prototype._generateSourcesContent=function(n,e){return n.map(function(t){if(!this._sourcesContents)return null;e!=null&&(t=J.relative(e,t));var s=J.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,s)?this._sourcesContents[s]:null},this)};ge.prototype.toJSON=function(){var n={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(n.file=this._file),this._sourceRoot!=null&&(n.sourceRoot=this._sourceRoot),this._sourcesContents&&(n.sourcesContent=this._generateSourcesContent(n.sources,n.sourceRoot)),n};ge.prototype.toString=function(){return JSON.stringify(this.toJSON())};Or.SourceMapGenerator=ge});var Fr=he(We=>{"use strict";We.GREATEST_LOWER_BOUND=1;We.LEAST_UPPER_BOUND=2;function rs(r,n,e,t,s,i){var o=Math.floor((n-r)/2)+r,a=s(e,t[o],!0);return a===0?o:a>0?n-o>1?rs(o,n,e,t,s,i):i==We.LEAST_UPPER_BOUND?n<t.length?n:-1:o:o-r>1?rs(r,o,e,t,s,i):i==We.LEAST_UPPER_BOUND?o:r<0?-1:r}We.search=function(n,e,t,s){if(e.length===0)return-1;var i=rs(-1,e.length,n,e,t,s||We.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&t(e[i],e[i-1],!0)===0;)--i;return i}});var Rr=he(Br=>{"use strict";function ba(r){function n(s,i,o){var a=s[i];s[i]=s[o],s[o]=a}function e(s,i){return Math.round(s+Math.random()*(i-s))}function t(s,i,o,a){if(o<a){var l=e(o,a),c=o-1;n(s,l,a);for(var p=s[a],u=o;u<a;u++)i(s[u],p,!1)<=0&&(c+=1,n(s,c,u));n(s,c+1,u);var f=c+1;t(s,i,o,f-1),t(s,i,f+1,a)}}return t}function ga(r){let n=ba.toString();return new Function(`return ${n}`)()(r)}var Ur=new WeakMap;Br.quickSort=function(r,n,e=0){let t=Ur.get(n);t===void 0&&(t=ga(n),Ur.set(n,t)),t(r,n,e,r.length-1)}});var Vr=he(ln=>{"use strict";var M=nt(),os=Fr(),st=ns().ArraySet,ya=Qn(),At=Rr().quickSort;function G(r,n){var e=r;return typeof r=="string"&&(e=M.parseSourceMapInput(r)),e.sections!=null?new Te(e,n):new ee(e,n)}G.fromSourceMap=function(r,n){return ee.fromSourceMap(r,n)};G.prototype._version=3;G.prototype.__generatedMappings=null;Object.defineProperty(G.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});G.prototype.__originalMappings=null;Object.defineProperty(G.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});G.prototype._charIsMappingSeparator=function(n,e){var t=n.charAt(e);return t===";"||t===","};G.prototype._parseMappings=function(n,e){throw new Error("Subclasses must implement _parseMappings")};G.GENERATED_ORDER=1;G.ORIGINAL_ORDER=2;G.GREATEST_LOWER_BOUND=1;G.LEAST_UPPER_BOUND=2;G.prototype.eachMapping=function(n,e,t){var s=e||null,i=t||G.GENERATED_ORDER,o;switch(i){case G.GENERATED_ORDER:o=this._generatedMappings;break;case G.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var a=this.sourceRoot,l=n.bind(s),c=this._names,p=this._sources,u=this._sourceMapURL,f=0,m=o.length;f<m;f++){var d=o[f],g=d.source===null?null:p.at(d.source);g!==null&&(g=M.computeSourceURL(a,g,u)),l({source:g,generatedLine:d.generatedLine,generatedColumn:d.generatedColumn,originalLine:d.originalLine,originalColumn:d.originalColumn,name:d.name===null?null:c.at(d.name)})}};G.prototype.allGeneratedPositionsFor=function(n){var e=M.getArg(n,"line"),t={source:M.getArg(n,"source"),originalLine:e,originalColumn:M.getArg(n,"column",0)};if(t.source=this._findSourceIndex(t.source),t.source<0)return[];var s=[],i=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",M.compareByOriginalPositions,os.LEAST_UPPER_BOUND);if(i>=0){var o=this._originalMappings[i];if(n.column===void 0)for(var a=o.originalLine;o&&o.originalLine===a;)s.push({line:M.getArg(o,"generatedLine",null),column:M.getArg(o,"generatedColumn",null),lastColumn:M.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++i];else for(var l=o.originalColumn;o&&o.originalLine===e&&o.originalColumn==l;)s.push({line:M.getArg(o,"generatedLine",null),column:M.getArg(o,"generatedColumn",null),lastColumn:M.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++i]}return s};ln.SourceMapConsumer=G;function ee(r,n){var e=r;typeof r=="string"&&(e=M.parseSourceMapInput(r));var t=M.getArg(e,"version"),s=M.getArg(e,"sources"),i=M.getArg(e,"names",[]),o=M.getArg(e,"sourceRoot",null),a=M.getArg(e,"sourcesContent",null),l=M.getArg(e,"mappings"),c=M.getArg(e,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);o&&(o=M.normalize(o)),s=s.map(String).map(M.normalize).map(function(p){return o&&M.isAbsolute(o)&&M.isAbsolute(p)?M.relative(o,p):p}),this._names=st.fromArray(i.map(String),!0),this._sources=st.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map(function(p){return M.computeSourceURL(o,p,n)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=n,this.file=c}ee.prototype=Object.create(G.prototype);ee.prototype.consumer=G;ee.prototype._findSourceIndex=function(r){var n=r;if(this.sourceRoot!=null&&(n=M.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);var e;for(e=0;e<this._absoluteSources.length;++e)if(this._absoluteSources[e]==r)return e;return-1};ee.fromSourceMap=function(n,e){var t=Object.create(ee.prototype),s=t._names=st.fromArray(n._names.toArray(),!0),i=t._sources=st.fromArray(n._sources.toArray(),!0);t.sourceRoot=n._sourceRoot,t.sourcesContent=n._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=n._file,t._sourceMapURL=e,t._absoluteSources=t._sources.toArray().map(function(m){return M.computeSourceURL(t.sourceRoot,m,e)});for(var o=n._mappings.toArray().slice(),a=t.__generatedMappings=[],l=t.__originalMappings=[],c=0,p=o.length;c<p;c++){var u=o[c],f=new jr;f.generatedLine=u.generatedLine,f.generatedColumn=u.generatedColumn,u.source&&(f.source=i.indexOf(u.source),f.originalLine=u.originalLine,f.originalColumn=u.originalColumn,u.name&&(f.name=s.indexOf(u.name)),l.push(f)),a.push(f)}return At(t.__originalMappings,M.compareByOriginalPositions),t};ee.prototype._version=3;Object.defineProperty(ee.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function jr(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var is=M.compareByGeneratedPositionsDeflatedNoLine;function _r(r,n){let e=r.length,t=r.length-n;if(!(t<=1))if(t==2){let s=r[n],i=r[n+1];is(s,i)>0&&(r[n]=i,r[n+1]=s)}else if(t<20)for(let s=n;s<e;s++)for(let i=s;i>n;i--){let o=r[i-1],a=r[i];if(is(o,a)<=0)break;r[i-1]=a,r[i]=o}else At(r,is,n)}ee.prototype._parseMappings=function(n,e){var t=1,s=0,i=0,o=0,a=0,l=0,c=n.length,p=0,u={},f={},m=[],d=[],g,h,y,P,E;let x=0;for(;p<c;)if(n.charAt(p)===";")t++,p++,s=0,_r(d,x),x=d.length;else if(n.charAt(p)===",")p++;else{for(g=new jr,g.generatedLine=t,P=p;P<c&&!this._charIsMappingSeparator(n,P);P++);for(h=n.slice(p,P),y=[];p<P;)ya.decode(n,p,f),E=f.value,p=f.rest,y.push(E);if(y.length===2)throw new Error("Found a source, but no line and column");if(y.length===3)throw new Error("Found a source and line, but no column");if(g.generatedColumn=s+y[0],s=g.generatedColumn,y.length>1&&(g.source=a+y[1],a+=y[1],g.originalLine=i+y[2],i=g.originalLine,g.originalLine+=1,g.originalColumn=o+y[3],o=g.originalColumn,y.length>4&&(g.name=l+y[4],l+=y[4])),d.push(g),typeof g.originalLine=="number"){let C=g.source;for(;m.length<=C;)m.push(null);m[C]===null&&(m[C]=[]),m[C].push(g)}}_r(d,x),this.__generatedMappings=d;for(var T=0;T<m.length;T++)m[T]!=null&&At(m[T],M.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...m)};ee.prototype._findMapping=function(n,e,t,s,i,o){if(n[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+n[t]);if(n[s]<0)throw new TypeError("Column must be greater than or equal to 0, got "+n[s]);return os.search(n,e,i,o)};ee.prototype.computeColumnSpans=function(){for(var n=0;n<this._generatedMappings.length;++n){var e=this._generatedMappings[n];if(n+1<this._generatedMappings.length){var t=this._generatedMappings[n+1];if(e.generatedLine===t.generatedLine){e.lastGeneratedColumn=t.generatedColumn-1;continue}}e.lastGeneratedColumn=1/0}};ee.prototype.originalPositionFor=function(n){var e={generatedLine:M.getArg(n,"line"),generatedColumn:M.getArg(n,"column")},t=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",M.compareByGeneratedPositionsDeflated,M.getArg(n,"bias",G.GREATEST_LOWER_BOUND));if(t>=0){var s=this._generatedMappings[t];if(s.generatedLine===e.generatedLine){var i=M.getArg(s,"source",null);i!==null&&(i=this._sources.at(i),i=M.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var o=M.getArg(s,"name",null);return o!==null&&(o=this._names.at(o)),{source:i,line:M.getArg(s,"originalLine",null),column:M.getArg(s,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};ee.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(n){return n==null}):!1};ee.prototype.sourceContentFor=function(n,e){if(!this.sourcesContent)return null;var t=this._findSourceIndex(n);if(t>=0)return this.sourcesContent[t];var s=n;this.sourceRoot!=null&&(s=M.relative(this.sourceRoot,s));var i;if(this.sourceRoot!=null&&(i=M.urlParse(this.sourceRoot))){var o=s.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!i.path||i.path=="/")&&this._sources.has("/"+s))return this.sourcesContent[this._sources.indexOf("/"+s)]}if(e)return null;throw new Error('"'+s+'" is not in the SourceMap.')};ee.prototype.generatedPositionFor=function(n){var e=M.getArg(n,"source");if(e=this._findSourceIndex(e),e<0)return{line:null,column:null,lastColumn:null};var t={source:e,originalLine:M.getArg(n,"line"),originalColumn:M.getArg(n,"column")},s=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",M.compareByOriginalPositions,M.getArg(n,"bias",G.GREATEST_LOWER_BOUND));if(s>=0){var i=this._originalMappings[s];if(i.source===t.source)return{line:M.getArg(i,"generatedLine",null),column:M.getArg(i,"generatedColumn",null),lastColumn:M.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};ln.BasicSourceMapConsumer=ee;function Te(r,n){var e=r;typeof r=="string"&&(e=M.parseSourceMapInput(r));var t=M.getArg(e,"version"),s=M.getArg(e,"sections");if(t!=this._version)throw new Error("Unsupported version: "+t);this._sources=new st,this._names=new st;var i={line:-1,column:0};this._sections=s.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var a=M.getArg(o,"offset"),l=M.getArg(a,"line"),c=M.getArg(a,"column");if(l<i.line||l===i.line&&c<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=a,{generatedOffset:{generatedLine:l+1,generatedColumn:c+1},consumer:new G(M.getArg(o,"map"),n)}})}Te.prototype=Object.create(G.prototype);Te.prototype.constructor=G;Te.prototype._version=3;Object.defineProperty(Te.prototype,"sources",{get:function(){for(var r=[],n=0;n<this._sections.length;n++)for(var e=0;e<this._sections[n].consumer.sources.length;e++)r.push(this._sections[n].consumer.sources[e]);return r}});Te.prototype.originalPositionFor=function(n){var e={generatedLine:M.getArg(n,"line"),generatedColumn:M.getArg(n,"column")},t=os.search(e,this._sections,function(i,o){var a=i.generatedLine-o.generatedOffset.generatedLine;return a||i.generatedColumn-o.generatedOffset.generatedColumn}),s=this._sections[t];return s?s.consumer.originalPositionFor({line:e.generatedLine-(s.generatedOffset.generatedLine-1),column:e.generatedColumn-(s.generatedOffset.generatedLine===e.generatedLine?s.generatedOffset.generatedColumn-1:0),bias:n.bias}):{source:null,line:null,column:null,name:null}};Te.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(n){return n.consumer.hasContentsOfAllSources()})};Te.prototype.sourceContentFor=function(n,e){for(var t=0;t<this._sections.length;t++){var s=this._sections[t],i=s.consumer.sourceContentFor(n,!0);if(i||i==="")return i}if(e)return null;throw new Error('"'+n+'" is not in the SourceMap.')};Te.prototype.generatedPositionFor=function(n){for(var e=0;e<this._sections.length;e++){var t=this._sections[e];if(t.consumer._findSourceIndex(M.getArg(n,"source"))!==-1){var s=t.consumer.generatedPositionFor(n);if(s){var i={line:s.line+(t.generatedOffset.generatedLine-1),column:s.column+(t.generatedOffset.generatedLine===s.line?t.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}};Te.prototype._parseMappings=function(n,e){this.__generatedMappings=[],this.__originalMappings=[];for(var t=0;t<this._sections.length;t++)for(var s=this._sections[t],i=s.consumer._generatedMappings,o=0;o<i.length;o++){var a=i[o],l=s.consumer._sources.at(a.source);l!==null&&(l=M.computeSourceURL(s.consumer.sourceRoot,l,this._sourceMapURL)),this._sources.add(l),l=this._sources.indexOf(l);var c=null;a.name&&(c=s.consumer._names.at(a.name),this._names.add(c),c=this._names.indexOf(c));var p={source:l,generatedLine:a.generatedLine+(s.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(s.generatedOffset.generatedLine===a.generatedLine?s.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:c};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}At(this.__generatedMappings,M.compareByGeneratedPositionsDeflated),At(this.__originalMappings,M.compareByOriginalPositions)};ln.IndexedSourceMapConsumer=Te});var $r=he(zr=>{"use strict";var va=ss().SourceMapGenerator,cn=nt(),xa=/(\r?\n)/,Pa=10,rt="$$$isSourceNode$$$";function ce(r,n,e,t,s){this.children=[],this.sourceContents={},this.line=r??null,this.column=n??null,this.source=e??null,this.name=s??null,this[rt]=!0,t!=null&&this.add(t)}ce.fromStringWithSourceMap=function(n,e,t){var s=new ce,i=n.split(xa),o=0,a=function(){var f=d(),m=d()||"";return f+m;function d(){return o<i.length?i[o++]:void 0}},l=1,c=0,p=null;return e.eachMapping(function(f){if(p!==null)if(l<f.generatedLine)u(p,a()),l++,c=0;else{var m=i[o]||"",d=m.substr(0,f.generatedColumn-c);i[o]=m.substr(f.generatedColumn-c),c=f.generatedColumn,u(p,d),p=f;return}for(;l<f.generatedLine;)s.add(a()),l++;if(c<f.generatedColumn){var m=i[o]||"";s.add(m.substr(0,f.generatedColumn)),i[o]=m.substr(f.generatedColumn),c=f.generatedColumn}p=f},this),o<i.length&&(p&&u(p,a()),s.add(i.splice(o).join(""))),e.sources.forEach(function(f){var m=e.sourceContentFor(f);m!=null&&(t!=null&&(f=cn.join(t,f)),s.setSourceContent(f,m))}),s;function u(f,m){if(f===null||f.source===void 0)s.add(m);else{var d=t?cn.join(t,f.source):f.source;s.add(new ce(f.originalLine,f.originalColumn,d,m,f.name))}}};ce.prototype.add=function(n){if(Array.isArray(n))n.forEach(function(e){this.add(e)},this);else if(n[rt]||typeof n=="string")n&&this.children.push(n);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+n);return this};ce.prototype.prepend=function(n){if(Array.isArray(n))for(var e=n.length-1;e>=0;e--)this.prepend(n[e]);else if(n[rt]||typeof n=="string")this.children.unshift(n);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+n);return this};ce.prototype.walk=function(n){for(var e,t=0,s=this.children.length;t<s;t++)e=this.children[t],e[rt]?e.walk(n):e!==""&&n(e,{source:this.source,line:this.line,column:this.column,name:this.name})};ce.prototype.join=function(n){var e,t,s=this.children.length;if(s>0){for(e=[],t=0;t<s-1;t++)e.push(this.children[t]),e.push(n);e.push(this.children[t]),this.children=e}return this};ce.prototype.replaceRight=function(n,e){var t=this.children[this.children.length-1];return t[rt]?t.replaceRight(n,e):typeof t=="string"?this.children[this.children.length-1]=t.replace(n,e):this.children.push("".replace(n,e)),this};ce.prototype.setSourceContent=function(n,e){this.sourceContents[cn.toSetString(n)]=e};ce.prototype.walkSourceContents=function(n){for(var e=0,t=this.children.length;e<t;e++)this.children[e][rt]&&this.children[e].walkSourceContents(n);for(var s=Object.keys(this.sourceContents),e=0,t=s.length;e<t;e++)n(cn.fromSetString(s[e]),this.sourceContents[s[e]])};ce.prototype.toString=function(){var n="";return this.walk(function(e){n+=e}),n};ce.prototype.toStringWithSourceMap=function(n){var e={code:"",line:1,column:0},t=new va(n),s=!1,i=null,o=null,a=null,l=null;return this.walk(function(c,p){e.code+=c,p.source!==null&&p.line!==null&&p.column!==null?((i!==p.source||o!==p.line||a!==p.column||l!==p.name)&&t.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:e.line,column:e.column},name:p.name}),i=p.source,o=p.line,a=p.column,l=p.name,s=!0):s&&(t.addMapping({generated:{line:e.line,column:e.column}}),i=null,s=!1);for(var u=0,f=c.length;u<f;u++)c.charCodeAt(u)===Pa?(e.line++,e.column=0,u+1===f?(i=null,s=!1):s&&t.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:e.line,column:e.column},name:p.name})):e.column++}),this.walkSourceContents(function(c,p){t.setSourceContent(c,p)}),{code:e.code,map:t}};zr.SourceNode=ce});var as=he(pn=>{"use strict";pn.SourceMapGenerator=ss().SourceMapGenerator;pn.SourceMapConsumer=Vr().SourceMapConsumer;pn.SourceNode=$r().SourceNode});var $s=he(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});function Ta(r,n){if(r==null)return{};var e={};for(var t in r)if({}.hasOwnProperty.call(r,t)){if(n.includes(t))continue;e[t]=r[t]}return e}var ke=class{constructor(n,e,t){this.line=void 0,this.column=void 0,this.index=void 0,this.line=n,this.column=e,this.index=t}},ct=class{constructor(n,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=n,this.end=e}};function se(r,n){let{line:e,column:t,index:s}=r;return new ke(e,t+n,s+n)}var Hr="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",wa={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Hr},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Hr}},qr={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"},fn=r=>r.type==="UpdateExpression"?qr.UpdateExpression[`${r.prefix}`]:qr[r.type],Ca={AccessorIsGenerator:({kind:r})=>`A ${r}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.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",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:r})=>`Missing initializer in ${r} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:r})=>`\`${r}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:r})=>`'import.${r}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:r,exportName:n})=>`A string literal cannot be used as an exported binding without \`from\`.
3
3
  - Did you mean \`export { '${r}' as '${n}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:r})=>`'${r==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:r})=>`Unsyntactic ${r==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:r})=>`A string literal cannot be used as an imported binding.
4
- - Did you mean \`import { "${r}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:r})=>`Expected number in radix ${r}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:r})=>`Escape sequence in keyword ${r}.`,InvalidIdentifier:({identifierName:r})=>`Invalid identifier ${r}.`,InvalidLhs:({ancestor:r})=>`Invalid left-hand side in ${fn(r)}.`,InvalidLhsBinding:({ancestor:r})=>`Binding invalid left-hand side in ${fn(r)}.`,InvalidLhsOptionalChaining:({ancestor:r})=>`Invalid optional chaining in the left-hand side of ${fn(r)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:r})=>`Unexpected character '${r}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:r})=>`Private name #${r} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:r})=>`Label '${r}' 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:r})=>`This experimental syntax requires enabling the parser plugin: ${r.map(n=>JSON.stringify(n)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:r})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${r.map(n=>JSON.stringify(n)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:r})=>`Duplicate key "${r}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:r})=>`An export name cannot include a lone surrogate, found '\\u${r.toString(16)}'.`,ModuleExportUndefined:({localName:r})=>`Export '${r}' 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:r})=>`Private names are only allowed in property accesses (\`obj.#${r}\`) or in \`in\` expressions (\`#${r} in obj\`).`,PrivateNameRedeclaration:({identifierName:r})=>`Duplicate private name #${r}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:r})=>`Unexpected keyword '${r}'.`,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:r})=>`Unexpected reserved word '${r}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:r,unexpected:n})=>`Unexpected token${n?` '${n}'.`:""}${r?`, expected "${r}"`:""}`,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`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:r,onlyValidPropertyName:n})=>`The only valid meta property for ${r} is ${r}.${n}.`,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:r})=>`Identifier '${r}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Sa={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:r})=>`Assigning to '${r}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:r})=>`Binding '${r}' 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=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),Ea={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:r})=>`Invalid topic token ${r}. In order to use ${r} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${r}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:r})=>`Hack-style pipe body cannot be an unparenthesized ${fn({type:r})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},Aa=["message"];function Gr(r,n,e){Object.defineProperty(r,n,{enumerable:!1,configurable:!0,value:e})}function ka({toMessage:r,code:n,reasonCode:e,syntaxPlugin:t}){let s=e==="MissingPlugin"||e==="MissingOneOfPlugins";{let i={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};i[e]&&(e=i[e])}return function i(o,a){let l=new SyntaxError;return l.code=n,l.reasonCode=e,l.loc=o,l.pos=o.index,l.syntaxPlugin=t,s&&(l.missingPlugin=a.missingPlugin),Gr(l,"clone",function(p={}){var u;let{line:f,column:m,index:d}=(u=p.loc)!=null?u:o;return i(new ke(f,m,d),Object.assign({},a,p.details))}),Gr(l,"details",a),Object.defineProperty(l,"message",{configurable:!0,get(){let c=`${r(a)} (${o.line}:${o.column})`;return this.message=c,c},set(c){Object.defineProperty(this,"message",{value:c,writable:!0})}}),l}}function Re(r,n){if(Array.isArray(r))return t=>Re(t,r[0]);let e={};for(let t of Object.keys(r)){let s=r[t],i=typeof s=="string"?{message:()=>s}:typeof s=="function"?{message:s}:s,{message:o}=i,a=Ta(i,Aa),l=typeof o=="string"?()=>o:o;e[t]=ka(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:t,toMessage:l},n?{syntaxPlugin:n}:{},a))}return e}var b=Object.assign({},Re(wa),Re(Ca),Re(Sa),Re`pipelineOperator`(Ea)),{defineProperty:Na}=Object,Wr=(r,n)=>{r&&Na(r,n,{enumerable:!1,value:r[n]})};function kt(r){return Wr(r.loc.start,"index"),Wr(r.loc.end,"index"),r}var Da=r=>class extends r{parse(){let e=kt(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(kt)),e}parseRegExpLiteral({pattern:e,flags:t}){let s=null;try{s=new RegExp(e,t)}catch{}let i=this.estreeParseLiteral(s);return i.regex={pattern:e,flags:t},i}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}let s=this.estreeParseLiteral(t);return s.bigint=String(s.value||e),s}parseDecimalLiteral(e){let s=this.estreeParseLiteral(null);return s.decimal=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)}directiveToStmt(e){let t=e.value;delete e.value,t.type="Literal",t.raw=t.extra.raw,t.value=t.extra.expressionValue;let s=e;return s.type="ExpressionStatement",s.expression=t,s.directive=t.extra.rawValue,delete t.extra,s}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((t=e.expression.extra)!=null&&t.parenthesized)}parseBlockBody(e,t,s,i,o){super.parseBlockBody(e,t,s,i,o);let a=e.directives.map(l=>this.directiveToStmt(l));e.body=a.concat(e.body),delete e.directives}pushClassMethod(e,t,s,i,o,a){this.parseMethod(t,s,i,o,a,"ClassMethod",!0),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(t)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let t=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=t,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){let 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=e.body.type!=="BlockStatement"}parseMethod(e,t,s,i,o,a,l=!1){let c=this.startNode();return c.kind=e.kind,c=super.parseMethod(c,t,s,i,o,a,l),c.type="FunctionExpression",delete c.kind,e.value=c,a==="ClassPrivateMethod"&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}nameIsConstructor(e){return e.type==="Literal"?e.value==="constructor":super.nameIsConstructor(e)}parseClassProperty(...e){let t=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition"),t}parseClassPrivateProperty(...e){let t=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition",t.computed=!1),t}parseObjectMethod(e,t,s,i,o){let a=super.parseObjectMethod(e,t,s,i,o);return a&&(a.type="Property",a.kind==="method"&&(a.kind="init"),a.shorthand=!1),a}parseObjectProperty(e,t,s,i){let o=super.parseObjectProperty(e,t,s,i);return o&&(o.kind="init",o.type="Property"),o}isValidLVal(e,t,s){return e==="Property"?"value":super.isValidLVal(e,t,s)}isAssignable(e,t){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(e!=null&&this.isObjectProperty(e)){let{key:s,value:i}=e;this.isPrivateName(s)&&this.classScope.usePrivateName(this.getPrivateNameSV(s),s.loc.start),this.toAssignable(i,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,s){e.type==="Property"&&(e.kind==="get"||e.kind==="set")?this.raise(b.PatternHasAccessor,e.key):e.type==="Property"&&e.method?this.raise(b.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,t,s)}finishCallExpression(e,t){let s=super.finishCallExpression(e,t);if(s.callee.type==="Import"){var i,o;s.type="ImportExpression",s.source=s.arguments[0],s.options=(i=s.arguments[1])!=null?i:null,s.attributes=(o=s.arguments[1])!=null?o:null,delete s.arguments,delete s.callee}return s}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,t){let s=this.state.lastTokStartLoc,i=super.parseExport(e,t);switch(i.type){case"ExportAllDeclaration":i.exported=null;break;case"ExportNamedDeclaration":i.specifiers.length===1&&i.specifiers[0].type==="ExportNamespaceSpecifier"&&(i.type="ExportAllDeclaration",i.exported=i.specifiers[0].exported,delete i.specifiers);case"ExportDefaultDeclaration":{var o;let{declaration:a}=i;a?.type==="ClassDeclaration"&&((o=a.decorators)==null?void 0:o.length)>0&&a.start===i.start&&this.resetStartLocation(i,s)}break}return i}parseSubscript(e,t,s,i){let o=super.parseSubscript(e,t,s,i);if(i.optionalChainMember){if((o.type==="OptionalMemberExpression"||o.type==="OptionalCallExpression")&&(o.type=o.type.substring(8)),i.stop){let a=this.startNodeAtNode(o);return a.expression=o,this.finishNode(a,"ChainExpression")}}else(o.type==="MemberExpression"||o.type==="CallExpression")&&(o.optional=!1);return o}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.type==="Property"&&(e.method||e.kind==="get"||e.kind==="set")}finishNodeAt(e,t,s){return kt(super.finishNodeAt(e,t,s))}resetStartLocation(e,t){super.resetStartLocation(e,t),kt(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),kt(e)}},Xe=class{constructor(n,e){this.token=void 0,this.preserveSpace=void 0,this.token=n,this.preserveSpace=!!e}},V={brace:new Xe("{"),j_oTag:new Xe("<tag"),j_cTag:new Xe("</tag"),j_expr:new Xe("<tag>...</tag>",!0)};V.template=new Xe("`",!0);var R=!0,A=!0,ls=!0,Nt=!0,Ve=!0,Ma=!0,bn=class{constructor(n,e={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=n,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null,this.updateContext=null}},Ls=new Map;function _(r,n={}){n.keyword=r;let e=M(r,n);return Ls.set(r,e),e}function ne(r,n){return M(r,{beforeExpr:R,binop:n})}var Ot=-1,Fe=[],Os=[],Fs=[],Us=[],Rs=[],_s=[];function M(r,n={}){var e,t,s,i;return++Ot,Os.push(r),Fs.push((e=n.binop)!=null?e:-1),Us.push((t=n.beforeExpr)!=null?t:!1),Rs.push((s=n.startsExpr)!=null?s:!1),_s.push((i=n.prefix)!=null?i:!1),Fe.push(new bn(r,n)),Ot}function U(r,n={}){var e,t,s,i;return++Ot,Ls.set(r,Ot),Os.push(r),Fs.push((e=n.binop)!=null?e:-1),Us.push((t=n.beforeExpr)!=null?t:!1),Rs.push((s=n.startsExpr)!=null?s:!1),_s.push((i=n.prefix)!=null?i:!1),Fe.push(new bn("name",n)),Ot}var La={bracketL:M("[",{beforeExpr:R,startsExpr:A}),bracketHashL:M("#[",{beforeExpr:R,startsExpr:A}),bracketBarL:M("[|",{beforeExpr:R,startsExpr:A}),bracketR:M("]"),bracketBarR:M("|]"),braceL:M("{",{beforeExpr:R,startsExpr:A}),braceBarL:M("{|",{beforeExpr:R,startsExpr:A}),braceHashL:M("#{",{beforeExpr:R,startsExpr:A}),braceR:M("}"),braceBarR:M("|}"),parenL:M("(",{beforeExpr:R,startsExpr:A}),parenR:M(")"),comma:M(",",{beforeExpr:R}),semi:M(";",{beforeExpr:R}),colon:M(":",{beforeExpr:R}),doubleColon:M("::",{beforeExpr:R}),dot:M("."),question:M("?",{beforeExpr:R}),questionDot:M("?."),arrow:M("=>",{beforeExpr:R}),template:M("template"),ellipsis:M("...",{beforeExpr:R}),backQuote:M("`",{startsExpr:A}),dollarBraceL:M("${",{beforeExpr:R,startsExpr:A}),templateTail:M("...`",{startsExpr:A}),templateNonTail:M("...${",{beforeExpr:R,startsExpr:A}),at:M("@"),hash:M("#",{startsExpr:A}),interpreterDirective:M("#!..."),eq:M("=",{beforeExpr:R,isAssign:Nt}),assign:M("_=",{beforeExpr:R,isAssign:Nt}),slashAssign:M("_=",{beforeExpr:R,isAssign:Nt}),xorAssign:M("_=",{beforeExpr:R,isAssign:Nt}),moduloAssign:M("_=",{beforeExpr:R,isAssign:Nt}),incDec:M("++/--",{prefix:Ve,postfix:Ma,startsExpr:A}),bang:M("!",{beforeExpr:R,prefix:Ve,startsExpr:A}),tilde:M("~",{beforeExpr:R,prefix:Ve,startsExpr:A}),doubleCaret:M("^^",{startsExpr:A}),doubleAt:M("@@",{startsExpr:A}),pipeline:ne("|>",0),nullishCoalescing:ne("??",1),logicalOR:ne("||",1),logicalAND:ne("&&",2),bitwiseOR:ne("|",3),bitwiseXOR:ne("^",4),bitwiseAND:ne("&",5),equality:ne("==/!=/===/!==",6),lt:ne("</>/<=/>=",7),gt:ne("</>/<=/>=",7),relational:ne("</>/<=/>=",7),bitShift:ne("<</>>/>>>",8),bitShiftL:ne("<</>>/>>>",8),bitShiftR:ne("<</>>/>>>",8),plusMin:M("+/-",{beforeExpr:R,binop:9,prefix:Ve,startsExpr:A}),modulo:M("%",{binop:10,startsExpr:A}),star:M("*",{binop:10}),slash:ne("/",10),exponent:M("**",{beforeExpr:R,binop:11,rightAssociative:!0}),_in:_("in",{beforeExpr:R,binop:7}),_instanceof:_("instanceof",{beforeExpr:R,binop:7}),_break:_("break"),_case:_("case",{beforeExpr:R}),_catch:_("catch"),_continue:_("continue"),_debugger:_("debugger"),_default:_("default",{beforeExpr:R}),_else:_("else",{beforeExpr:R}),_finally:_("finally"),_function:_("function",{startsExpr:A}),_if:_("if"),_return:_("return",{beforeExpr:R}),_switch:_("switch"),_throw:_("throw",{beforeExpr:R,prefix:Ve,startsExpr:A}),_try:_("try"),_var:_("var"),_const:_("const"),_with:_("with"),_new:_("new",{beforeExpr:R,startsExpr:A}),_this:_("this",{startsExpr:A}),_super:_("super",{startsExpr:A}),_class:_("class",{startsExpr:A}),_extends:_("extends",{beforeExpr:R}),_export:_("export"),_import:_("import",{startsExpr:A}),_null:_("null",{startsExpr:A}),_true:_("true",{startsExpr:A}),_false:_("false",{startsExpr:A}),_typeof:_("typeof",{beforeExpr:R,prefix:Ve,startsExpr:A}),_void:_("void",{beforeExpr:R,prefix:Ve,startsExpr:A}),_delete:_("delete",{beforeExpr:R,prefix:Ve,startsExpr:A}),_do:_("do",{isLoop:ls,beforeExpr:R}),_for:_("for",{isLoop:ls}),_while:_("while",{isLoop:ls}),_as:U("as",{startsExpr:A}),_assert:U("assert",{startsExpr:A}),_async:U("async",{startsExpr:A}),_await:U("await",{startsExpr:A}),_defer:U("defer",{startsExpr:A}),_from:U("from",{startsExpr:A}),_get:U("get",{startsExpr:A}),_let:U("let",{startsExpr:A}),_meta:U("meta",{startsExpr:A}),_of:U("of",{startsExpr:A}),_sent:U("sent",{startsExpr:A}),_set:U("set",{startsExpr:A}),_source:U("source",{startsExpr:A}),_static:U("static",{startsExpr:A}),_using:U("using",{startsExpr:A}),_yield:U("yield",{startsExpr:A}),_asserts:U("asserts",{startsExpr:A}),_checks:U("checks",{startsExpr:A}),_exports:U("exports",{startsExpr:A}),_global:U("global",{startsExpr:A}),_implements:U("implements",{startsExpr:A}),_intrinsic:U("intrinsic",{startsExpr:A}),_infer:U("infer",{startsExpr:A}),_is:U("is",{startsExpr:A}),_mixins:U("mixins",{startsExpr:A}),_proto:U("proto",{startsExpr:A}),_require:U("require",{startsExpr:A}),_satisfies:U("satisfies",{startsExpr:A}),_keyof:U("keyof",{startsExpr:A}),_readonly:U("readonly",{startsExpr:A}),_unique:U("unique",{startsExpr:A}),_abstract:U("abstract",{startsExpr:A}),_declare:U("declare",{startsExpr:A}),_enum:U("enum",{startsExpr:A}),_module:U("module",{startsExpr:A}),_namespace:U("namespace",{startsExpr:A}),_interface:U("interface",{startsExpr:A}),_type:U("type",{startsExpr:A}),_opaque:U("opaque",{startsExpr:A}),name:M("name",{startsExpr:A}),placeholder:M("%%",{startsExpr:!0}),string:M("string",{startsExpr:A}),num:M("num",{startsExpr:A}),bigint:M("bigint",{startsExpr:A}),decimal:M("decimal",{startsExpr:A}),regexp:M("regexp",{startsExpr:A}),privateName:M("#name",{startsExpr:A}),eof:M("eof"),jsxName:M("jsxName"),jsxText:M("jsxText",{beforeExpr:!0}),jsxTagStart:M("jsxTagStart",{startsExpr:!0}),jsxTagEnd:M("jsxTagEnd")};function B(r){return r>=93&&r<=133}function Oa(r){return r<=92}function we(r){return r>=58&&r<=133}function ii(r){return r>=58&&r<=137}function Fa(r){return Us[r]}function fs(r){return Rs[r]}function Ua(r){return r>=29&&r<=33}function Kr(r){return r>=129&&r<=131}function Ra(r){return r>=90&&r<=92}function Bs(r){return r>=58&&r<=92}function _a(r){return r>=39&&r<=59}function Ba(r){return r===34}function ja(r){return _s[r]}function Va(r){return r>=121&&r<=123}function za(r){return r>=124&&r<=130}function $e(r){return Os[r]}function mn(r){return Fs[r]}function $a(r){return r===57}function gn(r){return r>=24&&r<=25}function Oe(r){return Fe[r]}Fe[8].updateContext=r=>{r.pop()},Fe[5].updateContext=Fe[7].updateContext=Fe[23].updateContext=r=>{r.push(V.brace)},Fe[22].updateContext=r=>{r[r.length-1]===V.template?r.pop():r.push(V.template)},Fe[143].updateContext=r=>{r.push(V.j_expr,V.j_oTag)};var js="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",oi="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",qa=new RegExp("["+js+"]"),Ha=new RegExp("["+js+oi+"]");js=oi=null;var ai=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,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,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,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,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Ga=[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,80,3,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,343,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,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];function ms(r,n){let e=65536;for(let t=0,s=n.length;t<s;t+=2){if(e+=n[t],e>r)return!1;if(e+=n[t+1],e>=r)return!0}return!1}function Ue(r){return r<65?r===36:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&qa.test(String.fromCharCode(r)):ms(r,ai)}function ot(r){return r<48?r===36:r<58?!0:r<65?!1:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&Ha.test(String.fromCharCode(r)):ms(r,ai)||ms(r,Ga)}var Vs={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Wa=new Set(Vs.keyword),Ka=new Set(Vs.strict),Xa=new Set(Vs.strictBind);function li(r,n){return n&&r==="await"||r==="enum"}function ci(r,n){return li(r,n)||Ka.has(r)}function pi(r){return Xa.has(r)}function ui(r,n){return ci(r,n)||pi(r)}function Ja(r){return Wa.has(r)}function Ya(r,n,e){return r===64&&n===64&&Ue(e)}var Qa=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"]);function Za(r){return Qa.has(r)}var Ft=class{constructor(n){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=n}},Ut=class{constructor(n,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=n,this.inModule=e}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let n=this.currentThisScopeFlags();return(n&64)>0&&(n&2)===0}get inStaticBlock(){for(let n=this.scopeStack.length-1;;n--){let{flags:e}=this.scopeStack[n];if(e&128)return!0;if(e&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(n){return new Ft(n)}enter(n){this.scopeStack.push(this.createScope(n))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(n){return!!(n.flags&130||!this.parser.inModule&&n.flags&1)}declareName(n,e,t){let s=this.currentScope();if(e&8||e&16){this.checkRedeclarationInScope(s,n,e,t);let i=s.names.get(n)||0;e&16?i=i|4:(s.firstLexicalName||(s.firstLexicalName=n),i=i|2),s.names.set(n,i),e&8&&this.maybeExportDefined(s,n)}else if(e&4)for(let i=this.scopeStack.length-1;i>=0&&(s=this.scopeStack[i],this.checkRedeclarationInScope(s,n,e,t),s.names.set(n,(s.names.get(n)||0)|1),this.maybeExportDefined(s,n),!(s.flags&387));--i);this.parser.inModule&&s.flags&1&&this.undefinedExports.delete(n)}maybeExportDefined(n,e){this.parser.inModule&&n.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(n,e,t,s){this.isRedeclaredInScope(n,e,t)&&this.parser.raise(b.VarRedeclaration,s,{identifierName:e})}isRedeclaredInScope(n,e,t){if(!(t&1))return!1;if(t&8)return n.names.has(e);let s=n.names.get(e);return t&16?(s&2)>0||!this.treatFunctionsAsVarInScope(n)&&(s&1)>0:(s&2)>0&&!(n.flags&8&&n.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(n)&&(s&4)>0}checkLocalExport(n){let{name:e}=n;this.scopeStack[0].names.has(e)||this.undefinedExports.set(e,n.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let n=this.scopeStack.length-1;;n--){let{flags:e}=this.scopeStack[n];if(e&387)return e}}currentThisScopeFlags(){for(let n=this.scopeStack.length-1;;n--){let{flags:e}=this.scopeStack[n];if(e&451&&!(e&4))return e}}},hs=class extends Ft{constructor(...n){super(...n),this.declareFunctions=new Set}},bs=class extends Ut{createScope(n){return new hs(n)}declareName(n,e,t){let s=this.currentScope();if(e&2048){this.checkRedeclarationInScope(s,n,e,t),this.maybeExportDefined(s,n),s.declareFunctions.add(n);return}super.declareName(n,e,t)}isRedeclaredInScope(n,e,t){if(super.isRedeclaredInScope(n,e,t))return!0;if(t&2048&&!n.declareFunctions.has(e)){let s=n.names.get(e);return(s&4)>0||(s&2)>0}return!1}checkLocalExport(n){this.scopeStack[0].declareFunctions.has(n.name)||super.checkLocalExport(n)}},gs=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(n){return n+this.startIndex}offsetToSourcePos(n){return n-this.startIndex}hasPlugin(n){if(typeof n=="string")return this.plugins.has(n);{let[e,t]=n;if(!this.hasPlugin(e))return!1;let s=this.plugins.get(e);for(let i of Object.keys(t))if(s?.[i]!==t[i])return!1;return!0}}getPluginOption(n,e){var t;return(t=this.plugins.get(n))==null?void 0:t[e]}};function di(r,n){r.trailingComments===void 0?r.trailingComments=n:r.trailingComments.unshift(...n)}function el(r,n){r.leadingComments===void 0?r.leadingComments=n:r.leadingComments.unshift(...n)}function Rt(r,n){r.innerComments===void 0?r.innerComments=n:r.innerComments.unshift(...n)}function Dt(r,n,e){let t=null,s=n.length;for(;t===null&&s>0;)t=n[--s];t===null||t.start>e.start?Rt(r,e.comments):di(t,e.comments)}var ys=class extends gs{addComment(n){this.filename&&(n.loc.filename=this.filename);let{commentsLen:e}=this.state;this.comments.length!==e&&(this.comments.length=e),this.comments.push(n),this.state.commentsLen++}processComment(n){let{commentStack:e}=this.state,t=e.length;if(t===0)return;let s=t-1,i=e[s];i.start===n.end&&(i.leadingNode=n,s--);let{start:o}=n;for(;s>=0;s--){let a=e[s],l=a.end;if(l>o)a.containingNode=n,this.finalizeComment(a),e.splice(s,1);else{l===o&&(a.trailingNode=n);break}}}finalizeComment(n){let{comments:e}=n;if(n.leadingNode!==null||n.trailingNode!==null)n.leadingNode!==null&&di(n.leadingNode,e),n.trailingNode!==null&&el(n.trailingNode,e);else{let{containingNode:t,start:s}=n;if(this.input.charCodeAt(this.offsetToSourcePos(s)-1)===44)switch(t.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Dt(t,t.properties,n);break;case"CallExpression":case"OptionalCallExpression":Dt(t,t.arguments,n);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Dt(t,t.params,n);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Dt(t,t.elements,n);break;case"ExportNamedDeclaration":case"ImportDeclaration":Dt(t,t.specifiers,n);break;default:Rt(t,e)}else Rt(t,e)}}finalizeRemainingComments(){let{commentStack:n}=this.state;for(let e=n.length-1;e>=0;e--)this.finalizeComment(n[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(n){let{commentStack:e}=this.state,{length:t}=e;if(t===0)return;let s=e[t-1];s.leadingNode===n&&(s.leadingNode=null)}resetPreviousIdentifierLeadingComments(n){let{commentStack:e}=this.state,{length:t}=e;t!==0&&(e[t-1].trailingNode===n?e[t-1].trailingNode=null:t>=2&&e[t-2].trailingNode===n&&(e[t-2].trailingNode=null))}takeSurroundingComments(n,e,t){let{commentStack:s}=this.state,i=s.length;if(i===0)return;let o=i-1;for(;o>=0;o--){let a=s[o],l=a.end;if(a.start===t)a.leadingNode=n;else if(l===e)a.trailingNode=n;else if(l<e)break}}},tl=/\r\n|[\r\n\u2028\u2029]/,un=new RegExp(tl.source,"g");function at(r){switch(r){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function Xr(r,n,e){for(let t=n;t<e;t++)if(at(r.charCodeAt(t)))return!0;return!1}var cs=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ps=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function nl(r){switch(r){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}}var vs=class r{constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[V.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(n){n?this.flags|=1:this.flags&=-2}init({strictMode:n,sourceType:e,startIndex:t,startLine:s,startColumn:i}){this.strict=n===!1?!1:n===!0?!0:e==="module",this.startIndex=t,this.curLine=s,this.lineStart=-i,this.startLoc=this.endLoc=new ke(s,i,t)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(n){n?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(n){n?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(n){n?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(n){n?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(n){n?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(n){n?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(n){n?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(n){n?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(n){n?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(n){n?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(n){n?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(n){n?this.flags|=4096:this.flags&=-4097}curPosition(){return new ke(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let n=new r;return n.flags=this.flags,n.startIndex=this.startIndex,n.curLine=this.curLine,n.lineStart=this.lineStart,n.startLoc=this.startLoc,n.endLoc=this.endLoc,n.errors=this.errors.slice(),n.potentialArrowAt=this.potentialArrowAt,n.noArrowAt=this.noArrowAt.slice(),n.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),n.topicContext=this.topicContext,n.labels=this.labels.slice(),n.commentsLen=this.commentsLen,n.commentStack=this.commentStack.slice(),n.pos=this.pos,n.type=this.type,n.value=this.value,n.start=this.start,n.end=this.end,n.lastTokEndLoc=this.lastTokEndLoc,n.lastTokStartLoc=this.lastTokStartLoc,n.context=this.context.slice(),n.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,n.strictErrors=this.strictErrors,n.tokensLength=this.tokensLength,n}},sl=function(n){return n>=48&&n<=57},Jr={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},dn={bin:r=>r===48||r===49,oct:r=>r>=48&&r<=55,dec:r=>r>=48&&r<=57,hex:r=>r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102};function Yr(r,n,e,t,s,i){let o=e,a=t,l=s,c="",p=null,u=e,{length:f}=n;for(;;){if(e>=f){i.unterminated(o,a,l),c+=n.slice(u,e);break}let m=n.charCodeAt(e);if(rl(r,m,n,e)){c+=n.slice(u,e);break}if(m===92){c+=n.slice(u,e);let d=il(n,e,t,s,r==="template",i);d.ch===null&&!p?p={pos:e,lineStart:t,curLine:s}:c+=d.ch,{pos:e,lineStart:t,curLine:s}=d,u=e}else m===8232||m===8233?(++e,++s,t=e):m===10||m===13?r==="template"?(c+=n.slice(u,e)+`
4
+ - Did you mean \`import { "${r}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:r})=>`Expected number in radix ${r}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:r})=>`Escape sequence in keyword ${r}.`,InvalidIdentifier:({identifierName:r})=>`Invalid identifier ${r}.`,InvalidLhs:({ancestor:r})=>`Invalid left-hand side in ${fn(r)}.`,InvalidLhsBinding:({ancestor:r})=>`Binding invalid left-hand side in ${fn(r)}.`,InvalidLhsOptionalChaining:({ancestor:r})=>`Invalid optional chaining in the left-hand side of ${fn(r)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:r})=>`Unexpected character '${r}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:r})=>`Private name #${r} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:r})=>`Label '${r}' 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:r})=>`This experimental syntax requires enabling the parser plugin: ${r.map(n=>JSON.stringify(n)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:r})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${r.map(n=>JSON.stringify(n)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:r})=>`Duplicate key "${r}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:r})=>`An export name cannot include a lone surrogate, found '\\u${r.toString(16)}'.`,ModuleExportUndefined:({localName:r})=>`Export '${r}' 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:r})=>`Private names are only allowed in property accesses (\`obj.#${r}\`) or in \`in\` expressions (\`#${r} in obj\`).`,PrivateNameRedeclaration:({identifierName:r})=>`Duplicate private name #${r}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:r})=>`Unexpected keyword '${r}'.`,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:r})=>`Unexpected reserved word '${r}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:r,unexpected:n})=>`Unexpected token${n?` '${n}'.`:""}${r?`, expected "${r}"`:""}`,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`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:r,onlyValidPropertyName:n})=>`The only valid meta property for ${r} is ${r}.${n}.`,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:r})=>`Identifier '${r}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Sa={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:r})=>`Assigning to '${r}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:r})=>`Binding '${r}' 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=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),Ea={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:r})=>`Invalid topic token ${r}. In order to use ${r} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${r}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:r})=>`Hack-style pipe body cannot be an unparenthesized ${fn({type:r})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},Aa=["message"];function Gr(r,n,e){Object.defineProperty(r,n,{enumerable:!1,configurable:!0,value:e})}function ka({toMessage:r,code:n,reasonCode:e,syntaxPlugin:t}){let s=e==="MissingPlugin"||e==="MissingOneOfPlugins";{let i={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};i[e]&&(e=i[e])}return function i(o,a){let l=new SyntaxError;return l.code=n,l.reasonCode=e,l.loc=o,l.pos=o.index,l.syntaxPlugin=t,s&&(l.missingPlugin=a.missingPlugin),Gr(l,"clone",function(p={}){var u;let{line:f,column:m,index:d}=(u=p.loc)!=null?u:o;return i(new ke(f,m,d),Object.assign({},a,p.details))}),Gr(l,"details",a),Object.defineProperty(l,"message",{configurable:!0,get(){let c=`${r(a)} (${o.line}:${o.column})`;return this.message=c,c},set(c){Object.defineProperty(this,"message",{value:c,writable:!0})}}),l}}function Be(r,n){if(Array.isArray(r))return t=>Be(t,r[0]);let e={};for(let t of Object.keys(r)){let s=r[t],i=typeof s=="string"?{message:()=>s}:typeof s=="function"?{message:s}:s,{message:o}=i,a=Ta(i,Aa),l=typeof o=="string"?()=>o:o;e[t]=ka(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:t,toMessage:l},n?{syntaxPlugin:n}:{},a))}return e}var b=Object.assign({},Be(wa),Be(Ca),Be(Sa),Be`pipelineOperator`(Ea)),{defineProperty:Na}=Object,Wr=(r,n)=>{r&&Na(r,n,{enumerable:!1,value:r[n]})};function kt(r){return Wr(r.loc.start,"index"),Wr(r.loc.end,"index"),r}var Ma=r=>class extends r{parse(){let e=kt(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(kt)),e}parseRegExpLiteral({pattern:e,flags:t}){let s=null;try{s=new RegExp(e,t)}catch{}let i=this.estreeParseLiteral(s);return i.regex={pattern:e,flags:t},i}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}let s=this.estreeParseLiteral(t);return s.bigint=String(s.value||e),s}parseDecimalLiteral(e){let s=this.estreeParseLiteral(null);return s.decimal=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)}directiveToStmt(e){let t=e.value;delete e.value,t.type="Literal",t.raw=t.extra.raw,t.value=t.extra.expressionValue;let s=e;return s.type="ExpressionStatement",s.expression=t,s.directive=t.extra.rawValue,delete t.extra,s}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((t=e.expression.extra)!=null&&t.parenthesized)}parseBlockBody(e,t,s,i,o){super.parseBlockBody(e,t,s,i,o);let a=e.directives.map(l=>this.directiveToStmt(l));e.body=a.concat(e.body),delete e.directives}pushClassMethod(e,t,s,i,o,a){this.parseMethod(t,s,i,o,a,"ClassMethod",!0),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(t)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let t=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=t,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){let 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=e.body.type!=="BlockStatement"}parseMethod(e,t,s,i,o,a,l=!1){let c=this.startNode();return c.kind=e.kind,c=super.parseMethod(c,t,s,i,o,a,l),c.type="FunctionExpression",delete c.kind,e.value=c,a==="ClassPrivateMethod"&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}nameIsConstructor(e){return e.type==="Literal"?e.value==="constructor":super.nameIsConstructor(e)}parseClassProperty(...e){let t=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition"),t}parseClassPrivateProperty(...e){let t=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition",t.computed=!1),t}parseObjectMethod(e,t,s,i,o){let a=super.parseObjectMethod(e,t,s,i,o);return a&&(a.type="Property",a.kind==="method"&&(a.kind="init"),a.shorthand=!1),a}parseObjectProperty(e,t,s,i){let o=super.parseObjectProperty(e,t,s,i);return o&&(o.kind="init",o.type="Property"),o}isValidLVal(e,t,s){return e==="Property"?"value":super.isValidLVal(e,t,s)}isAssignable(e,t){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(e!=null&&this.isObjectProperty(e)){let{key:s,value:i}=e;this.isPrivateName(s)&&this.classScope.usePrivateName(this.getPrivateNameSV(s),s.loc.start),this.toAssignable(i,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,s){e.type==="Property"&&(e.kind==="get"||e.kind==="set")?this.raise(b.PatternHasAccessor,e.key):e.type==="Property"&&e.method?this.raise(b.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,t,s)}finishCallExpression(e,t){let s=super.finishCallExpression(e,t);if(s.callee.type==="Import"){var i,o;s.type="ImportExpression",s.source=s.arguments[0],s.options=(i=s.arguments[1])!=null?i:null,s.attributes=(o=s.arguments[1])!=null?o:null,delete s.arguments,delete s.callee}return s}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,t){let s=this.state.lastTokStartLoc,i=super.parseExport(e,t);switch(i.type){case"ExportAllDeclaration":i.exported=null;break;case"ExportNamedDeclaration":i.specifiers.length===1&&i.specifiers[0].type==="ExportNamespaceSpecifier"&&(i.type="ExportAllDeclaration",i.exported=i.specifiers[0].exported,delete i.specifiers);case"ExportDefaultDeclaration":{var o;let{declaration:a}=i;a?.type==="ClassDeclaration"&&((o=a.decorators)==null?void 0:o.length)>0&&a.start===i.start&&this.resetStartLocation(i,s)}break}return i}parseSubscript(e,t,s,i){let o=super.parseSubscript(e,t,s,i);if(i.optionalChainMember){if((o.type==="OptionalMemberExpression"||o.type==="OptionalCallExpression")&&(o.type=o.type.substring(8)),i.stop){let a=this.startNodeAtNode(o);return a.expression=o,this.finishNode(a,"ChainExpression")}}else(o.type==="MemberExpression"||o.type==="CallExpression")&&(o.optional=!1);return o}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.type==="Property"&&(e.method||e.kind==="get"||e.kind==="set")}finishNodeAt(e,t,s){return kt(super.finishNodeAt(e,t,s))}resetStartLocation(e,t){super.resetStartLocation(e,t),kt(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),kt(e)}},Xe=class{constructor(n,e){this.token=void 0,this.preserveSpace=void 0,this.token=n,this.preserveSpace=!!e}},V={brace:new Xe("{"),j_oTag:new Xe("<tag"),j_cTag:new Xe("</tag"),j_expr:new Xe("<tag>...</tag>",!0)};V.template=new Xe("`",!0);var B=!0,A=!0,ls=!0,Nt=!0,Ve=!0,Da=!0,bn=class{constructor(n,e={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=n,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null,this.updateContext=null}},Ls=new Map;function R(r,n={}){n.keyword=r;let e=D(r,n);return Ls.set(r,e),e}function ne(r,n){return D(r,{beforeExpr:B,binop:n})}var Ot=-1,Fe=[],Os=[],Fs=[],Us=[],Bs=[],Rs=[];function D(r,n={}){var e,t,s,i;return++Ot,Os.push(r),Fs.push((e=n.binop)!=null?e:-1),Us.push((t=n.beforeExpr)!=null?t:!1),Bs.push((s=n.startsExpr)!=null?s:!1),Rs.push((i=n.prefix)!=null?i:!1),Fe.push(new bn(r,n)),Ot}function U(r,n={}){var e,t,s,i;return++Ot,Ls.set(r,Ot),Os.push(r),Fs.push((e=n.binop)!=null?e:-1),Us.push((t=n.beforeExpr)!=null?t:!1),Bs.push((s=n.startsExpr)!=null?s:!1),Rs.push((i=n.prefix)!=null?i:!1),Fe.push(new bn("name",n)),Ot}var La={bracketL:D("[",{beforeExpr:B,startsExpr:A}),bracketHashL:D("#[",{beforeExpr:B,startsExpr:A}),bracketBarL:D("[|",{beforeExpr:B,startsExpr:A}),bracketR:D("]"),bracketBarR:D("|]"),braceL:D("{",{beforeExpr:B,startsExpr:A}),braceBarL:D("{|",{beforeExpr:B,startsExpr:A}),braceHashL:D("#{",{beforeExpr:B,startsExpr:A}),braceR:D("}"),braceBarR:D("|}"),parenL:D("(",{beforeExpr:B,startsExpr:A}),parenR:D(")"),comma:D(",",{beforeExpr:B}),semi:D(";",{beforeExpr:B}),colon:D(":",{beforeExpr:B}),doubleColon:D("::",{beforeExpr:B}),dot:D("."),question:D("?",{beforeExpr:B}),questionDot:D("?."),arrow:D("=>",{beforeExpr:B}),template:D("template"),ellipsis:D("...",{beforeExpr:B}),backQuote:D("`",{startsExpr:A}),dollarBraceL:D("${",{beforeExpr:B,startsExpr:A}),templateTail:D("...`",{startsExpr:A}),templateNonTail:D("...${",{beforeExpr:B,startsExpr:A}),at:D("@"),hash:D("#",{startsExpr:A}),interpreterDirective:D("#!..."),eq:D("=",{beforeExpr:B,isAssign:Nt}),assign:D("_=",{beforeExpr:B,isAssign:Nt}),slashAssign:D("_=",{beforeExpr:B,isAssign:Nt}),xorAssign:D("_=",{beforeExpr:B,isAssign:Nt}),moduloAssign:D("_=",{beforeExpr:B,isAssign:Nt}),incDec:D("++/--",{prefix:Ve,postfix:Da,startsExpr:A}),bang:D("!",{beforeExpr:B,prefix:Ve,startsExpr:A}),tilde:D("~",{beforeExpr:B,prefix:Ve,startsExpr:A}),doubleCaret:D("^^",{startsExpr:A}),doubleAt:D("@@",{startsExpr:A}),pipeline:ne("|>",0),nullishCoalescing:ne("??",1),logicalOR:ne("||",1),logicalAND:ne("&&",2),bitwiseOR:ne("|",3),bitwiseXOR:ne("^",4),bitwiseAND:ne("&",5),equality:ne("==/!=/===/!==",6),lt:ne("</>/<=/>=",7),gt:ne("</>/<=/>=",7),relational:ne("</>/<=/>=",7),bitShift:ne("<</>>/>>>",8),bitShiftL:ne("<</>>/>>>",8),bitShiftR:ne("<</>>/>>>",8),plusMin:D("+/-",{beforeExpr:B,binop:9,prefix:Ve,startsExpr:A}),modulo:D("%",{binop:10,startsExpr:A}),star:D("*",{binop:10}),slash:ne("/",10),exponent:D("**",{beforeExpr:B,binop:11,rightAssociative:!0}),_in:R("in",{beforeExpr:B,binop:7}),_instanceof:R("instanceof",{beforeExpr:B,binop:7}),_break:R("break"),_case:R("case",{beforeExpr:B}),_catch:R("catch"),_continue:R("continue"),_debugger:R("debugger"),_default:R("default",{beforeExpr:B}),_else:R("else",{beforeExpr:B}),_finally:R("finally"),_function:R("function",{startsExpr:A}),_if:R("if"),_return:R("return",{beforeExpr:B}),_switch:R("switch"),_throw:R("throw",{beforeExpr:B,prefix:Ve,startsExpr:A}),_try:R("try"),_var:R("var"),_const:R("const"),_with:R("with"),_new:R("new",{beforeExpr:B,startsExpr:A}),_this:R("this",{startsExpr:A}),_super:R("super",{startsExpr:A}),_class:R("class",{startsExpr:A}),_extends:R("extends",{beforeExpr:B}),_export:R("export"),_import:R("import",{startsExpr:A}),_null:R("null",{startsExpr:A}),_true:R("true",{startsExpr:A}),_false:R("false",{startsExpr:A}),_typeof:R("typeof",{beforeExpr:B,prefix:Ve,startsExpr:A}),_void:R("void",{beforeExpr:B,prefix:Ve,startsExpr:A}),_delete:R("delete",{beforeExpr:B,prefix:Ve,startsExpr:A}),_do:R("do",{isLoop:ls,beforeExpr:B}),_for:R("for",{isLoop:ls}),_while:R("while",{isLoop:ls}),_as:U("as",{startsExpr:A}),_assert:U("assert",{startsExpr:A}),_async:U("async",{startsExpr:A}),_await:U("await",{startsExpr:A}),_defer:U("defer",{startsExpr:A}),_from:U("from",{startsExpr:A}),_get:U("get",{startsExpr:A}),_let:U("let",{startsExpr:A}),_meta:U("meta",{startsExpr:A}),_of:U("of",{startsExpr:A}),_sent:U("sent",{startsExpr:A}),_set:U("set",{startsExpr:A}),_source:U("source",{startsExpr:A}),_static:U("static",{startsExpr:A}),_using:U("using",{startsExpr:A}),_yield:U("yield",{startsExpr:A}),_asserts:U("asserts",{startsExpr:A}),_checks:U("checks",{startsExpr:A}),_exports:U("exports",{startsExpr:A}),_global:U("global",{startsExpr:A}),_implements:U("implements",{startsExpr:A}),_intrinsic:U("intrinsic",{startsExpr:A}),_infer:U("infer",{startsExpr:A}),_is:U("is",{startsExpr:A}),_mixins:U("mixins",{startsExpr:A}),_proto:U("proto",{startsExpr:A}),_require:U("require",{startsExpr:A}),_satisfies:U("satisfies",{startsExpr:A}),_keyof:U("keyof",{startsExpr:A}),_readonly:U("readonly",{startsExpr:A}),_unique:U("unique",{startsExpr:A}),_abstract:U("abstract",{startsExpr:A}),_declare:U("declare",{startsExpr:A}),_enum:U("enum",{startsExpr:A}),_module:U("module",{startsExpr:A}),_namespace:U("namespace",{startsExpr:A}),_interface:U("interface",{startsExpr:A}),_type:U("type",{startsExpr:A}),_opaque:U("opaque",{startsExpr:A}),name:D("name",{startsExpr:A}),placeholder:D("%%",{startsExpr:!0}),string:D("string",{startsExpr:A}),num:D("num",{startsExpr:A}),bigint:D("bigint",{startsExpr:A}),decimal:D("decimal",{startsExpr:A}),regexp:D("regexp",{startsExpr:A}),privateName:D("#name",{startsExpr:A}),eof:D("eof"),jsxName:D("jsxName"),jsxText:D("jsxText",{beforeExpr:!0}),jsxTagStart:D("jsxTagStart",{startsExpr:!0}),jsxTagEnd:D("jsxTagEnd")};function _(r){return r>=93&&r<=133}function Oa(r){return r<=92}function we(r){return r>=58&&r<=133}function ii(r){return r>=58&&r<=137}function Fa(r){return Us[r]}function fs(r){return Bs[r]}function Ua(r){return r>=29&&r<=33}function Kr(r){return r>=129&&r<=131}function Ba(r){return r>=90&&r<=92}function _s(r){return r>=58&&r<=92}function Ra(r){return r>=39&&r<=59}function _a(r){return r===34}function ja(r){return Rs[r]}function Va(r){return r>=121&&r<=123}function za(r){return r>=124&&r<=130}function $e(r){return Os[r]}function mn(r){return Fs[r]}function $a(r){return r===57}function gn(r){return r>=24&&r<=25}function Oe(r){return Fe[r]}Fe[8].updateContext=r=>{r.pop()},Fe[5].updateContext=Fe[7].updateContext=Fe[23].updateContext=r=>{r.push(V.brace)},Fe[22].updateContext=r=>{r[r.length-1]===V.template?r.pop():r.push(V.template)},Fe[143].updateContext=r=>{r.push(V.j_expr,V.j_oTag)};var js="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",oi="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",Ha=new RegExp("["+js+"]"),qa=new RegExp("["+js+oi+"]");js=oi=null;var ai=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,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,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,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,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Ga=[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,80,3,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,343,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,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];function ms(r,n){let e=65536;for(let t=0,s=n.length;t<s;t+=2){if(e+=n[t],e>r)return!1;if(e+=n[t+1],e>=r)return!0}return!1}function Ue(r){return r<65?r===36:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&Ha.test(String.fromCharCode(r)):ms(r,ai)}function ot(r){return r<48?r===36:r<58?!0:r<65?!1:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&qa.test(String.fromCharCode(r)):ms(r,ai)||ms(r,Ga)}var Vs={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Wa=new Set(Vs.keyword),Ka=new Set(Vs.strict),Xa=new Set(Vs.strictBind);function li(r,n){return n&&r==="await"||r==="enum"}function ci(r,n){return li(r,n)||Ka.has(r)}function pi(r){return Xa.has(r)}function ui(r,n){return ci(r,n)||pi(r)}function Ja(r){return Wa.has(r)}function Ya(r,n,e){return r===64&&n===64&&Ue(e)}var Qa=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"]);function Za(r){return Qa.has(r)}var Ft=class{constructor(n){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=n}},Ut=class{constructor(n,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=n,this.inModule=e}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let n=this.currentThisScopeFlags();return(n&64)>0&&(n&2)===0}get inStaticBlock(){for(let n=this.scopeStack.length-1;;n--){let{flags:e}=this.scopeStack[n];if(e&128)return!0;if(e&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(n){return new Ft(n)}enter(n){this.scopeStack.push(this.createScope(n))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(n){return!!(n.flags&130||!this.parser.inModule&&n.flags&1)}declareName(n,e,t){let s=this.currentScope();if(e&8||e&16){this.checkRedeclarationInScope(s,n,e,t);let i=s.names.get(n)||0;e&16?i=i|4:(s.firstLexicalName||(s.firstLexicalName=n),i=i|2),s.names.set(n,i),e&8&&this.maybeExportDefined(s,n)}else if(e&4)for(let i=this.scopeStack.length-1;i>=0&&(s=this.scopeStack[i],this.checkRedeclarationInScope(s,n,e,t),s.names.set(n,(s.names.get(n)||0)|1),this.maybeExportDefined(s,n),!(s.flags&387));--i);this.parser.inModule&&s.flags&1&&this.undefinedExports.delete(n)}maybeExportDefined(n,e){this.parser.inModule&&n.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(n,e,t,s){this.isRedeclaredInScope(n,e,t)&&this.parser.raise(b.VarRedeclaration,s,{identifierName:e})}isRedeclaredInScope(n,e,t){if(!(t&1))return!1;if(t&8)return n.names.has(e);let s=n.names.get(e);return t&16?(s&2)>0||!this.treatFunctionsAsVarInScope(n)&&(s&1)>0:(s&2)>0&&!(n.flags&8&&n.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(n)&&(s&4)>0}checkLocalExport(n){let{name:e}=n;this.scopeStack[0].names.has(e)||this.undefinedExports.set(e,n.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let n=this.scopeStack.length-1;;n--){let{flags:e}=this.scopeStack[n];if(e&387)return e}}currentThisScopeFlags(){for(let n=this.scopeStack.length-1;;n--){let{flags:e}=this.scopeStack[n];if(e&451&&!(e&4))return e}}},hs=class extends Ft{constructor(...n){super(...n),this.declareFunctions=new Set}},bs=class extends Ut{createScope(n){return new hs(n)}declareName(n,e,t){let s=this.currentScope();if(e&2048){this.checkRedeclarationInScope(s,n,e,t),this.maybeExportDefined(s,n),s.declareFunctions.add(n);return}super.declareName(n,e,t)}isRedeclaredInScope(n,e,t){if(super.isRedeclaredInScope(n,e,t))return!0;if(t&2048&&!n.declareFunctions.has(e)){let s=n.names.get(e);return(s&4)>0||(s&2)>0}return!1}checkLocalExport(n){this.scopeStack[0].declareFunctions.has(n.name)||super.checkLocalExport(n)}},gs=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(n){return n+this.startIndex}offsetToSourcePos(n){return n-this.startIndex}hasPlugin(n){if(typeof n=="string")return this.plugins.has(n);{let[e,t]=n;if(!this.hasPlugin(e))return!1;let s=this.plugins.get(e);for(let i of Object.keys(t))if(s?.[i]!==t[i])return!1;return!0}}getPluginOption(n,e){var t;return(t=this.plugins.get(n))==null?void 0:t[e]}};function di(r,n){r.trailingComments===void 0?r.trailingComments=n:r.trailingComments.unshift(...n)}function el(r,n){r.leadingComments===void 0?r.leadingComments=n:r.leadingComments.unshift(...n)}function Bt(r,n){r.innerComments===void 0?r.innerComments=n:r.innerComments.unshift(...n)}function Mt(r,n,e){let t=null,s=n.length;for(;t===null&&s>0;)t=n[--s];t===null||t.start>e.start?Bt(r,e.comments):di(t,e.comments)}var ys=class extends gs{addComment(n){this.filename&&(n.loc.filename=this.filename);let{commentsLen:e}=this.state;this.comments.length!==e&&(this.comments.length=e),this.comments.push(n),this.state.commentsLen++}processComment(n){let{commentStack:e}=this.state,t=e.length;if(t===0)return;let s=t-1,i=e[s];i.start===n.end&&(i.leadingNode=n,s--);let{start:o}=n;for(;s>=0;s--){let a=e[s],l=a.end;if(l>o)a.containingNode=n,this.finalizeComment(a),e.splice(s,1);else{l===o&&(a.trailingNode=n);break}}}finalizeComment(n){let{comments:e}=n;if(n.leadingNode!==null||n.trailingNode!==null)n.leadingNode!==null&&di(n.leadingNode,e),n.trailingNode!==null&&el(n.trailingNode,e);else{let{containingNode:t,start:s}=n;if(this.input.charCodeAt(this.offsetToSourcePos(s)-1)===44)switch(t.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Mt(t,t.properties,n);break;case"CallExpression":case"OptionalCallExpression":Mt(t,t.arguments,n);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Mt(t,t.params,n);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Mt(t,t.elements,n);break;case"ExportNamedDeclaration":case"ImportDeclaration":Mt(t,t.specifiers,n);break;default:Bt(t,e)}else Bt(t,e)}}finalizeRemainingComments(){let{commentStack:n}=this.state;for(let e=n.length-1;e>=0;e--)this.finalizeComment(n[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(n){let{commentStack:e}=this.state,{length:t}=e;if(t===0)return;let s=e[t-1];s.leadingNode===n&&(s.leadingNode=null)}resetPreviousIdentifierLeadingComments(n){let{commentStack:e}=this.state,{length:t}=e;t!==0&&(e[t-1].trailingNode===n?e[t-1].trailingNode=null:t>=2&&e[t-2].trailingNode===n&&(e[t-2].trailingNode=null))}takeSurroundingComments(n,e,t){let{commentStack:s}=this.state,i=s.length;if(i===0)return;let o=i-1;for(;o>=0;o--){let a=s[o],l=a.end;if(a.start===t)a.leadingNode=n;else if(l===e)a.trailingNode=n;else if(l<e)break}}},tl=/\r\n|[\r\n\u2028\u2029]/,un=new RegExp(tl.source,"g");function at(r){switch(r){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function Xr(r,n,e){for(let t=n;t<e;t++)if(at(r.charCodeAt(t)))return!0;return!1}var cs=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ps=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function nl(r){switch(r){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}}var vs=class r{constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[V.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(n){n?this.flags|=1:this.flags&=-2}init({strictMode:n,sourceType:e,startIndex:t,startLine:s,startColumn:i}){this.strict=n===!1?!1:n===!0?!0:e==="module",this.startIndex=t,this.curLine=s,this.lineStart=-i,this.startLoc=this.endLoc=new ke(s,i,t)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(n){n?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(n){n?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(n){n?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(n){n?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(n){n?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(n){n?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(n){n?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(n){n?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(n){n?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(n){n?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(n){n?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(n){n?this.flags|=4096:this.flags&=-4097}curPosition(){return new ke(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let n=new r;return n.flags=this.flags,n.startIndex=this.startIndex,n.curLine=this.curLine,n.lineStart=this.lineStart,n.startLoc=this.startLoc,n.endLoc=this.endLoc,n.errors=this.errors.slice(),n.potentialArrowAt=this.potentialArrowAt,n.noArrowAt=this.noArrowAt.slice(),n.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),n.topicContext=this.topicContext,n.labels=this.labels.slice(),n.commentsLen=this.commentsLen,n.commentStack=this.commentStack.slice(),n.pos=this.pos,n.type=this.type,n.value=this.value,n.start=this.start,n.end=this.end,n.lastTokEndLoc=this.lastTokEndLoc,n.lastTokStartLoc=this.lastTokStartLoc,n.context=this.context.slice(),n.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,n.strictErrors=this.strictErrors,n.tokensLength=this.tokensLength,n}},sl=function(n){return n>=48&&n<=57},Jr={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},dn={bin:r=>r===48||r===49,oct:r=>r>=48&&r<=55,dec:r=>r>=48&&r<=57,hex:r=>r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102};function Yr(r,n,e,t,s,i){let o=e,a=t,l=s,c="",p=null,u=e,{length:f}=n;for(;;){if(e>=f){i.unterminated(o,a,l),c+=n.slice(u,e);break}let m=n.charCodeAt(e);if(rl(r,m,n,e)){c+=n.slice(u,e);break}if(m===92){c+=n.slice(u,e);let d=il(n,e,t,s,r==="template",i);d.ch===null&&!p?p={pos:e,lineStart:t,curLine:s}:c+=d.ch,{pos:e,lineStart:t,curLine:s}=d,u=e}else m===8232||m===8233?(++e,++s,t=e):m===10||m===13?r==="template"?(c+=n.slice(u,e)+`
5
5
  `,++e,m===13&&n.charCodeAt(e)===10&&++e,++s,u=t=e):i.unterminated(o,a,l):++e}return{pos:e,str:c,firstInvalidLoc:p,lineStart:t,curLine:s,containsInvalid:!!p}}function rl(r,n,e,t){return r==="template"?n===96||n===36&&e.charCodeAt(t+1)===123:n===(r==="double"?34:39)}function il(r,n,e,t,s,i){let o=!s;n++;let a=c=>({pos:n,ch:c,lineStart:e,curLine:t}),l=r.charCodeAt(n++);switch(l){case 110:return a(`
6
- `);case 114:return a("\r");case 120:{let c;return{code:c,pos:n}=xs(r,n,e,t,2,!1,o,i),a(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:n}=mi(r,n,e,t,o,i),a(c===null?null:String.fromCodePoint(c))}case 116:return a(" ");case 98:return a("\b");case 118:return a("\v");case 102:return a("\f");case 13:r.charCodeAt(n)===10&&++n;case 10:e=n,++t;case 8232:case 8233:return a("");case 56:case 57:if(s)return a(null);i.strictNumericEscape(n-1,e,t);default:if(l>=48&&l<=55){let c=n-1,u=/^[0-7]+/.exec(r.slice(c,n+2))[0],f=parseInt(u,8);f>255&&(u=u.slice(0,-1),f=parseInt(u,8)),n+=u.length-1;let m=r.charCodeAt(n);if(u!=="0"||m===56||m===57){if(s)return a(null);i.strictNumericEscape(c,e,t)}return a(String.fromCharCode(f))}return a(String.fromCharCode(l))}}function xs(r,n,e,t,s,i,o,a){let l=n,c;return{n:c,pos:n}=fi(r,n,e,t,16,s,i,!1,a,!o),c===null&&(o?a.invalidEscapeSequence(l,e,t):n=l-1),{code:c,pos:n}}function fi(r,n,e,t,s,i,o,a,l,c){let p=n,u=s===16?Jr.hex:Jr.decBinOct,f=s===16?dn.hex:s===10?dn.dec:s===8?dn.oct:dn.bin,m=!1,d=0;for(let g=0,h=i??1/0;g<h;++g){let y=r.charCodeAt(n),P;if(y===95&&a!=="bail"){let E=r.charCodeAt(n-1),x=r.charCodeAt(n+1);if(a){if(Number.isNaN(x)||!f(x)||u.has(E)||u.has(x)){if(c)return{n:null,pos:n};l.unexpectedNumericSeparator(n,e,t)}}else{if(c)return{n:null,pos:n};l.numericSeparatorInEscapeSequence(n,e,t)}++n;continue}if(y>=97?P=y-97+10:y>=65?P=y-65+10:sl(y)?P=y-48:P=1/0,P>=s){if(P<=9&&c)return{n:null,pos:n};if(P<=9&&l.invalidDigit(n,e,t,s))P=0;else if(o)P=0,m=!0;else break}++n,d=d*s+P}return n===p||i!=null&&n-p!==i||m?{n:null,pos:n}:{n:d,pos:n}}function mi(r,n,e,t,s,i){let o=r.charCodeAt(n),a;if(o===123){if(++n,{code:a,pos:n}=xs(r,n,e,t,r.indexOf("}",n)-n,!0,s,i),++n,a!==null&&a>1114111)if(s)i.invalidCodePoint(n,e,t);else return{code:null,pos:n}}else({code:a,pos:n}=xs(r,n,e,t,4,!1,s,i));return{code:a,pos:n}}function Mt(r,n,e){return new ke(e,r-n,r)}var ol=new Set([103,109,115,105,121,117,100,118]),Ae=class{constructor(n){let e=n.startIndex||0;this.type=n.type,this.value=n.value,this.start=e+n.start,this.end=e+n.end,this.loc=new ct(n.startLoc,n.endLoc)}},Ps=class extends ys{constructor(n,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(t,s,i,o)=>this.options.errorRecovery?(this.raise(b.InvalidDigit,Mt(t,s,i),{radix:o}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(b.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(b.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(b.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(b.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(t,s,i)=>{this.recordStrictModeErrors(b.StrictNumericEscape,Mt(t,s,i))},unterminated:(t,s,i)=>{throw this.raise(b.UnterminatedString,Mt(t-1,s,i))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(b.StrictNumericEscape),unterminated:(t,s,i)=>{throw this.raise(b.UnterminatedTemplate,Mt(t,s,i))}}),this.state=new vs,this.state.init(n),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(n){this.tokens.length=this.state.tokensLength,this.tokens.push(n),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Ae(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(n){return this.match(n)?(this.next(),!0):!1}match(n){return this.state.type===n}createLookaheadState(n){return{pos:n.pos,value:null,type:n.type,start:n.start,end:n.end,context:[this.curContext()],inType:n.inType,startLoc:n.startLoc,lastTokEndLoc:n.lastTokEndLoc,curLine:n.curLine,lineStart:n.lineStart,curPosition:n.curPosition}}lookahead(){let n=this.state;this.state=this.createLookaheadState(n),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=n,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(n){return cs.lastIndex=n,cs.test(this.input)?cs.lastIndex:n}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(n){return ps.lastIndex=n,ps.test(this.input)?ps.lastIndex:n}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(n){let e=this.input.charCodeAt(n);if((e&64512)===55296&&++n<this.input.length){let t=this.input.charCodeAt(n);(t&64512)===56320&&(e=65536+((e&1023)<<10)+(t&1023))}return e}setStrict(n){this.state.strict=n,n&&(this.state.strictErrors.forEach(([e,t])=>this.raise(e,t)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(n){let e;this.isLookahead||(e=this.state.curPosition());let t=this.state.pos,s=this.input.indexOf(n,t+2);if(s===-1)throw this.raise(b.UnterminatedComment,this.state.curPosition());for(this.state.pos=s+n.length,un.lastIndex=t+2;un.test(this.input)&&un.lastIndex<=s;)++this.state.curLine,this.state.lineStart=un.lastIndex;if(this.isLookahead)return;let i={type:"CommentBlock",value:this.input.slice(t+2,s),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(s+n.length),loc:new ct(e,this.state.curPosition())};return this.options.tokens&&this.pushToken(i),i}skipLineComment(n){let e=this.state.pos,t;this.isLookahead||(t=this.state.curPosition());let s=this.input.charCodeAt(this.state.pos+=n);if(this.state.pos<this.length)for(;!at(s)&&++this.state.pos<this.length;)s=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let i=this.state.pos,a={type:"CommentLine",value:this.input.slice(e+n,i),start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(i),loc:new ct(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(a),a}skipSpace(){let n=this.state.pos,e=[];e:for(;this.state.pos<this.length;){let t=this.input.charCodeAt(this.state.pos);switch(t){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let s=this.skipBlockComment("*/");s!==void 0&&(this.addComment(s),this.options.attachComment&&e.push(s));break}case 47:{let s=this.skipLineComment(2);s!==void 0&&(this.addComment(s),this.options.attachComment&&e.push(s));break}default:break e}break;default:if(nl(t))++this.state.pos;else if(t===45&&!this.inModule&&this.options.annexB){let s=this.state.pos;if(this.input.charCodeAt(s+1)===45&&this.input.charCodeAt(s+2)===62&&(n===0||this.state.lineStart>n)){let i=this.skipLineComment(3);i!==void 0&&(this.addComment(i),this.options.attachComment&&e.push(i))}else break e}else if(t===60&&!this.inModule&&this.options.annexB){let s=this.state.pos;if(this.input.charCodeAt(s+1)===33&&this.input.charCodeAt(s+2)===45&&this.input.charCodeAt(s+3)===45){let i=this.skipLineComment(4);i!==void 0&&(this.addComment(i),this.options.attachComment&&e.push(i))}else break e}else break e}}if(e.length>0){let t=this.state.pos,s={start:this.sourceToOffsetPos(n),end:this.sourceToOffsetPos(t),comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(s)}}finishToken(n,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let t=this.state.type;this.state.type=n,this.state.value=e,this.isLookahead||this.updateContext(t)}replaceToken(n){this.state.type=n,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let n=this.state.pos+1,e=this.codePointAtPos(n);if(e>=48&&e<=57)throw this.raise(b.UnexpectedDigitAfterHash,this.state.curPosition());if(e===123||e===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(e===123?b.RecordExpressionHashIncorrectStartSyntaxType:b.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else Ue(e)?(++this.state.pos,this.finishToken(139,this.readWord1(e))):e===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let n=this.input.charCodeAt(this.state.pos+1);if(n>=48&&n<=57){this.readNumber(!0);return}n===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let n=this.input.charCodeAt(this.state.pos+1);if(n!==33)return!1;let e=this.state.pos;for(this.state.pos+=1;!at(n)&&++this.state.pos<this.length;)n=this.input.charCodeAt(this.state.pos);let t=this.input.slice(e+2,this.state.pos);return this.finishToken(28,t),!0}readToken_mult_modulo(n){let e=n===42?55:54,t=1,s=this.input.charCodeAt(this.state.pos+1);n===42&&s===42&&(t++,s=this.input.charCodeAt(this.state.pos+2),e=57),s===61&&!this.state.inType&&(t++,e=n===37?33:30),this.finishOp(e,t)}readToken_pipe_amp(n){let e=this.input.charCodeAt(this.state.pos+1);if(e===n){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(n===124?41:42,2);return}if(n===124){if(e===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&e===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(b.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&e===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(b.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(e===61){this.finishOp(30,2);return}this.finishOp(n===124?43:45,1)}readToken_caret(){let n=this.input.charCodeAt(this.state.pos+1);n===61&&!this.state.inType?this.finishOp(32,2):n===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(n){let e=this.input.charCodeAt(this.state.pos+1);if(e===n){this.finishOp(34,2);return}e===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:n}=this.state,e=this.input.charCodeAt(n+1);if(e===60){if(this.input.charCodeAt(n+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(e===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:n}=this.state,e=this.input.charCodeAt(n+1);if(e===62){let t=this.input.charCodeAt(n+2)===62?3:2;if(this.input.charCodeAt(n+t)===61){this.finishOp(30,t+1);return}this.finishOp(52,t);return}if(e===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(n){let e=this.input.charCodeAt(this.state.pos+1);if(e===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(n===61&&e===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(n===61?29:35,1)}readToken_question(){let n=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);n===63?e===61?this.finishOp(30,3):this.finishOp(40,2):n===46&&!(e>=48&&e<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(n){switch(n){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(b.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(b.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(n);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(n);return;case 124:case 38:this.readToken_pipe_amp(n);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(n);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(n);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(Ue(n)){this.readWord(n);return}}throw this.raise(b.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(n)})}finishOp(n,e){let t=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(n,t)}readRegexp(){let n=this.state.startLoc,e=this.state.start+1,t,s,{pos:i}=this.state;for(;;++i){if(i>=this.length)throw this.raise(b.UnterminatedRegExp,se(n,1));let c=this.input.charCodeAt(i);if(at(c))throw this.raise(b.UnterminatedRegExp,se(n,1));if(t)t=!1;else{if(c===91)s=!0;else if(c===93&&s)s=!1;else if(c===47&&!s)break;t=c===92}}let o=this.input.slice(e,i);++i;let a="",l=()=>se(n,i+2-e);for(;i<this.length;){let c=this.codePointAtPos(i),p=String.fromCharCode(c);if(ol.has(c))c===118?a.includes("u")&&this.raise(b.IncompatibleRegExpUVFlags,l()):c===117&&a.includes("v")&&this.raise(b.IncompatibleRegExpUVFlags,l()),a.includes(p)&&this.raise(b.DuplicateRegExpFlags,l());else if(ot(c)||c===92)this.raise(b.MalformedRegExpFlags,l());else break;++i,a+=p}this.state.pos=i,this.finishToken(138,{pattern:o,flags:a})}readInt(n,e,t=!1,s=!0){let{n:i,pos:o}=fi(this.input,this.state.pos,this.state.lineStart,this.state.curLine,n,e,t,s,this.errorHandlers_readInt,!1);return this.state.pos=o,i}readRadixNumber(n){let e=this.state.pos,t=this.state.curPosition(),s=!1;this.state.pos+=2;let i=this.readInt(n);i==null&&this.raise(b.InvalidDigit,se(t,2),{radix:n});let o=this.input.charCodeAt(this.state.pos);if(o===110)++this.state.pos,s=!0;else if(o===109)throw this.raise(b.InvalidDecimal,t);if(Ue(this.codePointAtPos(this.state.pos)))throw this.raise(b.NumberIdentifier,this.state.curPosition());if(s){let a=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,a);return}this.finishToken(135,i)}readNumber(n){let e=this.state.pos,t=this.state.curPosition(),s=!1,i=!1,o=!1,a=!1;!n&&this.readInt(10)===null&&this.raise(b.InvalidNumber,this.state.curPosition());let l=this.state.pos-e>=2&&this.input.charCodeAt(e)===48;if(l){let m=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(b.StrictOctalLiteral,t),!this.state.strict){let d=m.indexOf("_");d>0&&this.raise(b.ZeroDigitNumericSeparator,se(t,d))}a=l&&!/[89]/.test(m)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!a&&(++this.state.pos,this.readInt(10),s=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!a&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(b.InvalidOrMissingExponent,t),s=!0,o=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((s||l)&&this.raise(b.InvalidBigIntLiteral,t),++this.state.pos,i=!0),c===109){this.expectPlugin("decimal",this.state.curPosition()),(o||l)&&this.raise(b.InvalidDecimal,t),++this.state.pos;var p=!0}if(Ue(this.codePointAtPos(this.state.pos)))throw this.raise(b.NumberIdentifier,this.state.curPosition());let u=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(i){this.finishToken(136,u);return}if(p){this.finishToken(137,u);return}let f=a?parseInt(u,8):parseFloat(u);this.finishToken(135,f)}readCodePoint(n){let{code:e,pos:t}=mi(this.input,this.state.pos,this.state.lineStart,this.state.curLine,n,this.errorHandlers_readCodePoint);return this.state.pos=t,e}readString(n){let{str:e,pos:t,curLine:s,lineStart:i}=Yr(n===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=t+1,this.state.lineStart=i,this.state.curLine=s,this.finishToken(134,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let n=this.input[this.state.pos],{str:e,firstInvalidLoc:t,pos:s,curLine:i,lineStart:o}=Yr("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=s+1,this.state.lineStart=o,this.state.curLine=i,t&&(this.state.firstInvalidTemplateEscapePos=new ke(t.curLine,t.pos-t.lineStart,this.sourceToOffsetPos(t.pos))),this.input.codePointAt(s)===96?this.finishToken(24,t?null:n+e+"`"):(this.state.pos++,this.finishToken(25,t?null:n+e+"${"))}recordStrictModeErrors(n,e){let t=e.index;this.state.strict&&!this.state.strictErrors.has(t)?this.raise(n,e):this.state.strictErrors.set(t,[n,e])}readWord1(n){this.state.containsEsc=!1;let e="",t=this.state.pos,s=this.state.pos;for(n!==void 0&&(this.state.pos+=n<=65535?1:2);this.state.pos<this.length;){let i=this.codePointAtPos(this.state.pos);if(ot(i))this.state.pos+=i<=65535?1:2;else if(i===92){this.state.containsEsc=!0,e+=this.input.slice(s,this.state.pos);let o=this.state.curPosition(),a=this.state.pos===t?Ue:ot;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(b.MissingUnicodeEscape,this.state.curPosition()),s=this.state.pos-1;continue}++this.state.pos;let l=this.readCodePoint(!0);l!==null&&(a(l)||this.raise(b.EscapedCharNotAnIdentifier,o),e+=String.fromCodePoint(l)),s=this.state.pos}else break}return e+this.input.slice(s,this.state.pos)}readWord(n){let e=this.readWord1(n),t=Ls.get(e);t!==void 0?this.finishToken(t,$e(t)):this.finishToken(132,e)}checkKeywordEscapes(){let{type:n}=this.state;Bs(n)&&this.state.containsEsc&&this.raise(b.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:$e(n)})}raise(n,e,t={}){let s=e instanceof ke?e:e.loc.start,i=n(s,t);if(!this.options.errorRecovery)throw i;return this.isLookahead||this.state.errors.push(i),i}raiseOverwrite(n,e,t={}){let s=e instanceof ke?e:e.loc.start,i=s.index,o=this.state.errors;for(let a=o.length-1;a>=0;a--){let l=o[a];if(l.loc.index===i)return o[a]=n(s,t);if(l.loc.index<i)break}return this.raise(n,e,t)}updateContext(n){}unexpected(n,e){throw this.raise(b.UnexpectedToken,n??this.state.startLoc,{expected:e?$e(e):null})}expectPlugin(n,e){if(this.hasPlugin(n))return!0;throw this.raise(b.MissingPlugin,e??this.state.startLoc,{missingPlugin:[n]})}expectOnePlugin(n){if(!n.some(e=>this.hasPlugin(e)))throw this.raise(b.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:n})}errorBuilder(n){return(e,t,s)=>{this.raise(n,Mt(e,t,s))}}},Ts=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},ws=class{constructor(n){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=n}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Ts)}exit(){let n=this.stack.pop(),e=this.current();for(let[t,s]of Array.from(n.undefinedPrivateNames))e?e.undefinedPrivateNames.has(t)||e.undefinedPrivateNames.set(t,s):this.parser.raise(b.InvalidPrivateFieldResolution,s,{identifierName:t})}declarePrivateName(n,e,t){let{privateNames:s,loneAccessors:i,undefinedPrivateNames:o}=this.current(),a=s.has(n);if(e&3){let l=a&&i.get(n);if(l){let c=l&4,p=e&4,u=l&3,f=e&3;a=u===f||c!==p,a||i.delete(n)}else a||i.set(n,e)}a&&this.parser.raise(b.PrivateNameRedeclaration,t,{identifierName:n}),s.add(n),o.delete(n)}usePrivateName(n,e){let t;for(t of this.stack)if(t.privateNames.has(n))return;t?t.undefinedPrivateNames.set(n,e):this.parser.raise(b.InvalidPrivateFieldResolution,e,{identifierName:n})}},pt=class{constructor(n=0){this.type=n}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},yn=class extends pt{constructor(n){super(n),this.declarationErrors=new Map}recordDeclarationError(n,e){let t=e.index;this.declarationErrors.set(t,[n,e])}clearDeclarationError(n){this.declarationErrors.delete(n)}iterateErrors(n){this.declarationErrors.forEach(n)}},Cs=class{constructor(n){this.parser=void 0,this.stack=[new pt],this.parser=n}enter(n){this.stack.push(n)}exit(){this.stack.pop()}recordParameterInitializerError(n,e){let t=e.loc.start,{stack:s}=this,i=s.length-1,o=s[i];for(;!o.isCertainlyParameterDeclaration();){if(o.canBeArrowParameterDeclaration())o.recordDeclarationError(n,t);else return;o=s[--i]}this.parser.raise(n,t)}recordArrowParameterBindingError(n,e){let{stack:t}=this,s=t[t.length-1],i=e.loc.start;if(s.isCertainlyParameterDeclaration())this.parser.raise(n,i);else if(s.canBeArrowParameterDeclaration())s.recordDeclarationError(n,i);else return}recordAsyncArrowParametersError(n){let{stack:e}=this,t=e.length-1,s=e[t];for(;s.canBeArrowParameterDeclaration();)s.type===2&&s.recordDeclarationError(b.AwaitBindingIdentifier,n),s=e[--t]}validateAsPattern(){let{stack:n}=this,e=n[n.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(([t,s])=>{this.parser.raise(t,s);let i=n.length-2,o=n[i];for(;o.canBeArrowParameterDeclaration();)o.clearDeclarationError(s.index),o=n[--i]})}};function al(){return new pt(3)}function ll(){return new yn(1)}function cl(){return new yn(2)}function hi(){return new pt}var Ss=class{constructor(){this.stacks=[]}enter(n){this.stacks.push(n)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function hn(r,n){return(r?2:0)|(n?1:0)}var Is=class extends Ps{addExtra(n,e,t,s=!0){if(!n)return;let{extra:i}=n;i==null&&(i={},n.extra=i),s?i[e]=t:Object.defineProperty(i,e,{enumerable:s,value:t})}isContextual(n){return this.state.type===n&&!this.state.containsEsc}isUnparsedContextual(n,e){let t=n+e.length;if(this.input.slice(n,t)===e){let s=this.input.charCodeAt(t);return!(ot(s)||(s&64512)===55296)}return!1}isLookaheadContextual(n){let e=this.nextTokenStart();return this.isUnparsedContextual(e,n)}eatContextual(n){return this.isContextual(n)?(this.next(),!0):!1}expectContextual(n,e){if(!this.eatContextual(n)){if(e!=null)throw this.raise(e,this.state.startLoc);this.unexpected(null,n)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Xr(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return Xr(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(n=!0){(n?this.isLineTerminator():this.eat(13))||this.raise(b.MissingSemicolon,this.state.lastTokEndLoc)}expect(n,e){this.eat(n)||this.unexpected(e,n)}tryParse(n,e=this.state.clone()){let t={node:null};try{let s=n((i=null)=>{throw t.node=i,t});if(this.state.errors.length>e.errors.length){let i=this.state;return this.state=e,this.state.tokensLength=i.tokensLength,{node:s,error:i.errors[e.errors.length],thrown:!1,aborted:!1,failState:i}}return{node:s,error:null,thrown:!1,aborted:!1,failState:null}}catch(s){let i=this.state;if(this.state=e,s instanceof SyntaxError)return{node:null,error:s,thrown:!0,aborted:!1,failState:i};if(s===t)return{node:t.node,error:null,thrown:!1,aborted:!0,failState:i};throw s}}checkExpressionErrors(n,e){if(!n)return!1;let{shorthandAssignLoc:t,doubleProtoLoc:s,privateKeyLoc:i,optionalParametersLoc:o}=n,a=!!t||!!s||!!o||!!i;if(!e)return a;t!=null&&this.raise(b.InvalidCoverInitializedName,t),s!=null&&this.raise(b.DuplicateProto,s),i!=null&&this.raise(b.UnexpectedPrivateField,i),o!=null&&this.unexpected(o)}isLiteralPropertyName(){return ii(this.state.type)}isPrivateName(n){return n.type==="PrivateName"}getPrivateNameSV(n){return n.id.name}hasPropertyAsPrivateName(n){return(n.type==="MemberExpression"||n.type==="OptionalMemberExpression")&&this.isPrivateName(n.property)}isObjectProperty(n){return n.type==="ObjectProperty"}isObjectMethod(n){return n.type==="ObjectMethod"}initializeScopes(n=this.options.sourceType==="module"){let e=this.state.labels;this.state.labels=[];let t=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let s=this.inModule;this.inModule=n;let i=this.scope,o=this.getScopeHandler();this.scope=new o(this,n);let a=this.prodParam;this.prodParam=new Ss;let l=this.classScope;this.classScope=new ws(this);let c=this.expressionScope;return this.expressionScope=new Cs(this),()=>{this.state.labels=e,this.exportedIdentifiers=t,this.inModule=s,this.scope=i,this.prodParam=a,this.classScope=l,this.expressionScope=c}}enterInitialScopes(){let n=0;this.inModule&&(n|=2),this.scope.enter(1),this.prodParam.enter(n)}checkDestructuringPrivate(n){let{privateKeyLoc:e}=n;e!==null&&this.expectPlugin("destructuringPrivate",e)}},lt=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},ut=class{constructor(n,e,t){this.type="",this.start=e,this.end=0,this.loc=new ct(t),n!=null&&n.options.ranges&&(this.range=[e,0]),n!=null&&n.filename&&(this.loc.filename=n.filename)}},zs=ut.prototype;zs.__clone=function(){let r=new ut(void 0,this.start,this.loc.start),n=Object.keys(this);for(let e=0,t=n.length;e<t;e++){let s=n[e];s!=="leadingComments"&&s!=="trailingComments"&&s!=="innerComments"&&(r[s]=this[s])}return r};function pl(r){return _e(r)}function _e(r){let{type:n,start:e,end:t,loc:s,range:i,extra:o,name:a}=r,l=Object.create(zs);return l.type=n,l.start=e,l.end=t,l.loc=s,l.range=i,l.extra=o,l.name=a,n==="Placeholder"&&(l.expectedNode=r.expectedNode),l}function ul(r){let{type:n,start:e,end:t,loc:s,range:i,extra:o}=r;if(n==="Placeholder")return pl(r);let a=Object.create(zs);return a.type=n,a.start=e,a.end=t,a.loc=s,a.range=i,r.raw!==void 0?a.raw=r.raw:a.extra=o,a.value=r.value,a}var Es=class extends Is{startNode(){let n=this.state.startLoc;return new ut(this,n.index,n)}startNodeAt(n){return new ut(this,n.index,n)}startNodeAtNode(n){return this.startNodeAt(n.loc.start)}finishNode(n,e){return this.finishNodeAt(n,e,this.state.lastTokEndLoc)}finishNodeAt(n,e,t){return n.type=e,n.end=t.index,n.loc.end=t,this.options.ranges&&(n.range[1]=t.index),this.options.attachComment&&this.processComment(n),n}resetStartLocation(n,e){n.start=e.index,n.loc.start=e,this.options.ranges&&(n.range[0]=e.index)}resetEndLocation(n,e=this.state.lastTokEndLoc){n.end=e.index,n.loc.end=e,this.options.ranges&&(n.range[1]=e.index)}resetStartLocationFromNode(n,e){this.resetStartLocation(n,e.loc.start)}},dl=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),L=Re`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:r})=>`Cannot overwrite reserved type ${r}.`,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:r,enumName:n})=>`Boolean enum members need to be initialized. Use either \`${r} = true,\` or \`${r} = false,\` in enum \`${n}\`.`,EnumDuplicateMemberName:({memberName:r,enumName:n})=>`Enum member names need to be unique, but the name \`${r}\` has already been used before in enum \`${n}\`.`,EnumInconsistentMemberValues:({enumName:r})=>`Enum \`${r}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:r,enumName:n})=>`Enum type \`${r}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${n}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:r})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${r}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:r,memberName:n,explicitType:e})=>`Enum \`${r}\` has type \`${e}\`, so the initializer of \`${n}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:r,memberName:n})=>`Symbol enum members cannot be initialized. Use \`${n},\` in enum \`${r}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:r,memberName:n})=>`The enum member initializer for \`${n}\` needs to be a literal (either a boolean, number, or string) in enum \`${r}\`.`,EnumInvalidMemberName:({enumName:r,memberName:n,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${n}\`, consider using \`${e}\`, in enum \`${r}\`.`,EnumNumberMemberNotInitialized:({enumName:r,memberName:n})=>`Number enum members need to be initialized, e.g. \`${n} = 1\` in enum \`${r}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:r})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${r}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:r})=>`Unexpected reserved type ${r}.`,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:r,suggestion:n})=>`\`declare export ${r}\` is not supported. Use \`${n}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function fl(r){return r.type==="DeclareExportAllDeclaration"||r.type==="DeclareExportDeclaration"&&(!r.declaration||r.declaration.type!=="TypeAlias"&&r.declaration.type!=="InterfaceDeclaration")}function Qr(r){return r.importKind==="type"||r.importKind==="typeof"}var ml={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function hl(r,n){let e=[],t=[];for(let s=0;s<r.length;s++)(n(r[s],s,r)?e:t).push(r[s]);return[e,t]}var bl=/\*?\s*@((?:no)?flow)\b/,gl=r=>class extends r{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return bs}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(e,t){e!==134&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(this.flowPragma===void 0){let t=bl.exec(e.value);if(t)if(t[1]==="flow")this.flowPragma="flow";else if(t[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){let t=this.state.inType;this.state.inType=!0,this.expect(e||14);let s=this.flowParseType();return this.state.inType=t,s}flowParsePredicate(){let e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>t.index+1&&this.raise(L.UnexpectedSpaceBetweenModuloChecks,t),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let t=null,s=null;return this.match(54)?(this.state.inType=e,s=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(s=this.flowParsePredicate())),[t,s]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let t=e.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(10);let o=this.flowParseFunctionTypeParams();return s.params=o.params,s.rest=o.rest,s.this=o._this,this.expect(11),[s.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),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.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(L.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,t);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(134)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let t=e.body=this.startNode(),s=t.body=[];for(this.expect(5);!this.match(8);){let a=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(L.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(a)):(this.expectContextual(125,L.UnsupportedStatementInDeclareModule),a=this.flowParseDeclare(a,!0)),s.push(a)}this.scope.exit(),this.expect(8),this.finishNode(t,"BlockStatement");let i=null,o=!1;return s.forEach(a=>{fl(a)?(i==="CommonJS"&&this.raise(L.AmbiguousDeclareModuleKind,a),i="ES"):a.type==="DeclareModuleExports"&&(o&&this.raise(L.DuplicateDeclareModuleExports,a),i==="ES"&&this.raise(L.AmbiguousDeclareModuleKind,a),i="CommonJS",o=!0)}),e.kind=i||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!t){let s=this.state.value;throw this.raise(L.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:s,suggestion:ml[s]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let t=this.flowParseTypeAlias(e);return t.type="DeclareTypeAlias",t}flowParseDeclareOpaqueType(e){this.next();let t=this.flowParseOpaqueType(e,!0);return t.type="DeclareOpaqueType",t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!t&&this.eat(12));if(t){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(L.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,t,s){dl.has(e)&&this.raise(s?L.AssignReservedType:L.UnexpectedReservedType,t,{reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let t=this.state.startLoc,s=this.startNode(),i=this.flowParseVariance(),o=this.flowParseTypeAnnotatableIdentifier();return s.name=o.name,s.variance=i,s.bound=o.typeAnnotation,this.match(29)?(this.eat(29),s.default=this.flowParseType()):e&&this.raise(L.MissingTypeParamDefault,t),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let s=!1;do{let i=this.flowParseTypeParameter(s);t.params.push(i),i.default&&(s=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=s,this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,s){return e.static=t,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=s,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){let 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:o}){let a=this.state.inType;this.state.inType=!0;let l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];let c,p,u=!1;for(t&&this.match(6)?(this.expect(6),c=9,p=!0):(this.expect(5),c=8,p=!1),l.exact=p;!this.match(c);){let m=!1,d=null,g=null,h=this.startNode();if(i&&this.isContextual(118)){let P=this.lookahead();P.type!==14&&P.type!==17&&(this.next(),d=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let P=this.lookahead();P.type!==14&&P.type!==17&&(this.next(),m=!0)}let y=this.flowParseVariance();if(this.eat(0))d!=null&&this.unexpected(d),this.eat(0)?(y&&this.unexpected(y.loc.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(h,m))):l.indexers.push(this.flowParseObjectTypeIndexer(h,m,y));else if(this.match(10)||this.match(47))d!=null&&this.unexpected(d),y&&this.unexpected(y.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(h,m));else{let P="init";if(this.isContextual(99)||this.isContextual(104)){let x=this.lookahead();ii(x.type)&&(P=this.state.value,this.next())}let E=this.flowParseObjectTypeProperty(h,m,d,y,P,s,o??!p);E===null?(u=!0,g=this.state.lastTokStartLoc):l.properties.push(E)}this.flowObjectTypeSemicolon(),g&&!this.match(8)&&!this.match(9)&&this.raise(L.UnexpectedExplicitInexactInObject,g)}this.expect(c),s&&(l.inexact=u);let f=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=a,f}flowParseObjectTypeProperty(e,t,s,i,o,a,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(a?l||this.raise(L.InexactInsideExact,this.state.lastTokStartLoc):this.raise(L.InexactInsideNonObject,this.state.lastTokStartLoc),i&&this.raise(L.InexactVariance,i),null):(a||this.raise(L.UnexpectedSpreadType,this.state.lastTokStartLoc),s!=null&&this.unexpected(s),i&&this.raise(L.SpreadVariance,i),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=s!=null,e.kind=o;let c=!1;return this.match(47)||this.match(10)?(e.method=!0,s!=null&&this.unexpected(s),i&&this.unexpected(i.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(o==="get"||o==="set")&&this.flowCheckGetterSetterParams(e),!a&&e.key.name==="constructor"&&e.value.this&&this.raise(L.ThisParamBannedInConstructor,e.value.this)):(o!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(c=!0),e.value=this.flowParseTypeInitialiser(),e.variance=i),e.optional=c,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let t=e.kind==="get"?0:1,s=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?L.GetterMayNotHaveThisParam:L.SetterMayNotHaveThisParam,e.value.this),s!==t&&this.raise(e.kind==="get"?b.BadGetterArity:b.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(b.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){var s;(s=e)!=null||(e=this.state.startLoc);let i=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let o=this.startNodeAt(e);o.qualification=i,o.id=this.flowParseRestrictedIdentifier(!0),i=this.finishNode(o,"QualifiedTypeIdentifier")}return i}flowParseGenericType(e,t){let s=this.startNodeAt(e);return s.typeParameters=null,s.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(s.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(s,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,"TupleTypeAnnotation")}flowParseFunctionTypeParam(e){let t=null,s=!1,i=null,o=this.startNode(),a=this.lookahead(),l=this.state.type===78;return a.type===14||a.type===17?(l&&!e&&this.raise(L.ThisParamMustBeFirst,o),t=this.parseIdentifier(l),this.eat(17)&&(s=!0,l&&this.raise(L.ThisParamMayNotBeOptional,o)),i=this.flowParseTypeInitialiser()):i=this.flowParseType(),o.name=t,o.optional=s,o.typeAnnotation=i,this.finishNode(o,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){let t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let t=null,s=null;for(this.match(78)&&(s=this.flowParseFunctionTypeParam(!0),s.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this: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(){let e=this.state.startLoc,t=this.startNode(),s,i,o=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,i=this.flowParseTupleType(),this.state.noAnonFunctionType=a,i;case 47:{let l=this.startNode();return l.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),s=this.flowParseFunctionTypeParams(),l.params=s.params,l.rest=s.rest,l.this=s._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),this.finishNode(l,"FunctionTypeAnnotation")}case 10:{let l=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(B(this.state.type)||this.match(78)){let c=this.lookahead().type;o=c!==17&&c!==14}else o=!0;if(o){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),i;this.eat(12)}return i?s=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):s=this.flowParseFunctionTypeParams(),l.params=s.params,l.rest=s.rest,l.this=s._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),l.typeParameters=null,this.finishNode(l,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return t.value=this.match(85),this.next(),this.finishNode(t,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",t);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",t);throw this.raise(L.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(t,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(t,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(t,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(t,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(Bs(this.state.type)){let l=$e(this.state.type);return this.next(),super.createIdentifier(t,l)}else if(B(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,t,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,t=this.flowParsePrimaryType(),s=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let i=this.startNodeAt(e),o=this.eat(18);s=s||o,this.expect(0),!o&&this.match(3)?(i.elementType=t,this.next(),t=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=t,i.indexType=this.flowParseType(),this.expect(3),s?(i.optional=o,t=this.finishNode(i,"OptionalIndexedAccessType")):t=this.finishNode(i,"IndexedAccessType"))}return t}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return e.types.length===1?t:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){let e=this.startNode();this.eat(43);let t=this.flowParseIntersectionType();for(e.types=[t];this.eat(43);)e.types.push(this.flowParseIntersectionType());return e.types.length===1?t:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){let e=this.state.inType;this.state.inType=!0;let t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}else return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){let t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),this.state.value==="+"?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,t,s=!1){if(t){this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,s));return}super.parseFunctionBody(e,!1,s)}parseFunctionBodyAndFinish(e,t,s=!1){if(this.match(14)){let i=this.startNode();[i.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=i.typeAnnotation?this.finishNode(i,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,t,s)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let s=this.lookahead();if(we(s.type)){let i=this.startNode();return this.next(),this.flowParseInterface(i)}}else if(this.isContextual(126)){let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}let t=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(t)&&(this.flowPragma=null),t}parseExpressionStatement(e,t,s){if(t.type==="Identifier"){if(t.name==="declare"){if(this.match(80)||B(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(B(this.state.type)){if(t.name==="interface")return this.flowParseInterface(e);if(t.name==="type")return this.flowParseTypeAlias(e);if(t.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,t,s)}shouldParseExportDeclaration(){let{type:e}=this.state;return e===126||Kr(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return e===126||Kr(e)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,s){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let f=this.lookaheadCharCode();if(f===44||f===61||f===58||f===41)return this.setOptionalParametersError(s),e}this.expect(17);let i=this.state.clone(),o=this.state.noArrowAt,a=this.startNodeAt(t),{consequent:l,failed:c}=this.tryParseConditionalConsequent(),[p,u]=this.getArrowLikeExpressions(l);if(c||u.length>0){let f=[...o];if(u.length>0){this.state=i,this.state.noArrowAt=f;for(let m=0;m<u.length;m++)f.push(u[m].start);({consequent:l,failed:c}=this.tryParseConditionalConsequent()),[p,u]=this.getArrowLikeExpressions(l)}c&&p.length>1&&this.raise(L.AmbiguousConditionalArrow,i.startLoc),c&&p.length===1&&(this.state=i,f.push(p[0].start),this.state.noArrowAt=f,{consequent:l,failed:c}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=o,this.expect(14),a.test=e,a.consequent=l,a.alternate=this.forwardNoArrowParamsConversionAt(a,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(a,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){let s=[e],i=[];for(;s.length!==0;){let o=s.pop();o.type==="ArrowFunctionExpression"&&o.body.type!=="BlockStatement"?(o.typeParameters||!o.returnType?this.finishArrowValidation(o):i.push(o),s.push(o.body)):o.type==="ConditionalExpression"&&(s.push(o.consequent),s.push(o.alternate))}return t?(i.forEach(o=>this.finishArrowValidation(o)),[i,[]]):hl(i,o=>o.params.every(a=>this.isAssignable(a,!0)))}finishArrowValidation(e){var t;this.toAssignableList(e.params,(t=e.extra)==null?void 0:t.trailingCommaLoc,!1),this.scope.enter(6),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){let s=super.parseParenItem(e,t);if(this.eat(17)&&(s.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(t);return i.expression=s,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return s}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";let t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}else if(this.isContextual(131)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}else if(this.isContextual(129)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseInterface(t)}else if(this.isContextual(126)){e.exportKind="value";let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:t}=this.state,s=super.maybeParseExportNamespaceSpecifier(e);return s&&e.exportKind==="type"&&this.unexpected(t),s}parseClassId(e,t,s){super.parseClassId(e,t,s),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,s){let{startLoc:i}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,s),t.declare&&(t.type!=="ClassProperty"&&t.type!=="ClassPrivateProperty"&&t.type!=="PropertyDefinition"?this.raise(L.DeclareClassElement,i):t.value&&this.raise(L.DeclareClassFieldInitializer,t.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),t="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(b.InvalidIdentifier,this.state.curPosition(),{identifierName:t}),this.finishToken(132,t)}getTokenFromCode(e){let t=this.input.charCodeAt(this.state.pos+1);e===123&&t===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?t===46?this.finishOp(18,2):this.finishOp(17,1):Ya(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,t){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){!t&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,s){for(let i=0;i<e.length;i++){let o=e[i];o?.type==="TypeCastExpression"&&(e[i]=this.typeCastToParameter(o))}super.toAssignableList(e,t,s)}toReferencedList(e,t){for(let i=0;i<e.length;i++){var s;let o=e[i];o&&o.type==="TypeCastExpression"&&!((s=o.extra)!=null&&s.parenthesized)&&(e.length>1||!t)&&this.raise(L.TypeCastInPattern,o.typeAnnotation)}return e}parseArrayLike(e,t,s,i){let o=super.parseArrayLike(e,t,s,i);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(o.elements),o}isValidLVal(e,t,s){return e==="TypeCastExpression"||super.isValidLVal(e,t,s)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,s,i,o,a){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,s,i,o,a),t.params&&o){let l=t.params;l.length>0&&this.isThisParam(l[0])&&this.raise(L.ThisParamBannedInConstructor,t)}else if(t.type==="MethodDefinition"&&o&&t.value.params){let l=t.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(L.ThisParamBannedInConstructor,t)}}pushClassPrivateMethod(e,t,s,i){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,s,i)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let t=e.implements=[];do{let s=this.startNode();s.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?s.typeParameters=this.flowParseTypeParameterInstantiation():s.typeParameters=null,t.push(this.finishNode(s,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let t=this.getObjectOrClassMethodParams(e);if(t.length>0){let s=t[0];this.isThisParam(s)&&e.kind==="get"?this.raise(L.GetterMayNotHaveThisParam,s):this.isThisParam(s)&&this.raise(L.SetterMayNotHaveThisParam,s)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,s,i,o,a,l){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let c;this.match(47)&&!a&&(c=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let p=super.parseObjPropValue(e,t,s,i,o,a,l);return c&&((p.value||p).typeParameters=c),p}parseFunctionParamType(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(L.PatternIsOptional,e),this.isThisParam(e)&&this.raise(L.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(L.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(L.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,t){let s=super.parseMaybeDefault(e,t);return s.type==="AssignmentPattern"&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(L.TypeBeforeInitializer,s.typeAnnotation),s}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(L.ImportReflectionHasImportType,e.specifiers[0].loc.start)}parseImportSpecifierLocal(e,t,s){t.local=Qr(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(130)){if(!e)return!0;let t=this.lookaheadCharCode();return t===123||t===42}return!e&&this.isContextual(87)}applyImportPhase(e,t,s,i){if(super.applyImportPhase(e,t,s,i),t){if(!s&&this.match(65))return;e.exportKind=s==="type"?s:"value"}else s==="type"&&this.match(55)&&this.unexpected(),e.importKind=s==="type"||s==="typeof"?s:"value"}parseImportSpecifier(e,t,s,i,o){let a=e.imported,l=null;a.type==="Identifier"&&(a.name==="type"?l="type":a.name==="typeof"&&(l="typeof"));let c=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let u=this.parseIdentifier(!0);l!==null&&!we(this.state.type)?(e.imported=u,e.importKind=l,e.local=_e(u)):(e.imported=a,e.importKind=null,e.local=this.parseIdentifier())}else{if(l!==null&&we(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=l;else{if(t)throw this.raise(b.ImportBindingIsString,e,{importName:a.value});e.imported=a,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(c=!0,e.local=_e(e.imported))}let p=Qr(e);return s&&p&&this.raise(L.ImportTypeShorthandOnlyInPureImport,e),(s||p)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),c&&!s&&!p&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(e,t){let s=e.kind;s!=="get"&&s!=="set"&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){let s=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=s}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var s;let i=null,o;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(i=this.state.clone(),o=this.tryParse(()=>super.parseMaybeAssign(e,t),i),!o.error)return o.node;let{context:c}=this.state,p=c[c.length-1];(p===V.j_oTag||p===V.j_expr)&&c.pop()}if((s=o)!=null&&s.error||this.match(47)){var a,l;i=i||this.state.clone();let c,p=this.tryParse(f=>{var m;c=this.flowParseTypeParameterDeclaration();let d=this.forwardNoArrowParamsConversionAt(c,()=>{let h=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(h,c),h});(m=d.extra)!=null&&m.parenthesized&&f();let g=this.maybeUnwrapTypeCastExpression(d);return g.type!=="ArrowFunctionExpression"&&f(),g.typeParameters=c,this.resetStartLocationFromNode(g,c),d},i),u=null;if(p.node&&this.maybeUnwrapTypeCastExpression(p.node).type==="ArrowFunctionExpression"){if(!p.error&&!p.aborted)return p.node.async&&this.raise(L.UnexpectedTypeParameterBeforeAsyncArrowFunction,c),p.node;u=p.node}if((a=o)!=null&&a.node)return this.state=o.failState,o.node;if(u)return this.state=p.failState,u;throw(l=o)!=null&&l.thrown?o.error:p.thrown?p.error:this.raise(L.UnexpectedTokenAfterTypeParameter,c)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(()=>{let s=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let i=this.startNode();return[i.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=s,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),i});if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,s,i=!0){if(!(s&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start)))){for(let o=0;o<e.params.length;o++)this.isThisParam(e.params[o])&&o>0&&this.raise(L.ThisParamMustBeFirst,e.params[o]);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(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.includes(t.index)){this.next();let i=this.startNodeAt(t);i.callee=e,i.arguments=super.parseCallExpressionArguments(11),e=this.finishNode(i,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){let i=this.state.clone(),o=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(t)||l(),i);if(!o.error&&!o.aborted)return o.node;let a=this.tryParse(()=>super.parseSubscripts(e,t,s),i);if(a.node&&!a.error)return a.node;if(o.node)return this.state=o.failState,o.node;if(a.node)return this.state=a.failState,a.node;throw o.error||a.error}return super.parseSubscripts(e,t,s)}parseSubscript(e,t,s,i){if(this.match(18)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,s)return i.stop=!0,e;this.next();let o=this.startNodeAt(t);return o.callee=e,o.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),o.arguments=this.parseCallExpressionArguments(11),o.optional=!0,this.finishCallExpression(o,!0)}else if(!s&&this.shouldParseTypes()&&this.match(47)){let o=this.startNodeAt(t);o.callee=e;let a=this.tryParse(()=>(o.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),o.arguments=super.parseCallExpressionArguments(11),i.optionalChainMember&&(o.optional=!1),this.finishCallExpression(o,i.optionalChainMember)));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(e,t,s,i)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(47)&&(t=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){let t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),!!this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){let t=this.input.charCodeAt(this.state.pos+1);if(e===42&&t===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(e===124&&t===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,t){let s=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(L.UnterminatedFlowComment,this.state.curPosition()),s}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(L.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:e}=this.state,t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;let s=this.input.charCodeAt(t+e),i=this.input.charCodeAt(t+e+1);return s===58&&i===58?t+2:this.input.slice(t+e,t+e+12)==="flow-include"?t+12:s===58&&i!==58?t:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(b.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:s}){this.raise(L.EnumBooleanMemberNotInitialized,e,{memberName:s,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?t.explicitType==="symbol"?L.EnumInvalidMemberInitializerSymbolType:L.EnumInvalidMemberInitializerPrimaryType:L.EnumInvalidMemberInitializerUnknownType,e,t)}flowEnumErrorNumberMemberNotInitialized(e,t){this.raise(L.EnumNumberMemberNotInitialized,e,t)}flowEnumErrorStringMemberInconsistentlyInitialized(e,t){this.raise(L.EnumStringMemberInconsistentlyInitialized,e,t)}flowEnumMemberInit(){let e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let s=this.parseNumericLiteral(this.state.value);return t()?{type:"number",loc:s.loc.start,value:s}:{type:"invalid",loc:e}}case 134:{let s=this.parseStringLiteral(this.state.value);return t()?{type:"string",loc:s.loc.start,value:s}:{type:"invalid",loc:e}}case 85:case 86:{let s=this.parseBooleanLiteral(this.match(85));return t()?{type:"boolean",loc:s.loc.start,value:s}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,t=this.parseIdentifier(!0),s=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:t,init:s}}flowEnumCheckExplicitTypeMismatch(e,t,s){let{explicitType:i}=t;i!==null&&i!==s&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){let s=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},o=!1;for(;!this.match(8);){if(this.eat(21)){o=!0;break}let a=this.startNode(),{id:l,init:c}=this.flowEnumMemberRaw(),p=l.name;if(p==="")continue;/^[a-z]/.test(p)&&this.raise(L.EnumInvalidMemberName,l,{memberName:p,suggestion:p[0].toUpperCase()+p.slice(1),enumName:e}),s.has(p)&&this.raise(L.EnumDuplicateMemberName,l,{memberName:p,enumName:e}),s.add(p);let u={enumName:e,explicitType:t,memberName:p};switch(a.id=l,c.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(c.loc,u,"boolean"),a.init=c.value,i.booleanMembers.push(this.finishNode(a,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(c.loc,u,"number"),a.init=c.value,i.numberMembers.push(this.finishNode(a,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(c.loc,u,"string"),a.init=c.value,i.stringMembers.push(this.finishNode(a,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(c.loc,u);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(c.loc,u);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(c.loc,u);break;default:i.defaultedMembers.push(this.finishNode(a,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:i,hasUnknownMembers:o}}flowEnumStringMembers(e,t,{enumName:s}){if(e.length===0)return t;if(t.length===0)return e;if(t.length>e.length){for(let i of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:s});return t}else{for(let i of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:s});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!B(this.state.type))throw this.raise(L.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:t}=this.state;return this.next(),t!=="boolean"&&t!=="number"&&t!=="string"&&t!=="symbol"&&this.raise(L.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){let s=t.name,i=t.loc.start,o=this.flowEnumParseExplicitType({enumName:s});this.expect(5);let{members:a,hasUnknownMembers:l}=this.flowEnumMembers({enumName:s,explicitType:o});switch(e.hasUnknownMembers=l,o){case"boolean":return e.explicitType=!0,e.members=a.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=a.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=a.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let c=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let p=a.booleanMembers.length,u=a.numberMembers.length,f=a.stringMembers.length,m=a.defaultedMembers.length;if(!p&&!u&&!f&&!m)return c();if(!p&&!u)return e.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!u&&!f&&p>=m){for(let d of a.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(d.loc.start,{enumName:s,memberName:d.id.name});return e.members=a.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!p&&!f&&u>=m){for(let d of a.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(d.loc.start,{enumName:s,memberName:d.id.name});return e.members=a.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(L.EnumInconsistentMemberValues,i,{enumName:s}),c()}}}flowParseEnumDeclaration(e){let t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let t=this.input.charCodeAt(e+1);return t!==60&&t!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},yl={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},Ke=Re`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:r})=>`Expected corresponding JSX closing tag for <${r}>.`,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:r,HTMLEntity:n})=>`Unexpected token \`${r}\`. Did you mean \`${n}\` or \`{'${r}'}\`?`,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 ze(r){return r?r.type==="JSXOpeningFragment"||r.type==="JSXClosingFragment":!1}function it(r){if(r.type==="JSXIdentifier")return r.name;if(r.type==="JSXNamespacedName")return r.namespace.name+":"+r.name.name;if(r.type==="JSXMemberExpression")return it(r.object)+"."+it(r.property);throw new Error("Node had unexpected type: "+r.type)}var vl=r=>class extends r{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Ke.UnterminatedJsxContent,this.state.startLoc);let s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:if(this.state.pos===this.state.start){s===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(s);return}e+=this.input.slice(t,this.state.pos),this.finishToken(142,e);return;case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;case 62:case 125:default:at(s)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let t=this.input.charCodeAt(this.state.pos),s;return++this.state.pos,t===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,s=e?`
6
+ `);case 114:return a("\r");case 120:{let c;return{code:c,pos:n}=xs(r,n,e,t,2,!1,o,i),a(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:n}=mi(r,n,e,t,o,i),a(c===null?null:String.fromCodePoint(c))}case 116:return a(" ");case 98:return a("\b");case 118:return a("\v");case 102:return a("\f");case 13:r.charCodeAt(n)===10&&++n;case 10:e=n,++t;case 8232:case 8233:return a("");case 56:case 57:if(s)return a(null);i.strictNumericEscape(n-1,e,t);default:if(l>=48&&l<=55){let c=n-1,u=/^[0-7]+/.exec(r.slice(c,n+2))[0],f=parseInt(u,8);f>255&&(u=u.slice(0,-1),f=parseInt(u,8)),n+=u.length-1;let m=r.charCodeAt(n);if(u!=="0"||m===56||m===57){if(s)return a(null);i.strictNumericEscape(c,e,t)}return a(String.fromCharCode(f))}return a(String.fromCharCode(l))}}function xs(r,n,e,t,s,i,o,a){let l=n,c;return{n:c,pos:n}=fi(r,n,e,t,16,s,i,!1,a,!o),c===null&&(o?a.invalidEscapeSequence(l,e,t):n=l-1),{code:c,pos:n}}function fi(r,n,e,t,s,i,o,a,l,c){let p=n,u=s===16?Jr.hex:Jr.decBinOct,f=s===16?dn.hex:s===10?dn.dec:s===8?dn.oct:dn.bin,m=!1,d=0;for(let g=0,h=i??1/0;g<h;++g){let y=r.charCodeAt(n),P;if(y===95&&a!=="bail"){let E=r.charCodeAt(n-1),x=r.charCodeAt(n+1);if(a){if(Number.isNaN(x)||!f(x)||u.has(E)||u.has(x)){if(c)return{n:null,pos:n};l.unexpectedNumericSeparator(n,e,t)}}else{if(c)return{n:null,pos:n};l.numericSeparatorInEscapeSequence(n,e,t)}++n;continue}if(y>=97?P=y-97+10:y>=65?P=y-65+10:sl(y)?P=y-48:P=1/0,P>=s){if(P<=9&&c)return{n:null,pos:n};if(P<=9&&l.invalidDigit(n,e,t,s))P=0;else if(o)P=0,m=!0;else break}++n,d=d*s+P}return n===p||i!=null&&n-p!==i||m?{n:null,pos:n}:{n:d,pos:n}}function mi(r,n,e,t,s,i){let o=r.charCodeAt(n),a;if(o===123){if(++n,{code:a,pos:n}=xs(r,n,e,t,r.indexOf("}",n)-n,!0,s,i),++n,a!==null&&a>1114111)if(s)i.invalidCodePoint(n,e,t);else return{code:null,pos:n}}else({code:a,pos:n}=xs(r,n,e,t,4,!1,s,i));return{code:a,pos:n}}function Dt(r,n,e){return new ke(e,r-n,r)}var ol=new Set([103,109,115,105,121,117,100,118]),Ae=class{constructor(n){let e=n.startIndex||0;this.type=n.type,this.value=n.value,this.start=e+n.start,this.end=e+n.end,this.loc=new ct(n.startLoc,n.endLoc)}},Ps=class extends ys{constructor(n,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(t,s,i,o)=>this.options.errorRecovery?(this.raise(b.InvalidDigit,Dt(t,s,i),{radix:o}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(b.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(b.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(b.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(b.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(t,s,i)=>{this.recordStrictModeErrors(b.StrictNumericEscape,Dt(t,s,i))},unterminated:(t,s,i)=>{throw this.raise(b.UnterminatedString,Dt(t-1,s,i))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(b.StrictNumericEscape),unterminated:(t,s,i)=>{throw this.raise(b.UnterminatedTemplate,Dt(t,s,i))}}),this.state=new vs,this.state.init(n),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(n){this.tokens.length=this.state.tokensLength,this.tokens.push(n),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Ae(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(n){return this.match(n)?(this.next(),!0):!1}match(n){return this.state.type===n}createLookaheadState(n){return{pos:n.pos,value:null,type:n.type,start:n.start,end:n.end,context:[this.curContext()],inType:n.inType,startLoc:n.startLoc,lastTokEndLoc:n.lastTokEndLoc,curLine:n.curLine,lineStart:n.lineStart,curPosition:n.curPosition}}lookahead(){let n=this.state;this.state=this.createLookaheadState(n),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=n,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(n){return cs.lastIndex=n,cs.test(this.input)?cs.lastIndex:n}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(n){return ps.lastIndex=n,ps.test(this.input)?ps.lastIndex:n}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(n){let e=this.input.charCodeAt(n);if((e&64512)===55296&&++n<this.input.length){let t=this.input.charCodeAt(n);(t&64512)===56320&&(e=65536+((e&1023)<<10)+(t&1023))}return e}setStrict(n){this.state.strict=n,n&&(this.state.strictErrors.forEach(([e,t])=>this.raise(e,t)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(n){let e;this.isLookahead||(e=this.state.curPosition());let t=this.state.pos,s=this.input.indexOf(n,t+2);if(s===-1)throw this.raise(b.UnterminatedComment,this.state.curPosition());for(this.state.pos=s+n.length,un.lastIndex=t+2;un.test(this.input)&&un.lastIndex<=s;)++this.state.curLine,this.state.lineStart=un.lastIndex;if(this.isLookahead)return;let i={type:"CommentBlock",value:this.input.slice(t+2,s),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(s+n.length),loc:new ct(e,this.state.curPosition())};return this.options.tokens&&this.pushToken(i),i}skipLineComment(n){let e=this.state.pos,t;this.isLookahead||(t=this.state.curPosition());let s=this.input.charCodeAt(this.state.pos+=n);if(this.state.pos<this.length)for(;!at(s)&&++this.state.pos<this.length;)s=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let i=this.state.pos,a={type:"CommentLine",value:this.input.slice(e+n,i),start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(i),loc:new ct(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(a),a}skipSpace(){let n=this.state.pos,e=[];e:for(;this.state.pos<this.length;){let t=this.input.charCodeAt(this.state.pos);switch(t){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let s=this.skipBlockComment("*/");s!==void 0&&(this.addComment(s),this.options.attachComment&&e.push(s));break}case 47:{let s=this.skipLineComment(2);s!==void 0&&(this.addComment(s),this.options.attachComment&&e.push(s));break}default:break e}break;default:if(nl(t))++this.state.pos;else if(t===45&&!this.inModule&&this.options.annexB){let s=this.state.pos;if(this.input.charCodeAt(s+1)===45&&this.input.charCodeAt(s+2)===62&&(n===0||this.state.lineStart>n)){let i=this.skipLineComment(3);i!==void 0&&(this.addComment(i),this.options.attachComment&&e.push(i))}else break e}else if(t===60&&!this.inModule&&this.options.annexB){let s=this.state.pos;if(this.input.charCodeAt(s+1)===33&&this.input.charCodeAt(s+2)===45&&this.input.charCodeAt(s+3)===45){let i=this.skipLineComment(4);i!==void 0&&(this.addComment(i),this.options.attachComment&&e.push(i))}else break e}else break e}}if(e.length>0){let t=this.state.pos,s={start:this.sourceToOffsetPos(n),end:this.sourceToOffsetPos(t),comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(s)}}finishToken(n,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let t=this.state.type;this.state.type=n,this.state.value=e,this.isLookahead||this.updateContext(t)}replaceToken(n){this.state.type=n,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let n=this.state.pos+1,e=this.codePointAtPos(n);if(e>=48&&e<=57)throw this.raise(b.UnexpectedDigitAfterHash,this.state.curPosition());if(e===123||e===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(e===123?b.RecordExpressionHashIncorrectStartSyntaxType:b.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else Ue(e)?(++this.state.pos,this.finishToken(139,this.readWord1(e))):e===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let n=this.input.charCodeAt(this.state.pos+1);if(n>=48&&n<=57){this.readNumber(!0);return}n===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let n=this.input.charCodeAt(this.state.pos+1);if(n!==33)return!1;let e=this.state.pos;for(this.state.pos+=1;!at(n)&&++this.state.pos<this.length;)n=this.input.charCodeAt(this.state.pos);let t=this.input.slice(e+2,this.state.pos);return this.finishToken(28,t),!0}readToken_mult_modulo(n){let e=n===42?55:54,t=1,s=this.input.charCodeAt(this.state.pos+1);n===42&&s===42&&(t++,s=this.input.charCodeAt(this.state.pos+2),e=57),s===61&&!this.state.inType&&(t++,e=n===37?33:30),this.finishOp(e,t)}readToken_pipe_amp(n){let e=this.input.charCodeAt(this.state.pos+1);if(e===n){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(n===124?41:42,2);return}if(n===124){if(e===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&e===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(b.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&e===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(b.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(e===61){this.finishOp(30,2);return}this.finishOp(n===124?43:45,1)}readToken_caret(){let n=this.input.charCodeAt(this.state.pos+1);n===61&&!this.state.inType?this.finishOp(32,2):n===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(n){let e=this.input.charCodeAt(this.state.pos+1);if(e===n){this.finishOp(34,2);return}e===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:n}=this.state,e=this.input.charCodeAt(n+1);if(e===60){if(this.input.charCodeAt(n+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(e===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:n}=this.state,e=this.input.charCodeAt(n+1);if(e===62){let t=this.input.charCodeAt(n+2)===62?3:2;if(this.input.charCodeAt(n+t)===61){this.finishOp(30,t+1);return}this.finishOp(52,t);return}if(e===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(n){let e=this.input.charCodeAt(this.state.pos+1);if(e===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(n===61&&e===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(n===61?29:35,1)}readToken_question(){let n=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);n===63?e===61?this.finishOp(30,3):this.finishOp(40,2):n===46&&!(e>=48&&e<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(n){switch(n){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(b.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(b.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(n);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(n);return;case 124:case 38:this.readToken_pipe_amp(n);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(n);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(n);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(Ue(n)){this.readWord(n);return}}throw this.raise(b.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(n)})}finishOp(n,e){let t=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(n,t)}readRegexp(){let n=this.state.startLoc,e=this.state.start+1,t,s,{pos:i}=this.state;for(;;++i){if(i>=this.length)throw this.raise(b.UnterminatedRegExp,se(n,1));let c=this.input.charCodeAt(i);if(at(c))throw this.raise(b.UnterminatedRegExp,se(n,1));if(t)t=!1;else{if(c===91)s=!0;else if(c===93&&s)s=!1;else if(c===47&&!s)break;t=c===92}}let o=this.input.slice(e,i);++i;let a="",l=()=>se(n,i+2-e);for(;i<this.length;){let c=this.codePointAtPos(i),p=String.fromCharCode(c);if(ol.has(c))c===118?a.includes("u")&&this.raise(b.IncompatibleRegExpUVFlags,l()):c===117&&a.includes("v")&&this.raise(b.IncompatibleRegExpUVFlags,l()),a.includes(p)&&this.raise(b.DuplicateRegExpFlags,l());else if(ot(c)||c===92)this.raise(b.MalformedRegExpFlags,l());else break;++i,a+=p}this.state.pos=i,this.finishToken(138,{pattern:o,flags:a})}readInt(n,e,t=!1,s=!0){let{n:i,pos:o}=fi(this.input,this.state.pos,this.state.lineStart,this.state.curLine,n,e,t,s,this.errorHandlers_readInt,!1);return this.state.pos=o,i}readRadixNumber(n){let e=this.state.pos,t=this.state.curPosition(),s=!1;this.state.pos+=2;let i=this.readInt(n);i==null&&this.raise(b.InvalidDigit,se(t,2),{radix:n});let o=this.input.charCodeAt(this.state.pos);if(o===110)++this.state.pos,s=!0;else if(o===109)throw this.raise(b.InvalidDecimal,t);if(Ue(this.codePointAtPos(this.state.pos)))throw this.raise(b.NumberIdentifier,this.state.curPosition());if(s){let a=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,a);return}this.finishToken(135,i)}readNumber(n){let e=this.state.pos,t=this.state.curPosition(),s=!1,i=!1,o=!1,a=!1;!n&&this.readInt(10)===null&&this.raise(b.InvalidNumber,this.state.curPosition());let l=this.state.pos-e>=2&&this.input.charCodeAt(e)===48;if(l){let m=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(b.StrictOctalLiteral,t),!this.state.strict){let d=m.indexOf("_");d>0&&this.raise(b.ZeroDigitNumericSeparator,se(t,d))}a=l&&!/[89]/.test(m)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!a&&(++this.state.pos,this.readInt(10),s=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!a&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(b.InvalidOrMissingExponent,t),s=!0,o=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((s||l)&&this.raise(b.InvalidBigIntLiteral,t),++this.state.pos,i=!0),c===109){this.expectPlugin("decimal",this.state.curPosition()),(o||l)&&this.raise(b.InvalidDecimal,t),++this.state.pos;var p=!0}if(Ue(this.codePointAtPos(this.state.pos)))throw this.raise(b.NumberIdentifier,this.state.curPosition());let u=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(i){this.finishToken(136,u);return}if(p){this.finishToken(137,u);return}let f=a?parseInt(u,8):parseFloat(u);this.finishToken(135,f)}readCodePoint(n){let{code:e,pos:t}=mi(this.input,this.state.pos,this.state.lineStart,this.state.curLine,n,this.errorHandlers_readCodePoint);return this.state.pos=t,e}readString(n){let{str:e,pos:t,curLine:s,lineStart:i}=Yr(n===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=t+1,this.state.lineStart=i,this.state.curLine=s,this.finishToken(134,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let n=this.input[this.state.pos],{str:e,firstInvalidLoc:t,pos:s,curLine:i,lineStart:o}=Yr("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=s+1,this.state.lineStart=o,this.state.curLine=i,t&&(this.state.firstInvalidTemplateEscapePos=new ke(t.curLine,t.pos-t.lineStart,this.sourceToOffsetPos(t.pos))),this.input.codePointAt(s)===96?this.finishToken(24,t?null:n+e+"`"):(this.state.pos++,this.finishToken(25,t?null:n+e+"${"))}recordStrictModeErrors(n,e){let t=e.index;this.state.strict&&!this.state.strictErrors.has(t)?this.raise(n,e):this.state.strictErrors.set(t,[n,e])}readWord1(n){this.state.containsEsc=!1;let e="",t=this.state.pos,s=this.state.pos;for(n!==void 0&&(this.state.pos+=n<=65535?1:2);this.state.pos<this.length;){let i=this.codePointAtPos(this.state.pos);if(ot(i))this.state.pos+=i<=65535?1:2;else if(i===92){this.state.containsEsc=!0,e+=this.input.slice(s,this.state.pos);let o=this.state.curPosition(),a=this.state.pos===t?Ue:ot;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(b.MissingUnicodeEscape,this.state.curPosition()),s=this.state.pos-1;continue}++this.state.pos;let l=this.readCodePoint(!0);l!==null&&(a(l)||this.raise(b.EscapedCharNotAnIdentifier,o),e+=String.fromCodePoint(l)),s=this.state.pos}else break}return e+this.input.slice(s,this.state.pos)}readWord(n){let e=this.readWord1(n),t=Ls.get(e);t!==void 0?this.finishToken(t,$e(t)):this.finishToken(132,e)}checkKeywordEscapes(){let{type:n}=this.state;_s(n)&&this.state.containsEsc&&this.raise(b.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:$e(n)})}raise(n,e,t={}){let s=e instanceof ke?e:e.loc.start,i=n(s,t);if(!this.options.errorRecovery)throw i;return this.isLookahead||this.state.errors.push(i),i}raiseOverwrite(n,e,t={}){let s=e instanceof ke?e:e.loc.start,i=s.index,o=this.state.errors;for(let a=o.length-1;a>=0;a--){let l=o[a];if(l.loc.index===i)return o[a]=n(s,t);if(l.loc.index<i)break}return this.raise(n,e,t)}updateContext(n){}unexpected(n,e){throw this.raise(b.UnexpectedToken,n??this.state.startLoc,{expected:e?$e(e):null})}expectPlugin(n,e){if(this.hasPlugin(n))return!0;throw this.raise(b.MissingPlugin,e??this.state.startLoc,{missingPlugin:[n]})}expectOnePlugin(n){if(!n.some(e=>this.hasPlugin(e)))throw this.raise(b.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:n})}errorBuilder(n){return(e,t,s)=>{this.raise(n,Dt(e,t,s))}}},Ts=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},ws=class{constructor(n){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=n}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Ts)}exit(){let n=this.stack.pop(),e=this.current();for(let[t,s]of Array.from(n.undefinedPrivateNames))e?e.undefinedPrivateNames.has(t)||e.undefinedPrivateNames.set(t,s):this.parser.raise(b.InvalidPrivateFieldResolution,s,{identifierName:t})}declarePrivateName(n,e,t){let{privateNames:s,loneAccessors:i,undefinedPrivateNames:o}=this.current(),a=s.has(n);if(e&3){let l=a&&i.get(n);if(l){let c=l&4,p=e&4,u=l&3,f=e&3;a=u===f||c!==p,a||i.delete(n)}else a||i.set(n,e)}a&&this.parser.raise(b.PrivateNameRedeclaration,t,{identifierName:n}),s.add(n),o.delete(n)}usePrivateName(n,e){let t;for(t of this.stack)if(t.privateNames.has(n))return;t?t.undefinedPrivateNames.set(n,e):this.parser.raise(b.InvalidPrivateFieldResolution,e,{identifierName:n})}},pt=class{constructor(n=0){this.type=n}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},yn=class extends pt{constructor(n){super(n),this.declarationErrors=new Map}recordDeclarationError(n,e){let t=e.index;this.declarationErrors.set(t,[n,e])}clearDeclarationError(n){this.declarationErrors.delete(n)}iterateErrors(n){this.declarationErrors.forEach(n)}},Cs=class{constructor(n){this.parser=void 0,this.stack=[new pt],this.parser=n}enter(n){this.stack.push(n)}exit(){this.stack.pop()}recordParameterInitializerError(n,e){let t=e.loc.start,{stack:s}=this,i=s.length-1,o=s[i];for(;!o.isCertainlyParameterDeclaration();){if(o.canBeArrowParameterDeclaration())o.recordDeclarationError(n,t);else return;o=s[--i]}this.parser.raise(n,t)}recordArrowParameterBindingError(n,e){let{stack:t}=this,s=t[t.length-1],i=e.loc.start;if(s.isCertainlyParameterDeclaration())this.parser.raise(n,i);else if(s.canBeArrowParameterDeclaration())s.recordDeclarationError(n,i);else return}recordAsyncArrowParametersError(n){let{stack:e}=this,t=e.length-1,s=e[t];for(;s.canBeArrowParameterDeclaration();)s.type===2&&s.recordDeclarationError(b.AwaitBindingIdentifier,n),s=e[--t]}validateAsPattern(){let{stack:n}=this,e=n[n.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(([t,s])=>{this.parser.raise(t,s);let i=n.length-2,o=n[i];for(;o.canBeArrowParameterDeclaration();)o.clearDeclarationError(s.index),o=n[--i]})}};function al(){return new pt(3)}function ll(){return new yn(1)}function cl(){return new yn(2)}function hi(){return new pt}var Ss=class{constructor(){this.stacks=[]}enter(n){this.stacks.push(n)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function hn(r,n){return(r?2:0)|(n?1:0)}var Is=class extends Ps{addExtra(n,e,t,s=!0){if(!n)return;let{extra:i}=n;i==null&&(i={},n.extra=i),s?i[e]=t:Object.defineProperty(i,e,{enumerable:s,value:t})}isContextual(n){return this.state.type===n&&!this.state.containsEsc}isUnparsedContextual(n,e){let t=n+e.length;if(this.input.slice(n,t)===e){let s=this.input.charCodeAt(t);return!(ot(s)||(s&64512)===55296)}return!1}isLookaheadContextual(n){let e=this.nextTokenStart();return this.isUnparsedContextual(e,n)}eatContextual(n){return this.isContextual(n)?(this.next(),!0):!1}expectContextual(n,e){if(!this.eatContextual(n)){if(e!=null)throw this.raise(e,this.state.startLoc);this.unexpected(null,n)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Xr(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return Xr(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(n=!0){(n?this.isLineTerminator():this.eat(13))||this.raise(b.MissingSemicolon,this.state.lastTokEndLoc)}expect(n,e){this.eat(n)||this.unexpected(e,n)}tryParse(n,e=this.state.clone()){let t={node:null};try{let s=n((i=null)=>{throw t.node=i,t});if(this.state.errors.length>e.errors.length){let i=this.state;return this.state=e,this.state.tokensLength=i.tokensLength,{node:s,error:i.errors[e.errors.length],thrown:!1,aborted:!1,failState:i}}return{node:s,error:null,thrown:!1,aborted:!1,failState:null}}catch(s){let i=this.state;if(this.state=e,s instanceof SyntaxError)return{node:null,error:s,thrown:!0,aborted:!1,failState:i};if(s===t)return{node:t.node,error:null,thrown:!1,aborted:!0,failState:i};throw s}}checkExpressionErrors(n,e){if(!n)return!1;let{shorthandAssignLoc:t,doubleProtoLoc:s,privateKeyLoc:i,optionalParametersLoc:o}=n,a=!!t||!!s||!!o||!!i;if(!e)return a;t!=null&&this.raise(b.InvalidCoverInitializedName,t),s!=null&&this.raise(b.DuplicateProto,s),i!=null&&this.raise(b.UnexpectedPrivateField,i),o!=null&&this.unexpected(o)}isLiteralPropertyName(){return ii(this.state.type)}isPrivateName(n){return n.type==="PrivateName"}getPrivateNameSV(n){return n.id.name}hasPropertyAsPrivateName(n){return(n.type==="MemberExpression"||n.type==="OptionalMemberExpression")&&this.isPrivateName(n.property)}isObjectProperty(n){return n.type==="ObjectProperty"}isObjectMethod(n){return n.type==="ObjectMethod"}initializeScopes(n=this.options.sourceType==="module"){let e=this.state.labels;this.state.labels=[];let t=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let s=this.inModule;this.inModule=n;let i=this.scope,o=this.getScopeHandler();this.scope=new o(this,n);let a=this.prodParam;this.prodParam=new Ss;let l=this.classScope;this.classScope=new ws(this);let c=this.expressionScope;return this.expressionScope=new Cs(this),()=>{this.state.labels=e,this.exportedIdentifiers=t,this.inModule=s,this.scope=i,this.prodParam=a,this.classScope=l,this.expressionScope=c}}enterInitialScopes(){let n=0;this.inModule&&(n|=2),this.scope.enter(1),this.prodParam.enter(n)}checkDestructuringPrivate(n){let{privateKeyLoc:e}=n;e!==null&&this.expectPlugin("destructuringPrivate",e)}},lt=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},ut=class{constructor(n,e,t){this.type="",this.start=e,this.end=0,this.loc=new ct(t),n!=null&&n.options.ranges&&(this.range=[e,0]),n!=null&&n.filename&&(this.loc.filename=n.filename)}},zs=ut.prototype;zs.__clone=function(){let r=new ut(void 0,this.start,this.loc.start),n=Object.keys(this);for(let e=0,t=n.length;e<t;e++){let s=n[e];s!=="leadingComments"&&s!=="trailingComments"&&s!=="innerComments"&&(r[s]=this[s])}return r};function pl(r){return Re(r)}function Re(r){let{type:n,start:e,end:t,loc:s,range:i,extra:o,name:a}=r,l=Object.create(zs);return l.type=n,l.start=e,l.end=t,l.loc=s,l.range=i,l.extra=o,l.name=a,n==="Placeholder"&&(l.expectedNode=r.expectedNode),l}function ul(r){let{type:n,start:e,end:t,loc:s,range:i,extra:o}=r;if(n==="Placeholder")return pl(r);let a=Object.create(zs);return a.type=n,a.start=e,a.end=t,a.loc=s,a.range=i,r.raw!==void 0?a.raw=r.raw:a.extra=o,a.value=r.value,a}var Es=class extends Is{startNode(){let n=this.state.startLoc;return new ut(this,n.index,n)}startNodeAt(n){return new ut(this,n.index,n)}startNodeAtNode(n){return this.startNodeAt(n.loc.start)}finishNode(n,e){return this.finishNodeAt(n,e,this.state.lastTokEndLoc)}finishNodeAt(n,e,t){return n.type=e,n.end=t.index,n.loc.end=t,this.options.ranges&&(n.range[1]=t.index),this.options.attachComment&&this.processComment(n),n}resetStartLocation(n,e){n.start=e.index,n.loc.start=e,this.options.ranges&&(n.range[0]=e.index)}resetEndLocation(n,e=this.state.lastTokEndLoc){n.end=e.index,n.loc.end=e,this.options.ranges&&(n.range[1]=e.index)}resetStartLocationFromNode(n,e){this.resetStartLocation(n,e.loc.start)}},dl=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),L=Be`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:r})=>`Cannot overwrite reserved type ${r}.`,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:r,enumName:n})=>`Boolean enum members need to be initialized. Use either \`${r} = true,\` or \`${r} = false,\` in enum \`${n}\`.`,EnumDuplicateMemberName:({memberName:r,enumName:n})=>`Enum member names need to be unique, but the name \`${r}\` has already been used before in enum \`${n}\`.`,EnumInconsistentMemberValues:({enumName:r})=>`Enum \`${r}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:r,enumName:n})=>`Enum type \`${r}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${n}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:r})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${r}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:r,memberName:n,explicitType:e})=>`Enum \`${r}\` has type \`${e}\`, so the initializer of \`${n}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:r,memberName:n})=>`Symbol enum members cannot be initialized. Use \`${n},\` in enum \`${r}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:r,memberName:n})=>`The enum member initializer for \`${n}\` needs to be a literal (either a boolean, number, or string) in enum \`${r}\`.`,EnumInvalidMemberName:({enumName:r,memberName:n,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${n}\`, consider using \`${e}\`, in enum \`${r}\`.`,EnumNumberMemberNotInitialized:({enumName:r,memberName:n})=>`Number enum members need to be initialized, e.g. \`${n} = 1\` in enum \`${r}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:r})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${r}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:r})=>`Unexpected reserved type ${r}.`,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:r,suggestion:n})=>`\`declare export ${r}\` is not supported. Use \`${n}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function fl(r){return r.type==="DeclareExportAllDeclaration"||r.type==="DeclareExportDeclaration"&&(!r.declaration||r.declaration.type!=="TypeAlias"&&r.declaration.type!=="InterfaceDeclaration")}function Qr(r){return r.importKind==="type"||r.importKind==="typeof"}var ml={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function hl(r,n){let e=[],t=[];for(let s=0;s<r.length;s++)(n(r[s],s,r)?e:t).push(r[s]);return[e,t]}var bl=/\*?\s*@((?:no)?flow)\b/,gl=r=>class extends r{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return bs}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(e,t){e!==134&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(this.flowPragma===void 0){let t=bl.exec(e.value);if(t)if(t[1]==="flow")this.flowPragma="flow";else if(t[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){let t=this.state.inType;this.state.inType=!0,this.expect(e||14);let s=this.flowParseType();return this.state.inType=t,s}flowParsePredicate(){let e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>t.index+1&&this.raise(L.UnexpectedSpaceBetweenModuloChecks,t),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let t=null,s=null;return this.match(54)?(this.state.inType=e,s=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(s=this.flowParsePredicate())),[t,s]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let t=e.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(10);let o=this.flowParseFunctionTypeParams();return s.params=o.params,s.rest=o.rest,s.this=o._this,this.expect(11),[s.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),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.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(L.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,t);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(134)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let t=e.body=this.startNode(),s=t.body=[];for(this.expect(5);!this.match(8);){let a=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(L.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(a)):(this.expectContextual(125,L.UnsupportedStatementInDeclareModule),a=this.flowParseDeclare(a,!0)),s.push(a)}this.scope.exit(),this.expect(8),this.finishNode(t,"BlockStatement");let i=null,o=!1;return s.forEach(a=>{fl(a)?(i==="CommonJS"&&this.raise(L.AmbiguousDeclareModuleKind,a),i="ES"):a.type==="DeclareModuleExports"&&(o&&this.raise(L.DuplicateDeclareModuleExports,a),i==="ES"&&this.raise(L.AmbiguousDeclareModuleKind,a),i="CommonJS",o=!0)}),e.kind=i||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!t){let s=this.state.value;throw this.raise(L.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:s,suggestion:ml[s]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let t=this.flowParseTypeAlias(e);return t.type="DeclareTypeAlias",t}flowParseDeclareOpaqueType(e){this.next();let t=this.flowParseOpaqueType(e,!0);return t.type="DeclareOpaqueType",t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!t&&this.eat(12));if(t){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(L.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,t,s){dl.has(e)&&this.raise(s?L.AssignReservedType:L.UnexpectedReservedType,t,{reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let t=this.state.startLoc,s=this.startNode(),i=this.flowParseVariance(),o=this.flowParseTypeAnnotatableIdentifier();return s.name=o.name,s.variance=i,s.bound=o.typeAnnotation,this.match(29)?(this.eat(29),s.default=this.flowParseType()):e&&this.raise(L.MissingTypeParamDefault,t),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let s=!1;do{let i=this.flowParseTypeParameter(s);t.params.push(i),i.default&&(s=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=s,this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,s){return e.static=t,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=s,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){let 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:o}){let a=this.state.inType;this.state.inType=!0;let l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];let c,p,u=!1;for(t&&this.match(6)?(this.expect(6),c=9,p=!0):(this.expect(5),c=8,p=!1),l.exact=p;!this.match(c);){let m=!1,d=null,g=null,h=this.startNode();if(i&&this.isContextual(118)){let P=this.lookahead();P.type!==14&&P.type!==17&&(this.next(),d=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let P=this.lookahead();P.type!==14&&P.type!==17&&(this.next(),m=!0)}let y=this.flowParseVariance();if(this.eat(0))d!=null&&this.unexpected(d),this.eat(0)?(y&&this.unexpected(y.loc.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(h,m))):l.indexers.push(this.flowParseObjectTypeIndexer(h,m,y));else if(this.match(10)||this.match(47))d!=null&&this.unexpected(d),y&&this.unexpected(y.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(h,m));else{let P="init";if(this.isContextual(99)||this.isContextual(104)){let x=this.lookahead();ii(x.type)&&(P=this.state.value,this.next())}let E=this.flowParseObjectTypeProperty(h,m,d,y,P,s,o??!p);E===null?(u=!0,g=this.state.lastTokStartLoc):l.properties.push(E)}this.flowObjectTypeSemicolon(),g&&!this.match(8)&&!this.match(9)&&this.raise(L.UnexpectedExplicitInexactInObject,g)}this.expect(c),s&&(l.inexact=u);let f=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=a,f}flowParseObjectTypeProperty(e,t,s,i,o,a,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(a?l||this.raise(L.InexactInsideExact,this.state.lastTokStartLoc):this.raise(L.InexactInsideNonObject,this.state.lastTokStartLoc),i&&this.raise(L.InexactVariance,i),null):(a||this.raise(L.UnexpectedSpreadType,this.state.lastTokStartLoc),s!=null&&this.unexpected(s),i&&this.raise(L.SpreadVariance,i),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=s!=null,e.kind=o;let c=!1;return this.match(47)||this.match(10)?(e.method=!0,s!=null&&this.unexpected(s),i&&this.unexpected(i.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(o==="get"||o==="set")&&this.flowCheckGetterSetterParams(e),!a&&e.key.name==="constructor"&&e.value.this&&this.raise(L.ThisParamBannedInConstructor,e.value.this)):(o!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(c=!0),e.value=this.flowParseTypeInitialiser(),e.variance=i),e.optional=c,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let t=e.kind==="get"?0:1,s=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?L.GetterMayNotHaveThisParam:L.SetterMayNotHaveThisParam,e.value.this),s!==t&&this.raise(e.kind==="get"?b.BadGetterArity:b.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(b.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){var s;(s=e)!=null||(e=this.state.startLoc);let i=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let o=this.startNodeAt(e);o.qualification=i,o.id=this.flowParseRestrictedIdentifier(!0),i=this.finishNode(o,"QualifiedTypeIdentifier")}return i}flowParseGenericType(e,t){let s=this.startNodeAt(e);return s.typeParameters=null,s.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(s.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(s,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,"TupleTypeAnnotation")}flowParseFunctionTypeParam(e){let t=null,s=!1,i=null,o=this.startNode(),a=this.lookahead(),l=this.state.type===78;return a.type===14||a.type===17?(l&&!e&&this.raise(L.ThisParamMustBeFirst,o),t=this.parseIdentifier(l),this.eat(17)&&(s=!0,l&&this.raise(L.ThisParamMayNotBeOptional,o)),i=this.flowParseTypeInitialiser()):i=this.flowParseType(),o.name=t,o.optional=s,o.typeAnnotation=i,this.finishNode(o,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){let t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let t=null,s=null;for(this.match(78)&&(s=this.flowParseFunctionTypeParam(!0),s.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this: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(){let e=this.state.startLoc,t=this.startNode(),s,i,o=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,i=this.flowParseTupleType(),this.state.noAnonFunctionType=a,i;case 47:{let l=this.startNode();return l.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),s=this.flowParseFunctionTypeParams(),l.params=s.params,l.rest=s.rest,l.this=s._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),this.finishNode(l,"FunctionTypeAnnotation")}case 10:{let l=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(_(this.state.type)||this.match(78)){let c=this.lookahead().type;o=c!==17&&c!==14}else o=!0;if(o){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),i;this.eat(12)}return i?s=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):s=this.flowParseFunctionTypeParams(),l.params=s.params,l.rest=s.rest,l.this=s._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),l.typeParameters=null,this.finishNode(l,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return t.value=this.match(85),this.next(),this.finishNode(t,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",t);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",t);throw this.raise(L.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(t,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(t,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(t,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(t,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(_s(this.state.type)){let l=$e(this.state.type);return this.next(),super.createIdentifier(t,l)}else if(_(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,t,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,t=this.flowParsePrimaryType(),s=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let i=this.startNodeAt(e),o=this.eat(18);s=s||o,this.expect(0),!o&&this.match(3)?(i.elementType=t,this.next(),t=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=t,i.indexType=this.flowParseType(),this.expect(3),s?(i.optional=o,t=this.finishNode(i,"OptionalIndexedAccessType")):t=this.finishNode(i,"IndexedAccessType"))}return t}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return e.types.length===1?t:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){let e=this.startNode();this.eat(43);let t=this.flowParseIntersectionType();for(e.types=[t];this.eat(43);)e.types.push(this.flowParseIntersectionType());return e.types.length===1?t:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){let e=this.state.inType;this.state.inType=!0;let t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}else return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){let t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),this.state.value==="+"?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,t,s=!1){if(t){this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,s));return}super.parseFunctionBody(e,!1,s)}parseFunctionBodyAndFinish(e,t,s=!1){if(this.match(14)){let i=this.startNode();[i.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=i.typeAnnotation?this.finishNode(i,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,t,s)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let s=this.lookahead();if(we(s.type)){let i=this.startNode();return this.next(),this.flowParseInterface(i)}}else if(this.isContextual(126)){let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}let t=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(t)&&(this.flowPragma=null),t}parseExpressionStatement(e,t,s){if(t.type==="Identifier"){if(t.name==="declare"){if(this.match(80)||_(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(_(this.state.type)){if(t.name==="interface")return this.flowParseInterface(e);if(t.name==="type")return this.flowParseTypeAlias(e);if(t.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,t,s)}shouldParseExportDeclaration(){let{type:e}=this.state;return e===126||Kr(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return e===126||Kr(e)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,s){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let f=this.lookaheadCharCode();if(f===44||f===61||f===58||f===41)return this.setOptionalParametersError(s),e}this.expect(17);let i=this.state.clone(),o=this.state.noArrowAt,a=this.startNodeAt(t),{consequent:l,failed:c}=this.tryParseConditionalConsequent(),[p,u]=this.getArrowLikeExpressions(l);if(c||u.length>0){let f=[...o];if(u.length>0){this.state=i,this.state.noArrowAt=f;for(let m=0;m<u.length;m++)f.push(u[m].start);({consequent:l,failed:c}=this.tryParseConditionalConsequent()),[p,u]=this.getArrowLikeExpressions(l)}c&&p.length>1&&this.raise(L.AmbiguousConditionalArrow,i.startLoc),c&&p.length===1&&(this.state=i,f.push(p[0].start),this.state.noArrowAt=f,{consequent:l,failed:c}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=o,this.expect(14),a.test=e,a.consequent=l,a.alternate=this.forwardNoArrowParamsConversionAt(a,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(a,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){let s=[e],i=[];for(;s.length!==0;){let o=s.pop();o.type==="ArrowFunctionExpression"&&o.body.type!=="BlockStatement"?(o.typeParameters||!o.returnType?this.finishArrowValidation(o):i.push(o),s.push(o.body)):o.type==="ConditionalExpression"&&(s.push(o.consequent),s.push(o.alternate))}return t?(i.forEach(o=>this.finishArrowValidation(o)),[i,[]]):hl(i,o=>o.params.every(a=>this.isAssignable(a,!0)))}finishArrowValidation(e){var t;this.toAssignableList(e.params,(t=e.extra)==null?void 0:t.trailingCommaLoc,!1),this.scope.enter(6),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){let s=super.parseParenItem(e,t);if(this.eat(17)&&(s.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(t);return i.expression=s,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return s}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";let t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}else if(this.isContextual(131)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}else if(this.isContextual(129)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseInterface(t)}else if(this.isContextual(126)){e.exportKind="value";let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:t}=this.state,s=super.maybeParseExportNamespaceSpecifier(e);return s&&e.exportKind==="type"&&this.unexpected(t),s}parseClassId(e,t,s){super.parseClassId(e,t,s),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,s){let{startLoc:i}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,s),t.declare&&(t.type!=="ClassProperty"&&t.type!=="ClassPrivateProperty"&&t.type!=="PropertyDefinition"?this.raise(L.DeclareClassElement,i):t.value&&this.raise(L.DeclareClassFieldInitializer,t.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),t="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(b.InvalidIdentifier,this.state.curPosition(),{identifierName:t}),this.finishToken(132,t)}getTokenFromCode(e){let t=this.input.charCodeAt(this.state.pos+1);e===123&&t===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?t===46?this.finishOp(18,2):this.finishOp(17,1):Ya(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,t){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){!t&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,s){for(let i=0;i<e.length;i++){let o=e[i];o?.type==="TypeCastExpression"&&(e[i]=this.typeCastToParameter(o))}super.toAssignableList(e,t,s)}toReferencedList(e,t){for(let i=0;i<e.length;i++){var s;let o=e[i];o&&o.type==="TypeCastExpression"&&!((s=o.extra)!=null&&s.parenthesized)&&(e.length>1||!t)&&this.raise(L.TypeCastInPattern,o.typeAnnotation)}return e}parseArrayLike(e,t,s,i){let o=super.parseArrayLike(e,t,s,i);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(o.elements),o}isValidLVal(e,t,s){return e==="TypeCastExpression"||super.isValidLVal(e,t,s)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,s,i,o,a){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,s,i,o,a),t.params&&o){let l=t.params;l.length>0&&this.isThisParam(l[0])&&this.raise(L.ThisParamBannedInConstructor,t)}else if(t.type==="MethodDefinition"&&o&&t.value.params){let l=t.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(L.ThisParamBannedInConstructor,t)}}pushClassPrivateMethod(e,t,s,i){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,s,i)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let t=e.implements=[];do{let s=this.startNode();s.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?s.typeParameters=this.flowParseTypeParameterInstantiation():s.typeParameters=null,t.push(this.finishNode(s,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let t=this.getObjectOrClassMethodParams(e);if(t.length>0){let s=t[0];this.isThisParam(s)&&e.kind==="get"?this.raise(L.GetterMayNotHaveThisParam,s):this.isThisParam(s)&&this.raise(L.SetterMayNotHaveThisParam,s)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,s,i,o,a,l){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let c;this.match(47)&&!a&&(c=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let p=super.parseObjPropValue(e,t,s,i,o,a,l);return c&&((p.value||p).typeParameters=c),p}parseFunctionParamType(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(L.PatternIsOptional,e),this.isThisParam(e)&&this.raise(L.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(L.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(L.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,t){let s=super.parseMaybeDefault(e,t);return s.type==="AssignmentPattern"&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(L.TypeBeforeInitializer,s.typeAnnotation),s}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(L.ImportReflectionHasImportType,e.specifiers[0].loc.start)}parseImportSpecifierLocal(e,t,s){t.local=Qr(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(130)){if(!e)return!0;let t=this.lookaheadCharCode();return t===123||t===42}return!e&&this.isContextual(87)}applyImportPhase(e,t,s,i){if(super.applyImportPhase(e,t,s,i),t){if(!s&&this.match(65))return;e.exportKind=s==="type"?s:"value"}else s==="type"&&this.match(55)&&this.unexpected(),e.importKind=s==="type"||s==="typeof"?s:"value"}parseImportSpecifier(e,t,s,i,o){let a=e.imported,l=null;a.type==="Identifier"&&(a.name==="type"?l="type":a.name==="typeof"&&(l="typeof"));let c=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let u=this.parseIdentifier(!0);l!==null&&!we(this.state.type)?(e.imported=u,e.importKind=l,e.local=Re(u)):(e.imported=a,e.importKind=null,e.local=this.parseIdentifier())}else{if(l!==null&&we(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=l;else{if(t)throw this.raise(b.ImportBindingIsString,e,{importName:a.value});e.imported=a,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(c=!0,e.local=Re(e.imported))}let p=Qr(e);return s&&p&&this.raise(L.ImportTypeShorthandOnlyInPureImport,e),(s||p)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),c&&!s&&!p&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(e,t){let s=e.kind;s!=="get"&&s!=="set"&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){let s=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=s}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var s;let i=null,o;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(i=this.state.clone(),o=this.tryParse(()=>super.parseMaybeAssign(e,t),i),!o.error)return o.node;let{context:c}=this.state,p=c[c.length-1];(p===V.j_oTag||p===V.j_expr)&&c.pop()}if((s=o)!=null&&s.error||this.match(47)){var a,l;i=i||this.state.clone();let c,p=this.tryParse(f=>{var m;c=this.flowParseTypeParameterDeclaration();let d=this.forwardNoArrowParamsConversionAt(c,()=>{let h=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(h,c),h});(m=d.extra)!=null&&m.parenthesized&&f();let g=this.maybeUnwrapTypeCastExpression(d);return g.type!=="ArrowFunctionExpression"&&f(),g.typeParameters=c,this.resetStartLocationFromNode(g,c),d},i),u=null;if(p.node&&this.maybeUnwrapTypeCastExpression(p.node).type==="ArrowFunctionExpression"){if(!p.error&&!p.aborted)return p.node.async&&this.raise(L.UnexpectedTypeParameterBeforeAsyncArrowFunction,c),p.node;u=p.node}if((a=o)!=null&&a.node)return this.state=o.failState,o.node;if(u)return this.state=p.failState,u;throw(l=o)!=null&&l.thrown?o.error:p.thrown?p.error:this.raise(L.UnexpectedTokenAfterTypeParameter,c)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(()=>{let s=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let i=this.startNode();return[i.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=s,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),i});if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,s,i=!0){if(!(s&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start)))){for(let o=0;o<e.params.length;o++)this.isThisParam(e.params[o])&&o>0&&this.raise(L.ThisParamMustBeFirst,e.params[o]);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(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.includes(t.index)){this.next();let i=this.startNodeAt(t);i.callee=e,i.arguments=super.parseCallExpressionArguments(11),e=this.finishNode(i,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){let i=this.state.clone(),o=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(t)||l(),i);if(!o.error&&!o.aborted)return o.node;let a=this.tryParse(()=>super.parseSubscripts(e,t,s),i);if(a.node&&!a.error)return a.node;if(o.node)return this.state=o.failState,o.node;if(a.node)return this.state=a.failState,a.node;throw o.error||a.error}return super.parseSubscripts(e,t,s)}parseSubscript(e,t,s,i){if(this.match(18)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,s)return i.stop=!0,e;this.next();let o=this.startNodeAt(t);return o.callee=e,o.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),o.arguments=this.parseCallExpressionArguments(11),o.optional=!0,this.finishCallExpression(o,!0)}else if(!s&&this.shouldParseTypes()&&this.match(47)){let o=this.startNodeAt(t);o.callee=e;let a=this.tryParse(()=>(o.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),o.arguments=super.parseCallExpressionArguments(11),i.optionalChainMember&&(o.optional=!1),this.finishCallExpression(o,i.optionalChainMember)));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(e,t,s,i)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(47)&&(t=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){let t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),!!this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){let t=this.input.charCodeAt(this.state.pos+1);if(e===42&&t===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(e===124&&t===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,t){let s=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(L.UnterminatedFlowComment,this.state.curPosition()),s}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(L.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:e}=this.state,t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;let s=this.input.charCodeAt(t+e),i=this.input.charCodeAt(t+e+1);return s===58&&i===58?t+2:this.input.slice(t+e,t+e+12)==="flow-include"?t+12:s===58&&i!==58?t:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(b.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:s}){this.raise(L.EnumBooleanMemberNotInitialized,e,{memberName:s,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?t.explicitType==="symbol"?L.EnumInvalidMemberInitializerSymbolType:L.EnumInvalidMemberInitializerPrimaryType:L.EnumInvalidMemberInitializerUnknownType,e,t)}flowEnumErrorNumberMemberNotInitialized(e,t){this.raise(L.EnumNumberMemberNotInitialized,e,t)}flowEnumErrorStringMemberInconsistentlyInitialized(e,t){this.raise(L.EnumStringMemberInconsistentlyInitialized,e,t)}flowEnumMemberInit(){let e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let s=this.parseNumericLiteral(this.state.value);return t()?{type:"number",loc:s.loc.start,value:s}:{type:"invalid",loc:e}}case 134:{let s=this.parseStringLiteral(this.state.value);return t()?{type:"string",loc:s.loc.start,value:s}:{type:"invalid",loc:e}}case 85:case 86:{let s=this.parseBooleanLiteral(this.match(85));return t()?{type:"boolean",loc:s.loc.start,value:s}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,t=this.parseIdentifier(!0),s=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:t,init:s}}flowEnumCheckExplicitTypeMismatch(e,t,s){let{explicitType:i}=t;i!==null&&i!==s&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){let s=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},o=!1;for(;!this.match(8);){if(this.eat(21)){o=!0;break}let a=this.startNode(),{id:l,init:c}=this.flowEnumMemberRaw(),p=l.name;if(p==="")continue;/^[a-z]/.test(p)&&this.raise(L.EnumInvalidMemberName,l,{memberName:p,suggestion:p[0].toUpperCase()+p.slice(1),enumName:e}),s.has(p)&&this.raise(L.EnumDuplicateMemberName,l,{memberName:p,enumName:e}),s.add(p);let u={enumName:e,explicitType:t,memberName:p};switch(a.id=l,c.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(c.loc,u,"boolean"),a.init=c.value,i.booleanMembers.push(this.finishNode(a,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(c.loc,u,"number"),a.init=c.value,i.numberMembers.push(this.finishNode(a,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(c.loc,u,"string"),a.init=c.value,i.stringMembers.push(this.finishNode(a,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(c.loc,u);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(c.loc,u);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(c.loc,u);break;default:i.defaultedMembers.push(this.finishNode(a,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:i,hasUnknownMembers:o}}flowEnumStringMembers(e,t,{enumName:s}){if(e.length===0)return t;if(t.length===0)return e;if(t.length>e.length){for(let i of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:s});return t}else{for(let i of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:s});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!_(this.state.type))throw this.raise(L.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:t}=this.state;return this.next(),t!=="boolean"&&t!=="number"&&t!=="string"&&t!=="symbol"&&this.raise(L.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){let s=t.name,i=t.loc.start,o=this.flowEnumParseExplicitType({enumName:s});this.expect(5);let{members:a,hasUnknownMembers:l}=this.flowEnumMembers({enumName:s,explicitType:o});switch(e.hasUnknownMembers=l,o){case"boolean":return e.explicitType=!0,e.members=a.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=a.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=a.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let c=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let p=a.booleanMembers.length,u=a.numberMembers.length,f=a.stringMembers.length,m=a.defaultedMembers.length;if(!p&&!u&&!f&&!m)return c();if(!p&&!u)return e.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!u&&!f&&p>=m){for(let d of a.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(d.loc.start,{enumName:s,memberName:d.id.name});return e.members=a.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!p&&!f&&u>=m){for(let d of a.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(d.loc.start,{enumName:s,memberName:d.id.name});return e.members=a.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(L.EnumInconsistentMemberValues,i,{enumName:s}),c()}}}flowParseEnumDeclaration(e){let t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let t=this.input.charCodeAt(e+1);return t!==60&&t!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},yl={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},Ke=Be`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:r})=>`Expected corresponding JSX closing tag for <${r}>.`,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:r,HTMLEntity:n})=>`Unexpected token \`${r}\`. Did you mean \`${n}\` or \`{'${r}'}\`?`,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 ze(r){return r?r.type==="JSXOpeningFragment"||r.type==="JSXClosingFragment":!1}function it(r){if(r.type==="JSXIdentifier")return r.name;if(r.type==="JSXNamespacedName")return r.namespace.name+":"+r.name.name;if(r.type==="JSXMemberExpression")return it(r.object)+"."+it(r.property);throw new Error("Node had unexpected type: "+r.type)}var vl=r=>class extends r{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Ke.UnterminatedJsxContent,this.state.startLoc);let s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:if(this.state.pos===this.state.start){s===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(s);return}e+=this.input.slice(t,this.state.pos),this.finishToken(142,e);return;case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;case 62:case 125:default:at(s)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let t=this.input.charCodeAt(this.state.pos),s;return++this.state.pos,t===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,s=e?`
7
7
  `:`\r
8
- `):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(b.UnterminatedString,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);if(i===e)break;i===38?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadEntity(),s=this.state.pos):at(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(134,t)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let t=10;this.codePointAtPos(this.state.pos)===120&&(t=16,++this.state.pos);let s=this.readInt(t,void 0,!1,"bail");if(s!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(s)}else{let t=0,s=!1;for(;t++<10&&this.state.pos<this.length&&!(s=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(s){let i=this.input.slice(e,this.state.pos),o=yl[i];if(++this.state.pos,o)return o}}return this.state.pos=e,"&"}jsxReadWord(){let e,t=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(ot(e)||e===45);this.finishToken(141,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(141)?e.name=this.state.value:Bs(this.state.type)?e.name=$e(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(14))return t;let s=this.startNodeAt(e);return s.namespace=t,s.name=this.jsxParseIdentifier(),this.finishNode(s,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,t=this.jsxParseNamespacedName();if(t.type==="JSXNamespacedName")return t;for(;this.eat(16);){let 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 5:return e=this.startNode(),this.setContext(V.brace),this.next(),e=this.jsxParseExpressionContainer(e,V.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(Ke.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(Ke.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(V.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,t){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let s=this.parseExpression();e.expression=s}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(V.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(V.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let t=this.startNodeAt(e);return this.eat(144)?this.finishNode(t,"JSXOpeningFragment"):(t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t))}jsxParseOpeningElementAfterName(e){let t=[];for(;!this.match(56)&&!this.match(144);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(56),this.expect(144),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let t=this.startNodeAt(e);return this.eat(144)?this.finishNode(t,"JSXClosingFragment"):(t.name=this.jsxParseElementName(),this.expect(144),this.finishNode(t,"JSXClosingElement"))}jsxParseElementAt(e){let t=this.startNodeAt(e),s=[],i=this.jsxParseOpeningElementAt(e),o=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case 143:if(e=this.state.startLoc,this.next(),this.eat(56)){o=this.jsxParseClosingElementAt(e);break e}s.push(this.jsxParseElementAt(e));break;case 142:s.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let a=this.startNode();this.setContext(V.brace),this.next(),this.match(21)?s.push(this.jsxParseSpreadChild(a)):s.push(this.jsxParseExpressionContainer(a,V.j_expr));break}default:this.unexpected()}ze(i)&&!ze(o)&&o!==null?this.raise(Ke.MissingClosingTagFragment,o):!ze(i)&&ze(o)?this.raise(Ke.MissingClosingTagElement,o,{openingTagName:it(i.name)}):!ze(i)&&!ze(o)&&it(o.name)!==it(i.name)&&this.raise(Ke.MissingClosingTagElement,o,{openingTagName:it(i.name)})}if(ze(i)?(t.openingFragment=i,t.closingFragment=o):(t.openingElement=i,t.closingElement=o),t.children=s,this.match(47))throw this.raise(Ke.UnwrappedAdjacentJSXElements,this.state.startLoc);return ze(i)?this.finishNode(t,"JSXFragment"):this.finishNode(t,"JSXElement")}jsxParseElement(){let e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){let{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){let t=this.curContext();if(t===V.j_expr){this.jsxReadToken();return}if(t===V.j_oTag||t===V.j_cTag){if(Ue(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(144);return}if((e===34||e===39)&&t===V.j_oTag){this.jsxReadString(e);return}}if(e===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(e)}updateContext(e){let{context:t,type:s}=this.state;if(s===56&&e===143)t.splice(-2,2,V.j_cTag),this.state.canStartJSXElement=!1;else if(s===143)t.push(V.j_oTag);else if(s===144){let i=t[t.length-1];i===V.j_oTag&&e===56||i===V.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===V.j_expr):(this.setContext(V.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=Fa(s)}},As=class extends Ft{constructor(...n){super(...n),this.tsNames=new Map}},ks=class extends Ut{constructor(...n){super(...n),this.importsStack=[]}createScope(n){return this.importsStack.push(new Set),new As(n)}enter(n){n===256&&this.importsStack.push(new Set),super.enter(n)}exit(){let n=super.exit();return n===256&&this.importsStack.pop(),n}hasImport(n,e){let t=this.importsStack.length;if(this.importsStack[t-1].has(n))return!0;if(!e&&t>1){for(let s=0;s<t-1;s++)if(this.importsStack[s].has(n))return!0}return!1}declareName(n,e,t){if(e&4096){this.hasImport(n,!0)&&this.parser.raise(b.VarRedeclaration,t,{identifierName:n}),this.importsStack[this.importsStack.length-1].add(n);return}let s=this.currentScope(),i=s.tsNames.get(n)||0;if(e&1024){this.maybeExportDefined(s,n),s.tsNames.set(n,i|16);return}super.declareName(n,e,t),e&2&&(e&1||(this.checkRedeclarationInScope(s,n,e,t),this.maybeExportDefined(s,n)),i=i|1),e&256&&(i=i|2),e&512&&(i=i|4),e&128&&(i=i|8),i&&s.tsNames.set(n,i)}isRedeclaredInScope(n,e,t){let s=n.tsNames.get(e);if((s&2)>0){if(t&256){let i=!!(t&512),o=(s&4)>0;return i!==o}return!0}return t&128&&(s&8)>0?n.names.get(e)&2?!!(t&1):!1:t&2&&(s&1)>0?!0:super.isRedeclaredInScope(n,e,t)}checkLocalExport(n){let{name:e}=n;if(this.hasImport(e))return;let t=this.scopeStack.length;for(let s=t-1;s>=0;s--){let o=this.scopeStack[s].tsNames.get(e);if((o&1)>0||(o&16)>0)return}super.checkLocalExport(n)}},bi=r=>r.type==="ParenthesizedExpression"?bi(r.expression):r,Ns=class extends Es{toAssignable(n,e=!1){var t,s;let i;switch((n.type==="ParenthesizedExpression"||(t=n.extra)!=null&&t.parenthesized)&&(i=bi(n),e?i.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(b.InvalidParenthesizedAssignment,n):i.type!=="MemberExpression"&&!this.isOptionalMemberExpression(i)&&this.raise(b.InvalidParenthesizedAssignment,n):this.raise(b.InvalidParenthesizedAssignment,n)),n.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":n.type="ObjectPattern";for(let a=0,l=n.properties.length,c=l-1;a<l;a++){var o;let p=n.properties[a],u=a===c;this.toAssignableObjectExpressionProp(p,u,e),u&&p.type==="RestElement"&&(o=n.extra)!=null&&o.trailingCommaLoc&&this.raise(b.RestTrailingComma,n.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:a,value:l}=n;this.isPrivateName(a)&&this.classScope.usePrivateName(this.getPrivateNameSV(a),a.loc.start),this.toAssignable(l,e);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":n.type="ArrayPattern",this.toAssignableList(n.elements,(s=n.extra)==null?void 0:s.trailingCommaLoc,e);break;case"AssignmentExpression":n.operator!=="="&&this.raise(b.MissingEqInAssignment,n.left.loc.end),n.type="AssignmentPattern",delete n.operator,this.toAssignable(n.left,e);break;case"ParenthesizedExpression":this.toAssignable(i,e);break}}toAssignableObjectExpressionProp(n,e,t){if(n.type==="ObjectMethod")this.raise(n.kind==="get"||n.kind==="set"?b.PatternHasAccessor:b.PatternHasMethod,n.key);else if(n.type==="SpreadElement"){n.type="RestElement";let s=n.argument;this.checkToRestConversion(s,!1),this.toAssignable(s,t),e||this.raise(b.RestTrailingComma,n)}else this.toAssignable(n,t)}toAssignableList(n,e,t){let s=n.length-1;for(let i=0;i<=s;i++){let o=n[i];if(o){if(o.type==="SpreadElement"){o.type="RestElement";let a=o.argument;this.checkToRestConversion(a,!0),this.toAssignable(a,t)}else this.toAssignable(o,t);o.type==="RestElement"&&(i<s?this.raise(b.RestTrailingComma,o):e&&this.raise(b.RestTrailingComma,e))}}}isAssignable(n,e){switch(n.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let t=n.properties.length-1;return n.properties.every((s,i)=>s.type!=="ObjectMethod"&&(i===t||s.type!=="SpreadElement")&&this.isAssignable(s))}case"ObjectProperty":return this.isAssignable(n.value);case"SpreadElement":return this.isAssignable(n.argument);case"ArrayExpression":return n.elements.every(t=>t===null||this.isAssignable(t));case"AssignmentExpression":return n.operator==="=";case"ParenthesizedExpression":return this.isAssignable(n.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(n,e){return n}toReferencedListDeep(n,e){this.toReferencedList(n,e);for(let t of n)t?.type==="ArrayExpression"&&this.toReferencedListDeep(t.elements)}parseSpread(n){let e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(n,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){let n=this.startNode();return this.next(),n.argument=this.parseBindingAtom(),this.finishNode(n,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let n=this.startNode();return this.next(),n.elements=this.parseBindingList(3,93,1),this.finishNode(n,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(n,e,t){let s=t&1,i=[],o=!0;for(;!this.eat(n);)if(o?o=!1:this.expect(12),s&&this.match(12))i.push(null);else{if(this.eat(n))break;if(this.match(21)){let a=this.parseRestBinding();if((this.hasPlugin("flow")||t&2)&&(a=this.parseFunctionParamType(a)),i.push(a),!this.checkCommaAfterRest(e)){this.expect(n);break}}else{let a=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(b.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)a.push(this.parseDecorator());i.push(this.parseAssignableListItem(t,a))}}return i}parseBindingRestProperty(n){return this.next(),n.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(n,"RestElement")}parseBindingProperty(){let{type:n,startLoc:e}=this.state;if(n===21)return this.parseBindingRestProperty(this.startNode());let t=this.startNode();return n===139?(this.expectPlugin("destructuringPrivate",e),this.classScope.usePrivateName(this.state.value,e),t.key=this.parsePrivateName()):this.parsePropertyName(t),t.method=!1,this.parseObjPropValue(t,e,!1,!1,!0,!1)}parseAssignableListItem(n,e){let t=this.parseMaybeDefault();(this.hasPlugin("flow")||n&2)&&this.parseFunctionParamType(t);let s=this.parseMaybeDefault(t.loc.start,t);return e.length&&(t.decorators=e),s}parseFunctionParamType(n){return n}parseMaybeDefault(n,e){var t,s;if((t=n)!=null||(n=this.state.startLoc),e=(s=e)!=null?s:this.parseBindingAtom(),!this.eat(29))return e;let i=this.startNodeAt(n);return i.left=e,i.right=this.parseMaybeAssignAllowIn(),this.finishNode(i,"AssignmentPattern")}isValidLVal(n,e,t){switch(n){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties"}return!1}isOptionalMemberExpression(n){return n.type==="OptionalMemberExpression"}checkLVal(n,e,t=64,s=!1,i=!1,o=!1){var a;let l=n.type;if(this.isObjectMethod(n))return;let c=this.isOptionalMemberExpression(n);if(c||l==="MemberExpression"){c&&(this.expectPlugin("optionalChainingAssign",n.loc.start),e.type!=="AssignmentExpression"&&this.raise(b.InvalidLhsOptionalChaining,n,{ancestor:e})),t!==64&&this.raise(b.InvalidPropertyBindingPattern,n);return}if(l==="Identifier"){this.checkIdentifier(n,t,i);let{name:g}=n;s&&(s.has(g)?this.raise(b.ParamDupe,n):s.add(g));return}let p=this.isValidLVal(l,!(o||(a=n.extra)!=null&&a.parenthesized)&&e.type==="AssignmentExpression",t);if(p===!0)return;if(p===!1){let g=t===64?b.InvalidLhs:b.InvalidLhsBinding;this.raise(g,n,{ancestor:e});return}let u,f;typeof p=="string"?(u=p,f=l==="ParenthesizedExpression"):[u,f]=p;let m=l==="ArrayPattern"||l==="ObjectPattern"?{type:l}:e,d=n[u];if(Array.isArray(d))for(let g of d)g&&this.checkLVal(g,m,t,s,i,f);else d&&this.checkLVal(d,m,t,s,i,f)}checkIdentifier(n,e,t=!1){this.state.strict&&(t?ui(n.name,this.inModule):pi(n.name))&&(e===64?this.raise(b.StrictEvalArguments,n,{referenceName:n.name}):this.raise(b.StrictEvalArgumentsBinding,n,{bindingName:n.name})),e&8192&&n.name==="let"&&this.raise(b.LetInLexicalBinding,n),e&64||this.declareNameFromIdentifier(n,e)}declareNameFromIdentifier(n,e){this.scope.declareName(n.name,e,n.loc.start)}checkToRestConversion(n,e){switch(n.type){case"ParenthesizedExpression":this.checkToRestConversion(n.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(b.InvalidRestAssignmentPattern,n)}}checkCommaAfterRest(n){return this.match(12)?(this.raise(this.lookaheadCharCode()===n?b.RestTrailingComma:b.ElementAfterRest,this.state.startLoc),!0):!1}};function xl(r){if(r==null)throw new Error(`Unexpected ${r} value.`);return r}function Zr(r){if(!r)throw new Error("Assert fail")}var k=Re`typescript`({AbstractMethodHasImplementation:({methodName:r})=>`Method '${r}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:r})=>`Property '${r}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:r})=>`'declare' is not allowed in ${r}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:r})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:r})=>`Duplicate modifier: '${r}'.`,EmptyHeritageClauseType:({token:r})=>`'${r}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:r})=>`'${r[0]}' modifier cannot be used with '${r[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:r})=>`Index signatures cannot have an accessibility modifier ('${r}').`,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.",InvalidModifierOnTypeMember:({modifier:r})=>`'${r}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:r})=>`'${r}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:r})=>`'${r}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:r})=>`'${r[0]}' modifier must precede '${r[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'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:r})=>`Private elements cannot have an accessibility modifier ('${r}').`,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:r})=>`Single type parameter ${r} should have a trailing comma. Example usage: <${r},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:r})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${r}.`});function Pl(r){switch(r){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function ei(r){return r==="private"||r==="public"||r==="protected"}function Tl(r){return r==="in"||r==="out"}var wl=r=>class extends r{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:k.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:k.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:k.InvalidModifierOnTypeParameter})}getScopeHandler(){return ks}tsIsIdentifier(){return B(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(e,t){if(!B(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let s=this.state.value;if(e.includes(s)){if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return s}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:s,errorTemplate:i=k.InvalidModifierOnTypeMember},o){let a=(c,p,u,f)=>{p===u&&o[f]&&this.raise(k.InvalidModifiersOrder,c,{orderedModifiers:[u,f]})},l=(c,p,u,f)=>{(o[u]&&p===f||o[f]&&p===u)&&this.raise(k.IncompatibleModifiers,c,{modifiers:[u,f]})};for(;;){let{startLoc:c}=this.state,p=this.tsParseModifier(e.concat(t??[]),s);if(!p)break;ei(p)?o.accessibility?this.raise(k.DuplicateAccessibilityModifier,c,{modifier:p}):(a(c,p,p,"override"),a(c,p,p,"static"),a(c,p,p,"readonly"),o.accessibility=p):Tl(p)?(o[p]&&this.raise(k.DuplicateModifier,c,{modifier:p}),o[p]=!0,a(c,p,"in","out")):(hasOwnProperty.call(o,p)?this.raise(k.DuplicateModifier,c,{modifier:p}):(a(c,p,"static","readonly"),a(c,p,"static","override"),a(c,p,"override","readonly"),a(c,p,"abstract","override"),l(c,p,"declare","override"),l(c,p,"static","abstract")),o[p]=!0),t!=null&&t.includes(p)&&this.raise(i,c,{modifier:p})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,t){let s=[];for(;!this.tsIsListTerminator(e);)s.push(t());return s}tsParseDelimitedList(e,t,s){return xl(this.tsParseDelimitedListWorker(e,t,!0,s))}tsParseDelimitedListWorker(e,t,s,i){let o=[],a=-1;for(;!this.tsIsListTerminator(e);){a=-1;let l=t();if(l==null)return;if(o.push(l),this.eat(12)){a=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;s&&this.expect(12);return}return i&&(i.value=a),o}tsParseBracketedList(e,t,s,i,o){i||(s?this.expect(0):this.expect(47));let a=this.tsParseDelimitedList(e,t,o);return s?this.expect(3):this.expect(48),a}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(134)||this.raise(k.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom(),this.eat(12)&&!this.match(11)?(e.options=super.parseMaybeAssignAllowIn(),this.eat(12)):e.options=null,this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let t=this.parseIdentifier(e);for(;this.eat(16);){let s=this.startNodeAtNode(t);s.left=t,s.right=this.parseIdentifier(e),t=this.finishNode(s,"TSQualifiedName")}return t}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let t=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let s={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,s),t.params.length===0&&this.raise(k.EmptyTypeParameters,t),s.value!==-1&&this.addExtra(t,"trailingComma",s.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){let s=e===19,i="parameters",o="typeAnnotation";t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t[i]=this.tsParseBindingListForSignature(),s?t[o]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(t[o]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let t of e){let{type:s}=t;(s==="AssignmentPattern"||s==="TSParameterProperty")&&this.raise(k.UnsupportedSignatureParameterKind,t,{type:s})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),B(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];let s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){this.eat(17)&&(e.optional=!0);let s=e;if(this.match(10)||this.match(47)){t&&this.raise(k.ReadonlyForMethodSignature,e);let i=s;i.kind&&this.match(47)&&this.raise(k.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,i),this.tsParseTypeMemberSemicolon();let o="parameters",a="typeAnnotation";if(i.kind==="get")i[o].length>0&&(this.raise(b.BadGetterArity,this.state.curPosition()),this.isThisParam(i[o][0])&&this.raise(k.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(i.kind==="set"){if(i[o].length!==1)this.raise(b.BadSetterArity,this.state.curPosition());else{let l=i[o][0];this.isThisParam(l)&&this.raise(k.AccessorCannotDeclareThisParameter,this.state.curPosition()),l.type==="Identifier"&&l.optional&&this.raise(k.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),l.type==="RestElement"&&this.raise(k.SetAccessorCannotHaveRestParameter,this.state.curPosition())}i[a]&&this.raise(k.SetAccessorCannotHaveReturnType,i[a])}else i.kind="method";return this.finishNode(i,"TSMethodSignature")}else{let i=s;t&&(i.readonly=!0);let o=this.tsTryParseTypeAnnotation();return o&&(i.typeAnnotation=o),this.tsParseTypeMemberSemicolon(),this.finishNode(i,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let s=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(s,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);let t=this.tsTryParseIndexSignature(e);return t||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let e=this.startNode();this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0);{let t=this.startNode();t.name=this.tsParseTypeParameterName(),t.constraint=this.tsExpectThenParseType(58),e.typeParameter=this.finishNode(t,"TSTypeParameter")}return e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1;return e.elementTypes.forEach(s=>{let{type:i}=s;t&&i!=="TSRestType"&&i!=="TSOptionalType"&&!(i==="TSNamedTupleMember"&&s.optional)&&this.raise(k.OptionalTypeBeforeRequired,s),t||(t=i==="TSNamedTupleMember"&&s.optional||i==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let{startLoc:e}=this.state,t=this.eat(21),s,i,o,a,c=we(this.state.type)?this.lookaheadCharCode():null;if(c===58)s=!0,o=!1,i=this.parseIdentifier(!0),this.expect(14),a=this.tsParseType();else if(c===63){o=!0;let p=this.state.startLoc,u=this.state.value,f=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(s=!0,i=this.createIdentifier(this.startNodeAt(p),u),this.expect(17),this.expect(14),a=this.tsParseType()):(s=!1,a=f,this.expect(17))}else a=this.tsParseType(),o=this.eat(17),s=this.eat(14);if(s){let p;i?(p=this.startNodeAtNode(i),p.optional=o,p.label=i,p.elementType=a,this.eat(17)&&(p.optional=!0,this.raise(k.TupleOptionalAfterType,this.state.lastTokStartLoc))):(p=this.startNodeAtNode(a),p.optional=o,this.raise(k.InvalidTupleMemberLabel,a),p.label=a,p.elementType=this.tsParseType()),a=this.finishNode(p,"TSNamedTupleMember")}else if(o){let p=this.startNodeAtNode(a);p.typeAnnotation=a,a=this.finishNode(p,"TSOptionalType")}if(t){let p=this.startNodeAt(e);p.typeAnnotation=a,a=this.finishNode(p,"TSRestType")}return a}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){let s=this.startNode();return e==="TSConstructorType"&&(s.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,s)),this.finishNode(s,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let e=this.startNode(),t=this.lookahead();return t.type!==135&&t.type!==136&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(B(e)||e===88||e===84){let t=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":Pl(this.state.value);if(t!==void 0&&this.lookaheadCharCode()!==46){let s=this.startNode();return this.next(),this.finishNode(s,t)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let t=this.startNodeAtNode(e);t.elementType=e,this.expect(3),e=this.finishNode(t,"TSArrayType")}else{let t=this.startNodeAtNode(e);t.objectType=e,t.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(t,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),t==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(k.UnexpectedReadonly,e)}}tsParseInferType(){let e=this.startNode();this.expectContextual(115);let t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return Va(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,t,s){let i=this.startNode(),o=this.eat(s),a=[];do a.push(t());while(this.eat(s));return a.length===1&&!o?a[0]:(i.types=a,this.finishNode(i,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(B(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,t=e.length;try{return super.parseBindingList(3,93,1),e.length===t}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let t=this.startNode();this.expect(e);let s=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(78)){let l=this.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(s.parameterName=l,s.asserts=!0,s.typeAnnotation=null,l=this.finishNode(s,"TSTypePredicate")):(this.resetStartLocationFromNode(l,s),l.asserts=!0),t.typeAnnotation=l,this.finishNode(t,"TSTypeAnnotation")}let o=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!o)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);let a=this.tsParseTypeAnnotation(!1);return s.parameterName=o,s.typeAnnotation=a,s.asserts=i,t.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let e=this.state.containsEsc;return this.next(),!B(this.state.type)&&!this.match(78)?!1:(e&&this.raise(b.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),t.typeAnnotation=this.tsParseType()}),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){Zr(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),t.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),t.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(t,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(k.ReservedTypeAssertion,this.state.startLoc);let e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let t=this.state.startLoc,s=this.tsParseDelimitedList("HeritageClauseElement",()=>{let i=this.startNode();return i.expression=this.tsParseEntityName(),this.match(47)&&(i.typeParameters=this.tsParseTypeArguments()),this.finishNode(i,"TSExpressionWithTypeArguments")});return s.length||this.raise(k.EmptyHeritageClauseType,t,{token:e}),s}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),t.declare&&(e.declare=!0),B(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(k.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let 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(29),this.isContextual(114)&&this.lookahead().type!==16){let t=this.startNode();return this.next(),this.finishNode(t,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}tsInType(e){let t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){let s=this.startNode();this.tsParseModuleOrNamespaceDeclaration(s,!0),e.body=s}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.kind="global",e.global=!0,e.id=this.parseIdentifier()):this.match(134)?(e.kind="module",e.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t,s){e.isExport=s||!1,e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let i=this.tsParseModuleReference();return e.importKind==="type"&&i.type!=="TSExternalModuleReference"&&this.raise(k.ImportAliasHasImportType,i),e.moduleReference=i,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let t=this.state.clone(),s=e();return this.state=t,s}tsTryParseAndCatch(e){let t=this.tryParse(s=>e()||s());if(!(t.aborted||!t.node))return t.error&&(this.state=t.failState),t.node}tsTryParse(e){let t=this.state.clone(),s=e();if(s!==void 0&&s!==!1)return s;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t=this.state.type,s;return this.isContextual(100)&&(t=74,s="let"),this.tsInAmbientContext(()=>{switch(t){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,s||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{let i=this.tsParseInterfaceDeclaration(e,{declare:!0});if(i)return i}default:if(B(t))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,t,s){switch(t.name){case"declare":{let i=this.tsTryParseDeclare(e);return i&&(i.declare=!0),i}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let i=e;return i.kind="global",i.global=!0,i.id=t,i.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(i,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1,s)}}tsParseDeclaration(e,t,s,i){switch(t){case"abstract":if(this.tsCheckLineTerminator(s)&&(this.match(80)||B(this.state.type)))return this.tsParseAbstractDeclaration(e,i);break;case"module":if(this.tsCheckLineTerminator(s)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(e);if(B(this.state.type))return e.kind="module",this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(s)&&B(this.state.type))return e.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(s)&&B(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let t=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let s=this.tsTryParseAndCatch(()=>{let i=this.startNodeAt(e);return i.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(i),i.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),i});if(this.state.maybeInArrowParameters=t,!!s)return super.parseArrowExpression(s,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(k.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===V.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return za(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){let s=this.state.startLoc,i={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},i);let o=i.accessibility,a=i.override,l=i.readonly;!(e&4)&&(o||l||a)&&this.raise(k.UnexpectedParameterModifier,s);let c=this.parseMaybeDefault();e&2&&this.parseFunctionParamType(c);let p=this.parseMaybeDefault(c.loc.start,c);if(o||l||a){let u=this.startNodeAt(s);return t.length&&(u.decorators=t),o&&(u.accessibility=o),l&&(u.readonly=l),a&&(u.override=a),p.type!=="Identifier"&&p.type!=="AssignmentPattern"&&this.raise(k.UnsupportedParameterPropertyKind,u),u.parameter=p,this.finishNode(u,"TSParameterProperty")}return t.length&&(c.decorators=t),p}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let t of e.params)t.type!=="Identifier"&&t.optional&&!this.state.isAmbientContext&&this.raise(k.PatternIsOptional,t)}setArrowFunctionParameters(e,t,s){super.setArrowFunctionParameters(e,t,s),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,s=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let i=t==="FunctionDeclaration"?"TSDeclareFunction":t==="ClassMethod"||t==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return i&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,i):i==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(k.DeclareFunctionHasImplementation,e),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(t=>{t?.type==="TSTypeCastExpression"&&this.raise(k.UnexpectedTypeAnnotation,t.typeAnnotation)})}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,s,i){let o=super.parseArrayLike(e,t,s,i);return o.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(o.elements),o}parseSubscript(e,t,s,i){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let a=this.startNodeAt(t);return a.expression=e,this.finishNode(a,"TSNonNullExpression")}let o=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(s)return i.stop=!0,e;i.optionalChainMember=o=!0,this.next()}if(this.match(47)||this.match(51)){let a,l=this.tsTryParseAndCatch(()=>{if(!s&&this.atPossibleAsyncArrow(e)){let f=this.tsTryParseGenericAsyncArrowFunction(t);if(f)return f}let c=this.tsParseTypeArgumentsInExpression();if(!c)return;if(o&&!this.match(10)){a=this.state.curPosition();return}if(gn(this.state.type)){let f=super.parseTaggedTemplateExpression(e,t,i);return f.typeParameters=c,f}if(!s&&this.eat(10)){let f=this.startNodeAt(t);return f.callee=e,f.arguments=this.parseCallExpressionArguments(11),this.tsCheckForInvalidTypeCasts(f.arguments),f.typeParameters=c,i.optionalChainMember&&(f.optional=o),this.finishCallExpression(f,i.optionalChainMember)}let p=this.state.type;if(p===48||p===52||p!==10&&fs(p)&&!this.hasPrecedingLineBreak())return;let u=this.startNodeAt(t);return u.expression=e,u.typeParameters=c,this.finishNode(u,"TSInstantiationExpression")});if(a&&this.unexpected(a,10),l)return l.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(k.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),l}return super.parseSubscript(e,t,s,i)}parseNewCallee(e){var t;super.parseNewCallee(e);let{callee:s}=e;s.type==="TSInstantiationExpression"&&!((t=s.extra)!=null&&t.parenthesized)&&(e.typeParameters=s.typeParameters,e.callee=s.expression)}parseExprOp(e,t,s){let i;if(mn(58)>s&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(i=this.isContextual(120)))){let o=this.startNodeAt(t);return o.expression=e,o.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(i&&this.raise(b.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(o,i?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(o,t,s)}return super.parseExprOp(e,t,s)}checkReservedWord(e,t,s,i){this.state.isAmbientContext||super.checkReservedWord(e,t,s,i)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(k.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){let t=this.lookaheadCharCode();return e?t===123||t===42:t!==61}return!e&&this.isContextual(87)}applyImportPhase(e,t,s,i){super.applyImportPhase(e,t,s,i),t?e.exportKind=s==="type"?"type":"value":e.importKind=s==="type"||s==="typeof"?s:"value"}parseImport(e){if(this.match(134))return e.importKind="value",super.parseImport(e);let t;if(B(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let s=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,s);t=super.parseImportSpecifiersAndAfter(e,s)}else t=super.parseImport(e);return t.importKind==="type"&&t.specifiers.length>1&&t.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(k.TypeImportCannotSpecifyDefaultAndNamed,t),t}parseExport(e,t){if(this.match(83)){this.next();let s=e,i=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?i=this.parseMaybeImportPhase(s,!1):s.importKind="value",this.tsParseImportEqualsDeclaration(s,i,!0)}else if(this.eat(29)){let s=e;return s.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(s,"TSExportAssignment")}else if(this.eatContextual(93)){let s=e;return this.expectContextual(128),s.id=this.parseIdentifier(),this.semicolon(),this.finishNode(s,"TSNamespaceExportDeclaration")}else return super.parseExport(e,t)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,s=!1){let{isAmbientContext:i}=this.state,o=super.parseVarStatement(e,t,s||i);if(!i)return o;for(let{id:a,init:l}of o.declarations)l&&(t!=="const"||a.typeAnnotation?this.raise(k.InitializerNotAllowedInAmbientContext,l):Sl(l,this.hasPlugin("estree"))||this.raise(k.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,l));return o}parseStatementContent(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){let s=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(s,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let s=this.tsParseInterfaceDeclaration(this.startNode());if(s)return s}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some(s=>ei(s)?e.accessibility===s:!!e[s])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,t,s){let i=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:i,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:k.InvalidModifierOnTypeParameterPositions},t);let o=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,i)&&this.raise(k.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,s,!!t.static)};t.declare?this.tsInAmbientContext(o):o()}parseClassMemberWithIsStatic(e,t,s,i){let o=this.tsTryParseIndexSignature(t);if(o){e.body.push(o),t.abstract&&this.raise(k.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(k.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(k.IndexSignatureHasDeclare,t),t.override&&this.raise(k.IndexSignatureHasOverride,t);return}!this.state.inAbstractClass&&t.abstract&&this.raise(k.NonAbstractClassHasAbstractMethod,t),t.override&&(s.hadSuperClass||this.raise(k.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,s,i)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(k.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(k.ClassMethodHasDeclare,e)}parseExpressionStatement(e,t,s){return(t.type==="Identifier"?this.tsParseExpressionStatement(e,t,s):void 0)||super.parseExpressionStatement(e,t,s)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,t,s){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,t,s);let i=this.tryParse(()=>super.parseConditional(e,t));return i.node?(i.error&&(this.state=i.failState),i.node):(i.error&&super.setOptionalParametersError(s,i.error),e)}parseParenItem(e,t){let s=super.parseParenItem(e,t);if(this.eat(17)&&(s.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(t);return i.expression=e,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let t=this.state.startLoc,s=this.eatContextual(125);if(s&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(k.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let o=B(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return o?((o.type==="TSInterfaceDeclaration"||o.type==="TSTypeAliasDeclaration"||s)&&(e.exportKind="type"),s&&(this.resetStartLocation(o,t),o.declare=!0),o):null}parseClassId(e,t,s,i){if((!t||s)&&this.isContextual(113))return;super.parseClassId(e,t,s,e.declare?1024:8331);let o=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);o&&(e.typeParameters=o)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(k.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){let{key:t}=e;this.raise(k.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:t.type==="Identifier"&&!e.computed?t.name:`[${this.input.slice(this.offsetToSourcePos(t.start),this.offsetToSourcePos(t.end))}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(k.PrivateElementHasAbstract,e),e.accessibility&&this.raise(k.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(k.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,s,i,o,a){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);l&&o&&this.raise(k.ConstructorHasTypeParameters,l);let{declare:c=!1,kind:p}=t;c&&(p==="get"||p==="set")&&this.raise(k.DeclareAccessor,t,{kind:p}),l&&(t.typeParameters=l),super.pushClassMethod(e,t,s,i,o,a)}pushClassPrivateMethod(e,t,s,i){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&(t.typeParameters=o),super.pushClassPrivateMethod(e,t,s,i)}declareClassPrivateMethodInScope(e,t){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!hasOwnProperty.call(e.value,"body")||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,t,s,i,o,a,l){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);return c&&(e.typeParameters=c),super.parseObjPropValue(e,t,s,i,o,a,l)}parseFunctionParams(e,t){let s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&(e.typeParameters=s),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let s=this.tsTryParseTypeAnnotation();s&&(e.id.typeAnnotation=s,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var s,i,o,a,l;let c,p,u;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(c=this.state.clone(),p=this.tryParse(()=>super.parseMaybeAssign(e,t),c),!p.error)return p.node;let{context:d}=this.state,g=d[d.length-1];(g===V.j_oTag||g===V.j_expr)&&d.pop()}if(!((s=p)!=null&&s.error)&&!this.match(47))return super.parseMaybeAssign(e,t);(!c||c===this.state)&&(c=this.state.clone());let f,m=this.tryParse(d=>{var g,h;f=this.tsParseTypeParameters(this.tsParseConstModifier);let y=super.parseMaybeAssign(e,t);return(y.type!=="ArrowFunctionExpression"||(g=y.extra)!=null&&g.parenthesized)&&d(),((h=f)==null?void 0:h.params.length)!==0&&this.resetStartLocationFromNode(y,f),y.typeParameters=f,y},c);if(!m.error&&!m.aborted)return f&&this.reportReservedArrowTypeParam(f),m.node;if(!p&&(Zr(!this.hasPlugin("jsx")),u=this.tryParse(()=>super.parseMaybeAssign(e,t),c),!u.error))return u.node;if((i=p)!=null&&i.node)return this.state=p.failState,p.node;if(m.node)return this.state=m.failState,f&&this.reportReservedArrowTypeParam(f),m.node;if((o=u)!=null&&o.node)return this.state=u.failState,u.node;throw((a=p)==null?void 0:a.error)||m.error||((l=u)==null?void 0:l.error)}reportReservedArrowTypeParam(e){var t;e.params.length===1&&!e.params[0].constraint&&!((t=e.extra)!=null&&t.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(k.ReservedArrowTypeParam,e)}parseMaybeUnary(e,t){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(s=>{let i=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&s(),i});if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseFunctionParamType(e){this.eat(17)&&(e.optional=!0);let t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,t);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":t?this.expressionScope.recordArrowParameterBindingError(k.UnexpectedTypeCastInParameter,e):this.raise(k.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,t);break;case"AssignmentExpression":!t&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;default:super.toAssignable(e,t)}}checkToRestConversion(e,t){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,s){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(s!==64||!t)&&["expression",!0];default:return super.isValidLVal(e,t,s)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let t=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let s=super.parseMaybeDecoratorArguments(e);return s.typeParameters=t,s}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){let s=super.parseMaybeDefault(e,t);return s.type==="AssignmentPattern"&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(k.TypeAnnotationAfterAssign,s.typeAnnotation),s}getTokenFromCode(e){if(this.state.inType){if(e===62){this.finishOp(48,1);return}if(e===60){this.finishOp(47,1);return}}super.getTokenFromCode(e)}reScan_lt_gt(){let{type:e}=this.state;e===47?(this.state.pos-=1,this.readToken_lt()):e===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return e===51?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableList(e,t,s){for(let i=0;i<e.length;i++){let o=e[i];o?.type==="TSTypeCastExpression"&&(e[i]=this.typeCastToParameter(o))}super.toAssignableList(e,t,s)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every(t=>this.isAssignable(t,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let t=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let t=super.getGetterSetterExpectedParamCount(e),i=this.getObjectOrClassMethodParams(e)[0];return i&&this.isThisParam(i)?t+1:t}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){let{isAmbientContext:t,strict: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){let 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(80))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(k.NonClassMethodPropertyHasAbstractModifer,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,t,s,i,o,a,l){let c=super.parseMethod(e,t,s,i,o,a,l);if(c.abstract&&(this.hasPlugin("estree")?!!c.value.body:!!c.body)){let{key:u}=c;this.raise(k.AbstractMethodHasImplementation,c,{methodName:u.type==="Identifier"&&!c.computed?u.name:`[${this.input.slice(this.offsetToSourcePos(u.start),this.offsetToSourcePos(u.end))}]`})}return c}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,t,s,i){return!t&&i?(this.parseTypeOnlyImportExportSpecifier(e,!1,s),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,s,i))}parseImportSpecifier(e,t,s,i,o){return!t&&i?(this.parseTypeOnlyImportExportSpecifier(e,!0,s),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,s,i,s?4098:4096))}parseTypeOnlyImportExportSpecifier(e,t,s){let i=t?"imported":"local",o=t?"local":"exported",a=e[i],l,c=!1,p=!0,u=a.loc.start;if(this.isContextual(93)){let m=this.parseIdentifier();if(this.isContextual(93)){let d=this.parseIdentifier();we(this.state.type)?(c=!0,a=m,l=t?this.parseIdentifier():this.parseModuleExportName(),p=!1):(l=d,p=!1)}else we(this.state.type)?(p=!1,l=t?this.parseIdentifier():this.parseModuleExportName()):(c=!0,a=m)}else we(this.state.type)&&(c=!0,t?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());c&&s&&this.raise(t?k.TypeModifierIsUsedInTypeImports:k.TypeModifierIsUsedInTypeExports,u),e[i]=a,e[o]=l;let f=t?"importKind":"exportKind";e[f]=c?"type":"value",p&&this.eatContextual(93)&&(e[o]=t?this.parseIdentifier():this.parseModuleExportName()),e[o]||(e[o]=_e(e[i])),t&&this.checkIdentifier(e[o],c?4098:4096)}};function Cl(r){if(r.type!=="MemberExpression")return!1;let{computed:n,property:e}=r;return n&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:yi(r.object)}function Sl(r,n){var e;let{type:t}=r;if((e=r.extra)!=null&&e.parenthesized)return!1;if(n){if(t==="Literal"){let{value:s}=r;if(typeof s=="string"||typeof s=="boolean")return!0}}else if(t==="StringLiteral"||t==="BooleanLiteral")return!0;return!!(gi(r,n)||Il(r,n)||t==="TemplateLiteral"&&r.expressions.length===0||Cl(r))}function gi(r,n){return n?r.type==="Literal"&&(typeof r.value=="number"||"bigint"in r):r.type==="NumericLiteral"||r.type==="BigIntLiteral"}function Il(r,n){if(r.type==="UnaryExpression"){let{operator:e,argument:t}=r;if(e==="-"&&gi(t,n))return!0}return!1}function yi(r){return r.type==="Identifier"?!0:r.type!=="MemberExpression"||r.computed?!1:yi(r.object)}var ti=Re`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),El=r=>class extends r{parsePlaceholder(e){if(this.match(133)){let t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){let s=e;return(!s.expectedNode||!s.type)&&(s=this.finishNode(s,"Placeholder")),s.expectedNode=t,s}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,t,s,i){e!==void 0&&super.checkReservedWord(e,t,s,i)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,s){return e==="Placeholder"||super.isValidLVal(e,t,s)}toAssignable(e,t){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){return!!(super.chStartsBindingIdentifier(e,t)||this.lookahead().type===133)}verifyBreakContinue(e,t){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){var s;if(t.type!=="Placeholder"||(s=t.extra)!=null&&s.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){let o=e;return o.label=this.finishPlaceholder(t,"Identifier"),this.next(),o.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(o,"LabeledStatement")}this.semicolon();let i=e;return i.name=t.name,this.finishPlaceholder(i,"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){let i=t?"ClassDeclaration":"ClassExpression";this.next();let o=this.state.strict,a=this.parsePlaceholder("Identifier");if(a)if(this.match(81)||this.match(133)||this.match(5))e.id=a;else{if(s||!t)return e.id=null,e.body=this.finishPlaceholder(a,"ClassBody"),this.finishNode(e,i);throw this.raise(ti.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,t,s);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,o),this.finishNode(e,i)}parseExport(e,t){let s=this.parsePlaceholder("Identifier");if(!s)return super.parseExport(e,t);let i=e;if(!this.isContextual(98)&&!this.match(12))return i.specifiers=[],i.source=null,i.declaration=this.finishPlaceholder(s,"Declaration"),this.finishNode(i,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let o=this.startNode();return o.exported=s,i.specifiers=[this.finishNode(o,"ExportDefaultSpecifier")],super.parseExport(i,t)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith($e(133),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var s;return(s=e.specifiers)!=null&&s.length?!0:super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){let{specifiers:t}=e;t!=null&&t.length&&(e.specifiers=t.filter(s=>s.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=t}parseImport(e){let t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let s=this.startNodeAtNode(t);return s.local=t,e.specifiers.push(this.finishNode(s,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(ti.UnexpectedSpace,this.state.lastTokEndLoc)}},Al=r=>class extends r{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,t=this.startNode();if(this.next(),B(this.state.type)){let s=this.parseIdentifierName(),i=this.createIdentifier(t,s);if(i.type="V8IntrinsicIdentifier",this.match(10))return i}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},ni=["minimal","fsharp","hack","smart"],si=["^^","@@","^","%","#"];function kl(r){if(r.has("decorators")){if(r.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let e=r.get("decorators").decoratorsBeforeExport;if(e!=null&&typeof e!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let t=r.get("decorators").allowCallParenthesized;if(t!=null&&typeof t!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(r.has("flow")&&r.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(r.has("placeholders")&&r.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(r.has("pipelineOperator")){var n;let e=r.get("pipelineOperator").proposal;if(!ni.includes(e)){let s=ni.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${s}.`)}let t=((n=r.get("recordAndTuple"))==null?void 0:n.syntaxType)==="hash";if(e==="hack"){if(r.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(r.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let s=r.get("pipelineOperator").topicToken;if(!si.includes(s)){let i=si.map(o=>`"${o}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}if(s==="#"&&t)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",r.get("recordAndTuple")])}\`.`)}else if(e==="smart"&&t)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",r.get("recordAndTuple")])}\`.`)}if(r.has("moduleAttributes")){if(r.has("deprecatedImportAssert")||r.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(r.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(r.has("importAssertions")&&r.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(!r.has("deprecatedImportAssert")&&r.has("importAttributes")&&r.get("importAttributes").deprecatedAssertSyntax&&r.set("deprecatedImportAssert",{}),r.has("recordAndTuple")){let e=r.get("recordAndTuple").syntaxType;if(e!=null){let t=["hash","bar"];if(!t.includes(e))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+t.map(s=>`'${s}'`).join(", "))}}if(r.has("asyncDoExpressions")&&!r.has("doExpressions")){let e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(r.has("optionalChainingAssign")&&r.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var vi={estree:Da,jsx:vl,flow:gl,typescript:wl,v8intrinsic:Al,placeholders:El},Nl=Object.keys(vi);function Dl(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function Ml(r){let n=Dl();if(r==null)return n;if(r.annexB!=null&&r.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let e of Object.keys(n))r[e]!=null&&(n[e]=r[e]);if(n.startLine===1)r.startIndex==null&&n.startColumn>0?n.startIndex=n.startColumn:r.startColumn==null&&n.startIndex>0&&(n.startColumn=n.startIndex);else if((r.startColumn==null||r.startIndex==null)&&r.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");return n}var Ds=class extends Ns{checkProto(n,e,t,s){if(n.type==="SpreadElement"||this.isObjectMethod(n)||n.computed||n.shorthand)return;let i=n.key;if((i.type==="Identifier"?i.name:i.value)==="__proto__"){if(e){this.raise(b.RecordNoProto,i);return}t.used&&(s?s.doubleProtoLoc===null&&(s.doubleProtoLoc=i.loc.start):this.raise(b.DuplicateProto,i)),t.used=!0}}shouldExitDescending(n,e){return n.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(n.start)===e}getExpression(){this.enterInitialScopes(),this.nextToken();let n=this.parseExpression();return this.match(140)||this.unexpected(),this.finalizeRemainingComments(),n.comments=this.comments,n.errors=this.state.errors,this.options.tokens&&(n.tokens=this.tokens),n}parseExpression(n,e){return n?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(n){let e=this.state.startLoc,t=this.parseMaybeAssign(n);if(this.match(12)){let s=this.startNodeAt(e);for(s.expressions=[t];this.eat(12);)s.expressions.push(this.parseMaybeAssign(n));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return t}parseMaybeAssignDisallowIn(n,e){return this.disallowInAnd(()=>this.parseMaybeAssign(n,e))}parseMaybeAssignAllowIn(n,e){return this.allowInAnd(()=>this.parseMaybeAssign(n,e))}setOptionalParametersError(n,e){var t;n.optionalParametersLoc=(t=e?.loc)!=null?t:this.state.startLoc}parseMaybeAssign(n,e){let t=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let a=this.parseYield();return e&&(a=e.call(this,a,t)),a}let s;n?s=!1:(n=new lt,s=!0);let{type:i}=this.state;(i===10||B(i))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(n);if(e&&(o=e.call(this,o,t)),Ua(this.state.type)){let a=this.startNodeAt(t),l=this.state.value;if(a.operator=l,this.match(29)){this.toAssignable(o,!0),a.left=o;let c=t.index;n.doubleProtoLoc!=null&&n.doubleProtoLoc.index>=c&&(n.doubleProtoLoc=null),n.shorthandAssignLoc!=null&&n.shorthandAssignLoc.index>=c&&(n.shorthandAssignLoc=null),n.privateKeyLoc!=null&&n.privateKeyLoc.index>=c&&(this.checkDestructuringPrivate(n),n.privateKeyLoc=null)}else a.left=o;return this.next(),a.right=this.parseMaybeAssign(),this.checkLVal(o,this.finishNode(a,"AssignmentExpression")),a}else s&&this.checkExpressionErrors(n,!0);return o}parseMaybeConditional(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,s=this.parseExprOps(n);return this.shouldExitDescending(s,t)?s:this.parseConditional(s,e,n)}parseConditional(n,e,t){if(this.eat(17)){let s=this.startNodeAt(e);return s.test=n,s.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),s.alternate=this.parseMaybeAssign(),this.finishNode(s,"ConditionalExpression")}return n}parseMaybeUnaryOrPrivate(n){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(n)}parseExprOps(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,s=this.parseMaybeUnaryOrPrivate(n);return this.shouldExitDescending(s,t)?s:this.parseExprOp(s,e,-1)}parseExprOp(n,e,t){if(this.isPrivateName(n)){let i=this.getPrivateNameSV(n);(t>=mn(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(b.PrivateInExpectedIn,n,{identifierName:i}),this.classScope.usePrivateName(i,n.loc.start)}let s=this.state.type;if(_a(s)&&(this.prodParam.hasIn||!this.match(58))){let i=mn(s);if(i>t){if(s===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return n;this.checkPipelineAtInfixOperator(n,e)}let o=this.startNodeAt(e);o.left=n,o.operator=this.state.value;let a=s===41||s===42,l=s===40;if(l&&(i=mn(42)),this.next(),s===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(b.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);o.right=this.parseExprOpRightExpr(s,i);let c=this.finishNode(o,a||l?"LogicalExpression":"BinaryExpression"),p=this.state.type;if(l&&(p===41||p===42)||a&&p===40)throw this.raise(b.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,e,t)}}return n}parseExprOpRightExpr(n,e){let t=this.state.startLoc;switch(n){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(b.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(n,e),t)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(n,e)}}parseExprOpBaseRightExpr(n,e){let t=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,$a(n)?e-1:e)}parseHackPipeBody(){var n;let{startLoc:e}=this.state,t=this.parseMaybeAssign();return Ia.has(t.type)&&!((n=t.extra)!=null&&n.parenthesized)&&this.raise(b.PipeUnparenthesizedBody,e,{type:t.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipeTopicUnused,e),t}checkExponentialAfterUnary(n){this.match(57)&&this.raise(b.UnexpectedTokenUnaryExponentiation,n.argument)}parseMaybeUnary(n,e){let t=this.state.startLoc,s=this.isContextual(96);if(s&&this.recordAwaitIfAllowed()){this.next();let l=this.parseAwait(t);return e||this.checkExponentialAfterUnary(l),l}let i=this.match(34),o=this.startNode();if(ja(this.state.type)){o.operator=this.state.value,o.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let l=this.match(89);if(this.next(),o.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(n,!0),this.state.strict&&l){let c=o.argument;c.type==="Identifier"?this.raise(b.StrictDelete,o):this.hasPropertyAsPrivateName(c)&&this.raise(b.DeletePrivateField,o)}if(!i)return e||this.checkExponentialAfterUnary(o),this.finishNode(o,"UnaryExpression")}let a=this.parseUpdate(o,i,n);if(s){let{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?fs(l):fs(l)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(b.AwaitNotInAsyncContext,t),this.parseAwait(t)}return a}parseUpdate(n,e,t){if(e){let o=n;return this.checkLVal(o.argument,this.finishNode(o,"UpdateExpression")),n}let s=this.state.startLoc,i=this.parseExprSubscripts(t);if(this.checkExpressionErrors(t,!1))return i;for(;Ba(this.state.type)&&!this.canInsertSemicolon();){let o=this.startNodeAt(s);o.operator=this.state.value,o.prefix=!1,o.argument=i,this.next(),this.checkLVal(i,i=this.finishNode(o,"UpdateExpression"))}return i}parseExprSubscripts(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,s=this.parseExprAtom(n);return this.shouldExitDescending(s,t)?s:this.parseSubscripts(s,e)}parseSubscripts(n,e,t){let s={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(n),stop:!1};do n=this.parseSubscript(n,e,t,s),s.maybeAsyncArrow=!1;while(!s.stop);return n}parseSubscript(n,e,t,s){let{type:i}=this.state;if(!t&&i===15)return this.parseBind(n,e,t,s);if(gn(i))return this.parseTaggedTemplateExpression(n,e,s);let o=!1;if(i===18){if(t&&(this.raise(b.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return s.stop=!0,n;s.optionalChainMember=o=!0,this.next()}if(!t&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(n,e,s,o);{let a=this.eat(0);return a||o||this.eat(16)?this.parseMember(n,e,s,a,o):(s.stop=!0,n)}}parseMember(n,e,t,s,i){let o=this.startNodeAt(e);return o.object=n,o.computed=s,s?(o.property=this.parseExpression(),this.expect(3)):this.match(139)?(n.type==="Super"&&this.raise(b.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),o.property=this.parsePrivateName()):o.property=this.parseIdentifier(!0),t.optionalChainMember?(o.optional=i,this.finishNode(o,"OptionalMemberExpression")):this.finishNode(o,"MemberExpression")}parseBind(n,e,t,s){let i=this.startNodeAt(e);return i.object=n,this.next(),i.callee=this.parseNoCallExpr(),s.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),e,t)}parseCoverCallAndAsyncArrowHead(n,e,t,s){let i=this.state.maybeInArrowParameters,o=null;this.state.maybeInArrowParameters=!0,this.next();let a=this.startNodeAt(e);a.callee=n;let{maybeAsyncArrow:l,optionalChainMember:c}=t;l&&(this.expressionScope.enter(cl()),o=new lt),c&&(a.optional=s),s?a.arguments=this.parseCallExpressionArguments(11):a.arguments=this.parseCallExpressionArguments(11,n.type!=="Super",a,o);let p=this.finishCallExpression(a,c);return l&&this.shouldParseAsyncArrow()&&!s?(t.stop=!0,this.checkDestructuringPrivate(o),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),p=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),p)):(l&&(this.checkExpressionErrors(o,!0),this.expressionScope.exit()),this.toReferencedArguments(p)),this.state.maybeInArrowParameters=i,p}toReferencedArguments(n,e){this.toReferencedListDeep(n.arguments,e)}parseTaggedTemplateExpression(n,e,t){let s=this.startNodeAt(e);return s.tag=n,s.quasi=this.parseTemplate(!0),t.optionalChainMember&&this.raise(b.OptionalChainingNoTemplate,e),this.finishNode(s,"TaggedTemplateExpression")}atPossibleAsyncArrow(n){return n.type==="Identifier"&&n.name==="async"&&this.state.lastTokEndLoc.index===n.end&&!this.canInsertSemicolon()&&n.end-n.start===5&&this.offsetToSourcePos(n.start)===this.state.potentialArrowAt}finishCallExpression(n,e){if(n.callee.type==="Import")if(n.arguments.length===0||n.arguments.length>2)this.raise(b.ImportCallArity,n);else for(let t of n.arguments)t.type==="SpreadElement"&&this.raise(b.ImportCallSpreadArgument,t);return this.finishNode(n,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(n,e,t,s){let i=[],o=!0,a=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(n);){if(o)o=!1;else if(this.expect(12),this.match(n)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}i.push(this.parseExprListItem(!1,s,e))}return this.state.inFSharpPipelineDirectBody=a,i}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(n,e){var t;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(n,e.arguments,!0,(t=e.extra)==null?void 0:t.trailingCommaLoc),e.innerComments&&Rt(n,e.innerComments),e.callee.trailingComments&&Rt(n,e.callee.trailingComments),n}parseNoCallExpr(){let n=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),n,!0)}parseExprAtom(n){let e,t=null,{type:s}=this.state;switch(s){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.options.createImportExpressions?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(b.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let i=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(i)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,n);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,n);case 68:return this.parseFunctionOrFunctionSent();case 26:t=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(t,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;let i=e.callee=this.parseNoCallExpr();if(i.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(b.UnsupportedBind,i)}case 139:return this.raise(b.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let i=this.getPluginOption("pipelineOperator","proposal");if(i)return this.parseTopicReference(i);this.unexpected();break}case 47:{let i=this.input.codePointAt(this.nextTokenStart());Ue(i)||i===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(s===137)return this.parseDecimalLiteral(this.state.value);if(B(s)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let i=this.state.potentialArrowAt===this.state.start,o=this.state.containsEsc,a=this.parseIdentifier();if(!o&&a.name==="async"&&!this.canInsertSemicolon()){let{type:l}=this.state;if(l===68)return this.resetPreviousNodeTrailingComments(a),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(a));if(B(l))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(a)):a;if(l===90)return this.resetPreviousNodeTrailingComments(a),this.parseDo(this.startNodeAtNode(a),!0)}return i&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(a),[a],!1)):a}else this.unexpected()}}parseTopicReferenceThenEqualsSign(n,e){let t=this.getPluginOption("pipelineOperator","proposal");if(t)return this.state.type=n,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=se(this.state.endLoc,-1),this.parseTopicReference(t);this.unexpected()}parseTopicReference(n){let e=this.startNode(),t=this.state.startLoc,s=this.state.type;return this.next(),this.finishTopicReference(e,t,n,s)}finishTopicReference(n,e,t,s){if(this.testTopicReferenceConfiguration(t,e,s)){let i=t==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(t==="smart"?b.PrimaryTopicNotAllowed:b.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(n,i)}else throw this.raise(b.PipeTopicUnconfiguredToken,e,{token:$e(s)})}testTopicReferenceConfiguration(n,e,t){switch(n){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:$e(t)}]);case"smart":return t===27;default:throw this.raise(b.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(n){this.prodParam.enter(hn(!0,this.prodParam.hasYield));let e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(b.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(n,e,!0)}parseDo(n,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),n.async=e,this.next();let t=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),n.body=this.parseBlock(),this.prodParam.exit()):n.body=this.parseBlock(),this.state.labels=t,this.finishNode(n,"DoExpression")}parseSuper(){let n=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(b.SuperNotAllowed,n):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(b.UnexpectedSuper,n),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(b.UnsupportedSuper,n),this.finishNode(n,"Super")}parsePrivateName(){let n=this.startNode(),e=this.startNodeAt(se(this.state.startLoc,1)),t=this.state.value;return this.next(),n.id=this.createIdentifier(e,t),this.finishNode(n,"PrivateName")}parseFunctionOrFunctionSent(){let n=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(n),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(n,e,"sent")}return this.parseFunction(n)}parseMetaProperty(n,e,t){n.meta=e;let s=this.state.containsEsc;return n.property=this.parseIdentifier(!0),(n.property.name!==t||s)&&this.raise(b.UnsupportedMetaProperty,n.property,{target:e.name,onlyValidPropertyName:t}),this.finishNode(n,"MetaProperty")}parseImportMetaProperty(n){let e=this.createIdentifier(this.startNodeAtNode(n),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(b.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let t=this.isContextual(105);if(t||this.unexpected(),this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(b.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),n.phase=t?"source":"defer",this.parseImportCall(n)}return this.parseMetaProperty(n,e,"meta")}parseLiteralAtNode(n,e,t){return this.addExtra(t,"rawValue",n),this.addExtra(t,"raw",this.input.slice(this.offsetToSourcePos(t.start),this.state.end)),t.value=n,this.next(),this.finishNode(t,e)}parseLiteral(n,e){let t=this.startNode();return this.parseLiteralAtNode(n,e,t)}parseStringLiteral(n){return this.parseLiteral(n,"StringLiteral")}parseNumericLiteral(n){return this.parseLiteral(n,"NumericLiteral")}parseBigIntLiteral(n){return this.parseLiteral(n,"BigIntLiteral")}parseDecimalLiteral(n){return this.parseLiteral(n,"DecimalLiteral")}parseRegExpLiteral(n){let e=this.startNode();return this.addExtra(e,"raw",this.input.slice(this.offsetToSourcePos(e.start),this.state.end)),e.pattern=n.pattern,e.flags=n.flags,this.next(),this.finishNode(e,"RegExpLiteral")}parseBooleanLiteral(n){let e=this.startNode();return e.value=n,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){let n=this.startNode();return this.next(),this.finishNode(n,"NullLiteral")}parseParenAndDistinguishExpression(n){let e=this.state.startLoc,t;this.next(),this.expressionScope.enter(ll());let s=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let o=this.state.startLoc,a=[],l=new lt,c=!0,p,u;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,l.optionalParametersLoc===null?null:l.optionalParametersLoc),this.match(11)){u=this.state.startLoc;break}if(this.match(21)){let d=this.state.startLoc;if(p=this.state.startLoc,a.push(this.parseParenItem(this.parseRestBinding(),d)),!this.checkCommaAfterRest(41))break}else a.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}let f=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=s,this.state.inFSharpPipelineDirectBody=i;let m=this.startNodeAt(e);return n&&this.shouldParseArrow(a)&&(m=this.parseArrow(m))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(m,a,!1),m):(this.expressionScope.exit(),a.length||this.unexpected(this.state.lastTokStartLoc),u&&this.unexpected(u),p&&this.unexpected(p),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(a,!0),a.length>1?(t=this.startNodeAt(o),t.expressions=a,this.finishNode(t,"SequenceExpression"),this.resetEndLocation(t,f)):t=a[0],this.wrapParenthesis(e,t))}wrapParenthesis(n,e){if(!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",n.index),this.takeSurroundingComments(e,n.index,this.state.lastTokEndLoc.index),e;let t=this.startNodeAt(n);return t.expression=e,this.finishNode(t,"ParenthesizedExpression")}shouldParseArrow(n){return!this.canInsertSemicolon()}parseArrow(n){if(this.eat(19))return n}parseParenItem(n,e){return n}parseNewOrNewTarget(){let n=this.startNode();if(this.next(),this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(n),"new");this.next();let t=this.parseMetaProperty(n,e,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(b.UnexpectedNewTarget,t),t}return this.parseNew(n)}parseNew(n){if(this.parseNewCallee(n),this.eat(10)){let e=this.parseExprList(11);this.toReferencedList(e),n.arguments=e}else n.arguments=[];return this.finishNode(n,"NewExpression")}parseNewCallee(n){let e=this.match(83),t=this.parseNoCallExpr();n.callee=t,e&&(t.type==="Import"||t.type==="ImportExpression")&&this.raise(b.ImportCallNotNewExpression,t)}parseTemplateElement(n){let{start:e,startLoc:t,end:s,value:i}=this.state,o=e+1,a=this.startNodeAt(se(t,1));i===null&&(n||this.raise(b.InvalidEscapeSequenceTemplate,se(this.state.firstInvalidTemplateEscapePos,1)));let l=this.match(24),c=l?-1:-2,p=s+c;a.value={raw:this.input.slice(o,p).replace(/\r\n?/g,`
9
- `),cooked:i===null?null:i.slice(1,c)},a.tail=l,this.next();let u=this.finishNode(a,"TemplateElement");return this.resetEndLocation(u,se(this.state.lastTokEndLoc,c)),u}parseTemplate(n){let e=this.startNode(),t=this.parseTemplateElement(n),s=[t],i=[];for(;!t.tail;)i.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),s.push(t=this.parseTemplateElement(n));return e.expressions=i,e.quasis=s,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(n,e,t,s){t&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=Object.create(null),a=!0,l=this.startNode();for(l.properties=[],this.next();!this.match(n);){if(a)a=!1;else if(this.expect(12),this.match(n)){this.addTrailingCommaExtraToNode(l);break}let p;e?p=this.parseBindingProperty():(p=this.parsePropertyDefinition(s),this.checkProto(p,t,o,s)),t&&!this.isObjectProperty(p)&&p.type!=="SpreadElement"&&this.raise(b.InvalidRecordProperty,p),p.shorthand&&this.addExtra(p,"shorthand",!0),l.properties.push(p)}this.next(),this.state.inFSharpPipelineDirectBody=i;let c="ObjectExpression";return e?c="ObjectPattern":t&&(c="RecordExpression"),this.finishNode(l,c)}addTrailingCommaExtraToNode(n){this.addExtra(n,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(n,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(n){return!n.computed&&n.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(n){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(b.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let t=this.startNode(),s=!1,i=!1,o;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(t.decorators=e,e=[]),t.method=!1,n&&(o=this.state.startLoc);let a=this.eat(55);this.parsePropertyNamePrefixOperator(t);let l=this.state.containsEsc;if(this.parsePropertyName(t,n),!a&&!l&&this.maybeAsyncOrAccessorProp(t)){let{key:c}=t,p=c.name;p==="async"&&!this.hasPrecedingLineBreak()&&(s=!0,this.resetPreviousNodeTrailingComments(c),a=this.eat(55),this.parsePropertyName(t)),(p==="get"||p==="set")&&(i=!0,this.resetPreviousNodeTrailingComments(c),t.kind=p,this.match(55)&&(a=!0,this.raise(b.AccessorIsGenerator,this.state.curPosition(),{kind:p}),this.next()),this.parsePropertyName(t))}return this.parseObjPropValue(t,o,a,s,!1,i,n)}getGetterSetterExpectedParamCount(n){return n.kind==="get"?0:1}getObjectOrClassMethodParams(n){return n.params}checkGetterSetterParams(n){var e;let t=this.getGetterSetterExpectedParamCount(n),s=this.getObjectOrClassMethodParams(n);s.length!==t&&this.raise(n.kind==="get"?b.BadGetterArity:b.BadSetterArity,n),n.kind==="set"&&((e=s[s.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(b.BadSetterRestParameter,n)}parseObjectMethod(n,e,t,s,i){if(i){let o=this.parseMethod(n,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(o),o}if(t||e||this.match(10))return s&&this.unexpected(),n.kind="method",n.method=!0,this.parseMethod(n,e,t,!1,!1,"ObjectMethod")}parseObjectProperty(n,e,t,s){if(n.shorthand=!1,this.eat(14))return n.value=t?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(s),this.finishNode(n,"ObjectProperty");if(!n.computed&&n.key.type==="Identifier"){if(this.checkReservedWord(n.key.name,n.key.loc.start,!0,!1),t)n.value=this.parseMaybeDefault(e,_e(n.key));else if(this.match(29)){let i=this.state.startLoc;s!=null?s.shorthandAssignLoc===null&&(s.shorthandAssignLoc=i):this.raise(b.InvalidCoverInitializedName,i),n.value=this.parseMaybeDefault(e,_e(n.key))}else n.value=_e(n.key);return n.shorthand=!0,this.finishNode(n,"ObjectProperty")}}parseObjPropValue(n,e,t,s,i,o,a){let l=this.parseObjectMethod(n,t,s,i,o)||this.parseObjectProperty(n,e,i,a);return l||this.unexpected(),l}parsePropertyName(n,e){if(this.eat(0))n.computed=!0,n.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:t,value:s}=this.state,i;if(we(t))i=this.parseIdentifier(!0);else switch(t){case 135:i=this.parseNumericLiteral(s);break;case 134:i=this.parseStringLiteral(s);break;case 136:i=this.parseBigIntLiteral(s);break;case 139:{let o=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=o):this.raise(b.UnexpectedPrivateField,o),i=this.parsePrivateName();break}default:if(t===137){i=this.parseDecimalLiteral(s);break}this.unexpected()}n.key=i,t!==139&&(n.computed=!1)}}initFunction(n,e){n.id=null,n.generator=!1,n.async=e}parseMethod(n,e,t,s,i,o,a=!1){this.initFunction(n,t),n.generator=e,this.scope.enter(18|(a?64:0)|(i?32:0)),this.prodParam.enter(hn(t,n.generator)),this.parseFunctionParams(n,s);let l=this.parseFunctionBodyAndFinish(n,o,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(n,e,t,s){t&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=this.startNode();return this.next(),o.elements=this.parseExprList(n,!t,s,o),this.state.inFSharpPipelineDirectBody=i,this.finishNode(o,t?"TupleExpression":"ArrayExpression")}parseArrowExpression(n,e,t,s){this.scope.enter(6);let i=hn(t,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(n,t);let o=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(n,e,s)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(n,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=o,this.finishNode(n,"ArrowFunctionExpression")}setArrowFunctionParameters(n,e,t){this.toAssignableList(e,t,!1),n.params=e}parseFunctionBodyAndFinish(n,e,t=!1){return this.parseFunctionBody(n,!1,t),this.finishNode(n,e)}parseFunctionBody(n,e,t=!1){let s=e&&!this.match(5);if(this.expressionScope.enter(hi()),s)n.body=this.parseMaybeAssign(),this.checkParams(n,!1,e,!1);else{let i=this.state.strict,o=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),n.body=this.parseBlock(!0,!1,a=>{let l=!this.isSimpleParamList(n.params);a&&l&&this.raise(b.IllegalLanguageModeDirective,(n.kind==="method"||n.kind==="constructor")&&n.key?n.key.loc.end:n);let c=!i&&this.state.strict;this.checkParams(n,!this.state.strict&&!e&&!t&&!l,e,c),this.state.strict&&n.id&&this.checkIdentifier(n.id,65,c)}),this.prodParam.exit(),this.state.labels=o}this.expressionScope.exit()}isSimpleParameter(n){return n.type==="Identifier"}isSimpleParamList(n){for(let e=0,t=n.length;e<t;e++)if(!this.isSimpleParameter(n[e]))return!1;return!0}checkParams(n,e,t,s=!0){let i=!e&&new Set,o={type:"FormalParameters"};for(let a of n.params)this.checkLVal(a,o,5,i,s)}parseExprList(n,e,t,s){let i=[],o=!0;for(;!this.eat(n);){if(o)o=!1;else if(this.expect(12),this.match(n)){s&&this.addTrailingCommaExtraToNode(s),this.next();break}i.push(this.parseExprListItem(e,t))}return i}parseExprListItem(n,e,t){let s;if(this.match(12))n||this.raise(b.UnexpectedToken,this.state.curPosition(),{unexpected:","}),s=null;else if(this.match(21)){let i=this.state.startLoc;s=this.parseParenItem(this.parseSpread(e),i)}else if(this.match(17)){this.expectPlugin("partialApplication"),t||this.raise(b.UnexpectedArgumentPlaceholder,this.state.startLoc);let i=this.startNode();this.next(),s=this.finishNode(i,"ArgumentPlaceholder")}else s=this.parseMaybeAssignAllowIn(e,this.parseParenItem);return s}parseIdentifier(n){let e=this.startNode(),t=this.parseIdentifierName(n);return this.createIdentifier(e,t)}createIdentifier(n,e){return n.name=e,n.loc.identifierName=e,this.finishNode(n,"Identifier")}parseIdentifierName(n){let e,{startLoc:t,type:s}=this.state;we(s)?e=this.state.value:this.unexpected();let i=Oa(s);return n?i&&this.replaceToken(132):this.checkReservedWord(e,t,i,!1),this.next(),e}checkReservedWord(n,e,t,s){if(n.length>10||!Za(n))return;if(t&&Ja(n)){this.raise(b.UnexpectedKeyword,e,{keyword:n});return}if((this.state.strict?s?ui:ci:li)(n,this.inModule)){this.raise(b.UnexpectedReservedWord,e,{reservedWord:n});return}else if(n==="yield"){if(this.prodParam.hasYield){this.raise(b.YieldBindingIdentifier,e);return}}else if(n==="await"){if(this.prodParam.hasAwait){this.raise(b.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(b.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(n==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(b.ArgumentsInClass,e);return}}recordAwaitIfAllowed(){let n=this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction;return n&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),n}parseAwait(n){let e=this.startNodeAt(n);return this.expressionScope.recordParameterInitializerError(b.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(b.ObsoleteAwaitStar,e),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:n}=this.state;return n===53||n===10||n===0||gn(n)||n===102&&!this.state.containsEsc||n===138||n===56||this.hasPlugin("v8intrinsic")&&n===54}parseYield(){let n=this.startNode();this.expressionScope.recordParameterInitializerError(b.YieldInParameter,n),this.next();let e=!1,t=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:t=this.parseMaybeAssign()}return n.delegate=e,n.argument=t,this.finishNode(n,"YieldExpression")}parseImportCall(n){if(this.next(),n.source=this.parseMaybeAssignAllowIn(),n.options=null,this.eat(12)&&!this.match(11)&&(n.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(b.ImportCallArity,n)}return this.expect(11),this.finishNode(n,"ImportExpression")}checkPipelineAtInfixOperator(n,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&n.type==="SequenceExpression"&&this.raise(b.PipelineHeadSequenceExpression,e)}parseSmartPipelineBodyInStyle(n,e){if(this.isSimpleReference(n)){let t=this.startNodeAt(e);return t.callee=n,this.finishNode(t,"PipelineBareFunction")}else{let t=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),t.expression=n,this.finishNode(t,"PipelineTopicExpression")}}isSimpleReference(n){switch(n.type){case"MemberExpression":return!n.computed&&this.isSimpleReference(n.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(n){if(this.match(19))throw this.raise(b.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipelineTopicUnused,n)}withTopicBindingContext(n){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return n()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(n){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return n()}finally{this.state.topicContext=e}}else return n()}withSoloAwaitPermittingContext(n){let e=this.state.soloAwait;this.state.soloAwait=!0;try{return n()}finally{this.state.soloAwait=e}}allowInAnd(n){let e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return n()}finally{this.prodParam.exit()}}return n()}disallowInAnd(n){let e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return n()}finally{this.prodParam.exit()}}return n()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(n){let e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let t=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let s=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,n);return this.state.inFSharpPipelineDirectBody=t,s}parseModuleExpression(){this.expectPlugin("moduleBlocks");let n=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let e=this.startNodeAt(this.state.endLoc);this.next();let t=this.initializeScopes(!0);this.enterInitialScopes();try{n.body=this.parseProgram(e,8,"module")}finally{t()}return this.finishNode(n,"ModuleExpression")}parsePropertyNamePrefixOperator(n){}},us={kind:1},Ll={kind:2},Ol=/[\uD800-\uDFFF]/u,ds=/in(?:stanceof)?/y;function Fl(r,n,e){for(let t=0;t<r.length;t++){let s=r[t],{type:i}=s;if(typeof i=="number"){{if(i===139){let{loc:o,start:a,value:l,end:c}=s,p=a+1,u=se(o.start,1);r.splice(t,1,new Ae({type:Oe(27),value:"#",start:a,end:p,startLoc:o.start,endLoc:u}),new Ae({type:Oe(132),value:l,start:p,end:c,startLoc:u,endLoc:o.end})),t++;continue}if(gn(i)){let{loc:o,start:a,value:l,end:c}=s,p=a+1,u=se(o.start,1),f;n.charCodeAt(a-e)===96?f=new Ae({type:Oe(22),value:"`",start:a,end:p,startLoc:o.start,endLoc:u}):f=new Ae({type:Oe(8),value:"}",start:a,end:p,startLoc:o.start,endLoc:u});let m,d,g,h;i===24?(d=c-1,g=se(o.end,-1),m=l===null?null:l.slice(1,-1),h=new Ae({type:Oe(22),value:"`",start:d,end:c,startLoc:g,endLoc:o.end})):(d=c-2,g=se(o.end,-2),m=l===null?null:l.slice(1,-2),h=new Ae({type:Oe(23),value:"${",start:d,end:c,startLoc:g,endLoc:o.end})),r.splice(t,1,f,new Ae({type:Oe(20),value:m,start:p,end:d,startLoc:u,endLoc:g}),h),t+=2;continue}}s.type=Oe(i)}}return r}var Ms=class extends Ds{parseTopLevel(n,e){return n.program=this.parseProgram(e),n.comments=this.comments,this.options.tokens&&(n.tokens=Fl(this.tokens,this.input,this.startIndex)),this.finishNode(n,"File")}parseProgram(n,e=140,t=this.options.sourceType){if(n.sourceType=t,n.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(n,!0,!0,e),this.inModule){if(!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[i,o]of Array.from(this.scope.undefinedExports))this.raise(b.ModuleExportUndefined,o,{localName:i});this.addExtra(n,"topLevelAwait",this.state.hasTopLevelAwait)}let s;return e===140?s=this.finishNode(n,"Program"):s=this.finishNodeAt(n,"Program",se(this.state.startLoc,-1)),s}stmtToDirective(n){let e=n;e.type="Directive",e.value=e.expression,delete e.expression;let t=e.value,s=t.value,i=this.input.slice(this.offsetToSourcePos(t.start),this.offsetToSourcePos(t.end)),o=t.value=i.slice(1,-1);return this.addExtra(t,"raw",i),this.addExtra(t,"rawValue",o),this.addExtra(t,"expressionValue",s),t.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;let n=this.startNode();return n.value=this.state.value,this.next(),this.finishNode(n,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(n,e){if(Ue(n)){if(ds.lastIndex=e,ds.test(this.input)){let t=this.codePointAtPos(ds.lastIndex);if(!ot(t)&&t!==92)return!1}return!0}else return n===92}chStartsBindingPattern(n){return n===91||n===123}hasFollowingBindingAtom(){let n=this.nextTokenStart(),e=this.codePointAtPos(n);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,n)}hasInLineFollowingBindingIdentifierOrBrace(){let n=this.nextTokenInLineStart(),e=this.codePointAtPos(n);return e===123||this.chStartsBindingIdentifier(e,n)}startsUsingForOf(){let{type:n,containsEsc:e}=this.lookahead();if(n===102&&!e)return!1;if(B(n)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let n=this.nextTokenInLineStart();if(this.isUnparsedContextual(n,"using")){n=this.nextTokenInLineStartSince(n+5);let e=this.codePointAtPos(n);if(this.chStartsBindingIdentifier(e,n))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(n=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,n&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(n){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(n,e)}parseStatementContent(n,e){let t=this.state.type,s=this.startNode(),i=!!(n&2),o=!!(n&4),a=n&1;switch(t){case 60:return this.parseBreakContinueStatement(s,!0);case 63:return this.parseBreakContinueStatement(s,!1);case 64:return this.parseDebuggerStatement(s);case 90:return this.parseDoWhileStatement(s);case 91:return this.parseForStatement(s);case 68:if(this.lookaheadCharCode()===46)break;return o||this.raise(this.state.strict?b.StrictFunction:this.options.annexB?b.SloppyFunctionAnnexB:b.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(s,!1,!i&&o);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,s),!0);case 69:return this.parseIfStatement(s);case 70:return this.parseReturnStatement(s);case 71:return this.parseSwitchStatement(s);case 72:return this.parseThrowStatement(s);case 73:return this.parseTryStatement(s);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?i||this.raise(b.UnexpectedLexicalDeclaration,s):this.raise(b.AwaitUsingNotInAsyncContext,s),this.next(),this.parseVarStatement(s,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(b.UnexpectedUsingDeclaration,this.state.startLoc):i||this.raise(b.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(s,"using");case 100:{if(this.state.containsEsc)break;let p=this.nextTokenStart(),u=this.codePointAtPos(p);if(u!==91&&(!i&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(u,p)&&u!==123))break}case 75:i||this.raise(b.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let p=this.state.value;return this.parseVarStatement(s,p)}case 92:return this.parseWhileStatement(s);case 76:return this.parseWithStatement(s);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(s);case 83:{let p=this.lookaheadCharCode();if(p===40||p===46)break}case 82:{!this.options.allowImportExportEverywhere&&!a&&this.raise(b.UnexpectedImportExport,this.state.startLoc),this.next();let p;return t===83?(p=this.parseImport(s),p.type==="ImportDeclaration"&&(!p.importKind||p.importKind==="value")&&(this.sawUnambiguousESM=!0)):(p=this.parseExport(s,e),(p.type==="ExportNamedDeclaration"&&(!p.exportKind||p.exportKind==="value")||p.type==="ExportAllDeclaration"&&(!p.exportKind||p.exportKind==="value")||p.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(p),p}default:if(this.isAsyncFunction())return i||this.raise(b.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(s,!0,!i&&o)}let l=this.state.value,c=this.parseExpression();return B(t)&&c.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(s,l,c,n):this.parseExpressionStatement(s,c,e)}assertModuleNodeAllowed(n){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(b.ImportOutsideModule,n)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(n,e,t){return n&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(b.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...n)):e.decorators=n,this.resetStartLocationFromNode(e,n[0]),t&&this.resetStartLocationFromNode(t,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(n){let e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))n||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(b.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(b.UnexpectedLeadingDecorator,this.state.startLoc);return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let n=this.startNode();if(this.next(),this.hasPlugin("decorators")){let e=this.state.startLoc,t;if(this.match(10)){let s=this.state.startLoc;this.next(),t=this.parseExpression(),this.expect(11),t=this.wrapParenthesis(s,t);let i=this.state.startLoc;n.expression=this.parseMaybeDecoratorArguments(t),this.getPluginOption("decorators","allowCallParenthesized")===!1&&n.expression!==t&&this.raise(b.DecoratorArgumentsOutsideParentheses,i)}else{for(t=this.parseIdentifier(!1);this.eat(16);){let s=this.startNodeAt(e);s.object=t,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),s.property=this.parsePrivateName()):s.property=this.parseIdentifier(!0),s.computed=!1,t=this.finishNode(s,"MemberExpression")}n.expression=this.parseMaybeDecoratorArguments(t)}}else n.expression=this.parseExprSubscripts();return this.finishNode(n,"Decorator")}parseMaybeDecoratorArguments(n){if(this.eat(10)){let e=this.startNodeAtNode(n);return e.callee=n,e.arguments=this.parseCallExpressionArguments(11),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return n}parseBreakContinueStatement(n,e){return this.next(),this.isLineTerminator()?n.label=null:(n.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(n,e),this.finishNode(n,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(n,e){let t;for(t=0;t<this.state.labels.length;++t){let s=this.state.labels[t];if((n.label==null||s.name===n.label.name)&&(s.kind!=null&&(e||s.kind===1)||n.label&&e))break}if(t===this.state.labels.length){let s=e?"BreakStatement":"ContinueStatement";this.raise(b.IllegalBreakContinue,n,{type:s})}}parseDebuggerStatement(n){return this.next(),this.semicolon(),this.finishNode(n,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let n=this.parseExpression();return this.expect(11),n}parseDoWhileStatement(n){return this.next(),this.state.labels.push(us),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),n.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(n,"DoWhileStatement")}parseForStatement(n){this.next(),this.state.labels.push(us);let e=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(e=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(n,null);let t=this.isContextual(100);{let l=this.isContextual(96)&&this.startsAwaitUsing(),c=l||this.isContextual(107)&&this.startsUsingForOf(),p=t&&this.hasFollowingBindingAtom()||c;if(this.match(74)||this.match(75)||p){let u=this.startNode(),f;l?(f="await using",this.recordAwaitIfAllowed()||this.raise(b.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):f=this.state.value,this.next(),this.parseVar(u,!0,f);let m=this.finishNode(u,"VariableDeclaration"),d=this.match(58);return d&&c&&this.raise(b.ForInUsing,m),(d||this.isContextual(102))&&m.declarations.length===1?this.parseForIn(n,m,e):(e!==null&&this.unexpected(e),this.parseFor(n,m))}}let s=this.isContextual(95),i=new lt,o=this.parseExpression(!0,i),a=this.isContextual(102);if(a&&(t&&this.raise(b.ForOfLet,o),e===null&&s&&o.type==="Identifier"&&this.raise(b.ForOfAsync,o)),a||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(o,!0);let l=a?"ForOfStatement":"ForInStatement";return this.checkLVal(o,{type:l}),this.parseForIn(n,o,e)}else this.checkExpressionErrors(i,!0);return e!==null&&this.unexpected(e),this.parseFor(n,o)}parseFunctionStatement(n,e,t){return this.next(),this.parseFunction(n,1|(t?2:0)|(e?8:0))}parseIfStatement(n){return this.next(),n.test=this.parseHeaderExpression(),n.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),n.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(n,"IfStatement")}parseReturnStatement(n){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(b.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?n.argument=null:(n.argument=this.parseExpression(),this.semicolon()),this.finishNode(n,"ReturnStatement")}parseSwitchStatement(n){this.next(),n.discriminant=this.parseHeaderExpression();let e=n.cases=[];this.expect(5),this.state.labels.push(Ll),this.scope.enter(0);let t;for(let s;!this.match(8);)if(this.match(61)||this.match(65)){let i=this.match(61);t&&this.finishNode(t,"SwitchCase"),e.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(s&&this.raise(b.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),s=!0,t.test=null),this.expect(14)}else t?t.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(n,"SwitchStatement")}parseThrowStatement(n){return this.next(),this.hasPrecedingLineBreak()&&this.raise(b.NewlineAfterThrow,this.state.lastTokEndLoc),n.argument=this.parseExpression(),this.semicolon(),this.finishNode(n,"ThrowStatement")}parseCatchClauseParam(){let n=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&n.type==="Identifier"?8:0),this.checkLVal(n,{type:"CatchClause"},9),n}parseTryStatement(n){if(this.next(),n.block=this.parseBlock(),n.handler=null,this.match(62)){let e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),n.handler=this.finishNode(e,"CatchClause")}return n.finalizer=this.eat(67)?this.parseBlock():null,!n.handler&&!n.finalizer&&this.raise(b.NoCatchOrFinally,n),this.finishNode(n,"TryStatement")}parseVarStatement(n,e,t=!1){return this.next(),this.parseVar(n,!1,e,t),this.semicolon(),this.finishNode(n,"VariableDeclaration")}parseWhileStatement(n){return this.next(),n.test=this.parseHeaderExpression(),this.state.labels.push(us),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(n,"WhileStatement")}parseWithStatement(n){return this.state.strict&&this.raise(b.StrictWith,this.state.startLoc),this.next(),n.object=this.parseHeaderExpression(),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(n,"WithStatement")}parseEmptyStatement(n){return this.next(),this.finishNode(n,"EmptyStatement")}parseLabeledStatement(n,e,t,s){for(let o of this.state.labels)o.name===e&&this.raise(b.LabelRedeclaration,t,{labelName:e});let i=Ra(this.state.type)?1:this.match(71)?2:null;for(let o=this.state.labels.length-1;o>=0;o--){let a=this.state.labels[o];if(a.statementStart===n.start)a.statementStart=this.sourceToOffsetPos(this.state.start),a.kind=i;else break}return this.state.labels.push({name:e,kind:i,statementStart:this.sourceToOffsetPos(this.state.start)}),n.body=s&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),n.label=t,this.finishNode(n,"LabeledStatement")}parseExpressionStatement(n,e,t){return n.expression=e,this.semicolon(),this.finishNode(n,"ExpressionStatement")}parseBlock(n=!1,e=!0,t){let s=this.startNode();return n&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(s,n,!1,8,t),e&&this.scope.exit(),this.finishNode(s,"BlockStatement")}isValidDirective(n){return n.type==="ExpressionStatement"&&n.expression.type==="StringLiteral"&&!n.expression.extra.parenthesized}parseBlockBody(n,e,t,s,i){let o=n.body=[],a=n.directives=[];this.parseBlockOrModuleBlockBody(o,e?a:void 0,t,s,i)}parseBlockOrModuleBlockBody(n,e,t,s,i){let o=this.state.strict,a=!1,l=!1;for(;!this.match(s);){let c=t?this.parseModuleItem():this.parseStatementListItem();if(e&&!l){if(this.isValidDirective(c)){let p=this.stmtToDirective(c);e.push(p),!a&&p.value.value==="use strict"&&(a=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}n.push(c)}i?.call(this,a),o||this.setStrict(!1),this.next()}parseFor(n,e){return n.init=e,this.semicolon(!1),n.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),n.update=this.match(11)?null:this.parseExpression(),this.expect(11),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(n,"ForStatement")}parseForIn(n,e,t){let s=this.match(58);return this.next(),s?t!==null&&this.unexpected(t):n.await=t!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!s||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(b.ForInOfLoopInitializer,e,{type:s?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(b.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),n.left=e,n.right=s?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(n,s?"ForInStatement":"ForOfStatement")}parseVar(n,e,t,s=!1){let i=n.declarations=[];for(n.kind=t;;){let o=this.startNode();if(this.parseVarId(o,t),o.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,o.init===null&&!s&&(o.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(b.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(t==="const"||t==="using"||t==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(b.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:t})),i.push(this.finishNode(o,"VariableDeclarator")),!this.eat(12))break}return n}parseVarId(n,e){let t=this.parseBindingAtom();(e==="using"||e==="await using")&&(t.type==="ArrayPattern"||t.type==="ObjectPattern")&&this.raise(b.UsingDeclarationHasBindingPattern,t.loc.start),this.checkLVal(t,{type:"VariableDeclarator"},e==="var"?5:8201),n.id=t}parseAsyncFunctionExpression(n){return this.parseFunction(n,8)}parseFunction(n,e=0){let t=e&2,s=!!(e&1),i=s&&!(e&4),o=!!(e&8);this.initFunction(n,o),this.match(55)&&(t&&this.raise(b.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),n.generator=!0),s&&(n.id=this.parseFunctionId(i));let a=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(hn(o,n.generator)),s||(n.id=this.parseFunctionId()),this.parseFunctionParams(n,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(n,s?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),s&&!t&&this.registerFunctionStatementId(n),this.state.maybeInArrowParameters=a,n}parseFunctionId(n){return n||B(this.state.type)?this.parseIdentifier():null}parseFunctionParams(n,e){this.expect(10),this.expressionScope.enter(al()),n.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(n){n.id&&this.scope.declareName(n.id.name,!this.options.annexB||this.state.strict||n.generator||n.async?this.scope.treatFunctionsAsVar?5:8201:17,n.id.loc.start)}parseClass(n,e,t){this.next();let s=this.state.strict;return this.state.strict=!0,this.parseClassId(n,e,t),this.parseClassSuper(n),n.body=this.parseClassBody(!!n.superClass,s),this.finishNode(n,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(n){return n.type==="Identifier"&&n.name==="constructor"||n.type==="StringLiteral"&&n.value==="constructor"}isNonstaticConstructor(n){return!n.computed&&!n.static&&this.nameIsConstructor(n.key)}parseClassBody(n,e){this.classScope.enter();let t={hadConstructor:!1,hadSuperClass:n},s=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(s.length>0)throw this.raise(b.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){s.push(this.parseDecorator());continue}let o=this.startNode();s.length&&(o.decorators=s,this.resetStartLocationFromNode(o,s[0]),s=[]),this.parseClassMember(i,o,t),o.kind==="constructor"&&o.decorators&&o.decorators.length>0&&this.raise(b.DecoratorConstructor,o)}}),this.state.strict=e,this.next(),s.length)throw this.raise(b.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(n,e){let t=this.parseIdentifier(!0);if(this.isClassMethod()){let s=e;return s.kind="method",s.computed=!1,s.key=t,s.static=!1,this.pushClassMethod(n,s,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let s=e;return s.computed=!1,s.key=t,s.static=!1,n.body.push(this.parseClassProperty(s)),!0}return this.resetPreviousNodeTrailingComments(t),!1}parseClassMember(n,e,t){let s=this.isContextual(106);if(s){if(this.parseClassMemberFromModifier(n,e))return;if(this.eat(5)){this.parseClassStaticBlock(n,e);return}}this.parseClassMemberWithIsStatic(n,e,t,s)}parseClassMemberWithIsStatic(n,e,t,s){let i=e,o=e,a=e,l=e,c=e,p=i,u=i;if(e.static=s,this.parsePropertyNamePrefixOperator(e),this.eat(55)){p.kind="method";let y=this.match(139);if(this.parseClassElementName(p),y){this.pushClassPrivateMethod(n,o,!0,!1);return}this.isNonstaticConstructor(i)&&this.raise(b.ConstructorIsGenerator,i.key),this.pushClassMethod(n,i,!0,!1,!1,!1);return}let f=!this.state.containsEsc&&B(this.state.type),m=this.parseClassElementName(e),d=f?m.name:null,g=this.isPrivateName(m),h=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(p.kind="method",g){this.pushClassPrivateMethod(n,o,!1,!1);return}let y=this.isNonstaticConstructor(i),P=!1;y&&(i.kind="constructor",t.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(b.DuplicateConstructor,m),y&&this.hasPlugin("typescript")&&e.override&&this.raise(b.OverrideOnConstructor,m),t.hadConstructor=!0,P=t.hadSuperClass),this.pushClassMethod(n,i,!1,!1,y,P)}else if(this.isClassProperty())g?this.pushClassPrivateProperty(n,l):this.pushClassProperty(n,a);else if(d==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(m);let y=this.eat(55);u.optional&&this.unexpected(h),p.kind="method";let P=this.match(139);this.parseClassElementName(p),this.parsePostMemberNameModifiers(u),P?this.pushClassPrivateMethod(n,o,y,!0):(this.isNonstaticConstructor(i)&&this.raise(b.ConstructorIsAsync,i.key),this.pushClassMethod(n,i,y,!0,!1,!1))}else if((d==="get"||d==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(m),p.kind=d;let y=this.match(139);this.parseClassElementName(i),y?this.pushClassPrivateMethod(n,o,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(b.ConstructorIsAccessor,i.key),this.pushClassMethod(n,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}else if(d==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(m);let y=this.match(139);this.parseClassElementName(a),this.pushClassAccessorProperty(n,c,y)}else this.isLineTerminator()?g?this.pushClassPrivateProperty(n,l):this.pushClassProperty(n,a):this.unexpected()}parseClassElementName(n){let{type:e,value:t}=this.state;if((e===132||e===134)&&n.static&&t==="prototype"&&this.raise(b.StaticPrototype,this.state.startLoc),e===139){t==="constructor"&&this.raise(b.ConstructorClassPrivateField,this.state.startLoc);let s=this.parsePrivateName();return n.key=s,s}return this.parsePropertyName(n),n.key}parseClassStaticBlock(n,e){var t;this.scope.enter(208);let s=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let i=e.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=s,n.body.push(this.finishNode(e,"StaticBlock")),(t=e.decorators)!=null&&t.length&&this.raise(b.DecoratorStaticBlock,e)}pushClassProperty(n,e){!e.computed&&this.nameIsConstructor(e.key)&&this.raise(b.ConstructorClassField,e.key),n.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(n,e){let t=this.parseClassPrivateProperty(e);n.body.push(t),this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),0,t.key.loc.start)}pushClassAccessorProperty(n,e,t){!t&&!e.computed&&this.nameIsConstructor(e.key)&&this.raise(b.ConstructorClassField,e.key);let s=this.parseClassAccessorProperty(e);n.body.push(s),t&&this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassMethod(n,e,t,s,i,o){n.body.push(this.parseMethod(e,t,s,i,o,"ClassMethod",!0))}pushClassPrivateMethod(n,e,t,s){let i=this.parseMethod(e,t,s,!1,!1,"ClassPrivateMethod",!0);n.body.push(i);let o=i.kind==="get"?i.static?6:2:i.kind==="set"?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,o)}declareClassPrivateMethodInScope(n,e){this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),e,n.key.loc.start)}parsePostMemberNameModifiers(n){}parseClassPrivateProperty(n){return this.parseInitializer(n),this.semicolon(),this.finishNode(n,"ClassPrivateProperty")}parseClassProperty(n){return this.parseInitializer(n),this.semicolon(),this.finishNode(n,"ClassProperty")}parseClassAccessorProperty(n){return this.parseInitializer(n),this.semicolon(),this.finishNode(n,"ClassAccessorProperty")}parseInitializer(n){this.scope.enter(80),this.expressionScope.enter(hi()),this.prodParam.enter(0),n.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(n,e,t,s=8331){if(B(this.state.type))n.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(n.id,s);else if(t||!e)n.id=null;else throw this.raise(b.MissingClassName,this.state.startLoc)}parseClassSuper(n){n.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(n,e){let t=this.parseMaybeImportPhase(n,!0),s=this.maybeParseExportDefaultSpecifier(n,t),i=!s||this.eat(12),o=i&&this.eatExportStar(n),a=o&&this.maybeParseExportNamespaceSpecifier(n),l=i&&(!a||this.eat(12)),c=s||o;if(o&&!a){if(s&&this.unexpected(),e)throw this.raise(b.UnsupportedDecoratorExport,n);return this.parseExportFrom(n,!0),this.finishNode(n,"ExportAllDeclaration")}let p=this.maybeParseExportNamedSpecifiers(n);s&&i&&!o&&!p&&this.unexpected(null,5),a&&l&&this.unexpected(null,98);let u;if(c||p){if(u=!1,e)throw this.raise(b.UnsupportedDecoratorExport,n);this.parseExportFrom(n,c)}else u=this.maybeParseExportDeclaration(n);if(c||p||u){var f;let m=n;if(this.checkExport(m,!0,!1,!!m.source),((f=m.declaration)==null?void 0:f.type)==="ClassDeclaration")this.maybeTakeDecorators(e,m.declaration,m);else if(e)throw this.raise(b.UnsupportedDecoratorExport,n);return this.finishNode(m,"ExportNamedDeclaration")}if(this.eat(65)){let m=n,d=this.parseExportDefaultExpression();if(m.declaration=d,d.type==="ClassDeclaration")this.maybeTakeDecorators(e,d,m);else if(e)throw this.raise(b.UnsupportedDecoratorExport,n);return this.checkExport(m,!0,!0),this.finishNode(m,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(n){return this.eat(55)}maybeParseExportDefaultSpecifier(n,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e?.loc.start);let t=e||this.parseIdentifier(!0),s=this.startNodeAtNode(t);return s.exported=t,n.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(n){if(this.isContextual(93)){var e,t;(t=(e=n).specifiers)!=null||(e.specifiers=[]);let s=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),s.exported=this.parseModuleExportName(),n.specifiers.push(this.finishNode(s,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(n){if(this.match(5)){let e=n;e.specifiers||(e.specifiers=[]);let t=e.exportKind==="type";return e.specifiers.push(...this.parseExportSpecifiers(t)),e.source=null,e.declaration=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),!0}return!1}maybeParseExportDeclaration(n){return this.shouldParseExportDeclaration()?(n.specifiers=[],n.source=null,this.hasPlugin("importAssertions")&&(n.assertions=[]),n.declaration=this.parseExportDeclaration(n),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let n=this.nextTokenInLineStart();return this.isUnparsedContextual(n,"function")}parseExportDefaultExpression(){let n=this.startNode();if(this.match(68))return this.next(),this.parseFunction(n,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(n,13);if(this.match(80))return this.parseClass(n,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(b.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(b.UnsupportedDefaultExport,this.state.startLoc);let e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(n){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:n}=this.state;if(B(n)){if(n===95&&!this.state.containsEsc||n===100)return!1;if((n===130||n===129)&&!this.state.containsEsc){let{type:s}=this.lookahead();if(B(s)&&s!==98||s===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let e=this.nextTokenStart(),t=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||B(this.state.type)&&t)return!0;if(this.match(65)&&t){let s=this.input.charCodeAt(this.nextTokenStartSince(e+4));return s===34||s===39}return!1}parseExportFrom(n,e){this.eatContextual(98)?(n.source=this.parseImportSource(),this.checkExport(n),this.maybeParseImportAttributes(n),this.checkJSONModuleImport(n)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:n}=this.state;return n===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(b.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(b.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(b.UsingDeclarationExport,this.state.startLoc),!0):n===74||n===75||n===68||n===80||this.isLet()||this.isAsyncFunction()}checkExport(n,e,t,s){if(e){var i;if(t){if(this.checkDuplicateExports(n,"default"),this.hasPlugin("exportDefaultFrom")){var o;let a=n.declaration;a.type==="Identifier"&&a.name==="from"&&a.end-a.start===4&&!((o=a.extra)!=null&&o.parenthesized)&&this.raise(b.ExportDefaultFromAsIdentifier,a)}}else if((i=n.specifiers)!=null&&i.length)for(let a of n.specifiers){let{exported:l}=a,c=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(a,c),!s&&a.local){let{local:p}=a;p.type!=="Identifier"?this.raise(b.ExportBindingIsString,a,{localName:p.value,exportName:c}):(this.checkReservedWord(p.name,p.loc.start,!0,!1),this.scope.checkLocalExport(p))}}else if(n.declaration){let a=n.declaration;if(a.type==="FunctionDeclaration"||a.type==="ClassDeclaration"){let{id:l}=a;if(!l)throw new Error("Assertion failure");this.checkDuplicateExports(n,l.name)}else if(a.type==="VariableDeclaration")for(let l of a.declarations)this.checkDeclaration(l.id)}}}checkDeclaration(n){if(n.type==="Identifier")this.checkDuplicateExports(n,n.name);else if(n.type==="ObjectPattern")for(let e of n.properties)this.checkDeclaration(e);else if(n.type==="ArrayPattern")for(let e of n.elements)e&&this.checkDeclaration(e);else n.type==="ObjectProperty"?this.checkDeclaration(n.value):n.type==="RestElement"?this.checkDeclaration(n.argument):n.type==="AssignmentPattern"&&this.checkDeclaration(n.left)}checkDuplicateExports(n,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(b.DuplicateDefaultExport,n):this.raise(b.DuplicateExport,n,{exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(n){let e=[],t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else if(this.expect(12),this.eat(8))break;let s=this.isContextual(130),i=this.match(134),o=this.startNode();o.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(o,i,n,s))}return e}parseExportSpecifier(n,e,t,s){return this.eatContextual(93)?n.exported=this.parseModuleExportName():e?n.exported=ul(n.local):n.exported||(n.exported=_e(n.local)),this.finishNode(n,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let n=this.parseStringLiteral(this.state.value),e=Ol.exec(n.value);return e&&this.raise(b.ModuleExportNameHasLoneSurrogate,n,{surrogateCharCode:e[0].charCodeAt(0)}),n}return this.parseIdentifier(!0)}isJSONModuleImport(n){return n.assertions!=null?n.assertions.some(({key:e,value:t})=>t.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(n){let{specifiers:e}=n,t=e.length===1?e[0].type:null;if(n.phase==="source")t!=="ImportDefaultSpecifier"&&this.raise(b.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(n.phase==="defer")t!=="ImportNamespaceSpecifier"&&this.raise(b.DeferImportRequiresNamespace,e[0].loc.start);else if(n.module){var s;t!=="ImportDefaultSpecifier"&&this.raise(b.ImportReflectionNotBinding,e[0].loc.start),((s=n.assertions)==null?void 0:s.length)>0&&this.raise(b.ImportReflectionHasAssertion,e[0].loc.start)}}checkJSONModuleImport(n){if(this.isJSONModuleImport(n)&&n.type!=="ExportAllDeclaration"){let{specifiers:e}=n;if(e!=null){let t=e.find(s=>{let i;if(s.type==="ExportSpecifier"?i=s.local:s.type==="ImportSpecifier"&&(i=s.imported),i!==void 0)return i.type==="Identifier"?i.name!=="default":i.value!=="default"});t!==void 0&&this.raise(b.ImportJSONBindingNotDefault,t.loc.start)}}}isPotentialImportPhase(n){return n?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(n,e,t,s){e||(t==="module"?(this.expectPlugin("importReflection",s),n.module=!0):this.hasPlugin("importReflection")&&(n.module=!1),t==="source"?(this.expectPlugin("sourcePhaseImports",s),n.phase="source"):t==="defer"?(this.expectPlugin("deferredImportEvaluation",s),n.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(n.phase=null))}parseMaybeImportPhase(n,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(n,e,null),null;let t=this.parseIdentifier(!0),{type:s}=this.state;return(we(s)?s!==98||this.lookaheadCharCode()===102:s!==12)?(this.resetPreviousIdentifierLeadingComments(t),this.applyImportPhase(n,e,t.name,t.loc.start),null):(this.applyImportPhase(n,e,null),t)}isPrecedingIdImportPhase(n){let{type:e}=this.state;return B(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(n){return this.match(134)?this.parseImportSourceAndAttributes(n):this.parseImportSpecifiersAndAfter(n,this.parseMaybeImportPhase(n,!1))}parseImportSpecifiersAndAfter(n,e){n.specifiers=[];let s=!this.maybeParseDefaultImportSpecifier(n,e)||this.eat(12),i=s&&this.maybeParseStarImportSpecifier(n);return s&&!i&&this.parseNamedImportSpecifiers(n),this.expectContextual(98),this.parseImportSourceAndAttributes(n)}parseImportSourceAndAttributes(n){var e;return(e=n.specifiers)!=null||(n.specifiers=[]),n.source=this.parseImportSource(),this.maybeParseImportAttributes(n),this.checkImportReflection(n),this.checkJSONModuleImport(n),this.semicolon(),this.finishNode(n,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(n,e,t){e.local=this.parseIdentifier(),n.specifiers.push(this.finishImportSpecifier(e,t))}finishImportSpecifier(n,e,t=8201){return this.checkLVal(n.local,{type:e},t),this.finishNode(n,e)}parseImportAttributes(){this.expect(5);let n=[],e=new Set;do{if(this.match(8))break;let t=this.startNode(),s=this.state.value;if(e.has(s)&&this.raise(b.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:s}),e.add(s),this.match(134)?t.key=this.parseStringLiteral(s):t.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(b.ModuleAttributeInvalidValue,this.state.startLoc);t.value=this.parseStringLiteral(this.state.value),n.push(this.finishNode(t,"ImportAttribute"))}while(this.eat(12));return this.expect(8),n}parseModuleAttributes(){let n=[],e=new Set;do{let t=this.startNode();if(t.key=this.parseIdentifier(!0),t.key.name!=="type"&&this.raise(b.ModuleAttributeDifferentFromType,t.key),e.has(t.key.name)&&this.raise(b.ModuleAttributesWithDuplicateKeys,t.key,{key:t.key.name}),e.add(t.key.name),this.expect(14),!this.match(134))throw this.raise(b.ModuleAttributeInvalidValue,this.state.startLoc);t.value=this.parseStringLiteral(this.state.value),n.push(this.finishNode(t,"ImportAttribute"))}while(this.eat(12));return n}maybeParseImportAttributes(n){let e;var t=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():e=this.parseImportAttributes(),t=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(b.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(n,"deprecatedAssertSyntax",!0),this.next(),e=this.parseImportAttributes()):e=[];!t&&this.hasPlugin("importAssertions")?n.assertions=e:n.attributes=e}maybeParseDefaultImportSpecifier(n,e){if(e){let t=this.startNodeAtNode(e);return t.local=e,n.specifiers.push(this.finishImportSpecifier(t,"ImportDefaultSpecifier")),!0}else if(we(this.state.type))return this.parseImportSpecifierLocal(n,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(n){if(this.match(55)){let e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(n,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(n){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(b.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let t=this.startNode(),s=this.match(134),i=this.isContextual(130);t.imported=this.parseModuleExportName();let o=this.parseImportSpecifier(t,s,n.importKind==="type"||n.importKind==="typeof",i,void 0);n.specifiers.push(o)}}parseImportSpecifier(n,e,t,s,i){if(this.eatContextual(93))n.local=this.parseIdentifier();else{let{imported:o}=n;if(e)throw this.raise(b.ImportBindingIsString,n,{importName:o.value});this.checkReservedWord(o.name,n.loc.start,!0,!0),n.local||(n.local=_e(o))}return this.finishImportSpecifier(n,"ImportSpecifier",i)}isThisParam(n){return n.type==="Identifier"&&n.name==="this"}},vn=class extends Ms{constructor(n,e,t){n=Ml(n),super(n,e),this.options=n,this.initializeScopes(),this.plugins=t,this.filename=n.sourceFilename,this.startIndex=n.startIndex}getScopeHandler(){return Ut}parse(){this.enterInitialScopes();let n=this.startNode(),e=this.startNode();return this.nextToken(),n.errors=null,this.parseTopLevel(n,e),n.errors=this.state.errors,n.comments.length=this.state.commentsLen,n}};function Ul(r,n){var e;if(((e=n)==null?void 0:e.sourceType)==="unambiguous"){n=Object.assign({},n);try{n.sourceType="module";let t=Lt(n,r),s=t.parse();if(t.sawUnambiguousESM)return s;if(t.ambiguousScriptDifferentAst)try{return n.sourceType="script",Lt(n,r).parse()}catch{}else s.program.sourceType="script";return s}catch(t){try{return n.sourceType="script",Lt(n,r).parse()}catch{}throw t}}else return Lt(n,r).parse()}function Rl(r,n){let e=Lt(n,r);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function _l(r){let n={};for(let e of Object.keys(r))n[e]=Oe(r[e]);return n}var Bl=_l(La);function Lt(r,n){let e=vn,t=new Map;if(r!=null&&r.plugins){for(let s of r.plugins){let i,o;typeof s=="string"?i=s:[i,o]=s,t.has(i)||t.set(i,o||{})}kl(t),e=jl(t)}return new e(r,n,t)}var ri=new Map;function jl(r){let n=[];for(let s of Nl)r.has(s)&&n.push(s);let e=n.join("|"),t=ri.get(e);if(!t){t=vn;for(let s of n)t=vi[s](t);ri.set(e,t)}return t}_t.parse=Ul;_t.parseExpression=Rl;_t.tokTypes=Bl});import{Command as au}from"commander";var yr="0.1.31";import en from"node:path";import{Command as Fp}from"commander";import ae from"kleur";import tn from"lodash";import wt from"prompts";var St=[{name:"Accordion",value:"accordion",instructions:["Remember to add the accordion animations to your tailwind.config.js"],files:[{fileName:"Accordion/Accordion.vue",dirPath:"components/UI",fileContent:`<template>
8
+ `):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(b.UnterminatedString,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);if(i===e)break;i===38?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadEntity(),s=this.state.pos):at(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(134,t)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let t=10;this.codePointAtPos(this.state.pos)===120&&(t=16,++this.state.pos);let s=this.readInt(t,void 0,!1,"bail");if(s!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(s)}else{let t=0,s=!1;for(;t++<10&&this.state.pos<this.length&&!(s=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(s){let i=this.input.slice(e,this.state.pos),o=yl[i];if(++this.state.pos,o)return o}}return this.state.pos=e,"&"}jsxReadWord(){let e,t=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(ot(e)||e===45);this.finishToken(141,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(141)?e.name=this.state.value:_s(this.state.type)?e.name=$e(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(14))return t;let s=this.startNodeAt(e);return s.namespace=t,s.name=this.jsxParseIdentifier(),this.finishNode(s,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,t=this.jsxParseNamespacedName();if(t.type==="JSXNamespacedName")return t;for(;this.eat(16);){let 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 5:return e=this.startNode(),this.setContext(V.brace),this.next(),e=this.jsxParseExpressionContainer(e,V.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(Ke.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(Ke.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(V.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,t){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let s=this.parseExpression();e.expression=s}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(V.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(V.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let t=this.startNodeAt(e);return this.eat(144)?this.finishNode(t,"JSXOpeningFragment"):(t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t))}jsxParseOpeningElementAfterName(e){let t=[];for(;!this.match(56)&&!this.match(144);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(56),this.expect(144),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let t=this.startNodeAt(e);return this.eat(144)?this.finishNode(t,"JSXClosingFragment"):(t.name=this.jsxParseElementName(),this.expect(144),this.finishNode(t,"JSXClosingElement"))}jsxParseElementAt(e){let t=this.startNodeAt(e),s=[],i=this.jsxParseOpeningElementAt(e),o=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case 143:if(e=this.state.startLoc,this.next(),this.eat(56)){o=this.jsxParseClosingElementAt(e);break e}s.push(this.jsxParseElementAt(e));break;case 142:s.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let a=this.startNode();this.setContext(V.brace),this.next(),this.match(21)?s.push(this.jsxParseSpreadChild(a)):s.push(this.jsxParseExpressionContainer(a,V.j_expr));break}default:this.unexpected()}ze(i)&&!ze(o)&&o!==null?this.raise(Ke.MissingClosingTagFragment,o):!ze(i)&&ze(o)?this.raise(Ke.MissingClosingTagElement,o,{openingTagName:it(i.name)}):!ze(i)&&!ze(o)&&it(o.name)!==it(i.name)&&this.raise(Ke.MissingClosingTagElement,o,{openingTagName:it(i.name)})}if(ze(i)?(t.openingFragment=i,t.closingFragment=o):(t.openingElement=i,t.closingElement=o),t.children=s,this.match(47))throw this.raise(Ke.UnwrappedAdjacentJSXElements,this.state.startLoc);return ze(i)?this.finishNode(t,"JSXFragment"):this.finishNode(t,"JSXElement")}jsxParseElement(){let e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){let{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){let t=this.curContext();if(t===V.j_expr){this.jsxReadToken();return}if(t===V.j_oTag||t===V.j_cTag){if(Ue(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(144);return}if((e===34||e===39)&&t===V.j_oTag){this.jsxReadString(e);return}}if(e===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(e)}updateContext(e){let{context:t,type:s}=this.state;if(s===56&&e===143)t.splice(-2,2,V.j_cTag),this.state.canStartJSXElement=!1;else if(s===143)t.push(V.j_oTag);else if(s===144){let i=t[t.length-1];i===V.j_oTag&&e===56||i===V.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===V.j_expr):(this.setContext(V.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=Fa(s)}},As=class extends Ft{constructor(...n){super(...n),this.tsNames=new Map}},ks=class extends Ut{constructor(...n){super(...n),this.importsStack=[]}createScope(n){return this.importsStack.push(new Set),new As(n)}enter(n){n===256&&this.importsStack.push(new Set),super.enter(n)}exit(){let n=super.exit();return n===256&&this.importsStack.pop(),n}hasImport(n,e){let t=this.importsStack.length;if(this.importsStack[t-1].has(n))return!0;if(!e&&t>1){for(let s=0;s<t-1;s++)if(this.importsStack[s].has(n))return!0}return!1}declareName(n,e,t){if(e&4096){this.hasImport(n,!0)&&this.parser.raise(b.VarRedeclaration,t,{identifierName:n}),this.importsStack[this.importsStack.length-1].add(n);return}let s=this.currentScope(),i=s.tsNames.get(n)||0;if(e&1024){this.maybeExportDefined(s,n),s.tsNames.set(n,i|16);return}super.declareName(n,e,t),e&2&&(e&1||(this.checkRedeclarationInScope(s,n,e,t),this.maybeExportDefined(s,n)),i=i|1),e&256&&(i=i|2),e&512&&(i=i|4),e&128&&(i=i|8),i&&s.tsNames.set(n,i)}isRedeclaredInScope(n,e,t){let s=n.tsNames.get(e);if((s&2)>0){if(t&256){let i=!!(t&512),o=(s&4)>0;return i!==o}return!0}return t&128&&(s&8)>0?n.names.get(e)&2?!!(t&1):!1:t&2&&(s&1)>0?!0:super.isRedeclaredInScope(n,e,t)}checkLocalExport(n){let{name:e}=n;if(this.hasImport(e))return;let t=this.scopeStack.length;for(let s=t-1;s>=0;s--){let o=this.scopeStack[s].tsNames.get(e);if((o&1)>0||(o&16)>0)return}super.checkLocalExport(n)}},bi=r=>r.type==="ParenthesizedExpression"?bi(r.expression):r,Ns=class extends Es{toAssignable(n,e=!1){var t,s;let i;switch((n.type==="ParenthesizedExpression"||(t=n.extra)!=null&&t.parenthesized)&&(i=bi(n),e?i.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(b.InvalidParenthesizedAssignment,n):i.type!=="MemberExpression"&&!this.isOptionalMemberExpression(i)&&this.raise(b.InvalidParenthesizedAssignment,n):this.raise(b.InvalidParenthesizedAssignment,n)),n.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":n.type="ObjectPattern";for(let a=0,l=n.properties.length,c=l-1;a<l;a++){var o;let p=n.properties[a],u=a===c;this.toAssignableObjectExpressionProp(p,u,e),u&&p.type==="RestElement"&&(o=n.extra)!=null&&o.trailingCommaLoc&&this.raise(b.RestTrailingComma,n.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:a,value:l}=n;this.isPrivateName(a)&&this.classScope.usePrivateName(this.getPrivateNameSV(a),a.loc.start),this.toAssignable(l,e);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":n.type="ArrayPattern",this.toAssignableList(n.elements,(s=n.extra)==null?void 0:s.trailingCommaLoc,e);break;case"AssignmentExpression":n.operator!=="="&&this.raise(b.MissingEqInAssignment,n.left.loc.end),n.type="AssignmentPattern",delete n.operator,this.toAssignable(n.left,e);break;case"ParenthesizedExpression":this.toAssignable(i,e);break}}toAssignableObjectExpressionProp(n,e,t){if(n.type==="ObjectMethod")this.raise(n.kind==="get"||n.kind==="set"?b.PatternHasAccessor:b.PatternHasMethod,n.key);else if(n.type==="SpreadElement"){n.type="RestElement";let s=n.argument;this.checkToRestConversion(s,!1),this.toAssignable(s,t),e||this.raise(b.RestTrailingComma,n)}else this.toAssignable(n,t)}toAssignableList(n,e,t){let s=n.length-1;for(let i=0;i<=s;i++){let o=n[i];if(o){if(o.type==="SpreadElement"){o.type="RestElement";let a=o.argument;this.checkToRestConversion(a,!0),this.toAssignable(a,t)}else this.toAssignable(o,t);o.type==="RestElement"&&(i<s?this.raise(b.RestTrailingComma,o):e&&this.raise(b.RestTrailingComma,e))}}}isAssignable(n,e){switch(n.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let t=n.properties.length-1;return n.properties.every((s,i)=>s.type!=="ObjectMethod"&&(i===t||s.type!=="SpreadElement")&&this.isAssignable(s))}case"ObjectProperty":return this.isAssignable(n.value);case"SpreadElement":return this.isAssignable(n.argument);case"ArrayExpression":return n.elements.every(t=>t===null||this.isAssignable(t));case"AssignmentExpression":return n.operator==="=";case"ParenthesizedExpression":return this.isAssignable(n.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(n,e){return n}toReferencedListDeep(n,e){this.toReferencedList(n,e);for(let t of n)t?.type==="ArrayExpression"&&this.toReferencedListDeep(t.elements)}parseSpread(n){let e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(n,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){let n=this.startNode();return this.next(),n.argument=this.parseBindingAtom(),this.finishNode(n,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let n=this.startNode();return this.next(),n.elements=this.parseBindingList(3,93,1),this.finishNode(n,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(n,e,t){let s=t&1,i=[],o=!0;for(;!this.eat(n);)if(o?o=!1:this.expect(12),s&&this.match(12))i.push(null);else{if(this.eat(n))break;if(this.match(21)){let a=this.parseRestBinding();if((this.hasPlugin("flow")||t&2)&&(a=this.parseFunctionParamType(a)),i.push(a),!this.checkCommaAfterRest(e)){this.expect(n);break}}else{let a=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(b.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)a.push(this.parseDecorator());i.push(this.parseAssignableListItem(t,a))}}return i}parseBindingRestProperty(n){return this.next(),n.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(n,"RestElement")}parseBindingProperty(){let{type:n,startLoc:e}=this.state;if(n===21)return this.parseBindingRestProperty(this.startNode());let t=this.startNode();return n===139?(this.expectPlugin("destructuringPrivate",e),this.classScope.usePrivateName(this.state.value,e),t.key=this.parsePrivateName()):this.parsePropertyName(t),t.method=!1,this.parseObjPropValue(t,e,!1,!1,!0,!1)}parseAssignableListItem(n,e){let t=this.parseMaybeDefault();(this.hasPlugin("flow")||n&2)&&this.parseFunctionParamType(t);let s=this.parseMaybeDefault(t.loc.start,t);return e.length&&(t.decorators=e),s}parseFunctionParamType(n){return n}parseMaybeDefault(n,e){var t,s;if((t=n)!=null||(n=this.state.startLoc),e=(s=e)!=null?s:this.parseBindingAtom(),!this.eat(29))return e;let i=this.startNodeAt(n);return i.left=e,i.right=this.parseMaybeAssignAllowIn(),this.finishNode(i,"AssignmentPattern")}isValidLVal(n,e,t){switch(n){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties"}return!1}isOptionalMemberExpression(n){return n.type==="OptionalMemberExpression"}checkLVal(n,e,t=64,s=!1,i=!1,o=!1){var a;let l=n.type;if(this.isObjectMethod(n))return;let c=this.isOptionalMemberExpression(n);if(c||l==="MemberExpression"){c&&(this.expectPlugin("optionalChainingAssign",n.loc.start),e.type!=="AssignmentExpression"&&this.raise(b.InvalidLhsOptionalChaining,n,{ancestor:e})),t!==64&&this.raise(b.InvalidPropertyBindingPattern,n);return}if(l==="Identifier"){this.checkIdentifier(n,t,i);let{name:g}=n;s&&(s.has(g)?this.raise(b.ParamDupe,n):s.add(g));return}let p=this.isValidLVal(l,!(o||(a=n.extra)!=null&&a.parenthesized)&&e.type==="AssignmentExpression",t);if(p===!0)return;if(p===!1){let g=t===64?b.InvalidLhs:b.InvalidLhsBinding;this.raise(g,n,{ancestor:e});return}let u,f;typeof p=="string"?(u=p,f=l==="ParenthesizedExpression"):[u,f]=p;let m=l==="ArrayPattern"||l==="ObjectPattern"?{type:l}:e,d=n[u];if(Array.isArray(d))for(let g of d)g&&this.checkLVal(g,m,t,s,i,f);else d&&this.checkLVal(d,m,t,s,i,f)}checkIdentifier(n,e,t=!1){this.state.strict&&(t?ui(n.name,this.inModule):pi(n.name))&&(e===64?this.raise(b.StrictEvalArguments,n,{referenceName:n.name}):this.raise(b.StrictEvalArgumentsBinding,n,{bindingName:n.name})),e&8192&&n.name==="let"&&this.raise(b.LetInLexicalBinding,n),e&64||this.declareNameFromIdentifier(n,e)}declareNameFromIdentifier(n,e){this.scope.declareName(n.name,e,n.loc.start)}checkToRestConversion(n,e){switch(n.type){case"ParenthesizedExpression":this.checkToRestConversion(n.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(b.InvalidRestAssignmentPattern,n)}}checkCommaAfterRest(n){return this.match(12)?(this.raise(this.lookaheadCharCode()===n?b.RestTrailingComma:b.ElementAfterRest,this.state.startLoc),!0):!1}};function xl(r){if(r==null)throw new Error(`Unexpected ${r} value.`);return r}function Zr(r){if(!r)throw new Error("Assert fail")}var k=Be`typescript`({AbstractMethodHasImplementation:({methodName:r})=>`Method '${r}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:r})=>`Property '${r}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:r})=>`'declare' is not allowed in ${r}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:r})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:r})=>`Duplicate modifier: '${r}'.`,EmptyHeritageClauseType:({token:r})=>`'${r}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:r})=>`'${r[0]}' modifier cannot be used with '${r[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:r})=>`Index signatures cannot have an accessibility modifier ('${r}').`,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.",InvalidModifierOnTypeMember:({modifier:r})=>`'${r}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:r})=>`'${r}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:r})=>`'${r}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:r})=>`'${r[0]}' modifier must precede '${r[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'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:r})=>`Private elements cannot have an accessibility modifier ('${r}').`,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:r})=>`Single type parameter ${r} should have a trailing comma. Example usage: <${r},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:r})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${r}.`});function Pl(r){switch(r){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function ei(r){return r==="private"||r==="public"||r==="protected"}function Tl(r){return r==="in"||r==="out"}var wl=r=>class extends r{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:k.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:k.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:k.InvalidModifierOnTypeParameter})}getScopeHandler(){return ks}tsIsIdentifier(){return _(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(e,t){if(!_(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let s=this.state.value;if(e.includes(s)){if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return s}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:s,errorTemplate:i=k.InvalidModifierOnTypeMember},o){let a=(c,p,u,f)=>{p===u&&o[f]&&this.raise(k.InvalidModifiersOrder,c,{orderedModifiers:[u,f]})},l=(c,p,u,f)=>{(o[u]&&p===f||o[f]&&p===u)&&this.raise(k.IncompatibleModifiers,c,{modifiers:[u,f]})};for(;;){let{startLoc:c}=this.state,p=this.tsParseModifier(e.concat(t??[]),s);if(!p)break;ei(p)?o.accessibility?this.raise(k.DuplicateAccessibilityModifier,c,{modifier:p}):(a(c,p,p,"override"),a(c,p,p,"static"),a(c,p,p,"readonly"),o.accessibility=p):Tl(p)?(o[p]&&this.raise(k.DuplicateModifier,c,{modifier:p}),o[p]=!0,a(c,p,"in","out")):(hasOwnProperty.call(o,p)?this.raise(k.DuplicateModifier,c,{modifier:p}):(a(c,p,"static","readonly"),a(c,p,"static","override"),a(c,p,"override","readonly"),a(c,p,"abstract","override"),l(c,p,"declare","override"),l(c,p,"static","abstract")),o[p]=!0),t!=null&&t.includes(p)&&this.raise(i,c,{modifier:p})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,t){let s=[];for(;!this.tsIsListTerminator(e);)s.push(t());return s}tsParseDelimitedList(e,t,s){return xl(this.tsParseDelimitedListWorker(e,t,!0,s))}tsParseDelimitedListWorker(e,t,s,i){let o=[],a=-1;for(;!this.tsIsListTerminator(e);){a=-1;let l=t();if(l==null)return;if(o.push(l),this.eat(12)){a=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;s&&this.expect(12);return}return i&&(i.value=a),o}tsParseBracketedList(e,t,s,i,o){i||(s?this.expect(0):this.expect(47));let a=this.tsParseDelimitedList(e,t,o);return s?this.expect(3):this.expect(48),a}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(134)||this.raise(k.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom(),this.eat(12)&&!this.match(11)?(e.options=super.parseMaybeAssignAllowIn(),this.eat(12)):e.options=null,this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let t=this.parseIdentifier(e);for(;this.eat(16);){let s=this.startNodeAtNode(t);s.left=t,s.right=this.parseIdentifier(e),t=this.finishNode(s,"TSQualifiedName")}return t}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let t=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let s={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,s),t.params.length===0&&this.raise(k.EmptyTypeParameters,t),s.value!==-1&&this.addExtra(t,"trailingComma",s.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){let s=e===19,i="parameters",o="typeAnnotation";t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t[i]=this.tsParseBindingListForSignature(),s?t[o]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(t[o]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let t of e){let{type:s}=t;(s==="AssignmentPattern"||s==="TSParameterProperty")&&this.raise(k.UnsupportedSignatureParameterKind,t,{type:s})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),_(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];let s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){this.eat(17)&&(e.optional=!0);let s=e;if(this.match(10)||this.match(47)){t&&this.raise(k.ReadonlyForMethodSignature,e);let i=s;i.kind&&this.match(47)&&this.raise(k.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,i),this.tsParseTypeMemberSemicolon();let o="parameters",a="typeAnnotation";if(i.kind==="get")i[o].length>0&&(this.raise(b.BadGetterArity,this.state.curPosition()),this.isThisParam(i[o][0])&&this.raise(k.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(i.kind==="set"){if(i[o].length!==1)this.raise(b.BadSetterArity,this.state.curPosition());else{let l=i[o][0];this.isThisParam(l)&&this.raise(k.AccessorCannotDeclareThisParameter,this.state.curPosition()),l.type==="Identifier"&&l.optional&&this.raise(k.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),l.type==="RestElement"&&this.raise(k.SetAccessorCannotHaveRestParameter,this.state.curPosition())}i[a]&&this.raise(k.SetAccessorCannotHaveReturnType,i[a])}else i.kind="method";return this.finishNode(i,"TSMethodSignature")}else{let i=s;t&&(i.readonly=!0);let o=this.tsTryParseTypeAnnotation();return o&&(i.typeAnnotation=o),this.tsParseTypeMemberSemicolon(),this.finishNode(i,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let s=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(s,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);let t=this.tsTryParseIndexSignature(e);return t||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let e=this.startNode();this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0);{let t=this.startNode();t.name=this.tsParseTypeParameterName(),t.constraint=this.tsExpectThenParseType(58),e.typeParameter=this.finishNode(t,"TSTypeParameter")}return e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1;return e.elementTypes.forEach(s=>{let{type:i}=s;t&&i!=="TSRestType"&&i!=="TSOptionalType"&&!(i==="TSNamedTupleMember"&&s.optional)&&this.raise(k.OptionalTypeBeforeRequired,s),t||(t=i==="TSNamedTupleMember"&&s.optional||i==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let{startLoc:e}=this.state,t=this.eat(21),s,i,o,a,c=we(this.state.type)?this.lookaheadCharCode():null;if(c===58)s=!0,o=!1,i=this.parseIdentifier(!0),this.expect(14),a=this.tsParseType();else if(c===63){o=!0;let p=this.state.startLoc,u=this.state.value,f=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(s=!0,i=this.createIdentifier(this.startNodeAt(p),u),this.expect(17),this.expect(14),a=this.tsParseType()):(s=!1,a=f,this.expect(17))}else a=this.tsParseType(),o=this.eat(17),s=this.eat(14);if(s){let p;i?(p=this.startNodeAtNode(i),p.optional=o,p.label=i,p.elementType=a,this.eat(17)&&(p.optional=!0,this.raise(k.TupleOptionalAfterType,this.state.lastTokStartLoc))):(p=this.startNodeAtNode(a),p.optional=o,this.raise(k.InvalidTupleMemberLabel,a),p.label=a,p.elementType=this.tsParseType()),a=this.finishNode(p,"TSNamedTupleMember")}else if(o){let p=this.startNodeAtNode(a);p.typeAnnotation=a,a=this.finishNode(p,"TSOptionalType")}if(t){let p=this.startNodeAt(e);p.typeAnnotation=a,a=this.finishNode(p,"TSRestType")}return a}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){let s=this.startNode();return e==="TSConstructorType"&&(s.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,s)),this.finishNode(s,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let e=this.startNode(),t=this.lookahead();return t.type!==135&&t.type!==136&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(_(e)||e===88||e===84){let t=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":Pl(this.state.value);if(t!==void 0&&this.lookaheadCharCode()!==46){let s=this.startNode();return this.next(),this.finishNode(s,t)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let t=this.startNodeAtNode(e);t.elementType=e,this.expect(3),e=this.finishNode(t,"TSArrayType")}else{let t=this.startNodeAtNode(e);t.objectType=e,t.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(t,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),t==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(k.UnexpectedReadonly,e)}}tsParseInferType(){let e=this.startNode();this.expectContextual(115);let t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return Va(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,t,s){let i=this.startNode(),o=this.eat(s),a=[];do a.push(t());while(this.eat(s));return a.length===1&&!o?a[0]:(i.types=a,this.finishNode(i,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(_(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,t=e.length;try{return super.parseBindingList(3,93,1),e.length===t}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let t=this.startNode();this.expect(e);let s=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(78)){let l=this.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(s.parameterName=l,s.asserts=!0,s.typeAnnotation=null,l=this.finishNode(s,"TSTypePredicate")):(this.resetStartLocationFromNode(l,s),l.asserts=!0),t.typeAnnotation=l,this.finishNode(t,"TSTypeAnnotation")}let o=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!o)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);let a=this.tsParseTypeAnnotation(!1);return s.parameterName=o,s.typeAnnotation=a,s.asserts=i,t.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let e=this.state.containsEsc;return this.next(),!_(this.state.type)&&!this.match(78)?!1:(e&&this.raise(b.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),t.typeAnnotation=this.tsParseType()}),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){Zr(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),t.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),t.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(t,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(k.ReservedTypeAssertion,this.state.startLoc);let e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let t=this.state.startLoc,s=this.tsParseDelimitedList("HeritageClauseElement",()=>{let i=this.startNode();return i.expression=this.tsParseEntityName(),this.match(47)&&(i.typeParameters=this.tsParseTypeArguments()),this.finishNode(i,"TSExpressionWithTypeArguments")});return s.length||this.raise(k.EmptyHeritageClauseType,t,{token:e}),s}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),t.declare&&(e.declare=!0),_(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(k.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let 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(29),this.isContextual(114)&&this.lookahead().type!==16){let t=this.startNode();return this.next(),this.finishNode(t,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}tsInType(e){let t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){let s=this.startNode();this.tsParseModuleOrNamespaceDeclaration(s,!0),e.body=s}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.kind="global",e.global=!0,e.id=this.parseIdentifier()):this.match(134)?(e.kind="module",e.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t,s){e.isExport=s||!1,e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let i=this.tsParseModuleReference();return e.importKind==="type"&&i.type!=="TSExternalModuleReference"&&this.raise(k.ImportAliasHasImportType,i),e.moduleReference=i,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let t=this.state.clone(),s=e();return this.state=t,s}tsTryParseAndCatch(e){let t=this.tryParse(s=>e()||s());if(!(t.aborted||!t.node))return t.error&&(this.state=t.failState),t.node}tsTryParse(e){let t=this.state.clone(),s=e();if(s!==void 0&&s!==!1)return s;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t=this.state.type,s;return this.isContextual(100)&&(t=74,s="let"),this.tsInAmbientContext(()=>{switch(t){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,s||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{let i=this.tsParseInterfaceDeclaration(e,{declare:!0});if(i)return i}default:if(_(t))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,t,s){switch(t.name){case"declare":{let i=this.tsTryParseDeclare(e);return i&&(i.declare=!0),i}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let i=e;return i.kind="global",i.global=!0,i.id=t,i.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(i,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1,s)}}tsParseDeclaration(e,t,s,i){switch(t){case"abstract":if(this.tsCheckLineTerminator(s)&&(this.match(80)||_(this.state.type)))return this.tsParseAbstractDeclaration(e,i);break;case"module":if(this.tsCheckLineTerminator(s)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(e);if(_(this.state.type))return e.kind="module",this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(s)&&_(this.state.type))return e.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(s)&&_(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let t=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let s=this.tsTryParseAndCatch(()=>{let i=this.startNodeAt(e);return i.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(i),i.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),i});if(this.state.maybeInArrowParameters=t,!!s)return super.parseArrowExpression(s,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(k.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===V.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return za(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){let s=this.state.startLoc,i={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},i);let o=i.accessibility,a=i.override,l=i.readonly;!(e&4)&&(o||l||a)&&this.raise(k.UnexpectedParameterModifier,s);let c=this.parseMaybeDefault();e&2&&this.parseFunctionParamType(c);let p=this.parseMaybeDefault(c.loc.start,c);if(o||l||a){let u=this.startNodeAt(s);return t.length&&(u.decorators=t),o&&(u.accessibility=o),l&&(u.readonly=l),a&&(u.override=a),p.type!=="Identifier"&&p.type!=="AssignmentPattern"&&this.raise(k.UnsupportedParameterPropertyKind,u),u.parameter=p,this.finishNode(u,"TSParameterProperty")}return t.length&&(c.decorators=t),p}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let t of e.params)t.type!=="Identifier"&&t.optional&&!this.state.isAmbientContext&&this.raise(k.PatternIsOptional,t)}setArrowFunctionParameters(e,t,s){super.setArrowFunctionParameters(e,t,s),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,s=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let i=t==="FunctionDeclaration"?"TSDeclareFunction":t==="ClassMethod"||t==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return i&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,i):i==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(k.DeclareFunctionHasImplementation,e),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(t=>{t?.type==="TSTypeCastExpression"&&this.raise(k.UnexpectedTypeAnnotation,t.typeAnnotation)})}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,s,i){let o=super.parseArrayLike(e,t,s,i);return o.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(o.elements),o}parseSubscript(e,t,s,i){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let a=this.startNodeAt(t);return a.expression=e,this.finishNode(a,"TSNonNullExpression")}let o=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(s)return i.stop=!0,e;i.optionalChainMember=o=!0,this.next()}if(this.match(47)||this.match(51)){let a,l=this.tsTryParseAndCatch(()=>{if(!s&&this.atPossibleAsyncArrow(e)){let f=this.tsTryParseGenericAsyncArrowFunction(t);if(f)return f}let c=this.tsParseTypeArgumentsInExpression();if(!c)return;if(o&&!this.match(10)){a=this.state.curPosition();return}if(gn(this.state.type)){let f=super.parseTaggedTemplateExpression(e,t,i);return f.typeParameters=c,f}if(!s&&this.eat(10)){let f=this.startNodeAt(t);return f.callee=e,f.arguments=this.parseCallExpressionArguments(11),this.tsCheckForInvalidTypeCasts(f.arguments),f.typeParameters=c,i.optionalChainMember&&(f.optional=o),this.finishCallExpression(f,i.optionalChainMember)}let p=this.state.type;if(p===48||p===52||p!==10&&fs(p)&&!this.hasPrecedingLineBreak())return;let u=this.startNodeAt(t);return u.expression=e,u.typeParameters=c,this.finishNode(u,"TSInstantiationExpression")});if(a&&this.unexpected(a,10),l)return l.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(k.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),l}return super.parseSubscript(e,t,s,i)}parseNewCallee(e){var t;super.parseNewCallee(e);let{callee:s}=e;s.type==="TSInstantiationExpression"&&!((t=s.extra)!=null&&t.parenthesized)&&(e.typeParameters=s.typeParameters,e.callee=s.expression)}parseExprOp(e,t,s){let i;if(mn(58)>s&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(i=this.isContextual(120)))){let o=this.startNodeAt(t);return o.expression=e,o.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(i&&this.raise(b.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(o,i?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(o,t,s)}return super.parseExprOp(e,t,s)}checkReservedWord(e,t,s,i){this.state.isAmbientContext||super.checkReservedWord(e,t,s,i)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(k.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){let t=this.lookaheadCharCode();return e?t===123||t===42:t!==61}return!e&&this.isContextual(87)}applyImportPhase(e,t,s,i){super.applyImportPhase(e,t,s,i),t?e.exportKind=s==="type"?"type":"value":e.importKind=s==="type"||s==="typeof"?s:"value"}parseImport(e){if(this.match(134))return e.importKind="value",super.parseImport(e);let t;if(_(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let s=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,s);t=super.parseImportSpecifiersAndAfter(e,s)}else t=super.parseImport(e);return t.importKind==="type"&&t.specifiers.length>1&&t.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(k.TypeImportCannotSpecifyDefaultAndNamed,t),t}parseExport(e,t){if(this.match(83)){this.next();let s=e,i=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?i=this.parseMaybeImportPhase(s,!1):s.importKind="value",this.tsParseImportEqualsDeclaration(s,i,!0)}else if(this.eat(29)){let s=e;return s.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(s,"TSExportAssignment")}else if(this.eatContextual(93)){let s=e;return this.expectContextual(128),s.id=this.parseIdentifier(),this.semicolon(),this.finishNode(s,"TSNamespaceExportDeclaration")}else return super.parseExport(e,t)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,s=!1){let{isAmbientContext:i}=this.state,o=super.parseVarStatement(e,t,s||i);if(!i)return o;for(let{id:a,init:l}of o.declarations)l&&(t!=="const"||a.typeAnnotation?this.raise(k.InitializerNotAllowedInAmbientContext,l):Sl(l,this.hasPlugin("estree"))||this.raise(k.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,l));return o}parseStatementContent(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){let s=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(s,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let s=this.tsParseInterfaceDeclaration(this.startNode());if(s)return s}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some(s=>ei(s)?e.accessibility===s:!!e[s])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,t,s){let i=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:i,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:k.InvalidModifierOnTypeParameterPositions},t);let o=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,i)&&this.raise(k.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,s,!!t.static)};t.declare?this.tsInAmbientContext(o):o()}parseClassMemberWithIsStatic(e,t,s,i){let o=this.tsTryParseIndexSignature(t);if(o){e.body.push(o),t.abstract&&this.raise(k.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(k.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(k.IndexSignatureHasDeclare,t),t.override&&this.raise(k.IndexSignatureHasOverride,t);return}!this.state.inAbstractClass&&t.abstract&&this.raise(k.NonAbstractClassHasAbstractMethod,t),t.override&&(s.hadSuperClass||this.raise(k.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,s,i)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(k.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(k.ClassMethodHasDeclare,e)}parseExpressionStatement(e,t,s){return(t.type==="Identifier"?this.tsParseExpressionStatement(e,t,s):void 0)||super.parseExpressionStatement(e,t,s)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,t,s){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,t,s);let i=this.tryParse(()=>super.parseConditional(e,t));return i.node?(i.error&&(this.state=i.failState),i.node):(i.error&&super.setOptionalParametersError(s,i.error),e)}parseParenItem(e,t){let s=super.parseParenItem(e,t);if(this.eat(17)&&(s.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(t);return i.expression=e,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let t=this.state.startLoc,s=this.eatContextual(125);if(s&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(k.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let o=_(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return o?((o.type==="TSInterfaceDeclaration"||o.type==="TSTypeAliasDeclaration"||s)&&(e.exportKind="type"),s&&(this.resetStartLocation(o,t),o.declare=!0),o):null}parseClassId(e,t,s,i){if((!t||s)&&this.isContextual(113))return;super.parseClassId(e,t,s,e.declare?1024:8331);let o=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);o&&(e.typeParameters=o)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(k.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){let{key:t}=e;this.raise(k.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:t.type==="Identifier"&&!e.computed?t.name:`[${this.input.slice(this.offsetToSourcePos(t.start),this.offsetToSourcePos(t.end))}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(k.PrivateElementHasAbstract,e),e.accessibility&&this.raise(k.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(k.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,s,i,o,a){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);l&&o&&this.raise(k.ConstructorHasTypeParameters,l);let{declare:c=!1,kind:p}=t;c&&(p==="get"||p==="set")&&this.raise(k.DeclareAccessor,t,{kind:p}),l&&(t.typeParameters=l),super.pushClassMethod(e,t,s,i,o,a)}pushClassPrivateMethod(e,t,s,i){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&(t.typeParameters=o),super.pushClassPrivateMethod(e,t,s,i)}declareClassPrivateMethodInScope(e,t){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!hasOwnProperty.call(e.value,"body")||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,t,s,i,o,a,l){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);return c&&(e.typeParameters=c),super.parseObjPropValue(e,t,s,i,o,a,l)}parseFunctionParams(e,t){let s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&(e.typeParameters=s),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let s=this.tsTryParseTypeAnnotation();s&&(e.id.typeAnnotation=s,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var s,i,o,a,l;let c,p,u;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(c=this.state.clone(),p=this.tryParse(()=>super.parseMaybeAssign(e,t),c),!p.error)return p.node;let{context:d}=this.state,g=d[d.length-1];(g===V.j_oTag||g===V.j_expr)&&d.pop()}if(!((s=p)!=null&&s.error)&&!this.match(47))return super.parseMaybeAssign(e,t);(!c||c===this.state)&&(c=this.state.clone());let f,m=this.tryParse(d=>{var g,h;f=this.tsParseTypeParameters(this.tsParseConstModifier);let y=super.parseMaybeAssign(e,t);return(y.type!=="ArrowFunctionExpression"||(g=y.extra)!=null&&g.parenthesized)&&d(),((h=f)==null?void 0:h.params.length)!==0&&this.resetStartLocationFromNode(y,f),y.typeParameters=f,y},c);if(!m.error&&!m.aborted)return f&&this.reportReservedArrowTypeParam(f),m.node;if(!p&&(Zr(!this.hasPlugin("jsx")),u=this.tryParse(()=>super.parseMaybeAssign(e,t),c),!u.error))return u.node;if((i=p)!=null&&i.node)return this.state=p.failState,p.node;if(m.node)return this.state=m.failState,f&&this.reportReservedArrowTypeParam(f),m.node;if((o=u)!=null&&o.node)return this.state=u.failState,u.node;throw((a=p)==null?void 0:a.error)||m.error||((l=u)==null?void 0:l.error)}reportReservedArrowTypeParam(e){var t;e.params.length===1&&!e.params[0].constraint&&!((t=e.extra)!=null&&t.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(k.ReservedArrowTypeParam,e)}parseMaybeUnary(e,t){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(s=>{let i=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&s(),i});if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseFunctionParamType(e){this.eat(17)&&(e.optional=!0);let t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,t);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":t?this.expressionScope.recordArrowParameterBindingError(k.UnexpectedTypeCastInParameter,e):this.raise(k.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,t);break;case"AssignmentExpression":!t&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;default:super.toAssignable(e,t)}}checkToRestConversion(e,t){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,s){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(s!==64||!t)&&["expression",!0];default:return super.isValidLVal(e,t,s)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let t=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let s=super.parseMaybeDecoratorArguments(e);return s.typeParameters=t,s}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){let s=super.parseMaybeDefault(e,t);return s.type==="AssignmentPattern"&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(k.TypeAnnotationAfterAssign,s.typeAnnotation),s}getTokenFromCode(e){if(this.state.inType){if(e===62){this.finishOp(48,1);return}if(e===60){this.finishOp(47,1);return}}super.getTokenFromCode(e)}reScan_lt_gt(){let{type:e}=this.state;e===47?(this.state.pos-=1,this.readToken_lt()):e===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return e===51?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableList(e,t,s){for(let i=0;i<e.length;i++){let o=e[i];o?.type==="TSTypeCastExpression"&&(e[i]=this.typeCastToParameter(o))}super.toAssignableList(e,t,s)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every(t=>this.isAssignable(t,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let t=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let t=super.getGetterSetterExpectedParamCount(e),i=this.getObjectOrClassMethodParams(e)[0];return i&&this.isThisParam(i)?t+1:t}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){let{isAmbientContext:t,strict: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){let 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(80))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(k.NonClassMethodPropertyHasAbstractModifer,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,t,s,i,o,a,l){let c=super.parseMethod(e,t,s,i,o,a,l);if(c.abstract&&(this.hasPlugin("estree")?!!c.value.body:!!c.body)){let{key:u}=c;this.raise(k.AbstractMethodHasImplementation,c,{methodName:u.type==="Identifier"&&!c.computed?u.name:`[${this.input.slice(this.offsetToSourcePos(u.start),this.offsetToSourcePos(u.end))}]`})}return c}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,t,s,i){return!t&&i?(this.parseTypeOnlyImportExportSpecifier(e,!1,s),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,s,i))}parseImportSpecifier(e,t,s,i,o){return!t&&i?(this.parseTypeOnlyImportExportSpecifier(e,!0,s),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,s,i,s?4098:4096))}parseTypeOnlyImportExportSpecifier(e,t,s){let i=t?"imported":"local",o=t?"local":"exported",a=e[i],l,c=!1,p=!0,u=a.loc.start;if(this.isContextual(93)){let m=this.parseIdentifier();if(this.isContextual(93)){let d=this.parseIdentifier();we(this.state.type)?(c=!0,a=m,l=t?this.parseIdentifier():this.parseModuleExportName(),p=!1):(l=d,p=!1)}else we(this.state.type)?(p=!1,l=t?this.parseIdentifier():this.parseModuleExportName()):(c=!0,a=m)}else we(this.state.type)&&(c=!0,t?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());c&&s&&this.raise(t?k.TypeModifierIsUsedInTypeImports:k.TypeModifierIsUsedInTypeExports,u),e[i]=a,e[o]=l;let f=t?"importKind":"exportKind";e[f]=c?"type":"value",p&&this.eatContextual(93)&&(e[o]=t?this.parseIdentifier():this.parseModuleExportName()),e[o]||(e[o]=Re(e[i])),t&&this.checkIdentifier(e[o],c?4098:4096)}};function Cl(r){if(r.type!=="MemberExpression")return!1;let{computed:n,property:e}=r;return n&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:yi(r.object)}function Sl(r,n){var e;let{type:t}=r;if((e=r.extra)!=null&&e.parenthesized)return!1;if(n){if(t==="Literal"){let{value:s}=r;if(typeof s=="string"||typeof s=="boolean")return!0}}else if(t==="StringLiteral"||t==="BooleanLiteral")return!0;return!!(gi(r,n)||Il(r,n)||t==="TemplateLiteral"&&r.expressions.length===0||Cl(r))}function gi(r,n){return n?r.type==="Literal"&&(typeof r.value=="number"||"bigint"in r):r.type==="NumericLiteral"||r.type==="BigIntLiteral"}function Il(r,n){if(r.type==="UnaryExpression"){let{operator:e,argument:t}=r;if(e==="-"&&gi(t,n))return!0}return!1}function yi(r){return r.type==="Identifier"?!0:r.type!=="MemberExpression"||r.computed?!1:yi(r.object)}var ti=Be`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),El=r=>class extends r{parsePlaceholder(e){if(this.match(133)){let t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){let s=e;return(!s.expectedNode||!s.type)&&(s=this.finishNode(s,"Placeholder")),s.expectedNode=t,s}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,t,s,i){e!==void 0&&super.checkReservedWord(e,t,s,i)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,s){return e==="Placeholder"||super.isValidLVal(e,t,s)}toAssignable(e,t){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){return!!(super.chStartsBindingIdentifier(e,t)||this.lookahead().type===133)}verifyBreakContinue(e,t){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){var s;if(t.type!=="Placeholder"||(s=t.extra)!=null&&s.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){let o=e;return o.label=this.finishPlaceholder(t,"Identifier"),this.next(),o.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(o,"LabeledStatement")}this.semicolon();let i=e;return i.name=t.name,this.finishPlaceholder(i,"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){let i=t?"ClassDeclaration":"ClassExpression";this.next();let o=this.state.strict,a=this.parsePlaceholder("Identifier");if(a)if(this.match(81)||this.match(133)||this.match(5))e.id=a;else{if(s||!t)return e.id=null,e.body=this.finishPlaceholder(a,"ClassBody"),this.finishNode(e,i);throw this.raise(ti.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,t,s);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,o),this.finishNode(e,i)}parseExport(e,t){let s=this.parsePlaceholder("Identifier");if(!s)return super.parseExport(e,t);let i=e;if(!this.isContextual(98)&&!this.match(12))return i.specifiers=[],i.source=null,i.declaration=this.finishPlaceholder(s,"Declaration"),this.finishNode(i,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let o=this.startNode();return o.exported=s,i.specifiers=[this.finishNode(o,"ExportDefaultSpecifier")],super.parseExport(i,t)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith($e(133),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var s;return(s=e.specifiers)!=null&&s.length?!0:super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){let{specifiers:t}=e;t!=null&&t.length&&(e.specifiers=t.filter(s=>s.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=t}parseImport(e){let t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let s=this.startNodeAtNode(t);return s.local=t,e.specifiers.push(this.finishNode(s,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(ti.UnexpectedSpace,this.state.lastTokEndLoc)}},Al=r=>class extends r{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,t=this.startNode();if(this.next(),_(this.state.type)){let s=this.parseIdentifierName(),i=this.createIdentifier(t,s);if(i.type="V8IntrinsicIdentifier",this.match(10))return i}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},ni=["minimal","fsharp","hack","smart"],si=["^^","@@","^","%","#"];function kl(r){if(r.has("decorators")){if(r.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let e=r.get("decorators").decoratorsBeforeExport;if(e!=null&&typeof e!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let t=r.get("decorators").allowCallParenthesized;if(t!=null&&typeof t!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(r.has("flow")&&r.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(r.has("placeholders")&&r.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(r.has("pipelineOperator")){var n;let e=r.get("pipelineOperator").proposal;if(!ni.includes(e)){let s=ni.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${s}.`)}let t=((n=r.get("recordAndTuple"))==null?void 0:n.syntaxType)==="hash";if(e==="hack"){if(r.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(r.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let s=r.get("pipelineOperator").topicToken;if(!si.includes(s)){let i=si.map(o=>`"${o}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}if(s==="#"&&t)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",r.get("recordAndTuple")])}\`.`)}else if(e==="smart"&&t)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",r.get("recordAndTuple")])}\`.`)}if(r.has("moduleAttributes")){if(r.has("deprecatedImportAssert")||r.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(r.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(r.has("importAssertions")&&r.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(!r.has("deprecatedImportAssert")&&r.has("importAttributes")&&r.get("importAttributes").deprecatedAssertSyntax&&r.set("deprecatedImportAssert",{}),r.has("recordAndTuple")){let e=r.get("recordAndTuple").syntaxType;if(e!=null){let t=["hash","bar"];if(!t.includes(e))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+t.map(s=>`'${s}'`).join(", "))}}if(r.has("asyncDoExpressions")&&!r.has("doExpressions")){let e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(r.has("optionalChainingAssign")&&r.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var vi={estree:Ma,jsx:vl,flow:gl,typescript:wl,v8intrinsic:Al,placeholders:El},Nl=Object.keys(vi);function Ml(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function Dl(r){let n=Ml();if(r==null)return n;if(r.annexB!=null&&r.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let e of Object.keys(n))r[e]!=null&&(n[e]=r[e]);if(n.startLine===1)r.startIndex==null&&n.startColumn>0?n.startIndex=n.startColumn:r.startColumn==null&&n.startIndex>0&&(n.startColumn=n.startIndex);else if((r.startColumn==null||r.startIndex==null)&&r.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");return n}var Ms=class extends Ns{checkProto(n,e,t,s){if(n.type==="SpreadElement"||this.isObjectMethod(n)||n.computed||n.shorthand)return;let i=n.key;if((i.type==="Identifier"?i.name:i.value)==="__proto__"){if(e){this.raise(b.RecordNoProto,i);return}t.used&&(s?s.doubleProtoLoc===null&&(s.doubleProtoLoc=i.loc.start):this.raise(b.DuplicateProto,i)),t.used=!0}}shouldExitDescending(n,e){return n.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(n.start)===e}getExpression(){this.enterInitialScopes(),this.nextToken();let n=this.parseExpression();return this.match(140)||this.unexpected(),this.finalizeRemainingComments(),n.comments=this.comments,n.errors=this.state.errors,this.options.tokens&&(n.tokens=this.tokens),n}parseExpression(n,e){return n?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(n){let e=this.state.startLoc,t=this.parseMaybeAssign(n);if(this.match(12)){let s=this.startNodeAt(e);for(s.expressions=[t];this.eat(12);)s.expressions.push(this.parseMaybeAssign(n));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return t}parseMaybeAssignDisallowIn(n,e){return this.disallowInAnd(()=>this.parseMaybeAssign(n,e))}parseMaybeAssignAllowIn(n,e){return this.allowInAnd(()=>this.parseMaybeAssign(n,e))}setOptionalParametersError(n,e){var t;n.optionalParametersLoc=(t=e?.loc)!=null?t:this.state.startLoc}parseMaybeAssign(n,e){let t=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let a=this.parseYield();return e&&(a=e.call(this,a,t)),a}let s;n?s=!1:(n=new lt,s=!0);let{type:i}=this.state;(i===10||_(i))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(n);if(e&&(o=e.call(this,o,t)),Ua(this.state.type)){let a=this.startNodeAt(t),l=this.state.value;if(a.operator=l,this.match(29)){this.toAssignable(o,!0),a.left=o;let c=t.index;n.doubleProtoLoc!=null&&n.doubleProtoLoc.index>=c&&(n.doubleProtoLoc=null),n.shorthandAssignLoc!=null&&n.shorthandAssignLoc.index>=c&&(n.shorthandAssignLoc=null),n.privateKeyLoc!=null&&n.privateKeyLoc.index>=c&&(this.checkDestructuringPrivate(n),n.privateKeyLoc=null)}else a.left=o;return this.next(),a.right=this.parseMaybeAssign(),this.checkLVal(o,this.finishNode(a,"AssignmentExpression")),a}else s&&this.checkExpressionErrors(n,!0);return o}parseMaybeConditional(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,s=this.parseExprOps(n);return this.shouldExitDescending(s,t)?s:this.parseConditional(s,e,n)}parseConditional(n,e,t){if(this.eat(17)){let s=this.startNodeAt(e);return s.test=n,s.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),s.alternate=this.parseMaybeAssign(),this.finishNode(s,"ConditionalExpression")}return n}parseMaybeUnaryOrPrivate(n){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(n)}parseExprOps(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,s=this.parseMaybeUnaryOrPrivate(n);return this.shouldExitDescending(s,t)?s:this.parseExprOp(s,e,-1)}parseExprOp(n,e,t){if(this.isPrivateName(n)){let i=this.getPrivateNameSV(n);(t>=mn(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(b.PrivateInExpectedIn,n,{identifierName:i}),this.classScope.usePrivateName(i,n.loc.start)}let s=this.state.type;if(Ra(s)&&(this.prodParam.hasIn||!this.match(58))){let i=mn(s);if(i>t){if(s===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return n;this.checkPipelineAtInfixOperator(n,e)}let o=this.startNodeAt(e);o.left=n,o.operator=this.state.value;let a=s===41||s===42,l=s===40;if(l&&(i=mn(42)),this.next(),s===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(b.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);o.right=this.parseExprOpRightExpr(s,i);let c=this.finishNode(o,a||l?"LogicalExpression":"BinaryExpression"),p=this.state.type;if(l&&(p===41||p===42)||a&&p===40)throw this.raise(b.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,e,t)}}return n}parseExprOpRightExpr(n,e){let t=this.state.startLoc;switch(n){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(b.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(n,e),t)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(n,e)}}parseExprOpBaseRightExpr(n,e){let t=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,$a(n)?e-1:e)}parseHackPipeBody(){var n;let{startLoc:e}=this.state,t=this.parseMaybeAssign();return Ia.has(t.type)&&!((n=t.extra)!=null&&n.parenthesized)&&this.raise(b.PipeUnparenthesizedBody,e,{type:t.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipeTopicUnused,e),t}checkExponentialAfterUnary(n){this.match(57)&&this.raise(b.UnexpectedTokenUnaryExponentiation,n.argument)}parseMaybeUnary(n,e){let t=this.state.startLoc,s=this.isContextual(96);if(s&&this.recordAwaitIfAllowed()){this.next();let l=this.parseAwait(t);return e||this.checkExponentialAfterUnary(l),l}let i=this.match(34),o=this.startNode();if(ja(this.state.type)){o.operator=this.state.value,o.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let l=this.match(89);if(this.next(),o.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(n,!0),this.state.strict&&l){let c=o.argument;c.type==="Identifier"?this.raise(b.StrictDelete,o):this.hasPropertyAsPrivateName(c)&&this.raise(b.DeletePrivateField,o)}if(!i)return e||this.checkExponentialAfterUnary(o),this.finishNode(o,"UnaryExpression")}let a=this.parseUpdate(o,i,n);if(s){let{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?fs(l):fs(l)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(b.AwaitNotInAsyncContext,t),this.parseAwait(t)}return a}parseUpdate(n,e,t){if(e){let o=n;return this.checkLVal(o.argument,this.finishNode(o,"UpdateExpression")),n}let s=this.state.startLoc,i=this.parseExprSubscripts(t);if(this.checkExpressionErrors(t,!1))return i;for(;_a(this.state.type)&&!this.canInsertSemicolon();){let o=this.startNodeAt(s);o.operator=this.state.value,o.prefix=!1,o.argument=i,this.next(),this.checkLVal(i,i=this.finishNode(o,"UpdateExpression"))}return i}parseExprSubscripts(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,s=this.parseExprAtom(n);return this.shouldExitDescending(s,t)?s:this.parseSubscripts(s,e)}parseSubscripts(n,e,t){let s={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(n),stop:!1};do n=this.parseSubscript(n,e,t,s),s.maybeAsyncArrow=!1;while(!s.stop);return n}parseSubscript(n,e,t,s){let{type:i}=this.state;if(!t&&i===15)return this.parseBind(n,e,t,s);if(gn(i))return this.parseTaggedTemplateExpression(n,e,s);let o=!1;if(i===18){if(t&&(this.raise(b.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return s.stop=!0,n;s.optionalChainMember=o=!0,this.next()}if(!t&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(n,e,s,o);{let a=this.eat(0);return a||o||this.eat(16)?this.parseMember(n,e,s,a,o):(s.stop=!0,n)}}parseMember(n,e,t,s,i){let o=this.startNodeAt(e);return o.object=n,o.computed=s,s?(o.property=this.parseExpression(),this.expect(3)):this.match(139)?(n.type==="Super"&&this.raise(b.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),o.property=this.parsePrivateName()):o.property=this.parseIdentifier(!0),t.optionalChainMember?(o.optional=i,this.finishNode(o,"OptionalMemberExpression")):this.finishNode(o,"MemberExpression")}parseBind(n,e,t,s){let i=this.startNodeAt(e);return i.object=n,this.next(),i.callee=this.parseNoCallExpr(),s.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),e,t)}parseCoverCallAndAsyncArrowHead(n,e,t,s){let i=this.state.maybeInArrowParameters,o=null;this.state.maybeInArrowParameters=!0,this.next();let a=this.startNodeAt(e);a.callee=n;let{maybeAsyncArrow:l,optionalChainMember:c}=t;l&&(this.expressionScope.enter(cl()),o=new lt),c&&(a.optional=s),s?a.arguments=this.parseCallExpressionArguments(11):a.arguments=this.parseCallExpressionArguments(11,n.type!=="Super",a,o);let p=this.finishCallExpression(a,c);return l&&this.shouldParseAsyncArrow()&&!s?(t.stop=!0,this.checkDestructuringPrivate(o),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),p=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),p)):(l&&(this.checkExpressionErrors(o,!0),this.expressionScope.exit()),this.toReferencedArguments(p)),this.state.maybeInArrowParameters=i,p}toReferencedArguments(n,e){this.toReferencedListDeep(n.arguments,e)}parseTaggedTemplateExpression(n,e,t){let s=this.startNodeAt(e);return s.tag=n,s.quasi=this.parseTemplate(!0),t.optionalChainMember&&this.raise(b.OptionalChainingNoTemplate,e),this.finishNode(s,"TaggedTemplateExpression")}atPossibleAsyncArrow(n){return n.type==="Identifier"&&n.name==="async"&&this.state.lastTokEndLoc.index===n.end&&!this.canInsertSemicolon()&&n.end-n.start===5&&this.offsetToSourcePos(n.start)===this.state.potentialArrowAt}finishCallExpression(n,e){if(n.callee.type==="Import")if(n.arguments.length===0||n.arguments.length>2)this.raise(b.ImportCallArity,n);else for(let t of n.arguments)t.type==="SpreadElement"&&this.raise(b.ImportCallSpreadArgument,t);return this.finishNode(n,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(n,e,t,s){let i=[],o=!0,a=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(n);){if(o)o=!1;else if(this.expect(12),this.match(n)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}i.push(this.parseExprListItem(!1,s,e))}return this.state.inFSharpPipelineDirectBody=a,i}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(n,e){var t;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(n,e.arguments,!0,(t=e.extra)==null?void 0:t.trailingCommaLoc),e.innerComments&&Bt(n,e.innerComments),e.callee.trailingComments&&Bt(n,e.callee.trailingComments),n}parseNoCallExpr(){let n=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),n,!0)}parseExprAtom(n){let e,t=null,{type:s}=this.state;switch(s){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.options.createImportExpressions?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(b.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let i=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(i)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,n);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,n);case 68:return this.parseFunctionOrFunctionSent();case 26:t=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(t,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;let i=e.callee=this.parseNoCallExpr();if(i.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(b.UnsupportedBind,i)}case 139:return this.raise(b.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let i=this.getPluginOption("pipelineOperator","proposal");if(i)return this.parseTopicReference(i);this.unexpected();break}case 47:{let i=this.input.codePointAt(this.nextTokenStart());Ue(i)||i===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(s===137)return this.parseDecimalLiteral(this.state.value);if(_(s)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let i=this.state.potentialArrowAt===this.state.start,o=this.state.containsEsc,a=this.parseIdentifier();if(!o&&a.name==="async"&&!this.canInsertSemicolon()){let{type:l}=this.state;if(l===68)return this.resetPreviousNodeTrailingComments(a),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(a));if(_(l))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(a)):a;if(l===90)return this.resetPreviousNodeTrailingComments(a),this.parseDo(this.startNodeAtNode(a),!0)}return i&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(a),[a],!1)):a}else this.unexpected()}}parseTopicReferenceThenEqualsSign(n,e){let t=this.getPluginOption("pipelineOperator","proposal");if(t)return this.state.type=n,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=se(this.state.endLoc,-1),this.parseTopicReference(t);this.unexpected()}parseTopicReference(n){let e=this.startNode(),t=this.state.startLoc,s=this.state.type;return this.next(),this.finishTopicReference(e,t,n,s)}finishTopicReference(n,e,t,s){if(this.testTopicReferenceConfiguration(t,e,s)){let i=t==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(t==="smart"?b.PrimaryTopicNotAllowed:b.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(n,i)}else throw this.raise(b.PipeTopicUnconfiguredToken,e,{token:$e(s)})}testTopicReferenceConfiguration(n,e,t){switch(n){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:$e(t)}]);case"smart":return t===27;default:throw this.raise(b.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(n){this.prodParam.enter(hn(!0,this.prodParam.hasYield));let e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(b.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(n,e,!0)}parseDo(n,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),n.async=e,this.next();let t=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),n.body=this.parseBlock(),this.prodParam.exit()):n.body=this.parseBlock(),this.state.labels=t,this.finishNode(n,"DoExpression")}parseSuper(){let n=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(b.SuperNotAllowed,n):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(b.UnexpectedSuper,n),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(b.UnsupportedSuper,n),this.finishNode(n,"Super")}parsePrivateName(){let n=this.startNode(),e=this.startNodeAt(se(this.state.startLoc,1)),t=this.state.value;return this.next(),n.id=this.createIdentifier(e,t),this.finishNode(n,"PrivateName")}parseFunctionOrFunctionSent(){let n=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(n),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(n,e,"sent")}return this.parseFunction(n)}parseMetaProperty(n,e,t){n.meta=e;let s=this.state.containsEsc;return n.property=this.parseIdentifier(!0),(n.property.name!==t||s)&&this.raise(b.UnsupportedMetaProperty,n.property,{target:e.name,onlyValidPropertyName:t}),this.finishNode(n,"MetaProperty")}parseImportMetaProperty(n){let e=this.createIdentifier(this.startNodeAtNode(n),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(b.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let t=this.isContextual(105);if(t||this.unexpected(),this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(b.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),n.phase=t?"source":"defer",this.parseImportCall(n)}return this.parseMetaProperty(n,e,"meta")}parseLiteralAtNode(n,e,t){return this.addExtra(t,"rawValue",n),this.addExtra(t,"raw",this.input.slice(this.offsetToSourcePos(t.start),this.state.end)),t.value=n,this.next(),this.finishNode(t,e)}parseLiteral(n,e){let t=this.startNode();return this.parseLiteralAtNode(n,e,t)}parseStringLiteral(n){return this.parseLiteral(n,"StringLiteral")}parseNumericLiteral(n){return this.parseLiteral(n,"NumericLiteral")}parseBigIntLiteral(n){return this.parseLiteral(n,"BigIntLiteral")}parseDecimalLiteral(n){return this.parseLiteral(n,"DecimalLiteral")}parseRegExpLiteral(n){let e=this.startNode();return this.addExtra(e,"raw",this.input.slice(this.offsetToSourcePos(e.start),this.state.end)),e.pattern=n.pattern,e.flags=n.flags,this.next(),this.finishNode(e,"RegExpLiteral")}parseBooleanLiteral(n){let e=this.startNode();return e.value=n,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){let n=this.startNode();return this.next(),this.finishNode(n,"NullLiteral")}parseParenAndDistinguishExpression(n){let e=this.state.startLoc,t;this.next(),this.expressionScope.enter(ll());let s=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let o=this.state.startLoc,a=[],l=new lt,c=!0,p,u;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,l.optionalParametersLoc===null?null:l.optionalParametersLoc),this.match(11)){u=this.state.startLoc;break}if(this.match(21)){let d=this.state.startLoc;if(p=this.state.startLoc,a.push(this.parseParenItem(this.parseRestBinding(),d)),!this.checkCommaAfterRest(41))break}else a.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}let f=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=s,this.state.inFSharpPipelineDirectBody=i;let m=this.startNodeAt(e);return n&&this.shouldParseArrow(a)&&(m=this.parseArrow(m))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(m,a,!1),m):(this.expressionScope.exit(),a.length||this.unexpected(this.state.lastTokStartLoc),u&&this.unexpected(u),p&&this.unexpected(p),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(a,!0),a.length>1?(t=this.startNodeAt(o),t.expressions=a,this.finishNode(t,"SequenceExpression"),this.resetEndLocation(t,f)):t=a[0],this.wrapParenthesis(e,t))}wrapParenthesis(n,e){if(!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",n.index),this.takeSurroundingComments(e,n.index,this.state.lastTokEndLoc.index),e;let t=this.startNodeAt(n);return t.expression=e,this.finishNode(t,"ParenthesizedExpression")}shouldParseArrow(n){return!this.canInsertSemicolon()}parseArrow(n){if(this.eat(19))return n}parseParenItem(n,e){return n}parseNewOrNewTarget(){let n=this.startNode();if(this.next(),this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(n),"new");this.next();let t=this.parseMetaProperty(n,e,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(b.UnexpectedNewTarget,t),t}return this.parseNew(n)}parseNew(n){if(this.parseNewCallee(n),this.eat(10)){let e=this.parseExprList(11);this.toReferencedList(e),n.arguments=e}else n.arguments=[];return this.finishNode(n,"NewExpression")}parseNewCallee(n){let e=this.match(83),t=this.parseNoCallExpr();n.callee=t,e&&(t.type==="Import"||t.type==="ImportExpression")&&this.raise(b.ImportCallNotNewExpression,t)}parseTemplateElement(n){let{start:e,startLoc:t,end:s,value:i}=this.state,o=e+1,a=this.startNodeAt(se(t,1));i===null&&(n||this.raise(b.InvalidEscapeSequenceTemplate,se(this.state.firstInvalidTemplateEscapePos,1)));let l=this.match(24),c=l?-1:-2,p=s+c;a.value={raw:this.input.slice(o,p).replace(/\r\n?/g,`
9
+ `),cooked:i===null?null:i.slice(1,c)},a.tail=l,this.next();let u=this.finishNode(a,"TemplateElement");return this.resetEndLocation(u,se(this.state.lastTokEndLoc,c)),u}parseTemplate(n){let e=this.startNode(),t=this.parseTemplateElement(n),s=[t],i=[];for(;!t.tail;)i.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),s.push(t=this.parseTemplateElement(n));return e.expressions=i,e.quasis=s,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(n,e,t,s){t&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=Object.create(null),a=!0,l=this.startNode();for(l.properties=[],this.next();!this.match(n);){if(a)a=!1;else if(this.expect(12),this.match(n)){this.addTrailingCommaExtraToNode(l);break}let p;e?p=this.parseBindingProperty():(p=this.parsePropertyDefinition(s),this.checkProto(p,t,o,s)),t&&!this.isObjectProperty(p)&&p.type!=="SpreadElement"&&this.raise(b.InvalidRecordProperty,p),p.shorthand&&this.addExtra(p,"shorthand",!0),l.properties.push(p)}this.next(),this.state.inFSharpPipelineDirectBody=i;let c="ObjectExpression";return e?c="ObjectPattern":t&&(c="RecordExpression"),this.finishNode(l,c)}addTrailingCommaExtraToNode(n){this.addExtra(n,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(n,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(n){return!n.computed&&n.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(n){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(b.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let t=this.startNode(),s=!1,i=!1,o;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(t.decorators=e,e=[]),t.method=!1,n&&(o=this.state.startLoc);let a=this.eat(55);this.parsePropertyNamePrefixOperator(t);let l=this.state.containsEsc;if(this.parsePropertyName(t,n),!a&&!l&&this.maybeAsyncOrAccessorProp(t)){let{key:c}=t,p=c.name;p==="async"&&!this.hasPrecedingLineBreak()&&(s=!0,this.resetPreviousNodeTrailingComments(c),a=this.eat(55),this.parsePropertyName(t)),(p==="get"||p==="set")&&(i=!0,this.resetPreviousNodeTrailingComments(c),t.kind=p,this.match(55)&&(a=!0,this.raise(b.AccessorIsGenerator,this.state.curPosition(),{kind:p}),this.next()),this.parsePropertyName(t))}return this.parseObjPropValue(t,o,a,s,!1,i,n)}getGetterSetterExpectedParamCount(n){return n.kind==="get"?0:1}getObjectOrClassMethodParams(n){return n.params}checkGetterSetterParams(n){var e;let t=this.getGetterSetterExpectedParamCount(n),s=this.getObjectOrClassMethodParams(n);s.length!==t&&this.raise(n.kind==="get"?b.BadGetterArity:b.BadSetterArity,n),n.kind==="set"&&((e=s[s.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(b.BadSetterRestParameter,n)}parseObjectMethod(n,e,t,s,i){if(i){let o=this.parseMethod(n,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(o),o}if(t||e||this.match(10))return s&&this.unexpected(),n.kind="method",n.method=!0,this.parseMethod(n,e,t,!1,!1,"ObjectMethod")}parseObjectProperty(n,e,t,s){if(n.shorthand=!1,this.eat(14))return n.value=t?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(s),this.finishNode(n,"ObjectProperty");if(!n.computed&&n.key.type==="Identifier"){if(this.checkReservedWord(n.key.name,n.key.loc.start,!0,!1),t)n.value=this.parseMaybeDefault(e,Re(n.key));else if(this.match(29)){let i=this.state.startLoc;s!=null?s.shorthandAssignLoc===null&&(s.shorthandAssignLoc=i):this.raise(b.InvalidCoverInitializedName,i),n.value=this.parseMaybeDefault(e,Re(n.key))}else n.value=Re(n.key);return n.shorthand=!0,this.finishNode(n,"ObjectProperty")}}parseObjPropValue(n,e,t,s,i,o,a){let l=this.parseObjectMethod(n,t,s,i,o)||this.parseObjectProperty(n,e,i,a);return l||this.unexpected(),l}parsePropertyName(n,e){if(this.eat(0))n.computed=!0,n.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:t,value:s}=this.state,i;if(we(t))i=this.parseIdentifier(!0);else switch(t){case 135:i=this.parseNumericLiteral(s);break;case 134:i=this.parseStringLiteral(s);break;case 136:i=this.parseBigIntLiteral(s);break;case 139:{let o=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=o):this.raise(b.UnexpectedPrivateField,o),i=this.parsePrivateName();break}default:if(t===137){i=this.parseDecimalLiteral(s);break}this.unexpected()}n.key=i,t!==139&&(n.computed=!1)}}initFunction(n,e){n.id=null,n.generator=!1,n.async=e}parseMethod(n,e,t,s,i,o,a=!1){this.initFunction(n,t),n.generator=e,this.scope.enter(18|(a?64:0)|(i?32:0)),this.prodParam.enter(hn(t,n.generator)),this.parseFunctionParams(n,s);let l=this.parseFunctionBodyAndFinish(n,o,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(n,e,t,s){t&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=this.startNode();return this.next(),o.elements=this.parseExprList(n,!t,s,o),this.state.inFSharpPipelineDirectBody=i,this.finishNode(o,t?"TupleExpression":"ArrayExpression")}parseArrowExpression(n,e,t,s){this.scope.enter(6);let i=hn(t,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(n,t);let o=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(n,e,s)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(n,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=o,this.finishNode(n,"ArrowFunctionExpression")}setArrowFunctionParameters(n,e,t){this.toAssignableList(e,t,!1),n.params=e}parseFunctionBodyAndFinish(n,e,t=!1){return this.parseFunctionBody(n,!1,t),this.finishNode(n,e)}parseFunctionBody(n,e,t=!1){let s=e&&!this.match(5);if(this.expressionScope.enter(hi()),s)n.body=this.parseMaybeAssign(),this.checkParams(n,!1,e,!1);else{let i=this.state.strict,o=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),n.body=this.parseBlock(!0,!1,a=>{let l=!this.isSimpleParamList(n.params);a&&l&&this.raise(b.IllegalLanguageModeDirective,(n.kind==="method"||n.kind==="constructor")&&n.key?n.key.loc.end:n);let c=!i&&this.state.strict;this.checkParams(n,!this.state.strict&&!e&&!t&&!l,e,c),this.state.strict&&n.id&&this.checkIdentifier(n.id,65,c)}),this.prodParam.exit(),this.state.labels=o}this.expressionScope.exit()}isSimpleParameter(n){return n.type==="Identifier"}isSimpleParamList(n){for(let e=0,t=n.length;e<t;e++)if(!this.isSimpleParameter(n[e]))return!1;return!0}checkParams(n,e,t,s=!0){let i=!e&&new Set,o={type:"FormalParameters"};for(let a of n.params)this.checkLVal(a,o,5,i,s)}parseExprList(n,e,t,s){let i=[],o=!0;for(;!this.eat(n);){if(o)o=!1;else if(this.expect(12),this.match(n)){s&&this.addTrailingCommaExtraToNode(s),this.next();break}i.push(this.parseExprListItem(e,t))}return i}parseExprListItem(n,e,t){let s;if(this.match(12))n||this.raise(b.UnexpectedToken,this.state.curPosition(),{unexpected:","}),s=null;else if(this.match(21)){let i=this.state.startLoc;s=this.parseParenItem(this.parseSpread(e),i)}else if(this.match(17)){this.expectPlugin("partialApplication"),t||this.raise(b.UnexpectedArgumentPlaceholder,this.state.startLoc);let i=this.startNode();this.next(),s=this.finishNode(i,"ArgumentPlaceholder")}else s=this.parseMaybeAssignAllowIn(e,this.parseParenItem);return s}parseIdentifier(n){let e=this.startNode(),t=this.parseIdentifierName(n);return this.createIdentifier(e,t)}createIdentifier(n,e){return n.name=e,n.loc.identifierName=e,this.finishNode(n,"Identifier")}parseIdentifierName(n){let e,{startLoc:t,type:s}=this.state;we(s)?e=this.state.value:this.unexpected();let i=Oa(s);return n?i&&this.replaceToken(132):this.checkReservedWord(e,t,i,!1),this.next(),e}checkReservedWord(n,e,t,s){if(n.length>10||!Za(n))return;if(t&&Ja(n)){this.raise(b.UnexpectedKeyword,e,{keyword:n});return}if((this.state.strict?s?ui:ci:li)(n,this.inModule)){this.raise(b.UnexpectedReservedWord,e,{reservedWord:n});return}else if(n==="yield"){if(this.prodParam.hasYield){this.raise(b.YieldBindingIdentifier,e);return}}else if(n==="await"){if(this.prodParam.hasAwait){this.raise(b.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(b.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(n==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(b.ArgumentsInClass,e);return}}recordAwaitIfAllowed(){let n=this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction;return n&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),n}parseAwait(n){let e=this.startNodeAt(n);return this.expressionScope.recordParameterInitializerError(b.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(b.ObsoleteAwaitStar,e),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:n}=this.state;return n===53||n===10||n===0||gn(n)||n===102&&!this.state.containsEsc||n===138||n===56||this.hasPlugin("v8intrinsic")&&n===54}parseYield(){let n=this.startNode();this.expressionScope.recordParameterInitializerError(b.YieldInParameter,n),this.next();let e=!1,t=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:t=this.parseMaybeAssign()}return n.delegate=e,n.argument=t,this.finishNode(n,"YieldExpression")}parseImportCall(n){if(this.next(),n.source=this.parseMaybeAssignAllowIn(),n.options=null,this.eat(12)&&!this.match(11)&&(n.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(b.ImportCallArity,n)}return this.expect(11),this.finishNode(n,"ImportExpression")}checkPipelineAtInfixOperator(n,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&n.type==="SequenceExpression"&&this.raise(b.PipelineHeadSequenceExpression,e)}parseSmartPipelineBodyInStyle(n,e){if(this.isSimpleReference(n)){let t=this.startNodeAt(e);return t.callee=n,this.finishNode(t,"PipelineBareFunction")}else{let t=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),t.expression=n,this.finishNode(t,"PipelineTopicExpression")}}isSimpleReference(n){switch(n.type){case"MemberExpression":return!n.computed&&this.isSimpleReference(n.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(n){if(this.match(19))throw this.raise(b.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipelineTopicUnused,n)}withTopicBindingContext(n){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return n()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(n){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return n()}finally{this.state.topicContext=e}}else return n()}withSoloAwaitPermittingContext(n){let e=this.state.soloAwait;this.state.soloAwait=!0;try{return n()}finally{this.state.soloAwait=e}}allowInAnd(n){let e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return n()}finally{this.prodParam.exit()}}return n()}disallowInAnd(n){let e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return n()}finally{this.prodParam.exit()}}return n()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(n){let e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let t=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let s=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,n);return this.state.inFSharpPipelineDirectBody=t,s}parseModuleExpression(){this.expectPlugin("moduleBlocks");let n=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let e=this.startNodeAt(this.state.endLoc);this.next();let t=this.initializeScopes(!0);this.enterInitialScopes();try{n.body=this.parseProgram(e,8,"module")}finally{t()}return this.finishNode(n,"ModuleExpression")}parsePropertyNamePrefixOperator(n){}},us={kind:1},Ll={kind:2},Ol=/[\uD800-\uDFFF]/u,ds=/in(?:stanceof)?/y;function Fl(r,n,e){for(let t=0;t<r.length;t++){let s=r[t],{type:i}=s;if(typeof i=="number"){{if(i===139){let{loc:o,start:a,value:l,end:c}=s,p=a+1,u=se(o.start,1);r.splice(t,1,new Ae({type:Oe(27),value:"#",start:a,end:p,startLoc:o.start,endLoc:u}),new Ae({type:Oe(132),value:l,start:p,end:c,startLoc:u,endLoc:o.end})),t++;continue}if(gn(i)){let{loc:o,start:a,value:l,end:c}=s,p=a+1,u=se(o.start,1),f;n.charCodeAt(a-e)===96?f=new Ae({type:Oe(22),value:"`",start:a,end:p,startLoc:o.start,endLoc:u}):f=new Ae({type:Oe(8),value:"}",start:a,end:p,startLoc:o.start,endLoc:u});let m,d,g,h;i===24?(d=c-1,g=se(o.end,-1),m=l===null?null:l.slice(1,-1),h=new Ae({type:Oe(22),value:"`",start:d,end:c,startLoc:g,endLoc:o.end})):(d=c-2,g=se(o.end,-2),m=l===null?null:l.slice(1,-2),h=new Ae({type:Oe(23),value:"${",start:d,end:c,startLoc:g,endLoc:o.end})),r.splice(t,1,f,new Ae({type:Oe(20),value:m,start:p,end:d,startLoc:u,endLoc:g}),h),t+=2;continue}}s.type=Oe(i)}}return r}var Ds=class extends Ms{parseTopLevel(n,e){return n.program=this.parseProgram(e),n.comments=this.comments,this.options.tokens&&(n.tokens=Fl(this.tokens,this.input,this.startIndex)),this.finishNode(n,"File")}parseProgram(n,e=140,t=this.options.sourceType){if(n.sourceType=t,n.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(n,!0,!0,e),this.inModule){if(!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[i,o]of Array.from(this.scope.undefinedExports))this.raise(b.ModuleExportUndefined,o,{localName:i});this.addExtra(n,"topLevelAwait",this.state.hasTopLevelAwait)}let s;return e===140?s=this.finishNode(n,"Program"):s=this.finishNodeAt(n,"Program",se(this.state.startLoc,-1)),s}stmtToDirective(n){let e=n;e.type="Directive",e.value=e.expression,delete e.expression;let t=e.value,s=t.value,i=this.input.slice(this.offsetToSourcePos(t.start),this.offsetToSourcePos(t.end)),o=t.value=i.slice(1,-1);return this.addExtra(t,"raw",i),this.addExtra(t,"rawValue",o),this.addExtra(t,"expressionValue",s),t.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;let n=this.startNode();return n.value=this.state.value,this.next(),this.finishNode(n,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(n,e){if(Ue(n)){if(ds.lastIndex=e,ds.test(this.input)){let t=this.codePointAtPos(ds.lastIndex);if(!ot(t)&&t!==92)return!1}return!0}else return n===92}chStartsBindingPattern(n){return n===91||n===123}hasFollowingBindingAtom(){let n=this.nextTokenStart(),e=this.codePointAtPos(n);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,n)}hasInLineFollowingBindingIdentifierOrBrace(){let n=this.nextTokenInLineStart(),e=this.codePointAtPos(n);return e===123||this.chStartsBindingIdentifier(e,n)}startsUsingForOf(){let{type:n,containsEsc:e}=this.lookahead();if(n===102&&!e)return!1;if(_(n)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let n=this.nextTokenInLineStart();if(this.isUnparsedContextual(n,"using")){n=this.nextTokenInLineStartSince(n+5);let e=this.codePointAtPos(n);if(this.chStartsBindingIdentifier(e,n))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(n=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,n&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(n){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(n,e)}parseStatementContent(n,e){let t=this.state.type,s=this.startNode(),i=!!(n&2),o=!!(n&4),a=n&1;switch(t){case 60:return this.parseBreakContinueStatement(s,!0);case 63:return this.parseBreakContinueStatement(s,!1);case 64:return this.parseDebuggerStatement(s);case 90:return this.parseDoWhileStatement(s);case 91:return this.parseForStatement(s);case 68:if(this.lookaheadCharCode()===46)break;return o||this.raise(this.state.strict?b.StrictFunction:this.options.annexB?b.SloppyFunctionAnnexB:b.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(s,!1,!i&&o);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,s),!0);case 69:return this.parseIfStatement(s);case 70:return this.parseReturnStatement(s);case 71:return this.parseSwitchStatement(s);case 72:return this.parseThrowStatement(s);case 73:return this.parseTryStatement(s);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?i||this.raise(b.UnexpectedLexicalDeclaration,s):this.raise(b.AwaitUsingNotInAsyncContext,s),this.next(),this.parseVarStatement(s,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(b.UnexpectedUsingDeclaration,this.state.startLoc):i||this.raise(b.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(s,"using");case 100:{if(this.state.containsEsc)break;let p=this.nextTokenStart(),u=this.codePointAtPos(p);if(u!==91&&(!i&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(u,p)&&u!==123))break}case 75:i||this.raise(b.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let p=this.state.value;return this.parseVarStatement(s,p)}case 92:return this.parseWhileStatement(s);case 76:return this.parseWithStatement(s);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(s);case 83:{let p=this.lookaheadCharCode();if(p===40||p===46)break}case 82:{!this.options.allowImportExportEverywhere&&!a&&this.raise(b.UnexpectedImportExport,this.state.startLoc),this.next();let p;return t===83?(p=this.parseImport(s),p.type==="ImportDeclaration"&&(!p.importKind||p.importKind==="value")&&(this.sawUnambiguousESM=!0)):(p=this.parseExport(s,e),(p.type==="ExportNamedDeclaration"&&(!p.exportKind||p.exportKind==="value")||p.type==="ExportAllDeclaration"&&(!p.exportKind||p.exportKind==="value")||p.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(p),p}default:if(this.isAsyncFunction())return i||this.raise(b.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(s,!0,!i&&o)}let l=this.state.value,c=this.parseExpression();return _(t)&&c.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(s,l,c,n):this.parseExpressionStatement(s,c,e)}assertModuleNodeAllowed(n){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(b.ImportOutsideModule,n)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(n,e,t){return n&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(b.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...n)):e.decorators=n,this.resetStartLocationFromNode(e,n[0]),t&&this.resetStartLocationFromNode(t,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(n){let e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))n||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(b.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(b.UnexpectedLeadingDecorator,this.state.startLoc);return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let n=this.startNode();if(this.next(),this.hasPlugin("decorators")){let e=this.state.startLoc,t;if(this.match(10)){let s=this.state.startLoc;this.next(),t=this.parseExpression(),this.expect(11),t=this.wrapParenthesis(s,t);let i=this.state.startLoc;n.expression=this.parseMaybeDecoratorArguments(t),this.getPluginOption("decorators","allowCallParenthesized")===!1&&n.expression!==t&&this.raise(b.DecoratorArgumentsOutsideParentheses,i)}else{for(t=this.parseIdentifier(!1);this.eat(16);){let s=this.startNodeAt(e);s.object=t,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),s.property=this.parsePrivateName()):s.property=this.parseIdentifier(!0),s.computed=!1,t=this.finishNode(s,"MemberExpression")}n.expression=this.parseMaybeDecoratorArguments(t)}}else n.expression=this.parseExprSubscripts();return this.finishNode(n,"Decorator")}parseMaybeDecoratorArguments(n){if(this.eat(10)){let e=this.startNodeAtNode(n);return e.callee=n,e.arguments=this.parseCallExpressionArguments(11),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return n}parseBreakContinueStatement(n,e){return this.next(),this.isLineTerminator()?n.label=null:(n.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(n,e),this.finishNode(n,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(n,e){let t;for(t=0;t<this.state.labels.length;++t){let s=this.state.labels[t];if((n.label==null||s.name===n.label.name)&&(s.kind!=null&&(e||s.kind===1)||n.label&&e))break}if(t===this.state.labels.length){let s=e?"BreakStatement":"ContinueStatement";this.raise(b.IllegalBreakContinue,n,{type:s})}}parseDebuggerStatement(n){return this.next(),this.semicolon(),this.finishNode(n,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let n=this.parseExpression();return this.expect(11),n}parseDoWhileStatement(n){return this.next(),this.state.labels.push(us),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),n.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(n,"DoWhileStatement")}parseForStatement(n){this.next(),this.state.labels.push(us);let e=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(e=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(n,null);let t=this.isContextual(100);{let l=this.isContextual(96)&&this.startsAwaitUsing(),c=l||this.isContextual(107)&&this.startsUsingForOf(),p=t&&this.hasFollowingBindingAtom()||c;if(this.match(74)||this.match(75)||p){let u=this.startNode(),f;l?(f="await using",this.recordAwaitIfAllowed()||this.raise(b.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):f=this.state.value,this.next(),this.parseVar(u,!0,f);let m=this.finishNode(u,"VariableDeclaration"),d=this.match(58);return d&&c&&this.raise(b.ForInUsing,m),(d||this.isContextual(102))&&m.declarations.length===1?this.parseForIn(n,m,e):(e!==null&&this.unexpected(e),this.parseFor(n,m))}}let s=this.isContextual(95),i=new lt,o=this.parseExpression(!0,i),a=this.isContextual(102);if(a&&(t&&this.raise(b.ForOfLet,o),e===null&&s&&o.type==="Identifier"&&this.raise(b.ForOfAsync,o)),a||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(o,!0);let l=a?"ForOfStatement":"ForInStatement";return this.checkLVal(o,{type:l}),this.parseForIn(n,o,e)}else this.checkExpressionErrors(i,!0);return e!==null&&this.unexpected(e),this.parseFor(n,o)}parseFunctionStatement(n,e,t){return this.next(),this.parseFunction(n,1|(t?2:0)|(e?8:0))}parseIfStatement(n){return this.next(),n.test=this.parseHeaderExpression(),n.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),n.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(n,"IfStatement")}parseReturnStatement(n){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(b.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?n.argument=null:(n.argument=this.parseExpression(),this.semicolon()),this.finishNode(n,"ReturnStatement")}parseSwitchStatement(n){this.next(),n.discriminant=this.parseHeaderExpression();let e=n.cases=[];this.expect(5),this.state.labels.push(Ll),this.scope.enter(0);let t;for(let s;!this.match(8);)if(this.match(61)||this.match(65)){let i=this.match(61);t&&this.finishNode(t,"SwitchCase"),e.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(s&&this.raise(b.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),s=!0,t.test=null),this.expect(14)}else t?t.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(n,"SwitchStatement")}parseThrowStatement(n){return this.next(),this.hasPrecedingLineBreak()&&this.raise(b.NewlineAfterThrow,this.state.lastTokEndLoc),n.argument=this.parseExpression(),this.semicolon(),this.finishNode(n,"ThrowStatement")}parseCatchClauseParam(){let n=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&n.type==="Identifier"?8:0),this.checkLVal(n,{type:"CatchClause"},9),n}parseTryStatement(n){if(this.next(),n.block=this.parseBlock(),n.handler=null,this.match(62)){let e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),n.handler=this.finishNode(e,"CatchClause")}return n.finalizer=this.eat(67)?this.parseBlock():null,!n.handler&&!n.finalizer&&this.raise(b.NoCatchOrFinally,n),this.finishNode(n,"TryStatement")}parseVarStatement(n,e,t=!1){return this.next(),this.parseVar(n,!1,e,t),this.semicolon(),this.finishNode(n,"VariableDeclaration")}parseWhileStatement(n){return this.next(),n.test=this.parseHeaderExpression(),this.state.labels.push(us),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(n,"WhileStatement")}parseWithStatement(n){return this.state.strict&&this.raise(b.StrictWith,this.state.startLoc),this.next(),n.object=this.parseHeaderExpression(),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(n,"WithStatement")}parseEmptyStatement(n){return this.next(),this.finishNode(n,"EmptyStatement")}parseLabeledStatement(n,e,t,s){for(let o of this.state.labels)o.name===e&&this.raise(b.LabelRedeclaration,t,{labelName:e});let i=Ba(this.state.type)?1:this.match(71)?2:null;for(let o=this.state.labels.length-1;o>=0;o--){let a=this.state.labels[o];if(a.statementStart===n.start)a.statementStart=this.sourceToOffsetPos(this.state.start),a.kind=i;else break}return this.state.labels.push({name:e,kind:i,statementStart:this.sourceToOffsetPos(this.state.start)}),n.body=s&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),n.label=t,this.finishNode(n,"LabeledStatement")}parseExpressionStatement(n,e,t){return n.expression=e,this.semicolon(),this.finishNode(n,"ExpressionStatement")}parseBlock(n=!1,e=!0,t){let s=this.startNode();return n&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(s,n,!1,8,t),e&&this.scope.exit(),this.finishNode(s,"BlockStatement")}isValidDirective(n){return n.type==="ExpressionStatement"&&n.expression.type==="StringLiteral"&&!n.expression.extra.parenthesized}parseBlockBody(n,e,t,s,i){let o=n.body=[],a=n.directives=[];this.parseBlockOrModuleBlockBody(o,e?a:void 0,t,s,i)}parseBlockOrModuleBlockBody(n,e,t,s,i){let o=this.state.strict,a=!1,l=!1;for(;!this.match(s);){let c=t?this.parseModuleItem():this.parseStatementListItem();if(e&&!l){if(this.isValidDirective(c)){let p=this.stmtToDirective(c);e.push(p),!a&&p.value.value==="use strict"&&(a=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}n.push(c)}i?.call(this,a),o||this.setStrict(!1),this.next()}parseFor(n,e){return n.init=e,this.semicolon(!1),n.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),n.update=this.match(11)?null:this.parseExpression(),this.expect(11),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(n,"ForStatement")}parseForIn(n,e,t){let s=this.match(58);return this.next(),s?t!==null&&this.unexpected(t):n.await=t!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!s||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(b.ForInOfLoopInitializer,e,{type:s?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(b.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),n.left=e,n.right=s?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(n,s?"ForInStatement":"ForOfStatement")}parseVar(n,e,t,s=!1){let i=n.declarations=[];for(n.kind=t;;){let o=this.startNode();if(this.parseVarId(o,t),o.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,o.init===null&&!s&&(o.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(b.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(t==="const"||t==="using"||t==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(b.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:t})),i.push(this.finishNode(o,"VariableDeclarator")),!this.eat(12))break}return n}parseVarId(n,e){let t=this.parseBindingAtom();(e==="using"||e==="await using")&&(t.type==="ArrayPattern"||t.type==="ObjectPattern")&&this.raise(b.UsingDeclarationHasBindingPattern,t.loc.start),this.checkLVal(t,{type:"VariableDeclarator"},e==="var"?5:8201),n.id=t}parseAsyncFunctionExpression(n){return this.parseFunction(n,8)}parseFunction(n,e=0){let t=e&2,s=!!(e&1),i=s&&!(e&4),o=!!(e&8);this.initFunction(n,o),this.match(55)&&(t&&this.raise(b.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),n.generator=!0),s&&(n.id=this.parseFunctionId(i));let a=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(hn(o,n.generator)),s||(n.id=this.parseFunctionId()),this.parseFunctionParams(n,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(n,s?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),s&&!t&&this.registerFunctionStatementId(n),this.state.maybeInArrowParameters=a,n}parseFunctionId(n){return n||_(this.state.type)?this.parseIdentifier():null}parseFunctionParams(n,e){this.expect(10),this.expressionScope.enter(al()),n.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(n){n.id&&this.scope.declareName(n.id.name,!this.options.annexB||this.state.strict||n.generator||n.async?this.scope.treatFunctionsAsVar?5:8201:17,n.id.loc.start)}parseClass(n,e,t){this.next();let s=this.state.strict;return this.state.strict=!0,this.parseClassId(n,e,t),this.parseClassSuper(n),n.body=this.parseClassBody(!!n.superClass,s),this.finishNode(n,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(n){return n.type==="Identifier"&&n.name==="constructor"||n.type==="StringLiteral"&&n.value==="constructor"}isNonstaticConstructor(n){return!n.computed&&!n.static&&this.nameIsConstructor(n.key)}parseClassBody(n,e){this.classScope.enter();let t={hadConstructor:!1,hadSuperClass:n},s=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(s.length>0)throw this.raise(b.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){s.push(this.parseDecorator());continue}let o=this.startNode();s.length&&(o.decorators=s,this.resetStartLocationFromNode(o,s[0]),s=[]),this.parseClassMember(i,o,t),o.kind==="constructor"&&o.decorators&&o.decorators.length>0&&this.raise(b.DecoratorConstructor,o)}}),this.state.strict=e,this.next(),s.length)throw this.raise(b.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(n,e){let t=this.parseIdentifier(!0);if(this.isClassMethod()){let s=e;return s.kind="method",s.computed=!1,s.key=t,s.static=!1,this.pushClassMethod(n,s,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let s=e;return s.computed=!1,s.key=t,s.static=!1,n.body.push(this.parseClassProperty(s)),!0}return this.resetPreviousNodeTrailingComments(t),!1}parseClassMember(n,e,t){let s=this.isContextual(106);if(s){if(this.parseClassMemberFromModifier(n,e))return;if(this.eat(5)){this.parseClassStaticBlock(n,e);return}}this.parseClassMemberWithIsStatic(n,e,t,s)}parseClassMemberWithIsStatic(n,e,t,s){let i=e,o=e,a=e,l=e,c=e,p=i,u=i;if(e.static=s,this.parsePropertyNamePrefixOperator(e),this.eat(55)){p.kind="method";let y=this.match(139);if(this.parseClassElementName(p),y){this.pushClassPrivateMethod(n,o,!0,!1);return}this.isNonstaticConstructor(i)&&this.raise(b.ConstructorIsGenerator,i.key),this.pushClassMethod(n,i,!0,!1,!1,!1);return}let f=!this.state.containsEsc&&_(this.state.type),m=this.parseClassElementName(e),d=f?m.name:null,g=this.isPrivateName(m),h=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(p.kind="method",g){this.pushClassPrivateMethod(n,o,!1,!1);return}let y=this.isNonstaticConstructor(i),P=!1;y&&(i.kind="constructor",t.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(b.DuplicateConstructor,m),y&&this.hasPlugin("typescript")&&e.override&&this.raise(b.OverrideOnConstructor,m),t.hadConstructor=!0,P=t.hadSuperClass),this.pushClassMethod(n,i,!1,!1,y,P)}else if(this.isClassProperty())g?this.pushClassPrivateProperty(n,l):this.pushClassProperty(n,a);else if(d==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(m);let y=this.eat(55);u.optional&&this.unexpected(h),p.kind="method";let P=this.match(139);this.parseClassElementName(p),this.parsePostMemberNameModifiers(u),P?this.pushClassPrivateMethod(n,o,y,!0):(this.isNonstaticConstructor(i)&&this.raise(b.ConstructorIsAsync,i.key),this.pushClassMethod(n,i,y,!0,!1,!1))}else if((d==="get"||d==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(m),p.kind=d;let y=this.match(139);this.parseClassElementName(i),y?this.pushClassPrivateMethod(n,o,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(b.ConstructorIsAccessor,i.key),this.pushClassMethod(n,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}else if(d==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(m);let y=this.match(139);this.parseClassElementName(a),this.pushClassAccessorProperty(n,c,y)}else this.isLineTerminator()?g?this.pushClassPrivateProperty(n,l):this.pushClassProperty(n,a):this.unexpected()}parseClassElementName(n){let{type:e,value:t}=this.state;if((e===132||e===134)&&n.static&&t==="prototype"&&this.raise(b.StaticPrototype,this.state.startLoc),e===139){t==="constructor"&&this.raise(b.ConstructorClassPrivateField,this.state.startLoc);let s=this.parsePrivateName();return n.key=s,s}return this.parsePropertyName(n),n.key}parseClassStaticBlock(n,e){var t;this.scope.enter(208);let s=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let i=e.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=s,n.body.push(this.finishNode(e,"StaticBlock")),(t=e.decorators)!=null&&t.length&&this.raise(b.DecoratorStaticBlock,e)}pushClassProperty(n,e){!e.computed&&this.nameIsConstructor(e.key)&&this.raise(b.ConstructorClassField,e.key),n.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(n,e){let t=this.parseClassPrivateProperty(e);n.body.push(t),this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),0,t.key.loc.start)}pushClassAccessorProperty(n,e,t){!t&&!e.computed&&this.nameIsConstructor(e.key)&&this.raise(b.ConstructorClassField,e.key);let s=this.parseClassAccessorProperty(e);n.body.push(s),t&&this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassMethod(n,e,t,s,i,o){n.body.push(this.parseMethod(e,t,s,i,o,"ClassMethod",!0))}pushClassPrivateMethod(n,e,t,s){let i=this.parseMethod(e,t,s,!1,!1,"ClassPrivateMethod",!0);n.body.push(i);let o=i.kind==="get"?i.static?6:2:i.kind==="set"?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,o)}declareClassPrivateMethodInScope(n,e){this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),e,n.key.loc.start)}parsePostMemberNameModifiers(n){}parseClassPrivateProperty(n){return this.parseInitializer(n),this.semicolon(),this.finishNode(n,"ClassPrivateProperty")}parseClassProperty(n){return this.parseInitializer(n),this.semicolon(),this.finishNode(n,"ClassProperty")}parseClassAccessorProperty(n){return this.parseInitializer(n),this.semicolon(),this.finishNode(n,"ClassAccessorProperty")}parseInitializer(n){this.scope.enter(80),this.expressionScope.enter(hi()),this.prodParam.enter(0),n.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(n,e,t,s=8331){if(_(this.state.type))n.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(n.id,s);else if(t||!e)n.id=null;else throw this.raise(b.MissingClassName,this.state.startLoc)}parseClassSuper(n){n.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(n,e){let t=this.parseMaybeImportPhase(n,!0),s=this.maybeParseExportDefaultSpecifier(n,t),i=!s||this.eat(12),o=i&&this.eatExportStar(n),a=o&&this.maybeParseExportNamespaceSpecifier(n),l=i&&(!a||this.eat(12)),c=s||o;if(o&&!a){if(s&&this.unexpected(),e)throw this.raise(b.UnsupportedDecoratorExport,n);return this.parseExportFrom(n,!0),this.finishNode(n,"ExportAllDeclaration")}let p=this.maybeParseExportNamedSpecifiers(n);s&&i&&!o&&!p&&this.unexpected(null,5),a&&l&&this.unexpected(null,98);let u;if(c||p){if(u=!1,e)throw this.raise(b.UnsupportedDecoratorExport,n);this.parseExportFrom(n,c)}else u=this.maybeParseExportDeclaration(n);if(c||p||u){var f;let m=n;if(this.checkExport(m,!0,!1,!!m.source),((f=m.declaration)==null?void 0:f.type)==="ClassDeclaration")this.maybeTakeDecorators(e,m.declaration,m);else if(e)throw this.raise(b.UnsupportedDecoratorExport,n);return this.finishNode(m,"ExportNamedDeclaration")}if(this.eat(65)){let m=n,d=this.parseExportDefaultExpression();if(m.declaration=d,d.type==="ClassDeclaration")this.maybeTakeDecorators(e,d,m);else if(e)throw this.raise(b.UnsupportedDecoratorExport,n);return this.checkExport(m,!0,!0),this.finishNode(m,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(n){return this.eat(55)}maybeParseExportDefaultSpecifier(n,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e?.loc.start);let t=e||this.parseIdentifier(!0),s=this.startNodeAtNode(t);return s.exported=t,n.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(n){if(this.isContextual(93)){var e,t;(t=(e=n).specifiers)!=null||(e.specifiers=[]);let s=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),s.exported=this.parseModuleExportName(),n.specifiers.push(this.finishNode(s,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(n){if(this.match(5)){let e=n;e.specifiers||(e.specifiers=[]);let t=e.exportKind==="type";return e.specifiers.push(...this.parseExportSpecifiers(t)),e.source=null,e.declaration=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),!0}return!1}maybeParseExportDeclaration(n){return this.shouldParseExportDeclaration()?(n.specifiers=[],n.source=null,this.hasPlugin("importAssertions")&&(n.assertions=[]),n.declaration=this.parseExportDeclaration(n),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let n=this.nextTokenInLineStart();return this.isUnparsedContextual(n,"function")}parseExportDefaultExpression(){let n=this.startNode();if(this.match(68))return this.next(),this.parseFunction(n,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(n,13);if(this.match(80))return this.parseClass(n,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(b.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(b.UnsupportedDefaultExport,this.state.startLoc);let e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(n){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:n}=this.state;if(_(n)){if(n===95&&!this.state.containsEsc||n===100)return!1;if((n===130||n===129)&&!this.state.containsEsc){let{type:s}=this.lookahead();if(_(s)&&s!==98||s===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let e=this.nextTokenStart(),t=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||_(this.state.type)&&t)return!0;if(this.match(65)&&t){let s=this.input.charCodeAt(this.nextTokenStartSince(e+4));return s===34||s===39}return!1}parseExportFrom(n,e){this.eatContextual(98)?(n.source=this.parseImportSource(),this.checkExport(n),this.maybeParseImportAttributes(n),this.checkJSONModuleImport(n)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:n}=this.state;return n===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(b.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(b.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(b.UsingDeclarationExport,this.state.startLoc),!0):n===74||n===75||n===68||n===80||this.isLet()||this.isAsyncFunction()}checkExport(n,e,t,s){if(e){var i;if(t){if(this.checkDuplicateExports(n,"default"),this.hasPlugin("exportDefaultFrom")){var o;let a=n.declaration;a.type==="Identifier"&&a.name==="from"&&a.end-a.start===4&&!((o=a.extra)!=null&&o.parenthesized)&&this.raise(b.ExportDefaultFromAsIdentifier,a)}}else if((i=n.specifiers)!=null&&i.length)for(let a of n.specifiers){let{exported:l}=a,c=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(a,c),!s&&a.local){let{local:p}=a;p.type!=="Identifier"?this.raise(b.ExportBindingIsString,a,{localName:p.value,exportName:c}):(this.checkReservedWord(p.name,p.loc.start,!0,!1),this.scope.checkLocalExport(p))}}else if(n.declaration){let a=n.declaration;if(a.type==="FunctionDeclaration"||a.type==="ClassDeclaration"){let{id:l}=a;if(!l)throw new Error("Assertion failure");this.checkDuplicateExports(n,l.name)}else if(a.type==="VariableDeclaration")for(let l of a.declarations)this.checkDeclaration(l.id)}}}checkDeclaration(n){if(n.type==="Identifier")this.checkDuplicateExports(n,n.name);else if(n.type==="ObjectPattern")for(let e of n.properties)this.checkDeclaration(e);else if(n.type==="ArrayPattern")for(let e of n.elements)e&&this.checkDeclaration(e);else n.type==="ObjectProperty"?this.checkDeclaration(n.value):n.type==="RestElement"?this.checkDeclaration(n.argument):n.type==="AssignmentPattern"&&this.checkDeclaration(n.left)}checkDuplicateExports(n,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(b.DuplicateDefaultExport,n):this.raise(b.DuplicateExport,n,{exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(n){let e=[],t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else if(this.expect(12),this.eat(8))break;let s=this.isContextual(130),i=this.match(134),o=this.startNode();o.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(o,i,n,s))}return e}parseExportSpecifier(n,e,t,s){return this.eatContextual(93)?n.exported=this.parseModuleExportName():e?n.exported=ul(n.local):n.exported||(n.exported=Re(n.local)),this.finishNode(n,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let n=this.parseStringLiteral(this.state.value),e=Ol.exec(n.value);return e&&this.raise(b.ModuleExportNameHasLoneSurrogate,n,{surrogateCharCode:e[0].charCodeAt(0)}),n}return this.parseIdentifier(!0)}isJSONModuleImport(n){return n.assertions!=null?n.assertions.some(({key:e,value:t})=>t.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(n){let{specifiers:e}=n,t=e.length===1?e[0].type:null;if(n.phase==="source")t!=="ImportDefaultSpecifier"&&this.raise(b.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(n.phase==="defer")t!=="ImportNamespaceSpecifier"&&this.raise(b.DeferImportRequiresNamespace,e[0].loc.start);else if(n.module){var s;t!=="ImportDefaultSpecifier"&&this.raise(b.ImportReflectionNotBinding,e[0].loc.start),((s=n.assertions)==null?void 0:s.length)>0&&this.raise(b.ImportReflectionHasAssertion,e[0].loc.start)}}checkJSONModuleImport(n){if(this.isJSONModuleImport(n)&&n.type!=="ExportAllDeclaration"){let{specifiers:e}=n;if(e!=null){let t=e.find(s=>{let i;if(s.type==="ExportSpecifier"?i=s.local:s.type==="ImportSpecifier"&&(i=s.imported),i!==void 0)return i.type==="Identifier"?i.name!=="default":i.value!=="default"});t!==void 0&&this.raise(b.ImportJSONBindingNotDefault,t.loc.start)}}}isPotentialImportPhase(n){return n?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(n,e,t,s){e||(t==="module"?(this.expectPlugin("importReflection",s),n.module=!0):this.hasPlugin("importReflection")&&(n.module=!1),t==="source"?(this.expectPlugin("sourcePhaseImports",s),n.phase="source"):t==="defer"?(this.expectPlugin("deferredImportEvaluation",s),n.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(n.phase=null))}parseMaybeImportPhase(n,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(n,e,null),null;let t=this.parseIdentifier(!0),{type:s}=this.state;return(we(s)?s!==98||this.lookaheadCharCode()===102:s!==12)?(this.resetPreviousIdentifierLeadingComments(t),this.applyImportPhase(n,e,t.name,t.loc.start),null):(this.applyImportPhase(n,e,null),t)}isPrecedingIdImportPhase(n){let{type:e}=this.state;return _(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(n){return this.match(134)?this.parseImportSourceAndAttributes(n):this.parseImportSpecifiersAndAfter(n,this.parseMaybeImportPhase(n,!1))}parseImportSpecifiersAndAfter(n,e){n.specifiers=[];let s=!this.maybeParseDefaultImportSpecifier(n,e)||this.eat(12),i=s&&this.maybeParseStarImportSpecifier(n);return s&&!i&&this.parseNamedImportSpecifiers(n),this.expectContextual(98),this.parseImportSourceAndAttributes(n)}parseImportSourceAndAttributes(n){var e;return(e=n.specifiers)!=null||(n.specifiers=[]),n.source=this.parseImportSource(),this.maybeParseImportAttributes(n),this.checkImportReflection(n),this.checkJSONModuleImport(n),this.semicolon(),this.finishNode(n,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(n,e,t){e.local=this.parseIdentifier(),n.specifiers.push(this.finishImportSpecifier(e,t))}finishImportSpecifier(n,e,t=8201){return this.checkLVal(n.local,{type:e},t),this.finishNode(n,e)}parseImportAttributes(){this.expect(5);let n=[],e=new Set;do{if(this.match(8))break;let t=this.startNode(),s=this.state.value;if(e.has(s)&&this.raise(b.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:s}),e.add(s),this.match(134)?t.key=this.parseStringLiteral(s):t.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(b.ModuleAttributeInvalidValue,this.state.startLoc);t.value=this.parseStringLiteral(this.state.value),n.push(this.finishNode(t,"ImportAttribute"))}while(this.eat(12));return this.expect(8),n}parseModuleAttributes(){let n=[],e=new Set;do{let t=this.startNode();if(t.key=this.parseIdentifier(!0),t.key.name!=="type"&&this.raise(b.ModuleAttributeDifferentFromType,t.key),e.has(t.key.name)&&this.raise(b.ModuleAttributesWithDuplicateKeys,t.key,{key:t.key.name}),e.add(t.key.name),this.expect(14),!this.match(134))throw this.raise(b.ModuleAttributeInvalidValue,this.state.startLoc);t.value=this.parseStringLiteral(this.state.value),n.push(this.finishNode(t,"ImportAttribute"))}while(this.eat(12));return n}maybeParseImportAttributes(n){let e;var t=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():e=this.parseImportAttributes(),t=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(b.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(n,"deprecatedAssertSyntax",!0),this.next(),e=this.parseImportAttributes()):e=[];!t&&this.hasPlugin("importAssertions")?n.assertions=e:n.attributes=e}maybeParseDefaultImportSpecifier(n,e){if(e){let t=this.startNodeAtNode(e);return t.local=e,n.specifiers.push(this.finishImportSpecifier(t,"ImportDefaultSpecifier")),!0}else if(we(this.state.type))return this.parseImportSpecifierLocal(n,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(n){if(this.match(55)){let e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(n,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(n){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(b.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let t=this.startNode(),s=this.match(134),i=this.isContextual(130);t.imported=this.parseModuleExportName();let o=this.parseImportSpecifier(t,s,n.importKind==="type"||n.importKind==="typeof",i,void 0);n.specifiers.push(o)}}parseImportSpecifier(n,e,t,s,i){if(this.eatContextual(93))n.local=this.parseIdentifier();else{let{imported:o}=n;if(e)throw this.raise(b.ImportBindingIsString,n,{importName:o.value});this.checkReservedWord(o.name,n.loc.start,!0,!0),n.local||(n.local=Re(o))}return this.finishImportSpecifier(n,"ImportSpecifier",i)}isThisParam(n){return n.type==="Identifier"&&n.name==="this"}},vn=class extends Ds{constructor(n,e,t){n=Dl(n),super(n,e),this.options=n,this.initializeScopes(),this.plugins=t,this.filename=n.sourceFilename,this.startIndex=n.startIndex}getScopeHandler(){return Ut}parse(){this.enterInitialScopes();let n=this.startNode(),e=this.startNode();return this.nextToken(),n.errors=null,this.parseTopLevel(n,e),n.errors=this.state.errors,n.comments.length=this.state.commentsLen,n}};function Ul(r,n){var e;if(((e=n)==null?void 0:e.sourceType)==="unambiguous"){n=Object.assign({},n);try{n.sourceType="module";let t=Lt(n,r),s=t.parse();if(t.sawUnambiguousESM)return s;if(t.ambiguousScriptDifferentAst)try{return n.sourceType="script",Lt(n,r).parse()}catch{}else s.program.sourceType="script";return s}catch(t){try{return n.sourceType="script",Lt(n,r).parse()}catch{}throw t}}else return Lt(n,r).parse()}function Bl(r,n){let e=Lt(n,r);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function Rl(r){let n={};for(let e of Object.keys(r))n[e]=Oe(r[e]);return n}var _l=Rl(La);function Lt(r,n){let e=vn,t=new Map;if(r!=null&&r.plugins){for(let s of r.plugins){let i,o;typeof s=="string"?i=s:[i,o]=s,t.has(i)||t.set(i,o||{})}kl(t),e=jl(t)}return new e(r,n,t)}var ri=new Map;function jl(r){let n=[];for(let s of Nl)r.has(s)&&n.push(s);let e=n.join("|"),t=ri.get(e);if(!t){t=vn;for(let s of n)t=vi[s](t);ri.set(e,t)}return t}Rt.parse=Ul;Rt.parseExpression=Bl;Rt.tokTypes=_l});import{Command as au}from"commander";var yr="0.1.32";import en from"node:path";import{Command as Fp}from"commander";import ae from"kleur";import tn from"lodash";import wt from"prompts";var St=[{name:"Accordion",value:"accordion",instructions:["Remember to add the accordion animations to your tailwind.config.js"],files:[{fileName:"Accordion/Accordion.vue",dirPath:"components/UI",fileContent:`<template>
10
10
  <AccordionRoot v-slot="rootSlotProps" v-bind="forwarded">
11
11
  <slot v-bind="rootSlotProps" :items="items">
12
12
  <template v-for="(item, i) in items" :key="i">
@@ -7942,6 +7942,57 @@ export function useFormField() {
7942
7942
  base: "h-10 w-10 rounded-md border border-input bg-background p-1 text-center text-base font-medium placeholder:text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm",
7943
7943
  });
7944
7944
  </script>
7945
+ `}],utils:[],composables:[],plugins:[]},{name:"Placeholder",value:"placeholder",files:[{fileName:"Placeholder.vue",dirPath:"components/UI",fileContent:`<template>
7946
+ <Primitive :as :as-child :class="placeHolderStyles().wrapper({ class: props.class })">
7947
+ <svg :class="placeHolderStyles().svg()" fill="none">
7948
+ <defs>
7949
+ <pattern
7950
+ id="pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e"
7951
+ x="0"
7952
+ y="0"
7953
+ width="10"
7954
+ height="10"
7955
+ patternUnits="userSpaceOnUse"
7956
+ >
7957
+ <path d="M-3 13 15-5M-5 5l18-18M-1 21 17 3" />
7958
+ </pattern>
7959
+ </defs>
7960
+ <rect
7961
+ stroke="none"
7962
+ fill="url(#pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e)"
7963
+ width="100%"
7964
+ height="100%"
7965
+ />
7966
+ </svg>
7967
+
7968
+ <slot />
7969
+ </Primitive>
7970
+ </template>
7971
+
7972
+ <script lang="ts">
7973
+ import { Primitive } from "radix-vue";
7974
+ import type { PrimitiveProps } from "radix-vue";
7975
+ import type { HTMLAttributes } from "vue";
7976
+
7977
+ export const placeHolderStyles = tv({
7978
+ slots: {
7979
+ wrapper:
7980
+ "relative flex items-center justify-center overflow-hidden rounded-md border border-dashed px-4 opacity-75",
7981
+ svg: "absolute inset-0 size-full stroke-foreground/10",
7982
+ },
7983
+ });
7984
+ </script>
7985
+
7986
+ <script lang="ts" setup>
7987
+ const props = defineProps<
7988
+ PrimitiveProps & {
7989
+ /**
7990
+ * Additional classes to add to the parent element.
7991
+ */
7992
+ class?: HTMLAttributes["class"];
7993
+ }
7994
+ >();
7995
+ </script>
7945
7996
  `}],utils:[],composables:[],plugins:[]},{name:"Popover",value:"popover",files:[{fileName:"Popover/Anchor.vue",dirPath:"components/UI",fileContent:`<template>
7946
7997
  <PopoverAnchor v-bind="forwarded">
7947
7998
  <slot />
@@ -8991,7 +9042,949 @@ export function useFormField() {
8991
9042
  base: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
8992
9043
  });
8993
9044
  </script>
8994
- `}],utils:[],composables:[],plugins:[]},{name:"Skeleton",value:"skeleton",files:[{fileName:"Skeleton.vue",dirPath:"components/UI",fileContent:`<template>
9045
+ `}],utils:[],composables:[],plugins:[]},{name:"Sidebar",value:"sidebar",files:[{fileName:"Sidebar/Content.vue",dirPath:"components/UI",fileContent:`<template>
9046
+ <div data-sidebar="content" :class="sideBarContentStyles({ class: props.class })">
9047
+ <slot />
9048
+ </div>
9049
+ </template>
9050
+ <script lang="ts">
9051
+ import type { HTMLAttributes } from "vue";
9052
+
9053
+ export const sideBarContentStyles = tv({
9054
+ base: "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
9055
+ });
9056
+ </script>
9057
+ <script setup lang="ts">
9058
+ const props = defineProps<{
9059
+ /**
9060
+ * Additional classes to apply to the sidebar content.
9061
+ */
9062
+ class?: HTMLAttributes["class"];
9063
+ }>();
9064
+ </script>
9065
+ `},{fileName:"Sidebar/Footer.vue",dirPath:"components/UI",fileContent:`<template>
9066
+ <div data-sidebar="footer" :class="sideBarFooterStyles({ class: props.class })">
9067
+ <slot />
9068
+ </div>
9069
+ </template>
9070
+ <script lang="ts">
9071
+ import type { HTMLAttributes } from "vue";
9072
+
9073
+ export const sideBarFooterStyles = tv({
9074
+ base: "flex flex-col gap-2 p-2",
9075
+ });
9076
+ </script>
9077
+ <script setup lang="ts">
9078
+ const props = defineProps<{
9079
+ /**
9080
+ * Additional classes to apply to the parent element.
9081
+ */
9082
+ class?: HTMLAttributes["class"];
9083
+ }>();
9084
+ </script>
9085
+ `},{fileName:"Sidebar/Group.vue",dirPath:"components/UI",fileContent:`<template>
9086
+ <div data-sidebar="group" :class="sideBarGroupStyles({ class: props.class })">
9087
+ <slot />
9088
+ </div>
9089
+ </template>
9090
+ <script lang="ts">
9091
+ import type { HTMLAttributes } from "vue";
9092
+
9093
+ export const sideBarGroupStyles = tv({
9094
+ base: "relative flex w-full min-w-0 flex-col p-2",
9095
+ });
9096
+ </script>
9097
+ <script setup lang="ts">
9098
+ const props = defineProps<{
9099
+ /**
9100
+ * Additional classes to apply to the parent element.
9101
+ */
9102
+ class?: HTMLAttributes["class"];
9103
+ }>();
9104
+ </script>
9105
+ `},{fileName:"Sidebar/GroupAction.vue",dirPath:"components/UI",fileContent:`<template>
9106
+ <Primitive
9107
+ data-sidebar="group-action"
9108
+ :as="as"
9109
+ :as-child="asChild"
9110
+ :class="sideBarGroupActionStyles({ class: props.class })"
9111
+ >
9112
+ <slot />
9113
+ </Primitive>
9114
+ </template>
9115
+ <script lang="ts">
9116
+ import { Primitive } from "radix-vue";
9117
+ import type { PrimitiveProps } from "radix-vue";
9118
+ import type { HTMLAttributes } from "vue";
9119
+
9120
+ export const sideBarGroupActionStyles = tv({
9121
+ base: "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 group-data-[collapsible=icon]:hidden after:md:hidden [&>svg]:size-4 [&>svg]:shrink-0",
9122
+ });
9123
+ </script>
9124
+ <script setup lang="ts">
9125
+ const props = defineProps<
9126
+ PrimitiveProps & {
9127
+ /**
9128
+ * Additional classes to apply to the parent element.
9129
+ */
9130
+ class?: HTMLAttributes["class"];
9131
+ }
9132
+ >();
9133
+ </script>
9134
+ `},{fileName:"Sidebar/GroupContent.vue",dirPath:"components/UI",fileContent:`<template>
9135
+ <div data-sidebar="group-content" :class="sideBarGroupContentStyles({ class: props.class })">
9136
+ <slot />
9137
+ </div>
9138
+ </template>
9139
+ <script lang="ts">
9140
+ import type { HTMLAttributes } from "vue";
9141
+
9142
+ export const sideBarGroupContentStyles = tv({
9143
+ base: "w-full text-sm",
9144
+ });
9145
+ </script>
9146
+ <script setup lang="ts">
9147
+ const props = defineProps<{
9148
+ /**
9149
+ * Additional classes to apply to the parent element.
9150
+ */
9151
+ class?: HTMLAttributes["class"];
9152
+ }>();
9153
+ </script>
9154
+ `},{fileName:"Sidebar/GroupLabel.vue",dirPath:"components/UI",fileContent:`<template>
9155
+ <Primitive
9156
+ data-sidebar="group-label"
9157
+ :as="as"
9158
+ :as-child="asChild"
9159
+ :class="sideBarGroupLabelStyles({ class: props.class })"
9160
+ >
9161
+ <slot>{{ props.label }}</slot>
9162
+ </Primitive>
9163
+ </template>
9164
+ <script lang="ts">
9165
+ import { Primitive } from "radix-vue";
9166
+ import type { PrimitiveProps } from "radix-vue";
9167
+ import type { HTMLAttributes } from "vue";
9168
+
9169
+ export const sideBarGroupLabelStyles = tv({
9170
+ base: "flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 [&>svg]:size-4 [&>svg]:shrink-0",
9171
+ });
9172
+ </script>
9173
+ <script setup lang="ts">
9174
+ const props = defineProps<
9175
+ PrimitiveProps & {
9176
+ /**
9177
+ * Additional classes to apply to the parent element.
9178
+ */
9179
+ class?: HTMLAttributes["class"];
9180
+ /**
9181
+ * The label for the group.
9182
+ */
9183
+ label?: string;
9184
+ }
9185
+ >();
9186
+ </script>
9187
+ `},{fileName:"Sidebar/Header.vue",dirPath:"components/UI",fileContent:`<template>
9188
+ <div data-sidebar="header" :class="sideBarHeaderStyles({ class: props.class })">
9189
+ <slot />
9190
+ </div>
9191
+ </template>
9192
+ <script lang="ts">
9193
+ import type { HTMLAttributes } from "vue";
9194
+
9195
+ export const sideBarHeaderStyles = tv({
9196
+ base: "flex flex-col gap-2 p-2",
9197
+ });
9198
+ </script>
9199
+ <script setup lang="ts">
9200
+ const props = defineProps<{
9201
+ /**
9202
+ * Additional classes to apply to the parent element.
9203
+ */
9204
+ class?: HTMLAttributes["class"];
9205
+ }>();
9206
+ </script>
9207
+ `},{fileName:"Sidebar/Input.vue",dirPath:"components/UI",fileContent:`<template>
9208
+ <UiInput v-model="model" data-sidebar="input" :class="sideBarInputStyles({ class: props.class })">
9209
+ <slot />
9210
+ </UiInput>
9211
+ </template>
9212
+
9213
+ <script lang="ts">
9214
+ import type { HTMLAttributes } from "vue";
9215
+
9216
+ export const sideBarInputStyles = tv({
9217
+ base: "h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
9218
+ });
9219
+ </script>
9220
+ <script setup lang="ts">
9221
+ const props = defineProps<{
9222
+ /**
9223
+ * Additional classes to apply to the parent element.
9224
+ */
9225
+ class?: HTMLAttributes["class"];
9226
+ }>();
9227
+
9228
+ const model = defineModel<any>();
9229
+ </script>
9230
+ `},{fileName:"Sidebar/Inset.vue",dirPath:"components/UI",fileContent:`<template>
9231
+ <main :class="sideBarInsetStyles({ class: props.class })">
9232
+ <slot />
9233
+ </main>
9234
+ </template>
9235
+ <script lang="ts">
9236
+ import type { HTMLAttributes } from "vue";
9237
+
9238
+ export const sideBarInsetStyles = tv({
9239
+ base: "relative flex min-h-svh flex-1 flex-col bg-background peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
9240
+ });
9241
+ </script>
9242
+ <script setup lang="ts">
9243
+ const props = defineProps<{
9244
+ /**
9245
+ * Additional classes to apply to the parent element.
9246
+ */
9247
+ class?: HTMLAttributes["class"];
9248
+ }>();
9249
+ </script>
9250
+ `},{fileName:"Sidebar/Menu.vue",dirPath:"components/UI",fileContent:`<template>
9251
+ <ul data-sidebar="menu" :class="sideBarMenuStyles({ class: props.class })">
9252
+ <slot />
9253
+ </ul>
9254
+ </template>
9255
+ <script lang="ts">
9256
+ import type { HTMLAttributes } from "vue";
9257
+
9258
+ export const sideBarMenuStyles = tv({
9259
+ base: "flex w-full min-w-0 flex-col gap-1",
9260
+ });
9261
+ </script>
9262
+ <script setup lang="ts">
9263
+ const props = defineProps<{
9264
+ /**
9265
+ * Additional classes to apply to the parent element.
9266
+ */
9267
+ class?: HTMLAttributes["class"];
9268
+ }>();
9269
+ </script>
9270
+ `},{fileName:"Sidebar/MenuAction.vue",dirPath:"components/UI",fileContent:`<template>
9271
+ <Primitive
9272
+ data-sidebar="menu-action"
9273
+ :class="sideBarMenuAction({ showOnHover, class: props.class })"
9274
+ :as="as"
9275
+ :as-child="asChild"
9276
+ >
9277
+ <slot />
9278
+ </Primitive>
9279
+ </template>
9280
+ <script lang="ts">
9281
+ import { Primitive } from "radix-vue";
9282
+ import type { PrimitiveProps } from "radix-vue";
9283
+ import type { VariantProps } from "tailwind-variants";
9284
+ import type { HTMLAttributes } from "vue";
9285
+
9286
+ export const sideBarMenuAction = tv({
9287
+ base: [
9288
+ "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
9289
+ // Increases the hit area of the button on mobile.
9290
+ "after:absolute after:-inset-2 after:md:hidden",
9291
+ "peer-data-[size=sm]/menu-button:top-1",
9292
+ "peer-data-[size=default]/menu-button:top-1.5",
9293
+ "peer-data-[size=lg]/menu-button:top-2.5",
9294
+ "group-data-[collapsible=icon]:hidden",
9295
+ ],
9296
+ variants: {
9297
+ showOnHover: {
9298
+ true: "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
9299
+ },
9300
+ },
9301
+ });
9302
+
9303
+ export type SidebarMenuActionProps = PrimitiveProps & {
9304
+ /**
9305
+ * Whether the menu should be shown on hover.
9306
+ */
9307
+ showOnHover?: VariantProps<typeof sideBarMenuAction>["showOnHover"];
9308
+ /**
9309
+ * Additional classes to apply to the parent element.
9310
+ */
9311
+ class?: HTMLAttributes["class"];
9312
+ };
9313
+ </script>
9314
+ <script setup lang="ts">
9315
+ const props = withDefaults(defineProps<SidebarMenuActionProps>(), {
9316
+ as: "button",
9317
+ });
9318
+ </script>
9319
+ `},{fileName:"Sidebar/MenuBadge.vue",dirPath:"components/UI",fileContent:`<template>
9320
+ <div data-sidebar="menu-badge" :class="sideBarMenuBadgeStyles({ class: props.class })">
9321
+ <slot />
9322
+ </div>
9323
+ </template>
9324
+ <script lang="ts">
9325
+ import type { HTMLAttributes } from "vue";
9326
+
9327
+ export const sideBarMenuBadgeStyles = tv({
9328
+ base: [
9329
+ "pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground",
9330
+ "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
9331
+ "peer-data-[size=sm]/menu-button:top-1",
9332
+ "peer-data-[size=default]/menu-button:top-1.5",
9333
+ "peer-data-[size=lg]/menu-button:top-2.5",
9334
+ "group-data-[collapsible=icon]:hidden",
9335
+ ],
9336
+ });
9337
+ </script>
9338
+
9339
+ <script setup lang="ts">
9340
+ const props = defineProps<{
9341
+ /**
9342
+ * Additional classes to apply to the parent element.
9343
+ */
9344
+ class?: HTMLAttributes["class"];
9345
+ }>();
9346
+ </script>
9347
+ `},{fileName:"Sidebar/MenuButton.vue",dirPath:"components/UI",fileContent:`<template>
9348
+ <UiSidebarMenuButtonChild v-if="!tooltip" v-bind="{ ...delegatedProps, ...$attrs }">
9349
+ <slot />
9350
+ </UiSidebarMenuButtonChild>
9351
+
9352
+ <UiTooltip v-else>
9353
+ <UiTooltipTrigger as-child>
9354
+ <UiSidebarMenuButtonChild v-bind="{ ...delegatedProps, ...$attrs }">
9355
+ <slot />
9356
+ </UiSidebarMenuButtonChild>
9357
+ </UiTooltipTrigger>
9358
+ <UiTooltipContent side="right" align="center" :hidden="state !== 'collapsed' || isMobile">
9359
+ <template v-if="typeof tooltip === 'string'">
9360
+ {{ tooltip }}
9361
+ </template>
9362
+ <component :is="tooltip" v-else />
9363
+ </UiTooltipContent>
9364
+ </UiTooltip>
9365
+ </template>
9366
+
9367
+ <script lang="ts">
9368
+ import type { SidebarMenuButtonProps } from "./MenuButtonChild.vue";
9369
+ import type { Component } from "vue";
9370
+ </script>
9371
+ <script setup lang="ts">
9372
+ defineOptions({ inheritAttrs: false });
9373
+
9374
+ const props = withDefaults(
9375
+ defineProps<
9376
+ SidebarMenuButtonProps & {
9377
+ tooltip?: string | Component;
9378
+ }
9379
+ >(),
9380
+ {
9381
+ as: "button",
9382
+ variant: "default",
9383
+ size: "default",
9384
+ }
9385
+ );
9386
+
9387
+ const { isMobile, state } = useSidebar();
9388
+
9389
+ const delegatedProps = computed(() => {
9390
+ const { tooltip, ...delegated } = props;
9391
+ return delegated;
9392
+ });
9393
+ </script>
9394
+ `},{fileName:"Sidebar/MenuButtonChild.vue",dirPath:"components/UI",fileContent:`<template>
9395
+ <Primitive
9396
+ data-sidebar="menu-button"
9397
+ :data-size="size"
9398
+ :data-active="isActive"
9399
+ :class="sidebarMenuButtonVariants({ variant, size, class: props.class })"
9400
+ :as="as"
9401
+ :as-child="asChild"
9402
+ v-bind="$attrs"
9403
+ >
9404
+ <slot />
9405
+ </Primitive>
9406
+ </template>
9407
+ <script lang="ts">
9408
+ import { Primitive } from "radix-vue";
9409
+ import type { PrimitiveProps } from "radix-vue";
9410
+ import type { HTMLAttributes } from "vue";
9411
+
9412
+ export interface SidebarMenuButtonProps extends PrimitiveProps {
9413
+ /**
9414
+ * The variant of the button.
9415
+ * @default "default"
9416
+ */
9417
+ variant?: SidebarMenuButtonVariants["variant"];
9418
+ /**
9419
+ * The size of the button.
9420
+ * @default "default"
9421
+ */
9422
+ size?: SidebarMenuButtonVariants["size"];
9423
+ /**
9424
+ * Whether the button is active.
9425
+ */
9426
+ isActive?: boolean;
9427
+ /**
9428
+ * Additional classes to apply to the parent element.
9429
+ */
9430
+ class?: HTMLAttributes["class"];
9431
+ }
9432
+ </script>
9433
+
9434
+ <script setup lang="ts">
9435
+ const props = withDefaults(defineProps<SidebarMenuButtonProps>(), {
9436
+ as: "button",
9437
+ variant: "default",
9438
+ size: "default",
9439
+ });
9440
+ </script>
9441
+ `},{fileName:"Sidebar/MenuItem.vue",dirPath:"components/UI",fileContent:`<template>
9442
+ <li data-sidebar="menu-item" :class="sideBarMenuItemStyles({ class: props.class })">
9443
+ <slot />
9444
+ </li>
9445
+ </template>
9446
+ <script lang="ts">
9447
+ import type { HTMLAttributes } from "vue";
9448
+
9449
+ export const sideBarMenuItemStyles = tv({
9450
+ base: "group/menu-item relative",
9451
+ });
9452
+ </script>
9453
+ <script setup lang="ts">
9454
+ const props = defineProps<{
9455
+ /**
9456
+ * Additional classes to apply to the parent element.
9457
+ */
9458
+ class?: HTMLAttributes["class"];
9459
+ }>();
9460
+ </script>
9461
+ `},{fileName:"Sidebar/MenuSkeleton.vue",dirPath:"components/UI",fileContent:`<template>
9462
+ <div
9463
+ data-sidebar="menu-skeleton"
9464
+ :class="sideBarMenuSkeletonStyles().wrapper({ class: props.class })"
9465
+ >
9466
+ <UiSkeleton
9467
+ v-if="showIcon"
9468
+ :class="sideBarMenuSkeletonStyles().skeleton1()"
9469
+ data-sidebar="menu-skeleton-icon"
9470
+ />
9471
+
9472
+ <UiSkeleton
9473
+ :class="sideBarMenuSkeletonStyles().skeleton2()"
9474
+ data-sidebar="menu-skeleton-text"
9475
+ :style="{ '--skeleton-width': width }"
9476
+ />
9477
+ </div>
9478
+ </template>
9479
+ <script lang="ts">
9480
+ import type { HTMLAttributes } from "vue";
9481
+
9482
+ export const sideBarMenuSkeletonStyles = tv({
9483
+ slots: {
9484
+ wrapper: "flex h-8 items-center gap-2 rounded-md px-2",
9485
+ skeleton1: "size-4 rounded-md",
9486
+ skeleton2: "h-4 max-w-[--skeleton-width] flex-1",
9487
+ },
9488
+ });
9489
+ </script>
9490
+ <script setup lang="ts">
9491
+ const props = defineProps<{
9492
+ /**
9493
+ * Whether to show the icon skeleton.
9494
+ */
9495
+ showIcon?: boolean;
9496
+ /**
9497
+ * Additional classes to apply to the parent element.
9498
+ */
9499
+ class?: HTMLAttributes["class"];
9500
+ }>();
9501
+
9502
+ const width = computed(() => {
9503
+ return \`\${Math.floor(Math.random() * 40) + 50}%\`;
9504
+ });
9505
+ </script>
9506
+ `},{fileName:"Sidebar/MenuSub.vue",dirPath:"components/UI",fileContent:`<template>
9507
+ <ul data-sidebar="menu-badge" :class="sideBarMenuSubStyles({ class: props.class })">
9508
+ <slot />
9509
+ </ul>
9510
+ </template>
9511
+
9512
+ <script lang="ts">
9513
+ import type { HTMLAttributes } from "vue";
9514
+
9515
+ export const sideBarMenuSubStyles = tv({
9516
+ base: [
9517
+ "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
9518
+ "group-data-[collapsible=icon]:hidden",
9519
+ ],
9520
+ });
9521
+ </script>
9522
+
9523
+ <script setup lang="ts">
9524
+ const props = defineProps<{
9525
+ /**
9526
+ * Additional classes to apply to the parent element.
9527
+ */
9528
+ class?: HTMLAttributes["class"];
9529
+ }>();
9530
+ </script>
9531
+ `},{fileName:"Sidebar/MenuSubButton.vue",dirPath:"components/UI",fileContent:`<template>
9532
+ <Primitive
9533
+ data-sidebar="menu-sub-button"
9534
+ :as="as"
9535
+ :as-child="asChild"
9536
+ :data-size="size"
9537
+ :data-active="isActive"
9538
+ :class="sideBarMenuSubButtonStyles({ size, class: props.class })"
9539
+ >
9540
+ <slot />
9541
+ </Primitive>
9542
+ </template>
9543
+
9544
+ <script lang="ts">
9545
+ import { Primitive } from "radix-vue";
9546
+ import type { PrimitiveProps } from "radix-vue";
9547
+ import type { VariantProps } from "tailwind-variants";
9548
+ import type { HTMLAttributes } from "vue";
9549
+
9550
+ export const sideBarMenuSubButtonStyles = tv({
9551
+ base: [
9552
+ "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
9553
+ "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
9554
+ "group-data-[collapsible=icon]:hidden",
9555
+ ],
9556
+ variants: {
9557
+ size: {
9558
+ sm: "text-xs",
9559
+ md: "text-sm",
9560
+ },
9561
+ },
9562
+ });
9563
+
9564
+ export type SideBarMenuSubButtonProps = PrimitiveProps & {
9565
+ /**
9566
+ * The size of the button.
9567
+ * @default "md"
9568
+ */
9569
+ size?: VariantProps<typeof sideBarMenuSubButtonStyles>["size"];
9570
+ /**
9571
+ * Whether the button is active.
9572
+ */
9573
+ isActive?: boolean;
9574
+ /**
9575
+ * Additional classes to apply to the parent element.
9576
+ */
9577
+ class?: HTMLAttributes["class"];
9578
+ };
9579
+ </script>
9580
+
9581
+ <script setup lang="ts">
9582
+ const props = withDefaults(defineProps<SideBarMenuSubButtonProps>(), {
9583
+ as: "a",
9584
+ size: "md",
9585
+ });
9586
+ </script>
9587
+ `},{fileName:"Sidebar/MenuSubItem.vue",dirPath:"components/UI",fileContent:`<template>
9588
+ <li>
9589
+ <slot />
9590
+ </li>
9591
+ </template>
9592
+ `},{fileName:"Sidebar/Provider.vue",dirPath:"components/UI",fileContent:`<template>
9593
+ <UiTooltipProvider :delay-duration="0">
9594
+ <div
9595
+ :style="{
9596
+ '--sidebar-width': SIDEBAR_WIDTH,
9597
+ '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,
9598
+ }"
9599
+ :class="sideBarProviderStyles({ class: props.class })"
9600
+ >
9601
+ <slot />
9602
+ </div>
9603
+ </UiTooltipProvider>
9604
+ </template>
9605
+
9606
+ <script lang="ts">
9607
+ import type { HTMLAttributes, Ref } from "vue";
9608
+
9609
+ export const sideBarProviderStyles = tv({
9610
+ base: "group/sidebar-wrapper flex min-h-svh w-full text-sidebar-foreground has-[[data-variant=inset]]:bg-sidebar",
9611
+ });
9612
+ </script>
9613
+
9614
+ <script setup lang="ts">
9615
+ const props = withDefaults(
9616
+ defineProps<{
9617
+ /**
9618
+ * Default open state of the sidebar.
9619
+ * @default true
9620
+ */
9621
+ defaultOpen?: boolean;
9622
+ /**
9623
+ * Open state of the sidebar (controlled).
9624
+ * @default undefined
9625
+ */
9626
+ open?: boolean;
9627
+ /**
9628
+ * Additional classes to apply to the parent element.
9629
+ */
9630
+ class?: HTMLAttributes["class"];
9631
+ }>(),
9632
+ {
9633
+ defaultOpen: true,
9634
+ open: undefined,
9635
+ }
9636
+ );
9637
+
9638
+ // This sets the cookie to keep the sidebar state.
9639
+ const SIDEBAR_COOKIE = useCookie<boolean>(SIDEBAR_COOKIE_NAME, {
9640
+ path: "/",
9641
+ maxAge: SIDEBAR_COOKIE_MAX_AGE,
9642
+ default: () => false,
9643
+ });
9644
+
9645
+ const emits = defineEmits<{
9646
+ "update:open": [open: boolean];
9647
+ }>();
9648
+
9649
+ const isMobile = useMediaQuery("(max-width: 768px)");
9650
+ const openMobile = ref(false);
9651
+
9652
+ const open = useVModel(props, "open", emits, {
9653
+ defaultValue: props.defaultOpen ? props.defaultOpen : SIDEBAR_COOKIE.value,
9654
+ passive: (props.open === undefined) as false,
9655
+ }) as Ref<boolean>;
9656
+
9657
+ function setOpen(value: boolean) {
9658
+ open.value = value; // emits('update:open', value)
9659
+ SIDEBAR_COOKIE.value = value;
9660
+ }
9661
+
9662
+ function setOpenMobile(value: boolean) {
9663
+ openMobile.value = value;
9664
+ }
9665
+
9666
+ // Helper to toggle the sidebar.
9667
+ function toggleSidebar() {
9668
+ return isMobile.value ? setOpenMobile(!openMobile.value) : setOpen(!open.value);
9669
+ }
9670
+
9671
+ useEventListener("keydown", (event: KeyboardEvent) => {
9672
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
9673
+ event.preventDefault();
9674
+ toggleSidebar();
9675
+ }
9676
+ });
9677
+
9678
+ // We add a state so that we can do data-state="expanded" or "collapsed".
9679
+ // This makes it easier to style the sidebar with Tailwind classes.
9680
+ const state = computed(() => (open.value ? "expanded" : "collapsed"));
9681
+
9682
+ provideSidebarContext({
9683
+ state,
9684
+ open,
9685
+ setOpen,
9686
+ isMobile,
9687
+ openMobile,
9688
+ setOpenMobile,
9689
+ toggleSidebar,
9690
+ });
9691
+ </script>
9692
+ `},{fileName:"Sidebar/Rail.vue",dirPath:"components/UI",fileContent:`<template>
9693
+ <button
9694
+ data-sidebar="rail"
9695
+ aria-label="Toggle Sidebar"
9696
+ :tabindex="-1"
9697
+ title="Toggle Sidebar"
9698
+ :class="sideBarRailStyles({ class: props.class })"
9699
+ @click="toggleSidebar"
9700
+ >
9701
+ <slot />
9702
+ </button>
9703
+ </template>
9704
+
9705
+ <script lang="ts">
9706
+ import type { HTMLAttributes } from "vue";
9707
+
9708
+ export const sideBarRailStyles = tv({
9709
+ base: [
9710
+ "absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
9711
+ "[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
9712
+ "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
9713
+ "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
9714
+ "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
9715
+ "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
9716
+ ],
9717
+ });
9718
+ </script>
9719
+ <script setup lang="ts">
9720
+ const props = defineProps<{
9721
+ /**
9722
+ * Additional classes to apply to the parent element.
9723
+ */
9724
+ class?: HTMLAttributes["class"];
9725
+ }>();
9726
+
9727
+ const { toggleSidebar } = useSidebar();
9728
+ </script>
9729
+ `},{fileName:"Sidebar/Separator.vue",dirPath:"components/UI",fileContent:`<template>
9730
+ <UiSeparator data-sidebar="separator" :class="sideBarSeparatorStyles({ class: props.class })">
9731
+ <slot />
9732
+ </UiSeparator>
9733
+ </template>
9734
+
9735
+ <script lang="ts">
9736
+ import type { HTMLAttributes } from "vue";
9737
+
9738
+ export const sideBarSeparatorStyles = tv({
9739
+ base: "mx-2 w-auto bg-sidebar-border",
9740
+ });
9741
+ </script>
9742
+
9743
+ <script setup lang="ts">
9744
+ const props = defineProps<{
9745
+ /**
9746
+ * Additional classes to apply to the parent element.
9747
+ */
9748
+ class?: HTMLAttributes["class"];
9749
+ }>();
9750
+ </script>
9751
+ `},{fileName:"Sidebar/Sidebar.vue",dirPath:"components/UI",fileContent:`<template>
9752
+ <div
9753
+ v-if="collapsible === 'none'"
9754
+ :class="sideBarStyles().collapsible({ class: props.class })"
9755
+ v-bind="$attrs"
9756
+ >
9757
+ <slot />
9758
+ </div>
9759
+
9760
+ <UiSheet v-else-if="isMobile" :open="openMobile" v-bind="$attrs" @update:open="setOpenMobile">
9761
+ <UiSheetContent
9762
+ data-sidebar="sidebar"
9763
+ data-mobile="true"
9764
+ :side="side"
9765
+ :class="sideBarStyles().mobileSheet()"
9766
+ :style="{
9767
+ '--sidebar-width': SIDEBAR_WIDTH_MOBILE,
9768
+ }"
9769
+ >
9770
+ <VisuallyHidden>
9771
+ <UiSheetTitle>Mobile Sidebar</UiSheetTitle>
9772
+ <UiSheetDescription>
9773
+ This is the mobile sidebar. You can use this to navigate the site.
9774
+ </UiSheetDescription>
9775
+ </VisuallyHidden>
9776
+ <div :class="sideBarStyles().mobileInner()">
9777
+ <slot />
9778
+ </div>
9779
+ </UiSheetContent>
9780
+ </UiSheet>
9781
+
9782
+ <div
9783
+ v-else
9784
+ class="group peer hidden md:block"
9785
+ :data-state="state"
9786
+ :data-collapsible="state === 'collapsed' ? collapsible : ''"
9787
+ :data-variant="variant"
9788
+ :data-side="side"
9789
+ >
9790
+ <!-- This is what handles the sidebar gap on desktop -->
9791
+ <div :class="sideBarStyles().sideBarWrapper({ variant })" />
9792
+ <div
9793
+ :class="sideBarStyles().sideBarWrapper2({ collapsible, side, variant, class: props.class })"
9794
+ v-bind="$attrs"
9795
+ >
9796
+ <div data-sidebar="sidebar" :class="sideBarStyles().sideBarInner()">
9797
+ <slot />
9798
+ </div>
9799
+ </div>
9800
+ </div>
9801
+ </template>
9802
+
9803
+ <script lang="ts">
9804
+ import type { VariantProps } from "tailwind-variants";
9805
+ import type { HTMLAttributes } from "vue";
9806
+
9807
+ export const sideBarStyles = tv({
9808
+ slots: {
9809
+ collapsible: "flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
9810
+ mobileSheet: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
9811
+ mobileInner: "flex h-full w-full flex-col",
9812
+ sideBarWrapper:
9813
+ "relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear group-data-[collapsible=offcanvas]:w-0 group-data-[side=right]:rotate-180",
9814
+ sideBarWrapper2:
9815
+ "fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",
9816
+ sideBarInner:
9817
+ "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
9818
+ },
9819
+ variants: {
9820
+ side: {
9821
+ left: {
9822
+ sideBarWrapper2:
9823
+ "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]",
9824
+ },
9825
+ right: {
9826
+ sideBarWrapper2:
9827
+ "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
9828
+ },
9829
+ },
9830
+ variant: {
9831
+ sidebar: {
9832
+ sideBarWrapper: "group-data-[collapsible=icon]:w-[--sidebar-width-icon]",
9833
+ sideBarWrapper2:
9834
+ "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
9835
+ },
9836
+ floating: {
9837
+ sideBarWrapper:
9838
+ "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]",
9839
+ sideBarWrapper2:
9840
+ "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]",
9841
+ },
9842
+ inset: {
9843
+ sideBarWrapper:
9844
+ "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]",
9845
+ sideBarWrapper2:
9846
+ "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]",
9847
+ },
9848
+ },
9849
+ collapsible: {
9850
+ offcanvas: {},
9851
+ icon: {},
9852
+ none: {},
9853
+ },
9854
+ },
9855
+ defaultVariants: {
9856
+ side: "left",
9857
+ variant: "sidebar",
9858
+ collapsible: "offcanvas",
9859
+ },
9860
+ });
9861
+
9862
+ export type SideBarProps = {
9863
+ /**
9864
+ * The side that the sidebar is on
9865
+ * @default "left"
9866
+ */
9867
+ side?: VariantProps<typeof sideBarStyles>["side"];
9868
+ /**
9869
+ * The variant of the sidebar
9870
+ * @default "sidebar"
9871
+ */
9872
+ variant?: VariantProps<typeof sideBarStyles>["variant"];
9873
+ /**
9874
+ * The collapsible state of the sidebar
9875
+ * @default "offcanvas"
9876
+ */
9877
+ collapsible?: VariantProps<typeof sideBarStyles>["collapsible"];
9878
+ /**
9879
+ * Additional classes to add to the sidebar
9880
+ */
9881
+ class?: HTMLAttributes["class"];
9882
+ };
9883
+ </script>
9884
+ <script setup lang="ts">
9885
+ defineOptions({ inheritAttrs: false });
9886
+
9887
+ const props = withDefaults(defineProps<SideBarProps>(), {
9888
+ side: "left",
9889
+ variant: "sidebar",
9890
+ collapsible: "offcanvas",
9891
+ });
9892
+
9893
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
9894
+ </script>
9895
+ `},{fileName:"Sidebar/Trigger.vue",dirPath:"components/UI",fileContent:`<template>
9896
+ <UiButton
9897
+ :title="label"
9898
+ data-sidebar="trigger"
9899
+ variant="ghost"
9900
+ size="icon"
9901
+ :class="sideBarTriggerStyles({ class: props.class })"
9902
+ @click="toggleSidebar"
9903
+ >
9904
+ <slot v-bind="{ state }">
9905
+ <Icon v-if="icon" :name="icon" />
9906
+ <span class="sr-only">{{ label }}</span>
9907
+ </slot>
9908
+ </UiButton>
9909
+ </template>
9910
+
9911
+ <script lang="ts">
9912
+ import type { HTMLAttributes } from "vue";
9913
+
9914
+ export const sideBarTriggerStyles = tv({
9915
+ base: "size-7",
9916
+ });
9917
+ </script>
9918
+
9919
+ <script setup lang="ts">
9920
+ const props = withDefaults(
9921
+ defineProps<{
9922
+ /**
9923
+ * The icon to display in the trigger.
9924
+ * @default "lucide:panel-left"
9925
+ */
9926
+ icon?: string;
9927
+ /**
9928
+ * Additional classes to apply to the parent element.
9929
+ */
9930
+ class?: HTMLAttributes["class"];
9931
+ /**
9932
+ * The label for the trigger.
9933
+ * @default "Toggle Sidebar"
9934
+ */
9935
+ label?: string;
9936
+ }>(),
9937
+ {
9938
+ icon: "lucide:panel-left",
9939
+ label: "Toggle Sidebar",
9940
+ }
9941
+ );
9942
+
9943
+ const { toggleSidebar, state } = useSidebar();
9944
+ </script>
9945
+ `}],components:["input","tooltip","skeleton","separator","sheet","button"],utils:[{fileName:"sidebar.ts",dirPath:"utils",fileContent:`import { createContext } from "radix-vue";
9946
+ import type { ComputedRef, Ref } from "vue";
9947
+
9948
+ export const SIDEBAR_COOKIE_NAME = "sidebar:state";
9949
+ export const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
9950
+ export const SIDEBAR_WIDTH = "16rem";
9951
+ export const SIDEBAR_WIDTH_MOBILE = "18rem";
9952
+ export const SIDEBAR_WIDTH_ICON = "3rem";
9953
+ export const SIDEBAR_KEYBOARD_SHORTCUT = "b";
9954
+
9955
+ export const sidebarMenuButtonVariants = tv({
9956
+ base: "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
9957
+
9958
+ variants: {
9959
+ variant: {
9960
+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
9961
+ outline:
9962
+ "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",
9963
+ },
9964
+ size: {
9965
+ default: "h-8 text-sm",
9966
+ sm: "h-7 text-xs",
9967
+ lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0",
9968
+ },
9969
+ },
9970
+ defaultVariants: {
9971
+ variant: "default",
9972
+ size: "default",
9973
+ },
9974
+ });
9975
+
9976
+ export type SidebarMenuButtonVariants = VariantProps<typeof sidebarMenuButtonVariants>;
9977
+
9978
+ export const [useSidebar, provideSidebarContext] = createContext<{
9979
+ state: ComputedRef<"expanded" | "collapsed">;
9980
+ open: Ref<boolean>;
9981
+ setOpen: (value: boolean) => void;
9982
+ isMobile: Ref<boolean>;
9983
+ openMobile: Ref<boolean>;
9984
+ setOpenMobile: (value: boolean) => void;
9985
+ toggleSidebar: () => void;
9986
+ }>("Sidebar");
9987
+ `}],composables:[],plugins:[]},{name:"Skeleton",value:"skeleton",files:[{fileName:"Skeleton.vue",dirPath:"components/UI",fileContent:`<template>
8995
9988
  <Primitive :class="styles({ loading, class: props.class })" v-bind="forwarded">
8996
9989
  <slot />
8997
9990
  </Primitive>
@@ -10266,7 +11259,7 @@ function toast(props: Toast) {
10266
11259
  }
10267
11260
 
10268
11261
  export { toast, useToast };
10269
- `}],instructions:["Remeber to add <UiToastToaster /> to your app.vue/layout file."],files:[{fileName:"Toast/Action.vue",dirPath:"components/UI",fileContent:`<template>
11262
+ `}],instructions:["Remember to add <UiToastToaster /> to your app.vue/layout file."],files:[{fileName:"Toast/Action.vue",dirPath:"components/UI",fileContent:`<template>
10270
11263
  <ToastAction :class="styles({ class: props.class })" v-bind="forwarded">
10271
11264
  <slot />
10272
11265
  </ToastAction>
@@ -11849,18 +12842,18 @@ export { toast, useToast };
11849
12842
  @apply bg-muted-foreground;
11850
12843
  }
11851
12844
  </style>
11852
- `}],utils:[],composables:[],plugins:[]}];import{join as Pp}from"path";import{loadConfig as Tp}from"c12";import Pe from"fs-extra";import wo from"kleur";import wp from"lodash";import{promises as Ws}from"node:fs";var Fn=rn(as(),1),Oi=rn($s(),1);function ue(r){var n=r.use(X),e=n.Type,t=n.builtInTypes,s=t.number;function i(c){return e.from(p=>s.check(p)&&p>=c,s+" >= "+c)}let o={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){},"use strict":function(){return"use strict"}};var a=e.or(t.string,t.number,t.boolean,t.null,t.undefined);let l=e.from(c=>{if(c===null)return!0;var p=typeof c;return!(p==="object"||p==="function")},a.toString());return{geq:i,defaults:o,isPrimitive:l}}function z(r){try{var n=r(),e=n.exports,t=e.default}catch{return}t&&t!==e&&typeof e=="object"&&(Object.assign(t,e,{default:t}),e.__esModule&&Object.defineProperty(t,"__esModule",{value:!0}),n.exports=t)}var Vl=Object.defineProperty,zl=(r,n,e)=>n in r?Vl(r,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[n]=e,re=(r,n,e)=>(zl(r,typeof n!="symbol"?n+"":n,e),e),Fi=Object.prototype,An=Fi.toString,ye=Fi.hasOwnProperty,Ze=class{assert(n,e){if(!this.check(n,e)){var t=sr(n);throw new Error(t+" does not match type "+this)}return!0}arrayOf(){let n=this;return new Wt(n)}},Wt=class extends Ze{constructor(n){super(),this.elemType=n,re(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(n,e){return Array.isArray(n)&&n.every(t=>this.elemType.check(t,e))}},kn=class extends Ze{constructor(n){super(),this.value=n,re(this,"kind","IdentityType")}toString(){return String(this.value)}check(n,e){let t=n===this.value;return!t&&typeof e=="function"&&e(this,n),t}},Nn=class extends Ze{constructor(n){super(),this.fields=n,re(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(n,e){return An.call(n)===An.call({})&&this.fields.every(t=>t.type.check(n[t.name],e))}},Dn=class extends Ze{constructor(n){super(),this.types=n,re(this,"kind","OrType")}toString(){return this.types.join(" | ")}check(n,e){return this.types.some(t=>t.check(n,!!e))?!0:(typeof e=="function"&&e(this,n),!1)}},Qe=class extends Ze{constructor(n,e){super(),this.name=n,this.predicate=e,re(this,"kind","PredicateType")}toString(){return this.name}check(n,e){let t=this.predicate(n,e);return!t&&typeof e=="function"&&e(this,n),t}},Ht=class r{constructor(n,e){this.type=n,this.typeName=e,re(this,"baseNames",[]),re(this,"ownFields",Object.create(null)),re(this,"allSupertypes",Object.create(null)),re(this,"supertypeList",[]),re(this,"allFields",Object.create(null)),re(this,"fieldNames",[]),re(this,"finalized",!1),re(this,"buildable",!1),re(this,"buildParams",[])}isSupertypeOf(n){if(n instanceof r){if(this.finalized!==!0||n.finalized!==!0)throw new Error("");return ye.call(n.allSupertypes,this.typeName)}else throw new Error(n+" is not a Def")}checkAllFields(n,e){var t=this.allFields;if(this.finalized!==!0)throw new Error(""+this.typeName);function s(i){var o=t[i],a=o.type,l=o.getValue(n);return a.check(l,e)}return n!==null&&typeof n=="object"&&Object.keys(t).every(s)}bases(...n){var e=this.baseNames;if(this.finalized){if(n.length!==e.length)throw new Error("");for(var t=0;t<n.length;t++)if(n[t]!==e[t])throw new Error("");return this}return n.forEach(s=>{e.indexOf(s)<0&&e.push(s)}),this}},Mn=class{constructor(n,e,t,s){this.name=n,this.type=e,this.defaultFn=t,re(this,"hidden"),this.hidden=!!s}toString(){return JSON.stringify(this.name)+": "+this.type}getValue(n){var e=n[this.name];return typeof e<"u"||typeof this.defaultFn=="function"&&(e=this.defaultFn.call(n)),e}};function sr(r){return Array.isArray(r)?"["+r.map(sr).join(", ")+"]":r&&typeof r=="object"?"{ "+Object.keys(r).map(function(n){return n+": "+r[n]}).join(", ")+" }":JSON.stringify(r)}function X(r){let n={or(...S){return new Dn(S.map(I=>n.from(I)))},from(S,I){if(S instanceof Wt||S instanceof kn||S instanceof Nn||S instanceof Dn||S instanceof Qe)return S;if(S instanceof Ht)return S.type;if(a.check(S)){if(S.length!==1)throw new Error("only one element type is permitted for typed arrays");return new Wt(n.from(S[0]))}if(l.check(S))return new Nn(Object.keys(S).map(F=>new Mn(F,n.from(S[F],F))));if(typeof S=="function"){var O=e.indexOf(S);if(O>=0)return t[O];if(typeof I!="string")throw new Error("missing name");return new Qe(I,S)}return new kn(S)},def(S){return ye.call(y,S)?y[S]:y[S]=new E(S)},hasDef(S){return ye.call(y,S)}};var e=[],t=[];function s(S,I){let O=An.call(I),F=new Qe(S,$=>An.call($)===O);return I&&typeof I.constructor=="function"&&(e.push(I.constructor),t.push(F)),F}let i=s("string","truthy"),o=s("function",function(){}),a=s("array",[]),l=s("object",{}),c=s("RegExp",/./),p=s("Date",new Date),u=s("number",3),f=s("boolean",!0),m=s("null",null),d=s("undefined",void 0),g=typeof BigInt=="function"?s("BigInt",BigInt(1234)):new Qe("BigInt",()=>!1),h={string:i,function:o,array:a,object:l,RegExp:c,Date:p,number:u,boolean:f,null:m,undefined:d,BigInt:g};var y=Object.create(null);function P(S){if(S&&typeof S=="object"){var I=S.type;if(typeof I=="string"&&ye.call(y,I)){var O=y[I];if(O.finalized)return O}}return null}class E extends Ht{constructor(I){super(new Qe(I,(O,F)=>this.check(O,F)),I)}check(I,O){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(I===null||typeof I!="object")return!1;var F=P(I);return F?O&&F===this?this.checkAllFields(I,O):this.isSupertypeOf(F)?O?F.checkAllFields(I,O)&&this.checkAllFields(I,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields(I,O):!1}build(...I){if(this.buildParams=I,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let O=($,H,K,me)=>{if(!ye.call($,H)){var De=this.allFields;if(!ye.call(De,H))throw new Error(""+H);var sn=De[H],Ko=sn.type,Ct;if(me)Ct=K;else if(sn.defaultFn)Ct=sn.defaultFn.call($);else{var Xo="no value or default function given for field "+JSON.stringify(H)+" of "+this.typeName+"("+this.buildParams.map(function(Jo){return De[Jo]}).join(", ")+")";throw new Error(Xo)}if(!Ko.check(Ct))throw new Error(sr(Ct)+" does not match field "+sn+" of type "+this.typeName);$[H]=Ct}},F=(...$)=>{var H=$.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var K=Object.create(N);if(this.buildParams.forEach(function(me,De){De<H?O(K,me,$[De],!0):O(K,me,null,!1)}),Object.keys(this.allFields).forEach(function(me){O(K,me,null,!1)}),K.type!==this.typeName)throw new Error("");return K};return F.from=$=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var H=Object.create(N);if(Object.keys(this.allFields).forEach(function(K){ye.call($,K)?O(H,K,$[K],!0):O(H,K,null,!1)}),H.type!==this.typeName)throw new Error("");return H},Object.defineProperty(C,le(this.typeName),{enumerable:!0,value:F}),this}field(I,O,F,$){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(I)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[I]=new Mn(I,n.from(O),F,$),this)}finalize(){if(!this.finalized){var I=this.allFields,O=this.allSupertypes;this.baseNames.forEach($=>{var H=y[$];if(H instanceof Ht)H.finalize(),Kn(I,H.allFields),Kn(O,H.allSupertypes);else{var K="unknown supertype name "+JSON.stringify($)+" for subtype "+JSON.stringify(this.typeName);throw new Error(K)}}),Kn(I,this.ownFields),O[this.typeName]=this,this.fieldNames.length=0;for(var F in I)ye.call(I,F)&&!I[F].hidden&&this.fieldNames.push(F);Object.defineProperty(gr,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,Go(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&Ho(this.typeName)}}}function x(S){if(!ye.call(y,S))throw new Error("");var I=y[S];if(I.finalized!==!0)throw new Error("");return I.supertypeList.slice(1)}function T(S){for(var I={},O=Object.keys(y),F=O.length,$=0;$<F;++$){var H=O[$],K=y[H];if(K.finalized!==!0)throw new Error(""+H);for(var me=0;me<K.supertypeList.length;++me){var De=K.supertypeList[me];if(ye.call(S,De)){I[H]=De;break}}}return I}var C=Object.create(null),N={};function q(S,I){var O=N[S];return d.check(I)?delete N[S]:(o.assert(I),Object.defineProperty(N,S,{enumerable:!0,configurable:!0,value:I})),O}function le(S){return S.replace(/^[A-Z]+/,function(I){var O=I.length;switch(O){case 0:return"";case 1:return I.toLowerCase();default:return I.slice(0,O-1).toLowerCase()+I.charAt(O-1)}})}function Ee(S){return S=le(S),S.replace(/(Expression)?$/,"Statement")}var gr={};function Gn(S){var I=P(S);if(I)return I.fieldNames.slice(0);if("type"in S)throw new Error("did not recognize object of type "+JSON.stringify(S.type));return Object.keys(S)}function Wn(S,I){var O=P(S);if(O){var F=O.allFields[I];if(F)return F.getValue(S)}return S&&S[I]}function $o(S,I,O){Gn(S).forEach(function(F){I.call(this,F,Wn(S,F))},O)}function qo(S,I,O){return Gn(S).some(function(F){return I.call(this,F,Wn(S,F))},O)}function Ho(S){var I=Ee(S);if(C[I])return;var O=C[le(S)];if(!O)return;let F=function(...$){return C.expressionStatement(O.apply(C,$))};F.from=function(...$){return C.expressionStatement(O.from.apply(C,$))},C[I]=F}function Go(S,I){I.length=0,I.push(S);for(var O=Object.create(null),F=0;F<I.length;++F){S=I[F];var $=y[S];if($.finalized!==!0)throw new Error("");ye.call(O,S)&&delete I[O[S]],O[S]=F,I.push.apply(I,$.baseNames)}for(var H=0,K=H,me=I.length;K<me;++K)ye.call(I,K)&&(I[H++]=I[K]);I.length=H}function Kn(S,I){return Object.keys(I).forEach(function(O){S[O]=I[O]}),S}function Wo(){Object.keys(y).forEach(function(S){y[S].finalize()})}return{Type:n,builtInTypes:h,getSupertypeNames:x,computeSupertypeLookupTable:T,builders:C,defineMethod:q,getBuilderName:le,getStatementBuilderName:Ee,namedTypes:gr,getFieldNames:Gn,getFieldValue:Wn,eachField:$o,someField:qo,finalize:Wo}}z(()=>module);var $l=Object.prototype,xn=$l.hasOwnProperty;function Ui(r){var n=r.use(X),e=n.builtInTypes.array,t=n.builtInTypes.number;let s=function u(f,m,d){if(!(this instanceof u))throw new Error("Path constructor cannot be invoked without 'new'");if(m){if(!(m instanceof u))throw new Error("")}else m=null,d=null;this.value=f,this.parentPath=m,this.name=d,this.__childCache=null};var i=s.prototype;function o(u){return u.__childCache||(u.__childCache=Object.create(null))}function a(u,f){var m=o(u),d=u.getValueProperty(f),g=m[f];return(!xn.call(m,f)||g.value!==d)&&(g=m[f]=new u.constructor(d,u,f)),g}i.getValueProperty=function(f){return this.value[f]},i.get=function(...f){for(var m=this,d=f.length,g=0;g<d;++g)m=a(m,f[g]);return m},i.each=function(f,m){for(var d=[],g=this.value.length,h=0,h=0;h<g;++h)xn.call(this.value,h)&&(d[h]=this.get(h));for(m=m||this,h=0;h<g;++h)xn.call(d,h)&&f.call(m,d[h])},i.map=function(f,m){var d=[];return this.each(function(g){d.push(f.call(this,g))},m),d},i.filter=function(f,m){var d=[];return this.each(function(g){f.call(this,g)&&d.push(g)},m),d};function l(){}function c(u,f,m,d){if(e.assert(u.value),f===0)return l;var g=u.value.length;if(g<1)return l;var h=arguments.length;h===2?(m=0,d=g):h===3?(m=Math.max(m,0),d=g):(m=Math.max(m,0),d=Math.min(d,g)),t.assert(m),t.assert(d);for(var y=Object.create(null),P=o(u),E=m;E<d;++E)if(xn.call(u.value,E)){var x=u.get(E);if(x.name!==E)throw new Error("");var T=E+f;x.name=T,y[T]=x,delete P[E]}return delete P.length,function(){for(var C in y){var N=y[C];if(N.name!==+C)throw new Error("");P[C]=N,u.value[C]=N.value}}}i.shift=function(){var f=c(this,-1),m=this.value.shift();return f(),m},i.unshift=function(...f){var m=c(this,f.length),d=this.value.unshift.apply(this.value,f);return m(),d},i.push=function(...f){return e.assert(this.value),delete o(this).length,this.value.push.apply(this.value,f)},i.pop=function(){e.assert(this.value);var f=o(this);return delete f[this.value.length-1],delete f.length,this.value.pop()},i.insertAt=function(f){var m=arguments.length,d=c(this,m-1,f);if(d===l&&m<=1)return this;f=Math.max(f,0);for(var g=1;g<m;++g)this.value[f+g-1]=arguments[g];return d(),this},i.insertBefore=function(...f){for(var m=this.parentPath,d=f.length,g=[this.name],h=0;h<d;++h)g.push(f[h]);return m.insertAt.apply(m,g)},i.insertAfter=function(...f){for(var m=this.parentPath,d=f.length,g=[this.name+1],h=0;h<d;++h)g.push(f[h]);return m.insertAt.apply(m,g)};function p(u){if(!(u instanceof s))throw new Error("");var f=u.parentPath;if(!f)return u;var m=f.value,d=o(f);if(m[u.name]===u.value)d[u.name]=u;else if(e.check(m)){var g=m.indexOf(u.value);g>=0&&(d[u.name=g]=u)}else m[u.name]=u.value,d[u.name]=u;if(m[u.name]!==u.value)throw new Error("");if(u.parentPath.get(u.name)!==u)throw new Error("");return u}return i.replace=function(f){var m=[],d=this.parentPath.value,g=o(this.parentPath),h=arguments.length;if(p(this),e.check(d)){for(var y=d.length,P=c(this.parentPath,h-1,this.name+1),E=[this.name,1],x=0;x<h;++x)E.push(arguments[x]);var T=d.splice.apply(d,E);if(T[0]!==this.value)throw new Error("");if(d.length!==y-1+h)throw new Error("");if(P(),h===0)delete this.value,delete g[this.name],this.__childCache=null;else{if(d[this.name]!==f)throw new Error("");for(this.value!==f&&(this.value=f,this.__childCache=null),x=0;x<h;++x)m.push(this.parentPath.get(this.name+x));if(m[0]!==this)throw new Error("")}}else if(h===1)this.value!==f&&(this.__childCache=null),this.value=d[this.name]=f,m.push(this);else if(h===0)delete d[this.name],delete this.value,this.__childCache=null;else throw new Error("Could not replace path");return m},s}z(()=>module);var dt=Object.prototype.hasOwnProperty;function ql(r){var n=r.use(X),e=n.Type,t=n.namedTypes,s=t.Node,i=t.Expression,o=n.builtInTypes.array,a=n.builders;let l=function x(T,C){if(!(this instanceof x))throw new Error("Scope constructor cannot be invoked without 'new'");p.check(T.value)||c.assert(T.value);var N;if(C){if(!(C instanceof x))throw new Error("");N=C.depth+1}else C=null,N=0;Object.defineProperties(this,{path:{value:T},node:{value:T.value},isGlobal:{value:!C,enumerable:!0},depth:{value:N},parent:{value:C},bindings:{value:{}},types:{value:{}}})};var c=e.or(t.Program,t.Function,t.CatchClause),p=e.or(t.Function,t.ClassDeclaration,t.ClassExpression,t.InterfaceDeclaration,t.TSInterfaceDeclaration,t.TypeAlias,t.TSTypeAliasDeclaration),u=e.or(t.TypeParameter,t.TSTypeParameter);l.isEstablishedBy=function(x){return c.check(x)||p.check(x)};var f=l.prototype;f.didScan=!1,f.declares=function(x){return this.scan(),dt.call(this.bindings,x)},f.declaresType=function(x){return this.scan(),dt.call(this.types,x)},f.declareTemporary=function(x){if(x){if(!/^[a-z$_]/i.test(x))throw new Error("")}else x="t$";x+=this.depth.toString(36)+"$",this.scan();for(var T=0;this.declares(x+T);)++T;var C=x+T;return this.bindings[C]=n.builders.identifier(C)},f.injectTemporary=function(x,T){x||(x=this.declareTemporary());var C=this.path.get("body");return t.BlockStatement.check(C.value)&&(C=C.get("body")),C.unshift(a.variableDeclaration("var",[a.variableDeclarator(x,T||null)])),x},f.scan=function(x){if(x||!this.didScan){for(var T in this.bindings)delete this.bindings[T];for(var T in this.types)delete this.types[T];m(this.path,this.bindings,this.types),this.didScan=!0}},f.getBindings=function(){return this.scan(),this.bindings},f.getTypes=function(){return this.scan(),this.types};function m(x,T,C){var N=x.value;if(p.check(N)){let q=x.get("typeParameters","params");o.check(q.value)&&q.each(le=>{E(le,C)})}c.check(N)&&(t.CatchClause.check(N)?y(x.get("param"),T):d(x,T,C))}function d(x,T,C){var N=x.value;x.parent&&t.FunctionExpression.check(x.parent.node)&&x.parent.node.id&&y(x.parent.get("id"),T),N&&(o.check(N)?x.each(q=>{h(q,T,C)}):t.Function.check(N)?(x.get("params").each(q=>{y(q,T)}),h(x.get("body"),T,C),d(x.get("typeParameters"),T,C)):t.TypeAlias&&t.TypeAlias.check(N)||t.InterfaceDeclaration&&t.InterfaceDeclaration.check(N)||t.TSTypeAliasDeclaration&&t.TSTypeAliasDeclaration.check(N)||t.TSInterfaceDeclaration&&t.TSInterfaceDeclaration.check(N)?P(x.get("id"),C):t.VariableDeclarator.check(N)?(y(x.get("id"),T),h(x.get("init"),T,C)):N.type==="ImportSpecifier"||N.type==="ImportNamespaceSpecifier"||N.type==="ImportDefaultSpecifier"?y(x.get(N.local?"local":N.name?"name":"id"),T):s.check(N)&&!i.check(N)&&n.eachField(N,function(q,le){var Ee=x.get(q);if(!g(Ee,le))throw new Error("");h(Ee,T,C)}))}function g(x,T){return!!(x.value===T||Array.isArray(x.value)&&x.value.length===0&&Array.isArray(T)&&T.length===0)}function h(x,T,C){var N=x.value;if(!(!N||i.check(N)))if(t.FunctionDeclaration.check(N)&&N.id!==null)y(x.get("id"),T);else if(t.ClassDeclaration&&t.ClassDeclaration.check(N)&&N.id!==null)y(x.get("id"),T),d(x.get("typeParameters"),T,C);else if(t.InterfaceDeclaration&&t.InterfaceDeclaration.check(N)||t.TSInterfaceDeclaration&&t.TSInterfaceDeclaration.check(N))P(x.get("id"),C);else if(c.check(N)){if(t.CatchClause.check(N)&&t.Identifier.check(N.param)){var q=N.param.name,le=dt.call(T,q);d(x.get("body"),T,C),le||delete T[q]}}else d(x,T,C)}function y(x,T){var C=x.value;t.Pattern.assert(C),t.Identifier.check(C)?dt.call(T,C.name)?T[C.name].push(x):T[C.name]=[x]:t.AssignmentPattern&&t.AssignmentPattern.check(C)?y(x.get("left"),T):t.ObjectPattern&&t.ObjectPattern.check(C)?x.get("properties").each(function(N){var q=N.value;t.Pattern.check(q)?y(N,T):t.Property.check(q)||t.ObjectProperty&&t.ObjectProperty.check(q)?y(N.get("value"),T):t.SpreadProperty&&t.SpreadProperty.check(q)&&y(N.get("argument"),T)}):t.ArrayPattern&&t.ArrayPattern.check(C)?x.get("elements").each(function(N){var q=N.value;t.Pattern.check(q)?y(N,T):t.SpreadElement&&t.SpreadElement.check(q)&&y(N.get("argument"),T)}):t.PropertyPattern&&t.PropertyPattern.check(C)?y(x.get("pattern"),T):(t.SpreadElementPattern&&t.SpreadElementPattern.check(C)||t.RestElement&&t.RestElement.check(C)||t.SpreadPropertyPattern&&t.SpreadPropertyPattern.check(C))&&y(x.get("argument"),T)}function P(x,T){var C=x.value;t.Pattern.assert(C),t.Identifier.check(C)&&(dt.call(T,C.name)?T[C.name].push(x):T[C.name]=[x])}function E(x,T){var C=x.value;u.assert(C),dt.call(T,C.name)?T[C.name].push(x):T[C.name]=[x]}return f.lookup=function(x){for(var T=this;T&&!T.declares(x);T=T.parent);return T},f.lookupType=function(x){for(var T=this;T&&!T.declaresType(x);T=T.parent);return T},f.getGlobalScope=function(){for(var x=this;!x.isGlobal;)x=x.parent;return x},l}z(()=>module);function Ri(r){var n=r.use(X),e=n.namedTypes,t=n.builders,s=n.builtInTypes.number,i=n.builtInTypes.array,o=r.use(Ui),a=r.use(ql);let l=function h(y,P,E){if(!(this instanceof h))throw new Error("NodePath constructor cannot be invoked without 'new'");o.call(this,y,P,E)};var c=l.prototype=Object.create(o.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(c,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),c.replace=function(){return delete this.node,delete this.parent,delete this.scope,o.prototype.replace.apply(this,arguments)},c.prune=function(){var h=this.parent;return this.replace(),d(h)},c._computeNode=function(){var h=this.value;if(e.Node.check(h))return h;var y=this.parentPath;return y&&y.node||null},c._computeParent=function(){var h=this.value,y=this.parentPath;if(!e.Node.check(h)){for(;y&&!e.Node.check(y.value);)y=y.parentPath;y&&(y=y.parentPath)}for(;y&&!e.Node.check(y.value);)y=y.parentPath;return y||null},c._computeScope=function(){var h=this.value,y=this.parentPath,P=y&&y.scope;return e.Node.check(h)&&a.isEstablishedBy(h)&&(P=new a(this,P)),P||null},c.getValueProperty=function(h){return n.getFieldValue(this.value,h)},c.needsParens=function(h){var y=this.parentPath;if(!y)return!1;var P=this.value;if(!e.Expression.check(P)||P.type==="Identifier")return!1;for(;!e.Node.check(y.value);)if(y=y.parentPath,!y)return!1;var E=y.value;switch(P.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return E.type==="MemberExpression"&&this.name==="object"&&E.object===P;case"BinaryExpression":case"LogicalExpression":switch(E.type){case"CallExpression":return this.name==="callee"&&E.callee===P;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&E.object===P;case"BinaryExpression":case"LogicalExpression":{let x=P,T=E.operator,C=u[T],N=x.operator,q=u[N];if(C>q)return!0;if(C===q&&this.name==="right"){if(E.right!==x)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(E.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(E.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return E.type==="MemberExpression"&&s.check(P.value)&&this.name==="object"&&E.object===P;case"AssignmentExpression":case"ConditionalExpression":switch(E.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&E.callee===P;case"ConditionalExpression":return this.name==="test"&&E.test===P;case"MemberExpression":return this.name==="object"&&E.object===P;default:return!1}default:if(E.type==="NewExpression"&&this.name==="callee"&&E.callee===P)return f(P)}return!!(h!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function p(h){return e.BinaryExpression.check(h)||e.LogicalExpression.check(h)}var u={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(h,y){h.forEach(function(P){u[P]=y})});function f(h){return e.CallExpression.check(h)?!0:i.check(h)?h.some(f):e.Node.check(h)?n.someField(h,function(y,P){return f(P)}):!1}c.canBeFirstInStatement=function(){var h=this.node;return!e.FunctionExpression.check(h)&&!e.ObjectExpression.check(h)},c.firstInStatement=function(){return m(this)};function m(h){for(var y,P;h.parent;h=h.parent){if(y=h.node,P=h.parent.node,e.BlockStatement.check(P)&&h.parent.name==="body"&&h.name===0){if(P.body[0]!==y)throw new Error("Nodes must be equal");return!0}if(e.ExpressionStatement.check(P)&&h.name==="expression"){if(P.expression!==y)throw new Error("Nodes must be equal");return!0}if(e.SequenceExpression.check(P)&&h.parent.name==="expressions"&&h.name===0){if(P.expressions[0]!==y)throw new Error("Nodes must be equal");continue}if(e.CallExpression.check(P)&&h.name==="callee"){if(P.callee!==y)throw new Error("Nodes must be equal");continue}if(e.MemberExpression.check(P)&&h.name==="object"){if(P.object!==y)throw new Error("Nodes must be equal");continue}if(e.ConditionalExpression.check(P)&&h.name==="test"){if(P.test!==y)throw new Error("Nodes must be equal");continue}if(p(P)&&h.name==="left"){if(P.left!==y)throw new Error("Nodes must be equal");continue}if(e.UnaryExpression.check(P)&&!P.prefix&&h.name==="argument"){if(P.argument!==y)throw new Error("Nodes must be equal");continue}return!1}return!0}function d(h){if(e.VariableDeclaration.check(h.node)){var y=h.get("declarations").value;if(!y||y.length===0)return h.prune()}else if(e.ExpressionStatement.check(h.node)){if(!h.get("expression").value)return h.prune()}else e.IfStatement.check(h.node)&&g(h);return h}function g(h){var y=h.get("test").value,P=h.get("alternate").value,E=h.get("consequent").value;if(!E&&!P){var x=t.expressionStatement(y);h.replace(x)}else if(!E&&P){var T=t.unaryExpression("!",y,!0);e.UnaryExpression.check(y)&&y.operator==="!"&&(T=y.argument),h.get("test").replace(T),h.get("consequent").replace(P),h.get("alternate").replace()}}return l}z(()=>module);var Pn=Object.prototype.hasOwnProperty;function Hl(r){var n=r.use(X),e=r.use(Ri),t=n.builtInTypes.array,s=n.builtInTypes.object,i=n.builtInTypes.function,o;let a=function d(){if(!(this instanceof d))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=l(this),this._shouldVisitComments=Pn.call(this._methodNameTable,"Block")||Pn.call(this._methodNameTable,"Line"),this.Context=f(this),this._visiting=!1,this._changeReported=!1};function l(d){var g=Object.create(null);for(var h in d)/^visit[A-Z]/.test(h)&&(g[h.slice(5)]=!0);for(var y=n.computeSupertypeLookupTable(g),P=Object.create(null),E=Object.keys(y),x=E.length,T=0;T<x;++T){var C=E[T];h="visit"+y[C],i.check(d[h])&&(P[C]=h)}return P}a.fromMethodsObject=function(g){if(g instanceof a)return g;if(!s.check(g))return new a;let h=function P(){if(!(this instanceof P))throw new Error("Visitor constructor cannot be invoked without 'new'");a.call(this)};var y=h.prototype=Object.create(p);return y.constructor=h,c(y,g),c(h,a),i.assert(h.fromMethodsObject),i.assert(h.visit),new h};function c(d,g){for(var h in g)Pn.call(g,h)&&(d[h]=g[h]);return d}a.visit=function(g,h){return a.fromMethodsObject(h).visit(g)};var p=a.prototype;p.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var d=arguments.length,g=new Array(d),h=0;h<d;++h)g[h]=arguments[h];g[0]instanceof e||(g[0]=new e({root:g[0]}).get("root")),this.reset.apply(this,g);var y;try{var P=this.visitWithoutReset(g[0]);y=!0}finally{if(this._visiting=!1,!y&&this._abortRequested)return g[0].value}return P},p.AbortRequest=function(){},p.abort=function(){var d=this;d._abortRequested=!0;var g=new d.AbortRequest;throw g.cancel=function(){d._abortRequested=!1},g},p.reset=function(d){},p.visitWithoutReset=function(d){if(this instanceof this.Context)return this.visitor.visitWithoutReset(d);if(!(d instanceof e))throw new Error("");var g=d.value,h=g&&typeof g=="object"&&typeof g.type=="string"&&this._methodNameTable[g.type];if(h){var y=this.acquireContext(d);try{return y.invokeVisitorMethod(h)}finally{this.releaseContext(y)}}else return u(d,this)};function u(d,g){if(!(d instanceof e))throw new Error("");if(!(g instanceof a))throw new Error("");var h=d.value;if(t.check(h))d.each(g.visitWithoutReset,g);else if(s.check(h)){var y=n.getFieldNames(h);g._shouldVisitComments&&h.comments&&y.indexOf("comments")<0&&y.push("comments");for(var P=y.length,E=[],x=0;x<P;++x){var T=y[x];Pn.call(h,T)||(h[T]=n.getFieldValue(h,T)),E.push(d.get(T))}for(var x=0;x<P;++x)g.visitWithoutReset(E[x])}return d.value}p.acquireContext=function(d){return this._reusableContextStack.length===0?new this.Context(d):this._reusableContextStack.pop().reset(d)},p.releaseContext=function(d){if(!(d instanceof this.Context))throw new Error("");this._reusableContextStack.push(d),d.currentPath=null},p.reportChanged=function(){this._changeReported=!0},p.wasChangeReported=function(){return this._changeReported};function f(d){function g(y){if(!(this instanceof g))throw new Error("");if(!(this instanceof a))throw new Error("");if(!(y instanceof e))throw new Error("");Object.defineProperty(this,"visitor",{value:d,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=y,this.needToCallTraverse=!0,Object.seal(this)}if(!(d instanceof a))throw new Error("");var h=g.prototype=Object.create(d);return h.constructor=g,c(h,m),g}var m=Object.create(null);return m.reset=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof e))throw new Error("");return this.currentPath=g,this.needToCallTraverse=!0,this},m.invokeVisitorMethod=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");var h=this.visitor[g].call(this,this.currentPath);if(h===!1?this.needToCallTraverse=!1:h!==o&&(this.currentPath=this.currentPath.replace(h)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),this.needToCallTraverse!==!1)throw new Error("Must either call this.traverse or return false in "+g);var y=this.currentPath;return y&&y.value},m.traverse=function(g,h){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof e))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");return this.needToCallTraverse=!1,u(g,a.fromMethodsObject(h||this.visitor))},m.visit=function(g,h){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof e))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");return this.needToCallTraverse=!1,a.fromMethodsObject(h||this.visitor).visitWithoutReset(g)},m.reportChanged=function(){this.visitor.reportChanged()},m.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},a}z(()=>module);function Gl(r){var n=r.use(X),e=n.getFieldNames,t=n.getFieldValue,s=n.builtInTypes.array,i=n.builtInTypes.object,o=n.builtInTypes.Date,a=n.builtInTypes.RegExp,l=Object.prototype.hasOwnProperty;function c(d,g,h){return s.check(h)?h.length=0:h=null,u(d,g,h)}c.assert=function(d,g){var h=[];if(!c(d,g,h))if(h.length===0){if(d!==g)throw new Error("Nodes must be equal")}else throw new Error("Nodes differ in the following path: "+h.map(p).join(""))};function p(d){return/[_$a-z][_$a-z0-9]*/i.test(d)?"."+d:"["+JSON.stringify(d)+"]"}function u(d,g,h){return d===g?!0:s.check(d)?f(d,g,h):i.check(d)?m(d,g,h):o.check(d)?o.check(g)&&+d==+g:a.check(d)?a.check(g)&&d.source===g.source&&d.global===g.global&&d.multiline===g.multiline&&d.ignoreCase===g.ignoreCase:d==g}function f(d,g,h){s.assert(d);var y=d.length;if(!s.check(g)||g.length!==y)return h&&h.push("length"),!1;for(var P=0;P<y;++P){if(h&&h.push(P),P in d!=P in g||!u(d[P],g[P],h))return!1;if(h){var E=h.pop();if(E!==P)throw new Error(""+E)}}return!0}function m(d,g,h){if(i.assert(d),!i.check(g))return!1;if(d.type!==g.type)return h&&h.push("type"),!1;var y=e(d),P=y.length,E=e(g),x=E.length;if(P===x){for(var T=0;T<P;++T){var C=y[T],N=t(d,C),q=t(g,C);if(h&&h.push(C),!u(N,q,h))return!1;if(h){var le=h.pop();if(le!==C)throw new Error(""+le)}}return!0}if(!h)return!1;var Ee=Object.create(null);for(T=0;T<P;++T)Ee[y[T]]=!0;for(T=0;T<x;++T){if(C=E[T],!l.call(Ee,C))return h.push(C),!1;delete Ee[C]}for(C in Ee){h.push(C);break}return!1}return c}z(()=>module);function Wl(r){let n=Kl(),e=n.use(X);r.forEach(n.use),e.finalize();let t=n.use(Hl);return{Type:e.Type,builtInTypes:e.builtInTypes,namedTypes:e.namedTypes,builders:e.builders,defineMethod:e.defineMethod,getFieldNames:e.getFieldNames,getFieldValue:e.getFieldValue,eachField:e.eachField,someField:e.someField,getSupertypeNames:e.getSupertypeNames,getBuilderName:e.getBuilderName,astNodesAreEquivalent:n.use(Gl),finalize:e.finalize,Path:n.use(Ui),NodePath:n.use(Ri),PathVisitor:t,use:n.use,visit:t.visit}}function Kl(){let r=[],n=[];function e(s){var i=r.indexOf(s);return i===-1&&(i=r.length,r.push(s),n[i]=s(t)),n[i]}var t={use:e};return t}z(()=>module);function _i(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}z(()=>module);function Bi(r){let n=r.use(_i);return n.BinaryOperators.indexOf("**")<0&&n.BinaryOperators.push("**"),n.AssignmentOperators.indexOf("**=")<0&&n.AssignmentOperators.push("**="),n}z(()=>module);function ji(r){let n=r.use(Bi);return n.LogicalOperators.indexOf("??")<0&&n.LogicalOperators.push("??"),n}z(()=>module);function Xl(r){let n=r.use(ji);return n.LogicalOperators.forEach(e=>{let t=e+"=";n.AssignmentOperators.indexOf(t)<0&&n.AssignmentOperators.push(t)}),n}z(()=>module);function Jl(r){var n=r.use(X),e=n.Type,t=e.def,s=e.or,i=r.use(ue),o=i.defaults,a=i.geq;let{BinaryOperators:l,AssignmentOperators:c,LogicalOperators:p}=r.use(_i);t("Printable").field("loc",s(t("SourceLocation"),null),o.null,!0),t("Node").bases("Printable").field("type",String).field("comments",s([t("Comment")],null),o.null,!0),t("SourceLocation").field("start",t("Position")).field("end",t("Position")).field("source",s(String,null),o.null),t("Position").field("line",a(1)).field("column",a(0)),t("File").bases("Node").build("program","name").field("program",t("Program")).field("name",s(String,null),o.null),t("Program").bases("Node").build("body").field("body",[t("Statement")]),t("Function").bases("Node").field("id",s(t("Identifier"),null),o.null).field("params",[t("Pattern")]).field("body",t("BlockStatement")).field("generator",Boolean,o.false).field("async",Boolean,o.false),t("Statement").bases("Node"),t("EmptyStatement").bases("Statement").build(),t("BlockStatement").bases("Statement").build("body").field("body",[t("Statement")]),t("ExpressionStatement").bases("Statement").build("expression").field("expression",t("Expression")),t("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",t("Expression")).field("consequent",t("Statement")).field("alternate",s(t("Statement"),null),o.null),t("LabeledStatement").bases("Statement").build("label","body").field("label",t("Identifier")).field("body",t("Statement")),t("BreakStatement").bases("Statement").build("label").field("label",s(t("Identifier"),null),o.null),t("ContinueStatement").bases("Statement").build("label").field("label",s(t("Identifier"),null),o.null),t("WithStatement").bases("Statement").build("object","body").field("object",t("Expression")).field("body",t("Statement")),t("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",t("Expression")).field("cases",[t("SwitchCase")]).field("lexical",Boolean,o.false),t("ReturnStatement").bases("Statement").build("argument").field("argument",s(t("Expression"),null)),t("ThrowStatement").bases("Statement").build("argument").field("argument",t("Expression")),t("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",t("BlockStatement")).field("handler",s(t("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[t("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[t("CatchClause")],o.emptyArray).field("finalizer",s(t("BlockStatement"),null),o.null),t("CatchClause").bases("Node").build("param","guard","body").field("param",t("Pattern")).field("guard",s(t("Expression"),null),o.null).field("body",t("BlockStatement")),t("WhileStatement").bases("Statement").build("test","body").field("test",t("Expression")).field("body",t("Statement")),t("DoWhileStatement").bases("Statement").build("body","test").field("body",t("Statement")).field("test",t("Expression")),t("ForStatement").bases("Statement").build("init","test","update","body").field("init",s(t("VariableDeclaration"),t("Expression"),null)).field("test",s(t("Expression"),null)).field("update",s(t("Expression"),null)).field("body",t("Statement")),t("ForInStatement").bases("Statement").build("left","right","body").field("left",s(t("VariableDeclaration"),t("Expression"))).field("right",t("Expression")).field("body",t("Statement")),t("DebuggerStatement").bases("Statement").build(),t("Declaration").bases("Statement"),t("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",t("Identifier")),t("FunctionExpression").bases("Function","Expression").build("id","params","body"),t("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",s("var","let","const")).field("declarations",[t("VariableDeclarator")]),t("VariableDeclarator").bases("Node").build("id","init").field("id",t("Pattern")).field("init",s(t("Expression"),null),o.null),t("Expression").bases("Node"),t("ThisExpression").bases("Expression").build(),t("ArrayExpression").bases("Expression").build("elements").field("elements",[s(t("Expression"),null)]),t("ObjectExpression").bases("Expression").build("properties").field("properties",[t("Property")]),t("Property").bases("Node").build("kind","key","value").field("kind",s("init","get","set")).field("key",s(t("Literal"),t("Identifier"))).field("value",t("Expression")),t("SequenceExpression").bases("Expression").build("expressions").field("expressions",[t("Expression")]);var u=s("-","+","!","~","typeof","void","delete");t("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",u).field("argument",t("Expression")).field("prefix",Boolean,o.true);let f=s(...l);t("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",f).field("left",t("Expression")).field("right",t("Expression"));let m=s(...c);t("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",m).field("left",s(t("Pattern"),t("MemberExpression"))).field("right",t("Expression"));var d=s("++","--");t("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",d).field("argument",t("Expression")).field("prefix",Boolean);var g=s(...p);t("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",g).field("left",t("Expression")).field("right",t("Expression")),t("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",t("Expression")).field("consequent",t("Expression")).field("alternate",t("Expression")),t("NewExpression").bases("Expression").build("callee","arguments").field("callee",t("Expression")).field("arguments",[t("Expression")]),t("CallExpression").bases("Expression").build("callee","arguments").field("callee",t("Expression")).field("arguments",[t("Expression")]),t("MemberExpression").bases("Expression").build("object","property","computed").field("object",t("Expression")).field("property",s(t("Identifier"),t("Expression"))).field("computed",Boolean,function(){var h=this.property.type;return h==="Literal"||h==="MemberExpression"||h==="BinaryExpression"}),t("Pattern").bases("Node"),t("SwitchCase").bases("Node").build("test","consequent").field("test",s(t("Expression"),null)).field("consequent",[t("Statement")]),t("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,o.false),t("Literal").bases("Expression").build("value").field("value",s(String,Boolean,null,Number,RegExp,BigInt)),t("Comment").bases("Printable").field("value",String).field("leading",Boolean,o.true).field("trailing",Boolean,o.false)}z(()=>module);function Yl(r){r.use(Jl);let n=r.use(X),e=n.Type.def,t=n.Type.or,s=r.use(ue).defaults;e("Function").field("generator",Boolean,s.false).field("expression",Boolean,s.false).field("defaults",[t(e("Expression"),null)],s.emptyArray).field("rest",t(e("Identifier"),null),s.null),e("RestElement").bases("Pattern").build("argument").field("argument",e("Pattern")).field("typeAnnotation",t(e("TypeAnnotation"),e("TSTypeAnnotation"),null),s.null),e("SpreadElementPattern").bases("Pattern").build("argument").field("argument",e("Pattern")),e("FunctionDeclaration").build("id","params","body","generator","expression").field("id",t(e("Identifier"),null)),e("FunctionExpression").build("id","params","body","generator","expression"),e("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,s.null).field("body",t(e("BlockStatement"),e("Expression"))).field("generator",!1,s.false),e("ForOfStatement").bases("Statement").build("left","right","body").field("left",t(e("VariableDeclaration"),e("Pattern"))).field("right",e("Expression")).field("body",e("Statement")),e("YieldExpression").bases("Expression").build("argument","delegate").field("argument",t(e("Expression"),null)).field("delegate",Boolean,s.false),e("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",e("Expression")).field("blocks",[e("ComprehensionBlock")]).field("filter",t(e("Expression"),null)),e("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",e("Expression")).field("blocks",[e("ComprehensionBlock")]).field("filter",t(e("Expression"),null)),e("ComprehensionBlock").bases("Node").build("left","right","each").field("left",e("Pattern")).field("right",e("Expression")).field("each",Boolean),e("Property").field("key",t(e("Literal"),e("Identifier"),e("Expression"))).field("value",t(e("Expression"),e("Pattern"))).field("method",Boolean,s.false).field("shorthand",Boolean,s.false).field("computed",Boolean,s.false),e("ObjectProperty").field("shorthand",Boolean,s.false),e("PropertyPattern").bases("Pattern").build("key","pattern").field("key",t(e("Literal"),e("Identifier"),e("Expression"))).field("pattern",e("Pattern")).field("computed",Boolean,s.false),e("ObjectPattern").bases("Pattern").build("properties").field("properties",[t(e("PropertyPattern"),e("Property"))]),e("ArrayPattern").bases("Pattern").build("elements").field("elements",[t(e("Pattern"),null)]),e("SpreadElement").bases("Node").build("argument").field("argument",e("Expression")),e("ArrayExpression").field("elements",[t(e("Expression"),e("SpreadElement"),e("RestElement"),null)]),e("NewExpression").field("arguments",[t(e("Expression"),e("SpreadElement"))]),e("CallExpression").field("arguments",[t(e("Expression"),e("SpreadElement"))]),e("AssignmentPattern").bases("Pattern").build("left","right").field("left",e("Pattern")).field("right",e("Expression")),e("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",t("constructor","method","get","set")).field("key",e("Expression")).field("value",e("Function")).field("computed",Boolean,s.false).field("static",Boolean,s.false);let i=t(e("MethodDefinition"),e("VariableDeclarator"),e("ClassPropertyDefinition"),e("ClassProperty"),e("StaticBlock"));e("ClassProperty").bases("Declaration").build("key").field("key",t(e("Literal"),e("Identifier"),e("Expression"))).field("computed",Boolean,s.false),e("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",i),e("ClassBody").bases("Declaration").build("body").field("body",[i]),e("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",t(e("Identifier"),null)).field("body",e("ClassBody")).field("superClass",t(e("Expression"),null),s.null),e("ClassExpression").bases("Expression").build("id","body","superClass").field("id",t(e("Identifier"),null),s.null).field("body",e("ClassBody")).field("superClass",t(e("Expression"),null),s.null),e("Super").bases("Expression").build(),e("Specifier").bases("Node"),e("ModuleSpecifier").bases("Specifier").field("local",t(e("Identifier"),null),s.null).field("id",t(e("Identifier"),null),s.null).field("name",t(e("Identifier"),null),s.null),e("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",e("Identifier")),e("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),e("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),e("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[t(e("ImportSpecifier"),e("ImportNamespaceSpecifier"),e("ImportDefaultSpecifier"))],s.emptyArray).field("source",e("Literal")).field("importKind",t("value","type"),function(){return"value"}),e("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",t(e("Declaration"),null)).field("specifiers",[e("ExportSpecifier")],s.emptyArray).field("source",t(e("Literal"),null),s.null),e("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",e("Identifier")),e("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",t(e("Declaration"),e("Expression"))),e("ExportAllDeclaration").bases("Declaration").build("source").field("source",e("Literal")),e("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",e("Expression")).field("quasi",e("TemplateLiteral")),e("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[e("TemplateElement")]).field("expressions",[e("Expression")]),e("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean),e("MetaProperty").bases("Expression").build("meta","property").field("meta",e("Identifier")).field("property",e("Identifier"))}z(()=>module);function Ql(r){r.use(Bi),r.use(Yl)}z(()=>module);function Zl(r){r.use(Ql);let e=r.use(X).Type.def,t=r.use(ue).defaults;e("Function").field("async",Boolean,t.false),e("AwaitExpression").bases("Expression").build("argument").field("argument",e("Expression"))}z(()=>module);function ec(r){r.use(Zl);let n=r.use(X),e=n.Type.def,t=n.Type.or,s=r.use(ue).defaults;e("ForOfStatement").field("await",Boolean,s.false),e("SpreadProperty").bases("Node").build("argument").field("argument",e("Expression")),e("ObjectExpression").field("properties",[t(e("Property"),e("SpreadProperty"),e("SpreadElement"))]),e("TemplateElement").field("value",{cooked:t(String,null),raw:String}),e("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",e("Pattern")),e("ObjectPattern").field("properties",[t(e("PropertyPattern"),e("Property"),e("RestElement"),e("SpreadPropertyPattern"))])}z(()=>module);function tc(r){r.use(ec);let n=r.use(X),e=n.Type.def,t=n.Type.or,s=r.use(ue).defaults;e("CatchClause").field("param",t(e("Pattern"),null),s.null)}z(()=>module);function nc(r){r.use(ji),r.use(tc);let n=r.use(X),e=n.Type.def,t=n.Type.or,i=r.use(ue).defaults;e("ImportExpression").bases("Expression").build("source").field("source",e("Expression")),e("ExportAllDeclaration").bases("Declaration").build("source","exported").field("source",e("Literal")).field("exported",t(e("Identifier"),null,void 0),i.null),e("ChainElement").bases("Node").field("optional",Boolean,i.false),e("CallExpression").bases("Expression","ChainElement"),e("MemberExpression").bases("Expression","ChainElement"),e("ChainExpression").bases("Expression").build("expression").field("expression",e("ChainElement")),e("OptionalCallExpression").bases("CallExpression").build("callee","arguments","optional").field("optional",Boolean,i.true),e("OptionalMemberExpression").bases("MemberExpression").build("object","property","computed","optional").field("optional",Boolean,i.true)}z(()=>module);function sc(r){r.use(Xl),r.use(nc)}z(()=>module);function rc(r){r.use(sc);let e=r.use(X).Type.def;e("StaticBlock").bases("Declaration").build("body").field("body",[e("Statement")])}z(()=>module);function Yt(r){r.use(rc);let n=r.use(X),e=n.Type,t=n.Type.def,s=e.or,o=r.use(ue).defaults;t("AwaitExpression").build("argument","all").field("argument",s(t("Expression"),null)).field("all",Boolean,o.false),t("Decorator").bases("Node").build("expression").field("expression",t("Expression")),t("Property").field("decorators",s([t("Decorator")],null),o.null),t("MethodDefinition").field("decorators",s([t("Decorator")],null),o.null),t("PrivateName").bases("Expression","Pattern").build("id").field("id",t("Identifier")),t("ClassPrivateProperty").bases("ClassProperty").build("key","value").field("key",t("PrivateName")).field("value",s(t("Expression"),null),o.null),t("ImportAttribute").bases("Node").build("key","value").field("key",s(t("Identifier"),t("Literal"))).field("value",t("Expression")),["ImportDeclaration","ExportAllDeclaration","ExportNamedDeclaration"].forEach(a=>{t(a).field("assertions",[t("ImportAttribute")],o.emptyArray)}),t("RecordExpression").bases("Expression").build("properties").field("properties",[s(t("ObjectProperty"),t("ObjectMethod"),t("SpreadElement"))]),t("TupleExpression").bases("Expression").build("elements").field("elements",[s(t("Expression"),t("SpreadElement"),null)]),t("ModuleExpression").bases("Node").build("body").field("body",t("Program"))}z(()=>module);function ic(r){r.use(Yt);let n=r.use(X),e=n.Type.def,t=n.Type.or,s=r.use(ue).defaults;e("JSXAttribute").bases("Node").build("name","value").field("name",t(e("JSXIdentifier"),e("JSXNamespacedName"))).field("value",t(e("Literal"),e("JSXExpressionContainer"),e("JSXElement"),e("JSXFragment"),null),s.null),e("JSXIdentifier").bases("Identifier").build("name").field("name",String),e("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",e("JSXIdentifier")).field("name",e("JSXIdentifier")),e("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",t(e("JSXIdentifier"),e("JSXMemberExpression"))).field("property",e("JSXIdentifier")).field("computed",Boolean,s.false);let i=t(e("JSXIdentifier"),e("JSXNamespacedName"),e("JSXMemberExpression"));e("JSXSpreadAttribute").bases("Node").build("argument").field("argument",e("Expression"));let o=[t(e("JSXAttribute"),e("JSXSpreadAttribute"))];e("JSXExpressionContainer").bases("Expression").build("expression").field("expression",t(e("Expression"),e("JSXEmptyExpression")));let a=[t(e("JSXText"),e("JSXExpressionContainer"),e("JSXSpreadChild"),e("JSXElement"),e("JSXFragment"),e("Literal"))];e("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",e("JSXOpeningElement")).field("closingElement",t(e("JSXClosingElement"),null),s.null).field("children",a,s.emptyArray).field("name",i,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),e("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",i).field("attributes",o,s.emptyArray).field("selfClosing",Boolean,s.false),e("JSXClosingElement").bases("Node").build("name").field("name",i),e("JSXFragment").bases("Expression").build("openingFragment","closingFragment","children").field("openingFragment",e("JSXOpeningFragment")).field("closingFragment",e("JSXClosingFragment")).field("children",a,s.emptyArray),e("JSXOpeningFragment").bases("Node").build(),e("JSXClosingFragment").bases("Node").build(),e("JSXText").bases("Literal").build("value","raw").field("value",String).field("raw",String,function(){return this.value}),e("JSXEmptyExpression").bases("Node").build(),e("JSXSpreadChild").bases("Node").build("expression").field("expression",e("Expression"))}z(()=>module);function Vi(r){var n=r.use(X),e=n.Type.def,t=n.Type.or,s=r.use(ue).defaults,i=t(e("TypeAnnotation"),e("TSTypeAnnotation"),null),o=t(e("TypeParameterDeclaration"),e("TSTypeParameterDeclaration"),null);e("Identifier").field("typeAnnotation",i,s.null),e("ObjectPattern").field("typeAnnotation",i,s.null),e("Function").field("returnType",i,s.null).field("typeParameters",o,s.null),e("ClassProperty").build("key","value","typeAnnotation","static").field("value",t(e("Expression"),null)).field("static",Boolean,s.false).field("typeAnnotation",i,s.null),["ClassDeclaration","ClassExpression"].forEach(a=>{e(a).field("typeParameters",o,s.null).field("superTypeParameters",t(e("TypeParameterInstantiation"),e("TSTypeParameterInstantiation"),null),s.null).field("implements",t([e("ClassImplements")],[e("TSExpressionWithTypeArguments")]),s.emptyArray)})}z(()=>module);function zi(r){r.use(Yt),r.use(Vi);let n=r.use(X),e=n.Type.def,t=n.Type.or,s=r.use(ue).defaults;e("Flow").bases("Node"),e("FlowType").bases("Flow"),e("AnyTypeAnnotation").bases("FlowType").build(),e("EmptyTypeAnnotation").bases("FlowType").build(),e("MixedTypeAnnotation").bases("FlowType").build(),e("VoidTypeAnnotation").bases("FlowType").build(),e("SymbolTypeAnnotation").bases("FlowType").build(),e("NumberTypeAnnotation").bases("FlowType").build(),e("BigIntTypeAnnotation").bases("FlowType").build(),e("NumberLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),e("NumericLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),e("BigIntLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",null).field("raw",String),e("StringTypeAnnotation").bases("FlowType").build(),e("StringLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",String).field("raw",String),e("BooleanTypeAnnotation").bases("FlowType").build(),e("BooleanLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Boolean).field("raw",String),e("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",e("FlowType")),e("NullableTypeAnnotation").bases("FlowType").build("typeAnnotation").field("typeAnnotation",e("FlowType")),e("NullLiteralTypeAnnotation").bases("FlowType").build(),e("NullTypeAnnotation").bases("FlowType").build(),e("ThisTypeAnnotation").bases("FlowType").build(),e("ExistsTypeAnnotation").bases("FlowType").build(),e("ExistentialTypeParam").bases("FlowType").build(),e("FunctionTypeAnnotation").bases("FlowType").build("params","returnType","rest","typeParameters").field("params",[e("FunctionTypeParam")]).field("returnType",e("FlowType")).field("rest",t(e("FunctionTypeParam"),null)).field("typeParameters",t(e("TypeParameterDeclaration"),null)),e("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",t(e("Identifier"),null)).field("typeAnnotation",e("FlowType")).field("optional",Boolean),e("ArrayTypeAnnotation").bases("FlowType").build("elementType").field("elementType",e("FlowType")),e("ObjectTypeAnnotation").bases("FlowType").build("properties","indexers","callProperties").field("properties",[t(e("ObjectTypeProperty"),e("ObjectTypeSpreadProperty"))]).field("indexers",[e("ObjectTypeIndexer")],s.emptyArray).field("callProperties",[e("ObjectTypeCallProperty")],s.emptyArray).field("inexact",t(Boolean,void 0),s.undefined).field("exact",Boolean,s.false).field("internalSlots",[e("ObjectTypeInternalSlot")],s.emptyArray),e("Variance").bases("Node").build("kind").field("kind",t("plus","minus"));let i=t(e("Variance"),"plus","minus",null);e("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",t(e("Literal"),e("Identifier"))).field("value",e("FlowType")).field("optional",Boolean).field("variance",i,s.null),e("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",e("Identifier")).field("key",e("FlowType")).field("value",e("FlowType")).field("variance",i,s.null).field("static",Boolean,s.false),e("ObjectTypeCallProperty").bases("Node").build("value").field("value",e("FunctionTypeAnnotation")).field("static",Boolean,s.false),e("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",t(e("Identifier"),e("QualifiedTypeIdentifier"))).field("id",e("Identifier")),e("GenericTypeAnnotation").bases("FlowType").build("id","typeParameters").field("id",t(e("Identifier"),e("QualifiedTypeIdentifier"))).field("typeParameters",t(e("TypeParameterInstantiation"),null)),e("MemberTypeAnnotation").bases("FlowType").build("object","property").field("object",e("Identifier")).field("property",t(e("MemberTypeAnnotation"),e("GenericTypeAnnotation"))),e("IndexedAccessType").bases("FlowType").build("objectType","indexType").field("objectType",e("FlowType")).field("indexType",e("FlowType")),e("OptionalIndexedAccessType").bases("FlowType").build("objectType","indexType","optional").field("objectType",e("FlowType")).field("indexType",e("FlowType")).field("optional",Boolean),e("UnionTypeAnnotation").bases("FlowType").build("types").field("types",[e("FlowType")]),e("IntersectionTypeAnnotation").bases("FlowType").build("types").field("types",[e("FlowType")]),e("TypeofTypeAnnotation").bases("FlowType").build("argument").field("argument",e("FlowType")),e("ObjectTypeSpreadProperty").bases("Node").build("argument").field("argument",e("FlowType")),e("ObjectTypeInternalSlot").bases("Node").build("id","value","optional","static","method").field("id",e("Identifier")).field("value",e("FlowType")).field("optional",Boolean).field("static",Boolean).field("method",Boolean),e("TypeParameterDeclaration").bases("Node").build("params").field("params",[e("TypeParameter")]),e("TypeParameterInstantiation").bases("Node").build("params").field("params",[e("FlowType")]),e("TypeParameter").bases("FlowType").build("name","variance","bound","default").field("name",String).field("variance",i,s.null).field("bound",t(e("TypeAnnotation"),null),s.null).field("default",t(e("FlowType"),null),s.null),e("ClassProperty").field("variance",i,s.null),e("ClassImplements").bases("Node").build("id").field("id",e("Identifier")).field("superClass",t(e("Expression"),null),s.null).field("typeParameters",t(e("TypeParameterInstantiation"),null),s.null),e("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",e("ObjectTypeAnnotation")).field("extends",t([e("InterfaceExtends")],null),s.null),e("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterDeclaration"),null),s.null).field("body",e("ObjectTypeAnnotation")).field("extends",[e("InterfaceExtends")]),e("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),e("InterfaceExtends").bases("Node").build("id").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterInstantiation"),null),s.null),e("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterDeclaration"),null)).field("right",e("FlowType")),e("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),e("OpaqueType").bases("Declaration").build("id","typeParameters","impltype","supertype").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterDeclaration"),null)).field("impltype",e("FlowType")).field("supertype",t(e("FlowType"),null)),e("DeclareOpaqueType").bases("OpaqueType").build("id","typeParameters","supertype").field("impltype",t(e("FlowType"),null)),e("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",e("Expression")).field("typeAnnotation",e("TypeAnnotation")),e("TupleTypeAnnotation").bases("FlowType").build("types").field("types",[e("FlowType")]),e("DeclareVariable").bases("Statement").build("id").field("id",e("Identifier")),e("DeclareFunction").bases("Statement").build("id").field("id",e("Identifier")).field("predicate",t(e("FlowPredicate"),null),s.null),e("DeclareClass").bases("InterfaceDeclaration").build("id"),e("DeclareModule").bases("Statement").build("id","body").field("id",t(e("Identifier"),e("Literal"))).field("body",e("BlockStatement")),e("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",e("TypeAnnotation")),e("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",t(e("DeclareVariable"),e("DeclareFunction"),e("DeclareClass"),e("FlowType"),e("TypeAlias"),e("DeclareOpaqueType"),e("InterfaceDeclaration"),null)).field("specifiers",[t(e("ExportSpecifier"),e("ExportBatchSpecifier"))],s.emptyArray).field("source",t(e("Literal"),null),s.null),e("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",t(e("Literal"),null),s.null),e("ImportDeclaration").field("importKind",t("value","type","typeof"),()=>"value"),e("FlowPredicate").bases("Flow"),e("InferredPredicate").bases("FlowPredicate").build(),e("DeclaredPredicate").bases("FlowPredicate").build("value").field("value",e("Expression")),e("Function").field("predicate",t(e("FlowPredicate"),null),s.null),e("CallExpression").field("typeArguments",t(null,e("TypeParameterInstantiation")),s.null),e("NewExpression").field("typeArguments",t(null,e("TypeParameterInstantiation")),s.null),e("EnumDeclaration").bases("Declaration").build("id","body").field("id",e("Identifier")).field("body",t(e("EnumBooleanBody"),e("EnumNumberBody"),e("EnumStringBody"),e("EnumSymbolBody"))),e("EnumBooleanBody").build("members","explicitType").field("members",[e("EnumBooleanMember")]).field("explicitType",Boolean),e("EnumNumberBody").build("members","explicitType").field("members",[e("EnumNumberMember")]).field("explicitType",Boolean),e("EnumStringBody").build("members","explicitType").field("members",t([e("EnumStringMember")],[e("EnumDefaultedMember")])).field("explicitType",Boolean),e("EnumSymbolBody").build("members").field("members",[e("EnumDefaultedMember")]),e("EnumBooleanMember").build("id","init").field("id",e("Identifier")).field("init",t(e("Literal"),Boolean)),e("EnumNumberMember").build("id","init").field("id",e("Identifier")).field("init",e("Literal")),e("EnumStringMember").build("id","init").field("id",e("Identifier")).field("init",e("Literal")),e("EnumDefaultedMember").build("id").field("id",e("Identifier"))}z(()=>module);function oc(r){r.use(Yt);var n=r.use(X),e=r.use(ue).defaults,t=n.Type.def,s=n.Type.or;t("VariableDeclaration").field("declarations",[s(t("VariableDeclarator"),t("Identifier"))]),t("Property").field("value",s(t("Expression"),t("Pattern"))),t("ArrayPattern").field("elements",[s(t("Pattern"),t("SpreadElement"),null)]),t("ObjectPattern").field("properties",[s(t("Property"),t("PropertyPattern"),t("SpreadPropertyPattern"),t("SpreadProperty"))]),t("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),t("ExportBatchSpecifier").bases("Specifier").build(),t("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",s(t("Declaration"),t("Expression"),null)).field("specifiers",[s(t("ExportSpecifier"),t("ExportBatchSpecifier"))],e.emptyArray).field("source",s(t("Literal"),null),e.null),t("Block").bases("Comment").build("value","leading","trailing"),t("Line").bases("Comment").build("value","leading","trailing")}z(()=>module);function $i(r){r.use(Yt);let n=r.use(X),e=r.use(ue).defaults,t=n.Type.def,s=n.Type.or,{undefined:i}=n.builtInTypes;t("Noop").bases("Statement").build(),t("DoExpression").bases("Expression").build("body").field("body",[t("Statement")]),t("BindExpression").bases("Expression").build("object","callee").field("object",s(t("Expression"),null)).field("callee",t("Expression")),t("ParenthesizedExpression").bases("Expression").build("expression").field("expression",t("Expression")),t("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",t("Identifier")),t("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",t("Identifier")),t("CommentBlock").bases("Comment").build("value","leading","trailing"),t("CommentLine").bases("Comment").build("value","leading","trailing"),t("Directive").bases("Node").build("value").field("value",t("DirectiveLiteral")),t("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,e["use strict"]),t("InterpreterDirective").bases("Node").build("value").field("value",String),t("BlockStatement").bases("Statement").build("body").field("body",[t("Statement")]).field("directives",[t("Directive")],e.emptyArray),t("Program").bases("Node").build("body").field("body",[t("Statement")]).field("directives",[t("Directive")],e.emptyArray).field("interpreter",s(t("InterpreterDirective"),null),e.null);function o(p=String,u){return["extra",{rawValue:p,raw:String},function(){let m=n.getFieldValue(this,"value");return{rawValue:m,raw:u?u(m):String(m)}}]}t("StringLiteral").bases("Literal").build("value").field("value",String).field(...o(String,p=>JSON.stringify(p))),t("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",s(String,null),e.null).field(...o(Number)),t("BigIntLiteral").bases("Literal").build("value").field("value",s(String,Number)).field(...o(String,p=>p+"n")),t("DecimalLiteral").bases("Literal").build("value").field("value",String).field(...o(String,p=>p+"m")),t("NullLiteral").bases("Literal").build().field("value",null,e.null),t("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),t("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String).field("value",RegExp,function(){return new RegExp(this.pattern,this.flags)}).field(...o(s(RegExp,i),p=>`/${p.pattern}/${p.flags||""}`)).field("regex",{pattern:String,flags:String},function(){return{pattern:this.pattern,flags:this.flags}});var a=s(t("Property"),t("ObjectMethod"),t("ObjectProperty"),t("SpreadProperty"),t("SpreadElement"));t("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),t("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",s("method","get","set")).field("key",s(t("Literal"),t("Identifier"),t("Expression"))).field("params",[t("Pattern")]).field("body",t("BlockStatement")).field("computed",Boolean,e.false).field("generator",Boolean,e.false).field("async",Boolean,e.false).field("accessibility",s(t("Literal"),null),e.null).field("decorators",s([t("Decorator")],null),e.null),t("ObjectProperty").bases("Node").build("key","value").field("key",s(t("Literal"),t("Identifier"),t("Expression"))).field("value",s(t("Expression"),t("Pattern"))).field("accessibility",s(t("Literal"),null),e.null).field("computed",Boolean,e.false);var l=s(t("MethodDefinition"),t("VariableDeclarator"),t("ClassPropertyDefinition"),t("ClassProperty"),t("ClassPrivateProperty"),t("ClassMethod"),t("ClassPrivateMethod"),t("ClassAccessorProperty"),t("StaticBlock"));t("ClassBody").bases("Declaration").build("body").field("body",[l]),t("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("key",s(t("Literal"),t("Identifier"),t("Expression"))),t("ClassPrivateMethod").bases("Declaration","Function").build("key","params","body","kind","computed","static").field("key",t("PrivateName")),t("ClassAccessorProperty").bases("Declaration").build("key","value","decorators","computed","static").field("key",s(t("Literal"),t("Identifier"),t("PrivateName"),t("Expression"))).field("value",s(t("Expression"),null),e.null),["ClassMethod","ClassPrivateMethod"].forEach(p=>{t(p).field("kind",s("get","set","method","constructor"),()=>"method").field("body",t("BlockStatement")).field("access",s("public","private","protected",null),e.null)}),["ClassMethod","ClassPrivateMethod","ClassAccessorProperty"].forEach(p=>{t(p).field("computed",Boolean,e.false).field("static",Boolean,e.false).field("abstract",Boolean,e.false).field("accessibility",s("public","private","protected",null),e.null).field("decorators",s([t("Decorator")],null),e.null).field("definite",Boolean,e.false).field("optional",Boolean,e.false).field("override",Boolean,e.false).field("readonly",Boolean,e.false)});var c=s(t("Property"),t("PropertyPattern"),t("SpreadPropertyPattern"),t("SpreadProperty"),t("ObjectProperty"),t("RestProperty"),t("RestElement"));t("ObjectPattern").bases("Pattern").build("properties").field("properties",[c]).field("decorators",s([t("Decorator")],null),e.null),t("SpreadProperty").bases("Node").build("argument").field("argument",t("Expression")),t("RestProperty").bases("Node").build("argument").field("argument",t("Expression")),t("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",s(t("VariableDeclaration"),t("Expression"))).field("right",t("Expression")).field("body",t("Statement")),t("Import").bases("Expression").build()}z(()=>module);function ac(r){let e=r.use(X).Type.def;r.use($i),r.use(zi),e("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),e("TopicReference").bases("Expression").build()}z(()=>module);function lc(r){r.use($i),r.use(Vi);var n=r.use(X),e=n.namedTypes,t=n.Type.def,s=n.Type.or,i=r.use(ue).defaults,o=n.Type.from(function(p,u){return!!(e.StringLiteral&&e.StringLiteral.check(p,u)||e.Literal&&e.Literal.check(p,u)&&typeof p.value=="string")},"StringLiteral");t("TSType").bases("Node");var a=s(t("Identifier"),t("TSQualifiedName"));t("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",a),t("TSHasOptionalTypeParameterInstantiation").field("typeParameters",s(t("TSTypeParameterInstantiation"),null),i.null),t("TSHasOptionalTypeParameters").field("typeParameters",s(t("TSTypeParameterDeclaration"),null,void 0),i.null),t("TSHasOptionalTypeAnnotation").field("typeAnnotation",s(t("TSTypeAnnotation"),null),i.null),t("TSQualifiedName").bases("Node").build("left","right").field("left",a).field("right",a),t("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TSType")).field("extra",s({parenthesized:Boolean},null),i.null),t("TSTypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TSType")),t("TSSatisfiesExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TSType")),t("TSNonNullExpression").bases("Expression","Pattern").build("expression").field("expression",t("Expression")),["TSAnyKeyword","TSBigIntKeyword","TSBooleanKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword","TSIntrinsicKeyword","TSThisType"].forEach(p=>{t(p).bases("TSType").build()}),t("TSArrayType").bases("TSType").build("elementType").field("elementType",t("TSType")),t("TSLiteralType").bases("TSType").build("literal").field("literal",s(t("NumericLiteral"),t("StringLiteral"),t("BooleanLiteral"),t("TemplateLiteral"),t("UnaryExpression"),t("BigIntLiteral"))),t("TemplateLiteral").field("expressions",s([t("Expression")],[t("TSType")])),["TSUnionType","TSIntersectionType"].forEach(p=>{t(p).bases("TSType").build("types").field("types",[t("TSType")])}),t("TSConditionalType").bases("TSType").build("checkType","extendsType","trueType","falseType").field("checkType",t("TSType")).field("extendsType",t("TSType")).field("trueType",t("TSType")).field("falseType",t("TSType")),t("TSInferType").bases("TSType").build("typeParameter").field("typeParameter",t("TSTypeParameter")),t("TSParenthesizedType").bases("TSType").build("typeAnnotation").field("typeAnnotation",t("TSType"));var l=[s(t("Identifier"),t("RestElement"),t("ArrayPattern"),t("ObjectPattern"))];["TSFunctionType","TSConstructorType"].forEach(p=>{t(p).bases("TSType","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters").field("parameters",l)}),t("TSDeclareFunction").bases("Declaration","TSHasOptionalTypeParameters").build("id","params","returnType").field("declare",Boolean,i.false).field("async",Boolean,i.false).field("generator",Boolean,i.false).field("id",s(t("Identifier"),null),i.null).field("params",[t("Pattern")]).field("returnType",s(t("TSTypeAnnotation"),t("Noop"),null),i.null),t("TSDeclareMethod").bases("Declaration","TSHasOptionalTypeParameters").build("key","params","returnType").field("async",Boolean,i.false).field("generator",Boolean,i.false).field("params",[t("Pattern")]).field("abstract",Boolean,i.false).field("accessibility",s("public","private","protected",void 0),i.undefined).field("static",Boolean,i.false).field("computed",Boolean,i.false).field("optional",Boolean,i.false).field("key",s(t("Identifier"),t("StringLiteral"),t("NumericLiteral"),t("Expression"))).field("kind",s("get","set","method","constructor"),function(){return"method"}).field("access",s("public","private","protected",void 0),i.undefined).field("decorators",s([t("Decorator")],null),i.null).field("returnType",s(t("TSTypeAnnotation"),t("Noop"),null),i.null),t("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",s(Boolean,"+","-"),i.false).field("typeParameter",t("TSTypeParameter")).field("optional",s(Boolean,"+","-"),i.false).field("typeAnnotation",s(t("TSType"),null),i.null),t("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[s(t("TSType"),t("TSNamedTupleMember"))]),t("TSNamedTupleMember").bases("TSType").build("label","elementType","optional").field("label",t("Identifier")).field("optional",Boolean,i.false).field("elementType",t("TSType")),t("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation",t("TSType")),t("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation",t("TSType")),t("TSIndexedAccessType").bases("TSType").build("objectType","indexType").field("objectType",t("TSType")).field("indexType",t("TSType")),t("TSTypeOperator").bases("TSType").build("operator").field("operator",String).field("typeAnnotation",t("TSType")),t("TSTypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",s(t("TSType"),t("TSTypeAnnotation"))),t("TSIndexSignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",[t("Identifier")]).field("readonly",Boolean,i.false),t("TSPropertySignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("key","typeAnnotation","optional").field("key",t("Expression")).field("computed",Boolean,i.false).field("readonly",Boolean,i.false).field("optional",Boolean,i.false).field("initializer",s(t("Expression"),null),i.null),t("TSMethodSignature").bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("key","parameters","typeAnnotation").field("key",t("Expression")).field("computed",Boolean,i.false).field("optional",Boolean,i.false).field("parameters",l),t("TSTypePredicate").bases("TSTypeAnnotation","TSType").build("parameterName","typeAnnotation","asserts").field("parameterName",s(t("Identifier"),t("TSThisType"))).field("typeAnnotation",s(t("TSTypeAnnotation"),null),i.null).field("asserts",Boolean,i.false),["TSCallSignatureDeclaration","TSConstructSignatureDeclaration"].forEach(p=>{t(p).bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",l)}),t("TSEnumMember").bases("Node").build("id","initializer").field("id",s(t("Identifier"),o)).field("initializer",s(t("Expression"),null),i.null),t("TSTypeQuery").bases("TSType").build("exprName").field("exprName",s(a,t("TSImportType")));var c=s(t("TSCallSignatureDeclaration"),t("TSConstructSignatureDeclaration"),t("TSIndexSignature"),t("TSMethodSignature"),t("TSPropertySignature"));t("TSTypeLiteral").bases("TSType").build("members").field("members",[c]),t("TSTypeParameter").bases("Identifier").build("name","constraint","default").field("name",s(t("Identifier"),String)).field("constraint",s(t("TSType"),void 0),i.undefined).field("default",s(t("TSType"),void 0),i.undefined),t("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",t("TSType")).field("expression",t("Expression")).field("extra",s({parenthesized:Boolean},null),i.null),t("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params",[t("TSTypeParameter")]),t("TSInstantiationExpression").bases("Expression","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",t("Expression")),t("TSTypeParameterInstantiation").bases("Node").build("params").field("params",[t("TSType")]),t("TSEnumDeclaration").bases("Declaration").build("id","members").field("id",t("Identifier")).field("const",Boolean,i.false).field("declare",Boolean,i.false).field("members",[t("TSEnumMember")]).field("initializer",s(t("Expression"),null),i.null),t("TSTypeAliasDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","typeAnnotation").field("id",t("Identifier")).field("declare",Boolean,i.false).field("typeAnnotation",t("TSType")),t("TSModuleBlock").bases("Node").build("body").field("body",[t("Statement")]),t("TSModuleDeclaration").bases("Declaration").build("id","body").field("id",s(o,a)).field("declare",Boolean,i.false).field("global",Boolean,i.false).field("body",s(t("TSModuleBlock"),t("TSModuleDeclaration"),null),i.null),t("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",o).field("qualifier",s(a,void 0),i.undefined),t("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",t("Identifier")).field("isExport",Boolean,i.false).field("moduleReference",s(a,t("TSExternalModuleReference"))),t("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",o),t("TSExportAssignment").bases("Statement").build("expression").field("expression",t("Expression")),t("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id",t("Identifier")),t("TSInterfaceBody").bases("Node").build("body").field("body",[c]),t("TSExpressionWithTypeArguments").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",a),t("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",a).field("declare",Boolean,i.false).field("extends",s([t("TSExpressionWithTypeArguments")],null),i.null).field("body",t("TSInterfaceBody")),t("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",s("public","private","protected",void 0),i.undefined).field("readonly",Boolean,i.false).field("parameter",s(t("Identifier"),t("AssignmentPattern"))),t("ClassProperty").field("access",s("public","private","protected",void 0),i.undefined),t("ClassAccessorProperty").bases("Declaration","TSHasOptionalTypeAnnotation"),t("ClassBody").field("body",[s(t("MethodDefinition"),t("VariableDeclarator"),t("ClassPropertyDefinition"),t("ClassProperty"),t("ClassPrivateProperty"),t("ClassAccessorProperty"),t("ClassMethod"),t("ClassPrivateMethod"),t("StaticBlock"),t("TSDeclareMethod"),c)])}z(()=>module);var Se;Se||(Se={});var{astNodesAreEquivalent:_u,builders:Qt,builtInTypes:Ie,defineMethod:Bu,eachField:ju,finalize:Vu,getBuilderName:zu,getFieldNames:cc,getFieldValue:Be,getSupertypeNames:$u,namedTypes:pc,NodePath:uc,Path:qu,PathVisitor:Hu,someField:dc,Type:Gu,use:Wu,visit:Ku}=Wl([Yt,ic,zi,oc,ac,lc]);Object.assign(Se,pc);var Tn=Se,xi=Fn.default.SourceMapConsumer,fc=Fn.default.SourceMapGenerator,qi=Object.prototype.hasOwnProperty;function mc(){return`
11853
- `}function Pi(r,n,e){return r&&qi.call(r,n)?r[n]:e}function hc(...r){let n={},e=r.length;for(let t=0;t<e;++t){let s=Object.keys(r[t]),i=s.length;for(let o=0;o<i;++o)n[s[o]]=!0}return n}function j(r,n){return r.line-n.line||r.column-n.column}function He(r){return{line:r.line,column:r.column}}function bc(r,n){if(r){if(!n)return r}else return n||null;let e=new xi(r),t=new xi(n),s=new fc({file:n.file,sourceRoot:n.sourceRoot}),i={};return t.eachMapping(function(o){let a=e.originalPositionFor({line:o.originalLine,column:o.originalColumn}),l=a.source;if(l===null)return;s.addMapping({source:l,original:He(a),generated:{line:o.generatedLine,column:o.generatedColumn},name:o.name});let c=e.sourceContentFor(l);c&&!qi.call(i,l)&&(i[l]=c,s.setSourceContent(l,c))}),s.toJSON()}function Hi(r,n){if(!r.loc)return null;let e={start:r.loc.start,end:r.loc.end};function t(s){Ks(e,s.loc)}return r.declaration&&r.declaration.decorators&&Un(r)&&r.declaration.decorators.forEach(t),j(e.start,e.end)<0&&(e.start=He(e.start),n.skipSpaces(e.start,!1,!0),j(e.start,e.end)<0&&(e.end=He(e.end),n.skipSpaces(e.end,!0,!0))),r.comments&&r.comments.forEach(t),e}function Ks(r,n){r&&n&&(j(n.start,r.start)<0&&(r.start=n.start),j(r.end,n.end)<0&&(r.end=n.end))}function rr(r,n){let e=r.loc;if(e&&(e.start.line<1&&(e.start.line=1),e.end.line<1&&(e.end.line=1)),r.type==="File"&&(e.start=n.firstPos(),e.end=n.lastPos()),gc(r,n),yc(r,n),e&&r.decorators)r.decorators.forEach(function(t){Ks(e,t.loc)});else if(r.declaration&&Un(r)){r.declaration.loc=null;let t=r.declaration.decorators;t&&t.forEach(function(s){Ks(e,s.loc)})}else if(Tn.MethodDefinition&&Tn.MethodDefinition.check(r)||Tn.Property.check(r)&&(r.method||r.shorthand))r.value.loc=null,Tn.FunctionExpression.check(r.value)&&(r.value.id=null);else if(r.type==="ObjectTypeProperty"){let t=r.loc,s=t&&t.end;s&&(s=He(s),n.prevPos(s)&&n.charAt(s)===","&&(s=n.skipSpaces(s,!0,!0))&&(t.end=s))}}function gc(r,n){if(r.type!=="ForStatement")return;function e(t){let s=t&&t.loc,i=s&&s.start,o=s&&He(s.end);for(;i&&o&&j(i,o)<0&&(n.prevPos(o),n.charAt(o)===";");)s.end.line=o.line,s.end.column=o.column}e(r.init),e(r.test),e(r.update)}function yc(r,n){if(r.type==="TemplateLiteral"&&r.quasis.length!==0){if(r.loc){let e=He(r.loc.start),t=r.quasis[0];j(t.loc.start,e)<0&&(t.loc.start=e);let s=He(r.loc.end),i=r.quasis[r.quasis.length-1];j(s,i.loc.end)<0&&(i.loc.end=s)}r.expressions.forEach(function(e,t){let s=n.skipSpaces(e.loc.start,!0,!1);if(n.prevPos(s)&&n.charAt(s)==="{"&&n.prevPos(s)&&n.charAt(s)==="$"){let o=r.quasis[t];j(s,o.loc.end)<0&&(o.loc.end=s)}let i=n.skipSpaces(e.loc.end,!1,!1);if(n.charAt(i)==="}"){let o=r.quasis[t+1];j(o.loc.start,i)<0&&(o.loc.start=i)}})}}function Un(r){if(r)switch(r.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function Gi(r){let n=r.getParentNode();return r.getName()==="declaration"&&Un(n)?n:null}function Gt(r,n){let e=r.trailingComma;return typeof e=="object"?!!e[n]:!!e}var Xs={tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:mc(),wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:!1,tolerant:!0,quote:null,trailingComma:!1,arrayBracketSpacing:!1,objectCurlySpacing:!0,arrowParensAlways:!1,flowObjectCommas:!0,tokens:!0},vc=Xs.hasOwnProperty;function Rn(r){let n=r||Xs;function e(t){return vc.call(n,t)?n[t]:Xs[t]}return{tabWidth:+e("tabWidth"),useTabs:!!e("useTabs"),reuseWhitespace:!!e("reuseWhitespace"),lineTerminator:e("lineTerminator"),wrapColumn:Math.max(e("wrapColumn"),0),sourceFileName:e("sourceFileName"),sourceMapName:e("sourceMapName"),sourceRoot:e("sourceRoot"),inputSourceMap:e("inputSourceMap"),parser:e("esprima")||e("parser"),range:e("range"),tolerant:e("tolerant"),quote:e("quote"),trailingComma:e("trailingComma"),arrayBracketSpacing:e("arrayBracketSpacing"),objectCurlySpacing:e("objectCurlySpacing"),arrowParensAlways:e("arrowParensAlways"),flowObjectCommas:e("flowObjectCommas"),tokens:!!e("tokens")}}var Js=class r{constructor(n,e,t=e){this.sourceLines=n,this.sourceLoc=e,this.targetLoc=t}slice(n,e,t=n.lastPos()){let s=this.sourceLines,i=this.sourceLoc,o=this.targetLoc;function a(l){let c=i[l],p=o[l],u=e;return l==="end"&&(u=t),xc(s,c,n,p,u)}if(j(e,o.start)<=0)if(j(o.end,t)<=0)o={start:qe(o.start,e.line,e.column),end:qe(o.end,e.line,e.column)};else{if(j(t,o.start)<=0)return null;i={start:i.start,end:a("end")},o={start:qe(o.start,e.line,e.column),end:qe(t,e.line,e.column)}}else{if(j(o.end,e)<=0)return null;j(o.end,t)<=0?(i={start:a("start"),end:i.end},o={start:{line:1,column:0},end:qe(o.end,e.line,e.column)}):(i={start:a("start"),end:a("end")},o={start:{line:1,column:0},end:qe(t,e.line,e.column)})}return new r(this.sourceLines,i,o)}add(n,e){return new r(this.sourceLines,this.sourceLoc,{start:Ti(this.targetLoc.start,n,e),end:Ti(this.targetLoc.end,n,e)})}subtract(n,e){return new r(this.sourceLines,this.sourceLoc,{start:qe(this.targetLoc.start,n,e),end:qe(this.targetLoc.end,n,e)})}indent(n,e=!1,t=!1){if(n===0)return this;let s=this.targetLoc,i=s.start.line,o=s.end.line;if(e&&i===1&&o===1)return this;if(s={start:s.start,end:s.end},!e||i>1){let a=s.start.column+n;s.start={line:i,column:t?Math.max(0,a):a}}if(!e||o>1){let a=s.end.column+n;s.end={line:o,column:t?Math.max(0,a):a}}return new r(this.sourceLines,this.sourceLoc,s)}};function Ti(r,n,e){return{line:r.line+n-1,column:r.line===1?r.column+e:r.column}}function qe(r,n,e){return{line:r.line-n+1,column:r.line===n?r.column-e:r.column}}function xc(r,n,e,t,s){let i=j(t,s);if(i===0)return n;let o,a;if(i<0){o=r.skipSpaces(n)||r.lastPos(),a=e.skipSpaces(t)||e.lastPos();let l=s.line-a.line;for(o.line+=l,a.line+=l,l>0&&(o.column=0,a.column=0);j(a,s)<0&&e.nextPos(a,!0););}else{o=r.skipSpaces(n,!0)||r.firstPos(),a=e.skipSpaces(t,!0)||e.firstPos();let l=s.line-a.line;for(o.line+=l,a.line+=l,l<0&&(o.column=r.getLineLength(o.line),a.column=e.getLineLength(a.line));j(s,a)<0&&e.prevPos(a,!0););}return o}var Pc=Object.defineProperty,Tc=(r,n,e)=>n in r?Pc(r,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[n]=e,Bt=(r,n,e)=>(Tc(r,typeof n!="symbol"?n+"":n,e),e),gt=class r{constructor(n,e=null){this.infos=n,Bt(this,"length"),Bt(this,"name"),Bt(this,"mappings",[]),Bt(this,"cachedSourceMap",null),Bt(this,"cachedTabWidth"),this.length=n.length,this.name=e||null,this.name&&this.mappings.push(new Js(this,{start:this.firstPos(),end:this.lastPos()}))}toString(n){return this.sliceString(this.firstPos(),this.lastPos(),n)}getSourceMap(n,e){if(!n)return null;let t=this;function s(a){return a=a||{},a.file=n,e&&(a.sourceRoot=e),a}if(t.cachedSourceMap)return s(t.cachedSourceMap.toJSON());let i=new Fn.default.SourceMapGenerator(s()),o={};return t.mappings.forEach(function(a){let l=a.sourceLines.skipSpaces(a.sourceLoc.start)||a.sourceLines.lastPos(),c=t.skipSpaces(a.targetLoc.start)||t.lastPos();for(;j(l,a.sourceLoc.end)<0&&j(c,a.targetLoc.end)<0;){a.sourceLines.charAt(l),t.charAt(c);let p=a.sourceLines.name;if(i.addMapping({source:p,original:{line:l.line,column:l.column},generated:{line:c.line,column:c.column}}),!Ys.call(o,p)){let u=a.sourceLines.toString();i.setSourceContent(p,u),o[p]=u}t.nextPos(c,!0),a.sourceLines.nextPos(l,!0)}}),t.cachedSourceMap=i,i.toJSON()}bootstrapCharAt(n){let e=n.line,t=n.column,s=this.toString().split(Qs),i=s[e-1];return typeof i>"u"?"":t===i.length&&e<s.length?`
12845
+ `}],utils:[],composables:[],plugins:[]}];import{join as Pp}from"path";import{loadConfig as Tp}from"c12";import Pe from"fs-extra";import wo from"kleur";import wp from"lodash";import{promises as Ws}from"node:fs";var Fn=rn(as(),1),Oi=rn($s(),1);function ue(r){var n=r.use(X),e=n.Type,t=n.builtInTypes,s=t.number;function i(c){return e.from(p=>s.check(p)&&p>=c,s+" >= "+c)}let o={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){},"use strict":function(){return"use strict"}};var a=e.or(t.string,t.number,t.boolean,t.null,t.undefined);let l=e.from(c=>{if(c===null)return!0;var p=typeof c;return!(p==="object"||p==="function")},a.toString());return{geq:i,defaults:o,isPrimitive:l}}function z(r){try{var n=r(),e=n.exports,t=e.default}catch{return}t&&t!==e&&typeof e=="object"&&(Object.assign(t,e,{default:t}),e.__esModule&&Object.defineProperty(t,"__esModule",{value:!0}),n.exports=t)}var Vl=Object.defineProperty,zl=(r,n,e)=>n in r?Vl(r,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[n]=e,re=(r,n,e)=>(zl(r,typeof n!="symbol"?n+"":n,e),e),Fi=Object.prototype,An=Fi.toString,ye=Fi.hasOwnProperty,Ze=class{assert(n,e){if(!this.check(n,e)){var t=sr(n);throw new Error(t+" does not match type "+this)}return!0}arrayOf(){let n=this;return new Wt(n)}},Wt=class extends Ze{constructor(n){super(),this.elemType=n,re(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(n,e){return Array.isArray(n)&&n.every(t=>this.elemType.check(t,e))}},kn=class extends Ze{constructor(n){super(),this.value=n,re(this,"kind","IdentityType")}toString(){return String(this.value)}check(n,e){let t=n===this.value;return!t&&typeof e=="function"&&e(this,n),t}},Nn=class extends Ze{constructor(n){super(),this.fields=n,re(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(n,e){return An.call(n)===An.call({})&&this.fields.every(t=>t.type.check(n[t.name],e))}},Mn=class extends Ze{constructor(n){super(),this.types=n,re(this,"kind","OrType")}toString(){return this.types.join(" | ")}check(n,e){return this.types.some(t=>t.check(n,!!e))?!0:(typeof e=="function"&&e(this,n),!1)}},Qe=class extends Ze{constructor(n,e){super(),this.name=n,this.predicate=e,re(this,"kind","PredicateType")}toString(){return this.name}check(n,e){let t=this.predicate(n,e);return!t&&typeof e=="function"&&e(this,n),t}},qt=class r{constructor(n,e){this.type=n,this.typeName=e,re(this,"baseNames",[]),re(this,"ownFields",Object.create(null)),re(this,"allSupertypes",Object.create(null)),re(this,"supertypeList",[]),re(this,"allFields",Object.create(null)),re(this,"fieldNames",[]),re(this,"finalized",!1),re(this,"buildable",!1),re(this,"buildParams",[])}isSupertypeOf(n){if(n instanceof r){if(this.finalized!==!0||n.finalized!==!0)throw new Error("");return ye.call(n.allSupertypes,this.typeName)}else throw new Error(n+" is not a Def")}checkAllFields(n,e){var t=this.allFields;if(this.finalized!==!0)throw new Error(""+this.typeName);function s(i){var o=t[i],a=o.type,l=o.getValue(n);return a.check(l,e)}return n!==null&&typeof n=="object"&&Object.keys(t).every(s)}bases(...n){var e=this.baseNames;if(this.finalized){if(n.length!==e.length)throw new Error("");for(var t=0;t<n.length;t++)if(n[t]!==e[t])throw new Error("");return this}return n.forEach(s=>{e.indexOf(s)<0&&e.push(s)}),this}},Dn=class{constructor(n,e,t,s){this.name=n,this.type=e,this.defaultFn=t,re(this,"hidden"),this.hidden=!!s}toString(){return JSON.stringify(this.name)+": "+this.type}getValue(n){var e=n[this.name];return typeof e<"u"||typeof this.defaultFn=="function"&&(e=this.defaultFn.call(n)),e}};function sr(r){return Array.isArray(r)?"["+r.map(sr).join(", ")+"]":r&&typeof r=="object"?"{ "+Object.keys(r).map(function(n){return n+": "+r[n]}).join(", ")+" }":JSON.stringify(r)}function X(r){let n={or(...S){return new Mn(S.map(I=>n.from(I)))},from(S,I){if(S instanceof Wt||S instanceof kn||S instanceof Nn||S instanceof Mn||S instanceof Qe)return S;if(S instanceof qt)return S.type;if(a.check(S)){if(S.length!==1)throw new Error("only one element type is permitted for typed arrays");return new Wt(n.from(S[0]))}if(l.check(S))return new Nn(Object.keys(S).map(F=>new Dn(F,n.from(S[F],F))));if(typeof S=="function"){var O=e.indexOf(S);if(O>=0)return t[O];if(typeof I!="string")throw new Error("missing name");return new Qe(I,S)}return new kn(S)},def(S){return ye.call(y,S)?y[S]:y[S]=new E(S)},hasDef(S){return ye.call(y,S)}};var e=[],t=[];function s(S,I){let O=An.call(I),F=new Qe(S,$=>An.call($)===O);return I&&typeof I.constructor=="function"&&(e.push(I.constructor),t.push(F)),F}let i=s("string","truthy"),o=s("function",function(){}),a=s("array",[]),l=s("object",{}),c=s("RegExp",/./),p=s("Date",new Date),u=s("number",3),f=s("boolean",!0),m=s("null",null),d=s("undefined",void 0),g=typeof BigInt=="function"?s("BigInt",BigInt(1234)):new Qe("BigInt",()=>!1),h={string:i,function:o,array:a,object:l,RegExp:c,Date:p,number:u,boolean:f,null:m,undefined:d,BigInt:g};var y=Object.create(null);function P(S){if(S&&typeof S=="object"){var I=S.type;if(typeof I=="string"&&ye.call(y,I)){var O=y[I];if(O.finalized)return O}}return null}class E extends qt{constructor(I){super(new Qe(I,(O,F)=>this.check(O,F)),I)}check(I,O){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(I===null||typeof I!="object")return!1;var F=P(I);return F?O&&F===this?this.checkAllFields(I,O):this.isSupertypeOf(F)?O?F.checkAllFields(I,O)&&this.checkAllFields(I,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields(I,O):!1}build(...I){if(this.buildParams=I,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let O=($,q,K,me)=>{if(!ye.call($,q)){var Me=this.allFields;if(!ye.call(Me,q))throw new Error(""+q);var sn=Me[q],Ko=sn.type,Ct;if(me)Ct=K;else if(sn.defaultFn)Ct=sn.defaultFn.call($);else{var Xo="no value or default function given for field "+JSON.stringify(q)+" of "+this.typeName+"("+this.buildParams.map(function(Jo){return Me[Jo]}).join(", ")+")";throw new Error(Xo)}if(!Ko.check(Ct))throw new Error(sr(Ct)+" does not match field "+sn+" of type "+this.typeName);$[q]=Ct}},F=(...$)=>{var q=$.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var K=Object.create(N);if(this.buildParams.forEach(function(me,Me){Me<q?O(K,me,$[Me],!0):O(K,me,null,!1)}),Object.keys(this.allFields).forEach(function(me){O(K,me,null,!1)}),K.type!==this.typeName)throw new Error("");return K};return F.from=$=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var q=Object.create(N);if(Object.keys(this.allFields).forEach(function(K){ye.call($,K)?O(q,K,$[K],!0):O(q,K,null,!1)}),q.type!==this.typeName)throw new Error("");return q},Object.defineProperty(C,le(this.typeName),{enumerable:!0,value:F}),this}field(I,O,F,$){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(I)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[I]=new Dn(I,n.from(O),F,$),this)}finalize(){if(!this.finalized){var I=this.allFields,O=this.allSupertypes;this.baseNames.forEach($=>{var q=y[$];if(q instanceof qt)q.finalize(),Kn(I,q.allFields),Kn(O,q.allSupertypes);else{var K="unknown supertype name "+JSON.stringify($)+" for subtype "+JSON.stringify(this.typeName);throw new Error(K)}}),Kn(I,this.ownFields),O[this.typeName]=this,this.fieldNames.length=0;for(var F in I)ye.call(I,F)&&!I[F].hidden&&this.fieldNames.push(F);Object.defineProperty(gr,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,Go(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&qo(this.typeName)}}}function x(S){if(!ye.call(y,S))throw new Error("");var I=y[S];if(I.finalized!==!0)throw new Error("");return I.supertypeList.slice(1)}function T(S){for(var I={},O=Object.keys(y),F=O.length,$=0;$<F;++$){var q=O[$],K=y[q];if(K.finalized!==!0)throw new Error(""+q);for(var me=0;me<K.supertypeList.length;++me){var Me=K.supertypeList[me];if(ye.call(S,Me)){I[q]=Me;break}}}return I}var C=Object.create(null),N={};function H(S,I){var O=N[S];return d.check(I)?delete N[S]:(o.assert(I),Object.defineProperty(N,S,{enumerable:!0,configurable:!0,value:I})),O}function le(S){return S.replace(/^[A-Z]+/,function(I){var O=I.length;switch(O){case 0:return"";case 1:return I.toLowerCase();default:return I.slice(0,O-1).toLowerCase()+I.charAt(O-1)}})}function Ee(S){return S=le(S),S.replace(/(Expression)?$/,"Statement")}var gr={};function Gn(S){var I=P(S);if(I)return I.fieldNames.slice(0);if("type"in S)throw new Error("did not recognize object of type "+JSON.stringify(S.type));return Object.keys(S)}function Wn(S,I){var O=P(S);if(O){var F=O.allFields[I];if(F)return F.getValue(S)}return S&&S[I]}function $o(S,I,O){Gn(S).forEach(function(F){I.call(this,F,Wn(S,F))},O)}function Ho(S,I,O){return Gn(S).some(function(F){return I.call(this,F,Wn(S,F))},O)}function qo(S){var I=Ee(S);if(C[I])return;var O=C[le(S)];if(!O)return;let F=function(...$){return C.expressionStatement(O.apply(C,$))};F.from=function(...$){return C.expressionStatement(O.from.apply(C,$))},C[I]=F}function Go(S,I){I.length=0,I.push(S);for(var O=Object.create(null),F=0;F<I.length;++F){S=I[F];var $=y[S];if($.finalized!==!0)throw new Error("");ye.call(O,S)&&delete I[O[S]],O[S]=F,I.push.apply(I,$.baseNames)}for(var q=0,K=q,me=I.length;K<me;++K)ye.call(I,K)&&(I[q++]=I[K]);I.length=q}function Kn(S,I){return Object.keys(I).forEach(function(O){S[O]=I[O]}),S}function Wo(){Object.keys(y).forEach(function(S){y[S].finalize()})}return{Type:n,builtInTypes:h,getSupertypeNames:x,computeSupertypeLookupTable:T,builders:C,defineMethod:H,getBuilderName:le,getStatementBuilderName:Ee,namedTypes:gr,getFieldNames:Gn,getFieldValue:Wn,eachField:$o,someField:Ho,finalize:Wo}}z(()=>module);var $l=Object.prototype,xn=$l.hasOwnProperty;function Ui(r){var n=r.use(X),e=n.builtInTypes.array,t=n.builtInTypes.number;let s=function u(f,m,d){if(!(this instanceof u))throw new Error("Path constructor cannot be invoked without 'new'");if(m){if(!(m instanceof u))throw new Error("")}else m=null,d=null;this.value=f,this.parentPath=m,this.name=d,this.__childCache=null};var i=s.prototype;function o(u){return u.__childCache||(u.__childCache=Object.create(null))}function a(u,f){var m=o(u),d=u.getValueProperty(f),g=m[f];return(!xn.call(m,f)||g.value!==d)&&(g=m[f]=new u.constructor(d,u,f)),g}i.getValueProperty=function(f){return this.value[f]},i.get=function(...f){for(var m=this,d=f.length,g=0;g<d;++g)m=a(m,f[g]);return m},i.each=function(f,m){for(var d=[],g=this.value.length,h=0,h=0;h<g;++h)xn.call(this.value,h)&&(d[h]=this.get(h));for(m=m||this,h=0;h<g;++h)xn.call(d,h)&&f.call(m,d[h])},i.map=function(f,m){var d=[];return this.each(function(g){d.push(f.call(this,g))},m),d},i.filter=function(f,m){var d=[];return this.each(function(g){f.call(this,g)&&d.push(g)},m),d};function l(){}function c(u,f,m,d){if(e.assert(u.value),f===0)return l;var g=u.value.length;if(g<1)return l;var h=arguments.length;h===2?(m=0,d=g):h===3?(m=Math.max(m,0),d=g):(m=Math.max(m,0),d=Math.min(d,g)),t.assert(m),t.assert(d);for(var y=Object.create(null),P=o(u),E=m;E<d;++E)if(xn.call(u.value,E)){var x=u.get(E);if(x.name!==E)throw new Error("");var T=E+f;x.name=T,y[T]=x,delete P[E]}return delete P.length,function(){for(var C in y){var N=y[C];if(N.name!==+C)throw new Error("");P[C]=N,u.value[C]=N.value}}}i.shift=function(){var f=c(this,-1),m=this.value.shift();return f(),m},i.unshift=function(...f){var m=c(this,f.length),d=this.value.unshift.apply(this.value,f);return m(),d},i.push=function(...f){return e.assert(this.value),delete o(this).length,this.value.push.apply(this.value,f)},i.pop=function(){e.assert(this.value);var f=o(this);return delete f[this.value.length-1],delete f.length,this.value.pop()},i.insertAt=function(f){var m=arguments.length,d=c(this,m-1,f);if(d===l&&m<=1)return this;f=Math.max(f,0);for(var g=1;g<m;++g)this.value[f+g-1]=arguments[g];return d(),this},i.insertBefore=function(...f){for(var m=this.parentPath,d=f.length,g=[this.name],h=0;h<d;++h)g.push(f[h]);return m.insertAt.apply(m,g)},i.insertAfter=function(...f){for(var m=this.parentPath,d=f.length,g=[this.name+1],h=0;h<d;++h)g.push(f[h]);return m.insertAt.apply(m,g)};function p(u){if(!(u instanceof s))throw new Error("");var f=u.parentPath;if(!f)return u;var m=f.value,d=o(f);if(m[u.name]===u.value)d[u.name]=u;else if(e.check(m)){var g=m.indexOf(u.value);g>=0&&(d[u.name=g]=u)}else m[u.name]=u.value,d[u.name]=u;if(m[u.name]!==u.value)throw new Error("");if(u.parentPath.get(u.name)!==u)throw new Error("");return u}return i.replace=function(f){var m=[],d=this.parentPath.value,g=o(this.parentPath),h=arguments.length;if(p(this),e.check(d)){for(var y=d.length,P=c(this.parentPath,h-1,this.name+1),E=[this.name,1],x=0;x<h;++x)E.push(arguments[x]);var T=d.splice.apply(d,E);if(T[0]!==this.value)throw new Error("");if(d.length!==y-1+h)throw new Error("");if(P(),h===0)delete this.value,delete g[this.name],this.__childCache=null;else{if(d[this.name]!==f)throw new Error("");for(this.value!==f&&(this.value=f,this.__childCache=null),x=0;x<h;++x)m.push(this.parentPath.get(this.name+x));if(m[0]!==this)throw new Error("")}}else if(h===1)this.value!==f&&(this.__childCache=null),this.value=d[this.name]=f,m.push(this);else if(h===0)delete d[this.name],delete this.value,this.__childCache=null;else throw new Error("Could not replace path");return m},s}z(()=>module);var dt=Object.prototype.hasOwnProperty;function Hl(r){var n=r.use(X),e=n.Type,t=n.namedTypes,s=t.Node,i=t.Expression,o=n.builtInTypes.array,a=n.builders;let l=function x(T,C){if(!(this instanceof x))throw new Error("Scope constructor cannot be invoked without 'new'");p.check(T.value)||c.assert(T.value);var N;if(C){if(!(C instanceof x))throw new Error("");N=C.depth+1}else C=null,N=0;Object.defineProperties(this,{path:{value:T},node:{value:T.value},isGlobal:{value:!C,enumerable:!0},depth:{value:N},parent:{value:C},bindings:{value:{}},types:{value:{}}})};var c=e.or(t.Program,t.Function,t.CatchClause),p=e.or(t.Function,t.ClassDeclaration,t.ClassExpression,t.InterfaceDeclaration,t.TSInterfaceDeclaration,t.TypeAlias,t.TSTypeAliasDeclaration),u=e.or(t.TypeParameter,t.TSTypeParameter);l.isEstablishedBy=function(x){return c.check(x)||p.check(x)};var f=l.prototype;f.didScan=!1,f.declares=function(x){return this.scan(),dt.call(this.bindings,x)},f.declaresType=function(x){return this.scan(),dt.call(this.types,x)},f.declareTemporary=function(x){if(x){if(!/^[a-z$_]/i.test(x))throw new Error("")}else x="t$";x+=this.depth.toString(36)+"$",this.scan();for(var T=0;this.declares(x+T);)++T;var C=x+T;return this.bindings[C]=n.builders.identifier(C)},f.injectTemporary=function(x,T){x||(x=this.declareTemporary());var C=this.path.get("body");return t.BlockStatement.check(C.value)&&(C=C.get("body")),C.unshift(a.variableDeclaration("var",[a.variableDeclarator(x,T||null)])),x},f.scan=function(x){if(x||!this.didScan){for(var T in this.bindings)delete this.bindings[T];for(var T in this.types)delete this.types[T];m(this.path,this.bindings,this.types),this.didScan=!0}},f.getBindings=function(){return this.scan(),this.bindings},f.getTypes=function(){return this.scan(),this.types};function m(x,T,C){var N=x.value;if(p.check(N)){let H=x.get("typeParameters","params");o.check(H.value)&&H.each(le=>{E(le,C)})}c.check(N)&&(t.CatchClause.check(N)?y(x.get("param"),T):d(x,T,C))}function d(x,T,C){var N=x.value;x.parent&&t.FunctionExpression.check(x.parent.node)&&x.parent.node.id&&y(x.parent.get("id"),T),N&&(o.check(N)?x.each(H=>{h(H,T,C)}):t.Function.check(N)?(x.get("params").each(H=>{y(H,T)}),h(x.get("body"),T,C),d(x.get("typeParameters"),T,C)):t.TypeAlias&&t.TypeAlias.check(N)||t.InterfaceDeclaration&&t.InterfaceDeclaration.check(N)||t.TSTypeAliasDeclaration&&t.TSTypeAliasDeclaration.check(N)||t.TSInterfaceDeclaration&&t.TSInterfaceDeclaration.check(N)?P(x.get("id"),C):t.VariableDeclarator.check(N)?(y(x.get("id"),T),h(x.get("init"),T,C)):N.type==="ImportSpecifier"||N.type==="ImportNamespaceSpecifier"||N.type==="ImportDefaultSpecifier"?y(x.get(N.local?"local":N.name?"name":"id"),T):s.check(N)&&!i.check(N)&&n.eachField(N,function(H,le){var Ee=x.get(H);if(!g(Ee,le))throw new Error("");h(Ee,T,C)}))}function g(x,T){return!!(x.value===T||Array.isArray(x.value)&&x.value.length===0&&Array.isArray(T)&&T.length===0)}function h(x,T,C){var N=x.value;if(!(!N||i.check(N)))if(t.FunctionDeclaration.check(N)&&N.id!==null)y(x.get("id"),T);else if(t.ClassDeclaration&&t.ClassDeclaration.check(N)&&N.id!==null)y(x.get("id"),T),d(x.get("typeParameters"),T,C);else if(t.InterfaceDeclaration&&t.InterfaceDeclaration.check(N)||t.TSInterfaceDeclaration&&t.TSInterfaceDeclaration.check(N))P(x.get("id"),C);else if(c.check(N)){if(t.CatchClause.check(N)&&t.Identifier.check(N.param)){var H=N.param.name,le=dt.call(T,H);d(x.get("body"),T,C),le||delete T[H]}}else d(x,T,C)}function y(x,T){var C=x.value;t.Pattern.assert(C),t.Identifier.check(C)?dt.call(T,C.name)?T[C.name].push(x):T[C.name]=[x]:t.AssignmentPattern&&t.AssignmentPattern.check(C)?y(x.get("left"),T):t.ObjectPattern&&t.ObjectPattern.check(C)?x.get("properties").each(function(N){var H=N.value;t.Pattern.check(H)?y(N,T):t.Property.check(H)||t.ObjectProperty&&t.ObjectProperty.check(H)?y(N.get("value"),T):t.SpreadProperty&&t.SpreadProperty.check(H)&&y(N.get("argument"),T)}):t.ArrayPattern&&t.ArrayPattern.check(C)?x.get("elements").each(function(N){var H=N.value;t.Pattern.check(H)?y(N,T):t.SpreadElement&&t.SpreadElement.check(H)&&y(N.get("argument"),T)}):t.PropertyPattern&&t.PropertyPattern.check(C)?y(x.get("pattern"),T):(t.SpreadElementPattern&&t.SpreadElementPattern.check(C)||t.RestElement&&t.RestElement.check(C)||t.SpreadPropertyPattern&&t.SpreadPropertyPattern.check(C))&&y(x.get("argument"),T)}function P(x,T){var C=x.value;t.Pattern.assert(C),t.Identifier.check(C)&&(dt.call(T,C.name)?T[C.name].push(x):T[C.name]=[x])}function E(x,T){var C=x.value;u.assert(C),dt.call(T,C.name)?T[C.name].push(x):T[C.name]=[x]}return f.lookup=function(x){for(var T=this;T&&!T.declares(x);T=T.parent);return T},f.lookupType=function(x){for(var T=this;T&&!T.declaresType(x);T=T.parent);return T},f.getGlobalScope=function(){for(var x=this;!x.isGlobal;)x=x.parent;return x},l}z(()=>module);function Bi(r){var n=r.use(X),e=n.namedTypes,t=n.builders,s=n.builtInTypes.number,i=n.builtInTypes.array,o=r.use(Ui),a=r.use(Hl);let l=function h(y,P,E){if(!(this instanceof h))throw new Error("NodePath constructor cannot be invoked without 'new'");o.call(this,y,P,E)};var c=l.prototype=Object.create(o.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(c,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),c.replace=function(){return delete this.node,delete this.parent,delete this.scope,o.prototype.replace.apply(this,arguments)},c.prune=function(){var h=this.parent;return this.replace(),d(h)},c._computeNode=function(){var h=this.value;if(e.Node.check(h))return h;var y=this.parentPath;return y&&y.node||null},c._computeParent=function(){var h=this.value,y=this.parentPath;if(!e.Node.check(h)){for(;y&&!e.Node.check(y.value);)y=y.parentPath;y&&(y=y.parentPath)}for(;y&&!e.Node.check(y.value);)y=y.parentPath;return y||null},c._computeScope=function(){var h=this.value,y=this.parentPath,P=y&&y.scope;return e.Node.check(h)&&a.isEstablishedBy(h)&&(P=new a(this,P)),P||null},c.getValueProperty=function(h){return n.getFieldValue(this.value,h)},c.needsParens=function(h){var y=this.parentPath;if(!y)return!1;var P=this.value;if(!e.Expression.check(P)||P.type==="Identifier")return!1;for(;!e.Node.check(y.value);)if(y=y.parentPath,!y)return!1;var E=y.value;switch(P.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return E.type==="MemberExpression"&&this.name==="object"&&E.object===P;case"BinaryExpression":case"LogicalExpression":switch(E.type){case"CallExpression":return this.name==="callee"&&E.callee===P;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&E.object===P;case"BinaryExpression":case"LogicalExpression":{let x=P,T=E.operator,C=u[T],N=x.operator,H=u[N];if(C>H)return!0;if(C===H&&this.name==="right"){if(E.right!==x)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(E.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(E.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return E.type==="MemberExpression"&&s.check(P.value)&&this.name==="object"&&E.object===P;case"AssignmentExpression":case"ConditionalExpression":switch(E.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&E.callee===P;case"ConditionalExpression":return this.name==="test"&&E.test===P;case"MemberExpression":return this.name==="object"&&E.object===P;default:return!1}default:if(E.type==="NewExpression"&&this.name==="callee"&&E.callee===P)return f(P)}return!!(h!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function p(h){return e.BinaryExpression.check(h)||e.LogicalExpression.check(h)}var u={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(h,y){h.forEach(function(P){u[P]=y})});function f(h){return e.CallExpression.check(h)?!0:i.check(h)?h.some(f):e.Node.check(h)?n.someField(h,function(y,P){return f(P)}):!1}c.canBeFirstInStatement=function(){var h=this.node;return!e.FunctionExpression.check(h)&&!e.ObjectExpression.check(h)},c.firstInStatement=function(){return m(this)};function m(h){for(var y,P;h.parent;h=h.parent){if(y=h.node,P=h.parent.node,e.BlockStatement.check(P)&&h.parent.name==="body"&&h.name===0){if(P.body[0]!==y)throw new Error("Nodes must be equal");return!0}if(e.ExpressionStatement.check(P)&&h.name==="expression"){if(P.expression!==y)throw new Error("Nodes must be equal");return!0}if(e.SequenceExpression.check(P)&&h.parent.name==="expressions"&&h.name===0){if(P.expressions[0]!==y)throw new Error("Nodes must be equal");continue}if(e.CallExpression.check(P)&&h.name==="callee"){if(P.callee!==y)throw new Error("Nodes must be equal");continue}if(e.MemberExpression.check(P)&&h.name==="object"){if(P.object!==y)throw new Error("Nodes must be equal");continue}if(e.ConditionalExpression.check(P)&&h.name==="test"){if(P.test!==y)throw new Error("Nodes must be equal");continue}if(p(P)&&h.name==="left"){if(P.left!==y)throw new Error("Nodes must be equal");continue}if(e.UnaryExpression.check(P)&&!P.prefix&&h.name==="argument"){if(P.argument!==y)throw new Error("Nodes must be equal");continue}return!1}return!0}function d(h){if(e.VariableDeclaration.check(h.node)){var y=h.get("declarations").value;if(!y||y.length===0)return h.prune()}else if(e.ExpressionStatement.check(h.node)){if(!h.get("expression").value)return h.prune()}else e.IfStatement.check(h.node)&&g(h);return h}function g(h){var y=h.get("test").value,P=h.get("alternate").value,E=h.get("consequent").value;if(!E&&!P){var x=t.expressionStatement(y);h.replace(x)}else if(!E&&P){var T=t.unaryExpression("!",y,!0);e.UnaryExpression.check(y)&&y.operator==="!"&&(T=y.argument),h.get("test").replace(T),h.get("consequent").replace(P),h.get("alternate").replace()}}return l}z(()=>module);var Pn=Object.prototype.hasOwnProperty;function ql(r){var n=r.use(X),e=r.use(Bi),t=n.builtInTypes.array,s=n.builtInTypes.object,i=n.builtInTypes.function,o;let a=function d(){if(!(this instanceof d))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=l(this),this._shouldVisitComments=Pn.call(this._methodNameTable,"Block")||Pn.call(this._methodNameTable,"Line"),this.Context=f(this),this._visiting=!1,this._changeReported=!1};function l(d){var g=Object.create(null);for(var h in d)/^visit[A-Z]/.test(h)&&(g[h.slice(5)]=!0);for(var y=n.computeSupertypeLookupTable(g),P=Object.create(null),E=Object.keys(y),x=E.length,T=0;T<x;++T){var C=E[T];h="visit"+y[C],i.check(d[h])&&(P[C]=h)}return P}a.fromMethodsObject=function(g){if(g instanceof a)return g;if(!s.check(g))return new a;let h=function P(){if(!(this instanceof P))throw new Error("Visitor constructor cannot be invoked without 'new'");a.call(this)};var y=h.prototype=Object.create(p);return y.constructor=h,c(y,g),c(h,a),i.assert(h.fromMethodsObject),i.assert(h.visit),new h};function c(d,g){for(var h in g)Pn.call(g,h)&&(d[h]=g[h]);return d}a.visit=function(g,h){return a.fromMethodsObject(h).visit(g)};var p=a.prototype;p.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var d=arguments.length,g=new Array(d),h=0;h<d;++h)g[h]=arguments[h];g[0]instanceof e||(g[0]=new e({root:g[0]}).get("root")),this.reset.apply(this,g);var y;try{var P=this.visitWithoutReset(g[0]);y=!0}finally{if(this._visiting=!1,!y&&this._abortRequested)return g[0].value}return P},p.AbortRequest=function(){},p.abort=function(){var d=this;d._abortRequested=!0;var g=new d.AbortRequest;throw g.cancel=function(){d._abortRequested=!1},g},p.reset=function(d){},p.visitWithoutReset=function(d){if(this instanceof this.Context)return this.visitor.visitWithoutReset(d);if(!(d instanceof e))throw new Error("");var g=d.value,h=g&&typeof g=="object"&&typeof g.type=="string"&&this._methodNameTable[g.type];if(h){var y=this.acquireContext(d);try{return y.invokeVisitorMethod(h)}finally{this.releaseContext(y)}}else return u(d,this)};function u(d,g){if(!(d instanceof e))throw new Error("");if(!(g instanceof a))throw new Error("");var h=d.value;if(t.check(h))d.each(g.visitWithoutReset,g);else if(s.check(h)){var y=n.getFieldNames(h);g._shouldVisitComments&&h.comments&&y.indexOf("comments")<0&&y.push("comments");for(var P=y.length,E=[],x=0;x<P;++x){var T=y[x];Pn.call(h,T)||(h[T]=n.getFieldValue(h,T)),E.push(d.get(T))}for(var x=0;x<P;++x)g.visitWithoutReset(E[x])}return d.value}p.acquireContext=function(d){return this._reusableContextStack.length===0?new this.Context(d):this._reusableContextStack.pop().reset(d)},p.releaseContext=function(d){if(!(d instanceof this.Context))throw new Error("");this._reusableContextStack.push(d),d.currentPath=null},p.reportChanged=function(){this._changeReported=!0},p.wasChangeReported=function(){return this._changeReported};function f(d){function g(y){if(!(this instanceof g))throw new Error("");if(!(this instanceof a))throw new Error("");if(!(y instanceof e))throw new Error("");Object.defineProperty(this,"visitor",{value:d,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=y,this.needToCallTraverse=!0,Object.seal(this)}if(!(d instanceof a))throw new Error("");var h=g.prototype=Object.create(d);return h.constructor=g,c(h,m),g}var m=Object.create(null);return m.reset=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof e))throw new Error("");return this.currentPath=g,this.needToCallTraverse=!0,this},m.invokeVisitorMethod=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");var h=this.visitor[g].call(this,this.currentPath);if(h===!1?this.needToCallTraverse=!1:h!==o&&(this.currentPath=this.currentPath.replace(h)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),this.needToCallTraverse!==!1)throw new Error("Must either call this.traverse or return false in "+g);var y=this.currentPath;return y&&y.value},m.traverse=function(g,h){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof e))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");return this.needToCallTraverse=!1,u(g,a.fromMethodsObject(h||this.visitor))},m.visit=function(g,h){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof e))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");return this.needToCallTraverse=!1,a.fromMethodsObject(h||this.visitor).visitWithoutReset(g)},m.reportChanged=function(){this.visitor.reportChanged()},m.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},a}z(()=>module);function Gl(r){var n=r.use(X),e=n.getFieldNames,t=n.getFieldValue,s=n.builtInTypes.array,i=n.builtInTypes.object,o=n.builtInTypes.Date,a=n.builtInTypes.RegExp,l=Object.prototype.hasOwnProperty;function c(d,g,h){return s.check(h)?h.length=0:h=null,u(d,g,h)}c.assert=function(d,g){var h=[];if(!c(d,g,h))if(h.length===0){if(d!==g)throw new Error("Nodes must be equal")}else throw new Error("Nodes differ in the following path: "+h.map(p).join(""))};function p(d){return/[_$a-z][_$a-z0-9]*/i.test(d)?"."+d:"["+JSON.stringify(d)+"]"}function u(d,g,h){return d===g?!0:s.check(d)?f(d,g,h):i.check(d)?m(d,g,h):o.check(d)?o.check(g)&&+d==+g:a.check(d)?a.check(g)&&d.source===g.source&&d.global===g.global&&d.multiline===g.multiline&&d.ignoreCase===g.ignoreCase:d==g}function f(d,g,h){s.assert(d);var y=d.length;if(!s.check(g)||g.length!==y)return h&&h.push("length"),!1;for(var P=0;P<y;++P){if(h&&h.push(P),P in d!=P in g||!u(d[P],g[P],h))return!1;if(h){var E=h.pop();if(E!==P)throw new Error(""+E)}}return!0}function m(d,g,h){if(i.assert(d),!i.check(g))return!1;if(d.type!==g.type)return h&&h.push("type"),!1;var y=e(d),P=y.length,E=e(g),x=E.length;if(P===x){for(var T=0;T<P;++T){var C=y[T],N=t(d,C),H=t(g,C);if(h&&h.push(C),!u(N,H,h))return!1;if(h){var le=h.pop();if(le!==C)throw new Error(""+le)}}return!0}if(!h)return!1;var Ee=Object.create(null);for(T=0;T<P;++T)Ee[y[T]]=!0;for(T=0;T<x;++T){if(C=E[T],!l.call(Ee,C))return h.push(C),!1;delete Ee[C]}for(C in Ee){h.push(C);break}return!1}return c}z(()=>module);function Wl(r){let n=Kl(),e=n.use(X);r.forEach(n.use),e.finalize();let t=n.use(ql);return{Type:e.Type,builtInTypes:e.builtInTypes,namedTypes:e.namedTypes,builders:e.builders,defineMethod:e.defineMethod,getFieldNames:e.getFieldNames,getFieldValue:e.getFieldValue,eachField:e.eachField,someField:e.someField,getSupertypeNames:e.getSupertypeNames,getBuilderName:e.getBuilderName,astNodesAreEquivalent:n.use(Gl),finalize:e.finalize,Path:n.use(Ui),NodePath:n.use(Bi),PathVisitor:t,use:n.use,visit:t.visit}}function Kl(){let r=[],n=[];function e(s){var i=r.indexOf(s);return i===-1&&(i=r.length,r.push(s),n[i]=s(t)),n[i]}var t={use:e};return t}z(()=>module);function Ri(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}z(()=>module);function _i(r){let n=r.use(Ri);return n.BinaryOperators.indexOf("**")<0&&n.BinaryOperators.push("**"),n.AssignmentOperators.indexOf("**=")<0&&n.AssignmentOperators.push("**="),n}z(()=>module);function ji(r){let n=r.use(_i);return n.LogicalOperators.indexOf("??")<0&&n.LogicalOperators.push("??"),n}z(()=>module);function Xl(r){let n=r.use(ji);return n.LogicalOperators.forEach(e=>{let t=e+"=";n.AssignmentOperators.indexOf(t)<0&&n.AssignmentOperators.push(t)}),n}z(()=>module);function Jl(r){var n=r.use(X),e=n.Type,t=e.def,s=e.or,i=r.use(ue),o=i.defaults,a=i.geq;let{BinaryOperators:l,AssignmentOperators:c,LogicalOperators:p}=r.use(Ri);t("Printable").field("loc",s(t("SourceLocation"),null),o.null,!0),t("Node").bases("Printable").field("type",String).field("comments",s([t("Comment")],null),o.null,!0),t("SourceLocation").field("start",t("Position")).field("end",t("Position")).field("source",s(String,null),o.null),t("Position").field("line",a(1)).field("column",a(0)),t("File").bases("Node").build("program","name").field("program",t("Program")).field("name",s(String,null),o.null),t("Program").bases("Node").build("body").field("body",[t("Statement")]),t("Function").bases("Node").field("id",s(t("Identifier"),null),o.null).field("params",[t("Pattern")]).field("body",t("BlockStatement")).field("generator",Boolean,o.false).field("async",Boolean,o.false),t("Statement").bases("Node"),t("EmptyStatement").bases("Statement").build(),t("BlockStatement").bases("Statement").build("body").field("body",[t("Statement")]),t("ExpressionStatement").bases("Statement").build("expression").field("expression",t("Expression")),t("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",t("Expression")).field("consequent",t("Statement")).field("alternate",s(t("Statement"),null),o.null),t("LabeledStatement").bases("Statement").build("label","body").field("label",t("Identifier")).field("body",t("Statement")),t("BreakStatement").bases("Statement").build("label").field("label",s(t("Identifier"),null),o.null),t("ContinueStatement").bases("Statement").build("label").field("label",s(t("Identifier"),null),o.null),t("WithStatement").bases("Statement").build("object","body").field("object",t("Expression")).field("body",t("Statement")),t("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",t("Expression")).field("cases",[t("SwitchCase")]).field("lexical",Boolean,o.false),t("ReturnStatement").bases("Statement").build("argument").field("argument",s(t("Expression"),null)),t("ThrowStatement").bases("Statement").build("argument").field("argument",t("Expression")),t("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",t("BlockStatement")).field("handler",s(t("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[t("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[t("CatchClause")],o.emptyArray).field("finalizer",s(t("BlockStatement"),null),o.null),t("CatchClause").bases("Node").build("param","guard","body").field("param",t("Pattern")).field("guard",s(t("Expression"),null),o.null).field("body",t("BlockStatement")),t("WhileStatement").bases("Statement").build("test","body").field("test",t("Expression")).field("body",t("Statement")),t("DoWhileStatement").bases("Statement").build("body","test").field("body",t("Statement")).field("test",t("Expression")),t("ForStatement").bases("Statement").build("init","test","update","body").field("init",s(t("VariableDeclaration"),t("Expression"),null)).field("test",s(t("Expression"),null)).field("update",s(t("Expression"),null)).field("body",t("Statement")),t("ForInStatement").bases("Statement").build("left","right","body").field("left",s(t("VariableDeclaration"),t("Expression"))).field("right",t("Expression")).field("body",t("Statement")),t("DebuggerStatement").bases("Statement").build(),t("Declaration").bases("Statement"),t("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",t("Identifier")),t("FunctionExpression").bases("Function","Expression").build("id","params","body"),t("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",s("var","let","const")).field("declarations",[t("VariableDeclarator")]),t("VariableDeclarator").bases("Node").build("id","init").field("id",t("Pattern")).field("init",s(t("Expression"),null),o.null),t("Expression").bases("Node"),t("ThisExpression").bases("Expression").build(),t("ArrayExpression").bases("Expression").build("elements").field("elements",[s(t("Expression"),null)]),t("ObjectExpression").bases("Expression").build("properties").field("properties",[t("Property")]),t("Property").bases("Node").build("kind","key","value").field("kind",s("init","get","set")).field("key",s(t("Literal"),t("Identifier"))).field("value",t("Expression")),t("SequenceExpression").bases("Expression").build("expressions").field("expressions",[t("Expression")]);var u=s("-","+","!","~","typeof","void","delete");t("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",u).field("argument",t("Expression")).field("prefix",Boolean,o.true);let f=s(...l);t("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",f).field("left",t("Expression")).field("right",t("Expression"));let m=s(...c);t("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",m).field("left",s(t("Pattern"),t("MemberExpression"))).field("right",t("Expression"));var d=s("++","--");t("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",d).field("argument",t("Expression")).field("prefix",Boolean);var g=s(...p);t("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",g).field("left",t("Expression")).field("right",t("Expression")),t("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",t("Expression")).field("consequent",t("Expression")).field("alternate",t("Expression")),t("NewExpression").bases("Expression").build("callee","arguments").field("callee",t("Expression")).field("arguments",[t("Expression")]),t("CallExpression").bases("Expression").build("callee","arguments").field("callee",t("Expression")).field("arguments",[t("Expression")]),t("MemberExpression").bases("Expression").build("object","property","computed").field("object",t("Expression")).field("property",s(t("Identifier"),t("Expression"))).field("computed",Boolean,function(){var h=this.property.type;return h==="Literal"||h==="MemberExpression"||h==="BinaryExpression"}),t("Pattern").bases("Node"),t("SwitchCase").bases("Node").build("test","consequent").field("test",s(t("Expression"),null)).field("consequent",[t("Statement")]),t("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,o.false),t("Literal").bases("Expression").build("value").field("value",s(String,Boolean,null,Number,RegExp,BigInt)),t("Comment").bases("Printable").field("value",String).field("leading",Boolean,o.true).field("trailing",Boolean,o.false)}z(()=>module);function Yl(r){r.use(Jl);let n=r.use(X),e=n.Type.def,t=n.Type.or,s=r.use(ue).defaults;e("Function").field("generator",Boolean,s.false).field("expression",Boolean,s.false).field("defaults",[t(e("Expression"),null)],s.emptyArray).field("rest",t(e("Identifier"),null),s.null),e("RestElement").bases("Pattern").build("argument").field("argument",e("Pattern")).field("typeAnnotation",t(e("TypeAnnotation"),e("TSTypeAnnotation"),null),s.null),e("SpreadElementPattern").bases("Pattern").build("argument").field("argument",e("Pattern")),e("FunctionDeclaration").build("id","params","body","generator","expression").field("id",t(e("Identifier"),null)),e("FunctionExpression").build("id","params","body","generator","expression"),e("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,s.null).field("body",t(e("BlockStatement"),e("Expression"))).field("generator",!1,s.false),e("ForOfStatement").bases("Statement").build("left","right","body").field("left",t(e("VariableDeclaration"),e("Pattern"))).field("right",e("Expression")).field("body",e("Statement")),e("YieldExpression").bases("Expression").build("argument","delegate").field("argument",t(e("Expression"),null)).field("delegate",Boolean,s.false),e("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",e("Expression")).field("blocks",[e("ComprehensionBlock")]).field("filter",t(e("Expression"),null)),e("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",e("Expression")).field("blocks",[e("ComprehensionBlock")]).field("filter",t(e("Expression"),null)),e("ComprehensionBlock").bases("Node").build("left","right","each").field("left",e("Pattern")).field("right",e("Expression")).field("each",Boolean),e("Property").field("key",t(e("Literal"),e("Identifier"),e("Expression"))).field("value",t(e("Expression"),e("Pattern"))).field("method",Boolean,s.false).field("shorthand",Boolean,s.false).field("computed",Boolean,s.false),e("ObjectProperty").field("shorthand",Boolean,s.false),e("PropertyPattern").bases("Pattern").build("key","pattern").field("key",t(e("Literal"),e("Identifier"),e("Expression"))).field("pattern",e("Pattern")).field("computed",Boolean,s.false),e("ObjectPattern").bases("Pattern").build("properties").field("properties",[t(e("PropertyPattern"),e("Property"))]),e("ArrayPattern").bases("Pattern").build("elements").field("elements",[t(e("Pattern"),null)]),e("SpreadElement").bases("Node").build("argument").field("argument",e("Expression")),e("ArrayExpression").field("elements",[t(e("Expression"),e("SpreadElement"),e("RestElement"),null)]),e("NewExpression").field("arguments",[t(e("Expression"),e("SpreadElement"))]),e("CallExpression").field("arguments",[t(e("Expression"),e("SpreadElement"))]),e("AssignmentPattern").bases("Pattern").build("left","right").field("left",e("Pattern")).field("right",e("Expression")),e("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",t("constructor","method","get","set")).field("key",e("Expression")).field("value",e("Function")).field("computed",Boolean,s.false).field("static",Boolean,s.false);let i=t(e("MethodDefinition"),e("VariableDeclarator"),e("ClassPropertyDefinition"),e("ClassProperty"),e("StaticBlock"));e("ClassProperty").bases("Declaration").build("key").field("key",t(e("Literal"),e("Identifier"),e("Expression"))).field("computed",Boolean,s.false),e("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",i),e("ClassBody").bases("Declaration").build("body").field("body",[i]),e("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",t(e("Identifier"),null)).field("body",e("ClassBody")).field("superClass",t(e("Expression"),null),s.null),e("ClassExpression").bases("Expression").build("id","body","superClass").field("id",t(e("Identifier"),null),s.null).field("body",e("ClassBody")).field("superClass",t(e("Expression"),null),s.null),e("Super").bases("Expression").build(),e("Specifier").bases("Node"),e("ModuleSpecifier").bases("Specifier").field("local",t(e("Identifier"),null),s.null).field("id",t(e("Identifier"),null),s.null).field("name",t(e("Identifier"),null),s.null),e("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",e("Identifier")),e("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),e("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),e("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[t(e("ImportSpecifier"),e("ImportNamespaceSpecifier"),e("ImportDefaultSpecifier"))],s.emptyArray).field("source",e("Literal")).field("importKind",t("value","type"),function(){return"value"}),e("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",t(e("Declaration"),null)).field("specifiers",[e("ExportSpecifier")],s.emptyArray).field("source",t(e("Literal"),null),s.null),e("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",e("Identifier")),e("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",t(e("Declaration"),e("Expression"))),e("ExportAllDeclaration").bases("Declaration").build("source").field("source",e("Literal")),e("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",e("Expression")).field("quasi",e("TemplateLiteral")),e("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[e("TemplateElement")]).field("expressions",[e("Expression")]),e("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean),e("MetaProperty").bases("Expression").build("meta","property").field("meta",e("Identifier")).field("property",e("Identifier"))}z(()=>module);function Ql(r){r.use(_i),r.use(Yl)}z(()=>module);function Zl(r){r.use(Ql);let e=r.use(X).Type.def,t=r.use(ue).defaults;e("Function").field("async",Boolean,t.false),e("AwaitExpression").bases("Expression").build("argument").field("argument",e("Expression"))}z(()=>module);function ec(r){r.use(Zl);let n=r.use(X),e=n.Type.def,t=n.Type.or,s=r.use(ue).defaults;e("ForOfStatement").field("await",Boolean,s.false),e("SpreadProperty").bases("Node").build("argument").field("argument",e("Expression")),e("ObjectExpression").field("properties",[t(e("Property"),e("SpreadProperty"),e("SpreadElement"))]),e("TemplateElement").field("value",{cooked:t(String,null),raw:String}),e("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",e("Pattern")),e("ObjectPattern").field("properties",[t(e("PropertyPattern"),e("Property"),e("RestElement"),e("SpreadPropertyPattern"))])}z(()=>module);function tc(r){r.use(ec);let n=r.use(X),e=n.Type.def,t=n.Type.or,s=r.use(ue).defaults;e("CatchClause").field("param",t(e("Pattern"),null),s.null)}z(()=>module);function nc(r){r.use(ji),r.use(tc);let n=r.use(X),e=n.Type.def,t=n.Type.or,i=r.use(ue).defaults;e("ImportExpression").bases("Expression").build("source").field("source",e("Expression")),e("ExportAllDeclaration").bases("Declaration").build("source","exported").field("source",e("Literal")).field("exported",t(e("Identifier"),null,void 0),i.null),e("ChainElement").bases("Node").field("optional",Boolean,i.false),e("CallExpression").bases("Expression","ChainElement"),e("MemberExpression").bases("Expression","ChainElement"),e("ChainExpression").bases("Expression").build("expression").field("expression",e("ChainElement")),e("OptionalCallExpression").bases("CallExpression").build("callee","arguments","optional").field("optional",Boolean,i.true),e("OptionalMemberExpression").bases("MemberExpression").build("object","property","computed","optional").field("optional",Boolean,i.true)}z(()=>module);function sc(r){r.use(Xl),r.use(nc)}z(()=>module);function rc(r){r.use(sc);let e=r.use(X).Type.def;e("StaticBlock").bases("Declaration").build("body").field("body",[e("Statement")])}z(()=>module);function Yt(r){r.use(rc);let n=r.use(X),e=n.Type,t=n.Type.def,s=e.or,o=r.use(ue).defaults;t("AwaitExpression").build("argument","all").field("argument",s(t("Expression"),null)).field("all",Boolean,o.false),t("Decorator").bases("Node").build("expression").field("expression",t("Expression")),t("Property").field("decorators",s([t("Decorator")],null),o.null),t("MethodDefinition").field("decorators",s([t("Decorator")],null),o.null),t("PrivateName").bases("Expression","Pattern").build("id").field("id",t("Identifier")),t("ClassPrivateProperty").bases("ClassProperty").build("key","value").field("key",t("PrivateName")).field("value",s(t("Expression"),null),o.null),t("ImportAttribute").bases("Node").build("key","value").field("key",s(t("Identifier"),t("Literal"))).field("value",t("Expression")),["ImportDeclaration","ExportAllDeclaration","ExportNamedDeclaration"].forEach(a=>{t(a).field("assertions",[t("ImportAttribute")],o.emptyArray)}),t("RecordExpression").bases("Expression").build("properties").field("properties",[s(t("ObjectProperty"),t("ObjectMethod"),t("SpreadElement"))]),t("TupleExpression").bases("Expression").build("elements").field("elements",[s(t("Expression"),t("SpreadElement"),null)]),t("ModuleExpression").bases("Node").build("body").field("body",t("Program"))}z(()=>module);function ic(r){r.use(Yt);let n=r.use(X),e=n.Type.def,t=n.Type.or,s=r.use(ue).defaults;e("JSXAttribute").bases("Node").build("name","value").field("name",t(e("JSXIdentifier"),e("JSXNamespacedName"))).field("value",t(e("Literal"),e("JSXExpressionContainer"),e("JSXElement"),e("JSXFragment"),null),s.null),e("JSXIdentifier").bases("Identifier").build("name").field("name",String),e("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",e("JSXIdentifier")).field("name",e("JSXIdentifier")),e("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",t(e("JSXIdentifier"),e("JSXMemberExpression"))).field("property",e("JSXIdentifier")).field("computed",Boolean,s.false);let i=t(e("JSXIdentifier"),e("JSXNamespacedName"),e("JSXMemberExpression"));e("JSXSpreadAttribute").bases("Node").build("argument").field("argument",e("Expression"));let o=[t(e("JSXAttribute"),e("JSXSpreadAttribute"))];e("JSXExpressionContainer").bases("Expression").build("expression").field("expression",t(e("Expression"),e("JSXEmptyExpression")));let a=[t(e("JSXText"),e("JSXExpressionContainer"),e("JSXSpreadChild"),e("JSXElement"),e("JSXFragment"),e("Literal"))];e("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",e("JSXOpeningElement")).field("closingElement",t(e("JSXClosingElement"),null),s.null).field("children",a,s.emptyArray).field("name",i,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),e("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",i).field("attributes",o,s.emptyArray).field("selfClosing",Boolean,s.false),e("JSXClosingElement").bases("Node").build("name").field("name",i),e("JSXFragment").bases("Expression").build("openingFragment","closingFragment","children").field("openingFragment",e("JSXOpeningFragment")).field("closingFragment",e("JSXClosingFragment")).field("children",a,s.emptyArray),e("JSXOpeningFragment").bases("Node").build(),e("JSXClosingFragment").bases("Node").build(),e("JSXText").bases("Literal").build("value","raw").field("value",String).field("raw",String,function(){return this.value}),e("JSXEmptyExpression").bases("Node").build(),e("JSXSpreadChild").bases("Node").build("expression").field("expression",e("Expression"))}z(()=>module);function Vi(r){var n=r.use(X),e=n.Type.def,t=n.Type.or,s=r.use(ue).defaults,i=t(e("TypeAnnotation"),e("TSTypeAnnotation"),null),o=t(e("TypeParameterDeclaration"),e("TSTypeParameterDeclaration"),null);e("Identifier").field("typeAnnotation",i,s.null),e("ObjectPattern").field("typeAnnotation",i,s.null),e("Function").field("returnType",i,s.null).field("typeParameters",o,s.null),e("ClassProperty").build("key","value","typeAnnotation","static").field("value",t(e("Expression"),null)).field("static",Boolean,s.false).field("typeAnnotation",i,s.null),["ClassDeclaration","ClassExpression"].forEach(a=>{e(a).field("typeParameters",o,s.null).field("superTypeParameters",t(e("TypeParameterInstantiation"),e("TSTypeParameterInstantiation"),null),s.null).field("implements",t([e("ClassImplements")],[e("TSExpressionWithTypeArguments")]),s.emptyArray)})}z(()=>module);function zi(r){r.use(Yt),r.use(Vi);let n=r.use(X),e=n.Type.def,t=n.Type.or,s=r.use(ue).defaults;e("Flow").bases("Node"),e("FlowType").bases("Flow"),e("AnyTypeAnnotation").bases("FlowType").build(),e("EmptyTypeAnnotation").bases("FlowType").build(),e("MixedTypeAnnotation").bases("FlowType").build(),e("VoidTypeAnnotation").bases("FlowType").build(),e("SymbolTypeAnnotation").bases("FlowType").build(),e("NumberTypeAnnotation").bases("FlowType").build(),e("BigIntTypeAnnotation").bases("FlowType").build(),e("NumberLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),e("NumericLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),e("BigIntLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",null).field("raw",String),e("StringTypeAnnotation").bases("FlowType").build(),e("StringLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",String).field("raw",String),e("BooleanTypeAnnotation").bases("FlowType").build(),e("BooleanLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Boolean).field("raw",String),e("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",e("FlowType")),e("NullableTypeAnnotation").bases("FlowType").build("typeAnnotation").field("typeAnnotation",e("FlowType")),e("NullLiteralTypeAnnotation").bases("FlowType").build(),e("NullTypeAnnotation").bases("FlowType").build(),e("ThisTypeAnnotation").bases("FlowType").build(),e("ExistsTypeAnnotation").bases("FlowType").build(),e("ExistentialTypeParam").bases("FlowType").build(),e("FunctionTypeAnnotation").bases("FlowType").build("params","returnType","rest","typeParameters").field("params",[e("FunctionTypeParam")]).field("returnType",e("FlowType")).field("rest",t(e("FunctionTypeParam"),null)).field("typeParameters",t(e("TypeParameterDeclaration"),null)),e("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",t(e("Identifier"),null)).field("typeAnnotation",e("FlowType")).field("optional",Boolean),e("ArrayTypeAnnotation").bases("FlowType").build("elementType").field("elementType",e("FlowType")),e("ObjectTypeAnnotation").bases("FlowType").build("properties","indexers","callProperties").field("properties",[t(e("ObjectTypeProperty"),e("ObjectTypeSpreadProperty"))]).field("indexers",[e("ObjectTypeIndexer")],s.emptyArray).field("callProperties",[e("ObjectTypeCallProperty")],s.emptyArray).field("inexact",t(Boolean,void 0),s.undefined).field("exact",Boolean,s.false).field("internalSlots",[e("ObjectTypeInternalSlot")],s.emptyArray),e("Variance").bases("Node").build("kind").field("kind",t("plus","minus"));let i=t(e("Variance"),"plus","minus",null);e("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",t(e("Literal"),e("Identifier"))).field("value",e("FlowType")).field("optional",Boolean).field("variance",i,s.null),e("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",e("Identifier")).field("key",e("FlowType")).field("value",e("FlowType")).field("variance",i,s.null).field("static",Boolean,s.false),e("ObjectTypeCallProperty").bases("Node").build("value").field("value",e("FunctionTypeAnnotation")).field("static",Boolean,s.false),e("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",t(e("Identifier"),e("QualifiedTypeIdentifier"))).field("id",e("Identifier")),e("GenericTypeAnnotation").bases("FlowType").build("id","typeParameters").field("id",t(e("Identifier"),e("QualifiedTypeIdentifier"))).field("typeParameters",t(e("TypeParameterInstantiation"),null)),e("MemberTypeAnnotation").bases("FlowType").build("object","property").field("object",e("Identifier")).field("property",t(e("MemberTypeAnnotation"),e("GenericTypeAnnotation"))),e("IndexedAccessType").bases("FlowType").build("objectType","indexType").field("objectType",e("FlowType")).field("indexType",e("FlowType")),e("OptionalIndexedAccessType").bases("FlowType").build("objectType","indexType","optional").field("objectType",e("FlowType")).field("indexType",e("FlowType")).field("optional",Boolean),e("UnionTypeAnnotation").bases("FlowType").build("types").field("types",[e("FlowType")]),e("IntersectionTypeAnnotation").bases("FlowType").build("types").field("types",[e("FlowType")]),e("TypeofTypeAnnotation").bases("FlowType").build("argument").field("argument",e("FlowType")),e("ObjectTypeSpreadProperty").bases("Node").build("argument").field("argument",e("FlowType")),e("ObjectTypeInternalSlot").bases("Node").build("id","value","optional","static","method").field("id",e("Identifier")).field("value",e("FlowType")).field("optional",Boolean).field("static",Boolean).field("method",Boolean),e("TypeParameterDeclaration").bases("Node").build("params").field("params",[e("TypeParameter")]),e("TypeParameterInstantiation").bases("Node").build("params").field("params",[e("FlowType")]),e("TypeParameter").bases("FlowType").build("name","variance","bound","default").field("name",String).field("variance",i,s.null).field("bound",t(e("TypeAnnotation"),null),s.null).field("default",t(e("FlowType"),null),s.null),e("ClassProperty").field("variance",i,s.null),e("ClassImplements").bases("Node").build("id").field("id",e("Identifier")).field("superClass",t(e("Expression"),null),s.null).field("typeParameters",t(e("TypeParameterInstantiation"),null),s.null),e("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",e("ObjectTypeAnnotation")).field("extends",t([e("InterfaceExtends")],null),s.null),e("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterDeclaration"),null),s.null).field("body",e("ObjectTypeAnnotation")).field("extends",[e("InterfaceExtends")]),e("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),e("InterfaceExtends").bases("Node").build("id").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterInstantiation"),null),s.null),e("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterDeclaration"),null)).field("right",e("FlowType")),e("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),e("OpaqueType").bases("Declaration").build("id","typeParameters","impltype","supertype").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterDeclaration"),null)).field("impltype",e("FlowType")).field("supertype",t(e("FlowType"),null)),e("DeclareOpaqueType").bases("OpaqueType").build("id","typeParameters","supertype").field("impltype",t(e("FlowType"),null)),e("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",e("Expression")).field("typeAnnotation",e("TypeAnnotation")),e("TupleTypeAnnotation").bases("FlowType").build("types").field("types",[e("FlowType")]),e("DeclareVariable").bases("Statement").build("id").field("id",e("Identifier")),e("DeclareFunction").bases("Statement").build("id").field("id",e("Identifier")).field("predicate",t(e("FlowPredicate"),null),s.null),e("DeclareClass").bases("InterfaceDeclaration").build("id"),e("DeclareModule").bases("Statement").build("id","body").field("id",t(e("Identifier"),e("Literal"))).field("body",e("BlockStatement")),e("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",e("TypeAnnotation")),e("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",t(e("DeclareVariable"),e("DeclareFunction"),e("DeclareClass"),e("FlowType"),e("TypeAlias"),e("DeclareOpaqueType"),e("InterfaceDeclaration"),null)).field("specifiers",[t(e("ExportSpecifier"),e("ExportBatchSpecifier"))],s.emptyArray).field("source",t(e("Literal"),null),s.null),e("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",t(e("Literal"),null),s.null),e("ImportDeclaration").field("importKind",t("value","type","typeof"),()=>"value"),e("FlowPredicate").bases("Flow"),e("InferredPredicate").bases("FlowPredicate").build(),e("DeclaredPredicate").bases("FlowPredicate").build("value").field("value",e("Expression")),e("Function").field("predicate",t(e("FlowPredicate"),null),s.null),e("CallExpression").field("typeArguments",t(null,e("TypeParameterInstantiation")),s.null),e("NewExpression").field("typeArguments",t(null,e("TypeParameterInstantiation")),s.null),e("EnumDeclaration").bases("Declaration").build("id","body").field("id",e("Identifier")).field("body",t(e("EnumBooleanBody"),e("EnumNumberBody"),e("EnumStringBody"),e("EnumSymbolBody"))),e("EnumBooleanBody").build("members","explicitType").field("members",[e("EnumBooleanMember")]).field("explicitType",Boolean),e("EnumNumberBody").build("members","explicitType").field("members",[e("EnumNumberMember")]).field("explicitType",Boolean),e("EnumStringBody").build("members","explicitType").field("members",t([e("EnumStringMember")],[e("EnumDefaultedMember")])).field("explicitType",Boolean),e("EnumSymbolBody").build("members").field("members",[e("EnumDefaultedMember")]),e("EnumBooleanMember").build("id","init").field("id",e("Identifier")).field("init",t(e("Literal"),Boolean)),e("EnumNumberMember").build("id","init").field("id",e("Identifier")).field("init",e("Literal")),e("EnumStringMember").build("id","init").field("id",e("Identifier")).field("init",e("Literal")),e("EnumDefaultedMember").build("id").field("id",e("Identifier"))}z(()=>module);function oc(r){r.use(Yt);var n=r.use(X),e=r.use(ue).defaults,t=n.Type.def,s=n.Type.or;t("VariableDeclaration").field("declarations",[s(t("VariableDeclarator"),t("Identifier"))]),t("Property").field("value",s(t("Expression"),t("Pattern"))),t("ArrayPattern").field("elements",[s(t("Pattern"),t("SpreadElement"),null)]),t("ObjectPattern").field("properties",[s(t("Property"),t("PropertyPattern"),t("SpreadPropertyPattern"),t("SpreadProperty"))]),t("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),t("ExportBatchSpecifier").bases("Specifier").build(),t("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",s(t("Declaration"),t("Expression"),null)).field("specifiers",[s(t("ExportSpecifier"),t("ExportBatchSpecifier"))],e.emptyArray).field("source",s(t("Literal"),null),e.null),t("Block").bases("Comment").build("value","leading","trailing"),t("Line").bases("Comment").build("value","leading","trailing")}z(()=>module);function $i(r){r.use(Yt);let n=r.use(X),e=r.use(ue).defaults,t=n.Type.def,s=n.Type.or,{undefined:i}=n.builtInTypes;t("Noop").bases("Statement").build(),t("DoExpression").bases("Expression").build("body").field("body",[t("Statement")]),t("BindExpression").bases("Expression").build("object","callee").field("object",s(t("Expression"),null)).field("callee",t("Expression")),t("ParenthesizedExpression").bases("Expression").build("expression").field("expression",t("Expression")),t("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",t("Identifier")),t("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",t("Identifier")),t("CommentBlock").bases("Comment").build("value","leading","trailing"),t("CommentLine").bases("Comment").build("value","leading","trailing"),t("Directive").bases("Node").build("value").field("value",t("DirectiveLiteral")),t("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,e["use strict"]),t("InterpreterDirective").bases("Node").build("value").field("value",String),t("BlockStatement").bases("Statement").build("body").field("body",[t("Statement")]).field("directives",[t("Directive")],e.emptyArray),t("Program").bases("Node").build("body").field("body",[t("Statement")]).field("directives",[t("Directive")],e.emptyArray).field("interpreter",s(t("InterpreterDirective"),null),e.null);function o(p=String,u){return["extra",{rawValue:p,raw:String},function(){let m=n.getFieldValue(this,"value");return{rawValue:m,raw:u?u(m):String(m)}}]}t("StringLiteral").bases("Literal").build("value").field("value",String).field(...o(String,p=>JSON.stringify(p))),t("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",s(String,null),e.null).field(...o(Number)),t("BigIntLiteral").bases("Literal").build("value").field("value",s(String,Number)).field(...o(String,p=>p+"n")),t("DecimalLiteral").bases("Literal").build("value").field("value",String).field(...o(String,p=>p+"m")),t("NullLiteral").bases("Literal").build().field("value",null,e.null),t("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),t("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String).field("value",RegExp,function(){return new RegExp(this.pattern,this.flags)}).field(...o(s(RegExp,i),p=>`/${p.pattern}/${p.flags||""}`)).field("regex",{pattern:String,flags:String},function(){return{pattern:this.pattern,flags:this.flags}});var a=s(t("Property"),t("ObjectMethod"),t("ObjectProperty"),t("SpreadProperty"),t("SpreadElement"));t("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),t("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",s("method","get","set")).field("key",s(t("Literal"),t("Identifier"),t("Expression"))).field("params",[t("Pattern")]).field("body",t("BlockStatement")).field("computed",Boolean,e.false).field("generator",Boolean,e.false).field("async",Boolean,e.false).field("accessibility",s(t("Literal"),null),e.null).field("decorators",s([t("Decorator")],null),e.null),t("ObjectProperty").bases("Node").build("key","value").field("key",s(t("Literal"),t("Identifier"),t("Expression"))).field("value",s(t("Expression"),t("Pattern"))).field("accessibility",s(t("Literal"),null),e.null).field("computed",Boolean,e.false);var l=s(t("MethodDefinition"),t("VariableDeclarator"),t("ClassPropertyDefinition"),t("ClassProperty"),t("ClassPrivateProperty"),t("ClassMethod"),t("ClassPrivateMethod"),t("ClassAccessorProperty"),t("StaticBlock"));t("ClassBody").bases("Declaration").build("body").field("body",[l]),t("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("key",s(t("Literal"),t("Identifier"),t("Expression"))),t("ClassPrivateMethod").bases("Declaration","Function").build("key","params","body","kind","computed","static").field("key",t("PrivateName")),t("ClassAccessorProperty").bases("Declaration").build("key","value","decorators","computed","static").field("key",s(t("Literal"),t("Identifier"),t("PrivateName"),t("Expression"))).field("value",s(t("Expression"),null),e.null),["ClassMethod","ClassPrivateMethod"].forEach(p=>{t(p).field("kind",s("get","set","method","constructor"),()=>"method").field("body",t("BlockStatement")).field("access",s("public","private","protected",null),e.null)}),["ClassMethod","ClassPrivateMethod","ClassAccessorProperty"].forEach(p=>{t(p).field("computed",Boolean,e.false).field("static",Boolean,e.false).field("abstract",Boolean,e.false).field("accessibility",s("public","private","protected",null),e.null).field("decorators",s([t("Decorator")],null),e.null).field("definite",Boolean,e.false).field("optional",Boolean,e.false).field("override",Boolean,e.false).field("readonly",Boolean,e.false)});var c=s(t("Property"),t("PropertyPattern"),t("SpreadPropertyPattern"),t("SpreadProperty"),t("ObjectProperty"),t("RestProperty"),t("RestElement"));t("ObjectPattern").bases("Pattern").build("properties").field("properties",[c]).field("decorators",s([t("Decorator")],null),e.null),t("SpreadProperty").bases("Node").build("argument").field("argument",t("Expression")),t("RestProperty").bases("Node").build("argument").field("argument",t("Expression")),t("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",s(t("VariableDeclaration"),t("Expression"))).field("right",t("Expression")).field("body",t("Statement")),t("Import").bases("Expression").build()}z(()=>module);function ac(r){let e=r.use(X).Type.def;r.use($i),r.use(zi),e("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),e("TopicReference").bases("Expression").build()}z(()=>module);function lc(r){r.use($i),r.use(Vi);var n=r.use(X),e=n.namedTypes,t=n.Type.def,s=n.Type.or,i=r.use(ue).defaults,o=n.Type.from(function(p,u){return!!(e.StringLiteral&&e.StringLiteral.check(p,u)||e.Literal&&e.Literal.check(p,u)&&typeof p.value=="string")},"StringLiteral");t("TSType").bases("Node");var a=s(t("Identifier"),t("TSQualifiedName"));t("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",a),t("TSHasOptionalTypeParameterInstantiation").field("typeParameters",s(t("TSTypeParameterInstantiation"),null),i.null),t("TSHasOptionalTypeParameters").field("typeParameters",s(t("TSTypeParameterDeclaration"),null,void 0),i.null),t("TSHasOptionalTypeAnnotation").field("typeAnnotation",s(t("TSTypeAnnotation"),null),i.null),t("TSQualifiedName").bases("Node").build("left","right").field("left",a).field("right",a),t("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TSType")).field("extra",s({parenthesized:Boolean},null),i.null),t("TSTypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TSType")),t("TSSatisfiesExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TSType")),t("TSNonNullExpression").bases("Expression","Pattern").build("expression").field("expression",t("Expression")),["TSAnyKeyword","TSBigIntKeyword","TSBooleanKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword","TSIntrinsicKeyword","TSThisType"].forEach(p=>{t(p).bases("TSType").build()}),t("TSArrayType").bases("TSType").build("elementType").field("elementType",t("TSType")),t("TSLiteralType").bases("TSType").build("literal").field("literal",s(t("NumericLiteral"),t("StringLiteral"),t("BooleanLiteral"),t("TemplateLiteral"),t("UnaryExpression"),t("BigIntLiteral"))),t("TemplateLiteral").field("expressions",s([t("Expression")],[t("TSType")])),["TSUnionType","TSIntersectionType"].forEach(p=>{t(p).bases("TSType").build("types").field("types",[t("TSType")])}),t("TSConditionalType").bases("TSType").build("checkType","extendsType","trueType","falseType").field("checkType",t("TSType")).field("extendsType",t("TSType")).field("trueType",t("TSType")).field("falseType",t("TSType")),t("TSInferType").bases("TSType").build("typeParameter").field("typeParameter",t("TSTypeParameter")),t("TSParenthesizedType").bases("TSType").build("typeAnnotation").field("typeAnnotation",t("TSType"));var l=[s(t("Identifier"),t("RestElement"),t("ArrayPattern"),t("ObjectPattern"))];["TSFunctionType","TSConstructorType"].forEach(p=>{t(p).bases("TSType","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters").field("parameters",l)}),t("TSDeclareFunction").bases("Declaration","TSHasOptionalTypeParameters").build("id","params","returnType").field("declare",Boolean,i.false).field("async",Boolean,i.false).field("generator",Boolean,i.false).field("id",s(t("Identifier"),null),i.null).field("params",[t("Pattern")]).field("returnType",s(t("TSTypeAnnotation"),t("Noop"),null),i.null),t("TSDeclareMethod").bases("Declaration","TSHasOptionalTypeParameters").build("key","params","returnType").field("async",Boolean,i.false).field("generator",Boolean,i.false).field("params",[t("Pattern")]).field("abstract",Boolean,i.false).field("accessibility",s("public","private","protected",void 0),i.undefined).field("static",Boolean,i.false).field("computed",Boolean,i.false).field("optional",Boolean,i.false).field("key",s(t("Identifier"),t("StringLiteral"),t("NumericLiteral"),t("Expression"))).field("kind",s("get","set","method","constructor"),function(){return"method"}).field("access",s("public","private","protected",void 0),i.undefined).field("decorators",s([t("Decorator")],null),i.null).field("returnType",s(t("TSTypeAnnotation"),t("Noop"),null),i.null),t("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",s(Boolean,"+","-"),i.false).field("typeParameter",t("TSTypeParameter")).field("optional",s(Boolean,"+","-"),i.false).field("typeAnnotation",s(t("TSType"),null),i.null),t("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[s(t("TSType"),t("TSNamedTupleMember"))]),t("TSNamedTupleMember").bases("TSType").build("label","elementType","optional").field("label",t("Identifier")).field("optional",Boolean,i.false).field("elementType",t("TSType")),t("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation",t("TSType")),t("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation",t("TSType")),t("TSIndexedAccessType").bases("TSType").build("objectType","indexType").field("objectType",t("TSType")).field("indexType",t("TSType")),t("TSTypeOperator").bases("TSType").build("operator").field("operator",String).field("typeAnnotation",t("TSType")),t("TSTypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",s(t("TSType"),t("TSTypeAnnotation"))),t("TSIndexSignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",[t("Identifier")]).field("readonly",Boolean,i.false),t("TSPropertySignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("key","typeAnnotation","optional").field("key",t("Expression")).field("computed",Boolean,i.false).field("readonly",Boolean,i.false).field("optional",Boolean,i.false).field("initializer",s(t("Expression"),null),i.null),t("TSMethodSignature").bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("key","parameters","typeAnnotation").field("key",t("Expression")).field("computed",Boolean,i.false).field("optional",Boolean,i.false).field("parameters",l),t("TSTypePredicate").bases("TSTypeAnnotation","TSType").build("parameterName","typeAnnotation","asserts").field("parameterName",s(t("Identifier"),t("TSThisType"))).field("typeAnnotation",s(t("TSTypeAnnotation"),null),i.null).field("asserts",Boolean,i.false),["TSCallSignatureDeclaration","TSConstructSignatureDeclaration"].forEach(p=>{t(p).bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",l)}),t("TSEnumMember").bases("Node").build("id","initializer").field("id",s(t("Identifier"),o)).field("initializer",s(t("Expression"),null),i.null),t("TSTypeQuery").bases("TSType").build("exprName").field("exprName",s(a,t("TSImportType")));var c=s(t("TSCallSignatureDeclaration"),t("TSConstructSignatureDeclaration"),t("TSIndexSignature"),t("TSMethodSignature"),t("TSPropertySignature"));t("TSTypeLiteral").bases("TSType").build("members").field("members",[c]),t("TSTypeParameter").bases("Identifier").build("name","constraint","default").field("name",s(t("Identifier"),String)).field("constraint",s(t("TSType"),void 0),i.undefined).field("default",s(t("TSType"),void 0),i.undefined),t("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",t("TSType")).field("expression",t("Expression")).field("extra",s({parenthesized:Boolean},null),i.null),t("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params",[t("TSTypeParameter")]),t("TSInstantiationExpression").bases("Expression","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",t("Expression")),t("TSTypeParameterInstantiation").bases("Node").build("params").field("params",[t("TSType")]),t("TSEnumDeclaration").bases("Declaration").build("id","members").field("id",t("Identifier")).field("const",Boolean,i.false).field("declare",Boolean,i.false).field("members",[t("TSEnumMember")]).field("initializer",s(t("Expression"),null),i.null),t("TSTypeAliasDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","typeAnnotation").field("id",t("Identifier")).field("declare",Boolean,i.false).field("typeAnnotation",t("TSType")),t("TSModuleBlock").bases("Node").build("body").field("body",[t("Statement")]),t("TSModuleDeclaration").bases("Declaration").build("id","body").field("id",s(o,a)).field("declare",Boolean,i.false).field("global",Boolean,i.false).field("body",s(t("TSModuleBlock"),t("TSModuleDeclaration"),null),i.null),t("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",o).field("qualifier",s(a,void 0),i.undefined),t("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",t("Identifier")).field("isExport",Boolean,i.false).field("moduleReference",s(a,t("TSExternalModuleReference"))),t("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",o),t("TSExportAssignment").bases("Statement").build("expression").field("expression",t("Expression")),t("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id",t("Identifier")),t("TSInterfaceBody").bases("Node").build("body").field("body",[c]),t("TSExpressionWithTypeArguments").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",a),t("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",a).field("declare",Boolean,i.false).field("extends",s([t("TSExpressionWithTypeArguments")],null),i.null).field("body",t("TSInterfaceBody")),t("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",s("public","private","protected",void 0),i.undefined).field("readonly",Boolean,i.false).field("parameter",s(t("Identifier"),t("AssignmentPattern"))),t("ClassProperty").field("access",s("public","private","protected",void 0),i.undefined),t("ClassAccessorProperty").bases("Declaration","TSHasOptionalTypeAnnotation"),t("ClassBody").field("body",[s(t("MethodDefinition"),t("VariableDeclarator"),t("ClassPropertyDefinition"),t("ClassProperty"),t("ClassPrivateProperty"),t("ClassAccessorProperty"),t("ClassMethod"),t("ClassPrivateMethod"),t("StaticBlock"),t("TSDeclareMethod"),c)])}z(()=>module);var Se;Se||(Se={});var{astNodesAreEquivalent:Ru,builders:Qt,builtInTypes:Ie,defineMethod:_u,eachField:ju,finalize:Vu,getBuilderName:zu,getFieldNames:cc,getFieldValue:_e,getSupertypeNames:$u,namedTypes:pc,NodePath:uc,Path:Hu,PathVisitor:qu,someField:dc,Type:Gu,use:Wu,visit:Ku}=Wl([Yt,ic,zi,oc,ac,lc]);Object.assign(Se,pc);var Tn=Se,xi=Fn.default.SourceMapConsumer,fc=Fn.default.SourceMapGenerator,Hi=Object.prototype.hasOwnProperty;function mc(){return`
12846
+ `}function Pi(r,n,e){return r&&Hi.call(r,n)?r[n]:e}function hc(...r){let n={},e=r.length;for(let t=0;t<e;++t){let s=Object.keys(r[t]),i=s.length;for(let o=0;o<i;++o)n[s[o]]=!0}return n}function j(r,n){return r.line-n.line||r.column-n.column}function qe(r){return{line:r.line,column:r.column}}function bc(r,n){if(r){if(!n)return r}else return n||null;let e=new xi(r),t=new xi(n),s=new fc({file:n.file,sourceRoot:n.sourceRoot}),i={};return t.eachMapping(function(o){let a=e.originalPositionFor({line:o.originalLine,column:o.originalColumn}),l=a.source;if(l===null)return;s.addMapping({source:l,original:qe(a),generated:{line:o.generatedLine,column:o.generatedColumn},name:o.name});let c=e.sourceContentFor(l);c&&!Hi.call(i,l)&&(i[l]=c,s.setSourceContent(l,c))}),s.toJSON()}function qi(r,n){if(!r.loc)return null;let e={start:r.loc.start,end:r.loc.end};function t(s){Ks(e,s.loc)}return r.declaration&&r.declaration.decorators&&Un(r)&&r.declaration.decorators.forEach(t),j(e.start,e.end)<0&&(e.start=qe(e.start),n.skipSpaces(e.start,!1,!0),j(e.start,e.end)<0&&(e.end=qe(e.end),n.skipSpaces(e.end,!0,!0))),r.comments&&r.comments.forEach(t),e}function Ks(r,n){r&&n&&(j(n.start,r.start)<0&&(r.start=n.start),j(r.end,n.end)<0&&(r.end=n.end))}function rr(r,n){let e=r.loc;if(e&&(e.start.line<1&&(e.start.line=1),e.end.line<1&&(e.end.line=1)),r.type==="File"&&(e.start=n.firstPos(),e.end=n.lastPos()),gc(r,n),yc(r,n),e&&r.decorators)r.decorators.forEach(function(t){Ks(e,t.loc)});else if(r.declaration&&Un(r)){r.declaration.loc=null;let t=r.declaration.decorators;t&&t.forEach(function(s){Ks(e,s.loc)})}else if(Tn.MethodDefinition&&Tn.MethodDefinition.check(r)||Tn.Property.check(r)&&(r.method||r.shorthand))r.value.loc=null,Tn.FunctionExpression.check(r.value)&&(r.value.id=null);else if(r.type==="ObjectTypeProperty"){let t=r.loc,s=t&&t.end;s&&(s=qe(s),n.prevPos(s)&&n.charAt(s)===","&&(s=n.skipSpaces(s,!0,!0))&&(t.end=s))}}function gc(r,n){if(r.type!=="ForStatement")return;function e(t){let s=t&&t.loc,i=s&&s.start,o=s&&qe(s.end);for(;i&&o&&j(i,o)<0&&(n.prevPos(o),n.charAt(o)===";");)s.end.line=o.line,s.end.column=o.column}e(r.init),e(r.test),e(r.update)}function yc(r,n){if(r.type==="TemplateLiteral"&&r.quasis.length!==0){if(r.loc){let e=qe(r.loc.start),t=r.quasis[0];j(t.loc.start,e)<0&&(t.loc.start=e);let s=qe(r.loc.end),i=r.quasis[r.quasis.length-1];j(s,i.loc.end)<0&&(i.loc.end=s)}r.expressions.forEach(function(e,t){let s=n.skipSpaces(e.loc.start,!0,!1);if(n.prevPos(s)&&n.charAt(s)==="{"&&n.prevPos(s)&&n.charAt(s)==="$"){let o=r.quasis[t];j(s,o.loc.end)<0&&(o.loc.end=s)}let i=n.skipSpaces(e.loc.end,!1,!1);if(n.charAt(i)==="}"){let o=r.quasis[t+1];j(o.loc.start,i)<0&&(o.loc.start=i)}})}}function Un(r){if(r)switch(r.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function Gi(r){let n=r.getParentNode();return r.getName()==="declaration"&&Un(n)?n:null}function Gt(r,n){let e=r.trailingComma;return typeof e=="object"?!!e[n]:!!e}var Xs={tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:mc(),wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:!1,tolerant:!0,quote:null,trailingComma:!1,arrayBracketSpacing:!1,objectCurlySpacing:!0,arrowParensAlways:!1,flowObjectCommas:!0,tokens:!0},vc=Xs.hasOwnProperty;function Bn(r){let n=r||Xs;function e(t){return vc.call(n,t)?n[t]:Xs[t]}return{tabWidth:+e("tabWidth"),useTabs:!!e("useTabs"),reuseWhitespace:!!e("reuseWhitespace"),lineTerminator:e("lineTerminator"),wrapColumn:Math.max(e("wrapColumn"),0),sourceFileName:e("sourceFileName"),sourceMapName:e("sourceMapName"),sourceRoot:e("sourceRoot"),inputSourceMap:e("inputSourceMap"),parser:e("esprima")||e("parser"),range:e("range"),tolerant:e("tolerant"),quote:e("quote"),trailingComma:e("trailingComma"),arrayBracketSpacing:e("arrayBracketSpacing"),objectCurlySpacing:e("objectCurlySpacing"),arrowParensAlways:e("arrowParensAlways"),flowObjectCommas:e("flowObjectCommas"),tokens:!!e("tokens")}}var Js=class r{constructor(n,e,t=e){this.sourceLines=n,this.sourceLoc=e,this.targetLoc=t}slice(n,e,t=n.lastPos()){let s=this.sourceLines,i=this.sourceLoc,o=this.targetLoc;function a(l){let c=i[l],p=o[l],u=e;return l==="end"&&(u=t),xc(s,c,n,p,u)}if(j(e,o.start)<=0)if(j(o.end,t)<=0)o={start:He(o.start,e.line,e.column),end:He(o.end,e.line,e.column)};else{if(j(t,o.start)<=0)return null;i={start:i.start,end:a("end")},o={start:He(o.start,e.line,e.column),end:He(t,e.line,e.column)}}else{if(j(o.end,e)<=0)return null;j(o.end,t)<=0?(i={start:a("start"),end:i.end},o={start:{line:1,column:0},end:He(o.end,e.line,e.column)}):(i={start:a("start"),end:a("end")},o={start:{line:1,column:0},end:He(t,e.line,e.column)})}return new r(this.sourceLines,i,o)}add(n,e){return new r(this.sourceLines,this.sourceLoc,{start:Ti(this.targetLoc.start,n,e),end:Ti(this.targetLoc.end,n,e)})}subtract(n,e){return new r(this.sourceLines,this.sourceLoc,{start:He(this.targetLoc.start,n,e),end:He(this.targetLoc.end,n,e)})}indent(n,e=!1,t=!1){if(n===0)return this;let s=this.targetLoc,i=s.start.line,o=s.end.line;if(e&&i===1&&o===1)return this;if(s={start:s.start,end:s.end},!e||i>1){let a=s.start.column+n;s.start={line:i,column:t?Math.max(0,a):a}}if(!e||o>1){let a=s.end.column+n;s.end={line:o,column:t?Math.max(0,a):a}}return new r(this.sourceLines,this.sourceLoc,s)}};function Ti(r,n,e){return{line:r.line+n-1,column:r.line===1?r.column+e:r.column}}function He(r,n,e){return{line:r.line-n+1,column:r.line===n?r.column-e:r.column}}function xc(r,n,e,t,s){let i=j(t,s);if(i===0)return n;let o,a;if(i<0){o=r.skipSpaces(n)||r.lastPos(),a=e.skipSpaces(t)||e.lastPos();let l=s.line-a.line;for(o.line+=l,a.line+=l,l>0&&(o.column=0,a.column=0);j(a,s)<0&&e.nextPos(a,!0););}else{o=r.skipSpaces(n,!0)||r.firstPos(),a=e.skipSpaces(t,!0)||e.firstPos();let l=s.line-a.line;for(o.line+=l,a.line+=l,l<0&&(o.column=r.getLineLength(o.line),a.column=e.getLineLength(a.line));j(s,a)<0&&e.prevPos(a,!0););}return o}var Pc=Object.defineProperty,Tc=(r,n,e)=>n in r?Pc(r,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[n]=e,_t=(r,n,e)=>(Tc(r,typeof n!="symbol"?n+"":n,e),e),gt=class r{constructor(n,e=null){this.infos=n,_t(this,"length"),_t(this,"name"),_t(this,"mappings",[]),_t(this,"cachedSourceMap",null),_t(this,"cachedTabWidth"),this.length=n.length,this.name=e||null,this.name&&this.mappings.push(new Js(this,{start:this.firstPos(),end:this.lastPos()}))}toString(n){return this.sliceString(this.firstPos(),this.lastPos(),n)}getSourceMap(n,e){if(!n)return null;let t=this;function s(a){return a=a||{},a.file=n,e&&(a.sourceRoot=e),a}if(t.cachedSourceMap)return s(t.cachedSourceMap.toJSON());let i=new Fn.default.SourceMapGenerator(s()),o={};return t.mappings.forEach(function(a){let l=a.sourceLines.skipSpaces(a.sourceLoc.start)||a.sourceLines.lastPos(),c=t.skipSpaces(a.targetLoc.start)||t.lastPos();for(;j(l,a.sourceLoc.end)<0&&j(c,a.targetLoc.end)<0;){a.sourceLines.charAt(l),t.charAt(c);let p=a.sourceLines.name;if(i.addMapping({source:p,original:{line:l.line,column:l.column},generated:{line:c.line,column:c.column}}),!Ys.call(o,p)){let u=a.sourceLines.toString();i.setSourceContent(p,u),o[p]=u}t.nextPos(c,!0),a.sourceLines.nextPos(l,!0)}}),t.cachedSourceMap=i,i.toJSON()}bootstrapCharAt(n){let e=n.line,t=n.column,s=this.toString().split(Qs),i=s[e-1];return typeof i>"u"?"":t===i.length&&e<s.length?`
11854
12847
  `:t>=i.length?"":i.charAt(t)}charAt(n){let e=n.line,t=n.column,s=this,i=s.infos,o=i[e-1],a=t;if(typeof o>"u"||a<0)return"";let l=this.getIndentAt(e);return a<l?" ":(a+=o.sliceStart-l,a===o.sliceEnd&&e<this.length?`
11855
12848
  `:a>=o.sliceEnd?"":o.line.charAt(a))}stripMargin(n,e){if(n===0)return this;if(e&&this.length===1)return this;let t=new r(this.infos.map(function(s,i){return s.line&&(i>0||!e)&&(s={...s,indent:Math.max(0,s.indent-n)}),s}));if(this.mappings.length>0){let s=t.mappings;this.mappings.forEach(function(i){s.push(i.indent(n,e,!0))})}return t}indent(n){if(n===0)return this;let e=new r(this.infos.map(function(t){return t.line&&!t.locked&&(t={...t,indent:t.indent+n}),t}));if(this.mappings.length>0){let t=e.mappings;this.mappings.forEach(function(s){t.push(s.indent(n))})}return e}indentTail(n){if(n===0)return this;if(this.length<2)return this;let e=new r(this.infos.map(function(t,s){return s>0&&t.line&&!t.locked&&(t={...t,indent:t.indent+n}),t}));if(this.mappings.length>0){let t=e.mappings;this.mappings.forEach(function(s){t.push(s.indent(n,!0))})}return e}lockIndentTail(){return this.length<2?this:new r(this.infos.map((n,e)=>({...n,locked:e>0})))}getIndentAt(n){return Math.max(this.infos[n-1].indent,0)}guessTabWidth(){if(typeof this.cachedTabWidth=="number")return this.cachedTabWidth;let n=[],e=0;for(let i=1,o=this.length;i<=o;++i){let a=this.infos[i-1],l=a.line.slice(a.sliceStart,a.sliceEnd);if(ft(l))continue;let c=Math.abs(a.indent-e);n[c]=~~n[c]+1,e=a.indent}let t=-1,s=2;for(let i=1;i<n.length;i+=1)Ys.call(n,i)&&n[i]>t&&(t=n[i],s=i);return this.cachedTabWidth=s}startsWithComment(){if(this.infos.length===0)return!1;let n=this.infos[0],e=n.sliceStart,t=n.sliceEnd,s=n.line.slice(e,t).trim();return s.length===0||s.slice(0,2)==="//"||s.slice(0,2)==="/*"}isOnlyWhitespace(){return ft(this.toString())}isPrecededOnlyByWhitespace(n){let e=this.infos[n.line-1],t=Math.max(e.indent,0),s=n.column-t;if(s<=0)return!0;let i=e.sliceStart,o=Math.min(i+s,e.sliceEnd),a=e.line.slice(i,o);return ft(a)}getLineLength(n){let e=this.infos[n-1];return this.getIndentAt(n)+e.sliceEnd-e.sliceStart}nextPos(n,e=!1){let t=Math.max(n.line,0);return Math.max(n.column,0)<this.getLineLength(t)?(n.column+=1,e?!!this.skipSpaces(n,!1,!0):!0):t<this.length?(n.line+=1,n.column=0,e?!!this.skipSpaces(n,!1,!0):!0):!1}prevPos(n,e=!1){let t=n.line,s=n.column;if(s<1){if(t-=1,t<1)return!1;s=this.getLineLength(t)}else s=Math.min(s-1,this.getLineLength(t));return n.line=t,n.column=s,e?!!this.skipSpaces(n,!0,!0):!0}firstPos(){return{line:1,column:0}}lastPos(){return{line:this.length,column:this.getLineLength(this.length)}}skipSpaces(n,e=!1,t=!1){if(n?n=t?n:{line:n.line,column:n.column}:e?n=this.lastPos():n=this.firstPos(),e){for(;this.prevPos(n);)if(!ft(this.charAt(n))&&this.nextPos(n))return n;return null}else{for(;ft(this.charAt(n));)if(!this.nextPos(n))return null;return n}}trimLeft(){let n=this.skipSpaces(this.firstPos(),!1,!0);return n?this.slice(n):Ye}trimRight(){let n=this.skipSpaces(this.lastPos(),!0,!0);return n?this.slice(this.firstPos(),n):Ye}trim(){let n=this.skipSpaces(this.firstPos(),!1,!0);if(n===null)return Ye;let e=this.skipSpaces(this.lastPos(),!0,!0);return e===null?Ye:this.slice(n,e)}eachPos(n,e=this.firstPos(),t=!1){let s=this.firstPos();if(e&&(s.line=e.line,s.column=e.column),!(t&&!this.skipSpaces(s,!1,!0)))do n.call(this,s);while(this.nextPos(s,t))}bootstrapSlice(n,e){let t=this.toString().split(Qs).slice(n.line-1,e.line);return t.length>0&&(t.push(t.pop().slice(0,e.column)),t[0]=t[0].slice(n.column)),w(t.join(`
11856
- `))}slice(n,e){if(!e){if(!n)return this;e=this.lastPos()}if(!n)throw new Error("cannot slice with end but not start");let t=this.infos.slice(n.line-1,e.line);n.line===e.line?t[0]=mt(t[0],n.column,e.column):(t[0]=mt(t[0],n.column),t.push(mt(t.pop(),0,e.column)));let s=new r(t);if(this.mappings.length>0){let i=s.mappings;this.mappings.forEach(function(o){let a=o.slice(this,n,e);a&&i.push(a)},this)}return s}bootstrapSliceString(n,e,t){return this.slice(n,e).toString(t)}sliceString(n=this.firstPos(),e=this.lastPos(),t){let{tabWidth:s,useTabs:i,reuseWhitespace:o,lineTerminator:a}=Rn(t),l=[];for(let c=n.line;c<=e.line;++c){let p=this.infos[c-1];c===n.line?c===e.line?p=mt(p,n.column,e.column):p=mt(p,n.column):c===e.line&&(p=mt(p,0,e.column));let u=Math.max(p.indent,0),f=p.line.slice(0,p.sliceStart);if(o&&ft(f)&&Wi(f,s)===u){l.push(p.line.slice(0,p.sliceEnd));continue}let m=0,d=u;i&&(m=Math.floor(u/s),d-=m*s);let g="";m>0&&(g+=new Array(m+1).join(" ")),d>0&&(g+=new Array(d+1).join(" ")),g+=p.line.slice(p.sliceStart,p.sliceEnd),l.push(g)}return l.join(a)}isEmpty(){return this.length<2&&this.getLineLength(1)<1}join(n){let e=this,t=[],s=[],i;function o(c){if(c!==null){if(i){let p=c.infos[0],u=new Array(p.indent+1).join(" "),f=t.length,m=Math.max(i.indent,0)+i.sliceEnd-i.sliceStart;i.line=i.line.slice(0,i.sliceEnd)+u+p.line.slice(p.sliceStart,p.sliceEnd),i.locked=i.locked||p.locked,i.sliceEnd=i.line.length,c.mappings.length>0&&c.mappings.forEach(function(d){s.push(d.add(f,m))})}else c.mappings.length>0&&s.push.apply(s,c.mappings);c.infos.forEach(function(p,u){(!i||u>0)&&(i={...p},t.push(i))})}}function a(c,p){p>0&&o(e),o(c)}if(n.map(function(c){let p=w(c);return p.isEmpty()?null:p}).forEach((c,p)=>{e.isEmpty()?o(c):a(c,p)}),t.length<1)return Ye;let l=new r(t);return l.mappings=s,l}concat(...n){let e=[this];return e.push.apply(e,n),Ye.join(e)}},In={},Ys=In.hasOwnProperty,wc=10;function Wi(r,n){let e=0,t=r.length;for(let s=0;s<t;++s)switch(r.charCodeAt(s)){case 9:{let i=Math.ceil(e/n)*n;i===e?e+=n:e=i;break}case 11:case 12:case 13:case 65279:break;case 32:default:e+=1;break}return e}var Cc=/^\s*/,Qs=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;function w(r,n){if(r instanceof gt)return r;r+="";let e=n&&n.tabWidth,t=r.indexOf(" ")<0,s=!n&&t&&r.length<=wc;if(s&&Ys.call(In,r))return In[r];let i=new gt(r.split(Qs).map(function(o){let a=Cc.exec(o)[0];return{line:o,indent:Wi(a,e),locked:!1,sliceStart:a.length,sliceEnd:o.length}}),Rn(n).sourceFileName);return s&&(In[r]=i),i}function ft(r){return!/\S/.test(r)}function mt(r,n,e){let t=r.sliceStart,s=r.sliceEnd,i=Math.max(r.indent,0),o=i+s-t;return typeof e>"u"&&(e=o),n=Math.max(n,0),e=Math.min(e,o),e=Math.max(e,n),e<i?(i=e,s=t):s-=o-e,o=e,o-=n,n<i?i-=n:(n-=i,i=0,t+=n),r.indent===i&&r.sliceStart===t&&r.sliceEnd===s?r:{line:r.line,indent:i,locked:!1,sliceStart:t,sliceEnd:s}}function v(r){return Ye.join(r)}var Ye=w(""),yt=Se,Ki=Ie.array,Sc=Ie.object,wi=new WeakMap;function Xi(r,n,e){if(!r)return e;if(rr(r,n),e){if(yt.Node.check(r)&&yt.SourceLocation.check(r.loc)){let s=e.length-1;for(;s>=0;--s){let i=e[s];if(i&&i.loc&&j(i.loc.end,r.loc.start)<=0)break}return e.splice(s+1,0,r),e}}else{let s=wi.get(r);if(s)return s}let t;if(Ki.check(r))t=Object.keys(r);else if(Sc.check(r))t=cc(r);else return e;e||wi.set(r,e=[]);for(let s=0,i=t.length;s<i;++s)Xi(r[t[s]],n,e);return e}function Ji(r,n,e){let t=Xi(r,e),s=0,i=t&&t.length,o,a;for(;typeof i=="number"&&s<i;){let l=s+i>>1,c=t[l];if(j(c.loc.start,n.loc.start)<=0&&j(n.loc.end,c.loc.end)<=0){Ji(n.enclosingNode=c,n,e);return}if(j(c.loc.end,n.loc.start)<=0){o=c,s=l+1;continue}if(j(n.loc.end,c.loc.start)<=0){a=c,i=l;continue}throw new Error("Comment location overlaps with node location")}o&&(n.precedingNode=o),a&&(n.followingNode=a)}function Ic(r,n,e){if(!Ki.check(r))return;let t=[];r.forEach(function(s){s.loc.lines=e,Ji(n,s,e);let i=s.precedingNode,o=s.enclosingNode,a=s.followingNode;if(i&&a){let l=t.length;l>0&&t[l-1].followingNode!==s.followingNode&&jt(t,e),t.push(s)}else if(i)jt(t,e),Qi(i,s);else if(a)jt(t,e),Yi(a,s);else if(o)jt(t,e),Ec(o,s);else throw new Error("AST contains no nodes at all?")}),jt(t,e),r.forEach(function(s){delete s.precedingNode,delete s.enclosingNode,delete s.followingNode})}function jt(r,n){let e=r.length;if(e===0)return;let t=r[0].precedingNode,s=r[0].followingNode,i=s.loc.start,o=e,a;for(;o>0;--o){a=r[o-1];let l=n.sliceString(a.loc.end,i);if(/\S/.test(l))break;i=a.loc.start}for(;o<=e&&(a=r[o])&&(a.type==="Line"||a.type==="CommentLine")&&a.loc.start.column>s.loc.start.column;)++o;if(o){let{enclosingNode:l}=r[o-1];l?.type==="CallExpression"&&--o}r.forEach(function(l,c){c<o?Qi(t,l):Yi(s,l)}),r.length=0}function ir(r,n){(r.comments||(r.comments=[])).push(n)}function Yi(r,n){n.leading=!0,n.trailing=!1,ir(r,n)}function Ec(r,n){n.leading=!1,n.trailing=!1,ir(r,n)}function Qi(r,n){n.leading=!1,n.trailing=!0,ir(r,n)}function Ac(r,n){let e=r.getValue();yt.Comment.assert(e);let t=e.loc,s=t&&t.lines,i=[n(r)];if(e.trailing)i.push(`
12849
+ `))}slice(n,e){if(!e){if(!n)return this;e=this.lastPos()}if(!n)throw new Error("cannot slice with end but not start");let t=this.infos.slice(n.line-1,e.line);n.line===e.line?t[0]=mt(t[0],n.column,e.column):(t[0]=mt(t[0],n.column),t.push(mt(t.pop(),0,e.column)));let s=new r(t);if(this.mappings.length>0){let i=s.mappings;this.mappings.forEach(function(o){let a=o.slice(this,n,e);a&&i.push(a)},this)}return s}bootstrapSliceString(n,e,t){return this.slice(n,e).toString(t)}sliceString(n=this.firstPos(),e=this.lastPos(),t){let{tabWidth:s,useTabs:i,reuseWhitespace:o,lineTerminator:a}=Bn(t),l=[];for(let c=n.line;c<=e.line;++c){let p=this.infos[c-1];c===n.line?c===e.line?p=mt(p,n.column,e.column):p=mt(p,n.column):c===e.line&&(p=mt(p,0,e.column));let u=Math.max(p.indent,0),f=p.line.slice(0,p.sliceStart);if(o&&ft(f)&&Wi(f,s)===u){l.push(p.line.slice(0,p.sliceEnd));continue}let m=0,d=u;i&&(m=Math.floor(u/s),d-=m*s);let g="";m>0&&(g+=new Array(m+1).join(" ")),d>0&&(g+=new Array(d+1).join(" ")),g+=p.line.slice(p.sliceStart,p.sliceEnd),l.push(g)}return l.join(a)}isEmpty(){return this.length<2&&this.getLineLength(1)<1}join(n){let e=this,t=[],s=[],i;function o(c){if(c!==null){if(i){let p=c.infos[0],u=new Array(p.indent+1).join(" "),f=t.length,m=Math.max(i.indent,0)+i.sliceEnd-i.sliceStart;i.line=i.line.slice(0,i.sliceEnd)+u+p.line.slice(p.sliceStart,p.sliceEnd),i.locked=i.locked||p.locked,i.sliceEnd=i.line.length,c.mappings.length>0&&c.mappings.forEach(function(d){s.push(d.add(f,m))})}else c.mappings.length>0&&s.push.apply(s,c.mappings);c.infos.forEach(function(p,u){(!i||u>0)&&(i={...p},t.push(i))})}}function a(c,p){p>0&&o(e),o(c)}if(n.map(function(c){let p=w(c);return p.isEmpty()?null:p}).forEach((c,p)=>{e.isEmpty()?o(c):a(c,p)}),t.length<1)return Ye;let l=new r(t);return l.mappings=s,l}concat(...n){let e=[this];return e.push.apply(e,n),Ye.join(e)}},In={},Ys=In.hasOwnProperty,wc=10;function Wi(r,n){let e=0,t=r.length;for(let s=0;s<t;++s)switch(r.charCodeAt(s)){case 9:{let i=Math.ceil(e/n)*n;i===e?e+=n:e=i;break}case 11:case 12:case 13:case 65279:break;case 32:default:e+=1;break}return e}var Cc=/^\s*/,Qs=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;function w(r,n){if(r instanceof gt)return r;r+="";let e=n&&n.tabWidth,t=r.indexOf(" ")<0,s=!n&&t&&r.length<=wc;if(s&&Ys.call(In,r))return In[r];let i=new gt(r.split(Qs).map(function(o){let a=Cc.exec(o)[0];return{line:o,indent:Wi(a,e),locked:!1,sliceStart:a.length,sliceEnd:o.length}}),Bn(n).sourceFileName);return s&&(In[r]=i),i}function ft(r){return!/\S/.test(r)}function mt(r,n,e){let t=r.sliceStart,s=r.sliceEnd,i=Math.max(r.indent,0),o=i+s-t;return typeof e>"u"&&(e=o),n=Math.max(n,0),e=Math.min(e,o),e=Math.max(e,n),e<i?(i=e,s=t):s-=o-e,o=e,o-=n,n<i?i-=n:(n-=i,i=0,t+=n),r.indent===i&&r.sliceStart===t&&r.sliceEnd===s?r:{line:r.line,indent:i,locked:!1,sliceStart:t,sliceEnd:s}}function v(r){return Ye.join(r)}var Ye=w(""),yt=Se,Ki=Ie.array,Sc=Ie.object,wi=new WeakMap;function Xi(r,n,e){if(!r)return e;if(rr(r,n),e){if(yt.Node.check(r)&&yt.SourceLocation.check(r.loc)){let s=e.length-1;for(;s>=0;--s){let i=e[s];if(i&&i.loc&&j(i.loc.end,r.loc.start)<=0)break}return e.splice(s+1,0,r),e}}else{let s=wi.get(r);if(s)return s}let t;if(Ki.check(r))t=Object.keys(r);else if(Sc.check(r))t=cc(r);else return e;e||wi.set(r,e=[]);for(let s=0,i=t.length;s<i;++s)Xi(r[t[s]],n,e);return e}function Ji(r,n,e){let t=Xi(r,e),s=0,i=t&&t.length,o,a;for(;typeof i=="number"&&s<i;){let l=s+i>>1,c=t[l];if(j(c.loc.start,n.loc.start)<=0&&j(n.loc.end,c.loc.end)<=0){Ji(n.enclosingNode=c,n,e);return}if(j(c.loc.end,n.loc.start)<=0){o=c,s=l+1;continue}if(j(n.loc.end,c.loc.start)<=0){a=c,i=l;continue}throw new Error("Comment location overlaps with node location")}o&&(n.precedingNode=o),a&&(n.followingNode=a)}function Ic(r,n,e){if(!Ki.check(r))return;let t=[];r.forEach(function(s){s.loc.lines=e,Ji(n,s,e);let i=s.precedingNode,o=s.enclosingNode,a=s.followingNode;if(i&&a){let l=t.length;l>0&&t[l-1].followingNode!==s.followingNode&&jt(t,e),t.push(s)}else if(i)jt(t,e),Qi(i,s);else if(a)jt(t,e),Yi(a,s);else if(o)jt(t,e),Ec(o,s);else throw new Error("AST contains no nodes at all?")}),jt(t,e),r.forEach(function(s){delete s.precedingNode,delete s.enclosingNode,delete s.followingNode})}function jt(r,n){let e=r.length;if(e===0)return;let t=r[0].precedingNode,s=r[0].followingNode,i=s.loc.start,o=e,a;for(;o>0;--o){a=r[o-1];let l=n.sliceString(a.loc.end,i);if(/\S/.test(l))break;i=a.loc.start}for(;o<=e&&(a=r[o])&&(a.type==="Line"||a.type==="CommentLine")&&a.loc.start.column>s.loc.start.column;)++o;if(o){let{enclosingNode:l}=r[o-1];l?.type==="CallExpression"&&--o}r.forEach(function(l,c){c<o?Qi(t,l):Yi(s,l)}),r.length=0}function ir(r,n){(r.comments||(r.comments=[])).push(n)}function Yi(r,n){n.leading=!0,n.trailing=!1,ir(r,n)}function Ec(r,n){n.leading=!1,n.trailing=!1,ir(r,n)}function Qi(r,n){n.leading=!1,n.trailing=!0,ir(r,n)}function Ac(r,n){let e=r.getValue();yt.Comment.assert(e);let t=e.loc,s=t&&t.lines,i=[n(r)];if(e.trailing)i.push(`
11857
12850
  `);else if(s instanceof gt){let o=s.slice(t.end,s.skipSpaces(t.end)||s.lastPos());o.length===1?i.push(o):i.push(new Array(o.length).join(`
11858
12851
  `))}else i.push(`
11859
12852
  `);return v(i)}function kc(r,n){let e=r.getValue(r);yt.Comment.assert(e);let t=e.loc,s=t&&t.lines,i=[];if(s instanceof gt){let o=s.skipSpaces(t.start,!0)||s.firstPos(),a=s.slice(o,t.start);a.length===1?i.push(a):i.push(new Array(a.length).join(`
11860
- `))}return i.push(n(r)),v(i)}function Ci(r,n){let e=r.getValue(),t=n(r),s=yt.Node.check(e)&&Be(e,"comments");if(!s||s.length===0)return t;let i=[],o=[t];return r.each(function(a){let l=a.getValue(),c=Be(l,"leading"),p=Be(l,"trailing");c||p&&!(yt.Statement.check(e)||l.type==="Block"||l.type==="CommentBlock")?i.push(Ac(a,n)):p&&o.push(kc(a,n))},"comments"),i.push.apply(i,o),v(i)}var Nc=Qt,Dc=Ie.object,Mc=Ie.array;function Lc(r,n){n=Rn(n);let e=w(r,n),t=e.toString({tabWidth:n.tabWidth,reuseWhitespace:!1,useTabs:!1}),s=[],i=n.parser.parse(t,{jsx:!0,loc:!0,locations:!0,range:n.range,comment:!0,onComment:s,tolerant:Pi(n,"tolerant",!0),ecmaVersion:6,sourceType:Pi(n,"sourceType","module")}),o=Array.isArray(i.tokens)?i.tokens:!1;delete i.tokens,o.forEach(function(p){typeof p.value!="string"&&(p.value=e.sliceString(p.loc.start,p.loc.end))}),Array.isArray(i.comments)&&(s=i.comments,delete i.comments),i.loc?rr(i,e):i.loc={start:e.firstPos(),end:e.lastPos()},i.loc.lines=e,i.loc.indent=0;let a,l;i.type==="Program"?(l=i,a=Nc.file(i,n.sourceFileName||null),a.loc={start:e.firstPos(),end:e.lastPos(),lines:e,indent:0}):i.type==="File"&&(a=i,l=a.program),n.tokens&&(a.tokens=o);let c=Hi({type:l.type,loc:l.loc,body:[],comments:s},e);return l.loc.start=c.start,l.loc.end=c.end,Ic(s,l.body.length?a.program:a,e),new Zi(e,o).copy(a)}var Zi=function(n,e){this.lines=n,this.tokens=e,this.startTokenIndex=0,this.endTokenIndex=e.length,this.indent=0,this.seen=new Map},eo=Zi.prototype;eo.copy=function(r){if(this.seen.has(r))return this.seen.get(r);if(Mc.check(r)){let c=new Array(r.length);return this.seen.set(r,c),r.forEach(function(p,u){c[u]=this.copy(p)},this),c}if(!Dc.check(r))return r;rr(r,this.lines);let n=Object.create(Object.getPrototypeOf(r),{original:{value:r,configurable:!1,enumerable:!1,writable:!0}});this.seen.set(r,n);let e=r.loc,t=this.indent,s=t,i=this.startTokenIndex,o=this.endTokenIndex;e&&((r.type==="Block"||r.type==="Line"||r.type==="CommentBlock"||r.type==="CommentLine"||this.lines.isPrecededOnlyByWhitespace(e.start))&&(s=this.indent=e.start.column),e.lines=this.lines,e.tokens=this.tokens,e.indent=s,this.findTokenRange(e));let a=Object.keys(r),l=a.length;for(let c=0;c<l;++c){let p=a[c];p==="loc"||p==="tokens"&&r.type==="File"?n[p]=r[p]:n[p]=this.copy(r[p])}return this.indent=t,this.startTokenIndex=i,this.endTokenIndex=o,n};eo.findTokenRange=function(r){for(;this.startTokenIndex>0;){let n=r.tokens[this.startTokenIndex];if(j(r.start,n.loc.start)<0)--this.startTokenIndex;else break}for(;this.endTokenIndex<r.tokens.length;){let n=r.tokens[this.endTokenIndex];if(j(n.loc.end,r.end)<0)++this.endTokenIndex;else break}for(;this.startTokenIndex<this.endTokenIndex;){let n=r.tokens[this.startTokenIndex];if(j(n.loc.start,r.start)<0)++this.startTokenIndex;else break}for(r.start.token=this.startTokenIndex;this.endTokenIndex>this.startTokenIndex;){let n=r.tokens[this.endTokenIndex-1];if(j(r.end,n.loc.end)<0)--this.endTokenIndex;else break}r.end.token=this.endTokenIndex};var W=Se,Oc=Ie.array,Fc=Ie.number,Zs={};[["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(r,n){r.forEach(function(e){Zs[e]=n})});var Ce=function(n){this.stack=[n]},te=Ce.prototype;Ce.from=function(r){if(r instanceof Ce)return r.copy();if(r instanceof uc){let n=Object.create(Ce.prototype),e=[r.value];for(let t;t=r.parentPath;r=t)e.push(r.name,t.value);return n.stack=e.reverse(),n}return new Ce(r)};te.copy=function(){let n=Object.create(Ce.prototype);return n.stack=this.stack.slice(0),n};te.getName=function(){let n=this.stack,e=n.length;return e>1?n[e-2]:null};te.getValue=function(){let n=this.stack;return n[n.length-1]};te.valueIsDuplicate=function(){let r=this.stack,n=r.length-1;return r.lastIndexOf(r[n],n-1)>=0};function to(r,n){let e=r.stack;for(let t=e.length-1;t>=0;t-=2){let s=e[t];if(W.Node.check(s)&&--n<0)return s}return null}te.getNode=function(n=0){return to(this,~~n)};te.getParentNode=function(n=0){return to(this,~~n+1)};te.getRootValue=function(){let n=this.stack;return n.length%2===0?n[1]:n[0]};te.call=function(n){let e=this.stack,t=e.length,s=e[t-1],i=arguments.length;for(let a=1;a<i;++a){let l=arguments[a];s=s[l],e.push(l,s)}let o=n(this);return e.length=t,o};te.each=function(n){let e=this.stack,t=e.length,s=e[t-1],i=arguments.length;for(let o=1;o<i;++o){let a=arguments[o];s=s[a],e.push(a,s)}for(let o=0;o<s.length;++o)o in s&&(e.push(o,s[o]),n(this),e.length-=2);e.length=t};te.map=function(n){let e=this.stack,t=e.length,s=e[t-1],i=arguments.length;for(let a=1;a<i;++a){let l=arguments[a];s=s[l],e.push(l,s)}let o=new Array(s.length);for(let a=0;a<s.length;++a)a in s&&(e.push(a,s[a]),o[a]=n(this,a),e.length-=2);return e.length=t,o};te.hasParens=function(){let r=this.getNode(),n=this.getPrevToken(r);if(!n)return!1;let e=this.getNextToken(r);return e?!!(n.value==="("&&(e.value===")"||!this.canBeFirstInStatement()&&this.firstInStatement()&&!this.needsParens(!0))):!1};te.getPrevToken=function(r){r=r||this.getNode();let n=r&&r.loc,e=n&&n.tokens;if(e&&n.start.token>0){let t=e[n.start.token-1];if(t){let s=this.getRootValue().loc;if(j(s.start,t.loc.start)<=0)return t}}return null};te.getNextToken=function(r){r=r||this.getNode();let n=r&&r.loc,e=n&&n.tokens;if(e&&n.end.token<e.length){let t=e[n.end.token];if(t){let s=this.getRootValue().loc;if(j(t.loc.end,s.end)<=0)return t}}return null};te.needsParens=function(r){let n=this.getNode();if(n.type==="AssignmentExpression"&&n.left.type==="ObjectPattern")return!0;let e=this.getParentNode(),t=this.getName();if(this.getValue()!==n||W.Statement.check(n)||n.type==="Identifier"||e&&e.type==="ParenthesizedExpression")return!1;if(n.extra&&n.extra.parenthesized)return!0;if(!e)return!1;if(n.type==="UnaryExpression"&&e.type==="BinaryExpression"&&t==="left"&&e.left===n&&e.operator==="**")return!0;switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return e.type==="MemberExpression"&&t==="object"&&e.object===n;case"BinaryExpression":case"LogicalExpression":switch(e.type){case"CallExpression":return t==="callee"&&e.callee===n;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return t==="object"&&e.object===n;case"BinaryExpression":case"LogicalExpression":{let s=e.operator,i=Zs[s],o=n.operator,a=Zs[o];if(i>a||i===a&&t==="right")return!0;break}default:return!1}break;case"SequenceExpression":switch(e.type){case"ReturnStatement":return!1;case"ForStatement":return!1;case"ExpressionStatement":return t!=="expression";default:return!0}case"OptionalIndexedAccessType":return n.optional&&e.type==="IndexedAccessType";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return e.type==="NullableTypeAnnotation";case"Literal":return e.type==="MemberExpression"&&Fc.check(n.value)&&t==="object"&&e.object===n;case"NumericLiteral":return e.type==="MemberExpression"&&t==="object"&&e.object===n;case"YieldExpression":case"AwaitExpression":case"AssignmentExpression":case"ConditionalExpression":switch(e.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":case"NewExpression":return t==="callee"&&e.callee===n;case"ConditionalExpression":return t==="test"&&e.test===n;case"MemberExpression":return t==="object"&&e.object===n;default:return!1}case"ArrowFunctionExpression":return W.CallExpression.check(e)&&t==="callee"&&e.callee===n||W.MemberExpression.check(e)&&t==="object"&&e.object===n||W.TSAsExpression&&W.TSAsExpression.check(e)&&t==="expression"&&e.expression===n?!0:no(e);case"ObjectExpression":if(e.type==="ArrowFunctionExpression"&&t==="body"&&e.body===n)return!0;break;case"TSAsExpression":if(e.type==="ArrowFunctionExpression"&&t==="body"&&e.body===n&&n.expression.type==="ObjectExpression")return!0;break;case"CallExpression":if(t==="declaration"&&W.ExportDefaultDeclaration.check(e)&&W.FunctionExpression.check(n.callee))return!0}return e.type==="NewExpression"&&t==="callee"&&e.callee===n?er(n):!!(r!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function no(r){return W.BinaryExpression.check(r)||W.LogicalExpression.check(r)}function er(r){return W.CallExpression.check(r)?!0:Oc.check(r)?r.some(er):W.Node.check(r)?dc(r,(n,e)=>er(e)):!1}te.canBeFirstInStatement=function(){let r=this.getNode();return!(W.FunctionExpression.check(r)||W.ObjectExpression.check(r)||W.ClassExpression.check(r))};te.firstInStatement=function(){let r=this.stack,n,e,t,s;for(let i=r.length-1;i>=0;i-=2)if(W.Node.check(r[i])&&(t=n,s=e,n=r[i-1],e=r[i]),!(!e||!s)){if(W.BlockStatement.check(e)&&n==="body"&&t===0||W.ExpressionStatement.check(e)&&t==="expression"||W.AssignmentExpression.check(e)&&t==="left"||W.ArrowFunctionExpression.check(e)&&t==="body")return!0;if(!(W.SequenceExpression.check(e)&&r[i+1]==="expressions"&&t===0)&&!(W.CallExpression.check(e)&&t==="callee")&&!(W.MemberExpression.check(e)&&t==="object")&&!(W.ConditionalExpression.check(e)&&t==="test")&&!(no(e)&&t==="left")&&!(W.UnaryExpression.check(e)&&!e.prefix&&t==="argument"))return!1}return!0};var Kt=Se.Printable,Si=Se.Expression,Uc=Se.ReturnStatement,Rc=Se.SourceLocation,Xt=Ie.object,tr=Ie.array,_c=Ie.string,Ln=/[0-9a-z_$]/i,so=function(n){let e=this,t=[];e.replace=function(s,i){_c.check(i)&&(i=w(i)),t.push({lines:i,start:s.start,end:s.end})},e.get=function(s){s=s||{start:{line:1,column:0},end:{line:n.length,column:n.getLineLength(n.length)}};let i=s.start,o=[];function a(l,c){o.push(n.slice(l,c))}return t.sort((l,c)=>j(l.start,c.start)).forEach(function(l){j(i,l.start)>0||(a(i,l.start),o.push(l.lines),i=l.end)}),a(i,s.end),v(o)}},ro=so.prototype;ro.tryToReprintComments=function(r,n,e){let t=this;if(!r.comments&&!n.comments)return!0;let s=Ce.from(r),i=Ce.from(n);s.stack.push("comments",Ii(r)),i.stack.push("comments",Ii(n));let o=[],a=oo(s,i,o);return a&&o.length>0&&o.forEach(function(l){let c=l.oldPath.getValue();t.replace(c.loc,e(l.newPath).indentTail(c.loc.indent))}),a};function Ii(r){let n=[];return r.comments&&r.comments.length>0&&r.comments.forEach(function(e){(e.leading||e.trailing)&&n.push(e)}),n}ro.deleteComments=function(r){if(!r.comments)return;let n=this;r.comments.forEach(function(e){e.leading?n.replace({start:e.loc.start,end:r.loc.lines.skipSpaces(e.loc.end,!1,!1)},""):e.trailing&&n.replace({start:r.loc.lines.skipSpaces(e.loc.start,!0,!1),end:e.loc.end},"")})};function Bc(r){let n=r.getValue();if(!Kt.check(n))return;let e=n.original,t=e&&e.loc,s=t&&t.lines,i=[];if(!(!s||!zc(r,i)))return function(o){let a=new so(s);i.forEach(function(c){let p=c.newPath.getValue(),u=c.oldPath.getValue();Rc.assert(u.loc,!0);let f=!a.tryToReprintComments(p,u,o);f&&a.deleteComments(u);let m=o(c.newPath,{includeComments:f,avoidRootParens:u.type===p.type&&c.oldPath.hasParens()}).indentTail(u.loc.indent),d=jc(s,u.loc,m),g=Vc(s,u.loc,m);if(d||g){let h=[];d&&h.push(" "),h.push(m),g&&h.push(" "),m=v(h)}a.replace(u.loc,m)});let l=a.get(t).indentTail(-e.loc.indent);return r.needsParens()?v(["(",l,")"]):l}}function jc(r,n,e){let t=He(n.start),s=r.prevPos(t)&&r.charAt(t),i=e.charAt(e.firstPos());return s&&Ln.test(s)&&i&&Ln.test(i)}function Vc(r,n,e){let t=r.charAt(n.end),s=e.lastPos(),i=e.prevPos(s)&&e.charAt(s);return i&&Ln.test(i)&&t&&Ln.test(t)}function zc(r,n){let e=r.getValue();Kt.assert(e);let t=e.original;if(Kt.assert(t),e.type!==t.type)return!1;let s=new Ce(t),i=nr(r,s,n);return i||(n.length=0),i}function io(r,n,e){let t=r.getValue(),s=n.getValue();return t===s?!0:tr.check(t)?oo(r,n,e):Xt.check(t)?$c(r,n,e):!1}function oo(r,n,e){let t=r.getValue(),s=n.getValue();if(t===s||r.valueIsDuplicate()||n.valueIsDuplicate())return!0;tr.assert(t);let i=t.length;if(!(tr.check(s)&&s.length===i))return!1;for(let o=0;o<i;++o){r.stack.push(o,t[o]),n.stack.push(o,s[o]);let a=io(r,n,e);if(r.stack.length-=2,n.stack.length-=2,!a)return!1}return!0}function $c(r,n,e){let t=r.getValue();if(Xt.assert(t),t.original===null)return!1;let s=n.getValue();if(!Xt.check(s))return!1;if(t===s||r.valueIsDuplicate()||n.valueIsDuplicate())return!0;if(Kt.check(t)){if(!Kt.check(s))return!1;let i=r.getParentNode(),o=n.getParentNode();if(o!==null&&o.type==="FunctionTypeAnnotation"&&i!==null&&i.type==="FunctionTypeAnnotation"){let a=o.params.length!==1||!!o.params[0].name,l=i.params.length!==1||!!i.params[0].name;if(!a&&l)return!1}if(t.type===s.type){let a=[];if(nr(r,n,a))e.push.apply(e,a);else if(s.loc)e.push({oldPath:n.copy(),newPath:r.copy()});else return!1;return!0}return Si.check(t)&&Si.check(s)&&s.loc?(e.push({oldPath:n.copy(),newPath:r.copy()}),!0):!1}return nr(r,n,e)}function nr(r,n,e){let t=r.getValue(),s=n.getValue();if(Xt.assert(t),Xt.assert(s),t.original===null||r.needsParens()&&!n.hasParens())return!1;let i=hc(s,t);(s.type==="File"||t.type==="File")&&delete i.tokens,delete i.loc;let o=e.length;for(let a in i){if(a.charAt(0)==="_")continue;r.stack.push(a,Be(t,a)),n.stack.push(a,Be(s,a));let l=io(r,n,e);if(r.stack.length-=2,n.stack.length-=2,!l)return!1}return!(Uc.check(r.getNode())&&e.length>o)}var Y=Se,or=Ie.string,qc=Ie.object,On=function(n,e){or.assert(n),this.code=n,e&&(qc.assert(e),this.map=e)},Hc=On.prototype,Ei=!1;Hc.toString=function(){return Ei||(console.warn("Deprecation warning: recast.print now returns an object with a .code property. You appear to be treating the object as a string, which might still work but is strongly discouraged."),Ei=!0),this.code};var Ai=new On(""),Gc=function(n){let e=n&&n.tabWidth;n=Rn(n),n.sourceFileName=null;function t(i,o){return i=Object.assign({},i,o),a=>s(a,i)}function s(i,o){if(o=o||{},o.includeComments)return Ci(i,t(o,{includeComments:!1}));let a=n.tabWidth;if(!e){let p=i.getNode().loc;p&&p.lines&&p.lines.guessTabWidth&&(n.tabWidth=p.lines.guessTabWidth())}let l=Bc(i),c=l?l(s):ki(i,n,o,t(o,{includeComments:!0,avoidRootParens:!1}));return n.tabWidth=a,c}this.print=function(i){if(!i)return Ai;let o=s(Ce.from(i),{includeComments:!0,avoidRootParens:!1});return new On(o.toString(n),bc(n.inputSourceMap,o.getSourceMap(n.sourceMapName,n.sourceRoot)))},this.printGenerically=function(i){if(!i)return Ai;function o(p){return Ci(p,u=>ki(u,n,{includeComments:!0,avoidRootParens:!1},o))}let a=Ce.from(i),l=n.reuseWhitespace;n.reuseWhitespace=!1;let c=new On(o(a).toString(n));return n.reuseWhitespace=l,c}};function ki(r,n,e,t){let s=r.getValue(),i=[],o=Wc(r,n,t);if(!s||o.isEmpty())return o;let a=!1,l=Kc(r,t);return l.isEmpty()?e.avoidRootParens||(a=r.needsParens()):i.push(l),a&&i.unshift("("),i.push(o),a&&i.push(")"),v(i)}function Wc(r,n,e){let t=r.getValue();if(!t)return w("");if(typeof t=="string")return w(t,n);Y.Printable.assert(t);let s=[];switch(t.type){case"File":return r.call(e,"program");case"Program":return t.directives&&r.each(function(i){s.push(e(i),`;
11861
- `)},"directives"),t.interpreter&&s.push(r.call(e,"interpreter")),s.push(r.call(i=>ht(i,n,e),"body")),v(s);case"Noop":case"EmptyStatement":return w("");case"ExpressionStatement":return v([r.call(e,"expression"),";"]);case"ParenthesizedExpression":return v(["(",r.call(e,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return w(" ").join([r.call(e,"left"),t.operator,r.call(e,"right")]);case"AssignmentPattern":return v([r.call(e,"left")," = ",r.call(e,"right")]);case"MemberExpression":case"OptionalMemberExpression":{s.push(r.call(e,"object"));let i=r.call(e,"property"),o=Be(t,"optional");return t.computed?s.push(o?"?.[":"[",i,"]"):s.push(o?"?.":".",i),v(s)}case"ChainExpression":return r.call(e,"expression");case"MetaProperty":return v([r.call(e,"meta"),".",r.call(e,"property")]);case"BindExpression":return t.object&&s.push(r.call(e,"object")),s.push("::",r.call(e,"callee")),v(s);case"Path":return w(".").join(t.body);case"Identifier":return v([w(t.name,n),t.optional?"?":"",r.call(e,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"ObjectTypeSpreadProperty":case"RestElement":return v(["...",r.call(e,"argument"),r.call(e,"typeAnnotation")]);case"FunctionDeclaration":case"FunctionExpression":case"TSDeclareFunction":return t.declare&&s.push("declare "),t.async&&s.push("async "),s.push("function"),t.generator&&s.push("*"),t.id?s.push(" ",r.call(e,"id"),r.call(e,"typeParameters")):t.typeParameters&&s.push(r.call(e,"typeParameters")),s.push("(",Ne(r,n,e),")",r.call(e,"returnType")),t.body&&s.push(" ",r.call(e,"body")),v(s);case"ArrowFunctionExpression":return t.async&&s.push("async "),t.typeParameters&&s.push(r.call(e,"typeParameters")),!n.arrowParensAlways&&t.params.length===1&&!t.rest&&t.params[0].type==="Identifier"&&!t.params[0].typeAnnotation&&!t.returnType?s.push(r.call(e,"params",0)):s.push("(",Ne(r,n,e),")",r.call(e,"returnType")),s.push(" => ",r.call(e,"body")),v(s);case"MethodDefinition":return qs(r,n,e);case"YieldExpression":return s.push("yield"),t.delegate&&s.push("*"),t.argument&&s.push(" ",r.call(e,"argument")),v(s);case"AwaitExpression":return s.push("await"),t.all&&s.push("*"),t.argument&&s.push(" ",r.call(e,"argument")),v(s);case"ModuleExpression":return v([`module {
12853
+ `))}return i.push(n(r)),v(i)}function Ci(r,n){let e=r.getValue(),t=n(r),s=yt.Node.check(e)&&_e(e,"comments");if(!s||s.length===0)return t;let i=[],o=[t];return r.each(function(a){let l=a.getValue(),c=_e(l,"leading"),p=_e(l,"trailing");c||p&&!(yt.Statement.check(e)||l.type==="Block"||l.type==="CommentBlock")?i.push(Ac(a,n)):p&&o.push(kc(a,n))},"comments"),i.push.apply(i,o),v(i)}var Nc=Qt,Mc=Ie.object,Dc=Ie.array;function Lc(r,n){n=Bn(n);let e=w(r,n),t=e.toString({tabWidth:n.tabWidth,reuseWhitespace:!1,useTabs:!1}),s=[],i=n.parser.parse(t,{jsx:!0,loc:!0,locations:!0,range:n.range,comment:!0,onComment:s,tolerant:Pi(n,"tolerant",!0),ecmaVersion:6,sourceType:Pi(n,"sourceType","module")}),o=Array.isArray(i.tokens)?i.tokens:!1;delete i.tokens,o.forEach(function(p){typeof p.value!="string"&&(p.value=e.sliceString(p.loc.start,p.loc.end))}),Array.isArray(i.comments)&&(s=i.comments,delete i.comments),i.loc?rr(i,e):i.loc={start:e.firstPos(),end:e.lastPos()},i.loc.lines=e,i.loc.indent=0;let a,l;i.type==="Program"?(l=i,a=Nc.file(i,n.sourceFileName||null),a.loc={start:e.firstPos(),end:e.lastPos(),lines:e,indent:0}):i.type==="File"&&(a=i,l=a.program),n.tokens&&(a.tokens=o);let c=qi({type:l.type,loc:l.loc,body:[],comments:s},e);return l.loc.start=c.start,l.loc.end=c.end,Ic(s,l.body.length?a.program:a,e),new Zi(e,o).copy(a)}var Zi=function(n,e){this.lines=n,this.tokens=e,this.startTokenIndex=0,this.endTokenIndex=e.length,this.indent=0,this.seen=new Map},eo=Zi.prototype;eo.copy=function(r){if(this.seen.has(r))return this.seen.get(r);if(Dc.check(r)){let c=new Array(r.length);return this.seen.set(r,c),r.forEach(function(p,u){c[u]=this.copy(p)},this),c}if(!Mc.check(r))return r;rr(r,this.lines);let n=Object.create(Object.getPrototypeOf(r),{original:{value:r,configurable:!1,enumerable:!1,writable:!0}});this.seen.set(r,n);let e=r.loc,t=this.indent,s=t,i=this.startTokenIndex,o=this.endTokenIndex;e&&((r.type==="Block"||r.type==="Line"||r.type==="CommentBlock"||r.type==="CommentLine"||this.lines.isPrecededOnlyByWhitespace(e.start))&&(s=this.indent=e.start.column),e.lines=this.lines,e.tokens=this.tokens,e.indent=s,this.findTokenRange(e));let a=Object.keys(r),l=a.length;for(let c=0;c<l;++c){let p=a[c];p==="loc"||p==="tokens"&&r.type==="File"?n[p]=r[p]:n[p]=this.copy(r[p])}return this.indent=t,this.startTokenIndex=i,this.endTokenIndex=o,n};eo.findTokenRange=function(r){for(;this.startTokenIndex>0;){let n=r.tokens[this.startTokenIndex];if(j(r.start,n.loc.start)<0)--this.startTokenIndex;else break}for(;this.endTokenIndex<r.tokens.length;){let n=r.tokens[this.endTokenIndex];if(j(n.loc.end,r.end)<0)++this.endTokenIndex;else break}for(;this.startTokenIndex<this.endTokenIndex;){let n=r.tokens[this.startTokenIndex];if(j(n.loc.start,r.start)<0)++this.startTokenIndex;else break}for(r.start.token=this.startTokenIndex;this.endTokenIndex>this.startTokenIndex;){let n=r.tokens[this.endTokenIndex-1];if(j(r.end,n.loc.end)<0)--this.endTokenIndex;else break}r.end.token=this.endTokenIndex};var W=Se,Oc=Ie.array,Fc=Ie.number,Zs={};[["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(r,n){r.forEach(function(e){Zs[e]=n})});var Ce=function(n){this.stack=[n]},te=Ce.prototype;Ce.from=function(r){if(r instanceof Ce)return r.copy();if(r instanceof uc){let n=Object.create(Ce.prototype),e=[r.value];for(let t;t=r.parentPath;r=t)e.push(r.name,t.value);return n.stack=e.reverse(),n}return new Ce(r)};te.copy=function(){let n=Object.create(Ce.prototype);return n.stack=this.stack.slice(0),n};te.getName=function(){let n=this.stack,e=n.length;return e>1?n[e-2]:null};te.getValue=function(){let n=this.stack;return n[n.length-1]};te.valueIsDuplicate=function(){let r=this.stack,n=r.length-1;return r.lastIndexOf(r[n],n-1)>=0};function to(r,n){let e=r.stack;for(let t=e.length-1;t>=0;t-=2){let s=e[t];if(W.Node.check(s)&&--n<0)return s}return null}te.getNode=function(n=0){return to(this,~~n)};te.getParentNode=function(n=0){return to(this,~~n+1)};te.getRootValue=function(){let n=this.stack;return n.length%2===0?n[1]:n[0]};te.call=function(n){let e=this.stack,t=e.length,s=e[t-1],i=arguments.length;for(let a=1;a<i;++a){let l=arguments[a];s=s[l],e.push(l,s)}let o=n(this);return e.length=t,o};te.each=function(n){let e=this.stack,t=e.length,s=e[t-1],i=arguments.length;for(let o=1;o<i;++o){let a=arguments[o];s=s[a],e.push(a,s)}for(let o=0;o<s.length;++o)o in s&&(e.push(o,s[o]),n(this),e.length-=2);e.length=t};te.map=function(n){let e=this.stack,t=e.length,s=e[t-1],i=arguments.length;for(let a=1;a<i;++a){let l=arguments[a];s=s[l],e.push(l,s)}let o=new Array(s.length);for(let a=0;a<s.length;++a)a in s&&(e.push(a,s[a]),o[a]=n(this,a),e.length-=2);return e.length=t,o};te.hasParens=function(){let r=this.getNode(),n=this.getPrevToken(r);if(!n)return!1;let e=this.getNextToken(r);return e?!!(n.value==="("&&(e.value===")"||!this.canBeFirstInStatement()&&this.firstInStatement()&&!this.needsParens(!0))):!1};te.getPrevToken=function(r){r=r||this.getNode();let n=r&&r.loc,e=n&&n.tokens;if(e&&n.start.token>0){let t=e[n.start.token-1];if(t){let s=this.getRootValue().loc;if(j(s.start,t.loc.start)<=0)return t}}return null};te.getNextToken=function(r){r=r||this.getNode();let n=r&&r.loc,e=n&&n.tokens;if(e&&n.end.token<e.length){let t=e[n.end.token];if(t){let s=this.getRootValue().loc;if(j(t.loc.end,s.end)<=0)return t}}return null};te.needsParens=function(r){let n=this.getNode();if(n.type==="AssignmentExpression"&&n.left.type==="ObjectPattern")return!0;let e=this.getParentNode(),t=this.getName();if(this.getValue()!==n||W.Statement.check(n)||n.type==="Identifier"||e&&e.type==="ParenthesizedExpression")return!1;if(n.extra&&n.extra.parenthesized)return!0;if(!e)return!1;if(n.type==="UnaryExpression"&&e.type==="BinaryExpression"&&t==="left"&&e.left===n&&e.operator==="**")return!0;switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return e.type==="MemberExpression"&&t==="object"&&e.object===n;case"BinaryExpression":case"LogicalExpression":switch(e.type){case"CallExpression":return t==="callee"&&e.callee===n;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return t==="object"&&e.object===n;case"BinaryExpression":case"LogicalExpression":{let s=e.operator,i=Zs[s],o=n.operator,a=Zs[o];if(i>a||i===a&&t==="right")return!0;break}default:return!1}break;case"SequenceExpression":switch(e.type){case"ReturnStatement":return!1;case"ForStatement":return!1;case"ExpressionStatement":return t!=="expression";default:return!0}case"OptionalIndexedAccessType":return n.optional&&e.type==="IndexedAccessType";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return e.type==="NullableTypeAnnotation";case"Literal":return e.type==="MemberExpression"&&Fc.check(n.value)&&t==="object"&&e.object===n;case"NumericLiteral":return e.type==="MemberExpression"&&t==="object"&&e.object===n;case"YieldExpression":case"AwaitExpression":case"AssignmentExpression":case"ConditionalExpression":switch(e.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":case"NewExpression":return t==="callee"&&e.callee===n;case"ConditionalExpression":return t==="test"&&e.test===n;case"MemberExpression":return t==="object"&&e.object===n;default:return!1}case"ArrowFunctionExpression":return W.CallExpression.check(e)&&t==="callee"&&e.callee===n||W.MemberExpression.check(e)&&t==="object"&&e.object===n||W.TSAsExpression&&W.TSAsExpression.check(e)&&t==="expression"&&e.expression===n?!0:no(e);case"ObjectExpression":if(e.type==="ArrowFunctionExpression"&&t==="body"&&e.body===n)return!0;break;case"TSAsExpression":if(e.type==="ArrowFunctionExpression"&&t==="body"&&e.body===n&&n.expression.type==="ObjectExpression")return!0;break;case"CallExpression":if(t==="declaration"&&W.ExportDefaultDeclaration.check(e)&&W.FunctionExpression.check(n.callee))return!0}return e.type==="NewExpression"&&t==="callee"&&e.callee===n?er(n):!!(r!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function no(r){return W.BinaryExpression.check(r)||W.LogicalExpression.check(r)}function er(r){return W.CallExpression.check(r)?!0:Oc.check(r)?r.some(er):W.Node.check(r)?dc(r,(n,e)=>er(e)):!1}te.canBeFirstInStatement=function(){let r=this.getNode();return!(W.FunctionExpression.check(r)||W.ObjectExpression.check(r)||W.ClassExpression.check(r))};te.firstInStatement=function(){let r=this.stack,n,e,t,s;for(let i=r.length-1;i>=0;i-=2)if(W.Node.check(r[i])&&(t=n,s=e,n=r[i-1],e=r[i]),!(!e||!s)){if(W.BlockStatement.check(e)&&n==="body"&&t===0||W.ExpressionStatement.check(e)&&t==="expression"||W.AssignmentExpression.check(e)&&t==="left"||W.ArrowFunctionExpression.check(e)&&t==="body")return!0;if(!(W.SequenceExpression.check(e)&&r[i+1]==="expressions"&&t===0)&&!(W.CallExpression.check(e)&&t==="callee")&&!(W.MemberExpression.check(e)&&t==="object")&&!(W.ConditionalExpression.check(e)&&t==="test")&&!(no(e)&&t==="left")&&!(W.UnaryExpression.check(e)&&!e.prefix&&t==="argument"))return!1}return!0};var Kt=Se.Printable,Si=Se.Expression,Uc=Se.ReturnStatement,Bc=Se.SourceLocation,Xt=Ie.object,tr=Ie.array,Rc=Ie.string,Ln=/[0-9a-z_$]/i,so=function(n){let e=this,t=[];e.replace=function(s,i){Rc.check(i)&&(i=w(i)),t.push({lines:i,start:s.start,end:s.end})},e.get=function(s){s=s||{start:{line:1,column:0},end:{line:n.length,column:n.getLineLength(n.length)}};let i=s.start,o=[];function a(l,c){o.push(n.slice(l,c))}return t.sort((l,c)=>j(l.start,c.start)).forEach(function(l){j(i,l.start)>0||(a(i,l.start),o.push(l.lines),i=l.end)}),a(i,s.end),v(o)}},ro=so.prototype;ro.tryToReprintComments=function(r,n,e){let t=this;if(!r.comments&&!n.comments)return!0;let s=Ce.from(r),i=Ce.from(n);s.stack.push("comments",Ii(r)),i.stack.push("comments",Ii(n));let o=[],a=oo(s,i,o);return a&&o.length>0&&o.forEach(function(l){let c=l.oldPath.getValue();t.replace(c.loc,e(l.newPath).indentTail(c.loc.indent))}),a};function Ii(r){let n=[];return r.comments&&r.comments.length>0&&r.comments.forEach(function(e){(e.leading||e.trailing)&&n.push(e)}),n}ro.deleteComments=function(r){if(!r.comments)return;let n=this;r.comments.forEach(function(e){e.leading?n.replace({start:e.loc.start,end:r.loc.lines.skipSpaces(e.loc.end,!1,!1)},""):e.trailing&&n.replace({start:r.loc.lines.skipSpaces(e.loc.start,!0,!1),end:e.loc.end},"")})};function _c(r){let n=r.getValue();if(!Kt.check(n))return;let e=n.original,t=e&&e.loc,s=t&&t.lines,i=[];if(!(!s||!zc(r,i)))return function(o){let a=new so(s);i.forEach(function(c){let p=c.newPath.getValue(),u=c.oldPath.getValue();Bc.assert(u.loc,!0);let f=!a.tryToReprintComments(p,u,o);f&&a.deleteComments(u);let m=o(c.newPath,{includeComments:f,avoidRootParens:u.type===p.type&&c.oldPath.hasParens()}).indentTail(u.loc.indent),d=jc(s,u.loc,m),g=Vc(s,u.loc,m);if(d||g){let h=[];d&&h.push(" "),h.push(m),g&&h.push(" "),m=v(h)}a.replace(u.loc,m)});let l=a.get(t).indentTail(-e.loc.indent);return r.needsParens()?v(["(",l,")"]):l}}function jc(r,n,e){let t=qe(n.start),s=r.prevPos(t)&&r.charAt(t),i=e.charAt(e.firstPos());return s&&Ln.test(s)&&i&&Ln.test(i)}function Vc(r,n,e){let t=r.charAt(n.end),s=e.lastPos(),i=e.prevPos(s)&&e.charAt(s);return i&&Ln.test(i)&&t&&Ln.test(t)}function zc(r,n){let e=r.getValue();Kt.assert(e);let t=e.original;if(Kt.assert(t),e.type!==t.type)return!1;let s=new Ce(t),i=nr(r,s,n);return i||(n.length=0),i}function io(r,n,e){let t=r.getValue(),s=n.getValue();return t===s?!0:tr.check(t)?oo(r,n,e):Xt.check(t)?$c(r,n,e):!1}function oo(r,n,e){let t=r.getValue(),s=n.getValue();if(t===s||r.valueIsDuplicate()||n.valueIsDuplicate())return!0;tr.assert(t);let i=t.length;if(!(tr.check(s)&&s.length===i))return!1;for(let o=0;o<i;++o){r.stack.push(o,t[o]),n.stack.push(o,s[o]);let a=io(r,n,e);if(r.stack.length-=2,n.stack.length-=2,!a)return!1}return!0}function $c(r,n,e){let t=r.getValue();if(Xt.assert(t),t.original===null)return!1;let s=n.getValue();if(!Xt.check(s))return!1;if(t===s||r.valueIsDuplicate()||n.valueIsDuplicate())return!0;if(Kt.check(t)){if(!Kt.check(s))return!1;let i=r.getParentNode(),o=n.getParentNode();if(o!==null&&o.type==="FunctionTypeAnnotation"&&i!==null&&i.type==="FunctionTypeAnnotation"){let a=o.params.length!==1||!!o.params[0].name,l=i.params.length!==1||!!i.params[0].name;if(!a&&l)return!1}if(t.type===s.type){let a=[];if(nr(r,n,a))e.push.apply(e,a);else if(s.loc)e.push({oldPath:n.copy(),newPath:r.copy()});else return!1;return!0}return Si.check(t)&&Si.check(s)&&s.loc?(e.push({oldPath:n.copy(),newPath:r.copy()}),!0):!1}return nr(r,n,e)}function nr(r,n,e){let t=r.getValue(),s=n.getValue();if(Xt.assert(t),Xt.assert(s),t.original===null||r.needsParens()&&!n.hasParens())return!1;let i=hc(s,t);(s.type==="File"||t.type==="File")&&delete i.tokens,delete i.loc;let o=e.length;for(let a in i){if(a.charAt(0)==="_")continue;r.stack.push(a,_e(t,a)),n.stack.push(a,_e(s,a));let l=io(r,n,e);if(r.stack.length-=2,n.stack.length-=2,!l)return!1}return!(Uc.check(r.getNode())&&e.length>o)}var Y=Se,or=Ie.string,Hc=Ie.object,On=function(n,e){or.assert(n),this.code=n,e&&(Hc.assert(e),this.map=e)},qc=On.prototype,Ei=!1;qc.toString=function(){return Ei||(console.warn("Deprecation warning: recast.print now returns an object with a .code property. You appear to be treating the object as a string, which might still work but is strongly discouraged."),Ei=!0),this.code};var Ai=new On(""),Gc=function(n){let e=n&&n.tabWidth;n=Bn(n),n.sourceFileName=null;function t(i,o){return i=Object.assign({},i,o),a=>s(a,i)}function s(i,o){if(o=o||{},o.includeComments)return Ci(i,t(o,{includeComments:!1}));let a=n.tabWidth;if(!e){let p=i.getNode().loc;p&&p.lines&&p.lines.guessTabWidth&&(n.tabWidth=p.lines.guessTabWidth())}let l=_c(i),c=l?l(s):ki(i,n,o,t(o,{includeComments:!0,avoidRootParens:!1}));return n.tabWidth=a,c}this.print=function(i){if(!i)return Ai;let o=s(Ce.from(i),{includeComments:!0,avoidRootParens:!1});return new On(o.toString(n),bc(n.inputSourceMap,o.getSourceMap(n.sourceMapName,n.sourceRoot)))},this.printGenerically=function(i){if(!i)return Ai;function o(p){return Ci(p,u=>ki(u,n,{includeComments:!0,avoidRootParens:!1},o))}let a=Ce.from(i),l=n.reuseWhitespace;n.reuseWhitespace=!1;let c=new On(o(a).toString(n));return n.reuseWhitespace=l,c}};function ki(r,n,e,t){let s=r.getValue(),i=[],o=Wc(r,n,t);if(!s||o.isEmpty())return o;let a=!1,l=Kc(r,t);return l.isEmpty()?e.avoidRootParens||(a=r.needsParens()):i.push(l),a&&i.unshift("("),i.push(o),a&&i.push(")"),v(i)}function Wc(r,n,e){let t=r.getValue();if(!t)return w("");if(typeof t=="string")return w(t,n);Y.Printable.assert(t);let s=[];switch(t.type){case"File":return r.call(e,"program");case"Program":return t.directives&&r.each(function(i){s.push(e(i),`;
12854
+ `)},"directives"),t.interpreter&&s.push(r.call(e,"interpreter")),s.push(r.call(i=>ht(i,n,e),"body")),v(s);case"Noop":case"EmptyStatement":return w("");case"ExpressionStatement":return v([r.call(e,"expression"),";"]);case"ParenthesizedExpression":return v(["(",r.call(e,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return w(" ").join([r.call(e,"left"),t.operator,r.call(e,"right")]);case"AssignmentPattern":return v([r.call(e,"left")," = ",r.call(e,"right")]);case"MemberExpression":case"OptionalMemberExpression":{s.push(r.call(e,"object"));let i=r.call(e,"property"),o=_e(t,"optional");return t.computed?s.push(o?"?.[":"[",i,"]"):s.push(o?"?.":".",i),v(s)}case"ChainExpression":return r.call(e,"expression");case"MetaProperty":return v([r.call(e,"meta"),".",r.call(e,"property")]);case"BindExpression":return t.object&&s.push(r.call(e,"object")),s.push("::",r.call(e,"callee")),v(s);case"Path":return w(".").join(t.body);case"Identifier":return v([w(t.name,n),t.optional?"?":"",r.call(e,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"ObjectTypeSpreadProperty":case"RestElement":return v(["...",r.call(e,"argument"),r.call(e,"typeAnnotation")]);case"FunctionDeclaration":case"FunctionExpression":case"TSDeclareFunction":return t.declare&&s.push("declare "),t.async&&s.push("async "),s.push("function"),t.generator&&s.push("*"),t.id?s.push(" ",r.call(e,"id"),r.call(e,"typeParameters")):t.typeParameters&&s.push(r.call(e,"typeParameters")),s.push("(",Ne(r,n,e),")",r.call(e,"returnType")),t.body&&s.push(" ",r.call(e,"body")),v(s);case"ArrowFunctionExpression":return t.async&&s.push("async "),t.typeParameters&&s.push(r.call(e,"typeParameters")),!n.arrowParensAlways&&t.params.length===1&&!t.rest&&t.params[0].type==="Identifier"&&!t.params[0].typeAnnotation&&!t.returnType?s.push(r.call(e,"params",0)):s.push("(",Ne(r,n,e),")",r.call(e,"returnType")),s.push(" => ",r.call(e,"body")),v(s);case"MethodDefinition":return Hs(r,n,e);case"YieldExpression":return s.push("yield"),t.delegate&&s.push("*"),t.argument&&s.push(" ",r.call(e,"argument")),v(s);case"AwaitExpression":return s.push("await"),t.all&&s.push("*"),t.argument&&s.push(" ",r.call(e,"argument")),v(s);case"ModuleExpression":return v([`module {
11862
12855
  `,r.call(e,"body").indent(n.tabWidth),`
11863
- }`]);case"ModuleDeclaration":return s.push("module",r.call(e,"id")),t.source?s.push("from",r.call(e,"source")):s.push(r.call(e,"body")),w(" ").join(s);case"ImportSpecifier":return t.importKind&&t.importKind!=="value"&&s.push(t.importKind+" "),t.imported?(s.push(r.call(e,"imported")),t.local&&t.local.name!==t.imported.name&&s.push(" as ",r.call(e,"local"))):t.id&&(s.push(r.call(e,"id")),t.name&&s.push(" as ",r.call(e,"name"))),v(s);case"ExportSpecifier":return t.exportKind&&t.exportKind!=="value"&&s.push(t.exportKind+" "),t.local?(s.push(r.call(e,"local")),t.exported&&t.exported.name!==t.local.name&&s.push(" as ",r.call(e,"exported"))):t.id&&(s.push(r.call(e,"id")),t.name&&s.push(" as ",r.call(e,"name"))),v(s);case"ExportBatchSpecifier":return w("*");case"ImportNamespaceSpecifier":return s.push("* as "),t.local?s.push(r.call(e,"local")):t.id&&s.push(r.call(e,"id")),v(s);case"ImportDefaultSpecifier":return t.local?r.call(e,"local"):r.call(e,"id");case"TSExportAssignment":return v(["export = ",r.call(e,"expression")]);case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return Di(r,n,e);case"ExportAllDeclaration":return s.push("export *"),t.exported&&s.push(" as ",r.call(e,"exported")),s.push(" from ",r.call(e,"source"),";"),v(s);case"TSNamespaceExportDeclaration":return s.push("export as namespace ",r.call(e,"id")),En(v(s));case"ExportNamespaceSpecifier":return v(["* as ",r.call(e,"exported")]);case"ExportDefaultSpecifier":return r.call(e,"exported");case"Import":return w("import",n);case"ImportExpression":return v(["import(",r.call(e,"source"),")"]);case"ImportDeclaration":{if(s.push("import "),t.importKind&&t.importKind!=="value"&&s.push(t.importKind+" "),t.specifiers&&t.specifiers.length>0){let i=[],o=[];if(r.each(function(a){let l=a.getValue();l.type==="ImportSpecifier"?o.push(e(a)):(l.type==="ImportDefaultSpecifier"||l.type==="ImportNamespaceSpecifier")&&i.push(e(a))},"specifiers"),i.forEach((a,l)=>{l>0&&s.push(", "),s.push(a)}),o.length>0){let a=w(", ").join(o);a.getLineLength(1)>n.wrapColumn&&(a=v([w(`,
12856
+ }`]);case"ModuleDeclaration":return s.push("module",r.call(e,"id")),t.source?s.push("from",r.call(e,"source")):s.push(r.call(e,"body")),w(" ").join(s);case"ImportSpecifier":return t.importKind&&t.importKind!=="value"&&s.push(t.importKind+" "),t.imported?(s.push(r.call(e,"imported")),t.local&&t.local.name!==t.imported.name&&s.push(" as ",r.call(e,"local"))):t.id&&(s.push(r.call(e,"id")),t.name&&s.push(" as ",r.call(e,"name"))),v(s);case"ExportSpecifier":return t.exportKind&&t.exportKind!=="value"&&s.push(t.exportKind+" "),t.local?(s.push(r.call(e,"local")),t.exported&&t.exported.name!==t.local.name&&s.push(" as ",r.call(e,"exported"))):t.id&&(s.push(r.call(e,"id")),t.name&&s.push(" as ",r.call(e,"name"))),v(s);case"ExportBatchSpecifier":return w("*");case"ImportNamespaceSpecifier":return s.push("* as "),t.local?s.push(r.call(e,"local")):t.id&&s.push(r.call(e,"id")),v(s);case"ImportDefaultSpecifier":return t.local?r.call(e,"local"):r.call(e,"id");case"TSExportAssignment":return v(["export = ",r.call(e,"expression")]);case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return Mi(r,n,e);case"ExportAllDeclaration":return s.push("export *"),t.exported&&s.push(" as ",r.call(e,"exported")),s.push(" from ",r.call(e,"source"),";"),v(s);case"TSNamespaceExportDeclaration":return s.push("export as namespace ",r.call(e,"id")),En(v(s));case"ExportNamespaceSpecifier":return v(["* as ",r.call(e,"exported")]);case"ExportDefaultSpecifier":return r.call(e,"exported");case"Import":return w("import",n);case"ImportExpression":return v(["import(",r.call(e,"source"),")"]);case"ImportDeclaration":{if(s.push("import "),t.importKind&&t.importKind!=="value"&&s.push(t.importKind+" "),t.specifiers&&t.specifiers.length>0){let i=[],o=[];if(r.each(function(a){let l=a.getValue();l.type==="ImportSpecifier"?o.push(e(a)):(l.type==="ImportDefaultSpecifier"||l.type==="ImportNamespaceSpecifier")&&i.push(e(a))},"specifiers"),i.forEach((a,l)=>{l>0&&s.push(", "),s.push(a)}),o.length>0){let a=w(", ").join(o);a.getLineLength(1)>n.wrapColumn&&(a=v([w(`,
11864
12857
  `).join(o).indent(n.tabWidth),","])),i.length>0&&s.push(", "),a.length>1?s.push(`{
11865
12858
  `,a,`
11866
12859
  }`):n.objectCurlySpacing?s.push("{ ",a," }"):s.push("{",a,"}")}s.push(" from ")}return s.push(r.call(e,"source"),lo(r,n,e),";"),v(s)}case"ImportAttribute":return v([r.call(e,"key"),": ",r.call(e,"value")]);case"StaticBlock":s.push("static ");case"BlockStatement":{let i=r.call(o=>ht(o,n,e),"body");return i.isEmpty()&&(!t.directives||t.directives.length===0)?(s.push("{}"),v(s)):(s.push(`{
@@ -11868,21 +12861,21 @@ export { toast, useToast };
11868
12861
  `:"")},"directives"),s.push(i.indent(n.tabWidth)),s.push(`
11869
12862
  }`),v(s))}case"ReturnStatement":{if(s.push("return"),t.argument){let i=r.call(e,"argument");i.startsWithComment()||i.length>1&&Y.JSXElement&&Y.JSXElement.check(t.argument)?s.push(` (
11870
12863
  `,i.indent(n.tabWidth),`
11871
- )`):s.push(" ",i)}return s.push(";"),v(s)}case"CallExpression":case"OptionalCallExpression":return s.push(r.call(e,"callee")),t.typeParameters&&s.push(r.call(e,"typeParameters")),t.typeArguments&&s.push(r.call(e,"typeArguments")),Be(t,"optional")&&s.push("?."),s.push(Ni(r,n,e)),v(s);case"RecordExpression":s.push("#");case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":{let i=t.type==="ObjectTypeAnnotation",o=n.flowObjectCommas?",":i?";":",",a=[],l=!1;i&&(a.push("indexers","callProperties"),t.internalSlots!=null&&a.push("internalSlots")),a.push("properties");let c=0;a.forEach(function(g){c+=t[g].length});let p=i&&c===1||c===0,u=t.exact?"{|":"{",f=t.exact?"|}":"}";s.push(p?u:u+`
12864
+ )`):s.push(" ",i)}return s.push(";"),v(s)}case"CallExpression":case"OptionalCallExpression":return s.push(r.call(e,"callee")),t.typeParameters&&s.push(r.call(e,"typeParameters")),t.typeArguments&&s.push(r.call(e,"typeArguments")),_e(t,"optional")&&s.push("?."),s.push(Ni(r,n,e)),v(s);case"RecordExpression":s.push("#");case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":{let i=t.type==="ObjectTypeAnnotation",o=n.flowObjectCommas?",":i?";":",",a=[],l=!1;i&&(a.push("indexers","callProperties"),t.internalSlots!=null&&a.push("internalSlots")),a.push("properties");let c=0;a.forEach(function(g){c+=t[g].length});let p=i&&c===1||c===0,u=t.exact?"{|":"{",f=t.exact?"|}":"}";s.push(p?u:u+`
11872
12865
  `);let m=s.length-1,d=0;if(a.forEach(function(g){r.each(function(h){let y=e(h);p||(y=y.indent(n.tabWidth));let P=!i&&y.length>1;P&&l&&s.push(`
11873
12866
  `),s.push(y),d<c-1?(s.push(o+(P?`
11874
12867
 
11875
12868
  `:`
11876
12869
  `)),l=!P):(c!==1&&i||!p&&Gt(n,"objects")&&h.getValue().type!=="RestElement")&&s.push(o),d++},g)}),t.inexact){let g=w("...",n);p?(c>0&&s.push(o," "),s.push(g)):s.push(`
11877
12870
  `,g.indent(n.tabWidth))}return s.push(p?f:`
11878
- `+f),d!==0&&p&&n.objectCurlySpacing&&(s[m]=u+" ",s[s.length-1]=" "+f),t.typeAnnotation&&s.push(r.call(e,"typeAnnotation")),v(s)}case"PropertyPattern":return v([r.call(e,"key"),": ",r.call(e,"pattern")]);case"ObjectProperty":case"Property":{if(t.method||t.kind==="get"||t.kind==="set")return qs(r,n,e);if(t.shorthand&&t.value.type==="AssignmentPattern")return r.call(e,"value");let i=r.call(e,"key");return t.computed?s.push("[",i,"]"):s.push(i),(!t.shorthand||t.key.name!==t.value.name)&&s.push(": ",r.call(e,"value")),v(s)}case"ClassMethod":case"ObjectMethod":case"ClassPrivateMethod":case"TSDeclareMethod":return qs(r,n,e);case"PrivateName":return v(["#",r.call(e,"id")]);case"Decorator":return v(["@",r.call(e,"expression")]);case"TupleExpression":s.push("#");case"ArrayExpression":case"ArrayPattern":{let o=t.elements.length,a=r.map(e,"elements"),c=w(", ").join(a).getLineLength(1)<=n.wrapColumn;return c?n.arrayBracketSpacing?s.push("[ "):s.push("["):s.push(`[
12871
+ `+f),d!==0&&p&&n.objectCurlySpacing&&(s[m]=u+" ",s[s.length-1]=" "+f),t.typeAnnotation&&s.push(r.call(e,"typeAnnotation")),v(s)}case"PropertyPattern":return v([r.call(e,"key"),": ",r.call(e,"pattern")]);case"ObjectProperty":case"Property":{if(t.method||t.kind==="get"||t.kind==="set")return Hs(r,n,e);if(t.shorthand&&t.value.type==="AssignmentPattern")return r.call(e,"value");let i=r.call(e,"key");return t.computed?s.push("[",i,"]"):s.push(i),(!t.shorthand||t.key.name!==t.value.name)&&s.push(": ",r.call(e,"value")),v(s)}case"ClassMethod":case"ObjectMethod":case"ClassPrivateMethod":case"TSDeclareMethod":return Hs(r,n,e);case"PrivateName":return v(["#",r.call(e,"id")]);case"Decorator":return v(["@",r.call(e,"expression")]);case"TupleExpression":s.push("#");case"ArrayExpression":case"ArrayPattern":{let o=t.elements.length,a=r.map(e,"elements"),c=w(", ").join(a).getLineLength(1)<=n.wrapColumn;return c?n.arrayBracketSpacing?s.push("[ "):s.push("["):s.push(`[
11879
12872
  `),r.each(function(p){let u=p.getName();if(!p.getValue())s.push(",");else{let m=a[u];c?u>0&&s.push(" "):m=m.indent(n.tabWidth),s.push(m),(u<o-1||!c&&Gt(n,"arrays"))&&s.push(","),c||s.push(`
11880
12873
  `)}},"elements"),c&&n.arrayBracketSpacing?s.push(" ]"):s.push("]"),t.typeAnnotation&&s.push(r.call(e,"typeAnnotation")),v(s)}case"SequenceExpression":return w(", ").join(r.map(e,"expressions"));case"ThisExpression":return w("this");case"Super":return w("super");case"NullLiteral":return w("null");case"RegExpLiteral":return w(bt(t)||`/${t.pattern}/${t.flags||""}`,n);case"BigIntLiteral":return w(bt(t)||t.value+"n",n);case"NumericLiteral":return w(bt(t)||t.value,n);case"DecimalLiteral":return w(bt(t)||t.value+"m",n);case"StringLiteral":return w($t(t.value,n));case"BooleanLiteral":case"Literal":return w(bt(t)||(typeof t.value=="string"?$t(t.value,n):t.value),n);case"Directive":return r.call(e,"value");case"DirectiveLiteral":return w(bt(t)||$t(t.value,n),n);case"InterpreterDirective":return w(`#!${t.value}
11881
12874
  `,n);case"ModuleSpecifier":if(t.local)throw new Error("The ESTree ModuleSpecifier type should be abstract");return w($t(t.value,n),n);case"UnaryExpression":return s.push(t.operator),/[a-z]$/.test(t.operator)&&s.push(" "),s.push(r.call(e,"argument")),v(s);case"UpdateExpression":return s.push(r.call(e,"argument"),t.operator),t.prefix&&s.reverse(),v(s);case"ConditionalExpression":return v([r.call(e,"test")," ? ",r.call(e,"consequent")," : ",r.call(e,"alternate")]);case"NewExpression":return s.push("new ",r.call(e,"callee")),t.typeParameters&&s.push(r.call(e,"typeParameters")),t.typeArguments&&s.push(r.call(e,"typeArguments")),t.arguments&&s.push(Ni(r,n,e)),v(s);case"VariableDeclaration":{t.declare&&s.push("declare "),s.push(t.kind," ");let i=0,o=r.map(function(l){let c=e(l);return i=Math.max(c.length,i),c},"declarations");i===1?s.push(w(", ").join(o)):o.length>1?s.push(w(`,
11882
- `).join(o).indentTail(t.kind.length+1)):s.push(o[0]);let a=r.getParentNode();return!Y.ForStatement.check(a)&&!Y.ForInStatement.check(a)&&!(Y.ForOfStatement&&Y.ForOfStatement.check(a))&&!(Y.ForAwaitStatement&&Y.ForAwaitStatement.check(a))&&s.push(";"),v(s)}case"VariableDeclarator":return t.init?w(" = ").join([r.call(e,"id"),r.call(e,"init")]):r.call(e,"id");case"WithStatement":return v(["with (",r.call(e,"object"),") ",r.call(e,"body")]);case"IfStatement":{let i=Je(r.call(e,"consequent"),n);return s.push("if (",r.call(e,"test"),")",i),t.alternate&&s.push(Mi(i)?" else":`
12875
+ `).join(o).indentTail(t.kind.length+1)):s.push(o[0]);let a=r.getParentNode();return!Y.ForStatement.check(a)&&!Y.ForInStatement.check(a)&&!(Y.ForOfStatement&&Y.ForOfStatement.check(a))&&!(Y.ForAwaitStatement&&Y.ForAwaitStatement.check(a))&&s.push(";"),v(s)}case"VariableDeclarator":return t.init?w(" = ").join([r.call(e,"id"),r.call(e,"init")]):r.call(e,"id");case"WithStatement":return v(["with (",r.call(e,"object"),") ",r.call(e,"body")]);case"IfStatement":{let i=Je(r.call(e,"consequent"),n);return s.push("if (",r.call(e,"test"),")",i),t.alternate&&s.push(Di(i)?" else":`
11883
12876
  else`,Je(r.call(e,"alternate"),n)),v(s)}case"ForStatement":{let i=r.call(e,"init"),o=i.length>1?`;
11884
12877
  `:"; ",a="for (",l=w(o).join([i,r.call(e,"test"),r.call(e,"update")]).indentTail(a.length),c=v([a,l,")"]),p=Je(r.call(e,"body"),n);return s.push(c),c.length>1&&(s.push(`
11885
- `),p=p.trimLeft()),s.push(p),v(s)}case"WhileStatement":return v(["while (",r.call(e,"test"),")",Je(r.call(e,"body"),n)]);case"ForInStatement":return v([t.each?"for each (":"for (",r.call(e,"left")," in ",r.call(e,"right"),")",Je(r.call(e,"body"),n)]);case"ForOfStatement":case"ForAwaitStatement":return s.push("for "),(t.await||t.type==="ForAwaitStatement")&&s.push("await "),s.push("(",r.call(e,"left")," of ",r.call(e,"right"),")",Je(r.call(e,"body"),n)),v(s);case"DoWhileStatement":{let i=v(["do",Je(r.call(e,"body"),n)]);return s.push(i),Mi(i)?s.push(" while"):s.push(`
12878
+ `),p=p.trimLeft()),s.push(p),v(s)}case"WhileStatement":return v(["while (",r.call(e,"test"),")",Je(r.call(e,"body"),n)]);case"ForInStatement":return v([t.each?"for each (":"for (",r.call(e,"left")," in ",r.call(e,"right"),")",Je(r.call(e,"body"),n)]);case"ForOfStatement":case"ForAwaitStatement":return s.push("for "),(t.await||t.type==="ForAwaitStatement")&&s.push("await "),s.push("(",r.call(e,"left")," of ",r.call(e,"right"),")",Je(r.call(e,"body"),n)),v(s);case"DoWhileStatement":{let i=v(["do",Je(r.call(e,"body"),n)]);return s.push(i),Di(i)?s.push(" while"):s.push(`
11886
12879
  while`),s.push(" (",r.call(e,"test"),");"),v(s)}case"DoExpression":{let i=r.call(o=>ht(o,n,e),"body");return v([`do {
11887
12880
  `,i.indent(n.tabWidth),`
11888
12881
  }`])}case"BreakStatement":return s.push("break"),t.label&&s.push(" ",r.call(e,"label")),s.push(";"),v(s);case"ContinueStatement":return s.push("continue"),t.label&&s.push(" ",r.call(e,"label")),s.push(";"),v(s);case"LabeledStatement":return v([r.call(e,"label"),`:
@@ -11896,7 +12889,7 @@ while`),s.push(" (",r.call(e,"test"),");"),v(s)}case"DoExpression":{let i=r.call
11896
12889
  `,r.call(i=>ht(i,n,e),"body").indent(n.tabWidth),`
11897
12890
  }`]);case"ClassPropertyDefinition":return s.push("static ",r.call(e,"definition")),Y.MethodDefinition.check(t.definition)||s.push(";"),v(s);case"ClassProperty":{t.declare&&s.push("declare ");let i=t.accessibility||t.access;typeof i=="string"&&s.push(i," "),t.static&&s.push("static "),t.abstract&&s.push("abstract "),t.readonly&&s.push("readonly ");let o=r.call(e,"key");return t.computed&&(o=v(["[",o,"]"])),t.variance&&(o=v([zt(r,e),o])),s.push(o),t.optional&&s.push("?"),t.definite&&s.push("!"),t.typeAnnotation&&s.push(r.call(e,"typeAnnotation")),t.value&&s.push(" = ",r.call(e,"value")),s.push(";"),v(s)}case"ClassPrivateProperty":return t.static&&s.push("static "),s.push(r.call(e,"key")),t.typeAnnotation&&s.push(r.call(e,"typeAnnotation")),t.value&&s.push(" = ",r.call(e,"value")),s.push(";"),v(s);case"ClassAccessorProperty":return s.push(...ao(t),"accessor "),t.computed?s.push("[",r.call(e,"key"),"]"):s.push(r.call(e,"key")),t.optional&&s.push("?"),t.definite&&s.push("!"),t.typeAnnotation&&s.push(r.call(e,"typeAnnotation")),t.value&&s.push(" = ",r.call(e,"value")),s.push(";"),v(s);case"ClassDeclaration":case"ClassExpression":case"DeclareClass":return t.declare&&s.push("declare "),t.abstract&&s.push("abstract "),s.push("class"),t.id&&s.push(" ",r.call(e,"id")),t.typeParameters&&s.push(r.call(e,"typeParameters")),t.superClass&&s.push(" extends ",r.call(e,"superClass"),r.call(e,"superTypeParameters")),t.extends&&t.extends.length>0&&s.push(" extends ",w(", ").join(r.map(e,"extends"))),t.implements&&t.implements.length>0&&s.push(" implements ",w(", ").join(r.map(e,"implements"))),s.push(" ",r.call(e,"body")),t.type==="DeclareClass"?Vt(r,s):v(s);case"TemplateElement":return w(t.value.raw,n).lockIndentTail();case"TemplateLiteral":{let i=r.map(e,"expressions");return s.push("`"),r.each(function(o){let a=o.getName();s.push(e(o)),a<i.length&&s.push("${",i[a],"}")},"quasis"),s.push("`"),v(s).lockIndentTail()}case"TaggedTemplateExpression":return v([r.call(e,"tag"),r.call(e,"quasi")]);case"Node":case"Printable":case"SourceLocation":case"Position":case"Statement":case"Function":case"Pattern":case"Expression":case"Declaration":case"Specifier":case"NamedSpecifier":case"Comment":case"Flow":case"FlowType":case"FlowPredicate":case"MemberTypeAnnotation":case"Type":case"TSHasOptionalTypeParameterInstantiation":case"TSHasOptionalTypeParameters":case"TSHasOptionalTypeAnnotation":case"ChainElement":throw new Error("unprintable type: "+JSON.stringify(t.type));case"CommentBlock":case"Block":return v(["/*",w(t.value,n),"*/"]);case"CommentLine":case"Line":return v(["//",w(t.value,n)]);case"TypeAnnotation":return t.typeAnnotation?(t.typeAnnotation.type!=="FunctionTypeAnnotation"&&s.push(": "),s.push(r.call(e,"typeAnnotation")),v(s)):w("");case"ExistentialTypeParam":case"ExistsTypeAnnotation":return w("*",n);case"EmptyTypeAnnotation":return w("empty",n);case"AnyTypeAnnotation":return w("any",n);case"MixedTypeAnnotation":return w("mixed",n);case"ArrayTypeAnnotation":return v([r.call(e,"elementType"),"[]"]);case"TupleTypeAnnotation":{let i=r.map(e,"types"),a=w(", ").join(i).getLineLength(1)<=n.wrapColumn;return a?n.arrayBracketSpacing?s.push("[ "):s.push("["):s.push(`[
11898
12891
  `),r.each(function(l){let c=l.getName();if(!l.getValue())s.push(",");else{let u=i[c];a?c>0&&s.push(" "):u=u.indent(n.tabWidth),s.push(u),(c<t.types.length-1||!a&&Gt(n,"arrays"))&&s.push(","),a||s.push(`
11899
- `)}},"types"),a&&n.arrayBracketSpacing?s.push(" ]"):s.push("]"),v(s)}case"BooleanTypeAnnotation":return w("boolean",n);case"BooleanLiteralTypeAnnotation":return w(""+t.value,n);case"InterfaceTypeAnnotation":return s.push("interface"),t.extends&&t.extends.length>0&&s.push(" extends ",w(", ").join(r.map(e,"extends"))),s.push(" ",r.call(e,"body")),v(s);case"DeclareFunction":return Vt(r,["function ",r.call(e,"id"),";"]);case"DeclareModule":return Vt(r,["module ",r.call(e,"id")," ",r.call(e,"body")]);case"DeclareModuleExports":return Vt(r,["module.exports",r.call(e,"typeAnnotation")]);case"DeclareVariable":return Vt(r,["var ",r.call(e,"id"),";"]);case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return v(["declare ",Di(r,n,e)]);case"EnumDeclaration":return v(["enum ",r.call(e,"id"),r.call(e,"body")]);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return(t.type==="EnumSymbolBody"||t.explicitType)&&s.push(" of ",t.type.slice(4,-4).toLowerCase()),s.push(` {
12892
+ `)}},"types"),a&&n.arrayBracketSpacing?s.push(" ]"):s.push("]"),v(s)}case"BooleanTypeAnnotation":return w("boolean",n);case"BooleanLiteralTypeAnnotation":return w(""+t.value,n);case"InterfaceTypeAnnotation":return s.push("interface"),t.extends&&t.extends.length>0&&s.push(" extends ",w(", ").join(r.map(e,"extends"))),s.push(" ",r.call(e,"body")),v(s);case"DeclareFunction":return Vt(r,["function ",r.call(e,"id"),";"]);case"DeclareModule":return Vt(r,["module ",r.call(e,"id")," ",r.call(e,"body")]);case"DeclareModuleExports":return Vt(r,["module.exports",r.call(e,"typeAnnotation")]);case"DeclareVariable":return Vt(r,["var ",r.call(e,"id"),";"]);case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return v(["declare ",Mi(r,n,e)]);case"EnumDeclaration":return v(["enum ",r.call(e,"id"),r.call(e,"body")]);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return(t.type==="EnumSymbolBody"||t.explicitType)&&s.push(" of ",t.type.slice(4,-4).toLowerCase()),s.push(` {
11900
12893
  `,w(`
11901
12894
  `).join(r.map(e,"members")).indent(n.tabWidth),`
11902
12895
  }`),v(s);case"EnumDefaultedMember":return v([r.call(e,"id"),","]);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":return v([r.call(e,"id")," = ",r.call(e,"init"),","]);case"InferredPredicate":return w("%checks",n);case"DeclaredPredicate":return v(["%checks(",r.call(e,"value"),")"]);case"FunctionTypeAnnotation":{let i=r.getParentNode(0),o=!(Y.ObjectTypeCallProperty.check(i)||Y.ObjectTypeInternalSlot.check(i)&&i.method||Y.DeclareFunction.check(r.getParentNode(2)));o&&!Y.FunctionTypeParam.check(i)&&!Y.TypeAlias.check(i)&&s.push(": ");let l=!!t.typeParameters,c=l||t.params.length!==1||t.params[0].name;return s.push(l?r.call(e,"typeParameters"):"",c?"(":"",Ne(r,n,e),c?")":""),t.returnType&&s.push(o?" => ":": ",r.call(e,"returnType")),v(s)}case"FunctionTypeParam":{let i=r.call(e,"name");return s.push(i),t.optional&&s.push("?"),i.infos[0].line&&s.push(": "),s.push(r.call(e,"typeAnnotation")),v(s)}case"GenericTypeAnnotation":return v([r.call(e,"id"),r.call(e,"typeParameters")]);case"DeclareInterface":s.push("declare ");case"InterfaceDeclaration":case"TSInterfaceDeclaration":return t.declare&&s.push("declare "),s.push("interface ",r.call(e,"id"),r.call(e,"typeParameters")," "),t.extends&&t.extends.length>0&&s.push("extends ",w(", ").join(r.map(e,"extends"))," "),t.body&&s.push(r.call(e,"body")),v(s);case"ClassImplements":case"InterfaceExtends":return v([r.call(e,"id"),r.call(e,"typeParameters")]);case"IntersectionTypeAnnotation":return w(" & ").join(r.map(e,"types"));case"NullableTypeAnnotation":return v(["?",r.call(e,"typeAnnotation")]);case"NullLiteralTypeAnnotation":return w("null",n);case"ThisTypeAnnotation":return w("this",n);case"NumberTypeAnnotation":return w("number",n);case"ObjectTypeCallProperty":return r.call(e,"value");case"ObjectTypeIndexer":return t.static&&s.push("static "),s.push(zt(r,e),"["),t.id&&s.push(r.call(e,"id"),": "),s.push(r.call(e,"key"),"]: ",r.call(e,"value")),v(s);case"ObjectTypeProperty":return v([zt(r,e),r.call(e,"key"),t.optional?"?":"",": ",r.call(e,"value")]);case"ObjectTypeInternalSlot":return v([t.static?"static ":"","[[",r.call(e,"id"),"]]",t.optional?"?":"",t.value.type!=="FunctionTypeAnnotation"?": ":"",r.call(e,"value")]);case"QualifiedTypeIdentifier":return v([r.call(e,"qualification"),".",r.call(e,"id")]);case"StringLiteralTypeAnnotation":return w($t(t.value,n),n);case"NumberLiteralTypeAnnotation":case"NumericLiteralTypeAnnotation":return w(JSON.stringify(t.value),n);case"BigIntLiteralTypeAnnotation":return w(t.raw,n);case"StringTypeAnnotation":return w("string",n);case"DeclareTypeAlias":s.push("declare ");case"TypeAlias":return v(["type ",r.call(e,"id"),r.call(e,"typeParameters")," = ",r.call(e,"right"),";"]);case"DeclareOpaqueType":s.push("declare ");case"OpaqueType":return s.push("opaque type ",r.call(e,"id"),r.call(e,"typeParameters")),t.supertype&&s.push(": ",r.call(e,"supertype")),t.impltype&&s.push(" = ",r.call(e,"impltype")),s.push(";"),v(s);case"TypeCastExpression":return v(["(",r.call(e,"expression"),r.call(e,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return v(["<",w(", ").join(r.map(e,"params")),">"]);case"Variance":return t.kind==="plus"?w("+"):t.kind==="minus"?w("-"):w("");case"TypeParameter":return t.variance&&s.push(zt(r,e)),s.push(r.call(e,"name")),t.bound&&s.push(r.call(e,"bound")),t.default&&s.push("=",r.call(e,"default")),v(s);case"TypeofTypeAnnotation":return v([w("typeof ",n),r.call(e,"argument")]);case"IndexedAccessType":case"OptionalIndexedAccessType":return v([r.call(e,"objectType"),t.optional?"?.":"","[",r.call(e,"indexType"),"]"]);case"UnionTypeAnnotation":return w(" | ").join(r.map(e,"types"));case"VoidTypeAnnotation":return w("void",n);case"NullTypeAnnotation":return w("null",n);case"SymbolTypeAnnotation":return w("symbol",n);case"BigIntTypeAnnotation":return w("bigint",n);case"TSType":throw new Error("unprintable type: "+JSON.stringify(t.type));case"TSNumberKeyword":return w("number",n);case"TSBigIntKeyword":return w("bigint",n);case"TSObjectKeyword":return w("object",n);case"TSBooleanKeyword":return w("boolean",n);case"TSStringKeyword":return w("string",n);case"TSSymbolKeyword":return w("symbol",n);case"TSAnyKeyword":return w("any",n);case"TSVoidKeyword":return w("void",n);case"TSIntrinsicKeyword":return w("intrinsic",n);case"TSThisType":return w("this",n);case"TSNullKeyword":return w("null",n);case"TSUndefinedKeyword":return w("undefined",n);case"TSUnknownKeyword":return w("unknown",n);case"TSNeverKeyword":return w("never",n);case"TSArrayType":return v([r.call(e,"elementType"),"[]"]);case"TSLiteralType":return r.call(e,"literal");case"TSUnionType":return w(" | ").join(r.map(e,"types"));case"TSIntersectionType":return w(" & ").join(r.map(e,"types"));case"TSConditionalType":return s.push(r.call(e,"checkType")," extends ",r.call(e,"extendsType")," ? ",r.call(e,"trueType")," : ",r.call(e,"falseType")),v(s);case"TSInferType":return s.push("infer ",r.call(e,"typeParameter")),v(s);case"TSParenthesizedType":return v(["(",r.call(e,"typeAnnotation"),")"]);case"TSFunctionType":return v([r.call(e,"typeParameters"),"(",Ne(r,n,e),") => ",r.call(e,"typeAnnotation","typeAnnotation")]);case"TSConstructorType":return v(["new ",r.call(e,"typeParameters"),"(",Ne(r,n,e),") => ",r.call(e,"typeAnnotation","typeAnnotation")]);case"TSMappedType":return s.push(t.readonly?"readonly ":"","[",r.call(e,"typeParameter"),"]",t.optional?"?":""),t.typeAnnotation&&s.push(": ",r.call(e,"typeAnnotation"),";"),v([`{
@@ -11914,7 +12907,7 @@ while`),s.push(" (",r.call(e,"test"),");"),v(s)}case"DoExpression":{let i=r.call
11914
12907
  `,i.indent(n.tabWidth),`
11915
12908
  }`),v(s)}case"TSInstantiationExpression":return s.push(r.call(e,"expression"),r.call(e,"typeParameters")),v(s);case"V8IntrinsicIdentifier":return v(["%",r.call(e,"name")]);case"TopicReference":return w("#");case"ClassHeritage":case"ComprehensionBlock":case"ComprehensionExpression":case"Glob":case"GeneratorExpression":case"LetStatement":case"LetExpression":case"GraphExpression":case"GraphIndexExpression":case"XMLDefaultDeclaration":case"XMLAnyName":case"XMLQualifiedIdentifier":case"XMLFunctionQualifiedIdentifier":case"XMLAttributeSelector":case"XMLFilterExpression":case"XML":case"XMLElement":case"XMLList":case"XMLEscape":case"XMLText":case"XMLStartTag":case"XMLEndTag":case"XMLPointTag":case"XMLName":case"XMLAttribute":case"XMLCdata":case"XMLComment":case"XMLProcessingInstruction":default:debugger;throw new Error("unknown type: "+JSON.stringify(t.type))}}function Kc(r,n){let e=[],t=r.getValue();return t.decorators&&t.decorators.length>0&&!Gi(r)?r.each(function(s){e.push(n(s),`
11916
12909
  `)},"decorators"):Un(t)&&t.declaration&&t.declaration.decorators&&r.each(function(s){e.push(n(s),`
11917
- `)},"declaration","decorators"),v(e)}function ht(r,n,e){let t=[];r.each(function(a){let l=a.getValue();l&&(l.type==="EmptyStatement"&&!(l.comments&&l.comments.length>0)||(Y.Comment.check(l)||Y.Statement.check(l)||or.assert(l),t.push({node:l,printed:e(a)})))});let s=null,i=t.length,o=[];return t.forEach(function(a,l){let c=a.printed,p=a.node,u=c.length>1,f=l>0,m=l<i-1,d,g,h=p&&p.loc&&p.loc.lines,y=h&&n.reuseWhitespace&&Hi(p,h);if(f)if(y){let P=h.skipSpaces(y.start,!0),E=P?P.line:1,x=y.start.line-E;d=Array(x+1).join(`
12910
+ `)},"declaration","decorators"),v(e)}function ht(r,n,e){let t=[];r.each(function(a){let l=a.getValue();l&&(l.type==="EmptyStatement"&&!(l.comments&&l.comments.length>0)||(Y.Comment.check(l)||Y.Statement.check(l)||or.assert(l),t.push({node:l,printed:e(a)})))});let s=null,i=t.length,o=[];return t.forEach(function(a,l){let c=a.printed,p=a.node,u=c.length>1,f=l>0,m=l<i-1,d,g,h=p&&p.loc&&p.loc.lines,y=h&&n.reuseWhitespace&&qi(p,h);if(f)if(y){let P=h.skipSpaces(y.start,!0),E=P?P.line:1,x=y.start.line-E;d=Array(x+1).join(`
11918
12911
  `)}else d=u?`
11919
12912
 
11920
12913
  `:`
@@ -11922,7 +12915,7 @@ while`),s.push(" (",r.call(e,"test"),");"),v(s)}case"DoExpression":{let i=r.call
11922
12915
  `)}else g=u?`
11923
12916
 
11924
12917
  `:`
11925
- `;else g="";o.push(Xc(s,d),c),m?s=g:g&&o.push(g)}),v(o)}function Xc(r,n){if(!r&&!n)return w("");if(!r)return w(n);if(!n)return w(r);let e=w(r),t=w(n);return t.length>e.length?t:e}function ao(r){let n=[];r.declare&&n.push("declare ");let e=r.accessibility||r.access;return typeof e=="string"&&n.push(e," "),r.static&&n.push("static "),r.override&&n.push("override "),r.abstract&&n.push("abstract "),r.readonly&&n.push("readonly "),n}function qs(r,n,e){let t=r.getNode(),s=t.kind,i=[],o=t.value;Y.FunctionExpression.check(o)||(o=t),i.push(...ao(t)),o.async&&i.push("async "),o.generator&&i.push("*"),(s==="get"||s==="set")&&i.push(s," ");let a=r.call(e,"key");return t.computed&&(a=v(["[",a,"]"])),i.push(a),t.optional&&i.push("?"),t===o?(i.push(r.call(e,"typeParameters"),"(",Ne(r,n,e),")",r.call(e,"returnType")),t.body?i.push(" ",r.call(e,"body")):i.push(";")):(i.push(r.call(e,"value","typeParameters"),"(",r.call(l=>Ne(l,n,e),"value"),")",r.call(e,"value","returnType")),o.body?i.push(" ",r.call(e,"value","body")):i.push(";")),v(i)}function Ni(r,n,e){let t=r.map(e,"arguments"),s=Gt(n,"parameters"),i=w(", ").join(t);return i.getLineLength(1)>n.wrapColumn?(i=w(`,
12918
+ `;else g="";o.push(Xc(s,d),c),m?s=g:g&&o.push(g)}),v(o)}function Xc(r,n){if(!r&&!n)return w("");if(!r)return w(n);if(!n)return w(r);let e=w(r),t=w(n);return t.length>e.length?t:e}function ao(r){let n=[];r.declare&&n.push("declare ");let e=r.accessibility||r.access;return typeof e=="string"&&n.push(e," "),r.static&&n.push("static "),r.override&&n.push("override "),r.abstract&&n.push("abstract "),r.readonly&&n.push("readonly "),n}function Hs(r,n,e){let t=r.getNode(),s=t.kind,i=[],o=t.value;Y.FunctionExpression.check(o)||(o=t),i.push(...ao(t)),o.async&&i.push("async "),o.generator&&i.push("*"),(s==="get"||s==="set")&&i.push(s," ");let a=r.call(e,"key");return t.computed&&(a=v(["[",a,"]"])),i.push(a),t.optional&&i.push("?"),t===o?(i.push(r.call(e,"typeParameters"),"(",Ne(r,n,e),")",r.call(e,"returnType")),t.body?i.push(" ",r.call(e,"body")):i.push(";")):(i.push(r.call(e,"value","typeParameters"),"(",r.call(l=>Ne(l,n,e),"value"),")",r.call(e,"value","returnType")),o.body?i.push(" ",r.call(e,"value","body")):i.push(";")),v(i)}function Ni(r,n,e){let t=r.map(e,"arguments"),s=Gt(n,"parameters"),i=w(", ").join(t);return i.getLineLength(1)>n.wrapColumn?(i=w(`,
11926
12919
  `).join(t),v([`(
11927
12920
  `,i.indent(n.tabWidth),s?`,
11928
12921
  )`:`
@@ -11933,29 +12926,29 @@ while`),s.push(" (",r.call(e,"test"),");"),v(s)}case"DoExpression":{let i=r.call
11933
12926
  `,o.indent(n.tabWidth)])):o}function lo(r,n,e){let t=r.getValue();if(t.assertions&&t.assertions.length>0){let s=[" assert {"],i=r.map(e,"assertions"),o=w(", ").join(i);return o.length>1||o.getLineLength(1)>n.wrapColumn?s.push(`
11934
12927
  `,w(`,
11935
12928
  `).join(i).indent(n.tabWidth),`
11936
- }`):s.push(" ",o," }"),v(s)}return w("")}function Di(r,n,e){let t=r.getValue(),s=["export "];t.exportKind&&t.exportKind==="type"&&(t.declaration||s.push("type "));let i=n.objectCurlySpacing;if(Y.Declaration.assert(t),(t.default||t.type==="ExportDefaultDeclaration")&&s.push("default "),t.declaration)s.push(r.call(e,"declaration"));else if(t.specifiers){if(t.specifiers.length===1&&t.specifiers[0].type==="ExportBatchSpecifier")s.push("*");else if(t.specifiers.length===0)s.push("{}");else if(t.specifiers[0].type==="ExportDefaultSpecifier"){let a=[],l=[];if(r.each(function(c){c.getValue().type==="ExportDefaultSpecifier"?a.push(e(c)):l.push(e(c))},"specifiers"),a.forEach((c,p)=>{p>0&&s.push(", "),s.push(c)}),l.length>0){let c=w(", ").join(l);c.getLineLength(1)>n.wrapColumn&&(c=v([w(`,
12929
+ }`):s.push(" ",o," }"),v(s)}return w("")}function Mi(r,n,e){let t=r.getValue(),s=["export "];t.exportKind&&t.exportKind==="type"&&(t.declaration||s.push("type "));let i=n.objectCurlySpacing;if(Y.Declaration.assert(t),(t.default||t.type==="ExportDefaultDeclaration")&&s.push("default "),t.declaration)s.push(r.call(e,"declaration"));else if(t.specifiers){if(t.specifiers.length===1&&t.specifiers[0].type==="ExportBatchSpecifier")s.push("*");else if(t.specifiers.length===0)s.push("{}");else if(t.specifiers[0].type==="ExportDefaultSpecifier"){let a=[],l=[];if(r.each(function(c){c.getValue().type==="ExportDefaultSpecifier"?a.push(e(c)):l.push(e(c))},"specifiers"),a.forEach((c,p)=>{p>0&&s.push(", "),s.push(c)}),l.length>0){let c=w(", ").join(l);c.getLineLength(1)>n.wrapColumn&&(c=v([w(`,
11937
12930
  `).join(l).indent(n.tabWidth),","])),a.length>0&&s.push(", "),c.length>1?s.push(`{
11938
12931
  `,c,`
11939
12932
  }`):n.objectCurlySpacing?s.push("{ ",c," }"):s.push("{",c,"}")}}else s.push(i?"{ ":"{",w(", ").join(r.map(e,"specifiers")),i?" }":"}");t.source&&s.push(" from ",r.call(e,"source"),lo(r,n,e))}let o=v(s);return Jt(o)!==";"&&!(t.declaration&&(t.declaration.type==="FunctionDeclaration"||t.declaration.type==="ClassDeclaration"||t.declaration.type==="TSModuleDeclaration"||t.declaration.type==="TSInterfaceDeclaration"||t.declaration.type==="TSEnumDeclaration"))&&(o=v([o,";"])),o}function Vt(r,n){return Gi(r)||n.unshift("declare "),v(n)}function zt(r,n){return r.call(function(e){let t=e.getValue();return t?t==="plus"?w("+"):t==="minus"?w("-"):n(e):w("")},"variance")}function Je(r,n){return r.length>1?v([" ",r]):v([`
11940
- `,En(r).indent(n.tabWidth)])}function Jt(r){let n=r.lastPos();do{let e=r.charAt(n);if(/\S/.test(e))return e}while(r.prevPos(n))}function Mi(r){return Jt(r)==="}"}function wn(r){return r.replace(/['"]/g,n=>n==='"'?"'":'"')}function bt(r){let n=Be(r,"value"),e=Be(r,"extra");if(e&&typeof e.raw=="string"&&n==e.rawValue)return e.raw;if(r.type==="Literal"){let t=r.raw;if(typeof t=="string"&&n==t)return t}}function Cn(r){return JSON.stringify(r).replace(/[\u2028\u2029]/g,function(n){return"\\u"+n.charCodeAt(0).toString(16)})}function $t(r,n){switch(or.assert(r),n.quote){case"auto":{let e=Cn(r),t=wn(Cn(wn(r)));return e.length>t.length?t:e}case"single":return wn(Cn(wn(r)));case"double":default:return Cn(r)}}function En(r){let n=Jt(r);return!n||`
12933
+ `,En(r).indent(n.tabWidth)])}function Jt(r){let n=r.lastPos();do{let e=r.charAt(n);if(/\S/.test(e))return e}while(r.prevPos(n))}function Di(r){return Jt(r)==="}"}function wn(r){return r.replace(/['"]/g,n=>n==='"'?"'":'"')}function bt(r){let n=_e(r,"value"),e=_e(r,"extra");if(e&&typeof e.raw=="string"&&n==e.rawValue)return e.raw;if(r.type==="Literal"){let t=r.raw;if(typeof t=="string"&&n==t)return t}}function Cn(r){return JSON.stringify(r).replace(/[\u2028\u2029]/g,function(n){return"\\u"+n.charCodeAt(0).toString(16)})}function $t(r,n){switch(or.assert(r),n.quote){case"auto":{let e=Cn(r),t=wn(Cn(wn(r)));return e.length>t.length?t:e}case"single":return wn(Cn(wn(r)));case"double":default:return Cn(r)}}function En(r){let n=Jt(r);return!n||`
11941
12934
  };`.indexOf(n)<0?v([r,";"]):r}function Jc(r,n){return new Gc(n).print(r)}var Sn;function Yc(){if(Sn)return Sn;let r=Qc();return Sn={parse(n,e){return Oi.parse(n,{...r,...e})}},Sn}function Qc(){return{sourceType:"module",strictMode:!1,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,startLine:1,tokens:!0,plugins:["asyncGenerators","bigInt","classPrivateMethods","classPrivateProperties","classProperties","classStaticBlock","decimal","decorators-legacy","doExpressions","dynamicImport","exportDefaultFrom","exportExtensions","exportNamespaceFrom","functionBind","functionSent","importAssertions","importMeta","nullishCoalescingOperator","numericSeparator","objectRestSpread","optionalCatchBinding","optionalChaining",["pipelineOperator",{proposal:"minimal"}],["recordAndTuple",{syntaxType:"hash"}],"throwExpressions","topLevelAwait","v8intrinsic","jsx","typescript"]}}var Zc=Object.defineProperty,ep=(r,n,e)=>n in r?Zc(r,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[n]=e,Li=(r,n,e)=>(ep(r,typeof n!="symbol"?n+"":n,e),e),ie=class extends Error{constructor(n,e){if(super(""),Li(this,"rawMessage"),Li(this,"options"),this.name="MagicastError",this.rawMessage=n,this.options=e,e?.ast&&e?.code&&e.ast.loc){let{line:t,column:s}=e.ast.loc.start,i=e.code.split(`
11942
12935
  `),o=Math.max(0,t-3),a=Math.min(i.length,t+3),l=i.slice(o,a).map((c,p)=>(c=`${(o+p+1).toString().padStart(3," ")} | ${c}`,o+p===t-1&&(c+=`
11943
12936
  ${" ".repeat(6+s)}^`),c));n+=`
11944
12937
 
11945
12938
  ${l.join(`
11946
12939
  `)}
11947
- `}this.message=n}},tp=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),co=new Set(["string","number","boolean","bigint","symbol","undefined"]),Q=Qt;function np(r){return/^[$A-Z_a-z][\w$]*$/.test(r)}var ar="__magicast_proxy";function ve(r,n=new Set){if(r===void 0)return Q.identifier("undefined");if(r===null)return Q.literal(null);if(co.has(typeof r))return Q.literal(r);if(n.has(r))throw new ie("Can not serialize circular reference");if(n.add(r),r[ar])return r.$ast;if(r instanceof RegExp){let e=Q.regExpLiteral(r.source,r.flags);return delete e.extra.raw,e}return r instanceof Set?Q.newExpression(Q.identifier("Set"),[Q.arrayExpression([...r].map(e=>ve(e,n)))]):r instanceof Date?Q.newExpression(Q.identifier("Date"),[Q.literal(r.toISOString())]):r instanceof Map?Q.newExpression(Q.identifier("Map"),[Q.arrayExpression([...r].map(([e,t])=>Q.arrayExpression([ve(e,n),ve(t,n)])))]):Array.isArray(r)?Q.arrayExpression(r.map(e=>ve(e,n))):typeof r=="object"?Q.objectExpression(Object.entries(r).map(([e,t])=>Q.property("init",/^[$A-Z_a-z][\w$]*$/g.test(e)?Q.identifier(e):Q.literal(e),ve(t,n)))):Q.literal(r)}function sp(r,n={}){let e=n;return e[ar]=!0,e.$ast=r,e.$type||(e.$type="object"),e}var rp={enumerable:!0,configurable:!0};function xe(r,n,e){let t=sp(r,n);return new Proxy({},{ownKeys(){return Object.keys(t).filter(s=>s!==ar&&!s.startsWith("$"))},getOwnPropertyDescriptor(){return rp},has(s,i){return i in t},...e,get(s,i,o){if(i in t)return t[i];if(e.get)return e.get(s,i,o)},set(s,i,o,a){return i in t?(t[i]=o,!0):e.set?e.set(s,i,o,a):!1}})}var pe=Qt,Hs=new WeakMap;function ip(r,n,e){if(Hs.has(n))return Hs.get(n);let t=xe(n,{get $declaration(){return r},get imported(){return n.type==="ImportDefaultSpecifier"?"default":n.type==="ImportNamespaceSpecifier"?"*":n.imported.type==="Identifier"?n.imported.name:n.imported.value},set imported(s){if(n.type!=="ImportSpecifier")throw new ie("Changing import name is not yet implemented");n.imported.type==="Identifier"?n.imported.name=s:n.imported.value=s},get local(){return n.local.name},set local(s){n.local.name=s},get from(){return r.source.value},set from(s){if(s===r.source.value)return;r.specifiers=r.specifiers.filter(o=>o!==n),r.specifiers.length===0&&(e.body=e.body.filter(o=>o!==r));let i=e.body.find(o=>o.type==="ImportDeclaration"&&o.source.value===s);i?i.specifiers.push(n):e.body.unshift(pe.importDeclaration([n],pe.stringLiteral(s)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return["imported","local","from","toJSON"]}});return Hs.set(n,t),t}function op(r,n){let e=()=>{let o=[];for(let a of r.body)if(a.type==="ImportDeclaration")for(let l of a.specifiers)o.push(ip(a,l,r));return o},t=(o,a,l)=>{let c=e(),p=c.find(d=>d.local===o),u=a.local||o;if(p)return p.imported=a.imported,p.local=u,p.from=a.from,!0;let f=a.imported==="default"?pe.importDefaultSpecifier(pe.identifier(u)):a.imported==="*"?pe.importNamespaceSpecifier(pe.identifier(u)):pe.importSpecifier(pe.identifier(a.imported),pe.identifier(u)),m=c.find(d=>d.from===a.from)?.$declaration;if(m)m.specifiers.push(f);else if(l==="prepend"||c.length===0)r.body.unshift(pe.importDeclaration([f],pe.stringLiteral(a.from)));else{let d=c.at(-1).$declaration,g=r.body.indexOf(d);r.body.splice(g+1,0,pe.importDeclaration([f],pe.stringLiteral(a.from)))}return!0},s=o=>{let a=e().find(p=>p.local===o);if(!a)return!1;let l=a.$declaration,c=a.$ast;return l.specifiers=l.specifiers.filter(p=>p!==c),l.specifiers.length===0&&(r.body=r.body.filter(p=>p!==l)),!0};return xe(r,{$type:"imports",$add(o){t(o.local||o.imported,o,"prepend")},$prepend(o){t(o.local||o.imported,o,"prepend")},$append(o){t(o.local||o.imported,o,"append")},get $items(){return e()},toJSON(){return e().reduce((o,a)=>(o[a.local]=a,o),{})}},{get(o,a){return e().find(l=>l.local===a)},set(o,a,l){return t(a,l,"prepend")},deleteProperty(o,a){return s(a)},ownKeys(){return e().map(o=>o.local)},has(o,a){return e().some(l=>l.local===a)}})}function _n(r,n,e){let t=i=>n[i],s=(i,o)=>{n[i]=o};return xe(r,{$type:"array",push(i){n.push(ve(i))},pop(){return oe(n.pop(),e)},unshift(i){n.unshift(ve(i))},shift(){return oe(n.shift(),e)},splice(i,o,...a){return n.splice(i,o,...a.map(c=>ve(c))).map(c=>oe(c,e))},find(i){return n.map(o=>oe(o,e)).find(i)},findIndex(i){return n.map(o=>oe(o,e)).findIndex(i)},includes(i){return n.map(o=>oe(o,e)).includes(i)},toJSON(){return n.map(i=>oe(i,e))}},{get(i,o){if(o==="length")return n.length;if(o===Symbol.iterator)return function*(){for(let c of n)yield oe(c,e)};if(typeof o=="symbol")return;let a=+o;if(Number.isNaN(a))return;let l=t(a);if(l)return oe(l,e)},set(i,o,a){if(typeof o=="symbol")return!1;let l=+o;return Number.isNaN(l)?!1:(s(l,ve(a)),!0)},deleteProperty(i,o){if(typeof o=="symbol")return!1;let a=+o;return Number.isNaN(a)?!1:(n[a]=ve(void 0),!0)},ownKeys(){return["length",...n.map((i,o)=>o.toString())]}})}function ap(r,n){if("elements"in r)return _n(r,r.elements,n)}function lp(r,n){if(r.type!=="CallExpression")throw new ie("Not a function call");function e(s){if(s.type==="Identifier")return s.name;if(s.type==="MemberExpression")return`${e(s.object)}.${e(s.property)}`;throw new ie("Not implemented")}let t=_n(r,r.arguments,n);return xe(r,{$type:"function-call",$callee:e(r.callee),$args:t},{})}function cp(r,n){if(r.type!=="ArrowFunctionExpression")throw new ie("Not an arrow function expression");let e=_n(r,r.params,n);return xe(r,{$type:"arrow-function-expression",$params:e,$body:oe(r.body,n)},{})}var pp=Qt;function up(r,n){if(!("properties"in r))return;let e=i=>{for(let o of r.properties){if("key"in o&&"name"in o.key&&o.key.name===i)return o.value;if(o.type==="ObjectProperty"&&(o.key.type==="StringLiteral"||o.key.type==="NumericLiteral"||o.key.type==="BooleanLiteral")&&o.key.value.toString()===i)return o.value.value??o.value}},t=(i,o=!1)=>{if("key"in i&&"name"in i.key)return i.key.name;if(i.type==="ObjectProperty"&&(i.key.type==="StringLiteral"||i.key.type==="NumericLiteral"||i.key.type==="BooleanLiteral"))return i.key.value.toString();if(o)throw new ie(`Casting "${i.type}" is not supported`,{ast:i,code:n?.$code})},s=(i,o)=>{let a=r.properties.find(l=>t(l)===i);a?a.value=o:np(i)?r.properties.push({type:"Property",key:{type:"Identifier",name:i},value:o}):r.properties.push({type:"ObjectProperty",key:pp.stringLiteral(i),value:o})};return xe(r,{$type:"object",toJSON(){return r.properties.reduce((i,o)=>("key"in o&&"name"in o.key&&(i[o.key.name]=oe(o.value,n)),i),{})}},{get(i,o){let a=e(o);if(a)return oe(a,n)},set(i,o,a){return typeof o!="string"&&(o=String(o)),s(o,ve(a)),!0},deleteProperty(i,o){typeof o!="string"&&(o=String(o));let a=r.properties.findIndex(l=>"key"in l&&"name"in l.key&&l.key.name===o);return a!==-1&&r.properties.splice(a,1),!0},ownKeys(){return r.properties.map(i=>t(i,!0)).filter(Boolean)}})}function dp(r,n){if(r.type!=="NewExpression")throw new ie("Not a new expression");function e(s){if(s.type==="Identifier")return s.name;if(s.type==="MemberExpression")return`${e(s.object)}.${e(s.property)}`;throw new ie("Not implemented")}let t=_n(r,r.arguments,n);return xe(r,{$type:"new-expression",$callee:e(r.callee),$args:t},{})}function fp(r){if(r.type!=="Identifier")throw new ie("Not an identifier");return xe(r,{$type:"identifier",$name:r.name},{})}function mp(r){if(r.type!=="LogicalExpression")throw new ie("Not a logical expression");return xe(r,{$type:"logicalExpression"},{})}function hp(r){if(r.type!=="MemberExpression")throw new ie("Not a member expression");return xe(r,{$type:"memberExpression"},{})}var Gs=new WeakMap;function oe(r,n){if(co.has(typeof r))return r;if(tp.has(r.type))return r.value;if(Gs.has(r))return Gs.get(r);let e;switch(r.type){case"ObjectExpression":{e=up(r,n);break}case"ArrayExpression":{e=ap(r,n);break}case"CallExpression":{e=lp(r,n);break}case"ArrowFunctionExpression":{e=cp(r,n);break}case"NewExpression":{e=dp(r,n);break}case"Identifier":{e=fp(r);break}case"LogicalExpression":{e=mp(r);break}case"MemberExpression":{e=hp(r);break}case"TSAsExpression":case"TSSatisfiesExpression":{e=oe(r.expression,n);break}default:throw new ie(`Casting "${r.type}" is not supported`,{ast:r,code:n?.$code})}return Gs.set(r,e),e}var qt=Qt;function bp(r,n){let e=s=>{let i=s==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let o of r.body)if(o.type===i){if(s==="default")return o.declaration;if(o.declaration&&"declarations"in o.declaration){let a=o.declaration.declarations[0];if("name"in a.id&&a.id.name===s)return a.init}}},t=(s,i)=>{let o=s==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration",a=ve(i);for(let l of r.body)if(l.type===o){if(s==="default"){l.declaration=a;return}if(l.declaration&&"declarations"in l.declaration){let c=l.declaration.declarations[0];if("name"in c.id&&c.id.name===s){c.init=a;return}}}r.body.push(s==="default"?qt.exportDefaultDeclaration(a):qt.exportNamedDeclaration(qt.variableDeclaration("const",[qt.variableDeclarator(qt.identifier(s),a)])))};return xe(r,{$type:"exports"},{get(s,i){let o=e(i);if(o)return oe(o,n)},set(s,i,o){return t(i,o),!0},ownKeys(){return r.body.flatMap(s=>s.type==="ExportDefaultDeclaration"?["default"]:s.type==="ExportNamedDeclaration"&&s.declaration&&"declarations"in s.declaration?s.declaration.declarations.map(i=>"name"in i.id?i.id.name:""):[]).filter(Boolean)},deleteProperty(s,i){let o=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let a=0;a<r.body.length;a++){let l=r.body[a];if(l.type===o){if(i==="default")return r.body.splice(a,1),!0;if(l.declaration&&"declarations"in l.declaration){let c=l.declaration.declarations[0];if("name"in c.id&&c.id.name===i)return r.body.splice(a,1),!0}}}return!1}})}function gp(r,n){let e=r.program;if(e.type!=="Program")throw new ie(`Cannot proxify ${r.type} as module`);let t={$code:n,$type:"module"},s=xe(e,t,{ownKeys(){return["imports","exports","generate"]}});return t.exports=bp(e,s),t.imports=op(e),t.generate=i=>po(s,i),s}function yp(r,n={}){let e={wrapColumn:n.wrapColumn===void 0,indent:n.tabWidth===void 0||n.useTabs===void 0,quote:n.quote===void 0,arrowParens:n.arrowParensAlways===void 0,trailingComma:n.trailingComma===void 0},t=2,s=0,i=0,o=0,a=0,l=/(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,c={doubleQuote:0,singleQuote:0,singleParam:0,trailingComma:0},p=(r||"").split(`
11948
- `),u=!1;for(let f of p){let m=f.trim();if(m.length!==0){if(e.wrapColumn&&f.length>o&&(o=f.length),e.indent){let d=f.match(/^\s+/)?.[0]||"";d.length>0&&(d.length>0&&d.length<t&&(t=d.length),d[0]===" "?s++:d.length>0&&s--)}if(m.at(-1)===";"?i++:m.length>0&&i--,e.quote||e.arrowParens){let d=m.matchAll(l);for(let g of d)if(g.groups)for(let h in c)g.groups[h]&&c[h]++}e.trailingComma&&((f.startsWith("}")||f.startsWith("]"))&&(u?a++:a--),u=m.endsWith(","))}}return{wrapColumn:o,useTabs:s>0,tabWidth:t,quote:c.singleQuote>c.doubleQuote?"single":"double",arrowParensAlways:c.singleParam>0,trailingComma:a>0||c.trailingComma>0,useSemi:i>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...n}}function vp(r,n){let e=Lc(r,{parser:n?.parser||Yc(),...n});return gp(e,r)}function po(r,n={}){let e=r.$ast||r,t=n.format===!1||!("$code"in r)?{}:yp(r.$code,n.format),{code:s,map:i}=Jc(e,{...n,...t});return{code:s,map:i}}async function uo(r,n={}){let e=await Ws.readFile(r,"utf8");return n.sourceFileName=n.sourceFileName??r,vp(e,n)}async function fo(r,n,e){let t="$ast"in r?r.$ast:r,{code:s,map:i}=po(t,e);await Ws.writeFile(n,s),i&&await Ws.writeFile(n+".map",i)}var Ju=rn(as(),1),Yu=rn($s(),1);function mo(r,n){if(typeof n=="object")for(let e in n)typeof r[e]=="object"&&typeof n[e]=="object"?mo(r[e],n[e]):r[e]=n[e]}function lr(r){return xp(r.exports.default)}function xp(r){return r.$type==="function-call"?r.$args[0]:r}function ho(r,n,e,t){let s=lr(r);s.modules||(s.modules=[]),s.modules.includes(n)||s.modules.push(n),e&&(s[e]||(s[e]={}),mo(s[e],t))}import Cp from"prompts";import vo from"kleur";import xo from"prompts";var bo=["radix-vue","tailwind-variants","@nuxt/fonts"],go=["typescript","tailwindcss-animate","@nuxt/icon","prettier-plugin-tailwindcss","prettier","@nuxtjs/tailwindcss","@nuxtjs/color-mode","@ianvs/prettier-plugin-sort-imports","@vueuse/nuxt","@tailwindcss/forms"],yo=["@nuxtjs/tailwindcss","@nuxtjs/color-mode","@vueuse/nuxt","@nuxt/icon","@nuxt/fonts"],cr=[{title:"Nuxt 3",value:3},{title:"Nuxt 4",value:4}],vt=[{title:"NPM",value:"npm"},{title:"YARN",value:"yarn"},{title:"PNPM",value:"pnpm"},{title:"BUN",value:"bun"}],Bn=[{title:"Zinc",value:"zinc"},{title:"Slate",value:"slate"},{title:"Stone",value:"stone"},{title:"Gray",value:"gray"},{title:"Neutral",value:"neutral"},{title:"Red",value:"red"},{title:"Rose",value:"rose"},{title:"Orange",value:"orange"},{title:"Green",value:"green"},{title:"Blue",value:"blue"},{title:"Yellow",value:"yellow"},{title:"Violet",value:"violet"}];var Po=async()=>{let r=await xo([{name:"nuxtVersion",type:"select",message:"Which Nuxt version are you using?",choices:cr}]);return r.nuxtVersion?r.nuxtVersion:(console.log(vo.red("No Nuxt version selected. Exiting...")),process.exit(0))},To=async()=>{let r=await xo([{name:"nuxtVersion",type:"select",message:"Which Nuxt version are you using?",choices:cr},{name:"theme",type:"autocomplete",message:"Which theme do you want to start with?",choices:Bn},{name:"tailwindCSSLocation",type:"text",message:"Where is your tailwind.css file located?",initial:(n,e)=>e.nuxtVersion==3?"assets/css/tailwind.css":"app/assets/css/tailwind.css"},{name:"tailwindConfigLocation",type:"text",message:"Where is your tailwind.config file located?",initial:"tailwind.config.js"},{name:"componentsLocation",type:"text",message:"Where should your components be stored?",initial:(n,e)=>e.nuxtVersion==3?"components/Ui":"app/components/Ui"},{name:"composablesLocation",type:"text",message:"Where should your composables be stored?",initial:(n,e)=>e.nuxtVersion==3?"composables":"app/composables"},{name:"pluginsLocation",type:"text",message:"Where should your plugins be stored?",initial:(n,e)=>e.nuxtVersion==3?"plugins":"app/plugins"},{name:"utilsLocation",type:"text",message:"Where should your utils be stored?",initial:(n,e)=>e.nuxtVersion==3?"utils":"app/utils"},{name:"force",type:"confirm",message:"Should we just replace component files if they already exist?",initial:!0},{name:"useDefaultFilename",type:"confirm",message:"Would you like to use the default filename when adding components?",initial:!0},{name:"packageManager",type:"select",message:"Which package manager do you use?",choices:vt}]);return!r||Object.keys(r).length<10?(console.log(vo.red("Incomplete configuration submitted. Exiting...")),process.exit(0)):r};var Sp=process.cwd(),pr="ui-thing.config.ts",Ip={nuxtVersion:3,theme:"zinc",tailwindCSSLocation:"assets/css/tailwind.css",tailwindConfigLocation:"tailwind.config.js",componentsLocation:"components/Ui",composablesLocation:"composables",pluginsLocation:"plugins",utilsLocation:"utils",force:!0,useDefaultFilename:!0,packageManager:"npm"},Ep={nuxtVersion:4,theme:"zinc",tailwindCSSLocation:"app/assets/css/tailwind.css",tailwindConfigLocation:"tailwind.config.js",componentsLocation:"app/components/Ui",composablesLocation:"app/composables",pluginsLocation:"app/plugins",utilsLocation:"app/utils",force:!0,useDefaultFilename:!0,packageManager:"npm"},xt=async()=>{if(!Pe.existsSync("nuxt.config.ts"))return console.log(wo.red(`No ${wo.bgWhite("nuxt.config.ts")} file found. Exiting...`)),process.exit(0);let r=await uo(Pp(Sp,"nuxt.config.ts")),n=lr(r);return{nuxtConfig:r,defaultExport:n}},de=async r=>{let n=Pe.existsSync(pr),e={},t=Number(r?.nuxtVersion);if(!n||r?.force){if(t||(t=await Po()),r?.yes?e=Number(t)===4?Ep:Ip:e=await To(),await Pe.writeFile(pr,`export default ${JSON.stringify(e,null,2)}`),e.packageManager==="pnpm")if(Pe.existsSync(".npmrc")){let{confirmCreateNpmrc:i}=await Cp({type:"confirm",name:"confirmCreateNpmrc",message:"A .npmrc file already exists. Do you want to overwrite it?",initial:!1});i&&await Pe.writeFile(".npmrc",`shamefully-hoist=true
12940
+ `}this.message=n}},tp=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),co=new Set(["string","number","boolean","bigint","symbol","undefined"]),Q=Qt;function np(r){return/^[$A-Z_a-z][\w$]*$/.test(r)}var ar="__magicast_proxy";function ve(r,n=new Set){if(r===void 0)return Q.identifier("undefined");if(r===null)return Q.literal(null);if(co.has(typeof r))return Q.literal(r);if(n.has(r))throw new ie("Can not serialize circular reference");if(n.add(r),r[ar])return r.$ast;if(r instanceof RegExp){let e=Q.regExpLiteral(r.source,r.flags);return delete e.extra.raw,e}return r instanceof Set?Q.newExpression(Q.identifier("Set"),[Q.arrayExpression([...r].map(e=>ve(e,n)))]):r instanceof Date?Q.newExpression(Q.identifier("Date"),[Q.literal(r.toISOString())]):r instanceof Map?Q.newExpression(Q.identifier("Map"),[Q.arrayExpression([...r].map(([e,t])=>Q.arrayExpression([ve(e,n),ve(t,n)])))]):Array.isArray(r)?Q.arrayExpression(r.map(e=>ve(e,n))):typeof r=="object"?Q.objectExpression(Object.entries(r).map(([e,t])=>Q.property("init",/^[$A-Z_a-z][\w$]*$/g.test(e)?Q.identifier(e):Q.literal(e),ve(t,n)))):Q.literal(r)}function sp(r,n={}){let e=n;return e[ar]=!0,e.$ast=r,e.$type||(e.$type="object"),e}var rp={enumerable:!0,configurable:!0};function xe(r,n,e){let t=sp(r,n);return new Proxy({},{ownKeys(){return Object.keys(t).filter(s=>s!==ar&&!s.startsWith("$"))},getOwnPropertyDescriptor(){return rp},has(s,i){return i in t},...e,get(s,i,o){if(i in t)return t[i];if(e.get)return e.get(s,i,o)},set(s,i,o,a){return i in t?(t[i]=o,!0):e.set?e.set(s,i,o,a):!1}})}var pe=Qt,qs=new WeakMap;function ip(r,n,e){if(qs.has(n))return qs.get(n);let t=xe(n,{get $declaration(){return r},get imported(){return n.type==="ImportDefaultSpecifier"?"default":n.type==="ImportNamespaceSpecifier"?"*":n.imported.type==="Identifier"?n.imported.name:n.imported.value},set imported(s){if(n.type!=="ImportSpecifier")throw new ie("Changing import name is not yet implemented");n.imported.type==="Identifier"?n.imported.name=s:n.imported.value=s},get local(){return n.local.name},set local(s){n.local.name=s},get from(){return r.source.value},set from(s){if(s===r.source.value)return;r.specifiers=r.specifiers.filter(o=>o!==n),r.specifiers.length===0&&(e.body=e.body.filter(o=>o!==r));let i=e.body.find(o=>o.type==="ImportDeclaration"&&o.source.value===s);i?i.specifiers.push(n):e.body.unshift(pe.importDeclaration([n],pe.stringLiteral(s)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return["imported","local","from","toJSON"]}});return qs.set(n,t),t}function op(r,n){let e=()=>{let o=[];for(let a of r.body)if(a.type==="ImportDeclaration")for(let l of a.specifiers)o.push(ip(a,l,r));return o},t=(o,a,l)=>{let c=e(),p=c.find(d=>d.local===o),u=a.local||o;if(p)return p.imported=a.imported,p.local=u,p.from=a.from,!0;let f=a.imported==="default"?pe.importDefaultSpecifier(pe.identifier(u)):a.imported==="*"?pe.importNamespaceSpecifier(pe.identifier(u)):pe.importSpecifier(pe.identifier(a.imported),pe.identifier(u)),m=c.find(d=>d.from===a.from)?.$declaration;if(m)m.specifiers.push(f);else if(l==="prepend"||c.length===0)r.body.unshift(pe.importDeclaration([f],pe.stringLiteral(a.from)));else{let d=c.at(-1).$declaration,g=r.body.indexOf(d);r.body.splice(g+1,0,pe.importDeclaration([f],pe.stringLiteral(a.from)))}return!0},s=o=>{let a=e().find(p=>p.local===o);if(!a)return!1;let l=a.$declaration,c=a.$ast;return l.specifiers=l.specifiers.filter(p=>p!==c),l.specifiers.length===0&&(r.body=r.body.filter(p=>p!==l)),!0};return xe(r,{$type:"imports",$add(o){t(o.local||o.imported,o,"prepend")},$prepend(o){t(o.local||o.imported,o,"prepend")},$append(o){t(o.local||o.imported,o,"append")},get $items(){return e()},toJSON(){return e().reduce((o,a)=>(o[a.local]=a,o),{})}},{get(o,a){return e().find(l=>l.local===a)},set(o,a,l){return t(a,l,"prepend")},deleteProperty(o,a){return s(a)},ownKeys(){return e().map(o=>o.local)},has(o,a){return e().some(l=>l.local===a)}})}function Rn(r,n,e){let t=i=>n[i],s=(i,o)=>{n[i]=o};return xe(r,{$type:"array",push(i){n.push(ve(i))},pop(){return oe(n.pop(),e)},unshift(i){n.unshift(ve(i))},shift(){return oe(n.shift(),e)},splice(i,o,...a){return n.splice(i,o,...a.map(c=>ve(c))).map(c=>oe(c,e))},find(i){return n.map(o=>oe(o,e)).find(i)},findIndex(i){return n.map(o=>oe(o,e)).findIndex(i)},includes(i){return n.map(o=>oe(o,e)).includes(i)},toJSON(){return n.map(i=>oe(i,e))}},{get(i,o){if(o==="length")return n.length;if(o===Symbol.iterator)return function*(){for(let c of n)yield oe(c,e)};if(typeof o=="symbol")return;let a=+o;if(Number.isNaN(a))return;let l=t(a);if(l)return oe(l,e)},set(i,o,a){if(typeof o=="symbol")return!1;let l=+o;return Number.isNaN(l)?!1:(s(l,ve(a)),!0)},deleteProperty(i,o){if(typeof o=="symbol")return!1;let a=+o;return Number.isNaN(a)?!1:(n[a]=ve(void 0),!0)},ownKeys(){return["length",...n.map((i,o)=>o.toString())]}})}function ap(r,n){if("elements"in r)return Rn(r,r.elements,n)}function lp(r,n){if(r.type!=="CallExpression")throw new ie("Not a function call");function e(s){if(s.type==="Identifier")return s.name;if(s.type==="MemberExpression")return`${e(s.object)}.${e(s.property)}`;throw new ie("Not implemented")}let t=Rn(r,r.arguments,n);return xe(r,{$type:"function-call",$callee:e(r.callee),$args:t},{})}function cp(r,n){if(r.type!=="ArrowFunctionExpression")throw new ie("Not an arrow function expression");let e=Rn(r,r.params,n);return xe(r,{$type:"arrow-function-expression",$params:e,$body:oe(r.body,n)},{})}var pp=Qt;function up(r,n){if(!("properties"in r))return;let e=i=>{for(let o of r.properties){if("key"in o&&"name"in o.key&&o.key.name===i)return o.value;if(o.type==="ObjectProperty"&&(o.key.type==="StringLiteral"||o.key.type==="NumericLiteral"||o.key.type==="BooleanLiteral")&&o.key.value.toString()===i)return o.value.value??o.value}},t=(i,o=!1)=>{if("key"in i&&"name"in i.key)return i.key.name;if(i.type==="ObjectProperty"&&(i.key.type==="StringLiteral"||i.key.type==="NumericLiteral"||i.key.type==="BooleanLiteral"))return i.key.value.toString();if(o)throw new ie(`Casting "${i.type}" is not supported`,{ast:i,code:n?.$code})},s=(i,o)=>{let a=r.properties.find(l=>t(l)===i);a?a.value=o:np(i)?r.properties.push({type:"Property",key:{type:"Identifier",name:i},value:o}):r.properties.push({type:"ObjectProperty",key:pp.stringLiteral(i),value:o})};return xe(r,{$type:"object",toJSON(){return r.properties.reduce((i,o)=>("key"in o&&"name"in o.key&&(i[o.key.name]=oe(o.value,n)),i),{})}},{get(i,o){let a=e(o);if(a)return oe(a,n)},set(i,o,a){return typeof o!="string"&&(o=String(o)),s(o,ve(a)),!0},deleteProperty(i,o){typeof o!="string"&&(o=String(o));let a=r.properties.findIndex(l=>"key"in l&&"name"in l.key&&l.key.name===o);return a!==-1&&r.properties.splice(a,1),!0},ownKeys(){return r.properties.map(i=>t(i,!0)).filter(Boolean)}})}function dp(r,n){if(r.type!=="NewExpression")throw new ie("Not a new expression");function e(s){if(s.type==="Identifier")return s.name;if(s.type==="MemberExpression")return`${e(s.object)}.${e(s.property)}`;throw new ie("Not implemented")}let t=Rn(r,r.arguments,n);return xe(r,{$type:"new-expression",$callee:e(r.callee),$args:t},{})}function fp(r){if(r.type!=="Identifier")throw new ie("Not an identifier");return xe(r,{$type:"identifier",$name:r.name},{})}function mp(r){if(r.type!=="LogicalExpression")throw new ie("Not a logical expression");return xe(r,{$type:"logicalExpression"},{})}function hp(r){if(r.type!=="MemberExpression")throw new ie("Not a member expression");return xe(r,{$type:"memberExpression"},{})}var Gs=new WeakMap;function oe(r,n){if(co.has(typeof r))return r;if(tp.has(r.type))return r.value;if(Gs.has(r))return Gs.get(r);let e;switch(r.type){case"ObjectExpression":{e=up(r,n);break}case"ArrayExpression":{e=ap(r,n);break}case"CallExpression":{e=lp(r,n);break}case"ArrowFunctionExpression":{e=cp(r,n);break}case"NewExpression":{e=dp(r,n);break}case"Identifier":{e=fp(r);break}case"LogicalExpression":{e=mp(r);break}case"MemberExpression":{e=hp(r);break}case"TSAsExpression":case"TSSatisfiesExpression":{e=oe(r.expression,n);break}default:throw new ie(`Casting "${r.type}" is not supported`,{ast:r,code:n?.$code})}return Gs.set(r,e),e}var Ht=Qt;function bp(r,n){let e=s=>{let i=s==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let o of r.body)if(o.type===i){if(s==="default")return o.declaration;if(o.declaration&&"declarations"in o.declaration){let a=o.declaration.declarations[0];if("name"in a.id&&a.id.name===s)return a.init}}},t=(s,i)=>{let o=s==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration",a=ve(i);for(let l of r.body)if(l.type===o){if(s==="default"){l.declaration=a;return}if(l.declaration&&"declarations"in l.declaration){let c=l.declaration.declarations[0];if("name"in c.id&&c.id.name===s){c.init=a;return}}}r.body.push(s==="default"?Ht.exportDefaultDeclaration(a):Ht.exportNamedDeclaration(Ht.variableDeclaration("const",[Ht.variableDeclarator(Ht.identifier(s),a)])))};return xe(r,{$type:"exports"},{get(s,i){let o=e(i);if(o)return oe(o,n)},set(s,i,o){return t(i,o),!0},ownKeys(){return r.body.flatMap(s=>s.type==="ExportDefaultDeclaration"?["default"]:s.type==="ExportNamedDeclaration"&&s.declaration&&"declarations"in s.declaration?s.declaration.declarations.map(i=>"name"in i.id?i.id.name:""):[]).filter(Boolean)},deleteProperty(s,i){let o=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let a=0;a<r.body.length;a++){let l=r.body[a];if(l.type===o){if(i==="default")return r.body.splice(a,1),!0;if(l.declaration&&"declarations"in l.declaration){let c=l.declaration.declarations[0];if("name"in c.id&&c.id.name===i)return r.body.splice(a,1),!0}}}return!1}})}function gp(r,n){let e=r.program;if(e.type!=="Program")throw new ie(`Cannot proxify ${r.type} as module`);let t={$code:n,$type:"module"},s=xe(e,t,{ownKeys(){return["imports","exports","generate"]}});return t.exports=bp(e,s),t.imports=op(e),t.generate=i=>po(s,i),s}function yp(r,n={}){let e={wrapColumn:n.wrapColumn===void 0,indent:n.tabWidth===void 0||n.useTabs===void 0,quote:n.quote===void 0,arrowParens:n.arrowParensAlways===void 0,trailingComma:n.trailingComma===void 0},t=2,s=0,i=0,o=0,a=0,l=/(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,c={doubleQuote:0,singleQuote:0,singleParam:0,trailingComma:0},p=(r||"").split(`
12941
+ `),u=!1;for(let f of p){let m=f.trim();if(m.length!==0){if(e.wrapColumn&&f.length>o&&(o=f.length),e.indent){let d=f.match(/^\s+/)?.[0]||"";d.length>0&&(d.length>0&&d.length<t&&(t=d.length),d[0]===" "?s++:d.length>0&&s--)}if(m.at(-1)===";"?i++:m.length>0&&i--,e.quote||e.arrowParens){let d=m.matchAll(l);for(let g of d)if(g.groups)for(let h in c)g.groups[h]&&c[h]++}e.trailingComma&&((f.startsWith("}")||f.startsWith("]"))&&(u?a++:a--),u=m.endsWith(","))}}return{wrapColumn:o,useTabs:s>0,tabWidth:t,quote:c.singleQuote>c.doubleQuote?"single":"double",arrowParensAlways:c.singleParam>0,trailingComma:a>0||c.trailingComma>0,useSemi:i>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...n}}function vp(r,n){let e=Lc(r,{parser:n?.parser||Yc(),...n});return gp(e,r)}function po(r,n={}){let e=r.$ast||r,t=n.format===!1||!("$code"in r)?{}:yp(r.$code,n.format),{code:s,map:i}=Jc(e,{...n,...t});return{code:s,map:i}}async function uo(r,n={}){let e=await Ws.readFile(r,"utf8");return n.sourceFileName=n.sourceFileName??r,vp(e,n)}async function fo(r,n,e){let t="$ast"in r?r.$ast:r,{code:s,map:i}=po(t,e);await Ws.writeFile(n,s),i&&await Ws.writeFile(n+".map",i)}var Ju=rn(as(),1),Yu=rn($s(),1);function mo(r,n){if(typeof n=="object")for(let e in n)typeof r[e]=="object"&&typeof n[e]=="object"?mo(r[e],n[e]):r[e]=n[e]}function lr(r){return xp(r.exports.default)}function xp(r){return r.$type==="function-call"?r.$args[0]:r}function ho(r,n,e,t){let s=lr(r);s.modules||(s.modules=[]),s.modules.includes(n)||s.modules.push(n),e&&(s[e]||(s[e]={}),mo(s[e],t))}import Cp from"prompts";import vo from"kleur";import xo from"prompts";var bo=["radix-vue","tailwind-variants","@nuxt/fonts"],go=["typescript","tailwindcss-animate","@nuxt/icon","prettier-plugin-tailwindcss","prettier","@nuxtjs/tailwindcss","@nuxtjs/color-mode","@ianvs/prettier-plugin-sort-imports","@vueuse/nuxt","@tailwindcss/forms"],yo=["@nuxtjs/tailwindcss","@nuxtjs/color-mode","@vueuse/nuxt","@nuxt/icon","@nuxt/fonts"],cr=[{title:"Nuxt 3",value:3},{title:"Nuxt 4",value:4}],vt=[{title:"NPM",value:"npm"},{title:"YARN",value:"yarn"},{title:"PNPM",value:"pnpm"},{title:"BUN",value:"bun"}],_n=[{title:"Zinc",value:"zinc"},{title:"Slate",value:"slate"},{title:"Stone",value:"stone"},{title:"Gray",value:"gray"},{title:"Neutral",value:"neutral"},{title:"Red",value:"red"},{title:"Rose",value:"rose"},{title:"Orange",value:"orange"},{title:"Green",value:"green"},{title:"Blue",value:"blue"},{title:"Yellow",value:"yellow"},{title:"Violet",value:"violet"}];var Po=async()=>{let r=await xo([{name:"nuxtVersion",type:"select",message:"Which Nuxt version are you using?",choices:cr}]);return r.nuxtVersion?r.nuxtVersion:(console.log(vo.red("No Nuxt version selected. Exiting...")),process.exit(0))},To=async()=>{let r=await xo([{name:"nuxtVersion",type:"select",message:"Which Nuxt version are you using?",choices:cr},{name:"theme",type:"autocomplete",message:"Which theme do you want to start with?",choices:_n},{name:"tailwindCSSLocation",type:"text",message:"Where is your tailwind.css file located?",initial:(n,e)=>e.nuxtVersion==3?"assets/css/tailwind.css":"app/assets/css/tailwind.css"},{name:"tailwindConfigLocation",type:"text",message:"Where is your tailwind.config file located?",initial:"tailwind.config.js"},{name:"componentsLocation",type:"text",message:"Where should your components be stored?",initial:(n,e)=>e.nuxtVersion==3?"components/Ui":"app/components/Ui"},{name:"composablesLocation",type:"text",message:"Where should your composables be stored?",initial:(n,e)=>e.nuxtVersion==3?"composables":"app/composables"},{name:"pluginsLocation",type:"text",message:"Where should your plugins be stored?",initial:(n,e)=>e.nuxtVersion==3?"plugins":"app/plugins"},{name:"utilsLocation",type:"text",message:"Where should your utils be stored?",initial:(n,e)=>e.nuxtVersion==3?"utils":"app/utils"},{name:"force",type:"confirm",message:"Should we just replace component files if they already exist?",initial:!0},{name:"useDefaultFilename",type:"confirm",message:"Would you like to use the default filename when adding components?",initial:!0},{name:"packageManager",type:"select",message:"Which package manager do you use?",choices:vt}]);return!r||Object.keys(r).length<10?(console.log(vo.red("Incomplete configuration submitted. Exiting...")),process.exit(0)):r};var Sp=process.cwd(),pr="ui-thing.config.ts",Ip={nuxtVersion:3,theme:"zinc",tailwindCSSLocation:"assets/css/tailwind.css",tailwindConfigLocation:"tailwind.config.js",componentsLocation:"components/Ui",composablesLocation:"composables",pluginsLocation:"plugins",utilsLocation:"utils",force:!0,useDefaultFilename:!0,packageManager:"npm"},Ep={nuxtVersion:4,theme:"zinc",tailwindCSSLocation:"app/assets/css/tailwind.css",tailwindConfigLocation:"tailwind.config.js",componentsLocation:"app/components/Ui",composablesLocation:"app/composables",pluginsLocation:"app/plugins",utilsLocation:"app/utils",force:!0,useDefaultFilename:!0,packageManager:"npm"},xt=async()=>{if(!Pe.existsSync("nuxt.config.ts"))return console.log(wo.red(`No ${wo.bgWhite("nuxt.config.ts")} file found. Exiting...`)),process.exit(0);let r=await uo(Pp(Sp,"nuxt.config.ts")),n=lr(r);return{nuxtConfig:r,defaultExport:n}},de=async r=>{let n=Pe.existsSync(pr),e={},t=Number(r?.nuxtVersion);if(!n||r?.force){if(t||(t=await Po()),r?.yes?e=Number(t)===4?Ep:Ip:e=await To(),await Pe.writeFile(pr,`export default ${JSON.stringify(e,null,2)}`),e.packageManager==="pnpm")if(Pe.existsSync(".npmrc")){let{confirmCreateNpmrc:i}=await Cp({type:"confirm",name:"confirmCreateNpmrc",message:"A .npmrc file already exists. Do you want to overwrite it?",initial:!1});i&&await Pe.writeFile(".npmrc",`shamefully-hoist=true
11949
12942
  strict-peer-dependencies=false
11950
12943
  `)}else await Pe.writeFile(".npmrc",`shamefully-hoist=true
11951
12944
  strict-peer-dependencies=false
11952
- `)}else e=(await Tp({configFile:pr.replace(".ts","")})).config;return wp.isEmpty(e)&&await de({force:!0}),Ap(e),e},Ap=r=>{r.tailwindCSSLocation&&Pe.ensureFileSync(r.tailwindConfigLocation),r.pluginsLocation&&Pe.ensureDirSync(r.pluginsLocation),r.tailwindConfigLocation&&Pe.ensureFileSync(r.tailwindCSSLocation),r.componentsLocation&&Pe.ensureDirSync(r.componentsLocation),r.composablesLocation&&Pe.ensureDirSync(r.composablesLocation),r.utilsLocation&&Pe.ensureDirSync(r.utilsLocation)},Pt=(r,n)=>(typeof n=="string"&&(n=[n]),n.forEach(e=>ho(r,e)),r),Tt=async(r,n="nuxt.config.ts")=>{await fo(r.$ast,n)};var jn=async()=>{let r=await de(),n={nuxtVersion:3,theme:"string",tailwindCSSLocation:"string",tailwindConfigLocation:"string",componentsLocation:"string",composablesLocation:"string",utilsLocation:"string",force:!0,useDefaultFilename:!0,packageManager:"string"},e=[];for(let t of Object.keys(n))r[t]===void 0&&e.push(t);return!(e.length>0)};import ur from"node:fs";var et=async r=>{try{return await ur.promises.access(r,ur.constants.F_OK||ur.constants.W_OK),!0}catch{return!1}};import*as zn from"fs";import*as Co from"path";import{execa as dr}from"execa";import Vn from"lodash";import kp from"ora";function Np(){let r=Co.join(process.cwd(),"package.json"),n=!1;if(zn.existsSync(r)){let e=zn.readFileSync(r,"utf-8");JSON.parse(e).scripts?.postinstall&&(n=!0)}return n}var je=async(r,n,e)=>{typeof n=="string"&&(n=[n]),typeof e=="string"&&(e=[e]);let t=kp("Installing dependencies...").start();!Vn.isUndefined(n)&&!Vn.isEmpty(n)&&await dr(r,[r==="yarn"?"add":"install",...n]),t.text="Installing dev dependencies...",!Vn.isUndefined(e)&&!Vn.isEmpty(e)&&await dr(r,[r==="yarn"?"add":"install","-D",...e]),Np()&&(t.text="Running postinstall script...",await dr(r,["run","postinstall"])),t.succeed("Installed dependencies!")};import Dp from"boxen";import Mp from"figlet";var fe=(r,n,e)=>{console.log(`
11953
- `),console.log(Dp(Mp.textSync(r),{borderColor:"greenBright",padding:1,borderStyle:"round",titleAlignment:"center",...n})),e&&console.log(`
12945
+ `)}else e=(await Tp({configFile:pr.replace(".ts","")})).config;return wp.isEmpty(e)&&await de({force:!0}),Ap(e),e},Ap=r=>{r.tailwindCSSLocation&&Pe.ensureFileSync(r.tailwindConfigLocation),r.pluginsLocation&&Pe.ensureDirSync(r.pluginsLocation),r.tailwindConfigLocation&&Pe.ensureFileSync(r.tailwindCSSLocation),r.componentsLocation&&Pe.ensureDirSync(r.componentsLocation),r.composablesLocation&&Pe.ensureDirSync(r.composablesLocation),r.utilsLocation&&Pe.ensureDirSync(r.utilsLocation)},Pt=(r,n)=>(typeof n=="string"&&(n=[n]),n.forEach(e=>ho(r,e)),r),Tt=async(r,n="nuxt.config.ts")=>{await fo(r.$ast,n)};var jn=async()=>{let r=await de(),n={nuxtVersion:3,theme:"string",tailwindCSSLocation:"string",tailwindConfigLocation:"string",componentsLocation:"string",composablesLocation:"string",utilsLocation:"string",force:!0,useDefaultFilename:!0,packageManager:"string"},e=[];for(let t of Object.keys(n))r[t]===void 0&&e.push(t);return!(e.length>0)};import ur from"node:fs";var et=async r=>{try{return await ur.promises.access(r,ur.constants.F_OK||ur.constants.W_OK),!0}catch{return!1}};import*as zn from"fs";import*as Co from"path";import{execa as dr}from"execa";import Vn from"lodash";import kp from"ora";function Np(){let r=Co.join(process.cwd(),"package.json"),n=!1;if(zn.existsSync(r)){let e=zn.readFileSync(r,"utf-8");JSON.parse(e).scripts?.postinstall&&(n=!0)}return n}var je=async(r,n,e)=>{typeof n=="string"&&(n=[n]),typeof e=="string"&&(e=[e]);let t=kp("Installing dependencies...").start();!Vn.isUndefined(n)&&!Vn.isEmpty(n)&&await dr(r,[r==="yarn"?"add":"install",...n]),t.text="Installing dev dependencies...",!Vn.isUndefined(e)&&!Vn.isEmpty(e)&&await dr(r,[r==="yarn"?"add":"install","-D",...e]),Np()&&(t.text="Running postinstall script...",await dr(r,["run","postinstall"])),t.succeed("Installed dependencies!")};import Mp from"boxen";import Dp from"figlet";var fe=(r,n,e)=>{console.log(`
12946
+ `),console.log(Mp(Dp.textSync(r),{borderColor:"greenBright",padding:1,borderStyle:"round",titleAlignment:"center",...n})),e&&console.log(`
11954
12947
  ${e}`)};import Lp from"prompts";var So=async r=>{if(r)return St.map(e=>e.value);let{components:n}=await Lp({type:"autocompleteMultiselect",name:"components",message:"Select the components you want to add",choices:St.map(e=>({title:e.name,value:e.value})),onRender(e){this.msg=e.bgCyan(" Choose components ")+" Select the components you want to add"}});return n};import fr from"node:fs";import Op from"node:path";var Zt=async(r,n)=>{if(!await et(r)){let t=Op.dirname(r);fr.existsSync(t)||fr.mkdirSync(t,{recursive:!0})}fr.writeFileSync(r,n)};var nn=process.cwd(),$n=r=>St.find(n=>n.value.toLowerCase()===r.toLowerCase()),Io=new Fp().name("add").command("add").description("Add a list of components to your project.").option("-a --all","Add all components to your project.",!1).argument("[componentNames...]","Components that you want to add.").action(async(r,n)=>{let e=await xt(),t=await de();await jn()||(t=await de({force:!0})),tn.isEmpty(t)&&(be.info("Config file not set. Exiting..."),process.exit(0));let i=r;if(i.length===0){let u=await So(n.all);(u&&u.length===0||!u)&&(be.info("No components selected. Exiting..."),process.exit(0)),i=u}let o=[];i.forEach(u=>{$n(u)||o.push(u)}),o.length>0&&be.error(`The following components were not found: ${ae.bgRed(o.join(", "))}`);let a=[];i.forEach(u=>{$n(u)&&a.push($n(u))});for(let u=0;u<a.length;u++){let f=a[u];if(f.components)for(let m=0;m<f.components.length;m++){let d=f.components[m];a.find(g=>g.value===d)||a.push($n(d))}}for(let u=0;u<a.length;u++){let f=a[u];e:for(let m=0;m<f.files.length;m++){let d=f.files[m],g=d.fileName,h=t.componentsLocation,y=en.join(nn,h,g);if(!t.useDefaultFilename){let E=await wt({type:"text",name:"value",message:"Where should we add the file",initial:h,onRender(x){this.msg=x.bgCyan(" Location ")+` Where should we add the file ${x.cyan(`${g}`)} `}});E.value&&(h=E.value,y=en.join(nn,E.value,g))}if(await et(y)&&!t.force&&!(await wt({type:"confirm",name:"value",message:`The file that we are trying to add ${ae.bold(g)} to is already taken. Overwrite?`,initial:!1})).value){be.info(`We will not overwrite the file for ${ae.cyan(g)}`);continue e}await Zt(y,d.fileContent),f.value==="vue-sonner"&&(e.defaultExport.imports||={},e.defaultExport.build||={},e.defaultExport.imports.imports||=[],e.defaultExport.build.transpile||=[],e.defaultExport.imports.imports.find(T=>T.from==="vue-sonner"&&T.name==="toast")||e.defaultExport.imports.imports.push({from:"vue-sonner",name:"toast",as:"useSonner"}),e.defaultExport.build.transpile.find(T=>"vue-sonner")||e.defaultExport.build.transpile.push("vue-sonner")),f.value==="datatable"&&(e.defaultExport.app||={},e.defaultExport.app.head||={},e.defaultExport.app.head.script||=[],e.defaultExport.app.head.script.find(T=>T.src==="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.12/pdfmake.min.js")||e.defaultExport.app.head.script.push({src:"https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.12/pdfmake.min.js",defer:!0}),e.defaultExport.app.head.script.find(T=>T.src==="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.12/vfs_fonts.min.js")||e.defaultExport.app.head.script.push({src:"https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.12/vfs_fonts.min.js",defer:!0}));t:for(let E=0;E<f.utils.length;E++){let x=f.utils[E],T=en.join(nn,t.utilsLocation,x.fileName);if(await et(T)&&!t.force&&!(await wt({type:"confirm",name:"value",message:`The utils file that we are trying to add ${ae.bold(x.fileName)} already exists. Overwrite?`,initial:!0})).value){be.info(`We will not overwrite the file for ${ae.cyan(x.fileName)}`);continue t}await Zt(T,x.fileContent)}t:for(let E=0;E<f.composables.length;E++){let x=f.composables[E],T=en.join(nn,t.composablesLocation,x.fileName);if(await et(T)&&!t.force&&!(await wt({type:"confirm",name:"value",message:`The composables file that we are trying to add ${ae.bold(x.fileName)} already exists. Overwrite?`,initial:!0})).value){be.info(`We will not overwrite the file for ${ae.cyan(x.fileName)}`);continue t}await Zt(T,x.fileContent)}t:for(let E=0;E<f.plugins.length;E++){let x=f.plugins[E],T=en.join(nn,t.pluginsLocation??x.dirPath,x.fileName);if(await et(T)&&!t.force&&!(await wt({type:"confirm",name:"value",message:`The plugins file that we are trying to add ${ae.bold(x.fileName)} already exists. Overwrite?`,initial:!0})).value){be.info(`We will not overwrite the file for ${ae.cyan(x.fileName)}`);continue t}await Zt(T,x.fileContent)}}}Pt(e.nuxtConfig,tn.uniq(a.map(u=>u.nuxtModules||[]).flat())),await Tt(e.nuxtConfig,"nuxt.config.ts");let l=tn.uniq(a.map(u=>u.deps||[]).flat()),c=tn.uniq(a.map(u=>u.devDeps||[]).flat());if(l.length>0||c.length>0)if(n.all)await je(t.packageManager,l,c);else{let{confirmInstall:u}=await wt({type:"confirm",name:"confirmInstall",message:`Do you want to install the following packages: ${ae.cyan(l.join(", "))} ${ae.cyan(c.join(", "))}`,initial:!0});u&&await je(t.packageManager,l,c)}fe("All Done!",{title:"Components Added"},`Run the ${ae.cyan("ui-thing@latest --help")} command to learn more.
11955
- `);let p=a.map(u=>u.instructions).flat();tn.remove(p,u=>!u),p.length>0&&(console.log(""),console.log(ae.bgCyan(" Instructions ")),p.forEach(u=>{console.log(`${ae.cyan("-")} ${u}`)}))});import{Command as eu}from"commander";import{defu as Do}from"defu";import Mo from"fs-extra";import tu from"kleur";var Up=`@tailwind base;
12948
+ `);let p=a.map(u=>u.instructions).flat();tn.remove(p,u=>!u),p.length>0&&(console.log(""),console.log(ae.bgCyan(" Instructions ")),p.forEach(u=>{console.log(`${ae.cyan("-")} ${u}`)}))});import{Command as eu}from"commander";import{defu as Mo}from"defu";import Do from"fs-extra";import tu from"kleur";var Up=`@tailwind base;
11956
12949
  @tailwind components;
11957
12950
  @tailwind utilities;
11958
- `,Rp=`@layer base {
12951
+ `,Bp=`@layer base {
11959
12952
  * {
11960
12953
  @apply border-border;
11961
12954
  }
@@ -11967,7 +12960,7 @@ ${e}`)};import Lp from"prompts";var So=async r=>{if(r)return St.map(e=>e.value);
11967
12960
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
11968
12961
  }
11969
12962
  }
11970
- `,qn=r=>(Eo[r]||(r="ZINC"),`${Up}${Eo[r]}${Rp}`),_p=`
12963
+ `,Hn=r=>(Eo[r]||(r="ZINC"),`${Up}${Eo[r]}${Bp}`),Rp=`
11971
12964
  @layer base {
11972
12965
  :root {
11973
12966
  --background: 0 0% 100%;
@@ -12015,7 +13008,7 @@ ${e}`)};import Lp from"prompts";var So=async r=>{if(r)return St.map(e=>e.value);
12015
13008
  }
12016
13009
  }
12017
13010
 
12018
- `,Bp=`
13011
+ `,_p=`
12019
13012
  @layer base {
12020
13013
  :root {
12021
13014
  --background: 0 0% 100%;
@@ -12255,7 +13248,7 @@ ${e}`)};import Lp from"prompts";var So=async r=>{if(r)return St.map(e=>e.value);
12255
13248
  }
12256
13249
  }
12257
13250
 
12258
- `,qp=`
13251
+ `,Hp=`
12259
13252
  @layer base {
12260
13253
  :root {
12261
13254
  --background: 0 0% 100%;
@@ -12303,7 +13296,7 @@ ${e}`)};import Lp from"prompts";var So=async r=>{if(r)return St.map(e=>e.value);
12303
13296
  }
12304
13297
  }
12305
13298
 
12306
- `,Hp=`
13299
+ `,qp=`
12307
13300
  @layer base {
12308
13301
  :root {
12309
13302
  --background: 0 0% 100%;
@@ -12543,7 +13536,7 @@ ${e}`)};import Lp from"prompts";var So=async r=>{if(r)return St.map(e=>e.value);
12543
13536
  }
12544
13537
  }
12545
13538
 
12546
- `,Eo={ZINC:_p,SLATE:Bp,STONE:jp,GRAY:Vp,NEUTRAL:zp,RED:$p,ROSE:qp,ORANGE:Hp,GREEN:Gp,BLUE:Wp,YELLOW:Kp,VIOLET:Xp};var Ao=`const { fontFamily } = require("tailwindcss/defaultTheme");
13539
+ `,Eo={ZINC:Rp,SLATE:_p,STONE:jp,GRAY:Vp,NEUTRAL:zp,RED:$p,ROSE:Hp,ORANGE:qp,GREEN:Gp,BLUE:Wp,YELLOW:Kp,VIOLET:Xp};var Ao=`const { fontFamily } = require("tailwindcss/defaultTheme");
12547
13540
 
12548
13541
  /**@type {import('tailwindcss').Config} */
12549
13542
  module.exports = {
@@ -12688,7 +13681,7 @@ module.exports = {
12688
13681
  "importOrder": ["<BUILTIN_MODULES>", "<THIRD_PARTY_MODULES>", "<TYPES>", "", "^[.]"]
12689
13682
  }
12690
13683
 
12691
- `;var Hn=async(r=process.cwd(),n=!0)=>{let e=Jp(r,".prettierrc");if(No.existsSync(e)&&!(await Zp({name:"overwrite",type:"confirm",message:"A prettier config file already exists. Overwrite?",initial:!0})).overwrite)return!1;if(await No.writeFile(e,ko,"utf-8"),!n)return!0;let t=Qp("Formatting files with prettier...").start();return await Yp`npx prettier --write .`,t.succeed("Files formatted with prettier"),!0};var Lo=new eu().command("init").name("init").description("Initialize UI Thing in your Nuxt project. This will: 1. Create a tailwind.config.js file 2. Update your nuxt.config.ts file 3. Add the necessary dependencies 4. Create a ui-thing.config.ts file with the default configuration").option("-f --force","Overwrite config file if it exists.",!1).option("-y --yes","Skip prompts and use default values.",!1).option("-n --nuxtVersion <number>","Specify the Nuxt version you are using.","3").action(async r=>{let n=await xt(),e=await de(r);await Mo.writeFile(e.tailwindConfigLocation,Ao,"utf-8"),Mo.writeFileSync(e.tailwindCSSLocation,qn(e.theme.toUpperCase()),"utf-8"),Pt(n.nuxtConfig,yo),n.defaultExport.tailwindcss=Do(n.defaultExport.tailwindcss,{exposeConfig:!0,editorSupport:!0}),n.defaultExport.colorMode=Do(n.defaultExport.colorMode,{classSuffix:""}),n.defaultExport.imports||={},n.defaultExport.imports.imports||=[],n.defaultExport.imports.imports.find(i=>i.from==="tailwind-variants"&&i.name==="tv")||n.defaultExport.imports.imports.push({from:"tailwind-variants",name:"tv"}),n.defaultExport.imports.imports.find(i=>i.from==="tailwind-variants"&&i.name==="VariantProps")||n.defaultExport.imports.imports.push({from:"tailwind-variants",name:"VariantProps",type:!0}),await Tt(n.nuxtConfig,"nuxt.config.ts"),await je(e.packageManager,bo,go),await Hn(),fe("Initialized",{title:"Complete"},`Feel free to start adding components with the ${tu.bgWhite(" add ")} command.`)});import{Command as nu}from"commander";import su from"prompts";var Oo=new nu().command("prettier").name("prettier").description("Add prettier to your project.").action(async()=>{if(!await Hn(void 0,!1)){fe("Not Added",{title:"Prettier Not Added",borderColor:"red"},"Prettier config was not added.");return}let{pkgManager:n}=await su({name:"pkgManager",type:"select",message:"Which package manager are you using?",choices:vt});if(!n)return process.exit(0);await je(n,void 0,["prettier","prettier-plugin-tailwindcss","@ianvs/prettier-plugin-sort-imports"]),fe("All Done!",{title:"Prettier Added"},"A .prettierrc file has been added to your project and the code formatted. Enjoy!")});import{Command as ru}from"commander";import iu from"prompts";import{join as mr}from"node:path";import hr from"fs-extra";var Fo=`/* eslint-disable @typescript-eslint/no-unsafe-function-type */
13684
+ `;var qn=async(r=process.cwd(),n=!0)=>{let e=Jp(r,".prettierrc");if(No.existsSync(e)&&!(await Zp({name:"overwrite",type:"confirm",message:"A prettier config file already exists. Overwrite?",initial:!0})).overwrite)return!1;if(await No.writeFile(e,ko,"utf-8"),!n)return!0;let t=Qp("Formatting files with prettier...").start();return await Yp`npx prettier --write .`,t.succeed("Files formatted with prettier"),!0};var Lo=new eu().command("init").name("init").description("Initialize UI Thing in your Nuxt project. This will: 1. Create a tailwind.config.js file 2. Update your nuxt.config.ts file 3. Add the necessary dependencies 4. Create a ui-thing.config.ts file with the default configuration").option("-f --force","Overwrite config file if it exists.",!1).option("-y --yes","Skip prompts and use default values.",!1).option("-n --nuxtVersion <number>","Specify the Nuxt version you are using.","3").action(async r=>{let n=await xt(),e=await de(r);await Do.writeFile(e.tailwindConfigLocation,Ao,"utf-8"),Do.writeFileSync(e.tailwindCSSLocation,Hn(e.theme.toUpperCase()),"utf-8"),Pt(n.nuxtConfig,yo),n.defaultExport.tailwindcss=Mo(n.defaultExport.tailwindcss,{exposeConfig:!0,editorSupport:!0}),n.defaultExport.colorMode=Mo(n.defaultExport.colorMode,{classSuffix:""}),n.defaultExport.imports||={},n.defaultExport.imports.imports||=[],n.defaultExport.imports.imports.find(i=>i.from==="tailwind-variants"&&i.name==="tv")||n.defaultExport.imports.imports.push({from:"tailwind-variants",name:"tv"}),n.defaultExport.imports.imports.find(i=>i.from==="tailwind-variants"&&i.name==="VariantProps")||n.defaultExport.imports.imports.push({from:"tailwind-variants",name:"VariantProps",type:!0}),await Tt(n.nuxtConfig,"nuxt.config.ts"),await je(e.packageManager,bo,go),await qn(),fe("Initialized",{title:"Complete"},`Feel free to start adding components with the ${tu.bgWhite(" add ")} command.`)});import{Command as nu}from"commander";import su from"prompts";var Oo=new nu().command("prettier").name("prettier").description("Add prettier to your project.").action(async()=>{if(!await qn(void 0,!1)){fe("Not Added",{title:"Prettier Not Added",borderColor:"red"},"Prettier config was not added.");return}let{pkgManager:n}=await su({name:"pkgManager",type:"select",message:"Which package manager are you using?",choices:vt});if(!n)return process.exit(0);await je(n,void 0,["prettier","prettier-plugin-tailwindcss","@ianvs/prettier-plugin-sort-imports"]),fe("All Done!",{title:"Prettier Added"},"A .prettierrc file has been added to your project and the code formatted. Enjoy!")});import{Command as ru}from"commander";import iu from"prompts";import{join as mr}from"node:path";import hr from"fs-extra";var Fo=`/* eslint-disable @typescript-eslint/no-unsafe-function-type */
12692
13685
  import { logicAnd, logicNot } from "@vueuse/math";
12693
13686
  import type { ComputedRef, WatchSource } from "vue";
12694
13687
 
@@ -12907,5 +13900,5 @@ export const defineShortcuts = (config: ShortcutsConfig, options: ShortcutsOptio
12907
13900
 
12908
13901
  export const useShortcuts = createSharedComposable(_useShortcuts);
12909
13902
 
12910
- `;var Ro=async(r=process.cwd())=>{let n=await de(),e=mr(r,n.composablesLocation);await hr.ensureDir(e),await hr.writeFile(mr(e,"defineShortcuts.ts"),Fo,"utf-8"),await hr.writeFile(mr(e,"useShortcuts.ts"),Uo,"utf-8")};var _o=new ru().command("shortcuts").name("shortcuts").description("Add the defineShortcuts & useShortcuts composables to your project.").action(async()=>{await Ro();let r=await xt();Pt(r.nuxtConfig,["@vueuse/nuxt"]),await Tt(r.nuxtConfig,"nuxt.config.ts");let{pkgManager:n}=await iu({name:"pkgManager",type:"select",message:"Which package manager are you using?",choices:vt});if(!n)return process.exit(0);await je(n,void 0,["@vueuse/math","@vueuse/nuxt"]),fe("All Done!",{title:"Shortcuts Added"},"Check the composables folder for the defineShortcuts & useShortcuts composables.")});import{Command as ou}from"commander";import Bo from"fs-extra";import br from"lodash";import jo from"prompts";var Vo=new ou().command("theme").name("theme").description("Add a new theme to your project.").action(async()=>{let r=await de();await jn()||(r=await de({force:!0})),br.isEmpty(r)&&(be.info("Config file not set. Exiting..."),process.exit(0));let{theme:e}=await jo([{name:"theme",type:"autocomplete",message:"Which theme do you want to add?",choices:Bn}]);if(!e)return console.log("No theme selected. Exiting..."),process.exit(0);if(Bo.existsSync(r.tailwindCSSLocation)){let{force:t}=await jo([{name:"force",type:"confirm",message:"Do you want to overwrite your current css file?",initial:!0}]);if(!t)return console.log("Exiting..."),process.exit(0)}Bo.writeFileSync(r.tailwindCSSLocation,qn(e.toUpperCase()),"utf-8"),fe(`${br.capitalize(e)}`,{title:"New Theme Added"},`${br.capitalize(e)} theme has been added to ${r.tailwindCSSLocation}`)});process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));process.on("SIGTSTP",()=>process.exit(0));var zo=new au;console.clear();fe("UI Thing",{title:"Welcome"});console.log();zo.name("ui-thing").description("CLI for adding ui-thing components to your Nuxt 3 application").version(yr).addCommand(Lo).addCommand(Io).addCommand(Vo).addCommand(_o).addCommand(Oo);zo.parse(process.argv);
13903
+ `;var Bo=async(r=process.cwd())=>{let n=await de(),e=mr(r,n.composablesLocation);await hr.ensureDir(e),await hr.writeFile(mr(e,"defineShortcuts.ts"),Fo,"utf-8"),await hr.writeFile(mr(e,"useShortcuts.ts"),Uo,"utf-8")};var Ro=new ru().command("shortcuts").name("shortcuts").description("Add the defineShortcuts & useShortcuts composables to your project.").action(async()=>{await Bo();let r=await xt();Pt(r.nuxtConfig,["@vueuse/nuxt"]),await Tt(r.nuxtConfig,"nuxt.config.ts");let{pkgManager:n}=await iu({name:"pkgManager",type:"select",message:"Which package manager are you using?",choices:vt});if(!n)return process.exit(0);await je(n,void 0,["@vueuse/math","@vueuse/nuxt"]),fe("All Done!",{title:"Shortcuts Added"},"Check the composables folder for the defineShortcuts & useShortcuts composables.")});import{Command as ou}from"commander";import _o from"fs-extra";import br from"lodash";import jo from"prompts";var Vo=new ou().command("theme").name("theme").description("Add a new theme to your project.").action(async()=>{let r=await de();await jn()||(r=await de({force:!0})),br.isEmpty(r)&&(be.info("Config file not set. Exiting..."),process.exit(0));let{theme:e}=await jo([{name:"theme",type:"autocomplete",message:"Which theme do you want to add?",choices:_n}]);if(!e)return console.log("No theme selected. Exiting..."),process.exit(0);if(_o.existsSync(r.tailwindCSSLocation)){let{force:t}=await jo([{name:"force",type:"confirm",message:"Do you want to overwrite your current css file?",initial:!0}]);if(!t)return console.log("Exiting..."),process.exit(0)}_o.writeFileSync(r.tailwindCSSLocation,Hn(e.toUpperCase()),"utf-8"),fe(`${br.capitalize(e)}`,{title:"New Theme Added"},`${br.capitalize(e)} theme has been added to ${r.tailwindCSSLocation}`)});process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));process.on("SIGTSTP",()=>process.exit(0));var zo=new au;console.clear();fe("UI Thing",{title:"Welcome"});console.log();zo.name("ui-thing").description("CLI for adding ui-thing components to your Nuxt 3 application").version(yr).addCommand(Lo).addCommand(Io).addCommand(Vo).addCommand(Ro).addCommand(Oo);zo.parse(process.argv);
12911
13904
  //# sourceMappingURL=index.js.map