Files
form_metacase/node_modules/prettier/plugins/babel.js
T

15 lines
313 KiB
JavaScript
Raw Normal View History

2026-03-14 20:41:55 +00:00
(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.babel=e()}})(function(){"use strict";var Re=Object.defineProperty;var Hs=Object.getOwnPropertyDescriptor;var Ws=Object.getOwnPropertyNames;var Js=Object.prototype.hasOwnProperty;var Ue=(a,t)=>{for(var e in t)Re(a,e,{get:t[e],enumerable:!0})},Gs=(a,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ws(t))!Js.call(a,i)&&i!==e&&Re(a,i,{get:()=>t[i],enumerable:!(s=Hs(t,i))||s.enumerable});return a};var Xs=a=>Gs(Re({},"__esModule",{value:!0}),a);var ca={};Ue(ca,{parsers:()=>ha});var vt={};Ue(vt,{__babel_estree:()=>ta,__js_expression:()=>Zr,__ts_expression:()=>ea,__vue_event_binding:()=>Yr,__vue_expression:()=>Zr,__vue_ts_event_binding:()=>Qr,__vue_ts_expression:()=>ea,babel:()=>Yr,"babel-flow":()=>$s,"babel-ts":()=>Qr});function Ys(a,t){if(a==null)return{};var e={};for(var s in a)if({}.hasOwnProperty.call(a,s)){if(t.indexOf(s)!==-1)continue;e[s]=a[s]}return e}var R=class{line;column;index;constructor(t,e,s){this.line=t,this.column=e,this.index=s}},Q=class{start;end;filename;identifierName;constructor(t,e){this.start=t,this.end=e}};function D(a,t){let{line:e,column:s,index:i}=a;return new R(e,s+t,i+t)}var Mt="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Qs={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Mt},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Mt}},Ot={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},be=a=>a.type==="UpdateExpression"?Ot.UpdateExpression[`${a.prefix}`]:Ot[a.type],Zs={AccessorIsGenerator:({kind:a})=>`A ${a}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:a})=>`Missing initializer in ${a} declaration.`,DecoratorArgumentsOutsideParenthe
- Did you mean \`export { '${a}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:a})=>`'${a==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:a})=>`Unsyntactic ${a==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:a})=>`A string literal cannot be used as an imported binding.
- Did you mean \`import { "${a}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:a})=>`Expected number in radix ${a}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:a})=>`Escape sequence in keyword ${a}.`,InvalidIdentifier:({identifierName:a})=>`Invalid identifier ${a}.`,InvalidLhs:({ancestor:a})=>`Invalid left-hand side in ${be(a)}.`,InvalidLhsBinding:({ancestor:a})=>`Binding invalid left-hand side in ${be(a)}.`,InvalidLhsOptionalChaining:({ancestor:a})=>`Invalid optional chaining in the left-hand side of ${be(a)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:a})=>`Unexpected character '${a}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:a})=>`Private name #${a} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:a})=>`Label '${a}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:a})=>`This experimental syntax requires enabling the parser plugin: ${a.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:a})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${a.map(t=>JSON.stringify(t)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:a})=>`Duplicate key "${a}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:a})=>`An export name cannot include a lone surrogate, found '\\u${a.toString(16)}'.`,ModuleExportUndefined:({localName:a})=>`Export '${a}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifi
`:`\r
`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(e){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(p.UnterminatedString,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);if(r===e)break;r===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):G(r)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(134,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 i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){let r=this.input.slice(e,this.state.pos),n=void 0;if(++this.state.pos,n)return n}}return this.state.pos=e,"&"}jsxReadWord(){let e,s=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(K(e)||e===45);this.finishToken(141,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(141)?e.name=this.state.value:bt(this.state.type)?e.name=z(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(14))return s;let i=this.startNodeAt(e);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(16);){let i=this.startNodeAt(e);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(E.brace),this.next(),e=this.jsxParseExpressionContainer(e,E.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(U.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(U.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(E.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,s){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();i.type==="SequenceExpression"&&!i.extra?.parenthesized&&this.raise(U.UnexpectedSequenceExpression,i.expressions[1]),e.expression=i}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(E.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(E.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){let s=this.startNodeAt(e);return this.eat(144)?this.finishNode(s,"JSXOpeningFragment"):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(e){let s=[];for(;!this.match(56)&&!this.match(144);)s.push(this.jsxParseAttribute());return e.attributes=s,e.selfClosing=this.eat(56),this.expect(144),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let s=this.startNodeAt(e);return this.eat(144)?this.finishNode(s,"JSXClosingFragment"):(s.name=this.jsxParseElementName(),this.expect(144),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(e){let s=this.startNodeAt
`,++e,x===13&&t.charCodeAt(e)===10&&++e,++i,f=s=e):r.unterminated(n,o,h):++e}return{pos:e,str:l,firstInvalidLoc:u,lineStart:s,curLine:i}}function qi(a,t,e,s){return a==="template"?t===96||t===36&&e.charCodeAt(s+1)===123:t===(a==="double"?34:39)}function $i(a,t,e,s,i,r){let n=!i;t++;let o=l=>({pos:t,ch:l,lineStart:e,curLine:s}),h=a.charCodeAt(t++);switch(h){case 110:return o(`
`);case 114:return o("\r");case 120:{let l;return{code:l,pos:t}=tt(a,t,e,s,2,!1,n,r),o(l===null?null:String.fromCharCode(l))}case 117:{let l;return{code:l,pos:t}=as(a,t,e,s,n,r),o(l===null?null:String.fromCodePoint(l))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:a.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);r.strictNumericEscape(t-1,e,s);default:if(h>=48&&h<=55){let l=t-1,f=/^[0-7]+/.exec(a.slice(l,t+2))[0],d=parseInt(f,8);d>255&&(f=f.slice(0,-1),d=parseInt(f,8)),t+=f.length-1;let x=a.charCodeAt(t);if(f!=="0"||x===56||x===57){if(i)return o(null);r.strictNumericEscape(l,e,s)}return o(String.fromCharCode(d))}return o(String.fromCharCode(h))}}function tt(a,t,e,s,i,r,n,o){let h=t,l;return{n:l,pos:t}=rs(a,t,e,s,16,i,r,!1,o,!n),l===null&&(n?o.invalidEscapeSequence(h,e,s):t=h-1),{code:l,pos:t}}function rs(a,t,e,s,i,r,n,o,h,l){let u=t,f=i===16?jt.hex:jt.decBinOct,d=i===16?Te.hex:i===10?Te.dec:i===8?Te.oct:Te.bin,x=!1,A=0;for(let k=0,N=r??1/0;k<N;++k){let C=a.charCodeAt(t),I;if(C===95&&o!=="bail"){let Pe=a.charCodeAt(t-1),ae=a.charCodeAt(t+1);if(o){if(Number.isNaN(ae)||!d(ae)||f.has(Pe)||f.has(ae)){if(l)return{n:null,pos:t};h.unexpectedNumericSeparator(t,e,s)}}else{if(l)return{n:null,pos:t};h.numericSeparatorInEscapeSequence(t,e,s)}++t;continue}if(C>=97?I=C-97+10:C>=65?I=C-65+10:zi(C)?I=C-48:I=1/0,I>=i){if(I<=9&&l)return{n:null,pos:t};if(I<=9&&h.invalidDigit(t,e,s,i))I=0;else if(n)I=0,x=!0;else break}++t,A=A*i+I}return t===u||r!=null&&t-u!==r||x?{n:null,pos:t}:{n:A,pos:t}}function as(a,t,e,s,i,r){let n=a.charCodeAt(t),o;if(n===123){if(++t,{code:o,pos:t}=tt(a,t,e,s,a.indexOf("}",t)-t,!0,i,r),++t,o!==null&&o>1114111)if(i)r.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=tt(a,t,e,s,4,!1,i,r));return{code:o,pos:t}}function he(a,t,e){return new R(e,a-t,a)}var Ki=new Set([103,109,115,105,121,117,100,118]),st=class{constructor(t){let e=t.startIndex||0;this.type=t.type,this.value=t.value,this.start=e+t.start,this.end=e+t.end,this.loc=new Q(t.startLoc,t.endLoc)}},it=class extends Ze{isLookahead;tokens=[];constructor(t,e){super(),this.state=new et,this.state.init(t),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new st(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return je.lastIndex=t,je.test(this.input)?je.lastIndex:t}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(t){return this.input.charCodeAt(this.nextTokenStartSince(t))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return Ve.lastIndex=t,Ve.test(this.input)?Ve.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++t<this.input.length){let s=this.input.charCodeAt(t);(s&64512)===56320&&(e=65536+((e&1023)<<10)+(s&1023))}return e}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach(([e,s])=>this.raise(e,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,
`),cooked:r===null?null:r.slice(1,l)},o.tail=h,this.next();let f=this.finishNode(o,"TemplateElement");return this.resetEndLocation(f,D(this.state.lastTokEndLoc,l)),f}parseTemplate(t){let e=this.startNode(),s=this.parseTemplateElement(t),i=[s],r=[];for(;!s.tail;)r.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(t));return e.expressions=r,e.quasis=i,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=!1,o=!0,h=this.startNode();for(h.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(h);break}let u;e?u=this.parseBindingProperty():(u=this.parsePropertyDefinition(i),n=this.checkProto(u,s,n,i)),s&&!this.isObjectProperty(u)&&u.type!=="SpreadElement"&&this.raise(p.InvalidRecordProperty,u),h.properties.push(u)}this.next(),this.state.inFSharpPipelineDirectBody=r;let l="ObjectExpression";return e?l="ObjectPattern":s&&(l="RecordExpression"),this.finishNode(h,l)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),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(p.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let s=this.startNode(),i=!1,r=!1,n;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);let h=this.state.containsEsc;if(this.parsePropertyName(s,t),!o&&!h&&this.maybeAsyncOrAccessorProp(s)){let{key:l}=s,u=l.name;u==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(l),o=this.eat(55),this.parsePropertyName(s)),(u==="get"||u==="set")&&(r=!0,this.resetPreviousNodeTrailingComments(l),s.kind=u,this.match(55)&&(o=!0,this.raise(p.AccessorIsGenerator,this.state.curPosition(),{kind:u}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,r,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){let e=this.getGetterSetterExpectedParamCount(t),s=this.getObjectOrClassMethodParams(t);s.length!==e&&this.raise(t.kind==="get"?p.BadGetterArity:p.BadSetterArity,t),t.kind==="set"&&s[s.length-1]?.type==="RestElement"&&this.raise(p.BadSetterRestParameter,t)}parseObjectMethod(t,e,s,i,r){if(r){let n=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||e||this.match(10))return i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,i){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,i),this.finishObjectProperty(t);if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,this.cloneIdentifier(t.key));else if(this.match(29)){let r=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=r):this.raise(p.InvalidCoverInitializedName,r),t.value=this.parseMaybeDefault(e,this.cloneIdentifier(t.key))}else t.value=this.cloneIdentifier(t.key);return t.shorthand=!0,this.finishObjectProperty(t)}}finishObjectProperty(t){return this.finishNode(t,"ObjectProperty")}parseObjPropValue(t,e,s,i,r,n,o){let h=this.parseObjectMethod(t,s,i,r,n)||this.parseObjectProperty(t,e,r,o);return h||this.unexpected(),h}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:s,value:i}
`||a==="\r"||a==="\u2028"||a==="\u2029";function ur(a,t,e){let s=!!e?.backwards;if(t===!1)return!1;let i=a.charAt(t);if(s){if(a.charAt(t-1)==="\r"&&i===`
`)return t-2;if(fs(i))return t-1}else{if(i==="\r"&&a.charAt(t+1)===`
`)return t+2;if(fs(i))return t+1}return t}var ds=ur;function fr(a,t){return t===!1?!1:a.charAt(t)==="/"&&a.charAt(t+1)==="/"?ps(a,t):t}var ms=fr;function dr(a,t){let e=null,s=t;for(;s!==e;)e=s,s=ls(a,s),s=us(a,s),s=ms(a,s),s=ds(a,s);return s}var ys=dr;function xs(a){let t=[];for(let e of a)try{return e()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}function mr(a){if(!a.startsWith("#!"))return"";let t=a.indexOf(`
`);return t===-1?a:a.slice(0,t)}var ve=mr;var ee=(a,t)=>(e,s,...i)=>e|1&&s==null?void 0:(t.call(s)??s[a]).apply(s,i);var yr=Array.prototype.findLast??function(a){for(let t=this.length-1;t>=0;t--){let e=this[t];if(a(e,t,this))return e}},xr=ee("findLast",function(){if(Array.isArray(this))return yr}),Ps=xr;function Pr(a){return this[a<0?this.length+a:a]}var gr=ee("at",function(){if(Array.isArray(this)||typeof this=="string")return Pr}),gs=gr;function M(a){let t=a.range?.[0]??a.start,e=(a.declaration?.decorators??a.decorators)?.[0];return e?Math.min(M(e),t):t}function L(a){return a.range?.[1]??a.end}function Tr(a){let t=new Set(a);return e=>t.has(e?.type)}var te=Tr;var br=te(["Block","CommentBlock","MultiLine"]),se=br;var Ar=te(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),Ts=Ar;var wt=new WeakMap;function Sr(a){return wt.has(a)||wt.set(a,se(a)&&a.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(a.value)),wt.get(a)}var bs=Sr;function wr(a){if(!se(a))return!1;let t=`*${a.value}*`.split(`
`);return t.length>1&&t.every(e=>e.trimStart()[0]==="*")}var Ct=new WeakMap;function Cr(a){return Ct.has(a)||Ct.set(a,wr(a)),Ct.get(a)}var Et=Cr;function Er(a){if(a.length<2)return;let t;for(let e=a.length-1;e>=0;e--){let s=a[e];if(t&&L(s)===M(t)&&Et(s)&&Et(t)&&(a.splice(e+1,1),s.value+="*//*"+t.value,s.range=[M(s),L(t)]),!Ts(s)&&!se(s))throw new TypeError(`Unknown comment type: "${s.type}".`);t=s}}var As=Er;function Ir(a){return a!==null&&typeof a=="object"}var Ss=Ir;var me=null;function ye(a){if(me!==null&&typeof me.property){let t=me;return me=ye.prototype=null,t}return me=ye.prototype=a??Object.create(null),new ye}var Nr=10;for(let a=0;a<=Nr;a++)ye();function It(a){return ye(a)}function kr(a,t="type"){It(a);function e(s){let i=s[t],r=a[i];if(!Array.isArray(r))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return r}return e}var ws=kr;var c=[["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"]],Cs={AccessorProperty:c[0],AnyTypeAnnotation:c[1],ArgumentPlaceholder:c[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:c[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:c[3],AsExpression:c[4],AssignmentExpression:c[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:c[6],BigIntLiteral:c[1],BigIntLiteralTypeAnnotation:c[1],BigIntTypeAnnotation:c[1],BinaryExpression:c[5],BindExpression:["object","callee"],BlockStatement:c[7],BooleanLiteral:c[1],BooleanLiteralTypeAnnotation:c[1],BooleanTypeAnnotation:c[1],BreakStatement:c[8],CallExpression:c[9],CatchClause:["param","body"],ChainExpression:c[3],ClassAccessorProperty:c[0],ClassBody:c[10],ClassDeclaration:c[11],ClassExpression:c[11],ClassImplements:c[12],ClassMethod:c[13],ClassPrivateMethod:c[13],ClassPrivateProperty:c[14],ClassProperty:c[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:c[15],ConditionalExpression:c[16],ConditionalTypeAnnotation:c[17],ContinueStatement:c[8],DebuggerStatement:c[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:c[18],DeclareEnum:c[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:c[20],DeclareFunction:["id","predicate"],DeclareHook:c[21],DeclareInterface:c[22],DeclareModule:c[19],DeclareModuleExports:c[23],DeclareNamespace:c[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:c[24],DeclareVariable:c[21],Decorator:c[3],Directive:c[18]
$1 $2
`);a=a.replace(Ls,"").trimEnd();let s=Object.create(null),i=xe(0,a,Ds,"").replace(Ls,"").trimEnd(),r;for(;r=Ds.exec(a);){let n=xe(0,r[2],_r,"");if(typeof s[r[1]]=="string"||Array.isArray(s[r[1]])){let o=s[r[1]];s[r[1]]=[...zr,...Array.isArray(o)?o:[o],n]}else s[r[1]]=n}return{comments:i,pragmas:s}}var Fs=["noformat","noprettier"],Bs=["format","prettier"];function Rs(a){let t=ve(a);t&&(a=a.slice(t.length+1));let e=Ms(a),{pragmas:s,comments:i}=Os(e);return{shebang:t,text:a,pragmas:s,comments:i}}function Us(a){let{pragmas:t}=Rs(a);return Bs.some(e=>Object.prototype.hasOwnProperty.call(t,e))}function _s(a){let{pragmas:t}=Rs(a);return Fs.some(e=>Object.prototype.hasOwnProperty.call(t,e))}function qr(a){return a=typeof a=="function"?{parse:a}:a,{astFormat:"estree",hasPragma:Us,hasIgnorePragma:_s,locStart:M,locEnd:L,...a}}var H=qr;var Oe="module";var kt="commonjs";function js(a){if(typeof a=="string"){if(a=a.toLowerCase(),/\.(?:mjs|mts)$/iu.test(a))return Oe;if(/\.(?:cjs|cts)$/iu.test(a))return kt}}function $r(a,t){let{type:e="JsExpressionRoot",rootMarker:s,text:i}=t,{tokens:r,comments:n}=a;return delete a.tokens,delete a.comments,{tokens:r,comments:n,type:e,node:a,range:[0,i.length],rootMarker:s}}var Fe=$r;var ie=a=>H(Gr(a)),Kr={sourceType:Oe,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,attachComment:!1,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],["discardBinding",{syntaxType:"void"}]],tokens:!1,ranges:!1},Vs="v8intrinsic",zs=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],_=(a,t=Kr)=>({...t,plugins:[...t.plugins,...a]}),Hr=/@(?:no)?flow\b/u;function Wr(a,t){if(t?.endsWith(".js.flow"))return!0;let e=ve(a);e&&(a=a.slice(e.length));let s=ys(a,0);return s!==!1&&(a=a.slice(0,s)),Hr.test(a)}function Jr(a,t,e){let s=a(t,e),i=s.errors.find(r=>!Xr.has(r.reasonCode));if(i)throw i;return s}function Gr({isExpression:a=!1,optionsCombinations:t}){return(e,s={})=>{let{filepath:i}=s;if(typeof i!="string"&&(i=void 0),(s.parser==="babel"||s.parser==="__babel_estree")&&Wr(e,i))return s.parser="babel-flow",$s.parse(e,s);let r=t,n=s.__babelSourceType??js(i);n&&n!==Oe&&(r=r.map(u=>({...u,sourceType:n,...n===kt?{allowReturnOutsideFunction:void 0,allowNewTargetOutsideFunction:void 0}:void 0})));let o=/%[A-Z]/u.test(e);e.includes("|>")?r=(o?[...zs,Vs]:zs).flatMap(f=>r.map(d=>_([f],d))):o&&(r=r.map(u=>_([Vs],u)));let h=a?Ne:Ie,l;try{l=xs(r.map(u=>()=>Jr(h,e,u)))}catch({errors:[u]}){throw Me(u)}return a&&(l=Fe(l,{text:e,rootMarker:s.rootMarker})),ks(l,{text:e})}}var Xr=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","ImportAttributesUseAssert","DeclarationMissingInitializer"]),qs=[_(["jsx"])],Yr=ie({optionsCombinations:qs}),Qr=ie({optionsCombinations:[_(["jsx","typescript"]),_(["typescript"])]}),Zr=ie({isExpression:!0,optionsCombinations:[_(["jsx"])]}),ea=ie({isExpression:!0,optionsCombinations:[_(["typescript"])]}),$s=ie({optionsCombinations:[_(["jsx",["flow",{all:!0}],"flowComments"])]}),ta=ie({optionsCombinations:qs.map(a=>_(["estree"],a))});var Dt={};Ue(Dt,{json