30 lines
316 KiB
JavaScript
30 lines
316 KiB
JavaScript
|
var v=(l,h)=>()=>(h||l((h={exports:{}}).exports,h),h.exports);var de=v((Rf,ai)=>{var Dt=function(l){return l&&l.Math==Math&&l};ai.exports=Dt(typeof globalThis=="object"&&globalThis)||Dt(typeof window=="object"&&window)||Dt(typeof self=="object"&&self)||Dt(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var me=v((jf,ni)=>{ni.exports=function(l){try{return!!l()}catch{return!0}}});var Se=v((qf,oi)=>{var yh=me();oi.exports=!yh(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var Ft=v((Uf,li)=>{var xh=me();li.exports=!xh(function(){var l=function(){}.bind();return typeof l!="function"||l.hasOwnProperty("prototype")})});var Ot=v(($f,hi)=>{var gh=Ft(),Lt=Function.prototype.call;hi.exports=gh?Lt.bind(Lt):function(){return Lt.apply(Lt,arguments)}});var fi=v(pi=>{"use strict";var ui={}.propertyIsEnumerable,ci=Object.getOwnPropertyDescriptor,Ph=ci&&!ui.call({1:2},1);pi.f=Ph?function(h){var f=ci(this,h);return!!f&&f.enumerable}:ui});var Ps=v((zf,di)=>{di.exports=function(l,h){return{enumerable:!(l&1),configurable:!(l&2),writable:!(l&4),value:h}}});var ye=v((Vf,xi)=>{var mi=Ft(),yi=Function.prototype,As=yi.call,Ah=mi&&yi.bind.bind(As,As);xi.exports=mi?Ah:function(l){return function(){return As.apply(l,arguments)}}});var lt=v((Kf,Pi)=>{var gi=ye(),Th=gi({}.toString),vh=gi("".slice);Pi.exports=function(l){return vh(Th(l),8,-1)}});var Ti=v((Wf,Ai)=>{var Eh=ye(),bh=me(),Ch=lt(),Ts=Object,Sh=Eh("".split);Ai.exports=bh(function(){return!Ts("z").propertyIsEnumerable(0)})?function(l){return Ch(l)=="String"?Sh(l,""):Ts(l)}:Ts});var vs=v((Gf,vi)=>{vi.exports=function(l){return l==null}});var Es=v((Jf,Ei)=>{var wh=vs(),Ih=TypeError;Ei.exports=function(l){if(wh(l))throw Ih("Can't call method on "+l);return l}});var Bt=v((Xf,bi)=>{var Nh=Ti(),kh=Es();bi.exports=function(l){return Nh(kh(l))}});var Cs=v((Yf,Ci)=>{var bs=typeof document=="object"&&document.all,Dh=typeof bs>"u"&&bs!==void 0;Ci.exports={all:bs,IS_HTMLDDA:Dh}});var ue=v((Qf,wi)=>{var Si=Cs(),Fh=Si.all;wi.exports=Si.IS_HTMLDDA?function(l){return typeof l=="function"||l===Fh}:function(l){return typeof l=="function"}});var qe=v((Zf,ki)=>{var Ii=ue(),Ni=Cs(),Lh=Ni.all;ki.exports=Ni.IS_HTMLDDA?function(l){return typeof l=="object"?l!==null:Ii(l)||l===Lh}:function(l){return typeof l=="object"?l!==null:Ii(l)}});var ht=v((ed,Di)=>{var Ss=de(),Oh=ue(),Bh=function(l){return Oh(l)?l:void 0};Di.exports=function(l,h){return arguments.length<2?Bh(Ss[l]):Ss[l]&&Ss[l][h]}});var Li=v((td,Fi)=>{var Mh=ye();Fi.exports=Mh({}.isPrototypeOf)});var Bi=v((sd,Oi)=>{var _h=ht();Oi.exports=_h("navigator","userAgent")||""});var $i=v((rd,Ui)=>{var qi=de(),ws=Bi(),Mi=qi.process,_i=qi.Deno,Ri=Mi&&Mi.versions||_i&&_i.version,ji=Ri&&Ri.v8,xe,Mt;ji&&(xe=ji.split("."),Mt=xe[0]>0&&xe[0]<4?1:+(xe[0]+xe[1]));!Mt&&ws&&(xe=ws.match(/Edge\/(\d+)/),(!xe||xe[1]>=74)&&(xe=ws.match(/Chrome\/(\d+)/),xe&&(Mt=+xe[1])));Ui.exports=Mt});var Is=v((id,zi)=>{var Hi=$i(),Rh=me();zi.exports=!!Object.getOwnPropertySymbols&&!Rh(function(){var l=Symbol();return!String(l)||!(Object(l)instanceof Symbol)||!Symbol.sham&&Hi&&Hi<41})});var Ns=v((ad,Vi)=>{var jh=Is();Vi.exports=jh&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var ks=v((nd,Ki)=>{var qh=ht(),Uh=ue(),$h=Li(),Hh=Ns(),zh=Object;Ki.exports=Hh?function(l){return typeof l=="symbol"}:function(l){var h=qh("Symbol");return Uh(h)&&$h(h.prototype,zh(l))}});var Gi=v((od,Wi)=>{var Vh=String;Wi.exports=function(l){try{return Vh(l)}catch{return"Object"}}});var _t=v((ld,Ji)=>{var Kh=ue(),Wh=Gi(),Gh=TypeError;Ji.exports=function(l){if(Kh(l))return l;throw Gh(Wh(l)+" is not a function")}});var Yi=v((hd,Xi)=>{var Jh=_t(),Xh=vs();Xi.exports=function(l,h){var f=l[h];return Xh(f)?void 0:Jh(f)}});var Zi=v((ud,Qi)=>{var Ds=Ot(),Fs=ue(),Ls=qe(),Yh=TypeError;Qi.exports=function(l,h){var f,d;if(h==="string"&&Fs(f=l.toString)&&!Ls(d=Ds(f,l))||Fs(f=l.valueOf)&&!Ls(d=Ds(f,l))||h!=="string"&&Fs(f=l.toString)&&!Ls(d=Ds(f,l)))return d;throw Yh("Can't convert object to primitive value")}});var ta=v((cd,ea)=>{ea.exports=!1});var Rt=v((pd,ra
|
||
|
`);return y===-1?d:d.slice(0,y)}h.exports=f}}),xf=W({"src/utils/text/skip-inline-comment.js"(l,h){"use strict";K();function f(d,y){if(y===!1)return!1;if(d.charAt(y)==="/"&&d.charAt(y+1)==="*"){for(let g=y+2;g<d.length;++g)if(d.charAt(g)==="*"&&d.charAt(g+1)==="/")return g+2}return y}h.exports=f}}),gf=W({"src/utils/text/skip-newline.js"(l,h){"use strict";K();function f(d,y,g){let A=g&&g.backwards;if(y===!1)return!1;let E=d.charAt(y);if(A){if(d.charAt(y-1)==="\r"&&E===`
|
||
|
`)return y-2;if(E===`
|
||
|
`||E==="\r"||E==="\u2028"||E==="\u2029")return y-1}else{if(E==="\r"&&d.charAt(y+1)===`
|
||
|
`)return y+2;if(E===`
|
||
|
`||E==="\r"||E==="\u2028"||E==="\u2029")return y+1}return y}h.exports=f}}),co=W({"src/utils/text/skip.js"(l,h){"use strict";K();function f(E){return(S,L,I)=>{let C=I&&I.backwards;if(L===!1)return!1;let{length:O}=S,R=L;for(;R>=0&&R<O;){let N=S.charAt(R);if(E instanceof RegExp){if(!E.test(N))return R}else if(!E.includes(N))return R;C?R--:R++}return R===-1||R===O?R:!1}}var d=f(/\s/),y=f(" "),g=f(",; "),A=f(/[^\n\r]/);h.exports={skipWhitespace:d,skipSpaces:y,skipToLineEnd:g,skipEverythingButNewLine:A}}}),Pf=W({"src/utils/text/skip-trailing-comment.js"(l,h){"use strict";K();var{skipEverythingButNewLine:f}=co();function d(y,g){return g===!1?!1:y.charAt(g)==="/"&&y.charAt(g+1)==="/"?f(y,g):g}h.exports=d}}),Af=W({"src/utils/text/get-next-non-space-non-comment-character-index-with-start-index.js"(l,h){"use strict";K();var f=xf(),d=gf(),y=Pf(),{skipSpaces:g}=co();function A(E,S){let L=null,I=S;for(;I!==L;)L=I,I=g(E,I),I=f(E,I),I=y(E,I),I=d(E,I);return I}h.exports=A}}),po={};ff(po,{EOL:()=>cr,arch:()=>Tf,cpus:()=>Ao,default:()=>Co,endianness:()=>fo,freemem:()=>go,getNetworkInterfaces:()=>bo,hostname:()=>mo,loadavg:()=>yo,networkInterfaces:()=>Eo,platform:()=>vf,release:()=>vo,tmpDir:()=>hr,tmpdir:()=>ur,totalmem:()=>Po,type:()=>To,uptime:()=>xo});function fo(){if(typeof Gt>"u"){var l=new ArrayBuffer(2),h=new Uint8Array(l),f=new Uint16Array(l);if(h[0]=1,h[1]=2,f[0]===258)Gt="BE";else if(f[0]===513)Gt="LE";else throw new Error("unable to figure out endianess")}return Gt}function mo(){return typeof globalThis.location<"u"?globalThis.location.hostname:""}function yo(){return[]}function xo(){return 0}function go(){return Number.MAX_VALUE}function Po(){return Number.MAX_VALUE}function Ao(){return[]}function To(){return"Browser"}function vo(){return typeof globalThis.navigator<"u"?globalThis.navigator.appVersion:""}function Eo(){}function bo(){}function Tf(){return"javascript"}function vf(){return"browser"}function hr(){return"/tmp"}var Gt,ur,cr,Co,Ef=ho({"node-modules-polyfills:os"(){K(),ur=hr,cr=`
|
||
|
`,Co={EOL:cr,tmpdir:ur,tmpDir:hr,networkInterfaces:Eo,getNetworkInterfaces:bo,release:vo,type:To,cpus:Ao,totalmem:Po,freemem:go,uptime:xo,loadavg:yo,hostname:mo,endianness:fo}}}),bf=W({"node-modules-polyfills-commonjs:os"(l,h){K();var f=(Ef(),mf(po));if(f&&f.default){h.exports=f.default;for(let d in f)h.exports[d]=f[d]}else f&&(h.exports=f)}}),Cf=W({"node_modules/detect-newline/index.js"(l,h){"use strict";K();var f=d=>{if(typeof d!="string")throw new TypeError("Expected a string");let y=d.match(/(?:\r?\n)/g)||[];if(y.length===0)return;let g=y.filter(E=>E===`\r
|
||
|
`).length,A=y.length-g;return g>A?`\r
|
||
|
`:`
|
||
|
`};h.exports=f,h.exports.graceful=d=>typeof d=="string"&&f(d)||`
|
||
|
`}}),Sf=W({"node_modules/jest-docblock/build/index.js"(l){"use strict";K(),Object.defineProperty(l,"__esModule",{value:!0}),l.extract=R,l.parse=H,l.parseWithComments=J,l.print=D,l.strip=N;function h(){let u=bf();return h=function(){return u},u}function f(){let u=d(Cf());return f=function(){return u},u}function d(u){return u&&u.__esModule?u:{default:u}}var y=/\*\/$/,g=/^\/\*\*?/,A=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,E=/(^|\s+)\/\/([^\r\n]*)/g,S=/^(\r?\n)+/,L=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,I=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,C=/(\r?\n|^) *\* ?/g,O=[];function R(u){let X=u.match(A);return X?X[0].trimLeft():""}function N(u){let X=u.match(A);return X&&X[0]?u.substring(X[0].length):u}function H(u){return J(u).pragmas}function J(u){let X=(0,f().default)(u)||h().EOL;u=u.replace(g,"").replace(y,"").replace(C,"$1");let ne="";for(;ne!==u;)ne=u,u=u.replace(L,`${X}$1 $2${X}`);u=u.replace(S,"").trimRight();let Q=Object.create(null),we=u.replace(I,"").replace(S,"").trimRight(),ee;for(;ee=I.exec(u);){let U=ee[2].replace(E,"");typeof Q[ee[1]]=="string"||Array.isArray(Q[ee[1]])?Q[ee[1]]=O.concat(Q[ee[1]],U):Q[ee[1]]=U}return{comments:we,pragmas:Q}}function D(u){let{comments:X="",pragmas:ne={}}=u,Q=(0,f().default)(X)||h().EOL,we="/**",ee=" *",U=" */",B=Object.keys(ne),T=B.map(V=>_(V,ne[V])).reduce((V,Y)=>V.concat(Y),[]).map(V=>`${ee} ${V}${Q}`).join("");if(!X){if(B.length===0)return"";if(B.length===1&&!Array.isArray(ne[B[0]])){let V=ne[B[0]];return`${we} ${_(B[0],V)[0]}${U}`}}let Oe=X.split(Q).map(V=>`${ee} ${V}`).join(Q)+Q;return we+Q+(X?Oe:"")+(X&&B.length?ee+Q:"")+T+U}function _(u,X){return O.concat(X).map(ne=>`@${u} ${ne}`.trim())}}}),wf=W({"src/common/end-of-line.js"(l,h){"use strict";K();function f(A){let E=A.indexOf("\r");return E>=0?A.charAt(E+1)===`
|
||
|
`?"crlf":"cr":"lf"}function d(A){switch(A){case"cr":return"\r";case"crlf":return`\r
|
||
|
`;default:return`
|
||
|
`}}function y(A,E){let S;switch(E){case`
|
||
|
`:S=/\n/g;break;case"\r":S=/\r/g;break;case`\r
|
||
|
`:S=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(E)}.`)}let L=A.match(S);return L?L.length:0}function g(A){return A.replace(/\r\n?/g,`
|
||
|
`)}h.exports={guessEndOfLine:f,convertEndOfLineToChars:d,countEndOfLineChars:y,normalizeEndOfLine:g}}}),If=W({"src/language-js/pragma.js"(l,h){"use strict";K();var{parseWithComments:f,strip:d,extract:y,print:g}=Sf(),{normalizeEndOfLine:A}=wf(),E=uo();function S(C){let O=E(C);O&&(C=C.slice(O.length+1));let R=y(C),{pragmas:N,comments:H}=f(R);return{shebang:O,text:C,pragmas:N,comments:H}}function L(C){let O=Object.keys(S(C).pragmas);return O.includes("prettier")||O.includes("format")}function I(C){let{shebang:O,text:R,pragmas:N,comments:H}=S(C),J=d(R),D=g({pragmas:Object.assign({format:""},N),comments:H.trimStart()});return(O?`${O}
|
||
|
`:"")+A(D)+(J.startsWith(`
|
||
|
`)?`
|
||
|
`:`
|
||
|
|
||
|
`)+J}h.exports={hasPragma:L,insertPragma:I}}}),dr=W({"src/utils/is-non-empty-array.js"(l,h){"use strict";K();function f(d){return Array.isArray(d)&&d.length>0}h.exports=f}}),So=W({"src/language-js/loc.js"(l,h){"use strict";K();var f=dr();function d(S){var L,I;let C=S.range?S.range[0]:S.start,O=(L=(I=S.declaration)===null||I===void 0?void 0:I.decorators)!==null&&L!==void 0?L:S.decorators;return f(O)?Math.min(d(O[0]),C):C}function y(S){return S.range?S.range[1]:S.end}function g(S,L){let I=d(S);return Number.isInteger(I)&&I===d(L)}function A(S,L){let I=y(S);return Number.isInteger(I)&&I===y(L)}function E(S,L){return g(S,L)&&A(S,L)}h.exports={locStart:d,locEnd:y,hasSameLocStart:g,hasSameLoc:E}}}),wo=W({"src/language-js/parse/utils/create-parser.js"(l,h){"use strict";K();var{hasPragma:f}=If(),{locStart:d,locEnd:y}=So();function g(A){return A=typeof A=="function"?{parse:A}:A,Object.assign({astFormat:"estree",hasPragma:f,locStart:d,locEnd:y},A)}h.exports=g}}),mr=W({"src/common/parser-create-error.js"(l,h){"use strict";K();function f(d,y){let g=new SyntaxError(d+" ("+y.start.line+":"+y.start.column+")");return g.loc=y,g}h.exports=f}}),Io=W({"src/language-js/parse/utils/create-babel-parse-error.js"(l,h){"use strict";K();var f=mr();function d(y){let{message:g,loc:A}=y;return f(g.replace(/ \(.*\)/,""),{start:{line:A?A.line:0,column:A?A.column+1:0}})}h.exports=d}}),Nf=W({"src/language-js/utils/is-ts-keyword-type.js"(l,h){"use strict";K();function f(d){let{type:y}=d;return y.startsWith("TS")&&y.endsWith("Keyword")}h.exports=f}}),kf=W({"src/language-js/utils/is-block-comment.js"(l,h){"use strict";K();var f=new Set(["Block","CommentBlock","MultiLine"]),d=y=>f.has(y==null?void 0:y.type);h.exports=d}}),Df=W({"src/language-js/utils/is-type-cast-comment.js"(l,h){"use strict";K();var f=kf();function d(y){return f(y)&&y.value[0]==="*"&&/@(?:type|satisfies)\b/.test(y.value)}h.exports=d}}),Ff=W({"src/utils/get-last.js"(l,h){"use strict";K();var f=d=>d[d.length-1];h.exports=f}}),No=W({"src/language-js/parse/postprocess/visit-node.js"(l,h){"use strict";K();function f(d,y){if(Array.isArray(d)){for(let g=0;g<d.length;g++)d[g]=f(d[g],y);return d}if(d&&typeof d=="object"&&typeof d.type=="string"){let g=Object.keys(d);for(let A=0;A<g.length;A++)d[g[A]]=f(d[g[A]],y);return y(d)||d}return d}h.exports=f}}),ko=W({"src/language-js/parse/postprocess/throw-syntax-error.js"(l,h){"use strict";K();var f=mr();function d(y,g){let{start:A,end:E}=y.loc;throw f(g,{start:{line:A.line,column:A.column+1},end:{line:E.line,column:E.column+1}})}h.exports=d}}),Lf=W({"src/language-js/parse/postprocess/typescript.js"(l,h){"use strict";K();var f=dr(),d=No(),y=ko(),g={AbstractKeyword:126,SourceFile:308,PropertyDeclaration:169};function A(I){for(;I&&I.kind!==g.SourceFile;)I=I.parent;return I}function E(I){let{illegalDecorators:C}=I;if(!f(C))return;let[{expression:O}]=C,R=A(O),[N,H]=[O.pos,O.end].map(J=>{let{line:D,character:_}=R.getLineAndCharacterOfPosition(J);return{line:D+1,column:_}});y({loc:{start:N,end:H}},"Decorators are not valid here.")}function S(I,C){I.kind!==g.PropertyDeclaration||I.modifiers&&!I.modifiers.some(O=>O.kind===g.AbstractKeyword)||I.initializer&&C.value===null&&y(C,"Abstract property cannot have an initializer")}function L(I,C){let{esTreeNodeToTSNodeMap:O,tsNodeToESTreeNodeMap:R}=C.tsParseResult;d(I,N=>{let H=O.get(N);if(!H)return;let J=R.get(H);J===N&&(E(H),S(H,J))})}h.exports={throwErrorForInvalidNodes:L}}}),Of=W({"src/language-js/parse/postprocess/index.js"(l,h){"use strict";K();var{locStart:f,locEnd:d}=So(),y=Nf(),g=Df(),A=Ff(),E=No(),{throwErrorForInvalidNodes:S}=Lf(),L=ko();function I(N,H){if(H.parser==="typescript"&&/@|abstract/.test(H.originalText)&&S(N,H),H.parser!=="typescript"&&H.parser!=="flow"&&H.parser!=="acorn"&&H.parser!=="espree"&&H.parser!=="meriyah"){let D=new Set;N=E(N,_=>{_.leadingComments&&_.leadingComments.some(g)&&D.add(f(_))}),N=E(N,_=>{if(_.type==="ParenthesizedExpression"){let{expression:u}=_;if(u.type==="TypeCastExpression")return u.range=_.range,u;let X=f(_);if(!D.has(X))return u.extra=Object.assign(Object.assign({},u.extra
|
||
|
- Did you mean \`export { '${r}' as '${e}' } from 'some-module'\`?`},ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:t=>{let{type:r}=t;return`'${r==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`},ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:t=>{let{type:r}=t;return`Unsyntactic ${r==="BreakStatement"?"break":"continue"}.`},IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:t=>{let{importName:r}=t;return`A string literal cannot be used as an imported binding.
|
||
|
- Did you mean \`import { "${r}" as foo }\`?`},ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:t=>{let{maxArgumentCount:r}=t;return`\`import()\` requires exactly ${r===1?"one argument":"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:t=>{let{radix:r}=t;return`Expected number in radix ${r}.`},InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:t=>{let{reservedWord:r}=t;return`Escape sequence in keyword ${r}.`},InvalidIdentifier:t=>{let{identifierName:r}=t;return`Invalid identifier ${r}.`},InvalidLhs:t=>{let{ancestor:r}=t;return`Invalid left-hand side in ${I(r)}.`},InvalidLhsBinding:t=>{let{ancestor:r}=t;return`Binding invalid left-hand side in ${I(r)}.`},InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:t=>{let{unexpected:r}=t;return`Unexpected character '${r}'.`},InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:t=>{let{identifierName:r}=t;return`Private name #${r} is not defined.`},InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:t=>{let{labelName:r}=t;return`Label '${r}' is already declared.`},LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations.",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:t=>{let{missingPlugin:r}=t;return`This experimental syntax requires enabling the parser plugin: ${r.map(e=>JSON.stringify(e)).join(", ")}.`},MissingOneOfPlugins:t=>{let{missingPlugin:r}=t;return`This experimental syntax requires enabling one of the following parser plugin(s): ${r.map(e=>JSON.stringify(e)).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:t=>{let{key:r}=t;return`Duplicate key "${r}" is not allowed in module attributes.`},ModuleExportNameHasLoneSurrogate:t=>{let{surrogateCharCode:r}=t;return`An export name cannot include a lone surrogate, found '\\u${r.toString(16)}'.`},ModuleExportUndefined:t=>{let{localName:r}=t;return`Export '${r}' is not defined.`},MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are
|
||
|
`,++e,b===13&&r.charCodeAt(e)===10&&++e,++i,x=s=e):a.unterminated(n,o,c):++e}return{pos:e,str:p,firstInvalidLoc:m,lineStart:s,curLine:i,containsInvalid:!!m}}function xl(t,r,e,s){return t==="template"?r===96||r===36&&e.charCodeAt(s+1)===123:r===(t==="double"?34:39)}function gl(t,r,e,s,i,a){let n=!i;r++;let o=p=>({pos:r,ch:p,lineStart:e,curLine:s}),c=t.charCodeAt(r++);switch(c){case 110:return o(`
|
||
|
`);case 114:return o("\r");case 120:{let p;return{code:p,pos:r}=fs(t,r,e,s,2,!1,n,a),o(p===null?null:String.fromCharCode(p))}case 117:{let p;return{code:p,pos:r}=jr(t,r,e,s,n,a),o(p===null?null:String.fromCodePoint(p))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:t.charCodeAt(r)===10&&++r;case 10:e=r,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);a.strictNumericEscape(r-1,e,s);default:if(c>=48&&c<=55){let p=r-1,x=t.slice(p,r+2).match(/^[0-7]+/)[0],P=parseInt(x,8);P>255&&(x=x.slice(0,-1),P=parseInt(x,8)),r+=x.length-1;let b=t.charCodeAt(r);if(x!=="0"||b===56||b===57){if(i)return o(null);a.strictNumericEscape(p,e,s)}return o(String.fromCharCode(P))}return o(String.fromCharCode(c))}}function fs(t,r,e,s,i,a,n,o){let c=r,p;return{n:p,pos:r}=Rr(t,r,e,s,16,i,a,!1,o,!n),p===null&&(n?o.invalidEscapeSequence(c,e,s):r=c-1),{code:p,pos:r}}function Rr(t,r,e,s,i,a,n,o,c,p){let m=r,x=i===16?Mr.hex:Mr.decBinOct,P=i===16?Ct.hex:i===10?Ct.dec:i===8?Ct.oct:Ct.bin,b=!1,M=0;for(let q=0,te=a==null?1/0:a;q<te;++q){let se=t.charCodeAt(r),Z;if(se===95&&o!=="bail"){let ie=t.charCodeAt(r-1),Ye=t.charCodeAt(r+1);if(o){if(Number.isNaN(Ye)||!P(Ye)||x.has(ie)||x.has(Ye)){if(p)return{n:null,pos:r};c.unexpectedNumericSeparator(r,e,s)}}else{if(p)return{n:null,pos:r};c.numericSeparatorInEscapeSequence(r,e,s)}++r;continue}if(se>=97?Z=se-97+10:se>=65?Z=se-65+10:yl(se)?Z=se-48:Z=1/0,Z>=i){if(Z<=9&&p)return{n:null,pos:r};if(Z<=9&&c.invalidDigit(r,e,s,i))Z=0;else if(n)Z=0,b=!0;else break}++r,M=M*i+Z}return r===m||a!=null&&r-m!==a||b?{n:null,pos:r}:{n:M,pos:r}}function jr(t,r,e,s,i,a){let n=t.charCodeAt(r),o;if(n===123){if(++r,{code:o,pos:r}=fs(t,r,e,s,t.indexOf("}",r)-r,!0,i,a),++r,o!==null&&o>1114111)if(i)a.invalidCodePoint(r,e,s);else return{code:null,pos:r}}else({code:o,pos:r}=fs(t,r,e,s,4,!1,i,a));return{code:o,pos:r}}var Pl=["at"],Al=["at"];function nt(t,r,e){return new f(e,t-r,t)}var Tl=new Set([103,109,115,105,121,117,100,118]),De=class{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new d(t.startLoc,t.endLoc)}},vl=class extends fl{constructor(t,r){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(e,s,i,a)=>this.options.errorRecovery?(this.raise(u.InvalidDigit,{at:nt(e,s,i),radix:a}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(u.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(u.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(u.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(u.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(e,s,i)=>{this.recordStrictModeErrors(u.StrictNumericEscape,{at:nt(e,s,i)})},unterminated:(e,s,i)=>{throw this.raise(u.UnterminatedString,{at:nt(e-1,s,i)})}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(u.StrictNumericEscape),unterminated:(e,s,i)=>{throw this.raise(u.UnterminatedTemplate,{at:nt(e,s,i)})}}),this.state=new Br,this.state.init(t),this.input=r,this.length=r.length,this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new De(this.state)),this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!
|
||
|
`:`\r
|
||
|
`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(e){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(u.UnterminatedString,{at:this.state.startLoc});let a=this.input.charCodeAt(this.state.pos);if(a===e)break;a===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):at(a)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}return s+=this.input.slice(i,this.state.pos++),this.finishToken(131,s)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)==59);)++this.state.pos;if(i){let a=this.input.slice(e,this.state.pos),n=Ul[a];if(++this.state.pos,n)return n}}return this.state.pos=e,"&"}jsxReadWord(){let e,s=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(ze(e)||e===45);return this.finishToken(138,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(138)?e.name=this.state.value:Xt(this.state.type)?e.name=Ie(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(14))return s;let i=this.startNodeAt(e);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(16);){let i=this.startNodeAt(e);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(U.brace),this.next(),e=this.jsxParseExpressionContainer(e,U.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(Re.AttributeIsEmpty,{at:e}),e;case 140:case 131:return this.parseExprAtom();default:throw this.raise(Re.UnsupportedJsxValue,{at: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(U.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,s){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();e.expression=i}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(U.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(U.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 s=this.startNodeAt(e);return this.eat(141)?this.finishNode(s,"JSXOpeningFragment"):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(e){let s=[];for(;!this.match(56)&&!this.match(141);)s.push(this.jsxParseAttribute());return e.attributes=s,e.selfClosing=this.eat(56),this.expect(141),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let s=this.startNodeAt(e);return this.eat(141)?this.finishNode(s,"JSXClosingFragment"):(s.name=this.jsxParseElementName(),this.expect(141),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(e){let s=this.startNodeAt(e),i=[],a=this.jsxParseOpeningElementAt(e),n=null;if(!a.selfClosing){e:for(;;)switc
|
||
|
`),cooked:i===null?null:i.slice(1,c)},n.tail=o,this.next();let m=this.finishNode(n,"TemplateElement");return this.resetEndLocation(m,y(this.state.lastTokEndLoc,c)),m}parseTemplate(t){let r=this.startNode();r.expressions=[];let e=this.parseTemplateElement(t);for(r.quasis=[e];!e.tail;)r.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.quasis.push(e=this.parseTemplateElement(t));return this.finishNode(r,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,r,e,s){e&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=Object.create(null),n=!0,o=this.startNode();for(o.properties=[],this.next();!this.match(t);){if(n)n=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(o);break}let p;r?p=this.parseBindingProperty():(p=this.parsePropertyDefinition(s),this.checkProto(p,e,a,s)),e&&!this.isObjectProperty(p)&&p.type!=="SpreadElement"&&this.raise(u.InvalidRecordProperty,{at:p}),p.shorthand&&this.addExtra(p,"shorthand",!0),o.properties.push(p)}this.next(),this.state.inFSharpPipelineDirectBody=i;let c="ObjectExpression";return r?c="ObjectPattern":e&&(c="RecordExpression"),this.finishNode(o,c)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStart),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let r=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(u.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)r.push(this.parseDecorator());let e=this.startNode(),s=!1,i=!1,a;if(this.match(21))return r.length&&this.unexpected(),this.parseSpread();r.length&&(e.decorators=r,r=[]),e.method=!1,t&&(a=this.state.startLoc);let n=this.eat(55);this.parsePropertyNamePrefixOperator(e);let o=this.state.containsEsc,c=this.parsePropertyName(e,t);if(!n&&!o&&this.maybeAsyncOrAccessorProp(e)){let p=c.name;p==="async"&&!this.hasPrecedingLineBreak()&&(s=!0,this.resetPreviousNodeTrailingComments(c),n=this.eat(55),this.parsePropertyName(e)),(p==="get"||p==="set")&&(i=!0,this.resetPreviousNodeTrailingComments(c),e.kind=p,this.match(55)&&(n=!0,this.raise(u.AccessorIsGenerator,{at:this.state.curPosition(),kind:p}),this.next()),this.parsePropertyName(e))}return this.parseObjPropValue(e,a,n,s,!1,i,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var r;let e=this.getGetterSetterExpectedParamCount(t),s=this.getObjectOrClassMethodParams(t);s.length!==e&&this.raise(t.kind==="get"?u.BadGetterArity:u.BadSetterArity,{at:t}),t.kind==="set"&&((r=s[s.length-1])==null?void 0:r.type)==="RestElement"&&this.raise(u.BadSetterRestParameter,{at:t})}parseObjectMethod(t,r,e,s,i){if(i){let a=this.parseMethod(t,r,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(e||r||this.match(10))return s&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,r,e,!1,!1,"ObjectMethod")}parseObjectProperty(t,r,e,s){if(t.shorthand=!1,this.eat(14))return t.value=e?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(s),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),e)t.value=this.parseMaybeDefault(r,Ce(t.key));else if(this.match(29)){let i=this.state.startLoc;s!=null?s.shorthandAssignLoc===null&&(s.shorthandAssignLoc=i):this.raise(u.InvalidCoverInitializedName,{at:i}),t.value=this.parseMaybeDefault(r,Ce(t.key))}else t.value=Ce(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,r,e,s,i,a,n){let o=this.parseObjectMethod(t,e,s,i,a)||this.parseObjectProperty(t,r,i,n);return o||this.unexpected(),o}parsePropertyName(t,r){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:e,value:s}=this.stat
|