26 lines
152 KiB
JavaScript
26 lines
152 KiB
JavaScript
|
(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.espree=e()}})(function(){"use strict";var C=(a,u)=>()=>(u||a((u={exports:{}}).exports,u),u.exports);var oe=C((tl,zr)=>{var Ye=function(a){return a&&a.Math==Math&&a};zr.exports=Ye(typeof globalThis=="object"&&globalThis)||Ye(typeof window=="object"&&window)||Ye(typeof self=="object"&&self)||Ye(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var me=C((rl,Gr)=>{Gr.exports=function(a){try{return!!a()}catch{return!0}}});var xe=C((il,Hr)=>{var vn=me();Hr.exports=!vn(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var bt=C((sl,Kr)=>{var gn=me();Kr.exports=!gn(function(){var a=function(){}.bind();return typeof a!="function"||a.hasOwnProperty("prototype")})});var et=C((al,Xr)=>{var xn=bt(),Ze=Function.prototype.call;Xr.exports=xn?Ze.bind(Ze):function(){return Ze.apply(Ze,arguments)}});var Yr=C($r=>{"use strict";var Jr={}.propertyIsEnumerable,Qr=Object.getOwnPropertyDescriptor,yn=Qr&&!Jr.call({1:2},1);$r.f=yn?function(u){var o=Qr(this,u);return!!o&&o.enumerable}:Jr});var _t=C((ul,Zr)=>{Zr.exports=function(a,u){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:u}}});var ye=C((ol,ri)=>{var ei=bt(),ti=Function.prototype,St=ti.call,An=ei&&ti.bind.bind(St,St);ri.exports=ei?An:function(a){return function(){return St.apply(a,arguments)}}});var ai=C((hl,si)=>{var ii=ye(),Cn=ii({}.toString),En=ii("".slice);si.exports=function(a){return En(Cn(a),8,-1)}});var ui=C((ll,ni)=>{var bn=ye(),_n=me(),Sn=ai(),wt=Object,wn=bn("".split);ni.exports=_n(function(){return!wt("z").propertyIsEnumerable(0)})?function(a){return Sn(a)=="String"?wn(a,""):wt(a)}:wt});var kt=C((cl,oi)=>{oi.exports=function(a){return a==null}});var Ft=C((pl,hi)=>{var kn=kt(),Fn=TypeError;hi.exports=function(a){if(kn(a))throw Fn("Can't call method on "+a);return a}});var tt=C((fl,li)=>{var Bn=ui(),In=Ft();li.exports=function(a){return Bn(In(a))}});var It=C((dl,ci)=>{var Bt=typeof document=="object"&&document.all,Tn=typeof Bt>"u"&&Bt!==void 0;ci.exports={all:Bt,IS_HTMLDDA:Tn}});var le=C((ml,fi)=>{var pi=It(),Pn=pi.all;fi.exports=pi.IS_HTMLDDA?function(a){return typeof a=="function"||a===Pn}:function(a){return typeof a=="function"}});var Pe=C((vl,vi)=>{var di=le(),mi=It(),Dn=mi.all;vi.exports=mi.IS_HTMLDDA?function(a){return typeof a=="object"?a!==null:di(a)||a===Dn}:function(a){return typeof a=="object"?a!==null:di(a)}});var rt=C((gl,gi)=>{var Tt=oe(),Nn=le(),On=function(a){return Nn(a)?a:void 0};gi.exports=function(a,u){return arguments.length<2?On(Tt[a]):Tt[a]&&Tt[a][u]}});var yi=C((xl,xi)=>{var Ln=ye();xi.exports=Ln({}.isPrototypeOf)});var Ci=C((yl,Ai)=>{var Vn=rt();Ai.exports=Vn("navigator","userAgent")||""});var Fi=C((Al,ki)=>{var wi=oe(),Pt=Ci(),Ei=wi.process,bi=wi.Deno,_i=Ei&&Ei.versions||bi&&bi.version,Si=_i&&_i.v8,ce,it;Si&&(ce=Si.split("."),it=ce[0]>0&&ce[0]<4?1:+(ce[0]+ce[1]));!it&&Pt&&(ce=Pt.match(/Edge\/(\d+)/),(!ce||ce[1]>=74)&&(ce=Pt.match(/Chrome\/(\d+)/),ce&&(it=+ce[1])));ki.exports=it});var Dt=C((Cl,Ii)=>{var Bi=Fi(),Rn=me();Ii.exports=!!Object.getOwnPropertySymbols&&!Rn(function(){var a=Symbol();return!String(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&Bi&&Bi<41})});var Nt=C((El,Ti)=>{var jn=Dt();Ti.exports=jn&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Ot=C((bl,Pi)=>{var qn=rt(),Mn=le(),Un=yi(),Wn=Nt(),zn=Object;Pi.exports=Wn?function(a){return typeof a=="symbol"}:function(a){var u=qn("Symbol");return Mn(u)&&Un(u.prototype,zn(a))}});var Ni=C((_l,Di)=>{var Gn=String;Di.exports=function(a){try{return Gn(a)}catch{return"Object"}}});var Li=C((Sl,Oi)=>{var Hn=le(),Kn=Ni(),Xn=TypeError;Oi.exports=function(a){if(Hn(a))return a;throw Xn(Kn(a)+" is not a function")}});var Ri=C((wl,Vi)=>{var Jn=Li(),Qn=kt();Vi.exports=function(a,u){var o=a[u];return Qn(o)?void 0:Jn(o)}});va
|
||
|
`,Ua={EOL:cr,tmpdir:lr,tmpDir:hr,networkInterfaces:qa,getNetworkInterfaces:Ma,release:ja,type:Ra,cpus:Va,totalmem:La,freemem:Oa,uptime:Na,loadavg:Da,hostname:Pa,endianness:Ta}}}),Dh=$({"node-modules-polyfills-commonjs:os"(a,u){J();var o=(Ph(),Bh(Ia));if(o&&o.default){u.exports=o.default;for(let l in o)u.exports[l]=o[l]}else o&&(u.exports=o)}}),Nh=$({"node_modules/detect-newline/index.js"(a,u){"use strict";J();var o=l=>{if(typeof l!="string")throw new TypeError("Expected a string");let v=l.match(/(?:\r?\n)/g)||[];if(v.length===0)return;let b=v.filter(I=>I===`\r
|
||
|
`).length,y=v.length-b;return b>y?`\r
|
||
|
`:`
|
||
|
`};u.exports=o,u.exports.graceful=l=>typeof l=="string"&&o(l)||`
|
||
|
`}}),Oh=$({"node_modules/jest-docblock/build/index.js"(a){"use strict";J(),Object.defineProperty(a,"__esModule",{value:!0}),a.extract=g,a.parse=G,a.parseWithComments=f,a.print=B,a.strip=w;function u(){let k=Dh();return u=function(){return k},k}function o(){let k=l(Nh());return o=function(){return k},k}function l(k){return k&&k.__esModule?k:{default:k}}var v=/\*\/$/,b=/^\/\*\*?/,y=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,I=/(^|\s+)\/\/([^\r\n]*)/g,T=/^(\r?\n)+/,x=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,R=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,U=/(\r?\n|^) *\* ?/g,D=[];function g(k){let X=k.match(y);return X?X[0].trimLeft():""}function w(k){let X=k.match(y);return X&&X[0]?k.substring(X[0].length):k}function G(k){return f(k).pragmas}function f(k){let X=(0,o().default)(k)||u().EOL;k=k.replace(b,"").replace(v,"").replace(U,"$1");let O="";for(;O!==k;)O=k,k=k.replace(x,`${X}$1 $2${X}`);k=k.replace(T,"").trimRight();let i=Object.create(null),S=k.replace(R,"").replace(T,"").trimRight(),F;for(;F=R.exec(k);){let j=F[2].replace(I,"");typeof i[F[1]]=="string"||Array.isArray(i[F[1]])?i[F[1]]=D.concat(i[F[1]],j):i[F[1]]=j}return{comments:S,pragmas:i}}function B(k){let{comments:X="",pragmas:O={}}=k,i=(0,o().default)(X)||u().EOL,S="/**",F=" *",j=" */",Z=Object.keys(O),ne=Z.map(ie=>V(ie,O[ie])).reduce((ie,Ne)=>ie.concat(Ne),[]).map(ie=>`${F} ${ie}${i}`).join("");if(!X){if(Z.length===0)return"";if(Z.length===1&&!Array.isArray(O[Z[0]])){let ie=O[Z[0]];return`${S} ${V(Z[0],ie)[0]}${j}`}}let ee=X.split(i).map(ie=>`${F} ${ie}`).join(i)+i;return S+i+(X?ee:"")+(X&&Z.length?F+i:"")+ne+j}function V(k,X){return D.concat(X).map(O=>`@${k} ${O}`.trim())}}}),Lh=$({"src/common/end-of-line.js"(a,u){"use strict";J();function o(y){let I=y.indexOf("\r");return I>=0?y.charAt(I+1)===`
|
||
|
`?"crlf":"cr":"lf"}function l(y){switch(y){case"cr":return"\r";case"crlf":return`\r
|
||
|
`;default:return`
|
||
|
`}}function v(y,I){let T;switch(I){case`
|
||
|
`:T=/\n/g;break;case"\r":T=/\r/g;break;case`\r
|
||
|
`:T=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(I)}.`)}let x=y.match(T);return x?x.length:0}function b(y){return y.replace(/\r\n?/g,`
|
||
|
`)}u.exports={guessEndOfLine:o,convertEndOfLineToChars:l,countEndOfLineChars:v,normalizeEndOfLine:b}}}),Vh=$({"src/language-js/utils/get-shebang.js"(a,u){"use strict";J();function o(l){if(!l.startsWith("#!"))return"";let v=l.indexOf(`
|
||
|
`);return v===-1?l:l.slice(0,v)}u.exports=o}}),Rh=$({"src/language-js/pragma.js"(a,u){"use strict";J();var{parseWithComments:o,strip:l,extract:v,print:b}=Oh(),{normalizeEndOfLine:y}=Lh(),I=Vh();function T(U){let D=I(U);D&&(U=U.slice(D.length+1));let g=v(U),{pragmas:w,comments:G}=o(g);return{shebang:D,text:U,pragmas:w,comments:G}}function x(U){let D=Object.keys(T(U).pragmas);return D.includes("prettier")||D.includes("format")}function R(U){let{shebang:D,text:g,pragmas:w,comments:G}=T(U),f=l(g),B=b({pragmas:Object.assign({format:""},w),comments:G.trimStart()});return(D?`${D}
|
||
|
`:"")+y(B)+(f.startsWith(`
|
||
|
`)?`
|
||
|
`:`
|
||
|
|
||
|
`)+f}u.exports={hasPragma:x,insertPragma:R}}}),jh=$({"src/utils/is-non-empty-array.js"(a,u){"use strict";J();function o(l){return Array.isArray(l)&&l.length>0}u.exports=o}}),Wa=$({"src/language-js/loc.js"(a,u){"use strict";J();var o=jh();function l(T){var x,R;let U=T.range?T.range[0]:T.start,D=(x=(R=T.declaration)===null||R===void 0?void 0:R.decorators)!==null&&x!==void 0?x:T.decorators;return o(D)?Math.min(l(D[0]),U):U}function v(T){return T.range?T.range[1]:T.end}function b(T,x){let R=l(T);return Number.isInteger(R)&&R===l(x)}function y(T,x){let R=v(T);return Number.isInteger(R)&&R===v(x)}function I(T,x){return b(T,x)&&y(T,x)}u.exports={locStart:l,locEnd:v,hasSameLocStart:b,hasSameLoc:I}}}),za=$({"src/language-js/parse/utils/create-parser.js"(a,u){"use strict";J();var{hasPragma:o}=Rh(),{locStart:l,locEnd:v}=Wa();function b(y){return y=typeof y=="function"?{parse:y}:y,Object.assign({astFormat:"estree",hasPragma:o,locStart:l,locEnd:v},y)}u.exports=b}}),qh=$({"src/language-js/utils/is-ts-keyword-type.js"(a,u){"use strict";J();function o(l){let{type:v}=l;return v.startsWith("TS")&&v.endsWith("Keyword")}u.exports=o}}),Mh=$({"src/language-js/utils/is-block-comment.js"(a,u){"use strict";J();var o=new Set(["Block","CommentBlock","MultiLine"]),l=v=>o.has(v==null?void 0:v.type);u.exports=l}}),Uh=$({"src/language-js/utils/is-type-cast-comment.js"(a,u){"use strict";J();var o=Mh();function l(v){return o(v)&&v.value[0]==="*"&&/@(?:type|satisfies)\b/.test(v.value)}u.exports=l}}),Wh=$({"src/utils/get-last.js"(a,u){"use strict";J();var o=l=>l[l.length-1];u.exports=o}}),zh=$({"src/language-js/parse/postprocess/visit-node.js"(a,u){"use strict";J();function o(l,v){if(Array.isArray(l)){for(let b=0;b<l.length;b++)l[b]=o(l[b],v);return l}if(l&&typeof l=="object"&&typeof l.type=="string"){let b=Object.keys(l);for(let y=0;y<b.length;y++)l[b[y]]=o(l[b[y]],v);return v(l)||l}return l}u.exports=o}}),Gh=$({"src/language-js/parse/postprocess/throw-syntax-error.js"(a,u){"use strict";J();var o=dr();function l(v,b){let{start:y,end:I}=v.loc;throw o(b,{start:{line:y.line,column:y.column+1},end:{line:I.line,column:I.column+1}})}u.exports=l}}),Ga=$({"src/language-js/parse/postprocess/index.js"(a,u){"use strict";J();var{locStart:o,locEnd:l}=Wa(),v=qh(),b=Uh(),y=Wh(),I=zh(),T=Gh();function x(g,w){if(w.parser!=="typescript"&&w.parser!=="flow"&&w.parser!=="acorn"&&w.parser!=="espree"&&w.parser!=="meriyah"){let f=new Set;g=I(g,B=>{B.leadingComments&&B.leadingComments.some(b)&&f.add(o(B))}),g=I(g,B=>{if(B.type==="ParenthesizedExpression"){let{expression:V}=B;if(V.type==="TypeCastExpression")return V.range=B.range,V;let k=o(B);if(!f.has(k))return V.extra=Object.assign(Object.assign({},V.extra),{},{parenthesized:!0}),V}})}return g=I(g,f=>{switch(f.type){case"ChainExpression":return R(f.expression);case"LogicalExpression":{if(U(f))return D(f);break}case"VariableDeclaration":{let B=y(f.declarations);B&&B.init&&G(f,B);break}case"TSParenthesizedType":return v(f.typeAnnotation)||f.typeAnnotation.type==="TSThisType"||(f.typeAnnotation.range=[o(f),l(f)]),f.typeAnnotation;case"TSTypeParameter":if(typeof f.name=="string"){let B=o(f);f.name={type:"Identifier",name:f.name,range:[B,B+f.name.length]}}break;case"ObjectExpression":if(w.parser==="typescript"){let B=f.properties.find(V=>V.type==="Property"&&V.value.type==="TSEmptyBodyFunctionExpression");B&&T(B.value,"Unexpected token.")}break;case"SequenceExpression":{let B=y(f.expressions);f.range=[o(f),Math.min(l(B),l(f))];break}case"TopicReference":w.__isUsingHackPipeline=!0;break;case"ExportAllDeclaration":{let{exported:B}=f;if(w.parser==="meriyah"&&B&&B.type==="Identifier"){let V=w.originalText.slice(o(B),l(B));(V.startsWith('"')||V.startsWith("'"))&&(f.exported=Object.assign(Object.assign({},f.exported),{},{type:"Literal",value:f.exported.name,raw:V}))}break}case"PropertyDefinition":if(w.parser==="meriyah"&&f.static&&!f.computed&&!f.key){let B="static",V=o(f);Object.assign(f,{static:!1,key:{type:"Identifier",name:B,range:[V,V+B.length]}})}break}}),g;function G(f,B){w.originalText[l(B)]!==";"&&(f.range=[o(f),l(B)])}}functio
|
||
|
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),e.allowHashBang==null&&(t.allowHashBang=t.ecmaVersion>=14),_(t.onToken)){var s=t.onToken;t.onToken=function(n){return s.push(n)}}return _(t.onComment)&&(t.onComment=mt(t,t.onComment)),t}function mt(e,t){return function(r,s,n,h,c,m){var A={type:r?"Block":"Line",value:s,start:n,end:h};e.locations&&(A.loc=new te(this,c,m)),e.ranges&&(A.range=[n,h]),t.push(A)}}var _e=1,Ce=2,Oe=4,ze=8,mr=16,vr=32,vt=64,gr=128,Le=256,gt=_e|Ce|Le;function xt(e,t){return Ce|(e?Oe:0)|(t?ze:0)}var Ge=0,yt=1,ve=2,xr=3,yr=4,Ar=5,Y=function(t,r,s){this.options=t=dt(t),this.sourceFile=t.sourceFile,this.keywords=d(x[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var n="";t.allowReserved!==!0&&(n=I[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(n+=" await")),this.reservedWords=d(n);var h=(n?n+" ":"")+I.strict;this.reservedWordsStrict=d(h),this.reservedWordsStrictBind=d(h+" "+I.strictBind),this.input=String(r),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
|
||
|
`,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(S).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=i.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(_e),this.regexpState=null,this.privateNameStack=[]},de={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Y.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)},de.inFunction.get=function(){return(this.currentVarScope().flags&Ce)>0},de.inGenerator.get=function(){return(this.currentVarScope().flags&ze)>0&&!this.currentVarScope().inClassFieldInit},de.inAsync.get=function(){return(this.currentVarScope().flags&Oe)>0&&!this.currentVarScope().inClassFieldInit},de.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&Le)return!1;if(t.flags&Ce)return(t.flags&Oe)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},de.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&vt)>0||r||this.options.allowSuperOutsideMethod},de.allowDirectSuper.get=function(){return(this.currentThisScope().flags&gr)>0},de.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},de.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&(Ce|Le))>0||r},de.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Le)>0},Y.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var s=this,n=0;n<t.length;n++)s=t[n](s);return s},Y.parse=function(t,r){return new this(r,t).parse()},Y.parseExpressionAt=function(t,r,s){var n=new this(s,t,r);return n.nextToken(),n.parseExpression()},Y.tokenizer=function(t,r){return new this(r,t)},Object.defineProperties(Y.prototype,de);var se=Y.prototype,Xa=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;se.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){ee.lastIndex=e,e+=ee.exec(this.input)[0].length;var t=Xa.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){ee.lastIndex=e+t[0].length;var r=ee.exec(this.input),s=r.index+r[0].length,n=this.input.charAt(s);return n===";"||n==="}"||S.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||n==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,ee.lastIndex=e,e+=ee.exec(this.input)[0].length,this.input[e]===";"&&e++}},se.eat=function(e){return this.type===e?(this.next(),!0):!1},se.isContextual=function(e){return this.type===i.name&&this.value===e&&!this.containsEsc},se.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},se.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},se.canInsertSemicolon=function(){return this.type===i.eof||this.type===i.braceR||S.test(this.input.slice(this.lastTokEnd,this.start))},se.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},se.semicolon=function(){!this.eat(i.semi)&&!this.insertSemicolon()&&this.unexpected()},se.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTo
|
||
|
`),cooked:this.value},this.next(),r.tail=this.type===i.backQuote,this.finishNode(r,"TemplateElement")},M.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(r.quasis=[s];!s.tail;)this.type===i.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(i.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(i.braceR),r.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")},M.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===i.name||this.type===i.num||this.type===i.string||this.type===i.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===i.star)&&!S.test(this.input.slice(this.lastTokEnd,this.start))},M.parseObj=function(e,t){var r=this.startNode(),s=!0,n={};for(r.properties=[],this.next();!this.eat(i.braceR);){if(s)s=!1;else if(this.expect(i.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(i.braceR))break;var h=this.parseProperty(e,t);e||this.checkPropClash(h,n,t),r.properties.push(h)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")},M.parseProperty=function(e,t){var r=this.startNode(),s,n,h,c;if(this.options.ecmaVersion>=9&&this.eat(i.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===i.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(r.argument=this.parseMaybeAssign(!1,t),this.type===i.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(h=this.start,c=this.startLoc),e||(s=this.eat(i.star)));var m=this.containsEsc;return this.parsePropertyName(r),!e&&!m&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(r)?(n=!0,s=this.options.ecmaVersion>=9&&this.eat(i.star),this.parsePropertyName(r,t)):n=!1,this.parsePropertyValue(r,e,s,n,h,c,t,m),this.finishNode(r,"Property")},M.parsePropertyValue=function(e,t,r,s,n,h,c,m){if((r||s)&&this.type===i.colon&&this.unexpected(),this.eat(i.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,c),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===i.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(r,s);else if(!t&&!m&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==i.comma&&this.type!==i.braceR&&this.type!==i.eq){(r||s)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var A=e.kind==="get"?0:1;if(e.value.params.length!==A){var q=e.value.start;e.kind==="get"?this.raiseRecoverable(q,"getter should have no params"):this.raiseRecoverable(q,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=n),e.kind="init",t?e.value=this.parseMaybeDefault(n,h,this.copyNode(e.key)):this.type===i.eq&&c?(c.shorthandAssign<0&&(c.shorthandAssign=this.start),e.value=this.parseMaybeDefault(n,h,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()},M.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(i.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(i.bracketR),e.key;e.computed=!1}return e.key=this.type===i.num||this.type===i.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},M.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},M.parseMethod=function(e,t,r){var s=this.startNode(),n=this.yieldPos,h=this.awaitPos,c=this.awaitIdentPos;ret
|
||
|
`;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},z.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(i.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},z.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
||
|
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return E(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var r=this.pos-1;return this.invalidStringToken(r,"Invalid escape sequence in template string"),null}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(s,8);return n>255&&(s=s.slice(0,-1),n=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(n)}return j(t)?"":String.fromCharCode(t)}},z.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r},z.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(G(n,s))this.pos+=n<=65535?1:2;else if(n===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var h=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var c=this.readCodePoint();(t?w:G)(c,s)||this.invalidStringToken(h,"Invalid Unicode escape"),e+=E(c),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)},z.readWord=function(){var e=this.readWord1(),t=i.name;return this.keywords.test(e)&&(t=X[e]),this.finishToken(t,e)};var Wr="8.8.1";Y.acorn={Parser:Y,version:Wr,defaultOptions:fe,Position:H,SourceLocation:te,getLineInfo:ae,Node:Re,TokenType:f,tokTypes:i,keywordTypes:X,TokContext:ue,tokContexts:Q,isIdentifierChar:G,isIdentifierStart:w,Token:Qe,isNewLine:j,lineBreak:S,lineBreakG:F,nonASCIIwhitespace:ne};function fn(e,t){return Y.parse(e,t)}function dn(e,t,r){return Y.parseExpressionAt(e,t,r)}function mn(e,t){return Y.tokenizer(e,t)}o.Node=Re,o.Parser=Y,o.Position=H,o.SourceLocation=te,o.TokContext=ue,o.Token=Qe,o.TokenType=f,o.defaultOptions=fe,o.getLineInfo=ae,o.isIdentifierChar=G,o.isIdentifierStart=w,o.isNewLine=j,o.keywordTypes=X,o.lineBreak=S,o.lineBreakG=F,o.nonASCIIwhitespace=ne,o.parse=fn,o.parseExpressionAt=dn,o.tokContexts=Q,o.tokTypes=i,o.tokenizer=mn,o.version=Wr,Object.defineProperty(o,"__esModule",{value:!0})})}}),Hh=$({"node_modules/acorn-jsx/xhtml.js"(a,u){J(),u.exports={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u039
|
||
|
`:`\r
|
||
|
`):F=String.fromCharCode(S),this.options.locations&&(++this.curLine,this.lineStart=this.pos),F}jsx_readString(i){let S="",F=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let j=this.input.charCodeAt(this.pos);if(j===i)break;j===38?(S+=this.input.slice(F,this.pos),S+=this.jsx_readEntity(),F=this.pos):k(j)?(S+=this.input.slice(F,this.pos),S+=this.jsx_readNewLine(!1),F=this.pos):++this.pos}return S+=this.input.slice(F,this.pos++),this.finishToken(g.string,S)}jsx_readEntity(){let i="",S=0,F,j=this.input[this.pos];j!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let Z=++this.pos;for(;this.pos<this.input.length&&S++<10;){if(j=this.input[this.pos++],j===";"){i[0]==="#"?i[1]==="x"?(i=i.substr(2),l.test(i)&&(F=String.fromCharCode(parseInt(i,16)))):(i=i.substr(1),v.test(i)&&(F=String.fromCharCode(parseInt(i,10)))):F=o[i];break}i+=j}return F||(this.pos=Z,"&")}jsx_readWord(){let i,S=this.pos;do i=this.input.charCodeAt(++this.pos);while(O(i)||i===45);return this.finishToken(w.jsxName,this.input.slice(S,this.pos))}jsx_parseIdentifier(){let i=this.startNode();return this.type===w.jsxName?i.name=this.value:this.type.keyword?i.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(i,"JSXIdentifier")}jsx_parseNamespacedName(){let i=this.start,S=this.startLoc,F=this.jsx_parseIdentifier();if(!x.allowNamespaces||!this.eat(g.colon))return F;var j=this.startNodeAt(i,S);return j.namespace=F,j.name=this.jsx_parseIdentifier(),this.finishNode(j,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===w.jsxTagEnd)return"";let i=this.start,S=this.startLoc,F=this.jsx_parseNamespacedName();for(this.type===g.dot&&F.type==="JSXNamespacedName"&&!x.allowNamespacedObjects&&this.unexpected();this.eat(g.dot);){let j=this.startNodeAt(i,S);j.object=F,j.property=this.jsx_parseIdentifier(),F=this.finishNode(j,"JSXMemberExpression")}return F}jsx_parseAttributeValue(){switch(this.type){case g.braceL:let i=this.jsx_parseExpressionContainer();return i.expression.type==="JSXEmptyExpression"&&this.raise(i.start,"JSX attributes must only be assigned a non-empty expression"),i;case w.jsxTagStart:case g.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let i=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(i,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let i=this.startNode();return this.next(),i.expression=this.type===g.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(g.braceR),this.finishNode(i,"JSXExpressionContainer")}jsx_parseAttribute(){let i=this.startNode();return this.eat(g.braceL)?(this.expect(g.ellipsis),i.argument=this.parseMaybeAssign(),this.expect(g.braceR),this.finishNode(i,"JSXSpreadAttribute")):(i.name=this.jsx_parseNamespacedName(),i.value=this.eat(g.eq)?this.jsx_parseAttributeValue():null,this.finishNode(i,"JSXAttribute"))}jsx_parseOpeningElementAt(i,S){let F=this.startNodeAt(i,S);F.attributes=[];let j=this.jsx_parseElementName();for(j&&(F.name=j);this.type!==g.slash&&this.type!==w.jsxTagEnd;)F.attributes.push(this.jsx_parseAttribute());return F.selfClosing=this.eat(g.slash),this.expect(w.jsxTagEnd),this.finishNode(F,j?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(i,S){let F=this.startNodeAt(i,S),j=this.jsx_parseElementName();return j&&(F.name=j),this.expect(w.jsxTagEnd),this.finishNode(F,j?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(i,S){let F=this.startNodeAt(i,S),j=[],Z=this.jsx_parseOpeningElementAt(i,S),ne=null;if(!Z.selfClosing){e:for(;;)switch(this.type){case w.jsxTagStart:if(i=this.start,S=this.startLoc,this.next(),this.eat(g.slash)){ne=this.jsx_parseClosingElementAt(i,S);break e}j.push(this.jsx_parseElementAt(i,S));break;case w.jsxText:j.push(this.parseExprAtom());break;case g.braceL:j.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}I(ne.name)!==I(Z.name)&&this.raise(ne.start,"Expected corresponding
|
||
|
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(E+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,E)}jsx_readString(d){let E=super.jsx_readString(d);return this.type===P.string&&(this[V].jsxAttrValueToken=!0),E}[k](d){return d.type==="TemplateElement"&&this[V].templateElements.push(d),d.type.includes("Function")&&!d.generator&&(d.generator=!1),d}}},i="9.4.1",S={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=y.Parser.extend(O())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=y.Parser.extend(I.default(),O())),this._jsx},get(p){return Boolean(p&&p.ecmaFeatures&&p.ecmaFeatures.jsx)?this.jsx:this.regular}};function F(p,P){let _=S.get(P);return(!P||P.tokens!==!0)&&(P=Object.assign({},P,{tokens:!0})),new _(P,p).tokenize()}function j(p,P){let _=S.get(P);return new _(P,p).parse()}var Z=i,ne=function(){return T.KEYS}(),ee=void 0,ie=g(),Ne=w();a.Syntax=ee,a.VisitorKeys=ne,a.latestEcmaVersion=ie,a.parse=j,a.supportedEcmaVersions=Ne,a.tokenize=F,a.version=Z}}),Qh=$({"src/language-js/parse/espree.js"(a,u){"use strict";J();var o=dr(),l=Ba(),v=za(),b=Xh(),y=Ga(),I={ecmaVersion:"latest",range:!0,loc:!0,comment:!0,tokens:!0,sourceType:"module",ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function T(R){let{message:U,lineNumber:D,column:g}=R;return typeof D!="number"?R:o(U,{start:{line:D,column:g}})}function x(R,U){let D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{parse:g}=Jh(),w=b(R),{result:G,error:f}=l(()=>g(w,Object.assign(Object.assign({},I),{},{sourceType:"module"})),()=>g(w,Object.assign(Object.assign({},I),{},{sourceType:"script"})));if(!G)throw T(f);return D.originalText=R,y(G,D)}u.exports=v(x)}});J();var $h=Kh(),Yh=Qh();Ka.exports={parsers:{acorn:$h,espree:Yh}}});return Zh();});
|