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.

29 lines
317 KiB

1 year ago
(function(e){if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var i=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};i.prettierPlugins=i.prettierPlugins||{},i.prettierPlugins.babel=e()}})(function(){"use strict";var v=(l,h)=>()=>(h||l((h={exports:{}}).exports,h),h.exports);var le=v((md,oi)=>{var St=function(l){return l&&l.Math==Math&&l};oi.exports=St(typeof globalThis=="object"&&globalThis)||St(typeof window=="object"&&window)||St(typeof self=="object"&&self)||St(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var he=v((yd,li)=>{li.exports=function(l){try{return!!l()}catch{return!0}}});var ve=v((xd,hi)=>{var Nh=he();hi.exports=!Nh(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var wt=v((gd,ui)=>{var kh=he();ui.exports=!kh(function(){var l=function(){}.bind();return typeof l!="function"||l.hasOwnProperty("prototype")})});var Nt=v((Pd,ci)=>{var Dh=wt(),It=Function.prototype.call;ci.exports=Dh?It.bind(It):function(){return It.apply(It,arguments)}});var mi=v(di=>{"use strict";var pi={}.propertyIsEnumerable,fi=Object.getOwnPropertyDescriptor,Fh=fi&&!pi.call({1:2},1);di.f=Fh?function(h){var f=fi(this,h);return!!f&&f.enumerable}:pi});var As=v((Td,yi)=>{yi.exports=function(l,h){return{enumerable:!(l&1),configurable:!(l&2),writable:!(l&4),value:h}}});var ue=v((vd,Pi)=>{var xi=wt(),gi=Function.prototype,Ts=gi.call,Lh=xi&&gi.bind.bind(Ts,Ts);Pi.exports=xi?Lh:function(l){return function(){return Ts.apply(l,arguments)}}});var rt=v((Ed,Ti)=>{var Ai=ue(),Oh=Ai({}.toString),Bh=Ai("".slice);Ti.exports=function(l){return Bh(Oh(l),8,-1)}});var Ei=v((Cd,vi)=>{var Mh=ue(),_h=he(),Rh=rt(),vs=Object,jh=Mh("".split);vi.exports=_h(function(){return!vs("z").propertyIsEnumerable(0)})?function(l){return Rh(l)=="String"?jh(l,""):vs(l)}:vs});var Es=v((bd,Ci)=>{Ci.exports=function(l){return l==null}});var Cs=v((Sd,bi)=>{var qh=Es(),Uh=TypeError;bi.exports=function(l){if(qh(l))throw Uh("Can't call method on "+l);return l}});var kt=v((wd,Si)=>{var $h=Ei(),Hh=Cs();Si.exports=function(l){return $h(Hh(l))}});var Ss=v((Id,wi)=>{var bs=typeof document=="object"&&document.all,zh=typeof bs>"u"&&bs!==void 0;wi.exports={all:bs,IS_HTMLDDA:zh}});var ne=v((Nd,Ni)=>{var Ii=Ss(),Vh=Ii.all;Ni.exports=Ii.IS_HTMLDDA?function(l){return typeof l=="function"||l===Vh}:function(l){return typeof l=="function"}});var Oe=v((kd,Fi)=>{var ki=ne(),Di=Ss(),Kh=Di.all;Fi.exports=Di.IS_HTMLDDA?function(l){return typeof l=="object"?l!==null:ki(l)||l===Kh}:function(l){return typeof l=="object"?l!==null:ki(l)}});var it=v((Dd,Li)=>{var ws=le(),Wh=ne(),Gh=function(l){return Wh(l)?l:void 0};Li.exports=function(l,h){return arguments.length<2?Gh(ws[l]):ws[l]&&ws[l][h]}});var Bi=v((Fd,Oi)=>{var Jh=ue();Oi.exports=Jh({}.isPrototypeOf)});var _i=v((Ld,Mi)=>{var Xh=it();Mi.exports=Xh("navigator","userAgent")||""});var zi=v((Od,Hi)=>{var $i=le(),Is=_i(),Ri=$i.process,ji=$i.Deno,qi=Ri&&Ri.versions||ji&&ji.version,Ui=qi&&qi.v8,ce,Dt;Ui&&(ce=Ui.split("."),Dt=ce[0]>0&&ce[0]<4?1:+(ce[0]+ce[1]));!Dt&&Is&&(ce=Is.match(/Edge\/(\d+)/),(!ce||ce[1]>=74)&&(ce=Is.match(/Chrome\/(\d+)/),ce&&(Dt=+ce[1])));Hi.exports=Dt});var Ns=v((Bd,Ki)=>{var Vi=zi(),Yh=he();Ki.exports=!!Object.getOwnPropertySymbols&&!Yh(function(){var l=Symbol();return!String(l)||!(Object(l)instanceof Symbol)||!Symbol.sham&&Vi&&Vi<41})});var ks=v((Md,Wi)=>{var Qh=Ns();Wi.exports=Qh&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Ds=v((_d,Gi)=>{var Zh=it(),eu=ne(),tu=Bi(),su=ks(),ru=Object;Gi.exports=su?function(l){return typeof l=="symbol"}:function(l){var h=Zh("Symbol");return eu(h)&&tu(h.prototype,ru(l))}});var Xi=v((Rd,Ji)=>{var iu=String;Ji.exports=function(l){try{return iu(l)}catch{return"Object"}}});var Ft=v((jd,Yi)=>{var au=ne(),nu=Xi(),ou=TypeError;Yi.exports=function(l){if(au(l))return l;throw ou(nu(l)+" is not a function")}});var Zi=v((qd,Qi)=>{var lu=Ft(),hu=Es();Qi.exports=function(l,h){var f=l[h];return hu(f)?void 0:lu(f)}});var
`);return y===-1?d:d.slice(0,y)}h.exports=f}}),kf=K({"src/utils/text/skip-inline-comment.js"(l,h){"use strict";V();function f(d,y){if(y===!1)return!1;if(d.charAt(y)==="/"&&d.charAt(y+1)==="*"){for(let P=y+2;P<d.length;++P)if(d.charAt(P)==="*"&&d.charAt(P+1)==="/")return P+2}return y}h.exports=f}}),Df=K({"src/utils/text/skip-newline.js"(l,h){"use strict";V();function f(d,y,P){let g=P&&P.backwards;if(y===!1)return!1;let T=d.charAt(y);if(g){if(d.charAt(y-1)==="\r"&&T===`
`)return y-2;if(T===`
`||T==="\r"||T==="\u2028"||T==="\u2029")return y-1}else{if(T==="\r"&&d.charAt(y+1)===`
`)return y+2;if(T===`
`||T==="\r"||T==="\u2028"||T==="\u2029")return y+1}return y}h.exports=f}}),vo=K({"src/utils/text/skip.js"(l,h){"use strict";V();function f(T){return(S,F,I)=>{let C=I&&I.backwards;if(F===!1)return!1;let{length:L}=S,j=F;for(;j>=0&&j<L;){let k=S.charAt(j);if(T instanceof RegExp){if(!T.test(k))return j}else if(!T.includes(k))return j;C?j--:j++}return j===-1||j===L?j:!1}}var d=f(/\s/),y=f(" "),P=f(",; "),g=f(/[^\n\r]/);h.exports={skipWhitespace:d,skipSpaces:y,skipToLineEnd:P,skipEverythingButNewLine:g}}}),Ff=K({"src/utils/text/skip-trailing-comment.js"(l,h){"use strict";V();var{skipEverythingButNewLine:f}=vo();function d(y,P){return P===!1?!1:y.charAt(P)==="/"&&y.charAt(P+1)==="/"?f(y,P):P}h.exports=d}}),Lf=K({"src/utils/text/get-next-non-space-non-comment-character-index-with-start-index.js"(l,h){"use strict";V();var f=kf(),d=Df(),y=Ff(),{skipSpaces:P}=vo();function g(T,S){let F=null,I=S;for(;I!==F;)F=I,I=P(T,I),I=f(T,I),I=y(T,I),I=d(T,I);return I}h.exports=g}}),Eo={};Sf(Eo,{EOL:()=>pr,arch:()=>Of,cpus:()=>ko,default:()=>Bo,endianness:()=>Co,freemem:()=>Io,getNetworkInterfaces:()=>Oo,hostname:()=>bo,loadavg:()=>So,networkInterfaces:()=>Lo,platform:()=>Bf,release:()=>Fo,tmpDir:()=>ur,tmpdir:()=>cr,totalmem:()=>No,type:()=>Do,uptime:()=>wo});function Co(){if(typeof Ht>"u"){var l=new ArrayBuffer(2),h=new Uint8Array(l),f=new Uint16Array(l);if(h[0]=1,h[1]=2,f[0]===258)Ht="BE";else if(f[0]===513)Ht="LE";else throw new Error("unable to figure out endianess")}return Ht}function bo(){return typeof globalThis.location<"u"?globalThis.location.hostname:""}function So(){return[]}function wo(){return 0}function Io(){return Number.MAX_VALUE}function No(){return Number.MAX_VALUE}function ko(){return[]}function Do(){return"Browser"}function Fo(){return typeof globalThis.navigator<"u"?globalThis.navigator.appVersion:""}function Lo(){}function Oo(){}function Of(){return"javascript"}function Bf(){return"browser"}function ur(){return"/tmp"}var Ht,cr,pr,Bo,Mf=Ao({"node-modules-polyfills:os"(){V(),cr=ur,pr=`
`,Bo={EOL:pr,tmpdir:cr,tmpDir:ur,networkInterfaces:Lo,getNetworkInterfaces:Oo,release:Fo,type:Do,cpus:ko,totalmem:No,freemem:Io,uptime:wo,loadavg:So,hostname:bo,endianness:Co}}}),_f=K({"node-modules-polyfills-commonjs:os"(l,h){V();var f=(Mf(),If(Eo));if(f&&f.default){h.exports=f.default;for(let d in f)h.exports[d]=f[d]}else f&&(h.exports=f)}}),Rf=K({"node_modules/detect-newline/index.js"(l,h){"use strict";V();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 P=y.filter(T=>T===`\r
`).length,g=y.length-P;return P>g?`\r
`:`
`};h.exports=f,h.exports.graceful=d=>typeof d=="string"&&f(d)||`
`}}),jf=K({"node_modules/jest-docblock/build/index.js"(l){"use strict";V(),Object.defineProperty(l,"__esModule",{value:!0}),l.extract=j,l.parse=H,l.parseWithComments=W,l.print=B,l.strip=k;function h(){let u=_f();return h=function(){return u},u}function f(){let u=d(Rf());return f=function(){return u},u}function d(u){return u&&u.__esModule?u:{default:u}}var y=/\*\/$/,P=/^\/\*\*?/,g=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,T=/(^|\s+)\/\/([^\r\n]*)/g,S=/^(\r?\n)+/,F=/(?:^|\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,L=[];function j(u){let G=u.match(g);return G?G[0].trimLeft():""}function k(u){let G=u.match(g);return G&&G[0]?u.substring(G[0].length):u}function H(u){return W(u).pragmas}function W(u){let G=(0,f().default)(u)||h().EOL;u=u.replace(P,"").replace(y,"").replace(C,"$1");let oe="";for(;oe!==u;)oe=u,u=u.replace(F,`${G}$1 $2${G}`);u=u.replace(S,"").trimRight();let X=Object.create(null),_e=u.replace(I,"").replace(S,"").trimRight(),Z;for(;Z=I.exec(u);){let $=Z[2].replace(T,"");typeof X[Z[1]]=="string"||Array.isArray(X[Z[1]])?X[Z[1]]=L.concat(X[Z[1]],$):X[Z[1]]=$}return{comments:_e,pragmas:X}}function B(u){let{comments:G="",pragmas:oe={}}=u,X=(0,f().default)(G)||h().EOL,_e="/**",Z=" *",$=" */",M=Object.keys(oe),E=M.map(ee=>_(ee,oe[ee])).reduce((ee,fe)=>ee.concat(fe),[]).map(ee=>`${Z} ${ee}${X}`).join("");if(!G){if(M.length===0)return"";if(M.length===1&&!Array.isArray(oe[M[0]])){let ee=oe[M[0]];return`${_e} ${_(M[0],ee)[0]}${$}`}}let Je=G.split(X).map(ee=>`${Z} ${ee}`).join(X)+X;return _e+X+(G?Je:"")+(G&&M.length?Z+X:"")+E+$}function _(u,G){return L.concat(G).map(oe=>`@${u} ${oe}`.trim())}}}),qf=K({"src/common/end-of-line.js"(l,h){"use strict";V();function f(g){let T=g.indexOf("\r");return T>=0?g.charAt(T+1)===`
`?"crlf":"cr":"lf"}function d(g){switch(g){case"cr":return"\r";case"crlf":return`\r
`;default:return`
`}}function y(g,T){let S;switch(T){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(T)}.`)}let F=g.match(S);return F?F.length:0}function P(g){return g.replace(/\r\n?/g,`
`)}h.exports={guessEndOfLine:f,convertEndOfLineToChars:d,countEndOfLineChars:y,normalizeEndOfLine:P}}}),Uf=K({"src/language-js/pragma.js"(l,h){"use strict";V();var{parseWithComments:f,strip:d,extract:y,print:P}=jf(),{normalizeEndOfLine:g}=qf(),T=To();function S(C){let L=T(C);L&&(C=C.slice(L.length+1));let j=y(C),{pragmas:k,comments:H}=f(j);return{shebang:L,text:C,pragmas:k,comments:H}}function F(C){let L=Object.keys(S(C).pragmas);return L.includes("prettier")||L.includes("format")}function I(C){let{shebang:L,text:j,pragmas:k,comments:H}=S(C),W=d(j),B=P({pragmas:Object.assign({format:""},k),comments:H.trimStart()});return(L?`${L}
`:"")+g(B)+(W.startsWith(`
`)?`
`:`
`)+W}h.exports={hasPragma:F,insertPragma:I}}}),mr=K({"src/utils/is-non-empty-array.js"(l,h){"use strict";V();function f(d){return Array.isArray(d)&&d.length>0}h.exports=f}}),Mo=K({"src/language-js/loc.js"(l,h){"use strict";V();var f=mr();function d(S){var F,I;let C=S.range?S.range[0]:S.start,L=(F=(I=S.declaration)===null||I===void 0?void 0:I.decorators)!==null&&F!==void 0?F:S.decorators;return f(L)?Math.min(d(L[0]),C):C}function y(S){return S.range?S.range[1]:S.end}function P(S,F){let I=d(S);return Number.isInteger(I)&&I===d(F)}function g(S,F){let I=y(S);return Number.isInteger(I)&&I===y(F)}function T(S,F){return P(S,F)&&g(S,F)}h.exports={locStart:d,locEnd:y,hasSameLocStart:P,hasSameLoc:T}}}),_o=K({"src/language-js/parse/utils/create-parser.js"(l,h){"use strict";V();var{hasPragma:f}=Uf(),{locStart:d,locEnd:y}=Mo();function P(g){return g=typeof g=="function"?{parse:g}:g,Object.assign({astFormat:"estree",hasPragma:f,locStart:d,locEnd:y},g)}h.exports=P}}),yr=K({"src/common/parser-create-error.js"(l,h){"use strict";V();function f(d,y){let P=new SyntaxError(d+" ("+y.start.line+":"+y.start.column+")");return P.loc=y,P}h.exports=f}}),Ro=K({"src/language-js/parse/utils/create-babel-parse-error.js"(l,h){"use strict";V();var f=yr();function d(y){let{message:P,loc:g}=y;return f(P.replace(/ \(.*\)/,""),{start:{line:g?g.line:0,column:g?g.column+1:0}})}h.exports=d}}),$f=K({"src/language-js/utils/is-ts-keyword-type.js"(l,h){"use strict";V();function f(d){let{type:y}=d;return y.startsWith("TS")&&y.endsWith("Keyword")}h.exports=f}}),Hf=K({"src/language-js/utils/is-block-comment.js"(l,h){"use strict";V();var f=new Set(["Block","CommentBlock","MultiLine"]),d=y=>f.has(y==null?void 0:y.type);h.exports=d}}),zf=K({"src/language-js/utils/is-type-cast-comment.js"(l,h){"use strict";V();var f=Hf();function d(y){return f(y)&&y.value[0]==="*"&&/@(?:type|satisfies)\b/.test(y.value)}h.exports=d}}),Vf=K({"src/utils/get-last.js"(l,h){"use strict";V();var f=d=>d[d.length-1];h.exports=f}}),jo=K({"src/language-js/parse/postprocess/visit-node.js"(l,h){"use strict";V();function f(d,y){if(Array.isArray(d)){for(let P=0;P<d.length;P++)d[P]=f(d[P],y);return d}if(d&&typeof d=="object"&&typeof d.type=="string"){let P=Object.keys(d);for(let g=0;g<P.length;g++)d[P[g]]=f(d[P[g]],y);return y(d)||d}return d}h.exports=f}}),qo=K({"src/language-js/parse/postprocess/throw-syntax-error.js"(l,h){"use strict";V();var f=yr();function d(y,P){let{start:g,end:T}=y.loc;throw f(P,{start:{line:g.line,column:g.column+1},end:{line:T.line,column:T.column+1}})}h.exports=d}}),Kf=K({"src/language-js/parse/postprocess/typescript.js"(l,h){"use strict";V();var f=mr(),d=jo(),y=qo(),P={AbstractKeyword:126,SourceFile:308,PropertyDeclaration:169};function g(I){for(;I&&I.kind!==P.SourceFile;)I=I.parent;return I}function T(I){let{illegalDecorators:C}=I;if(!f(C))return;let[{expression:L}]=C,j=g(L),[k,H]=[L.pos,L.end].map(W=>{let{line:B,character:_}=j.getLineAndCharacterOfPosition(W);return{line:B+1,column:_}});y({loc:{start:k,end:H}},"Decorators are not valid here.")}function S(I,C){I.kind!==P.PropertyDeclaration||I.modifiers&&!I.modifiers.some(L=>L.kind===P.AbstractKeyword)||I.initializer&&C.value===null&&y(C,"Abstract property cannot have an initializer")}function F(I,C){let{esTreeNodeToTSNodeMap:L,tsNodeToESTreeNodeMap:j}=C.tsParseResult;d(I,k=>{let H=L.get(k);if(!H)return;let W=j.get(H);W===k&&(T(H),S(H,W))})}h.exports={throwErrorForInvalidNodes:F}}}),Wf=K({"src/language-js/parse/postprocess/index.js"(l,h){"use strict";V();var{locStart:f,locEnd:d}=Mo(),y=$f(),P=zf(),g=Vf(),T=jo(),{throwErrorForInvalidNodes:S}=Kf(),F=qo();function I(k,H){if(H.parser==="typescript"&&/@|abstract/.test(H.originalText)&&S(k,H),H.parser!=="typescript"&&H.parser!=="flow"&&H.parser!=="acorn"&&H.parser!=="espree"&&H.parser!=="meriyah"){let B=new Set;k=T(k,_=>{_.leadingComments&&_.leadingComments.some(P)&&B.add(f(_))}),k=T(k,_=>{if(_.type==="ParenthesizedExpression"){let{expression:u}=_;if(u.type==="TypeCastExpression")return u.range=_.range,u;let G=f(_);if(!B.has(G))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 kl(t,r,e,s){return t==="template"?r===96||r===36&&e.charCodeAt(s+1)===123:r===(t==="double"?34:39)}function Dl(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}=ds(t,r,e,s,2,!1,n,a),o(p===null?null:String.fromCharCode(p))}case 117:{let p;return{code:p,pos:r}=Ur(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],A=parseInt(x,8);A>255&&(x=x.slice(0,-1),A=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(A))}return o(String.fromCharCode(c))}}function ds(t,r,e,s,i,a,n,o){let c=r,p;return{n:p,pos:r}=qr(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 qr(t,r,e,s,i,a,n,o,c,p){let m=r,x=i===16?Rr.hex:Rr.decBinOct,A=i===16?At.hex:i===10?At.dec:i===8?At.oct:At.bin,b=!1,O=0;for(let R=0,Y=a==null?1/0:a;R<Y;++R){let Q=t.charCodeAt(r),J;if(Q===95&&o!=="bail"){let se=t.charCodeAt(r-1),Ve=t.charCodeAt(r+1);if(o){if(Number.isNaN(Ve)||!A(Ve)||x.has(se)||x.has(Ve)){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(Q>=97?J=Q-97+10:Q>=65?J=Q-65+10:Nl(Q)?J=Q-48:J=1/0,J>=i){if(J<=9&&p)return{n:null,pos:r};if(J<=9&&c.invalidDigit(r,e,s,i))J=0;else if(n)J=0,b=!0;else break}++r,O=O*i+J}return r===m||a!=null&&r-m!==a||b?{n:null,pos:r}:{n:O,pos:r}}function Ur(t,r,e,s,i,a){let n=t.charCodeAt(r),o;if(n===123){if(++r,{code:o,pos:r}=ds(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}=ds(t,r,e,s,4,!1,i,a));return{code:o,pos:r}}var Fl=["at"],Ll=["at"];function tt(t,r,e){return new f(e,t-r,t)}var Ol=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 d(t.startLoc,t.endLoc)}},Bl=class extends Sl{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:tt(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:tt(e,s,i)})},unterminated:(e,s,i)=>{throw this.raise(u.UnterminatedString,{at:tt(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:tt(e,s,i)})}}),this.state=new _r,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(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):et(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=eh[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(Re(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:Yt(this.state.type)?e.name=Ee(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($.brace),this.next(),e=this.jsxParseExpressionContainer(e,$.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($.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($.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext($.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,Te(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,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.stat