6 lines
121 KiB
JavaScript
Raw Normal View History

2026-05-31 13:21:13 +02:00
var q2=Object.defineProperty;var gt=(e,t)=>{for(var n in t)q2(e,n,{get:t[n],enumerable:!0})};var I2={};gt(I2,{parsers:()=>at});var at={};gt(at,{meriyah:()=>$u});var Q=(e,t)=>(n,u,...o)=>n|1&&u==null?void 0:(t.call(u)??u[e]).apply(u,o);var P2=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},O2=Q("replaceAll",function(){if(typeof this=="string")return P2}),p=O2;var V2=55296,R2=56319,M2=56320,v2=String.prototype.isWellFormed??function(){let{length:e}=this;for(let t=0;t<e;t++){let n=this.charCodeAt(t);if((n&64512)===V2&&(n>R2||++t>=e||(this.charCodeAt(t)&64512)!==M2))return!1}return!0},U2=Q("isWellFormed",function(){if(typeof this=="string")return v2}),mt=U2;var Dt=((e,t)=>{let n=new Uint32Array(69632),u=0,o=0;for(;u<2597;){let i=e[u++];if(i<0)o-=i;else{let l=e[u++];i&2&&(l=t[l]),i&1?n.fill(l,o,o+=e[u++]):n[o++]=l}}return n})([-1,2,26,2,27,2,5,-1,0,77595648,3,44,2,3,0,14,2,61,2,62,3,0,3,0,3168796671,0,4294956992,2,1,2,0,2,41,3,0,4,0,4294966523,3,0,4,2,16,2,63,2,0,0,4294836735,0,3221225471,0,4294901942,2,64,0,134152192,3,0,2,0,4294951935,3,0,2,0,2683305983,0,2684354047,2,17,2,0,0,4294961151,3,0,2,2,19,2,0,0,608174079,2,0,2,58,2,7,2,6,0,4286643967,3,0,2,2,1,3,0,3,0,4294901711,2,40,0,4089839103,0,2961209759,0,1342439375,0,4294543342,0,3547201023,0,1577204103,0,4194240,0,4294688750,2,2,0,80831,0,4261478351,0,4294549486,2,2,0,2967484831,0,196559,0,3594373100,0,3288319768,0,8469959,0,65472,2,3,0,4093640191,0,929054175,0,65487,0,4294828015,0,4092591615,0,1885355487,0,982991,2,3,2,0,0,2163244511,0,4227923919,0,4236247022,2,69,0,4284449919,0,851904,2,4,2,12,0,67076095,-1,2,70,0,1073741743,0,4093607775,-1,0,50331649,0,3265266687,2,33,0,4294844415,0,4278190047,2,20,2,137,-1,3,0,2,2,23,2,0,2,9,2,0,2,15,2,22,3,0,10,2,72,2,0,2,73,2,74,2,75,2,0,2,76,2,0,2,11,0,261632,2,25,3,0,2,2,13,2,4,3,0,18,2,77,2,5,3,0,2,2,78,0,2151677951,2,29,2,10,0,909311,3,0,2,0,814743551,2,48,0,67090432,3,0,2,2,42,2,0,2,6,2,0,2,30,2,8,0,268374015,2,108,2,51,2,0,2,79,0,134153215,-1,2,7,2,0,2,8,0,2684354559,0,67044351,0,3221160064,2,9,2,18,3,0,2,2,53,0,1046528,3,0,3,2,10,2,0,2,127,0,4294960127,2,9,2,6,2,11,0,4294377472,2,12,3,0,16,2,13,2,0,2,80,2,9,2,0,2,81,2,82,2,83,0,12288,2,54,0,1048577,2,84,2,14,-1,2,14,0,131042,2,85,2,86,2,87,2,0,2,34,-83,3,0,7,0,1046559,2,0,2,15,2,0,0,2147516671,2,21,3,88,2,2,0,-16,2,89,0,524222462,2,4,2,0,0,4269801471,2,4,3,0,2,2,28,2,16,3,0,2,2,49,2,0,-1,2,17,-16,3,0,206,-2,3,0,692,2,71,-1,2,17,2,9,3,0,8,2,91,2,18,2,0,0,3220242431,3,0,3,2,19,2,92,2,93,3,0,2,2,94,2,0,2,20,2,95,2,0,0,4351,2,0,2,10,3,0,2,0,67043391,0,3909091327,2,0,2,24,2,10,2,20,3,0,2,0,67076097,2,8,2,0,2,21,0,67059711,0,4236247039,3,0,2,0,939524103,0,8191999,2,99,2,100,2,22,2,23,3,0,3,0,67057663,3,0,349,2,101,2,102,2,7,-264,3,0,11,2,24,3,0,2,2,32,-1,0,3774349439,2,103,2,104,3,0,2,2,19,2,105,3,0,10,2,9,2,17,2,0,2,46,2,0,2,31,2,106,2,25,0,1638399,0,57344,2,107,3,0,3,2,20,2,26,2,27,2,5,2,28,2,0,2,8,2,109,-1,2,110,2,111,2,112,-1,3,0,3,2,12,-2,2,0,2,29,-3,0,536870912,-4,2,20,2,0,2,36,0,1,2,0,2,65,2,6,2,12,2,9,2,0,2,113,-1,3,0,4,2,9,2,23,2,114,2,7,2,0,2,115,2,0,2,116,2,117,2,118,2,0,2,10,3,0,9,2,21,2,30,2,31,2,119,2,120,-2,2,121,2,122,2,30,2,21,2,8,-2,2,123,2,30,3,32,2,-1,2,0,2,39,-2,0,4277137519,0,2269118463,-1,3,20,2,-1,2,33,2,38,2,0,3,30,2,2,35,2,19,-3,3,0,2,2,34,-1,2,0,2,35,2,0,2,35,2,0,2,47,2,0,0,4294950463,2,37,-7,2,0,0,203775,2,125,0,4227858432,2,20,2,43,2,36,2,17,2,37,2,17,2,124,2,21,3,0,2,2,38,0,2151677888,2,0,2,12,0,4294901764,2,145,2,0,2,56,2,55,0,5242879,3,0,2,0,402644511,-1,2,128,2,39,0,3,-1,2,129,2,130,2,0,0,67045375,2,40,0,4226678271,0,3766565279,0,2039759,2,132,2,41,0,1046437,0,6,3,0,2,0,3288270847,0,3,3,0,2,0,67043519,-5,2,0,0,4282384383,0,1056964609,-1,3,0,2,0,67043345,-1,2,0,2,42,2,23,2,50,2,11,2,59,2,38,-5,2,0,2,12,-3,3,0,2,0,2147484671,2,133,0,4190109695,2,52,-2,2,134,0,4244635647,0,27,2,0,2,8,2,43,2,0,2,66,2,17,2,0,2,42,-3,2,31,-2,2,0,2,45,2,57,2,44,2,45,2,135,2,46,0,8388351,-2,2,136,0,3028287487,2,47,2,138,0,33259519,2,23,2,7,2,48,-7,2,21,0,4294836223,0,3355443199,0,134152199,-2,2,67,-2,3,0,28,2,32,-3,3,0,3,2
`);return t.length>1&&t.every(n=>n.trimStart()[0]==="*")}var ft=new WeakMap;function Bu(e){return ft.has(e)||ft.set(e,Su(e)),ft.get(e)}var ct=Bu;function Fu(e){if(e.length<2)return;let t;for(let n=e.length-1;n>=0;n--){let u=e[n];if(t&&J(u)===H(t)&&ct(u)&&ct(t)&&(e.splice(n+1,1),u.value+="*//*"+t.value,u.range=[H(u),J(t)]),!o2(u)&&!fe(u))throw new TypeError(`Unknown comment type: "${u.type}".`);t=u}}var f2=Fu;function Nu(e){return e!==null&&typeof e=="object"}var c2=Nu;var ye=null;function Ae(e){if(ye!==null&&typeof ye.property){let t=ye;return ye=Ae.prototype=null,t}return ye=Ae.prototype=e??Object.create(null),new Ae}var Lu=10;for(let e=0;e<=Lu;e++)Ae();function st(e){return Ae(e)}function Iu(e,t="type"){st(e);function n(u){let o=u[t],i=e[o];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${o}'.`),{node:u});return i}return n}var s2=Iu;var s=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],d2={AccessorProperty:s[0],AnyTypeAnnotation:s[1],ArgumentPlaceholder:s[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:s[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:s[3],AsExpression:s[4],AssignmentExpression:s[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:s[6],BigIntLiteral:s[1],BigIntLiteralTypeAnnotation:s[1],BigIntTypeAnnotation:s[1],BinaryExpression:s[5],BindExpression:["object","callee"],BlockStatement:s[7],BooleanLiteral:s[1],BooleanLiteralTypeAnnotation:s[1],BooleanTypeAnnotation:s[1],BreakStatement:s[8],CallExpression:s[9],CatchClause:["param","body"],ChainExpression:s[3],ClassAccessorProperty:s[0],ClassBody:s[10],ClassDeclaration:s[11],ClassExpression:s[11],ClassImplements:s[12],ClassMethod:s[13],ClassPrivateMethod:s[13],ClassPrivateProperty:s[14],ClassProperty:s[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:s[15],ConditionalExpression:s[16],ConditionalTypeAnnotation:s[17],ContinueStatement:s[8],DebuggerStatement:s[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:s[18],DeclareEnum:s[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:s[20],DeclareFunction:["id","predicate"],DeclareHook:s[21],DeclareInterface:s[22],DeclareModule:s[19],DeclareModuleExports:s[23],DeclareNamespace:s[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:s[24],DeclareVariable:s[21],Decorator:s[3],Directive:s[18]
$1 $2
`);e=e.replace(h2,"").trimEnd();let u=Object.create(null),o=p(0,e,k2,"").replace(h2,"").trimEnd(),i;for(;i=k2.exec(e);){let l=p(0,i[2],Mu,"");if(typeof u[i[1]]=="string"||Array.isArray(u[i[1]])){let f=u[i[1]];u[i[1]]=[...Ju,...Array.isArray(f)?f:[f],l]}else u[i[1]]=l}return{comments:o,pragmas:u}}var T2=["noformat","noprettier"],b2=["format","prettier"];function _u(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
`);return t===-1?e:e.slice(0,t)}var D2=_u;function C2(e){let t=D2(e);t&&(e=e.slice(t.length+1));let n=y2(e),{pragmas:u,comments:o}=A2(n);return{shebang:t,text:e,pragmas:u,comments:o}}function E2(e){let{pragmas:t}=C2(e);return b2.some(n=>Object.prototype.hasOwnProperty.call(t,n))}function w2(e){let{pragmas:t}=C2(e);return T2.some(n=>Object.prototype.hasOwnProperty.call(t,n))}function Xu(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:E2,hasIgnorePragma:w2,locStart:H,locEnd:J,...e}}var S2=Xu;var B2="module";var F2="commonjs",N2=[B2,F2];function L2(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return B2;if(/\.(?:cjs|cts)$/iu.test(e))return F2}}var ju={next:!0,ranges:!0,webcompat:!0,loc:!1,raw:!0,directives:!0,impliedStrict:!1,preserveParens:!0,lexical:!1,jsx:!0,validateRegex:!1};function Hu(e,t){let n=[],u=e2(e,{...ju,sourceType:t,onComment:n});return u.comments=n,u}function zu(e){let{description:t,loc:n}=e;return n?t2(t,{loc:{start:{line:n.start.line,column:n.start.column+1},end:{line:n.end.line,column:n.end.column+1}},cause:e}):e}function Ku(e,t){let n=L2(t?.filepath),u=(n?[n]:N2).map(i=>()=>Hu(e,i)),o;try{o=n2(u)}catch({errors:[i]}){throw zu(i)}return r2(o,{parser:"meriyah",text:e})}var $u=S2(Ku);export{I2 as default,at as parsers};