2022-11-10 11:43:16 +01:00
( 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 b = ( h , l ) => ( ) => ( l || h ( ( l = { exports : { } } ) . exports , l ) , l . exports ) ; var G = b ( ( zf , Jr ) => { var Tt = function ( h ) { return h && h . Math == Math && h } ; Jr . exports = Tt ( typeof globalThis == "object" && globalThis ) || Tt ( typeof window == "object" && window ) || Tt ( typeof self == "object" && self ) || Tt ( typeof global == "object" && global ) || function ( ) { return this } ( ) || Function ( "return this" ) ( ) } ) ; var Ae = b ( ( Kf , Yr ) => { Yr . exports = function ( h ) { try { return ! ! h ( ) } catch { return ! 0 } } } ) ; var ke = b ( ( Vf , $r ) => { var hl = Ae ( ) ; $r . exports = ! hl ( function ( ) { return Object . defineProperty ( { } , 1 , { get : function ( ) { return 7 } } ) [ 1 ] != 7 } ) } ) ; var Et = b ( ( Hf , Qr ) => { var ll = Ae ( ) ; Qr . exports = ! ll ( function ( ) { var h = function ( ) { } . bind ( ) ; return typeof h != "function" || h . hasOwnProperty ( "prototype" ) } ) } ) ; var bt = b ( ( Wf , Zr ) => { var ul = Et ( ) , Ct = Function . prototype . call ; Zr . exports = ul ? Ct . bind ( Ct ) : function ( ) { return Ct . apply ( Ct , arguments ) } } ) ; var ri = b ( si => { "use strict" ; var ei = { } . propertyIsEnumerable , ti = Object . getOwnPropertyDescriptor , cl = ti && ! ei . call ( { 1 : 2 } , 1 ) ; si . f = cl ? function ( l ) { var p = ti ( this , l ) ; return ! ! p && p . enumerable } : ei } ) ; var ms = b ( ( Xf , ii ) => { ii . exports = function ( h , l ) { return { enumerable : ! ( h & 1 ) , configurable : ! ( h & 2 ) , writable : ! ( h & 4 ) , value : l } } } ) ; var ie = b ( ( Jf , oi ) => { var ai = Et ( ) , ni = Function . prototype , pl = ni . bind , ys = ni . call , fl = ai && pl . bind ( ys , ys ) ; oi . exports = ai ? function ( h ) { return h && fl ( h ) } : function ( h ) { return h && function ( ) { return ys . apply ( h , arguments ) } } } ) ; var vt = b ( ( Yf , li ) => { var hi = ie ( ) , dl = hi ( { } . toString ) , ml = hi ( "" . slice ) ; li . exports = function ( h ) { return ml ( dl ( h ) , 8 , - 1 ) } } ) ; var ci = b ( ( $f , ui ) => { var yl = G ( ) , xl = ie ( ) , gl = Ae ( ) , Al = vt ( ) , xs = yl . Object , Pl = xl ( "" . split ) ; ui . exports = gl ( function ( ) { return ! xs ( "z" ) . propertyIsEnumerable ( 0 ) } ) ? function ( h ) { return Al ( h ) == "String" ? Pl ( h , "" ) : xs ( h ) } : xs } ) ; var gs = b ( ( Qf , pi ) => { var Tl = G ( ) , El = Tl . TypeError ; pi . exports = function ( h ) { if ( h == null ) throw El ( "Can't call method on " + h ) ; return h } } ) ; var St = b ( ( Zf , fi ) => { var Cl = ci ( ) , bl = gs ( ) ; fi . exports = function ( h ) { return Cl ( bl ( h ) ) } } ) ; var ae = b ( ( ed , di ) => { di . exports = function ( h ) { return typeof h == "function" } } ) ; var De = b ( ( td , mi ) => { var vl = ae ( ) ; mi . exports = function ( h ) { return typeof h == "object" ? h !== null : vl ( h ) } } ) ; var Qe = b ( ( sd , yi ) => { var As = G ( ) , Sl = ae ( ) , wl = function ( h ) { return Sl ( h ) ? h : void 0 } ; yi . exports = function ( h , l ) { return arguments . length < 2 ? wl ( As [ h ] ) : As [ h ] && As [ h ] [ l ] } } ) ; var gi = b ( ( rd , xi ) => { var Nl = ie ( ) ; xi . exports = Nl ( { } . isPrototypeOf ) } ) ; var Pi = b ( ( id , Ai ) => { var Il = Qe ( ) ; Ai . exports = Il ( "navigator" , "userAgent" ) || "" } ) ; var wi = b ( ( ad , Si ) => { var vi = G ( ) , Ps = Pi ( ) , Ti = vi . process , Ei = vi . Deno , Ci = Ti && Ti . versions || Ei && Ei . version , bi = Ci && Ci . v8 , oe , wt ; bi && ( oe = bi . split ( "." ) , wt = oe [ 0 ] > 0 && oe [ 0 ] < 4 ? 1 : + ( oe [ 0 ] + oe [ 1 ] ) ) ; ! wt && Ps && ( oe = Ps . match ( /Edge\/(\d+)/ ) , ( ! oe || oe [ 1 ] >= 74 ) && ( oe = Ps . match ( /Chrome\/(\d+)/ ) , oe && ( wt = + oe [ 1 ] ) ) ) ; Si . exports = wt } ) ; var Ts = b ( ( nd , Ii ) => { var Ni = wi ( ) , kl = Ae ( ) ; Ii . exports = ! ! Object . getOwnPropertySymbols && ! kl ( function ( ) { var h = Symbol ( ) ; return ! String ( h ) || ! ( Object ( h ) instanceof Symbol ) || ! Symbol . sham && Ni && Ni < 41 } ) } ) ; var Es = b ( ( od , ki ) => { var Dl = Ts ( ) ; ki . exports = Dl && ! Symbol . sham && typeof Symbol . iterator == "symbol" } ) ; var Cs = b ( ( hd , Di ) => { var Fl = G ( ) , Ll = Qe ( ) , Ol = ae ( ) , Bl = gi ( ) , Ml = Es ( ) , Rl = Fl . Object ; Di . exports = Ml ? function ( h ) { return typeof h == "symbol" } : function ( h ) { var l = Ll ( "Symbol" ) ; return Ol ( l ) && Bl ( l . prototype , Rl ( h ) ) } } ) ; var Li = b ( ( ld , Fi ) => { var jl = G ( ) , ql = jl . String ; Fi . exports = function ( h ) { try { return ql ( h ) } catch { return "Object" } } } ) ; var Nt = b ( ( ud , Oi ) => { var Ul = G ( ) , _l = ae ( ) , zl = Li ( ) , Kl = Ul . TypeError ; Oi . exports = function ( h ) { if ( _l ( h ) ) return h ; throw Kl ( zl ( h ) + " is not a function" ) } } ) ; var Mi = b ( ( cd , Bi ) => { var Vl = Nt ( ) ; Bi . exports = function ( h , l ) { var p = h [ l ] ; return p == null ? void 0 : Vl ( p ) } } ) ; var ji = b ( ( pd , Ri ) => { var Hl = G ( ) , bs = bt ( ) , vs = ae ( ) , Ss = De ( ) , Wl = Hl . TypeError ; Ri . exports = function ( h , l ) { var p , d ; if ( l === "string" && vs ( p = h . toString ) && ! Ss ( d = bs ( p , h ) ) || vs ( p = h . valueOf ) && ! Ss ( d = bs ( p , h ) ) || l !== "string" && vs ( p = h . toString ) && ! Ss ( d = bs ( p , h ) ) ) return d ; throw Wl ( "Can't convert object to primitive value" ) } } ) ; var Ui
` );return m===-1?d:d.slice(0,m)}l.exports=p}}),tf=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 A=m+2;A<d.length;++A)if(d.charAt(A)==="*"&&d.charAt(A+1)==="/")return A+2}return m}l.exports=p}}),sf=H({"src/utils/text/skip-newline.js"(h,l){"use strict";V();function p(d,m,A){let g=A&&A.backwards;if(m===!1)return!1;let x=d.charAt(m);if(g){if(d.charAt(m-1)===" \r "&&x=== `
` )return m-2;if(x=== `
` ||x===" \r "||x===" \u 2028"||x===" \u 2029")return m-1}else{if(x===" \r "&&d.charAt(m+1)=== `
` )return m+2;if(x=== `
` ||x===" \r "||x===" \u 2028"||x===" \u 2029")return m+1}return m}l.exports=p}}),Zn=H({"src/utils/text/skip.js"(h,l){"use strict";V();function p(x){return(T,k,D)=>{let E=D&&D.backwards;if(k===!1)return!1;let{length:L}=T,R=k;for(;R>=0&&R<L;){let F=T.charAt(R);if(x instanceof RegExp){if(!x.test(F))return R}else if(!x.includes(F))return R;E?R--:R++}return R===-1||R===L?R:!1}}var d=p(/ \s /),m=p(" "),A=p(",; "),g=p(/[^ \n \r ]/);l.exports={skipWhitespace:d,skipSpaces:m,skipToLineEnd:A,skipEverythingButNewLine:g}}}),rf=H({"src/utils/text/skip-trailing-comment.js"(h,l){"use strict";V();var{skipEverythingButNewLine:p}=Zn();function d(m,A){return A===!1?!1:m.charAt(A)==="/"&&m.charAt(A+1)==="/"?p(m,A):A}l.exports=d}}),af=H({"src/utils/text/get-next-non-space-non-comment-character-index-with-start-index.js"(h,l){"use strict";V();var p=tf(),d=sf(),m=rf(),{skipSpaces:A}=Zn();function g(x,T){let k=null,D=T;for(;D!==k;)k=D,D=A(x,D),D=p(x,D),D=m(x,D),D=d(x,D);return D}l.exports=g}}),eo={}; $ p(eo,{EOL:()=>rr,arch:()=>nf,cpus:()=>oo,default:()=>po,endianness:()=>to,freemem:()=>ao,getNetworkInterfaces:()=>co,hostname:()=>so,loadavg:()=>ro,networkInterfaces:()=>uo,platform:()=>of,release:()=>lo,tmpDir:()=>tr,tmpdir:()=>sr,totalmem:()=>no,type:()=>ho,uptime:()=>io});function to(){if(typeof jt>"u"){var h=new ArrayBuffer(2),l=new Uint8Array(h),p=new Uint16Array(h);if(l[0]=1,l[1]=2,p[0]===258)jt="BE";else if(p[0]===513)jt="LE";else throw new Error("unable to figure out endianess")}return jt}function so(){return typeof globalThis.location<"u"?globalThis.location.hostname:""}function ro(){return[]}function io(){return 0}function ao(){return Number.MAX_VALUE}function no(){return Number.MAX_VALUE}function oo(){return[]}function ho(){return"Browser"}function lo(){return typeof globalThis.navigator<"u"?globalThis.navigator.appVersion:""}function uo(){}function co(){}function nf(){return"javascript"}function of(){return"browser"}function tr(){return"/tmp"}var jt,sr,rr,po,hf= $ n({"node-modules-polyfills:os"(){V(),sr=tr,rr= `
` ,po={EOL:rr,tmpdir:sr,tmpDir:tr,networkInterfaces:uo,getNetworkInterfaces:co,release:lo,type:ho,cpus:oo,totalmem:no,freemem:ao,uptime:io,loadavg:ro,hostname:so,endianness:to}}}),lf=H({"node-modules-polyfills-commonjs:os"(h,l){V();var p=(hf(),Zp(eo));if(p&&p.default){l.exports=p.default;for(let d in p)l.exports[d]=p[d]}else p&&(l.exports=p)}}),uf=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 A=m.filter(x=>x=== ` \ r
` ).length,g=m.length-A;return A>g? ` \ r
` : `
` };l.exports=p,l.exports.graceful=d=>typeof d=="string"&&p(d)|| `
` }}),cf=H({"node_modules/jest-docblock/build/index.js"(h){"use strict";V(),Object.defineProperty(h,"__esModule",{value:!0}),h.extract=R,h.parse=W,h.parseWithComments=Y,h.print=M,h.strip=F;function l(){let u=lf();return l=function(){return u},u}function p(){let u=d(uf());return p=function(){return u},u}function d(u){return u&&u.__esModule?u:{default:u}}var m=/ \* \/ $ /,A=/^ \/ \* \* /,g=/^ \s *( \/ \* \* ?(.| \r ? \n )*? \* \/ )/,x=/(^| \s +) \/ \/ ([^ \r \n ]*)/g,T=/^( \r ? \n )+/,k=/(?:^| \r ? \n ) *(@[^ \r \n ]*?) * \r ? \n *(?![^@ \r \n ]* \/ \/ [^]*)([^@ \r \n \s ][^@ \r \n ]+?) * \r ? \n /g,D=/(?:^| \r ? \n ) *@( \S +) *([^ \r \n ]*)/g,E=/( \r ? \n |^) * \* ?/g,L=[];function R(u){let X=u.match(g);return X?X[0].trimLeft():""}function F(u){let X=u.match(g);return X&&X[0]?u.substring(X[0].length):u}function W(u){return Y(u).pragmas}function Y(u){let X=(0,p().default)(u)||l().EOL;u=u.replace(A,"").replace(m,"").replace(E," $ 1");let se="";for(;se!==u;)se=u,u=u.replace(k,"".concat(X," $ 1 $ 2").concat(X));u=u.replace(T,"").trimRight();let J=Object.create(null),Oe=u.replace(D,"").replace(T,"").trimRight(), $ ;for(; $ =D.exec(u);){let z= $ [2].replace(x,"");typeof J[ $ [1]]=="string"||Array.isArray(J[ $ [1]])?J[ $ [1]]=L.concat(J[ $ [1]],z):J[ $ [1]]=z}return{comments:Oe,pragmas:J}}function M(u){let{comments:X="",pragmas:se={}}=u,J=(0,p().default)(X)||l().EOL,Oe="/**", $ =" *",z=" */",O=Object.keys(se),C=O.map(Z=>j(Z,se[Z])).reduce((Z,he)=>Z.concat(he),[]).map(Z=> $ +" "+Z+J).join("");if(!X){if(O.length===0)return"";if(O.length===1&&!Array.isArray(se[O[0]])){let Z=se[O[0]];return"".concat(Oe," ").concat(j(O[0],Z)[0]).concat(z)}}let Ve=X.split(J).map(Z=>"".concat( $ ," ").concat(Z)).join(J)+J;return Oe+J+(X?Ve:"")+(X&&O.length? $ +J:"")+C+z}function j(u,X){return L.concat(X).map(se=>"@".concat(u," ").concat(se).trim())}}}),pf=H({"src/common/end-of-line.js"(h,l){"use strict";V();function p(g){let x=g.indexOf(" \r ");return x>=0?g.charAt(x+1)=== `
` ?"crlf":"cr":"lf"}function d(g){switch(g){case"cr":return" \r ";case"crlf":return ` \ r
` ;default:return `
` }}function m(g,x){let T;switch(x){case `
` :T=/ \n /g;break;case" \r ":T=/ \r /g;break;case ` \ r
` :T=/ \r \n /g;break;default:throw new Error('Unexpected "eol" '.concat(JSON.stringify(x),"."))}let k=g.match(T);return k?k.length:0}function A(g){return g.replace(/ \r \n ?/g, `
` )}l.exports={guessEndOfLine:p,convertEndOfLineToChars:d,countEndOfLineChars:m,normalizeEndOfLine:A}}}),ff=H({"src/language-js/pragma.js"(h,l){"use strict";V();var{parseWithComments:p,strip:d,extract:m,print:A}=cf(),{normalizeEndOfLine:g}=pf(),x=Qn();function T(E){let L=x(E);L&&(E=E.slice(L.length+1));let R=m(E),{pragmas:F,comments:W}=p(R);return{shebang:L,text:E,pragmas:F,comments:W}}function k(E){let L=Object.keys(T(E).pragmas);return L.includes("prettier")||L.includes("format")}function D(E){let{shebang:L,text:R,pragmas:F,comments:W}=T(E),Y=d(R),M=A({pragmas:Object.assign({format:""},F),comments:W.trimStart()});return(L?"".concat(L, `
` ):"")+g(M)+(Y.startsWith( `
` )? `
` : `
` )+Y}l.exports={hasPragma:k,insertPragma:D}}}),fo=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}}),mo=H({"src/language-js/loc.js"(h,l){"use strict";V();var p=fo();function d(T,k){let{ignoreDecorators:D}=k||{};if(!D){let E=T.declaration&&T.declaration.decorators||T.decorators;if(p(E))return d(E[0])}return T.range?T.range[0]:T.start}function m(T){return T.range?T.range[1]:T.end}function A(T,k){let D=d(T);return Number.isInteger(D)&&D===d(k)}function g(T,k){let D=m(T);return Number.isInteger(D)&&D===m(k)}function x(T,k){return A(T,k)&&g(T,k)}l.exports={locStart:d,locEnd:m,hasSameLocStart:A,hasSameLoc:x}}}),yo=H({"src/language-js/parse/utils/create-parser.js"(h,l){"use strict";V();var{hasPragma:p}=ff(),{locStart:d,locEnd:m}=mo();function A(g){return g=typeof g=="function"?{parse:g}:g,Object.assign({astFormat:"estree",hasPragma:p,locStart:d,locEnd:m},g)}l.exports=A}}),nr=H({"src/common/parser-create-error.js"(h,l){"use strict";V();function p(d,m){let A=new SyntaxError(d+" ("+m.start.line+":"+m.start.column+")");return A.loc=m,A}l.exports=p}}),xo=H({"src/language-js/parse/utils/create-babel-parse-error.js"(h,l){"use strict";V();var p=nr();function d(m){let{message:A,loc:g}=m;return p(A.replace(/ \( .* \) /,""),{start:{line:g?g.line:0,column:g?g.column+1:0}})}l.exports=d}}),df=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}}),mf=H({"src/language-js/utils/is-block-comment.js"(h,l){"use strict";V();var p=new Set(["Block","CommentBlock","MultiLine"]),d=m=>p.has(m==null?void 0:m.type);l.exports=d}}),yf=H({"src/language-js/utils/is-type-cast-comment.js"(h,l){"use strict";V();var p=mf();function d(m){return p(m)&&m.value[0]==="*"&&/@type \b /.test(m.value)}l.exports=d}}),xf=H({"src/utils/get-last.js"(h,l){"use strict";V();var p=d=>d[d.length-1];l.exports=p}}),go=H({"src/language-js/parse/postprocess/visit-node.js"(h,l){"use strict";V();function p(d,m){if(Array.isArray(d)){for(let A=0;A<d.length;A++)d[A]=p(d[A],m);return d}if(d&&typeof d=="object"&&typeof d.type=="string"){let A=Object.keys(d);for(let g=0;g<A.length;g++)d[A[g]]=p(d[A[g]],m);return m(d)||d}return d}l.exports=p}}),Ao=H({"src/language-js/parse/postprocess/throw-syntax-error.js"(h,l){"use strict";V();var p=nr();function d(m,A){let{start:g,end:x}=m.loc;throw p(A,{start:{line:g.line,column:g.column+1},end:{line:x.line,column:x.column+1}})}l.exports=d}}),gf=H({"src/language-js/parse/postprocess/typescript.js"(h,l){"use strict";V();var p=go(),d=Ao();function m(x,T,k){let D=x.decorators;if(!Array.isArray(D))return;let E=T.decorators;(!Array.isArray(E)||E.length!==D.length||D.some(L=>{let R=k.get(L);return!R||!E.includes(R)}))&&d(T,"Leading decorators must be attached to a class declaration")}function A(x,T){x.kind!==167||x.modifiers&&!x.modifiers.some(E=>E.kind===126)||x.initializer&&T.value===null&&d(T,"Abstract property cannot have an initializer")}function g(x,T){let{esTreeNodeToTSNodeMap:k,tsNodeToESTreeNodeMap:D}=T.tsParseResult;p(x,E=>{let L=k.get(E);if(!L)return;let R=D.get(L);R===E&&(m(L,R,D),A(L,R))})}l.exports={throwErrorForInvalidNodes:g}}}),Af=H({"src/language-js/parse/postprocess/index.js"(h,l){"use strict";V();var{locStart:p,locEnd:d}=mo(),m=df(),A=yf(),g=xf(),x=go(),{throwErrorForInvalidNodes:T}=gf(),k=Ao();function D(F,W){if(W.parser==="typescript"&&/@|abstract/.test(W.originalText)&&T(F,W),W.parser!=="typescript"&&W.parser!=="flow"&&W.parser!=="acorn"&&W.parser!=="espree"&&W.parser!=="meriyah"){let M=new Set;F=x(F,j=>{j.leadingComments&&j.leadingComments.some(A)&&M.add(p(j))}),F=x(F,j=>{if(j.type==="ParenthesizedExpression"){let{expression:u}=j;if(u.type==="TypeCastExpression")return u.range=j.range,u;let X=p(j);if(!M.has(X))return u.extra=Object.assign(Object.assign({},u.extra),{},{parenthesized:!0}),u}})}return F=x(F,M=>{switch(M.type){case"ChainExpression":return E(M.expression);case"LogicalExpression":{if(L(M))return R(M);break}case"VariableDeclaration":{let j=g(M.declaration
` ;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.slice(this.state.pos-1,this.state.pos+2).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(Be(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?de:Be;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=qt.get(e);s!==void 0?this.finishToken(s,Pe(s)):this.finishToken(128,e)}checkKeywordEscapes(){let{type:t}=this.state;Ht(t)&&this.state.containsEsc&&this.raise(u.InvalidEscapedReservedWord,{at:this.state.startLoc,reservedWord:Pe(t)})}raise(t,e){let{at:s}=e,r=l(e,oh),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,hh),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?Pe(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})}},os=class{constructor(t){this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=t}},hs=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()&me)>0}get allowSuper(){return(this.currentThisScopeFlags()&ot)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&xr)>0}get inClass(){return(this.currentThisScopeFlags()&Se)>0}get inClassAndNotInNonArrowFunction(){let t=this.currentThisScopeFlags();return(t&Se)>0&&(t&me)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&Yt)return!0;if(e&(lt|Se))return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&me)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new os(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){this.scopeStack.pop()}treatFunctionsAsVarInScope(t){return!!(t.flags&(me|Yt)||!this.parser.inModule&&t.flags&We)}declareName(t,e,s){let r=this.currentScope();if(e&Te||e&ut
` : ` \ 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):Ne(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=Fh[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(Be(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:Ht(this.state.type)?e.name=Pe(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(z.brace),this.next(),e=this.jsxParseExpressionContainer(e,z.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(Ie.AttributeIsEmpty,{at:e}),e;case 138:case 129:return this.parseExprAtom();default:throw this.raise(Ie.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(z.j_oTag),this.state.canStartJSXElement=!0,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.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(z.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(z.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,s){let r=this.startNodeAt(e,s);return this.eat(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.eat(139)?this.finishNode(r,"JSXClosingFragment"):(r.name=this.jsxParseElementName(),this.expect(139),this.finishNode(r,"JSXClosingElement"))}jsxParseElementAt(e,s){let r=this.startNodeAt(
` ),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,ge(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,ge(t.key))}else t.value=ge(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