webhook/node_modules/prettier/esm/parser-meriyah.mjs

20 lines
158 KiB
JavaScript
Raw Normal View History

2022-11-10 11:43:16 +01:00
"use strict";var L=(d,b)=>()=>(b||d((b={exports:{}}).exports,b),b.exports);var n2=L((g3,Ce)=>{var y1=function(d){return d&&d.Math==Math&&d};Ce.exports=y1(typeof globalThis=="object"&&globalThis)||y1(typeof window=="object"&&window)||y1(typeof self=="object"&&self)||y1(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var L2=L((h3,we)=>{we.exports=function(d){try{return!!d()}catch{return!0}}});var J2=L((m3,qe)=>{var jt=L2();qe.exports=!jt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var x1=L((b3,Be)=>{var _t=L2();Be.exports=!_t(function(){var d=function(){}.bind();return typeof d!="function"||d.hasOwnProperty("prototype")})});var P1=L((k3,Se)=>{var Mt=x1(),A1=Function.prototype.call;Se.exports=Mt?A1.bind(A1):function(){return A1.apply(A1,arguments)}});var Oe=L(Le=>{"use strict";var Fe={}.propertyIsEnumerable,Te=Object.getOwnPropertyDescriptor,Ut=Te&&!Fe.call({1:2},1);Le.f=Ut?function(b){var r=Te(this,b);return!!r&&r.enumerable}:Fe});var p1=L((v3,Ie)=>{Ie.exports=function(d,b){return{enumerable:!(d&1),configurable:!(d&2),writable:!(d&4),value:b}}});var D2=L((y3,Ve)=>{var Re=x1(),Ne=Function.prototype,Jt=Ne.bind,uu=Ne.call,Xt=Re&&Jt.bind(uu,uu);Ve.exports=Re?function(d){return d&&Xt(d)}:function(d){return d&&function(){return uu.apply(d,arguments)}}});var Me=L((A3,_e)=>{var je=D2(),zt=je({}.toString),Ht=je("".slice);_e.exports=function(d){return Ht(zt(d),8,-1)}});var Je=L((P3,Ue)=>{var Kt=n2(),Wt=D2(),Yt=L2(),$t=Me(),eu=Kt.Object,Zt=Wt("".split);Ue.exports=Yt(function(){return!eu("z").propertyIsEnumerable(0)})?function(d){return $t(d)=="String"?Zt(d,""):eu(d)}:eu});var iu=L((E3,Xe)=>{var Qt=n2(),Gt=Qt.TypeError;Xe.exports=function(d){if(d==null)throw Gt("Can't call method on "+d);return d}});var E1=L((D3,ze)=>{var xt=Je(),pt=iu();ze.exports=function(d){return xt(pt(d))}});var C2=L((C3,He)=>{He.exports=function(d){return typeof d=="function"}});var Z2=L((w3,Ke)=>{var uo=C2();Ke.exports=function(d){return typeof d=="object"?d!==null:uo(d)}});var D1=L((q3,We)=>{var nu=n2(),eo=C2(),io=function(d){return eo(d)?d:void 0};We.exports=function(d,b){return arguments.length<2?io(nu[d]):nu[d]&&nu[d][b]}});var $e=L((B3,Ye)=>{var no=D2();Ye.exports=no({}.isPrototypeOf)});var Qe=L((S3,Ze)=>{var to=D1();Ze.exports=to("navigator","userAgent")||""});var ni=L((F3,ii)=>{var ei=n2(),tu=Qe(),Ge=ei.process,xe=ei.Deno,pe=Ge&&Ge.versions||xe&&xe.version,ui=pe&&pe.v8,P2,C1;ui&&(P2=ui.split("."),C1=P2[0]>0&&P2[0]<4?1:+(P2[0]+P2[1]));!C1&&tu&&(P2=tu.match(/Edge\/(\d+)/),(!P2||P2[1]>=74)&&(P2=tu.match(/Chrome\/(\d+)/),P2&&(C1=+P2[1])));ii.exports=C1});var ou=L((T3,oi)=>{var ti=ni(),oo=L2();oi.exports=!!Object.getOwnPropertySymbols&&!oo(function(){var d=Symbol();return!String(d)||!(Object(d)instanceof Symbol)||!Symbol.sham&&ti&&ti<41})});var lu=L((L3,li)=>{var lo=ou();li.exports=lo&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var fu=L((O3,fi)=>{var fo=n2(),co=D1(),so=C2(),ao=$e(),go=lu(),ho=fo.Object;fi.exports=go?function(d){return typeof d=="symbol"}:function(d){var b=co("Symbol");return so(b)&&ao(b.prototype,ho(d))}});var si=L((I3,ci)=>{var mo=n2(),bo=mo.String;ci.exports=function(d){try{return bo(d)}catch{return"Object"}}});var di=L((R3,ai)=>{var ko=n2(),ro=C2(),vo=si(),yo=ko.TypeError;ai.exports=function(d){if(ro(d))return d;throw yo(vo(d)+" is not a function")}});var hi=L((N3,gi)=>{var Ao=di();gi.exports=function(d,b){var r=d[b];return r==null?void 0:Ao(r)}});var bi=L((V3,mi)=>{var Po=n2(),cu=P1(),su=C2(),au=Z2(),Eo=Po.TypeError;mi.exports=function(d,b){var r,f;if(b==="string"&&su(r=d.toString)&&!au(f=cu(r,d))||su(r=d.valueOf)&&!au(f=cu(r,d))||b!=="string"&&su(r=d.toString)&&!au(f=cu(r,d)))return f;throw Eo("Can't convert object to primitive value")}});var ri=L((j3,ki)=>{ki.exports=!1});var w1=L((_3,yi)=>{var vi=n2(),Do=Object.defineProperty;yi.exports=function(d,b){try{Do(vi,d,{value:b,configurable:!0,writable:!0})}catch{vi[d]=b}return b}});var q1=L((M3,Pi)=>{var Co=n2(),wo=w1(),Ai="__core-js_shared__",qo=Co[Ai]||wo(Ai,{});Pi.exports=qo});var du=L((U3,Di)=>{var Bo=
`,a0={EOL:_u,tmpdir:ju,tmpDir:Vu,networkInterfaces:c0,getNetworkInterfaces:s0,release:f0,type:l0,cpus:o0,totalmem:t0,freemem:n0,uptime:i0,loadavg:e0,hostname:u0,endianness:pn}}}),Z4=l2({"node-modules-polyfills-commonjs:os"(d,b){t2();var r=($4(),H4(xn));if(r&&r.default){b.exports=r.default;for(let f in r)b.exports[f]=r[f]}else r&&(b.exports=r)}}),Q4=l2({"node_modules/detect-newline/index.js"(d,b){"use strict";t2();var r=f=>{if(typeof f!="string")throw new TypeError("Expected a string");let E=f.match(/(?:\r?\n)/g)||[];if(E.length===0)return;let T=E.filter(F=>F===`\r
`).length,q=E.length-T;return T>q?`\r
`:`
`};b.exports=r,b.exports.graceful=f=>typeof f=="string"&&r(f)||`
`}}),G4=l2({"node_modules/jest-docblock/build/index.js"(d){"use strict";t2(),Object.defineProperty(d,"__esModule",{value:!0}),d.extract=H,d.parse=u2,d.parseWithComments=V,d.print=z,d.strip=S;function b(){let I=Z4();return b=function(){return I},I}function r(){let I=f(Q4());return r=function(){return I},I}function f(I){return I&&I.__esModule?I:{default:I}}var E=/\*\/$/,T=/^\/\*\*/,q=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,F=/(^|\s+)\/\/([^\r\n]*)/g,k=/^(\r?\n)+/,W=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,X=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,U=/(\r?\n|^) *\* ?/g,Y=[];function H(I){let e2=I.match(q);return e2?e2[0].trimLeft():""}function S(I){let e2=I.match(q);return e2&&e2[0]?I.substring(e2[0].length):I}function u2(I){return V(I).pragmas}function V(I){let e2=(0,r().default)(I)||b().EOL;I=I.replace(T,"").replace(E,"").replace(U,"$1");let m2="";for(;m2!==I;)m2=I,I=I.replace(W,"".concat(e2,"$1 $2").concat(e2));I=I.replace(k,"").trimRight();let c2=Object.create(null),R2=I.replace(X,"").replace(k,"").trimRight(),s2;for(;s2=X.exec(I);){let N2=s2[2].replace(F,"");typeof c2[s2[1]]=="string"||Array.isArray(c2[s2[1]])?c2[s2[1]]=Y.concat(c2[s2[1]],N2):c2[s2[1]]=N2}return{comments:R2,pragmas:c2}}function z(I){let{comments:e2="",pragmas:m2={}}=I,c2=(0,r().default)(e2)||b().EOL,R2="/**",s2=" *",N2=" */",w2=Object.keys(m2),O1=w2.map(g2=>$(g2,m2[g2])).reduce((g2,n1)=>g2.concat(n1),[]).map(g2=>s2+" "+g2+c2).join("");if(!e2){if(w2.length===0)return"";if(w2.length===1&&!Array.isArray(m2[w2[0]])){let g2=m2[w2[0]];return"".concat(R2," ").concat($(w2[0],g2)[0]).concat(N2)}}let I1=e2.split(c2).map(g2=>"".concat(s2," ").concat(g2)).join(c2)+c2;return R2+c2+(e2?I1:"")+(e2&&w2.length?s2+c2:"")+O1+N2}function $(I,e2){return Y.concat(e2).map(m2=>"@".concat(I," ").concat(m2).trim())}}}),x4=l2({"src/common/end-of-line.js"(d,b){"use strict";t2();function r(q){let F=q.indexOf("\r");return F>=0?q.charAt(F+1)===`
`?"crlf":"cr":"lf"}function f(q){switch(q){case"cr":return"\r";case"crlf":return`\r
`;default:return`
`}}function E(q,F){let k;switch(F){case`
`:k=/\n/g;break;case"\r":k=/\r/g;break;case`\r
`:k=/\r\n/g;break;default:throw new Error('Unexpected "eol" '.concat(JSON.stringify(F),"."))}let W=q.match(k);return W?W.length:0}function T(q){return q.replace(/\r\n?/g,`
`)}b.exports={guessEndOfLine:r,convertEndOfLineToChars:f,countEndOfLineChars:E,normalizeEndOfLine:T}}}),p4=l2({"src/language-js/utils/get-shebang.js"(d,b){"use strict";t2();function r(f){if(!f.startsWith("#!"))return"";let E=f.indexOf(`
`);return E===-1?f:f.slice(0,E)}b.exports=r}}),u3=l2({"src/language-js/pragma.js"(d,b){"use strict";t2();var{parseWithComments:r,strip:f,extract:E,print:T}=G4(),{normalizeEndOfLine:q}=x4(),F=p4();function k(U){let Y=F(U);Y&&(U=U.slice(Y.length+1));let H=E(U),{pragmas:S,comments:u2}=r(H);return{shebang:Y,text:U,pragmas:S,comments:u2}}function W(U){let Y=Object.keys(k(U).pragmas);return Y.includes("prettier")||Y.includes("format")}function X(U){let{shebang:Y,text:H,pragmas:S,comments:u2}=k(U),V=f(H),z=T({pragmas:Object.assign({format:""},S),comments:u2.trimStart()});return(Y?"".concat(Y,`
`):"")+q(z)+(V.startsWith(`
`)?`
`:`
`)+V}b.exports={hasPragma:W,insertPragma:X}}}),e3=l2({"src/utils/is-non-empty-array.js"(d,b){"use strict";t2();function r(f){return Array.isArray(f)&&f.length>0}b.exports=r}}),d0=l2({"src/language-js/loc.js"(d,b){"use strict";t2();var r=e3();function f(k,W){let{ignoreDecorators:X}=W||{};if(!X){let U=k.declaration&&k.declaration.decorators||k.decorators;if(r(U))return f(U[0])}return k.range?k.range[0]:k.start}function E(k){return k.range?k.range[1]:k.end}function T(k,W){let X=f(k);return Number.isInteger(X)&&X===f(W)}function q(k,W){let X=E(k);return Number.isInteger(X)&&X===E(W)}function F(k,W){return T(k,W)&&q(k,W)}b.exports={locStart:f,locEnd:E,hasSameLocStart:T,hasSameLoc:F}}}),i3=l2({"src/language-js/parse/utils/create-parser.js"(d,b){"use strict";t2();var{hasPragma:r}=u3(),{locStart:f,locEnd:E}=d0();function T(q){return q=typeof q=="function"?{parse:q}:q,Object.assign({astFormat:"estree",hasPragma:r,locStart:f,locEnd:E},q)}b.exports=T}}),n3=l2({"src/language-js/utils/is-ts-keyword-type.js"(d,b){"use strict";t2();function r(f){let{type:E}=f;return E.startsWith("TS")&&E.endsWith("Keyword")}b.exports=r}}),t3=l2({"src/language-js/utils/is-block-comment.js"(d,b){"use strict";t2();var r=new Set(["Block","CommentBlock","MultiLine"]),f=E=>r.has(E==null?void 0:E.type);b.exports=f}}),o3=l2({"src/language-js/utils/is-type-cast-comment.js"(d,b){"use strict";t2();var r=t3();function f(E){return r(E)&&E.value[0]==="*"&&/@type\b/.test(E.value)}b.exports=f}}),l3=l2({"src/utils/get-last.js"(d,b){"use strict";t2();var r=f=>f[f.length-1];b.exports=r}}),g0=l2({"src/language-js/parse/postprocess/visit-node.js"(d,b){"use strict";t2();function r(f,E){if(Array.isArray(f)){for(let T=0;T<f.length;T++)f[T]=r(f[T],E);return f}if(f&&typeof f=="object"&&typeof f.type=="string"){let T=Object.keys(f);for(let q=0;q<T.length;q++)f[T[q]]=r(f[T[q]],E);return E(f)||f}return f}b.exports=r}}),h0=l2({"src/language-js/parse/postprocess/throw-syntax-error.js"(d,b){"use strict";t2();var r=Gn();function f(E,T){let{start:q,end:F}=E.loc;throw r(T,{start:{line:q.line,column:q.column+1},end:{line:F.line,column:F.column+1}})}b.exports=f}}),f3=l2({"src/language-js/parse/postprocess/typescript.js"(d,b){"use strict";t2();var r=g0(),f=h0();function E(F,k,W){let X=F.decorators;if(!Array.isArray(X))return;let U=k.decorators;(!Array.isArray(U)||U.length!==X.length||X.some(Y=>{let H=W.get(Y);return!H||!U.includes(H)}))&&f(k,"Leading decorators must be attached to a class declaration")}function T(F,k){F.kind!==167||F.modifiers&&!F.modifiers.some(U=>U.kind===126)||F.initializer&&k.value===null&&f(k,"Abstract property cannot have an initializer")}function q(F,k){let{esTreeNodeToTSNodeMap:W,tsNodeToESTreeNodeMap:X}=k.tsParseResult;r(F,U=>{let Y=W.get(U);if(!Y)return;let H=X.get(Y);H===U&&(E(Y,H,X),T(Y,H))})}b.exports={throwErrorForInvalidNodes:q}}}),c3=l2({"src/language-js/parse/postprocess/index.js"(d,b){"use strict";t2();var{locStart:r,locEnd:f}=d0(),E=n3(),T=o3(),q=l3(),F=g0(),{throwErrorForInvalidNodes:k}=f3(),W=h0();function X(S,u2){if(u2.parser==="typescript"&&/@|abstract/.test(u2.originalText)&&k(S,u2),u2.parser!=="typescript"&&u2.parser!=="flow"&&u2.parser!=="acorn"&&u2.parser!=="espree"&&u2.parser!=="meriyah"){let z=new Set;S=F(S,$=>{$.leadingComments&&$.leadingComments.some(T)&&z.add(r($))}),S=F(S,$=>{if($.type==="ParenthesizedExpression"){let{expression:I}=$;if(I.type==="TypeCastExpression")return I.range=$.range,I;let e2=r($);if(!z.has(e2))return I.extra=Object.assign(Object.assign({},I.extra),{},{parenthesized:!0}),I}})}return S=F(S,z=>{switch(z.type){case"ChainExpression":return U(z.expression);case"LogicalExpression":{if(Y(z))return H(z);break}case"VariableDeclaration":{let $=q(z.declarations);$&&$.init&&V(z,$);break}case"TSParenthesizedType":return E(z.typeAnnotation)||z.typeAnnotation.type==="TSThisType"||(z.typeAnnotation.range=[r(z),f(z)]),z.typeAnnotation;case"TSTypeParameter":if(typeof z.name=="string"){let $=r(z);z.name={type:"Identifier",name:z.name,range:[$,$+z.name.length]}}break;case"ObjectExpression":if(u2.parser==="typescript"){let $=z.properties.
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",T