You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
317 KiB
30 lines
317 KiB
1 month ago
|
var v=(l,h)=>()=>(h||l((h={exports:{}}).exports,h),h.exports);var he=v((qf,ii)=>{var Nt=function(l){return l&&l.Math==Math&&l};ii.exports=Nt(typeof globalThis=="object"&&globalThis)||Nt(typeof window=="object"&&window)||Nt(typeof self=="object"&&self)||Nt(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var ce=v((Uf,ai)=>{ai.exports=function(l){try{return!!l()}catch{return!0}}});var ve=v(($f,ni)=>{var xh=ce();ni.exports=!xh(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var kt=v((Hf,oi)=>{var gh=ce();oi.exports=!gh(function(){var l=function(){}.bind();return typeof l!="function"||l.hasOwnProperty("prototype")})});var Ft=v((zf,li)=>{var Ph=kt(),Dt=Function.prototype.call;li.exports=Ph?Dt.bind(Dt):function(){return Dt.apply(Dt,arguments)}});var pi=v(ci=>{"use strict";var hi={}.propertyIsEnumerable,ui=Object.getOwnPropertyDescriptor,Ah=ui&&!hi.call({1:2},1);ci.f=Ah?function(h){var f=ui(this,h);return!!f&&f.enumerable}:hi});var Ps=v((Kf,fi)=>{fi.exports=function(l,h){return{enumerable:!(l&1),configurable:!(l&2),writable:!(l&4),value:h}}});var pe=v((Wf,yi)=>{var di=kt(),mi=Function.prototype,As=mi.call,Th=di&&mi.bind.bind(As,As);yi.exports=di?Th:function(l){return function(){return As.apply(l,arguments)}}});var st=v((Gf,gi)=>{var xi=pe(),vh=xi({}.toString),Eh=xi("".slice);gi.exports=function(l){return Eh(vh(l),8,-1)}});var Ai=v((Jf,Pi)=>{var Ch=pe(),bh=ce(),Sh=st(),Ts=Object,wh=Ch("".split);Pi.exports=bh(function(){return!Ts("z").propertyIsEnumerable(0)})?function(l){return Sh(l)=="String"?wh(l,""):Ts(l)}:Ts});var vs=v((Xf,Ti)=>{Ti.exports=function(l){return l==null}});var Es=v((Yf,vi)=>{var Ih=vs(),Nh=TypeError;vi.exports=function(l){if(Ih(l))throw Nh("Can't call method on "+l);return l}});var Lt=v((Qf,Ei)=>{var kh=Ai(),Dh=Es();Ei.exports=function(l){return kh(Dh(l))}});var bs=v((Zf,Ci)=>{var Cs=typeof document=="object"&&document.all,Fh=typeof Cs>"u"&&Cs!==void 0;Ci.exports={all:Cs,IS_HTMLDDA:Fh}});var ie=v((ed,Si)=>{var bi=bs(),Lh=bi.all;Si.exports=bi.IS_HTMLDDA?function(l){return typeof l=="function"||l===Lh}:function(l){return typeof l=="function"}});var Oe=v((td,Ni)=>{var wi=ie(),Ii=bs(),Oh=Ii.all;Ni.exports=Ii.IS_HTMLDDA?function(l){return typeof l=="object"?l!==null:wi(l)||l===Oh}:function(l){return typeof l=="object"?l!==null:wi(l)}});var rt=v((sd,ki)=>{var Ss=he(),Bh=ie(),Mh=function(l){return Bh(l)?l:void 0};ki.exports=function(l,h){return arguments.length<2?Mh(Ss[l]):Ss[l]&&Ss[l][h]}});var Fi=v((rd,Di)=>{var _h=pe();Di.exports=_h({}.isPrototypeOf)});var Oi=v((id,Li)=>{var Rh=rt();Li.exports=Rh("navigator","userAgent")||""});var Ui=v((ad,qi)=>{var ji=he(),ws=Oi(),Bi=ji.process,Mi=ji.Deno,_i=Bi&&Bi.versions||Mi&&Mi.version,Ri=_i&&_i.v8,fe,Ot;Ri&&(fe=Ri.split("."),Ot=fe[0]>0&&fe[0]<4?1:+(fe[0]+fe[1]));!Ot&&ws&&(fe=ws.match(/Edge\/(\d+)/),(!fe||fe[1]>=74)&&(fe=ws.match(/Chrome\/(\d+)/),fe&&(Ot=+fe[1])));qi.exports=Ot});var Is=v((nd,Hi)=>{var $i=Ui(),jh=ce();Hi.exports=!!Object.getOwnPropertySymbols&&!jh(function(){var l=Symbol();return!String(l)||!(Object(l)instanceof Symbol)||!Symbol.sham&&$i&&$i<41})});var Ns=v((od,zi)=>{var qh=Is();zi.exports=qh&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var ks=v((ld,Vi)=>{var Uh=rt(),$h=ie(),Hh=Fi(),zh=Ns(),Vh=Object;Vi.exports=zh?function(l){return typeof l=="symbol"}:function(l){var h=Uh("Symbol");return $h(h)&&Hh(h.prototype,Vh(l))}});var Wi=v((hd,Ki)=>{var Kh=String;Ki.exports=function(l){try{return Kh(l)}catch{return"Object"}}});var Bt=v((ud,Gi)=>{var Wh=ie(),Gh=Wi(),Jh=TypeError;Gi.exports=function(l){if(Wh(l))return l;throw Jh(Gh(l)+" is not a function")}});var Xi=v((cd,Ji)=>{var Xh=Bt(),Yh=vs();Ji.exports=function(l,h){var f=l[h];return Yh(f)?void 0:Xh(f)}});var Qi=v((pd,Yi)=>{var Ds=Ft(),Fs=ie(),Ls=Oe(),Qh=TypeError;Yi.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 Qh("Can't convert object to primitive value")}});var ea=v((fd,Zi)=>{Zi.exports=!1});var Mt=v((dd,sa
|
||
|
`);return x===-1?d:d.slice(0,x)}h.exports=f}}),gf=$({"src/utils/text/skip-inline-comment.js"(l,h){"use strict";U();function f(d,x){if(x===!1)return!1;if(d.charAt(x)==="/"&&d.charAt(x+1)==="*"){for(let P=x+2;P<d.length;++P)if(d.charAt(P)==="*"&&d.charAt(P+1)==="/")return P+2}return x}h.exports=f}}),Pf=$({"src/utils/text/skip-newline.js"(l,h){"use strict";U();function f(d,x,P){let m=P&&P.backwards;if(x===!1)return!1;let E=d.charAt(x);if(m){if(d.charAt(x-1)==="\r"&&E===`
|
||
|
`)return x-2;if(E===`
|
||
|
`||E==="\r"||E==="\u2028"||E==="\u2029")return x-1}else{if(E==="\r"&&d.charAt(x+1)===`
|
||
|
`)return x+2;if(E===`
|
||
|
`||E==="\r"||E==="\u2028"||E==="\u2029")return x+1}return x}h.exports=f}}),uo=$({"src/utils/text/skip.js"(l,h){"use strict";U();function f(E){return(S,k,L)=>{let N=L&&L.backwards;if(k===!1)return!1;let{length:O}=S,A=k;for(;A>=0&&A<O;){let _=S.charAt(A);if(E instanceof RegExp){if(!E.test(_))return A}else if(!E.includes(_))return A;N?A--:A++}return A===-1||A===O?A:!1}}var d=f(/\s/),x=f(" "),P=f(",; "),m=f(/[^\n\r]/);h.exports={skipWhitespace:d,skipSpaces:x,skipToLineEnd:P,skipEverythingButNewLine:m}}}),Af=$({"src/utils/text/skip-trailing-comment.js"(l,h){"use strict";U();var{skipEverythingButNewLine:f}=uo();function d(x,P){return P===!1?!1:x.charAt(P)==="/"&&x.charAt(P+1)==="/"?f(x,P):P}h.exports=d}}),Tf=$({"src/utils/text/get-next-non-space-non-comment-character-index-with-start-index.js"(l,h){"use strict";U();var f=gf(),d=Pf(),x=Af(),{skipSpaces:P}=uo();function m(E,S){let k=null,L=S;for(;L!==k;)k=L,L=P(E,L),L=f(E,L),L=x(E,L),L=d(E,L);return L}h.exports=m}}),co={};df(co,{EOL:()=>cr,arch:()=>vf,cpus:()=>Po,default:()=>Co,endianness:()=>po,freemem:()=>xo,getNetworkInterfaces:()=>Eo,hostname:()=>fo,loadavg:()=>mo,networkInterfaces:()=>vo,platform:()=>Ef,release:()=>To,tmpDir:()=>hr,tmpdir:()=>ur,totalmem:()=>go,type:()=>Ao,uptime:()=>yo});function po(){if(typeof Kt>"u"){var l=new ArrayBuffer(2),h=new Uint8Array(l),f=new Uint16Array(l);if(h[0]=1,h[1]=2,f[0]===258)Kt="BE";else if(f[0]===513)Kt="LE";else throw new Error("unable to figure out endianess")}return Kt}function fo(){return typeof globalThis.location<"u"?globalThis.location.hostname:""}function mo(){return[]}function yo(){return 0}function xo(){return Number.MAX_VALUE}function go(){return Number.MAX_VALUE}function Po(){return[]}function Ao(){return"Browser"}function To(){return typeof globalThis.navigator<"u"?globalThis.navigator.appVersion:""}function vo(){}function Eo(){}function vf(){return"javascript"}function Ef(){return"browser"}function hr(){return"/tmp"}var Kt,ur,cr,Co,Cf=lo({"node-modules-polyfills:os"(){U(),ur=hr,cr=`
|
||
|
`,Co={EOL:cr,tmpdir:ur,tmpDir:hr,networkInterfaces:vo,getNetworkInterfaces:Eo,release:To,type:Ao,cpus:Po,totalmem:go,freemem:xo,uptime:yo,loadavg:mo,hostname:fo,endianness:po}}}),bf=$({"node-modules-polyfills-commonjs:os"(l,h){U();var f=(Cf(),yf(co));if(f&&f.default){h.exports=f.default;for(let d in f)h.exports[d]=f[d]}else f&&(h.exports=f)}}),Sf=$({"node_modules/detect-newline/index.js"(l,h){"use strict";U();var f=d=>{if(typeof d!="string")throw new TypeError("Expected a string");let x=d.match(/(?:\r?\n)/g)||[];if(x.length===0)return;let P=x.filter(E=>E===`\r
|
||
|
`).length,m=x.length-P;return P>m?`\r
|
||
|
`:`
|
||
|
`};h.exports=f,h.exports.graceful=d=>typeof d=="string"&&f(d)||`
|
||
|
`}}),wf=$({"node_modules/jest-docblock/build/index.js"(l){"use strict";U(),Object.defineProperty(l,"__esModule",{value:!0}),l.extract=A,l.parse=W,l.parseWithComments=I,l.print=F,l.strip=_;function h(){let M=bf();return h=function(){return M},M}function f(){let M=d(Sf());return f=function(){return M},M}function d(M){return M&&M.__esModule?M:{default:M}}var x=/\*\/$/,P=/^\/\*\*?/,m=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,E=/(^|\s+)\/\/([^\r\n]*)/g,S=/^(\r?\n)+/,k=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,L=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,N=/(\r?\n|^) *\* ?/g,O=[];function A(M){let V=M.match(m);return V?V[0].trimLeft():""}function _(M){let V=M.match(m);return V&&V[0]?M.substring(V[0].length):M}function W(M){return I(M).pragmas}function I(M){let V=(0,f().default)(M)||h().EOL;M=M.replace(P,"").replace(x,"").replace(N,"$1");let ee="";for(;ee!==M;)ee=M,M=M.replace(k,`${V}$1 $2${V}`);M=M.replace(S,"").trimRight();let b=Object.create(null),B=M.replace(L,"").replace(S,"").trimRight(),te;for(;te=L.exec(M);){let R=te[2].replace(E,"");typeof b[te[1]]=="string"||Array.isArray(b[te[1]])?b[te[1]]=O.concat(b[te[1]],R):b[te[1]]=R}return{comments:B,pragmas:b}}function F(M){let{comments:V="",pragmas:ee={}}=M,b=(0,f().default)(V)||h().EOL,B="/**",te=" *",R=" */",ae=Object.keys(ee),se=ae.map(H=>z(H,ee[H])).reduce((H,X)=>H.concat(X),[]).map(H=>`${te} ${H}${b}`).join("");if(!V){if(ae.length===0)return"";if(ae.length===1&&!Array.isArray(ee[ae[0]])){let H=ee[ae[0]];return`${B} ${z(ae[0],H)[0]}${R}`}}let _e=V.split(b).map(H=>`${te} ${H}`).join(b)+b;return B+b+(V?_e:"")+(V&&ae.length?te+b:"")+se+R}function z(M,V){return O.concat(V).map(ee=>`@${M} ${ee}`.trim())}}}),If=$({"src/common/end-of-line.js"(l,h){"use strict";U();function f(m){let E=m.indexOf("\r");return E>=0?m.charAt(E+1)===`
|
||
|
`?"crlf":"cr":"lf"}function d(m){switch(m){case"cr":return"\r";case"crlf":return`\r
|
||
|
`;default:return`
|
||
|
`}}function x(m,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 k=m.match(S);return k?k.length:0}function P(m){return m.replace(/\r\n?/g,`
|
||
|
`)}h.exports={guessEndOfLine:f,convertEndOfLineToChars:d,countEndOfLineChars:x,normalizeEndOfLine:P}}}),Nf=$({"src/language-js/pragma.js"(l,h){"use strict";U();var{parseWithComments:f,strip:d,extract:x,print:P}=wf(),{normalizeEndOfLine:m}=If(),E=ho();function S(N){let O=E(N);O&&(N=N.slice(O.length+1));let A=x(N),{pragmas:_,comments:W}=f(A);return{shebang:O,text:N,pragmas:_,comments:W}}function k(N){let O=Object.keys(S(N).pragmas);return O.includes("prettier")||O.includes("format")}function L(N){let{shebang:O,text:A,pragmas:_,comments:W}=S(N),I=d(A),F=P({pragmas:Object.assign({format:""},_),comments:W.trimStart()});return(O?`${O}
|
||
|
`:"")+m(F)+(I.startsWith(`
|
||
|
`)?`
|
||
|
`:`
|
||
|
|
||
|
`)+I}h.exports={hasPragma:k,insertPragma:L}}}),bo=$({"src/utils/is-non-empty-array.js"(l,h){"use strict";U();function f(d){return Array.isArray(d)&&d.length>0}h.exports=f}}),So=$({"src/language-js/loc.js"(l,h){"use strict";U();var f=bo();function d(S){var k,L;let N=S.range?S.range[0]:S.start,O=(k=(L=S.declaration)===null||L===void 0?void 0:L.decorators)!==null&&k!==void 0?k:S.decorators;return f(O)?Math.min(d(O[0]),N):N}function x(S){return S.range?S.range[1]:S.end}function P(S,k){let L=d(S);return Number.isInteger(L)&&L===d(k)}function m(S,k){let L=x(S);return Number.isInteger(L)&&L===x(k)}function E(S,k){return P(S,k)&&m(S,k)}h.exports={locStart:d,locEnd:x,hasSameLocStart:P,hasSameLoc:E}}}),wo=$({"src/language-js/parse/utils/create-parser.js"(l,h){"use strict";U();var{hasPragma:f}=Nf(),{locStart:d,locEnd:x}=So();function P(m){return m=typeof m=="function"?{parse:m}:m,Object.assign({astFormat:"estree",hasPragma:f,locStart:d,locEnd:x},m)}h.exports=P}}),dr=$({"src/common/parser-create-error.js"(l,h){"use strict";U();function f(d,x){let P=new SyntaxError(d+" ("+x.start.line+":"+x.start.column+")");return P.loc=x,P}h.exports=f}}),Io=$({"src/language-js/parse/utils/create-babel-parse-error.js"(l,h){"use strict";U();var f=dr();function d(x){let{message:P,loc:m}=x;return f(P.replace(/ \(.*\)/,""),{start:{line:m?m.line:0,column:m?m.column+1:0}})}h.exports=d}}),kf=$({"src/language-js/utils/is-ts-keyword-type.js"(l,h){"use strict";U();function f(d){let{type:x}=d;return x.startsWith("TS")&&x.endsWith("Keyword")}h.exports=f}}),Df=$({"src/language-js/utils/is-block-comment.js"(l,h){"use strict";U();var f=new Set(["Block","CommentBlock","MultiLine"]),d=x=>f.has(x==null?void 0:x.type);h.exports=d}}),Ff=$({"src/language-js/utils/is-type-cast-comment.js"(l,h){"use strict";U();var f=Df();function d(x){return f(x)&&x.value[0]==="*"&&/@(?:type|satisfies)\b/.test(x.value)}h.exports=d}}),Lf=$({"src/utils/get-last.js"(l,h){"use strict";U();var f=d=>d[d.length-1];h.exports=f}}),Of=$({"src/language-js/parse/postprocess/visit-node.js"(l,h){"use strict";U();function f(d,x){if(Array.isArray(d)){for(let P=0;P<d.length;P++)d[P]=f(d[P],x);return d}if(d&&typeof d=="object"&&typeof d.type=="string"){let P=Object.keys(d);for(let m=0;m<P.length;m++)d[P[m]]=f(d[P[m]],x);return x(d)||d}return d}h.exports=f}}),Bf=$({"src/language-js/parse/postprocess/throw-syntax-error.js"(l,h){"use strict";U();var f=dr();function d(x,P){let{start:m,end:E}=x.loc;throw f(P,{start:{line:m.line,column:m.column+1},end:{line:E.line,column:E.column+1}})}h.exports=d}}),Mf=$({"src/language-js/parse/postprocess/index.js"(l,h){"use strict";U();var{locStart:f,locEnd:d}=So(),x=kf(),P=Ff(),m=Lf(),E=Of(),S=Bf();function k(A,_){if(_.parser!=="typescript"&&_.parser!=="flow"&&_.parser!=="acorn"&&_.parser!=="espree"&&_.parser!=="meriyah"){let I=new Set;A=E(A,F=>{F.leadingComments&&F.leadingComments.some(P)&&I.add(f(F))}),A=E(A,F=>{if(F.type==="ParenthesizedExpression"){let{expression:z}=F;if(z.type==="TypeCastExpression")return z.range=F.range,z;let M=f(F);if(!I.has(M))return z.extra=Object.assign(Object.assign({},z.extra),{},{parenthesized:!0}),z}})}return A=E(A,I=>{switch(I.type){case"ChainExpression":return L(I.expression);case"LogicalExpression":{if(N(I))return O(I);break}case"VariableDeclaration":{let F=m(I.declarations);F&&F.init&&W(I,F);break}case"TSParenthesizedType":return x(I.typeAnnotation)||I.typeAnnotation.type==="TSThisType"||(I.typeAnnotation.range=[f(I),d(I)]),I.typeAnnotation;case"TSTypeParameter":if(typeof I.name=="string"){let F=f(I);I.name={type:"Identifier",name:I.name,range:[F,F+I.name.length]}}break;case"ObjectExpression":if(_.parser==="typescript"){let F=I.properties.find(z=>z.type==="Property"&&z.value.type==="TSEmptyBodyFunctionExpression");F&&S(F.value,"Unexpected token.")}break;case"SequenceExpression":{let F=m(I.expressions);I.range=[f(I),Math.min(d(F),d(I))];break}case"TopicReference":_.__isUsingHackPipeline=!0;break;case"ExportAllDeclaration":{let{exported:F}=I;if(_.parser==="meriyah"&&F&&F.type==="Identifier"){let z=_.originalText.slice(f(F),d(F));(z.startsWi
|
||
|
- 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 ${Xt(r)}.`},InvalidLhsBinding:t=>{let{ancestor:r}=t;return`Binding invalid left-hand side in ${Xt(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 ar
|
||
|
`,++e,C===13&&r.charCodeAt(e)===10&&++e,++i,g=s=e):a.unterminated(n,o,u):++e}return{pos:e,str:c,firstInvalidLoc:y,lineStart:s,curLine:i,containsInvalid:!!y}}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=c=>({pos:r,ch:c,lineStart:e,curLine:s}),u=t.charCodeAt(r++);switch(u){case 110:return o(`
|
||
|
`);case 114:return o("\r");case 120:{let c;return{code:c,pos:r}=fs(t,r,e,s,2,!1,n,a),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:r}=Rr(t,r,e,s,n,a),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: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(u>=48&&u<=55){let c=r-1,g=t.slice(c,r+2).match(/^[0-7]+/)[0],T=parseInt(g,8);T>255&&(g=g.slice(0,-1),T=parseInt(g,8)),r+=g.length-1;let C=t.charCodeAt(r);if(g!=="0"||C===56||C===57){if(i)return o(null);a.strictNumericEscape(c,e,s)}return o(String.fromCharCode(T))}return o(String.fromCharCode(u))}}function fs(t,r,e,s,i,a,n,o){let u=r,c;return{n:c,pos:r}=_r(t,r,e,s,16,i,a,!1,o,!n),c===null&&(n?o.invalidEscapeSequence(u,e,s):r=u-1),{code:c,pos:r}}function _r(t,r,e,s,i,a,n,o,u,c){let y=r,g=i===16?Br.hex:Br.decBinOct,T=i===16?Et.hex:i===10?Et.dec:i===8?Et.oct:Et.bin,C=!1,j=0;for(let q=0,G=a==null?1/0:a;q<G;++q){let J=t.charCodeAt(r),K;if(J===95&&o!=="bail"){let Z=t.charCodeAt(r-1),We=t.charCodeAt(r+1);if(o){if(Number.isNaN(We)||!T(We)||g.has(Z)||g.has(We)){if(c)return{n:null,pos:r};u.unexpectedNumericSeparator(r,e,s)}}else{if(c)return{n:null,pos:r};u.numericSeparatorInEscapeSequence(r,e,s)}++r;continue}if(J>=97?K=J-97+10:J>=65?K=J-65+10:yl(J)?K=J-48:K=1/0,K>=i){if(K<=9&&c)return{n:null,pos:r};if(K<=9&&u.invalidDigit(r,e,s,i))K=0;else if(n)K=0,C=!0;else break}++r,j=j*i+K}return r===y||a!=null&&r-y!==a||C?{n:null,pos:r}:{n:j,pos:r}}function Rr(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 et(t,r,e){return new Ce(e,t-r,t)}var Tl=new Set([103,109,115,105,121,117,100,118]),Se=class{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new ft(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(p.InvalidDigit,{at:et(e,s,i),radix:a}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(p.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(p.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(p.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(p.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(e,s,i)=>{this.recordStrictModeErrors(p.StrictNumericEscape,{at:et(e,s,i)})},unterminated:(e,s,i)=>{throw this.raise(p.UnterminatedString,{at:et(e-1,s,i)})}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(p.StrictNumericEscape),unterminated:(e,s,i)=>{throw this.raise(p.UnterminatedTemplate,{at:et(e,s,i)})}}),this.state=new Or,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 Se(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=!0,this.nex
|
||
|
`:`\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(p.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):Ze(a)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}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(je(e)||e===45);this.finishToken(138,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(138)?e.name=this.state.value:Ee(this.state.type)?e.name=Y(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(x.brace),this.next(),e=this.jsxParseExpressionContainer(e,x.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(Fe.AttributeIsEmpty,{at:e}),e;case 140:case 131:return this.parseExprAtom();default:throw this.raise(Fe.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(x.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(x.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(x.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(;;)switch(this.state.ty
|
||
|
`),cooked:i===null?null:i.slice(1,u)},n.tail=o,this.next();let y=this.finishNode(n,"TemplateElement");return this.resetEndLocation(y,re(this.state.lastTokEndLoc,u)),y}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 c;r?c=this.parseBindingProperty():(c=this.parsePropertyDefinition(s),this.checkProto(c,e,a,s)),e&&!this.isObjectProperty(c)&&c.type!=="SpreadElement"&&this.raise(p.InvalidRecordProperty,{at:c}),c.shorthand&&this.addExtra(c,"shorthand",!0),o.properties.push(c)}this.next(),this.state.inFSharpPipelineDirectBody=i;let u="ObjectExpression";return r?u="ObjectPattern":e&&(u="RecordExpression"),this.finishNode(o,u)}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(p.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,u=this.parsePropertyName(e,t);if(!n&&!o&&this.maybeAsyncOrAccessorProp(e)){let c=u.name;c==="async"&&!this.hasPrecedingLineBreak()&&(s=!0,this.resetPreviousNodeTrailingComments(u),n=this.eat(55),this.parsePropertyName(e)),(c==="get"||c==="set")&&(i=!0,this.resetPreviousNodeTrailingComments(u),e.kind=c,this.match(55)&&(n=!0,this.raise(p.AccessorIsGenerator,{at:this.state.curPosition(),kind:c}),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"?p.BadGetterArity:p.BadSetterArity,{at:t}),t.kind==="set"&&((r=s[s.length-1])==null?void 0:r.type)==="RestElement"&&this.raise(p.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,Te(t.key));else if(this.match(29)){let i=this.state.startLoc;s!=null?s.shorthandAssignLoc===null&&(s.shorthandAssignLoc=i):this.raise(p.InvalidCoverInitializedName,{at:i}),t.value=this.parseMaybeDefault(r,Te(t.key))}else t.value=Te(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.sta
|