6 lines
124 KiB
JavaScript
6 lines
124 KiB
JavaScript
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.meriyah=e()}})(function(){"use strict";var Xe=Object.defineProperty;var J2=Object.getOwnPropertyDescriptor;var j2=Object.getOwnPropertyNames;var X2=Object.prototype.hasOwnProperty;var kt=(e,t)=>{for(var n in t)Xe(e,n,{get:t[n],enumerable:!0})},H2=(e,t,n,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of j2(t))!X2.call(e,o)&&o!==n&&Xe(e,o,{get:()=>t[o],enumerable:!(u=J2(t,o))||u.enumerable});return e};var W2=e=>H2(Xe({},"__esModule",{value:!0}),e);var mi={};kt(mi,{parsers:()=>ht});var ht={};kt(ht,{meriyah:()=>gi});var z2=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),ae=z2;var Z=(e,t)=>(n,u,...o)=>n|1&&u==null?void 0:(t.call(u)??u[e]).apply(u,o);var K2=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},$2=Z("replaceAll",function(){if(typeof this=="string")return K2}),$=$2;var Y2=55296,Q2=56319,Z2=56320,G2=String.prototype.isWellFormed??function(){let{length:e}=this;for(let t=0;t<e;t++){let n=this.charCodeAt(t);if((n&64512)===Y2&&(n>Q2||++t>=e||(this.charCodeAt(t)&64512)!==Z2))return!1}return!0},x2=Z("isWellFormed",function(){if(typeof this=="string")return G2}),yt=x2;var St=((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
|
|||
|
|
`))return[];let t=[];for(let n of`*${e.value}*`.split(`
|
||
|
|
`)){if(n=n.trimStart(),!n.startsWith("*"))return[];t.push(n)}return t}var h2=new WeakMap;function Ku(e){return se(h2,e,zu)}function k2(e){h2.delete(e)}function gt(e){return Ku(e).length>0}function y2(e){if(e.length<2)return;let t;for(let n=e.length-1;n>=0;n--){let u=e[n];if(t&&V(u)===R(t)&>(u)&>(t)&&(e.splice(n+1,1),u.value+="*//*"+t.value,u.range=[R(u),V(t)],k2(u)),!a2(u)&&!ce(u))throw new TypeError(`Unknown comment type: "${u.type}".`);t=u}}function $u(e){return e!==null&&typeof e=="object"}var A2=$u;var be=null;function De(e){if(be!==null&&typeof be.property){let t=be;return be=De.prototype=null,t}return be=De.prototype=e??Object.create(null),new De}var Yu=10;for(let e=0;e<=Yu;e++)De();function mt(e){return De(e)}function Qu(e,t="type"){mt(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 T2=Qu;var g=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],b2={ArrayExpression:g[0],AssignmentExpression:g[1],BinaryExpression:g[1],InterpreterDirective:[],Directive:g[2],DirectiveLiteral:[],BlockStatement:g[3],BreakStatement:g[4],CallExpression:g[5],CatchClause:["param","body"],ConditionalExpression:g[6],ContinueStatement:g[4],DebuggerStatement:[],DoWhileStatement:g[7],EmptyStatement:[],ExpressionStatement:g[8],File:["program"],ForInStatement:g[9],ForStatement:["init","test","update","body"],FunctionDeclaration:g[10],FunctionExpression:g[10],Identifier:["typeAnnotation","decorators"],IfStatement:g[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:g[1],MemberExpression:g[11],NewExpression:g[5],Program:g[3],ObjectExpression:g[12],ObjectMethod:g[13],ObjectProperty:g[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:g[15],SequenceExpression:g[16],ParenthesizedExpression:g[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:g[15],TryStatement:["block","handler","finalizer"],UnaryExpression:g[15],UpdateExpression:g[15],VariableDeclaration:["declarations"],VariableDeclarator:g[17],WhileStatement:g[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:g[18],ClassExpression:g[19],ClassDeclaration:g[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:g[20],ExportSpecifier:["local","exported"],ForOfStatement:g[9],Impo
|
||
|
|
$1 $2
|
||
|
|
`);e=e.replace(S2,"").trimEnd();let u=Object.create(null),o=$(0,e,B2,"").replace(S2,"").trimEnd(),i;for(;i=B2.exec(e);){let l=$(0,i[2],ni,"");if(typeof u[i[1]]=="string"||Array.isArray(u[i[1]])){let f=u[i[1]];u[i[1]]=[...oi,...Array.isArray(f)?f:[f],l]}else u[i[1]]=l}return{comments:o,pragmas:u}}var I2=["noformat","noprettier"],L2=["format","prettier"];function li(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||
|
|
`);return t===-1?e:e.slice(0,t)}var q2=li;function P2(e){let t=q2(e);t&&(e=e.slice(t.length+1));let n=F2(e),{pragmas:u,comments:o}=N2(n);return{shebang:t,text:e,pragmas:u,comments:o}}function O2(e){let{pragmas:t}=P2(e);return L2.some(n=>ae(t,n))}function R2(e){let{pragmas:t}=P2(e);return I2.some(n=>ae(t,n))}function fi(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:O2,hasIgnorePragma:R2,locStart:R,locEnd:V,...e}}var V2=fi;var M2="module",v2="commonjs",U2=[M2,v2];function _2(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/i.test(e))return M2;if(/\.(?:cjs|cts)$/i.test(e))return v2}}var ci={next:!0,ranges:!0,webcompat:!0,loc:!1,raw:!0,directives:!0,impliedStrict:!1,preserveParens:!0,lexical:!1,jsx:!0,validateRegex:!1};function si(e,t){let n=[],u=i2(e,{...ci,sourceType:t,onComment:n});return u.comments=n,u}function di(e){let{description:t,loc:n}=e;return n?o2(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 ai(e,t){let n=_2(t?.filepath),u=(n?[n]:U2).map(i=>()=>si(e,i)),o;try{o=l2(u)}catch({errors:[i]}){throw di(i)}return w2(o,{text:e,astType:"meriyah"})}var gi=V2(ai);return W2(mi);});
|