ui-thing 0.1.53 → 0.1.55
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/CHANGELOG.md +24 -0
- package/dist/index.js +361 -59
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/comps.ts +53 -3
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as ve,b as bn}from"./chunk-FW4363Y4.js";var ii=ve(vs=>{"use strict";var ri="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");vs.encode=function(s){if(0<=s&&s<ri.length)return ri[s];throw new TypeError("Must be between 0 and 63: "+s)};vs.decode=function(s){var n=65,e=90,t=97,r=122,i=48,a=57,o=43,l=47,c=26,p=52;return n<=s&&s<=e?s-n:t<=s&&s<=r?s-t+c:i<=s&&s<=a?s-i+p:s==o?62:s==l?63:-1}});var Ts=ve(Ps=>{"use strict";var ai=ii(),xs=5,oi=1<<xs,li=oi-1,ci=oi;function Vl(s){return s<0?(-s<<1)+1:(s<<1)+0}function zl(s){var n=(s&1)===1,e=s>>1;return n?-e:e}Ps.encode=function(n){var e="",t,r=Vl(n);do t=r&li,r>>>=xs,r>0&&(t|=ci),e+=ai.encode(t);while(r>0);return e};Ps.decode=function(n,e,t){var r=n.length,i=0,a=0,o,l;do{if(e>=r)throw new Error("Expected more digits in base 64 VLQ value.");if(l=ai.decode(n.charCodeAt(e++)),l===-1)throw new Error("Invalid base64 digit: "+n.charAt(e-1));o=!!(l&ci),l&=li,i=i+(l<<a),a+=xs}while(o);t.value=zl(i),t.rest=e}});var dt=ve(te=>{"use strict";function $l(s,n,e){if(n in s)return s[n];if(arguments.length===3)return e;throw new Error('"'+n+'" is a required argument.')}te.getArg=$l;var pi=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Hl=/^data:.+\,.+$/;function _t(s){var n=s.match(pi);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}te.urlParse=_t;function ut(s){var n="";return s.scheme&&(n+=s.scheme+":"),n+="//",s.auth&&(n+=s.auth+"@"),s.host&&(n+=s.host),s.port&&(n+=":"+s.port),s.path&&(n+=s.path),n}te.urlGenerate=ut;var Gl=32;function Wl(s){var n=[];return function(e){for(var t=0;t<n.length;t++)if(n[t].input===e){var r=n[0];return n[0]=n[t],n[t]=r,n[0].result}var i=s(e);return n.unshift({input:e,result:i}),n.length>Gl&&n.pop(),i}}var Cs=Wl(function(n){var e=n,t=_t(n);if(t){if(!t.path)return n;e=t.path}for(var r=te.isAbsolute(e),i=[],a=0,o=0;;)if(a=o,o=e.indexOf("/",a),o===-1){i.push(e.slice(a));break}else for(i.push(e.slice(a,o));o<e.length&&e[o]==="/";)o++;for(var l,c=0,o=i.length-1;o>=0;o--)l=i[o],l==="."?i.splice(o,1):l===".."?c++:c>0&&(l===""?(i.splice(o+1,c),c=0):(i.splice(o,2),c--));return e=i.join("/"),e===""&&(e=r?"/":"."),t?(t.path=e,ut(t)):e});te.normalize=Cs;function ui(s,n){s===""&&(s="."),n===""&&(n=".");var e=_t(n),t=_t(s);if(t&&(s=t.path||"/"),e&&!e.scheme)return t&&(e.scheme=t.scheme),ut(e);if(e||n.match(Hl))return n;if(t&&!t.host&&!t.path)return t.host=n,ut(t);var r=n.charAt(0)==="/"?n:Cs(s.replace(/\/+$/,"")+"/"+n);return t?(t.path=r,ut(t)):r}te.join=ui;te.isAbsolute=function(s){return s.charAt(0)==="/"||pi.test(s)};function ql(s,n){s===""&&(s="."),s=s.replace(/\/$/,"");for(var e=0;n.indexOf(s+"/")!==0;){var t=s.lastIndexOf("/");if(t<0||(s=s.slice(0,t),s.match(/^([^\/]+:\/)?\/*$/)))return n;++e}return Array(e+1).join("../")+n.substr(s.length+1)}te.relative=ql;var di=function(){var s=Object.create(null);return!("__proto__"in s)}();function fi(s){return s}function Kl(s){return mi(s)?"$"+s:s}te.toSetString=di?fi:Kl;function Jl(s){return mi(s)?s.slice(1):s}te.fromSetString=di?fi:Jl;function mi(s){if(!s)return!1;var n=s.length;if(n<9||s.charCodeAt(n-1)!==95||s.charCodeAt(n-2)!==95||s.charCodeAt(n-3)!==111||s.charCodeAt(n-4)!==116||s.charCodeAt(n-5)!==111||s.charCodeAt(n-6)!==114||s.charCodeAt(n-7)!==112||s.charCodeAt(n-8)!==95||s.charCodeAt(n-9)!==95)return!1;for(var e=n-10;e>=0;e--)if(s.charCodeAt(e)!==36)return!1;return!0}function Xl(s,n,e){var t=_e(s.source,n.source);return t!==0||(t=s.originalLine-n.originalLine,t!==0)||(t=s.originalColumn-n.originalColumn,t!==0||e)||(t=s.generatedColumn-n.generatedColumn,t!==0)||(t=s.generatedLine-n.generatedLine,t!==0)?t:_e(s.name,n.name)}te.compareByOriginalPositions=Xl;function Yl(s,n,e){var t;return t=s.originalLine-n.originalLine,t!==0||(t=s.originalColumn-n.originalColumn,t!==0||e)||(t=s.generatedColumn-n.generatedColumn,t!==0)||(t=s.generatedLine-n.generatedLine,t!==0)?t:_e(s.name,n.name)}te.compareByOriginalPositionsNoSource=Yl;function Ql(s,n,e){var t=s.generatedLine-n.generatedLine;return t!==0||(t=s.generatedColumn-n.generatedColumn,t!==0||e)||(t=_e(s.source,n.source),t!==0)||(t=s.originalLine-n.originalLine,t!==0)||(t=s.originalColumn-n.originalColumn,t!==0)?t:_e(s.name,n.name)}te.compareByGeneratedPositionsDeflated=Ql;function Zl(s,n,e){var t=s.generatedColumn-n.generatedColumn;return t!==0||e||(t=_e(s.source,n.source),t!==0)||(t=s.originalLine-n.originalLine,t!==0)||(t=s.originalColumn-n.originalColumn,t!==0)?t:_e(s.name,n.name)}te.compareByGeneratedPositionsDeflatedNoLine=Zl;function _e(s,n){return s===n?0:s===null?1:n===null?-1:s>n?1:-1}function ec(s,n){var e=s.generatedLine-n.generatedLine;return e!==0||(e=s.generatedColumn-n.generatedColumn,e!==0)||(e=_e(s.source,n.source),e!==0)||(e=s.originalLine-n.originalLine,e!==0)||(e=s.originalColumn-n.originalColumn,e!==0)?e:_e(s.name,n.name)}te.compareByGeneratedPositionsInflated=ec;function tc(s){return JSON.parse(s.replace(/^\)]}'[^\n]*\n/,""))}te.parseSourceMapInput=tc;function nc(s,n,e){if(n=n||"",s&&(s[s.length-1]!=="/"&&n[0]!=="/"&&(s+="/"),n=s+n),e){var t=_t(e);if(!t)throw new Error("sourceMapURL could not be parsed");if(t.path){var r=t.path.lastIndexOf("/");r>=0&&(t.path=t.path.substring(0,r+1))}n=ui(ut(t),n)}return Cs(n)}te.computeSourceURL=nc});var Es=ve(hi=>{"use strict";var ws=dt(),Ds=Object.prototype.hasOwnProperty,tt=typeof Map<"u";function Re(){this._array=[],this._set=tt?new Map:Object.create(null)}Re.fromArray=function(n,e){for(var t=new Re,r=0,i=n.length;r<i;r++)t.add(n[r],e);return t};Re.prototype.size=function(){return tt?this._set.size:Object.getOwnPropertyNames(this._set).length};Re.prototype.add=function(n,e){var t=tt?n:ws.toSetString(n),r=tt?this.has(n):Ds.call(this._set,t),i=this._array.length;(!r||e)&&this._array.push(n),r||(tt?this._set.set(n,i):this._set[t]=i)};Re.prototype.has=function(n){if(tt)return this._set.has(n);var e=ws.toSetString(n);return Ds.call(this._set,e)};Re.prototype.indexOf=function(n){if(tt){var e=this._set.get(n);if(e>=0)return e}else{var t=ws.toSetString(n);if(Ds.call(this._set,t))return this._set[t]}throw new Error('"'+n+'" is not in the set.')};Re.prototype.at=function(n){if(n>=0&&n<this._array.length)return this._array[n];throw new Error("No element indexed by "+n)};Re.prototype.toArray=function(){return this._array.slice()};hi.ArraySet=Re});var yi=ve(gi=>{"use strict";var bi=dt();function sc(s,n){var e=s.generatedLine,t=n.generatedLine,r=s.generatedColumn,i=n.generatedColumn;return t>e||t==e&&i>=r||bi.compareByGeneratedPositionsInflated(s,n)<=0}function xn(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}xn.prototype.unsortedForEach=function(n,e){this._array.forEach(n,e)};xn.prototype.add=function(n){sc(this._last,n)?(this._last=n,this._array.push(n)):(this._sorted=!1,this._array.push(n))};xn.prototype.toArray=function(){return this._sorted||(this._array.sort(bi.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};gi.MappingList=xn});var Ss=ve(vi=>{"use strict";var Rt=Ts(),Y=dt(),Pn=Es().ArraySet,rc=yi().MappingList;function xe(s){s||(s={}),this._file=Y.getArg(s,"file",null),this._sourceRoot=Y.getArg(s,"sourceRoot",null),this._skipValidation=Y.getArg(s,"skipValidation",!1),this._ignoreInvalidMapping=Y.getArg(s,"ignoreInvalidMapping",!1),this._sources=new Pn,this._names=new Pn,this._mappings=new rc,this._sourcesContents=null}xe.prototype._version=3;xe.fromSourceMap=function(n,e){var t=n.sourceRoot,r=new xe(Object.assign(e||{},{file:n.file,sourceRoot:t}));return n.eachMapping(function(i){var a={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(a.source=i.source,t!=null&&(a.source=Y.relative(t,a.source)),a.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(a.name=i.name)),r.addMapping(a)}),n.sources.forEach(function(i){var a=i;t!==null&&(a=Y.relative(t,i)),r._sources.has(a)||r._sources.add(a);var o=n.sourceContentFor(i);o!=null&&r.setSourceContent(i,o)}),r};xe.prototype.addMapping=function(n){var e=Y.getArg(n,"generated"),t=Y.getArg(n,"original",null),r=Y.getArg(n,"source",null),i=Y.getArg(n,"name",null);!this._skipValidation&&this._validateMapping(e,t,r,i)===!1||(r!=null&&(r=String(r),this._sources.has(r)||this._sources.add(r)),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:r,name:i}))};xe.prototype.setSourceContent=function(n,e){var t=n;this._sourceRoot!=null&&(t=Y.relative(this._sourceRoot,t)),e!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Y.toSetString(t)]=e):this._sourcesContents&&(delete this._sourcesContents[Y.toSetString(t)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};xe.prototype.applySourceMap=function(n,e,t){var r=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.`);r=n.file}var i=this._sourceRoot;i!=null&&(r=Y.relative(i,r));var a=new Pn,o=new Pn;this._mappings.unsortedForEach(function(l){if(l.source===r&&l.originalLine!=null){var c=n.originalPositionFor({line:l.originalLine,column:l.originalColumn});c.source!=null&&(l.source=c.source,t!=null&&(l.source=Y.join(t,l.source)),i!=null&&(l.source=Y.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&&!a.has(p)&&a.add(p);var u=l.name;u!=null&&!o.has(u)&&o.add(u)},this),this._sources=a,this._names=o,n.sources.forEach(function(l){var c=n.sourceContentFor(l);c!=null&&(t!=null&&(l=Y.join(t,l)),i!=null&&(l=Y.relative(i,l)),this.setSourceContent(l,c))},this)};xe.prototype._validateMapping=function(n,e,t,r){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&&!r)){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:r});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(i),!1;throw new Error(i)}};xe.prototype._serializeMappings=function(){for(var n=0,e=1,t=0,r=0,i=0,a=0,o="",l,c,p,u,d=this._mappings.toArray(),m=0,f=d.length;m<f;m++){if(c=d[m],l="",c.generatedLine!==e)for(n=0;c.generatedLine!==e;)l+=";",e++;else if(m>0){if(!Y.compareByGeneratedPositionsInflated(c,d[m-1]))continue;l+=","}l+=Rt.encode(c.generatedColumn-n),n=c.generatedColumn,c.source!=null&&(u=this._sources.indexOf(c.source),l+=Rt.encode(u-a),a=u,l+=Rt.encode(c.originalLine-1-r),r=c.originalLine-1,l+=Rt.encode(c.originalColumn-t),t=c.originalColumn,c.name!=null&&(p=this._names.indexOf(c.name),l+=Rt.encode(p-i),i=p)),o+=l}return o};xe.prototype._generateSourcesContent=function(n,e){return n.map(function(t){if(!this._sourcesContents)return null;e!=null&&(t=Y.relative(e,t));var r=Y.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)};xe.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};xe.prototype.toString=function(){return JSON.stringify(this.toJSON())};vi.SourceMapGenerator=xe});var xi=ve(nt=>{"use strict";nt.GREATEST_LOWER_BOUND=1;nt.LEAST_UPPER_BOUND=2;function As(s,n,e,t,r,i){var a=Math.floor((n-s)/2)+s,o=r(e,t[a],!0);return o===0?a:o>0?n-a>1?As(a,n,e,t,r,i):i==nt.LEAST_UPPER_BOUND?n<t.length?n:-1:a:a-s>1?As(s,a,e,t,r,i):i==nt.LEAST_UPPER_BOUND?a:s<0?-1:s}nt.search=function(n,e,t,r){if(e.length===0)return-1;var i=As(-1,e.length,n,e,t,r||nt.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&t(e[i],e[i-1],!0)===0;)--i;return i}});var Ci=ve(Ti=>{"use strict";function ic(s){function n(r,i,a){var o=r[i];r[i]=r[a],r[a]=o}function e(r,i){return Math.round(r+Math.random()*(i-r))}function t(r,i,a,o){if(a<o){var l=e(a,o),c=a-1;n(r,l,o);for(var p=r[o],u=a;u<o;u++)i(r[u],p,!1)<=0&&(c+=1,n(r,c,u));n(r,c+1,u);var d=c+1;t(r,i,a,d-1),t(r,i,d+1,o)}}return t}function ac(s){let n=ic.toString();return new Function(`return ${n}`)()(s)}var Pi=new WeakMap;Ti.quickSort=function(s,n,e=0){let t=Pi.get(n);t===void 0&&(t=ac(n),Pi.set(n,t)),t(s,n,e,s.length-1)}});var Ei=ve(Tn=>{"use strict";var F=dt(),Fs=xi(),ft=Es().ArraySet,oc=Ts(),jt=Ci().quickSort;function q(s,n){var e=s;return typeof s=="string"&&(e=F.parseSourceMapInput(s)),e.sections!=null?new De(e,n):new se(e,n)}q.fromSourceMap=function(s,n){return se.fromSourceMap(s,n)};q.prototype._version=3;q.prototype.__generatedMappings=null;Object.defineProperty(q.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});q.prototype.__originalMappings=null;Object.defineProperty(q.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});q.prototype._charIsMappingSeparator=function(n,e){var t=n.charAt(e);return t===";"||t===","};q.prototype._parseMappings=function(n,e){throw new Error("Subclasses must implement _parseMappings")};q.GENERATED_ORDER=1;q.ORIGINAL_ORDER=2;q.GREATEST_LOWER_BOUND=1;q.LEAST_UPPER_BOUND=2;q.prototype.eachMapping=function(n,e,t){var r=e||null,i=t||q.GENERATED_ORDER,a;switch(i){case q.GENERATED_ORDER:a=this._generatedMappings;break;case q.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var o=this.sourceRoot,l=n.bind(r),c=this._names,p=this._sources,u=this._sourceMapURL,d=0,m=a.length;d<m;d++){var f=a[d],b=f.source===null?null:p.at(f.source);b!==null&&(b=F.computeSourceURL(o,b,u)),l({source:b,generatedLine:f.generatedLine,generatedColumn:f.generatedColumn,originalLine:f.originalLine,originalColumn:f.originalColumn,name:f.name===null?null:c.at(f.name)})}};q.prototype.allGeneratedPositionsFor=function(n){var e=F.getArg(n,"line"),t={source:F.getArg(n,"source"),originalLine:e,originalColumn:F.getArg(n,"column",0)};if(t.source=this._findSourceIndex(t.source),t.source<0)return[];var r=[],i=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,Fs.LEAST_UPPER_BOUND);if(i>=0){var a=this._originalMappings[i];if(n.column===void 0)for(var o=a.originalLine;a&&a.originalLine===o;)r.push({line:F.getArg(a,"generatedLine",null),column:F.getArg(a,"generatedColumn",null),lastColumn:F.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i];else for(var l=a.originalColumn;a&&a.originalLine===e&&a.originalColumn==l;)r.push({line:F.getArg(a,"generatedLine",null),column:F.getArg(a,"generatedColumn",null),lastColumn:F.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i]}return r};Tn.SourceMapConsumer=q;function se(s,n){var e=s;typeof s=="string"&&(e=F.parseSourceMapInput(s));var t=F.getArg(e,"version"),r=F.getArg(e,"sources"),i=F.getArg(e,"names",[]),a=F.getArg(e,"sourceRoot",null),o=F.getArg(e,"sourcesContent",null),l=F.getArg(e,"mappings"),c=F.getArg(e,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);a&&(a=F.normalize(a)),r=r.map(String).map(F.normalize).map(function(p){return a&&F.isAbsolute(a)&&F.isAbsolute(p)?F.relative(a,p):p}),this._names=ft.fromArray(i.map(String),!0),this._sources=ft.fromArray(r,!0),this._absoluteSources=this._sources.toArray().map(function(p){return F.computeSourceURL(a,p,n)}),this.sourceRoot=a,this.sourcesContent=o,this._mappings=l,this._sourceMapURL=n,this.file=c}se.prototype=Object.create(q.prototype);se.prototype.consumer=q;se.prototype._findSourceIndex=function(s){var n=s;if(this.sourceRoot!=null&&(n=F.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]==s)return e;return-1};se.fromSourceMap=function(n,e){var t=Object.create(se.prototype),r=t._names=ft.fromArray(n._names.toArray(),!0),i=t._sources=ft.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 F.computeSourceURL(t.sourceRoot,m,e)});for(var a=n._mappings.toArray().slice(),o=t.__generatedMappings=[],l=t.__originalMappings=[],c=0,p=a.length;c<p;c++){var u=a[c],d=new Di;d.generatedLine=u.generatedLine,d.generatedColumn=u.generatedColumn,u.source&&(d.source=i.indexOf(u.source),d.originalLine=u.originalLine,d.originalColumn=u.originalColumn,u.name&&(d.name=r.indexOf(u.name)),l.push(d)),o.push(d)}return jt(t.__originalMappings,F.compareByOriginalPositions),t};se.prototype._version=3;Object.defineProperty(se.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Di(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Is=F.compareByGeneratedPositionsDeflatedNoLine;function wi(s,n){let e=s.length,t=s.length-n;if(!(t<=1))if(t==2){let r=s[n],i=s[n+1];Is(r,i)>0&&(s[n]=i,s[n+1]=r)}else if(t<20)for(let r=n;r<e;r++)for(let i=r;i>n;i--){let a=s[i-1],o=s[i];if(Is(a,o)<=0)break;s[i-1]=o,s[i]=a}else jt(s,Is,n)}se.prototype._parseMappings=function(n,e){var t=1,r=0,i=0,a=0,o=0,l=0,c=n.length,p=0,u={},d={},m=[],f=[],b,h,y,T,k;let x=0;for(;p<c;)if(n.charAt(p)===";")t++,p++,r=0,wi(f,x),x=f.length;else if(n.charAt(p)===",")p++;else{for(b=new Di,b.generatedLine=t,T=p;T<c&&!this._charIsMappingSeparator(n,T);T++);for(h=n.slice(p,T),y=[];p<T;)oc.decode(n,p,d),k=d.value,p=d.rest,y.push(k);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(b.generatedColumn=r+y[0],r=b.generatedColumn,y.length>1&&(b.source=o+y[1],o+=y[1],b.originalLine=i+y[2],i=b.originalLine,b.originalLine+=1,b.originalColumn=a+y[3],a=b.originalColumn,y.length>4&&(b.name=l+y[4],l+=y[4])),f.push(b),typeof b.originalLine=="number"){let w=b.source;for(;m.length<=w;)m.push(null);m[w]===null&&(m[w]=[]),m[w].push(b)}}wi(f,x),this.__generatedMappings=f;for(var P=0;P<m.length;P++)m[P]!=null&&jt(m[P],F.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...m)};se.prototype._findMapping=function(n,e,t,r,i,a){if(n[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+n[t]);if(n[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+n[r]);return Fs.search(n,e,i,a)};se.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}};se.prototype.originalPositionFor=function(n){var e={generatedLine:F.getArg(n,"line"),generatedColumn:F.getArg(n,"column")},t=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",F.compareByGeneratedPositionsDeflated,F.getArg(n,"bias",q.GREATEST_LOWER_BOUND));if(t>=0){var r=this._generatedMappings[t];if(r.generatedLine===e.generatedLine){var i=F.getArg(r,"source",null);i!==null&&(i=this._sources.at(i),i=F.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var a=F.getArg(r,"name",null);return a!==null&&(a=this._names.at(a)),{source:i,line:F.getArg(r,"originalLine",null),column:F.getArg(r,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};se.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(n){return n==null}):!1};se.prototype.sourceContentFor=function(n,e){if(!this.sourcesContent)return null;var t=this._findSourceIndex(n);if(t>=0)return this.sourcesContent[t];var r=n;this.sourceRoot!=null&&(r=F.relative(this.sourceRoot,r));var i;if(this.sourceRoot!=null&&(i=F.urlParse(this.sourceRoot))){var a=r.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!i.path||i.path=="/")&&this._sources.has("/"+r))return this.sourcesContent[this._sources.indexOf("/"+r)]}if(e)return null;throw new Error('"'+r+'" is not in the SourceMap.')};se.prototype.generatedPositionFor=function(n){var e=F.getArg(n,"source");if(e=this._findSourceIndex(e),e<0)return{line:null,column:null,lastColumn:null};var t={source:e,originalLine:F.getArg(n,"line"),originalColumn:F.getArg(n,"column")},r=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,F.getArg(n,"bias",q.GREATEST_LOWER_BOUND));if(r>=0){var i=this._originalMappings[r];if(i.source===t.source)return{line:F.getArg(i,"generatedLine",null),column:F.getArg(i,"generatedColumn",null),lastColumn:F.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Tn.BasicSourceMapConsumer=se;function De(s,n){var e=s;typeof s=="string"&&(e=F.parseSourceMapInput(s));var t=F.getArg(e,"version"),r=F.getArg(e,"sections");if(t!=this._version)throw new Error("Unsupported version: "+t);this._sources=new ft,this._names=new ft;var i={line:-1,column:0};this._sections=r.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var o=F.getArg(a,"offset"),l=F.getArg(o,"line"),c=F.getArg(o,"column");if(l<i.line||l===i.line&&c<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=o,{generatedOffset:{generatedLine:l+1,generatedColumn:c+1},consumer:new q(F.getArg(a,"map"),n)}})}De.prototype=Object.create(q.prototype);De.prototype.constructor=q;De.prototype._version=3;Object.defineProperty(De.prototype,"sources",{get:function(){for(var s=[],n=0;n<this._sections.length;n++)for(var e=0;e<this._sections[n].consumer.sources.length;e++)s.push(this._sections[n].consumer.sources[e]);return s}});De.prototype.originalPositionFor=function(n){var e={generatedLine:F.getArg(n,"line"),generatedColumn:F.getArg(n,"column")},t=Fs.search(e,this._sections,function(i,a){var o=i.generatedLine-a.generatedOffset.generatedLine;return o||i.generatedColumn-a.generatedOffset.generatedColumn}),r=this._sections[t];return r?r.consumer.originalPositionFor({line:e.generatedLine-(r.generatedOffset.generatedLine-1),column:e.generatedColumn-(r.generatedOffset.generatedLine===e.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:n.bias}):{source:null,line:null,column:null,name:null}};De.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(n){return n.consumer.hasContentsOfAllSources()})};De.prototype.sourceContentFor=function(n,e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t],i=r.consumer.sourceContentFor(n,!0);if(i||i==="")return i}if(e)return null;throw new Error('"'+n+'" is not in the SourceMap.')};De.prototype.generatedPositionFor=function(n){for(var e=0;e<this._sections.length;e++){var t=this._sections[e];if(t.consumer._findSourceIndex(F.getArg(n,"source"))!==-1){var r=t.consumer.generatedPositionFor(n);if(r){var i={line:r.line+(t.generatedOffset.generatedLine-1),column:r.column+(t.generatedOffset.generatedLine===r.line?t.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}};De.prototype._parseMappings=function(n,e){this.__generatedMappings=[],this.__originalMappings=[];for(var t=0;t<this._sections.length;t++)for(var r=this._sections[t],i=r.consumer._generatedMappings,a=0;a<i.length;a++){var o=i[a],l=r.consumer._sources.at(o.source);l!==null&&(l=F.computeSourceURL(r.consumer.sourceRoot,l,this._sourceMapURL)),this._sources.add(l),l=this._sources.indexOf(l);var c=null;o.name&&(c=r.consumer._names.at(o.name),this._names.add(c),c=this._names.indexOf(c));var p={source:l,generatedLine:o.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(r.generatedOffset.generatedLine===o.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:c};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}jt(this.__generatedMappings,F.compareByGeneratedPositionsDeflated),jt(this.__originalMappings,F.compareByOriginalPositions)};Tn.IndexedSourceMapConsumer=De});var Ai=ve(Si=>{"use strict";var lc=Ss().SourceMapGenerator,Cn=dt(),cc=/(\r?\n)/,pc=10,mt="$$$isSourceNode$$$";function fe(s,n,e,t,r){this.children=[],this.sourceContents={},this.line=s??null,this.column=n??null,this.source=e??null,this.name=r??null,this[mt]=!0,t!=null&&this.add(t)}fe.fromStringWithSourceMap=function(n,e,t){var r=new fe,i=n.split(cc),a=0,o=function(){var d=f(),m=f()||"";return d+m;function f(){return a<i.length?i[a++]:void 0}},l=1,c=0,p=null;return e.eachMapping(function(d){if(p!==null)if(l<d.generatedLine)u(p,o()),l++,c=0;else{var m=i[a]||"",f=m.substr(0,d.generatedColumn-c);i[a]=m.substr(d.generatedColumn-c),c=d.generatedColumn,u(p,f),p=d;return}for(;l<d.generatedLine;)r.add(o()),l++;if(c<d.generatedColumn){var m=i[a]||"";r.add(m.substr(0,d.generatedColumn)),i[a]=m.substr(d.generatedColumn),c=d.generatedColumn}p=d},this),a<i.length&&(p&&u(p,o()),r.add(i.splice(a).join(""))),e.sources.forEach(function(d){var m=e.sourceContentFor(d);m!=null&&(t!=null&&(d=Cn.join(t,d)),r.setSourceContent(d,m))}),r;function u(d,m){if(d===null||d.source===void 0)r.add(m);else{var f=t?Cn.join(t,d.source):d.source;r.add(new fe(d.originalLine,d.originalColumn,f,m,d.name))}}};fe.prototype.add=function(n){if(Array.isArray(n))n.forEach(function(e){this.add(e)},this);else if(n[mt]||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};fe.prototype.prepend=function(n){if(Array.isArray(n))for(var e=n.length-1;e>=0;e--)this.prepend(n[e]);else if(n[mt]||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};fe.prototype.walk=function(n){for(var e,t=0,r=this.children.length;t<r;t++)e=this.children[t],e[mt]?e.walk(n):e!==""&&n(e,{source:this.source,line:this.line,column:this.column,name:this.name})};fe.prototype.join=function(n){var e,t,r=this.children.length;if(r>0){for(e=[],t=0;t<r-1;t++)e.push(this.children[t]),e.push(n);e.push(this.children[t]),this.children=e}return this};fe.prototype.replaceRight=function(n,e){var t=this.children[this.children.length-1];return t[mt]?t.replaceRight(n,e):typeof t=="string"?this.children[this.children.length-1]=t.replace(n,e):this.children.push("".replace(n,e)),this};fe.prototype.setSourceContent=function(n,e){this.sourceContents[Cn.toSetString(n)]=e};fe.prototype.walkSourceContents=function(n){for(var e=0,t=this.children.length;e<t;e++)this.children[e][mt]&&this.children[e].walkSourceContents(n);for(var r=Object.keys(this.sourceContents),e=0,t=r.length;e<t;e++)n(Cn.fromSetString(r[e]),this.sourceContents[r[e]])};fe.prototype.toString=function(){var n="";return this.walk(function(e){n+=e}),n};fe.prototype.toStringWithSourceMap=function(n){var e={code:"",line:1,column:0},t=new lc(n),r=!1,i=null,a=null,o=null,l=null;return this.walk(function(c,p){e.code+=c,p.source!==null&&p.line!==null&&p.column!==null?((i!==p.source||a!==p.line||o!==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,a=p.line,o=p.column,l=p.name,r=!0):r&&(t.addMapping({generated:{line:e.line,column:e.column}}),i=null,r=!1);for(var u=0,d=c.length;u<d;u++)c.charCodeAt(u)===pc?(e.line++,e.column=0,u+1===d?(i=null,r=!1):r&&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}};Si.SourceNode=fe});var ks=ve(wn=>{"use strict";wn.SourceMapGenerator=Ss().SourceMapGenerator;wn.SourceMapConsumer=Ei().SourceMapConsumer;wn.SourceNode=Ai().SourceNode});var fr=ve(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});function uc(s,n){if(s==null)return{};var e={};for(var t in s)if({}.hasOwnProperty.call(s,t)){if(n.includes(t))continue;e[t]=s[t]}return e}var Oe=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}},vt=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 oe(s,n){let{line:e,column:t,index:r}=s;return new Oe(e,t+n,r+n)}var Ii="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",dc={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Ii},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Ii}},Fi={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"},Sn=s=>s.type==="UpdateExpression"?Fi.UpdateExpression[`${s.prefix}`]:Fi[s.type],fc={AccessorIsGenerator:({kind:s})=>`A ${s}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:s})=>`Missing initializer in ${s} 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:s})=>`\`${s}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:s})=>`'import.${s}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:s,exportName:n})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
2
|
+
import{a as ve,b as bn}from"./chunk-FW4363Y4.js";var ii=ve(vs=>{"use strict";var ri="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");vs.encode=function(s){if(0<=s&&s<ri.length)return ri[s];throw new TypeError("Must be between 0 and 63: "+s)};vs.decode=function(s){var n=65,e=90,t=97,r=122,i=48,a=57,o=43,l=47,c=26,p=52;return n<=s&&s<=e?s-n:t<=s&&s<=r?s-t+c:i<=s&&s<=a?s-i+p:s==o?62:s==l?63:-1}});var Cs=ve(Ps=>{"use strict";var ai=ii(),xs=5,oi=1<<xs,li=oi-1,ci=oi;function Vl(s){return s<0?(-s<<1)+1:(s<<1)+0}function zl(s){var n=(s&1)===1,e=s>>1;return n?-e:e}Ps.encode=function(n){var e="",t,r=Vl(n);do t=r&li,r>>>=xs,r>0&&(t|=ci),e+=ai.encode(t);while(r>0);return e};Ps.decode=function(n,e,t){var r=n.length,i=0,a=0,o,l;do{if(e>=r)throw new Error("Expected more digits in base 64 VLQ value.");if(l=ai.decode(n.charCodeAt(e++)),l===-1)throw new Error("Invalid base64 digit: "+n.charAt(e-1));o=!!(l&ci),l&=li,i=i+(l<<a),a+=xs}while(o);t.value=zl(i),t.rest=e}});var dt=ve(te=>{"use strict";function $l(s,n,e){if(n in s)return s[n];if(arguments.length===3)return e;throw new Error('"'+n+'" is a required argument.')}te.getArg=$l;var pi=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Hl=/^data:.+\,.+$/;function _t(s){var n=s.match(pi);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}te.urlParse=_t;function ut(s){var n="";return s.scheme&&(n+=s.scheme+":"),n+="//",s.auth&&(n+=s.auth+"@"),s.host&&(n+=s.host),s.port&&(n+=":"+s.port),s.path&&(n+=s.path),n}te.urlGenerate=ut;var Gl=32;function Wl(s){var n=[];return function(e){for(var t=0;t<n.length;t++)if(n[t].input===e){var r=n[0];return n[0]=n[t],n[t]=r,n[0].result}var i=s(e);return n.unshift({input:e,result:i}),n.length>Gl&&n.pop(),i}}var ws=Wl(function(n){var e=n,t=_t(n);if(t){if(!t.path)return n;e=t.path}for(var r=te.isAbsolute(e),i=[],a=0,o=0;;)if(a=o,o=e.indexOf("/",a),o===-1){i.push(e.slice(a));break}else for(i.push(e.slice(a,o));o<e.length&&e[o]==="/";)o++;for(var l,c=0,o=i.length-1;o>=0;o--)l=i[o],l==="."?i.splice(o,1):l===".."?c++:c>0&&(l===""?(i.splice(o+1,c),c=0):(i.splice(o,2),c--));return e=i.join("/"),e===""&&(e=r?"/":"."),t?(t.path=e,ut(t)):e});te.normalize=ws;function ui(s,n){s===""&&(s="."),n===""&&(n=".");var e=_t(n),t=_t(s);if(t&&(s=t.path||"/"),e&&!e.scheme)return t&&(e.scheme=t.scheme),ut(e);if(e||n.match(Hl))return n;if(t&&!t.host&&!t.path)return t.host=n,ut(t);var r=n.charAt(0)==="/"?n:ws(s.replace(/\/+$/,"")+"/"+n);return t?(t.path=r,ut(t)):r}te.join=ui;te.isAbsolute=function(s){return s.charAt(0)==="/"||pi.test(s)};function ql(s,n){s===""&&(s="."),s=s.replace(/\/$/,"");for(var e=0;n.indexOf(s+"/")!==0;){var t=s.lastIndexOf("/");if(t<0||(s=s.slice(0,t),s.match(/^([^\/]+:\/)?\/*$/)))return n;++e}return Array(e+1).join("../")+n.substr(s.length+1)}te.relative=ql;var di=function(){var s=Object.create(null);return!("__proto__"in s)}();function fi(s){return s}function Kl(s){return mi(s)?"$"+s:s}te.toSetString=di?fi:Kl;function Jl(s){return mi(s)?s.slice(1):s}te.fromSetString=di?fi:Jl;function mi(s){if(!s)return!1;var n=s.length;if(n<9||s.charCodeAt(n-1)!==95||s.charCodeAt(n-2)!==95||s.charCodeAt(n-3)!==111||s.charCodeAt(n-4)!==116||s.charCodeAt(n-5)!==111||s.charCodeAt(n-6)!==114||s.charCodeAt(n-7)!==112||s.charCodeAt(n-8)!==95||s.charCodeAt(n-9)!==95)return!1;for(var e=n-10;e>=0;e--)if(s.charCodeAt(e)!==36)return!1;return!0}function Xl(s,n,e){var t=_e(s.source,n.source);return t!==0||(t=s.originalLine-n.originalLine,t!==0)||(t=s.originalColumn-n.originalColumn,t!==0||e)||(t=s.generatedColumn-n.generatedColumn,t!==0)||(t=s.generatedLine-n.generatedLine,t!==0)?t:_e(s.name,n.name)}te.compareByOriginalPositions=Xl;function Yl(s,n,e){var t;return t=s.originalLine-n.originalLine,t!==0||(t=s.originalColumn-n.originalColumn,t!==0||e)||(t=s.generatedColumn-n.generatedColumn,t!==0)||(t=s.generatedLine-n.generatedLine,t!==0)?t:_e(s.name,n.name)}te.compareByOriginalPositionsNoSource=Yl;function Ql(s,n,e){var t=s.generatedLine-n.generatedLine;return t!==0||(t=s.generatedColumn-n.generatedColumn,t!==0||e)||(t=_e(s.source,n.source),t!==0)||(t=s.originalLine-n.originalLine,t!==0)||(t=s.originalColumn-n.originalColumn,t!==0)?t:_e(s.name,n.name)}te.compareByGeneratedPositionsDeflated=Ql;function Zl(s,n,e){var t=s.generatedColumn-n.generatedColumn;return t!==0||e||(t=_e(s.source,n.source),t!==0)||(t=s.originalLine-n.originalLine,t!==0)||(t=s.originalColumn-n.originalColumn,t!==0)?t:_e(s.name,n.name)}te.compareByGeneratedPositionsDeflatedNoLine=Zl;function _e(s,n){return s===n?0:s===null?1:n===null?-1:s>n?1:-1}function ec(s,n){var e=s.generatedLine-n.generatedLine;return e!==0||(e=s.generatedColumn-n.generatedColumn,e!==0)||(e=_e(s.source,n.source),e!==0)||(e=s.originalLine-n.originalLine,e!==0)||(e=s.originalColumn-n.originalColumn,e!==0)?e:_e(s.name,n.name)}te.compareByGeneratedPositionsInflated=ec;function tc(s){return JSON.parse(s.replace(/^\)]}'[^\n]*\n/,""))}te.parseSourceMapInput=tc;function nc(s,n,e){if(n=n||"",s&&(s[s.length-1]!=="/"&&n[0]!=="/"&&(s+="/"),n=s+n),e){var t=_t(e);if(!t)throw new Error("sourceMapURL could not be parsed");if(t.path){var r=t.path.lastIndexOf("/");r>=0&&(t.path=t.path.substring(0,r+1))}n=ui(ut(t),n)}return ws(n)}te.computeSourceURL=nc});var Es=ve(hi=>{"use strict";var Ts=dt(),Ds=Object.prototype.hasOwnProperty,tt=typeof Map<"u";function Re(){this._array=[],this._set=tt?new Map:Object.create(null)}Re.fromArray=function(n,e){for(var t=new Re,r=0,i=n.length;r<i;r++)t.add(n[r],e);return t};Re.prototype.size=function(){return tt?this._set.size:Object.getOwnPropertyNames(this._set).length};Re.prototype.add=function(n,e){var t=tt?n:Ts.toSetString(n),r=tt?this.has(n):Ds.call(this._set,t),i=this._array.length;(!r||e)&&this._array.push(n),r||(tt?this._set.set(n,i):this._set[t]=i)};Re.prototype.has=function(n){if(tt)return this._set.has(n);var e=Ts.toSetString(n);return Ds.call(this._set,e)};Re.prototype.indexOf=function(n){if(tt){var e=this._set.get(n);if(e>=0)return e}else{var t=Ts.toSetString(n);if(Ds.call(this._set,t))return this._set[t]}throw new Error('"'+n+'" is not in the set.')};Re.prototype.at=function(n){if(n>=0&&n<this._array.length)return this._array[n];throw new Error("No element indexed by "+n)};Re.prototype.toArray=function(){return this._array.slice()};hi.ArraySet=Re});var yi=ve(gi=>{"use strict";var bi=dt();function sc(s,n){var e=s.generatedLine,t=n.generatedLine,r=s.generatedColumn,i=n.generatedColumn;return t>e||t==e&&i>=r||bi.compareByGeneratedPositionsInflated(s,n)<=0}function xn(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}xn.prototype.unsortedForEach=function(n,e){this._array.forEach(n,e)};xn.prototype.add=function(n){sc(this._last,n)?(this._last=n,this._array.push(n)):(this._sorted=!1,this._array.push(n))};xn.prototype.toArray=function(){return this._sorted||(this._array.sort(bi.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};gi.MappingList=xn});var Ss=ve(vi=>{"use strict";var Rt=Cs(),Y=dt(),Pn=Es().ArraySet,rc=yi().MappingList;function xe(s){s||(s={}),this._file=Y.getArg(s,"file",null),this._sourceRoot=Y.getArg(s,"sourceRoot",null),this._skipValidation=Y.getArg(s,"skipValidation",!1),this._ignoreInvalidMapping=Y.getArg(s,"ignoreInvalidMapping",!1),this._sources=new Pn,this._names=new Pn,this._mappings=new rc,this._sourcesContents=null}xe.prototype._version=3;xe.fromSourceMap=function(n,e){var t=n.sourceRoot,r=new xe(Object.assign(e||{},{file:n.file,sourceRoot:t}));return n.eachMapping(function(i){var a={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(a.source=i.source,t!=null&&(a.source=Y.relative(t,a.source)),a.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(a.name=i.name)),r.addMapping(a)}),n.sources.forEach(function(i){var a=i;t!==null&&(a=Y.relative(t,i)),r._sources.has(a)||r._sources.add(a);var o=n.sourceContentFor(i);o!=null&&r.setSourceContent(i,o)}),r};xe.prototype.addMapping=function(n){var e=Y.getArg(n,"generated"),t=Y.getArg(n,"original",null),r=Y.getArg(n,"source",null),i=Y.getArg(n,"name",null);!this._skipValidation&&this._validateMapping(e,t,r,i)===!1||(r!=null&&(r=String(r),this._sources.has(r)||this._sources.add(r)),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:r,name:i}))};xe.prototype.setSourceContent=function(n,e){var t=n;this._sourceRoot!=null&&(t=Y.relative(this._sourceRoot,t)),e!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Y.toSetString(t)]=e):this._sourcesContents&&(delete this._sourcesContents[Y.toSetString(t)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};xe.prototype.applySourceMap=function(n,e,t){var r=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.`);r=n.file}var i=this._sourceRoot;i!=null&&(r=Y.relative(i,r));var a=new Pn,o=new Pn;this._mappings.unsortedForEach(function(l){if(l.source===r&&l.originalLine!=null){var c=n.originalPositionFor({line:l.originalLine,column:l.originalColumn});c.source!=null&&(l.source=c.source,t!=null&&(l.source=Y.join(t,l.source)),i!=null&&(l.source=Y.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&&!a.has(p)&&a.add(p);var u=l.name;u!=null&&!o.has(u)&&o.add(u)},this),this._sources=a,this._names=o,n.sources.forEach(function(l){var c=n.sourceContentFor(l);c!=null&&(t!=null&&(l=Y.join(t,l)),i!=null&&(l=Y.relative(i,l)),this.setSourceContent(l,c))},this)};xe.prototype._validateMapping=function(n,e,t,r){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&&!r)){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:r});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(i),!1;throw new Error(i)}};xe.prototype._serializeMappings=function(){for(var n=0,e=1,t=0,r=0,i=0,a=0,o="",l,c,p,u,d=this._mappings.toArray(),m=0,f=d.length;m<f;m++){if(c=d[m],l="",c.generatedLine!==e)for(n=0;c.generatedLine!==e;)l+=";",e++;else if(m>0){if(!Y.compareByGeneratedPositionsInflated(c,d[m-1]))continue;l+=","}l+=Rt.encode(c.generatedColumn-n),n=c.generatedColumn,c.source!=null&&(u=this._sources.indexOf(c.source),l+=Rt.encode(u-a),a=u,l+=Rt.encode(c.originalLine-1-r),r=c.originalLine-1,l+=Rt.encode(c.originalColumn-t),t=c.originalColumn,c.name!=null&&(p=this._names.indexOf(c.name),l+=Rt.encode(p-i),i=p)),o+=l}return o};xe.prototype._generateSourcesContent=function(n,e){return n.map(function(t){if(!this._sourcesContents)return null;e!=null&&(t=Y.relative(e,t));var r=Y.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)};xe.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};xe.prototype.toString=function(){return JSON.stringify(this.toJSON())};vi.SourceMapGenerator=xe});var xi=ve(nt=>{"use strict";nt.GREATEST_LOWER_BOUND=1;nt.LEAST_UPPER_BOUND=2;function As(s,n,e,t,r,i){var a=Math.floor((n-s)/2)+s,o=r(e,t[a],!0);return o===0?a:o>0?n-a>1?As(a,n,e,t,r,i):i==nt.LEAST_UPPER_BOUND?n<t.length?n:-1:a:a-s>1?As(s,a,e,t,r,i):i==nt.LEAST_UPPER_BOUND?a:s<0?-1:s}nt.search=function(n,e,t,r){if(e.length===0)return-1;var i=As(-1,e.length,n,e,t,r||nt.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&t(e[i],e[i-1],!0)===0;)--i;return i}});var wi=ve(Ci=>{"use strict";function ic(s){function n(r,i,a){var o=r[i];r[i]=r[a],r[a]=o}function e(r,i){return Math.round(r+Math.random()*(i-r))}function t(r,i,a,o){if(a<o){var l=e(a,o),c=a-1;n(r,l,o);for(var p=r[o],u=a;u<o;u++)i(r[u],p,!1)<=0&&(c+=1,n(r,c,u));n(r,c+1,u);var d=c+1;t(r,i,a,d-1),t(r,i,d+1,o)}}return t}function ac(s){let n=ic.toString();return new Function(`return ${n}`)()(s)}var Pi=new WeakMap;Ci.quickSort=function(s,n,e=0){let t=Pi.get(n);t===void 0&&(t=ac(n),Pi.set(n,t)),t(s,n,e,s.length-1)}});var Ei=ve(Cn=>{"use strict";var F=dt(),Fs=xi(),ft=Es().ArraySet,oc=Cs(),jt=wi().quickSort;function q(s,n){var e=s;return typeof s=="string"&&(e=F.parseSourceMapInput(s)),e.sections!=null?new De(e,n):new se(e,n)}q.fromSourceMap=function(s,n){return se.fromSourceMap(s,n)};q.prototype._version=3;q.prototype.__generatedMappings=null;Object.defineProperty(q.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});q.prototype.__originalMappings=null;Object.defineProperty(q.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});q.prototype._charIsMappingSeparator=function(n,e){var t=n.charAt(e);return t===";"||t===","};q.prototype._parseMappings=function(n,e){throw new Error("Subclasses must implement _parseMappings")};q.GENERATED_ORDER=1;q.ORIGINAL_ORDER=2;q.GREATEST_LOWER_BOUND=1;q.LEAST_UPPER_BOUND=2;q.prototype.eachMapping=function(n,e,t){var r=e||null,i=t||q.GENERATED_ORDER,a;switch(i){case q.GENERATED_ORDER:a=this._generatedMappings;break;case q.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var o=this.sourceRoot,l=n.bind(r),c=this._names,p=this._sources,u=this._sourceMapURL,d=0,m=a.length;d<m;d++){var f=a[d],b=f.source===null?null:p.at(f.source);b!==null&&(b=F.computeSourceURL(o,b,u)),l({source:b,generatedLine:f.generatedLine,generatedColumn:f.generatedColumn,originalLine:f.originalLine,originalColumn:f.originalColumn,name:f.name===null?null:c.at(f.name)})}};q.prototype.allGeneratedPositionsFor=function(n){var e=F.getArg(n,"line"),t={source:F.getArg(n,"source"),originalLine:e,originalColumn:F.getArg(n,"column",0)};if(t.source=this._findSourceIndex(t.source),t.source<0)return[];var r=[],i=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,Fs.LEAST_UPPER_BOUND);if(i>=0){var a=this._originalMappings[i];if(n.column===void 0)for(var o=a.originalLine;a&&a.originalLine===o;)r.push({line:F.getArg(a,"generatedLine",null),column:F.getArg(a,"generatedColumn",null),lastColumn:F.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i];else for(var l=a.originalColumn;a&&a.originalLine===e&&a.originalColumn==l;)r.push({line:F.getArg(a,"generatedLine",null),column:F.getArg(a,"generatedColumn",null),lastColumn:F.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i]}return r};Cn.SourceMapConsumer=q;function se(s,n){var e=s;typeof s=="string"&&(e=F.parseSourceMapInput(s));var t=F.getArg(e,"version"),r=F.getArg(e,"sources"),i=F.getArg(e,"names",[]),a=F.getArg(e,"sourceRoot",null),o=F.getArg(e,"sourcesContent",null),l=F.getArg(e,"mappings"),c=F.getArg(e,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);a&&(a=F.normalize(a)),r=r.map(String).map(F.normalize).map(function(p){return a&&F.isAbsolute(a)&&F.isAbsolute(p)?F.relative(a,p):p}),this._names=ft.fromArray(i.map(String),!0),this._sources=ft.fromArray(r,!0),this._absoluteSources=this._sources.toArray().map(function(p){return F.computeSourceURL(a,p,n)}),this.sourceRoot=a,this.sourcesContent=o,this._mappings=l,this._sourceMapURL=n,this.file=c}se.prototype=Object.create(q.prototype);se.prototype.consumer=q;se.prototype._findSourceIndex=function(s){var n=s;if(this.sourceRoot!=null&&(n=F.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]==s)return e;return-1};se.fromSourceMap=function(n,e){var t=Object.create(se.prototype),r=t._names=ft.fromArray(n._names.toArray(),!0),i=t._sources=ft.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 F.computeSourceURL(t.sourceRoot,m,e)});for(var a=n._mappings.toArray().slice(),o=t.__generatedMappings=[],l=t.__originalMappings=[],c=0,p=a.length;c<p;c++){var u=a[c],d=new Di;d.generatedLine=u.generatedLine,d.generatedColumn=u.generatedColumn,u.source&&(d.source=i.indexOf(u.source),d.originalLine=u.originalLine,d.originalColumn=u.originalColumn,u.name&&(d.name=r.indexOf(u.name)),l.push(d)),o.push(d)}return jt(t.__originalMappings,F.compareByOriginalPositions),t};se.prototype._version=3;Object.defineProperty(se.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Di(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Is=F.compareByGeneratedPositionsDeflatedNoLine;function Ti(s,n){let e=s.length,t=s.length-n;if(!(t<=1))if(t==2){let r=s[n],i=s[n+1];Is(r,i)>0&&(s[n]=i,s[n+1]=r)}else if(t<20)for(let r=n;r<e;r++)for(let i=r;i>n;i--){let a=s[i-1],o=s[i];if(Is(a,o)<=0)break;s[i-1]=o,s[i]=a}else jt(s,Is,n)}se.prototype._parseMappings=function(n,e){var t=1,r=0,i=0,a=0,o=0,l=0,c=n.length,p=0,u={},d={},m=[],f=[],b,h,y,C,k;let x=0;for(;p<c;)if(n.charAt(p)===";")t++,p++,r=0,Ti(f,x),x=f.length;else if(n.charAt(p)===",")p++;else{for(b=new Di,b.generatedLine=t,C=p;C<c&&!this._charIsMappingSeparator(n,C);C++);for(h=n.slice(p,C),y=[];p<C;)oc.decode(n,p,d),k=d.value,p=d.rest,y.push(k);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(b.generatedColumn=r+y[0],r=b.generatedColumn,y.length>1&&(b.source=o+y[1],o+=y[1],b.originalLine=i+y[2],i=b.originalLine,b.originalLine+=1,b.originalColumn=a+y[3],a=b.originalColumn,y.length>4&&(b.name=l+y[4],l+=y[4])),f.push(b),typeof b.originalLine=="number"){let T=b.source;for(;m.length<=T;)m.push(null);m[T]===null&&(m[T]=[]),m[T].push(b)}}Ti(f,x),this.__generatedMappings=f;for(var P=0;P<m.length;P++)m[P]!=null&&jt(m[P],F.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...m)};se.prototype._findMapping=function(n,e,t,r,i,a){if(n[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+n[t]);if(n[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+n[r]);return Fs.search(n,e,i,a)};se.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}};se.prototype.originalPositionFor=function(n){var e={generatedLine:F.getArg(n,"line"),generatedColumn:F.getArg(n,"column")},t=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",F.compareByGeneratedPositionsDeflated,F.getArg(n,"bias",q.GREATEST_LOWER_BOUND));if(t>=0){var r=this._generatedMappings[t];if(r.generatedLine===e.generatedLine){var i=F.getArg(r,"source",null);i!==null&&(i=this._sources.at(i),i=F.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var a=F.getArg(r,"name",null);return a!==null&&(a=this._names.at(a)),{source:i,line:F.getArg(r,"originalLine",null),column:F.getArg(r,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};se.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(n){return n==null}):!1};se.prototype.sourceContentFor=function(n,e){if(!this.sourcesContent)return null;var t=this._findSourceIndex(n);if(t>=0)return this.sourcesContent[t];var r=n;this.sourceRoot!=null&&(r=F.relative(this.sourceRoot,r));var i;if(this.sourceRoot!=null&&(i=F.urlParse(this.sourceRoot))){var a=r.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!i.path||i.path=="/")&&this._sources.has("/"+r))return this.sourcesContent[this._sources.indexOf("/"+r)]}if(e)return null;throw new Error('"'+r+'" is not in the SourceMap.')};se.prototype.generatedPositionFor=function(n){var e=F.getArg(n,"source");if(e=this._findSourceIndex(e),e<0)return{line:null,column:null,lastColumn:null};var t={source:e,originalLine:F.getArg(n,"line"),originalColumn:F.getArg(n,"column")},r=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,F.getArg(n,"bias",q.GREATEST_LOWER_BOUND));if(r>=0){var i=this._originalMappings[r];if(i.source===t.source)return{line:F.getArg(i,"generatedLine",null),column:F.getArg(i,"generatedColumn",null),lastColumn:F.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Cn.BasicSourceMapConsumer=se;function De(s,n){var e=s;typeof s=="string"&&(e=F.parseSourceMapInput(s));var t=F.getArg(e,"version"),r=F.getArg(e,"sections");if(t!=this._version)throw new Error("Unsupported version: "+t);this._sources=new ft,this._names=new ft;var i={line:-1,column:0};this._sections=r.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var o=F.getArg(a,"offset"),l=F.getArg(o,"line"),c=F.getArg(o,"column");if(l<i.line||l===i.line&&c<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=o,{generatedOffset:{generatedLine:l+1,generatedColumn:c+1},consumer:new q(F.getArg(a,"map"),n)}})}De.prototype=Object.create(q.prototype);De.prototype.constructor=q;De.prototype._version=3;Object.defineProperty(De.prototype,"sources",{get:function(){for(var s=[],n=0;n<this._sections.length;n++)for(var e=0;e<this._sections[n].consumer.sources.length;e++)s.push(this._sections[n].consumer.sources[e]);return s}});De.prototype.originalPositionFor=function(n){var e={generatedLine:F.getArg(n,"line"),generatedColumn:F.getArg(n,"column")},t=Fs.search(e,this._sections,function(i,a){var o=i.generatedLine-a.generatedOffset.generatedLine;return o||i.generatedColumn-a.generatedOffset.generatedColumn}),r=this._sections[t];return r?r.consumer.originalPositionFor({line:e.generatedLine-(r.generatedOffset.generatedLine-1),column:e.generatedColumn-(r.generatedOffset.generatedLine===e.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:n.bias}):{source:null,line:null,column:null,name:null}};De.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(n){return n.consumer.hasContentsOfAllSources()})};De.prototype.sourceContentFor=function(n,e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t],i=r.consumer.sourceContentFor(n,!0);if(i||i==="")return i}if(e)return null;throw new Error('"'+n+'" is not in the SourceMap.')};De.prototype.generatedPositionFor=function(n){for(var e=0;e<this._sections.length;e++){var t=this._sections[e];if(t.consumer._findSourceIndex(F.getArg(n,"source"))!==-1){var r=t.consumer.generatedPositionFor(n);if(r){var i={line:r.line+(t.generatedOffset.generatedLine-1),column:r.column+(t.generatedOffset.generatedLine===r.line?t.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}};De.prototype._parseMappings=function(n,e){this.__generatedMappings=[],this.__originalMappings=[];for(var t=0;t<this._sections.length;t++)for(var r=this._sections[t],i=r.consumer._generatedMappings,a=0;a<i.length;a++){var o=i[a],l=r.consumer._sources.at(o.source);l!==null&&(l=F.computeSourceURL(r.consumer.sourceRoot,l,this._sourceMapURL)),this._sources.add(l),l=this._sources.indexOf(l);var c=null;o.name&&(c=r.consumer._names.at(o.name),this._names.add(c),c=this._names.indexOf(c));var p={source:l,generatedLine:o.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(r.generatedOffset.generatedLine===o.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:c};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}jt(this.__generatedMappings,F.compareByGeneratedPositionsDeflated),jt(this.__originalMappings,F.compareByOriginalPositions)};Cn.IndexedSourceMapConsumer=De});var Ai=ve(Si=>{"use strict";var lc=Ss().SourceMapGenerator,wn=dt(),cc=/(\r?\n)/,pc=10,mt="$$$isSourceNode$$$";function fe(s,n,e,t,r){this.children=[],this.sourceContents={},this.line=s??null,this.column=n??null,this.source=e??null,this.name=r??null,this[mt]=!0,t!=null&&this.add(t)}fe.fromStringWithSourceMap=function(n,e,t){var r=new fe,i=n.split(cc),a=0,o=function(){var d=f(),m=f()||"";return d+m;function f(){return a<i.length?i[a++]:void 0}},l=1,c=0,p=null;return e.eachMapping(function(d){if(p!==null)if(l<d.generatedLine)u(p,o()),l++,c=0;else{var m=i[a]||"",f=m.substr(0,d.generatedColumn-c);i[a]=m.substr(d.generatedColumn-c),c=d.generatedColumn,u(p,f),p=d;return}for(;l<d.generatedLine;)r.add(o()),l++;if(c<d.generatedColumn){var m=i[a]||"";r.add(m.substr(0,d.generatedColumn)),i[a]=m.substr(d.generatedColumn),c=d.generatedColumn}p=d},this),a<i.length&&(p&&u(p,o()),r.add(i.splice(a).join(""))),e.sources.forEach(function(d){var m=e.sourceContentFor(d);m!=null&&(t!=null&&(d=wn.join(t,d)),r.setSourceContent(d,m))}),r;function u(d,m){if(d===null||d.source===void 0)r.add(m);else{var f=t?wn.join(t,d.source):d.source;r.add(new fe(d.originalLine,d.originalColumn,f,m,d.name))}}};fe.prototype.add=function(n){if(Array.isArray(n))n.forEach(function(e){this.add(e)},this);else if(n[mt]||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};fe.prototype.prepend=function(n){if(Array.isArray(n))for(var e=n.length-1;e>=0;e--)this.prepend(n[e]);else if(n[mt]||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};fe.prototype.walk=function(n){for(var e,t=0,r=this.children.length;t<r;t++)e=this.children[t],e[mt]?e.walk(n):e!==""&&n(e,{source:this.source,line:this.line,column:this.column,name:this.name})};fe.prototype.join=function(n){var e,t,r=this.children.length;if(r>0){for(e=[],t=0;t<r-1;t++)e.push(this.children[t]),e.push(n);e.push(this.children[t]),this.children=e}return this};fe.prototype.replaceRight=function(n,e){var t=this.children[this.children.length-1];return t[mt]?t.replaceRight(n,e):typeof t=="string"?this.children[this.children.length-1]=t.replace(n,e):this.children.push("".replace(n,e)),this};fe.prototype.setSourceContent=function(n,e){this.sourceContents[wn.toSetString(n)]=e};fe.prototype.walkSourceContents=function(n){for(var e=0,t=this.children.length;e<t;e++)this.children[e][mt]&&this.children[e].walkSourceContents(n);for(var r=Object.keys(this.sourceContents),e=0,t=r.length;e<t;e++)n(wn.fromSetString(r[e]),this.sourceContents[r[e]])};fe.prototype.toString=function(){var n="";return this.walk(function(e){n+=e}),n};fe.prototype.toStringWithSourceMap=function(n){var e={code:"",line:1,column:0},t=new lc(n),r=!1,i=null,a=null,o=null,l=null;return this.walk(function(c,p){e.code+=c,p.source!==null&&p.line!==null&&p.column!==null?((i!==p.source||a!==p.line||o!==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,a=p.line,o=p.column,l=p.name,r=!0):r&&(t.addMapping({generated:{line:e.line,column:e.column}}),i=null,r=!1);for(var u=0,d=c.length;u<d;u++)c.charCodeAt(u)===pc?(e.line++,e.column=0,u+1===d?(i=null,r=!1):r&&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}};Si.SourceNode=fe});var ks=ve(Tn=>{"use strict";Tn.SourceMapGenerator=Ss().SourceMapGenerator;Tn.SourceMapConsumer=Ei().SourceMapConsumer;Tn.SourceNode=Ai().SourceNode});var fr=ve(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});function uc(s,n){if(s==null)return{};var e={};for(var t in s)if({}.hasOwnProperty.call(s,t)){if(n.includes(t))continue;e[t]=s[t]}return e}var Oe=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}},vt=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 oe(s,n){let{line:e,column:t,index:r}=s;return new Oe(e,t+n,r+n)}var Ii="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",dc={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Ii},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Ii}},Fi={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"},Sn=s=>s.type==="UpdateExpression"?Fi.UpdateExpression[`${s.prefix}`]:Fi[s.type],fc={AccessorIsGenerator:({kind:s})=>`A ${s}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:s})=>`Missing initializer in ${s} 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:s})=>`\`${s}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:s})=>`'import.${s}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:s,exportName:n})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
3
3
|
- Did you mean \`export { '${s}' as '${n}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:s})=>`'${s==="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:s})=>`Unsyntactic ${s==="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:s})=>`A string literal cannot be used as an imported binding.
|
|
4
|
-
- Did you mean \`import { "${s}" 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:s})=>`Expected number in radix ${s}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:s})=>`Escape sequence in keyword ${s}.`,InvalidIdentifier:({identifierName:s})=>`Invalid identifier ${s}.`,InvalidLhs:({ancestor:s})=>`Invalid left-hand side in ${Sn(s)}.`,InvalidLhsBinding:({ancestor:s})=>`Binding invalid left-hand side in ${Sn(s)}.`,InvalidLhsOptionalChaining:({ancestor:s})=>`Invalid optional chaining in the left-hand side of ${Sn(s)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:s})=>`Unexpected character '${s}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:s})=>`Private name #${s} 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:s})=>`Label '${s}' 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:s})=>`This experimental syntax requires enabling the parser plugin: ${s.map(n=>JSON.stringify(n)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:s})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${s.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:s})=>`Duplicate key "${s}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:s})=>`An export name cannot include a lone surrogate, found '\\u${s.toString(16)}'.`,ModuleExportUndefined:({localName:s})=>`Export '${s}' 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:s})=>`Private names are only allowed in property accesses (\`obj.#${s}\`) or in \`in\` expressions (\`#${s} in obj\`).`,PrivateNameRedeclaration:({identifierName:s})=>`Duplicate private name #${s}.`,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:s})=>`Unexpected keyword '${s}'.`,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:s})=>`Unexpected reserved word '${s}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:s,unexpected:n})=>`Unexpected token${n?` '${n}'.`:""}${s?`, expected "${s}"`:""}`,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:s,onlyValidPropertyName:n})=>`The only valid meta property for ${s} is ${s}.${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:s})=>`Identifier '${s}' 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."},mc={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:s})=>`Assigning to '${s}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:s})=>`Binding '${s}' 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."},hc=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),bc=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:s})=>`Invalid topic token ${s}. In order to use ${s} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${s}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:s})=>`Hack-style pipe body cannot be an unparenthesized ${Sn({type:s})}; 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.'}),gc=["message"];function ki(s,n,e){Object.defineProperty(s,n,{enumerable:!1,configurable:!0,value:e})}function yc({toMessage:s,code:n,reasonCode:e,syntaxPlugin:t}){let r=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(a,o){let l=new SyntaxError;return l.code=n,l.reasonCode=e,l.loc=a,l.pos=a.index,l.syntaxPlugin=t,r&&(l.missingPlugin=o.missingPlugin),ki(l,"clone",function(p={}){var u;let{line:d,column:m,index:f}=(u=p.loc)!=null?u:a;return i(new Oe(d,m,f),Object.assign({},o,p.details))}),ki(l,"details",o),Object.defineProperty(l,"message",{configurable:!0,get(){let c=`${s(o)} (${a.line}:${a.column})`;return this.message=c,c},set(c){Object.defineProperty(this,"message",{value:c,writable:!0})}}),l}}function $e(s,n){if(Array.isArray(s))return t=>$e(t,s[0]);let e={};for(let t of Object.keys(s)){let r=s[t],i=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,{message:a}=i,o=uc(i,gc),l=typeof a=="string"?()=>a:a;e[t]=yc(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:t,toMessage:l},n?{syntaxPlugin:n}:{},o))}return e}var g=Object.assign({},$e(dc),$e(fc),$e(mc),$e`pipelineOperator`(bc));function vc(){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 xc(s){let n=vc();if(s==null)return n;if(s.annexB!=null&&s.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let e of Object.keys(n))s[e]!=null&&(n[e]=s[e]);if(n.startLine===1)s.startIndex==null&&n.startColumn>0?n.startIndex=n.startColumn:s.startColumn==null&&n.startIndex>0&&(n.startColumn=n.startIndex);else if((s.startColumn==null||s.startIndex==null)&&s.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");return n}var{defineProperty:Pc}=Object,Ni=(s,n)=>{s&&Pc(s,n,{enumerable:!1,value:s[n]})};function Vt(s){return Ni(s.loc.start,"index"),Ni(s.loc.end,"index"),s}var Tc=s=>class extends s{parse(){let e=Vt(super.parse());return this.optionFlags&128&&(e.tokens=e.tokens.map(Vt)),e}parseRegExpLiteral({pattern:e,flags:t}){let r=null;try{r=new RegExp(e,t)}catch{}let i=this.estreeParseLiteral(r);return i.regex={pattern:e,flags:t},i}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}let r=this.estreeParseLiteral(t);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){let r=this.estreeParseLiteral(null);return r.decimal=String(r.value||e),r}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 r=e;return r.type="ExpressionStatement",r.expression=t,r.directive=t.extra.rawValue,delete t.extra,r}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,r,i,a){super.parseBlockBody(e,t,r,i,a);let o=e.directives.map(l=>this.directiveToStmt(l));e.body=o.concat(e.body),delete e.directives}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let t=super.getPrivateNameSV(e);return 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 r=super.parseLiteral(e,t);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,t,r=!1){super.parseFunctionBody(e,t,r),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,t,r,i,a,o,l=!1){let c=this.startNode();c.kind=e.kind,c=super.parseMethod(c,t,r,i,a,o,l),c.type="FunctionExpression",delete c.kind,e.value=c;let{typeParameters:p}=e;return p&&(delete e.typeParameters,c.typeParameters=p,this.resetStartLocationFromNode(c,p)),o==="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,r,i,a){let o=super.parseObjectMethod(e,t,r,i,a);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(e,t,r,i){let a=super.parseObjectProperty(e,t,r,i);return a&&(a.kind="init",a.type="Property"),a}isValidLVal(e,t,r){return e==="Property"?"value":super.isValidLVal(e,t,r)}isAssignable(e,t){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(e!=null&&this.isObjectProperty(e)){let{key:r,value:i}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(i,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,r){e.type==="Property"&&(e.kind==="get"||e.kind==="set")?this.raise(g.PatternHasAccessor,e.key):e.type==="Property"&&e.method?this.raise(g.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,t,r)}finishCallExpression(e,t){let r=super.finishCallExpression(e,t);if(r.callee.type==="Import"){var i,a;r.type="ImportExpression",r.source=r.arguments[0],r.options=(i=r.arguments[1])!=null?i:null,r.attributes=(a=r.arguments[1])!=null?a:null,delete r.arguments,delete r.callee}return r}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,t){let r=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 a;let{declaration:o}=i;o?.type==="ClassDeclaration"&&((a=o.decorators)==null?void 0:a.length)>0&&o.start===i.start&&this.resetStartLocation(i,r)}break}return i}parseSubscript(e,t,r,i){let a=super.parseSubscript(e,t,r,i);if(i.optionalChainMember){if((a.type==="OptionalMemberExpression"||a.type==="OptionalCallExpression")&&(a.type=a.type.substring(8)),i.stop){let o=this.startNodeAtNode(a);return o.expression=a,this.finishNode(o,"ChainExpression")}}else(a.type==="MemberExpression"||a.type==="CallExpression")&&(a.optional=!1);return a}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.type==="Property"&&(e.method||e.kind==="get"||e.kind==="set")}finishNodeAt(e,t,r){return Vt(super.finishNodeAt(e,t,r))}resetStartLocation(e,t){super.resetStartLocation(e,t),Vt(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),Vt(e)}},it=class{constructor(n,e){this.token=void 0,this.preserveSpace=void 0,this.token=n,this.preserveSpace=!!e}},j={brace:new it("{"),j_oTag:new it("<tag"),j_cTag:new it("</tag"),j_expr:new it("<tag>...</tag>",!0)};j.template=new it("`",!0);var _=!0,S=!0,Ns=!0,zt=!0,Ke=!0,Cc=!0,Fn=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}},sr=new Map;function R(s,n={}){n.keyword=s;let e=N(s,n);return sr.set(s,e),e}function ae(s,n){return N(s,{beforeExpr:_,binop:n})}var Gt=-1,Ve=[],rr=[],ir=[],ar=[],or=[],lr=[];function N(s,n={}){var e,t,r,i;return++Gt,rr.push(s),ir.push((e=n.binop)!=null?e:-1),ar.push((t=n.beforeExpr)!=null?t:!1),or.push((r=n.startsExpr)!=null?r:!1),lr.push((i=n.prefix)!=null?i:!1),Ve.push(new Fn(s,n)),Gt}function U(s,n={}){var e,t,r,i;return++Gt,sr.set(s,Gt),rr.push(s),ir.push((e=n.binop)!=null?e:-1),ar.push((t=n.beforeExpr)!=null?t:!1),or.push((r=n.startsExpr)!=null?r:!1),lr.push((i=n.prefix)!=null?i:!1),Ve.push(new Fn("name",n)),Gt}var wc={bracketL:N("[",{beforeExpr:_,startsExpr:S}),bracketHashL:N("#[",{beforeExpr:_,startsExpr:S}),bracketBarL:N("[|",{beforeExpr:_,startsExpr:S}),bracketR:N("]"),bracketBarR:N("|]"),braceL:N("{",{beforeExpr:_,startsExpr:S}),braceBarL:N("{|",{beforeExpr:_,startsExpr:S}),braceHashL:N("#{",{beforeExpr:_,startsExpr:S}),braceR:N("}"),braceBarR:N("|}"),parenL:N("(",{beforeExpr:_,startsExpr:S}),parenR:N(")"),comma:N(",",{beforeExpr:_}),semi:N(";",{beforeExpr:_}),colon:N(":",{beforeExpr:_}),doubleColon:N("::",{beforeExpr:_}),dot:N("."),question:N("?",{beforeExpr:_}),questionDot:N("?."),arrow:N("=>",{beforeExpr:_}),template:N("template"),ellipsis:N("...",{beforeExpr:_}),backQuote:N("`",{startsExpr:S}),dollarBraceL:N("${",{beforeExpr:_,startsExpr:S}),templateTail:N("...`",{startsExpr:S}),templateNonTail:N("...${",{beforeExpr:_,startsExpr:S}),at:N("@"),hash:N("#",{startsExpr:S}),interpreterDirective:N("#!..."),eq:N("=",{beforeExpr:_,isAssign:zt}),assign:N("_=",{beforeExpr:_,isAssign:zt}),slashAssign:N("_=",{beforeExpr:_,isAssign:zt}),xorAssign:N("_=",{beforeExpr:_,isAssign:zt}),moduloAssign:N("_=",{beforeExpr:_,isAssign:zt}),incDec:N("++/--",{prefix:Ke,postfix:Cc,startsExpr:S}),bang:N("!",{beforeExpr:_,prefix:Ke,startsExpr:S}),tilde:N("~",{beforeExpr:_,prefix:Ke,startsExpr:S}),doubleCaret:N("^^",{startsExpr:S}),doubleAt:N("@@",{startsExpr:S}),pipeline:ae("|>",0),nullishCoalescing:ae("??",1),logicalOR:ae("||",1),logicalAND:ae("&&",2),bitwiseOR:ae("|",3),bitwiseXOR:ae("^",4),bitwiseAND:ae("&",5),equality:ae("==/!=/===/!==",6),lt:ae("</>/<=/>=",7),gt:ae("</>/<=/>=",7),relational:ae("</>/<=/>=",7),bitShift:ae("<</>>/>>>",8),bitShiftL:ae("<</>>/>>>",8),bitShiftR:ae("<</>>/>>>",8),plusMin:N("+/-",{beforeExpr:_,binop:9,prefix:Ke,startsExpr:S}),modulo:N("%",{binop:10,startsExpr:S}),star:N("*",{binop:10}),slash:ae("/",10),exponent:N("**",{beforeExpr:_,binop:11,rightAssociative:!0}),_in:R("in",{beforeExpr:_,binop:7}),_instanceof:R("instanceof",{beforeExpr:_,binop:7}),_break:R("break"),_case:R("case",{beforeExpr:_}),_catch:R("catch"),_continue:R("continue"),_debugger:R("debugger"),_default:R("default",{beforeExpr:_}),_else:R("else",{beforeExpr:_}),_finally:R("finally"),_function:R("function",{startsExpr:S}),_if:R("if"),_return:R("return",{beforeExpr:_}),_switch:R("switch"),_throw:R("throw",{beforeExpr:_,prefix:Ke,startsExpr:S}),_try:R("try"),_var:R("var"),_const:R("const"),_with:R("with"),_new:R("new",{beforeExpr:_,startsExpr:S}),_this:R("this",{startsExpr:S}),_super:R("super",{startsExpr:S}),_class:R("class",{startsExpr:S}),_extends:R("extends",{beforeExpr:_}),_export:R("export"),_import:R("import",{startsExpr:S}),_null:R("null",{startsExpr:S}),_true:R("true",{startsExpr:S}),_false:R("false",{startsExpr:S}),_typeof:R("typeof",{beforeExpr:_,prefix:Ke,startsExpr:S}),_void:R("void",{beforeExpr:_,prefix:Ke,startsExpr:S}),_delete:R("delete",{beforeExpr:_,prefix:Ke,startsExpr:S}),_do:R("do",{isLoop:Ns,beforeExpr:_}),_for:R("for",{isLoop:Ns}),_while:R("while",{isLoop:Ns}),_as:U("as",{startsExpr:S}),_assert:U("assert",{startsExpr:S}),_async:U("async",{startsExpr:S}),_await:U("await",{startsExpr:S}),_defer:U("defer",{startsExpr:S}),_from:U("from",{startsExpr:S}),_get:U("get",{startsExpr:S}),_let:U("let",{startsExpr:S}),_meta:U("meta",{startsExpr:S}),_of:U("of",{startsExpr:S}),_sent:U("sent",{startsExpr:S}),_set:U("set",{startsExpr:S}),_source:U("source",{startsExpr:S}),_static:U("static",{startsExpr:S}),_using:U("using",{startsExpr:S}),_yield:U("yield",{startsExpr:S}),_asserts:U("asserts",{startsExpr:S}),_checks:U("checks",{startsExpr:S}),_exports:U("exports",{startsExpr:S}),_global:U("global",{startsExpr:S}),_implements:U("implements",{startsExpr:S}),_intrinsic:U("intrinsic",{startsExpr:S}),_infer:U("infer",{startsExpr:S}),_is:U("is",{startsExpr:S}),_mixins:U("mixins",{startsExpr:S}),_proto:U("proto",{startsExpr:S}),_require:U("require",{startsExpr:S}),_satisfies:U("satisfies",{startsExpr:S}),_keyof:U("keyof",{startsExpr:S}),_readonly:U("readonly",{startsExpr:S}),_unique:U("unique",{startsExpr:S}),_abstract:U("abstract",{startsExpr:S}),_declare:U("declare",{startsExpr:S}),_enum:U("enum",{startsExpr:S}),_module:U("module",{startsExpr:S}),_namespace:U("namespace",{startsExpr:S}),_interface:U("interface",{startsExpr:S}),_type:U("type",{startsExpr:S}),_opaque:U("opaque",{startsExpr:S}),name:N("name",{startsExpr:S}),placeholder:N("%%",{startsExpr:!0}),string:N("string",{startsExpr:S}),num:N("num",{startsExpr:S}),bigint:N("bigint",{startsExpr:S}),decimal:N("decimal",{startsExpr:S}),regexp:N("regexp",{startsExpr:S}),privateName:N("#name",{startsExpr:S}),eof:N("eof"),jsxName:N("jsxName"),jsxText:N("jsxText",{beforeExpr:!0}),jsxTagStart:N("jsxTagStart",{startsExpr:!0}),jsxTagEnd:N("jsxTagEnd")};function V(s){return s>=93&&s<=133}function Dc(s){return s<=92}function Ee(s){return s>=58&&s<=133}function Hi(s){return s>=58&&s<=137}function Ec(s){return ar[s]}function Us(s){return or[s]}function Sc(s){return s>=29&&s<=33}function Mi(s){return s>=129&&s<=131}function Ac(s){return s>=90&&s<=92}function cr(s){return s>=58&&s<=92}function Ic(s){return s>=39&&s<=59}function Fc(s){return s===34}function kc(s){return lr[s]}function Nc(s){return s>=121&&s<=123}function Mc(s){return s>=124&&s<=130}function Xe(s){return rr[s]}function An(s){return ir[s]}function Lc(s){return s===57}function kn(s){return s>=24&&s<=25}function je(s){return Ve[s]}Ve[8].updateContext=s=>{s.pop()},Ve[5].updateContext=Ve[7].updateContext=Ve[23].updateContext=s=>{s.push(j.brace)},Ve[22].updateContext=s=>{s[s.length-1]===j.template?s.pop():s.push(j.template)},Ve[143].updateContext=s=>{s.push(j.j_expr,j.j_oTag)};var pr="\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",Gi="\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",Oc=new RegExp("["+pr+"]"),Bc=new RegExp("["+pr+Gi+"]");pr=Gi=null;var Wi=[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],Uc=[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 _s(s,n){let e=65536;for(let t=0,r=n.length;t<r;t+=2){if(e+=n[t],e>s)return!1;if(e+=n[t+1],e>=s)return!0}return!1}function ze(s){return s<65?s===36:s<=90?!0:s<97?s===95:s<=122?!0:s<=65535?s>=170&&Oc.test(String.fromCharCode(s)):_s(s,Wi)}function bt(s){return s<48?s===36:s<58?!0:s<65?!1:s<=90?!0:s<97?s===95:s<=122?!0:s<=65535?s>=170&&Bc.test(String.fromCharCode(s)):_s(s,Wi)||_s(s,Uc)}var ur={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"]},_c=new Set(ur.keyword),Rc=new Set(ur.strict),jc=new Set(ur.strictBind);function qi(s,n){return n&&s==="await"||s==="enum"}function Ki(s,n){return qi(s,n)||Rc.has(s)}function Ji(s){return jc.has(s)}function Xi(s,n){return Ki(s,n)||Ji(s)}function Vc(s){return _c.has(s)}function zc(s,n,e){return s===64&&n===64&&ze(e)}var $c=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 Hc(s){return $c.has(s)}var Wt=class{constructor(n){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=n}},qt=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 Wt(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 r=this.currentScope();if(e&8||e&16){this.checkRedeclarationInScope(r,n,e,t);let i=r.names.get(n)||0;e&16?i=i|4:(r.firstLexicalName||(r.firstLexicalName=n),i=i|2),r.names.set(n,i),e&8&&this.maybeExportDefined(r,n)}else if(e&4)for(let i=this.scopeStack.length-1;i>=0&&(r=this.scopeStack[i],this.checkRedeclarationInScope(r,n,e,t),r.names.set(n,(r.names.get(n)||0)|1),this.maybeExportDefined(r,n),!(r.flags&387));--i);this.parser.inModule&&r.flags&1&&this.undefinedExports.delete(n)}maybeExportDefined(n,e){this.parser.inModule&&n.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(n,e,t,r){this.isRedeclaredInScope(n,e,t)&&this.parser.raise(g.VarRedeclaration,r,{identifierName:e})}isRedeclaredInScope(n,e,t){if(!(t&1))return!1;if(t&8)return n.names.has(e);let r=n.names.get(e);return t&16?(r&2)>0||!this.treatFunctionsAsVarInScope(n)&&(r&1)>0:(r&2)>0&&!(n.flags&8&&n.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(n)&&(r&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}}},Rs=class extends Wt{constructor(...n){super(...n),this.declareFunctions=new Set}},js=class extends qt{createScope(n){return new Rs(n)}declareName(n,e,t){let r=this.currentScope();if(e&2048){this.checkRedeclarationInScope(r,n,e,t),this.maybeExportDefined(r,n),r.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 r=n.names.get(e);return(r&4)>0||(r&2)>0}return!1}checkLocalExport(n){this.scopeStack[0].declareFunctions.has(n.name)||super.checkLocalExport(n)}},Vs=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 r=this.plugins.get(e);for(let i of Object.keys(t))if(r?.[i]!==t[i])return!1;return!0}}getPluginOption(n,e){var t;return(t=this.plugins.get(n))==null?void 0:t[e]}};function Yi(s,n){s.trailingComments===void 0?s.trailingComments=n:s.trailingComments.unshift(...n)}function Gc(s,n){s.leadingComments===void 0?s.leadingComments=n:s.leadingComments.unshift(...n)}function Kt(s,n){s.innerComments===void 0?s.innerComments=n:s.innerComments.unshift(...n)}function st(s,n,e){let t=null,r=n.length;for(;t===null&&r>0;)t=n[--r];t===null||t.start>e.start?Kt(s,e.comments):Yi(t,e.comments)}var zs=class extends Vs{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 r=t-1,i=e[r];i.start===n.end&&(i.leadingNode=n,r--);let{start:a}=n;for(;r>=0;r--){let o=e[r],l=o.end;if(l>a)o.containingNode=n,this.finalizeComment(o),e.splice(r,1);else{l===a&&(o.trailingNode=n);break}}}finalizeComment(n){let{comments:e}=n;if(n.leadingNode!==null||n.trailingNode!==null)n.leadingNode!==null&&Yi(n.leadingNode,e),n.trailingNode!==null&&Gc(n.trailingNode,e);else{let{containingNode:t,start:r}=n;if(this.input.charCodeAt(this.offsetToSourcePos(r)-1)===44)switch(t.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":st(t,t.properties,n);break;case"CallExpression":case"OptionalCallExpression":st(t,t.arguments,n);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":st(t,t.params,n);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":st(t,t.elements,n);break;case"ExportNamedDeclaration":case"ImportDeclaration":st(t,t.specifiers,n);break;case"TSEnumDeclaration":st(t,t.members,n);break;case"TSEnumBody":st(t,t.members,n);break;default:Kt(t,e)}else Kt(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 r=e[t-1];r.leadingNode===n&&(r.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:r}=this.state,i=r.length;if(i===0)return;let a=i-1;for(;a>=0;a--){let o=r[a],l=o.end;if(o.start===t)o.leadingNode=n;else if(l===e)o.trailingNode=n;else if(l<e)break}}},Wc=/\r\n|[\r\n\u2028\u2029]/,Dn=new RegExp(Wc.source,"g");function gt(s){switch(s){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function Li(s,n,e){for(let t=n;t<e;t++)if(gt(s.charCodeAt(t)))return!0;return!1}var Ms=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ls=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function qc(s){switch(s){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 $s=class s{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=[j.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:r,startColumn:i}){this.strict=n===!1?!1:n===!0?!0:e==="module",this.startIndex=t,this.curLine=r,this.lineStart=-i,this.startLoc=this.endLoc=new Oe(r,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 Oe(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let n=new s;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}},Kc=function(n){return n>=48&&n<=57},Oi={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},En={bin:s=>s===48||s===49,oct:s=>s>=48&&s<=55,dec:s=>s>=48&&s<=57,hex:s=>s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102};function Bi(s,n,e,t,r,i){let a=e,o=t,l=r,c="",p=null,u=e,{length:d}=n;for(;;){if(e>=d){i.unterminated(a,o,l),c+=n.slice(u,e);break}let m=n.charCodeAt(e);if(Jc(s,m,n,e)){c+=n.slice(u,e);break}if(m===92){c+=n.slice(u,e);let f=Xc(n,e,t,r,s==="template",i);f.ch===null&&!p?p={pos:e,lineStart:t,curLine:r}:c+=f.ch,{pos:e,lineStart:t,curLine:r}=f,u=e}else m===8232||m===8233?(++e,++r,t=e):m===10||m===13?s==="template"?(c+=n.slice(u,e)+`
|
|
4
|
+
- Did you mean \`import { "${s}" 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:s})=>`Expected number in radix ${s}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:s})=>`Escape sequence in keyword ${s}.`,InvalidIdentifier:({identifierName:s})=>`Invalid identifier ${s}.`,InvalidLhs:({ancestor:s})=>`Invalid left-hand side in ${Sn(s)}.`,InvalidLhsBinding:({ancestor:s})=>`Binding invalid left-hand side in ${Sn(s)}.`,InvalidLhsOptionalChaining:({ancestor:s})=>`Invalid optional chaining in the left-hand side of ${Sn(s)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:s})=>`Unexpected character '${s}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:s})=>`Private name #${s} 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:s})=>`Label '${s}' 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:s})=>`This experimental syntax requires enabling the parser plugin: ${s.map(n=>JSON.stringify(n)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:s})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${s.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:s})=>`Duplicate key "${s}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:s})=>`An export name cannot include a lone surrogate, found '\\u${s.toString(16)}'.`,ModuleExportUndefined:({localName:s})=>`Export '${s}' 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:s})=>`Private names are only allowed in property accesses (\`obj.#${s}\`) or in \`in\` expressions (\`#${s} in obj\`).`,PrivateNameRedeclaration:({identifierName:s})=>`Duplicate private name #${s}.`,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:s})=>`Unexpected keyword '${s}'.`,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:s})=>`Unexpected reserved word '${s}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:s,unexpected:n})=>`Unexpected token${n?` '${n}'.`:""}${s?`, expected "${s}"`:""}`,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:s,onlyValidPropertyName:n})=>`The only valid meta property for ${s} is ${s}.${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:s})=>`Identifier '${s}' 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."},mc={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:s})=>`Assigning to '${s}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:s})=>`Binding '${s}' 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."},hc=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),bc=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:s})=>`Invalid topic token ${s}. In order to use ${s} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${s}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:s})=>`Hack-style pipe body cannot be an unparenthesized ${Sn({type:s})}; 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.'}),gc=["message"];function ki(s,n,e){Object.defineProperty(s,n,{enumerable:!1,configurable:!0,value:e})}function yc({toMessage:s,code:n,reasonCode:e,syntaxPlugin:t}){let r=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(a,o){let l=new SyntaxError;return l.code=n,l.reasonCode=e,l.loc=a,l.pos=a.index,l.syntaxPlugin=t,r&&(l.missingPlugin=o.missingPlugin),ki(l,"clone",function(p={}){var u;let{line:d,column:m,index:f}=(u=p.loc)!=null?u:a;return i(new Oe(d,m,f),Object.assign({},o,p.details))}),ki(l,"details",o),Object.defineProperty(l,"message",{configurable:!0,get(){let c=`${s(o)} (${a.line}:${a.column})`;return this.message=c,c},set(c){Object.defineProperty(this,"message",{value:c,writable:!0})}}),l}}function $e(s,n){if(Array.isArray(s))return t=>$e(t,s[0]);let e={};for(let t of Object.keys(s)){let r=s[t],i=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,{message:a}=i,o=uc(i,gc),l=typeof a=="string"?()=>a:a;e[t]=yc(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:t,toMessage:l},n?{syntaxPlugin:n}:{},o))}return e}var g=Object.assign({},$e(dc),$e(fc),$e(mc),$e`pipelineOperator`(bc));function vc(){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 xc(s){let n=vc();if(s==null)return n;if(s.annexB!=null&&s.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let e of Object.keys(n))s[e]!=null&&(n[e]=s[e]);if(n.startLine===1)s.startIndex==null&&n.startColumn>0?n.startIndex=n.startColumn:s.startColumn==null&&n.startIndex>0&&(n.startColumn=n.startIndex);else if((s.startColumn==null||s.startIndex==null)&&s.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");return n}var{defineProperty:Pc}=Object,Ni=(s,n)=>{s&&Pc(s,n,{enumerable:!1,value:s[n]})};function Vt(s){return Ni(s.loc.start,"index"),Ni(s.loc.end,"index"),s}var Cc=s=>class extends s{parse(){let e=Vt(super.parse());return this.optionFlags&128&&(e.tokens=e.tokens.map(Vt)),e}parseRegExpLiteral({pattern:e,flags:t}){let r=null;try{r=new RegExp(e,t)}catch{}let i=this.estreeParseLiteral(r);return i.regex={pattern:e,flags:t},i}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}let r=this.estreeParseLiteral(t);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){let r=this.estreeParseLiteral(null);return r.decimal=String(r.value||e),r}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 r=e;return r.type="ExpressionStatement",r.expression=t,r.directive=t.extra.rawValue,delete t.extra,r}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,r,i,a){super.parseBlockBody(e,t,r,i,a);let o=e.directives.map(l=>this.directiveToStmt(l));e.body=o.concat(e.body),delete e.directives}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let t=super.getPrivateNameSV(e);return 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 r=super.parseLiteral(e,t);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,t,r=!1){super.parseFunctionBody(e,t,r),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,t,r,i,a,o,l=!1){let c=this.startNode();c.kind=e.kind,c=super.parseMethod(c,t,r,i,a,o,l),c.type="FunctionExpression",delete c.kind,e.value=c;let{typeParameters:p}=e;return p&&(delete e.typeParameters,c.typeParameters=p,this.resetStartLocationFromNode(c,p)),o==="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,r,i,a){let o=super.parseObjectMethod(e,t,r,i,a);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(e,t,r,i){let a=super.parseObjectProperty(e,t,r,i);return a&&(a.kind="init",a.type="Property"),a}isValidLVal(e,t,r){return e==="Property"?"value":super.isValidLVal(e,t,r)}isAssignable(e,t){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(e!=null&&this.isObjectProperty(e)){let{key:r,value:i}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(i,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,r){e.type==="Property"&&(e.kind==="get"||e.kind==="set")?this.raise(g.PatternHasAccessor,e.key):e.type==="Property"&&e.method?this.raise(g.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,t,r)}finishCallExpression(e,t){let r=super.finishCallExpression(e,t);if(r.callee.type==="Import"){var i,a;r.type="ImportExpression",r.source=r.arguments[0],r.options=(i=r.arguments[1])!=null?i:null,r.attributes=(a=r.arguments[1])!=null?a:null,delete r.arguments,delete r.callee}return r}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,t){let r=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 a;let{declaration:o}=i;o?.type==="ClassDeclaration"&&((a=o.decorators)==null?void 0:a.length)>0&&o.start===i.start&&this.resetStartLocation(i,r)}break}return i}parseSubscript(e,t,r,i){let a=super.parseSubscript(e,t,r,i);if(i.optionalChainMember){if((a.type==="OptionalMemberExpression"||a.type==="OptionalCallExpression")&&(a.type=a.type.substring(8)),i.stop){let o=this.startNodeAtNode(a);return o.expression=a,this.finishNode(o,"ChainExpression")}}else(a.type==="MemberExpression"||a.type==="CallExpression")&&(a.optional=!1);return a}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.type==="Property"&&(e.method||e.kind==="get"||e.kind==="set")}finishNodeAt(e,t,r){return Vt(super.finishNodeAt(e,t,r))}resetStartLocation(e,t){super.resetStartLocation(e,t),Vt(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),Vt(e)}},it=class{constructor(n,e){this.token=void 0,this.preserveSpace=void 0,this.token=n,this.preserveSpace=!!e}},j={brace:new it("{"),j_oTag:new it("<tag"),j_cTag:new it("</tag"),j_expr:new it("<tag>...</tag>",!0)};j.template=new it("`",!0);var _=!0,S=!0,Ns=!0,zt=!0,Ke=!0,wc=!0,Fn=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}},sr=new Map;function R(s,n={}){n.keyword=s;let e=N(s,n);return sr.set(s,e),e}function ae(s,n){return N(s,{beforeExpr:_,binop:n})}var Gt=-1,Ve=[],rr=[],ir=[],ar=[],or=[],lr=[];function N(s,n={}){var e,t,r,i;return++Gt,rr.push(s),ir.push((e=n.binop)!=null?e:-1),ar.push((t=n.beforeExpr)!=null?t:!1),or.push((r=n.startsExpr)!=null?r:!1),lr.push((i=n.prefix)!=null?i:!1),Ve.push(new Fn(s,n)),Gt}function U(s,n={}){var e,t,r,i;return++Gt,sr.set(s,Gt),rr.push(s),ir.push((e=n.binop)!=null?e:-1),ar.push((t=n.beforeExpr)!=null?t:!1),or.push((r=n.startsExpr)!=null?r:!1),lr.push((i=n.prefix)!=null?i:!1),Ve.push(new Fn("name",n)),Gt}var Tc={bracketL:N("[",{beforeExpr:_,startsExpr:S}),bracketHashL:N("#[",{beforeExpr:_,startsExpr:S}),bracketBarL:N("[|",{beforeExpr:_,startsExpr:S}),bracketR:N("]"),bracketBarR:N("|]"),braceL:N("{",{beforeExpr:_,startsExpr:S}),braceBarL:N("{|",{beforeExpr:_,startsExpr:S}),braceHashL:N("#{",{beforeExpr:_,startsExpr:S}),braceR:N("}"),braceBarR:N("|}"),parenL:N("(",{beforeExpr:_,startsExpr:S}),parenR:N(")"),comma:N(",",{beforeExpr:_}),semi:N(";",{beforeExpr:_}),colon:N(":",{beforeExpr:_}),doubleColon:N("::",{beforeExpr:_}),dot:N("."),question:N("?",{beforeExpr:_}),questionDot:N("?."),arrow:N("=>",{beforeExpr:_}),template:N("template"),ellipsis:N("...",{beforeExpr:_}),backQuote:N("`",{startsExpr:S}),dollarBraceL:N("${",{beforeExpr:_,startsExpr:S}),templateTail:N("...`",{startsExpr:S}),templateNonTail:N("...${",{beforeExpr:_,startsExpr:S}),at:N("@"),hash:N("#",{startsExpr:S}),interpreterDirective:N("#!..."),eq:N("=",{beforeExpr:_,isAssign:zt}),assign:N("_=",{beforeExpr:_,isAssign:zt}),slashAssign:N("_=",{beforeExpr:_,isAssign:zt}),xorAssign:N("_=",{beforeExpr:_,isAssign:zt}),moduloAssign:N("_=",{beforeExpr:_,isAssign:zt}),incDec:N("++/--",{prefix:Ke,postfix:wc,startsExpr:S}),bang:N("!",{beforeExpr:_,prefix:Ke,startsExpr:S}),tilde:N("~",{beforeExpr:_,prefix:Ke,startsExpr:S}),doubleCaret:N("^^",{startsExpr:S}),doubleAt:N("@@",{startsExpr:S}),pipeline:ae("|>",0),nullishCoalescing:ae("??",1),logicalOR:ae("||",1),logicalAND:ae("&&",2),bitwiseOR:ae("|",3),bitwiseXOR:ae("^",4),bitwiseAND:ae("&",5),equality:ae("==/!=/===/!==",6),lt:ae("</>/<=/>=",7),gt:ae("</>/<=/>=",7),relational:ae("</>/<=/>=",7),bitShift:ae("<</>>/>>>",8),bitShiftL:ae("<</>>/>>>",8),bitShiftR:ae("<</>>/>>>",8),plusMin:N("+/-",{beforeExpr:_,binop:9,prefix:Ke,startsExpr:S}),modulo:N("%",{binop:10,startsExpr:S}),star:N("*",{binop:10}),slash:ae("/",10),exponent:N("**",{beforeExpr:_,binop:11,rightAssociative:!0}),_in:R("in",{beforeExpr:_,binop:7}),_instanceof:R("instanceof",{beforeExpr:_,binop:7}),_break:R("break"),_case:R("case",{beforeExpr:_}),_catch:R("catch"),_continue:R("continue"),_debugger:R("debugger"),_default:R("default",{beforeExpr:_}),_else:R("else",{beforeExpr:_}),_finally:R("finally"),_function:R("function",{startsExpr:S}),_if:R("if"),_return:R("return",{beforeExpr:_}),_switch:R("switch"),_throw:R("throw",{beforeExpr:_,prefix:Ke,startsExpr:S}),_try:R("try"),_var:R("var"),_const:R("const"),_with:R("with"),_new:R("new",{beforeExpr:_,startsExpr:S}),_this:R("this",{startsExpr:S}),_super:R("super",{startsExpr:S}),_class:R("class",{startsExpr:S}),_extends:R("extends",{beforeExpr:_}),_export:R("export"),_import:R("import",{startsExpr:S}),_null:R("null",{startsExpr:S}),_true:R("true",{startsExpr:S}),_false:R("false",{startsExpr:S}),_typeof:R("typeof",{beforeExpr:_,prefix:Ke,startsExpr:S}),_void:R("void",{beforeExpr:_,prefix:Ke,startsExpr:S}),_delete:R("delete",{beforeExpr:_,prefix:Ke,startsExpr:S}),_do:R("do",{isLoop:Ns,beforeExpr:_}),_for:R("for",{isLoop:Ns}),_while:R("while",{isLoop:Ns}),_as:U("as",{startsExpr:S}),_assert:U("assert",{startsExpr:S}),_async:U("async",{startsExpr:S}),_await:U("await",{startsExpr:S}),_defer:U("defer",{startsExpr:S}),_from:U("from",{startsExpr:S}),_get:U("get",{startsExpr:S}),_let:U("let",{startsExpr:S}),_meta:U("meta",{startsExpr:S}),_of:U("of",{startsExpr:S}),_sent:U("sent",{startsExpr:S}),_set:U("set",{startsExpr:S}),_source:U("source",{startsExpr:S}),_static:U("static",{startsExpr:S}),_using:U("using",{startsExpr:S}),_yield:U("yield",{startsExpr:S}),_asserts:U("asserts",{startsExpr:S}),_checks:U("checks",{startsExpr:S}),_exports:U("exports",{startsExpr:S}),_global:U("global",{startsExpr:S}),_implements:U("implements",{startsExpr:S}),_intrinsic:U("intrinsic",{startsExpr:S}),_infer:U("infer",{startsExpr:S}),_is:U("is",{startsExpr:S}),_mixins:U("mixins",{startsExpr:S}),_proto:U("proto",{startsExpr:S}),_require:U("require",{startsExpr:S}),_satisfies:U("satisfies",{startsExpr:S}),_keyof:U("keyof",{startsExpr:S}),_readonly:U("readonly",{startsExpr:S}),_unique:U("unique",{startsExpr:S}),_abstract:U("abstract",{startsExpr:S}),_declare:U("declare",{startsExpr:S}),_enum:U("enum",{startsExpr:S}),_module:U("module",{startsExpr:S}),_namespace:U("namespace",{startsExpr:S}),_interface:U("interface",{startsExpr:S}),_type:U("type",{startsExpr:S}),_opaque:U("opaque",{startsExpr:S}),name:N("name",{startsExpr:S}),placeholder:N("%%",{startsExpr:!0}),string:N("string",{startsExpr:S}),num:N("num",{startsExpr:S}),bigint:N("bigint",{startsExpr:S}),decimal:N("decimal",{startsExpr:S}),regexp:N("regexp",{startsExpr:S}),privateName:N("#name",{startsExpr:S}),eof:N("eof"),jsxName:N("jsxName"),jsxText:N("jsxText",{beforeExpr:!0}),jsxTagStart:N("jsxTagStart",{startsExpr:!0}),jsxTagEnd:N("jsxTagEnd")};function V(s){return s>=93&&s<=133}function Dc(s){return s<=92}function Ee(s){return s>=58&&s<=133}function Hi(s){return s>=58&&s<=137}function Ec(s){return ar[s]}function Us(s){return or[s]}function Sc(s){return s>=29&&s<=33}function Mi(s){return s>=129&&s<=131}function Ac(s){return s>=90&&s<=92}function cr(s){return s>=58&&s<=92}function Ic(s){return s>=39&&s<=59}function Fc(s){return s===34}function kc(s){return lr[s]}function Nc(s){return s>=121&&s<=123}function Mc(s){return s>=124&&s<=130}function Xe(s){return rr[s]}function An(s){return ir[s]}function Lc(s){return s===57}function kn(s){return s>=24&&s<=25}function je(s){return Ve[s]}Ve[8].updateContext=s=>{s.pop()},Ve[5].updateContext=Ve[7].updateContext=Ve[23].updateContext=s=>{s.push(j.brace)},Ve[22].updateContext=s=>{s[s.length-1]===j.template?s.pop():s.push(j.template)},Ve[143].updateContext=s=>{s.push(j.j_expr,j.j_oTag)};var pr="\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",Gi="\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",Oc=new RegExp("["+pr+"]"),Bc=new RegExp("["+pr+Gi+"]");pr=Gi=null;var Wi=[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],Uc=[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 _s(s,n){let e=65536;for(let t=0,r=n.length;t<r;t+=2){if(e+=n[t],e>s)return!1;if(e+=n[t+1],e>=s)return!0}return!1}function ze(s){return s<65?s===36:s<=90?!0:s<97?s===95:s<=122?!0:s<=65535?s>=170&&Oc.test(String.fromCharCode(s)):_s(s,Wi)}function bt(s){return s<48?s===36:s<58?!0:s<65?!1:s<=90?!0:s<97?s===95:s<=122?!0:s<=65535?s>=170&&Bc.test(String.fromCharCode(s)):_s(s,Wi)||_s(s,Uc)}var ur={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"]},_c=new Set(ur.keyword),Rc=new Set(ur.strict),jc=new Set(ur.strictBind);function qi(s,n){return n&&s==="await"||s==="enum"}function Ki(s,n){return qi(s,n)||Rc.has(s)}function Ji(s){return jc.has(s)}function Xi(s,n){return Ki(s,n)||Ji(s)}function Vc(s){return _c.has(s)}function zc(s,n,e){return s===64&&n===64&&ze(e)}var $c=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 Hc(s){return $c.has(s)}var Wt=class{constructor(n){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=n}},qt=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 Wt(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 r=this.currentScope();if(e&8||e&16){this.checkRedeclarationInScope(r,n,e,t);let i=r.names.get(n)||0;e&16?i=i|4:(r.firstLexicalName||(r.firstLexicalName=n),i=i|2),r.names.set(n,i),e&8&&this.maybeExportDefined(r,n)}else if(e&4)for(let i=this.scopeStack.length-1;i>=0&&(r=this.scopeStack[i],this.checkRedeclarationInScope(r,n,e,t),r.names.set(n,(r.names.get(n)||0)|1),this.maybeExportDefined(r,n),!(r.flags&387));--i);this.parser.inModule&&r.flags&1&&this.undefinedExports.delete(n)}maybeExportDefined(n,e){this.parser.inModule&&n.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(n,e,t,r){this.isRedeclaredInScope(n,e,t)&&this.parser.raise(g.VarRedeclaration,r,{identifierName:e})}isRedeclaredInScope(n,e,t){if(!(t&1))return!1;if(t&8)return n.names.has(e);let r=n.names.get(e);return t&16?(r&2)>0||!this.treatFunctionsAsVarInScope(n)&&(r&1)>0:(r&2)>0&&!(n.flags&8&&n.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(n)&&(r&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}}},Rs=class extends Wt{constructor(...n){super(...n),this.declareFunctions=new Set}},js=class extends qt{createScope(n){return new Rs(n)}declareName(n,e,t){let r=this.currentScope();if(e&2048){this.checkRedeclarationInScope(r,n,e,t),this.maybeExportDefined(r,n),r.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 r=n.names.get(e);return(r&4)>0||(r&2)>0}return!1}checkLocalExport(n){this.scopeStack[0].declareFunctions.has(n.name)||super.checkLocalExport(n)}},Vs=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 r=this.plugins.get(e);for(let i of Object.keys(t))if(r?.[i]!==t[i])return!1;return!0}}getPluginOption(n,e){var t;return(t=this.plugins.get(n))==null?void 0:t[e]}};function Yi(s,n){s.trailingComments===void 0?s.trailingComments=n:s.trailingComments.unshift(...n)}function Gc(s,n){s.leadingComments===void 0?s.leadingComments=n:s.leadingComments.unshift(...n)}function Kt(s,n){s.innerComments===void 0?s.innerComments=n:s.innerComments.unshift(...n)}function st(s,n,e){let t=null,r=n.length;for(;t===null&&r>0;)t=n[--r];t===null||t.start>e.start?Kt(s,e.comments):Yi(t,e.comments)}var zs=class extends Vs{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 r=t-1,i=e[r];i.start===n.end&&(i.leadingNode=n,r--);let{start:a}=n;for(;r>=0;r--){let o=e[r],l=o.end;if(l>a)o.containingNode=n,this.finalizeComment(o),e.splice(r,1);else{l===a&&(o.trailingNode=n);break}}}finalizeComment(n){let{comments:e}=n;if(n.leadingNode!==null||n.trailingNode!==null)n.leadingNode!==null&&Yi(n.leadingNode,e),n.trailingNode!==null&&Gc(n.trailingNode,e);else{let{containingNode:t,start:r}=n;if(this.input.charCodeAt(this.offsetToSourcePos(r)-1)===44)switch(t.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":st(t,t.properties,n);break;case"CallExpression":case"OptionalCallExpression":st(t,t.arguments,n);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":st(t,t.params,n);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":st(t,t.elements,n);break;case"ExportNamedDeclaration":case"ImportDeclaration":st(t,t.specifiers,n);break;case"TSEnumDeclaration":st(t,t.members,n);break;case"TSEnumBody":st(t,t.members,n);break;default:Kt(t,e)}else Kt(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 r=e[t-1];r.leadingNode===n&&(r.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:r}=this.state,i=r.length;if(i===0)return;let a=i-1;for(;a>=0;a--){let o=r[a],l=o.end;if(o.start===t)o.leadingNode=n;else if(l===e)o.trailingNode=n;else if(l<e)break}}},Wc=/\r\n|[\r\n\u2028\u2029]/,Dn=new RegExp(Wc.source,"g");function gt(s){switch(s){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function Li(s,n,e){for(let t=n;t<e;t++)if(gt(s.charCodeAt(t)))return!0;return!1}var Ms=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ls=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function qc(s){switch(s){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 $s=class s{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=[j.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:r,startColumn:i}){this.strict=n===!1?!1:n===!0?!0:e==="module",this.startIndex=t,this.curLine=r,this.lineStart=-i,this.startLoc=this.endLoc=new Oe(r,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 Oe(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let n=new s;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}},Kc=function(n){return n>=48&&n<=57},Oi={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},En={bin:s=>s===48||s===49,oct:s=>s>=48&&s<=55,dec:s=>s>=48&&s<=57,hex:s=>s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102};function Bi(s,n,e,t,r,i){let a=e,o=t,l=r,c="",p=null,u=e,{length:d}=n;for(;;){if(e>=d){i.unterminated(a,o,l),c+=n.slice(u,e);break}let m=n.charCodeAt(e);if(Jc(s,m,n,e)){c+=n.slice(u,e);break}if(m===92){c+=n.slice(u,e);let f=Xc(n,e,t,r,s==="template",i);f.ch===null&&!p?p={pos:e,lineStart:t,curLine:r}:c+=f.ch,{pos:e,lineStart:t,curLine:r}=f,u=e}else m===8232||m===8233?(++e,++r,t=e):m===10||m===13?s==="template"?(c+=n.slice(u,e)+`
|
|
5
5
|
`,++e,m===13&&n.charCodeAt(e)===10&&++e,++r,u=t=e):i.unterminated(a,o,l):++e}return{pos:e,str:c,firstInvalidLoc:p,lineStart:t,curLine:r,containsInvalid:!!p}}function Jc(s,n,e,t){return s==="template"?n===96||n===36&&e.charCodeAt(t+1)===123:n===(s==="double"?34:39)}function Xc(s,n,e,t,r,i){let a=!r;n++;let o=c=>({pos:n,ch:c,lineStart:e,curLine:t}),l=s.charCodeAt(n++);switch(l){case 110:return o(`
|
|
6
|
-
`);case 114:return o("\r");case 120:{let c;return{code:c,pos:n}=Hs(s,n,e,t,2,!1,a,i),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:n}=Zi(s,n,e,t,a,i),o(c===null?null:String.fromCodePoint(c))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:s.charCodeAt(n)===10&&++n;case 10:e=n,++t;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);i.strictNumericEscape(n-1,e,t);default:if(l>=48&&l<=55){let c=n-1,u=/^[0-7]+/.exec(s.slice(c,n+2))[0],d=parseInt(u,8);d>255&&(u=u.slice(0,-1),d=parseInt(u,8)),n+=u.length-1;let m=s.charCodeAt(n);if(u!=="0"||m===56||m===57){if(r)return o(null);i.strictNumericEscape(c,e,t)}return o(String.fromCharCode(d))}return o(String.fromCharCode(l))}}function Hs(s,n,e,t,r,i,a,o){let l=n,c;return{n:c,pos:n}=Qi(s,n,e,t,16,r,i,!1,o,!a),c===null&&(a?o.invalidEscapeSequence(l,e,t):n=l-1),{code:c,pos:n}}function Qi(s,n,e,t,r,i,a,o,l,c){let p=n,u=r===16?Oi.hex:Oi.decBinOct,d=r===16?En.hex:r===10?En.dec:r===8?En.oct:En.bin,m=!1,f=0;for(let b=0,h=i??1/0;b<h;++b){let y=s.charCodeAt(n),T;if(y===95&&o!=="bail"){let k=s.charCodeAt(n-1),x=s.charCodeAt(n+1);if(o){if(Number.isNaN(x)||!d(x)||u.has(k)||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?T=y-97+10:y>=65?T=y-65+10:Kc(y)?T=y-48:T=1/0,T>=r){if(T<=9&&c)return{n:null,pos:n};if(T<=9&&l.invalidDigit(n,e,t,r))T=0;else if(a)T=0,m=!0;else break}++n,f=f*r+T}return n===p||i!=null&&n-p!==i||m?{n:null,pos:n}:{n:f,pos:n}}function Zi(s,n,e,t,r,i){let a=s.charCodeAt(n),o;if(a===123){if(++n,{code:o,pos:n}=Hs(s,n,e,t,s.indexOf("}",n)-n,!0,r,i),++n,o!==null&&o>1114111)if(r)i.invalidCodePoint(n,e,t);else return{code:null,pos:n}}else({code:o,pos:n}=Hs(s,n,e,t,4,!1,r,i));return{code:o,pos:n}}function $t(s,n,e){return new Oe(e,s-n,s)}var Yc=new Set([103,109,115,105,121,117,100,118]),Le=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 vt(n.startLoc,n.endLoc)}},Gs=class extends zs{constructor(n,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(t,r,i,a)=>this.optionFlags&1024?(this.raise(g.InvalidDigit,$t(t,r,i),{radix:a}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(g.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(g.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(g.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(g.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(t,r,i)=>{this.recordStrictModeErrors(g.StrictNumericEscape,$t(t,r,i))},unterminated:(t,r,i)=>{throw this.raise(g.UnterminatedString,$t(t-1,r,i))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(g.StrictNumericEscape),unterminated:(t,r,i)=>{throw this.raise(g.UnterminatedTemplate,$t(t,r,i))}}),this.state=new $s,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.optionFlags&128&&this.pushToken(new Le(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 Ms.lastIndex=n,Ms.test(this.input)?Ms.lastIndex:n}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(n){return Ls.lastIndex=n,Ls.test(this.input)?Ls.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,r=this.input.indexOf(n,t+2);if(r===-1)throw this.raise(g.UnterminatedComment,this.state.curPosition());for(this.state.pos=r+n.length,Dn.lastIndex=t+2;Dn.test(this.input)&&Dn.lastIndex<=r;)++this.state.curLine,this.state.lineStart=Dn.lastIndex;if(this.isLookahead)return;let i={type:"CommentBlock",value:this.input.slice(t+2,r),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(r+n.length),loc:new vt(e,this.state.curPosition())};return this.optionFlags&128&&this.pushToken(i),i}skipLineComment(n){let e=this.state.pos,t;this.isLookahead||(t=this.state.curPosition());let r=this.input.charCodeAt(this.state.pos+=n);if(this.state.pos<this.length)for(;!gt(r)&&++this.state.pos<this.length;)r=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let i=this.state.pos,o={type:"CommentLine",value:this.input.slice(e+n,i),start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(i),loc:new vt(t,this.state.curPosition())};return this.optionFlags&128&&this.pushToken(o),o}skipSpace(){let n=this.state.pos,e=this.optionFlags&2048?[]:null;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 r=this.skipBlockComment("*/");r!==void 0&&(this.addComment(r),e?.push(r));break}case 47:{let r=this.skipLineComment(2);r!==void 0&&(this.addComment(r),e?.push(r));break}default:break e}break;default:if(qc(t))++this.state.pos;else if(t===45&&!this.inModule&&this.optionFlags&4096){let r=this.state.pos;if(this.input.charCodeAt(r+1)===45&&this.input.charCodeAt(r+2)===62&&(n===0||this.state.lineStart>n)){let i=this.skipLineComment(3);i!==void 0&&(this.addComment(i),e?.push(i))}else break e}else if(t===60&&!this.inModule&&this.optionFlags&4096){let r=this.state.pos;if(this.input.charCodeAt(r+1)===33&&this.input.charCodeAt(r+2)===45&&this.input.charCodeAt(r+3)===45){let i=this.skipLineComment(4);i!==void 0&&(this.addComment(i),e?.push(i))}else break e}else break e}}if(e?.length>0){let t=this.state.pos,r={start:this.sourceToOffsetPos(n),end:this.sourceToOffsetPos(t),comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}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(g.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?g.RecordExpressionHashIncorrectStartSyntaxType:g.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else ze(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;!gt(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,r=this.input.charCodeAt(this.state.pos+1);n===42&&r===42&&(t++,r=this.input.charCodeAt(this.state.pos+2),e=57),r===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(g.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(g.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(g.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(g.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(ze(n)){this.readWord(n);return}}throw this.raise(g.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,r,{pos:i}=this.state;for(;;++i){if(i>=this.length)throw this.raise(g.UnterminatedRegExp,oe(n,1));let c=this.input.charCodeAt(i);if(gt(c))throw this.raise(g.UnterminatedRegExp,oe(n,1));if(t)t=!1;else{if(c===91)r=!0;else if(c===93&&r)r=!1;else if(c===47&&!r)break;t=c===92}}let a=this.input.slice(e,i);++i;let o="",l=()=>oe(n,i+2-e);for(;i<this.length;){let c=this.codePointAtPos(i),p=String.fromCharCode(c);if(Yc.has(c))c===118?o.includes("u")&&this.raise(g.IncompatibleRegExpUVFlags,l()):c===117&&o.includes("v")&&this.raise(g.IncompatibleRegExpUVFlags,l()),o.includes(p)&&this.raise(g.DuplicateRegExpFlags,l());else if(bt(c)||c===92)this.raise(g.MalformedRegExpFlags,l());else break;++i,o+=p}this.state.pos=i,this.finishToken(138,{pattern:a,flags:o})}readInt(n,e,t=!1,r=!0){let{n:i,pos:a}=Qi(this.input,this.state.pos,this.state.lineStart,this.state.curLine,n,e,t,r,this.errorHandlers_readInt,!1);return this.state.pos=a,i}readRadixNumber(n){let e=this.state.pos,t=this.state.curPosition(),r=!1;this.state.pos+=2;let i=this.readInt(n);i==null&&this.raise(g.InvalidDigit,oe(t,2),{radix:n});let a=this.input.charCodeAt(this.state.pos);if(a===110)++this.state.pos,r=!0;else if(a===109)throw this.raise(g.InvalidDecimal,t);if(ze(this.codePointAtPos(this.state.pos)))throw this.raise(g.NumberIdentifier,this.state.curPosition());if(r){let o=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,o);return}this.finishToken(135,i)}readNumber(n){let e=this.state.pos,t=this.state.curPosition(),r=!1,i=!1,a=!1,o=!1;!n&&this.readInt(10)===null&&this.raise(g.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(g.StrictOctalLiteral,t),!this.state.strict){let f=m.indexOf("_");f>0&&this.raise(g.ZeroDigitNumericSeparator,oe(t,f))}o=l&&!/[89]/.test(m)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!o&&(++this.state.pos,this.readInt(10),r=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!o&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(g.InvalidOrMissingExponent,t),r=!0,a=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((r||l)&&this.raise(g.InvalidBigIntLiteral,t),++this.state.pos,i=!0),c===109){this.expectPlugin("decimal",this.state.curPosition()),(a||l)&&this.raise(g.InvalidDecimal,t),++this.state.pos;var p=!0}if(ze(this.codePointAtPos(this.state.pos)))throw this.raise(g.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 d=o?parseInt(u,8):parseFloat(u);this.finishToken(135,d)}readCodePoint(n){let{code:e,pos:t}=Zi(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:r,lineStart:i}=Bi(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=r,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:r,curLine:i,lineStart:a}=Bi("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=r+1,this.state.lineStart=a,this.state.curLine=i,t&&(this.state.firstInvalidTemplateEscapePos=new Oe(t.curLine,t.pos-t.lineStart,this.sourceToOffsetPos(t.pos))),this.input.codePointAt(r)===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,r=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(bt(i))this.state.pos+=i<=65535?1:2;else if(i===92){this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);let a=this.state.curPosition(),o=this.state.pos===t?ze:bt;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(g.MissingUnicodeEscape,this.state.curPosition()),r=this.state.pos-1;continue}++this.state.pos;let l=this.readCodePoint(!0);l!==null&&(o(l)||this.raise(g.EscapedCharNotAnIdentifier,a),e+=String.fromCodePoint(l)),r=this.state.pos}else break}return e+this.input.slice(r,this.state.pos)}readWord(n){let e=this.readWord1(n),t=sr.get(e);t!==void 0?this.finishToken(t,Xe(t)):this.finishToken(132,e)}checkKeywordEscapes(){let{type:n}=this.state;cr(n)&&this.state.containsEsc&&this.raise(g.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Xe(n)})}raise(n,e,t={}){let r=e instanceof Oe?e:e.loc.start,i=n(r,t);if(!(this.optionFlags&1024))throw i;return this.isLookahead||this.state.errors.push(i),i}raiseOverwrite(n,e,t={}){let r=e instanceof Oe?e:e.loc.start,i=r.index,a=this.state.errors;for(let o=a.length-1;o>=0;o--){let l=a[o];if(l.loc.index===i)return a[o]=n(r,t);if(l.loc.index<i)break}return this.raise(n,e,t)}updateContext(n){}unexpected(n,e){throw this.raise(g.UnexpectedToken,n??this.state.startLoc,{expected:e?Xe(e):null})}expectPlugin(n,e){if(this.hasPlugin(n))return!0;throw this.raise(g.MissingPlugin,e??this.state.startLoc,{missingPlugin:[n]})}expectOnePlugin(n){if(!n.some(e=>this.hasPlugin(e)))throw this.raise(g.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:n})}errorBuilder(n){return(e,t,r)=>{this.raise(n,$t(e,t,r))}}},Ws=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},qs=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 Ws)}exit(){let n=this.stack.pop(),e=this.current();for(let[t,r]of Array.from(n.undefinedPrivateNames))e?e.undefinedPrivateNames.has(t)||e.undefinedPrivateNames.set(t,r):this.parser.raise(g.InvalidPrivateFieldResolution,r,{identifierName:t})}declarePrivateName(n,e,t){let{privateNames:r,loneAccessors:i,undefinedPrivateNames:a}=this.current(),o=r.has(n);if(e&3){let l=o&&i.get(n);if(l){let c=l&4,p=e&4,u=l&3,d=e&3;o=u===d||c!==p,o||i.delete(n)}else o||i.set(n,e)}o&&this.parser.raise(g.PrivateNameRedeclaration,t,{identifierName:n}),r.add(n),a.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(g.InvalidPrivateFieldResolution,e,{identifierName:n})}},xt=class{constructor(n=0){this.type=n}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},Nn=class extends xt{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)}},Ks=class{constructor(n){this.parser=void 0,this.stack=[new xt],this.parser=n}enter(n){this.stack.push(n)}exit(){this.stack.pop()}recordParameterInitializerError(n,e){let t=e.loc.start,{stack:r}=this,i=r.length-1,a=r[i];for(;!a.isCertainlyParameterDeclaration();){if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(n,t);else return;a=r[--i]}this.parser.raise(n,t)}recordArrowParameterBindingError(n,e){let{stack:t}=this,r=t[t.length-1],i=e.loc.start;if(r.isCertainlyParameterDeclaration())this.parser.raise(n,i);else if(r.canBeArrowParameterDeclaration())r.recordDeclarationError(n,i);else return}recordAsyncArrowParametersError(n){let{stack:e}=this,t=e.length-1,r=e[t];for(;r.canBeArrowParameterDeclaration();)r.type===2&&r.recordDeclarationError(g.AwaitBindingIdentifier,n),r=e[--t]}validateAsPattern(){let{stack:n}=this,e=n[n.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(([t,r])=>{this.parser.raise(t,r);let i=n.length-2,a=n[i];for(;a.canBeArrowParameterDeclaration();)a.clearDeclarationError(r.index),a=n[--i]})}};function Qc(){return new xt(3)}function Zc(){return new Nn(1)}function ep(){return new Nn(2)}function ea(){return new xt}var Js=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 In(s,n){return(s?2:0)|(n?1:0)}var Xs=class extends Gs{addExtra(n,e,t,r=!0){if(!n)return;let{extra:i}=n;i==null&&(i={},n.extra=i),r?i[e]=t:Object.defineProperty(i,e,{enumerable:r,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 r=this.input.charCodeAt(t);return!(bt(r)||(r&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 Li(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return Li(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(g.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 r=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:r,error:i.errors[e.errors.length],thrown:!1,aborted:!1,failState:i}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(r){let i=this.state;if(this.state=e,r instanceof SyntaxError)return{node:null,error:r,thrown:!0,aborted:!1,failState:i};if(r===t)return{node:t.node,error:null,thrown:!1,aborted:!0,failState:i};throw r}}checkExpressionErrors(n,e){if(!n)return!1;let{shorthandAssignLoc:t,doubleProtoLoc:r,privateKeyLoc:i,optionalParametersLoc:a}=n,o=!!t||!!r||!!a||!!i;if(!e)return o;t!=null&&this.raise(g.InvalidCoverInitializedName,t),r!=null&&this.raise(g.DuplicateProto,r),i!=null&&this.raise(g.UnexpectedPrivateField,i),a!=null&&this.unexpected(a)}isLiteralPropertyName(){return Hi(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 r=this.inModule;this.inModule=n;let i=this.scope,a=this.getScopeHandler();this.scope=new a(this,n);let o=this.prodParam;this.prodParam=new Js;let l=this.classScope;this.classScope=new qs(this);let c=this.expressionScope;return this.expressionScope=new Ks(this),()=>{this.state.labels=e,this.exportedIdentifiers=t,this.inModule=r,this.scope=i,this.prodParam=o,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)}},yt=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},Pt=class{constructor(n,e,t){this.type="",this.start=e,this.end=0,this.loc=new vt(t),n?.optionFlags&64&&(this.range=[e,0]),n!=null&&n.filename&&(this.loc.filename=n.filename)}},dr=Pt.prototype;dr.__clone=function(){let s=new Pt(void 0,this.start,this.loc.start),n=Object.keys(this);for(let e=0,t=n.length;e<t;e++){let r=n[e];r!=="leadingComments"&&r!=="trailingComments"&&r!=="innerComments"&&(s[r]=this[r])}return s};function tp(s){return He(s)}function He(s){let{type:n,start:e,end:t,loc:r,range:i,extra:a,name:o}=s,l=Object.create(dr);return l.type=n,l.start=e,l.end=t,l.loc=r,l.range=i,l.extra=a,l.name=o,n==="Placeholder"&&(l.expectedNode=s.expectedNode),l}function np(s){let{type:n,start:e,end:t,loc:r,range:i,extra:a}=s;if(n==="Placeholder")return tp(s);let o=Object.create(dr);return o.type=n,o.start=e,o.end=t,o.loc=r,o.range=i,s.raw!==void 0?o.raw=s.raw:o.extra=a,o.value=s.value,o}var Ys=class extends Xs{startNode(){let n=this.state.startLoc;return new Pt(this,n.index,n)}startNodeAt(n){return new Pt(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.optionFlags&64&&(n.range[1]=t.index),this.optionFlags&2048&&this.processComment(n),n}resetStartLocation(n,e){n.start=e.index,n.loc.start=e,this.optionFlags&64&&(n.range[0]=e.index)}resetEndLocation(n,e=this.state.lastTokEndLoc){n.end=e.index,n.loc.end=e,this.optionFlags&64&&(n.range[1]=e.index)}resetStartLocationFromNode(n,e){this.resetStartLocation(n,e.loc.start)}},sp=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),M=$e`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:s})=>`Cannot overwrite reserved type ${s}.`,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:s,enumName:n})=>`Boolean enum members need to be initialized. Use either \`${s} = true,\` or \`${s} = false,\` in enum \`${n}\`.`,EnumDuplicateMemberName:({memberName:s,enumName:n})=>`Enum member names need to be unique, but the name \`${s}\` has already been used before in enum \`${n}\`.`,EnumInconsistentMemberValues:({enumName:s})=>`Enum \`${s}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:s,enumName:n})=>`Enum type \`${s}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${n}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:s})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${s}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:s,memberName:n,explicitType:e})=>`Enum \`${s}\` has type \`${e}\`, so the initializer of \`${n}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:s,memberName:n})=>`Symbol enum members cannot be initialized. Use \`${n},\` in enum \`${s}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:s,memberName:n})=>`The enum member initializer for \`${n}\` needs to be a literal (either a boolean, number, or string) in enum \`${s}\`.`,EnumInvalidMemberName:({enumName:s,memberName:n,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${n}\`, consider using \`${e}\`, in enum \`${s}\`.`,EnumNumberMemberNotInitialized:({enumName:s,memberName:n})=>`Number enum members need to be initialized, e.g. \`${n} = 1\` in enum \`${s}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:s})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${s}\`.`,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:s})=>`Unexpected reserved type ${s}.`,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:s,suggestion:n})=>`\`declare export ${s}\` is not supported. Use \`${n}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function rp(s){return s.type==="DeclareExportAllDeclaration"||s.type==="DeclareExportDeclaration"&&(!s.declaration||s.declaration.type!=="TypeAlias"&&s.declaration.type!=="InterfaceDeclaration")}function Ui(s){return s.importKind==="type"||s.importKind==="typeof"}var ip={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function ap(s,n){let e=[],t=[];for(let r=0;r<s.length;r++)(n(s[r],r,s)?e:t).push(s[r]);return[e,t]}var op=/\*?\s*@((?:no)?flow)\b/,lp=s=>class extends s{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return js}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=op.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 r=this.flowParseType();return this.state.inType=t,r}flowParsePredicate(){let e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>t.index+1&&this.raise(M.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,r=null;return this.match(54)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(r=this.flowParsePredicate())),[t,r]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let t=e.id=this.parseIdentifier(),r=this.startNode(),i=this.startNode();this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(10);let a=this.flowParseFunctionTypeParams();return r.params=a.params,r.rest=a.rest,r.this=a._this,this.expect(11),[r.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),i.typeAnnotation=this.finishNode(r,"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(M.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(),r=t.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(M.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(o)):(this.expectContextual(125,M.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),r.push(o)}this.scope.exit(),this.expect(8),this.finishNode(t,"BlockStatement");let i=null,a=!1;return r.forEach(o=>{rp(o)?(i==="CommonJS"&&this.raise(M.AmbiguousDeclareModuleKind,o),i="ES"):o.type==="DeclareModuleExports"&&(a&&this.raise(M.DuplicateDeclareModuleExports,o),i==="ES"&&this.raise(M.AmbiguousDeclareModuleKind,o),i="CommonJS",a=!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 r=this.state.value;throw this.raise(M.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:r,suggestion:ip[r]})}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(M.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,t,r){sp.has(e)&&this.raise(r?M.AssignReservedType:M.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,r=this.startNode(),i=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return r.name=a.name,r.variance=i,r.bound=a.typeAnnotation,this.match(29)?(this.eat(29),r.default=this.flowParseType()):e&&this.raise(M.MissingTypeParamDefault,t),this.finishNode(r,"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 r=!1;do{let i=this.flowParseTypeParameter(r);t.params.push(i),i.default&&(r=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowInTopLevelContext(e){if(this.curContext()!==j.brace){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}else return e()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let e=this.startNode(),t=this.state.inType;return this.state.inType=!0,e.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let r=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=r}),this.state.inType=t,!this.state.inType&&this.curContext()===j.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return;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,r){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=r,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 r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:r,allowProto:i,allowInexact:a}){let o=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,f=null,b=null,h=this.startNode();if(i&&this.isContextual(118)){let T=this.lookahead();T.type!==14&&T.type!==17&&(this.next(),f=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let T=this.lookahead();T.type!==14&&T.type!==17&&(this.next(),m=!0)}let y=this.flowParseVariance();if(this.eat(0))f!=null&&this.unexpected(f),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))f!=null&&this.unexpected(f),y&&this.unexpected(y.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(h,m));else{let T="init";if(this.isContextual(99)||this.isContextual(104)){let x=this.lookahead();Hi(x.type)&&(T=this.state.value,this.next())}let k=this.flowParseObjectTypeProperty(h,m,f,y,T,r,a??!p);k===null?(u=!0,b=this.state.lastTokStartLoc):l.properties.push(k)}this.flowObjectTypeSemicolon(),b&&!this.match(8)&&!this.match(9)&&this.raise(M.UnexpectedExplicitInexactInObject,b)}this.expect(c),r&&(l.inexact=u);let d=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=o,d}flowParseObjectTypeProperty(e,t,r,i,a,o,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?l||this.raise(M.InexactInsideExact,this.state.lastTokStartLoc):this.raise(M.InexactInsideNonObject,this.state.lastTokStartLoc),i&&this.raise(M.InexactVariance,i),null):(o||this.raise(M.UnexpectedSpreadType,this.state.lastTokStartLoc),r!=null&&this.unexpected(r),i&&this.raise(M.SpreadVariance,i),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=r!=null,e.kind=a;let c=!1;return this.match(47)||this.match(10)?(e.method=!0,r!=null&&this.unexpected(r),i&&this.unexpected(i.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(a==="get"||a==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(M.ThisParamBannedInConstructor,e.value.this)):(a!=="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,r=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?M.GetterMayNotHaveThisParam:M.SetterMayNotHaveThisParam,e.value.this),r!==t&&this.raise(e.kind==="get"?g.BadGetterArity:g.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(g.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){var r;(r=e)!=null||(e=this.state.startLoc);let i=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let a=this.startNodeAt(e);a.qualification=i,a.id=this.flowParseRestrictedIdentifier(!0),i=this.finishNode(a,"QualifiedTypeIdentifier")}return i}flowParseGenericType(e,t){let r=this.startNodeAt(e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"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,r=!1,i=null,a=this.startNode(),o=this.lookahead(),l=this.state.type===78;return o.type===14||o.type===17?(l&&!e&&this.raise(M.ThisParamMustBeFirst,a),t=this.parseIdentifier(l),this.eat(17)&&(r=!0,l&&this.raise(M.ThisParamMayNotBeOptional,a)),i=this.flowParseTypeInitialiser()):i=this.flowParseType(),a.name=t,a.optional=r,a.typeAnnotation=i,this.finishNode(a,"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,r=null;for(this.match(78)&&(r=this.flowParseFunctionTypeParam(!0),r.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:r}}flowIdentToTypeAnnotation(e,t,r){switch(r.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(r.name),this.flowParseGenericType(e,r)}}flowParsePrimaryType(){let e=this.state.startLoc,t=this.startNode(),r,i,a=!1,o=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=o,i;case 47:{let l=this.startNode();return l.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),r=this.flowParseFunctionTypeParams(),l.params=r.params,l.rest=r.rest,l.this=r._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(V(this.state.type)||this.match(78)){let c=this.lookahead().type;a=c!==17&&c!==14}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),i;this.eat(12)}return i?r=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):r=this.flowParseFunctionTypeParams(),l.params=r.params,l.rest=r.rest,l.this=r._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(M.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(cr(this.state.type)){let l=Xe(this.state.type);return this.next(),super.createIdentifier(t,l)}else if(V(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(),r=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let i=this.startNodeAt(e),a=this.eat(18);r=r||a,this.expect(0),!a&&this.match(3)?(i.elementType=t,this.next(),t=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=t,i.indexType=this.flowParseType(),this.expect(3),r?(i.optional=a,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,r=!1){if(t){this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,r));return}super.parseFunctionBody(e,!1,r)}parseFunctionBodyAndFinish(e,t,r=!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,r)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let r=this.lookahead();if(Ee(r.type)){let i=this.startNode();return this.next(),this.flowParseInterface(i)}}else if(this.isContextual(126)){let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}let t=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(t)&&(this.flowPragma=null),t}parseExpressionStatement(e,t,r){if(t.type==="Identifier"){if(t.name==="declare"){if(this.match(80)||V(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(V(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,r)}shouldParseExportDeclaration(){let{type:e}=this.state;return e===126||Mi(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return e===126||Mi(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,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let d=this.lookaheadCharCode();if(d===44||d===61||d===58||d===41)return this.setOptionalParametersError(r),e}this.expect(17);let i=this.state.clone(),a=this.state.noArrowAt,o=this.startNodeAt(t),{consequent:l,failed:c}=this.tryParseConditionalConsequent(),[p,u]=this.getArrowLikeExpressions(l);if(c||u.length>0){let d=[...a];if(u.length>0){this.state=i,this.state.noArrowAt=d;for(let m=0;m<u.length;m++)d.push(u[m].start);({consequent:l,failed:c}=this.tryParseConditionalConsequent()),[p,u]=this.getArrowLikeExpressions(l)}c&&p.length>1&&this.raise(M.AmbiguousConditionalArrow,i.startLoc),c&&p.length===1&&(this.state=i,d.push(p[0].start),this.state.noArrowAt=d,{consequent:l,failed:c}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=a,this.expect(14),o.test=e,o.consequent=l,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"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 r=[e],i=[];for(;r.length!==0;){let a=r.pop();a.type==="ArrowFunctionExpression"&&a.body.type!=="BlockStatement"?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):i.push(a),r.push(a.body)):a.type==="ConditionalExpression"&&(r.push(a.consequent),r.push(a.alternate))}return t?(i.forEach(a=>this.finishArrowValidation(a)),[i,[]]):ap(i,a=>a.params.every(o=>this.isAssignable(o,!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 r;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),r=t(),this.state.noArrowParamsConversionAt.pop()):r=t(),r}parseParenItem(e,t){let r=super.parseParenItem(e,t);if(this.eat(17)&&(r.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(t);return i.expression=r,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return r}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,r=super.maybeParseExportNamespaceSpecifier(e);return r&&e.exportKind==="type"&&this.unexpected(t),r}parseClassId(e,t,r){super.parseClassId(e,t,r),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,r){let{startLoc:i}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,r),t.declare&&(t.type!=="ClassProperty"&&t.type!=="ClassPrivateProperty"&&t.type!=="PropertyDefinition"?this.raise(M.DeclareClassElement,i):t.value&&this.raise(M.DeclareClassFieldInitializer,t.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),t="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(g.InvalidIdentifier,this.state.curPosition(),{identifierName:t}),this.finishToken(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):zc(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,r){for(let i=0;i<e.length;i++){let a=e[i];a?.type==="TypeCastExpression"&&(e[i]=this.typeCastToParameter(a))}super.toAssignableList(e,t,r)}toReferencedList(e,t){for(let i=0;i<e.length;i++){var r;let a=e[i];a&&a.type==="TypeCastExpression"&&!((r=a.extra)!=null&&r.parenthesized)&&(e.length>1||!t)&&this.raise(M.TypeCastInPattern,a.typeAnnotation)}return e}parseArrayLike(e,t,r,i){let a=super.parseArrayLike(e,t,r,i);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(a.elements),a}isValidLVal(e,t,r){return e==="TypeCastExpression"||super.isValidLVal(e,t,r)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,r,i,a,o){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,r,i,a,o),t.params&&a){let l=t.params;l.length>0&&this.isThisParam(l[0])&&this.raise(M.ThisParamBannedInConstructor,t)}else if(t.type==="MethodDefinition"&&a&&t.value.params){let l=t.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(M.ThisParamBannedInConstructor,t)}}pushClassPrivateMethod(e,t,r,i){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,r,i)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let t=e.implements=[];do{let r=this.startNode();r.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,t.push(this.finishNode(r,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let t=this.getObjectOrClassMethodParams(e);if(t.length>0){let r=t[0];this.isThisParam(r)&&e.kind==="get"?this.raise(M.GetterMayNotHaveThisParam,r):this.isThisParam(r)&&this.raise(M.SetterMayNotHaveThisParam,r)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,r,i,a,o,l){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let c;this.match(47)&&!o&&(c=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let p=super.parseObjPropValue(e,t,r,i,a,o,l);return c&&((p.value||p).typeParameters=c),p}parseFunctionParamType(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(M.PatternIsOptional,e),this.isThisParam(e)&&this.raise(M.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(M.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(M.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,t){let r=super.parseMaybeDefault(e,t);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(M.TypeBeforeInitializer,r.typeAnnotation),r}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(M.ImportReflectionHasImportType,e.specifiers[0].loc.start)}parseImportSpecifierLocal(e,t,r){t.local=Ui(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}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,r,i){if(super.applyImportPhase(e,t,r,i),t){if(!r&&this.match(65))return;e.exportKind=r==="type"?r:"value"}else r==="type"&&this.match(55)&&this.unexpected(),e.importKind=r==="type"||r==="typeof"?r:"value"}parseImportSpecifier(e,t,r,i,a){let o=e.imported,l=null;o.type==="Identifier"&&(o.name==="type"?l="type":o.name==="typeof"&&(l="typeof"));let c=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let u=this.parseIdentifier(!0);l!==null&&!Ee(this.state.type)?(e.imported=u,e.importKind=l,e.local=He(u)):(e.imported=o,e.importKind=null,e.local=this.parseIdentifier())}else{if(l!==null&&Ee(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=l;else{if(t)throw this.raise(g.ImportBindingIsString,e,{importName:o.value});e.imported=o,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(c=!0,e.local=He(e.imported))}let p=Ui(e);return r&&p&&this.raise(M.ImportTypeShorthandOnlyInPureImport,e),(r||p)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),c&&!r&&!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 r=e.kind;r!=="get"&&r!=="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 r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=r}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var r;let i=null,a;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(i=this.state.clone(),a=this.tryParse(()=>super.parseMaybeAssign(e,t),i),!a.error)return a.node;let{context:c}=this.state,p=c[c.length-1];(p===j.j_oTag||p===j.j_expr)&&c.pop()}if((r=a)!=null&&r.error||this.match(47)){var o,l;i=i||this.state.clone();let c,p=this.tryParse(d=>{var m;c=this.flowParseTypeParameterDeclaration();let f=this.forwardNoArrowParamsConversionAt(c,()=>{let h=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(h,c),h});(m=f.extra)!=null&&m.parenthesized&&d();let b=this.maybeUnwrapTypeCastExpression(f);return b.type!=="ArrowFunctionExpression"&&d(),b.typeParameters=c,this.resetStartLocationFromNode(b,c),f},i),u=null;if(p.node&&this.maybeUnwrapTypeCastExpression(p.node).type==="ArrowFunctionExpression"){if(!p.error&&!p.aborted)return p.node.async&&this.raise(M.UnexpectedTypeParameterBeforeAsyncArrowFunction,c),p.node;u=p.node}if((o=a)!=null&&o.node)return this.state=a.failState,a.node;if(u)return this.state=p.failState,u;throw(l=a)!=null&&l.thrown?a.error:p.thrown?p.error:this.raise(M.UnexpectedTokenAfterTypeParameter,c)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(()=>{let r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let i=this.startNode();return[i.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=r,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,r,i=!0){if(!(r&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start)))){for(let a=0;a<e.params.length;a++)this.isThisParam(e.params[a])&&a>0&&this.raise(M.ThisParamMustBeFirst,e.params[a]);super.checkParams(e,t,r,i)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(e,t,r){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(),a=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(t)||l(),i);if(!a.error&&!a.aborted)return a.node;let o=this.tryParse(()=>super.parseSubscripts(e,t,r),i);if(o.node&&!o.error)return o.node;if(a.node)return this.state=a.failState,a.node;if(o.node)return this.state=o.failState,o.node;throw a.error||o.error}return super.parseSubscripts(e,t,r)}parseSubscript(e,t,r,i){if(this.match(18)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,r)return i.stop=!0,e;this.next();let a=this.startNodeAt(t);return a.callee=e,a.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),a.arguments=this.parseCallExpressionArguments(11),a.optional=!0,this.finishCallExpression(a,!0)}else if(!r&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let a=this.startNodeAt(t);a.callee=e;let o=this.tryParse(()=>(a.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),a.arguments=super.parseCallExpressionArguments(11),i.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,i.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,t,r,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 r=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(M.UnterminatedFlowComment,this.state.curPosition()),r}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(M.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 r=this.input.charCodeAt(t+e),i=this.input.charCodeAt(t+e+1);return r===58&&i===58?t+2:this.input.slice(t+e,t+e+12)==="flow-include"?t+12:r===58&&i!==58?t:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(g.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(M.EnumBooleanMemberNotInitialized,e,{memberName:r,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?t.explicitType==="symbol"?M.EnumInvalidMemberInitializerSymbolType:M.EnumInvalidMemberInitializerPrimaryType:M.EnumInvalidMemberInitializerUnknownType,e,t)}flowEnumErrorNumberMemberNotInitialized(e,t){this.raise(M.EnumNumberMemberNotInitialized,e,t)}flowEnumErrorStringMemberInconsistentlyInitialized(e,t){this.raise(M.EnumStringMemberInconsistentlyInitialized,e,t)}flowEnumMemberInit(){let e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let r=this.parseNumericLiteral(this.state.value);return t()?{type:"number",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 134:{let r=this.parseStringLiteral(this.state.value);return t()?{type:"string",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 85:case 86:{let r=this.parseBooleanLiteral(this.match(85));return t()?{type:"boolean",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,t=this.parseIdentifier(!0),r=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:t,init:r}}flowEnumCheckExplicitTypeMismatch(e,t,r){let{explicitType:i}=t;i!==null&&i!==r&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){let r=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},a=!1;for(;!this.match(8);){if(this.eat(21)){a=!0;break}let o=this.startNode(),{id:l,init:c}=this.flowEnumMemberRaw(),p=l.name;if(p==="")continue;/^[a-z]/.test(p)&&this.raise(M.EnumInvalidMemberName,l,{memberName:p,suggestion:p[0].toUpperCase()+p.slice(1),enumName:e}),r.has(p)&&this.raise(M.EnumDuplicateMemberName,l,{memberName:p,enumName:e}),r.add(p);let u={enumName:e,explicitType:t,memberName:p};switch(o.id=l,c.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(c.loc,u,"boolean"),o.init=c.value,i.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(c.loc,u,"number"),o.init=c.value,i.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(c.loc,u,"string"),o.init=c.value,i.stringMembers.push(this.finishNode(o,"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(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:i,hasUnknownMembers:a}}flowEnumStringMembers(e,t,{enumName:r}){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:r});return t}else{for(let i of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:r});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!V(this.state.type))throw this.raise(M.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:t}=this.state;return this.next(),t!=="boolean"&&t!=="number"&&t!=="string"&&t!=="symbol"&&this.raise(M.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){let r=t.name,i=t.loc.start,a=this.flowEnumParseExplicitType({enumName:r});this.expect(5);let{members:o,hasUnknownMembers:l}=this.flowEnumMembers({enumName:r,explicitType:a});switch(e.hasUnknownMembers=l,a){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.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=o.booleanMembers.length,u=o.numberMembers.length,d=o.stringMembers.length,m=o.defaultedMembers.length;if(!p&&!u&&!d&&!m)return c();if(!p&&!u)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!u&&!d&&p>=m){for(let f of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(f.loc.start,{enumName:r,memberName:f.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!p&&!d&&u>=m){for(let f of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(f.loc.start,{enumName:r,memberName:f.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(M.EnumInconsistentMemberValues,i,{enumName:r}),c()}}}flowParseEnumDeclaration(e){let t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,"EnumDeclaration")}jsxParseOpeningElementAfterName(e){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(e.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(e)}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let t=this.input.charCodeAt(e+1);return t!==60&&t!==61}return!1}reScan_lt_gt(){let{type:e}=this.state;e===47?(this.state.pos-=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}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},cp={__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"},rt=$e`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:s})=>`Expected corresponding JSX closing tag for <${s}>.`,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:s,HTMLEntity:n})=>`Unexpected token \`${s}\`. Did you mean \`${n}\` or \`{'${s}'}\`?`,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 Je(s){return s?s.type==="JSXOpeningFragment"||s.type==="JSXClosingFragment":!1}function ht(s){if(s.type==="JSXIdentifier")return s.name;if(s.type==="JSXNamespacedName")return s.namespace.name+":"+s.name.name;if(s.type==="JSXMemberExpression")return ht(s.object)+"."+ht(s.property);throw new Error("Node had unexpected type: "+s.type)}var pp=s=>class extends s{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(rt.UnterminatedJsxContent,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:if(this.state.pos===this.state.start){r===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(r);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:gt(r)?(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),r;return++this.state.pos,t===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,r=e?`
|
|
6
|
+
`);case 114:return o("\r");case 120:{let c;return{code:c,pos:n}=Hs(s,n,e,t,2,!1,a,i),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:n}=Zi(s,n,e,t,a,i),o(c===null?null:String.fromCodePoint(c))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:s.charCodeAt(n)===10&&++n;case 10:e=n,++t;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);i.strictNumericEscape(n-1,e,t);default:if(l>=48&&l<=55){let c=n-1,u=/^[0-7]+/.exec(s.slice(c,n+2))[0],d=parseInt(u,8);d>255&&(u=u.slice(0,-1),d=parseInt(u,8)),n+=u.length-1;let m=s.charCodeAt(n);if(u!=="0"||m===56||m===57){if(r)return o(null);i.strictNumericEscape(c,e,t)}return o(String.fromCharCode(d))}return o(String.fromCharCode(l))}}function Hs(s,n,e,t,r,i,a,o){let l=n,c;return{n:c,pos:n}=Qi(s,n,e,t,16,r,i,!1,o,!a),c===null&&(a?o.invalidEscapeSequence(l,e,t):n=l-1),{code:c,pos:n}}function Qi(s,n,e,t,r,i,a,o,l,c){let p=n,u=r===16?Oi.hex:Oi.decBinOct,d=r===16?En.hex:r===10?En.dec:r===8?En.oct:En.bin,m=!1,f=0;for(let b=0,h=i??1/0;b<h;++b){let y=s.charCodeAt(n),C;if(y===95&&o!=="bail"){let k=s.charCodeAt(n-1),x=s.charCodeAt(n+1);if(o){if(Number.isNaN(x)||!d(x)||u.has(k)||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?C=y-97+10:y>=65?C=y-65+10:Kc(y)?C=y-48:C=1/0,C>=r){if(C<=9&&c)return{n:null,pos:n};if(C<=9&&l.invalidDigit(n,e,t,r))C=0;else if(a)C=0,m=!0;else break}++n,f=f*r+C}return n===p||i!=null&&n-p!==i||m?{n:null,pos:n}:{n:f,pos:n}}function Zi(s,n,e,t,r,i){let a=s.charCodeAt(n),o;if(a===123){if(++n,{code:o,pos:n}=Hs(s,n,e,t,s.indexOf("}",n)-n,!0,r,i),++n,o!==null&&o>1114111)if(r)i.invalidCodePoint(n,e,t);else return{code:null,pos:n}}else({code:o,pos:n}=Hs(s,n,e,t,4,!1,r,i));return{code:o,pos:n}}function $t(s,n,e){return new Oe(e,s-n,s)}var Yc=new Set([103,109,115,105,121,117,100,118]),Le=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 vt(n.startLoc,n.endLoc)}},Gs=class extends zs{constructor(n,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(t,r,i,a)=>this.optionFlags&1024?(this.raise(g.InvalidDigit,$t(t,r,i),{radix:a}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(g.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(g.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(g.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(g.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(t,r,i)=>{this.recordStrictModeErrors(g.StrictNumericEscape,$t(t,r,i))},unterminated:(t,r,i)=>{throw this.raise(g.UnterminatedString,$t(t-1,r,i))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(g.StrictNumericEscape),unterminated:(t,r,i)=>{throw this.raise(g.UnterminatedTemplate,$t(t,r,i))}}),this.state=new $s,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.optionFlags&128&&this.pushToken(new Le(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 Ms.lastIndex=n,Ms.test(this.input)?Ms.lastIndex:n}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(n){return Ls.lastIndex=n,Ls.test(this.input)?Ls.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,r=this.input.indexOf(n,t+2);if(r===-1)throw this.raise(g.UnterminatedComment,this.state.curPosition());for(this.state.pos=r+n.length,Dn.lastIndex=t+2;Dn.test(this.input)&&Dn.lastIndex<=r;)++this.state.curLine,this.state.lineStart=Dn.lastIndex;if(this.isLookahead)return;let i={type:"CommentBlock",value:this.input.slice(t+2,r),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(r+n.length),loc:new vt(e,this.state.curPosition())};return this.optionFlags&128&&this.pushToken(i),i}skipLineComment(n){let e=this.state.pos,t;this.isLookahead||(t=this.state.curPosition());let r=this.input.charCodeAt(this.state.pos+=n);if(this.state.pos<this.length)for(;!gt(r)&&++this.state.pos<this.length;)r=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let i=this.state.pos,o={type:"CommentLine",value:this.input.slice(e+n,i),start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(i),loc:new vt(t,this.state.curPosition())};return this.optionFlags&128&&this.pushToken(o),o}skipSpace(){let n=this.state.pos,e=this.optionFlags&2048?[]:null;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 r=this.skipBlockComment("*/");r!==void 0&&(this.addComment(r),e?.push(r));break}case 47:{let r=this.skipLineComment(2);r!==void 0&&(this.addComment(r),e?.push(r));break}default:break e}break;default:if(qc(t))++this.state.pos;else if(t===45&&!this.inModule&&this.optionFlags&4096){let r=this.state.pos;if(this.input.charCodeAt(r+1)===45&&this.input.charCodeAt(r+2)===62&&(n===0||this.state.lineStart>n)){let i=this.skipLineComment(3);i!==void 0&&(this.addComment(i),e?.push(i))}else break e}else if(t===60&&!this.inModule&&this.optionFlags&4096){let r=this.state.pos;if(this.input.charCodeAt(r+1)===33&&this.input.charCodeAt(r+2)===45&&this.input.charCodeAt(r+3)===45){let i=this.skipLineComment(4);i!==void 0&&(this.addComment(i),e?.push(i))}else break e}else break e}}if(e?.length>0){let t=this.state.pos,r={start:this.sourceToOffsetPos(n),end:this.sourceToOffsetPos(t),comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}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(g.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?g.RecordExpressionHashIncorrectStartSyntaxType:g.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else ze(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;!gt(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,r=this.input.charCodeAt(this.state.pos+1);n===42&&r===42&&(t++,r=this.input.charCodeAt(this.state.pos+2),e=57),r===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(g.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(g.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(g.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(g.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(ze(n)){this.readWord(n);return}}throw this.raise(g.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,r,{pos:i}=this.state;for(;;++i){if(i>=this.length)throw this.raise(g.UnterminatedRegExp,oe(n,1));let c=this.input.charCodeAt(i);if(gt(c))throw this.raise(g.UnterminatedRegExp,oe(n,1));if(t)t=!1;else{if(c===91)r=!0;else if(c===93&&r)r=!1;else if(c===47&&!r)break;t=c===92}}let a=this.input.slice(e,i);++i;let o="",l=()=>oe(n,i+2-e);for(;i<this.length;){let c=this.codePointAtPos(i),p=String.fromCharCode(c);if(Yc.has(c))c===118?o.includes("u")&&this.raise(g.IncompatibleRegExpUVFlags,l()):c===117&&o.includes("v")&&this.raise(g.IncompatibleRegExpUVFlags,l()),o.includes(p)&&this.raise(g.DuplicateRegExpFlags,l());else if(bt(c)||c===92)this.raise(g.MalformedRegExpFlags,l());else break;++i,o+=p}this.state.pos=i,this.finishToken(138,{pattern:a,flags:o})}readInt(n,e,t=!1,r=!0){let{n:i,pos:a}=Qi(this.input,this.state.pos,this.state.lineStart,this.state.curLine,n,e,t,r,this.errorHandlers_readInt,!1);return this.state.pos=a,i}readRadixNumber(n){let e=this.state.pos,t=this.state.curPosition(),r=!1;this.state.pos+=2;let i=this.readInt(n);i==null&&this.raise(g.InvalidDigit,oe(t,2),{radix:n});let a=this.input.charCodeAt(this.state.pos);if(a===110)++this.state.pos,r=!0;else if(a===109)throw this.raise(g.InvalidDecimal,t);if(ze(this.codePointAtPos(this.state.pos)))throw this.raise(g.NumberIdentifier,this.state.curPosition());if(r){let o=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,o);return}this.finishToken(135,i)}readNumber(n){let e=this.state.pos,t=this.state.curPosition(),r=!1,i=!1,a=!1,o=!1;!n&&this.readInt(10)===null&&this.raise(g.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(g.StrictOctalLiteral,t),!this.state.strict){let f=m.indexOf("_");f>0&&this.raise(g.ZeroDigitNumericSeparator,oe(t,f))}o=l&&!/[89]/.test(m)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!o&&(++this.state.pos,this.readInt(10),r=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!o&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(g.InvalidOrMissingExponent,t),r=!0,a=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((r||l)&&this.raise(g.InvalidBigIntLiteral,t),++this.state.pos,i=!0),c===109){this.expectPlugin("decimal",this.state.curPosition()),(a||l)&&this.raise(g.InvalidDecimal,t),++this.state.pos;var p=!0}if(ze(this.codePointAtPos(this.state.pos)))throw this.raise(g.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 d=o?parseInt(u,8):parseFloat(u);this.finishToken(135,d)}readCodePoint(n){let{code:e,pos:t}=Zi(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:r,lineStart:i}=Bi(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=r,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:r,curLine:i,lineStart:a}=Bi("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=r+1,this.state.lineStart=a,this.state.curLine=i,t&&(this.state.firstInvalidTemplateEscapePos=new Oe(t.curLine,t.pos-t.lineStart,this.sourceToOffsetPos(t.pos))),this.input.codePointAt(r)===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,r=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(bt(i))this.state.pos+=i<=65535?1:2;else if(i===92){this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);let a=this.state.curPosition(),o=this.state.pos===t?ze:bt;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(g.MissingUnicodeEscape,this.state.curPosition()),r=this.state.pos-1;continue}++this.state.pos;let l=this.readCodePoint(!0);l!==null&&(o(l)||this.raise(g.EscapedCharNotAnIdentifier,a),e+=String.fromCodePoint(l)),r=this.state.pos}else break}return e+this.input.slice(r,this.state.pos)}readWord(n){let e=this.readWord1(n),t=sr.get(e);t!==void 0?this.finishToken(t,Xe(t)):this.finishToken(132,e)}checkKeywordEscapes(){let{type:n}=this.state;cr(n)&&this.state.containsEsc&&this.raise(g.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Xe(n)})}raise(n,e,t={}){let r=e instanceof Oe?e:e.loc.start,i=n(r,t);if(!(this.optionFlags&1024))throw i;return this.isLookahead||this.state.errors.push(i),i}raiseOverwrite(n,e,t={}){let r=e instanceof Oe?e:e.loc.start,i=r.index,a=this.state.errors;for(let o=a.length-1;o>=0;o--){let l=a[o];if(l.loc.index===i)return a[o]=n(r,t);if(l.loc.index<i)break}return this.raise(n,e,t)}updateContext(n){}unexpected(n,e){throw this.raise(g.UnexpectedToken,n??this.state.startLoc,{expected:e?Xe(e):null})}expectPlugin(n,e){if(this.hasPlugin(n))return!0;throw this.raise(g.MissingPlugin,e??this.state.startLoc,{missingPlugin:[n]})}expectOnePlugin(n){if(!n.some(e=>this.hasPlugin(e)))throw this.raise(g.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:n})}errorBuilder(n){return(e,t,r)=>{this.raise(n,$t(e,t,r))}}},Ws=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},qs=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 Ws)}exit(){let n=this.stack.pop(),e=this.current();for(let[t,r]of Array.from(n.undefinedPrivateNames))e?e.undefinedPrivateNames.has(t)||e.undefinedPrivateNames.set(t,r):this.parser.raise(g.InvalidPrivateFieldResolution,r,{identifierName:t})}declarePrivateName(n,e,t){let{privateNames:r,loneAccessors:i,undefinedPrivateNames:a}=this.current(),o=r.has(n);if(e&3){let l=o&&i.get(n);if(l){let c=l&4,p=e&4,u=l&3,d=e&3;o=u===d||c!==p,o||i.delete(n)}else o||i.set(n,e)}o&&this.parser.raise(g.PrivateNameRedeclaration,t,{identifierName:n}),r.add(n),a.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(g.InvalidPrivateFieldResolution,e,{identifierName:n})}},xt=class{constructor(n=0){this.type=n}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},Nn=class extends xt{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)}},Ks=class{constructor(n){this.parser=void 0,this.stack=[new xt],this.parser=n}enter(n){this.stack.push(n)}exit(){this.stack.pop()}recordParameterInitializerError(n,e){let t=e.loc.start,{stack:r}=this,i=r.length-1,a=r[i];for(;!a.isCertainlyParameterDeclaration();){if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(n,t);else return;a=r[--i]}this.parser.raise(n,t)}recordArrowParameterBindingError(n,e){let{stack:t}=this,r=t[t.length-1],i=e.loc.start;if(r.isCertainlyParameterDeclaration())this.parser.raise(n,i);else if(r.canBeArrowParameterDeclaration())r.recordDeclarationError(n,i);else return}recordAsyncArrowParametersError(n){let{stack:e}=this,t=e.length-1,r=e[t];for(;r.canBeArrowParameterDeclaration();)r.type===2&&r.recordDeclarationError(g.AwaitBindingIdentifier,n),r=e[--t]}validateAsPattern(){let{stack:n}=this,e=n[n.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(([t,r])=>{this.parser.raise(t,r);let i=n.length-2,a=n[i];for(;a.canBeArrowParameterDeclaration();)a.clearDeclarationError(r.index),a=n[--i]})}};function Qc(){return new xt(3)}function Zc(){return new Nn(1)}function ep(){return new Nn(2)}function ea(){return new xt}var Js=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 In(s,n){return(s?2:0)|(n?1:0)}var Xs=class extends Gs{addExtra(n,e,t,r=!0){if(!n)return;let{extra:i}=n;i==null&&(i={},n.extra=i),r?i[e]=t:Object.defineProperty(i,e,{enumerable:r,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 r=this.input.charCodeAt(t);return!(bt(r)||(r&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 Li(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return Li(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(g.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 r=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:r,error:i.errors[e.errors.length],thrown:!1,aborted:!1,failState:i}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(r){let i=this.state;if(this.state=e,r instanceof SyntaxError)return{node:null,error:r,thrown:!0,aborted:!1,failState:i};if(r===t)return{node:t.node,error:null,thrown:!1,aborted:!0,failState:i};throw r}}checkExpressionErrors(n,e){if(!n)return!1;let{shorthandAssignLoc:t,doubleProtoLoc:r,privateKeyLoc:i,optionalParametersLoc:a}=n,o=!!t||!!r||!!a||!!i;if(!e)return o;t!=null&&this.raise(g.InvalidCoverInitializedName,t),r!=null&&this.raise(g.DuplicateProto,r),i!=null&&this.raise(g.UnexpectedPrivateField,i),a!=null&&this.unexpected(a)}isLiteralPropertyName(){return Hi(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 r=this.inModule;this.inModule=n;let i=this.scope,a=this.getScopeHandler();this.scope=new a(this,n);let o=this.prodParam;this.prodParam=new Js;let l=this.classScope;this.classScope=new qs(this);let c=this.expressionScope;return this.expressionScope=new Ks(this),()=>{this.state.labels=e,this.exportedIdentifiers=t,this.inModule=r,this.scope=i,this.prodParam=o,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)}},yt=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},Pt=class{constructor(n,e,t){this.type="",this.start=e,this.end=0,this.loc=new vt(t),n?.optionFlags&64&&(this.range=[e,0]),n!=null&&n.filename&&(this.loc.filename=n.filename)}},dr=Pt.prototype;dr.__clone=function(){let s=new Pt(void 0,this.start,this.loc.start),n=Object.keys(this);for(let e=0,t=n.length;e<t;e++){let r=n[e];r!=="leadingComments"&&r!=="trailingComments"&&r!=="innerComments"&&(s[r]=this[r])}return s};function tp(s){return He(s)}function He(s){let{type:n,start:e,end:t,loc:r,range:i,extra:a,name:o}=s,l=Object.create(dr);return l.type=n,l.start=e,l.end=t,l.loc=r,l.range=i,l.extra=a,l.name=o,n==="Placeholder"&&(l.expectedNode=s.expectedNode),l}function np(s){let{type:n,start:e,end:t,loc:r,range:i,extra:a}=s;if(n==="Placeholder")return tp(s);let o=Object.create(dr);return o.type=n,o.start=e,o.end=t,o.loc=r,o.range=i,s.raw!==void 0?o.raw=s.raw:o.extra=a,o.value=s.value,o}var Ys=class extends Xs{startNode(){let n=this.state.startLoc;return new Pt(this,n.index,n)}startNodeAt(n){return new Pt(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.optionFlags&64&&(n.range[1]=t.index),this.optionFlags&2048&&this.processComment(n),n}resetStartLocation(n,e){n.start=e.index,n.loc.start=e,this.optionFlags&64&&(n.range[0]=e.index)}resetEndLocation(n,e=this.state.lastTokEndLoc){n.end=e.index,n.loc.end=e,this.optionFlags&64&&(n.range[1]=e.index)}resetStartLocationFromNode(n,e){this.resetStartLocation(n,e.loc.start)}},sp=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),M=$e`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:s})=>`Cannot overwrite reserved type ${s}.`,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:s,enumName:n})=>`Boolean enum members need to be initialized. Use either \`${s} = true,\` or \`${s} = false,\` in enum \`${n}\`.`,EnumDuplicateMemberName:({memberName:s,enumName:n})=>`Enum member names need to be unique, but the name \`${s}\` has already been used before in enum \`${n}\`.`,EnumInconsistentMemberValues:({enumName:s})=>`Enum \`${s}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:s,enumName:n})=>`Enum type \`${s}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${n}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:s})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${s}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:s,memberName:n,explicitType:e})=>`Enum \`${s}\` has type \`${e}\`, so the initializer of \`${n}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:s,memberName:n})=>`Symbol enum members cannot be initialized. Use \`${n},\` in enum \`${s}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:s,memberName:n})=>`The enum member initializer for \`${n}\` needs to be a literal (either a boolean, number, or string) in enum \`${s}\`.`,EnumInvalidMemberName:({enumName:s,memberName:n,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${n}\`, consider using \`${e}\`, in enum \`${s}\`.`,EnumNumberMemberNotInitialized:({enumName:s,memberName:n})=>`Number enum members need to be initialized, e.g. \`${n} = 1\` in enum \`${s}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:s})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${s}\`.`,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:s})=>`Unexpected reserved type ${s}.`,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:s,suggestion:n})=>`\`declare export ${s}\` is not supported. Use \`${n}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function rp(s){return s.type==="DeclareExportAllDeclaration"||s.type==="DeclareExportDeclaration"&&(!s.declaration||s.declaration.type!=="TypeAlias"&&s.declaration.type!=="InterfaceDeclaration")}function Ui(s){return s.importKind==="type"||s.importKind==="typeof"}var ip={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function ap(s,n){let e=[],t=[];for(let r=0;r<s.length;r++)(n(s[r],r,s)?e:t).push(s[r]);return[e,t]}var op=/\*?\s*@((?:no)?flow)\b/,lp=s=>class extends s{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return js}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=op.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 r=this.flowParseType();return this.state.inType=t,r}flowParsePredicate(){let e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>t.index+1&&this.raise(M.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,r=null;return this.match(54)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(r=this.flowParsePredicate())),[t,r]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let t=e.id=this.parseIdentifier(),r=this.startNode(),i=this.startNode();this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(10);let a=this.flowParseFunctionTypeParams();return r.params=a.params,r.rest=a.rest,r.this=a._this,this.expect(11),[r.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),i.typeAnnotation=this.finishNode(r,"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(M.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(),r=t.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(M.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(o)):(this.expectContextual(125,M.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),r.push(o)}this.scope.exit(),this.expect(8),this.finishNode(t,"BlockStatement");let i=null,a=!1;return r.forEach(o=>{rp(o)?(i==="CommonJS"&&this.raise(M.AmbiguousDeclareModuleKind,o),i="ES"):o.type==="DeclareModuleExports"&&(a&&this.raise(M.DuplicateDeclareModuleExports,o),i==="ES"&&this.raise(M.AmbiguousDeclareModuleKind,o),i="CommonJS",a=!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 r=this.state.value;throw this.raise(M.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:r,suggestion:ip[r]})}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(M.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,t,r){sp.has(e)&&this.raise(r?M.AssignReservedType:M.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,r=this.startNode(),i=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return r.name=a.name,r.variance=i,r.bound=a.typeAnnotation,this.match(29)?(this.eat(29),r.default=this.flowParseType()):e&&this.raise(M.MissingTypeParamDefault,t),this.finishNode(r,"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 r=!1;do{let i=this.flowParseTypeParameter(r);t.params.push(i),i.default&&(r=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowInTopLevelContext(e){if(this.curContext()!==j.brace){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}else return e()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let e=this.startNode(),t=this.state.inType;return this.state.inType=!0,e.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let r=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=r}),this.state.inType=t,!this.state.inType&&this.curContext()===j.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return;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,r){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=r,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 r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:r,allowProto:i,allowInexact:a}){let o=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,f=null,b=null,h=this.startNode();if(i&&this.isContextual(118)){let C=this.lookahead();C.type!==14&&C.type!==17&&(this.next(),f=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let C=this.lookahead();C.type!==14&&C.type!==17&&(this.next(),m=!0)}let y=this.flowParseVariance();if(this.eat(0))f!=null&&this.unexpected(f),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))f!=null&&this.unexpected(f),y&&this.unexpected(y.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(h,m));else{let C="init";if(this.isContextual(99)||this.isContextual(104)){let x=this.lookahead();Hi(x.type)&&(C=this.state.value,this.next())}let k=this.flowParseObjectTypeProperty(h,m,f,y,C,r,a??!p);k===null?(u=!0,b=this.state.lastTokStartLoc):l.properties.push(k)}this.flowObjectTypeSemicolon(),b&&!this.match(8)&&!this.match(9)&&this.raise(M.UnexpectedExplicitInexactInObject,b)}this.expect(c),r&&(l.inexact=u);let d=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=o,d}flowParseObjectTypeProperty(e,t,r,i,a,o,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?l||this.raise(M.InexactInsideExact,this.state.lastTokStartLoc):this.raise(M.InexactInsideNonObject,this.state.lastTokStartLoc),i&&this.raise(M.InexactVariance,i),null):(o||this.raise(M.UnexpectedSpreadType,this.state.lastTokStartLoc),r!=null&&this.unexpected(r),i&&this.raise(M.SpreadVariance,i),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=r!=null,e.kind=a;let c=!1;return this.match(47)||this.match(10)?(e.method=!0,r!=null&&this.unexpected(r),i&&this.unexpected(i.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(a==="get"||a==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(M.ThisParamBannedInConstructor,e.value.this)):(a!=="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,r=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?M.GetterMayNotHaveThisParam:M.SetterMayNotHaveThisParam,e.value.this),r!==t&&this.raise(e.kind==="get"?g.BadGetterArity:g.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(g.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){var r;(r=e)!=null||(e=this.state.startLoc);let i=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let a=this.startNodeAt(e);a.qualification=i,a.id=this.flowParseRestrictedIdentifier(!0),i=this.finishNode(a,"QualifiedTypeIdentifier")}return i}flowParseGenericType(e,t){let r=this.startNodeAt(e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"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,r=!1,i=null,a=this.startNode(),o=this.lookahead(),l=this.state.type===78;return o.type===14||o.type===17?(l&&!e&&this.raise(M.ThisParamMustBeFirst,a),t=this.parseIdentifier(l),this.eat(17)&&(r=!0,l&&this.raise(M.ThisParamMayNotBeOptional,a)),i=this.flowParseTypeInitialiser()):i=this.flowParseType(),a.name=t,a.optional=r,a.typeAnnotation=i,this.finishNode(a,"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,r=null;for(this.match(78)&&(r=this.flowParseFunctionTypeParam(!0),r.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:r}}flowIdentToTypeAnnotation(e,t,r){switch(r.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(r.name),this.flowParseGenericType(e,r)}}flowParsePrimaryType(){let e=this.state.startLoc,t=this.startNode(),r,i,a=!1,o=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=o,i;case 47:{let l=this.startNode();return l.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),r=this.flowParseFunctionTypeParams(),l.params=r.params,l.rest=r.rest,l.this=r._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(V(this.state.type)||this.match(78)){let c=this.lookahead().type;a=c!==17&&c!==14}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),i;this.eat(12)}return i?r=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):r=this.flowParseFunctionTypeParams(),l.params=r.params,l.rest=r.rest,l.this=r._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(M.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(cr(this.state.type)){let l=Xe(this.state.type);return this.next(),super.createIdentifier(t,l)}else if(V(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(),r=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let i=this.startNodeAt(e),a=this.eat(18);r=r||a,this.expect(0),!a&&this.match(3)?(i.elementType=t,this.next(),t=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=t,i.indexType=this.flowParseType(),this.expect(3),r?(i.optional=a,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,r=!1){if(t){this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,r));return}super.parseFunctionBody(e,!1,r)}parseFunctionBodyAndFinish(e,t,r=!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,r)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let r=this.lookahead();if(Ee(r.type)){let i=this.startNode();return this.next(),this.flowParseInterface(i)}}else if(this.isContextual(126)){let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}let t=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(t)&&(this.flowPragma=null),t}parseExpressionStatement(e,t,r){if(t.type==="Identifier"){if(t.name==="declare"){if(this.match(80)||V(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(V(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,r)}shouldParseExportDeclaration(){let{type:e}=this.state;return e===126||Mi(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return e===126||Mi(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,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let d=this.lookaheadCharCode();if(d===44||d===61||d===58||d===41)return this.setOptionalParametersError(r),e}this.expect(17);let i=this.state.clone(),a=this.state.noArrowAt,o=this.startNodeAt(t),{consequent:l,failed:c}=this.tryParseConditionalConsequent(),[p,u]=this.getArrowLikeExpressions(l);if(c||u.length>0){let d=[...a];if(u.length>0){this.state=i,this.state.noArrowAt=d;for(let m=0;m<u.length;m++)d.push(u[m].start);({consequent:l,failed:c}=this.tryParseConditionalConsequent()),[p,u]=this.getArrowLikeExpressions(l)}c&&p.length>1&&this.raise(M.AmbiguousConditionalArrow,i.startLoc),c&&p.length===1&&(this.state=i,d.push(p[0].start),this.state.noArrowAt=d,{consequent:l,failed:c}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=a,this.expect(14),o.test=e,o.consequent=l,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"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 r=[e],i=[];for(;r.length!==0;){let a=r.pop();a.type==="ArrowFunctionExpression"&&a.body.type!=="BlockStatement"?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):i.push(a),r.push(a.body)):a.type==="ConditionalExpression"&&(r.push(a.consequent),r.push(a.alternate))}return t?(i.forEach(a=>this.finishArrowValidation(a)),[i,[]]):ap(i,a=>a.params.every(o=>this.isAssignable(o,!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 r;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),r=t(),this.state.noArrowParamsConversionAt.pop()):r=t(),r}parseParenItem(e,t){let r=super.parseParenItem(e,t);if(this.eat(17)&&(r.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(t);return i.expression=r,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return r}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,r=super.maybeParseExportNamespaceSpecifier(e);return r&&e.exportKind==="type"&&this.unexpected(t),r}parseClassId(e,t,r){super.parseClassId(e,t,r),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,r){let{startLoc:i}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,r),t.declare&&(t.type!=="ClassProperty"&&t.type!=="ClassPrivateProperty"&&t.type!=="PropertyDefinition"?this.raise(M.DeclareClassElement,i):t.value&&this.raise(M.DeclareClassFieldInitializer,t.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),t="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(g.InvalidIdentifier,this.state.curPosition(),{identifierName:t}),this.finishToken(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):zc(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,r){for(let i=0;i<e.length;i++){let a=e[i];a?.type==="TypeCastExpression"&&(e[i]=this.typeCastToParameter(a))}super.toAssignableList(e,t,r)}toReferencedList(e,t){for(let i=0;i<e.length;i++){var r;let a=e[i];a&&a.type==="TypeCastExpression"&&!((r=a.extra)!=null&&r.parenthesized)&&(e.length>1||!t)&&this.raise(M.TypeCastInPattern,a.typeAnnotation)}return e}parseArrayLike(e,t,r,i){let a=super.parseArrayLike(e,t,r,i);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(a.elements),a}isValidLVal(e,t,r){return e==="TypeCastExpression"||super.isValidLVal(e,t,r)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,r,i,a,o){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,r,i,a,o),t.params&&a){let l=t.params;l.length>0&&this.isThisParam(l[0])&&this.raise(M.ThisParamBannedInConstructor,t)}else if(t.type==="MethodDefinition"&&a&&t.value.params){let l=t.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(M.ThisParamBannedInConstructor,t)}}pushClassPrivateMethod(e,t,r,i){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,r,i)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let t=e.implements=[];do{let r=this.startNode();r.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,t.push(this.finishNode(r,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let t=this.getObjectOrClassMethodParams(e);if(t.length>0){let r=t[0];this.isThisParam(r)&&e.kind==="get"?this.raise(M.GetterMayNotHaveThisParam,r):this.isThisParam(r)&&this.raise(M.SetterMayNotHaveThisParam,r)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,r,i,a,o,l){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let c;this.match(47)&&!o&&(c=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let p=super.parseObjPropValue(e,t,r,i,a,o,l);return c&&((p.value||p).typeParameters=c),p}parseFunctionParamType(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(M.PatternIsOptional,e),this.isThisParam(e)&&this.raise(M.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(M.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(M.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,t){let r=super.parseMaybeDefault(e,t);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(M.TypeBeforeInitializer,r.typeAnnotation),r}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(M.ImportReflectionHasImportType,e.specifiers[0].loc.start)}parseImportSpecifierLocal(e,t,r){t.local=Ui(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}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,r,i){if(super.applyImportPhase(e,t,r,i),t){if(!r&&this.match(65))return;e.exportKind=r==="type"?r:"value"}else r==="type"&&this.match(55)&&this.unexpected(),e.importKind=r==="type"||r==="typeof"?r:"value"}parseImportSpecifier(e,t,r,i,a){let o=e.imported,l=null;o.type==="Identifier"&&(o.name==="type"?l="type":o.name==="typeof"&&(l="typeof"));let c=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let u=this.parseIdentifier(!0);l!==null&&!Ee(this.state.type)?(e.imported=u,e.importKind=l,e.local=He(u)):(e.imported=o,e.importKind=null,e.local=this.parseIdentifier())}else{if(l!==null&&Ee(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=l;else{if(t)throw this.raise(g.ImportBindingIsString,e,{importName:o.value});e.imported=o,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(c=!0,e.local=He(e.imported))}let p=Ui(e);return r&&p&&this.raise(M.ImportTypeShorthandOnlyInPureImport,e),(r||p)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),c&&!r&&!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 r=e.kind;r!=="get"&&r!=="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 r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=r}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var r;let i=null,a;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(i=this.state.clone(),a=this.tryParse(()=>super.parseMaybeAssign(e,t),i),!a.error)return a.node;let{context:c}=this.state,p=c[c.length-1];(p===j.j_oTag||p===j.j_expr)&&c.pop()}if((r=a)!=null&&r.error||this.match(47)){var o,l;i=i||this.state.clone();let c,p=this.tryParse(d=>{var m;c=this.flowParseTypeParameterDeclaration();let f=this.forwardNoArrowParamsConversionAt(c,()=>{let h=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(h,c),h});(m=f.extra)!=null&&m.parenthesized&&d();let b=this.maybeUnwrapTypeCastExpression(f);return b.type!=="ArrowFunctionExpression"&&d(),b.typeParameters=c,this.resetStartLocationFromNode(b,c),f},i),u=null;if(p.node&&this.maybeUnwrapTypeCastExpression(p.node).type==="ArrowFunctionExpression"){if(!p.error&&!p.aborted)return p.node.async&&this.raise(M.UnexpectedTypeParameterBeforeAsyncArrowFunction,c),p.node;u=p.node}if((o=a)!=null&&o.node)return this.state=a.failState,a.node;if(u)return this.state=p.failState,u;throw(l=a)!=null&&l.thrown?a.error:p.thrown?p.error:this.raise(M.UnexpectedTokenAfterTypeParameter,c)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(()=>{let r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let i=this.startNode();return[i.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=r,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,r,i=!0){if(!(r&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start)))){for(let a=0;a<e.params.length;a++)this.isThisParam(e.params[a])&&a>0&&this.raise(M.ThisParamMustBeFirst,e.params[a]);super.checkParams(e,t,r,i)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(e,t,r){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(),a=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(t)||l(),i);if(!a.error&&!a.aborted)return a.node;let o=this.tryParse(()=>super.parseSubscripts(e,t,r),i);if(o.node&&!o.error)return o.node;if(a.node)return this.state=a.failState,a.node;if(o.node)return this.state=o.failState,o.node;throw a.error||o.error}return super.parseSubscripts(e,t,r)}parseSubscript(e,t,r,i){if(this.match(18)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,r)return i.stop=!0,e;this.next();let a=this.startNodeAt(t);return a.callee=e,a.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),a.arguments=this.parseCallExpressionArguments(11),a.optional=!0,this.finishCallExpression(a,!0)}else if(!r&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let a=this.startNodeAt(t);a.callee=e;let o=this.tryParse(()=>(a.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),a.arguments=super.parseCallExpressionArguments(11),i.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,i.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,t,r,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 r=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(M.UnterminatedFlowComment,this.state.curPosition()),r}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(M.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 r=this.input.charCodeAt(t+e),i=this.input.charCodeAt(t+e+1);return r===58&&i===58?t+2:this.input.slice(t+e,t+e+12)==="flow-include"?t+12:r===58&&i!==58?t:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(g.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(M.EnumBooleanMemberNotInitialized,e,{memberName:r,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?t.explicitType==="symbol"?M.EnumInvalidMemberInitializerSymbolType:M.EnumInvalidMemberInitializerPrimaryType:M.EnumInvalidMemberInitializerUnknownType,e,t)}flowEnumErrorNumberMemberNotInitialized(e,t){this.raise(M.EnumNumberMemberNotInitialized,e,t)}flowEnumErrorStringMemberInconsistentlyInitialized(e,t){this.raise(M.EnumStringMemberInconsistentlyInitialized,e,t)}flowEnumMemberInit(){let e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let r=this.parseNumericLiteral(this.state.value);return t()?{type:"number",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 134:{let r=this.parseStringLiteral(this.state.value);return t()?{type:"string",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 85:case 86:{let r=this.parseBooleanLiteral(this.match(85));return t()?{type:"boolean",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,t=this.parseIdentifier(!0),r=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:t,init:r}}flowEnumCheckExplicitTypeMismatch(e,t,r){let{explicitType:i}=t;i!==null&&i!==r&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){let r=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},a=!1;for(;!this.match(8);){if(this.eat(21)){a=!0;break}let o=this.startNode(),{id:l,init:c}=this.flowEnumMemberRaw(),p=l.name;if(p==="")continue;/^[a-z]/.test(p)&&this.raise(M.EnumInvalidMemberName,l,{memberName:p,suggestion:p[0].toUpperCase()+p.slice(1),enumName:e}),r.has(p)&&this.raise(M.EnumDuplicateMemberName,l,{memberName:p,enumName:e}),r.add(p);let u={enumName:e,explicitType:t,memberName:p};switch(o.id=l,c.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(c.loc,u,"boolean"),o.init=c.value,i.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(c.loc,u,"number"),o.init=c.value,i.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(c.loc,u,"string"),o.init=c.value,i.stringMembers.push(this.finishNode(o,"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(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:i,hasUnknownMembers:a}}flowEnumStringMembers(e,t,{enumName:r}){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:r});return t}else{for(let i of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:r});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!V(this.state.type))throw this.raise(M.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:t}=this.state;return this.next(),t!=="boolean"&&t!=="number"&&t!=="string"&&t!=="symbol"&&this.raise(M.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){let r=t.name,i=t.loc.start,a=this.flowEnumParseExplicitType({enumName:r});this.expect(5);let{members:o,hasUnknownMembers:l}=this.flowEnumMembers({enumName:r,explicitType:a});switch(e.hasUnknownMembers=l,a){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.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=o.booleanMembers.length,u=o.numberMembers.length,d=o.stringMembers.length,m=o.defaultedMembers.length;if(!p&&!u&&!d&&!m)return c();if(!p&&!u)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!u&&!d&&p>=m){for(let f of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(f.loc.start,{enumName:r,memberName:f.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!p&&!d&&u>=m){for(let f of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(f.loc.start,{enumName:r,memberName:f.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(M.EnumInconsistentMemberValues,i,{enumName:r}),c()}}}flowParseEnumDeclaration(e){let t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,"EnumDeclaration")}jsxParseOpeningElementAfterName(e){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(e.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(e)}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let t=this.input.charCodeAt(e+1);return t!==60&&t!==61}return!1}reScan_lt_gt(){let{type:e}=this.state;e===47?(this.state.pos-=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}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},cp={__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"},rt=$e`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:s})=>`Expected corresponding JSX closing tag for <${s}>.`,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:s,HTMLEntity:n})=>`Unexpected token \`${s}\`. Did you mean \`${n}\` or \`{'${s}'}\`?`,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 Je(s){return s?s.type==="JSXOpeningFragment"||s.type==="JSXClosingFragment":!1}function ht(s){if(s.type==="JSXIdentifier")return s.name;if(s.type==="JSXNamespacedName")return s.namespace.name+":"+s.name.name;if(s.type==="JSXMemberExpression")return ht(s.object)+"."+ht(s.property);throw new Error("Node had unexpected type: "+s.type)}var pp=s=>class extends s{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(rt.UnterminatedJsxContent,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:if(this.state.pos===this.state.start){r===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(r);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:gt(r)?(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),r;return++this.state.pos,t===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,r=e?`
|
|
7
7
|
`:`\r
|
|
8
|
-
`):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(e){let t="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(g.UnterminatedString,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);if(i===e)break;i===38?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):gt(i)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}t+=this.input.slice(r,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 r=this.readInt(t,void 0,!1,"bail");if(r!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(r)}else{let t=0,r=!1;for(;t++<10&&this.state.pos<this.length&&!(r=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(r){let i=this.input.slice(e,this.state.pos),a=cp[i];if(++this.state.pos,a)return a}}return this.state.pos=e,"&"}jsxReadWord(){let e,t=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(bt(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:cr(this.state.type)?e.name=Xe(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 r=this.startNodeAt(e);return r.namespace=t,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,t=this.jsxParseNamespacedName();if(t.type==="JSXNamespacedName")return t;for(;this.eat(16);){let r=this.startNodeAt(e);r.object=t,r.property=this.jsxParseIdentifier(),t=this.finishNode(r,"JSXMemberExpression")}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(j.brace),this.next(),e=this.jsxParseExpressionContainer(e,j.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(rt.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(rt.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(j.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,t){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let r=this.parseExpression();e.expression=r}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(j.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(j.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),r=[],i=this.jsxParseOpeningElementAt(e),a=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case 143:if(e=this.state.startLoc,this.next(),this.eat(56)){a=this.jsxParseClosingElementAt(e);break e}r.push(this.jsxParseElementAt(e));break;case 142:r.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let o=this.startNode();this.setContext(j.brace),this.next(),this.match(21)?r.push(this.jsxParseSpreadChild(o)):r.push(this.jsxParseExpressionContainer(o,j.j_expr));break}default:this.unexpected()}Je(i)&&!Je(a)&&a!==null?this.raise(rt.MissingClosingTagFragment,a):!Je(i)&&Je(a)?this.raise(rt.MissingClosingTagElement,a,{openingTagName:ht(i.name)}):!Je(i)&&!Je(a)&&ht(a.name)!==ht(i.name)&&this.raise(rt.MissingClosingTagElement,a,{openingTagName:ht(i.name)})}if(Je(i)?(t.openingFragment=i,t.closingFragment=a):(t.openingElement=i,t.closingElement=a),t.children=r,this.match(47))throw this.raise(rt.UnwrappedAdjacentJSXElements,this.state.startLoc);return Je(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===j.j_expr){this.jsxReadToken();return}if(t===j.j_oTag||t===j.j_cTag){if(ze(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(144);return}if((e===34||e===39)&&t===j.j_oTag){this.jsxReadString(e);return}}if(e===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(e)}updateContext(e){let{context:t,type:r}=this.state;if(r===56&&e===143)t.splice(-2,2,j.j_cTag),this.state.canStartJSXElement=!1;else if(r===143)t.push(j.j_oTag);else if(r===144){let i=t[t.length-1];i===j.j_oTag&&e===56||i===j.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===j.j_expr):(this.setContext(j.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=Ec(r)}},Qs=class extends Wt{constructor(...n){super(...n),this.tsNames=new Map}},Zs=class extends qt{constructor(...n){super(...n),this.importsStack=[]}createScope(n){return this.importsStack.push(new Set),new Qs(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 r=0;r<t-1;r++)if(this.importsStack[r].has(n))return!0}return!1}declareName(n,e,t){if(e&4096){this.hasImport(n,!0)&&this.parser.raise(g.VarRedeclaration,t,{identifierName:n}),this.importsStack[this.importsStack.length-1].add(n);return}let r=this.currentScope(),i=r.tsNames.get(n)||0;if(e&1024){this.maybeExportDefined(r,n),r.tsNames.set(n,i|16);return}super.declareName(n,e,t),e&2&&(e&1||(this.checkRedeclarationInScope(r,n,e,t),this.maybeExportDefined(r,n)),i=i|1),e&256&&(i=i|2),e&512&&(i=i|4),e&128&&(i=i|8),i&&r.tsNames.set(n,i)}isRedeclaredInScope(n,e,t){let r=n.tsNames.get(e);if((r&2)>0){if(t&256){let i=!!(t&512),a=(r&4)>0;return i!==a}return!0}return t&128&&(r&8)>0?n.names.get(e)&2?!!(t&1):!1:t&2&&(r&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 r=t-1;r>=0;r--){let a=this.scopeStack[r].tsNames.get(e);if((a&1)>0||(a&16)>0)return}super.checkLocalExport(n)}},ta=s=>s.type==="ParenthesizedExpression"?ta(s.expression):s,er=class extends Ys{toAssignable(n,e=!1){var t,r;let i;switch((n.type==="ParenthesizedExpression"||(t=n.extra)!=null&&t.parenthesized)&&(i=ta(n),e?i.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(g.InvalidParenthesizedAssignment,n):i.type!=="MemberExpression"&&!this.isOptionalMemberExpression(i)&&this.raise(g.InvalidParenthesizedAssignment,n):this.raise(g.InvalidParenthesizedAssignment,n)),n.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":n.type="ObjectPattern";for(let o=0,l=n.properties.length,c=l-1;o<l;o++){var a;let p=n.properties[o],u=o===c;this.toAssignableObjectExpressionProp(p,u,e),u&&p.type==="RestElement"&&(a=n.extra)!=null&&a.trailingCommaLoc&&this.raise(g.RestTrailingComma,n.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:o,value:l}=n;this.isPrivateName(o)&&this.classScope.usePrivateName(this.getPrivateNameSV(o),o.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,(r=n.extra)==null?void 0:r.trailingCommaLoc,e);break;case"AssignmentExpression":n.operator!=="="&&this.raise(g.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"?g.PatternHasAccessor:g.PatternHasMethod,n.key);else if(n.type==="SpreadElement"){n.type="RestElement";let r=n.argument;this.checkToRestConversion(r,!1),this.toAssignable(r,t),e||this.raise(g.RestTrailingComma,n)}else this.toAssignable(n,t)}toAssignableList(n,e,t){let r=n.length-1;for(let i=0;i<=r;i++){let a=n[i];if(a){if(a.type==="SpreadElement"){a.type="RestElement";let o=a.argument;this.checkToRestConversion(o,!0),this.toAssignable(o,t)}else this.toAssignable(a,t);a.type==="RestElement"&&(i<r?this.raise(g.RestTrailingComma,a):e&&this.raise(g.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((r,i)=>r.type!=="ObjectMethod"&&(i===t||r.type!=="SpreadElement")&&this.isAssignable(r))}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 r=t&1,i=[],a=!0;for(;!this.eat(n);)if(a?a=!1:this.expect(12),r&&this.match(12))i.push(null);else{if(this.eat(n))break;if(this.match(21)){let o=this.parseRestBinding();if((this.hasPlugin("flow")||t&2)&&(o=this.parseFunctionParamType(o)),i.push(o),!this.checkCommaAfterRest(e)){this.expect(n);break}}else{let o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(g.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());i.push(this.parseAssignableListItem(t,o))}}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 r=this.parseMaybeDefault(t.loc.start,t);return e.length&&(t.decorators=e),r}parseFunctionParamType(n){return n}parseMaybeDefault(n,e){var t,r;if((t=n)!=null||(n=this.state.startLoc),e=(r=e)!=null?r: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,r=!1,i=!1,a=!1){var o;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(g.InvalidLhsOptionalChaining,n,{ancestor:e})),t!==64&&this.raise(g.InvalidPropertyBindingPattern,n);return}if(l==="Identifier"){this.checkIdentifier(n,t,i);let{name:b}=n;r&&(r.has(b)?this.raise(g.ParamDupe,n):r.add(b));return}let p=this.isValidLVal(l,!(a||(o=n.extra)!=null&&o.parenthesized)&&e.type==="AssignmentExpression",t);if(p===!0)return;if(p===!1){let b=t===64?g.InvalidLhs:g.InvalidLhsBinding;this.raise(b,n,{ancestor:e});return}let u,d;typeof p=="string"?(u=p,d=l==="ParenthesizedExpression"):[u,d]=p;let m=l==="ArrayPattern"||l==="ObjectPattern"?{type:l}:e,f=n[u];if(Array.isArray(f))for(let b of f)b&&this.checkLVal(b,m,t,r,i,d);else f&&this.checkLVal(f,m,t,r,i,d)}checkIdentifier(n,e,t=!1){this.state.strict&&(t?Xi(n.name,this.inModule):Ji(n.name))&&(e===64?this.raise(g.StrictEvalArguments,n,{referenceName:n.name}):this.raise(g.StrictEvalArgumentsBinding,n,{bindingName:n.name})),e&8192&&n.name==="let"&&this.raise(g.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(g.InvalidRestAssignmentPattern,n)}}checkCommaAfterRest(n){return this.match(12)?(this.raise(this.lookaheadCharCode()===n?g.RestTrailingComma:g.ElementAfterRest,this.state.startLoc),!0):!1}};function up(s){if(s==null)throw new Error(`Unexpected ${s} value.`);return s}function _i(s){if(!s)throw new Error("Assert fail")}var A=$e`typescript`({AbstractMethodHasImplementation:({methodName:s})=>`Method '${s}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:s})=>`Property '${s}' 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:s})=>`'declare' is not allowed in ${s}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:s})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:s})=>`Duplicate modifier: '${s}'.`,EmptyHeritageClauseType:({token:s})=>`'${s}' 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:s})=>`'${s[0]}' modifier cannot be used with '${s[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:s})=>`Index signatures cannot have an accessibility modifier ('${s}').`,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:s})=>`'${s}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:s})=>`'${s}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:s})=>`'${s}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:s})=>`'${s[0]}' modifier must precede '${s[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:s})=>`Private elements cannot have an accessibility modifier ('${s}').`,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:s})=>`Single type parameter ${s} should have a trailing comma. Example usage: <${s},>.`,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:s})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${s}.`});function dp(s){switch(s){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 Ri(s){return s==="private"||s==="public"||s==="protected"}function fp(s){return s==="in"||s==="out"}var mp=s=>class extends s{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:A.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:A.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:A.InvalidModifierOnTypeParameter})}getScopeHandler(){return Zs}tsIsIdentifier(){return V(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(!V(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let r=this.state.value;if(e.includes(r)){if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:r,errorTemplate:i=A.InvalidModifierOnTypeMember},a){let o=(c,p,u,d)=>{p===u&&a[d]&&this.raise(A.InvalidModifiersOrder,c,{orderedModifiers:[u,d]})},l=(c,p,u,d)=>{(a[u]&&p===d||a[d]&&p===u)&&this.raise(A.IncompatibleModifiers,c,{modifiers:[u,d]})};for(;;){let{startLoc:c}=this.state,p=this.tsParseModifier(e.concat(t??[]),r);if(!p)break;Ri(p)?a.accessibility?this.raise(A.DuplicateAccessibilityModifier,c,{modifier:p}):(o(c,p,p,"override"),o(c,p,p,"static"),o(c,p,p,"readonly"),a.accessibility=p):fp(p)?(a[p]&&this.raise(A.DuplicateModifier,c,{modifier:p}),a[p]=!0,o(c,p,"in","out")):(hasOwnProperty.call(a,p)?this.raise(A.DuplicateModifier,c,{modifier:p}):(o(c,p,"static","readonly"),o(c,p,"static","override"),o(c,p,"override","readonly"),o(c,p,"abstract","override"),l(c,p,"declare","override"),l(c,p,"static","abstract")),a[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 r=[];for(;!this.tsIsListTerminator(e);)r.push(t());return r}tsParseDelimitedList(e,t,r){return up(this.tsParseDelimitedListWorker(e,t,!0,r))}tsParseDelimitedListWorker(e,t,r,i){let a=[],o=-1;for(;!this.tsIsListTerminator(e);){o=-1;let l=t();if(l==null)return;if(a.push(l),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;r&&this.expect(12);return}return i&&(i.value=o),a}tsParseBracketedList(e,t,r,i,a){i||(r?this.expect(0):this.expect(47));let o=this.tsParseDelimitedList(e,t,a);return r?this.expect(3):this.expect(48),o}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(134)?e.argument=this.parseStringLiteral(this.state.value):(this.raise(A.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(3)),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e){let t;if(e&1&&this.match(78))if(e&2)t=this.parseIdentifier(!0);else{let r=this.startNode();this.next(),t=this.finishNode(r,"ThisExpression")}else t=this.parseIdentifier(!!(e&1));for(;this.eat(16);){let r=this.startNodeAtNode(t);r.left=t,r.right=this.parseIdentifier(!!(e&1)),t=this.finishNode(r,"TSQualifiedName")}return t}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let t=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let r={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,r),t.params.length===0&&this.raise(A.EmptyTypeParameters,t),r.value!==-1&&this.addExtra(t,"trailingComma",r.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){let r=e===19,i="parameters",a="typeAnnotation";t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t[i]=this.tsParseBindingListForSignature(),r?t[a]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(t[a]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let t of e){let{type:r}=t;(r==="AssignmentPattern"||r==="TSParameterProperty")&&this.raise(A.UnsupportedSignatureParameterKind,t,{type:r})}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(),V(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 r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){this.eat(17)&&(e.optional=!0);let r=e;if(this.match(10)||this.match(47)){t&&this.raise(A.ReadonlyForMethodSignature,e);let i=r;i.kind&&this.match(47)&&this.raise(A.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,i),this.tsParseTypeMemberSemicolon();let a="parameters",o="typeAnnotation";if(i.kind==="get")i[a].length>0&&(this.raise(g.BadGetterArity,this.state.curPosition()),this.isThisParam(i[a][0])&&this.raise(A.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(i.kind==="set"){if(i[a].length!==1)this.raise(g.BadSetterArity,this.state.curPosition());else{let l=i[a][0];this.isThisParam(l)&&this.raise(A.AccessorCannotDeclareThisParameter,this.state.curPosition()),l.type==="Identifier"&&l.optional&&this.raise(A.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),l.type==="RestElement"&&this.raise(A.SetAccessorCannotHaveRestParameter,this.state.curPosition())}i[o]&&this.raise(A.SetAccessorCannotHaveReturnType,i[o])}else i.kind="method";return this.finishNode(i,"TSMethodSignature")}else{let i=r;t&&(i.readonly=!0);let a=this.tsTryParseTypeAnnotation();return a&&(i.typeAnnotation=a),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 r=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(r,"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(r=>{let{type:i}=r;t&&i!=="TSRestType"&&i!=="TSOptionalType"&&!(i==="TSNamedTupleMember"&&r.optional)&&this.raise(A.OptionalTypeBeforeRequired,r),t||(t=i==="TSNamedTupleMember"&&r.optional||i==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let{startLoc:e}=this.state,t=this.eat(21),r,i,a,o,c=Ee(this.state.type)?this.lookaheadCharCode():null;if(c===58)r=!0,a=!1,i=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(c===63){a=!0;let p=this.state.startLoc,u=this.state.value,d=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(r=!0,i=this.createIdentifier(this.startNodeAt(p),u),this.expect(17),this.expect(14),o=this.tsParseType()):(r=!1,o=d,this.expect(17))}else o=this.tsParseType(),a=this.eat(17),r=this.eat(14);if(r){let p;i?(p=this.startNodeAtNode(i),p.optional=a,p.label=i,p.elementType=o,this.eat(17)&&(p.optional=!0,this.raise(A.TupleOptionalAfterType,this.state.lastTokStartLoc))):(p=this.startNodeAtNode(o),p.optional=a,this.raise(A.InvalidTupleMemberLabel,o),p.label=o,p.elementType=this.tsParseType()),o=this.finishNode(p,"TSNamedTupleMember")}else if(a){let p=this.startNodeAtNode(o);p.typeAnnotation=o,o=this.finishNode(p,"TSOptionalType")}if(t){let p=this.startNodeAt(e);p.typeAnnotation=o,o=this.finishNode(p,"TSRestType")}return o}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){let r=this.startNode();return e==="TSConstructorType"&&(r.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,r)),this.finishNode(r,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(V(e)||e===88||e===84){let t=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":dp(this.state.value);if(t!==void 0&&this.lookaheadCharCode()!==46){let r=this.startNode();return this.next(),this.finishNode(r,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(A.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 Nc(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,t,r){let i=this.startNode(),a=this.eat(r),o=[];do o.push(t());while(this.eat(r));return o.length===1&&!a?o[0]:(i.types=o,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(V(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 r=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(78)){let l=this.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(r.parameterName=l,r.asserts=!0,r.typeAnnotation=null,l=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(l,r),l.asserts=!0),t.typeAnnotation=l,this.finishNode(t,"TSTypeAnnotation")}let a=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!a)return i?(r.parameterName=this.parseIdentifier(),r.asserts=i,r.typeAnnotation=null,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);let o=this.tsParseTypeAnnotation(!1);return r.parameterName=a,r.typeAnnotation=o,r.asserts=i,t.typeAnnotation=this.finishNode(r,"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(),!V(this.state.type)&&!this.match(78)?!1:(e&&this.raise(g.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(){_i(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(A.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,r=this.tsParseDelimitedList("HeritageClauseElement",()=>{let i=this.startNode();return i.expression=this.tsParseEntityName(3),this.match(47)&&(i.typeParameters=this.tsParseTypeArguments()),this.finishNode(i,"TSExpressionWithTypeArguments")});return r.length||this.raise(A.EmptyHeritageClauseType,t,{token:e}),r}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),t.declare&&(e.declare=!0),V(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(A.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(r,"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")}tsInTopLevelContext(e){if(this.curContext()!==j.brace){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}else return e()}tsInType(e){let t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseEnumBody(){let e=this.startNode();return this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumBody")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){let r=this.startNode();this.tsParseModuleOrNamespaceDeclaration(r,!0),e.body=r}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,r){e.isExport=r||!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(A.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(0)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let t=this.state.clone(),r=e();return this.state=t,r}tsTryParseAndCatch(e){let t=this.tryParse(r=>e()||r());if(!(t.aborted||!t.node))return t.error&&(this.state=t.failState),t.node}tsTryParse(e){let t=this.state.clone(),r=e();if(r!==void 0&&r!==!1)return r;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t=this.state.type,r;return this.isContextual(100)&&(t=74,r="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,r||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(V(t))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,t,r){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",e.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,r)}}tsParseDeclaration(e,t,r,i){switch(t){case"abstract":if(this.tsCheckLineTerminator(r)&&(this.match(80)||V(this.state.type)))return this.tsParseAbstractDeclaration(e,i);break;case"module":if(this.tsCheckLineTerminator(r)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(e);if(V(this.state.type))return e.kind="module",this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(r)&&V(this.state.type))return e.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(r)&&V(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 r=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,!!r)return super.parseArrowExpression(r,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(A.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===j.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Mc(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){let r=this.state.startLoc,i={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},i);let a=i.accessibility,o=i.override,l=i.readonly;!(e&4)&&(a||l||o)&&this.raise(A.UnexpectedParameterModifier,r);let c=this.parseMaybeDefault();e&2&&this.parseFunctionParamType(c);let p=this.parseMaybeDefault(c.loc.start,c);if(a||l||o){let u=this.startNodeAt(r);return t.length&&(u.decorators=t),a&&(u.accessibility=a),l&&(u.readonly=l),o&&(u.override=o),p.type!=="Identifier"&&p.type!=="AssignmentPattern"&&this.raise(A.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(A.PatternIsOptional,t)}setArrowFunctionParameters(e,t,r){super.setArrowFunctionParameters(e,t,r),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,r=!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(A.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,i,r):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,r))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(t=>{t?.type==="TSTypeCastExpression"&&this.raise(A.UnexpectedTypeAnnotation,t.typeAnnotation)})}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,r,i){let a=super.parseArrayLike(e,t,r,i);return a.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(a.elements),a}parseSubscript(e,t,r,i){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(t);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let a=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(r)return i.stop=!0,e;i.optionalChainMember=a=!0,this.next()}if(this.match(47)||this.match(51)){let o,l=this.tsTryParseAndCatch(()=>{if(!r&&this.atPossibleAsyncArrow(e)){let d=this.tsTryParseGenericAsyncArrowFunction(t);if(d)return d}let c=this.tsParseTypeArgumentsInExpression();if(!c)return;if(a&&!this.match(10)){o=this.state.curPosition();return}if(kn(this.state.type)){let d=super.parseTaggedTemplateExpression(e,t,i);return d.typeParameters=c,d}if(!r&&this.eat(10)){let d=this.startNodeAt(t);return d.callee=e,d.arguments=this.parseCallExpressionArguments(11),this.tsCheckForInvalidTypeCasts(d.arguments),d.typeParameters=c,i.optionalChainMember&&(d.optional=a),this.finishCallExpression(d,i.optionalChainMember)}let p=this.state.type;if(p===48||p===52||p!==10&&Us(p)&&!this.hasPrecedingLineBreak())return;let u=this.startNodeAt(t);return u.expression=e,u.typeParameters=c,this.finishNode(u,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),l)return l.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(A.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),l}return super.parseSubscript(e,t,r,i)}parseNewCallee(e){var t;super.parseNewCallee(e);let{callee:r}=e;r.type==="TSInstantiationExpression"&&!((t=r.extra)!=null&&t.parenthesized)&&(e.typeParameters=r.typeParameters,e.callee=r.expression)}parseExprOp(e,t,r){let i;if(An(58)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(i=this.isContextual(120)))){let a=this.startNodeAt(t);return a.expression=e,a.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(i&&this.raise(g.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(a,i?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(a,t,r)}return super.parseExprOp(e,t,r)}checkReservedWord(e,t,r,i){this.state.isAmbientContext||super.checkReservedWord(e,t,r,i)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(A.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,r,i){super.applyImportPhase(e,t,r,i),t?e.exportKind=r==="type"?"type":"value":e.importKind=r==="type"||r==="typeof"?r:"value"}parseImport(e){if(this.match(134))return e.importKind="value",super.parseImport(e);let t;if(V(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let r=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,r);t=super.parseImportSpecifiersAndAfter(e,r)}else t=super.parseImport(e);return t.importKind==="type"&&t.specifiers.length>1&&t.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(A.TypeImportCannotSpecifyDefaultAndNamed,t),t}parseExport(e,t){if(this.match(83)){this.next();let r=e,i=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?i=this.parseMaybeImportPhase(r,!1):r.importKind="value",this.tsParseImportEqualsDeclaration(r,i,!0)}else if(this.eat(29)){let r=e;return r.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExportAssignment")}else if(this.eatContextual(93)){let r=e;return this.expectContextual(128),r.id=this.parseIdentifier(),this.semicolon(),this.finishNode(r,"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,r=!1){let{isAmbientContext:i}=this.state,a=super.parseVarStatement(e,t,r||i);if(!i)return a;for(let{id:o,init:l}of a.declarations)l&&(t!=="const"||o.typeAnnotation?this.raise(A.InitializerNotAllowedInAmbientContext,l):bp(l,this.hasPlugin("estree"))||this.raise(A.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,l));return a}parseStatementContent(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){let r=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(r,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some(r=>Ri(r)?e.accessibility===r:!!e[r])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,t,r){let i=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:i,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:A.InvalidModifierOnTypeParameterPositions},t);let a=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,i)&&this.raise(A.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,r,!!t.static)};t.declare?this.tsInAmbientContext(a):a()}parseClassMemberWithIsStatic(e,t,r,i){let a=this.tsTryParseIndexSignature(t);if(a){e.body.push(a),t.abstract&&this.raise(A.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(A.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(A.IndexSignatureHasDeclare,t),t.override&&this.raise(A.IndexSignatureHasOverride,t);return}!this.state.inAbstractClass&&t.abstract&&this.raise(A.NonAbstractClassHasAbstractMethod,t),t.override&&(r.hadSuperClass||this.raise(A.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,r,i)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(A.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(A.ClassMethodHasDeclare,e)}parseExpressionStatement(e,t,r){return(t.type==="Identifier"?this.tsParseExpressionStatement(e,t,r):void 0)||super.parseExpressionStatement(e,t,r)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,t,r){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,t,r);let i=this.tryParse(()=>super.parseConditional(e,t));return i.node?(i.error&&(this.state=i.failState),i.node):(i.error&&super.setOptionalParametersError(r,i.error),e)}parseParenItem(e,t){let r=super.parseParenItem(e,t);if(this.eat(17)&&(r.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,r=this.eatContextual(125);if(r&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(A.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let a=V(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return a?((a.type==="TSInterfaceDeclaration"||a.type==="TSTypeAliasDeclaration"||r)&&(e.exportKind="type"),r&&(this.resetStartLocation(a,t),a.declare=!0),a):null}parseClassId(e,t,r,i){if((!t||r)&&this.isContextual(113))return;super.parseClassId(e,t,r,e.declare?1024:8331);let a=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);a&&(e.typeParameters=a)}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(A.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){let{key:t}=e;this.raise(A.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(A.PrivateElementHasAbstract,e),e.accessibility&&this.raise(A.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(A.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,r,i,a,o){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);l&&a&&this.raise(A.ConstructorHasTypeParameters,l);let{declare:c=!1,kind:p}=t;c&&(p==="get"||p==="set")&&this.raise(A.DeclareAccessor,t,{kind:p}),l&&(t.typeParameters=l),super.pushClassMethod(e,t,r,i,a,o)}pushClassPrivateMethod(e,t,r,i){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(t.typeParameters=a),super.pushClassPrivateMethod(e,t,r,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,r,i,a,o,l){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);return c&&(e.typeParameters=c),super.parseObjPropValue(e,t,r,i,a,o,l)}parseFunctionParams(e,t){let r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(e.typeParameters=r),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let r=this.tsTryParseTypeAnnotation();r&&(e.id.typeAnnotation=r,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var r,i,a,o,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:f}=this.state,b=f[f.length-1];(b===j.j_oTag||b===j.j_expr)&&f.pop()}if(!((r=p)!=null&&r.error)&&!this.match(47))return super.parseMaybeAssign(e,t);(!c||c===this.state)&&(c=this.state.clone());let d,m=this.tryParse(f=>{var b,h;d=this.tsParseTypeParameters(this.tsParseConstModifier);let y=super.parseMaybeAssign(e,t);return(y.type!=="ArrowFunctionExpression"||(b=y.extra)!=null&&b.parenthesized)&&f(),((h=d)==null?void 0:h.params.length)!==0&&this.resetStartLocationFromNode(y,d),y.typeParameters=d,y},c);if(!m.error&&!m.aborted)return d&&this.reportReservedArrowTypeParam(d),m.node;if(!p&&(_i(!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,d&&this.reportReservedArrowTypeParam(d),m.node;if((a=u)!=null&&a.node)return this.state=u.failState,u.node;throw((o=p)==null?void 0:o.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(A.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(r=>{let i=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&r(),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(A.UnexpectedTypeCastInParameter,e):this.raise(A.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,r){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(r!==64||!t)&&["expression",!0];default:return super.isValidLVal(e,t,r)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e,t){if(this.match(47)||this.match(51)){let r=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let i=super.parseMaybeDecoratorArguments(e,t);return i.typeParameters=r,i}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e,t)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){let r=super.parseMaybeDefault(e,t);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(A.TypeAnnotationAfterAssign,r.typeAnnotation),r}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,r){for(let i=0;i<e.length;i++){let a=e[i];a?.type==="TSTypeCastExpression"&&(e[i]=this.typeCastToParameter(a))}super.toAssignableList(e,t,r)}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:r}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return e()}finally{this.state.isAmbientContext=t,this.state.strict=r}}parseClass(e,t,r){let i=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,r)}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(A.NonClassMethodPropertyHasAbstractModifer,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,t,r,i,a,o,l){let c=super.parseMethod(e,t,r,i,a,o,l);if(c.abstract&&(this.hasPlugin("estree")?c.value:c).body){let{key:d}=c;this.raise(A.AbstractMethodHasImplementation,c,{methodName:d.type==="Identifier"&&!c.computed?d.name:`[${this.input.slice(this.offsetToSourcePos(d.start),this.offsetToSourcePos(d.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,r,i){return!t&&i?(this.parseTypeOnlyImportExportSpecifier(e,!1,r),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,r,i))}parseImportSpecifier(e,t,r,i,a){return!t&&i?(this.parseTypeOnlyImportExportSpecifier(e,!0,r),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,r,i,r?4098:4096))}parseTypeOnlyImportExportSpecifier(e,t,r){let i=t?"imported":"local",a=t?"local":"exported",o=e[i],l,c=!1,p=!0,u=o.loc.start;if(this.isContextual(93)){let m=this.parseIdentifier();if(this.isContextual(93)){let f=this.parseIdentifier();Ee(this.state.type)?(c=!0,o=m,l=t?this.parseIdentifier():this.parseModuleExportName(),p=!1):(l=f,p=!1)}else Ee(this.state.type)?(p=!1,l=t?this.parseIdentifier():this.parseModuleExportName()):(c=!0,o=m)}else Ee(this.state.type)&&(c=!0,t?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());c&&r&&this.raise(t?A.TypeModifierIsUsedInTypeImports:A.TypeModifierIsUsedInTypeExports,u),e[i]=o,e[a]=l;let d=t?"importKind":"exportKind";e[d]=c?"type":"value",p&&this.eatContextual(93)&&(e[a]=t?this.parseIdentifier():this.parseModuleExportName()),e[a]||(e[a]=He(e[i])),t&&this.checkIdentifier(e[a],c?4098:4096)}};function hp(s){if(s.type!=="MemberExpression")return!1;let{computed:n,property:e}=s;return n&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:sa(s.object)}function bp(s,n){var e;let{type:t}=s;if((e=s.extra)!=null&&e.parenthesized)return!1;if(n){if(t==="Literal"){let{value:r}=s;if(typeof r=="string"||typeof r=="boolean")return!0}}else if(t==="StringLiteral"||t==="BooleanLiteral")return!0;return!!(na(s,n)||gp(s,n)||t==="TemplateLiteral"&&s.expressions.length===0||hp(s))}function na(s,n){return n?s.type==="Literal"&&(typeof s.value=="number"||"bigint"in s):s.type==="NumericLiteral"||s.type==="BigIntLiteral"}function gp(s,n){if(s.type==="UnaryExpression"){let{operator:e,argument:t}=s;if(e==="-"&&na(t,n))return!0}return!1}function sa(s){return s.type==="Identifier"?!0:s.type!=="MemberExpression"||s.computed?!1:sa(s.object)}var ji=$e`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),yp=s=>class extends s{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 r=e;return(!r.expectedNode||!r.type)&&(r=this.finishNode(r,"Placeholder")),r.expectedNode=t,r}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,r,i){e!==void 0&&super.checkReservedWord(e,t,r,i)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,r){return e==="Placeholder"||super.isValidLVal(e,t,r)}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 r;if(t.type!=="Placeholder"||(r=t.extra)!=null&&r.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){let a=e;return a.label=this.finishPlaceholder(t,"Identifier"),this.next(),a.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(a,"LabeledStatement")}this.semicolon();let i=e;return i.name=t.name,this.finishPlaceholder(i,"Statement")}parseBlock(e,t,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,t,r)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,t,r){let i=t?"ClassDeclaration":"ClassExpression";this.next();let a=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(133)||this.match(5))e.id=o;else{if(r||!t)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,i);throw this.raise(ji.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,t,r);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,a),this.finishNode(e,i)}parseExport(e,t){let r=this.parsePlaceholder("Identifier");if(!r)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(r,"Declaration"),this.finishNode(i,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let a=this.startNode();return a.exported=r,i.specifiers=[this.finishNode(a,"ExportDefaultSpecifier")],super.parseExport(i,t)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(Xe(133),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var r;return(r=e.specifiers)!=null&&r.length?!0:super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){let{specifiers:t}=e;t!=null&&t.length&&(e.specifiers=t.filter(r=>r.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 r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishNode(r,"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(ji.UnexpectedSpace,this.state.lastTokEndLoc)}},vp=s=>class extends s{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,t=this.startNode();if(this.next(),V(this.state.type)){let r=this.parseIdentifierName(),i=this.createIdentifier(t,r);if(i.type="V8IntrinsicIdentifier",this.match(10))return i}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},Vi=["minimal","fsharp","hack","smart"],zi=["^^","@@","^","%","#"];function xp(s){if(s.has("decorators")){if(s.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let e=s.get("decorators").decoratorsBeforeExport;if(e!=null&&typeof e!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let t=s.get("decorators").allowCallParenthesized;if(t!=null&&typeof t!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(s.has("flow")&&s.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(s.has("placeholders")&&s.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(s.has("pipelineOperator")){var n;let e=s.get("pipelineOperator").proposal;if(!Vi.includes(e)){let r=Vi.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${r}.`)}let t=((n=s.get("recordAndTuple"))==null?void 0:n.syntaxType)==="hash";if(e==="hack"){if(s.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(s.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let r=s.get("pipelineOperator").topicToken;if(!zi.includes(r)){let i=zi.map(a=>`"${a}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}if(r==="#"&&t)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",s.get("recordAndTuple")])}\`.`)}else if(e==="smart"&&t)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",s.get("recordAndTuple")])}\`.`)}if(s.has("moduleAttributes")){if(s.has("deprecatedImportAssert")||s.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(s.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(s.has("importAssertions")&&s.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(!s.has("deprecatedImportAssert")&&s.has("importAttributes")&&s.get("importAttributes").deprecatedAssertSyntax&&s.set("deprecatedImportAssert",{}),s.has("recordAndTuple")){let e=s.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(r=>`'${r}'`).join(", "))}}if(s.has("asyncDoExpressions")&&!s.has("doExpressions")){let e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(s.has("optionalChainingAssign")&&s.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 ra={estree:Tc,jsx:pp,flow:lp,typescript:mp,v8intrinsic:vp,placeholders:yp},Pp=Object.keys(ra),tr=class extends er{checkProto(n,e,t,r){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(g.RecordNoProto,i);return}t.used&&(r?r.doubleProtoLoc===null&&(r.doubleProtoLoc=i.loc.start):this.raise(g.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.optionFlags&128&&(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 r=this.startNodeAt(e);for(r.expressions=[t];this.eat(12);)r.expressions.push(this.parseMaybeAssign(n));return this.toReferencedList(r.expressions),this.finishNode(r,"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 o=this.parseYield();return e&&(o=e.call(this,o,t)),o}let r;n?r=!1:(n=new yt,r=!0);let{type:i}=this.state;(i===10||V(i))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(n);if(e&&(a=e.call(this,a,t)),Sc(this.state.type)){let o=this.startNodeAt(t),l=this.state.value;if(o.operator=l,this.match(29)){this.toAssignable(a,!0),o.left=a;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 o.left=a;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(a,this.finishNode(o,"AssignmentExpression")),o}else r&&this.checkExpressionErrors(n,!0);return a}parseMaybeConditional(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,r=this.parseExprOps(n);return this.shouldExitDescending(r,t)?r:this.parseConditional(r,e,n)}parseConditional(n,e,t){if(this.eat(17)){let r=this.startNodeAt(e);return r.test=n,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"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,r=this.parseMaybeUnaryOrPrivate(n);return this.shouldExitDescending(r,t)?r:this.parseExprOp(r,e,-1)}parseExprOp(n,e,t){if(this.isPrivateName(n)){let i=this.getPrivateNameSV(n);(t>=An(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(g.PrivateInExpectedIn,n,{identifierName:i}),this.classScope.usePrivateName(i,n.loc.start)}let r=this.state.type;if(Ic(r)&&(this.prodParam.hasIn||!this.match(58))){let i=An(r);if(i>t){if(r===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return n;this.checkPipelineAtInfixOperator(n,e)}let a=this.startNodeAt(e);a.left=n,a.operator=this.state.value;let o=r===41||r===42,l=r===40;if(l&&(i=An(42)),this.next(),r===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(g.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);a.right=this.parseExprOpRightExpr(r,i);let c=this.finishNode(a,o||l?"LogicalExpression":"BinaryExpression"),p=this.state.type;if(l&&(p===41||p===42)||o&&p===40)throw this.raise(g.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"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}if(this.getPluginOption("pipelineOperator","proposal")==="smart")return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(g.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(n,e),t)});default:return this.parseExprOpBaseRightExpr(n,e)}}parseExprOpBaseRightExpr(n,e){let t=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,Lc(n)?e-1:e)}parseHackPipeBody(){var n;let{startLoc:e}=this.state,t=this.parseMaybeAssign();return hc.has(t.type)&&!((n=t.extra)!=null&&n.parenthesized)&&this.raise(g.PipeUnparenthesizedBody,e,{type:t.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(g.PipeTopicUnused,e),t}checkExponentialAfterUnary(n){this.match(57)&&this.raise(g.UnexpectedTokenUnaryExponentiation,n.argument)}parseMaybeUnary(n,e){let t=this.state.startLoc,r=this.isContextual(96);if(r&&this.recordAwaitIfAllowed()){this.next();let l=this.parseAwait(t);return e||this.checkExponentialAfterUnary(l),l}let i=this.match(34),a=this.startNode();if(kc(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let l=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(n,!0),this.state.strict&&l){let c=a.argument;c.type==="Identifier"?this.raise(g.StrictDelete,a):this.hasPropertyAsPrivateName(c)&&this.raise(g.DeletePrivateField,a)}if(!i)return e||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}let o=this.parseUpdate(a,i,n);if(r){let{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?Us(l):Us(l)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(g.AwaitNotInAsyncContext,t),this.parseAwait(t)}return o}parseUpdate(n,e,t){if(e){let a=n;return this.checkLVal(a.argument,this.finishNode(a,"UpdateExpression")),n}let r=this.state.startLoc,i=this.parseExprSubscripts(t);if(this.checkExpressionErrors(t,!1))return i;for(;Fc(this.state.type)&&!this.canInsertSemicolon();){let a=this.startNodeAt(r);a.operator=this.state.value,a.prefix=!1,a.argument=i,this.next(),this.checkLVal(i,i=this.finishNode(a,"UpdateExpression"))}return i}parseExprSubscripts(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,r=this.parseExprAtom(n);return this.shouldExitDescending(r,t)?r:this.parseSubscripts(r,e)}parseSubscripts(n,e,t){let r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(n),stop:!1};do n=this.parseSubscript(n,e,t,r),r.maybeAsyncArrow=!1;while(!r.stop);return n}parseSubscript(n,e,t,r){let{type:i}=this.state;if(!t&&i===15)return this.parseBind(n,e,t,r);if(kn(i))return this.parseTaggedTemplateExpression(n,e,r);let a=!1;if(i===18){if(t&&(this.raise(g.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return r.stop=!0,n;r.optionalChainMember=a=!0,this.next()}if(!t&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(n,e,r,a);{let o=this.eat(0);return o||a||this.eat(16)?this.parseMember(n,e,r,o,a):(r.stop=!0,n)}}parseMember(n,e,t,r,i){let a=this.startNodeAt(e);return a.object=n,a.computed=r,r?(a.property=this.parseExpression(),this.expect(3)):this.match(139)?(n.type==="Super"&&this.raise(g.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),t.optionalChainMember?(a.optional=i,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(n,e,t,r){let i=this.startNodeAt(e);return i.object=n,this.next(),i.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),e,t)}parseCoverCallAndAsyncArrowHead(n,e,t,r){let i=this.state.maybeInArrowParameters,a=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(e);o.callee=n;let{maybeAsyncArrow:l,optionalChainMember:c}=t;l&&(this.expressionScope.enter(ep()),a=new yt),c&&(o.optional=r),r?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,n.type!=="Super",o,a);let p=this.finishCallExpression(o,c);return l&&this.shouldParseAsyncArrow()&&!r?(t.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),p=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),p)):(l&&(this.checkExpressionErrors(a,!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 r=this.startNodeAt(e);return r.tag=n,r.quasi=this.parseTemplate(!0),t.optionalChainMember&&this.raise(g.OptionalChainingNoTemplate,e),this.finishNode(r,"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(g.ImportCallArity,n);else for(let t of n.arguments)t.type==="SpreadElement"&&this.raise(g.ImportCallSpreadArgument,t);return this.finishNode(n,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(n,e,t,r){let i=[],a=!0,o=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(n);){if(a)a=!1;else if(this.expect(12),this.match(n)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}i.push(this.parseExprListItem(!1,r,e))}return this.state.inFSharpPipelineDirectBody=o,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&&Kt(n,e.innerComments),e.callee.trailingComments&&Kt(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:r}=this.state;switch(r){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.optionFlags&256?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(g.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(g.UnsupportedBind,i)}case 139:return this.raise(g.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());ze(i)||i===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(r===137)return this.parseDecimalLiteral(this.state.value);if(V(r)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let i=this.state.potentialArrowAt===this.state.start,a=this.state.containsEsc,o=this.parseIdentifier();if(!a&&o.name==="async"&&!this.canInsertSemicolon()){let{type:l}=this.state;if(l===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(V(l))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(l===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return i&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}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=oe(this.state.endLoc,-1),this.parseTopicReference(t);this.unexpected()}parseTopicReference(n){let e=this.startNode(),t=this.state.startLoc,r=this.state.type;return this.next(),this.finishTopicReference(e,t,n,r)}finishTopicReference(n,e,t,r){if(this.testTopicReferenceConfiguration(t,e,r))return t==="hack"?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(g.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(n,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(g.PrimaryTopicNotAllowed,e),this.registerTopicReference(),this.finishNode(n,"PipelinePrimaryTopicReference"));throw this.raise(g.PipeTopicUnconfiguredToken,e,{token:Xe(r)})}testTopicReferenceConfiguration(n,e,t){switch(n){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Xe(t)}]);case"smart":return t===27;default:throw this.raise(g.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(n){this.prodParam.enter(In(!0,this.prodParam.hasYield));let e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(g.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.optionFlags&16)?this.raise(g.SuperNotAllowed,n):!this.scope.allowSuper&&!(this.optionFlags&16)&&this.raise(g.UnexpectedSuper,n),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(g.UnsupportedSuper,n),this.finishNode(n,"Super")}parsePrivateName(){let n=this.startNode(),e=this.startNodeAt(oe(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 r=this.state.containsEsc;return n.property=this.parseIdentifier(!0),(n.property.name!==t||r)&&this.raise(g.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(g.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let t=this.isContextual(105);if(this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),!(this.optionFlags&256))throw this.raise(g.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(Zc());let r=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let a=this.state.startLoc,o=[],l=new yt,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 f=this.state.startLoc;if(p=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),f)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}let d=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=i;let m=this.startNodeAt(e);return n&&this.shouldParseArrow(o)&&(m=this.parseArrow(m))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(m,o,!1),m):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),u&&this.unexpected(u),p&&this.unexpected(p),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(o,!0),o.length>1?(t=this.startNodeAt(a),t.expressions=o,this.finishNode(t,"SequenceExpression"),this.resetEndLocation(t,d)):t=o[0],this.wrapParenthesis(e,t))}wrapParenthesis(n,e){if(!(this.optionFlags&512))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.optionFlags&4)&&this.raise(g.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(g.ImportCallNotNewExpression,t)}parseTemplateElement(n){let{start:e,startLoc:t,end:r,value:i}=this.state,a=e+1,o=this.startNodeAt(oe(t,1));i===null&&(n||this.raise(g.InvalidEscapeSequenceTemplate,oe(this.state.firstInvalidTemplateEscapePos,1)));let l=this.match(24),c=l?-1:-2,p=r+c;o.value={raw:this.input.slice(a,p).replace(/\r\n?/g,`
|
|
9
|
-
`),cooked:i===null?null:i.slice(1,c)},o.tail=l,this.next();let u=this.finishNode(o,"TemplateElement");return this.resetEndLocation(u,oe(this.state.lastTokEndLoc,c)),u}parseTemplate(n){let e=this.startNode(),t=this.parseTemplateElement(n),r=[t],i=[];for(;!t.tail;)i.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.push(t=this.parseTemplateElement(n));return e.expressions=i,e.quasis=r,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(n,e,t,r){t&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=Object.create(null),o=!0,l=this.startNode();for(l.properties=[],this.next();!this.match(n);){if(o)o=!1;else if(this.expect(12),this.match(n)){this.addTrailingCommaExtraToNode(l);break}let p;e?p=this.parseBindingProperty():(p=this.parsePropertyDefinition(r),this.checkProto(p,t,a,r)),t&&!this.isObjectProperty(p)&&p.type!=="SpreadElement"&&this.raise(g.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(g.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let t=this.startNode(),r=!1,i=!1,a;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(t.decorators=e,e=[]),t.method=!1,n&&(a=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(t);let l=this.state.containsEsc;if(this.parsePropertyName(t,n),!o&&!l&&this.maybeAsyncOrAccessorProp(t)){let{key:c}=t,p=c.name;p==="async"&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(c),o=this.eat(55),this.parsePropertyName(t)),(p==="get"||p==="set")&&(i=!0,this.resetPreviousNodeTrailingComments(c),t.kind=p,this.match(55)&&(o=!0,this.raise(g.AccessorIsGenerator,this.state.curPosition(),{kind:p}),this.next()),this.parsePropertyName(t))}return this.parseObjPropValue(t,a,o,r,!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),r=this.getObjectOrClassMethodParams(n);r.length!==t&&this.raise(n.kind==="get"?g.BadGetterArity:g.BadSetterArity,n),n.kind==="set"&&((e=r[r.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(g.BadSetterRestParameter,n)}parseObjectMethod(n,e,t,r,i){if(i){let a=this.parseMethod(n,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(t||e||this.match(10))return r&&this.unexpected(),n.kind="method",n.method=!0,this.parseMethod(n,e,t,!1,!1,"ObjectMethod")}parseObjectProperty(n,e,t,r){if(n.shorthand=!1,this.eat(14))return n.value=t?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(r),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,He(n.key));else if(this.match(29)){let i=this.state.startLoc;r!=null?r.shorthandAssignLoc===null&&(r.shorthandAssignLoc=i):this.raise(g.InvalidCoverInitializedName,i),n.value=this.parseMaybeDefault(e,He(n.key))}else n.value=He(n.key);return n.shorthand=!0,this.finishNode(n,"ObjectProperty")}}parseObjPropValue(n,e,t,r,i,a,o){let l=this.parseObjectMethod(n,t,r,i,a)||this.parseObjectProperty(n,e,i,o);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:r}=this.state,i;if(Ee(t))i=this.parseIdentifier(!0);else switch(t){case 135:i=this.parseNumericLiteral(r);break;case 134:i=this.parseStringLiteral(r);break;case 136:i=this.parseBigIntLiteral(r);break;case 139:{let a=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=a):this.raise(g.UnexpectedPrivateField,a),i=this.parsePrivateName();break}default:if(t===137){i=this.parseDecimalLiteral(r);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,r,i,a,o=!1){this.initFunction(n,t),n.generator=e,this.scope.enter(18|(o?64:0)|(i?32:0)),this.prodParam.enter(In(t,n.generator)),this.parseFunctionParams(n,r);let l=this.parseFunctionBodyAndFinish(n,a,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(n,e,t,r){t&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=this.startNode();return this.next(),a.elements=this.parseExprList(n,!t,r,a),this.state.inFSharpPipelineDirectBody=i,this.finishNode(a,t?"TupleExpression":"ArrayExpression")}parseArrowExpression(n,e,t,r){this.scope.enter(6);let i=In(t,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(n,t);let a=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(n,e,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(n,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,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 r=e&&!this.match(5);if(this.expressionScope.enter(ea()),r)n.body=this.parseMaybeAssign(),this.checkParams(n,!1,e,!1);else{let i=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),n.body=this.parseBlock(!0,!1,o=>{let l=!this.isSimpleParamList(n.params);o&&l&&this.raise(g.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=a}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,r=!0){let i=!e&&new Set,a={type:"FormalParameters"};for(let o of n.params)this.checkLVal(o,a,5,i,r)}parseExprList(n,e,t,r){let i=[],a=!0;for(;!this.eat(n);){if(a)a=!1;else if(this.expect(12),this.match(n)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}i.push(this.parseExprListItem(e,t))}return i}parseExprListItem(n,e,t){let r;if(this.match(12))n||this.raise(g.UnexpectedToken,this.state.curPosition(),{unexpected:","}),r=null;else if(this.match(21)){let i=this.state.startLoc;r=this.parseParenItem(this.parseSpread(e),i)}else if(this.match(17)){this.expectPlugin("partialApplication"),t||this.raise(g.UnexpectedArgumentPlaceholder,this.state.startLoc);let i=this.startNode();this.next(),r=this.finishNode(i,"ArgumentPlaceholder")}else r=this.parseMaybeAssignAllowIn(e,this.parseParenItem);return r}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:r}=this.state;Ee(r)?e=this.state.value:this.unexpected();let i=Dc(r);return n?i&&this.replaceToken(132):this.checkReservedWord(e,t,i,!1),this.next(),e}checkReservedWord(n,e,t,r){if(n.length>10||!Hc(n))return;if(t&&Vc(n)){this.raise(g.UnexpectedKeyword,e,{keyword:n});return}if((this.state.strict?r?Xi:Ki:qi)(n,this.inModule)){this.raise(g.UnexpectedReservedWord,e,{reservedWord:n});return}else if(n==="yield"){if(this.prodParam.hasYield){this.raise(g.YieldBindingIdentifier,e);return}}else if(n==="await"){if(this.prodParam.hasAwait){this.raise(g.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(g.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(n==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(g.ArgumentsInClass,e);return}}recordAwaitIfAllowed(){let n=this.prodParam.hasAwait||this.optionFlags&1&&!this.scope.inFunction;return n&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),n}parseAwait(n){let e=this.startNodeAt(n);return this.expressionScope.recordParameterInitializerError(g.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(g.ObsoleteAwaitStar,e),!this.scope.inFunction&&!(this.optionFlags&1)&&(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||kn(n)||n===102&&!this.state.containsEsc||n===138||n===56||this.hasPlugin("v8intrinsic")&&n===54}parseYield(){let n=this.startNode();this.expressionScope.recordParameterInitializerError(g.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(g.ImportCallArity,n)}return this.expect(11),this.finishNode(n,"ImportExpression")}checkPipelineAtInfixOperator(n,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&n.type==="SequenceExpression"&&this.raise(g.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(g.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(g.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 r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,n);return this.state.inFSharpPipelineDirectBody=t,r}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){}},Os={kind:1},Tp={kind:2},Cp=/[\uD800-\uDFFF]/u,Bs=/in(?:stanceof)?/y;function wp(s,n,e){for(let t=0;t<s.length;t++){let r=s[t],{type:i}=r;if(typeof i=="number"){{if(i===139){let{loc:a,start:o,value:l,end:c}=r,p=o+1,u=oe(a.start,1);s.splice(t,1,new Le({type:je(27),value:"#",start:o,end:p,startLoc:a.start,endLoc:u}),new Le({type:je(132),value:l,start:p,end:c,startLoc:u,endLoc:a.end})),t++;continue}if(kn(i)){let{loc:a,start:o,value:l,end:c}=r,p=o+1,u=oe(a.start,1),d;n.charCodeAt(o-e)===96?d=new Le({type:je(22),value:"`",start:o,end:p,startLoc:a.start,endLoc:u}):d=new Le({type:je(8),value:"}",start:o,end:p,startLoc:a.start,endLoc:u});let m,f,b,h;i===24?(f=c-1,b=oe(a.end,-1),m=l===null?null:l.slice(1,-1),h=new Le({type:je(22),value:"`",start:f,end:c,startLoc:b,endLoc:a.end})):(f=c-2,b=oe(a.end,-2),m=l===null?null:l.slice(1,-2),h=new Le({type:je(23),value:"${",start:f,end:c,startLoc:b,endLoc:a.end})),s.splice(t,1,d,new Le({type:je(20),value:m,start:p,end:f,startLoc:u,endLoc:b}),h),t+=2;continue}}r.type=je(i)}}return s}var nr=class extends tr{parseTopLevel(n,e){return n.program=this.parseProgram(e),n.comments=this.comments,this.optionFlags&128&&(n.tokens=wp(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.optionFlags&32)&&this.scope.undefinedExports.size>0)for(let[i,a]of Array.from(this.scope.undefinedExports))this.raise(g.ModuleExportUndefined,a,{localName:i});this.addExtra(n,"topLevelAwait",this.state.hasTopLevelAwait)}let r;return e===140?r=this.finishNode(n,"Program"):r=this.finishNodeAt(n,"Program",oe(this.state.startLoc,-1)),r}stmtToDirective(n){let e=n;e.type="Directive",e.value=e.expression,delete e.expression;let t=e.value,r=t.value,i=this.input.slice(this.offsetToSourcePos(t.start),this.offsetToSourcePos(t.end)),a=t.value=i.slice(1,-1);return this.addExtra(t,"raw",i),this.addExtra(t,"rawValue",a),this.addExtra(t,"expressionValue",r),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(ze(n)){if(Bs.lastIndex=e,Bs.test(this.input)){let t=this.codePointAtPos(Bs.lastIndex);if(!bt(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(V(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,r=this.startNode(),i=!!(n&2),a=!!(n&4),o=n&1;switch(t){case 60:return this.parseBreakContinueStatement(r,!0);case 63:return this.parseBreakContinueStatement(r,!1);case 64:return this.parseDebuggerStatement(r);case 90:return this.parseDoWhileStatement(r);case 91:return this.parseForStatement(r);case 68:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?g.StrictFunction:this.options.annexB?g.SloppyFunctionAnnexB:g.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,!i&&a);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,r),!0);case 69:return this.parseIfStatement(r);case 70:return this.parseReturnStatement(r);case 71:return this.parseSwitchStatement(r);case 72:return this.parseThrowStatement(r);case 73:return this.parseTryStatement(r);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?i||this.raise(g.UnexpectedLexicalDeclaration,r):this.raise(g.AwaitUsingNotInAsyncContext,r),this.next(),this.parseVarStatement(r,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(g.UnexpectedUsingDeclaration,this.state.startLoc):i||this.raise(g.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(r,"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(g.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let p=this.state.value;return this.parseVarStatement(r,p)}case 92:return this.parseWhileStatement(r);case 76:return this.parseWithStatement(r);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(r);case 83:{let p=this.lookaheadCharCode();if(p===40||p===46)break}case 82:{!(this.optionFlags&8)&&!o&&this.raise(g.UnexpectedImportExport,this.state.startLoc),this.next();let p;return t===83?(p=this.parseImport(r),p.type==="ImportDeclaration"&&(!p.importKind||p.importKind==="value")&&(this.sawUnambiguousESM=!0)):(p=this.parseExport(r,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(g.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!i&&a)}let l=this.state.value,c=this.parseExpression();return V(t)&&c.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(r,l,c,n):this.parseExpressionStatement(r,c,e)}assertModuleNodeAllowed(n){!(this.optionFlags&8)&&!this.inModule&&this.raise(g.ImportOutsideModule,n)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(n,e,t){if(n){var r;(r=e.decorators)!=null&&r.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(g.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...n)):e.decorators=n,this.resetStartLocationFromNode(e,n[0]),t&&this.resetStartLocationFromNode(t,e)}return 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(g.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(g.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 r=this.state.startLoc;this.next(),t=this.parseExpression(),this.expect(11),t=this.wrapParenthesis(r,t);let i=this.state.startLoc;n.expression=this.parseMaybeDecoratorArguments(t,r),this.getPluginOption("decorators","allowCallParenthesized")===!1&&n.expression!==t&&this.raise(g.DecoratorArgumentsOutsideParentheses,i)}else{for(t=this.parseIdentifier(!1);this.eat(16);){let r=this.startNodeAt(e);r.object=t,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),r.property=this.parsePrivateName()):r.property=this.parseIdentifier(!0),r.computed=!1,t=this.finishNode(r,"MemberExpression")}n.expression=this.parseMaybeDecoratorArguments(t,e)}}else n.expression=this.parseExprSubscripts();return this.finishNode(n,"Decorator")}parseMaybeDecoratorArguments(n,e){if(this.eat(10)){let t=this.startNodeAt(e);return t.callee=n,t.arguments=this.parseCallExpressionArguments(11),this.toReferencedList(t.arguments),this.finishNode(t,"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 r=this.state.labels[t];if((n.label==null||r.name===n.label.name)&&(r.kind!=null&&(e||r.kind===1)||n.label&&e))break}if(t===this.state.labels.length){let r=e?"BreakStatement":"ContinueStatement";this.raise(g.IllegalBreakContinue,n,{type:r})}}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(Os),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(Os);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(),d;l?(d="await using",this.recordAwaitIfAllowed()||this.raise(g.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):d=this.state.value,this.next(),this.parseVar(u,!0,d);let m=this.finishNode(u,"VariableDeclaration"),f=this.match(58);return f&&c&&this.raise(g.ForInUsing,m),(f||this.isContextual(102))&&m.declarations.length===1?this.parseForIn(n,m,e):(e!==null&&this.unexpected(e),this.parseFor(n,m))}}let r=this.isContextual(95),i=new yt,a=this.parseExpression(!0,i),o=this.isContextual(102);if(o&&(t&&this.raise(g.ForOfLet,a),e===null&&r&&a.type==="Identifier"&&this.raise(g.ForOfAsync,a)),o||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(a,!0);let l=o?"ForOfStatement":"ForInStatement";return this.checkLVal(a,{type:l}),this.parseForIn(n,a,e)}else this.checkExpressionErrors(i,!0);return e!==null&&this.unexpected(e),this.parseFor(n,a)}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.optionFlags&2)&&this.raise(g.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(Tp),this.scope.enter(0);let t;for(let r;!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():(r&&this.raise(g.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),r=!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(g.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(g.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(Os),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(n,"WhileStatement")}parseWithStatement(n){return this.state.strict&&this.raise(g.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,r){for(let a of this.state.labels)a.name===e&&this.raise(g.LabelRedeclaration,t,{labelName:e});let i=Ac(this.state.type)?1:this.match(71)?2:null;for(let a=this.state.labels.length-1;a>=0;a--){let o=this.state.labels[a];if(o.statementStart===n.start)o.statementStart=this.sourceToOffsetPos(this.state.start),o.kind=i;else break}return this.state.labels.push({name:e,kind:i,statementStart:this.sourceToOffsetPos(this.state.start)}),n.body=r&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 r=this.startNode();return n&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(r,n,!1,8,t),e&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(n){return n.type==="ExpressionStatement"&&n.expression.type==="StringLiteral"&&!n.expression.extra.parenthesized}parseBlockBody(n,e,t,r,i){let a=n.body=[],o=n.directives=[];this.parseBlockOrModuleBlockBody(a,e?o:void 0,t,r,i)}parseBlockOrModuleBlockBody(n,e,t,r,i){let a=this.state.strict,o=!1,l=!1;for(;!this.match(r);){let c=t?this.parseModuleItem():this.parseStatementListItem();if(e&&!l){if(this.isValidDirective(c)){let p=this.stmtToDirective(c);e.push(p),!o&&p.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}n.push(c)}i?.call(this,o),a||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 r=this.match(58);return this.next(),r?t!==null&&this.unexpected(t):n.await=t!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!r||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(g.ForInOfLoopInitializer,e,{type:r?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(g.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),n.left=e,n.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(n,r?"ForInStatement":"ForOfStatement")}parseVar(n,e,t,r=!1){let i=n.declarations=[];for(n.kind=t;;){let a=this.startNode();if(this.parseVarId(a,t),a.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,a.init===null&&!r&&(a.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(g.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(t==="const"||t==="using"||t==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(g.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:t})),i.push(this.finishNode(a,"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(g.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,r=!!(e&1),i=r&&!(e&4),a=!!(e&8);this.initFunction(n,a),this.match(55)&&(t&&this.raise(g.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),n.generator=!0),r&&(n.id=this.parseFunctionId(i));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(In(a,n.generator)),r||(n.id=this.parseFunctionId()),this.parseFunctionParams(n,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(n,r?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),r&&!t&&this.registerFunctionStatementId(n),this.state.maybeInArrowParameters=o,n}parseFunctionId(n){return n||V(this.state.type)?this.parseIdentifier():null}parseFunctionParams(n,e){this.expect(10),this.expressionScope.enter(Qc()),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 r=this.state.strict;return this.state.strict=!0,this.parseClassId(n,e,t),this.parseClassSuper(n),n.body=this.parseClassBody(!!n.superClass,r),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},r=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(r.length>0)throw this.raise(g.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){r.push(this.parseDecorator());continue}let a=this.startNode();r.length&&(a.decorators=r,this.resetStartLocationFromNode(a,r[0]),r=[]),this.parseClassMember(i,a,t),a.kind==="constructor"&&a.decorators&&a.decorators.length>0&&this.raise(g.DecoratorConstructor,a)}}),this.state.strict=e,this.next(),r.length)throw this.raise(g.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(n,e){let t=this.parseIdentifier(!0);if(this.isClassMethod()){let r=e;return r.kind="method",r.computed=!1,r.key=t,r.static=!1,this.pushClassMethod(n,r,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let r=e;return r.computed=!1,r.key=t,r.static=!1,n.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(t),!1}parseClassMember(n,e,t){let r=this.isContextual(106);if(r){if(this.parseClassMemberFromModifier(n,e))return;if(this.eat(5)){this.parseClassStaticBlock(n,e);return}}this.parseClassMemberWithIsStatic(n,e,t,r)}parseClassMemberWithIsStatic(n,e,t,r){let i=e,a=e,o=e,l=e,c=e,p=i,u=i;if(e.static=r,this.parsePropertyNamePrefixOperator(e),this.eat(55)){p.kind="method";let y=this.match(139);if(this.parseClassElementName(p),y){this.pushClassPrivateMethod(n,a,!0,!1);return}this.isNonstaticConstructor(i)&&this.raise(g.ConstructorIsGenerator,i.key),this.pushClassMethod(n,i,!0,!1,!1,!1);return}let d=!this.state.containsEsc&&V(this.state.type),m=this.parseClassElementName(e),f=d?m.name:null,b=this.isPrivateName(m),h=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(p.kind="method",b){this.pushClassPrivateMethod(n,a,!1,!1);return}let y=this.isNonstaticConstructor(i),T=!1;y&&(i.kind="constructor",t.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(g.DuplicateConstructor,m),y&&this.hasPlugin("typescript")&&e.override&&this.raise(g.OverrideOnConstructor,m),t.hadConstructor=!0,T=t.hadSuperClass),this.pushClassMethod(n,i,!1,!1,y,T)}else if(this.isClassProperty())b?this.pushClassPrivateProperty(n,l):this.pushClassProperty(n,o);else if(f==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(m);let y=this.eat(55);u.optional&&this.unexpected(h),p.kind="method";let T=this.match(139);this.parseClassElementName(p),this.parsePostMemberNameModifiers(u),T?this.pushClassPrivateMethod(n,a,y,!0):(this.isNonstaticConstructor(i)&&this.raise(g.ConstructorIsAsync,i.key),this.pushClassMethod(n,i,y,!0,!1,!1))}else if((f==="get"||f==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(m),p.kind=f;let y=this.match(139);this.parseClassElementName(i),y?this.pushClassPrivateMethod(n,a,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(g.ConstructorIsAccessor,i.key),this.pushClassMethod(n,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}else if(f==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(m);let y=this.match(139);this.parseClassElementName(o),this.pushClassAccessorProperty(n,c,y)}else this.isLineTerminator()?b?this.pushClassPrivateProperty(n,l):this.pushClassProperty(n,o):this.unexpected()}parseClassElementName(n){let{type:e,value:t}=this.state;if((e===132||e===134)&&n.static&&t==="prototype"&&this.raise(g.StaticPrototype,this.state.startLoc),e===139){t==="constructor"&&this.raise(g.ConstructorClassPrivateField,this.state.startLoc);let r=this.parsePrivateName();return n.key=r,r}return this.parsePropertyName(n),n.key}parseClassStaticBlock(n,e){var t;this.scope.enter(208);let r=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=r,n.body.push(this.finishNode(e,"StaticBlock")),(t=e.decorators)!=null&&t.length&&this.raise(g.DecoratorStaticBlock,e)}pushClassProperty(n,e){!e.computed&&this.nameIsConstructor(e.key)&&this.raise(g.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(g.ConstructorClassField,e.key);let r=this.parseClassAccessorProperty(e);n.body.push(r),t&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassMethod(n,e,t,r,i,a){n.body.push(this.parseMethod(e,t,r,i,a,"ClassMethod",!0))}pushClassPrivateMethod(n,e,t,r){let i=this.parseMethod(e,t,r,!1,!1,"ClassPrivateMethod",!0);n.body.push(i);let a=i.kind==="get"?i.static?6:2:i.kind==="set"?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,a)}declareClassPrivateMethodInScope(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(ea()),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,r=8331){if(V(this.state.type))n.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(n.id,r);else if(t||!e)n.id=null;else throw this.raise(g.MissingClassName,this.state.startLoc)}parseClassSuper(n){n.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(n,e){let t=this.parseMaybeImportPhase(n,!0),r=this.maybeParseExportDefaultSpecifier(n,t),i=!r||this.eat(12),a=i&&this.eatExportStar(n),o=a&&this.maybeParseExportNamespaceSpecifier(n),l=i&&(!o||this.eat(12)),c=r||a;if(a&&!o){if(r&&this.unexpected(),e)throw this.raise(g.UnsupportedDecoratorExport,n);return this.parseExportFrom(n,!0),this.finishNode(n,"ExportAllDeclaration")}let p=this.maybeParseExportNamedSpecifiers(n);r&&i&&!a&&!p&&this.unexpected(null,5),o&&l&&this.unexpected(null,98);let u;if(c||p){if(u=!1,e)throw this.raise(g.UnsupportedDecoratorExport,n);this.parseExportFrom(n,c)}else u=this.maybeParseExportDeclaration(n);if(c||p||u){var d;let m=n;if(this.checkExport(m,!0,!1,!!m.source),((d=m.declaration)==null?void 0:d.type)==="ClassDeclaration")this.maybeTakeDecorators(e,m.declaration,m);else if(e)throw this.raise(g.UnsupportedDecoratorExport,n);return this.finishNode(m,"ExportNamedDeclaration")}if(this.eat(65)){let m=n,f=this.parseExportDefaultExpression();if(m.declaration=f,f.type==="ClassDeclaration")this.maybeTakeDecorators(e,f,m);else if(e)throw this.raise(g.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),r=this.startNodeAtNode(t);return r.exported=t,n.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(n){if(this.isContextual(93)){var e,t;(t=(e=n).specifiers)!=null||(e.specifiers=[]);let r=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),r.exported=this.parseModuleExportName(),n.specifiers.push(this.finishNode(r,"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(g.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(g.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(V(n)){if(n===95&&!this.state.containsEsc||n===100)return!1;if((n===130||n===129)&&!this.state.containsEsc){let{type:r}=this.lookahead();if(V(r)&&r!==98||r===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||V(this.state.type)&&t)return!0;if(this.match(65)&&t){let r=this.input.charCodeAt(this.nextTokenStartSince(e+4));return r===34||r===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(g.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(g.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(g.UsingDeclarationExport,this.state.startLoc),!0):n===74||n===75||n===68||n===80||this.isLet()||this.isAsyncFunction()}checkExport(n,e,t,r){if(e){var i;if(t){if(this.checkDuplicateExports(n,"default"),this.hasPlugin("exportDefaultFrom")){var a;let o=n.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((a=o.extra)!=null&&a.parenthesized)&&this.raise(g.ExportDefaultFromAsIdentifier,o)}}else if((i=n.specifiers)!=null&&i.length)for(let o of n.specifiers){let{exported:l}=o,c=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(o,c),!r&&o.local){let{local:p}=o;p.type!=="Identifier"?this.raise(g.ExportBindingIsString,o,{localName:p.value,exportName:c}):(this.checkReservedWord(p.name,p.loc.start,!0,!1),this.scope.checkLocalExport(p))}}else if(n.declaration){let o=n.declaration;if(o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"){let{id:l}=o;if(!l)throw new Error("Assertion failure");this.checkDuplicateExports(n,l.name)}else if(o.type==="VariableDeclaration")for(let l of o.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(g.DuplicateDefaultExport,n):this.raise(g.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 r=this.isContextual(130),i=this.match(134),a=this.startNode();a.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(a,i,n,r))}return e}parseExportSpecifier(n,e,t,r){return this.eatContextual(93)?n.exported=this.parseModuleExportName():e?n.exported=np(n.local):n.exported||(n.exported=He(n.local)),this.finishNode(n,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let n=this.parseStringLiteral(this.state.value),e=Cp.exec(n.value);return e&&this.raise(g.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(g.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(n.phase==="defer")t!=="ImportNamespaceSpecifier"&&this.raise(g.DeferImportRequiresNamespace,e[0].loc.start);else if(n.module){var r;t!=="ImportDefaultSpecifier"&&this.raise(g.ImportReflectionNotBinding,e[0].loc.start),((r=n.assertions)==null?void 0:r.length)>0&&this.raise(g.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(r=>{let i;if(r.type==="ExportSpecifier"?i=r.local:r.type==="ImportSpecifier"&&(i=r.imported),i!==void 0)return i.type==="Identifier"?i.name!=="default":i.value!=="default"});t!==void 0&&this.raise(g.ImportJSONBindingNotDefault,t.loc.start)}}}isPotentialImportPhase(n){return n?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(n,e,t,r){e||(t==="module"?(this.expectPlugin("importReflection",r),n.module=!0):this.hasPlugin("importReflection")&&(n.module=!1),t==="source"?(this.expectPlugin("sourcePhaseImports",r),n.phase="source"):t==="defer"?(this.expectPlugin("deferredImportEvaluation",r),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:r}=this.state;return(Ee(r)?r!==98||this.lookaheadCharCode()===102:r!==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 V(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 r=!this.maybeParseDefaultImportSpecifier(n,e)||this.eat(12),i=r&&this.maybeParseStarImportSpecifier(n);return r&&!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(),r=this.state.value;if(e.has(r)&&this.raise(g.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),e.add(r),this.match(134)?t.key=this.parseStringLiteral(r):t.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(g.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(g.ModuleAttributeDifferentFromType,t.key),e.has(t.key.name)&&this.raise(g.ModuleAttributesWithDuplicateKeys,t.key,{key:t.key.name}),e.add(t.key.name),this.expect(14),!this.match(134))throw this.raise(g.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(g.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(Ee(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(g.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let t=this.startNode(),r=this.match(134),i=this.isContextual(130);t.imported=this.parseModuleExportName();let a=this.parseImportSpecifier(t,r,n.importKind==="type"||n.importKind==="typeof",i,void 0);n.specifiers.push(a)}}parseImportSpecifier(n,e,t,r,i){if(this.eatContextual(93))n.local=this.parseIdentifier();else{let{imported:a}=n;if(e)throw this.raise(g.ImportBindingIsString,n,{importName:a.value});this.checkReservedWord(a.name,n.loc.start,!0,!0),n.local||(n.local=He(a))}return this.finishImportSpecifier(n,"ImportSpecifier",i)}isThisParam(n){return n.type==="Identifier"&&n.name==="this"}},Mn=class extends nr{constructor(n,e,t){n=xc(n),super(n,e),this.options=n,this.initializeScopes(),this.plugins=t,this.filename=n.sourceFilename,this.startIndex=n.startIndex;let r=0;n.allowAwaitOutsideFunction&&(r|=1),n.allowReturnOutsideFunction&&(r|=2),n.allowImportExportEverywhere&&(r|=8),n.allowSuperOutsideMethod&&(r|=16),n.allowUndeclaredExports&&(r|=32),n.allowNewTargetOutsideFunction&&(r|=4),n.ranges&&(r|=64),n.tokens&&(r|=128),n.createImportExpressions&&(r|=256),n.createParenthesizedExpressions&&(r|=512),n.errorRecovery&&(r|=1024),n.attachComment&&(r|=2048),n.annexB&&(r|=4096),this.optionFlags=r}getScopeHandler(){return qt}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 Dp(s,n){var e;if(((e=n)==null?void 0:e.sourceType)==="unambiguous"){n=Object.assign({},n);try{n.sourceType="module";let t=Ht(n,s),r=t.parse();if(t.sawUnambiguousESM)return r;if(t.ambiguousScriptDifferentAst)try{return n.sourceType="script",Ht(n,s).parse()}catch{}else r.program.sourceType="script";return r}catch(t){try{return n.sourceType="script",Ht(n,s).parse()}catch{}throw t}}else return Ht(n,s).parse()}function Ep(s,n){let e=Ht(n,s);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function Sp(s){let n={};for(let e of Object.keys(s))n[e]=je(s[e]);return n}var Ap=Sp(wc);function Ht(s,n){let e=Mn,t=new Map;if(s!=null&&s.plugins){for(let r of s.plugins){let i,a;typeof r=="string"?i=r:[i,a]=r,t.has(i)||t.set(i,a||{})}xp(t),e=Ip(t)}return new e(s,n,t)}var $i=new Map;function Ip(s){let n=[];for(let r of Pp)s.has(r)&&n.push(r);let e=n.join("|"),t=$i.get(e);if(!t){t=Mn;for(let r of n)t=ra[r](t);$i.set(e,t)}return t}Jt.parse=Dp;Jt.parseExpression=Ep;Jt.tokTypes=Ap});import{Command as Yd}from"commander";var zr="0.1.52";import dn from"node:path";import{Command as Dd}from"commander";var ne={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},ds={silent:{level:-1},fatal:{level:ne.fatal},error:{level:ne.error},warn:{level:ne.warn},log:{level:ne.log},info:{level:ne.info},success:{level:ne.success},fail:{level:ne.fail},ready:{level:ne.info},start:{level:ne.info},box:{level:ne.info},debug:{level:ne.debug},trace:{level:ne.trace},verbose:{level:ne.verbose}};function cs(s){if(s===null||typeof s!="object")return!1;let n=Object.getPrototypeOf(s);return n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null||Symbol.iterator in s?!1:Symbol.toStringTag in s?Object.prototype.toString.call(s)==="[object Module]":!0}function fs(s,n,e=".",t){if(!cs(n))return fs(s,{},e,t);let r=Object.assign({},n);for(let i in s){if(i==="__proto__"||i==="constructor")continue;let a=s[i];a!=null&&(t&&t(r,i,a,e)||(Array.isArray(a)&&Array.isArray(r[i])?r[i]=[...a,...r[i]]:cs(a)&&cs(r[i])?r[i]=fs(a,r[i],(e?`${e}.`:"")+i.toString(),t):r[i]=a))}return r}function _o(s){return(...n)=>n.reduce((e,t)=>fs(e,t,"",s),{})}var Ro=_o();function jo(s){return Object.prototype.toString.call(s)==="[object Object]"}function Vo(s){return!(!jo(s)||!s.message&&!s.args||s.stack)}var ps=!1,$r=[],ee=class s{options;_lastLog;_mockFn;constructor(n={}){let e=n.types||ds;this.options=Ro({...n,defaults:{...n.defaults},level:us(n.level,e),reporters:[...n.reporters||[]]},{types:ds,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let t in e){let r={type:t,...this.options.defaults,...e[t]};this[t]=this._wrapLogFn(r),this[t].raw=this._wrapLogFn(r,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(n){this.options.level=us(n,this.options.types,this.options.level)}prompt(n,e){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(n,e)}create(n){let e=new s({...this.options,...n});return this._mockFn&&e.mockTypes(this._mockFn),e}withDefaults(n){return this.create({...this.options,defaults:{...this.options.defaults,...n}})}withTag(n){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+n:n})}addReporter(n){return this.options.reporters.push(n),this}removeReporter(n){if(n){let e=this.options.reporters.indexOf(n);if(e!==-1)return this.options.reporters.splice(e,1)}else this.options.reporters.splice(0);return this}setReporters(n){return this.options.reporters=Array.isArray(n)?n:[n],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let n in this.options.types)console["__"+n]||(console["__"+n]=console[n]),console[n]=this[n].raw}restoreConsole(){for(let n in this.options.types)console["__"+n]&&(console[n]=console["__"+n],delete console["__"+n])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(n,e){n&&(n.__write||(n.__write=n.write),n.write=t=>{this[e].raw(String(t).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(n){n&&n.__write&&(n.write=n.__write,delete n.__write)}pauseLogs(){ps=!0}resumeLogs(){ps=!1;let n=$r.splice(0);for(let e of n)e[0]._logFn(e[1],e[2])}mockTypes(n){let e=n||this.options.mockFn;if(this._mockFn=e,typeof e=="function")for(let t in this.options.types)this[t]=e(t,this.options.types[t])||this[t],this[t].raw=this[t]}_wrapLogFn(n,e){return(...t)=>{if(ps){$r.push([this,n,t,e]);return}return this._logFn(n,t,e)}}_logFn(n,e,t){if((n.level||0)>this.level)return!1;let r={date:new Date,args:[],...n,level:us(n.level,this.options.types)};!t&&e.length===1&&Vo(e[0])?Object.assign(r,e[0]):r.args=[...e],r.message&&(r.args.unshift(r.message),delete r.message),r.additional&&(Array.isArray(r.additional)||(r.additional=r.additional.split(`
|
|
8
|
+
`):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(e){let t="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(g.UnterminatedString,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);if(i===e)break;i===38?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):gt(i)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}t+=this.input.slice(r,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 r=this.readInt(t,void 0,!1,"bail");if(r!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(r)}else{let t=0,r=!1;for(;t++<10&&this.state.pos<this.length&&!(r=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(r){let i=this.input.slice(e,this.state.pos),a=cp[i];if(++this.state.pos,a)return a}}return this.state.pos=e,"&"}jsxReadWord(){let e,t=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(bt(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:cr(this.state.type)?e.name=Xe(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 r=this.startNodeAt(e);return r.namespace=t,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,t=this.jsxParseNamespacedName();if(t.type==="JSXNamespacedName")return t;for(;this.eat(16);){let r=this.startNodeAt(e);r.object=t,r.property=this.jsxParseIdentifier(),t=this.finishNode(r,"JSXMemberExpression")}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(j.brace),this.next(),e=this.jsxParseExpressionContainer(e,j.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(rt.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(rt.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(j.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,t){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let r=this.parseExpression();e.expression=r}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(j.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(j.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),r=[],i=this.jsxParseOpeningElementAt(e),a=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case 143:if(e=this.state.startLoc,this.next(),this.eat(56)){a=this.jsxParseClosingElementAt(e);break e}r.push(this.jsxParseElementAt(e));break;case 142:r.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let o=this.startNode();this.setContext(j.brace),this.next(),this.match(21)?r.push(this.jsxParseSpreadChild(o)):r.push(this.jsxParseExpressionContainer(o,j.j_expr));break}default:this.unexpected()}Je(i)&&!Je(a)&&a!==null?this.raise(rt.MissingClosingTagFragment,a):!Je(i)&&Je(a)?this.raise(rt.MissingClosingTagElement,a,{openingTagName:ht(i.name)}):!Je(i)&&!Je(a)&&ht(a.name)!==ht(i.name)&&this.raise(rt.MissingClosingTagElement,a,{openingTagName:ht(i.name)})}if(Je(i)?(t.openingFragment=i,t.closingFragment=a):(t.openingElement=i,t.closingElement=a),t.children=r,this.match(47))throw this.raise(rt.UnwrappedAdjacentJSXElements,this.state.startLoc);return Je(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===j.j_expr){this.jsxReadToken();return}if(t===j.j_oTag||t===j.j_cTag){if(ze(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(144);return}if((e===34||e===39)&&t===j.j_oTag){this.jsxReadString(e);return}}if(e===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(e)}updateContext(e){let{context:t,type:r}=this.state;if(r===56&&e===143)t.splice(-2,2,j.j_cTag),this.state.canStartJSXElement=!1;else if(r===143)t.push(j.j_oTag);else if(r===144){let i=t[t.length-1];i===j.j_oTag&&e===56||i===j.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===j.j_expr):(this.setContext(j.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=Ec(r)}},Qs=class extends Wt{constructor(...n){super(...n),this.tsNames=new Map}},Zs=class extends qt{constructor(...n){super(...n),this.importsStack=[]}createScope(n){return this.importsStack.push(new Set),new Qs(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 r=0;r<t-1;r++)if(this.importsStack[r].has(n))return!0}return!1}declareName(n,e,t){if(e&4096){this.hasImport(n,!0)&&this.parser.raise(g.VarRedeclaration,t,{identifierName:n}),this.importsStack[this.importsStack.length-1].add(n);return}let r=this.currentScope(),i=r.tsNames.get(n)||0;if(e&1024){this.maybeExportDefined(r,n),r.tsNames.set(n,i|16);return}super.declareName(n,e,t),e&2&&(e&1||(this.checkRedeclarationInScope(r,n,e,t),this.maybeExportDefined(r,n)),i=i|1),e&256&&(i=i|2),e&512&&(i=i|4),e&128&&(i=i|8),i&&r.tsNames.set(n,i)}isRedeclaredInScope(n,e,t){let r=n.tsNames.get(e);if((r&2)>0){if(t&256){let i=!!(t&512),a=(r&4)>0;return i!==a}return!0}return t&128&&(r&8)>0?n.names.get(e)&2?!!(t&1):!1:t&2&&(r&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 r=t-1;r>=0;r--){let a=this.scopeStack[r].tsNames.get(e);if((a&1)>0||(a&16)>0)return}super.checkLocalExport(n)}},ta=s=>s.type==="ParenthesizedExpression"?ta(s.expression):s,er=class extends Ys{toAssignable(n,e=!1){var t,r;let i;switch((n.type==="ParenthesizedExpression"||(t=n.extra)!=null&&t.parenthesized)&&(i=ta(n),e?i.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(g.InvalidParenthesizedAssignment,n):i.type!=="MemberExpression"&&!this.isOptionalMemberExpression(i)&&this.raise(g.InvalidParenthesizedAssignment,n):this.raise(g.InvalidParenthesizedAssignment,n)),n.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":n.type="ObjectPattern";for(let o=0,l=n.properties.length,c=l-1;o<l;o++){var a;let p=n.properties[o],u=o===c;this.toAssignableObjectExpressionProp(p,u,e),u&&p.type==="RestElement"&&(a=n.extra)!=null&&a.trailingCommaLoc&&this.raise(g.RestTrailingComma,n.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:o,value:l}=n;this.isPrivateName(o)&&this.classScope.usePrivateName(this.getPrivateNameSV(o),o.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,(r=n.extra)==null?void 0:r.trailingCommaLoc,e);break;case"AssignmentExpression":n.operator!=="="&&this.raise(g.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"?g.PatternHasAccessor:g.PatternHasMethod,n.key);else if(n.type==="SpreadElement"){n.type="RestElement";let r=n.argument;this.checkToRestConversion(r,!1),this.toAssignable(r,t),e||this.raise(g.RestTrailingComma,n)}else this.toAssignable(n,t)}toAssignableList(n,e,t){let r=n.length-1;for(let i=0;i<=r;i++){let a=n[i];if(a){if(a.type==="SpreadElement"){a.type="RestElement";let o=a.argument;this.checkToRestConversion(o,!0),this.toAssignable(o,t)}else this.toAssignable(a,t);a.type==="RestElement"&&(i<r?this.raise(g.RestTrailingComma,a):e&&this.raise(g.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((r,i)=>r.type!=="ObjectMethod"&&(i===t||r.type!=="SpreadElement")&&this.isAssignable(r))}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 r=t&1,i=[],a=!0;for(;!this.eat(n);)if(a?a=!1:this.expect(12),r&&this.match(12))i.push(null);else{if(this.eat(n))break;if(this.match(21)){let o=this.parseRestBinding();if((this.hasPlugin("flow")||t&2)&&(o=this.parseFunctionParamType(o)),i.push(o),!this.checkCommaAfterRest(e)){this.expect(n);break}}else{let o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(g.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());i.push(this.parseAssignableListItem(t,o))}}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 r=this.parseMaybeDefault(t.loc.start,t);return e.length&&(t.decorators=e),r}parseFunctionParamType(n){return n}parseMaybeDefault(n,e){var t,r;if((t=n)!=null||(n=this.state.startLoc),e=(r=e)!=null?r: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,r=!1,i=!1,a=!1){var o;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(g.InvalidLhsOptionalChaining,n,{ancestor:e})),t!==64&&this.raise(g.InvalidPropertyBindingPattern,n);return}if(l==="Identifier"){this.checkIdentifier(n,t,i);let{name:b}=n;r&&(r.has(b)?this.raise(g.ParamDupe,n):r.add(b));return}let p=this.isValidLVal(l,!(a||(o=n.extra)!=null&&o.parenthesized)&&e.type==="AssignmentExpression",t);if(p===!0)return;if(p===!1){let b=t===64?g.InvalidLhs:g.InvalidLhsBinding;this.raise(b,n,{ancestor:e});return}let u,d;typeof p=="string"?(u=p,d=l==="ParenthesizedExpression"):[u,d]=p;let m=l==="ArrayPattern"||l==="ObjectPattern"?{type:l}:e,f=n[u];if(Array.isArray(f))for(let b of f)b&&this.checkLVal(b,m,t,r,i,d);else f&&this.checkLVal(f,m,t,r,i,d)}checkIdentifier(n,e,t=!1){this.state.strict&&(t?Xi(n.name,this.inModule):Ji(n.name))&&(e===64?this.raise(g.StrictEvalArguments,n,{referenceName:n.name}):this.raise(g.StrictEvalArgumentsBinding,n,{bindingName:n.name})),e&8192&&n.name==="let"&&this.raise(g.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(g.InvalidRestAssignmentPattern,n)}}checkCommaAfterRest(n){return this.match(12)?(this.raise(this.lookaheadCharCode()===n?g.RestTrailingComma:g.ElementAfterRest,this.state.startLoc),!0):!1}};function up(s){if(s==null)throw new Error(`Unexpected ${s} value.`);return s}function _i(s){if(!s)throw new Error("Assert fail")}var A=$e`typescript`({AbstractMethodHasImplementation:({methodName:s})=>`Method '${s}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:s})=>`Property '${s}' 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:s})=>`'declare' is not allowed in ${s}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:s})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:s})=>`Duplicate modifier: '${s}'.`,EmptyHeritageClauseType:({token:s})=>`'${s}' 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:s})=>`'${s[0]}' modifier cannot be used with '${s[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:s})=>`Index signatures cannot have an accessibility modifier ('${s}').`,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:s})=>`'${s}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:s})=>`'${s}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:s})=>`'${s}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:s})=>`'${s[0]}' modifier must precede '${s[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:s})=>`Private elements cannot have an accessibility modifier ('${s}').`,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:s})=>`Single type parameter ${s} should have a trailing comma. Example usage: <${s},>.`,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:s})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${s}.`});function dp(s){switch(s){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 Ri(s){return s==="private"||s==="public"||s==="protected"}function fp(s){return s==="in"||s==="out"}var mp=s=>class extends s{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:A.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:A.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:A.InvalidModifierOnTypeParameter})}getScopeHandler(){return Zs}tsIsIdentifier(){return V(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(!V(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let r=this.state.value;if(e.includes(r)){if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:r,errorTemplate:i=A.InvalidModifierOnTypeMember},a){let o=(c,p,u,d)=>{p===u&&a[d]&&this.raise(A.InvalidModifiersOrder,c,{orderedModifiers:[u,d]})},l=(c,p,u,d)=>{(a[u]&&p===d||a[d]&&p===u)&&this.raise(A.IncompatibleModifiers,c,{modifiers:[u,d]})};for(;;){let{startLoc:c}=this.state,p=this.tsParseModifier(e.concat(t??[]),r);if(!p)break;Ri(p)?a.accessibility?this.raise(A.DuplicateAccessibilityModifier,c,{modifier:p}):(o(c,p,p,"override"),o(c,p,p,"static"),o(c,p,p,"readonly"),a.accessibility=p):fp(p)?(a[p]&&this.raise(A.DuplicateModifier,c,{modifier:p}),a[p]=!0,o(c,p,"in","out")):(hasOwnProperty.call(a,p)?this.raise(A.DuplicateModifier,c,{modifier:p}):(o(c,p,"static","readonly"),o(c,p,"static","override"),o(c,p,"override","readonly"),o(c,p,"abstract","override"),l(c,p,"declare","override"),l(c,p,"static","abstract")),a[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 r=[];for(;!this.tsIsListTerminator(e);)r.push(t());return r}tsParseDelimitedList(e,t,r){return up(this.tsParseDelimitedListWorker(e,t,!0,r))}tsParseDelimitedListWorker(e,t,r,i){let a=[],o=-1;for(;!this.tsIsListTerminator(e);){o=-1;let l=t();if(l==null)return;if(a.push(l),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;r&&this.expect(12);return}return i&&(i.value=o),a}tsParseBracketedList(e,t,r,i,a){i||(r?this.expect(0):this.expect(47));let o=this.tsParseDelimitedList(e,t,a);return r?this.expect(3):this.expect(48),o}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(134)?e.argument=this.parseStringLiteral(this.state.value):(this.raise(A.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(3)),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e){let t;if(e&1&&this.match(78))if(e&2)t=this.parseIdentifier(!0);else{let r=this.startNode();this.next(),t=this.finishNode(r,"ThisExpression")}else t=this.parseIdentifier(!!(e&1));for(;this.eat(16);){let r=this.startNodeAtNode(t);r.left=t,r.right=this.parseIdentifier(!!(e&1)),t=this.finishNode(r,"TSQualifiedName")}return t}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let t=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let r={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,r),t.params.length===0&&this.raise(A.EmptyTypeParameters,t),r.value!==-1&&this.addExtra(t,"trailingComma",r.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){let r=e===19,i="parameters",a="typeAnnotation";t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t[i]=this.tsParseBindingListForSignature(),r?t[a]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(t[a]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let t of e){let{type:r}=t;(r==="AssignmentPattern"||r==="TSParameterProperty")&&this.raise(A.UnsupportedSignatureParameterKind,t,{type:r})}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(),V(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 r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){this.eat(17)&&(e.optional=!0);let r=e;if(this.match(10)||this.match(47)){t&&this.raise(A.ReadonlyForMethodSignature,e);let i=r;i.kind&&this.match(47)&&this.raise(A.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,i),this.tsParseTypeMemberSemicolon();let a="parameters",o="typeAnnotation";if(i.kind==="get")i[a].length>0&&(this.raise(g.BadGetterArity,this.state.curPosition()),this.isThisParam(i[a][0])&&this.raise(A.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(i.kind==="set"){if(i[a].length!==1)this.raise(g.BadSetterArity,this.state.curPosition());else{let l=i[a][0];this.isThisParam(l)&&this.raise(A.AccessorCannotDeclareThisParameter,this.state.curPosition()),l.type==="Identifier"&&l.optional&&this.raise(A.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),l.type==="RestElement"&&this.raise(A.SetAccessorCannotHaveRestParameter,this.state.curPosition())}i[o]&&this.raise(A.SetAccessorCannotHaveReturnType,i[o])}else i.kind="method";return this.finishNode(i,"TSMethodSignature")}else{let i=r;t&&(i.readonly=!0);let a=this.tsTryParseTypeAnnotation();return a&&(i.typeAnnotation=a),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 r=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(r,"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(r=>{let{type:i}=r;t&&i!=="TSRestType"&&i!=="TSOptionalType"&&!(i==="TSNamedTupleMember"&&r.optional)&&this.raise(A.OptionalTypeBeforeRequired,r),t||(t=i==="TSNamedTupleMember"&&r.optional||i==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let{startLoc:e}=this.state,t=this.eat(21),r,i,a,o,c=Ee(this.state.type)?this.lookaheadCharCode():null;if(c===58)r=!0,a=!1,i=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(c===63){a=!0;let p=this.state.startLoc,u=this.state.value,d=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(r=!0,i=this.createIdentifier(this.startNodeAt(p),u),this.expect(17),this.expect(14),o=this.tsParseType()):(r=!1,o=d,this.expect(17))}else o=this.tsParseType(),a=this.eat(17),r=this.eat(14);if(r){let p;i?(p=this.startNodeAtNode(i),p.optional=a,p.label=i,p.elementType=o,this.eat(17)&&(p.optional=!0,this.raise(A.TupleOptionalAfterType,this.state.lastTokStartLoc))):(p=this.startNodeAtNode(o),p.optional=a,this.raise(A.InvalidTupleMemberLabel,o),p.label=o,p.elementType=this.tsParseType()),o=this.finishNode(p,"TSNamedTupleMember")}else if(a){let p=this.startNodeAtNode(o);p.typeAnnotation=o,o=this.finishNode(p,"TSOptionalType")}if(t){let p=this.startNodeAt(e);p.typeAnnotation=o,o=this.finishNode(p,"TSRestType")}return o}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){let r=this.startNode();return e==="TSConstructorType"&&(r.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,r)),this.finishNode(r,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(V(e)||e===88||e===84){let t=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":dp(this.state.value);if(t!==void 0&&this.lookaheadCharCode()!==46){let r=this.startNode();return this.next(),this.finishNode(r,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(A.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 Nc(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,t,r){let i=this.startNode(),a=this.eat(r),o=[];do o.push(t());while(this.eat(r));return o.length===1&&!a?o[0]:(i.types=o,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(V(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 r=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(78)){let l=this.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(r.parameterName=l,r.asserts=!0,r.typeAnnotation=null,l=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(l,r),l.asserts=!0),t.typeAnnotation=l,this.finishNode(t,"TSTypeAnnotation")}let a=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!a)return i?(r.parameterName=this.parseIdentifier(),r.asserts=i,r.typeAnnotation=null,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);let o=this.tsParseTypeAnnotation(!1);return r.parameterName=a,r.typeAnnotation=o,r.asserts=i,t.typeAnnotation=this.finishNode(r,"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(),!V(this.state.type)&&!this.match(78)?!1:(e&&this.raise(g.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(){_i(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(A.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,r=this.tsParseDelimitedList("HeritageClauseElement",()=>{let i=this.startNode();return i.expression=this.tsParseEntityName(3),this.match(47)&&(i.typeParameters=this.tsParseTypeArguments()),this.finishNode(i,"TSExpressionWithTypeArguments")});return r.length||this.raise(A.EmptyHeritageClauseType,t,{token:e}),r}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),t.declare&&(e.declare=!0),V(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(A.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(r,"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")}tsInTopLevelContext(e){if(this.curContext()!==j.brace){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}else return e()}tsInType(e){let t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseEnumBody(){let e=this.startNode();return this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumBody")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){let r=this.startNode();this.tsParseModuleOrNamespaceDeclaration(r,!0),e.body=r}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,r){e.isExport=r||!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(A.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(0)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let t=this.state.clone(),r=e();return this.state=t,r}tsTryParseAndCatch(e){let t=this.tryParse(r=>e()||r());if(!(t.aborted||!t.node))return t.error&&(this.state=t.failState),t.node}tsTryParse(e){let t=this.state.clone(),r=e();if(r!==void 0&&r!==!1)return r;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t=this.state.type,r;return this.isContextual(100)&&(t=74,r="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,r||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(V(t))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,t,r){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",e.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,r)}}tsParseDeclaration(e,t,r,i){switch(t){case"abstract":if(this.tsCheckLineTerminator(r)&&(this.match(80)||V(this.state.type)))return this.tsParseAbstractDeclaration(e,i);break;case"module":if(this.tsCheckLineTerminator(r)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(e);if(V(this.state.type))return e.kind="module",this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(r)&&V(this.state.type))return e.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(r)&&V(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 r=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,!!r)return super.parseArrowExpression(r,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(A.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===j.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Mc(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){let r=this.state.startLoc,i={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},i);let a=i.accessibility,o=i.override,l=i.readonly;!(e&4)&&(a||l||o)&&this.raise(A.UnexpectedParameterModifier,r);let c=this.parseMaybeDefault();e&2&&this.parseFunctionParamType(c);let p=this.parseMaybeDefault(c.loc.start,c);if(a||l||o){let u=this.startNodeAt(r);return t.length&&(u.decorators=t),a&&(u.accessibility=a),l&&(u.readonly=l),o&&(u.override=o),p.type!=="Identifier"&&p.type!=="AssignmentPattern"&&this.raise(A.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(A.PatternIsOptional,t)}setArrowFunctionParameters(e,t,r){super.setArrowFunctionParameters(e,t,r),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,r=!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(A.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,i,r):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,r))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(t=>{t?.type==="TSTypeCastExpression"&&this.raise(A.UnexpectedTypeAnnotation,t.typeAnnotation)})}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,r,i){let a=super.parseArrayLike(e,t,r,i);return a.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(a.elements),a}parseSubscript(e,t,r,i){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(t);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let a=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(r)return i.stop=!0,e;i.optionalChainMember=a=!0,this.next()}if(this.match(47)||this.match(51)){let o,l=this.tsTryParseAndCatch(()=>{if(!r&&this.atPossibleAsyncArrow(e)){let d=this.tsTryParseGenericAsyncArrowFunction(t);if(d)return d}let c=this.tsParseTypeArgumentsInExpression();if(!c)return;if(a&&!this.match(10)){o=this.state.curPosition();return}if(kn(this.state.type)){let d=super.parseTaggedTemplateExpression(e,t,i);return d.typeParameters=c,d}if(!r&&this.eat(10)){let d=this.startNodeAt(t);return d.callee=e,d.arguments=this.parseCallExpressionArguments(11),this.tsCheckForInvalidTypeCasts(d.arguments),d.typeParameters=c,i.optionalChainMember&&(d.optional=a),this.finishCallExpression(d,i.optionalChainMember)}let p=this.state.type;if(p===48||p===52||p!==10&&Us(p)&&!this.hasPrecedingLineBreak())return;let u=this.startNodeAt(t);return u.expression=e,u.typeParameters=c,this.finishNode(u,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),l)return l.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(A.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),l}return super.parseSubscript(e,t,r,i)}parseNewCallee(e){var t;super.parseNewCallee(e);let{callee:r}=e;r.type==="TSInstantiationExpression"&&!((t=r.extra)!=null&&t.parenthesized)&&(e.typeParameters=r.typeParameters,e.callee=r.expression)}parseExprOp(e,t,r){let i;if(An(58)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(i=this.isContextual(120)))){let a=this.startNodeAt(t);return a.expression=e,a.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(i&&this.raise(g.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(a,i?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(a,t,r)}return super.parseExprOp(e,t,r)}checkReservedWord(e,t,r,i){this.state.isAmbientContext||super.checkReservedWord(e,t,r,i)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(A.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,r,i){super.applyImportPhase(e,t,r,i),t?e.exportKind=r==="type"?"type":"value":e.importKind=r==="type"||r==="typeof"?r:"value"}parseImport(e){if(this.match(134))return e.importKind="value",super.parseImport(e);let t;if(V(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let r=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,r);t=super.parseImportSpecifiersAndAfter(e,r)}else t=super.parseImport(e);return t.importKind==="type"&&t.specifiers.length>1&&t.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(A.TypeImportCannotSpecifyDefaultAndNamed,t),t}parseExport(e,t){if(this.match(83)){this.next();let r=e,i=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?i=this.parseMaybeImportPhase(r,!1):r.importKind="value",this.tsParseImportEqualsDeclaration(r,i,!0)}else if(this.eat(29)){let r=e;return r.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExportAssignment")}else if(this.eatContextual(93)){let r=e;return this.expectContextual(128),r.id=this.parseIdentifier(),this.semicolon(),this.finishNode(r,"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,r=!1){let{isAmbientContext:i}=this.state,a=super.parseVarStatement(e,t,r||i);if(!i)return a;for(let{id:o,init:l}of a.declarations)l&&(t!=="const"||o.typeAnnotation?this.raise(A.InitializerNotAllowedInAmbientContext,l):bp(l,this.hasPlugin("estree"))||this.raise(A.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,l));return a}parseStatementContent(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){let r=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(r,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some(r=>Ri(r)?e.accessibility===r:!!e[r])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,t,r){let i=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:i,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:A.InvalidModifierOnTypeParameterPositions},t);let a=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,i)&&this.raise(A.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,r,!!t.static)};t.declare?this.tsInAmbientContext(a):a()}parseClassMemberWithIsStatic(e,t,r,i){let a=this.tsTryParseIndexSignature(t);if(a){e.body.push(a),t.abstract&&this.raise(A.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(A.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(A.IndexSignatureHasDeclare,t),t.override&&this.raise(A.IndexSignatureHasOverride,t);return}!this.state.inAbstractClass&&t.abstract&&this.raise(A.NonAbstractClassHasAbstractMethod,t),t.override&&(r.hadSuperClass||this.raise(A.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,r,i)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(A.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(A.ClassMethodHasDeclare,e)}parseExpressionStatement(e,t,r){return(t.type==="Identifier"?this.tsParseExpressionStatement(e,t,r):void 0)||super.parseExpressionStatement(e,t,r)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,t,r){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,t,r);let i=this.tryParse(()=>super.parseConditional(e,t));return i.node?(i.error&&(this.state=i.failState),i.node):(i.error&&super.setOptionalParametersError(r,i.error),e)}parseParenItem(e,t){let r=super.parseParenItem(e,t);if(this.eat(17)&&(r.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,r=this.eatContextual(125);if(r&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(A.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let a=V(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return a?((a.type==="TSInterfaceDeclaration"||a.type==="TSTypeAliasDeclaration"||r)&&(e.exportKind="type"),r&&(this.resetStartLocation(a,t),a.declare=!0),a):null}parseClassId(e,t,r,i){if((!t||r)&&this.isContextual(113))return;super.parseClassId(e,t,r,e.declare?1024:8331);let a=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);a&&(e.typeParameters=a)}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(A.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){let{key:t}=e;this.raise(A.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(A.PrivateElementHasAbstract,e),e.accessibility&&this.raise(A.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(A.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,r,i,a,o){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);l&&a&&this.raise(A.ConstructorHasTypeParameters,l);let{declare:c=!1,kind:p}=t;c&&(p==="get"||p==="set")&&this.raise(A.DeclareAccessor,t,{kind:p}),l&&(t.typeParameters=l),super.pushClassMethod(e,t,r,i,a,o)}pushClassPrivateMethod(e,t,r,i){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(t.typeParameters=a),super.pushClassPrivateMethod(e,t,r,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,r,i,a,o,l){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);return c&&(e.typeParameters=c),super.parseObjPropValue(e,t,r,i,a,o,l)}parseFunctionParams(e,t){let r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(e.typeParameters=r),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let r=this.tsTryParseTypeAnnotation();r&&(e.id.typeAnnotation=r,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var r,i,a,o,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:f}=this.state,b=f[f.length-1];(b===j.j_oTag||b===j.j_expr)&&f.pop()}if(!((r=p)!=null&&r.error)&&!this.match(47))return super.parseMaybeAssign(e,t);(!c||c===this.state)&&(c=this.state.clone());let d,m=this.tryParse(f=>{var b,h;d=this.tsParseTypeParameters(this.tsParseConstModifier);let y=super.parseMaybeAssign(e,t);return(y.type!=="ArrowFunctionExpression"||(b=y.extra)!=null&&b.parenthesized)&&f(),((h=d)==null?void 0:h.params.length)!==0&&this.resetStartLocationFromNode(y,d),y.typeParameters=d,y},c);if(!m.error&&!m.aborted)return d&&this.reportReservedArrowTypeParam(d),m.node;if(!p&&(_i(!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,d&&this.reportReservedArrowTypeParam(d),m.node;if((a=u)!=null&&a.node)return this.state=u.failState,u.node;throw((o=p)==null?void 0:o.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(A.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(r=>{let i=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&r(),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(A.UnexpectedTypeCastInParameter,e):this.raise(A.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,r){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(r!==64||!t)&&["expression",!0];default:return super.isValidLVal(e,t,r)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e,t){if(this.match(47)||this.match(51)){let r=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let i=super.parseMaybeDecoratorArguments(e,t);return i.typeParameters=r,i}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e,t)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){let r=super.parseMaybeDefault(e,t);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(A.TypeAnnotationAfterAssign,r.typeAnnotation),r}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,r){for(let i=0;i<e.length;i++){let a=e[i];a?.type==="TSTypeCastExpression"&&(e[i]=this.typeCastToParameter(a))}super.toAssignableList(e,t,r)}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:r}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return e()}finally{this.state.isAmbientContext=t,this.state.strict=r}}parseClass(e,t,r){let i=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,r)}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(A.NonClassMethodPropertyHasAbstractModifer,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,t,r,i,a,o,l){let c=super.parseMethod(e,t,r,i,a,o,l);if(c.abstract&&(this.hasPlugin("estree")?c.value:c).body){let{key:d}=c;this.raise(A.AbstractMethodHasImplementation,c,{methodName:d.type==="Identifier"&&!c.computed?d.name:`[${this.input.slice(this.offsetToSourcePos(d.start),this.offsetToSourcePos(d.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,r,i){return!t&&i?(this.parseTypeOnlyImportExportSpecifier(e,!1,r),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,r,i))}parseImportSpecifier(e,t,r,i,a){return!t&&i?(this.parseTypeOnlyImportExportSpecifier(e,!0,r),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,r,i,r?4098:4096))}parseTypeOnlyImportExportSpecifier(e,t,r){let i=t?"imported":"local",a=t?"local":"exported",o=e[i],l,c=!1,p=!0,u=o.loc.start;if(this.isContextual(93)){let m=this.parseIdentifier();if(this.isContextual(93)){let f=this.parseIdentifier();Ee(this.state.type)?(c=!0,o=m,l=t?this.parseIdentifier():this.parseModuleExportName(),p=!1):(l=f,p=!1)}else Ee(this.state.type)?(p=!1,l=t?this.parseIdentifier():this.parseModuleExportName()):(c=!0,o=m)}else Ee(this.state.type)&&(c=!0,t?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());c&&r&&this.raise(t?A.TypeModifierIsUsedInTypeImports:A.TypeModifierIsUsedInTypeExports,u),e[i]=o,e[a]=l;let d=t?"importKind":"exportKind";e[d]=c?"type":"value",p&&this.eatContextual(93)&&(e[a]=t?this.parseIdentifier():this.parseModuleExportName()),e[a]||(e[a]=He(e[i])),t&&this.checkIdentifier(e[a],c?4098:4096)}};function hp(s){if(s.type!=="MemberExpression")return!1;let{computed:n,property:e}=s;return n&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:sa(s.object)}function bp(s,n){var e;let{type:t}=s;if((e=s.extra)!=null&&e.parenthesized)return!1;if(n){if(t==="Literal"){let{value:r}=s;if(typeof r=="string"||typeof r=="boolean")return!0}}else if(t==="StringLiteral"||t==="BooleanLiteral")return!0;return!!(na(s,n)||gp(s,n)||t==="TemplateLiteral"&&s.expressions.length===0||hp(s))}function na(s,n){return n?s.type==="Literal"&&(typeof s.value=="number"||"bigint"in s):s.type==="NumericLiteral"||s.type==="BigIntLiteral"}function gp(s,n){if(s.type==="UnaryExpression"){let{operator:e,argument:t}=s;if(e==="-"&&na(t,n))return!0}return!1}function sa(s){return s.type==="Identifier"?!0:s.type!=="MemberExpression"||s.computed?!1:sa(s.object)}var ji=$e`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),yp=s=>class extends s{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 r=e;return(!r.expectedNode||!r.type)&&(r=this.finishNode(r,"Placeholder")),r.expectedNode=t,r}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,r,i){e!==void 0&&super.checkReservedWord(e,t,r,i)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,r){return e==="Placeholder"||super.isValidLVal(e,t,r)}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 r;if(t.type!=="Placeholder"||(r=t.extra)!=null&&r.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){let a=e;return a.label=this.finishPlaceholder(t,"Identifier"),this.next(),a.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(a,"LabeledStatement")}this.semicolon();let i=e;return i.name=t.name,this.finishPlaceholder(i,"Statement")}parseBlock(e,t,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,t,r)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,t,r){let i=t?"ClassDeclaration":"ClassExpression";this.next();let a=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(133)||this.match(5))e.id=o;else{if(r||!t)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,i);throw this.raise(ji.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,t,r);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,a),this.finishNode(e,i)}parseExport(e,t){let r=this.parsePlaceholder("Identifier");if(!r)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(r,"Declaration"),this.finishNode(i,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let a=this.startNode();return a.exported=r,i.specifiers=[this.finishNode(a,"ExportDefaultSpecifier")],super.parseExport(i,t)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(Xe(133),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var r;return(r=e.specifiers)!=null&&r.length?!0:super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){let{specifiers:t}=e;t!=null&&t.length&&(e.specifiers=t.filter(r=>r.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 r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishNode(r,"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(ji.UnexpectedSpace,this.state.lastTokEndLoc)}},vp=s=>class extends s{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,t=this.startNode();if(this.next(),V(this.state.type)){let r=this.parseIdentifierName(),i=this.createIdentifier(t,r);if(i.type="V8IntrinsicIdentifier",this.match(10))return i}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},Vi=["minimal","fsharp","hack","smart"],zi=["^^","@@","^","%","#"];function xp(s){if(s.has("decorators")){if(s.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let e=s.get("decorators").decoratorsBeforeExport;if(e!=null&&typeof e!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let t=s.get("decorators").allowCallParenthesized;if(t!=null&&typeof t!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(s.has("flow")&&s.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(s.has("placeholders")&&s.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(s.has("pipelineOperator")){var n;let e=s.get("pipelineOperator").proposal;if(!Vi.includes(e)){let r=Vi.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${r}.`)}let t=((n=s.get("recordAndTuple"))==null?void 0:n.syntaxType)==="hash";if(e==="hack"){if(s.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(s.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let r=s.get("pipelineOperator").topicToken;if(!zi.includes(r)){let i=zi.map(a=>`"${a}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}if(r==="#"&&t)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",s.get("recordAndTuple")])}\`.`)}else if(e==="smart"&&t)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",s.get("recordAndTuple")])}\`.`)}if(s.has("moduleAttributes")){if(s.has("deprecatedImportAssert")||s.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(s.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(s.has("importAssertions")&&s.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(!s.has("deprecatedImportAssert")&&s.has("importAttributes")&&s.get("importAttributes").deprecatedAssertSyntax&&s.set("deprecatedImportAssert",{}),s.has("recordAndTuple")){let e=s.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(r=>`'${r}'`).join(", "))}}if(s.has("asyncDoExpressions")&&!s.has("doExpressions")){let e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(s.has("optionalChainingAssign")&&s.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 ra={estree:Cc,jsx:pp,flow:lp,typescript:mp,v8intrinsic:vp,placeholders:yp},Pp=Object.keys(ra),tr=class extends er{checkProto(n,e,t,r){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(g.RecordNoProto,i);return}t.used&&(r?r.doubleProtoLoc===null&&(r.doubleProtoLoc=i.loc.start):this.raise(g.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.optionFlags&128&&(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 r=this.startNodeAt(e);for(r.expressions=[t];this.eat(12);)r.expressions.push(this.parseMaybeAssign(n));return this.toReferencedList(r.expressions),this.finishNode(r,"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 o=this.parseYield();return e&&(o=e.call(this,o,t)),o}let r;n?r=!1:(n=new yt,r=!0);let{type:i}=this.state;(i===10||V(i))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(n);if(e&&(a=e.call(this,a,t)),Sc(this.state.type)){let o=this.startNodeAt(t),l=this.state.value;if(o.operator=l,this.match(29)){this.toAssignable(a,!0),o.left=a;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 o.left=a;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(a,this.finishNode(o,"AssignmentExpression")),o}else r&&this.checkExpressionErrors(n,!0);return a}parseMaybeConditional(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,r=this.parseExprOps(n);return this.shouldExitDescending(r,t)?r:this.parseConditional(r,e,n)}parseConditional(n,e,t){if(this.eat(17)){let r=this.startNodeAt(e);return r.test=n,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"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,r=this.parseMaybeUnaryOrPrivate(n);return this.shouldExitDescending(r,t)?r:this.parseExprOp(r,e,-1)}parseExprOp(n,e,t){if(this.isPrivateName(n)){let i=this.getPrivateNameSV(n);(t>=An(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(g.PrivateInExpectedIn,n,{identifierName:i}),this.classScope.usePrivateName(i,n.loc.start)}let r=this.state.type;if(Ic(r)&&(this.prodParam.hasIn||!this.match(58))){let i=An(r);if(i>t){if(r===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return n;this.checkPipelineAtInfixOperator(n,e)}let a=this.startNodeAt(e);a.left=n,a.operator=this.state.value;let o=r===41||r===42,l=r===40;if(l&&(i=An(42)),this.next(),r===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(g.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);a.right=this.parseExprOpRightExpr(r,i);let c=this.finishNode(a,o||l?"LogicalExpression":"BinaryExpression"),p=this.state.type;if(l&&(p===41||p===42)||o&&p===40)throw this.raise(g.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"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}if(this.getPluginOption("pipelineOperator","proposal")==="smart")return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(g.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(n,e),t)});default:return this.parseExprOpBaseRightExpr(n,e)}}parseExprOpBaseRightExpr(n,e){let t=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,Lc(n)?e-1:e)}parseHackPipeBody(){var n;let{startLoc:e}=this.state,t=this.parseMaybeAssign();return hc.has(t.type)&&!((n=t.extra)!=null&&n.parenthesized)&&this.raise(g.PipeUnparenthesizedBody,e,{type:t.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(g.PipeTopicUnused,e),t}checkExponentialAfterUnary(n){this.match(57)&&this.raise(g.UnexpectedTokenUnaryExponentiation,n.argument)}parseMaybeUnary(n,e){let t=this.state.startLoc,r=this.isContextual(96);if(r&&this.recordAwaitIfAllowed()){this.next();let l=this.parseAwait(t);return e||this.checkExponentialAfterUnary(l),l}let i=this.match(34),a=this.startNode();if(kc(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let l=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(n,!0),this.state.strict&&l){let c=a.argument;c.type==="Identifier"?this.raise(g.StrictDelete,a):this.hasPropertyAsPrivateName(c)&&this.raise(g.DeletePrivateField,a)}if(!i)return e||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}let o=this.parseUpdate(a,i,n);if(r){let{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?Us(l):Us(l)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(g.AwaitNotInAsyncContext,t),this.parseAwait(t)}return o}parseUpdate(n,e,t){if(e){let a=n;return this.checkLVal(a.argument,this.finishNode(a,"UpdateExpression")),n}let r=this.state.startLoc,i=this.parseExprSubscripts(t);if(this.checkExpressionErrors(t,!1))return i;for(;Fc(this.state.type)&&!this.canInsertSemicolon();){let a=this.startNodeAt(r);a.operator=this.state.value,a.prefix=!1,a.argument=i,this.next(),this.checkLVal(i,i=this.finishNode(a,"UpdateExpression"))}return i}parseExprSubscripts(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,r=this.parseExprAtom(n);return this.shouldExitDescending(r,t)?r:this.parseSubscripts(r,e)}parseSubscripts(n,e,t){let r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(n),stop:!1};do n=this.parseSubscript(n,e,t,r),r.maybeAsyncArrow=!1;while(!r.stop);return n}parseSubscript(n,e,t,r){let{type:i}=this.state;if(!t&&i===15)return this.parseBind(n,e,t,r);if(kn(i))return this.parseTaggedTemplateExpression(n,e,r);let a=!1;if(i===18){if(t&&(this.raise(g.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return r.stop=!0,n;r.optionalChainMember=a=!0,this.next()}if(!t&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(n,e,r,a);{let o=this.eat(0);return o||a||this.eat(16)?this.parseMember(n,e,r,o,a):(r.stop=!0,n)}}parseMember(n,e,t,r,i){let a=this.startNodeAt(e);return a.object=n,a.computed=r,r?(a.property=this.parseExpression(),this.expect(3)):this.match(139)?(n.type==="Super"&&this.raise(g.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),t.optionalChainMember?(a.optional=i,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(n,e,t,r){let i=this.startNodeAt(e);return i.object=n,this.next(),i.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),e,t)}parseCoverCallAndAsyncArrowHead(n,e,t,r){let i=this.state.maybeInArrowParameters,a=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(e);o.callee=n;let{maybeAsyncArrow:l,optionalChainMember:c}=t;l&&(this.expressionScope.enter(ep()),a=new yt),c&&(o.optional=r),r?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,n.type!=="Super",o,a);let p=this.finishCallExpression(o,c);return l&&this.shouldParseAsyncArrow()&&!r?(t.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),p=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),p)):(l&&(this.checkExpressionErrors(a,!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 r=this.startNodeAt(e);return r.tag=n,r.quasi=this.parseTemplate(!0),t.optionalChainMember&&this.raise(g.OptionalChainingNoTemplate,e),this.finishNode(r,"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(g.ImportCallArity,n);else for(let t of n.arguments)t.type==="SpreadElement"&&this.raise(g.ImportCallSpreadArgument,t);return this.finishNode(n,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(n,e,t,r){let i=[],a=!0,o=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(n);){if(a)a=!1;else if(this.expect(12),this.match(n)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}i.push(this.parseExprListItem(!1,r,e))}return this.state.inFSharpPipelineDirectBody=o,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&&Kt(n,e.innerComments),e.callee.trailingComments&&Kt(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:r}=this.state;switch(r){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.optionFlags&256?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(g.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(g.UnsupportedBind,i)}case 139:return this.raise(g.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());ze(i)||i===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(r===137)return this.parseDecimalLiteral(this.state.value);if(V(r)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let i=this.state.potentialArrowAt===this.state.start,a=this.state.containsEsc,o=this.parseIdentifier();if(!a&&o.name==="async"&&!this.canInsertSemicolon()){let{type:l}=this.state;if(l===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(V(l))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(l===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return i&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}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=oe(this.state.endLoc,-1),this.parseTopicReference(t);this.unexpected()}parseTopicReference(n){let e=this.startNode(),t=this.state.startLoc,r=this.state.type;return this.next(),this.finishTopicReference(e,t,n,r)}finishTopicReference(n,e,t,r){if(this.testTopicReferenceConfiguration(t,e,r))return t==="hack"?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(g.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(n,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(g.PrimaryTopicNotAllowed,e),this.registerTopicReference(),this.finishNode(n,"PipelinePrimaryTopicReference"));throw this.raise(g.PipeTopicUnconfiguredToken,e,{token:Xe(r)})}testTopicReferenceConfiguration(n,e,t){switch(n){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Xe(t)}]);case"smart":return t===27;default:throw this.raise(g.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(n){this.prodParam.enter(In(!0,this.prodParam.hasYield));let e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(g.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.optionFlags&16)?this.raise(g.SuperNotAllowed,n):!this.scope.allowSuper&&!(this.optionFlags&16)&&this.raise(g.UnexpectedSuper,n),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(g.UnsupportedSuper,n),this.finishNode(n,"Super")}parsePrivateName(){let n=this.startNode(),e=this.startNodeAt(oe(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 r=this.state.containsEsc;return n.property=this.parseIdentifier(!0),(n.property.name!==t||r)&&this.raise(g.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(g.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let t=this.isContextual(105);if(this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),!(this.optionFlags&256))throw this.raise(g.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(Zc());let r=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let a=this.state.startLoc,o=[],l=new yt,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 f=this.state.startLoc;if(p=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),f)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}let d=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=i;let m=this.startNodeAt(e);return n&&this.shouldParseArrow(o)&&(m=this.parseArrow(m))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(m,o,!1),m):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),u&&this.unexpected(u),p&&this.unexpected(p),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(o,!0),o.length>1?(t=this.startNodeAt(a),t.expressions=o,this.finishNode(t,"SequenceExpression"),this.resetEndLocation(t,d)):t=o[0],this.wrapParenthesis(e,t))}wrapParenthesis(n,e){if(!(this.optionFlags&512))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.optionFlags&4)&&this.raise(g.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(g.ImportCallNotNewExpression,t)}parseTemplateElement(n){let{start:e,startLoc:t,end:r,value:i}=this.state,a=e+1,o=this.startNodeAt(oe(t,1));i===null&&(n||this.raise(g.InvalidEscapeSequenceTemplate,oe(this.state.firstInvalidTemplateEscapePos,1)));let l=this.match(24),c=l?-1:-2,p=r+c;o.value={raw:this.input.slice(a,p).replace(/\r\n?/g,`
|
|
9
|
+
`),cooked:i===null?null:i.slice(1,c)},o.tail=l,this.next();let u=this.finishNode(o,"TemplateElement");return this.resetEndLocation(u,oe(this.state.lastTokEndLoc,c)),u}parseTemplate(n){let e=this.startNode(),t=this.parseTemplateElement(n),r=[t],i=[];for(;!t.tail;)i.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.push(t=this.parseTemplateElement(n));return e.expressions=i,e.quasis=r,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(n,e,t,r){t&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=Object.create(null),o=!0,l=this.startNode();for(l.properties=[],this.next();!this.match(n);){if(o)o=!1;else if(this.expect(12),this.match(n)){this.addTrailingCommaExtraToNode(l);break}let p;e?p=this.parseBindingProperty():(p=this.parsePropertyDefinition(r),this.checkProto(p,t,a,r)),t&&!this.isObjectProperty(p)&&p.type!=="SpreadElement"&&this.raise(g.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(g.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let t=this.startNode(),r=!1,i=!1,a;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(t.decorators=e,e=[]),t.method=!1,n&&(a=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(t);let l=this.state.containsEsc;if(this.parsePropertyName(t,n),!o&&!l&&this.maybeAsyncOrAccessorProp(t)){let{key:c}=t,p=c.name;p==="async"&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(c),o=this.eat(55),this.parsePropertyName(t)),(p==="get"||p==="set")&&(i=!0,this.resetPreviousNodeTrailingComments(c),t.kind=p,this.match(55)&&(o=!0,this.raise(g.AccessorIsGenerator,this.state.curPosition(),{kind:p}),this.next()),this.parsePropertyName(t))}return this.parseObjPropValue(t,a,o,r,!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),r=this.getObjectOrClassMethodParams(n);r.length!==t&&this.raise(n.kind==="get"?g.BadGetterArity:g.BadSetterArity,n),n.kind==="set"&&((e=r[r.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(g.BadSetterRestParameter,n)}parseObjectMethod(n,e,t,r,i){if(i){let a=this.parseMethod(n,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(t||e||this.match(10))return r&&this.unexpected(),n.kind="method",n.method=!0,this.parseMethod(n,e,t,!1,!1,"ObjectMethod")}parseObjectProperty(n,e,t,r){if(n.shorthand=!1,this.eat(14))return n.value=t?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(r),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,He(n.key));else if(this.match(29)){let i=this.state.startLoc;r!=null?r.shorthandAssignLoc===null&&(r.shorthandAssignLoc=i):this.raise(g.InvalidCoverInitializedName,i),n.value=this.parseMaybeDefault(e,He(n.key))}else n.value=He(n.key);return n.shorthand=!0,this.finishNode(n,"ObjectProperty")}}parseObjPropValue(n,e,t,r,i,a,o){let l=this.parseObjectMethod(n,t,r,i,a)||this.parseObjectProperty(n,e,i,o);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:r}=this.state,i;if(Ee(t))i=this.parseIdentifier(!0);else switch(t){case 135:i=this.parseNumericLiteral(r);break;case 134:i=this.parseStringLiteral(r);break;case 136:i=this.parseBigIntLiteral(r);break;case 139:{let a=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=a):this.raise(g.UnexpectedPrivateField,a),i=this.parsePrivateName();break}default:if(t===137){i=this.parseDecimalLiteral(r);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,r,i,a,o=!1){this.initFunction(n,t),n.generator=e,this.scope.enter(18|(o?64:0)|(i?32:0)),this.prodParam.enter(In(t,n.generator)),this.parseFunctionParams(n,r);let l=this.parseFunctionBodyAndFinish(n,a,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(n,e,t,r){t&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=this.startNode();return this.next(),a.elements=this.parseExprList(n,!t,r,a),this.state.inFSharpPipelineDirectBody=i,this.finishNode(a,t?"TupleExpression":"ArrayExpression")}parseArrowExpression(n,e,t,r){this.scope.enter(6);let i=In(t,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(n,t);let a=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(n,e,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(n,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,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 r=e&&!this.match(5);if(this.expressionScope.enter(ea()),r)n.body=this.parseMaybeAssign(),this.checkParams(n,!1,e,!1);else{let i=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),n.body=this.parseBlock(!0,!1,o=>{let l=!this.isSimpleParamList(n.params);o&&l&&this.raise(g.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=a}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,r=!0){let i=!e&&new Set,a={type:"FormalParameters"};for(let o of n.params)this.checkLVal(o,a,5,i,r)}parseExprList(n,e,t,r){let i=[],a=!0;for(;!this.eat(n);){if(a)a=!1;else if(this.expect(12),this.match(n)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}i.push(this.parseExprListItem(e,t))}return i}parseExprListItem(n,e,t){let r;if(this.match(12))n||this.raise(g.UnexpectedToken,this.state.curPosition(),{unexpected:","}),r=null;else if(this.match(21)){let i=this.state.startLoc;r=this.parseParenItem(this.parseSpread(e),i)}else if(this.match(17)){this.expectPlugin("partialApplication"),t||this.raise(g.UnexpectedArgumentPlaceholder,this.state.startLoc);let i=this.startNode();this.next(),r=this.finishNode(i,"ArgumentPlaceholder")}else r=this.parseMaybeAssignAllowIn(e,this.parseParenItem);return r}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:r}=this.state;Ee(r)?e=this.state.value:this.unexpected();let i=Dc(r);return n?i&&this.replaceToken(132):this.checkReservedWord(e,t,i,!1),this.next(),e}checkReservedWord(n,e,t,r){if(n.length>10||!Hc(n))return;if(t&&Vc(n)){this.raise(g.UnexpectedKeyword,e,{keyword:n});return}if((this.state.strict?r?Xi:Ki:qi)(n,this.inModule)){this.raise(g.UnexpectedReservedWord,e,{reservedWord:n});return}else if(n==="yield"){if(this.prodParam.hasYield){this.raise(g.YieldBindingIdentifier,e);return}}else if(n==="await"){if(this.prodParam.hasAwait){this.raise(g.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(g.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(n==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(g.ArgumentsInClass,e);return}}recordAwaitIfAllowed(){let n=this.prodParam.hasAwait||this.optionFlags&1&&!this.scope.inFunction;return n&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),n}parseAwait(n){let e=this.startNodeAt(n);return this.expressionScope.recordParameterInitializerError(g.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(g.ObsoleteAwaitStar,e),!this.scope.inFunction&&!(this.optionFlags&1)&&(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||kn(n)||n===102&&!this.state.containsEsc||n===138||n===56||this.hasPlugin("v8intrinsic")&&n===54}parseYield(){let n=this.startNode();this.expressionScope.recordParameterInitializerError(g.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(g.ImportCallArity,n)}return this.expect(11),this.finishNode(n,"ImportExpression")}checkPipelineAtInfixOperator(n,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&n.type==="SequenceExpression"&&this.raise(g.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(g.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(g.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 r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,n);return this.state.inFSharpPipelineDirectBody=t,r}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){}},Os={kind:1},Cp={kind:2},wp=/[\uD800-\uDFFF]/u,Bs=/in(?:stanceof)?/y;function Tp(s,n,e){for(let t=0;t<s.length;t++){let r=s[t],{type:i}=r;if(typeof i=="number"){{if(i===139){let{loc:a,start:o,value:l,end:c}=r,p=o+1,u=oe(a.start,1);s.splice(t,1,new Le({type:je(27),value:"#",start:o,end:p,startLoc:a.start,endLoc:u}),new Le({type:je(132),value:l,start:p,end:c,startLoc:u,endLoc:a.end})),t++;continue}if(kn(i)){let{loc:a,start:o,value:l,end:c}=r,p=o+1,u=oe(a.start,1),d;n.charCodeAt(o-e)===96?d=new Le({type:je(22),value:"`",start:o,end:p,startLoc:a.start,endLoc:u}):d=new Le({type:je(8),value:"}",start:o,end:p,startLoc:a.start,endLoc:u});let m,f,b,h;i===24?(f=c-1,b=oe(a.end,-1),m=l===null?null:l.slice(1,-1),h=new Le({type:je(22),value:"`",start:f,end:c,startLoc:b,endLoc:a.end})):(f=c-2,b=oe(a.end,-2),m=l===null?null:l.slice(1,-2),h=new Le({type:je(23),value:"${",start:f,end:c,startLoc:b,endLoc:a.end})),s.splice(t,1,d,new Le({type:je(20),value:m,start:p,end:f,startLoc:u,endLoc:b}),h),t+=2;continue}}r.type=je(i)}}return s}var nr=class extends tr{parseTopLevel(n,e){return n.program=this.parseProgram(e),n.comments=this.comments,this.optionFlags&128&&(n.tokens=Tp(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.optionFlags&32)&&this.scope.undefinedExports.size>0)for(let[i,a]of Array.from(this.scope.undefinedExports))this.raise(g.ModuleExportUndefined,a,{localName:i});this.addExtra(n,"topLevelAwait",this.state.hasTopLevelAwait)}let r;return e===140?r=this.finishNode(n,"Program"):r=this.finishNodeAt(n,"Program",oe(this.state.startLoc,-1)),r}stmtToDirective(n){let e=n;e.type="Directive",e.value=e.expression,delete e.expression;let t=e.value,r=t.value,i=this.input.slice(this.offsetToSourcePos(t.start),this.offsetToSourcePos(t.end)),a=t.value=i.slice(1,-1);return this.addExtra(t,"raw",i),this.addExtra(t,"rawValue",a),this.addExtra(t,"expressionValue",r),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(ze(n)){if(Bs.lastIndex=e,Bs.test(this.input)){let t=this.codePointAtPos(Bs.lastIndex);if(!bt(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(V(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,r=this.startNode(),i=!!(n&2),a=!!(n&4),o=n&1;switch(t){case 60:return this.parseBreakContinueStatement(r,!0);case 63:return this.parseBreakContinueStatement(r,!1);case 64:return this.parseDebuggerStatement(r);case 90:return this.parseDoWhileStatement(r);case 91:return this.parseForStatement(r);case 68:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?g.StrictFunction:this.options.annexB?g.SloppyFunctionAnnexB:g.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,!i&&a);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,r),!0);case 69:return this.parseIfStatement(r);case 70:return this.parseReturnStatement(r);case 71:return this.parseSwitchStatement(r);case 72:return this.parseThrowStatement(r);case 73:return this.parseTryStatement(r);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?i||this.raise(g.UnexpectedLexicalDeclaration,r):this.raise(g.AwaitUsingNotInAsyncContext,r),this.next(),this.parseVarStatement(r,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(g.UnexpectedUsingDeclaration,this.state.startLoc):i||this.raise(g.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(r,"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(g.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let p=this.state.value;return this.parseVarStatement(r,p)}case 92:return this.parseWhileStatement(r);case 76:return this.parseWithStatement(r);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(r);case 83:{let p=this.lookaheadCharCode();if(p===40||p===46)break}case 82:{!(this.optionFlags&8)&&!o&&this.raise(g.UnexpectedImportExport,this.state.startLoc),this.next();let p;return t===83?(p=this.parseImport(r),p.type==="ImportDeclaration"&&(!p.importKind||p.importKind==="value")&&(this.sawUnambiguousESM=!0)):(p=this.parseExport(r,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(g.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!i&&a)}let l=this.state.value,c=this.parseExpression();return V(t)&&c.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(r,l,c,n):this.parseExpressionStatement(r,c,e)}assertModuleNodeAllowed(n){!(this.optionFlags&8)&&!this.inModule&&this.raise(g.ImportOutsideModule,n)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(n,e,t){if(n){var r;(r=e.decorators)!=null&&r.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(g.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...n)):e.decorators=n,this.resetStartLocationFromNode(e,n[0]),t&&this.resetStartLocationFromNode(t,e)}return 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(g.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(g.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 r=this.state.startLoc;this.next(),t=this.parseExpression(),this.expect(11),t=this.wrapParenthesis(r,t);let i=this.state.startLoc;n.expression=this.parseMaybeDecoratorArguments(t,r),this.getPluginOption("decorators","allowCallParenthesized")===!1&&n.expression!==t&&this.raise(g.DecoratorArgumentsOutsideParentheses,i)}else{for(t=this.parseIdentifier(!1);this.eat(16);){let r=this.startNodeAt(e);r.object=t,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),r.property=this.parsePrivateName()):r.property=this.parseIdentifier(!0),r.computed=!1,t=this.finishNode(r,"MemberExpression")}n.expression=this.parseMaybeDecoratorArguments(t,e)}}else n.expression=this.parseExprSubscripts();return this.finishNode(n,"Decorator")}parseMaybeDecoratorArguments(n,e){if(this.eat(10)){let t=this.startNodeAt(e);return t.callee=n,t.arguments=this.parseCallExpressionArguments(11),this.toReferencedList(t.arguments),this.finishNode(t,"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 r=this.state.labels[t];if((n.label==null||r.name===n.label.name)&&(r.kind!=null&&(e||r.kind===1)||n.label&&e))break}if(t===this.state.labels.length){let r=e?"BreakStatement":"ContinueStatement";this.raise(g.IllegalBreakContinue,n,{type:r})}}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(Os),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(Os);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(),d;l?(d="await using",this.recordAwaitIfAllowed()||this.raise(g.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):d=this.state.value,this.next(),this.parseVar(u,!0,d);let m=this.finishNode(u,"VariableDeclaration"),f=this.match(58);return f&&c&&this.raise(g.ForInUsing,m),(f||this.isContextual(102))&&m.declarations.length===1?this.parseForIn(n,m,e):(e!==null&&this.unexpected(e),this.parseFor(n,m))}}let r=this.isContextual(95),i=new yt,a=this.parseExpression(!0,i),o=this.isContextual(102);if(o&&(t&&this.raise(g.ForOfLet,a),e===null&&r&&a.type==="Identifier"&&this.raise(g.ForOfAsync,a)),o||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(a,!0);let l=o?"ForOfStatement":"ForInStatement";return this.checkLVal(a,{type:l}),this.parseForIn(n,a,e)}else this.checkExpressionErrors(i,!0);return e!==null&&this.unexpected(e),this.parseFor(n,a)}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.optionFlags&2)&&this.raise(g.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(Cp),this.scope.enter(0);let t;for(let r;!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():(r&&this.raise(g.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),r=!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(g.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(g.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(Os),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(n,"WhileStatement")}parseWithStatement(n){return this.state.strict&&this.raise(g.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,r){for(let a of this.state.labels)a.name===e&&this.raise(g.LabelRedeclaration,t,{labelName:e});let i=Ac(this.state.type)?1:this.match(71)?2:null;for(let a=this.state.labels.length-1;a>=0;a--){let o=this.state.labels[a];if(o.statementStart===n.start)o.statementStart=this.sourceToOffsetPos(this.state.start),o.kind=i;else break}return this.state.labels.push({name:e,kind:i,statementStart:this.sourceToOffsetPos(this.state.start)}),n.body=r&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 r=this.startNode();return n&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(r,n,!1,8,t),e&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(n){return n.type==="ExpressionStatement"&&n.expression.type==="StringLiteral"&&!n.expression.extra.parenthesized}parseBlockBody(n,e,t,r,i){let a=n.body=[],o=n.directives=[];this.parseBlockOrModuleBlockBody(a,e?o:void 0,t,r,i)}parseBlockOrModuleBlockBody(n,e,t,r,i){let a=this.state.strict,o=!1,l=!1;for(;!this.match(r);){let c=t?this.parseModuleItem():this.parseStatementListItem();if(e&&!l){if(this.isValidDirective(c)){let p=this.stmtToDirective(c);e.push(p),!o&&p.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}n.push(c)}i?.call(this,o),a||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 r=this.match(58);return this.next(),r?t!==null&&this.unexpected(t):n.await=t!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!r||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(g.ForInOfLoopInitializer,e,{type:r?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(g.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),n.left=e,n.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(n,r?"ForInStatement":"ForOfStatement")}parseVar(n,e,t,r=!1){let i=n.declarations=[];for(n.kind=t;;){let a=this.startNode();if(this.parseVarId(a,t),a.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,a.init===null&&!r&&(a.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(g.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(t==="const"||t==="using"||t==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(g.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:t})),i.push(this.finishNode(a,"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(g.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,r=!!(e&1),i=r&&!(e&4),a=!!(e&8);this.initFunction(n,a),this.match(55)&&(t&&this.raise(g.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),n.generator=!0),r&&(n.id=this.parseFunctionId(i));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(In(a,n.generator)),r||(n.id=this.parseFunctionId()),this.parseFunctionParams(n,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(n,r?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),r&&!t&&this.registerFunctionStatementId(n),this.state.maybeInArrowParameters=o,n}parseFunctionId(n){return n||V(this.state.type)?this.parseIdentifier():null}parseFunctionParams(n,e){this.expect(10),this.expressionScope.enter(Qc()),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 r=this.state.strict;return this.state.strict=!0,this.parseClassId(n,e,t),this.parseClassSuper(n),n.body=this.parseClassBody(!!n.superClass,r),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},r=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(r.length>0)throw this.raise(g.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){r.push(this.parseDecorator());continue}let a=this.startNode();r.length&&(a.decorators=r,this.resetStartLocationFromNode(a,r[0]),r=[]),this.parseClassMember(i,a,t),a.kind==="constructor"&&a.decorators&&a.decorators.length>0&&this.raise(g.DecoratorConstructor,a)}}),this.state.strict=e,this.next(),r.length)throw this.raise(g.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(n,e){let t=this.parseIdentifier(!0);if(this.isClassMethod()){let r=e;return r.kind="method",r.computed=!1,r.key=t,r.static=!1,this.pushClassMethod(n,r,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let r=e;return r.computed=!1,r.key=t,r.static=!1,n.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(t),!1}parseClassMember(n,e,t){let r=this.isContextual(106);if(r){if(this.parseClassMemberFromModifier(n,e))return;if(this.eat(5)){this.parseClassStaticBlock(n,e);return}}this.parseClassMemberWithIsStatic(n,e,t,r)}parseClassMemberWithIsStatic(n,e,t,r){let i=e,a=e,o=e,l=e,c=e,p=i,u=i;if(e.static=r,this.parsePropertyNamePrefixOperator(e),this.eat(55)){p.kind="method";let y=this.match(139);if(this.parseClassElementName(p),y){this.pushClassPrivateMethod(n,a,!0,!1);return}this.isNonstaticConstructor(i)&&this.raise(g.ConstructorIsGenerator,i.key),this.pushClassMethod(n,i,!0,!1,!1,!1);return}let d=!this.state.containsEsc&&V(this.state.type),m=this.parseClassElementName(e),f=d?m.name:null,b=this.isPrivateName(m),h=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(p.kind="method",b){this.pushClassPrivateMethod(n,a,!1,!1);return}let y=this.isNonstaticConstructor(i),C=!1;y&&(i.kind="constructor",t.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(g.DuplicateConstructor,m),y&&this.hasPlugin("typescript")&&e.override&&this.raise(g.OverrideOnConstructor,m),t.hadConstructor=!0,C=t.hadSuperClass),this.pushClassMethod(n,i,!1,!1,y,C)}else if(this.isClassProperty())b?this.pushClassPrivateProperty(n,l):this.pushClassProperty(n,o);else if(f==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(m);let y=this.eat(55);u.optional&&this.unexpected(h),p.kind="method";let C=this.match(139);this.parseClassElementName(p),this.parsePostMemberNameModifiers(u),C?this.pushClassPrivateMethod(n,a,y,!0):(this.isNonstaticConstructor(i)&&this.raise(g.ConstructorIsAsync,i.key),this.pushClassMethod(n,i,y,!0,!1,!1))}else if((f==="get"||f==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(m),p.kind=f;let y=this.match(139);this.parseClassElementName(i),y?this.pushClassPrivateMethod(n,a,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(g.ConstructorIsAccessor,i.key),this.pushClassMethod(n,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}else if(f==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(m);let y=this.match(139);this.parseClassElementName(o),this.pushClassAccessorProperty(n,c,y)}else this.isLineTerminator()?b?this.pushClassPrivateProperty(n,l):this.pushClassProperty(n,o):this.unexpected()}parseClassElementName(n){let{type:e,value:t}=this.state;if((e===132||e===134)&&n.static&&t==="prototype"&&this.raise(g.StaticPrototype,this.state.startLoc),e===139){t==="constructor"&&this.raise(g.ConstructorClassPrivateField,this.state.startLoc);let r=this.parsePrivateName();return n.key=r,r}return this.parsePropertyName(n),n.key}parseClassStaticBlock(n,e){var t;this.scope.enter(208);let r=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=r,n.body.push(this.finishNode(e,"StaticBlock")),(t=e.decorators)!=null&&t.length&&this.raise(g.DecoratorStaticBlock,e)}pushClassProperty(n,e){!e.computed&&this.nameIsConstructor(e.key)&&this.raise(g.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(g.ConstructorClassField,e.key);let r=this.parseClassAccessorProperty(e);n.body.push(r),t&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassMethod(n,e,t,r,i,a){n.body.push(this.parseMethod(e,t,r,i,a,"ClassMethod",!0))}pushClassPrivateMethod(n,e,t,r){let i=this.parseMethod(e,t,r,!1,!1,"ClassPrivateMethod",!0);n.body.push(i);let a=i.kind==="get"?i.static?6:2:i.kind==="set"?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,a)}declareClassPrivateMethodInScope(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(ea()),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,r=8331){if(V(this.state.type))n.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(n.id,r);else if(t||!e)n.id=null;else throw this.raise(g.MissingClassName,this.state.startLoc)}parseClassSuper(n){n.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(n,e){let t=this.parseMaybeImportPhase(n,!0),r=this.maybeParseExportDefaultSpecifier(n,t),i=!r||this.eat(12),a=i&&this.eatExportStar(n),o=a&&this.maybeParseExportNamespaceSpecifier(n),l=i&&(!o||this.eat(12)),c=r||a;if(a&&!o){if(r&&this.unexpected(),e)throw this.raise(g.UnsupportedDecoratorExport,n);return this.parseExportFrom(n,!0),this.finishNode(n,"ExportAllDeclaration")}let p=this.maybeParseExportNamedSpecifiers(n);r&&i&&!a&&!p&&this.unexpected(null,5),o&&l&&this.unexpected(null,98);let u;if(c||p){if(u=!1,e)throw this.raise(g.UnsupportedDecoratorExport,n);this.parseExportFrom(n,c)}else u=this.maybeParseExportDeclaration(n);if(c||p||u){var d;let m=n;if(this.checkExport(m,!0,!1,!!m.source),((d=m.declaration)==null?void 0:d.type)==="ClassDeclaration")this.maybeTakeDecorators(e,m.declaration,m);else if(e)throw this.raise(g.UnsupportedDecoratorExport,n);return this.finishNode(m,"ExportNamedDeclaration")}if(this.eat(65)){let m=n,f=this.parseExportDefaultExpression();if(m.declaration=f,f.type==="ClassDeclaration")this.maybeTakeDecorators(e,f,m);else if(e)throw this.raise(g.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),r=this.startNodeAtNode(t);return r.exported=t,n.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(n){if(this.isContextual(93)){var e,t;(t=(e=n).specifiers)!=null||(e.specifiers=[]);let r=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),r.exported=this.parseModuleExportName(),n.specifiers.push(this.finishNode(r,"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(g.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(g.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(V(n)){if(n===95&&!this.state.containsEsc||n===100)return!1;if((n===130||n===129)&&!this.state.containsEsc){let{type:r}=this.lookahead();if(V(r)&&r!==98||r===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||V(this.state.type)&&t)return!0;if(this.match(65)&&t){let r=this.input.charCodeAt(this.nextTokenStartSince(e+4));return r===34||r===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(g.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(g.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(g.UsingDeclarationExport,this.state.startLoc),!0):n===74||n===75||n===68||n===80||this.isLet()||this.isAsyncFunction()}checkExport(n,e,t,r){if(e){var i;if(t){if(this.checkDuplicateExports(n,"default"),this.hasPlugin("exportDefaultFrom")){var a;let o=n.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((a=o.extra)!=null&&a.parenthesized)&&this.raise(g.ExportDefaultFromAsIdentifier,o)}}else if((i=n.specifiers)!=null&&i.length)for(let o of n.specifiers){let{exported:l}=o,c=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(o,c),!r&&o.local){let{local:p}=o;p.type!=="Identifier"?this.raise(g.ExportBindingIsString,o,{localName:p.value,exportName:c}):(this.checkReservedWord(p.name,p.loc.start,!0,!1),this.scope.checkLocalExport(p))}}else if(n.declaration){let o=n.declaration;if(o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"){let{id:l}=o;if(!l)throw new Error("Assertion failure");this.checkDuplicateExports(n,l.name)}else if(o.type==="VariableDeclaration")for(let l of o.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(g.DuplicateDefaultExport,n):this.raise(g.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 r=this.isContextual(130),i=this.match(134),a=this.startNode();a.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(a,i,n,r))}return e}parseExportSpecifier(n,e,t,r){return this.eatContextual(93)?n.exported=this.parseModuleExportName():e?n.exported=np(n.local):n.exported||(n.exported=He(n.local)),this.finishNode(n,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let n=this.parseStringLiteral(this.state.value),e=wp.exec(n.value);return e&&this.raise(g.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(g.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(n.phase==="defer")t!=="ImportNamespaceSpecifier"&&this.raise(g.DeferImportRequiresNamespace,e[0].loc.start);else if(n.module){var r;t!=="ImportDefaultSpecifier"&&this.raise(g.ImportReflectionNotBinding,e[0].loc.start),((r=n.assertions)==null?void 0:r.length)>0&&this.raise(g.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(r=>{let i;if(r.type==="ExportSpecifier"?i=r.local:r.type==="ImportSpecifier"&&(i=r.imported),i!==void 0)return i.type==="Identifier"?i.name!=="default":i.value!=="default"});t!==void 0&&this.raise(g.ImportJSONBindingNotDefault,t.loc.start)}}}isPotentialImportPhase(n){return n?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(n,e,t,r){e||(t==="module"?(this.expectPlugin("importReflection",r),n.module=!0):this.hasPlugin("importReflection")&&(n.module=!1),t==="source"?(this.expectPlugin("sourcePhaseImports",r),n.phase="source"):t==="defer"?(this.expectPlugin("deferredImportEvaluation",r),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:r}=this.state;return(Ee(r)?r!==98||this.lookaheadCharCode()===102:r!==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 V(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 r=!this.maybeParseDefaultImportSpecifier(n,e)||this.eat(12),i=r&&this.maybeParseStarImportSpecifier(n);return r&&!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(),r=this.state.value;if(e.has(r)&&this.raise(g.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),e.add(r),this.match(134)?t.key=this.parseStringLiteral(r):t.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(g.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(g.ModuleAttributeDifferentFromType,t.key),e.has(t.key.name)&&this.raise(g.ModuleAttributesWithDuplicateKeys,t.key,{key:t.key.name}),e.add(t.key.name),this.expect(14),!this.match(134))throw this.raise(g.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(g.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(Ee(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(g.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let t=this.startNode(),r=this.match(134),i=this.isContextual(130);t.imported=this.parseModuleExportName();let a=this.parseImportSpecifier(t,r,n.importKind==="type"||n.importKind==="typeof",i,void 0);n.specifiers.push(a)}}parseImportSpecifier(n,e,t,r,i){if(this.eatContextual(93))n.local=this.parseIdentifier();else{let{imported:a}=n;if(e)throw this.raise(g.ImportBindingIsString,n,{importName:a.value});this.checkReservedWord(a.name,n.loc.start,!0,!0),n.local||(n.local=He(a))}return this.finishImportSpecifier(n,"ImportSpecifier",i)}isThisParam(n){return n.type==="Identifier"&&n.name==="this"}},Mn=class extends nr{constructor(n,e,t){n=xc(n),super(n,e),this.options=n,this.initializeScopes(),this.plugins=t,this.filename=n.sourceFilename,this.startIndex=n.startIndex;let r=0;n.allowAwaitOutsideFunction&&(r|=1),n.allowReturnOutsideFunction&&(r|=2),n.allowImportExportEverywhere&&(r|=8),n.allowSuperOutsideMethod&&(r|=16),n.allowUndeclaredExports&&(r|=32),n.allowNewTargetOutsideFunction&&(r|=4),n.ranges&&(r|=64),n.tokens&&(r|=128),n.createImportExpressions&&(r|=256),n.createParenthesizedExpressions&&(r|=512),n.errorRecovery&&(r|=1024),n.attachComment&&(r|=2048),n.annexB&&(r|=4096),this.optionFlags=r}getScopeHandler(){return qt}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 Dp(s,n){var e;if(((e=n)==null?void 0:e.sourceType)==="unambiguous"){n=Object.assign({},n);try{n.sourceType="module";let t=Ht(n,s),r=t.parse();if(t.sawUnambiguousESM)return r;if(t.ambiguousScriptDifferentAst)try{return n.sourceType="script",Ht(n,s).parse()}catch{}else r.program.sourceType="script";return r}catch(t){try{return n.sourceType="script",Ht(n,s).parse()}catch{}throw t}}else return Ht(n,s).parse()}function Ep(s,n){let e=Ht(n,s);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function Sp(s){let n={};for(let e of Object.keys(s))n[e]=je(s[e]);return n}var Ap=Sp(Tc);function Ht(s,n){let e=Mn,t=new Map;if(s!=null&&s.plugins){for(let r of s.plugins){let i,a;typeof r=="string"?i=r:[i,a]=r,t.has(i)||t.set(i,a||{})}xp(t),e=Ip(t)}return new e(s,n,t)}var $i=new Map;function Ip(s){let n=[];for(let r of Pp)s.has(r)&&n.push(r);let e=n.join("|"),t=$i.get(e);if(!t){t=Mn;for(let r of n)t=ra[r](t);$i.set(e,t)}return t}Jt.parse=Dp;Jt.parseExpression=Ep;Jt.tokTypes=Ap});import{Command as Yd}from"commander";var zr="0.1.54";import dn from"node:path";import{Command as Dd}from"commander";var ne={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},ds={silent:{level:-1},fatal:{level:ne.fatal},error:{level:ne.error},warn:{level:ne.warn},log:{level:ne.log},info:{level:ne.info},success:{level:ne.success},fail:{level:ne.fail},ready:{level:ne.info},start:{level:ne.info},box:{level:ne.info},debug:{level:ne.debug},trace:{level:ne.trace},verbose:{level:ne.verbose}};function cs(s){if(s===null||typeof s!="object")return!1;let n=Object.getPrototypeOf(s);return n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null||Symbol.iterator in s?!1:Symbol.toStringTag in s?Object.prototype.toString.call(s)==="[object Module]":!0}function fs(s,n,e=".",t){if(!cs(n))return fs(s,{},e,t);let r=Object.assign({},n);for(let i in s){if(i==="__proto__"||i==="constructor")continue;let a=s[i];a!=null&&(t&&t(r,i,a,e)||(Array.isArray(a)&&Array.isArray(r[i])?r[i]=[...a,...r[i]]:cs(a)&&cs(r[i])?r[i]=fs(a,r[i],(e?`${e}.`:"")+i.toString(),t):r[i]=a))}return r}function _o(s){return(...n)=>n.reduce((e,t)=>fs(e,t,"",s),{})}var Ro=_o();function jo(s){return Object.prototype.toString.call(s)==="[object Object]"}function Vo(s){return!(!jo(s)||!s.message&&!s.args||s.stack)}var ps=!1,$r=[],ee=class s{options;_lastLog;_mockFn;constructor(n={}){let e=n.types||ds;this.options=Ro({...n,defaults:{...n.defaults},level:us(n.level,e),reporters:[...n.reporters||[]]},{types:ds,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let t in e){let r={type:t,...this.options.defaults,...e[t]};this[t]=this._wrapLogFn(r),this[t].raw=this._wrapLogFn(r,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(n){this.options.level=us(n,this.options.types,this.options.level)}prompt(n,e){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(n,e)}create(n){let e=new s({...this.options,...n});return this._mockFn&&e.mockTypes(this._mockFn),e}withDefaults(n){return this.create({...this.options,defaults:{...this.options.defaults,...n}})}withTag(n){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+n:n})}addReporter(n){return this.options.reporters.push(n),this}removeReporter(n){if(n){let e=this.options.reporters.indexOf(n);if(e!==-1)return this.options.reporters.splice(e,1)}else this.options.reporters.splice(0);return this}setReporters(n){return this.options.reporters=Array.isArray(n)?n:[n],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let n in this.options.types)console["__"+n]||(console["__"+n]=console[n]),console[n]=this[n].raw}restoreConsole(){for(let n in this.options.types)console["__"+n]&&(console[n]=console["__"+n],delete console["__"+n])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(n,e){n&&(n.__write||(n.__write=n.write),n.write=t=>{this[e].raw(String(t).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(n){n&&n.__write&&(n.write=n.__write,delete n.__write)}pauseLogs(){ps=!0}resumeLogs(){ps=!1;let n=$r.splice(0);for(let e of n)e[0]._logFn(e[1],e[2])}mockTypes(n){let e=n||this.options.mockFn;if(this._mockFn=e,typeof e=="function")for(let t in this.options.types)this[t]=e(t,this.options.types[t])||this[t],this[t].raw=this[t]}_wrapLogFn(n,e){return(...t)=>{if(ps){$r.push([this,n,t,e]);return}return this._logFn(n,t,e)}}_logFn(n,e,t){if((n.level||0)>this.level)return!1;let r={date:new Date,args:[],...n,level:us(n.level,this.options.types)};!t&&e.length===1&&Vo(e[0])?Object.assign(r,e[0]):r.args=[...e],r.message&&(r.args.unshift(r.message),delete r.message),r.additional&&(Array.isArray(r.additional)||(r.additional=r.additional.split(`
|
|
10
10
|
`)),r.args.push(`
|
|
11
11
|
`+r.additional.join(`
|
|
12
12
|
`)),delete r.additional),r.type=typeof r.type=="string"?r.type.toLowerCase():"log",r.tag=typeof r.tag=="string"?r.tag:"";let i=(o=!1)=>{let l=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&l>0){let c=[...this._lastLog.object.args];l>1&&c.push(`(repeated ${l} times)`),this._log({...this._lastLog.object,args:c}),this._lastLog.count=1}o&&(this._lastLog.object=r,this._log(r))};clearTimeout(this._lastLog.timeout);let a=this._lastLog.time&&r.date?r.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=r.date,a<this.options.throttle)try{let o=JSON.stringify([r.type,r.tag,r.args]),l=this._lastLog.serialized===o;if(this._lastLog.serialized=o,l&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin)){this._lastLog.timeout=setTimeout(i,this.options.throttle);return}}catch{}i(!0)}_log(n){for(let e of this.options.reporters)e.log(n,{options:this.options})}};function us(s,n={},e=3){return s===void 0?e:typeof s=="number"?s:n[s]&&n[s].level!==void 0?n[s].level:e}ee.prototype.add=ee.prototype.addReporter;ee.prototype.remove=ee.prototype.removeReporter;ee.prototype.clear=ee.prototype.removeReporter;ee.prototype.withScope=ee.prototype.withTag;ee.prototype.mock=ee.prototype.mockTypes;ee.prototype.pause=ee.prototype.pauseLogs;ee.prototype.resume=ee.prototype.resumeLogs;function Hr(s={}){return new ee(s)}import{formatWithOptions as Gr}from"node:util";import{sep as zo}from"node:path";function hs(s){let n=process.cwd()+zo;return s.split(`
|
|
@@ -21,7 +21,7 @@ ${t}`)}formatError(n,e){let t=n.message??Gr(e,n),r=n.stack?this.formatStack(n.st
|
|
|
21
21
|
`:this.filterAndJoin([ms(n.type),ms(n.tag),t])}log(n,e){let t=this.formatLogObj(n,{columns:e.options.stdout.columns||0,...e.options.formatOptions});return $o(t+`
|
|
22
22
|
`,n.level<2?e.options.stderr||process.stderr:e.options.stdout||process.stdout)}};import Qr from"node:process";import*as gn from"node:tty";var{env:We={},argv:Kr=[],platform:Ho=""}=typeof process>"u"?{}:process,Go="NO_COLOR"in We||Kr.includes("--no-color"),Wo="FORCE_COLOR"in We||Kr.includes("--color"),qo=Ho==="win32",Jr=We.TERM==="dumb",Ko=gn&&gn.isatty&&gn.isatty(1)&&We.TERM&&!Jr,Jo="CI"in We&&("GITHUB_ACTIONS"in We||"GITLAB_CI"in We||"CIRCLECI"in We),Xo=!Go&&(Wo||qo&&!Jr||Ko||Jo);function Xr(s,n,e,t,r=n.slice(0,Math.max(0,s))+t,i=n.slice(Math.max(0,s+e.length)),a=i.indexOf(e)){return r+(a<0?i:Xr(a,i,e,t))}function Yo(s,n,e,t,r){return s<0?e+n+t:e+Xr(s,n,t,r)+t}function Qo(s,n,e=s,t=s.length+1){return r=>r||!(r===""||r===void 0)?Yo((""+r).indexOf(n,t),r,s,n,e):""}function B(s,n,e){return Qo(`\x1B[${s}m`,`\x1B[${n}m`,e)}var Wr={reset:B(0,0),bold:B(1,22,"\x1B[22m\x1B[1m"),dim:B(2,22,"\x1B[22m\x1B[2m"),italic:B(3,23),underline:B(4,24),inverse:B(7,27),hidden:B(8,28),strikethrough:B(9,29),black:B(30,39),red:B(31,39),green:B(32,39),yellow:B(33,39),blue:B(34,39),magenta:B(35,39),cyan:B(36,39),white:B(37,39),gray:B(90,39),bgBlack:B(40,49),bgRed:B(41,49),bgGreen:B(42,49),bgYellow:B(43,49),bgBlue:B(44,49),bgMagenta:B(45,49),bgCyan:B(46,49),bgWhite:B(47,49),blackBright:B(90,39),redBright:B(91,39),greenBright:B(92,39),yellowBright:B(93,39),blueBright:B(94,39),magentaBright:B(95,39),cyanBright:B(96,39),whiteBright:B(97,39),bgBlackBright:B(100,49),bgRedBright:B(101,49),bgGreenBright:B(102,49),bgYellowBright:B(103,49),bgBlueBright:B(104,49),bgMagentaBright:B(105,49),bgCyanBright:B(106,49),bgWhiteBright:B(107,49)};function Zo(s=Xo){return s?Wr:Object.fromEntries(Object.keys(Wr).map(n=>[n,String]))}var ie=Zo();function el(s,n="reset"){return ie[s]||ie[n]}var tl=[String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");function Ze(s){return s.replace(new RegExp(tl,"g"),"")}var qr={solid:{tl:"\u250C",tr:"\u2510",bl:"\u2514",br:"\u2518",h:"\u2500",v:"\u2502"},double:{tl:"\u2554",tr:"\u2557",bl:"\u255A",br:"\u255D",h:"\u2550",v:"\u2551"},doubleSingle:{tl:"\u2553",tr:"\u2556",bl:"\u2559",br:"\u255C",h:"\u2500",v:"\u2551"},doubleSingleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2551"},singleThick:{tl:"\u250F",tr:"\u2513",bl:"\u2517",br:"\u251B",h:"\u2501",v:"\u2503"},singleDouble:{tl:"\u2552",tr:"\u2555",bl:"\u2558",br:"\u255B",h:"\u2550",v:"\u2502"},singleDoubleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2550",v:"\u2502"},rounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2502"}},nl={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1};function Yr(s,n={}){let e={...n,style:{...nl,...n.style}},t=s.split(`
|
|
23
23
|
`),r=[],i=el(e.style.borderColor),a={...typeof e.style.borderStyle=="string"?qr[e.style.borderStyle]||qr.solid:e.style.borderStyle};if(i)for(let m in a)a[m]=i(a[m]);let o=e.style.padding%2===0?e.style.padding:e.style.padding+1,l=t.length+o,c=Math.max(...t.map(m=>Ze(m).length))+o,p=c+o,u=e.style.marginLeft>0?" ".repeat(e.style.marginLeft):"";if(e.style.marginTop>0&&r.push("".repeat(e.style.marginTop)),e.title){let m=i?i(e.title):e.title,f=a.h.repeat(Math.floor((c-Ze(e.title).length)/2)),b=a.h.repeat(c-Ze(e.title).length-Ze(f).length+o);r.push(`${u}${a.tl}${f}${m}${b}${a.tr}`)}else r.push(`${u}${a.tl}${a.h.repeat(p)}${a.tr}`);let d=e.style.valign==="center"?Math.floor((l-t.length)/2):e.style.valign==="top"?l-t.length-o:l-t.length;for(let m=0;m<l;m++)if(m<d||m>=d+t.length)r.push(`${u}${a.v}${" ".repeat(p)}${a.v}`);else{let f=t[m-d],b=" ".repeat(o),h=" ".repeat(c-Ze(f).length);r.push(`${u}${a.v}${b}${f}${h}${a.v}`)}return r.push(`${u}${a.bl}${a.h.repeat(p)}${a.br}`),e.style.marginBottom>0&&r.push("".repeat(e.style.marginBottom)),r.join(`
|
|
24
|
-
`)}var vn=Object.create(null),Bt=s=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(s?vn:globalThis),qe=new Proxy(vn,{get(s,n){return Bt()[n]??vn[n]},has(s,n){let e=Bt();return n in e||n in vn},set(s,n,e){let t=Bt(!0);return t[n]=e,!0},deleteProperty(s,n){if(!n)return!1;let e=Bt(!0);return delete e[n],!0},ownKeys(){let s=Bt(!0);return Object.keys(s)}}),sl=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",rl=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function il(){if(globalThis.process?.env)for(let s of rl){let n=s[1]||s[0];if(globalThis.process?.env[n])return{name:s[0].toLowerCase(),...s[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}var ni=il();ni.name;function et(s){return s?s!=="false":!1}var al=globalThis.process?.platform||"",gs=et(qe.CI)||ni.ci!==!1,si=et(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),ol=et(qe.DEBUG),ys=sl==="test"||et(qe.TEST);et(qe.MINIMAL);var ll=/^win/i.test(al);!et(qe.NO_COLOR)&&(et(qe.FORCE_COLOR)||(si||ll)&&qe.TERM);var cl=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(cl?.split(".")[0]);var pl=globalThis.process||Object.create(null),Zr={versions:{}};new Proxy(pl,{get(s,n){if(n==="env")return qe;if(n in s)return s[n];if(n in Zr)return Zr[n]}});var ul=globalThis.process?.release?.name==="node",dl=!!globalThis.Bun||!!globalThis.process?.versions?.bun,fl=!!globalThis.Deno,ml=!!globalThis.fastly,hl=!!globalThis.Netlify,bl=!!globalThis.EdgeRuntime,gl=globalThis.navigator?.userAgent==="Cloudflare-Workers",yl=[[hl,"netlify"],[bl,"edge-light"],[gl,"workerd"],[ml,"fastly"],[fl,"deno"],[dl,"bun"],[ul,"node"]];function vl(){let s=yl.find(n=>n[0]);if(s)return{name:s[1]}}var xl=vl();xl?.name;function Pl({onlyFirst:s=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,s?void 0:"g")}var Tl=Pl();function Cl(s){if(typeof s!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof s}\``);return s.replace(Tl,"")}function wl(s){return s===161||s===164||s===167||s===168||s===170||s===173||s===174||s>=176&&s<=180||s>=182&&s<=186||s>=188&&s<=191||s===198||s===208||s===215||s===216||s>=222&&s<=225||s===230||s>=232&&s<=234||s===236||s===237||s===240||s===242||s===243||s>=247&&s<=250||s===252||s===254||s===257||s===273||s===275||s===283||s===294||s===295||s===299||s>=305&&s<=307||s===312||s>=319&&s<=322||s===324||s>=328&&s<=331||s===333||s===338||s===339||s===358||s===359||s===363||s===462||s===464||s===466||s===468||s===470||s===472||s===474||s===476||s===593||s===609||s===708||s===711||s>=713&&s<=715||s===717||s===720||s>=728&&s<=731||s===733||s===735||s>=768&&s<=879||s>=913&&s<=929||s>=931&&s<=937||s>=945&&s<=961||s>=963&&s<=969||s===1025||s>=1040&&s<=1103||s===1105||s===8208||s>=8211&&s<=8214||s===8216||s===8217||s===8220||s===8221||s>=8224&&s<=8226||s>=8228&&s<=8231||s===8240||s===8242||s===8243||s===8245||s===8251||s===8254||s===8308||s===8319||s>=8321&&s<=8324||s===8364||s===8451||s===8453||s===8457||s===8467||s===8470||s===8481||s===8482||s===8486||s===8491||s===8531||s===8532||s>=8539&&s<=8542||s>=8544&&s<=8555||s>=8560&&s<=8569||s===8585||s>=8592&&s<=8601||s===8632||s===8633||s===8658||s===8660||s===8679||s===8704||s===8706||s===8707||s===8711||s===8712||s===8715||s===8719||s===8721||s===8725||s===8730||s>=8733&&s<=8736||s===8739||s===8741||s>=8743&&s<=8748||s===8750||s>=8756&&s<=8759||s===8764||s===8765||s===8776||s===8780||s===8786||s===8800||s===8801||s>=8804&&s<=8807||s===8810||s===8811||s===8814||s===8815||s===8834||s===8835||s===8838||s===8839||s===8853||s===8857||s===8869||s===8895||s===8978||s>=9312&&s<=9449||s>=9451&&s<=9547||s>=9552&&s<=9587||s>=9600&&s<=9615||s>=9618&&s<=9621||s===9632||s===9633||s>=9635&&s<=9641||s===9650||s===9651||s===9654||s===9655||s===9660||s===9661||s===9664||s===9665||s>=9670&&s<=9672||s===9675||s>=9678&&s<=9681||s>=9698&&s<=9701||s===9711||s===9733||s===9734||s===9737||s===9742||s===9743||s===9756||s===9758||s===9792||s===9794||s===9824||s===9825||s>=9827&&s<=9829||s>=9831&&s<=9834||s===9836||s===9837||s===9839||s===9886||s===9887||s===9919||s>=9926&&s<=9933||s>=9935&&s<=9939||s>=9941&&s<=9953||s===9955||s===9960||s===9961||s>=9963&&s<=9969||s===9972||s>=9974&&s<=9977||s===9979||s===9980||s===9982||s===9983||s===10045||s>=10102&&s<=10111||s>=11094&&s<=11097||s>=12872&&s<=12879||s>=57344&&s<=63743||s>=65024&&s<=65039||s===65533||s>=127232&&s<=127242||s>=127248&&s<=127277||s>=127280&&s<=127337||s>=127344&&s<=127373||s===127375||s===127376||s>=127387&&s<=127404||s>=917760&&s<=917999||s>=983040&&s<=1048573||s>=1048576&&s<=1114109}function Dl(s){return s===12288||s>=65281&&s<=65376||s>=65504&&s<=65510}function El(s){return s>=4352&&s<=4447||s===8986||s===8987||s===9001||s===9002||s>=9193&&s<=9196||s===9200||s===9203||s===9725||s===9726||s===9748||s===9749||s>=9776&&s<=9783||s>=9800&&s<=9811||s===9855||s>=9866&&s<=9871||s===9875||s===9889||s===9898||s===9899||s===9917||s===9918||s===9924||s===9925||s===9934||s===9940||s===9962||s===9970||s===9971||s===9973||s===9978||s===9981||s===9989||s===9994||s===9995||s===10024||s===10060||s===10062||s>=10067&&s<=10069||s===10071||s>=10133&&s<=10135||s===10160||s===10175||s===11035||s===11036||s===11088||s===11093||s>=11904&&s<=11929||s>=11931&&s<=12019||s>=12032&&s<=12245||s>=12272&&s<=12287||s>=12289&&s<=12350||s>=12353&&s<=12438||s>=12441&&s<=12543||s>=12549&&s<=12591||s>=12593&&s<=12686||s>=12688&&s<=12773||s>=12783&&s<=12830||s>=12832&&s<=12871||s>=12880&&s<=42124||s>=42128&&s<=42182||s>=43360&&s<=43388||s>=44032&&s<=55203||s>=63744&&s<=64255||s>=65040&&s<=65049||s>=65072&&s<=65106||s>=65108&&s<=65126||s>=65128&&s<=65131||s>=94176&&s<=94180||s===94192||s===94193||s>=94208&&s<=100343||s>=100352&&s<=101589||s>=101631&&s<=101640||s>=110576&&s<=110579||s>=110581&&s<=110587||s===110589||s===110590||s>=110592&&s<=110882||s===110898||s>=110928&&s<=110930||s===110933||s>=110948&&s<=110951||s>=110960&&s<=111355||s>=119552&&s<=119638||s>=119648&&s<=119670||s===126980||s===127183||s===127374||s>=127377&&s<=127386||s>=127488&&s<=127490||s>=127504&&s<=127547||s>=127552&&s<=127560||s===127568||s===127569||s>=127584&&s<=127589||s>=127744&&s<=127776||s>=127789&&s<=127797||s>=127799&&s<=127868||s>=127870&&s<=127891||s>=127904&&s<=127946||s>=127951&&s<=127955||s>=127968&&s<=127984||s===127988||s>=127992&&s<=128062||s===128064||s>=128066&&s<=128252||s>=128255&&s<=128317||s>=128331&&s<=128334||s>=128336&&s<=128359||s===128378||s===128405||s===128406||s===128420||s>=128507&&s<=128591||s>=128640&&s<=128709||s===128716||s>=128720&&s<=128722||s>=128725&&s<=128727||s>=128732&&s<=128735||s===128747||s===128748||s>=128756&&s<=128764||s>=128992&&s<=129003||s===129008||s>=129292&&s<=129338||s>=129340&&s<=129349||s>=129351&&s<=129535||s>=129648&&s<=129660||s>=129664&&s<=129673||s>=129679&&s<=129734||s>=129742&&s<=129756||s>=129759&&s<=129769||s>=129776&&s<=129784||s>=131072&&s<=196605||s>=196608&&s<=262141}function Sl(s){if(!Number.isSafeInteger(s))throw new TypeError(`Expected a code point, got \`${typeof s}\`.`)}function Al(s,{ambiguousAsWide:n=!1}={}){return Sl(s),Dl(s)||El(s)||n&&wl(s)?2:1}var Il=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,Fl=globalThis.Intl?.Segmenter?new Intl.Segmenter:{segment:s=>s.split("")},kl=/^\p{Default_Ignorable_Code_Point}$/u;function Nl(s,n={}){if(typeof s!="string"||s.length===0)return 0;let{ambiguousIsNarrow:e=!0,countAnsiEscapeCodes:t=!1}=n;if(t||(s=Cl(s)),s.length===0)return 0;let r=0,i={ambiguousAsWide:!e};for(let{segment:a}of Fl.segment(s)){let o=a.codePointAt(0);if(!(o<=31||o>=127&&o<=159)&&!(o>=8203&&o<=8207||o===65279)&&!(o>=768&&o<=879||o>=6832&&o<=6911||o>=7616&&o<=7679||o>=8400&&o<=8447||o>=65056&&o<=65071)&&!(o>=55296&&o<=57343)&&!(o>=65024&&o<=65039)&&!kl.test(a)){if(Il().test(a)){r+=2;continue}r+=Al(o,i)}}return r}function Ml(){let{env:s}=Qr,{TERM:n,TERM_PROGRAM:e}=s;return Qr.platform!=="win32"?n!=="linux":!!s.WT_SESSION||!!s.TERMINUS_SUBLIME||s.ConEmuTask==="{cmd::Cmder}"||e==="Terminus-Sublime"||e==="vscode"||n==="xterm-256color"||n==="alacritty"||n==="rxvt-unicode"||n==="rxvt-unicode-256color"||s.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Ll={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},Ol={0:"red",1:"yellow"},Bl=Ml(),Ne=(s,n)=>Bl?s:n,ei={error:Ne("\u2716","\xD7"),fatal:Ne("\u2716","\xD7"),ready:Ne("\u2714","\u221A"),warn:Ne("\u26A0","\u203C"),info:Ne("\u2139","i"),success:Ne("\u2714","\u221A"),debug:Ne("\u2699","D"),trace:Ne("\u2192","\u2192"),fail:Ne("\u2716","\xD7"),start:Ne("\u25D0","o"),log:""};function ti(s){return!(typeof Intl=="object")||!Intl.Segmenter?Ze(s).length:Nl(s)}var bs=class extends Ot{formatStack(n,e){let t=" ".repeat((e?.errorLevel||0)+1);return`
|
|
24
|
+
`)}var vn=Object.create(null),Bt=s=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(s?vn:globalThis),qe=new Proxy(vn,{get(s,n){return Bt()[n]??vn[n]},has(s,n){let e=Bt();return n in e||n in vn},set(s,n,e){let t=Bt(!0);return t[n]=e,!0},deleteProperty(s,n){if(!n)return!1;let e=Bt(!0);return delete e[n],!0},ownKeys(){let s=Bt(!0);return Object.keys(s)}}),sl=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",rl=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function il(){if(globalThis.process?.env)for(let s of rl){let n=s[1]||s[0];if(globalThis.process?.env[n])return{name:s[0].toLowerCase(),...s[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}var ni=il();ni.name;function et(s){return s?s!=="false":!1}var al=globalThis.process?.platform||"",gs=et(qe.CI)||ni.ci!==!1,si=et(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),ol=et(qe.DEBUG),ys=sl==="test"||et(qe.TEST);et(qe.MINIMAL);var ll=/^win/i.test(al);!et(qe.NO_COLOR)&&(et(qe.FORCE_COLOR)||(si||ll)&&qe.TERM);var cl=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(cl?.split(".")[0]);var pl=globalThis.process||Object.create(null),Zr={versions:{}};new Proxy(pl,{get(s,n){if(n==="env")return qe;if(n in s)return s[n];if(n in Zr)return Zr[n]}});var ul=globalThis.process?.release?.name==="node",dl=!!globalThis.Bun||!!globalThis.process?.versions?.bun,fl=!!globalThis.Deno,ml=!!globalThis.fastly,hl=!!globalThis.Netlify,bl=!!globalThis.EdgeRuntime,gl=globalThis.navigator?.userAgent==="Cloudflare-Workers",yl=[[hl,"netlify"],[bl,"edge-light"],[gl,"workerd"],[ml,"fastly"],[fl,"deno"],[dl,"bun"],[ul,"node"]];function vl(){let s=yl.find(n=>n[0]);if(s)return{name:s[1]}}var xl=vl();xl?.name;function Pl({onlyFirst:s=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,s?void 0:"g")}var Cl=Pl();function wl(s){if(typeof s!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof s}\``);return s.replace(Cl,"")}function Tl(s){return s===161||s===164||s===167||s===168||s===170||s===173||s===174||s>=176&&s<=180||s>=182&&s<=186||s>=188&&s<=191||s===198||s===208||s===215||s===216||s>=222&&s<=225||s===230||s>=232&&s<=234||s===236||s===237||s===240||s===242||s===243||s>=247&&s<=250||s===252||s===254||s===257||s===273||s===275||s===283||s===294||s===295||s===299||s>=305&&s<=307||s===312||s>=319&&s<=322||s===324||s>=328&&s<=331||s===333||s===338||s===339||s===358||s===359||s===363||s===462||s===464||s===466||s===468||s===470||s===472||s===474||s===476||s===593||s===609||s===708||s===711||s>=713&&s<=715||s===717||s===720||s>=728&&s<=731||s===733||s===735||s>=768&&s<=879||s>=913&&s<=929||s>=931&&s<=937||s>=945&&s<=961||s>=963&&s<=969||s===1025||s>=1040&&s<=1103||s===1105||s===8208||s>=8211&&s<=8214||s===8216||s===8217||s===8220||s===8221||s>=8224&&s<=8226||s>=8228&&s<=8231||s===8240||s===8242||s===8243||s===8245||s===8251||s===8254||s===8308||s===8319||s>=8321&&s<=8324||s===8364||s===8451||s===8453||s===8457||s===8467||s===8470||s===8481||s===8482||s===8486||s===8491||s===8531||s===8532||s>=8539&&s<=8542||s>=8544&&s<=8555||s>=8560&&s<=8569||s===8585||s>=8592&&s<=8601||s===8632||s===8633||s===8658||s===8660||s===8679||s===8704||s===8706||s===8707||s===8711||s===8712||s===8715||s===8719||s===8721||s===8725||s===8730||s>=8733&&s<=8736||s===8739||s===8741||s>=8743&&s<=8748||s===8750||s>=8756&&s<=8759||s===8764||s===8765||s===8776||s===8780||s===8786||s===8800||s===8801||s>=8804&&s<=8807||s===8810||s===8811||s===8814||s===8815||s===8834||s===8835||s===8838||s===8839||s===8853||s===8857||s===8869||s===8895||s===8978||s>=9312&&s<=9449||s>=9451&&s<=9547||s>=9552&&s<=9587||s>=9600&&s<=9615||s>=9618&&s<=9621||s===9632||s===9633||s>=9635&&s<=9641||s===9650||s===9651||s===9654||s===9655||s===9660||s===9661||s===9664||s===9665||s>=9670&&s<=9672||s===9675||s>=9678&&s<=9681||s>=9698&&s<=9701||s===9711||s===9733||s===9734||s===9737||s===9742||s===9743||s===9756||s===9758||s===9792||s===9794||s===9824||s===9825||s>=9827&&s<=9829||s>=9831&&s<=9834||s===9836||s===9837||s===9839||s===9886||s===9887||s===9919||s>=9926&&s<=9933||s>=9935&&s<=9939||s>=9941&&s<=9953||s===9955||s===9960||s===9961||s>=9963&&s<=9969||s===9972||s>=9974&&s<=9977||s===9979||s===9980||s===9982||s===9983||s===10045||s>=10102&&s<=10111||s>=11094&&s<=11097||s>=12872&&s<=12879||s>=57344&&s<=63743||s>=65024&&s<=65039||s===65533||s>=127232&&s<=127242||s>=127248&&s<=127277||s>=127280&&s<=127337||s>=127344&&s<=127373||s===127375||s===127376||s>=127387&&s<=127404||s>=917760&&s<=917999||s>=983040&&s<=1048573||s>=1048576&&s<=1114109}function Dl(s){return s===12288||s>=65281&&s<=65376||s>=65504&&s<=65510}function El(s){return s>=4352&&s<=4447||s===8986||s===8987||s===9001||s===9002||s>=9193&&s<=9196||s===9200||s===9203||s===9725||s===9726||s===9748||s===9749||s>=9776&&s<=9783||s>=9800&&s<=9811||s===9855||s>=9866&&s<=9871||s===9875||s===9889||s===9898||s===9899||s===9917||s===9918||s===9924||s===9925||s===9934||s===9940||s===9962||s===9970||s===9971||s===9973||s===9978||s===9981||s===9989||s===9994||s===9995||s===10024||s===10060||s===10062||s>=10067&&s<=10069||s===10071||s>=10133&&s<=10135||s===10160||s===10175||s===11035||s===11036||s===11088||s===11093||s>=11904&&s<=11929||s>=11931&&s<=12019||s>=12032&&s<=12245||s>=12272&&s<=12287||s>=12289&&s<=12350||s>=12353&&s<=12438||s>=12441&&s<=12543||s>=12549&&s<=12591||s>=12593&&s<=12686||s>=12688&&s<=12773||s>=12783&&s<=12830||s>=12832&&s<=12871||s>=12880&&s<=42124||s>=42128&&s<=42182||s>=43360&&s<=43388||s>=44032&&s<=55203||s>=63744&&s<=64255||s>=65040&&s<=65049||s>=65072&&s<=65106||s>=65108&&s<=65126||s>=65128&&s<=65131||s>=94176&&s<=94180||s===94192||s===94193||s>=94208&&s<=100343||s>=100352&&s<=101589||s>=101631&&s<=101640||s>=110576&&s<=110579||s>=110581&&s<=110587||s===110589||s===110590||s>=110592&&s<=110882||s===110898||s>=110928&&s<=110930||s===110933||s>=110948&&s<=110951||s>=110960&&s<=111355||s>=119552&&s<=119638||s>=119648&&s<=119670||s===126980||s===127183||s===127374||s>=127377&&s<=127386||s>=127488&&s<=127490||s>=127504&&s<=127547||s>=127552&&s<=127560||s===127568||s===127569||s>=127584&&s<=127589||s>=127744&&s<=127776||s>=127789&&s<=127797||s>=127799&&s<=127868||s>=127870&&s<=127891||s>=127904&&s<=127946||s>=127951&&s<=127955||s>=127968&&s<=127984||s===127988||s>=127992&&s<=128062||s===128064||s>=128066&&s<=128252||s>=128255&&s<=128317||s>=128331&&s<=128334||s>=128336&&s<=128359||s===128378||s===128405||s===128406||s===128420||s>=128507&&s<=128591||s>=128640&&s<=128709||s===128716||s>=128720&&s<=128722||s>=128725&&s<=128727||s>=128732&&s<=128735||s===128747||s===128748||s>=128756&&s<=128764||s>=128992&&s<=129003||s===129008||s>=129292&&s<=129338||s>=129340&&s<=129349||s>=129351&&s<=129535||s>=129648&&s<=129660||s>=129664&&s<=129673||s>=129679&&s<=129734||s>=129742&&s<=129756||s>=129759&&s<=129769||s>=129776&&s<=129784||s>=131072&&s<=196605||s>=196608&&s<=262141}function Sl(s){if(!Number.isSafeInteger(s))throw new TypeError(`Expected a code point, got \`${typeof s}\`.`)}function Al(s,{ambiguousAsWide:n=!1}={}){return Sl(s),Dl(s)||El(s)||n&&Tl(s)?2:1}var Il=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,Fl=globalThis.Intl?.Segmenter?new Intl.Segmenter:{segment:s=>s.split("")},kl=/^\p{Default_Ignorable_Code_Point}$/u;function Nl(s,n={}){if(typeof s!="string"||s.length===0)return 0;let{ambiguousIsNarrow:e=!0,countAnsiEscapeCodes:t=!1}=n;if(t||(s=wl(s)),s.length===0)return 0;let r=0,i={ambiguousAsWide:!e};for(let{segment:a}of Fl.segment(s)){let o=a.codePointAt(0);if(!(o<=31||o>=127&&o<=159)&&!(o>=8203&&o<=8207||o===65279)&&!(o>=768&&o<=879||o>=6832&&o<=6911||o>=7616&&o<=7679||o>=8400&&o<=8447||o>=65056&&o<=65071)&&!(o>=55296&&o<=57343)&&!(o>=65024&&o<=65039)&&!kl.test(a)){if(Il().test(a)){r+=2;continue}r+=Al(o,i)}}return r}function Ml(){let{env:s}=Qr,{TERM:n,TERM_PROGRAM:e}=s;return Qr.platform!=="win32"?n!=="linux":!!s.WT_SESSION||!!s.TERMINUS_SUBLIME||s.ConEmuTask==="{cmd::Cmder}"||e==="Terminus-Sublime"||e==="vscode"||n==="xterm-256color"||n==="alacritty"||n==="rxvt-unicode"||n==="rxvt-unicode-256color"||s.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Ll={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},Ol={0:"red",1:"yellow"},Bl=Ml(),Ne=(s,n)=>Bl?s:n,ei={error:Ne("\u2716","\xD7"),fatal:Ne("\u2716","\xD7"),ready:Ne("\u2714","\u221A"),warn:Ne("\u26A0","\u203C"),info:Ne("\u2139","i"),success:Ne("\u2714","\u221A"),debug:Ne("\u2699","D"),trace:Ne("\u2192","\u2192"),fail:Ne("\u2716","\xD7"),start:Ne("\u25D0","o"),log:""};function ti(s){return!(typeof Intl=="object")||!Intl.Segmenter?Ze(s).length:Nl(s)}var bs=class extends Ot{formatStack(n,e){let t=" ".repeat((e?.errorLevel||0)+1);return`
|
|
25
25
|
${t}`+hs(n).map(r=>" "+r.replace(/^at +/,i=>ie.gray(i)).replace(/\((.+)\)/,(i,a)=>`(${ie.cyan(a)})`)).join(`
|
|
26
26
|
${t}`)}formatType(n,e,t){let r=Ll[n.type]||Ol[n.level]||"gray";if(e)return _l(r)(ie.black(` ${n.type.toUpperCase()} `));let i=typeof ei[n.type]=="string"?ei[n.type]:n.icon||n.type;return i?Ul(r)(i):""}formatLogObj(n,e){let[t,...r]=this.formatArgs(n.args,e).split(`
|
|
27
27
|
`);if(n.type==="box")return Yr(yn(t+(r.length>0?`
|
|
@@ -5385,6 +5385,89 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
5385
5385
|
@apply hover:bg-accent/5;
|
|
5386
5386
|
}
|
|
5387
5387
|
</style>
|
|
5388
|
+
`}],utils:[],composables:[],plugins:[]},{name:"Description List",value:"description-list",files:[{fileName:"DescriptionList/DescriptionList.vue",dirPath:"app/components/Ui",fileContent:`<template>
|
|
5389
|
+
<Primitive
|
|
5390
|
+
v-bind="reactiveOmit(props, 'class')"
|
|
5391
|
+
:class="descriptionListDetailsStyles({ class: props.class })"
|
|
5392
|
+
>
|
|
5393
|
+
<slot />
|
|
5394
|
+
</Primitive>
|
|
5395
|
+
</template>
|
|
5396
|
+
<script lang="ts">
|
|
5397
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
5398
|
+
import { Primitive } from "radix-vue";
|
|
5399
|
+
import type { PrimitiveProps } from "radix-vue";
|
|
5400
|
+
|
|
5401
|
+
export type DescriptionDetailsProps = PrimitiveProps & {
|
|
5402
|
+
class?: any;
|
|
5403
|
+
};
|
|
5404
|
+
|
|
5405
|
+
export const descriptionListDetailsStyles = tv({
|
|
5406
|
+
base: "grid grid-cols-1 text-base/6 sm:grid-cols-2 sm:text-sm/6",
|
|
5407
|
+
});
|
|
5408
|
+
</script>
|
|
5409
|
+
|
|
5410
|
+
<script lang="ts" setup>
|
|
5411
|
+
const props = withDefaults(defineProps<DescriptionDetailsProps>(), {
|
|
5412
|
+
as: "dl",
|
|
5413
|
+
});
|
|
5414
|
+
</script>
|
|
5415
|
+
`},{fileName:"DescriptionList/Details.vue",dirPath:"app/components/Ui",fileContent:`<template>
|
|
5416
|
+
<Primitive
|
|
5417
|
+
v-bind="reactiveOmit(props, 'class', 'text')"
|
|
5418
|
+
:class="descriptionListDetailsStyles({ class: props.class })"
|
|
5419
|
+
>
|
|
5420
|
+
<slot>{{ text }}</slot>
|
|
5421
|
+
</Primitive>
|
|
5422
|
+
</template>
|
|
5423
|
+
<script lang="ts">
|
|
5424
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
5425
|
+
import { Primitive } from "radix-vue";
|
|
5426
|
+
import type { PrimitiveProps } from "radix-vue";
|
|
5427
|
+
|
|
5428
|
+
export type DescriptionDetailsProps = PrimitiveProps & {
|
|
5429
|
+
text?: string;
|
|
5430
|
+
class?: any;
|
|
5431
|
+
};
|
|
5432
|
+
|
|
5433
|
+
export const descriptionListDetailsStyles = tv({
|
|
5434
|
+
base: "pb-3 pt-1 text-foreground sm:border-t sm:py-3 sm:[&:nth-child(2)]:border-none",
|
|
5435
|
+
});
|
|
5436
|
+
</script>
|
|
5437
|
+
|
|
5438
|
+
<script lang="ts" setup>
|
|
5439
|
+
const props = withDefaults(defineProps<DescriptionDetailsProps>(), {
|
|
5440
|
+
as: "dd",
|
|
5441
|
+
});
|
|
5442
|
+
</script>
|
|
5443
|
+
`},{fileName:"DescriptionList/Term.vue",dirPath:"app/components/Ui",fileContent:`<template>
|
|
5444
|
+
<Primitive
|
|
5445
|
+
v-bind="reactiveOmit(props, 'class', 'text')"
|
|
5446
|
+
:class="descriptionListDetailsStyles({ class: props.class })"
|
|
5447
|
+
>
|
|
5448
|
+
<slot>{{ text }}</slot>
|
|
5449
|
+
</Primitive>
|
|
5450
|
+
</template>
|
|
5451
|
+
<script lang="ts">
|
|
5452
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
5453
|
+
import { Primitive } from "radix-vue";
|
|
5454
|
+
import type { PrimitiveProps } from "radix-vue";
|
|
5455
|
+
|
|
5456
|
+
export type DescriptionDetailsProps = PrimitiveProps & {
|
|
5457
|
+
text?: string;
|
|
5458
|
+
class?: any;
|
|
5459
|
+
};
|
|
5460
|
+
|
|
5461
|
+
export const descriptionListDetailsStyles = tv({
|
|
5462
|
+
base: "border-t pt-3 text-muted-foreground first:border-none sm:py-3",
|
|
5463
|
+
});
|
|
5464
|
+
</script>
|
|
5465
|
+
|
|
5466
|
+
<script lang="ts" setup>
|
|
5467
|
+
const props = withDefaults(defineProps<DescriptionDetailsProps>(), {
|
|
5468
|
+
as: "dt",
|
|
5469
|
+
});
|
|
5470
|
+
</script>
|
|
5388
5471
|
`}],utils:[],composables:[],plugins:[]},{name:"Dialog",value:"dialog",files:[{fileName:"Dialog/Close.vue",dirPath:"app/components/Ui",fileContent:`<template>
|
|
5389
5472
|
<DialogClose v-bind="props">
|
|
5390
5473
|
<slot />
|
|
@@ -7535,7 +7618,7 @@ export function useFormField() {
|
|
|
7535
7618
|
}
|
|
7536
7619
|
});
|
|
7537
7620
|
</script>
|
|
7538
|
-
`}],utils:[],composables:[],plugins:[]},{name:"Menubar",value:"menubar",files:[{fileName:"Menubar/Arrow.vue",dirPath:"app/components/Ui",fileContent:`<template>
|
|
7621
|
+
`}],deps:["@morev/vue-transitions"],nuxtModules:["@morev/vue-transitions/nuxt"],devDeps:["@iconify-json/svg-spinners"],utils:[],composables:[],plugins:[]},{name:"Menubar",value:"menubar",files:[{fileName:"Menubar/Arrow.vue",dirPath:"app/components/Ui",fileContent:`<template>
|
|
7539
7622
|
<MenubarArrow v-bind="props" />
|
|
7540
7623
|
</template>
|
|
7541
7624
|
|
|
@@ -8891,9 +8974,11 @@ export function useFormField() {
|
|
|
8891
8974
|
});
|
|
8892
8975
|
</script>
|
|
8893
8976
|
`},{fileName:"Progress/Progress.vue",dirPath:"app/components/Ui",fileContent:`<template>
|
|
8894
|
-
<ProgressRoot v-bind="forwarded" :class="styles({ class: props.class })">
|
|
8977
|
+
<ProgressRoot v-bind="{ ...forwarded, ...$attrs }" :class="styles({ class: props.class })">
|
|
8895
8978
|
<slot>
|
|
8896
|
-
<UiProgressIndicator
|
|
8979
|
+
<UiProgressIndicator
|
|
8980
|
+
:style="{ transform: \`translateX(-\${100 - ((modelValue || 0) / max) * 100}%)\` }"
|
|
8981
|
+
/>
|
|
8897
8982
|
</slot>
|
|
8898
8983
|
</ProgressRoot>
|
|
8899
8984
|
</template>
|
|
@@ -8902,12 +8987,19 @@ export function useFormField() {
|
|
|
8902
8987
|
import { ProgressRoot, useForwardPropsEmits } from "radix-vue";
|
|
8903
8988
|
import type { ProgressRootEmits, ProgressRootProps } from "radix-vue";
|
|
8904
8989
|
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
|
|
8908
|
-
|
|
8990
|
+
defineOptions({ inheritAttrs: false });
|
|
8991
|
+
const props = withDefaults(
|
|
8992
|
+
defineProps<
|
|
8993
|
+
ProgressRootProps & {
|
|
8994
|
+
/** Custom class(es) to add to the parent */
|
|
8995
|
+
class?: any;
|
|
8996
|
+
}
|
|
8997
|
+
>(),
|
|
8998
|
+
{
|
|
8999
|
+
max: 100,
|
|
9000
|
+
modelValue: 0,
|
|
8909
9001
|
}
|
|
8910
|
-
|
|
9002
|
+
);
|
|
8911
9003
|
|
|
8912
9004
|
const emits = defineEmits<ProgressRootEmits>();
|
|
8913
9005
|
const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);
|
|
@@ -12935,7 +13027,7 @@ export { toast, useToast };
|
|
|
12935
13027
|
validateOnMount: props.validateOnMount,
|
|
12936
13028
|
});
|
|
12937
13029
|
</script>
|
|
12938
|
-
`}],utils:[],composables:[],plugins:[]},{name:"Form Builder",value:"vee-form-builder",deps:["@vee-validate/nuxt","@morev/vue-transitions"],askValidator:!0,nuxtModules:["@vee-validate/nuxt","@morev/vue-transitions/nuxt"],components:["label","vee-checkbox","Vee-input","divider","vee-currency-input","vee-date-field","vee-textarea","vee-file-input","vee-multi-select","vee-select","vee-pin-input","vee-tags-input","vee-radio-group","vee-vue-form-slider"],files:[{fileName:"FormBuilder/FormBuilder.vue",dirPath:"app/components/Ui",fileContent:`<template>
|
|
13030
|
+
`}],utils:[],composables:[],plugins:[]},{name:"Vee Form Builder",value:"vee-form-builder",deps:["@vee-validate/nuxt","@morev/vue-transitions"],askValidator:!0,nuxtModules:["@vee-validate/nuxt","@morev/vue-transitions/nuxt"],components:["label","vee-checkbox","Vee-input","divider","vee-currency-input","vee-date-field","vee-textarea","vee-file-input","vee-multi-select","vee-select","vee-pin-input","vee-tags-input","vee-radio-group","vee-vue-form-slider","vee-native-checkbox"],files:[{fileName:"FormBuilder/FormBuilder.vue",dirPath:"app/components/Ui",fileContent:`<template>
|
|
12939
13031
|
<div>
|
|
12940
13032
|
<template v-for="(field, index) in fields" :key="index">
|
|
12941
13033
|
<template v-if="field.variant === 'Checkbox'">
|
|
@@ -13092,6 +13184,17 @@ export { toast, useToast };
|
|
|
13092
13184
|
</div>
|
|
13093
13185
|
</slot>
|
|
13094
13186
|
</template>
|
|
13187
|
+
<template v-if="field.variant === 'NativeCheckbox'">
|
|
13188
|
+
<slot
|
|
13189
|
+
v-if="field.renderIf ? field.renderIf() : true"
|
|
13190
|
+
:name="field.slot ? field.slot : field.name"
|
|
13191
|
+
v-bind="field"
|
|
13192
|
+
>
|
|
13193
|
+
<div :class="field.wrapperClass">
|
|
13194
|
+
<UiVeeNativeCheckbox v-bind="removeFields(field)" />
|
|
13195
|
+
</div>
|
|
13196
|
+
</slot>
|
|
13197
|
+
</template>
|
|
13095
13198
|
</template>
|
|
13096
13199
|
</div>
|
|
13097
13200
|
</template>
|
|
@@ -13115,6 +13218,7 @@ export { toast, useToast };
|
|
|
13115
13218
|
options?: any[];
|
|
13116
13219
|
variant:
|
|
13117
13220
|
| "Checkbox"
|
|
13221
|
+
| "NativeCheckbox"
|
|
13118
13222
|
| "Input"
|
|
13119
13223
|
| "Divider"
|
|
13120
13224
|
| "CurrencyInput"
|
|
@@ -13397,6 +13501,204 @@ export { toast, useToast };
|
|
|
13397
13501
|
--ms-empty-color: theme("colors.muted.foreground");
|
|
13398
13502
|
}
|
|
13399
13503
|
</style>
|
|
13504
|
+
`}],utils:[],composables:[],plugins:[]},{name:"Vee Checkbox - Native",value:"vee-native-checkbox",deps:["@vee-validate/nuxt","@morev/vue-transitions"],askValidator:!0,nuxtModules:["@vee-validate/nuxt","@morev/vue-transitions/nuxt"],components:["label"],files:[{fileName:"Vee/NativeCheckbox.vue",dirPath:"app/components/Ui",fileContent:`<template>
|
|
13505
|
+
<div>
|
|
13506
|
+
<div :class="nativeCheckboxStyles().wrapper({ class: props.wrapperClass })">
|
|
13507
|
+
<!-- eslint-disable-next-line vue/html-self-closing -->
|
|
13508
|
+
<input
|
|
13509
|
+
:id="inputId"
|
|
13510
|
+
:checked="checked"
|
|
13511
|
+
type="checkbox"
|
|
13512
|
+
:data-indeterminate="indeterminate"
|
|
13513
|
+
:data-checked="checked"
|
|
13514
|
+
:data-disabled="disabled"
|
|
13515
|
+
:data-required="required"
|
|
13516
|
+
:class="
|
|
13517
|
+
nativeCheckboxStyles().checkbox({
|
|
13518
|
+
error: !!errorMessage,
|
|
13519
|
+
disabled,
|
|
13520
|
+
size,
|
|
13521
|
+
color,
|
|
13522
|
+
class: props.class,
|
|
13523
|
+
})
|
|
13524
|
+
"
|
|
13525
|
+
v-bind="{ ...forwarded, ...$attrs }"
|
|
13526
|
+
@change="handleChange"
|
|
13527
|
+
@input="handleChange"
|
|
13528
|
+
/>
|
|
13529
|
+
<label
|
|
13530
|
+
v-if="hasLabel || hasDescription || errorMessage"
|
|
13531
|
+
:for="inputId"
|
|
13532
|
+
class="flex flex-col gap-1 text-sm leading-none"
|
|
13533
|
+
>
|
|
13534
|
+
<slot name="label">
|
|
13535
|
+
<span
|
|
13536
|
+
v-if="label"
|
|
13537
|
+
:class="nativeCheckboxStyles().label({ disabled, class: props.labelClass })"
|
|
13538
|
+
>{{ label }}</span
|
|
13539
|
+
>
|
|
13540
|
+
</slot>
|
|
13541
|
+
<slot name="description">
|
|
13542
|
+
<span
|
|
13543
|
+
v-if="description"
|
|
13544
|
+
:class="nativeCheckboxStyles().description({ disabled, class: props.descriptionClass })"
|
|
13545
|
+
>{{ description }}</span
|
|
13546
|
+
>
|
|
13547
|
+
</slot>
|
|
13548
|
+
<TransitionSlide tag="template">
|
|
13549
|
+
<p v-if="errorMessage" :class="nativeCheckboxStyles().error({ disabled })">
|
|
13550
|
+
{{ errorMessage }}
|
|
13551
|
+
</p>
|
|
13552
|
+
</TransitionSlide>
|
|
13553
|
+
</label>
|
|
13554
|
+
</div>
|
|
13555
|
+
</div>
|
|
13556
|
+
</template>
|
|
13557
|
+
|
|
13558
|
+
<script lang="ts">
|
|
13559
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
13560
|
+
import type { VariantProps } from "tailwind-variants";
|
|
13561
|
+
|
|
13562
|
+
export const nativeCheckboxStyles = tv({
|
|
13563
|
+
slots: {
|
|
13564
|
+
checkbox:
|
|
13565
|
+
"peer form-checkbox shrink-0 cursor-pointer rounded-sm border border-primary bg-background outline-none ring-offset-background transition duration-200 focus:ring-offset-background",
|
|
13566
|
+
label: "cursor-pointer font-medium",
|
|
13567
|
+
description: "text-pretty text-muted-foreground",
|
|
13568
|
+
wrapper: "flex items-start gap-3",
|
|
13569
|
+
error: "text-destructive",
|
|
13570
|
+
},
|
|
13571
|
+
variants: {
|
|
13572
|
+
size: { sm: { checkbox: "size-4" }, md: { checkbox: "size-[18px]" } },
|
|
13573
|
+
color: {
|
|
13574
|
+
red: { checkbox: "border-red-500 text-red-500 focus:ring-red-500" },
|
|
13575
|
+
orange: { checkbox: "border-orange-500 text-orange-500 focus:ring-orange-500" },
|
|
13576
|
+
amber: { checkbox: "border-amber-500 text-amber-500 focus:ring-amber-500" },
|
|
13577
|
+
yellow: { checkbox: "border-yellow-500 text-yellow-500 focus:ring-yellow-500" },
|
|
13578
|
+
lime: { checkbox: "border-lime-500 text-lime-500 focus:ring-lime-500" },
|
|
13579
|
+
green: { checkbox: "border-green-500 text-green-500 focus:ring-green-500" },
|
|
13580
|
+
emerald: { checkbox: "border-emerald-500 text-emerald-500 focus:ring-emerald-500" },
|
|
13581
|
+
teal: { checkbox: "border-teal-500 text-teal-500 focus:ring-teal-500" },
|
|
13582
|
+
cyan: { checkbox: "border-cyan-500 text-cyan-500 focus:ring-cyan-500" },
|
|
13583
|
+
sky: { checkbox: "border-sky-500 text-sky-500 focus:ring-sky-500" },
|
|
13584
|
+
blue: { checkbox: "border-blue-500 text-blue-500 focus:ring-blue-500" },
|
|
13585
|
+
indigo: { checkbox: "border-indigo-500 text-indigo-500 focus:ring-indigo-500" },
|
|
13586
|
+
violet: { checkbox: "border-violet-500 text-violet-500 focus:ring-violet-500" },
|
|
13587
|
+
purple: { checkbox: "border-purple-500 text-purple-500 focus:ring-purple-500" },
|
|
13588
|
+
fuchsia: { checkbox: "border-fuchsia-500 text-fuchsia-500 focus:ring-fuchsia-500" },
|
|
13589
|
+
pink: { checkbox: "border-pink-500 text-pink-500 focus:ring-pink-500" },
|
|
13590
|
+
rose: { checkbox: "border-rose-500 text-rose-500 focus:ring-rose-500" },
|
|
13591
|
+
slate: { checkbox: "border-slate-600 text-slate-600 focus:ring-slate-600" },
|
|
13592
|
+
gray: { checkbox: "border-gray-600 text-gray-600 focus:ring-gray-600" },
|
|
13593
|
+
zinc: { checkbox: "border-zinc-600 text-zinc-600 focus:ring-zinc-600" },
|
|
13594
|
+
neutral: { checkbox: "border-neutral-600 text-neutral-600 focus:ring-neutral-600" },
|
|
13595
|
+
stone: { checkbox: "border-stone-600 text-stone-600 focus:ring-stone-600" },
|
|
13596
|
+
},
|
|
13597
|
+
error: {
|
|
13598
|
+
true: { checkbox: "border-destructive text-destructive focus:ring-destructive" },
|
|
13599
|
+
},
|
|
13600
|
+
disabled: {
|
|
13601
|
+
true: {
|
|
13602
|
+
checkbox: "pointer-events-none opacity-50",
|
|
13603
|
+
label: "cursor-not-allowed opacity-50",
|
|
13604
|
+
description: "cursor-not-allowed opacity-50",
|
|
13605
|
+
error: "cursor-not-allowed opacity-70",
|
|
13606
|
+
},
|
|
13607
|
+
},
|
|
13608
|
+
},
|
|
13609
|
+
defaultVariants: {
|
|
13610
|
+
color: "blue",
|
|
13611
|
+
size: "md",
|
|
13612
|
+
},
|
|
13613
|
+
});
|
|
13614
|
+
|
|
13615
|
+
export type NativeCheckboxProps = {
|
|
13616
|
+
/** Custom class(es) to add to the element */
|
|
13617
|
+
class?: any;
|
|
13618
|
+
/** Custom class(es) to add to the label element */
|
|
13619
|
+
labelClass?: any;
|
|
13620
|
+
/** Custom class(es) to add to the description element */
|
|
13621
|
+
descriptionClass?: any;
|
|
13622
|
+
/** Custom class(es) to add to the wrapper element */
|
|
13623
|
+
wrapperClass?: any;
|
|
13624
|
+
/** The id of the checkbox input element */
|
|
13625
|
+
id?: string;
|
|
13626
|
+
/** The v-model binding for the checkbox */
|
|
13627
|
+
modelValue?: any;
|
|
13628
|
+
/** The name of the checkbox input element */
|
|
13629
|
+
name?: string;
|
|
13630
|
+
/** The value of the checkbox input element */
|
|
13631
|
+
value?: any;
|
|
13632
|
+
/** Whether the checkbox is disabled */
|
|
13633
|
+
disabled?: boolean;
|
|
13634
|
+
/** Whether the checkbox is required */
|
|
13635
|
+
required?: boolean;
|
|
13636
|
+
/** Whether the checkbox is indeterminate */
|
|
13637
|
+
indeterminate?: boolean;
|
|
13638
|
+
/**
|
|
13639
|
+
* The color variant of the checkbox
|
|
13640
|
+
*
|
|
13641
|
+
* @default blue
|
|
13642
|
+
*/
|
|
13643
|
+
color?: VariantProps<typeof nativeCheckboxStyles>["color"];
|
|
13644
|
+
/**
|
|
13645
|
+
* The size variant of the checkbox
|
|
13646
|
+
*
|
|
13647
|
+
* @default md
|
|
13648
|
+
*/
|
|
13649
|
+
size?: VariantProps<typeof nativeCheckboxStyles>["size"];
|
|
13650
|
+
/** The label for the checkbox */
|
|
13651
|
+
label?: string;
|
|
13652
|
+
/** The description for the checkbox */
|
|
13653
|
+
description?: string;
|
|
13654
|
+
/** The validation rules for the checkbox */
|
|
13655
|
+
rules?: any;
|
|
13656
|
+
/** Whether to validate the checkbox on mount */
|
|
13657
|
+
validateOnMount?: boolean;
|
|
13658
|
+
/** The value to use when the checkbox is unchecked */
|
|
13659
|
+
unCheckedValue?: any;
|
|
13660
|
+
};
|
|
13661
|
+
</script>
|
|
13662
|
+
|
|
13663
|
+
<script lang="ts" setup>
|
|
13664
|
+
defineOptions({ inheritAttrs: false });
|
|
13665
|
+
const props = withDefaults(defineProps<NativeCheckboxProps>(), {});
|
|
13666
|
+
const inputId = props.id || \`checkbox-\${useId()}\`;
|
|
13667
|
+
|
|
13668
|
+
const forwarded = reactiveOmit(
|
|
13669
|
+
props,
|
|
13670
|
+
"class",
|
|
13671
|
+
"id",
|
|
13672
|
+
"modelValue",
|
|
13673
|
+
"label",
|
|
13674
|
+
"description",
|
|
13675
|
+
"color",
|
|
13676
|
+
"size",
|
|
13677
|
+
"labelClass",
|
|
13678
|
+
"descriptionClass",
|
|
13679
|
+
"wrapperClass",
|
|
13680
|
+
"rules",
|
|
13681
|
+
"validateOnMount",
|
|
13682
|
+
"unCheckedValue"
|
|
13683
|
+
);
|
|
13684
|
+
const slots = useSlots();
|
|
13685
|
+
const hasLabel = computed(() => !!slots.label || !!props.label);
|
|
13686
|
+
const hasDescription = computed(() => !!slots.description || !!props.description);
|
|
13687
|
+
|
|
13688
|
+
const { errorMessage, checked, handleChange } = useField(
|
|
13689
|
+
() => props.name || inputId,
|
|
13690
|
+
props.rules,
|
|
13691
|
+
{
|
|
13692
|
+
initialValue: props.modelValue,
|
|
13693
|
+
syncVModel: true,
|
|
13694
|
+
label: props.label,
|
|
13695
|
+
validateOnMount: props.validateOnMount,
|
|
13696
|
+
type: "checkbox",
|
|
13697
|
+
checkedValue: props.value || true,
|
|
13698
|
+
uncheckedValue: props.unCheckedValue || false,
|
|
13699
|
+
}
|
|
13700
|
+
);
|
|
13701
|
+
</script>
|
|
13400
13702
|
`}],utils:[],composables:[],plugins:[]},{name:"Vee NumberField",value:"vee-number-field",deps:["@vee-validate/nuxt","@morev/vue-transitions","@internationalized/number"],askValidator:!0,nuxtModules:["@vee-validate/nuxt","@morev/vue-transitions/nuxt"],components:["label","number-field"],files:[{fileName:"Vee/NumberField.vue",dirPath:"app/components/Ui",fileContent:`<template>
|
|
13401
13703
|
<div class="w-full">
|
|
13402
13704
|
<UiLabel
|
|
@@ -14115,18 +14417,18 @@ export { toast, useToast };
|
|
|
14115
14417
|
@apply bg-muted-foreground;
|
|
14116
14418
|
}
|
|
14117
14419
|
</style>
|
|
14118
|
-
`}],utils:[],composables:[],plugins:[]}];import{join as pd}from"path";import{loadConfig as ud}from"c12";import we from"fs-extra";import oo from"kleur";import dd from"lodash";import{promises as gr}from"node:fs";var Jn=bn(ks(),1),va=bn(fr(),1);function he(s){var n=s.use(X),e=n.Type,t=n.builtInTypes,r=t.number;function i(c){return e.from(p=>r.check(p)&&p>=c,r+" >= "+c)}let a={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){},"use strict":function(){return"use strict"}};var o=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")},o.toString());return{geq:i,defaults:a,isPrimitive:l}}function H(s){try{var n=s(),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 Fp=Object.defineProperty,kp=(s,n,e)=>n in s?Fp(s,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[n]=e,le=(s,n,e)=>(kp(s,typeof n!="symbol"?n+"":n,e),e),xa=Object.prototype,zn=xa.toString,Pe=xa.hasOwnProperty,ct=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 rn(n)}},rn=class extends ct{constructor(n){super(),this.elemType=n,le(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(n,e){return Array.isArray(n)&&n.every(t=>this.elemType.check(t,e))}},$n=class extends ct{constructor(n){super(),this.value=n,le(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}},Hn=class extends ct{constructor(n){super(),this.fields=n,le(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(n,e){return zn.call(n)===zn.call({})&&this.fields.every(t=>t.type.check(n[t.name],e))}},Gn=class extends ct{constructor(n){super(),this.types=n,le(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)}},lt=class extends ct{constructor(n,e){super(),this.name=n,this.predicate=e,le(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}},nn=class s{constructor(n,e){this.type=n,this.typeName=e,le(this,"baseNames",[]),le(this,"ownFields",Object.create(null)),le(this,"allSupertypes",Object.create(null)),le(this,"supertypeList",[]),le(this,"allFields",Object.create(null)),le(this,"fieldNames",[]),le(this,"finalized",!1),le(this,"buildable",!1),le(this,"buildParams",[])}isSupertypeOf(n){if(n instanceof s){if(this.finalized!==!0||n.finalized!==!0)throw new Error("");return Pe.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 r(i){var a=t[i],o=a.type,l=a.getValue(n);return o.check(l,e)}return n!==null&&typeof n=="object"&&Object.keys(t).every(r)}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(r=>{e.indexOf(r)<0&&e.push(r)}),this}},Wn=class{constructor(n,e,t,r){this.name=n,this.type=e,this.defaultFn=t,le(this,"hidden"),this.hidden=!!r}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(s){return Array.isArray(s)?"["+s.map(Sr).join(", ")+"]":s&&typeof s=="object"?"{ "+Object.keys(s).map(function(n){return n+": "+s[n]}).join(", ")+" }":JSON.stringify(s)}function X(s){let n={or(...D){return new Gn(D.map(E=>n.from(E)))},from(D,E){if(D instanceof rn||D instanceof $n||D instanceof Hn||D instanceof Gn||D instanceof lt)return D;if(D instanceof nn)return D.type;if(o.check(D)){if(D.length!==1)throw new Error("only one element type is permitted for typed arrays");return new rn(n.from(D[0]))}if(l.check(D))return new Hn(Object.keys(D).map(O=>new Wn(O,n.from(D[O],O))));if(typeof D=="function"){var L=e.indexOf(D);if(L>=0)return t[L];if(typeof E!="string")throw new Error("missing name");return new lt(E,D)}return new $n(D)},def(D){return Pe.call(y,D)?y[D]:y[D]=new k(D)},hasDef(D){return Pe.call(y,D)}};var e=[],t=[];function r(D,E){let L=zn.call(E),O=new lt(D,G=>zn.call(G)===L);return E&&typeof E.constructor=="function"&&(e.push(E.constructor),t.push(O)),O}let i=r("string","truthy"),a=r("function",function(){}),o=r("array",[]),l=r("object",{}),c=r("RegExp",/./),p=r("Date",new Date),u=r("number",3),d=r("boolean",!0),m=r("null",null),f=r("undefined",void 0),b=typeof BigInt=="function"?r("BigInt",BigInt(1234)):new lt("BigInt",()=>!1),h={string:i,function:a,array:o,object:l,RegExp:c,Date:p,number:u,boolean:d,null:m,undefined:f,BigInt:b};var y=Object.create(null);function T(D){if(D&&typeof D=="object"){var E=D.type;if(typeof E=="string"&&Pe.call(y,E)){var L=y[E];if(L.finalized)return L}}return null}class k extends nn{constructor(E){super(new lt(E,(L,O)=>this.check(L,O)),E)}check(E,L){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(E===null||typeof E!="object")return!1;var O=T(E);return O?L&&O===this?this.checkAllFields(E,L):this.isSupertypeOf(O)?L?O.checkAllFields(E,L)&&this.checkAllFields(E,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields(E,L):!1}build(...E){if(this.buildParams=E,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let L=(G,W,J,ye)=>{if(!Pe.call(G,W)){var Ue=this.allFields;if(!Pe.call(Ue,W))throw new Error(""+W);var hn=Ue[W],Lo=hn.type,Lt;if(ye)Lt=J;else if(hn.defaultFn)Lt=hn.defaultFn.call(G);else{var Oo="no value or default function given for field "+JSON.stringify(W)+" of "+this.typeName+"("+this.buildParams.map(function(Bo){return Ue[Bo]}).join(", ")+")";throw new Error(Oo)}if(!Lo.check(Lt))throw new Error(Sr(Lt)+" does not match field "+hn+" of type "+this.typeName);G[W]=Lt}},O=(...G)=>{var W=G.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var J=Object.create(I);if(this.buildParams.forEach(function(ye,Ue){Ue<W?L(J,ye,G[Ue],!0):L(J,ye,null,!1)}),Object.keys(this.allFields).forEach(function(ye){L(J,ye,null,!1)}),J.type!==this.typeName)throw new Error("");return J};return O.from=G=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var W=Object.create(I);if(Object.keys(this.allFields).forEach(function(J){Pe.call(G,J)?L(W,J,G[J],!0):L(W,J,null,!1)}),W.type!==this.typeName)throw new Error("");return W},Object.defineProperty(w,de(this.typeName),{enumerable:!0,value:O}),this}field(E,L,O,G){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(E)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[E]=new Wn(E,n.from(L),O,G),this)}finalize(){if(!this.finalized){var E=this.allFields,L=this.allSupertypes;this.baseNames.forEach(G=>{var W=y[G];if(W instanceof nn)W.finalize(),ls(E,W.allFields),ls(L,W.allSupertypes);else{var J="unknown supertype name "+JSON.stringify(G)+" for subtype "+JSON.stringify(this.typeName);throw new Error(J)}}),ls(E,this.ownFields),L[this.typeName]=this,this.fieldNames.length=0;for(var O in E)Pe.call(E,O)&&!E[O].hidden&&this.fieldNames.push(O);Object.defineProperty(Vr,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,No(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&ko(this.typeName)}}}function x(D){if(!Pe.call(y,D))throw new Error("");var E=y[D];if(E.finalized!==!0)throw new Error("");return E.supertypeList.slice(1)}function P(D){for(var E={},L=Object.keys(y),O=L.length,G=0;G<O;++G){var W=L[G],J=y[W];if(J.finalized!==!0)throw new Error(""+W);for(var ye=0;ye<J.supertypeList.length;++ye){var Ue=J.supertypeList[ye];if(Pe.call(D,Ue)){E[W]=Ue;break}}}return E}var w=Object.create(null),I={};function $(D,E){var L=I[D];return f.check(E)?delete I[D]:(a.assert(E),Object.defineProperty(I,D,{enumerable:!0,configurable:!0,value:E})),L}function de(D){return D.replace(/^[A-Z]+/,function(E){var L=E.length;switch(L){case 0:return"";case 1:return E.toLowerCase();default:return E.slice(0,L-1).toLowerCase()+E.charAt(L-1)}})}function ke(D){return D=de(D),D.replace(/(Expression)?$/,"Statement")}var Vr={};function as(D){var E=T(D);if(E)return E.fieldNames.slice(0);if("type"in D)throw new Error("did not recognize object of type "+JSON.stringify(D.type));return Object.keys(D)}function os(D,E){var L=T(D);if(L){var O=L.allFields[E];if(O)return O.getValue(D)}return D&&D[E]}function Io(D,E,L){as(D).forEach(function(O){E.call(this,O,os(D,O))},L)}function Fo(D,E,L){return as(D).some(function(O){return E.call(this,O,os(D,O))},L)}function ko(D){var E=ke(D);if(w[E])return;var L=w[de(D)];if(!L)return;let O=function(...G){return w.expressionStatement(L.apply(w,G))};O.from=function(...G){return w.expressionStatement(L.from.apply(w,G))},w[E]=O}function No(D,E){E.length=0,E.push(D);for(var L=Object.create(null),O=0;O<E.length;++O){D=E[O];var G=y[D];if(G.finalized!==!0)throw new Error("");Pe.call(L,D)&&delete E[L[D]],L[D]=O,E.push.apply(E,G.baseNames)}for(var W=0,J=W,ye=E.length;J<ye;++J)Pe.call(E,J)&&(E[W++]=E[J]);E.length=W}function ls(D,E){return Object.keys(E).forEach(function(L){D[L]=E[L]}),D}function Mo(){Object.keys(y).forEach(function(D){y[D].finalize()})}return{Type:n,builtInTypes:h,getSupertypeNames:x,computeSupertypeLookupTable:P,builders:w,defineMethod:$,getBuilderName:de,getStatementBuilderName:ke,namedTypes:Vr,getFieldNames:as,getFieldValue:os,eachField:Io,someField:Fo,finalize:Mo}}H(()=>module);var Np=Object.prototype,Ln=Np.hasOwnProperty;function Pa(s){var n=s.use(X),e=n.builtInTypes.array,t=n.builtInTypes.number;let r=function u(d,m,f){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,f=null;this.value=d,this.parentPath=m,this.name=f,this.__childCache=null};var i=r.prototype;function a(u){return u.__childCache||(u.__childCache=Object.create(null))}function o(u,d){var m=a(u),f=u.getValueProperty(d),b=m[d];return(!Ln.call(m,d)||b.value!==f)&&(b=m[d]=new u.constructor(f,u,d)),b}i.getValueProperty=function(d){return this.value[d]},i.get=function(...d){for(var m=this,f=d.length,b=0;b<f;++b)m=o(m,d[b]);return m},i.each=function(d,m){for(var f=[],b=this.value.length,h=0,h=0;h<b;++h)Ln.call(this.value,h)&&(f[h]=this.get(h));for(m=m||this,h=0;h<b;++h)Ln.call(f,h)&&d.call(m,f[h])},i.map=function(d,m){var f=[];return this.each(function(b){f.push(d.call(this,b))},m),f},i.filter=function(d,m){var f=[];return this.each(function(b){d.call(this,b)&&f.push(b)},m),f};function l(){}function c(u,d,m,f){if(e.assert(u.value),d===0)return l;var b=u.value.length;if(b<1)return l;var h=arguments.length;h===2?(m=0,f=b):h===3?(m=Math.max(m,0),f=b):(m=Math.max(m,0),f=Math.min(f,b)),t.assert(m),t.assert(f);for(var y=Object.create(null),T=a(u),k=m;k<f;++k)if(Ln.call(u.value,k)){var x=u.get(k);if(x.name!==k)throw new Error("");var P=k+d;x.name=P,y[P]=x,delete T[k]}return delete T.length,function(){for(var w in y){var I=y[w];if(I.name!==+w)throw new Error("");T[w]=I,u.value[w]=I.value}}}i.shift=function(){var d=c(this,-1),m=this.value.shift();return d(),m},i.unshift=function(...d){var m=c(this,d.length),f=this.value.unshift.apply(this.value,d);return m(),f},i.push=function(...d){return e.assert(this.value),delete a(this).length,this.value.push.apply(this.value,d)},i.pop=function(){e.assert(this.value);var d=a(this);return delete d[this.value.length-1],delete d.length,this.value.pop()},i.insertAt=function(d){var m=arguments.length,f=c(this,m-1,d);if(f===l&&m<=1)return this;d=Math.max(d,0);for(var b=1;b<m;++b)this.value[d+b-1]=arguments[b];return f(),this},i.insertBefore=function(...d){for(var m=this.parentPath,f=d.length,b=[this.name],h=0;h<f;++h)b.push(d[h]);return m.insertAt.apply(m,b)},i.insertAfter=function(...d){for(var m=this.parentPath,f=d.length,b=[this.name+1],h=0;h<f;++h)b.push(d[h]);return m.insertAt.apply(m,b)};function p(u){if(!(u instanceof r))throw new Error("");var d=u.parentPath;if(!d)return u;var m=d.value,f=a(d);if(m[u.name]===u.value)f[u.name]=u;else if(e.check(m)){var b=m.indexOf(u.value);b>=0&&(f[u.name=b]=u)}else m[u.name]=u.value,f[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(d){var m=[],f=this.parentPath.value,b=a(this.parentPath),h=arguments.length;if(p(this),e.check(f)){for(var y=f.length,T=c(this.parentPath,h-1,this.name+1),k=[this.name,1],x=0;x<h;++x)k.push(arguments[x]);var P=f.splice.apply(f,k);if(P[0]!==this.value)throw new Error("");if(f.length!==y-1+h)throw new Error("");if(T(),h===0)delete this.value,delete b[this.name],this.__childCache=null;else{if(f[this.name]!==d)throw new Error("");for(this.value!==d&&(this.value=d,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!==d&&(this.__childCache=null),this.value=f[this.name]=d,m.push(this);else if(h===0)delete f[this.name],delete this.value,this.__childCache=null;else throw new Error("Could not replace path");return m},r}H(()=>module);var Tt=Object.prototype.hasOwnProperty;function Mp(s){var n=s.use(X),e=n.Type,t=n.namedTypes,r=t.Node,i=t.Expression,a=n.builtInTypes.array,o=n.builders;let l=function x(P,w){if(!(this instanceof x))throw new Error("Scope constructor cannot be invoked without 'new'");p.check(P.value)||c.assert(P.value);var I;if(w){if(!(w instanceof x))throw new Error("");I=w.depth+1}else w=null,I=0;Object.defineProperties(this,{path:{value:P},node:{value:P.value},isGlobal:{value:!w,enumerable:!0},depth:{value:I},parent:{value:w},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 d=l.prototype;d.didScan=!1,d.declares=function(x){return this.scan(),Tt.call(this.bindings,x)},d.declaresType=function(x){return this.scan(),Tt.call(this.types,x)},d.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 P=0;this.declares(x+P);)++P;var w=x+P;return this.bindings[w]=n.builders.identifier(w)},d.injectTemporary=function(x,P){x||(x=this.declareTemporary());var w=this.path.get("body");return t.BlockStatement.check(w.value)&&(w=w.get("body")),w.unshift(o.variableDeclaration("var",[o.variableDeclarator(x,P||null)])),x},d.scan=function(x){if(x||!this.didScan){for(var P in this.bindings)delete this.bindings[P];for(var P in this.types)delete this.types[P];m(this.path,this.bindings,this.types),this.didScan=!0}},d.getBindings=function(){return this.scan(),this.bindings},d.getTypes=function(){return this.scan(),this.types};function m(x,P,w){var I=x.value;if(p.check(I)){let $=x.get("typeParameters","params");a.check($.value)&&$.each(de=>{k(de,w)})}c.check(I)&&(t.CatchClause.check(I)?y(x.get("param"),P):f(x,P,w))}function f(x,P,w){var I=x.value;x.parent&&t.FunctionExpression.check(x.parent.node)&&x.parent.node.id&&y(x.parent.get("id"),P),I&&(a.check(I)?x.each($=>{h($,P,w)}):t.Function.check(I)?(x.get("params").each($=>{y($,P)}),h(x.get("body"),P,w),f(x.get("typeParameters"),P,w)):t.TypeAlias&&t.TypeAlias.check(I)||t.InterfaceDeclaration&&t.InterfaceDeclaration.check(I)||t.TSTypeAliasDeclaration&&t.TSTypeAliasDeclaration.check(I)||t.TSInterfaceDeclaration&&t.TSInterfaceDeclaration.check(I)?T(x.get("id"),w):t.VariableDeclarator.check(I)?(y(x.get("id"),P),h(x.get("init"),P,w)):I.type==="ImportSpecifier"||I.type==="ImportNamespaceSpecifier"||I.type==="ImportDefaultSpecifier"?y(x.get(I.local?"local":I.name?"name":"id"),P):r.check(I)&&!i.check(I)&&n.eachField(I,function($,de){var ke=x.get($);if(!b(ke,de))throw new Error("");h(ke,P,w)}))}function b(x,P){return!!(x.value===P||Array.isArray(x.value)&&x.value.length===0&&Array.isArray(P)&&P.length===0)}function h(x,P,w){var I=x.value;if(!(!I||i.check(I)))if(t.FunctionDeclaration.check(I)&&I.id!==null)y(x.get("id"),P);else if(t.ClassDeclaration&&t.ClassDeclaration.check(I)&&I.id!==null)y(x.get("id"),P),f(x.get("typeParameters"),P,w);else if(t.InterfaceDeclaration&&t.InterfaceDeclaration.check(I)||t.TSInterfaceDeclaration&&t.TSInterfaceDeclaration.check(I))T(x.get("id"),w);else if(c.check(I)){if(t.CatchClause.check(I)&&t.Identifier.check(I.param)){var $=I.param.name,de=Tt.call(P,$);f(x.get("body"),P,w),de||delete P[$]}}else f(x,P,w)}function y(x,P){var w=x.value;t.Pattern.assert(w),t.Identifier.check(w)?Tt.call(P,w.name)?P[w.name].push(x):P[w.name]=[x]:t.AssignmentPattern&&t.AssignmentPattern.check(w)?y(x.get("left"),P):t.ObjectPattern&&t.ObjectPattern.check(w)?x.get("properties").each(function(I){var $=I.value;t.Pattern.check($)?y(I,P):t.Property.check($)||t.ObjectProperty&&t.ObjectProperty.check($)?y(I.get("value"),P):t.SpreadProperty&&t.SpreadProperty.check($)&&y(I.get("argument"),P)}):t.ArrayPattern&&t.ArrayPattern.check(w)?x.get("elements").each(function(I){var $=I.value;t.Pattern.check($)?y(I,P):t.SpreadElement&&t.SpreadElement.check($)&&y(I.get("argument"),P)}):t.PropertyPattern&&t.PropertyPattern.check(w)?y(x.get("pattern"),P):(t.SpreadElementPattern&&t.SpreadElementPattern.check(w)||t.RestElement&&t.RestElement.check(w)||t.SpreadPropertyPattern&&t.SpreadPropertyPattern.check(w))&&y(x.get("argument"),P)}function T(x,P){var w=x.value;t.Pattern.assert(w),t.Identifier.check(w)&&(Tt.call(P,w.name)?P[w.name].push(x):P[w.name]=[x])}function k(x,P){var w=x.value;u.assert(w),Tt.call(P,w.name)?P[w.name].push(x):P[w.name]=[x]}return d.lookup=function(x){for(var P=this;P&&!P.declares(x);P=P.parent);return P},d.lookupType=function(x){for(var P=this;P&&!P.declaresType(x);P=P.parent);return P},d.getGlobalScope=function(){for(var x=this;!x.isGlobal;)x=x.parent;return x},l}H(()=>module);function Ta(s){var n=s.use(X),e=n.namedTypes,t=n.builders,r=n.builtInTypes.number,i=n.builtInTypes.array,a=s.use(Pa),o=s.use(Mp);let l=function h(y,T,k){if(!(this instanceof h))throw new Error("NodePath constructor cannot be invoked without 'new'");a.call(this,y,T,k)};var c=l.prototype=Object.create(a.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,a.prototype.replace.apply(this,arguments)},c.prune=function(){var h=this.parent;return this.replace(),f(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,T=y&&y.scope;return e.Node.check(h)&&o.isEstablishedBy(h)&&(T=new o(this,T)),T||null},c.getValueProperty=function(h){return n.getFieldValue(this.value,h)},c.needsParens=function(h){var y=this.parentPath;if(!y)return!1;var T=this.value;if(!e.Expression.check(T)||T.type==="Identifier")return!1;for(;!e.Node.check(y.value);)if(y=y.parentPath,!y)return!1;var k=y.value;switch(T.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return k.type==="MemberExpression"&&this.name==="object"&&k.object===T;case"BinaryExpression":case"LogicalExpression":switch(k.type){case"CallExpression":return this.name==="callee"&&k.callee===T;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&k.object===T;case"BinaryExpression":case"LogicalExpression":{let x=T,P=k.operator,w=u[P],I=x.operator,$=u[I];if(w>$)return!0;if(w===$&&this.name==="right"){if(k.right!==x)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(k.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(k.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 k.type==="MemberExpression"&&r.check(T.value)&&this.name==="object"&&k.object===T;case"AssignmentExpression":case"ConditionalExpression":switch(k.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&k.callee===T;case"ConditionalExpression":return this.name==="test"&&k.test===T;case"MemberExpression":return this.name==="object"&&k.object===T;default:return!1}default:if(k.type==="NewExpression"&&this.name==="callee"&&k.callee===T)return d(T)}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(T){u[T]=y})});function d(h){return e.CallExpression.check(h)?!0:i.check(h)?h.some(d):e.Node.check(h)?n.someField(h,function(y,T){return d(T)}):!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,T;h.parent;h=h.parent){if(y=h.node,T=h.parent.node,e.BlockStatement.check(T)&&h.parent.name==="body"&&h.name===0){if(T.body[0]!==y)throw new Error("Nodes must be equal");return!0}if(e.ExpressionStatement.check(T)&&h.name==="expression"){if(T.expression!==y)throw new Error("Nodes must be equal");return!0}if(e.SequenceExpression.check(T)&&h.parent.name==="expressions"&&h.name===0){if(T.expressions[0]!==y)throw new Error("Nodes must be equal");continue}if(e.CallExpression.check(T)&&h.name==="callee"){if(T.callee!==y)throw new Error("Nodes must be equal");continue}if(e.MemberExpression.check(T)&&h.name==="object"){if(T.object!==y)throw new Error("Nodes must be equal");continue}if(e.ConditionalExpression.check(T)&&h.name==="test"){if(T.test!==y)throw new Error("Nodes must be equal");continue}if(p(T)&&h.name==="left"){if(T.left!==y)throw new Error("Nodes must be equal");continue}if(e.UnaryExpression.check(T)&&!T.prefix&&h.name==="argument"){if(T.argument!==y)throw new Error("Nodes must be equal");continue}return!1}return!0}function f(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)&&b(h);return h}function b(h){var y=h.get("test").value,T=h.get("alternate").value,k=h.get("consequent").value;if(!k&&!T){var x=t.expressionStatement(y);h.replace(x)}else if(!k&&T){var P=t.unaryExpression("!",y,!0);e.UnaryExpression.check(y)&&y.operator==="!"&&(P=y.argument),h.get("test").replace(P),h.get("consequent").replace(T),h.get("alternate").replace()}}return l}H(()=>module);var On=Object.prototype.hasOwnProperty;function Lp(s){var n=s.use(X),e=s.use(Ta),t=n.builtInTypes.array,r=n.builtInTypes.object,i=n.builtInTypes.function,a;let o=function f(){if(!(this instanceof f))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=l(this),this._shouldVisitComments=On.call(this._methodNameTable,"Block")||On.call(this._methodNameTable,"Line"),this.Context=d(this),this._visiting=!1,this._changeReported=!1};function l(f){var b=Object.create(null);for(var h in f)/^visit[A-Z]/.test(h)&&(b[h.slice(5)]=!0);for(var y=n.computeSupertypeLookupTable(b),T=Object.create(null),k=Object.keys(y),x=k.length,P=0;P<x;++P){var w=k[P];h="visit"+y[w],i.check(f[h])&&(T[w]=h)}return T}o.fromMethodsObject=function(b){if(b instanceof o)return b;if(!r.check(b))return new o;let h=function T(){if(!(this instanceof T))throw new Error("Visitor constructor cannot be invoked without 'new'");o.call(this)};var y=h.prototype=Object.create(p);return y.constructor=h,c(y,b),c(h,o),i.assert(h.fromMethodsObject),i.assert(h.visit),new h};function c(f,b){for(var h in b)On.call(b,h)&&(f[h]=b[h]);return f}o.visit=function(b,h){return o.fromMethodsObject(h).visit(b)};var p=o.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 f=arguments.length,b=new Array(f),h=0;h<f;++h)b[h]=arguments[h];b[0]instanceof e||(b[0]=new e({root:b[0]}).get("root")),this.reset.apply(this,b);var y;try{var T=this.visitWithoutReset(b[0]);y=!0}finally{if(this._visiting=!1,!y&&this._abortRequested)return b[0].value}return T},p.AbortRequest=function(){},p.abort=function(){var f=this;f._abortRequested=!0;var b=new f.AbortRequest;throw b.cancel=function(){f._abortRequested=!1},b},p.reset=function(f){},p.visitWithoutReset=function(f){if(this instanceof this.Context)return this.visitor.visitWithoutReset(f);if(!(f instanceof e))throw new Error("");var b=f.value,h=b&&typeof b=="object"&&typeof b.type=="string"&&this._methodNameTable[b.type];if(h){var y=this.acquireContext(f);try{return y.invokeVisitorMethod(h)}finally{this.releaseContext(y)}}else return u(f,this)};function u(f,b){if(!(f instanceof e))throw new Error("");if(!(b instanceof o))throw new Error("");var h=f.value;if(t.check(h))f.each(b.visitWithoutReset,b);else if(r.check(h)){var y=n.getFieldNames(h);b._shouldVisitComments&&h.comments&&y.indexOf("comments")<0&&y.push("comments");for(var T=y.length,k=[],x=0;x<T;++x){var P=y[x];On.call(h,P)||(h[P]=n.getFieldValue(h,P)),k.push(f.get(P))}for(var x=0;x<T;++x)b.visitWithoutReset(k[x])}return f.value}p.acquireContext=function(f){return this._reusableContextStack.length===0?new this.Context(f):this._reusableContextStack.pop().reset(f)},p.releaseContext=function(f){if(!(f instanceof this.Context))throw new Error("");this._reusableContextStack.push(f),f.currentPath=null},p.reportChanged=function(){this._changeReported=!0},p.wasChangeReported=function(){return this._changeReported};function d(f){function b(y){if(!(this instanceof b))throw new Error("");if(!(this instanceof o))throw new Error("");if(!(y instanceof e))throw new Error("");Object.defineProperty(this,"visitor",{value:f,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=y,this.needToCallTraverse=!0,Object.seal(this)}if(!(f instanceof o))throw new Error("");var h=b.prototype=Object.create(f);return h.constructor=b,c(h,m),b}var m=Object.create(null);return m.reset=function(b){if(!(this instanceof this.Context))throw new Error("");if(!(b instanceof e))throw new Error("");return this.currentPath=b,this.needToCallTraverse=!0,this},m.invokeVisitorMethod=function(b){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");var h=this.visitor[b].call(this,this.currentPath);if(h===!1?this.needToCallTraverse=!1:h!==a&&(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 "+b);var y=this.currentPath;return y&&y.value},m.traverse=function(b,h){if(!(this instanceof this.Context))throw new Error("");if(!(b instanceof e))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");return this.needToCallTraverse=!1,u(b,o.fromMethodsObject(h||this.visitor))},m.visit=function(b,h){if(!(this instanceof this.Context))throw new Error("");if(!(b instanceof e))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");return this.needToCallTraverse=!1,o.fromMethodsObject(h||this.visitor).visitWithoutReset(b)},m.reportChanged=function(){this.visitor.reportChanged()},m.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},o}H(()=>module);function Op(s){var n=s.use(X),e=n.getFieldNames,t=n.getFieldValue,r=n.builtInTypes.array,i=n.builtInTypes.object,a=n.builtInTypes.Date,o=n.builtInTypes.RegExp,l=Object.prototype.hasOwnProperty;function c(f,b,h){return r.check(h)?h.length=0:h=null,u(f,b,h)}c.assert=function(f,b){var h=[];if(!c(f,b,h))if(h.length===0){if(f!==b)throw new Error("Nodes must be equal")}else throw new Error("Nodes differ in the following path: "+h.map(p).join(""))};function p(f){return/[_$a-z][_$a-z0-9]*/i.test(f)?"."+f:"["+JSON.stringify(f)+"]"}function u(f,b,h){return f===b?!0:r.check(f)?d(f,b,h):i.check(f)?m(f,b,h):a.check(f)?a.check(b)&&+f==+b:o.check(f)?o.check(b)&&f.source===b.source&&f.global===b.global&&f.multiline===b.multiline&&f.ignoreCase===b.ignoreCase:f==b}function d(f,b,h){r.assert(f);var y=f.length;if(!r.check(b)||b.length!==y)return h&&h.push("length"),!1;for(var T=0;T<y;++T){if(h&&h.push(T),T in f!=T in b||!u(f[T],b[T],h))return!1;if(h){var k=h.pop();if(k!==T)throw new Error(""+k)}}return!0}function m(f,b,h){if(i.assert(f),!i.check(b))return!1;if(f.type!==b.type)return h&&h.push("type"),!1;var y=e(f),T=y.length,k=e(b),x=k.length;if(T===x){for(var P=0;P<T;++P){var w=y[P],I=t(f,w),$=t(b,w);if(h&&h.push(w),!u(I,$,h))return!1;if(h){var de=h.pop();if(de!==w)throw new Error(""+de)}}return!0}if(!h)return!1;var ke=Object.create(null);for(P=0;P<T;++P)ke[y[P]]=!0;for(P=0;P<x;++P){if(w=k[P],!l.call(ke,w))return h.push(w),!1;delete ke[w]}for(w in ke){h.push(w);break}return!1}return c}H(()=>module);function Bp(s){let n=Up(),e=n.use(X);s.forEach(n.use),e.finalize();let t=n.use(Lp);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(Op),finalize:e.finalize,Path:n.use(Pa),NodePath:n.use(Ta),PathVisitor:t,use:n.use,visit:t.visit}}function Up(){let s=[],n=[];function e(r){var i=s.indexOf(r);return i===-1&&(i=s.length,s.push(r),n[i]=r(t)),n[i]}var t={use:e};return t}H(()=>module);function Ca(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}H(()=>module);function wa(s){let n=s.use(Ca);return n.BinaryOperators.indexOf("**")<0&&n.BinaryOperators.push("**"),n.AssignmentOperators.indexOf("**=")<0&&n.AssignmentOperators.push("**="),n}H(()=>module);function Da(s){let n=s.use(wa);return n.LogicalOperators.indexOf("??")<0&&n.LogicalOperators.push("??"),n}H(()=>module);function _p(s){let n=s.use(Da);return n.LogicalOperators.forEach(e=>{let t=e+"=";n.AssignmentOperators.indexOf(t)<0&&n.AssignmentOperators.push(t)}),n}H(()=>module);function Rp(s){var n=s.use(X),e=n.Type,t=e.def,r=e.or,i=s.use(he),a=i.defaults,o=i.geq;let{BinaryOperators:l,AssignmentOperators:c,LogicalOperators:p}=s.use(Ca);t("Printable").field("loc",r(t("SourceLocation"),null),a.null,!0),t("Node").bases("Printable").field("type",String).field("comments",r([t("Comment")],null),a.null,!0),t("SourceLocation").field("start",t("Position")).field("end",t("Position")).field("source",r(String,null),a.null),t("Position").field("line",o(1)).field("column",o(0)),t("File").bases("Node").build("program","name").field("program",t("Program")).field("name",r(String,null),a.null),t("Program").bases("Node").build("body").field("body",[t("Statement")]),t("Function").bases("Node").field("id",r(t("Identifier"),null),a.null).field("params",[t("Pattern")]).field("body",t("BlockStatement")).field("generator",Boolean,a.false).field("async",Boolean,a.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",r(t("Statement"),null),a.null),t("LabeledStatement").bases("Statement").build("label","body").field("label",t("Identifier")).field("body",t("Statement")),t("BreakStatement").bases("Statement").build("label").field("label",r(t("Identifier"),null),a.null),t("ContinueStatement").bases("Statement").build("label").field("label",r(t("Identifier"),null),a.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,a.false),t("ReturnStatement").bases("Statement").build("argument").field("argument",r(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",r(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")],a.emptyArray).field("finalizer",r(t("BlockStatement"),null),a.null),t("CatchClause").bases("Node").build("param","guard","body").field("param",t("Pattern")).field("guard",r(t("Expression"),null),a.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",r(t("VariableDeclaration"),t("Expression"),null)).field("test",r(t("Expression"),null)).field("update",r(t("Expression"),null)).field("body",t("Statement")),t("ForInStatement").bases("Statement").build("left","right","body").field("left",r(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",r("var","let","const")).field("declarations",[t("VariableDeclarator")]),t("VariableDeclarator").bases("Node").build("id","init").field("id",t("Pattern")).field("init",r(t("Expression"),null),a.null),t("Expression").bases("Node"),t("ThisExpression").bases("Expression").build(),t("ArrayExpression").bases("Expression").build("elements").field("elements",[r(t("Expression"),null)]),t("ObjectExpression").bases("Expression").build("properties").field("properties",[t("Property")]),t("Property").bases("Node").build("kind","key","value").field("kind",r("init","get","set")).field("key",r(t("Literal"),t("Identifier"))).field("value",t("Expression")),t("SequenceExpression").bases("Expression").build("expressions").field("expressions",[t("Expression")]);var u=r("-","+","!","~","typeof","void","delete");t("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",u).field("argument",t("Expression")).field("prefix",Boolean,a.true);let d=r(...l);t("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",d).field("left",t("Expression")).field("right",t("Expression"));let m=r(...c);t("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",m).field("left",r(t("Pattern"),t("MemberExpression"))).field("right",t("Expression"));var f=r("++","--");t("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",f).field("argument",t("Expression")).field("prefix",Boolean);var b=r(...p);t("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",b).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",r(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",r(t("Expression"),null)).field("consequent",[t("Statement")]),t("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,a.false),t("Literal").bases("Expression").build("value").field("value",r(String,Boolean,null,Number,RegExp,BigInt)),t("Comment").bases("Printable").field("value",String).field("leading",Boolean,a.true).field("trailing",Boolean,a.false)}H(()=>module);function jp(s){s.use(Rp);let n=s.use(X),e=n.Type.def,t=n.Type.or,r=s.use(he).defaults;e("Function").field("generator",Boolean,r.false).field("expression",Boolean,r.false).field("defaults",[t(e("Expression"),null)],r.emptyArray).field("rest",t(e("Identifier"),null),r.null),e("RestElement").bases("Pattern").build("argument").field("argument",e("Pattern")).field("typeAnnotation",t(e("TypeAnnotation"),e("TSTypeAnnotation"),null),r.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,r.null).field("body",t(e("BlockStatement"),e("Expression"))).field("generator",!1,r.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,r.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,r.false).field("shorthand",Boolean,r.false).field("computed",Boolean,r.false),e("ObjectProperty").field("shorthand",Boolean,r.false),e("PropertyPattern").bases("Pattern").build("key","pattern").field("key",t(e("Literal"),e("Identifier"),e("Expression"))).field("pattern",e("Pattern")).field("computed",Boolean,r.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,r.false).field("static",Boolean,r.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,r.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),r.null),e("ClassExpression").bases("Expression").build("id","body","superClass").field("id",t(e("Identifier"),null),r.null).field("body",e("ClassBody")).field("superClass",t(e("Expression"),null),r.null),e("Super").bases("Expression").build(),e("Specifier").bases("Node"),e("ModuleSpecifier").bases("Specifier").field("local",t(e("Identifier"),null),r.null).field("id",t(e("Identifier"),null),r.null).field("name",t(e("Identifier"),null),r.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"))],r.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")],r.emptyArray).field("source",t(e("Literal"),null),r.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"))}H(()=>module);function Vp(s){s.use(wa),s.use(jp)}H(()=>module);function zp(s){s.use(Vp);let e=s.use(X).Type.def,t=s.use(he).defaults;e("Function").field("async",Boolean,t.false),e("AwaitExpression").bases("Expression").build("argument").field("argument",e("Expression"))}H(()=>module);function $p(s){s.use(zp);let n=s.use(X),e=n.Type.def,t=n.Type.or,r=s.use(he).defaults;e("ForOfStatement").field("await",Boolean,r.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"))])}H(()=>module);function Hp(s){s.use($p);let n=s.use(X),e=n.Type.def,t=n.Type.or,r=s.use(he).defaults;e("CatchClause").field("param",t(e("Pattern"),null),r.null)}H(()=>module);function Gp(s){s.use(Da),s.use(Hp);let n=s.use(X),e=n.Type.def,t=n.Type.or,i=s.use(he).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)}H(()=>module);function Wp(s){s.use(_p),s.use(Gp)}H(()=>module);function qp(s){s.use(Wp);let e=s.use(X).Type.def;e("StaticBlock").bases("Declaration").build("body").field("body",[e("Statement")])}H(()=>module);function cn(s){s.use(qp);let n=s.use(X),e=n.Type,t=n.Type.def,r=e.or,a=s.use(he).defaults;t("AwaitExpression").build("argument","all").field("argument",r(t("Expression"),null)).field("all",Boolean,a.false),t("Decorator").bases("Node").build("expression").field("expression",t("Expression")),t("Property").field("decorators",r([t("Decorator")],null),a.null),t("MethodDefinition").field("decorators",r([t("Decorator")],null),a.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",r(t("Expression"),null),a.null),t("ImportAttribute").bases("Node").build("key","value").field("key",r(t("Identifier"),t("Literal"))).field("value",t("Expression")),["ImportDeclaration","ExportAllDeclaration","ExportNamedDeclaration"].forEach(o=>{t(o).field("assertions",[t("ImportAttribute")],a.emptyArray)}),t("RecordExpression").bases("Expression").build("properties").field("properties",[r(t("ObjectProperty"),t("ObjectMethod"),t("SpreadElement"))]),t("TupleExpression").bases("Expression").build("elements").field("elements",[r(t("Expression"),t("SpreadElement"),null)]),t("ModuleExpression").bases("Node").build("body").field("body",t("Program"))}H(()=>module);function Kp(s){s.use(cn);let n=s.use(X),e=n.Type.def,t=n.Type.or,r=s.use(he).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),r.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,r.false);let i=t(e("JSXIdentifier"),e("JSXNamespacedName"),e("JSXMemberExpression"));e("JSXSpreadAttribute").bases("Node").build("argument").field("argument",e("Expression"));let a=[t(e("JSXAttribute"),e("JSXSpreadAttribute"))];e("JSXExpressionContainer").bases("Expression").build("expression").field("expression",t(e("Expression"),e("JSXEmptyExpression")));let o=[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),r.null).field("children",o,r.emptyArray).field("name",i,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",a,function(){return this.openingElement.attributes},!0),e("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",i).field("attributes",a,r.emptyArray).field("selfClosing",Boolean,r.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",o,r.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"))}H(()=>module);function Ea(s){var n=s.use(X),e=n.Type.def,t=n.Type.or,r=s.use(he).defaults,i=t(e("TypeAnnotation"),e("TSTypeAnnotation"),null),a=t(e("TypeParameterDeclaration"),e("TSTypeParameterDeclaration"),null);e("Identifier").field("typeAnnotation",i,r.null),e("ObjectPattern").field("typeAnnotation",i,r.null),e("Function").field("returnType",i,r.null).field("typeParameters",a,r.null),e("ClassProperty").build("key","value","typeAnnotation","static").field("value",t(e("Expression"),null)).field("static",Boolean,r.false).field("typeAnnotation",i,r.null),["ClassDeclaration","ClassExpression"].forEach(o=>{e(o).field("typeParameters",a,r.null).field("superTypeParameters",t(e("TypeParameterInstantiation"),e("TSTypeParameterInstantiation"),null),r.null).field("implements",t([e("ClassImplements")],[e("TSExpressionWithTypeArguments")]),r.emptyArray)})}H(()=>module);function Sa(s){s.use(cn),s.use(Ea);let n=s.use(X),e=n.Type.def,t=n.Type.or,r=s.use(he).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")],r.emptyArray).field("callProperties",[e("ObjectTypeCallProperty")],r.emptyArray).field("inexact",t(Boolean,void 0),r.undefined).field("exact",Boolean,r.false).field("internalSlots",[e("ObjectTypeInternalSlot")],r.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,r.null),e("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",e("Identifier")).field("key",e("FlowType")).field("value",e("FlowType")).field("variance",i,r.null).field("static",Boolean,r.false),e("ObjectTypeCallProperty").bases("Node").build("value").field("value",e("FunctionTypeAnnotation")).field("static",Boolean,r.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,r.null).field("bound",t(e("TypeAnnotation"),null),r.null).field("default",t(e("FlowType"),null),r.null),e("ClassProperty").field("variance",i,r.null),e("ClassImplements").bases("Node").build("id").field("id",e("Identifier")).field("superClass",t(e("Expression"),null),r.null).field("typeParameters",t(e("TypeParameterInstantiation"),null),r.null),e("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",e("ObjectTypeAnnotation")).field("extends",t([e("InterfaceExtends")],null),r.null),e("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterDeclaration"),null),r.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),r.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),r.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"))],r.emptyArray).field("source",t(e("Literal"),null),r.null),e("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",t(e("Literal"),null),r.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),r.null),e("CallExpression").field("typeArguments",t(null,e("TypeParameterInstantiation")),r.null),e("NewExpression").field("typeArguments",t(null,e("TypeParameterInstantiation")),r.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"))}H(()=>module);function Jp(s){s.use(cn);var n=s.use(X),e=s.use(he).defaults,t=n.Type.def,r=n.Type.or;t("VariableDeclaration").field("declarations",[r(t("VariableDeclarator"),t("Identifier"))]),t("Property").field("value",r(t("Expression"),t("Pattern"))),t("ArrayPattern").field("elements",[r(t("Pattern"),t("SpreadElement"),null)]),t("ObjectPattern").field("properties",[r(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",r(t("Declaration"),t("Expression"),null)).field("specifiers",[r(t("ExportSpecifier"),t("ExportBatchSpecifier"))],e.emptyArray).field("source",r(t("Literal"),null),e.null),t("Block").bases("Comment").build("value","leading","trailing"),t("Line").bases("Comment").build("value","leading","trailing")}H(()=>module);function Aa(s){s.use(cn);let n=s.use(X),e=s.use(he).defaults,t=n.Type.def,r=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",r(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",r(t("InterpreterDirective"),null),e.null);function a(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(...a(String,p=>JSON.stringify(p))),t("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",r(String,null),e.null).field(...a(Number)),t("BigIntLiteral").bases("Literal").build("value").field("value",r(String,Number)).field(...a(String,p=>p+"n")),t("DecimalLiteral").bases("Literal").build("value").field("value",String).field(...a(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(...a(r(RegExp,i),p=>`/${p.pattern}/${p.flags||""}`)).field("regex",{pattern:String,flags:String},function(){return{pattern:this.pattern,flags:this.flags}});var o=r(t("Property"),t("ObjectMethod"),t("ObjectProperty"),t("SpreadProperty"),t("SpreadElement"));t("ObjectExpression").bases("Expression").build("properties").field("properties",[o]),t("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",r("method","get","set")).field("key",r(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",r(t("Literal"),null),e.null).field("decorators",r([t("Decorator")],null),e.null),t("ObjectProperty").bases("Node").build("key","value").field("key",r(t("Literal"),t("Identifier"),t("Expression"))).field("value",r(t("Expression"),t("Pattern"))).field("accessibility",r(t("Literal"),null),e.null).field("computed",Boolean,e.false);var l=r(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",r(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",r(t("Literal"),t("Identifier"),t("PrivateName"),t("Expression"))).field("value",r(t("Expression"),null),e.null),["ClassMethod","ClassPrivateMethod"].forEach(p=>{t(p).field("kind",r("get","set","method","constructor"),()=>"method").field("body",t("BlockStatement")).field("access",r("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",r("public","private","protected",null),e.null).field("decorators",r([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=r(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",r([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",r(t("VariableDeclaration"),t("Expression"))).field("right",t("Expression")).field("body",t("Statement")),t("Import").bases("Expression").build()}H(()=>module);function Xp(s){let e=s.use(X).Type.def;s.use(Aa),s.use(Sa),e("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),e("TopicReference").bases("Expression").build()}H(()=>module);function Yp(s){s.use(Aa),s.use(Ea);var n=s.use(X),e=n.namedTypes,t=n.Type.def,r=n.Type.or,i=s.use(he).defaults,a=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 o=r(t("Identifier"),t("TSQualifiedName"));t("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",o),t("TSHasOptionalTypeParameterInstantiation").field("typeParameters",r(t("TSTypeParameterInstantiation"),null),i.null),t("TSHasOptionalTypeParameters").field("typeParameters",r(t("TSTypeParameterDeclaration"),null,void 0),i.null),t("TSHasOptionalTypeAnnotation").field("typeAnnotation",r(t("TSTypeAnnotation"),null),i.null),t("TSQualifiedName").bases("Node").build("left","right").field("left",o).field("right",o),t("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TSType")).field("extra",r({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",r(t("NumericLiteral"),t("StringLiteral"),t("BooleanLiteral"),t("TemplateLiteral"),t("UnaryExpression"),t("BigIntLiteral"))),t("TemplateLiteral").field("expressions",r([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=[r(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",r(t("Identifier"),null),i.null).field("params",[t("Pattern")]).field("returnType",r(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",r("public","private","protected",void 0),i.undefined).field("static",Boolean,i.false).field("computed",Boolean,i.false).field("optional",Boolean,i.false).field("key",r(t("Identifier"),t("StringLiteral"),t("NumericLiteral"),t("Expression"))).field("kind",r("get","set","method","constructor"),function(){return"method"}).field("access",r("public","private","protected",void 0),i.undefined).field("decorators",r([t("Decorator")],null),i.null).field("returnType",r(t("TSTypeAnnotation"),t("Noop"),null),i.null),t("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",r(Boolean,"+","-"),i.false).field("typeParameter",t("TSTypeParameter")).field("optional",r(Boolean,"+","-"),i.false).field("typeAnnotation",r(t("TSType"),null),i.null),t("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[r(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",r(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",r(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",r(t("Identifier"),t("TSThisType"))).field("typeAnnotation",r(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",r(t("Identifier"),a)).field("initializer",r(t("Expression"),null),i.null),t("TSTypeQuery").bases("TSType").build("exprName").field("exprName",r(o,t("TSImportType")));var c=r(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",r(t("Identifier"),String)).field("constraint",r(t("TSType"),void 0),i.undefined).field("default",r(t("TSType"),void 0),i.undefined),t("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",t("TSType")).field("expression",t("Expression")).field("extra",r({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",r(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",r(a,o)).field("declare",Boolean,i.false).field("global",Boolean,i.false).field("body",r(t("TSModuleBlock"),t("TSModuleDeclaration"),null),i.null),t("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",a).field("qualifier",r(o,void 0),i.undefined),t("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",t("Identifier")).field("isExport",Boolean,i.false).field("moduleReference",r(o,t("TSExternalModuleReference"))),t("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",a),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",o),t("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",o).field("declare",Boolean,i.false).field("extends",r([t("TSExpressionWithTypeArguments")],null),i.null).field("body",t("TSInterfaceBody")),t("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",r("public","private","protected",void 0),i.undefined).field("readonly",Boolean,i.false).field("parameter",r(t("Identifier"),t("AssignmentPattern"))),t("ClassProperty").field("access",r("public","private","protected",void 0),i.undefined),t("ClassAccessorProperty").bases("Declaration","TSHasOptionalTypeAnnotation"),t("ClassBody").field("body",[r(t("MethodDefinition"),t("VariableDeclarator"),t("ClassPropertyDefinition"),t("ClassProperty"),t("ClassPrivateProperty"),t("ClassAccessorProperty"),t("ClassMethod"),t("ClassPrivateMethod"),t("StaticBlock"),t("TSDeclareMethod"),c)])}H(()=>module);var Ae;Ae||(Ae={});var{astNodesAreEquivalent:kf,builders:pn,builtInTypes:Ie,defineMethod:Nf,eachField:Mf,finalize:Lf,getBuilderName:Of,getFieldNames:Qp,getFieldValue:Ge,getSupertypeNames:Bf,namedTypes:Zp,NodePath:eu,Path:Uf,PathVisitor:_f,someField:tu,Type:Rf,use:jf,visit:Vf}=Bp([cn,Kp,Sa,Jp,Xp,Yp]);Object.assign(Ae,Zp);var Bn=Ae,ia=Jn.default.SourceMapConsumer,nu=Jn.default.SourceMapGenerator,Ia=Object.prototype.hasOwnProperty;function su(){return`
|
|
14119
|
-
`}function aa(s,n,e){return s&&Ia.call(s,n)?s[n]:e}function ru(...s){let n={},e=s.length;for(let t=0;t<e;++t){let r=Object.keys(s[t]),i=r.length;for(let a=0;a<i;++a)n[r[a]]=!0}return n}function z(s,n){return s.line-n.line||s.column-n.column}function Qe(s){return{line:s.line,column:s.column}}function iu(s,n){if(s){if(!n)return s}else return n||null;let e=new ia(s),t=new ia(n),r=new nu({file:n.file,sourceRoot:n.sourceRoot}),i={};return t.eachMapping(function(a){let o=e.originalPositionFor({line:a.originalLine,column:a.originalColumn}),l=o.source;if(l===null)return;r.addMapping({source:l,original:Qe(o),generated:{line:a.generatedLine,column:a.generatedColumn},name:a.name});let c=e.sourceContentFor(l);c&&!Ia.call(i,l)&&(i[l]=c,r.setSourceContent(l,c))}),r.toJSON()}function Fa(s,n){if(!s.loc)return null;let e={start:s.loc.start,end:s.loc.end};function t(r){yr(e,r.loc)}return s.declaration&&s.declaration.decorators&&Xn(s)&&s.declaration.decorators.forEach(t),z(e.start,e.end)<0&&(e.start=Qe(e.start),n.skipSpaces(e.start,!1,!0),z(e.start,e.end)<0&&(e.end=Qe(e.end),n.skipSpaces(e.end,!0,!0))),s.comments&&s.comments.forEach(t),e}function yr(s,n){s&&n&&(z(n.start,s.start)<0&&(s.start=n.start),z(s.end,n.end)<0&&(s.end=n.end))}function Ar(s,n){let e=s.loc;if(e&&(e.start.line<1&&(e.start.line=1),e.end.line<1&&(e.end.line=1)),s.type==="File"&&(e.start=n.firstPos(),e.end=n.lastPos()),au(s,n),ou(s,n),e&&s.decorators)s.decorators.forEach(function(t){yr(e,t.loc)});else if(s.declaration&&Xn(s)){s.declaration.loc=null;let t=s.declaration.decorators;t&&t.forEach(function(r){yr(e,r.loc)})}else if(Bn.MethodDefinition&&Bn.MethodDefinition.check(s)||Bn.Property.check(s)&&(s.method||s.shorthand))s.value.loc=null,Bn.FunctionExpression.check(s.value)&&(s.value.id=null);else if(s.type==="ObjectTypeProperty"){let t=s.loc,r=t&&t.end;r&&(r=Qe(r),n.prevPos(r)&&n.charAt(r)===","&&(r=n.skipSpaces(r,!0,!0))&&(t.end=r))}}function au(s,n){if(s.type!=="ForStatement")return;function e(t){let r=t&&t.loc,i=r&&r.start,a=r&&Qe(r.end);for(;i&&a&&z(i,a)<0&&(n.prevPos(a),n.charAt(a)===";");)r.end.line=a.line,r.end.column=a.column}e(s.init),e(s.test),e(s.update)}function ou(s,n){if(s.type==="TemplateLiteral"&&s.quasis.length!==0){if(s.loc){let e=Qe(s.loc.start),t=s.quasis[0];z(t.loc.start,e)<0&&(t.loc.start=e);let r=Qe(s.loc.end),i=s.quasis[s.quasis.length-1];z(r,i.loc.end)<0&&(i.loc.end=r)}s.expressions.forEach(function(e,t){let r=n.skipSpaces(e.loc.start,!0,!1);if(n.prevPos(r)&&n.charAt(r)==="{"&&n.prevPos(r)&&n.charAt(r)==="$"){let a=s.quasis[t];z(r,a.loc.end)<0&&(a.loc.end=r)}let i=n.skipSpaces(e.loc.end,!1,!1);if(n.charAt(i)==="}"){let a=s.quasis[t+1];z(a.loc.start,i)<0&&(a.loc.start=i)}})}}function Xn(s){if(s)switch(s.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function ka(s){let n=s.getParentNode();return s.getName()==="declaration"&&Xn(n)?n:null}function sn(s,n){let e=s.trailingComma;return typeof e=="object"?!!e[n]:!!e}var vr={tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:su(),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},lu=vr.hasOwnProperty;function Yn(s){let n=s||vr;function e(t){return lu.call(n,t)?n[t]:vr[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 xr=class s{constructor(n,e,t=e){this.sourceLines=n,this.sourceLoc=e,this.targetLoc=t}slice(n,e,t=n.lastPos()){let r=this.sourceLines,i=this.sourceLoc,a=this.targetLoc;function o(l){let c=i[l],p=a[l],u=e;return l==="end"&&(u=t),cu(r,c,n,p,u)}if(z(e,a.start)<=0)if(z(a.end,t)<=0)a={start:Ye(a.start,e.line,e.column),end:Ye(a.end,e.line,e.column)};else{if(z(t,a.start)<=0)return null;i={start:i.start,end:o("end")},a={start:Ye(a.start,e.line,e.column),end:Ye(t,e.line,e.column)}}else{if(z(a.end,e)<=0)return null;z(a.end,t)<=0?(i={start:o("start"),end:i.end},a={start:{line:1,column:0},end:Ye(a.end,e.line,e.column)}):(i={start:o("start"),end:o("end")},a={start:{line:1,column:0},end:Ye(t,e.line,e.column)})}return new s(this.sourceLines,i,a)}add(n,e){return new s(this.sourceLines,this.sourceLoc,{start:oa(this.targetLoc.start,n,e),end:oa(this.targetLoc.end,n,e)})}subtract(n,e){return new s(this.sourceLines,this.sourceLoc,{start:Ye(this.targetLoc.start,n,e),end:Ye(this.targetLoc.end,n,e)})}indent(n,e=!1,t=!1){if(n===0)return this;let r=this.targetLoc,i=r.start.line,a=r.end.line;if(e&&i===1&&a===1)return this;if(r={start:r.start,end:r.end},!e||i>1){let o=r.start.column+n;r.start={line:i,column:t?Math.max(0,o):o}}if(!e||a>1){let o=r.end.column+n;r.end={line:a,column:t?Math.max(0,o):o}}return new s(this.sourceLines,this.sourceLoc,r)}};function oa(s,n,e){return{line:s.line+n-1,column:s.line===1?s.column+e:s.column}}function Ye(s,n,e){return{line:s.line-n+1,column:s.line===n?s.column-e:s.column}}function cu(s,n,e,t,r){let i=z(t,r);if(i===0)return n;let a,o;if(i<0){a=s.skipSpaces(n)||s.lastPos(),o=e.skipSpaces(t)||e.lastPos();let l=r.line-o.line;for(a.line+=l,o.line+=l,l>0&&(a.column=0,o.column=0);z(o,r)<0&&e.nextPos(o,!0););}else{a=s.skipSpaces(n,!0)||s.firstPos(),o=e.skipSpaces(t,!0)||e.firstPos();let l=r.line-o.line;for(a.line+=l,o.line+=l,l<0&&(a.column=s.getLineLength(a.line),o.column=e.getLineLength(o.line));z(r,o)<0&&e.prevPos(o,!0););}return a}var pu=Object.defineProperty,uu=(s,n,e)=>n in s?pu(s,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[n]=e,Xt=(s,n,e)=>(uu(s,typeof n!="symbol"?n+"":n,e),e),St=class s{constructor(n,e=null){this.infos=n,Xt(this,"length"),Xt(this,"name"),Xt(this,"mappings",[]),Xt(this,"cachedSourceMap",null),Xt(this,"cachedTabWidth"),this.length=n.length,this.name=e||null,this.name&&this.mappings.push(new xr(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 r(o){return o=o||{},o.file=n,e&&(o.sourceRoot=e),o}if(t.cachedSourceMap)return r(t.cachedSourceMap.toJSON());let i=new Jn.default.SourceMapGenerator(r()),a={};return t.mappings.forEach(function(o){let l=o.sourceLines.skipSpaces(o.sourceLoc.start)||o.sourceLines.lastPos(),c=t.skipSpaces(o.targetLoc.start)||t.lastPos();for(;z(l,o.sourceLoc.end)<0&&z(c,o.targetLoc.end)<0;){o.sourceLines.charAt(l),t.charAt(c);let p=o.sourceLines.name;if(i.addMapping({source:p,original:{line:l.line,column:l.column},generated:{line:c.line,column:c.column}}),!Pr.call(a,p)){let u=o.sourceLines.toString();i.setSourceContent(p,u),a[p]=u}t.nextPos(c,!0),o.sourceLines.nextPos(l,!0)}}),t.cachedSourceMap=i,i.toJSON()}bootstrapCharAt(n){let e=n.line,t=n.column,r=this.toString().split(
|
|
14420
|
+
`}],utils:[],composables:[],plugins:[]}];import{join as pd}from"path";import{loadConfig as ud}from"c12";import Te from"fs-extra";import oo from"kleur";import dd from"lodash";import{promises as gr}from"node:fs";var Jn=bn(ks(),1),va=bn(fr(),1);function he(s){var n=s.use(X),e=n.Type,t=n.builtInTypes,r=t.number;function i(c){return e.from(p=>r.check(p)&&p>=c,r+" >= "+c)}let a={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){},"use strict":function(){return"use strict"}};var o=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")},o.toString());return{geq:i,defaults:a,isPrimitive:l}}function H(s){try{var n=s(),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 Fp=Object.defineProperty,kp=(s,n,e)=>n in s?Fp(s,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[n]=e,le=(s,n,e)=>(kp(s,typeof n!="symbol"?n+"":n,e),e),xa=Object.prototype,zn=xa.toString,Pe=xa.hasOwnProperty,ct=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 rn(n)}},rn=class extends ct{constructor(n){super(),this.elemType=n,le(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(n,e){return Array.isArray(n)&&n.every(t=>this.elemType.check(t,e))}},$n=class extends ct{constructor(n){super(),this.value=n,le(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}},Hn=class extends ct{constructor(n){super(),this.fields=n,le(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(n,e){return zn.call(n)===zn.call({})&&this.fields.every(t=>t.type.check(n[t.name],e))}},Gn=class extends ct{constructor(n){super(),this.types=n,le(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)}},lt=class extends ct{constructor(n,e){super(),this.name=n,this.predicate=e,le(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}},nn=class s{constructor(n,e){this.type=n,this.typeName=e,le(this,"baseNames",[]),le(this,"ownFields",Object.create(null)),le(this,"allSupertypes",Object.create(null)),le(this,"supertypeList",[]),le(this,"allFields",Object.create(null)),le(this,"fieldNames",[]),le(this,"finalized",!1),le(this,"buildable",!1),le(this,"buildParams",[])}isSupertypeOf(n){if(n instanceof s){if(this.finalized!==!0||n.finalized!==!0)throw new Error("");return Pe.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 r(i){var a=t[i],o=a.type,l=a.getValue(n);return o.check(l,e)}return n!==null&&typeof n=="object"&&Object.keys(t).every(r)}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(r=>{e.indexOf(r)<0&&e.push(r)}),this}},Wn=class{constructor(n,e,t,r){this.name=n,this.type=e,this.defaultFn=t,le(this,"hidden"),this.hidden=!!r}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(s){return Array.isArray(s)?"["+s.map(Sr).join(", ")+"]":s&&typeof s=="object"?"{ "+Object.keys(s).map(function(n){return n+": "+s[n]}).join(", ")+" }":JSON.stringify(s)}function X(s){let n={or(...D){return new Gn(D.map(E=>n.from(E)))},from(D,E){if(D instanceof rn||D instanceof $n||D instanceof Hn||D instanceof Gn||D instanceof lt)return D;if(D instanceof nn)return D.type;if(o.check(D)){if(D.length!==1)throw new Error("only one element type is permitted for typed arrays");return new rn(n.from(D[0]))}if(l.check(D))return new Hn(Object.keys(D).map(O=>new Wn(O,n.from(D[O],O))));if(typeof D=="function"){var L=e.indexOf(D);if(L>=0)return t[L];if(typeof E!="string")throw new Error("missing name");return new lt(E,D)}return new $n(D)},def(D){return Pe.call(y,D)?y[D]:y[D]=new k(D)},hasDef(D){return Pe.call(y,D)}};var e=[],t=[];function r(D,E){let L=zn.call(E),O=new lt(D,G=>zn.call(G)===L);return E&&typeof E.constructor=="function"&&(e.push(E.constructor),t.push(O)),O}let i=r("string","truthy"),a=r("function",function(){}),o=r("array",[]),l=r("object",{}),c=r("RegExp",/./),p=r("Date",new Date),u=r("number",3),d=r("boolean",!0),m=r("null",null),f=r("undefined",void 0),b=typeof BigInt=="function"?r("BigInt",BigInt(1234)):new lt("BigInt",()=>!1),h={string:i,function:a,array:o,object:l,RegExp:c,Date:p,number:u,boolean:d,null:m,undefined:f,BigInt:b};var y=Object.create(null);function C(D){if(D&&typeof D=="object"){var E=D.type;if(typeof E=="string"&&Pe.call(y,E)){var L=y[E];if(L.finalized)return L}}return null}class k extends nn{constructor(E){super(new lt(E,(L,O)=>this.check(L,O)),E)}check(E,L){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(E===null||typeof E!="object")return!1;var O=C(E);return O?L&&O===this?this.checkAllFields(E,L):this.isSupertypeOf(O)?L?O.checkAllFields(E,L)&&this.checkAllFields(E,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields(E,L):!1}build(...E){if(this.buildParams=E,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let L=(G,W,J,ye)=>{if(!Pe.call(G,W)){var Ue=this.allFields;if(!Pe.call(Ue,W))throw new Error(""+W);var hn=Ue[W],Lo=hn.type,Lt;if(ye)Lt=J;else if(hn.defaultFn)Lt=hn.defaultFn.call(G);else{var Oo="no value or default function given for field "+JSON.stringify(W)+" of "+this.typeName+"("+this.buildParams.map(function(Bo){return Ue[Bo]}).join(", ")+")";throw new Error(Oo)}if(!Lo.check(Lt))throw new Error(Sr(Lt)+" does not match field "+hn+" of type "+this.typeName);G[W]=Lt}},O=(...G)=>{var W=G.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var J=Object.create(I);if(this.buildParams.forEach(function(ye,Ue){Ue<W?L(J,ye,G[Ue],!0):L(J,ye,null,!1)}),Object.keys(this.allFields).forEach(function(ye){L(J,ye,null,!1)}),J.type!==this.typeName)throw new Error("");return J};return O.from=G=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var W=Object.create(I);if(Object.keys(this.allFields).forEach(function(J){Pe.call(G,J)?L(W,J,G[J],!0):L(W,J,null,!1)}),W.type!==this.typeName)throw new Error("");return W},Object.defineProperty(T,de(this.typeName),{enumerable:!0,value:O}),this}field(E,L,O,G){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(E)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[E]=new Wn(E,n.from(L),O,G),this)}finalize(){if(!this.finalized){var E=this.allFields,L=this.allSupertypes;this.baseNames.forEach(G=>{var W=y[G];if(W instanceof nn)W.finalize(),ls(E,W.allFields),ls(L,W.allSupertypes);else{var J="unknown supertype name "+JSON.stringify(G)+" for subtype "+JSON.stringify(this.typeName);throw new Error(J)}}),ls(E,this.ownFields),L[this.typeName]=this,this.fieldNames.length=0;for(var O in E)Pe.call(E,O)&&!E[O].hidden&&this.fieldNames.push(O);Object.defineProperty(Vr,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,No(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&ko(this.typeName)}}}function x(D){if(!Pe.call(y,D))throw new Error("");var E=y[D];if(E.finalized!==!0)throw new Error("");return E.supertypeList.slice(1)}function P(D){for(var E={},L=Object.keys(y),O=L.length,G=0;G<O;++G){var W=L[G],J=y[W];if(J.finalized!==!0)throw new Error(""+W);for(var ye=0;ye<J.supertypeList.length;++ye){var Ue=J.supertypeList[ye];if(Pe.call(D,Ue)){E[W]=Ue;break}}}return E}var T=Object.create(null),I={};function $(D,E){var L=I[D];return f.check(E)?delete I[D]:(a.assert(E),Object.defineProperty(I,D,{enumerable:!0,configurable:!0,value:E})),L}function de(D){return D.replace(/^[A-Z]+/,function(E){var L=E.length;switch(L){case 0:return"";case 1:return E.toLowerCase();default:return E.slice(0,L-1).toLowerCase()+E.charAt(L-1)}})}function ke(D){return D=de(D),D.replace(/(Expression)?$/,"Statement")}var Vr={};function as(D){var E=C(D);if(E)return E.fieldNames.slice(0);if("type"in D)throw new Error("did not recognize object of type "+JSON.stringify(D.type));return Object.keys(D)}function os(D,E){var L=C(D);if(L){var O=L.allFields[E];if(O)return O.getValue(D)}return D&&D[E]}function Io(D,E,L){as(D).forEach(function(O){E.call(this,O,os(D,O))},L)}function Fo(D,E,L){return as(D).some(function(O){return E.call(this,O,os(D,O))},L)}function ko(D){var E=ke(D);if(T[E])return;var L=T[de(D)];if(!L)return;let O=function(...G){return T.expressionStatement(L.apply(T,G))};O.from=function(...G){return T.expressionStatement(L.from.apply(T,G))},T[E]=O}function No(D,E){E.length=0,E.push(D);for(var L=Object.create(null),O=0;O<E.length;++O){D=E[O];var G=y[D];if(G.finalized!==!0)throw new Error("");Pe.call(L,D)&&delete E[L[D]],L[D]=O,E.push.apply(E,G.baseNames)}for(var W=0,J=W,ye=E.length;J<ye;++J)Pe.call(E,J)&&(E[W++]=E[J]);E.length=W}function ls(D,E){return Object.keys(E).forEach(function(L){D[L]=E[L]}),D}function Mo(){Object.keys(y).forEach(function(D){y[D].finalize()})}return{Type:n,builtInTypes:h,getSupertypeNames:x,computeSupertypeLookupTable:P,builders:T,defineMethod:$,getBuilderName:de,getStatementBuilderName:ke,namedTypes:Vr,getFieldNames:as,getFieldValue:os,eachField:Io,someField:Fo,finalize:Mo}}H(()=>module);var Np=Object.prototype,Ln=Np.hasOwnProperty;function Pa(s){var n=s.use(X),e=n.builtInTypes.array,t=n.builtInTypes.number;let r=function u(d,m,f){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,f=null;this.value=d,this.parentPath=m,this.name=f,this.__childCache=null};var i=r.prototype;function a(u){return u.__childCache||(u.__childCache=Object.create(null))}function o(u,d){var m=a(u),f=u.getValueProperty(d),b=m[d];return(!Ln.call(m,d)||b.value!==f)&&(b=m[d]=new u.constructor(f,u,d)),b}i.getValueProperty=function(d){return this.value[d]},i.get=function(...d){for(var m=this,f=d.length,b=0;b<f;++b)m=o(m,d[b]);return m},i.each=function(d,m){for(var f=[],b=this.value.length,h=0,h=0;h<b;++h)Ln.call(this.value,h)&&(f[h]=this.get(h));for(m=m||this,h=0;h<b;++h)Ln.call(f,h)&&d.call(m,f[h])},i.map=function(d,m){var f=[];return this.each(function(b){f.push(d.call(this,b))},m),f},i.filter=function(d,m){var f=[];return this.each(function(b){d.call(this,b)&&f.push(b)},m),f};function l(){}function c(u,d,m,f){if(e.assert(u.value),d===0)return l;var b=u.value.length;if(b<1)return l;var h=arguments.length;h===2?(m=0,f=b):h===3?(m=Math.max(m,0),f=b):(m=Math.max(m,0),f=Math.min(f,b)),t.assert(m),t.assert(f);for(var y=Object.create(null),C=a(u),k=m;k<f;++k)if(Ln.call(u.value,k)){var x=u.get(k);if(x.name!==k)throw new Error("");var P=k+d;x.name=P,y[P]=x,delete C[k]}return delete C.length,function(){for(var T in y){var I=y[T];if(I.name!==+T)throw new Error("");C[T]=I,u.value[T]=I.value}}}i.shift=function(){var d=c(this,-1),m=this.value.shift();return d(),m},i.unshift=function(...d){var m=c(this,d.length),f=this.value.unshift.apply(this.value,d);return m(),f},i.push=function(...d){return e.assert(this.value),delete a(this).length,this.value.push.apply(this.value,d)},i.pop=function(){e.assert(this.value);var d=a(this);return delete d[this.value.length-1],delete d.length,this.value.pop()},i.insertAt=function(d){var m=arguments.length,f=c(this,m-1,d);if(f===l&&m<=1)return this;d=Math.max(d,0);for(var b=1;b<m;++b)this.value[d+b-1]=arguments[b];return f(),this},i.insertBefore=function(...d){for(var m=this.parentPath,f=d.length,b=[this.name],h=0;h<f;++h)b.push(d[h]);return m.insertAt.apply(m,b)},i.insertAfter=function(...d){for(var m=this.parentPath,f=d.length,b=[this.name+1],h=0;h<f;++h)b.push(d[h]);return m.insertAt.apply(m,b)};function p(u){if(!(u instanceof r))throw new Error("");var d=u.parentPath;if(!d)return u;var m=d.value,f=a(d);if(m[u.name]===u.value)f[u.name]=u;else if(e.check(m)){var b=m.indexOf(u.value);b>=0&&(f[u.name=b]=u)}else m[u.name]=u.value,f[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(d){var m=[],f=this.parentPath.value,b=a(this.parentPath),h=arguments.length;if(p(this),e.check(f)){for(var y=f.length,C=c(this.parentPath,h-1,this.name+1),k=[this.name,1],x=0;x<h;++x)k.push(arguments[x]);var P=f.splice.apply(f,k);if(P[0]!==this.value)throw new Error("");if(f.length!==y-1+h)throw new Error("");if(C(),h===0)delete this.value,delete b[this.name],this.__childCache=null;else{if(f[this.name]!==d)throw new Error("");for(this.value!==d&&(this.value=d,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!==d&&(this.__childCache=null),this.value=f[this.name]=d,m.push(this);else if(h===0)delete f[this.name],delete this.value,this.__childCache=null;else throw new Error("Could not replace path");return m},r}H(()=>module);var Ct=Object.prototype.hasOwnProperty;function Mp(s){var n=s.use(X),e=n.Type,t=n.namedTypes,r=t.Node,i=t.Expression,a=n.builtInTypes.array,o=n.builders;let l=function x(P,T){if(!(this instanceof x))throw new Error("Scope constructor cannot be invoked without 'new'");p.check(P.value)||c.assert(P.value);var I;if(T){if(!(T instanceof x))throw new Error("");I=T.depth+1}else T=null,I=0;Object.defineProperties(this,{path:{value:P},node:{value:P.value},isGlobal:{value:!T,enumerable:!0},depth:{value:I},parent:{value:T},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 d=l.prototype;d.didScan=!1,d.declares=function(x){return this.scan(),Ct.call(this.bindings,x)},d.declaresType=function(x){return this.scan(),Ct.call(this.types,x)},d.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 P=0;this.declares(x+P);)++P;var T=x+P;return this.bindings[T]=n.builders.identifier(T)},d.injectTemporary=function(x,P){x||(x=this.declareTemporary());var T=this.path.get("body");return t.BlockStatement.check(T.value)&&(T=T.get("body")),T.unshift(o.variableDeclaration("var",[o.variableDeclarator(x,P||null)])),x},d.scan=function(x){if(x||!this.didScan){for(var P in this.bindings)delete this.bindings[P];for(var P in this.types)delete this.types[P];m(this.path,this.bindings,this.types),this.didScan=!0}},d.getBindings=function(){return this.scan(),this.bindings},d.getTypes=function(){return this.scan(),this.types};function m(x,P,T){var I=x.value;if(p.check(I)){let $=x.get("typeParameters","params");a.check($.value)&&$.each(de=>{k(de,T)})}c.check(I)&&(t.CatchClause.check(I)?y(x.get("param"),P):f(x,P,T))}function f(x,P,T){var I=x.value;x.parent&&t.FunctionExpression.check(x.parent.node)&&x.parent.node.id&&y(x.parent.get("id"),P),I&&(a.check(I)?x.each($=>{h($,P,T)}):t.Function.check(I)?(x.get("params").each($=>{y($,P)}),h(x.get("body"),P,T),f(x.get("typeParameters"),P,T)):t.TypeAlias&&t.TypeAlias.check(I)||t.InterfaceDeclaration&&t.InterfaceDeclaration.check(I)||t.TSTypeAliasDeclaration&&t.TSTypeAliasDeclaration.check(I)||t.TSInterfaceDeclaration&&t.TSInterfaceDeclaration.check(I)?C(x.get("id"),T):t.VariableDeclarator.check(I)?(y(x.get("id"),P),h(x.get("init"),P,T)):I.type==="ImportSpecifier"||I.type==="ImportNamespaceSpecifier"||I.type==="ImportDefaultSpecifier"?y(x.get(I.local?"local":I.name?"name":"id"),P):r.check(I)&&!i.check(I)&&n.eachField(I,function($,de){var ke=x.get($);if(!b(ke,de))throw new Error("");h(ke,P,T)}))}function b(x,P){return!!(x.value===P||Array.isArray(x.value)&&x.value.length===0&&Array.isArray(P)&&P.length===0)}function h(x,P,T){var I=x.value;if(!(!I||i.check(I)))if(t.FunctionDeclaration.check(I)&&I.id!==null)y(x.get("id"),P);else if(t.ClassDeclaration&&t.ClassDeclaration.check(I)&&I.id!==null)y(x.get("id"),P),f(x.get("typeParameters"),P,T);else if(t.InterfaceDeclaration&&t.InterfaceDeclaration.check(I)||t.TSInterfaceDeclaration&&t.TSInterfaceDeclaration.check(I))C(x.get("id"),T);else if(c.check(I)){if(t.CatchClause.check(I)&&t.Identifier.check(I.param)){var $=I.param.name,de=Ct.call(P,$);f(x.get("body"),P,T),de||delete P[$]}}else f(x,P,T)}function y(x,P){var T=x.value;t.Pattern.assert(T),t.Identifier.check(T)?Ct.call(P,T.name)?P[T.name].push(x):P[T.name]=[x]:t.AssignmentPattern&&t.AssignmentPattern.check(T)?y(x.get("left"),P):t.ObjectPattern&&t.ObjectPattern.check(T)?x.get("properties").each(function(I){var $=I.value;t.Pattern.check($)?y(I,P):t.Property.check($)||t.ObjectProperty&&t.ObjectProperty.check($)?y(I.get("value"),P):t.SpreadProperty&&t.SpreadProperty.check($)&&y(I.get("argument"),P)}):t.ArrayPattern&&t.ArrayPattern.check(T)?x.get("elements").each(function(I){var $=I.value;t.Pattern.check($)?y(I,P):t.SpreadElement&&t.SpreadElement.check($)&&y(I.get("argument"),P)}):t.PropertyPattern&&t.PropertyPattern.check(T)?y(x.get("pattern"),P):(t.SpreadElementPattern&&t.SpreadElementPattern.check(T)||t.RestElement&&t.RestElement.check(T)||t.SpreadPropertyPattern&&t.SpreadPropertyPattern.check(T))&&y(x.get("argument"),P)}function C(x,P){var T=x.value;t.Pattern.assert(T),t.Identifier.check(T)&&(Ct.call(P,T.name)?P[T.name].push(x):P[T.name]=[x])}function k(x,P){var T=x.value;u.assert(T),Ct.call(P,T.name)?P[T.name].push(x):P[T.name]=[x]}return d.lookup=function(x){for(var P=this;P&&!P.declares(x);P=P.parent);return P},d.lookupType=function(x){for(var P=this;P&&!P.declaresType(x);P=P.parent);return P},d.getGlobalScope=function(){for(var x=this;!x.isGlobal;)x=x.parent;return x},l}H(()=>module);function Ca(s){var n=s.use(X),e=n.namedTypes,t=n.builders,r=n.builtInTypes.number,i=n.builtInTypes.array,a=s.use(Pa),o=s.use(Mp);let l=function h(y,C,k){if(!(this instanceof h))throw new Error("NodePath constructor cannot be invoked without 'new'");a.call(this,y,C,k)};var c=l.prototype=Object.create(a.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,a.prototype.replace.apply(this,arguments)},c.prune=function(){var h=this.parent;return this.replace(),f(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,C=y&&y.scope;return e.Node.check(h)&&o.isEstablishedBy(h)&&(C=new o(this,C)),C||null},c.getValueProperty=function(h){return n.getFieldValue(this.value,h)},c.needsParens=function(h){var y=this.parentPath;if(!y)return!1;var C=this.value;if(!e.Expression.check(C)||C.type==="Identifier")return!1;for(;!e.Node.check(y.value);)if(y=y.parentPath,!y)return!1;var k=y.value;switch(C.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return k.type==="MemberExpression"&&this.name==="object"&&k.object===C;case"BinaryExpression":case"LogicalExpression":switch(k.type){case"CallExpression":return this.name==="callee"&&k.callee===C;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&k.object===C;case"BinaryExpression":case"LogicalExpression":{let x=C,P=k.operator,T=u[P],I=x.operator,$=u[I];if(T>$)return!0;if(T===$&&this.name==="right"){if(k.right!==x)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(k.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(k.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 k.type==="MemberExpression"&&r.check(C.value)&&this.name==="object"&&k.object===C;case"AssignmentExpression":case"ConditionalExpression":switch(k.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&k.callee===C;case"ConditionalExpression":return this.name==="test"&&k.test===C;case"MemberExpression":return this.name==="object"&&k.object===C;default:return!1}default:if(k.type==="NewExpression"&&this.name==="callee"&&k.callee===C)return d(C)}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(C){u[C]=y})});function d(h){return e.CallExpression.check(h)?!0:i.check(h)?h.some(d):e.Node.check(h)?n.someField(h,function(y,C){return d(C)}):!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,C;h.parent;h=h.parent){if(y=h.node,C=h.parent.node,e.BlockStatement.check(C)&&h.parent.name==="body"&&h.name===0){if(C.body[0]!==y)throw new Error("Nodes must be equal");return!0}if(e.ExpressionStatement.check(C)&&h.name==="expression"){if(C.expression!==y)throw new Error("Nodes must be equal");return!0}if(e.SequenceExpression.check(C)&&h.parent.name==="expressions"&&h.name===0){if(C.expressions[0]!==y)throw new Error("Nodes must be equal");continue}if(e.CallExpression.check(C)&&h.name==="callee"){if(C.callee!==y)throw new Error("Nodes must be equal");continue}if(e.MemberExpression.check(C)&&h.name==="object"){if(C.object!==y)throw new Error("Nodes must be equal");continue}if(e.ConditionalExpression.check(C)&&h.name==="test"){if(C.test!==y)throw new Error("Nodes must be equal");continue}if(p(C)&&h.name==="left"){if(C.left!==y)throw new Error("Nodes must be equal");continue}if(e.UnaryExpression.check(C)&&!C.prefix&&h.name==="argument"){if(C.argument!==y)throw new Error("Nodes must be equal");continue}return!1}return!0}function f(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)&&b(h);return h}function b(h){var y=h.get("test").value,C=h.get("alternate").value,k=h.get("consequent").value;if(!k&&!C){var x=t.expressionStatement(y);h.replace(x)}else if(!k&&C){var P=t.unaryExpression("!",y,!0);e.UnaryExpression.check(y)&&y.operator==="!"&&(P=y.argument),h.get("test").replace(P),h.get("consequent").replace(C),h.get("alternate").replace()}}return l}H(()=>module);var On=Object.prototype.hasOwnProperty;function Lp(s){var n=s.use(X),e=s.use(Ca),t=n.builtInTypes.array,r=n.builtInTypes.object,i=n.builtInTypes.function,a;let o=function f(){if(!(this instanceof f))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=l(this),this._shouldVisitComments=On.call(this._methodNameTable,"Block")||On.call(this._methodNameTable,"Line"),this.Context=d(this),this._visiting=!1,this._changeReported=!1};function l(f){var b=Object.create(null);for(var h in f)/^visit[A-Z]/.test(h)&&(b[h.slice(5)]=!0);for(var y=n.computeSupertypeLookupTable(b),C=Object.create(null),k=Object.keys(y),x=k.length,P=0;P<x;++P){var T=k[P];h="visit"+y[T],i.check(f[h])&&(C[T]=h)}return C}o.fromMethodsObject=function(b){if(b instanceof o)return b;if(!r.check(b))return new o;let h=function C(){if(!(this instanceof C))throw new Error("Visitor constructor cannot be invoked without 'new'");o.call(this)};var y=h.prototype=Object.create(p);return y.constructor=h,c(y,b),c(h,o),i.assert(h.fromMethodsObject),i.assert(h.visit),new h};function c(f,b){for(var h in b)On.call(b,h)&&(f[h]=b[h]);return f}o.visit=function(b,h){return o.fromMethodsObject(h).visit(b)};var p=o.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 f=arguments.length,b=new Array(f),h=0;h<f;++h)b[h]=arguments[h];b[0]instanceof e||(b[0]=new e({root:b[0]}).get("root")),this.reset.apply(this,b);var y;try{var C=this.visitWithoutReset(b[0]);y=!0}finally{if(this._visiting=!1,!y&&this._abortRequested)return b[0].value}return C},p.AbortRequest=function(){},p.abort=function(){var f=this;f._abortRequested=!0;var b=new f.AbortRequest;throw b.cancel=function(){f._abortRequested=!1},b},p.reset=function(f){},p.visitWithoutReset=function(f){if(this instanceof this.Context)return this.visitor.visitWithoutReset(f);if(!(f instanceof e))throw new Error("");var b=f.value,h=b&&typeof b=="object"&&typeof b.type=="string"&&this._methodNameTable[b.type];if(h){var y=this.acquireContext(f);try{return y.invokeVisitorMethod(h)}finally{this.releaseContext(y)}}else return u(f,this)};function u(f,b){if(!(f instanceof e))throw new Error("");if(!(b instanceof o))throw new Error("");var h=f.value;if(t.check(h))f.each(b.visitWithoutReset,b);else if(r.check(h)){var y=n.getFieldNames(h);b._shouldVisitComments&&h.comments&&y.indexOf("comments")<0&&y.push("comments");for(var C=y.length,k=[],x=0;x<C;++x){var P=y[x];On.call(h,P)||(h[P]=n.getFieldValue(h,P)),k.push(f.get(P))}for(var x=0;x<C;++x)b.visitWithoutReset(k[x])}return f.value}p.acquireContext=function(f){return this._reusableContextStack.length===0?new this.Context(f):this._reusableContextStack.pop().reset(f)},p.releaseContext=function(f){if(!(f instanceof this.Context))throw new Error("");this._reusableContextStack.push(f),f.currentPath=null},p.reportChanged=function(){this._changeReported=!0},p.wasChangeReported=function(){return this._changeReported};function d(f){function b(y){if(!(this instanceof b))throw new Error("");if(!(this instanceof o))throw new Error("");if(!(y instanceof e))throw new Error("");Object.defineProperty(this,"visitor",{value:f,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=y,this.needToCallTraverse=!0,Object.seal(this)}if(!(f instanceof o))throw new Error("");var h=b.prototype=Object.create(f);return h.constructor=b,c(h,m),b}var m=Object.create(null);return m.reset=function(b){if(!(this instanceof this.Context))throw new Error("");if(!(b instanceof e))throw new Error("");return this.currentPath=b,this.needToCallTraverse=!0,this},m.invokeVisitorMethod=function(b){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");var h=this.visitor[b].call(this,this.currentPath);if(h===!1?this.needToCallTraverse=!1:h!==a&&(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 "+b);var y=this.currentPath;return y&&y.value},m.traverse=function(b,h){if(!(this instanceof this.Context))throw new Error("");if(!(b instanceof e))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");return this.needToCallTraverse=!1,u(b,o.fromMethodsObject(h||this.visitor))},m.visit=function(b,h){if(!(this instanceof this.Context))throw new Error("");if(!(b instanceof e))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");return this.needToCallTraverse=!1,o.fromMethodsObject(h||this.visitor).visitWithoutReset(b)},m.reportChanged=function(){this.visitor.reportChanged()},m.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},o}H(()=>module);function Op(s){var n=s.use(X),e=n.getFieldNames,t=n.getFieldValue,r=n.builtInTypes.array,i=n.builtInTypes.object,a=n.builtInTypes.Date,o=n.builtInTypes.RegExp,l=Object.prototype.hasOwnProperty;function c(f,b,h){return r.check(h)?h.length=0:h=null,u(f,b,h)}c.assert=function(f,b){var h=[];if(!c(f,b,h))if(h.length===0){if(f!==b)throw new Error("Nodes must be equal")}else throw new Error("Nodes differ in the following path: "+h.map(p).join(""))};function p(f){return/[_$a-z][_$a-z0-9]*/i.test(f)?"."+f:"["+JSON.stringify(f)+"]"}function u(f,b,h){return f===b?!0:r.check(f)?d(f,b,h):i.check(f)?m(f,b,h):a.check(f)?a.check(b)&&+f==+b:o.check(f)?o.check(b)&&f.source===b.source&&f.global===b.global&&f.multiline===b.multiline&&f.ignoreCase===b.ignoreCase:f==b}function d(f,b,h){r.assert(f);var y=f.length;if(!r.check(b)||b.length!==y)return h&&h.push("length"),!1;for(var C=0;C<y;++C){if(h&&h.push(C),C in f!=C in b||!u(f[C],b[C],h))return!1;if(h){var k=h.pop();if(k!==C)throw new Error(""+k)}}return!0}function m(f,b,h){if(i.assert(f),!i.check(b))return!1;if(f.type!==b.type)return h&&h.push("type"),!1;var y=e(f),C=y.length,k=e(b),x=k.length;if(C===x){for(var P=0;P<C;++P){var T=y[P],I=t(f,T),$=t(b,T);if(h&&h.push(T),!u(I,$,h))return!1;if(h){var de=h.pop();if(de!==T)throw new Error(""+de)}}return!0}if(!h)return!1;var ke=Object.create(null);for(P=0;P<C;++P)ke[y[P]]=!0;for(P=0;P<x;++P){if(T=k[P],!l.call(ke,T))return h.push(T),!1;delete ke[T]}for(T in ke){h.push(T);break}return!1}return c}H(()=>module);function Bp(s){let n=Up(),e=n.use(X);s.forEach(n.use),e.finalize();let t=n.use(Lp);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(Op),finalize:e.finalize,Path:n.use(Pa),NodePath:n.use(Ca),PathVisitor:t,use:n.use,visit:t.visit}}function Up(){let s=[],n=[];function e(r){var i=s.indexOf(r);return i===-1&&(i=s.length,s.push(r),n[i]=r(t)),n[i]}var t={use:e};return t}H(()=>module);function wa(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}H(()=>module);function Ta(s){let n=s.use(wa);return n.BinaryOperators.indexOf("**")<0&&n.BinaryOperators.push("**"),n.AssignmentOperators.indexOf("**=")<0&&n.AssignmentOperators.push("**="),n}H(()=>module);function Da(s){let n=s.use(Ta);return n.LogicalOperators.indexOf("??")<0&&n.LogicalOperators.push("??"),n}H(()=>module);function _p(s){let n=s.use(Da);return n.LogicalOperators.forEach(e=>{let t=e+"=";n.AssignmentOperators.indexOf(t)<0&&n.AssignmentOperators.push(t)}),n}H(()=>module);function Rp(s){var n=s.use(X),e=n.Type,t=e.def,r=e.or,i=s.use(he),a=i.defaults,o=i.geq;let{BinaryOperators:l,AssignmentOperators:c,LogicalOperators:p}=s.use(wa);t("Printable").field("loc",r(t("SourceLocation"),null),a.null,!0),t("Node").bases("Printable").field("type",String).field("comments",r([t("Comment")],null),a.null,!0),t("SourceLocation").field("start",t("Position")).field("end",t("Position")).field("source",r(String,null),a.null),t("Position").field("line",o(1)).field("column",o(0)),t("File").bases("Node").build("program","name").field("program",t("Program")).field("name",r(String,null),a.null),t("Program").bases("Node").build("body").field("body",[t("Statement")]),t("Function").bases("Node").field("id",r(t("Identifier"),null),a.null).field("params",[t("Pattern")]).field("body",t("BlockStatement")).field("generator",Boolean,a.false).field("async",Boolean,a.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",r(t("Statement"),null),a.null),t("LabeledStatement").bases("Statement").build("label","body").field("label",t("Identifier")).field("body",t("Statement")),t("BreakStatement").bases("Statement").build("label").field("label",r(t("Identifier"),null),a.null),t("ContinueStatement").bases("Statement").build("label").field("label",r(t("Identifier"),null),a.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,a.false),t("ReturnStatement").bases("Statement").build("argument").field("argument",r(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",r(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")],a.emptyArray).field("finalizer",r(t("BlockStatement"),null),a.null),t("CatchClause").bases("Node").build("param","guard","body").field("param",t("Pattern")).field("guard",r(t("Expression"),null),a.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",r(t("VariableDeclaration"),t("Expression"),null)).field("test",r(t("Expression"),null)).field("update",r(t("Expression"),null)).field("body",t("Statement")),t("ForInStatement").bases("Statement").build("left","right","body").field("left",r(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",r("var","let","const")).field("declarations",[t("VariableDeclarator")]),t("VariableDeclarator").bases("Node").build("id","init").field("id",t("Pattern")).field("init",r(t("Expression"),null),a.null),t("Expression").bases("Node"),t("ThisExpression").bases("Expression").build(),t("ArrayExpression").bases("Expression").build("elements").field("elements",[r(t("Expression"),null)]),t("ObjectExpression").bases("Expression").build("properties").field("properties",[t("Property")]),t("Property").bases("Node").build("kind","key","value").field("kind",r("init","get","set")).field("key",r(t("Literal"),t("Identifier"))).field("value",t("Expression")),t("SequenceExpression").bases("Expression").build("expressions").field("expressions",[t("Expression")]);var u=r("-","+","!","~","typeof","void","delete");t("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",u).field("argument",t("Expression")).field("prefix",Boolean,a.true);let d=r(...l);t("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",d).field("left",t("Expression")).field("right",t("Expression"));let m=r(...c);t("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",m).field("left",r(t("Pattern"),t("MemberExpression"))).field("right",t("Expression"));var f=r("++","--");t("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",f).field("argument",t("Expression")).field("prefix",Boolean);var b=r(...p);t("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",b).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",r(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",r(t("Expression"),null)).field("consequent",[t("Statement")]),t("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,a.false),t("Literal").bases("Expression").build("value").field("value",r(String,Boolean,null,Number,RegExp,BigInt)),t("Comment").bases("Printable").field("value",String).field("leading",Boolean,a.true).field("trailing",Boolean,a.false)}H(()=>module);function jp(s){s.use(Rp);let n=s.use(X),e=n.Type.def,t=n.Type.or,r=s.use(he).defaults;e("Function").field("generator",Boolean,r.false).field("expression",Boolean,r.false).field("defaults",[t(e("Expression"),null)],r.emptyArray).field("rest",t(e("Identifier"),null),r.null),e("RestElement").bases("Pattern").build("argument").field("argument",e("Pattern")).field("typeAnnotation",t(e("TypeAnnotation"),e("TSTypeAnnotation"),null),r.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,r.null).field("body",t(e("BlockStatement"),e("Expression"))).field("generator",!1,r.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,r.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,r.false).field("shorthand",Boolean,r.false).field("computed",Boolean,r.false),e("ObjectProperty").field("shorthand",Boolean,r.false),e("PropertyPattern").bases("Pattern").build("key","pattern").field("key",t(e("Literal"),e("Identifier"),e("Expression"))).field("pattern",e("Pattern")).field("computed",Boolean,r.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,r.false).field("static",Boolean,r.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,r.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),r.null),e("ClassExpression").bases("Expression").build("id","body","superClass").field("id",t(e("Identifier"),null),r.null).field("body",e("ClassBody")).field("superClass",t(e("Expression"),null),r.null),e("Super").bases("Expression").build(),e("Specifier").bases("Node"),e("ModuleSpecifier").bases("Specifier").field("local",t(e("Identifier"),null),r.null).field("id",t(e("Identifier"),null),r.null).field("name",t(e("Identifier"),null),r.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"))],r.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")],r.emptyArray).field("source",t(e("Literal"),null),r.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"))}H(()=>module);function Vp(s){s.use(Ta),s.use(jp)}H(()=>module);function zp(s){s.use(Vp);let e=s.use(X).Type.def,t=s.use(he).defaults;e("Function").field("async",Boolean,t.false),e("AwaitExpression").bases("Expression").build("argument").field("argument",e("Expression"))}H(()=>module);function $p(s){s.use(zp);let n=s.use(X),e=n.Type.def,t=n.Type.or,r=s.use(he).defaults;e("ForOfStatement").field("await",Boolean,r.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"))])}H(()=>module);function Hp(s){s.use($p);let n=s.use(X),e=n.Type.def,t=n.Type.or,r=s.use(he).defaults;e("CatchClause").field("param",t(e("Pattern"),null),r.null)}H(()=>module);function Gp(s){s.use(Da),s.use(Hp);let n=s.use(X),e=n.Type.def,t=n.Type.or,i=s.use(he).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)}H(()=>module);function Wp(s){s.use(_p),s.use(Gp)}H(()=>module);function qp(s){s.use(Wp);let e=s.use(X).Type.def;e("StaticBlock").bases("Declaration").build("body").field("body",[e("Statement")])}H(()=>module);function cn(s){s.use(qp);let n=s.use(X),e=n.Type,t=n.Type.def,r=e.or,a=s.use(he).defaults;t("AwaitExpression").build("argument","all").field("argument",r(t("Expression"),null)).field("all",Boolean,a.false),t("Decorator").bases("Node").build("expression").field("expression",t("Expression")),t("Property").field("decorators",r([t("Decorator")],null),a.null),t("MethodDefinition").field("decorators",r([t("Decorator")],null),a.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",r(t("Expression"),null),a.null),t("ImportAttribute").bases("Node").build("key","value").field("key",r(t("Identifier"),t("Literal"))).field("value",t("Expression")),["ImportDeclaration","ExportAllDeclaration","ExportNamedDeclaration"].forEach(o=>{t(o).field("assertions",[t("ImportAttribute")],a.emptyArray)}),t("RecordExpression").bases("Expression").build("properties").field("properties",[r(t("ObjectProperty"),t("ObjectMethod"),t("SpreadElement"))]),t("TupleExpression").bases("Expression").build("elements").field("elements",[r(t("Expression"),t("SpreadElement"),null)]),t("ModuleExpression").bases("Node").build("body").field("body",t("Program"))}H(()=>module);function Kp(s){s.use(cn);let n=s.use(X),e=n.Type.def,t=n.Type.or,r=s.use(he).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),r.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,r.false);let i=t(e("JSXIdentifier"),e("JSXNamespacedName"),e("JSXMemberExpression"));e("JSXSpreadAttribute").bases("Node").build("argument").field("argument",e("Expression"));let a=[t(e("JSXAttribute"),e("JSXSpreadAttribute"))];e("JSXExpressionContainer").bases("Expression").build("expression").field("expression",t(e("Expression"),e("JSXEmptyExpression")));let o=[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),r.null).field("children",o,r.emptyArray).field("name",i,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",a,function(){return this.openingElement.attributes},!0),e("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",i).field("attributes",a,r.emptyArray).field("selfClosing",Boolean,r.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",o,r.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"))}H(()=>module);function Ea(s){var n=s.use(X),e=n.Type.def,t=n.Type.or,r=s.use(he).defaults,i=t(e("TypeAnnotation"),e("TSTypeAnnotation"),null),a=t(e("TypeParameterDeclaration"),e("TSTypeParameterDeclaration"),null);e("Identifier").field("typeAnnotation",i,r.null),e("ObjectPattern").field("typeAnnotation",i,r.null),e("Function").field("returnType",i,r.null).field("typeParameters",a,r.null),e("ClassProperty").build("key","value","typeAnnotation","static").field("value",t(e("Expression"),null)).field("static",Boolean,r.false).field("typeAnnotation",i,r.null),["ClassDeclaration","ClassExpression"].forEach(o=>{e(o).field("typeParameters",a,r.null).field("superTypeParameters",t(e("TypeParameterInstantiation"),e("TSTypeParameterInstantiation"),null),r.null).field("implements",t([e("ClassImplements")],[e("TSExpressionWithTypeArguments")]),r.emptyArray)})}H(()=>module);function Sa(s){s.use(cn),s.use(Ea);let n=s.use(X),e=n.Type.def,t=n.Type.or,r=s.use(he).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")],r.emptyArray).field("callProperties",[e("ObjectTypeCallProperty")],r.emptyArray).field("inexact",t(Boolean,void 0),r.undefined).field("exact",Boolean,r.false).field("internalSlots",[e("ObjectTypeInternalSlot")],r.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,r.null),e("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",e("Identifier")).field("key",e("FlowType")).field("value",e("FlowType")).field("variance",i,r.null).field("static",Boolean,r.false),e("ObjectTypeCallProperty").bases("Node").build("value").field("value",e("FunctionTypeAnnotation")).field("static",Boolean,r.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,r.null).field("bound",t(e("TypeAnnotation"),null),r.null).field("default",t(e("FlowType"),null),r.null),e("ClassProperty").field("variance",i,r.null),e("ClassImplements").bases("Node").build("id").field("id",e("Identifier")).field("superClass",t(e("Expression"),null),r.null).field("typeParameters",t(e("TypeParameterInstantiation"),null),r.null),e("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",e("ObjectTypeAnnotation")).field("extends",t([e("InterfaceExtends")],null),r.null),e("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterDeclaration"),null),r.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),r.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),r.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"))],r.emptyArray).field("source",t(e("Literal"),null),r.null),e("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",t(e("Literal"),null),r.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),r.null),e("CallExpression").field("typeArguments",t(null,e("TypeParameterInstantiation")),r.null),e("NewExpression").field("typeArguments",t(null,e("TypeParameterInstantiation")),r.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"))}H(()=>module);function Jp(s){s.use(cn);var n=s.use(X),e=s.use(he).defaults,t=n.Type.def,r=n.Type.or;t("VariableDeclaration").field("declarations",[r(t("VariableDeclarator"),t("Identifier"))]),t("Property").field("value",r(t("Expression"),t("Pattern"))),t("ArrayPattern").field("elements",[r(t("Pattern"),t("SpreadElement"),null)]),t("ObjectPattern").field("properties",[r(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",r(t("Declaration"),t("Expression"),null)).field("specifiers",[r(t("ExportSpecifier"),t("ExportBatchSpecifier"))],e.emptyArray).field("source",r(t("Literal"),null),e.null),t("Block").bases("Comment").build("value","leading","trailing"),t("Line").bases("Comment").build("value","leading","trailing")}H(()=>module);function Aa(s){s.use(cn);let n=s.use(X),e=s.use(he).defaults,t=n.Type.def,r=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",r(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",r(t("InterpreterDirective"),null),e.null);function a(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(...a(String,p=>JSON.stringify(p))),t("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",r(String,null),e.null).field(...a(Number)),t("BigIntLiteral").bases("Literal").build("value").field("value",r(String,Number)).field(...a(String,p=>p+"n")),t("DecimalLiteral").bases("Literal").build("value").field("value",String).field(...a(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(...a(r(RegExp,i),p=>`/${p.pattern}/${p.flags||""}`)).field("regex",{pattern:String,flags:String},function(){return{pattern:this.pattern,flags:this.flags}});var o=r(t("Property"),t("ObjectMethod"),t("ObjectProperty"),t("SpreadProperty"),t("SpreadElement"));t("ObjectExpression").bases("Expression").build("properties").field("properties",[o]),t("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",r("method","get","set")).field("key",r(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",r(t("Literal"),null),e.null).field("decorators",r([t("Decorator")],null),e.null),t("ObjectProperty").bases("Node").build("key","value").field("key",r(t("Literal"),t("Identifier"),t("Expression"))).field("value",r(t("Expression"),t("Pattern"))).field("accessibility",r(t("Literal"),null),e.null).field("computed",Boolean,e.false);var l=r(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",r(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",r(t("Literal"),t("Identifier"),t("PrivateName"),t("Expression"))).field("value",r(t("Expression"),null),e.null),["ClassMethod","ClassPrivateMethod"].forEach(p=>{t(p).field("kind",r("get","set","method","constructor"),()=>"method").field("body",t("BlockStatement")).field("access",r("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",r("public","private","protected",null),e.null).field("decorators",r([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=r(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",r([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",r(t("VariableDeclaration"),t("Expression"))).field("right",t("Expression")).field("body",t("Statement")),t("Import").bases("Expression").build()}H(()=>module);function Xp(s){let e=s.use(X).Type.def;s.use(Aa),s.use(Sa),e("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),e("TopicReference").bases("Expression").build()}H(()=>module);function Yp(s){s.use(Aa),s.use(Ea);var n=s.use(X),e=n.namedTypes,t=n.Type.def,r=n.Type.or,i=s.use(he).defaults,a=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 o=r(t("Identifier"),t("TSQualifiedName"));t("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",o),t("TSHasOptionalTypeParameterInstantiation").field("typeParameters",r(t("TSTypeParameterInstantiation"),null),i.null),t("TSHasOptionalTypeParameters").field("typeParameters",r(t("TSTypeParameterDeclaration"),null,void 0),i.null),t("TSHasOptionalTypeAnnotation").field("typeAnnotation",r(t("TSTypeAnnotation"),null),i.null),t("TSQualifiedName").bases("Node").build("left","right").field("left",o).field("right",o),t("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TSType")).field("extra",r({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",r(t("NumericLiteral"),t("StringLiteral"),t("BooleanLiteral"),t("TemplateLiteral"),t("UnaryExpression"),t("BigIntLiteral"))),t("TemplateLiteral").field("expressions",r([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=[r(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",r(t("Identifier"),null),i.null).field("params",[t("Pattern")]).field("returnType",r(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",r("public","private","protected",void 0),i.undefined).field("static",Boolean,i.false).field("computed",Boolean,i.false).field("optional",Boolean,i.false).field("key",r(t("Identifier"),t("StringLiteral"),t("NumericLiteral"),t("Expression"))).field("kind",r("get","set","method","constructor"),function(){return"method"}).field("access",r("public","private","protected",void 0),i.undefined).field("decorators",r([t("Decorator")],null),i.null).field("returnType",r(t("TSTypeAnnotation"),t("Noop"),null),i.null),t("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",r(Boolean,"+","-"),i.false).field("typeParameter",t("TSTypeParameter")).field("optional",r(Boolean,"+","-"),i.false).field("typeAnnotation",r(t("TSType"),null),i.null),t("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[r(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",r(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",r(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",r(t("Identifier"),t("TSThisType"))).field("typeAnnotation",r(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",r(t("Identifier"),a)).field("initializer",r(t("Expression"),null),i.null),t("TSTypeQuery").bases("TSType").build("exprName").field("exprName",r(o,t("TSImportType")));var c=r(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",r(t("Identifier"),String)).field("constraint",r(t("TSType"),void 0),i.undefined).field("default",r(t("TSType"),void 0),i.undefined),t("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",t("TSType")).field("expression",t("Expression")).field("extra",r({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",r(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",r(a,o)).field("declare",Boolean,i.false).field("global",Boolean,i.false).field("body",r(t("TSModuleBlock"),t("TSModuleDeclaration"),null),i.null),t("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",a).field("qualifier",r(o,void 0),i.undefined),t("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",t("Identifier")).field("isExport",Boolean,i.false).field("moduleReference",r(o,t("TSExternalModuleReference"))),t("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",a),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",o),t("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",o).field("declare",Boolean,i.false).field("extends",r([t("TSExpressionWithTypeArguments")],null),i.null).field("body",t("TSInterfaceBody")),t("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",r("public","private","protected",void 0),i.undefined).field("readonly",Boolean,i.false).field("parameter",r(t("Identifier"),t("AssignmentPattern"))),t("ClassProperty").field("access",r("public","private","protected",void 0),i.undefined),t("ClassAccessorProperty").bases("Declaration","TSHasOptionalTypeAnnotation"),t("ClassBody").field("body",[r(t("MethodDefinition"),t("VariableDeclarator"),t("ClassPropertyDefinition"),t("ClassProperty"),t("ClassPrivateProperty"),t("ClassAccessorProperty"),t("ClassMethod"),t("ClassPrivateMethod"),t("StaticBlock"),t("TSDeclareMethod"),c)])}H(()=>module);var Ae;Ae||(Ae={});var{astNodesAreEquivalent:kf,builders:pn,builtInTypes:Ie,defineMethod:Nf,eachField:Mf,finalize:Lf,getBuilderName:Of,getFieldNames:Qp,getFieldValue:Ge,getSupertypeNames:Bf,namedTypes:Zp,NodePath:eu,Path:Uf,PathVisitor:_f,someField:tu,Type:Rf,use:jf,visit:Vf}=Bp([cn,Kp,Sa,Jp,Xp,Yp]);Object.assign(Ae,Zp);var Bn=Ae,ia=Jn.default.SourceMapConsumer,nu=Jn.default.SourceMapGenerator,Ia=Object.prototype.hasOwnProperty;function su(){return`
|
|
14421
|
+
`}function aa(s,n,e){return s&&Ia.call(s,n)?s[n]:e}function ru(...s){let n={},e=s.length;for(let t=0;t<e;++t){let r=Object.keys(s[t]),i=r.length;for(let a=0;a<i;++a)n[r[a]]=!0}return n}function z(s,n){return s.line-n.line||s.column-n.column}function Qe(s){return{line:s.line,column:s.column}}function iu(s,n){if(s){if(!n)return s}else return n||null;let e=new ia(s),t=new ia(n),r=new nu({file:n.file,sourceRoot:n.sourceRoot}),i={};return t.eachMapping(function(a){let o=e.originalPositionFor({line:a.originalLine,column:a.originalColumn}),l=o.source;if(l===null)return;r.addMapping({source:l,original:Qe(o),generated:{line:a.generatedLine,column:a.generatedColumn},name:a.name});let c=e.sourceContentFor(l);c&&!Ia.call(i,l)&&(i[l]=c,r.setSourceContent(l,c))}),r.toJSON()}function Fa(s,n){if(!s.loc)return null;let e={start:s.loc.start,end:s.loc.end};function t(r){yr(e,r.loc)}return s.declaration&&s.declaration.decorators&&Xn(s)&&s.declaration.decorators.forEach(t),z(e.start,e.end)<0&&(e.start=Qe(e.start),n.skipSpaces(e.start,!1,!0),z(e.start,e.end)<0&&(e.end=Qe(e.end),n.skipSpaces(e.end,!0,!0))),s.comments&&s.comments.forEach(t),e}function yr(s,n){s&&n&&(z(n.start,s.start)<0&&(s.start=n.start),z(s.end,n.end)<0&&(s.end=n.end))}function Ar(s,n){let e=s.loc;if(e&&(e.start.line<1&&(e.start.line=1),e.end.line<1&&(e.end.line=1)),s.type==="File"&&(e.start=n.firstPos(),e.end=n.lastPos()),au(s,n),ou(s,n),e&&s.decorators)s.decorators.forEach(function(t){yr(e,t.loc)});else if(s.declaration&&Xn(s)){s.declaration.loc=null;let t=s.declaration.decorators;t&&t.forEach(function(r){yr(e,r.loc)})}else if(Bn.MethodDefinition&&Bn.MethodDefinition.check(s)||Bn.Property.check(s)&&(s.method||s.shorthand))s.value.loc=null,Bn.FunctionExpression.check(s.value)&&(s.value.id=null);else if(s.type==="ObjectTypeProperty"){let t=s.loc,r=t&&t.end;r&&(r=Qe(r),n.prevPos(r)&&n.charAt(r)===","&&(r=n.skipSpaces(r,!0,!0))&&(t.end=r))}}function au(s,n){if(s.type!=="ForStatement")return;function e(t){let r=t&&t.loc,i=r&&r.start,a=r&&Qe(r.end);for(;i&&a&&z(i,a)<0&&(n.prevPos(a),n.charAt(a)===";");)r.end.line=a.line,r.end.column=a.column}e(s.init),e(s.test),e(s.update)}function ou(s,n){if(s.type==="TemplateLiteral"&&s.quasis.length!==0){if(s.loc){let e=Qe(s.loc.start),t=s.quasis[0];z(t.loc.start,e)<0&&(t.loc.start=e);let r=Qe(s.loc.end),i=s.quasis[s.quasis.length-1];z(r,i.loc.end)<0&&(i.loc.end=r)}s.expressions.forEach(function(e,t){let r=n.skipSpaces(e.loc.start,!0,!1);if(n.prevPos(r)&&n.charAt(r)==="{"&&n.prevPos(r)&&n.charAt(r)==="$"){let a=s.quasis[t];z(r,a.loc.end)<0&&(a.loc.end=r)}let i=n.skipSpaces(e.loc.end,!1,!1);if(n.charAt(i)==="}"){let a=s.quasis[t+1];z(a.loc.start,i)<0&&(a.loc.start=i)}})}}function Xn(s){if(s)switch(s.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function ka(s){let n=s.getParentNode();return s.getName()==="declaration"&&Xn(n)?n:null}function sn(s,n){let e=s.trailingComma;return typeof e=="object"?!!e[n]:!!e}var vr={tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:su(),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},lu=vr.hasOwnProperty;function Yn(s){let n=s||vr;function e(t){return lu.call(n,t)?n[t]:vr[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 xr=class s{constructor(n,e,t=e){this.sourceLines=n,this.sourceLoc=e,this.targetLoc=t}slice(n,e,t=n.lastPos()){let r=this.sourceLines,i=this.sourceLoc,a=this.targetLoc;function o(l){let c=i[l],p=a[l],u=e;return l==="end"&&(u=t),cu(r,c,n,p,u)}if(z(e,a.start)<=0)if(z(a.end,t)<=0)a={start:Ye(a.start,e.line,e.column),end:Ye(a.end,e.line,e.column)};else{if(z(t,a.start)<=0)return null;i={start:i.start,end:o("end")},a={start:Ye(a.start,e.line,e.column),end:Ye(t,e.line,e.column)}}else{if(z(a.end,e)<=0)return null;z(a.end,t)<=0?(i={start:o("start"),end:i.end},a={start:{line:1,column:0},end:Ye(a.end,e.line,e.column)}):(i={start:o("start"),end:o("end")},a={start:{line:1,column:0},end:Ye(t,e.line,e.column)})}return new s(this.sourceLines,i,a)}add(n,e){return new s(this.sourceLines,this.sourceLoc,{start:oa(this.targetLoc.start,n,e),end:oa(this.targetLoc.end,n,e)})}subtract(n,e){return new s(this.sourceLines,this.sourceLoc,{start:Ye(this.targetLoc.start,n,e),end:Ye(this.targetLoc.end,n,e)})}indent(n,e=!1,t=!1){if(n===0)return this;let r=this.targetLoc,i=r.start.line,a=r.end.line;if(e&&i===1&&a===1)return this;if(r={start:r.start,end:r.end},!e||i>1){let o=r.start.column+n;r.start={line:i,column:t?Math.max(0,o):o}}if(!e||a>1){let o=r.end.column+n;r.end={line:a,column:t?Math.max(0,o):o}}return new s(this.sourceLines,this.sourceLoc,r)}};function oa(s,n,e){return{line:s.line+n-1,column:s.line===1?s.column+e:s.column}}function Ye(s,n,e){return{line:s.line-n+1,column:s.line===n?s.column-e:s.column}}function cu(s,n,e,t,r){let i=z(t,r);if(i===0)return n;let a,o;if(i<0){a=s.skipSpaces(n)||s.lastPos(),o=e.skipSpaces(t)||e.lastPos();let l=r.line-o.line;for(a.line+=l,o.line+=l,l>0&&(a.column=0,o.column=0);z(o,r)<0&&e.nextPos(o,!0););}else{a=s.skipSpaces(n,!0)||s.firstPos(),o=e.skipSpaces(t,!0)||e.firstPos();let l=r.line-o.line;for(a.line+=l,o.line+=l,l<0&&(a.column=s.getLineLength(a.line),o.column=e.getLineLength(o.line));z(r,o)<0&&e.prevPos(o,!0););}return a}var pu=Object.defineProperty,uu=(s,n,e)=>n in s?pu(s,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[n]=e,Xt=(s,n,e)=>(uu(s,typeof n!="symbol"?n+"":n,e),e),St=class s{constructor(n,e=null){this.infos=n,Xt(this,"length"),Xt(this,"name"),Xt(this,"mappings",[]),Xt(this,"cachedSourceMap",null),Xt(this,"cachedTabWidth"),this.length=n.length,this.name=e||null,this.name&&this.mappings.push(new xr(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 r(o){return o=o||{},o.file=n,e&&(o.sourceRoot=e),o}if(t.cachedSourceMap)return r(t.cachedSourceMap.toJSON());let i=new Jn.default.SourceMapGenerator(r()),a={};return t.mappings.forEach(function(o){let l=o.sourceLines.skipSpaces(o.sourceLoc.start)||o.sourceLines.lastPos(),c=t.skipSpaces(o.targetLoc.start)||t.lastPos();for(;z(l,o.sourceLoc.end)<0&&z(c,o.targetLoc.end)<0;){o.sourceLines.charAt(l),t.charAt(c);let p=o.sourceLines.name;if(i.addMapping({source:p,original:{line:l.line,column:l.column},generated:{line:c.line,column:c.column}}),!Pr.call(a,p)){let u=o.sourceLines.toString();i.setSourceContent(p,u),a[p]=u}t.nextPos(c,!0),o.sourceLines.nextPos(l,!0)}}),t.cachedSourceMap=i,i.toJSON()}bootstrapCharAt(n){let e=n.line,t=n.column,r=this.toString().split(Cr),i=r[e-1];return typeof i>"u"?"":t===i.length&&e<r.length?`
|
|
14120
14422
|
`:t>=i.length?"":i.charAt(t)}charAt(n){let e=n.line,t=n.column,r=this,i=r.infos,a=i[e-1],o=t;if(typeof a>"u"||o<0)return"";let l=this.getIndentAt(e);return o<l?" ":(o+=a.sliceStart-l,o===a.sliceEnd&&e<this.length?`
|
|
14121
|
-
`:o>=a.sliceEnd?"":a.line.charAt(o))}stripMargin(n,e){if(n===0)return this;if(e&&this.length===1)return this;let t=new s(this.infos.map(function(r,i){return r.line&&(i>0||!e)&&(r={...r,indent:Math.max(0,r.indent-n)}),r}));if(this.mappings.length>0){let r=t.mappings;this.mappings.forEach(function(i){r.push(i.indent(n,e,!0))})}return t}indent(n){if(n===0)return this;let e=new s(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(r){t.push(r.indent(n))})}return e}indentTail(n){if(n===0)return this;if(this.length<2)return this;let e=new s(this.infos.map(function(t,r){return r>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(r){t.push(r.indent(n,!0))})}return e}lockIndentTail(){return this.length<2?this:new s(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,a=this.length;i<=a;++i){let o=this.infos[i-1],l=o.line.slice(o.sliceStart,o.sliceEnd);if(
|
|
14122
|
-
`))}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]=
|
|
14423
|
+
`:o>=a.sliceEnd?"":a.line.charAt(o))}stripMargin(n,e){if(n===0)return this;if(e&&this.length===1)return this;let t=new s(this.infos.map(function(r,i){return r.line&&(i>0||!e)&&(r={...r,indent:Math.max(0,r.indent-n)}),r}));if(this.mappings.length>0){let r=t.mappings;this.mappings.forEach(function(i){r.push(i.indent(n,e,!0))})}return t}indent(n){if(n===0)return this;let e=new s(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(r){t.push(r.indent(n))})}return e}indentTail(n){if(n===0)return this;if(this.length<2)return this;let e=new s(this.infos.map(function(t,r){return r>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(r){t.push(r.indent(n,!0))})}return e}lockIndentTail(){return this.length<2?this:new s(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,a=this.length;i<=a;++i){let o=this.infos[i-1],l=o.line.slice(o.sliceStart,o.sliceEnd);if(wt(l))continue;let c=Math.abs(o.indent-e);n[c]=~~n[c]+1,e=o.indent}let t=-1,r=2;for(let i=1;i<n.length;i+=1)Pr.call(n,i)&&n[i]>t&&(t=n[i],r=i);return this.cachedTabWidth=r}startsWithComment(){if(this.infos.length===0)return!1;let n=this.infos[0],e=n.sliceStart,t=n.sliceEnd,r=n.line.slice(e,t).trim();return r.length===0||r.slice(0,2)==="//"||r.slice(0,2)==="/*"}isOnlyWhitespace(){return wt(this.toString())}isPrecededOnlyByWhitespace(n){let e=this.infos[n.line-1],t=Math.max(e.indent,0),r=n.column-t;if(r<=0)return!0;let i=e.sliceStart,a=Math.min(i+r,e.sliceEnd),o=e.line.slice(i,a);return wt(o)}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,r=n.column;if(r<1){if(t-=1,t<1)return!1;r=this.getLineLength(t)}else r=Math.min(r-1,this.getLineLength(t));return n.line=t,n.column=r,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(!wt(this.charAt(n))&&this.nextPos(n))return n;return null}else{for(;wt(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):ot}trimRight(){let n=this.skipSpaces(this.lastPos(),!0,!0);return n?this.slice(this.firstPos(),n):ot}trim(){let n=this.skipSpaces(this.firstPos(),!1,!0);if(n===null)return ot;let e=this.skipSpaces(this.lastPos(),!0,!0);return e===null?ot:this.slice(n,e)}eachPos(n,e=this.firstPos(),t=!1){let r=this.firstPos();if(e&&(r.line=e.line,r.column=e.column),!(t&&!this.skipSpaces(r,!1,!0)))do n.call(this,r);while(this.nextPos(r,t))}bootstrapSlice(n,e){let t=this.toString().split(Cr).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(`
|
|
14424
|
+
`))}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]=Tt(t[0],n.column,e.column):(t[0]=Tt(t[0],n.column),t.push(Tt(t.pop(),0,e.column)));let r=new s(t);if(this.mappings.length>0){let i=r.mappings;this.mappings.forEach(function(a){let o=a.slice(this,n,e);o&&i.push(o)},this)}return r}bootstrapSliceString(n,e,t){return this.slice(n,e).toString(t)}sliceString(n=this.firstPos(),e=this.lastPos(),t){let{tabWidth:r,useTabs:i,reuseWhitespace:a,lineTerminator:o}=Yn(t),l=[];for(let c=n.line;c<=e.line;++c){let p=this.infos[c-1];c===n.line?c===e.line?p=Tt(p,n.column,e.column):p=Tt(p,n.column):c===e.line&&(p=Tt(p,0,e.column));let u=Math.max(p.indent,0),d=p.line.slice(0,p.sliceStart);if(a&&wt(d)&&Na(d,r)===u){l.push(p.line.slice(0,p.sliceEnd));continue}let m=0,f=u;i&&(m=Math.floor(u/r),f-=m*r);let b="";m>0&&(b+=new Array(m+1).join(" ")),f>0&&(b+=new Array(f+1).join(" ")),b+=p.line.slice(p.sliceStart,p.sliceEnd),l.push(b)}return l.join(o)}isEmpty(){return this.length<2&&this.getLineLength(1)<1}join(n){let e=this,t=[],r=[],i;function a(c){if(c!==null){if(i){let p=c.infos[0],u=new Array(p.indent+1).join(" "),d=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(f){r.push(f.add(d,m))})}else c.mappings.length>0&&r.push.apply(r,c.mappings);c.infos.forEach(function(p,u){(!i||u>0)&&(i={...p},t.push(i))})}}function o(c,p){p>0&&a(e),a(c)}if(n.map(function(c){let p=w(c);return p.isEmpty()?null:p}).forEach((c,p)=>{e.isEmpty()?a(c):o(c,p)}),t.length<1)return ot;let l=new s(t);return l.mappings=r,l}concat(...n){let e=[this];return e.push.apply(e,n),ot.join(e)}},jn={},Pr=jn.hasOwnProperty,du=10;function Na(s,n){let e=0,t=s.length;for(let r=0;r<t;++r)switch(s.charCodeAt(r)){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 fu=/^\s*/,Cr=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;function w(s,n){if(s instanceof St)return s;s+="";let e=n&&n.tabWidth,t=s.indexOf(" ")<0,r=!n&&t&&s.length<=du;if(r&&Pr.call(jn,s))return jn[s];let i=new St(s.split(Cr).map(function(a){let o=fu.exec(a)[0];return{line:a,indent:Na(o,e),locked:!1,sliceStart:o.length,sliceEnd:a.length}}),Yn(n).sourceFileName);return r&&(jn[s]=i),i}function wt(s){return!/\S/.test(s)}function Tt(s,n,e){let t=s.sliceStart,r=s.sliceEnd,i=Math.max(s.indent,0),a=i+r-t;return typeof e>"u"&&(e=a),n=Math.max(n,0),e=Math.min(e,a),e=Math.max(e,n),e<i?(i=e,r=t):r-=a-e,a=e,a-=n,n<i?i-=n:(n-=i,i=0,t+=n),s.indent===i&&s.sliceStart===t&&s.sliceEnd===r?s:{line:s.line,indent:i,locked:!1,sliceStart:t,sliceEnd:r}}function v(s){return ot.join(s)}var ot=w(""),At=Ae,Ma=Ie.array,mu=Ie.object,la=new WeakMap;function La(s,n,e){if(!s)return e;if(Ar(s,n),e){if(At.Node.check(s)&&At.SourceLocation.check(s.loc)){let r=e.length-1;for(;r>=0;--r){let i=e[r];if(i&&i.loc&&z(i.loc.end,s.loc.start)<=0)break}return e.splice(r+1,0,s),e}}else{let r=la.get(s);if(r)return r}let t;if(Ma.check(s))t=Object.keys(s);else if(mu.check(s))t=Qp(s);else return e;e||la.set(s,e=[]);for(let r=0,i=t.length;r<i;++r)La(s[t[r]],n,e);return e}function Oa(s,n,e){let t=La(s,e),r=0,i=t&&t.length,a,o;for(;typeof i=="number"&&r<i;){let l=r+i>>1,c=t[l];if(z(c.loc.start,n.loc.start)<=0&&z(n.loc.end,c.loc.end)<=0){Oa(n.enclosingNode=c,n,e);return}if(z(c.loc.end,n.loc.start)<=0){a=c,r=l+1;continue}if(z(n.loc.end,c.loc.start)<=0){o=c,i=l;continue}throw new Error("Comment location overlaps with node location")}a&&(n.precedingNode=a),o&&(n.followingNode=o)}function hu(s,n,e){if(!Ma.check(s))return;let t=[];s.forEach(function(r){r.loc.lines=e,Oa(n,r,e);let i=r.precedingNode,a=r.enclosingNode,o=r.followingNode;if(i&&o){let l=t.length;l>0&&t[l-1].followingNode!==r.followingNode&&Yt(t,e),t.push(r)}else if(i)Yt(t,e),Ua(i,r);else if(o)Yt(t,e),Ba(o,r);else if(a)Yt(t,e),bu(a,r);else throw new Error("AST contains no nodes at all?")}),Yt(t,e),s.forEach(function(r){delete r.precedingNode,delete r.enclosingNode,delete r.followingNode})}function Yt(s,n){let e=s.length;if(e===0)return;let t=s[0].precedingNode,r=s[0].followingNode,i=r.loc.start,a=e,o;for(;a>0;--a){o=s[a-1];let l=n.sliceString(o.loc.end,i);if(/\S/.test(l))break;i=o.loc.start}for(;a<=e&&(o=s[a])&&(o.type==="Line"||o.type==="CommentLine")&&o.loc.start.column>r.loc.start.column;)++a;if(a){let{enclosingNode:l}=s[a-1];l?.type==="CallExpression"&&--a}s.forEach(function(l,c){c<a?Ua(t,l):Ba(r,l)}),s.length=0}function Ir(s,n){(s.comments||(s.comments=[])).push(n)}function Ba(s,n){n.leading=!0,n.trailing=!1,Ir(s,n)}function bu(s,n){n.leading=!1,n.trailing=!1,Ir(s,n)}function Ua(s,n){n.leading=!1,n.trailing=!0,Ir(s,n)}function gu(s,n){let e=s.getValue();At.Comment.assert(e);let t=e.loc,r=t&&t.lines,i=[n(s)];if(e.trailing)i.push(`
|
|
14123
14425
|
`);else if(r instanceof St){let a=r.slice(t.end,r.skipSpaces(t.end)||r.lastPos());a.length===1?i.push(a):i.push(new Array(a.length).join(`
|
|
14124
14426
|
`))}else i.push(`
|
|
14125
14427
|
`);return v(i)}function yu(s,n){let e=s.getValue(s);At.Comment.assert(e);let t=e.loc,r=t&&t.lines,i=[];if(r instanceof St){let a=r.skipSpaces(t.start,!0)||r.firstPos(),o=r.slice(a,t.start);o.length===1?i.push(o):i.push(new Array(o.length).join(`
|
|
14126
|
-
`))}return i.push(n(s)),v(i)}function ca(s,n){let e=s.getValue(),t=n(s),r=At.Node.check(e)&&Ge(e,"comments");if(!r||r.length===0)return t;let i=[],a=[t];return s.each(function(o){let l=o.getValue(),c=Ge(l,"leading"),p=Ge(l,"trailing");c||p&&!(At.Statement.check(e)||l.type==="Block"||l.type==="CommentBlock")?i.push(gu(o,n)):p&&a.push(yu(o,n))},"comments"),i.push.apply(i,a),v(i)}var vu=pn,xu=Ie.object,Pu=Ie.array;function Tu(s,n){n=Yn(n);let e=C(s,n),t=e.toString({tabWidth:n.tabWidth,reuseWhitespace:!1,useTabs:!1}),r=[],i=n.parser.parse(t,{jsx:!0,loc:!0,locations:!0,range:n.range,comment:!0,onComment:r,tolerant:aa(n,"tolerant",!0),ecmaVersion:6,sourceType:aa(n,"sourceType","module")}),a=Array.isArray(i.tokens)?i.tokens:!1;delete i.tokens,a.forEach(function(p){typeof p.value!="string"&&(p.value=e.sliceString(p.loc.start,p.loc.end))}),Array.isArray(i.comments)&&(r=i.comments,delete i.comments),i.loc?Ar(i,e):i.loc={start:e.firstPos(),end:e.lastPos()},i.loc.lines=e,i.loc.indent=0;let o,l;i.type==="Program"?(l=i,o=vu.file(i,n.sourceFileName||null),o.loc={start:e.firstPos(),end:e.lastPos(),lines:e,indent:0}):i.type==="File"&&(o=i,l=o.program),n.tokens&&(o.tokens=a);let c=Fa({type:l.type,loc:l.loc,body:[],comments:r},e);return l.loc.start=c.start,l.loc.end=c.end,hu(r,l.body.length?o.program:o,e),new _a(e,a).copy(o)}var _a=function(n,e){this.lines=n,this.tokens=e,this.startTokenIndex=0,this.endTokenIndex=e.length,this.indent=0,this.seen=new Map},Ra=_a.prototype;Ra.copy=function(s){if(this.seen.has(s))return this.seen.get(s);if(Pu.check(s)){let c=new Array(s.length);return this.seen.set(s,c),s.forEach(function(p,u){c[u]=this.copy(p)},this),c}if(!xu.check(s))return s;Ar(s,this.lines);let n=Object.create(Object.getPrototypeOf(s),{original:{value:s,configurable:!1,enumerable:!1,writable:!0}});this.seen.set(s,n);let e=s.loc,t=this.indent,r=t,i=this.startTokenIndex,a=this.endTokenIndex;e&&((s.type==="Block"||s.type==="Line"||s.type==="CommentBlock"||s.type==="CommentLine"||this.lines.isPrecededOnlyByWhitespace(e.start))&&(r=this.indent=e.start.column),e.lines=this.lines,e.tokens=this.tokens,e.indent=r,this.findTokenRange(e));let o=Object.keys(s),l=o.length;for(let c=0;c<l;++c){let p=o[c];p==="loc"||p==="tokens"&&s.type==="File"?n[p]=s[p]:n[p]=this.copy(s[p])}return this.indent=t,this.startTokenIndex=i,this.endTokenIndex=a,n};Ra.findTokenRange=function(s){for(;this.startTokenIndex>0;){let n=s.tokens[this.startTokenIndex];if(z(s.start,n.loc.start)<0)--this.startTokenIndex;else break}for(;this.endTokenIndex<s.tokens.length;){let n=s.tokens[this.endTokenIndex];if(z(n.loc.end,s.end)<0)++this.endTokenIndex;else break}for(;this.startTokenIndex<this.endTokenIndex;){let n=s.tokens[this.startTokenIndex];if(z(n.loc.start,s.start)<0)++this.startTokenIndex;else break}for(s.start.token=this.startTokenIndex;this.endTokenIndex>this.startTokenIndex;){let n=s.tokens[this.endTokenIndex-1];if(z(s.end,n.loc.end)<0)--this.endTokenIndex;else break}s.end.token=this.endTokenIndex};var K=Ae,Cu=Ie.array,wu=Ie.number,Cr={};[["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(s,n){s.forEach(function(e){Cr[e]=n})});var Se=function(n){this.stack=[n]},re=Se.prototype;Se.from=function(s){if(s instanceof Se)return s.copy();if(s instanceof eu){let n=Object.create(Se.prototype),e=[s.value];for(let t;t=s.parentPath;s=t)e.push(s.name,t.value);return n.stack=e.reverse(),n}return new Se(s)};re.copy=function(){let n=Object.create(Se.prototype);return n.stack=this.stack.slice(0),n};re.getName=function(){let n=this.stack,e=n.length;return e>1?n[e-2]:null};re.getValue=function(){let n=this.stack;return n[n.length-1]};re.valueIsDuplicate=function(){let s=this.stack,n=s.length-1;return s.lastIndexOf(s[n],n-1)>=0};function ja(s,n){let e=s.stack;for(let t=e.length-1;t>=0;t-=2){let r=e[t];if(K.Node.check(r)&&--n<0)return r}return null}re.getNode=function(n=0){return ja(this,~~n)};re.getParentNode=function(n=0){return ja(this,~~n+1)};re.getRootValue=function(){let n=this.stack;return n.length%2===0?n[1]:n[0]};re.call=function(n){let e=this.stack,t=e.length,r=e[t-1],i=arguments.length;for(let o=1;o<i;++o){let l=arguments[o];r=r[l],e.push(l,r)}let a=n(this);return e.length=t,a};re.each=function(n){let e=this.stack,t=e.length,r=e[t-1],i=arguments.length;for(let a=1;a<i;++a){let o=arguments[a];r=r[o],e.push(o,r)}for(let a=0;a<r.length;++a)a in r&&(e.push(a,r[a]),n(this),e.length-=2);e.length=t};re.map=function(n){let e=this.stack,t=e.length,r=e[t-1],i=arguments.length;for(let o=1;o<i;++o){let l=arguments[o];r=r[l],e.push(l,r)}let a=new Array(r.length);for(let o=0;o<r.length;++o)o in r&&(e.push(o,r[o]),a[o]=n(this,o),e.length-=2);return e.length=t,a};re.hasParens=function(){let s=this.getNode(),n=this.getPrevToken(s);if(!n)return!1;let e=this.getNextToken(s);return e?!!(n.value==="("&&(e.value===")"||!this.canBeFirstInStatement()&&this.firstInStatement()&&!this.needsParens(!0))):!1};re.getPrevToken=function(s){s=s||this.getNode();let n=s&&s.loc,e=n&&n.tokens;if(e&&n.start.token>0){let t=e[n.start.token-1];if(t){let r=this.getRootValue().loc;if(z(r.start,t.loc.start)<=0)return t}}return null};re.getNextToken=function(s){s=s||this.getNode();let n=s&&s.loc,e=n&&n.tokens;if(e&&n.end.token<e.length){let t=e[n.end.token];if(t){let r=this.getRootValue().loc;if(z(t.loc.end,r.end)<=0)return t}}return null};re.needsParens=function(s){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||K.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 r=e.operator,i=Cr[r],a=n.operator,o=Cr[a];if(i>o||i===o&&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"&&wu.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 K.CallExpression.check(e)&&t==="callee"&&e.callee===n||K.MemberExpression.check(e)&&t==="object"&&e.object===n||K.TSAsExpression&&K.TSAsExpression.check(e)&&t==="expression"&&e.expression===n?!0:Va(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"&&K.ExportDefaultDeclaration.check(e)&&K.FunctionExpression.check(n.callee))return!0}return e.type==="NewExpression"&&t==="callee"&&e.callee===n?wr(n):!!(s!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function Va(s){return K.BinaryExpression.check(s)||K.LogicalExpression.check(s)}function wr(s){return K.CallExpression.check(s)?!0:Cu.check(s)?s.some(wr):K.Node.check(s)?tu(s,(n,e)=>wr(e)):!1}re.canBeFirstInStatement=function(){let s=this.getNode();return!(K.FunctionExpression.check(s)||K.ObjectExpression.check(s)||K.ClassExpression.check(s))};re.firstInStatement=function(){let s=this.stack,n,e,t,r;for(let i=s.length-1;i>=0;i-=2)if(K.Node.check(s[i])&&(t=n,r=e,n=s[i-1],e=s[i]),!(!e||!r)){if(K.BlockStatement.check(e)&&n==="body"&&t===0||K.ExpressionStatement.check(e)&&t==="expression"||K.AssignmentExpression.check(e)&&t==="left"||K.ArrowFunctionExpression.check(e)&&t==="body")return!0;if(!(K.SequenceExpression.check(e)&&s[i+1]==="expressions"&&t===0)&&!(K.CallExpression.check(e)&&t==="callee")&&!(K.MemberExpression.check(e)&&t==="object")&&!(K.ConditionalExpression.check(e)&&t==="test")&&!(Va(e)&&t==="left")&&!(K.UnaryExpression.check(e)&&!e.prefix&&t==="argument"))return!1}return!0};var an=Ae.Printable,pa=Ae.Expression,Du=Ae.ReturnStatement,Eu=Ae.SourceLocation,on=Ie.object,Dr=Ie.array,Su=Ie.string,qn=/[0-9a-z_$]/i,za=function(n){let e=this,t=[];e.replace=function(r,i){Su.check(i)&&(i=C(i)),t.push({lines:i,start:r.start,end:r.end})},e.get=function(r){r=r||{start:{line:1,column:0},end:{line:n.length,column:n.getLineLength(n.length)}};let i=r.start,a=[];function o(l,c){a.push(n.slice(l,c))}return t.sort((l,c)=>z(l.start,c.start)).forEach(function(l){z(i,l.start)>0||(o(i,l.start),a.push(l.lines),i=l.end)}),o(i,r.end),v(a)}},$a=za.prototype;$a.tryToReprintComments=function(s,n,e){let t=this;if(!s.comments&&!n.comments)return!0;let r=Se.from(s),i=Se.from(n);r.stack.push("comments",ua(s)),i.stack.push("comments",ua(n));let a=[],o=Ga(r,i,a);return o&&a.length>0&&a.forEach(function(l){let c=l.oldPath.getValue();t.replace(c.loc,e(l.newPath).indentTail(c.loc.indent))}),o};function ua(s){let n=[];return s.comments&&s.comments.length>0&&s.comments.forEach(function(e){(e.leading||e.trailing)&&n.push(e)}),n}$a.deleteComments=function(s){if(!s.comments)return;let n=this;s.comments.forEach(function(e){e.leading?n.replace({start:e.loc.start,end:s.loc.lines.skipSpaces(e.loc.end,!1,!1)},""):e.trailing&&n.replace({start:s.loc.lines.skipSpaces(e.loc.start,!0,!1),end:e.loc.end},"")})};function Au(s){let n=s.getValue();if(!an.check(n))return;let e=n.original,t=e&&e.loc,r=t&&t.lines,i=[];if(!(!r||!ku(s,i)))return function(a){let o=new za(r);i.forEach(function(c){let p=c.newPath.getValue(),u=c.oldPath.getValue();Eu.assert(u.loc,!0);let d=!o.tryToReprintComments(p,u,a);d&&o.deleteComments(u);let m=a(c.newPath,{includeComments:d,avoidRootParens:u.type===p.type&&c.oldPath.hasParens()}).indentTail(u.loc.indent),f=Iu(r,u.loc,m),b=Fu(r,u.loc,m);if(f||b){let h=[];f&&h.push(" "),h.push(m),b&&h.push(" "),m=v(h)}o.replace(u.loc,m)});let l=o.get(t).indentTail(-e.loc.indent);return s.needsParens()?v(["(",l,")"]):l}}function Iu(s,n,e){let t=Qe(n.start),r=s.prevPos(t)&&s.charAt(t),i=e.charAt(e.firstPos());return r&&qn.test(r)&&i&&qn.test(i)}function Fu(s,n,e){let t=s.charAt(n.end),r=e.lastPos(),i=e.prevPos(r)&&e.charAt(r);return i&&qn.test(i)&&t&&qn.test(t)}function ku(s,n){let e=s.getValue();an.assert(e);let t=e.original;if(an.assert(t),e.type!==t.type)return!1;let r=new Se(t),i=Er(s,r,n);return i||(n.length=0),i}function Ha(s,n,e){let t=s.getValue(),r=n.getValue();return t===r?!0:Dr.check(t)?Ga(s,n,e):on.check(t)?Nu(s,n,e):!1}function Ga(s,n,e){let t=s.getValue(),r=n.getValue();if(t===r||s.valueIsDuplicate()||n.valueIsDuplicate())return!0;Dr.assert(t);let i=t.length;if(!(Dr.check(r)&&r.length===i))return!1;for(let a=0;a<i;++a){s.stack.push(a,t[a]),n.stack.push(a,r[a]);let o=Ha(s,n,e);if(s.stack.length-=2,n.stack.length-=2,!o)return!1}return!0}function Nu(s,n,e){let t=s.getValue();if(on.assert(t),t.original===null)return!1;let r=n.getValue();if(!on.check(r))return!1;if(t===r||s.valueIsDuplicate()||n.valueIsDuplicate())return!0;if(an.check(t)){if(!an.check(r))return!1;let i=s.getParentNode(),a=n.getParentNode();if(a!==null&&a.type==="FunctionTypeAnnotation"&&i!==null&&i.type==="FunctionTypeAnnotation"){let o=a.params.length!==1||!!a.params[0].name,l=i.params.length!==1||!!i.params[0].name;if(!o&&l)return!1}if(t.type===r.type){let o=[];if(Er(s,n,o))e.push.apply(e,o);else if(r.loc)e.push({oldPath:n.copy(),newPath:s.copy()});else return!1;return!0}return pa.check(t)&&pa.check(r)&&r.loc?(e.push({oldPath:n.copy(),newPath:s.copy()}),!0):!1}return Er(s,n,e)}function Er(s,n,e){let t=s.getValue(),r=n.getValue();if(on.assert(t),on.assert(r),t.original===null||s.needsParens()&&!n.hasParens())return!1;let i=ru(r,t);(r.type==="File"||t.type==="File")&&delete i.tokens,delete i.loc;let a=e.length;for(let o in i){if(o.charAt(0)==="_")continue;s.stack.push(o,Ge(t,o)),n.stack.push(o,Ge(r,o));let l=Ha(s,n,e);if(s.stack.length-=2,n.stack.length-=2,!l)return!1}return!(Du.check(s.getNode())&&e.length>a)}var Q=Ae,Fr=Ie.string,Mu=Ie.object,Kn=function(n,e){Fr.assert(n),this.code=n,e&&(Mu.assert(e),this.map=e)},Lu=Kn.prototype,da=!1;Lu.toString=function(){return da||(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."),da=!0),this.code};var fa=new Kn(""),Ou=function(n){let e=n&&n.tabWidth;n=Yn(n),n.sourceFileName=null;function t(i,a){return i=Object.assign({},i,a),o=>r(o,i)}function r(i,a){if(a=a||{},a.includeComments)return ca(i,t(a,{includeComments:!1}));let o=n.tabWidth;if(!e){let p=i.getNode().loc;p&&p.lines&&p.lines.guessTabWidth&&(n.tabWidth=p.lines.guessTabWidth())}let l=Au(i),c=l?l(r):ma(i,n,a,t(a,{includeComments:!0,avoidRootParens:!1}));return n.tabWidth=o,c}this.print=function(i){if(!i)return fa;let a=r(Se.from(i),{includeComments:!0,avoidRootParens:!1});return new Kn(a.toString(n),iu(n.inputSourceMap,a.getSourceMap(n.sourceMapName,n.sourceRoot)))},this.printGenerically=function(i){if(!i)return fa;function a(p){return ca(p,u=>ma(u,n,{includeComments:!0,avoidRootParens:!1},a))}let o=Se.from(i),l=n.reuseWhitespace;n.reuseWhitespace=!1;let c=new Kn(a(o).toString(n));return n.reuseWhitespace=l,c}};function ma(s,n,e,t){let r=s.getValue(),i=[],a=Bu(s,n,t);if(!r||a.isEmpty())return a;let o=!1,l=Uu(s,t);return l.isEmpty()?e.avoidRootParens||(o=s.needsParens()):i.push(l),o&&i.unshift("("),i.push(a),o&&i.push(")"),v(i)}function Bu(s,n,e){let t=s.getValue();if(!t)return C("");if(typeof t=="string")return C(t,n);Q.Printable.assert(t);let r=[];switch(t.type){case"File":return s.call(e,"program");case"Program":return t.directives&&s.each(function(i){r.push(e(i),`;
|
|
14127
|
-
`)},"directives"),t.interpreter&&r.push(s.call(e,"interpreter")),r.push(s.call(i=>Dt(i,n,e),"body")),v(r);case"Noop":case"EmptyStatement":return
|
|
14428
|
+
`))}return i.push(n(s)),v(i)}function ca(s,n){let e=s.getValue(),t=n(s),r=At.Node.check(e)&&Ge(e,"comments");if(!r||r.length===0)return t;let i=[],a=[t];return s.each(function(o){let l=o.getValue(),c=Ge(l,"leading"),p=Ge(l,"trailing");c||p&&!(At.Statement.check(e)||l.type==="Block"||l.type==="CommentBlock")?i.push(gu(o,n)):p&&a.push(yu(o,n))},"comments"),i.push.apply(i,a),v(i)}var vu=pn,xu=Ie.object,Pu=Ie.array;function Cu(s,n){n=Yn(n);let e=w(s,n),t=e.toString({tabWidth:n.tabWidth,reuseWhitespace:!1,useTabs:!1}),r=[],i=n.parser.parse(t,{jsx:!0,loc:!0,locations:!0,range:n.range,comment:!0,onComment:r,tolerant:aa(n,"tolerant",!0),ecmaVersion:6,sourceType:aa(n,"sourceType","module")}),a=Array.isArray(i.tokens)?i.tokens:!1;delete i.tokens,a.forEach(function(p){typeof p.value!="string"&&(p.value=e.sliceString(p.loc.start,p.loc.end))}),Array.isArray(i.comments)&&(r=i.comments,delete i.comments),i.loc?Ar(i,e):i.loc={start:e.firstPos(),end:e.lastPos()},i.loc.lines=e,i.loc.indent=0;let o,l;i.type==="Program"?(l=i,o=vu.file(i,n.sourceFileName||null),o.loc={start:e.firstPos(),end:e.lastPos(),lines:e,indent:0}):i.type==="File"&&(o=i,l=o.program),n.tokens&&(o.tokens=a);let c=Fa({type:l.type,loc:l.loc,body:[],comments:r},e);return l.loc.start=c.start,l.loc.end=c.end,hu(r,l.body.length?o.program:o,e),new _a(e,a).copy(o)}var _a=function(n,e){this.lines=n,this.tokens=e,this.startTokenIndex=0,this.endTokenIndex=e.length,this.indent=0,this.seen=new Map},Ra=_a.prototype;Ra.copy=function(s){if(this.seen.has(s))return this.seen.get(s);if(Pu.check(s)){let c=new Array(s.length);return this.seen.set(s,c),s.forEach(function(p,u){c[u]=this.copy(p)},this),c}if(!xu.check(s))return s;Ar(s,this.lines);let n=Object.create(Object.getPrototypeOf(s),{original:{value:s,configurable:!1,enumerable:!1,writable:!0}});this.seen.set(s,n);let e=s.loc,t=this.indent,r=t,i=this.startTokenIndex,a=this.endTokenIndex;e&&((s.type==="Block"||s.type==="Line"||s.type==="CommentBlock"||s.type==="CommentLine"||this.lines.isPrecededOnlyByWhitespace(e.start))&&(r=this.indent=e.start.column),e.lines=this.lines,e.tokens=this.tokens,e.indent=r,this.findTokenRange(e));let o=Object.keys(s),l=o.length;for(let c=0;c<l;++c){let p=o[c];p==="loc"||p==="tokens"&&s.type==="File"?n[p]=s[p]:n[p]=this.copy(s[p])}return this.indent=t,this.startTokenIndex=i,this.endTokenIndex=a,n};Ra.findTokenRange=function(s){for(;this.startTokenIndex>0;){let n=s.tokens[this.startTokenIndex];if(z(s.start,n.loc.start)<0)--this.startTokenIndex;else break}for(;this.endTokenIndex<s.tokens.length;){let n=s.tokens[this.endTokenIndex];if(z(n.loc.end,s.end)<0)++this.endTokenIndex;else break}for(;this.startTokenIndex<this.endTokenIndex;){let n=s.tokens[this.startTokenIndex];if(z(n.loc.start,s.start)<0)++this.startTokenIndex;else break}for(s.start.token=this.startTokenIndex;this.endTokenIndex>this.startTokenIndex;){let n=s.tokens[this.endTokenIndex-1];if(z(s.end,n.loc.end)<0)--this.endTokenIndex;else break}s.end.token=this.endTokenIndex};var K=Ae,wu=Ie.array,Tu=Ie.number,wr={};[["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(s,n){s.forEach(function(e){wr[e]=n})});var Se=function(n){this.stack=[n]},re=Se.prototype;Se.from=function(s){if(s instanceof Se)return s.copy();if(s instanceof eu){let n=Object.create(Se.prototype),e=[s.value];for(let t;t=s.parentPath;s=t)e.push(s.name,t.value);return n.stack=e.reverse(),n}return new Se(s)};re.copy=function(){let n=Object.create(Se.prototype);return n.stack=this.stack.slice(0),n};re.getName=function(){let n=this.stack,e=n.length;return e>1?n[e-2]:null};re.getValue=function(){let n=this.stack;return n[n.length-1]};re.valueIsDuplicate=function(){let s=this.stack,n=s.length-1;return s.lastIndexOf(s[n],n-1)>=0};function ja(s,n){let e=s.stack;for(let t=e.length-1;t>=0;t-=2){let r=e[t];if(K.Node.check(r)&&--n<0)return r}return null}re.getNode=function(n=0){return ja(this,~~n)};re.getParentNode=function(n=0){return ja(this,~~n+1)};re.getRootValue=function(){let n=this.stack;return n.length%2===0?n[1]:n[0]};re.call=function(n){let e=this.stack,t=e.length,r=e[t-1],i=arguments.length;for(let o=1;o<i;++o){let l=arguments[o];r=r[l],e.push(l,r)}let a=n(this);return e.length=t,a};re.each=function(n){let e=this.stack,t=e.length,r=e[t-1],i=arguments.length;for(let a=1;a<i;++a){let o=arguments[a];r=r[o],e.push(o,r)}for(let a=0;a<r.length;++a)a in r&&(e.push(a,r[a]),n(this),e.length-=2);e.length=t};re.map=function(n){let e=this.stack,t=e.length,r=e[t-1],i=arguments.length;for(let o=1;o<i;++o){let l=arguments[o];r=r[l],e.push(l,r)}let a=new Array(r.length);for(let o=0;o<r.length;++o)o in r&&(e.push(o,r[o]),a[o]=n(this,o),e.length-=2);return e.length=t,a};re.hasParens=function(){let s=this.getNode(),n=this.getPrevToken(s);if(!n)return!1;let e=this.getNextToken(s);return e?!!(n.value==="("&&(e.value===")"||!this.canBeFirstInStatement()&&this.firstInStatement()&&!this.needsParens(!0))):!1};re.getPrevToken=function(s){s=s||this.getNode();let n=s&&s.loc,e=n&&n.tokens;if(e&&n.start.token>0){let t=e[n.start.token-1];if(t){let r=this.getRootValue().loc;if(z(r.start,t.loc.start)<=0)return t}}return null};re.getNextToken=function(s){s=s||this.getNode();let n=s&&s.loc,e=n&&n.tokens;if(e&&n.end.token<e.length){let t=e[n.end.token];if(t){let r=this.getRootValue().loc;if(z(t.loc.end,r.end)<=0)return t}}return null};re.needsParens=function(s){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||K.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 r=e.operator,i=wr[r],a=n.operator,o=wr[a];if(i>o||i===o&&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"&&Tu.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 K.CallExpression.check(e)&&t==="callee"&&e.callee===n||K.MemberExpression.check(e)&&t==="object"&&e.object===n||K.TSAsExpression&&K.TSAsExpression.check(e)&&t==="expression"&&e.expression===n?!0:Va(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"&&K.ExportDefaultDeclaration.check(e)&&K.FunctionExpression.check(n.callee))return!0}return e.type==="NewExpression"&&t==="callee"&&e.callee===n?Tr(n):!!(s!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function Va(s){return K.BinaryExpression.check(s)||K.LogicalExpression.check(s)}function Tr(s){return K.CallExpression.check(s)?!0:wu.check(s)?s.some(Tr):K.Node.check(s)?tu(s,(n,e)=>Tr(e)):!1}re.canBeFirstInStatement=function(){let s=this.getNode();return!(K.FunctionExpression.check(s)||K.ObjectExpression.check(s)||K.ClassExpression.check(s))};re.firstInStatement=function(){let s=this.stack,n,e,t,r;for(let i=s.length-1;i>=0;i-=2)if(K.Node.check(s[i])&&(t=n,r=e,n=s[i-1],e=s[i]),!(!e||!r)){if(K.BlockStatement.check(e)&&n==="body"&&t===0||K.ExpressionStatement.check(e)&&t==="expression"||K.AssignmentExpression.check(e)&&t==="left"||K.ArrowFunctionExpression.check(e)&&t==="body")return!0;if(!(K.SequenceExpression.check(e)&&s[i+1]==="expressions"&&t===0)&&!(K.CallExpression.check(e)&&t==="callee")&&!(K.MemberExpression.check(e)&&t==="object")&&!(K.ConditionalExpression.check(e)&&t==="test")&&!(Va(e)&&t==="left")&&!(K.UnaryExpression.check(e)&&!e.prefix&&t==="argument"))return!1}return!0};var an=Ae.Printable,pa=Ae.Expression,Du=Ae.ReturnStatement,Eu=Ae.SourceLocation,on=Ie.object,Dr=Ie.array,Su=Ie.string,qn=/[0-9a-z_$]/i,za=function(n){let e=this,t=[];e.replace=function(r,i){Su.check(i)&&(i=w(i)),t.push({lines:i,start:r.start,end:r.end})},e.get=function(r){r=r||{start:{line:1,column:0},end:{line:n.length,column:n.getLineLength(n.length)}};let i=r.start,a=[];function o(l,c){a.push(n.slice(l,c))}return t.sort((l,c)=>z(l.start,c.start)).forEach(function(l){z(i,l.start)>0||(o(i,l.start),a.push(l.lines),i=l.end)}),o(i,r.end),v(a)}},$a=za.prototype;$a.tryToReprintComments=function(s,n,e){let t=this;if(!s.comments&&!n.comments)return!0;let r=Se.from(s),i=Se.from(n);r.stack.push("comments",ua(s)),i.stack.push("comments",ua(n));let a=[],o=Ga(r,i,a);return o&&a.length>0&&a.forEach(function(l){let c=l.oldPath.getValue();t.replace(c.loc,e(l.newPath).indentTail(c.loc.indent))}),o};function ua(s){let n=[];return s.comments&&s.comments.length>0&&s.comments.forEach(function(e){(e.leading||e.trailing)&&n.push(e)}),n}$a.deleteComments=function(s){if(!s.comments)return;let n=this;s.comments.forEach(function(e){e.leading?n.replace({start:e.loc.start,end:s.loc.lines.skipSpaces(e.loc.end,!1,!1)},""):e.trailing&&n.replace({start:s.loc.lines.skipSpaces(e.loc.start,!0,!1),end:e.loc.end},"")})};function Au(s){let n=s.getValue();if(!an.check(n))return;let e=n.original,t=e&&e.loc,r=t&&t.lines,i=[];if(!(!r||!ku(s,i)))return function(a){let o=new za(r);i.forEach(function(c){let p=c.newPath.getValue(),u=c.oldPath.getValue();Eu.assert(u.loc,!0);let d=!o.tryToReprintComments(p,u,a);d&&o.deleteComments(u);let m=a(c.newPath,{includeComments:d,avoidRootParens:u.type===p.type&&c.oldPath.hasParens()}).indentTail(u.loc.indent),f=Iu(r,u.loc,m),b=Fu(r,u.loc,m);if(f||b){let h=[];f&&h.push(" "),h.push(m),b&&h.push(" "),m=v(h)}o.replace(u.loc,m)});let l=o.get(t).indentTail(-e.loc.indent);return s.needsParens()?v(["(",l,")"]):l}}function Iu(s,n,e){let t=Qe(n.start),r=s.prevPos(t)&&s.charAt(t),i=e.charAt(e.firstPos());return r&&qn.test(r)&&i&&qn.test(i)}function Fu(s,n,e){let t=s.charAt(n.end),r=e.lastPos(),i=e.prevPos(r)&&e.charAt(r);return i&&qn.test(i)&&t&&qn.test(t)}function ku(s,n){let e=s.getValue();an.assert(e);let t=e.original;if(an.assert(t),e.type!==t.type)return!1;let r=new Se(t),i=Er(s,r,n);return i||(n.length=0),i}function Ha(s,n,e){let t=s.getValue(),r=n.getValue();return t===r?!0:Dr.check(t)?Ga(s,n,e):on.check(t)?Nu(s,n,e):!1}function Ga(s,n,e){let t=s.getValue(),r=n.getValue();if(t===r||s.valueIsDuplicate()||n.valueIsDuplicate())return!0;Dr.assert(t);let i=t.length;if(!(Dr.check(r)&&r.length===i))return!1;for(let a=0;a<i;++a){s.stack.push(a,t[a]),n.stack.push(a,r[a]);let o=Ha(s,n,e);if(s.stack.length-=2,n.stack.length-=2,!o)return!1}return!0}function Nu(s,n,e){let t=s.getValue();if(on.assert(t),t.original===null)return!1;let r=n.getValue();if(!on.check(r))return!1;if(t===r||s.valueIsDuplicate()||n.valueIsDuplicate())return!0;if(an.check(t)){if(!an.check(r))return!1;let i=s.getParentNode(),a=n.getParentNode();if(a!==null&&a.type==="FunctionTypeAnnotation"&&i!==null&&i.type==="FunctionTypeAnnotation"){let o=a.params.length!==1||!!a.params[0].name,l=i.params.length!==1||!!i.params[0].name;if(!o&&l)return!1}if(t.type===r.type){let o=[];if(Er(s,n,o))e.push.apply(e,o);else if(r.loc)e.push({oldPath:n.copy(),newPath:s.copy()});else return!1;return!0}return pa.check(t)&&pa.check(r)&&r.loc?(e.push({oldPath:n.copy(),newPath:s.copy()}),!0):!1}return Er(s,n,e)}function Er(s,n,e){let t=s.getValue(),r=n.getValue();if(on.assert(t),on.assert(r),t.original===null||s.needsParens()&&!n.hasParens())return!1;let i=ru(r,t);(r.type==="File"||t.type==="File")&&delete i.tokens,delete i.loc;let a=e.length;for(let o in i){if(o.charAt(0)==="_")continue;s.stack.push(o,Ge(t,o)),n.stack.push(o,Ge(r,o));let l=Ha(s,n,e);if(s.stack.length-=2,n.stack.length-=2,!l)return!1}return!(Du.check(s.getNode())&&e.length>a)}var Q=Ae,Fr=Ie.string,Mu=Ie.object,Kn=function(n,e){Fr.assert(n),this.code=n,e&&(Mu.assert(e),this.map=e)},Lu=Kn.prototype,da=!1;Lu.toString=function(){return da||(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."),da=!0),this.code};var fa=new Kn(""),Ou=function(n){let e=n&&n.tabWidth;n=Yn(n),n.sourceFileName=null;function t(i,a){return i=Object.assign({},i,a),o=>r(o,i)}function r(i,a){if(a=a||{},a.includeComments)return ca(i,t(a,{includeComments:!1}));let o=n.tabWidth;if(!e){let p=i.getNode().loc;p&&p.lines&&p.lines.guessTabWidth&&(n.tabWidth=p.lines.guessTabWidth())}let l=Au(i),c=l?l(r):ma(i,n,a,t(a,{includeComments:!0,avoidRootParens:!1}));return n.tabWidth=o,c}this.print=function(i){if(!i)return fa;let a=r(Se.from(i),{includeComments:!0,avoidRootParens:!1});return new Kn(a.toString(n),iu(n.inputSourceMap,a.getSourceMap(n.sourceMapName,n.sourceRoot)))},this.printGenerically=function(i){if(!i)return fa;function a(p){return ca(p,u=>ma(u,n,{includeComments:!0,avoidRootParens:!1},a))}let o=Se.from(i),l=n.reuseWhitespace;n.reuseWhitespace=!1;let c=new Kn(a(o).toString(n));return n.reuseWhitespace=l,c}};function ma(s,n,e,t){let r=s.getValue(),i=[],a=Bu(s,n,t);if(!r||a.isEmpty())return a;let o=!1,l=Uu(s,t);return l.isEmpty()?e.avoidRootParens||(o=s.needsParens()):i.push(l),o&&i.unshift("("),i.push(a),o&&i.push(")"),v(i)}function Bu(s,n,e){let t=s.getValue();if(!t)return w("");if(typeof t=="string")return w(t,n);Q.Printable.assert(t);let r=[];switch(t.type){case"File":return s.call(e,"program");case"Program":return t.directives&&s.each(function(i){r.push(e(i),`;
|
|
14429
|
+
`)},"directives"),t.interpreter&&r.push(s.call(e,"interpreter")),r.push(s.call(i=>Dt(i,n,e),"body")),v(r);case"Noop":case"EmptyStatement":return w("");case"ExpressionStatement":return v([s.call(e,"expression"),";"]);case"ParenthesizedExpression":return v(["(",s.call(e,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return w(" ").join([s.call(e,"left"),t.operator,s.call(e,"right")]);case"AssignmentPattern":return v([s.call(e,"left")," = ",s.call(e,"right")]);case"MemberExpression":case"OptionalMemberExpression":{r.push(s.call(e,"object"));let i=s.call(e,"property"),a=Ge(t,"optional");return t.computed?r.push(a?"?.[":"[",i,"]"):r.push(a?"?.":".",i),v(r)}case"ChainExpression":return s.call(e,"expression");case"MetaProperty":return v([s.call(e,"meta"),".",s.call(e,"property")]);case"BindExpression":return t.object&&r.push(s.call(e,"object")),r.push("::",s.call(e,"callee")),v(r);case"Path":return w(".").join(t.body);case"Identifier":return v([w(t.name,n),t.optional?"?":"",s.call(e,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"ObjectTypeSpreadProperty":case"RestElement":return v(["...",s.call(e,"argument"),s.call(e,"typeAnnotation")]);case"FunctionDeclaration":case"FunctionExpression":case"TSDeclareFunction":return t.declare&&r.push("declare "),t.async&&r.push("async "),r.push("function"),t.generator&&r.push("*"),t.id?r.push(" ",s.call(e,"id"),s.call(e,"typeParameters")):t.typeParameters&&r.push(s.call(e,"typeParameters")),r.push("(",Be(s,n,e),")",s.call(e,"returnType")),t.body&&r.push(" ",s.call(e,"body")),v(r);case"ArrowFunctionExpression":return t.async&&r.push("async "),t.typeParameters&&r.push(s.call(e,"typeParameters")),!n.arrowParensAlways&&t.params.length===1&&!t.rest&&t.params[0].type==="Identifier"&&!t.params[0].typeAnnotation&&!t.returnType?r.push(s.call(e,"params",0)):r.push("(",Be(s,n,e),")",s.call(e,"returnType")),r.push(" => ",s.call(e,"body")),v(r);case"MethodDefinition":return mr(s,n,e);case"YieldExpression":return r.push("yield"),t.delegate&&r.push("*"),t.argument&&r.push(" ",s.call(e,"argument")),v(r);case"AwaitExpression":return r.push("await"),t.all&&r.push("*"),t.argument&&r.push(" ",s.call(e,"argument")),v(r);case"ModuleExpression":return v([`module {
|
|
14128
14430
|
`,s.call(e,"body").indent(n.tabWidth),`
|
|
14129
|
-
}`]);case"ModuleDeclaration":return r.push("module",s.call(e,"id")),t.source?r.push("from",s.call(e,"source")):r.push(s.call(e,"body")),
|
|
14431
|
+
}`]);case"ModuleDeclaration":return r.push("module",s.call(e,"id")),t.source?r.push("from",s.call(e,"source")):r.push(s.call(e,"body")),w(" ").join(r);case"ImportSpecifier":return t.importKind&&t.importKind!=="value"&&r.push(t.importKind+" "),t.imported?(r.push(s.call(e,"imported")),t.local&&t.local.name!==t.imported.name&&r.push(" as ",s.call(e,"local"))):t.id&&(r.push(s.call(e,"id")),t.name&&r.push(" as ",s.call(e,"name"))),v(r);case"ExportSpecifier":return t.exportKind&&t.exportKind!=="value"&&r.push(t.exportKind+" "),t.local?(r.push(s.call(e,"local")),t.exported&&t.exported.name!==t.local.name&&r.push(" as ",s.call(e,"exported"))):t.id&&(r.push(s.call(e,"id")),t.name&&r.push(" as ",s.call(e,"name"))),v(r);case"ExportBatchSpecifier":return w("*");case"ImportNamespaceSpecifier":return r.push("* as "),t.local?r.push(s.call(e,"local")):t.id&&r.push(s.call(e,"id")),v(r);case"ImportDefaultSpecifier":return t.local?s.call(e,"local"):s.call(e,"id");case"TSExportAssignment":return v(["export = ",s.call(e,"expression")]);case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return ba(s,n,e);case"ExportAllDeclaration":return r.push("export *"),t.exported&&r.push(" as ",s.call(e,"exported")),r.push(" from ",s.call(e,"source"),";"),v(r);case"TSNamespaceExportDeclaration":return r.push("export as namespace ",s.call(e,"id")),Vn(v(r));case"ExportNamespaceSpecifier":return v(["* as ",s.call(e,"exported")]);case"ExportDefaultSpecifier":return s.call(e,"exported");case"Import":return w("import",n);case"ImportExpression":return v(["import(",s.call(e,"source"),")"]);case"ImportDeclaration":{if(r.push("import "),t.importKind&&t.importKind!=="value"&&r.push(t.importKind+" "),t.specifiers&&t.specifiers.length>0){let i=[],a=[];if(s.each(function(o){let l=o.getValue();l.type==="ImportSpecifier"?a.push(e(o)):(l.type==="ImportDefaultSpecifier"||l.type==="ImportNamespaceSpecifier")&&i.push(e(o))},"specifiers"),i.forEach((o,l)=>{l>0&&r.push(", "),r.push(o)}),a.length>0){let o=w(", ").join(a);o.getLineLength(1)>n.wrapColumn&&(o=v([w(`,
|
|
14130
14432
|
`).join(a).indent(n.tabWidth),","])),i.length>0&&r.push(", "),o.length>1?r.push(`{
|
|
14131
14433
|
`,o,`
|
|
14132
14434
|
}`):n.objectCurlySpacing?r.push("{ ",o," }"):r.push("{",o,"}")}r.push(" from ")}return r.push(s.call(e,"source"),qa(s,n,e),";"),v(r)}case"ImportAttribute":return v([s.call(e,"key"),": ",s.call(e,"value")]);case"StaticBlock":r.push("static ");case"BlockStatement":{let i=s.call(a=>Dt(a,n,e),"body");return i.isEmpty()&&(!t.directives||t.directives.length===0)?(r.push("{}"),v(r)):(r.push(`{
|
|
@@ -14135,74 +14437,74 @@ export { toast, useToast };
|
|
|
14135
14437
|
}`),v(r))}case"ReturnStatement":{if(r.push("return"),t.argument){let i=s.call(e,"argument");i.startsWithComment()||i.length>1&&Q.JSXElement&&Q.JSXElement.check(t.argument)?r.push(` (
|
|
14136
14438
|
`,i.indent(n.tabWidth),`
|
|
14137
14439
|
)`):r.push(" ",i)}return r.push(";"),v(r)}case"CallExpression":case"OptionalCallExpression":return r.push(s.call(e,"callee")),t.typeParameters&&r.push(s.call(e,"typeParameters")),t.typeArguments&&r.push(s.call(e,"typeArguments")),Ge(t,"optional")&&r.push("?."),r.push(ha(s,n,e)),v(r);case"RecordExpression":r.push("#");case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":{let i=t.type==="ObjectTypeAnnotation",a=n.flowObjectCommas?",":i?";":",",o=[],l=!1;i&&(o.push("indexers","callProperties"),t.internalSlots!=null&&o.push("internalSlots")),o.push("properties");let c=0;o.forEach(function(b){c+=t[b].length});let p=i&&c===1||c===0,u=t.exact?"{|":"{",d=t.exact?"|}":"}";r.push(p?u:u+`
|
|
14138
|
-
`);let m=r.length-1,f=0;if(o.forEach(function(b){s.each(function(h){let y=e(h);p||(y=y.indent(n.tabWidth));let
|
|
14139
|
-
`),r.push(y),f<c-1?(r.push(a+(
|
|
14440
|
+
`);let m=r.length-1,f=0;if(o.forEach(function(b){s.each(function(h){let y=e(h);p||(y=y.indent(n.tabWidth));let C=!i&&y.length>1;C&&l&&r.push(`
|
|
14441
|
+
`),r.push(y),f<c-1?(r.push(a+(C?`
|
|
14140
14442
|
|
|
14141
14443
|
`:`
|
|
14142
|
-
`)),l=!
|
|
14444
|
+
`)),l=!C):(c!==1&&i||!p&&sn(n,"objects")&&h.getValue().type!=="RestElement")&&r.push(a),f++},b)}),t.inexact){let b=w("...",n);p?(c>0&&r.push(a," "),r.push(b)):r.push(`
|
|
14143
14445
|
`,b.indent(n.tabWidth))}return r.push(p?d:`
|
|
14144
|
-
`+d),f!==0&&p&&n.objectCurlySpacing&&(r[m]=u+" ",r[r.length-1]=" "+d),t.typeAnnotation&&r.push(s.call(e,"typeAnnotation")),v(r)}case"PropertyPattern":return v([s.call(e,"key"),": ",s.call(e,"pattern")]);case"ObjectProperty":case"Property":{if(t.method||t.kind==="get"||t.kind==="set")return mr(s,n,e);if(t.shorthand&&t.value.type==="AssignmentPattern")return s.call(e,"value");let i=s.call(e,"key");return t.computed?r.push("[",i,"]"):r.push(i),(!t.shorthand||t.key.name!==t.value.name)&&r.push(": ",s.call(e,"value")),v(r)}case"ClassMethod":case"ObjectMethod":case"ClassPrivateMethod":case"TSDeclareMethod":return mr(s,n,e);case"PrivateName":return v(["#",s.call(e,"id")]);case"Decorator":return v(["@",s.call(e,"expression")]);case"TupleExpression":r.push("#");case"ArrayExpression":case"ArrayPattern":{let a=t.elements.length,o=s.map(e,"elements"),c=
|
|
14446
|
+
`+d),f!==0&&p&&n.objectCurlySpacing&&(r[m]=u+" ",r[r.length-1]=" "+d),t.typeAnnotation&&r.push(s.call(e,"typeAnnotation")),v(r)}case"PropertyPattern":return v([s.call(e,"key"),": ",s.call(e,"pattern")]);case"ObjectProperty":case"Property":{if(t.method||t.kind==="get"||t.kind==="set")return mr(s,n,e);if(t.shorthand&&t.value.type==="AssignmentPattern")return s.call(e,"value");let i=s.call(e,"key");return t.computed?r.push("[",i,"]"):r.push(i),(!t.shorthand||t.key.name!==t.value.name)&&r.push(": ",s.call(e,"value")),v(r)}case"ClassMethod":case"ObjectMethod":case"ClassPrivateMethod":case"TSDeclareMethod":return mr(s,n,e);case"PrivateName":return v(["#",s.call(e,"id")]);case"Decorator":return v(["@",s.call(e,"expression")]);case"TupleExpression":r.push("#");case"ArrayExpression":case"ArrayPattern":{let a=t.elements.length,o=s.map(e,"elements"),c=w(", ").join(o).getLineLength(1)<=n.wrapColumn;return c?n.arrayBracketSpacing?r.push("[ "):r.push("["):r.push(`[
|
|
14145
14447
|
`),s.each(function(p){let u=p.getName();if(!p.getValue())r.push(",");else{let m=o[u];c?u>0&&r.push(" "):m=m.indent(n.tabWidth),r.push(m),(u<a-1||!c&&sn(n,"arrays"))&&r.push(","),c||r.push(`
|
|
14146
|
-
`)}},"elements"),c&&n.arrayBracketSpacing?r.push(" ]"):r.push("]"),t.typeAnnotation&&r.push(s.call(e,"typeAnnotation")),v(r)}case"SequenceExpression":return
|
|
14147
|
-
`,n);case"ModuleSpecifier":if(t.local)throw new Error("The ESTree ModuleSpecifier type should be abstract");return
|
|
14148
|
-
`).join(a).indentTail(t.kind.length+1)):r.push(a[0]);let o=s.getParentNode();return!Q.ForStatement.check(o)&&!Q.ForInStatement.check(o)&&!(Q.ForOfStatement&&Q.ForOfStatement.check(o))&&!(Q.ForAwaitStatement&&Q.ForAwaitStatement.check(o))&&r.push(";"),v(r)}case"VariableDeclarator":return t.init?
|
|
14448
|
+
`)}},"elements"),c&&n.arrayBracketSpacing?r.push(" ]"):r.push("]"),t.typeAnnotation&&r.push(s.call(e,"typeAnnotation")),v(r)}case"SequenceExpression":return w(", ").join(s.map(e,"expressions"));case"ThisExpression":return w("this");case"Super":return w("super");case"NullLiteral":return w("null");case"RegExpLiteral":return w(Et(t)||`/${t.pattern}/${t.flags||""}`,n);case"BigIntLiteral":return w(Et(t)||t.value+"n",n);case"NumericLiteral":return w(Et(t)||t.value,n);case"DecimalLiteral":return w(Et(t)||t.value+"m",n);case"StringLiteral":return w(en(t.value,n));case"BooleanLiteral":case"Literal":return w(Et(t)||(typeof t.value=="string"?en(t.value,n):t.value),n);case"Directive":return s.call(e,"value");case"DirectiveLiteral":return w(Et(t)||en(t.value,n),n);case"InterpreterDirective":return w(`#!${t.value}
|
|
14449
|
+
`,n);case"ModuleSpecifier":if(t.local)throw new Error("The ESTree ModuleSpecifier type should be abstract");return w(en(t.value,n),n);case"UnaryExpression":return r.push(t.operator),/[a-z]$/.test(t.operator)&&r.push(" "),r.push(s.call(e,"argument")),v(r);case"UpdateExpression":return r.push(s.call(e,"argument"),t.operator),t.prefix&&r.reverse(),v(r);case"ConditionalExpression":return v([s.call(e,"test")," ? ",s.call(e,"consequent")," : ",s.call(e,"alternate")]);case"NewExpression":return r.push("new ",s.call(e,"callee")),t.typeParameters&&r.push(s.call(e,"typeParameters")),t.typeArguments&&r.push(s.call(e,"typeArguments")),t.arguments&&r.push(ha(s,n,e)),v(r);case"VariableDeclaration":{t.declare&&r.push("declare "),r.push(t.kind," ");let i=0,a=s.map(function(l){let c=e(l);return i=Math.max(c.length,i),c},"declarations");i===1?r.push(w(", ").join(a)):a.length>1?r.push(w(`,
|
|
14450
|
+
`).join(a).indentTail(t.kind.length+1)):r.push(a[0]);let o=s.getParentNode();return!Q.ForStatement.check(o)&&!Q.ForInStatement.check(o)&&!(Q.ForOfStatement&&Q.ForOfStatement.check(o))&&!(Q.ForAwaitStatement&&Q.ForAwaitStatement.check(o))&&r.push(";"),v(r)}case"VariableDeclarator":return t.init?w(" = ").join([s.call(e,"id"),s.call(e,"init")]):s.call(e,"id");case"WithStatement":return v(["with (",s.call(e,"object"),") ",s.call(e,"body")]);case"IfStatement":{let i=at(s.call(e,"consequent"),n);return r.push("if (",s.call(e,"test"),")",i),t.alternate&&r.push(ga(i)?" else":`
|
|
14149
14451
|
else`,at(s.call(e,"alternate"),n)),v(r)}case"ForStatement":{let i=s.call(e,"init"),a=i.length>1?`;
|
|
14150
|
-
`:"; ",o="for (",l=
|
|
14452
|
+
`:"; ",o="for (",l=w(a).join([i,s.call(e,"test"),s.call(e,"update")]).indentTail(o.length),c=v([o,l,")"]),p=at(s.call(e,"body"),n);return r.push(c),c.length>1&&(r.push(`
|
|
14151
14453
|
`),p=p.trimLeft()),r.push(p),v(r)}case"WhileStatement":return v(["while (",s.call(e,"test"),")",at(s.call(e,"body"),n)]);case"ForInStatement":return v([t.each?"for each (":"for (",s.call(e,"left")," in ",s.call(e,"right"),")",at(s.call(e,"body"),n)]);case"ForOfStatement":case"ForAwaitStatement":return r.push("for "),(t.await||t.type==="ForAwaitStatement")&&r.push("await "),r.push("(",s.call(e,"left")," of ",s.call(e,"right"),")",at(s.call(e,"body"),n)),v(r);case"DoWhileStatement":{let i=v(["do",at(s.call(e,"body"),n)]);return r.push(i),ga(i)?r.push(" while"):r.push(`
|
|
14152
14454
|
while`),r.push(" (",s.call(e,"test"),");"),v(r)}case"DoExpression":{let i=s.call(a=>Dt(a,n,e),"body");return v([`do {
|
|
14153
14455
|
`,i.indent(n.tabWidth),`
|
|
14154
14456
|
}`])}case"BreakStatement":return r.push("break"),t.label&&r.push(" ",s.call(e,"label")),r.push(";"),v(r);case"ContinueStatement":return r.push("continue"),t.label&&r.push(" ",s.call(e,"label")),r.push(";"),v(r);case"LabeledStatement":return v([s.call(e,"label"),`:
|
|
14155
14457
|
`,s.call(e,"body")]);case"TryStatement":return r.push("try ",s.call(e,"block")),t.handler?r.push(" ",s.call(e,"handler")):t.handlers&&s.each(function(i){r.push(" ",e(i))},"handlers"),t.finalizer&&r.push(" finally ",s.call(e,"finalizer")),v(r);case"CatchClause":return r.push("catch "),t.param&&r.push("(",s.call(e,"param")),t.guard&&r.push(" if ",s.call(e,"guard")),t.param&&r.push(") "),r.push(s.call(e,"body")),v(r);case"ThrowStatement":return v(["throw ",s.call(e,"argument"),";"]);case"SwitchStatement":return v(["switch (",s.call(e,"discriminant"),`) {
|
|
14156
|
-
`,
|
|
14458
|
+
`,w(`
|
|
14157
14459
|
`).join(s.map(e,"cases")),`
|
|
14158
14460
|
}`]);case"SwitchCase":return t.test?r.push("case ",s.call(e,"test"),":"):r.push("default:"),t.consequent.length>0&&r.push(`
|
|
14159
|
-
`,s.call(i=>Dt(i,n,e),"consequent").indent(n.tabWidth)),v(r);case"DebuggerStatement":return
|
|
14461
|
+
`,s.call(i=>Dt(i,n,e),"consequent").indent(n.tabWidth)),v(r);case"DebuggerStatement":return w("debugger;");case"JSXAttribute":return r.push(s.call(e,"name")),t.value&&r.push("=",s.call(e,"value")),v(r);case"JSXIdentifier":return w(t.name,n);case"JSXNamespacedName":return w(":").join([s.call(e,"namespace"),s.call(e,"name")]);case"JSXMemberExpression":return w(".").join([s.call(e,"object"),s.call(e,"property")]);case"JSXSpreadAttribute":return v(["{...",s.call(e,"argument"),"}"]);case"JSXSpreadChild":return v(["{...",s.call(e,"expression"),"}"]);case"JSXExpressionContainer":return v(["{",s.call(e,"expression"),"}"]);case"JSXElement":case"JSXFragment":{let i="opening"+(t.type==="JSXElement"?"Element":"Fragment"),a="closing"+(t.type==="JSXElement"?"Element":"Fragment"),o=s.call(e,i);if(t[i].selfClosing)return o;let l=v(s.map(function(p){let u=p.getValue();if(Q.Literal.check(u)&&typeof u.value=="string"){if(/\S/.test(u.value))return u.value.replace(/^\s+|\s+$/g,"");if(/\n/.test(u.value))return`
|
|
14160
14462
|
`}return e(p)},"children")).indentTail(n.tabWidth),c=s.call(e,a);return v([o,l,c])}case"JSXOpeningElement":{r.push("<",s.call(e,"name"));let i=[];s.each(function(l){i.push(" ",e(l))},"attributes");let a=v(i);return(a.length>1||a.getLineLength(1)>n.wrapColumn)&&(i.forEach(function(l,c){l===" "&&(i[c]=`
|
|
14161
|
-
`)}),a=v(i).indentTail(n.tabWidth)),r.push(a,t.selfClosing?" />":">"),v(r)}case"JSXClosingElement":return v(["</",s.call(e,"name"),">"]);case"JSXOpeningFragment":return
|
|
14463
|
+
`)}),a=v(i).indentTail(n.tabWidth)),r.push(a,t.selfClosing?" />":">"),v(r)}case"JSXClosingElement":return v(["</",s.call(e,"name"),">"]);case"JSXOpeningFragment":return w("<>");case"JSXClosingFragment":return w("</>");case"JSXText":return w(t.value,n);case"JSXEmptyExpression":return w("");case"TypeAnnotatedIdentifier":return v([s.call(e,"annotation")," ",s.call(e,"identifier")]);case"ClassBody":return t.body.length===0?w("{}"):v([`{
|
|
14162
14464
|
`,s.call(i=>Dt(i,n,e),"body").indent(n.tabWidth),`
|
|
14163
|
-
}`]);case"ClassPropertyDefinition":return r.push("static ",s.call(e,"definition")),Q.MethodDefinition.check(t.definition)||r.push(";"),v(r);case"ClassProperty":{t.declare&&r.push("declare ");let i=t.accessibility||t.access;typeof i=="string"&&r.push(i," "),t.static&&r.push("static "),t.abstract&&r.push("abstract "),t.readonly&&r.push("readonly ");let a=s.call(e,"key");return t.computed&&(a=v(["[",a,"]"])),t.variance&&(a=v([Zt(s,e),a])),r.push(a),t.optional&&r.push("?"),t.definite&&r.push("!"),t.typeAnnotation&&r.push(s.call(e,"typeAnnotation")),t.value&&r.push(" = ",s.call(e,"value")),r.push(";"),v(r)}case"ClassPrivateProperty":return t.static&&r.push("static "),r.push(s.call(e,"key")),t.typeAnnotation&&r.push(s.call(e,"typeAnnotation")),t.value&&r.push(" = ",s.call(e,"value")),r.push(";"),v(r);case"ClassAccessorProperty":return r.push(...Wa(t),"accessor "),t.computed?r.push("[",s.call(e,"key"),"]"):r.push(s.call(e,"key")),t.optional&&r.push("?"),t.definite&&r.push("!"),t.typeAnnotation&&r.push(s.call(e,"typeAnnotation")),t.value&&r.push(" = ",s.call(e,"value")),r.push(";"),v(r);case"ClassDeclaration":case"ClassExpression":case"DeclareClass":return t.declare&&r.push("declare "),t.abstract&&r.push("abstract "),r.push("class"),t.id&&r.push(" ",s.call(e,"id")),t.typeParameters&&r.push(s.call(e,"typeParameters")),t.superClass&&r.push(" extends ",s.call(e,"superClass"),s.call(e,"superTypeParameters")),t.extends&&t.extends.length>0&&r.push(" extends ",
|
|
14465
|
+
}`]);case"ClassPropertyDefinition":return r.push("static ",s.call(e,"definition")),Q.MethodDefinition.check(t.definition)||r.push(";"),v(r);case"ClassProperty":{t.declare&&r.push("declare ");let i=t.accessibility||t.access;typeof i=="string"&&r.push(i," "),t.static&&r.push("static "),t.abstract&&r.push("abstract "),t.readonly&&r.push("readonly ");let a=s.call(e,"key");return t.computed&&(a=v(["[",a,"]"])),t.variance&&(a=v([Zt(s,e),a])),r.push(a),t.optional&&r.push("?"),t.definite&&r.push("!"),t.typeAnnotation&&r.push(s.call(e,"typeAnnotation")),t.value&&r.push(" = ",s.call(e,"value")),r.push(";"),v(r)}case"ClassPrivateProperty":return t.static&&r.push("static "),r.push(s.call(e,"key")),t.typeAnnotation&&r.push(s.call(e,"typeAnnotation")),t.value&&r.push(" = ",s.call(e,"value")),r.push(";"),v(r);case"ClassAccessorProperty":return r.push(...Wa(t),"accessor "),t.computed?r.push("[",s.call(e,"key"),"]"):r.push(s.call(e,"key")),t.optional&&r.push("?"),t.definite&&r.push("!"),t.typeAnnotation&&r.push(s.call(e,"typeAnnotation")),t.value&&r.push(" = ",s.call(e,"value")),r.push(";"),v(r);case"ClassDeclaration":case"ClassExpression":case"DeclareClass":return t.declare&&r.push("declare "),t.abstract&&r.push("abstract "),r.push("class"),t.id&&r.push(" ",s.call(e,"id")),t.typeParameters&&r.push(s.call(e,"typeParameters")),t.superClass&&r.push(" extends ",s.call(e,"superClass"),s.call(e,"superTypeParameters")),t.extends&&t.extends.length>0&&r.push(" extends ",w(", ").join(s.map(e,"extends"))),t.implements&&t.implements.length>0&&r.push(" implements ",w(", ").join(s.map(e,"implements"))),r.push(" ",s.call(e,"body")),t.type==="DeclareClass"?Qt(s,r):v(r);case"TemplateElement":return w(t.value.raw,n).lockIndentTail();case"TemplateLiteral":{let i=s.map(e,"expressions");return r.push("`"),s.each(function(a){let o=a.getName();r.push(e(a)),o<i.length&&r.push("${",i[o],"}")},"quasis"),r.push("`"),v(r).lockIndentTail()}case"TaggedTemplateExpression":return v([s.call(e,"tag"),s.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"&&r.push(": "),r.push(s.call(e,"typeAnnotation")),v(r)):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([s.call(e,"elementType"),"[]"]);case"TupleTypeAnnotation":{let i=s.map(e,"types"),o=w(", ").join(i).getLineLength(1)<=n.wrapColumn;return o?n.arrayBracketSpacing?r.push("[ "):r.push("["):r.push(`[
|
|
14164
14466
|
`),s.each(function(l){let c=l.getName();if(!l.getValue())r.push(",");else{let u=i[c];o?c>0&&r.push(" "):u=u.indent(n.tabWidth),r.push(u),(c<t.types.length-1||!o&&sn(n,"arrays"))&&r.push(","),o||r.push(`
|
|
14165
|
-
`)}},"types"),o&&n.arrayBracketSpacing?r.push(" ]"):r.push("]"),v(r)}case"BooleanTypeAnnotation":return
|
|
14166
|
-
`,
|
|
14467
|
+
`)}},"types"),o&&n.arrayBracketSpacing?r.push(" ]"):r.push("]"),v(r)}case"BooleanTypeAnnotation":return w("boolean",n);case"BooleanLiteralTypeAnnotation":return w(""+t.value,n);case"InterfaceTypeAnnotation":return r.push("interface"),t.extends&&t.extends.length>0&&r.push(" extends ",w(", ").join(s.map(e,"extends"))),r.push(" ",s.call(e,"body")),v(r);case"DeclareFunction":return Qt(s,["function ",s.call(e,"id"),";"]);case"DeclareModule":return Qt(s,["module ",s.call(e,"id")," ",s.call(e,"body")]);case"DeclareModuleExports":return Qt(s,["module.exports",s.call(e,"typeAnnotation")]);case"DeclareVariable":return Qt(s,["var ",s.call(e,"id"),";"]);case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return v(["declare ",ba(s,n,e)]);case"EnumDeclaration":return v(["enum ",s.call(e,"id"),s.call(e,"body")]);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return(t.type==="EnumSymbolBody"||t.explicitType)&&r.push(" of ",t.type.slice(4,-4).toLowerCase()),r.push(` {
|
|
14468
|
+
`,w(`
|
|
14167
14469
|
`).join(s.map(e,"members")).indent(n.tabWidth),`
|
|
14168
|
-
}`),v(r);case"EnumDefaultedMember":return v([s.call(e,"id"),","]);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":return v([s.call(e,"id")," = ",s.call(e,"init"),","]);case"InferredPredicate":return
|
|
14470
|
+
}`),v(r);case"EnumDefaultedMember":return v([s.call(e,"id"),","]);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":return v([s.call(e,"id")," = ",s.call(e,"init"),","]);case"InferredPredicate":return w("%checks",n);case"DeclaredPredicate":return v(["%checks(",s.call(e,"value"),")"]);case"FunctionTypeAnnotation":{let i=s.getParentNode(0),a=!(Q.ObjectTypeCallProperty.check(i)||Q.ObjectTypeInternalSlot.check(i)&&i.method||Q.DeclareFunction.check(s.getParentNode(2)));a&&!Q.FunctionTypeParam.check(i)&&!Q.TypeAlias.check(i)&&r.push(": ");let l=!!t.typeParameters,c=l||t.params.length!==1||t.params[0].name;return r.push(l?s.call(e,"typeParameters"):"",c?"(":"",Be(s,n,e),c?")":""),t.returnType&&r.push(a?" => ":": ",s.call(e,"returnType")),v(r)}case"FunctionTypeParam":{let i=s.call(e,"name");return r.push(i),t.optional&&r.push("?"),i.infos[0].line&&r.push(": "),r.push(s.call(e,"typeAnnotation")),v(r)}case"GenericTypeAnnotation":return v([s.call(e,"id"),s.call(e,"typeParameters")]);case"DeclareInterface":r.push("declare ");case"InterfaceDeclaration":case"TSInterfaceDeclaration":return t.declare&&r.push("declare "),r.push("interface ",s.call(e,"id"),s.call(e,"typeParameters")," "),t.extends&&t.extends.length>0&&r.push("extends ",w(", ").join(s.map(e,"extends"))," "),t.body&&r.push(s.call(e,"body")),v(r);case"ClassImplements":case"InterfaceExtends":return v([s.call(e,"id"),s.call(e,"typeParameters")]);case"IntersectionTypeAnnotation":return w(" & ").join(s.map(e,"types"));case"NullableTypeAnnotation":return v(["?",s.call(e,"typeAnnotation")]);case"NullLiteralTypeAnnotation":return w("null",n);case"ThisTypeAnnotation":return w("this",n);case"NumberTypeAnnotation":return w("number",n);case"ObjectTypeCallProperty":return s.call(e,"value");case"ObjectTypeIndexer":return t.static&&r.push("static "),r.push(Zt(s,e),"["),t.id&&r.push(s.call(e,"id"),": "),r.push(s.call(e,"key"),"]: ",s.call(e,"value")),v(r);case"ObjectTypeProperty":return v([Zt(s,e),s.call(e,"key"),t.optional?"?":"",": ",s.call(e,"value")]);case"ObjectTypeInternalSlot":return v([t.static?"static ":"","[[",s.call(e,"id"),"]]",t.optional?"?":"",t.value.type!=="FunctionTypeAnnotation"?": ":"",s.call(e,"value")]);case"QualifiedTypeIdentifier":return v([s.call(e,"qualification"),".",s.call(e,"id")]);case"StringLiteralTypeAnnotation":return w(en(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":r.push("declare ");case"TypeAlias":return v(["type ",s.call(e,"id"),s.call(e,"typeParameters")," = ",s.call(e,"right"),";"]);case"DeclareOpaqueType":r.push("declare ");case"OpaqueType":return r.push("opaque type ",s.call(e,"id"),s.call(e,"typeParameters")),t.supertype&&r.push(": ",s.call(e,"supertype")),t.impltype&&r.push(" = ",s.call(e,"impltype")),r.push(";"),v(r);case"TypeCastExpression":return v(["(",s.call(e,"expression"),s.call(e,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return v(["<",w(", ").join(s.map(e,"params")),">"]);case"Variance":return t.kind==="plus"?w("+"):t.kind==="minus"?w("-"):w("");case"TypeParameter":return t.variance&&r.push(Zt(s,e)),r.push(s.call(e,"name")),t.bound&&r.push(s.call(e,"bound")),t.default&&r.push("=",s.call(e,"default")),v(r);case"TypeofTypeAnnotation":return v([w("typeof ",n),s.call(e,"argument")]);case"IndexedAccessType":case"OptionalIndexedAccessType":return v([s.call(e,"objectType"),t.optional?"?.":"","[",s.call(e,"indexType"),"]"]);case"UnionTypeAnnotation":return w(" | ").join(s.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([s.call(e,"elementType"),"[]"]);case"TSLiteralType":return s.call(e,"literal");case"TSUnionType":return w(" | ").join(s.map(e,"types"));case"TSIntersectionType":return w(" & ").join(s.map(e,"types"));case"TSConditionalType":return r.push(s.call(e,"checkType")," extends ",s.call(e,"extendsType")," ? ",s.call(e,"trueType")," : ",s.call(e,"falseType")),v(r);case"TSInferType":return r.push("infer ",s.call(e,"typeParameter")),v(r);case"TSParenthesizedType":return v(["(",s.call(e,"typeAnnotation"),")"]);case"TSFunctionType":return v([s.call(e,"typeParameters"),"(",Be(s,n,e),") => ",s.call(e,"typeAnnotation","typeAnnotation")]);case"TSConstructorType":return v(["new ",s.call(e,"typeParameters"),"(",Be(s,n,e),") => ",s.call(e,"typeAnnotation","typeAnnotation")]);case"TSMappedType":return r.push(t.readonly?"readonly ":"","[",s.call(e,"typeParameter"),"]",t.optional?"?":""),t.typeAnnotation&&r.push(": ",s.call(e,"typeAnnotation"),";"),v([`{
|
|
14169
14471
|
`,v(r).indent(n.tabWidth),`
|
|
14170
|
-
}`]);case"TSTupleType":return v(["[",
|
|
14171
|
-
`).join(s.map(e,"members").map(a=>ln(a)!==";"?a.concat(";"):a));return i.isEmpty()?
|
|
14472
|
+
}`]);case"TSTupleType":return v(["[",w(", ").join(s.map(e,"elementTypes")),"]"]);case"TSNamedTupleMember":return r.push(s.call(e,"label")),t.optional&&r.push("?"),r.push(": ",s.call(e,"elementType")),v(r);case"TSRestType":return v(["...",s.call(e,"typeAnnotation")]);case"TSOptionalType":return v([s.call(e,"typeAnnotation"),"?"]);case"TSIndexedAccessType":return v([s.call(e,"objectType"),"[",s.call(e,"indexType"),"]"]);case"TSTypeOperator":return v([s.call(e,"operator")," ",s.call(e,"typeAnnotation")]);case"TSTypeLiteral":{let i=w(`
|
|
14473
|
+
`).join(s.map(e,"members").map(a=>ln(a)!==";"?a.concat(";"):a));return i.isEmpty()?w("{}",n):(r.push(`{
|
|
14172
14474
|
`,i.indent(n.tabWidth),`
|
|
14173
|
-
}`),v(r))}case"TSEnumMember":return r.push(s.call(e,"id")),t.initializer&&r.push(" = ",s.call(e,"initializer")),v(r);case"TSTypeQuery":return v(["typeof ",s.call(e,"exprName")]);case"TSParameterProperty":return t.accessibility&&r.push(t.accessibility," "),t.export&&r.push("export "),t.static&&r.push("static "),t.readonly&&r.push("readonly "),r.push(s.call(e,"parameter")),v(r);case"TSTypeReference":return v([s.call(e,"typeName"),s.call(e,"typeParameters")]);case"TSQualifiedName":return v([s.call(e,"left"),".",s.call(e,"right")]);case"TSAsExpression":case"TSSatisfiesExpression":{let i=s.call(e,"expression");return r.push(i,t.type==="TSSatisfiesExpression"?" satisfies ":" as ",s.call(e,"typeAnnotation")),v(r)}case"TSTypeCastExpression":return v([s.call(e,"expression"),s.call(e,"typeAnnotation")]);case"TSNonNullExpression":return v([s.call(e,"expression"),"!"]);case"TSTypeAnnotation":return v([": ",s.call(e,"typeAnnotation")]);case"TSIndexSignature":return v([t.readonly?"readonly ":"","[",s.map(e,"parameters"),"]",s.call(e,"typeAnnotation")]);case"TSPropertySignature":return r.push(Zt(s,e),t.readonly?"readonly ":""),t.computed?r.push("[",s.call(e,"key"),"]"):r.push(s.call(e,"key")),r.push(t.optional?"?":"",s.call(e,"typeAnnotation")),v(r);case"TSMethodSignature":return t.computed?r.push("[",s.call(e,"key"),"]"):r.push(s.call(e,"key")),t.optional&&r.push("?"),r.push(s.call(e,"typeParameters"),"(",Be(s,n,e),")",s.call(e,"typeAnnotation")),v(r);case"TSTypePredicate":return t.asserts&&r.push("asserts "),r.push(s.call(e,"parameterName")),t.typeAnnotation&&r.push(" is ",s.call(e,"typeAnnotation","typeAnnotation")),v(r);case"TSCallSignatureDeclaration":return v([s.call(e,"typeParameters"),"(",Be(s,n,e),")",s.call(e,"typeAnnotation")]);case"TSConstructSignatureDeclaration":return t.typeParameters?r.push("new",s.call(e,"typeParameters")):r.push("new "),r.push("(",Be(s,n,e),")",s.call(e,"typeAnnotation")),v(r);case"TSTypeAliasDeclaration":return v([t.declare?"declare ":"","type ",s.call(e,"id"),s.call(e,"typeParameters")," = ",s.call(e,"typeAnnotation"),";"]);case"TSTypeParameter":{r.push(s.call(e,"name"));let i=s.getParentNode(0),a=Q.TSMappedType.check(i);return t.constraint&&r.push(a?" in ":" extends ",s.call(e,"constraint")),t.default&&r.push(" = ",s.call(e,"default")),v(r)}case"TSTypeAssertion":return r.push("<",s.call(e,"typeAnnotation"),"> ",s.call(e,"expression")),v(r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return v(["<",
|
|
14475
|
+
}`),v(r))}case"TSEnumMember":return r.push(s.call(e,"id")),t.initializer&&r.push(" = ",s.call(e,"initializer")),v(r);case"TSTypeQuery":return v(["typeof ",s.call(e,"exprName")]);case"TSParameterProperty":return t.accessibility&&r.push(t.accessibility," "),t.export&&r.push("export "),t.static&&r.push("static "),t.readonly&&r.push("readonly "),r.push(s.call(e,"parameter")),v(r);case"TSTypeReference":return v([s.call(e,"typeName"),s.call(e,"typeParameters")]);case"TSQualifiedName":return v([s.call(e,"left"),".",s.call(e,"right")]);case"TSAsExpression":case"TSSatisfiesExpression":{let i=s.call(e,"expression");return r.push(i,t.type==="TSSatisfiesExpression"?" satisfies ":" as ",s.call(e,"typeAnnotation")),v(r)}case"TSTypeCastExpression":return v([s.call(e,"expression"),s.call(e,"typeAnnotation")]);case"TSNonNullExpression":return v([s.call(e,"expression"),"!"]);case"TSTypeAnnotation":return v([": ",s.call(e,"typeAnnotation")]);case"TSIndexSignature":return v([t.readonly?"readonly ":"","[",s.map(e,"parameters"),"]",s.call(e,"typeAnnotation")]);case"TSPropertySignature":return r.push(Zt(s,e),t.readonly?"readonly ":""),t.computed?r.push("[",s.call(e,"key"),"]"):r.push(s.call(e,"key")),r.push(t.optional?"?":"",s.call(e,"typeAnnotation")),v(r);case"TSMethodSignature":return t.computed?r.push("[",s.call(e,"key"),"]"):r.push(s.call(e,"key")),t.optional&&r.push("?"),r.push(s.call(e,"typeParameters"),"(",Be(s,n,e),")",s.call(e,"typeAnnotation")),v(r);case"TSTypePredicate":return t.asserts&&r.push("asserts "),r.push(s.call(e,"parameterName")),t.typeAnnotation&&r.push(" is ",s.call(e,"typeAnnotation","typeAnnotation")),v(r);case"TSCallSignatureDeclaration":return v([s.call(e,"typeParameters"),"(",Be(s,n,e),")",s.call(e,"typeAnnotation")]);case"TSConstructSignatureDeclaration":return t.typeParameters?r.push("new",s.call(e,"typeParameters")):r.push("new "),r.push("(",Be(s,n,e),")",s.call(e,"typeAnnotation")),v(r);case"TSTypeAliasDeclaration":return v([t.declare?"declare ":"","type ",s.call(e,"id"),s.call(e,"typeParameters")," = ",s.call(e,"typeAnnotation"),";"]);case"TSTypeParameter":{r.push(s.call(e,"name"));let i=s.getParentNode(0),a=Q.TSMappedType.check(i);return t.constraint&&r.push(a?" in ":" extends ",s.call(e,"constraint")),t.default&&r.push(" = ",s.call(e,"default")),v(r)}case"TSTypeAssertion":return r.push("<",s.call(e,"typeAnnotation"),"> ",s.call(e,"expression")),v(r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return v(["<",w(", ").join(s.map(e,"params")),">"]);case"TSEnumDeclaration":{r.push(t.declare?"declare ":"",t.const?"const ":"","enum ",s.call(e,"id"));let i=w(`,
|
|
14174
14476
|
`).join(s.map(e,"members"));return i.isEmpty()?r.push(" {}"):r.push(` {
|
|
14175
14477
|
`,i.indent(n.tabWidth),`
|
|
14176
|
-
}`),v(r)}case"TSExpressionWithTypeArguments":return v([s.call(e,"expression"),s.call(e,"typeParameters")]);case"TSInterfaceBody":{let i=
|
|
14177
|
-
`).join(s.map(e,"body").map(a=>ln(a)!==";"?a.concat(";"):a));return i.isEmpty()?
|
|
14478
|
+
}`),v(r)}case"TSExpressionWithTypeArguments":return v([s.call(e,"expression"),s.call(e,"typeParameters")]);case"TSInterfaceBody":{let i=w(`
|
|
14479
|
+
`).join(s.map(e,"body").map(a=>ln(a)!==";"?a.concat(";"):a));return i.isEmpty()?w("{}",n):v([`{
|
|
14178
14480
|
`,i.indent(n.tabWidth),`
|
|
14179
14481
|
}`])}case"TSImportType":return r.push("import(",s.call(e,"argument"),")"),t.qualifier&&r.push(".",s.call(e,"qualifier")),t.typeParameters&&r.push(s.call(e,"typeParameters")),v(r);case"TSImportEqualsDeclaration":return t.isExport&&r.push("export "),r.push("import ",s.call(e,"id")," = ",s.call(e,"moduleReference")),Vn(v(r));case"TSExternalModuleReference":return v(["require(",s.call(e,"expression"),")"]);case"TSModuleDeclaration":return s.getParentNode().type==="TSModuleDeclaration"?r.push("."):(t.declare&&r.push("declare "),t.global||(t.id.type==="StringLiteral"||t.id.type==="Literal"&&typeof t.id.value=="string"||t.loc&&t.loc.lines&&t.id.loc&&t.loc.lines.sliceString(t.loc.start,t.id.loc.start).indexOf("module")>=0?r.push("module "):r.push("namespace "))),r.push(s.call(e,"id")),t.body&&(r.push(" "),r.push(s.call(e,"body"))),v(r);case"TSModuleBlock":{let i=s.call(a=>Dt(a,n,e),"body");return i.isEmpty()?r.push("{}"):r.push(`{
|
|
14180
14482
|
`,i.indent(n.tabWidth),`
|
|
14181
|
-
}`),v(r)}case"TSInstantiationExpression":return r.push(s.call(e,"expression"),s.call(e,"typeParameters")),v(r);case"V8IntrinsicIdentifier":return v(["%",s.call(e,"name")]);case"TopicReference":return
|
|
14483
|
+
}`),v(r)}case"TSInstantiationExpression":return r.push(s.call(e,"expression"),s.call(e,"typeParameters")),v(r);case"V8IntrinsicIdentifier":return v(["%",s.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 Uu(s,n){let e=[],t=s.getValue();return t.decorators&&t.decorators.length>0&&!ka(s)?s.each(function(r){e.push(n(r),`
|
|
14182
14484
|
`)},"decorators"):Xn(t)&&t.declaration&&t.declaration.decorators&&s.each(function(r){e.push(n(r),`
|
|
14183
|
-
`)},"declaration","decorators"),v(e)}function Dt(s,n,e){let t=[];s.each(function(o){let l=o.getValue();l&&(l.type==="EmptyStatement"&&!(l.comments&&l.comments.length>0)||(Q.Comment.check(l)||Q.Statement.check(l)||Fr.assert(l),t.push({node:l,printed:e(o)})))});let r=null,i=t.length,a=[];return t.forEach(function(o,l){let c=o.printed,p=o.node,u=c.length>1,d=l>0,m=l<i-1,f,b,h=p&&p.loc&&p.loc.lines,y=h&&n.reuseWhitespace&&Fa(p,h);if(d)if(y){let
|
|
14485
|
+
`)},"declaration","decorators"),v(e)}function Dt(s,n,e){let t=[];s.each(function(o){let l=o.getValue();l&&(l.type==="EmptyStatement"&&!(l.comments&&l.comments.length>0)||(Q.Comment.check(l)||Q.Statement.check(l)||Fr.assert(l),t.push({node:l,printed:e(o)})))});let r=null,i=t.length,a=[];return t.forEach(function(o,l){let c=o.printed,p=o.node,u=c.length>1,d=l>0,m=l<i-1,f,b,h=p&&p.loc&&p.loc.lines,y=h&&n.reuseWhitespace&&Fa(p,h);if(d)if(y){let C=h.skipSpaces(y.start,!0),k=C?C.line:1,x=y.start.line-k;f=Array(x+1).join(`
|
|
14184
14486
|
`)}else f=u?`
|
|
14185
14487
|
|
|
14186
14488
|
`:`
|
|
14187
|
-
`;else f="";if(m)if(y){let
|
|
14489
|
+
`;else f="";if(m)if(y){let C=h.skipSpaces(y.end),x=(C?C.line:h.length)-y.end.line;b=Array(x+1).join(`
|
|
14188
14490
|
`)}else b=u?`
|
|
14189
14491
|
|
|
14190
14492
|
`:`
|
|
14191
|
-
`;else b="";a.push(_u(r,f),c),m?r=b:b&&a.push(b)}),v(a)}function _u(s,n){if(!s&&!n)return
|
|
14493
|
+
`;else b="";a.push(_u(r,f),c),m?r=b:b&&a.push(b)}),v(a)}function _u(s,n){if(!s&&!n)return w("");if(!s)return w(n);if(!n)return w(s);let e=w(s),t=w(n);return t.length>e.length?t:e}function Wa(s){let n=[];s.declare&&n.push("declare ");let e=s.accessibility||s.access;return typeof e=="string"&&n.push(e," "),s.static&&n.push("static "),s.override&&n.push("override "),s.abstract&&n.push("abstract "),s.readonly&&n.push("readonly "),n}function mr(s,n,e){let t=s.getNode(),r=t.kind,i=[],a=t.value;Q.FunctionExpression.check(a)||(a=t),i.push(...Wa(t)),a.async&&i.push("async "),a.generator&&i.push("*"),(r==="get"||r==="set")&&i.push(r," ");let o=s.call(e,"key");return t.computed&&(o=v(["[",o,"]"])),i.push(o),t.optional&&i.push("?"),t===a?(i.push(s.call(e,"typeParameters"),"(",Be(s,n,e),")",s.call(e,"returnType")),t.body?i.push(" ",s.call(e,"body")):i.push(";")):(i.push(s.call(e,"value","typeParameters"),"(",s.call(l=>Be(l,n,e),"value"),")",s.call(e,"value","returnType")),a.body?i.push(" ",s.call(e,"value","body")):i.push(";")),v(i)}function ha(s,n,e){let t=s.map(e,"arguments"),r=sn(n,"parameters"),i=w(", ").join(t);return i.getLineLength(1)>n.wrapColumn?(i=w(`,
|
|
14192
14494
|
`).join(t),v([`(
|
|
14193
14495
|
`,i.indent(n.tabWidth),r?`,
|
|
14194
14496
|
)`:`
|
|
14195
|
-
)`])):v(["(",i,")"])}function Be(s,n,e){let t=s.getValue(),r,i=[];t.params?(r=t.params,i=s.map(e,"params")):t.parameters&&(r=t.parameters,i=s.map(e,"parameters")),t.defaults&&s.each(function(o){let l=o.getName(),c=i[l];c&&o.getValue()&&(i[l]=v([c," = ",e(o)]))},"defaults"),t.rest&&i.push(v(["...",s.call(e,"rest")]));let a=
|
|
14497
|
+
)`])):v(["(",i,")"])}function Be(s,n,e){let t=s.getValue(),r,i=[];t.params?(r=t.params,i=s.map(e,"params")):t.parameters&&(r=t.parameters,i=s.map(e,"parameters")),t.defaults&&s.each(function(o){let l=o.getName(),c=i[l];c&&o.getValue()&&(i[l]=v([c," = ",e(o)]))},"defaults"),t.rest&&i.push(v(["...",s.call(e,"rest")]));let a=w(", ").join(i);return a.length>1||a.getLineLength(1)>n.wrapColumn?(a=w(`,
|
|
14196
14498
|
`).join(i),sn(n,"parameters")&&!t.rest&&r[r.length-1].type!=="RestElement"?a=v([a,`,
|
|
14197
14499
|
`]):a=v([a,`
|
|
14198
14500
|
`]),v([`
|
|
14199
|
-
`,a.indent(n.tabWidth)])):a}function qa(s,n,e){let t=s.getValue();if(t.assertions&&t.assertions.length>0){let r=[" assert {"],i=s.map(e,"assertions"),a=
|
|
14200
|
-
`,
|
|
14501
|
+
`,a.indent(n.tabWidth)])):a}function qa(s,n,e){let t=s.getValue();if(t.assertions&&t.assertions.length>0){let r=[" assert {"],i=s.map(e,"assertions"),a=w(", ").join(i);return a.length>1||a.getLineLength(1)>n.wrapColumn?r.push(`
|
|
14502
|
+
`,w(`,
|
|
14201
14503
|
`).join(i).indent(n.tabWidth),`
|
|
14202
|
-
}`):r.push(" ",a," }"),v(r)}return
|
|
14504
|
+
}`):r.push(" ",a," }"),v(r)}return w("")}function ba(s,n,e){let t=s.getValue(),r=["export "];t.exportKind&&t.exportKind==="type"&&(t.declaration||r.push("type "));let i=n.objectCurlySpacing;if(Q.Declaration.assert(t),(t.default||t.type==="ExportDefaultDeclaration")&&r.push("default "),t.declaration)r.push(s.call(e,"declaration"));else if(t.specifiers){if(t.specifiers.length===1&&t.specifiers[0].type==="ExportBatchSpecifier")r.push("*");else if(t.specifiers.length===0)r.push("{}");else if(t.specifiers[0].type==="ExportDefaultSpecifier"){let o=[],l=[];if(s.each(function(c){c.getValue().type==="ExportDefaultSpecifier"?o.push(e(c)):l.push(e(c))},"specifiers"),o.forEach((c,p)=>{p>0&&r.push(", "),r.push(c)}),l.length>0){let c=w(", ").join(l);c.getLineLength(1)>n.wrapColumn&&(c=v([w(`,
|
|
14203
14505
|
`).join(l).indent(n.tabWidth),","])),o.length>0&&r.push(", "),c.length>1?r.push(`{
|
|
14204
14506
|
`,c,`
|
|
14205
|
-
}`):n.objectCurlySpacing?r.push("{ ",c," }"):r.push("{",c,"}")}}else r.push(i?"{ ":"{",
|
|
14507
|
+
}`):n.objectCurlySpacing?r.push("{ ",c," }"):r.push("{",c,"}")}}else r.push(i?"{ ":"{",w(", ").join(s.map(e,"specifiers")),i?" }":"}");t.source&&r.push(" from ",s.call(e,"source"),qa(s,n,e))}let a=v(r);return ln(a)!==";"&&!(t.declaration&&(t.declaration.type==="FunctionDeclaration"||t.declaration.type==="ClassDeclaration"||t.declaration.type==="TSModuleDeclaration"||t.declaration.type==="TSInterfaceDeclaration"||t.declaration.type==="TSEnumDeclaration"))&&(a=v([a,";"])),a}function Qt(s,n){return ka(s)||n.unshift("declare "),v(n)}function Zt(s,n){return s.call(function(e){let t=e.getValue();return t?t==="plus"?w("+"):t==="minus"?w("-"):n(e):w("")},"variance")}function at(s,n){return s.length>1?v([" ",s]):v([`
|
|
14206
14508
|
`,Vn(s).indent(n.tabWidth)])}function ln(s){let n=s.lastPos();do{let e=s.charAt(n);if(/\S/.test(e))return e}while(s.prevPos(n))}function ga(s){return ln(s)==="}"}function Un(s){return s.replace(/['"]/g,n=>n==='"'?"'":'"')}function Et(s){let n=Ge(s,"value"),e=Ge(s,"extra");if(e&&typeof e.raw=="string"&&n==e.rawValue)return e.raw;if(s.type==="Literal"){let t=s.raw;if(typeof t=="string"&&n==t)return t}}function _n(s){return JSON.stringify(s).replace(/[\u2028\u2029]/g,function(n){return"\\u"+n.charCodeAt(0).toString(16)})}function en(s,n){switch(Fr.assert(s),n.quote){case"auto":{let e=_n(s),t=Un(_n(Un(s)));return e.length>t.length?t:e}case"single":return Un(_n(Un(s)));case"double":default:return _n(s)}}function Vn(s){let n=ln(s);return!n||`
|
|
14207
14509
|
};`.indexOf(n)<0?v([s,";"]):s}function Ru(s,n){return new Ou(n).print(s)}var Rn;function ju(){if(Rn)return Rn;let s=Vu();return Rn={parse(n,e){return va.parse(n,{...s,...e})}},Rn}function Vu(){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 zu=Object.defineProperty,$u=(s,n,e)=>n in s?zu(s,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[n]=e,ya=(s,n,e)=>($u(s,typeof n!="symbol"?n+"":n,e),e),ce=class extends Error{constructor(n,e){if(super(""),ya(this,"rawMessage"),ya(this,"options"),this.name="MagicastError",this.rawMessage=n,this.options=e,e?.ast&&e?.code&&e.ast.loc){let{line:t,column:r}=e.ast.loc.start,i=e.code.split(`
|
|
14208
14510
|
`),a=Math.max(0,t-3),o=Math.min(i.length,t+3),l=i.slice(a,o).map((c,p)=>(c=`${(a+p+1).toString().padStart(3," ")} | ${c}`,a+p===t-1&&(c+=`
|
|
@@ -14210,14 +14512,14 @@ ${" ".repeat(6+r)}^`),c));n+=`
|
|
|
14210
14512
|
|
|
14211
14513
|
${l.join(`
|
|
14212
14514
|
`)}
|
|
14213
|
-
`}this.message=n}},Hu=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),Ka=new Set(["string","number","boolean","bigint","symbol","undefined"]),Z=pn;function Gu(s){return/^[$A-Z_a-z][\w$]*$/.test(s)}var kr="__magicast_proxy";function Te(s,n=new Set){if(s===void 0)return Z.identifier("undefined");if(s===null)return Z.literal(null);if(Ka.has(typeof s))return Z.literal(s);if(n.has(s))throw new ce("Can not serialize circular reference");if(n.add(s),s[kr])return s.$ast;if(s instanceof RegExp){let e=Z.regExpLiteral(s.source,s.flags);return delete e.extra.raw,e}return s instanceof Set?Z.newExpression(Z.identifier("Set"),[Z.arrayExpression([...s].map(e=>Te(e,n)))]):s instanceof Date?Z.newExpression(Z.identifier("Date"),[Z.literal(s.toISOString())]):s instanceof Map?Z.newExpression(Z.identifier("Map"),[Z.arrayExpression([...s].map(([e,t])=>Z.arrayExpression([Te(e,n),Te(t,n)])))]):Array.isArray(s)?Z.arrayExpression(s.map(e=>Te(e,n))):typeof s=="object"?Z.objectExpression(Object.entries(s).map(([e,t])=>Z.property("init",/^[$A-Z_a-z][\w$]*$/g.test(e)?Z.identifier(e):Z.literal(e),Te(t,n)))):Z.literal(s)}function Wu(s,n={}){let e=n;return e[kr]=!0,e.$ast=s,e.$type||(e.$type="object"),e}var qu={enumerable:!0,configurable:!0};function Ce(s,n,e){let t=Wu(s,n);return new Proxy({},{ownKeys(){return Object.keys(t).filter(r=>r!==kr&&!r.startsWith("$"))},getOwnPropertyDescriptor(){return qu},has(r,i){return i in t},...e,get(r,i,a){if(i in t)return t[i];if(e.get)return e.get(r,i,a)},set(r,i,a,o){return i in t?(t[i]=a,!0):e.set?e.set(r,i,a,o):!1}})}var me=pn,hr=new WeakMap;function Ku(s,n,e){if(hr.has(n))return hr.get(n);let t=Ce(n,{get $declaration(){return s},get imported(){return n.type==="ImportDefaultSpecifier"?"default":n.type==="ImportNamespaceSpecifier"?"*":n.imported.type==="Identifier"?n.imported.name:n.imported.value},set imported(r){if(n.type!=="ImportSpecifier")throw new ce("Changing import name is not yet implemented");n.imported.type==="Identifier"?n.imported.name=r:n.imported.value=r},get local(){return n.local.name},set local(r){n.local.name=r},get from(){return s.source.value},set from(r){if(r===s.source.value)return;s.specifiers=s.specifiers.filter(a=>a!==n),s.specifiers.length===0&&(e.body=e.body.filter(a=>a!==s));let i=e.body.find(a=>a.type==="ImportDeclaration"&&a.source.value===r);i?i.specifiers.push(n):e.body.unshift(me.importDeclaration([n],me.stringLiteral(r)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return["imported","local","from","toJSON"]}});return hr.set(n,t),t}function Ju(s,n){let e=()=>{let a=[];for(let o of s.body)if(o.type==="ImportDeclaration")for(let l of o.specifiers)a.push(Ku(o,l,s));return a},t=(a,o,l)=>{let c=e(),p=c.find(f=>f.local===a),u=o.local||a;if(p)return p.imported=o.imported,p.local=u,p.from=o.from,!0;let d=o.imported==="default"?me.importDefaultSpecifier(me.identifier(u)):o.imported==="*"?me.importNamespaceSpecifier(me.identifier(u)):me.importSpecifier(me.identifier(o.imported),me.identifier(u)),m=c.find(f=>f.from===o.from)?.$declaration;if(m)m.specifiers.push(d);else if(l==="prepend"||c.length===0)s.body.unshift(me.importDeclaration([d],me.stringLiteral(o.from)));else{let f=c.at(-1).$declaration,b=s.body.indexOf(f);s.body.splice(b+1,0,me.importDeclaration([d],me.stringLiteral(o.from)))}return!0},r=a=>{let o=e().find(p=>p.local===a);if(!o)return!1;let l=o.$declaration,c=o.$ast;return l.specifiers=l.specifiers.filter(p=>p!==c),l.specifiers.length===0&&(s.body=s.body.filter(p=>p!==l)),!0};return Ce(s,{$type:"imports",$add(a){t(a.local||a.imported,a,"prepend")},$prepend(a){t(a.local||a.imported,a,"prepend")},$append(a){t(a.local||a.imported,a,"append")},get $items(){return e()},toJSON(){return e().reduce((a,o)=>(a[o.local]=o,a),{})}},{get(a,o){return e().find(l=>l.local===o)},set(a,o,l){return t(o,l,"prepend")},deleteProperty(a,o){return r(o)},ownKeys(){return e().map(a=>a.local)},has(a,o){return e().some(l=>l.local===o)}})}function Qn(s,n,e){let t=i=>n[i],r=(i,a)=>{n[i]=a};return Ce(s,{$type:"array",push(i){n.push(Te(i))},pop(){return pe(n.pop(),e)},unshift(i){n.unshift(Te(i))},shift(){return pe(n.shift(),e)},splice(i,a,...o){return n.splice(i,a,...o.map(c=>Te(c))).map(c=>pe(c,e))},find(i){return n.map(a=>pe(a,e)).find(i)},findIndex(i){return n.map(a=>pe(a,e)).findIndex(i)},includes(i){return n.map(a=>pe(a,e)).includes(i)},toJSON(){return n.map(i=>pe(i,e))}},{get(i,a){if(a==="length")return n.length;if(a===Symbol.iterator)return function*(){for(let c of n)yield pe(c,e)};if(typeof a=="symbol")return;let o=+a;if(Number.isNaN(o))return;let l=t(o);if(l)return pe(l,e)},set(i,a,o){if(typeof a=="symbol")return!1;let l=+a;return Number.isNaN(l)?!1:(r(l,Te(o)),!0)},deleteProperty(i,a){if(typeof a=="symbol")return!1;let o=+a;return Number.isNaN(o)?!1:(n[o]=Te(void 0),!0)},ownKeys(){return["length",...n.map((i,a)=>a.toString())]}})}function Xu(s,n){if("elements"in s)return Qn(s,s.elements,n)}function Yu(s,n){if(s.type!=="CallExpression")throw new ce("Not a function call");function e(r){if(r.type==="Identifier")return r.name;if(r.type==="MemberExpression")return`${e(r.object)}.${e(r.property)}`;throw new ce("Not implemented")}let t=Qn(s,s.arguments,n);return Ce(s,{$type:"function-call",$callee:e(s.callee),$args:t},{})}function Qu(s,n){if(s.type!=="ArrowFunctionExpression")throw new ce("Not an arrow function expression");let e=Qn(s,s.params,n);return Ce(s,{$type:"arrow-function-expression",$params:e,$body:pe(s.body,n)},{})}var Zu=pn;function ed(s,n){if(!("properties"in s))return;let e=i=>{for(let a of s.properties){if("key"in a&&"name"in a.key&&a.key.name===i)return a.value;if(a.type==="ObjectProperty"&&(a.key.type==="StringLiteral"||a.key.type==="NumericLiteral"||a.key.type==="BooleanLiteral")&&a.key.value.toString()===i)return a.value.value??a.value}},t=(i,a=!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(a)throw new ce(`Casting "${i.type}" is not supported`,{ast:i,code:n?.$code})},r=(i,a)=>{let o=s.properties.find(l=>t(l)===i);o?o.value=a:Gu(i)?s.properties.push({type:"Property",key:{type:"Identifier",name:i},value:a}):s.properties.push({type:"ObjectProperty",key:Zu.stringLiteral(i),value:a})};return Ce(s,{$type:"object",toJSON(){return s.properties.reduce((i,a)=>("key"in a&&"name"in a.key&&(i[a.key.name]=pe(a.value,n)),i),{})}},{get(i,a){let o=e(a);if(o)return pe(o,n)},set(i,a,o){return typeof a!="string"&&(a=String(a)),r(a,Te(o)),!0},deleteProperty(i,a){typeof a!="string"&&(a=String(a));let o=s.properties.findIndex(l=>"key"in l&&"name"in l.key&&l.key.name===a);return o!==-1&&s.properties.splice(o,1),!0},ownKeys(){return s.properties.map(i=>t(i,!0)).filter(Boolean)}})}function td(s,n){if(s.type!=="NewExpression")throw new ce("Not a new expression");function e(r){if(r.type==="Identifier")return r.name;if(r.type==="MemberExpression")return`${e(r.object)}.${e(r.property)}`;throw new ce("Not implemented")}let t=Qn(s,s.arguments,n);return Ce(s,{$type:"new-expression",$callee:e(s.callee),$args:t},{})}function nd(s){if(s.type!=="Identifier")throw new ce("Not an identifier");return Ce(s,{$type:"identifier",$name:s.name},{})}function sd(s){if(s.type!=="LogicalExpression")throw new ce("Not a logical expression");return Ce(s,{$type:"logicalExpression"},{})}function rd(s){if(s.type!=="MemberExpression")throw new ce("Not a member expression");return Ce(s,{$type:"memberExpression"},{})}var br=new WeakMap;function pe(s,n){if(Ka.has(typeof s))return s;if(Hu.has(s.type))return s.value;if(br.has(s))return br.get(s);let e;switch(s.type){case"ObjectExpression":{e=ed(s,n);break}case"ArrayExpression":{e=Xu(s,n);break}case"CallExpression":{e=Yu(s,n);break}case"ArrowFunctionExpression":{e=Qu(s,n);break}case"NewExpression":{e=td(s,n);break}case"Identifier":{e=nd(s);break}case"LogicalExpression":{e=sd(s);break}case"MemberExpression":{e=rd(s);break}case"TSAsExpression":case"TSSatisfiesExpression":{e=pe(s.expression,n);break}default:throw new ce(`Casting "${s.type}" is not supported`,{ast:s,code:n?.$code})}return br.set(s,e),e}var tn=pn;function id(s,n){let e=r=>{let i=r==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let a of s.body)if(a.type===i){if(r==="default")return a.declaration;if(a.declaration&&"declarations"in a.declaration){let o=a.declaration.declarations[0];if("name"in o.id&&o.id.name===r)return o.init}}},t=(r,i)=>{let a=r==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration",o=Te(i);for(let l of s.body)if(l.type===a){if(r==="default"){l.declaration=o;return}if(l.declaration&&"declarations"in l.declaration){let c=l.declaration.declarations[0];if("name"in c.id&&c.id.name===r){c.init=o;return}}}s.body.push(r==="default"?tn.exportDefaultDeclaration(o):tn.exportNamedDeclaration(tn.variableDeclaration("const",[tn.variableDeclarator(tn.identifier(r),o)])))};return Ce(s,{$type:"exports"},{get(r,i){let a=e(i);if(a)return pe(a,n)},set(r,i,a){return t(i,a),!0},ownKeys(){return s.body.flatMap(r=>r.type==="ExportDefaultDeclaration"?["default"]:r.type==="ExportNamedDeclaration"&&r.declaration&&"declarations"in r.declaration?r.declaration.declarations.map(i=>"name"in i.id?i.id.name:""):[]).filter(Boolean)},deleteProperty(r,i){let a=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let o=0;o<s.body.length;o++){let l=s.body[o];if(l.type===a){if(i==="default")return s.body.splice(o,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 s.body.splice(o,1),!0}}}return!1}})}function ad(s,n){let e=s.program;if(e.type!=="Program")throw new ce(`Cannot proxify ${s.type} as module`);let t={$code:n,$type:"module"},r=Ce(e,t,{ownKeys(){return["imports","exports","generate"]}});return t.exports=id(e,r),t.imports=Ju(e),t.generate=i=>Ja(r,i),r}function od(s,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,r=0,i=0,a=0,o=0,l=/(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,c={doubleQuote:0,singleQuote:0,singleParam:0,trailingComma:0},p=(s||"").split(`
|
|
14214
|
-
`),u=!1;for(let d of p){let m=d.trim();if(m.length!==0){if(e.wrapColumn&&d.length>a&&(a=d.length),e.indent){let f=d.match(/^\s+/)?.[0]||"";f.length>0&&(f.length>0&&f.length<t&&(t=f.length),f[0]===" "?r++:f.length>0&&r--)}if(m.at(-1)===";"?i++:m.length>0&&i--,e.quote||e.arrowParens){let f=m.matchAll(l);for(let b of f)if(b.groups)for(let h in c)b.groups[h]&&c[h]++}e.trailingComma&&((d.startsWith("}")||d.startsWith("]"))&&(u?o++:o--),u=m.endsWith(","))}}return{wrapColumn:a,useTabs:r>0,tabWidth:t,quote:c.singleQuote>c.doubleQuote?"single":"double",arrowParensAlways:c.singleParam>0,trailingComma:o>0||c.trailingComma>0,useSemi:i>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...n}}function ld(s,n){let e=
|
|
14515
|
+
`}this.message=n}},Hu=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),Ka=new Set(["string","number","boolean","bigint","symbol","undefined"]),Z=pn;function Gu(s){return/^[$A-Z_a-z][\w$]*$/.test(s)}var kr="__magicast_proxy";function Ce(s,n=new Set){if(s===void 0)return Z.identifier("undefined");if(s===null)return Z.literal(null);if(Ka.has(typeof s))return Z.literal(s);if(n.has(s))throw new ce("Can not serialize circular reference");if(n.add(s),s[kr])return s.$ast;if(s instanceof RegExp){let e=Z.regExpLiteral(s.source,s.flags);return delete e.extra.raw,e}return s instanceof Set?Z.newExpression(Z.identifier("Set"),[Z.arrayExpression([...s].map(e=>Ce(e,n)))]):s instanceof Date?Z.newExpression(Z.identifier("Date"),[Z.literal(s.toISOString())]):s instanceof Map?Z.newExpression(Z.identifier("Map"),[Z.arrayExpression([...s].map(([e,t])=>Z.arrayExpression([Ce(e,n),Ce(t,n)])))]):Array.isArray(s)?Z.arrayExpression(s.map(e=>Ce(e,n))):typeof s=="object"?Z.objectExpression(Object.entries(s).map(([e,t])=>Z.property("init",/^[$A-Z_a-z][\w$]*$/g.test(e)?Z.identifier(e):Z.literal(e),Ce(t,n)))):Z.literal(s)}function Wu(s,n={}){let e=n;return e[kr]=!0,e.$ast=s,e.$type||(e.$type="object"),e}var qu={enumerable:!0,configurable:!0};function we(s,n,e){let t=Wu(s,n);return new Proxy({},{ownKeys(){return Object.keys(t).filter(r=>r!==kr&&!r.startsWith("$"))},getOwnPropertyDescriptor(){return qu},has(r,i){return i in t},...e,get(r,i,a){if(i in t)return t[i];if(e.get)return e.get(r,i,a)},set(r,i,a,o){return i in t?(t[i]=a,!0):e.set?e.set(r,i,a,o):!1}})}var me=pn,hr=new WeakMap;function Ku(s,n,e){if(hr.has(n))return hr.get(n);let t=we(n,{get $declaration(){return s},get imported(){return n.type==="ImportDefaultSpecifier"?"default":n.type==="ImportNamespaceSpecifier"?"*":n.imported.type==="Identifier"?n.imported.name:n.imported.value},set imported(r){if(n.type!=="ImportSpecifier")throw new ce("Changing import name is not yet implemented");n.imported.type==="Identifier"?n.imported.name=r:n.imported.value=r},get local(){return n.local.name},set local(r){n.local.name=r},get from(){return s.source.value},set from(r){if(r===s.source.value)return;s.specifiers=s.specifiers.filter(a=>a!==n),s.specifiers.length===0&&(e.body=e.body.filter(a=>a!==s));let i=e.body.find(a=>a.type==="ImportDeclaration"&&a.source.value===r);i?i.specifiers.push(n):e.body.unshift(me.importDeclaration([n],me.stringLiteral(r)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return["imported","local","from","toJSON"]}});return hr.set(n,t),t}function Ju(s,n){let e=()=>{let a=[];for(let o of s.body)if(o.type==="ImportDeclaration")for(let l of o.specifiers)a.push(Ku(o,l,s));return a},t=(a,o,l)=>{let c=e(),p=c.find(f=>f.local===a),u=o.local||a;if(p)return p.imported=o.imported,p.local=u,p.from=o.from,!0;let d=o.imported==="default"?me.importDefaultSpecifier(me.identifier(u)):o.imported==="*"?me.importNamespaceSpecifier(me.identifier(u)):me.importSpecifier(me.identifier(o.imported),me.identifier(u)),m=c.find(f=>f.from===o.from)?.$declaration;if(m)m.specifiers.push(d);else if(l==="prepend"||c.length===0)s.body.unshift(me.importDeclaration([d],me.stringLiteral(o.from)));else{let f=c.at(-1).$declaration,b=s.body.indexOf(f);s.body.splice(b+1,0,me.importDeclaration([d],me.stringLiteral(o.from)))}return!0},r=a=>{let o=e().find(p=>p.local===a);if(!o)return!1;let l=o.$declaration,c=o.$ast;return l.specifiers=l.specifiers.filter(p=>p!==c),l.specifiers.length===0&&(s.body=s.body.filter(p=>p!==l)),!0};return we(s,{$type:"imports",$add(a){t(a.local||a.imported,a,"prepend")},$prepend(a){t(a.local||a.imported,a,"prepend")},$append(a){t(a.local||a.imported,a,"append")},get $items(){return e()},toJSON(){return e().reduce((a,o)=>(a[o.local]=o,a),{})}},{get(a,o){return e().find(l=>l.local===o)},set(a,o,l){return t(o,l,"prepend")},deleteProperty(a,o){return r(o)},ownKeys(){return e().map(a=>a.local)},has(a,o){return e().some(l=>l.local===o)}})}function Qn(s,n,e){let t=i=>n[i],r=(i,a)=>{n[i]=a};return we(s,{$type:"array",push(i){n.push(Ce(i))},pop(){return pe(n.pop(),e)},unshift(i){n.unshift(Ce(i))},shift(){return pe(n.shift(),e)},splice(i,a,...o){return n.splice(i,a,...o.map(c=>Ce(c))).map(c=>pe(c,e))},find(i){return n.map(a=>pe(a,e)).find(i)},findIndex(i){return n.map(a=>pe(a,e)).findIndex(i)},includes(i){return n.map(a=>pe(a,e)).includes(i)},toJSON(){return n.map(i=>pe(i,e))}},{get(i,a){if(a==="length")return n.length;if(a===Symbol.iterator)return function*(){for(let c of n)yield pe(c,e)};if(typeof a=="symbol")return;let o=+a;if(Number.isNaN(o))return;let l=t(o);if(l)return pe(l,e)},set(i,a,o){if(typeof a=="symbol")return!1;let l=+a;return Number.isNaN(l)?!1:(r(l,Ce(o)),!0)},deleteProperty(i,a){if(typeof a=="symbol")return!1;let o=+a;return Number.isNaN(o)?!1:(n[o]=Ce(void 0),!0)},ownKeys(){return["length",...n.map((i,a)=>a.toString())]}})}function Xu(s,n){if("elements"in s)return Qn(s,s.elements,n)}function Yu(s,n){if(s.type!=="CallExpression")throw new ce("Not a function call");function e(r){if(r.type==="Identifier")return r.name;if(r.type==="MemberExpression")return`${e(r.object)}.${e(r.property)}`;throw new ce("Not implemented")}let t=Qn(s,s.arguments,n);return we(s,{$type:"function-call",$callee:e(s.callee),$args:t},{})}function Qu(s,n){if(s.type!=="ArrowFunctionExpression")throw new ce("Not an arrow function expression");let e=Qn(s,s.params,n);return we(s,{$type:"arrow-function-expression",$params:e,$body:pe(s.body,n)},{})}var Zu=pn;function ed(s,n){if(!("properties"in s))return;let e=i=>{for(let a of s.properties){if("key"in a&&"name"in a.key&&a.key.name===i)return a.value;if(a.type==="ObjectProperty"&&(a.key.type==="StringLiteral"||a.key.type==="NumericLiteral"||a.key.type==="BooleanLiteral")&&a.key.value.toString()===i)return a.value.value??a.value}},t=(i,a=!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(a)throw new ce(`Casting "${i.type}" is not supported`,{ast:i,code:n?.$code})},r=(i,a)=>{let o=s.properties.find(l=>t(l)===i);o?o.value=a:Gu(i)?s.properties.push({type:"Property",key:{type:"Identifier",name:i},value:a}):s.properties.push({type:"ObjectProperty",key:Zu.stringLiteral(i),value:a})};return we(s,{$type:"object",toJSON(){return s.properties.reduce((i,a)=>("key"in a&&"name"in a.key&&(i[a.key.name]=pe(a.value,n)),i),{})}},{get(i,a){let o=e(a);if(o)return pe(o,n)},set(i,a,o){return typeof a!="string"&&(a=String(a)),r(a,Ce(o)),!0},deleteProperty(i,a){typeof a!="string"&&(a=String(a));let o=s.properties.findIndex(l=>"key"in l&&"name"in l.key&&l.key.name===a);return o!==-1&&s.properties.splice(o,1),!0},ownKeys(){return s.properties.map(i=>t(i,!0)).filter(Boolean)}})}function td(s,n){if(s.type!=="NewExpression")throw new ce("Not a new expression");function e(r){if(r.type==="Identifier")return r.name;if(r.type==="MemberExpression")return`${e(r.object)}.${e(r.property)}`;throw new ce("Not implemented")}let t=Qn(s,s.arguments,n);return we(s,{$type:"new-expression",$callee:e(s.callee),$args:t},{})}function nd(s){if(s.type!=="Identifier")throw new ce("Not an identifier");return we(s,{$type:"identifier",$name:s.name},{})}function sd(s){if(s.type!=="LogicalExpression")throw new ce("Not a logical expression");return we(s,{$type:"logicalExpression"},{})}function rd(s){if(s.type!=="MemberExpression")throw new ce("Not a member expression");return we(s,{$type:"memberExpression"},{})}var br=new WeakMap;function pe(s,n){if(Ka.has(typeof s))return s;if(Hu.has(s.type))return s.value;if(br.has(s))return br.get(s);let e;switch(s.type){case"ObjectExpression":{e=ed(s,n);break}case"ArrayExpression":{e=Xu(s,n);break}case"CallExpression":{e=Yu(s,n);break}case"ArrowFunctionExpression":{e=Qu(s,n);break}case"NewExpression":{e=td(s,n);break}case"Identifier":{e=nd(s);break}case"LogicalExpression":{e=sd(s);break}case"MemberExpression":{e=rd(s);break}case"TSAsExpression":case"TSSatisfiesExpression":{e=pe(s.expression,n);break}default:throw new ce(`Casting "${s.type}" is not supported`,{ast:s,code:n?.$code})}return br.set(s,e),e}var tn=pn;function id(s,n){let e=r=>{let i=r==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let a of s.body)if(a.type===i){if(r==="default")return a.declaration;if(a.declaration&&"declarations"in a.declaration){let o=a.declaration.declarations[0];if("name"in o.id&&o.id.name===r)return o.init}}},t=(r,i)=>{let a=r==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration",o=Ce(i);for(let l of s.body)if(l.type===a){if(r==="default"){l.declaration=o;return}if(l.declaration&&"declarations"in l.declaration){let c=l.declaration.declarations[0];if("name"in c.id&&c.id.name===r){c.init=o;return}}}s.body.push(r==="default"?tn.exportDefaultDeclaration(o):tn.exportNamedDeclaration(tn.variableDeclaration("const",[tn.variableDeclarator(tn.identifier(r),o)])))};return we(s,{$type:"exports"},{get(r,i){let a=e(i);if(a)return pe(a,n)},set(r,i,a){return t(i,a),!0},ownKeys(){return s.body.flatMap(r=>r.type==="ExportDefaultDeclaration"?["default"]:r.type==="ExportNamedDeclaration"&&r.declaration&&"declarations"in r.declaration?r.declaration.declarations.map(i=>"name"in i.id?i.id.name:""):[]).filter(Boolean)},deleteProperty(r,i){let a=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let o=0;o<s.body.length;o++){let l=s.body[o];if(l.type===a){if(i==="default")return s.body.splice(o,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 s.body.splice(o,1),!0}}}return!1}})}function ad(s,n){let e=s.program;if(e.type!=="Program")throw new ce(`Cannot proxify ${s.type} as module`);let t={$code:n,$type:"module"},r=we(e,t,{ownKeys(){return["imports","exports","generate"]}});return t.exports=id(e,r),t.imports=Ju(e),t.generate=i=>Ja(r,i),r}function od(s,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,r=0,i=0,a=0,o=0,l=/(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,c={doubleQuote:0,singleQuote:0,singleParam:0,trailingComma:0},p=(s||"").split(`
|
|
14516
|
+
`),u=!1;for(let d of p){let m=d.trim();if(m.length!==0){if(e.wrapColumn&&d.length>a&&(a=d.length),e.indent){let f=d.match(/^\s+/)?.[0]||"";f.length>0&&(f.length>0&&f.length<t&&(t=f.length),f[0]===" "?r++:f.length>0&&r--)}if(m.at(-1)===";"?i++:m.length>0&&i--,e.quote||e.arrowParens){let f=m.matchAll(l);for(let b of f)if(b.groups)for(let h in c)b.groups[h]&&c[h]++}e.trailingComma&&((d.startsWith("}")||d.startsWith("]"))&&(u?o++:o--),u=m.endsWith(","))}}return{wrapColumn:a,useTabs:r>0,tabWidth:t,quote:c.singleQuote>c.doubleQuote?"single":"double",arrowParensAlways:c.singleParam>0,trailingComma:o>0||c.trailingComma>0,useSemi:i>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...n}}function ld(s,n){let e=Cu(s,{parser:n?.parser||ju(),...n});return ad(e,s)}function Ja(s,n={}){let e=s.$ast||s,t=n.format===!1||!("$code"in s)?{}:od(s.$code,n.format),{code:r,map:i}=Ru(e,{...n,...t});return{code:r,map:i}}async function Xa(s,n={}){let e=await gr.readFile(s,"utf8");return n.sourceFileName=n.sourceFileName??s,ld(e,n)}async function Ya(s,n,e){let t="$ast"in s?s.$ast:s,{code:r,map:i}=Ja(t,e);await gr.writeFile(n,r),i&&await gr.writeFile(n+".map",i)}var $f=bn(ks(),1),Hf=bn(fr(),1);function Qa(s,n){if(typeof n=="object")for(let e in n)typeof s[e]=="object"&&typeof n[e]=="object"?Qa(s[e],n[e]):s[e]=n[e]}function Nr(s){return cd(s.exports.default)}function cd(s){return s.$type==="function-call"?s.$args[0]:s}function Za(s,n,e,t){let r=Nr(s);r.modules||(r.modules=[]),r.modules.includes(n)||r.modules.push(n),e&&(r[e]||(r[e]={}),Qa(r[e],t))}import fd from"prompts";import so from"kleur";import ro from"prompts";var eo=["radix-vue","tailwind-variants","@nuxt/fonts","@nuxtjs/tailwindcss","@nuxtjs/color-mode","@nuxt/icon","@vueuse/nuxt","@tailwindcss/forms","tailwindcss-animate"],to=["typescript","prettier-plugin-tailwindcss","prettier","@ianvs/prettier-plugin-sort-imports"],no=["@nuxtjs/tailwindcss","@nuxtjs/color-mode","@vueuse/nuxt","@nuxt/icon","@nuxt/fonts"],Mr=[{title:"Nuxt 3",value:3},{title:"Nuxt 4",value:4}],It=[{title:"NPM",value:"npm"},{title:"YARN",value:"yarn"},{title:"PNPM",value:"pnpm"},{title:"BUN",value:"bun"}],Zn=[{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 io=async()=>{let s=await ro([{name:"nuxtVersion",type:"select",message:"Which Nuxt version are you using?",choices:Mr}]);return s.nuxtVersion?s.nuxtVersion:(console.log(so.red("No Nuxt version selected. Exiting...")),process.exit(0))},ao=async()=>{let s=await ro([{name:"nuxtVersion",type:"select",message:"Which Nuxt version are you using?",choices:Mr},{name:"theme",type:"autocomplete",message:"Which theme do you want to start with?",choices:Zn},{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:It}]);return!s||Object.keys(s).length<10?(console.log(so.red("Incomplete configuration submitted. Exiting...")),process.exit(0)):s};var md=process.cwd(),Lr="ui-thing.config.ts",hd={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"},bd={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"},Ft=async()=>{if(!Te.existsSync("nuxt.config.ts"))return console.log(oo.red(`No ${oo.bgWhite("nuxt.config.ts")} file found. Exiting...`)),process.exit(0);let s=await Xa(pd(md,"nuxt.config.ts")),n=Nr(s);return{nuxtConfig:s,defaultExport:n}},be=async s=>{let n=Te.existsSync(Lr),e={},t=Number(s?.nuxtVersion);if(!n||s?.force){if(t||(t=await io()),s?.yes?e=Number(t)===4?bd:hd:e=await ao(),await Te.writeFile(Lr,`export default ${JSON.stringify(e,null,2)}`),e.packageManager==="pnpm")if(Te.existsSync(".npmrc")){let{confirmCreateNpmrc:i}=await fd({type:"confirm",name:"confirmCreateNpmrc",message:"A .npmrc file already exists. Do you want to overwrite it?",initial:!1});i&&await Te.writeFile(".npmrc",`shamefully-hoist=true
|
|
14215
14517
|
strict-peer-dependencies=false
|
|
14216
|
-
`)}else await
|
|
14518
|
+
`)}else await Te.writeFile(".npmrc",`shamefully-hoist=true
|
|
14217
14519
|
strict-peer-dependencies=false
|
|
14218
|
-
`)}else e=(await ud({configFile:Lr.replace(".ts","")})).config;return dd.isEmpty(e)&&await be({force:!0}),gd(e),e},gd=s=>{s.tailwindCSSLocation&&
|
|
14219
|
-
`),console.log(Pd(
|
|
14220
|
-
${e}`)};import
|
|
14520
|
+
`)}else e=(await ud({configFile:Lr.replace(".ts","")})).config;return dd.isEmpty(e)&&await be({force:!0}),gd(e),e},gd=s=>{s.tailwindCSSLocation&&Te.ensureFileSync(s.tailwindConfigLocation),s.pluginsLocation&&Te.ensureDirSync(s.pluginsLocation),s.tailwindConfigLocation&&Te.ensureFileSync(s.tailwindCSSLocation),s.componentsLocation&&Te.ensureDirSync(s.componentsLocation),s.composablesLocation&&Te.ensureDirSync(s.composablesLocation),s.utilsLocation&&Te.ensureDirSync(s.utilsLocation)},kt=(s,n)=>(typeof n=="string"&&(n=[n]),n.forEach(e=>Za(s,e)),s),Nt=async(s,n="nuxt.config.ts")=>{await Ya(s.$ast,n)};var es=async()=>{let s=await be(),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))s[t]===void 0&&e.push(t);return!(e.length>0)};import Or from"node:fs";var pt=async s=>{try{return await Or.promises.access(s,Or.constants.F_OK||Or.constants.W_OK),!0}catch{return!1}};import*as ns from"fs";import*as lo from"path";import{execa as Br}from"execa";import ts from"lodash";import yd from"ora";function vd(){let s=lo.join(process.cwd(),"package.json"),n=!1;if(ns.existsSync(s)){let e=ns.readFileSync(s,"utf-8");JSON.parse(e).scripts?.postinstall&&(n=!0)}return n}var Fe=async(s,n,e)=>{typeof n=="string"&&(n=[n]),typeof e=="string"&&(e=[e]);let t=yd("Installing dependencies...").start();!ts.isUndefined(n)&&!ts.isEmpty(n)&&await Br(s,[s==="yarn"?"add":"install",...n]),t.text="Installing dev dependencies...",!ts.isUndefined(e)&&!ts.isEmpty(e)&&await Br(s,[s==="yarn"?"add":"install","-D",...e]),vd()&&(t.text="Running postinstall script...",await Br(s,["run","postinstall"])),t.succeed("Installed dependencies!")};import xd from"prompts";var co=async s=>{let n={yup:["yup","@vee-validate/yup"],zod:["zod","@vee-validate/zod"],joi:["joi","@vee-validate/joi"],valibot:["valibot","@vee-validate/valibot"]},{validator:e}=await xd({type:"select",name:"validator",message:"Choose the validator package to use with Vee Validate: ",choices:[{title:"Yup",value:"yup"},{title:"Zod",value:"zod"},{title:"Joi",value:"joi"},{title:"Valibot",value:"valibot"}]});if(!e){console.log("No validator package selected");return}return console.log(`Selected ${e} as the validator package`),n[e]&&await Fe(s,n[e]),e};import Pd from"boxen";import Cd from"figlet";var ge=(s,n,e)=>{console.log(`
|
|
14521
|
+
`),console.log(Pd(Cd.textSync(s),{borderColor:"greenBright",padding:1,borderStyle:"round",titleAlignment:"center",...n})),e&&console.log(`
|
|
14522
|
+
${e}`)};import wd from"prompts";var po=async s=>{if(s)return Ut.map(e=>e.value);let{components:n}=await wd({type:"autocompleteMultiselect",name:"components",message:"Select the components you want to add",choices:Ut.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 Ur from"node:fs";import Td from"node:path";var un=async(s,n)=>{if(!await pt(s)){let t=Td.dirname(s);Ur.existsSync(t)||Ur.mkdirSync(t,{recursive:!0})}Ur.writeFileSync(s,n)};var mn=process.cwd(),ss=s=>Ut.find(n=>n.value.toLowerCase()===s.toLowerCase()),uo=new Dd().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(s,n)=>{let e=await Ft(),t=await be();await es()||(t=await be({force:!0})),fn.isEmpty(t)&&(Me.info("Config file not set. Exiting..."),process.exit(0));let i=s;if(i.length===0){let d=await po(n.all);(d&&d.length===0||!d)&&(Me.info("No components selected. Exiting..."),process.exit(0)),i=d}let a=[];i.forEach(d=>{ss(d)||a.push(d)}),a.length>0&&Me.error(`The following components were not found: ${ue.bgRed(a.join(", "))}`);let o=[];i.forEach(d=>{ss(d)&&o.push(ss(d))});for(let d=0;d<o.length;d++){let m=o[d];if(m.components)for(let f=0;f<m.components.length;f++){let b=m.components[f];o.find(h=>h.value===b)||o.push(ss(b))}}for(let d=0;d<o.length;d++){let m=o[d];e:for(let f=0;f<m.files.length;f++){let b=m.files[f],h=b.fileName,y=t.componentsLocation,C=dn.join(mn,y,h);if(!t.useDefaultFilename){let x=await Mt({type:"text",name:"value",message:"Where should we add the file",initial:y,onRender(P){this.msg=P.bgCyan(" Location ")+` Where should we add the file ${P.cyan(`${h}`)} `}});x.value&&(y=x.value,C=dn.join(mn,x.value,h))}if(await pt(C)&&!t.force&&!(await Mt({type:"confirm",name:"value",message:`The file that we are trying to add ${ue.bold(h)} to is already taken. Overwrite?`,initial:!1})).value){Me.info(`We will not overwrite the file for ${ue.cyan(h)}`);continue e}await un(C,b.fileContent),m.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")),m.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 x=0;x<m.utils.length;x++){let P=m.utils[x],T=dn.join(mn,t.utilsLocation,P.fileName);if(await pt(T)&&!t.force&&!(await Mt({type:"confirm",name:"value",message:`The utils file that we are trying to add ${ue.bold(P.fileName)} already exists. Overwrite?`,initial:!0})).value){Me.info(`We will not overwrite the file for ${ue.cyan(P.fileName)}`);continue t}await un(T,P.fileContent)}t:for(let x=0;x<m.composables.length;x++){let P=m.composables[x],T=dn.join(mn,t.composablesLocation,P.fileName);if(await pt(T)&&!t.force&&!(await Mt({type:"confirm",name:"value",message:`The composables file that we are trying to add ${ue.bold(P.fileName)} already exists. Overwrite?`,initial:!0})).value){Me.info(`We will not overwrite the file for ${ue.cyan(P.fileName)}`);continue t}await un(T,P.fileContent)}t:for(let x=0;x<m.plugins.length;x++){let P=m.plugins[x],T=dn.join(mn,t.pluginsLocation??P.dirPath,P.fileName);if(await pt(T)&&!t.force&&!(await Mt({type:"confirm",name:"value",message:`The plugins file that we are trying to add ${ue.bold(P.fileName)} already exists. Overwrite?`,initial:!0})).value){Me.info(`We will not overwrite the file for ${ue.cyan(P.fileName)}`);continue t}await un(T,P.fileContent)}}}kt(e.nuxtConfig,fn.uniq(o.map(d=>d.nuxtModules||[]).flat())),await Nt(e.nuxtConfig,"nuxt.config.ts");let l=fn.uniq(o.map(d=>d.deps||[]).flat()),c=fn.uniq(o.map(d=>d.devDeps||[]).flat());if(l.length>0||c.length>0)if(n.all)await Fe(t.packageManager,l,c);else{let{confirmInstall:d}=await Mt({type:"confirm",name:"confirmInstall",message:`Do you want to install the following packages: ${ue.cyan(l.join(", "))} ${ue.cyan(c.join(", "))}`,initial:!0});d&&await Fe(t.packageManager,l,c)}let p=!1;for(let d of o)if(d.askValidator){p=!0;break}p&&await co(t.packageManager),ge("All Done!",{title:"Components Added"},`Run the ${ue.cyan("ui-thing@latest --help")} command to learn more.
|
|
14221
14523
|
`);let u=o.map(d=>d.instructions).flat();fn.remove(u,d=>!d),u.length>0&&(console.log(""),console.log(ue.bgCyan(" Instructions ")),u.forEach(d=>{console.log(`${ue.cyan("-")} ${d}`)}))});import{Command as Hd}from"commander";import{defu as go}from"defu";import yo from"fs-extra";import Gd from"kleur";var Ed=`@tailwind base;
|
|
14222
14524
|
@tailwind components;
|
|
14223
14525
|
@tailwind utilities;
|
|
@@ -15361,7 +15663,7 @@ export const defineShortcuts = (config: ShortcutsConfig, options: ShortcutsOptio
|
|
|
15361
15663
|
useEventListener("keydown", onKeyDown);
|
|
15362
15664
|
};
|
|
15363
15665
|
|
|
15364
|
-
`,
|
|
15666
|
+
`,Co=`export const _useShortcuts = () => {
|
|
15365
15667
|
const macOS = computed(
|
|
15366
15668
|
() =>
|
|
15367
15669
|
import.meta.client &&
|
|
@@ -15401,5 +15703,5 @@ export const defineShortcuts = (config: ShortcutsConfig, options: ShortcutsOptio
|
|
|
15401
15703
|
|
|
15402
15704
|
export const useShortcuts = createSharedComposable(_useShortcuts);
|
|
15403
15705
|
|
|
15404
|
-
`;var
|
|
15706
|
+
`;var wo=async(s=process.cwd())=>{let n=await be(),e=_r(s,n.composablesLocation);await Rr.ensureDir(e),await Rr.writeFile(_r(e,"defineShortcuts.ts"),Po,"utf-8"),await Rr.writeFile(_r(e,"useShortcuts.ts"),Co,"utf-8")};var To=new Kd().command("shortcuts").name("shortcuts").description("Add the defineShortcuts & useShortcuts composables to your project.").action(async()=>{await wo();let s=await Ft();kt(s.nuxtConfig,["@vueuse/nuxt"]),await Nt(s.nuxtConfig,"nuxt.config.ts");let{pkgManager:n}=await Jd({name:"pkgManager",type:"select",message:"Which package manager are you using?",choices:It});if(!n)return process.exit(0);await Fe(n,void 0,["@vueuse/math","@vueuse/nuxt"]),ge("All Done!",{title:"Shortcuts Added"},"Check the composables folder for the defineShortcuts & useShortcuts composables.")});import{Command as Xd}from"commander";import Do from"fs-extra";import jr from"lodash";import Eo from"prompts";var So=new Xd().command("theme").name("theme").description("Add a new theme to your project.").action(async()=>{let s=await be();await es()||(s=await be({force:!0})),jr.isEmpty(s)&&(Me.info("Config file not set. Exiting..."),process.exit(0));let{theme:e}=await Eo([{name:"theme",type:"autocomplete",message:"Which theme do you want to add?",choices:Zn}]);if(!e)return console.log("No theme selected. Exiting..."),process.exit(0);if(Do.existsSync(s.tailwindCSSLocation)){let{force:t}=await Eo([{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)}Do.writeFileSync(s.tailwindCSSLocation,rs(e.toUpperCase()),"utf-8"),ge(`${jr.capitalize(e)}`,{title:"New Theme Added"},`${jr.capitalize(e)} theme has been added to ${s.tailwindCSSLocation}`)});process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));process.on("SIGTSTP",()=>process.exit(0));var Ao=new Yd;console.clear();ge("UI Thing",{title:"Welcome"});console.log();Ao.name("ui-thing").description("CLI for adding ui-thing components to your Nuxt 3 application").version(zr).addCommand(vo).addCommand(uo).addCommand(So).addCommand(To).addCommand(xo);Ao.parse(process.argv);
|
|
15405
15707
|
//# sourceMappingURL=index.js.map
|