hugo-batsite/node_modules/prettier/esm/parser-babel.mjs

28 lines
306 KiB
JavaScript
Raw Normal View History

2022-05-27 15:11:53 +00:00
"use strict";var b=(h,l)=>()=>(l||h((l={exports:{}}).exports,l),l.exports);var X=b((hf,Gr)=>{var Et=function(h){return h&&h.Math==Math&&h};Gr.exports=Et(typeof globalThis=="object"&&globalThis)||Et(typeof window=="object"&&window)||Et(typeof self=="object"&&self)||Et(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var Ee=b((lf,Xr)=>{Xr.exports=function(h){try{return!!h()}catch{return!0}}});var Be=b((uf,Jr)=>{var Wh=Ee();Jr.exports=!Wh(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var bt=b((cf,Yr)=>{var Gh=Ee();Yr.exports=!Gh(function(){var h=function(){}.bind();return typeof h!="function"||h.hasOwnProperty("prototype")})});var Ct=b((pf,$r)=>{var Xh=bt(),vt=Function.prototype.call;$r.exports=Xh?vt.bind(vt):function(){return vt.apply(vt,arguments)}});var ti=b(ei=>{"use strict";var Qr={}.propertyIsEnumerable,Zr=Object.getOwnPropertyDescriptor,Jh=Zr&&!Qr.call({1:2},1);ei.f=Jh?function(l){var p=Zr(this,l);return!!p&&p.enumerable}:Qr});var ds=b((df,si)=>{si.exports=function(h,l){return{enumerable:!(h&1),configurable:!(h&2),writable:!(h&4),value:l}}});var le=b((mf,ai)=>{var ri=bt(),ii=Function.prototype,Yh=ii.bind,ms=ii.call,$h=ri&&Yh.bind(ms,ms);ai.exports=ri?function(h){return h&&$h(h)}:function(h){return h&&function(){return ms.apply(h,arguments)}}});var St=b((yf,oi)=>{var ni=le(),Qh=ni({}.toString),Zh=ni("".slice);oi.exports=function(h){return Zh(Qh(h),8,-1)}});var li=b((xf,hi)=>{var el=X(),tl=le(),sl=Ee(),rl=St(),ys=el.Object,il=tl("".split);hi.exports=sl(function(){return!ys("z").propertyIsEnumerable(0)})?function(h){return rl(h)=="String"?il(h,""):ys(h)}:ys});var xs=b((gf,ui)=>{var al=X(),nl=al.TypeError;ui.exports=function(h){if(h==null)throw nl("Can't call method on "+h);return h}});var wt=b((Af,ci)=>{var ol=li(),hl=xs();ci.exports=function(h){return ol(hl(h))}});var ue=b((Pf,pi)=>{pi.exports=function(h){return typeof h=="function"}});var Me=b((Tf,fi)=>{var ll=ue();fi.exports=function(h){return typeof h=="object"?h!==null:ll(h)}});var tt=b((Ef,di)=>{var gs=X(),ul=ue(),cl=function(h){return ul(h)?h:void 0};di.exports=function(h,l){return arguments.length<2?cl(gs[h]):gs[h]&&gs[h][l]}});var yi=b((bf,mi)=>{var pl=le();mi.exports=pl({}.isPrototypeOf)});var gi=b((vf,xi)=>{var fl=tt();xi.exports=fl("navigator","userAgent")||""});var Ci=b((Cf,vi)=>{var bi=X(),As=gi(),Ai=bi.process,Pi=bi.Deno,Ti=Ai&&Ai.versions||Pi&&Pi.version,Ei=Ti&&Ti.v8,fe,Nt;Ei&&(fe=Ei.split("."),Nt=fe[0]>0&&fe[0]<4?1:+(fe[0]+fe[1]));!Nt&&As&&(fe=As.match(/Edge\/(\d+)/),(!fe||fe[1]>=74)&&(fe=As.match(/Chrome\/(\d+)/),fe&&(Nt=+fe[1])));vi.exports=Nt});var Ps=b((Sf,wi)=>{var Si=Ci(),dl=Ee();wi.exports=!!Object.getOwnPropertySymbols&&!dl(function(){var h=Symbol();return!String(h)||!(Object(h)instanceof Symbol)||!Symbol.sham&&Si&&Si<41})});var Ts=b((wf,Ni)=>{var ml=Ps();Ni.exports=ml&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Es=b((Nf,Ii)=>{var yl=X(),xl=tt(),gl=ue(),Al=yi(),Pl=Ts(),Tl=yl.Object;Ii.exports=Pl?function(h){return typeof h=="symbol"}:function(h){var l=xl("Symbol");return gl(l)&&Al(l.prototype,Tl(h))}});var Di=b((If,ki)=>{var El=X(),bl=El.String;ki.exports=function(h){try{return bl(h)}catch{return"Object"}}});var It=b((kf,Fi)=>{var vl=X(),Cl=ue(),Sl=Di(),wl=vl.TypeError;Fi.exports=function(h){if(Cl(h))return h;throw wl(Sl(h)+" is not a function")}});var Oi=b((Df,Li)=>{var Nl=It();Li.exports=function(h,l){var p=h[l];return p==null?void 0:Nl(p)}});var Mi=b((Ff,Bi)=>{var Il=X(),bs=Ct(),vs=ue(),Cs=Me(),kl=Il.TypeError;Bi.exports=function(h,l){var p,d;if(l==="string"&&vs(p=h.toString)&&!Cs(d=bs(p,h))||vs(p=h.valueOf)&&!Cs(d=bs(p,h))||l!=="string"&&vs(p=h.toString)&&!Cs(d=bs(p,h)))return d;throw kl("Can't convert object to primitive value")}});var ji=b((Lf,Ri)=>{Ri.exports=!1});var kt=b((Of,Ui)=>{var qi=X(),Dl=Object.defineProperty;Ui.exports=function(h,l){try{Dl(qi,h,{value:l,configurable:!0,writable:!0})}catch{qi[h]=l}return l}});var Dt=b((Bf,zi)=>{var Fl=X(),Ll=kt(),_i="__core-js_shared__",Ol=Fl[_i]||Ll(_i,{});zi.exports=Ol});var Ss=b((Mf,Vi)=>{var Bl=ji(),Ki=Dt(
`);return m===-1?d:d.slice(0,m)}l.exports=p}}),qp=H({"src/utils/text/skip-inline-comment.js"(h,l){"use strict";V();function p(d,m){if(m===!1)return!1;if(d.charAt(m)==="/"&&d.charAt(m+1)==="*"){for(let x=m+2;x<d.length;++x)if(d.charAt(x)==="*"&&d.charAt(x+1)==="/")return x+2}return m}l.exports=p}}),Up=H({"src/utils/text/skip-newline.js"(h,l){"use strict";V();function p(d,m,x){let P=x&&x.backwards;if(m===!1)return!1;let T=d.charAt(m);if(P){if(d.charAt(m-1)==="\r"&&T===`
`)return m-2;if(T===`
`||T==="\r"||T==="\u2028"||T==="\u2029")return m-1}else{if(T==="\r"&&d.charAt(m+1)===`
`)return m+2;if(T===`
`||T==="\r"||T==="\u2028"||T==="\u2029")return m+1}return m}l.exports=p}}),Vn=H({"src/utils/text/skip.js"(h,l){"use strict";V();function p(T){return(E,k,F)=>{let v=F&&F.backwards;if(k===!1)return!1;let{length:O}=E,A=k;for(;A>=0&&A<O;){let _=E.charAt(A);if(T instanceof RegExp){if(!T.test(_))return A}else if(!T.includes(_))return A;v?A--:A++}return A===-1||A===O?A:!1}}var d=p(/\s/),m=p(" "),x=p(",; "),P=p(/[^\n\r]/);l.exports={skipWhitespace:d,skipSpaces:m,skipToLineEnd:x,skipEverythingButNewLine:P}}}),_p=H({"src/utils/text/skip-trailing-comment.js"(h,l){"use strict";V();var{skipEverythingButNewLine:p}=Vn();function d(m,x){return x===!1?!1:m.charAt(x)==="/"&&m.charAt(x+1)==="/"?p(m,x):x}l.exports=d}}),zp=H({"src/utils/text/get-next-non-space-non-comment-character-index-with-start-index.js"(h,l){"use strict";V();var p=qp(),d=Up(),m=_p(),{skipSpaces:x}=Vn();function P(T,E){let k=null,F=E;for(;F!==k;)k=F,F=x(T,F),F=p(T,F),F=m(T,F),F=d(T,F);return F}l.exports=P}}),Hn={};Bp(Hn,{EOL:()=>sr,arch:()=>Kp,cpus:()=>Qn,default:()=>ro,endianness:()=>Wn,freemem:()=>Yn,getNetworkInterfaces:()=>so,hostname:()=>Gn,loadavg:()=>Xn,networkInterfaces:()=>to,platform:()=>Vp,release:()=>eo,tmpDir:()=>er,tmpdir:()=>tr,totalmem:()=>$n,type:()=>Zn,uptime:()=>Jn});function Wn(){if(typeof qt>"u"){var h=new ArrayBuffer(2),l=new Uint8Array(h),p=new Uint16Array(h);if(l[0]=1,l[1]=2,p[0]===258)qt="BE";else if(p[0]===513)qt="LE";else throw new Error("unable to figure out endianess")}return qt}function Gn(){return typeof globalThis.location<"u"?globalThis.location.hostname:""}function Xn(){return[]}function Jn(){return 0}function Yn(){return Number.MAX_VALUE}function $n(){return Number.MAX_VALUE}function Qn(){return[]}function Zn(){return"Browser"}function eo(){return typeof globalThis.navigator<"u"?globalThis.navigator.appVersion:""}function to(){}function so(){}function Kp(){return"javascript"}function Vp(){return"browser"}function er(){return"/tmp"}var qt,tr,sr,ro,Hp=zn({"node-modules-polyfills:os"(){V(),tr=er,sr=`
`,ro={EOL:sr,tmpdir:tr,tmpDir:er,networkInterfaces:to,getNetworkInterfaces:so,release:eo,type:Zn,cpus:Qn,totalmem:$n,freemem:Yn,uptime:Jn,loadavg:Xn,hostname:Gn,endianness:Wn}}}),Wp=H({"node-modules-polyfills-commonjs:os"(h,l){V();var p=(Hp(),Rp(Hn));if(p&&p.default){l.exports=p.default;for(let d in p)l.exports[d]=p[d]}else p&&(l.exports=p)}}),Gp=H({"node_modules/detect-newline/index.js"(h,l){"use strict";V();var p=d=>{if(typeof d!="string")throw new TypeError("Expected a string");let m=d.match(/(?:\r?\n)/g)||[];if(m.length===0)return;let x=m.filter(T=>T===`\r
`).length,P=m.length-x;return x>P?`\r
`:`
`};l.exports=p,l.exports.graceful=d=>typeof d=="string"&&p(d)||`
`}}),Xp=H({"node_modules/jest-docblock/build/index.js"(h){"use strict";V(),Object.defineProperty(h,"__esModule",{value:!0}),h.extract=A,h.parse=re,h.parseWithComments=B,h.print=R,h.strip=_;function l(){let u=Wp();return l=function(){return u},u}function p(){let u=d(Gp());return p=function(){return u},u}function d(u){return u&&u.__esModule?u:{default:u}}var m=/\*\/$/,x=/^\/\*\*/,P=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,T=/(^|\s+)\/\/([^\r\n]*)/g,E=/^(\r?\n)+/,k=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,F=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,v=/(\r?\n|^) *\* ?/g,O=[];function A(u){let J=u.match(P);return J?J[0].trimLeft():""}function _(u){let J=u.match(P);return J&&J[0]?u.substring(J[0].length):u}function re(u){return B(u).pragmas}function B(u){let J=(0,p().default)(u)||l().EOL;u=u.replace(x,"").replace(m,"").replace(v,"$1");let ie="";for(;ie!==u;)ie=u,u=u.replace(k,"".concat(J,"$1 $2").concat(J));u=u.replace(E,"").trimRight();let $=Object.create(null),be=u.replace(F,"").replace(E,"").trimRight(),Q;for(;Q=F.exec(u);){let q=Q[2].replace(T,"");typeof $[Q[1]]=="string"||Array.isArray($[Q[1]])?$[Q[1]]=O.concat($[Q[1]],q):$[Q[1]]=q}return{comments:be,pragmas:$}}function R(u){let{comments:J="",pragmas:ie={}}=u,$=(0,p().default)(J)||l().EOL,be="/**",Q=" *",q=" */",S=Object.keys(ie),g=S.map(G=>W(G,ie[G])).reduce((G,Y)=>G.concat(Y),[]).map(G=>Q+" "+G+$).join("");if(!J){if(S.length===0)return"";if(S.length===1&&!Array.isArray(ie[S[0]])){let G=ie[S[0]];return"".concat(be," ").concat(W(S[0],G)[0]).concat(q)}}let ne=J.split($).map(G=>"".concat(Q," ").concat(G)).join($)+$;return be+$+(J?ne:"")+(J&&S.length?Q+$:"")+g+q}function W(u,J){return O.concat(J).map(ie=>"@".concat(u," ").concat(ie).trim())}}}),Jp=H({"src/common/end-of-line.js"(h,l){"use strict";V();function p(P){let T=P.indexOf("\r");return T>=0?P.charAt(T+1)===`
`?"crlf":"cr":"lf"}function d(P){switch(P){case"cr":return"\r";case"crlf":return`\r
`;default:return`
`}}function m(P,T){let E;switch(T){case`
`:E=/\n/g;break;case"\r":E=/\r/g;break;case`\r
`:E=/\r\n/g;break;default:throw new Error('Unexpected "eol" '.concat(JSON.stringify(T),"."))}let k=P.match(E);return k?k.length:0}function x(P){return P.replace(/\r\n?/g,`
`)}l.exports={guessEndOfLine:p,convertEndOfLineToChars:d,countEndOfLineChars:m,normalizeEndOfLine:x}}}),Yp=H({"src/language-js/pragma.js"(h,l){"use strict";V();var{parseWithComments:p,strip:d,extract:m,print:x}=Xp(),{normalizeEndOfLine:P}=Jp(),T=Kn();function E(v){let O=T(v);O&&(v=v.slice(O.length+1));let A=m(v),{pragmas:_,comments:re}=p(A);return{shebang:O,text:v,pragmas:_,comments:re}}function k(v){let O=Object.keys(E(v).pragmas);return O.includes("prettier")||O.includes("format")}function F(v){let{shebang:O,text:A,pragmas:_,comments:re}=E(v),B=d(A),R=x({pragmas:Object.assign({format:""},_),comments:re.trimStart()});return(O?"".concat(O,`
`):"")+P(R)+(B.startsWith(`
`)?`
`:`
`)+B}l.exports={hasPragma:k,insertPragma:F}}}),io=H({"src/utils/is-non-empty-array.js"(h,l){"use strict";V();function p(d){return Array.isArray(d)&&d.length>0}l.exports=p}}),ao=H({"src/language-js/loc.js"(h,l){"use strict";V();var p=io();function d(E,k){let{ignoreDecorators:F}=k||{};if(!F){let v=E.declaration&&E.declaration.decorators||E.decorators;if(p(v))return d(v[0])}return E.range?E.range[0]:E.start}function m(E){return E.range?E.range[1]:E.end}function x(E,k){let F=d(E);return Number.isInteger(F)&&F===d(k)}function P(E,k){let F=m(E);return Number.isInteger(F)&&F===m(k)}function T(E,k){return x(E,k)&&P(E,k)}l.exports={locStart:d,locEnd:m,hasSameLocStart:x,hasSameLoc:T}}}),no=H({"src/language-js/parse/utils/create-parser.js"(h,l){"use strict";V();var{hasPragma:p}=Yp(),{locStart:d,locEnd:m}=ao();function x(P){return P=typeof P=="function"?{parse:P}:P,Object.assign({astFormat:"estree",hasPragma:p,locStart:d,locEnd:m},P)}l.exports=x}}),ar=H({"src/common/parser-create-error.js"(h,l){"use strict";V();function p(d,m){let x=new SyntaxError(d+" ("+m.start.line+":"+m.start.column+")");return x.loc=m,x}l.exports=p}}),oo=H({"src/language-js/parse/utils/create-babel-parse-error.js"(h,l){"use strict";V();var p=ar();function d(m){let{message:x,loc:P}=m;return p(x.replace(/ \(.*\)/,""),{start:{line:P?P.line:0,column:P?P.column+1:0}})}l.exports=d}}),$p=H({"src/language-js/utils/is-ts-keyword-type.js"(h,l){"use strict";V();function p(d){let{type:m}=d;return m.startsWith("TS")&&m.endsWith("Keyword")}l.exports=p}}),Qp=H({"src/language-js/utils/is-block-comment.js"(h,l){"use strict";V();function p(d){return d.type==="Block"||d.type==="CommentBlock"||d.type==="MultiLine"}l.exports=p}}),Zp=H({"src/language-js/utils/is-type-cast-comment.js"(h,l){"use strict";V();var p=Qp();function d(m){return p(m)&&m.value[0]==="*"&&/@type\b/.test(m.value)}l.exports=d}}),ef=H({"src/utils/get-last.js"(h,l){"use strict";V();var p=d=>d[d.length-1];l.exports=p}}),ho=H({"src/language-js/parse/postprocess/visit-node.js"(h,l){"use strict";V();function p(d,m){if(Array.isArray(d)){for(let x=0;x<d.length;x++)d[x]=p(d[x],m);return d}if(d&&typeof d=="object"&&typeof d.type=="string"){let x=Object.keys(d);for(let P=0;P<x.length;P++)d[x[P]]=p(d[x[P]],m);return m(d)||d}return d}l.exports=p}}),tf=H({"src/language-js/parse/postprocess/typescript.js"(h,l){"use strict";V();var p=ar(),d=ho();function m(E,k){let{start:F,end:v}=E.loc;throw p(k,{start:{line:F.line,column:F.column+1},end:{line:v.line,column:v.column+1}})}function x(E,k,F){let v=E.decorators;if(!Array.isArray(v))return;let O=k.decorators;(!Array.isArray(O)||O.length!==v.length||v.some(A=>{let _=F.get(A);return!_||!O.includes(_)}))&&m(k,"Leading decorators must be attached to a class declaration")}function P(E,k){E.kind!==166||E.modifiers&&!E.modifiers.some(O=>O.kind===126)||E.initializer&&k.value===null&&m(k,"Abstract property cannot have an initializer")}function T(E,k){let{esTreeNodeToTSNodeMap:F,tsNodeToESTreeNodeMap:v}=k.tsParseResult;d(E,O=>{let A=F.get(O);if(!A)return;let _=v.get(A);_===O&&(x(A,_,v),P(A,_))})}l.exports={throwErrorForInvalidNodes:T}}}),sf=H({"src/language-js/parse/postprocess/index.js"(h,l){"use strict";V();var{locStart:p,locEnd:d}=ao(),m=$p(),x=Zp(),P=ef(),T=ho(),{throwErrorForInvalidNodes:E}=tf();function k(A,_){if(_.parser==="typescript"&&/@|abstract/.test(_.originalText)&&E(A,_),_.parser!=="typescript"&&_.parser!=="flow"&&_.parser!=="acorn"&&_.parser!=="espree"&&_.parser!=="meriyah"){let B=new Set;A=T(A,R=>{R.leadingComments&&R.leadingComments.some(x)&&B.add(p(R))}),A=T(A,R=>{if(R.type==="ParenthesizedExpression"){let{expression:W}=R;if(W.type==="TypeCastExpression")return W.range=R.range,W;let u=p(R);if(!B.has(u))return W.extra=Object.assign(Object.assign({},W.extra),{},{parenthesized:!0}),W}})}return A=T(A,B=>{switch(B.type){case"ChainExpression":return F(B.expression);case"LogicalExpression":{if(v(B))return O(B);break}case"VariableDeclaration":{let R=P(B.declarations);R&&R.init&&re(B,R);break}case"TSParenthesizedType":return m(B.typeAnnotation)||B.typeAnnotation.type==="TSThisType"||
`;break;default:t+=String.fromCharCode(r);break}++this.state.curLine,this.state.lineStart=this.state.pos,e=this.state.pos}else++this.state.pos}}recordStrictModeErrors(t,e){let{at:s}=e,r=s.index;this.state.strict&&!this.state.strictErrors.has(r)?this.raise(t,{at:s}):this.state.strictErrors.set(r,[t,s])}readEscapedChar(t){let e=!t,s=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,s){case 110:return`
`;case 114:return"\r";case 120:{let r=this.readHexChar(2,!1,e);return r===null?null:String.fromCharCode(r)}case 117:{let r=this.readCodePoint(e);return r===null?null:String.fromCodePoint(r)}case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.state.pos)===10&&++this.state.pos;case 10:this.state.lineStart=this.state.pos,++this.state.curLine;case 8232:case 8233:return"";case 56:case 57:if(t)return null;this.recordStrictModeErrors(u.StrictNumericEscape,{at:m(this.state.curPosition(),-1)});default:if(s>=48&&s<=55){let r=m(this.state.curPosition(),-1),a=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(a,8);n>255&&(a=a.slice(0,-1),n=parseInt(a,8)),this.state.pos+=a.length-1;let o=this.input.charCodeAt(this.state.pos);if(a!=="0"||o===56||o===57){if(t)return null;this.recordStrictModeErrors(u.StrictNumericEscape,{at:r})}return String.fromCharCode(n)}return String.fromCharCode(s)}}readHexChar(t,e,s){let r=this.state.curPosition(),i=this.readInt(16,t,e,!1);return i===null&&(s?this.raise(u.InvalidEscapeSequence,{at:r}):this.state.pos=r.index-1),i}readWord1(t){this.state.containsEsc=!1;let e="",s=this.state.pos,r=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos<this.length;){let i=this.codePointAtPos(this.state.pos);if(Ue(i))this.state.pos+=i<=65535?1:2;else if(i===92){this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);let a=this.state.curPosition(),n=this.state.pos===s?xe:Ue;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(u.MissingUnicodeEscape,{at:this.state.curPosition()}),r=this.state.pos-1;continue}++this.state.pos;let o=this.readCodePoint(!0);o!==null&&(n(o)||this.raise(u.EscapedCharNotAnIdentifier,{at:a}),e+=String.fromCodePoint(o)),r=this.state.pos}else break}return e+this.input.slice(r,this.state.pos)}readWord(t){let e=this.readWord1(t),s=he.get(e);s!==void 0?this.finishToken(s,ve(s)):this.finishToken(128,e)}checkKeywordEscapes(){let{type:t}=this.state;Kt(t)&&this.state.containsEsc&&this.raise(u.InvalidEscapedReservedWord,{at:this.state.startLoc,reservedWord:ve(t)})}raise(t,e){let{at:s}=e,r=l(e,Go),i=s instanceof p?s:s.loc.start,a=t({loc:i,details:r});if(!this.options.errorRecovery)throw a;return this.isLookahead||this.state.errors.push(a),a}raiseOverwrite(t,e){let{at:s}=e,r=l(e,Xo),i=s instanceof p?s:s.loc.start,a=i.index,n=this.state.errors;for(let o=n.length-1;o>=0;o--){let c=n[o];if(c.loc.index===a)return n[o]=t({loc:i,details:r});if(c.loc.index<a)break}return this.raise(t,e)}updateContext(t){}unexpected(t,e){throw this.raise(u.UnexpectedToken,{expected:e?ve(e):null,at:t!=null?t:this.state.startLoc})}expectPlugin(t,e){if(this.hasPlugin(t))return!0;throw this.raise(u.MissingPlugin,{at:e!=null?e:this.state.startLoc,missingPlugin:[t]})}expectOnePlugin(t){if(!t.some(e=>this.hasPlugin(e)))throw this.raise(u.MissingOneOfPlugins,{at:this.state.startLoc,missingPlugin:t})}},as=class{constructor(t){this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=t}},ns=class{constructor(t,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=e}get inFunction(){return(this.currentVarScopeFlags()&ge)>0}get allowSuper(){return(this.currentThisScopeFlags()&lt)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&yr)>0}get inClass(){return(this.currentThisScopeFlags()&De)>0}get inClassAndNotInNonArrowFunction(){let t=this.currentThisScopeFlags();return(t&De)>0&&(t&ge)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&Xt)return!0;if(e&(ct|De))return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&ge)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new as(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){this.scopeStack.pop()}treatFunctionsAsVarInScope(t){return!!(t.flags&(ge|Xt)||!this.parser.inModule&&t.flags&Je)}declareName(t,e,s){let r=this.currentScope();if(e&Ce||e&pt)this.checkRed
`:`\r
`):r=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(e){let s="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(u.UnterminatedString,{at:this.state.startLoc});let i=this.input.charCodeAt(this.state.pos);if(i===e)break;i===38?(s+=this.input.slice(r,this.state.pos),s+=this.jsxReadEntity(),r=this.state.pos):Le(i)?(s+=this.input.slice(r,this.state.pos),s+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return s+=this.input.slice(r,this.state.pos++),this.finishToken(129,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 r=this.readInt(s,void 0,!1,"bail");if(r!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(r)}else{let s=0,r=!1;for(;s++<10&&this.state.pos<this.length&&!(r=this.codePointAtPos(this.state.pos)==59);)++this.state.pos;if(r){let i=this.input.slice(e,this.state.pos),a=gh[i];if(++this.state.pos,a)return a}}return this.state.pos=e,"&"}jsxReadWord(){let e,s=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(Ue(e)||e===45);return this.finishToken(136,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(136)?e.name=this.state.value:Kt(this.state.type)?e.name=ve(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.start,s=this.state.startLoc,r=this.jsxParseIdentifier();if(!this.eat(14))return r;let i=this.startNodeAt(e,s);return i.namespace=r,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.start,s=this.state.startLoc,r=this.jsxParseNamespacedName();if(r.type==="JSXNamespacedName")return r;for(;this.eat(16);){let i=this.startNodeAt(e,s);i.object=r,i.property=this.jsxParseIdentifier(),r=this.finishNode(i,"JSXMemberExpression")}return r}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(q.brace),this.next(),e=this.jsxParseExpressionContainer(e,q.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(Oe.AttributeIsEmpty,{at:e}),e;case 138:case 129:return this.parseExprAtom();default:throw this.raise(Oe.UnsupportedJsxValue,{at:this.state.startLoc})}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc.index,this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(q.j_oTag),this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,s){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let r=this.parseExpression();e.expression=r}return this.setContext(s),this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(q.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(q.j_oTag),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,s){let r=this.startNodeAt(e,s);return this.match(139)?(this.expect(139),this.finishNode(r,"JSXOpeningFragment")):(r.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(r))}jsxParseOpeningElementAfterName(e){let s=[];for(;!this.match(56)&&!this.match(139);)s.push(this.jsxParseAttribute());return e.attributes=s,e.selfClosing=this.eat(56),this.expect(139),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e,s){let r=this.startNodeAt(e,s);return this.match(139)?(this.expect(139),this.finishNode(r,"JSXClosingFragment")):(r.name=this.jsxParseElementName(),this.expect(139),this.finishNode(r,"JSXClosingElement"))}jsxParseElementAt(e,s){let r=this.startNodeAt(e,s),i=[],a=this.jsxParseOpeningElementAt(e,s),n=null;if(
`),cooked:i===null?null:i.slice(1,c)},n.tail=o,this.next(),this.finishNode(n,"TemplateElement"),this.resetEndLocation(n,m(this.state.lastTokEndLoc,c)),n}parseTemplate(t){let e=this.startNode();e.expressions=[];let s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)e.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),e.quasis.push(s=this.parseTemplateElement(t));return this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,r){s&&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 f;e?f=this.parseBindingProperty():(f=this.parsePropertyDefinition(r),this.checkProto(f,s,a,r)),s&&!this.isObjectProperty(f)&&f.type!=="SpreadElement"&&this.raise(u.InvalidRecordProperty,{at:f}),f.shorthand&&this.addExtra(f,"shorthand",!0),o.properties.push(f)}this.next(),this.state.inFSharpPipelineDirectBody=i;let c="ObjectExpression";return e?c="ObjectPattern":s&&(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 e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(u.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)e.push(this.parseDecorator());let s=this.startNode(),r=!1,i=!1,a,n;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(a=this.state.start,n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);let c=this.state.containsEsc,f=this.parsePropertyName(s,t);if(!o&&!c&&this.maybeAsyncOrAccessorProp(s)){let y=f.name;y==="async"&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(f),o=this.eat(55),this.parsePropertyName(s)),(y==="get"||y==="set")&&(i=!0,this.resetPreviousNodeTrailingComments(f),s.kind=y,this.match(55)&&(o=!0,this.raise(u.AccessorIsGenerator,{at:this.state.curPosition(),kind:y}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,a,n,o,r,!1,i,t),s}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;let s=this.getGetterSetterExpectedParamCount(t),r=this.getObjectOrClassMethodParams(t);r.length!==s&&this.raise(t.kind==="get"?u.BadGetterArity:u.BadSetterArity,{at:t}),t.kind==="set"&&((e=r[r.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(u.BadSetterRestParameter,{at:t})}parseObjectMethod(t,e,s,r,i){if(i)return this.parseMethod(t,e,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(t),t;if(s||e||this.match(10))return r&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,r,i){if(t.shorthand=!1,this.eat(14))return t.value=r?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),r)t.value=this.parseMaybeDefault(e,s,Te(t.key));else if(this.match(29)){let a=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=a):this.raise(u.InvalidCoverInitializedName,{at:a}),t.value=this.parseMaybeDefault(e,s,Te(t.key))}else t.value=Te(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,s,r,i,a,n,o){let c=this.parseObjectMethod(t,r,i,a,n)||this.parseObjectProperty(t,e,s,a,o);return c||this.unexpected(),c}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);el