@mintlify/cli 4.1.72 → 4.1.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{cli-Blu5vkOx.js → cli-BLKVRDx9.js} +3 -3
- package/dist/{config-DzDLoppg.js → config-B9UTDqKX.js} +1 -1
- package/dist/{config-B1SsFnRI.js → config-CXPSls8I.js} +1 -1
- package/dist/{converter-js78Fb8_.js → converter-3_OvM8TS.js} +1 -1
- package/dist/{currencyMath-BHNabTeO.js → currencyMath-DcWm_B16.js} +1 -1
- package/dist/{dist-DGS-P0UG.js → dist-BA3H54nL.js} +1 -1
- package/dist/{dist-DYIsiCSX.js → dist-CfnhJnLz.js} +1 -1
- package/dist/{dist-BpdR9SbK.js → dist-DgyavKdR.js} +1 -1
- package/dist/{dist-CMyjEKka.js → dist-wJL5MmMs.js} +1 -1
- package/dist/{lib-BstlxGQb.js → lib-DGY-NrHk.js} +1 -1
- package/dist/{multi-repo-command-Bb-oUtDy.js → multi-repo-command-CtjEOn-c.js} +1 -1
- package/dist/{multi-repo-command-CfGPBp8I.js → multi-repo-command-DvqhX76Z.js} +2 -2
- package/dist/{multi-repo-config-IN7JizKN.js → multi-repo-config-C9dwfzPC.js} +1 -1
- package/dist/{multi-repo-preview-DbB27X4T.js → multi-repo-preview-DG84R2no.js} +1 -1
- package/dist/{multi-repo-setup-DGRjpipy.js → multi-repo-setup-CWCGybny.js} +1 -1
- package/dist/{remark-utils-CLJr2toS.js → remark-utils-heM5aat5.js} +1 -1
- package/dist/start.js +1 -1
- package/dist/{utils-D-zUiakl.js → utils-B7dNmFFf.js} +1 -1
- package/package.json +10 -10
|
@@ -4,7 +4,7 @@ import { dirname as __mintDirname } from 'node:path';
|
|
|
4
4
|
const require = __mintCreateRequire(import.meta.url);
|
|
5
5
|
const __filename = __mintFileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __mintDirname(__filename);
|
|
7
|
-
import{t as e}from"./rolldown-runtime-CEAe2Uac.js";import{$n as t,Jn as n,Qn as r,Rn as i,_t as a,rr as o,rt as s,yt as c}from"./dist-DGS-P0UG.js";import{t as l}from"./watcher-CrrSXFeO.js";import{N as u,j as d,tt as f}from"./utils-D-zUiakl.js";import{n as p,t as m}from"./lib-BstlxGQb.js";import{a as h,l as ee,o as te}from"./multi-repo-config-IN7JizKN.js";import{constants as g}from"node:fs";import _ from"node:os";import{copyFile as ne,lstat as v,mkdir as re,mkdtemp as ie,readFile as ae,readdir as y,realpath as oe,rename as se,rm as b,stat as x,writeFile as ce}from"node:fs/promises";import S from"node:path";import{createHash as le}from"node:crypto";const C=({gitSources:e})=>{let[t,...n]=e;if(t!==void 0)return[t,...n];throw Error(`Deployment must have at least one git source`)},w=e=>{let t=C(e);return t.find(e=>e.isBase===!0)??t[0]};var ue=/* @__PURE__ */ e((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],t.indexOf(i)>=0||(n[i]=e[i]);return n}var n=class{constructor(e,t,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=t,this.index=n}},r=class{constructor(e,t){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=t}};function i(e,t){let{line:r,column:i,index:a}=e;return new n(r,i+t,a+t)}var a={SyntaxError:`BABEL_PARSER_SYNTAX_ERROR`,SourceTypeModuleError:`BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED`};let o=(e,t=e.length-1)=>({get(){return e.reduce((e,t)=>e[t],this)},set(n){e.reduce((e,r,i)=>i===t?e[r]=n:e[r],this)}}),s=(e,t,n)=>Object.keys(n).map(e=>[e,n[e]]).filter(([,e])=>!!e).map(([e,t])=>[e,typeof t==`function`?{value:t,enumerable:!1}:typeof t.reflect==`string`?Object.assign({},t,o(t.reflect.split(`.`))):t]).reduce((e,[t,n])=>Object.defineProperty(e,t,Object.assign({configurable:!0},n)),Object.assign(new e,t));var c={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:a.SourceTypeModuleError},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:a.SourceTypeModuleError}};let l={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`},u=({type:e,prefix:t})=>e===`UpdateExpression`?l.UpdateExpression[String(t)]:l[e];var d={AccessorIsGenerator:({kind:e})=>`A ${e}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.`,AwaitInUsingBinding:`'await' is not allowed to be used as a name in 'using' declarations.`,AwaitNotInAsyncContext:`'await' is only allowed within async functions and at the top levels of modules.`,AwaitNotInAsyncFunction:`'await' is only allowed within async functions.`,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:e})=>`Missing initializer in ${e} declaration.`,DecoratorArgumentsOutsideParentheses:`Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.`,DecoratorBeforeExport:`Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.`,DecoratorsBeforeAfterExport:`Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.`,DecoratorConstructor:`Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?`,DecoratorExportClass:`Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.`,DecoratorSemicolon:`Decorators must not be followed by a semicolon.`,DecoratorStaticBlock:`Decorators can't be used with a static block.`,DeletePrivateField:`Deleting a private field is not allowed.`,DestructureNamedImport:`ES2015 named imports do not destructure. Use another statement for destructuring after the import.`,DuplicateConstructor:`Duplicate constructor in the same class.`,DuplicateDefaultExport:`Only one default export allowed per module.`,DuplicateExport:({exportName:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:`Redefinition of __proto__ property.`,DuplicateRegExpFlags:`Duplicate regular expression flag.`,ElementAfterRest:`Rest element must be last element.`,EscapedCharNotAnIdentifier:`Invalid Unicode escape.`,ExportBindingIsString:({localName:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:`'from' is not allowed as an identifier after 'export default'.`,ForInOfLoopInitializer:({type:e})=>`'${e===`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:e})=>`Unsyntactic ${e===`BreakStatement`?`break`:`continue`}.`,IllegalLanguageModeDirective:`Illegal 'use strict' directive in function with non-simple parameter list.`,IllegalReturn:`'return' outside of function.`,ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArgumentTrailingComma:`Trailing comma is disallowed inside import(...) arguments.`,ImportCallArity:({maxArgumentCount:e})=>`\`import()\` requires exactly ${e===1?`one argument`:`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.`,InvalidCoverInitializedName:`Invalid shorthand property initializer.`,InvalidDecimal:`Invalid decimal.`,InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:`Bad character escape sequence.`,InvalidEscapeSequenceTemplate:`Invalid escape sequence in template.`,InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${u(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${u(e)}.`,InvalidNumber:`Invalid number.`,InvalidOrMissingExponent:`Floating-point numbers require a valid exponent after the 'e'.`,InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:`Invalid parenthesized assignment pattern.`,InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} 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:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:`'let' is not allowed to be used as a name in 'let' or 'const' declarations.`,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:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map(e=>JSON.stringify(e)).join(`, `)}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map(e=>JSON.stringify(e)).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:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' 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' modifier cannot appear on a constructor declaration.`,ParamDupe:`Argument name clash.`,PatternHasAccessor:`Object pattern can't contain getter or setter.`,PatternHasMethod:`Object pattern can't contain methods.`,PrivateInExpectedIn:({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RecordExpressionBarIncorrectEndSyntaxType:`Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,RecordExpressionBarIncorrectStartSyntaxType:`Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,RecordExpressionHashIncorrectStartSyntaxType:`Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.`,RecordNoProto:`'__proto__' is not allowed in Record expressions.`,RestTrailingComma:`Unexpected trailing comma after rest element.`,SloppyFunction:`In non-strict mode code, functions can only be declared at top level or inside a block.`,SloppyFunctionAnnexB:`In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.`,StaticPrototype:`Classes may not have static property named prototype.`,SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:`Private fields can't be accessed on super.`,TrailingDecorator:`Decorators must be attached to a class element.`,TupleExpressionBarIncorrectEndSyntaxType:`Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,TupleExpressionBarIncorrectStartSyntaxType:`Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,TupleExpressionHashIncorrectStartSyntaxType:`Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.`,UnexpectedArgumentPlaceholder:`Unexpected argument placeholder.`,UnexpectedAwaitAfterPipelineBody:`Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.`,UnexpectedDigitAfterHash:`Unexpected digit after hash token.`,UnexpectedImportExport:`'import' and 'export' may only appear at the top level.`,UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,UnexpectedLeadingDecorator:`Leading decorators must be attached to a class declaration.`,UnexpectedLexicalDeclaration:`Lexical declaration cannot appear in a single-statement context.`,UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:`A numeric separator is only allowed between two digits.`,UnexpectedPrivateField:`Unexpected private name.`,UnexpectedReservedWord:({reservedWord:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:`'super' is only allowed in object methods and classes.`,UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:``}${e?`, expected "${e}"`:``}`,UnexpectedTokenUnaryExponentiation:`Illegal expression. Wrap left hand side or entire exponentiation in parentheses.`,UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:`Binding should be performed on object property.`,UnsupportedDecoratorExport:`A decorated export must export a class declaration.`,UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,UnsupportedParameterDecorator:`Decorators cannot be used to decorate parameters.`,UnsupportedPropertyDecorator:`Decorators cannot be used to decorate object literal properties.`,UnsupportedSuper:`'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).`,UnterminatedComment:`Unterminated comment.`,UnterminatedRegExp:`Unterminated regular expression.`,UnterminatedString:`Unterminated string constant.`,UnterminatedTemplate:`Unterminated template.`,UsingDeclarationHasBindingPattern:`Using declaration cannot have destructuring patterns.`,VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,YieldBindingIdentifier:`Can not use 'yield' as identifier inside a generator.`,YieldInParameter:`Yield expression is not allowed in formal parameters.`,ZeroDigitNumericSeparator:`Numeric separator can not be used after leading 0.`},f={StrictDelete:`Deleting local variable in strict mode.`,StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' in strict mode.`,StrictFunction:`In strict mode code, functions can only be declared at top level or inside a block.`,StrictNumericEscape:`The only valid numeric escape in strict mode is '\\0'.`,StrictOctalLiteral:`Legacy octal literals are not allowed in strict mode.`,StrictWith:`'with' in strict mode.`};let p=/* @__PURE__ */ new Set([`ArrowFunctionExpression`,`AssignmentExpression`,`ConditionalExpression`,`YieldExpression`]);var m={PipeBodyIsTighter:`Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.`,PipeTopicRequiresHackPipes:`Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.`,PipeTopicUnbound:`Topic reference is unbound; it must be inside a pipe body.`,PipeTopicUnconfiguredToken:({token:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:`Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.`,PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${u({type:e})}; please wrap it in parentheses.`,PipelineBodyNoArrow:`Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.`,PipelineBodySequenceExpression:`Pipeline body may not be a comma-separated sequence expression.`,PipelineHeadSequenceExpression:`Pipeline head should not be a comma-separated sequence expression.`,PipelineTopicUnused:`Pipeline is in topic style but does not use topic reference.`,PrimaryTopicNotAllowed:`Topic reference was used in a lexical context without topic binding.`,PrimaryTopicRequiresSmartPipeline:`Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.`};let h=[`toMessage`],ee=[`message`];function te(e){let{toMessage:r}=e,i=t(e,h);return function e({loc:t,details:a}){return s(SyntaxError,Object.assign({},i,{loc:t}),{clone(t={}){let r=t.loc||{};return e({loc:new n(`line`in r?r.line:this.loc.line,`column`in r?r.column:this.loc.column,`index`in r?r.index:this.loc.index),details:Object.assign({},this.details,t.details)})},details:{value:a,enumerable:!1},message:{get(){return`${r(this.details)} (${this.loc.line}:${this.loc.column})`},set(e){Object.defineProperty(this,"message",{value:e})}},pos:{reflect:`loc.index`,enumerable:!0},missingPlugin:`missingPlugin`in a&&{reflect:`details.missingPlugin`,enumerable:!0}})}}function g(e,n){if(Array.isArray(e))return t=>g(t,e[0]);let r={};for(let i of Object.keys(e)){let o=e[i],s=typeof o==`string`?{message:()=>o}:typeof o==`function`?{message:o}:o,{message:c}=s,l=t(s,ee),u=typeof c==`string`?()=>c:c;r[i]=te(Object.assign({code:a.SyntaxError,reasonCode:i,toMessage:u},n?{syntaxPlugin:n}:{},l))}return r}let _=Object.assign({},g(c),g(d),g(f),g`pipelineOperator`(m)),{defineProperty:ne}=Object,v=(e,t)=>ne(e,t,{enumerable:!1,value:e[t]});function re(e){return e.loc.start&&v(e.loc.start,`index`),e.loc.end&&v(e.loc.end,`index`),e}var ie=(e=>class extends e{parse(){let e=re(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(re)),e}parseRegExpLiteral({pattern:e,flags:t}){let n=null;try{n=new RegExp(e,t)}catch{}let r=this.estreeParseLiteral(n);return r.regex={pattern:e,flags:t},r}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}let n=this.estreeParseLiteral(t);return n.bigint=String(n.value||e),n}parseDecimalLiteral(e){let t=this.estreeParseLiteral(null);return t.decimal=String(t.value||e),t}estreeParseLiteral(e){return this.parseLiteral(e,`Literal`)}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){let t=e.value;delete e.value,t.type=`Literal`,t.raw=t.extra.raw,t.value=t.extra.expressionValue;let n=e;return n.type=`ExpressionStatement`,n.expression=t,n.directive=t.extra.rawValue,delete t.extra,n}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return e.type===`ExpressionStatement`&&e.expression.type===`Literal`&&typeof e.expression.value==`string`&&!((t=e.expression.extra)!=null&&t.parenthesized)}parseBlockBody(e,t,n,r,i){super.parseBlockBody(e,t,n,r,i),e.body=e.directives.map(e=>this.directiveToStmt(e)).concat(e.body),delete e.directives}pushClassMethod(e,t,n,r,i,a){this.parseMethod(t,n,r,i,a,`ClassMethod`,!0),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(t)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption(`estree`,`classFeatures`)?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let t=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=t,e.type=`PrivateIdentifier`,e}isPrivateName(e){return this.getPluginOption(`estree`,`classFeatures`)?e.type===`PrivateIdentifier`:super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption(`estree`,`classFeatures`)?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){let n=super.parseLiteral(e,t);return n.raw=n.extra.raw,delete n.extra,n}parseFunctionBody(e,t,n=!1){super.parseFunctionBody(e,t,n),e.expression=e.body.type!==`BlockStatement`}parseMethod(e,t,n,r,i,a,o=!1){let s=this.startNode();return s.kind=e.kind,s=super.parseMethod(s,t,n,r,i,a,o),s.type=`FunctionExpression`,delete s.kind,e.value=s,a===`ClassPrivateMethod`&&(e.computed=!1),this.finishNode(e,`MethodDefinition`)}parseClassProperty(...e){let t=super.parseClassProperty(...e);return this.getPluginOption(`estree`,`classFeatures`)&&(t.type=`PropertyDefinition`),t}parseClassPrivateProperty(...e){let t=super.parseClassPrivateProperty(...e);return this.getPluginOption(`estree`,`classFeatures`)&&(t.type=`PropertyDefinition`,t.computed=!1),t}parseObjectMethod(e,t,n,r,i){let a=super.parseObjectMethod(e,t,n,r,i);return a&&(a.type=`Property`,a.kind===`method`&&(a.kind=`init`),a.shorthand=!1),a}parseObjectProperty(e,t,n,r){let i=super.parseObjectProperty(e,t,n,r);return i&&(i.kind=`init`,i.type=`Property`),i}isValidLVal(e,t,n){return e===`Property`?`value`:super.isValidLVal(e,t,n)}isAssignable(e,t){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(e!=null&&this.isObjectProperty(e)){let{key:n,value:r}=e;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.loc.start),this.toAssignable(r,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,n){e.kind===`get`||e.kind===`set`?this.raise(_.PatternHasAccessor,{at:e.key}):e.method?this.raise(_.PatternHasMethod,{at:e.key}):super.toAssignableObjectExpressionProp(e,t,n)}finishCallExpression(e,t){let n=super.finishCallExpression(e,t);return n.callee.type===`Import`&&(n.type=`ImportExpression`,n.source=n.arguments[0],this.hasPlugin(`importAssertions`)&&(n.attributes=n.arguments[1]??null),delete n.arguments,delete n.callee),n}toReferencedArguments(e){e.type!==`ImportExpression`&&super.toReferencedArguments(e)}parseExport(e,t){let n=this.state.lastTokStartLoc,r=super.parseExport(e,t);switch(r.type){case`ExportAllDeclaration`:r.exported=null;break;case`ExportNamedDeclaration`:r.specifiers.length===1&&r.specifiers[0].type===`ExportNamespaceSpecifier`&&(r.type=`ExportAllDeclaration`,r.exported=r.specifiers[0].exported,delete r.specifiers);case`ExportDefaultDeclaration`:{let{declaration:e}=r;e?.type===`ClassDeclaration`&&e.decorators?.length>0&&e.start===r.start&&this.resetStartLocation(r,n)}}return r}parseSubscript(e,t,n,r){let i=super.parseSubscript(e,t,n,r);if(r.optionalChainMember){if((i.type===`OptionalMemberExpression`||i.type===`OptionalCallExpression`)&&(i.type=i.type.substring(8)),r.stop){let e=this.startNodeAtNode(i);return e.expression=i,this.finishNode(e,`ChainExpression`)}}else(i.type===`MemberExpression`||i.type===`CallExpression`)&&(i.optional=!1);return i}hasPropertyAsPrivateName(e){return e.type===`ChainExpression`&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type===`Property`&&e.kind===`init`&&!e.method}isObjectMethod(e){return e.method||e.kind===`get`||e.kind===`set`}finishNodeAt(e,t,n){return re(super.finishNodeAt(e,t,n))}resetStartLocation(e,t){super.resetStartLocation(e,t),re(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),re(e)}}),ae=class{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}};let y={brace:new ae(`{`),j_oTag:new ae(`<tag`),j_cTag:new ae(`</tag`),j_expr:new ae(`<tag>...</tag>`,!0)};y.template=new ae("`",!0);var oe=class{constructor(e,t={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop==null?null:t.binop,this.updateContext=null}};let se=/* @__PURE__ */ new Map;function b(e,t={}){t.keyword=e;let n=T(e,t);return se.set(e,n),n}function x(e,t){return T(e,{beforeExpr:!0,binop:t})}let ce=-1,S=[],le=[],C=[],w=[],ue=[],de=[];function T(e,t={}){return++ce,le.push(e),C.push(t.binop??-1),w.push(t.beforeExpr??!1),ue.push(t.startsExpr??!1),de.push(t.prefix??!1),S.push(new oe(e,t)),ce}function E(e,t={}){return++ce,se.set(e,ce),le.push(e),C.push(t.binop??-1),w.push(t.beforeExpr??!1),ue.push(t.startsExpr??!1),de.push(t.prefix??!1),S.push(new oe(`name`,t)),ce}let D={bracketL:T(`[`,{beforeExpr:!0,startsExpr:!0}),bracketHashL:T(`#[`,{beforeExpr:!0,startsExpr:!0}),bracketBarL:T(`[|`,{beforeExpr:!0,startsExpr:!0}),bracketR:T(`]`),bracketBarR:T(`|]`),braceL:T(`{`,{beforeExpr:!0,startsExpr:!0}),braceBarL:T(`{|`,{beforeExpr:!0,startsExpr:!0}),braceHashL:T(`#{`,{beforeExpr:!0,startsExpr:!0}),braceR:T(`}`),braceBarR:T(`|}`),parenL:T(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:T(`)`),comma:T(`,`,{beforeExpr:!0}),semi:T(`;`,{beforeExpr:!0}),colon:T(`:`,{beforeExpr:!0}),doubleColon:T(`::`,{beforeExpr:!0}),dot:T(`.`),question:T(`?`,{beforeExpr:!0}),questionDot:T(`?.`),arrow:T(`=>`,{beforeExpr:!0}),template:T(`template`),ellipsis:T(`...`,{beforeExpr:!0}),backQuote:T("`",{startsExpr:!0}),dollarBraceL:T("${",{beforeExpr:!0,startsExpr:!0}),templateTail:T("...`",{startsExpr:!0}),templateNonTail:T("...${",{beforeExpr:!0,startsExpr:!0}),at:T(`@`),hash:T(`#`,{startsExpr:!0}),interpreterDirective:T(`#!...`),eq:T(`=`,{beforeExpr:!0,isAssign:!0}),assign:T(`_=`,{beforeExpr:!0,isAssign:!0}),slashAssign:T(`_=`,{beforeExpr:!0,isAssign:!0}),xorAssign:T(`_=`,{beforeExpr:!0,isAssign:!0}),moduloAssign:T(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:T(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),bang:T(`!`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),tilde:T(`~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),doubleCaret:T(`^^`,{startsExpr:!0}),doubleAt:T(`@@`,{startsExpr:!0}),pipeline:x(`|>`,0),nullishCoalescing:x(`??`,1),logicalOR:x(`||`,1),logicalAND:x(`&&`,2),bitwiseOR:x(`|`,3),bitwiseXOR:x(`^`,4),bitwiseAND:x(`&`,5),equality:x(`==/!=/===/!==`,6),lt:x(`</>/<=/>=`,7),gt:x(`</>/<=/>=`,7),relational:x(`</>/<=/>=`,7),bitShift:x(`<</>>/>>>`,8),bitShiftL:x(`<</>>/>>>`,8),bitShiftR:x(`<</>>/>>>`,8),plusMin:T(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:T(`%`,{binop:10,startsExpr:!0}),star:T(`*`,{binop:10}),slash:x(`/`,10),exponent:T(`**`,{beforeExpr:!0,binop:11,rightAssociative:!0}),_in:b(`in`,{beforeExpr:!0,binop:7}),_instanceof:b(`instanceof`,{beforeExpr:!0,binop:7}),_break:b(`break`),_case:b(`case`,{beforeExpr:!0}),_catch:b(`catch`),_continue:b(`continue`),_debugger:b(`debugger`),_default:b(`default`,{beforeExpr:!0}),_else:b(`else`,{beforeExpr:!0}),_finally:b(`finally`),_function:b(`function`,{startsExpr:!0}),_if:b(`if`),_return:b(`return`,{beforeExpr:!0}),_switch:b(`switch`),_throw:b(`throw`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_try:b(`try`),_var:b(`var`),_const:b(`const`),_with:b(`with`),_new:b(`new`,{beforeExpr:!0,startsExpr:!0}),_this:b(`this`,{startsExpr:!0}),_super:b(`super`,{startsExpr:!0}),_class:b(`class`,{startsExpr:!0}),_extends:b(`extends`,{beforeExpr:!0}),_export:b(`export`),_import:b(`import`,{startsExpr:!0}),_null:b(`null`,{startsExpr:!0}),_true:b(`true`,{startsExpr:!0}),_false:b(`false`,{startsExpr:!0}),_typeof:b(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_do:b(`do`,{isLoop:!0,beforeExpr:!0}),_for:b(`for`,{isLoop:!0}),_while:b(`while`,{isLoop:!0}),_as:E(`as`,{startsExpr:!0}),_assert:E(`assert`,{startsExpr:!0}),_async:E(`async`,{startsExpr:!0}),_await:E(`await`,{startsExpr:!0}),_from:E(`from`,{startsExpr:!0}),_get:E(`get`,{startsExpr:!0}),_let:E(`let`,{startsExpr:!0}),_meta:E(`meta`,{startsExpr:!0}),_of:E(`of`,{startsExpr:!0}),_sent:E(`sent`,{startsExpr:!0}),_set:E(`set`,{startsExpr:!0}),_static:E(`static`,{startsExpr:!0}),_using:E(`using`,{startsExpr:!0}),_yield:E(`yield`,{startsExpr:!0}),_asserts:E(`asserts`,{startsExpr:!0}),_checks:E(`checks`,{startsExpr:!0}),_exports:E(`exports`,{startsExpr:!0}),_global:E(`global`,{startsExpr:!0}),_implements:E(`implements`,{startsExpr:!0}),_intrinsic:E(`intrinsic`,{startsExpr:!0}),_infer:E(`infer`,{startsExpr:!0}),_is:E(`is`,{startsExpr:!0}),_mixins:E(`mixins`,{startsExpr:!0}),_proto:E(`proto`,{startsExpr:!0}),_require:E(`require`,{startsExpr:!0}),_satisfies:E(`satisfies`,{startsExpr:!0}),_keyof:E(`keyof`,{startsExpr:!0}),_readonly:E(`readonly`,{startsExpr:!0}),_unique:E(`unique`,{startsExpr:!0}),_abstract:E(`abstract`,{startsExpr:!0}),_declare:E(`declare`,{startsExpr:!0}),_enum:E(`enum`,{startsExpr:!0}),_module:E(`module`,{startsExpr:!0}),_namespace:E(`namespace`,{startsExpr:!0}),_interface:E(`interface`,{startsExpr:!0}),_type:E(`type`,{startsExpr:!0}),_opaque:E(`opaque`,{startsExpr:!0}),name:T(`name`,{startsExpr:!0}),string:T(`string`,{startsExpr:!0}),num:T(`num`,{startsExpr:!0}),bigint:T(`bigint`,{startsExpr:!0}),decimal:T(`decimal`,{startsExpr:!0}),regexp:T(`regexp`,{startsExpr:!0}),privateName:T(`#name`,{startsExpr:!0}),eof:T(`eof`),jsxName:T(`jsxName`),jsxText:T(`jsxText`,{beforeExpr:!0}),jsxTagStart:T(`jsxTagStart`,{startsExpr:!0}),jsxTagEnd:T(`jsxTagEnd`),placeholder:T(`%%`,{startsExpr:!0})};function O(e){return e>=93&&e<=130}function fe(e){return e<=92}function k(e){return e>=58&&e<=130}function A(e){return e>=58&&e<=134}function pe(e){return w[e]}function me(e){return ue[e]}function he(e){return e>=29&&e<=33}function j(e){return e>=127&&e<=129}function M(e){return e>=90&&e<=92}function N(e){return e>=58&&e<=92}function ge(e){return e>=39&&e<=59}function P(e){return e===34}function _e(e){return de[e]}function F(e){return e>=119&&e<=121}function ve(e){return e>=122&&e<=128}function I(e){return le[e]}function L(e){return C[e]}function ye(e){return e===57}function R(e){return e>=24&&e<=25}function z(e){return S[e]}S[8].updateContext=e=>{e.pop()},S[5].updateContext=S[7].updateContext=S[23].updateContext=e=>{e.push(y.brace)},S[22].updateContext=e=>{e[e.length-1]===y.template?e.pop():e.push(y.template)},S[140].updateContext=e=>{e.push(y.j_expr,y.j_oTag)};let be=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,xe=`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_`,Se=RegExp(`[`+be+`]`),Ce=RegExp(`[`+be+xe+`]`);be=xe=null;let we=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191],B=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function V(e,t){let n=65536;for(let r=0,i=t.length;r<i;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function H(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Se.test(String.fromCharCode(e)):V(e,we)}function U(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Ce.test(String.fromCharCode(e)):V(e,we)||V(e,B)}let Te={keyword:/* @__PURE__ */ `break.case.catch.continue.debugger.default.do.else.finally.for.function.if.return.switch.throw.try.var.const.while.with.new.this.super.class.extends.export.import.null.true.false.in.instanceof.typeof.void.delete`.split(`.`),strict:[`implements`,`interface`,`let`,`package`,`private`,`protected`,`public`,`static`,`yield`],strictBind:[`eval`,`arguments`]},W=new Set(Te.keyword),G=new Set(Te.strict),Ee=new Set(Te.strictBind);function De(e,t){return t&&e===`await`||e===`enum`}function Oe(e,t){return De(e,t)||G.has(e)}function ke(e){return Ee.has(e)}function K(e,t){return Oe(e,t)||ke(e)}function Ae(e){return W.has(e)}function je(e,t,n){return e===64&&t===64&&H(n)}let Me=/* @__PURE__ */ new Set(/* @__PURE__ */ `break.case.catch.continue.debugger.default.do.else.finally.for.function.if.return.switch.throw.try.var.const.while.with.new.this.super.class.extends.export.import.null.true.false.in.instanceof.typeof.void.delete.implements.interface.let.package.private.protected.public.static.yield.eval.arguments.enum.await`.split(`.`));function Ne(e){return Me.has(e)}let Pe=2048,q=4096,Fe=8331,Ie=8201,Le=1024,Re=4098;var ze=class{constructor(e){this.var=/* @__PURE__ */ new Set,this.lexical=/* @__PURE__ */ new Set,this.functions=/* @__PURE__ */ new Set,this.flags=e}},Be=class{constructor(e,t){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=/* @__PURE__ */ new Map,this.parser=e,this.inModule=t}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&64)>0&&!(e&2)}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&128)return!0;if(t&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new ze(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,t,n){let r=this.currentScope();if(t&8||t&16)this.checkRedeclarationInScope(r,e,t,n),t&16?r.functions.add(e):r.lexical.add(e),t&8&&this.maybeExportDefined(r,e);else if(t&4)for(let i=this.scopeStack.length-1;i>=0&&(r=this.scopeStack[i],this.checkRedeclarationInScope(r,e,t,n),r.var.add(e),this.maybeExportDefined(r,e),!(r.flags&387));--i);this.parser.inModule&&r.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,n,r){this.isRedeclaredInScope(e,t,n)&&this.parser.raise(_.VarRedeclaration,{at:r,identifierName:t})}isRedeclaredInScope(e,t,n){return n&1?n&8?e.lexical.has(t)||e.functions.has(t)||e.var.has(t):n&16?e.lexical.has(t)||!this.treatFunctionsAsVarInScope(e)&&e.var.has(t):e.lexical.has(t)&&!(e.flags&8&&e.lexical.values().next().value===t)||!this.treatFunctionsAsVarInScope(e)&&e.functions.has(t):!1}checkLocalExport(e){let{name:t}=e,n=this.scopeStack[0];n.lexical.has(t)||n.var.has(t)||n.functions.has(t)||this.undefinedExports.set(t,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&387)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&451&&!(t&4))return t}}},Ve=class extends ze{constructor(...e){super(...e),this.declareFunctions=/* @__PURE__ */ new Set}},He=class extends Be{createScope(e){return new Ve(e)}declareName(e,t,n){let r=this.currentScope();t&Pe?(this.checkRedeclarationInScope(r,e,t,n),this.maybeExportDefined(r,e),r.declareFunctions.add(e)):super.declareName(e,t,n)}isRedeclaredInScope(e,t,n){return super.isRedeclaredInScope(e,t,n)?!0:n&Pe?!e.declareFunctions.has(t)&&(e.lexical.has(t)||e.functions.has(t)):!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},Ue=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(e){if(typeof e==`string`)return this.plugins.has(e);{let[t,n]=e;if(!this.hasPlugin(t))return!1;let r=this.plugins.get(t);for(let e of Object.keys(n))if(r?.[e]!==n[e])return!1;return!0}}getPluginOption(e,t){return this.plugins.get(e)?.[t]}};function We(e,t){e.trailingComments===void 0?e.trailingComments=t:e.trailingComments.unshift(...t)}function Ge(e,t){e.leadingComments===void 0?e.leadingComments=t:e.leadingComments.unshift(...t)}function Ke(e,t){e.innerComments===void 0?e.innerComments=t:e.innerComments.unshift(...t)}function qe(e,t,n){let r=null,i=t.length;for(;r===null&&i>0;)r=t[--i];r===null||r.start>n.start?Ke(e,n.comments):We(r,n.comments)}var Je=class extends Ue{addComment(e){this.filename&&(e.loc.filename=this.filename),this.state.comments.push(e)}processComment(e){let{commentStack:t}=this.state,n=t.length;if(n===0)return;let r=n-1,i=t[r];i.start===e.end&&(i.leadingNode=e,r--);let{start:a}=e;for(;r>=0;r--){let n=t[r],i=n.end;if(i>a)n.containingNode=e,this.finalizeComment(n),t.splice(r,1);else{i===a&&(n.trailingNode=e);break}}}finalizeComment(e){let{comments:t}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&We(e.leadingNode,t),e.trailingNode!==null&&Ge(e.trailingNode,t);else{let{containingNode:n,start:r}=e;if(this.input.charCodeAt(r-1)===44)switch(n.type){case`ObjectExpression`:case`ObjectPattern`:case`RecordExpression`:qe(n,n.properties,e);break;case`CallExpression`:case`OptionalCallExpression`:qe(n,n.arguments,e);break;case`FunctionDeclaration`:case`FunctionExpression`:case`ArrowFunctionExpression`:case`ObjectMethod`:case`ClassMethod`:case`ClassPrivateMethod`:qe(n,n.params,e);break;case`ArrayExpression`:case`ArrayPattern`:case`TupleExpression`:qe(n,n.elements,e);break;case`ExportNamedDeclaration`:case`ImportDeclaration`:qe(n,n.specifiers,e);break;default:Ke(n,t)}else Ke(n,t)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:t}=this.state,{length:n}=t;if(n===0)return;let r=t[n-1];r.leadingNode===e&&(r.leadingNode=null)}takeSurroundingComments(e,t,n){let{commentStack:r}=this.state,i=r.length;if(i===0)return;let a=i-1;for(;a>=0;a--){let i=r[a],o=i.end;if(i.start===n)i.leadingNode=e;else if(o===t)i.trailingNode=e;else if(o<t)break}}};let Ye=/\r\n?|[\n\u2028\u2029]/,Xe=new RegExp(Ye.source,`g`);function Ze(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}let Qe=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,$e=/* @__PURE__ */ RegExp(`(?=((?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*))\\1(?=[\\n\\r\\u2028\\u2029]|\\/\\*(?!.*?\\*\\/)|$)`,`y`);function et(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var tt=class e{constructor(){this.strict=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.maybeInArrowParameters=!1,this.inType=!1,this.noAnonFunctionType=!1,this.hasFlowComment=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.inDisallowConditionalTypesContext=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.labels=[],this.comments=[],this.commentStack=[],this.pos=0,this.type=137,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.context=[y.brace],this.canStartJSXElement=!0,this.containsEsc=!1,this.firstInvalidTemplateEscapePos=null,this.strictErrors=/* @__PURE__ */ new Map,this.tokensLength=0}init({strictMode:e,sourceType:t,startLine:r,startColumn:i}){this.strict=e===!1?!1:e===!0||t===`module`,this.curLine=r,this.lineStart=-i,this.startLoc=this.endLoc=new n(r,i,0)}curPosition(){return new n(this.curLine,this.pos-this.lineStart,this.pos)}clone(t){let n=new e,r=Object.keys(this);for(let e=0,i=r.length;e<i;e++){let i=r[e],a=this[i];!t&&Array.isArray(a)&&(a=a.slice()),n[i]=a}return n}},nt=function(e){return e>=48&&e<=57};let rt={decBinOct:/* @__PURE__ */ new Set([46,66,69,79,95,98,101,111]),hex:/* @__PURE__ */ new Set([46,88,95,120])},it={bin:e=>e===48||e===49,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function at(e,t,n,r,i,a){let o=n,s=r,c=i,l=``,u=null,d=n,{length:f}=t;for(;;){if(n>=f){a.unterminated(o,s,c),l+=t.slice(d,n);break}let p=t.charCodeAt(n);if(ot(e,p,t,n)){l+=t.slice(d,n);break}if(p===92){l+=t.slice(d,n);let o=st(t,n,r,i,e===`template`,a);o.ch===null&&!u?u={pos:n,lineStart:r,curLine:i}:l+=o.ch,{pos:n,lineStart:r,curLine:i}=o,d=n}else p===8232||p===8233?(++n,++i,r=n):p===10||p===13?e===`template`?(l+=t.slice(d,n)+`
|
|
7
|
+
import{t as e}from"./rolldown-runtime-CEAe2Uac.js";import{$n as t,Jn as n,Qn as r,Rn as i,_t as a,rr as o,rt as s,yt as c}from"./dist-BA3H54nL.js";import{t as l}from"./watcher-CrrSXFeO.js";import{N as u,j as d,tt as f}from"./utils-B7dNmFFf.js";import{n as p,t as m}from"./lib-DGY-NrHk.js";import{a as h,l as ee,o as te}from"./multi-repo-config-C9dwfzPC.js";import{constants as g}from"node:fs";import _ from"node:os";import{copyFile as ne,lstat as v,mkdir as re,mkdtemp as ie,readFile as ae,readdir as y,realpath as oe,rename as se,rm as b,stat as x,writeFile as ce}from"node:fs/promises";import S from"node:path";import{createHash as le}from"node:crypto";const C=({gitSources:e})=>{let[t,...n]=e;if(t!==void 0)return[t,...n];throw Error(`Deployment must have at least one git source`)},w=e=>{let t=C(e);return t.find(e=>e.isBase===!0)??t[0]};var ue=/* @__PURE__ */ e((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],t.indexOf(i)>=0||(n[i]=e[i]);return n}var n=class{constructor(e,t,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=t,this.index=n}},r=class{constructor(e,t){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=t}};function i(e,t){let{line:r,column:i,index:a}=e;return new n(r,i+t,a+t)}var a={SyntaxError:`BABEL_PARSER_SYNTAX_ERROR`,SourceTypeModuleError:`BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED`};let o=(e,t=e.length-1)=>({get(){return e.reduce((e,t)=>e[t],this)},set(n){e.reduce((e,r,i)=>i===t?e[r]=n:e[r],this)}}),s=(e,t,n)=>Object.keys(n).map(e=>[e,n[e]]).filter(([,e])=>!!e).map(([e,t])=>[e,typeof t==`function`?{value:t,enumerable:!1}:typeof t.reflect==`string`?Object.assign({},t,o(t.reflect.split(`.`))):t]).reduce((e,[t,n])=>Object.defineProperty(e,t,Object.assign({configurable:!0},n)),Object.assign(new e,t));var c={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:a.SourceTypeModuleError},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:a.SourceTypeModuleError}};let l={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`},u=({type:e,prefix:t})=>e===`UpdateExpression`?l.UpdateExpression[String(t)]:l[e];var d={AccessorIsGenerator:({kind:e})=>`A ${e}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.`,AwaitInUsingBinding:`'await' is not allowed to be used as a name in 'using' declarations.`,AwaitNotInAsyncContext:`'await' is only allowed within async functions and at the top levels of modules.`,AwaitNotInAsyncFunction:`'await' is only allowed within async functions.`,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:e})=>`Missing initializer in ${e} declaration.`,DecoratorArgumentsOutsideParentheses:`Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.`,DecoratorBeforeExport:`Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.`,DecoratorsBeforeAfterExport:`Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.`,DecoratorConstructor:`Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?`,DecoratorExportClass:`Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.`,DecoratorSemicolon:`Decorators must not be followed by a semicolon.`,DecoratorStaticBlock:`Decorators can't be used with a static block.`,DeletePrivateField:`Deleting a private field is not allowed.`,DestructureNamedImport:`ES2015 named imports do not destructure. Use another statement for destructuring after the import.`,DuplicateConstructor:`Duplicate constructor in the same class.`,DuplicateDefaultExport:`Only one default export allowed per module.`,DuplicateExport:({exportName:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:`Redefinition of __proto__ property.`,DuplicateRegExpFlags:`Duplicate regular expression flag.`,ElementAfterRest:`Rest element must be last element.`,EscapedCharNotAnIdentifier:`Invalid Unicode escape.`,ExportBindingIsString:({localName:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:`'from' is not allowed as an identifier after 'export default'.`,ForInOfLoopInitializer:({type:e})=>`'${e===`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:e})=>`Unsyntactic ${e===`BreakStatement`?`break`:`continue`}.`,IllegalLanguageModeDirective:`Illegal 'use strict' directive in function with non-simple parameter list.`,IllegalReturn:`'return' outside of function.`,ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArgumentTrailingComma:`Trailing comma is disallowed inside import(...) arguments.`,ImportCallArity:({maxArgumentCount:e})=>`\`import()\` requires exactly ${e===1?`one argument`:`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.`,InvalidCoverInitializedName:`Invalid shorthand property initializer.`,InvalidDecimal:`Invalid decimal.`,InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:`Bad character escape sequence.`,InvalidEscapeSequenceTemplate:`Invalid escape sequence in template.`,InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${u(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${u(e)}.`,InvalidNumber:`Invalid number.`,InvalidOrMissingExponent:`Floating-point numbers require a valid exponent after the 'e'.`,InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:`Invalid parenthesized assignment pattern.`,InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} 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:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:`'let' is not allowed to be used as a name in 'let' or 'const' declarations.`,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:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map(e=>JSON.stringify(e)).join(`, `)}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map(e=>JSON.stringify(e)).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:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' 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' modifier cannot appear on a constructor declaration.`,ParamDupe:`Argument name clash.`,PatternHasAccessor:`Object pattern can't contain getter or setter.`,PatternHasMethod:`Object pattern can't contain methods.`,PrivateInExpectedIn:({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RecordExpressionBarIncorrectEndSyntaxType:`Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,RecordExpressionBarIncorrectStartSyntaxType:`Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,RecordExpressionHashIncorrectStartSyntaxType:`Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.`,RecordNoProto:`'__proto__' is not allowed in Record expressions.`,RestTrailingComma:`Unexpected trailing comma after rest element.`,SloppyFunction:`In non-strict mode code, functions can only be declared at top level or inside a block.`,SloppyFunctionAnnexB:`In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.`,StaticPrototype:`Classes may not have static property named prototype.`,SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:`Private fields can't be accessed on super.`,TrailingDecorator:`Decorators must be attached to a class element.`,TupleExpressionBarIncorrectEndSyntaxType:`Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,TupleExpressionBarIncorrectStartSyntaxType:`Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,TupleExpressionHashIncorrectStartSyntaxType:`Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.`,UnexpectedArgumentPlaceholder:`Unexpected argument placeholder.`,UnexpectedAwaitAfterPipelineBody:`Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.`,UnexpectedDigitAfterHash:`Unexpected digit after hash token.`,UnexpectedImportExport:`'import' and 'export' may only appear at the top level.`,UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,UnexpectedLeadingDecorator:`Leading decorators must be attached to a class declaration.`,UnexpectedLexicalDeclaration:`Lexical declaration cannot appear in a single-statement context.`,UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:`A numeric separator is only allowed between two digits.`,UnexpectedPrivateField:`Unexpected private name.`,UnexpectedReservedWord:({reservedWord:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:`'super' is only allowed in object methods and classes.`,UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:``}${e?`, expected "${e}"`:``}`,UnexpectedTokenUnaryExponentiation:`Illegal expression. Wrap left hand side or entire exponentiation in parentheses.`,UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:`Binding should be performed on object property.`,UnsupportedDecoratorExport:`A decorated export must export a class declaration.`,UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,UnsupportedParameterDecorator:`Decorators cannot be used to decorate parameters.`,UnsupportedPropertyDecorator:`Decorators cannot be used to decorate object literal properties.`,UnsupportedSuper:`'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).`,UnterminatedComment:`Unterminated comment.`,UnterminatedRegExp:`Unterminated regular expression.`,UnterminatedString:`Unterminated string constant.`,UnterminatedTemplate:`Unterminated template.`,UsingDeclarationHasBindingPattern:`Using declaration cannot have destructuring patterns.`,VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,YieldBindingIdentifier:`Can not use 'yield' as identifier inside a generator.`,YieldInParameter:`Yield expression is not allowed in formal parameters.`,ZeroDigitNumericSeparator:`Numeric separator can not be used after leading 0.`},f={StrictDelete:`Deleting local variable in strict mode.`,StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' in strict mode.`,StrictFunction:`In strict mode code, functions can only be declared at top level or inside a block.`,StrictNumericEscape:`The only valid numeric escape in strict mode is '\\0'.`,StrictOctalLiteral:`Legacy octal literals are not allowed in strict mode.`,StrictWith:`'with' in strict mode.`};let p=/* @__PURE__ */ new Set([`ArrowFunctionExpression`,`AssignmentExpression`,`ConditionalExpression`,`YieldExpression`]);var m={PipeBodyIsTighter:`Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.`,PipeTopicRequiresHackPipes:`Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.`,PipeTopicUnbound:`Topic reference is unbound; it must be inside a pipe body.`,PipeTopicUnconfiguredToken:({token:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:`Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.`,PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${u({type:e})}; please wrap it in parentheses.`,PipelineBodyNoArrow:`Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.`,PipelineBodySequenceExpression:`Pipeline body may not be a comma-separated sequence expression.`,PipelineHeadSequenceExpression:`Pipeline head should not be a comma-separated sequence expression.`,PipelineTopicUnused:`Pipeline is in topic style but does not use topic reference.`,PrimaryTopicNotAllowed:`Topic reference was used in a lexical context without topic binding.`,PrimaryTopicRequiresSmartPipeline:`Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.`};let h=[`toMessage`],ee=[`message`];function te(e){let{toMessage:r}=e,i=t(e,h);return function e({loc:t,details:a}){return s(SyntaxError,Object.assign({},i,{loc:t}),{clone(t={}){let r=t.loc||{};return e({loc:new n(`line`in r?r.line:this.loc.line,`column`in r?r.column:this.loc.column,`index`in r?r.index:this.loc.index),details:Object.assign({},this.details,t.details)})},details:{value:a,enumerable:!1},message:{get(){return`${r(this.details)} (${this.loc.line}:${this.loc.column})`},set(e){Object.defineProperty(this,"message",{value:e})}},pos:{reflect:`loc.index`,enumerable:!0},missingPlugin:`missingPlugin`in a&&{reflect:`details.missingPlugin`,enumerable:!0}})}}function g(e,n){if(Array.isArray(e))return t=>g(t,e[0]);let r={};for(let i of Object.keys(e)){let o=e[i],s=typeof o==`string`?{message:()=>o}:typeof o==`function`?{message:o}:o,{message:c}=s,l=t(s,ee),u=typeof c==`string`?()=>c:c;r[i]=te(Object.assign({code:a.SyntaxError,reasonCode:i,toMessage:u},n?{syntaxPlugin:n}:{},l))}return r}let _=Object.assign({},g(c),g(d),g(f),g`pipelineOperator`(m)),{defineProperty:ne}=Object,v=(e,t)=>ne(e,t,{enumerable:!1,value:e[t]});function re(e){return e.loc.start&&v(e.loc.start,`index`),e.loc.end&&v(e.loc.end,`index`),e}var ie=(e=>class extends e{parse(){let e=re(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(re)),e}parseRegExpLiteral({pattern:e,flags:t}){let n=null;try{n=new RegExp(e,t)}catch{}let r=this.estreeParseLiteral(n);return r.regex={pattern:e,flags:t},r}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}let n=this.estreeParseLiteral(t);return n.bigint=String(n.value||e),n}parseDecimalLiteral(e){let t=this.estreeParseLiteral(null);return t.decimal=String(t.value||e),t}estreeParseLiteral(e){return this.parseLiteral(e,`Literal`)}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){let t=e.value;delete e.value,t.type=`Literal`,t.raw=t.extra.raw,t.value=t.extra.expressionValue;let n=e;return n.type=`ExpressionStatement`,n.expression=t,n.directive=t.extra.rawValue,delete t.extra,n}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return e.type===`ExpressionStatement`&&e.expression.type===`Literal`&&typeof e.expression.value==`string`&&!((t=e.expression.extra)!=null&&t.parenthesized)}parseBlockBody(e,t,n,r,i){super.parseBlockBody(e,t,n,r,i),e.body=e.directives.map(e=>this.directiveToStmt(e)).concat(e.body),delete e.directives}pushClassMethod(e,t,n,r,i,a){this.parseMethod(t,n,r,i,a,`ClassMethod`,!0),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(t)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption(`estree`,`classFeatures`)?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let t=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=t,e.type=`PrivateIdentifier`,e}isPrivateName(e){return this.getPluginOption(`estree`,`classFeatures`)?e.type===`PrivateIdentifier`:super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption(`estree`,`classFeatures`)?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){let n=super.parseLiteral(e,t);return n.raw=n.extra.raw,delete n.extra,n}parseFunctionBody(e,t,n=!1){super.parseFunctionBody(e,t,n),e.expression=e.body.type!==`BlockStatement`}parseMethod(e,t,n,r,i,a,o=!1){let s=this.startNode();return s.kind=e.kind,s=super.parseMethod(s,t,n,r,i,a,o),s.type=`FunctionExpression`,delete s.kind,e.value=s,a===`ClassPrivateMethod`&&(e.computed=!1),this.finishNode(e,`MethodDefinition`)}parseClassProperty(...e){let t=super.parseClassProperty(...e);return this.getPluginOption(`estree`,`classFeatures`)&&(t.type=`PropertyDefinition`),t}parseClassPrivateProperty(...e){let t=super.parseClassPrivateProperty(...e);return this.getPluginOption(`estree`,`classFeatures`)&&(t.type=`PropertyDefinition`,t.computed=!1),t}parseObjectMethod(e,t,n,r,i){let a=super.parseObjectMethod(e,t,n,r,i);return a&&(a.type=`Property`,a.kind===`method`&&(a.kind=`init`),a.shorthand=!1),a}parseObjectProperty(e,t,n,r){let i=super.parseObjectProperty(e,t,n,r);return i&&(i.kind=`init`,i.type=`Property`),i}isValidLVal(e,t,n){return e===`Property`?`value`:super.isValidLVal(e,t,n)}isAssignable(e,t){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(e!=null&&this.isObjectProperty(e)){let{key:n,value:r}=e;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.loc.start),this.toAssignable(r,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,n){e.kind===`get`||e.kind===`set`?this.raise(_.PatternHasAccessor,{at:e.key}):e.method?this.raise(_.PatternHasMethod,{at:e.key}):super.toAssignableObjectExpressionProp(e,t,n)}finishCallExpression(e,t){let n=super.finishCallExpression(e,t);return n.callee.type===`Import`&&(n.type=`ImportExpression`,n.source=n.arguments[0],this.hasPlugin(`importAssertions`)&&(n.attributes=n.arguments[1]??null),delete n.arguments,delete n.callee),n}toReferencedArguments(e){e.type!==`ImportExpression`&&super.toReferencedArguments(e)}parseExport(e,t){let n=this.state.lastTokStartLoc,r=super.parseExport(e,t);switch(r.type){case`ExportAllDeclaration`:r.exported=null;break;case`ExportNamedDeclaration`:r.specifiers.length===1&&r.specifiers[0].type===`ExportNamespaceSpecifier`&&(r.type=`ExportAllDeclaration`,r.exported=r.specifiers[0].exported,delete r.specifiers);case`ExportDefaultDeclaration`:{let{declaration:e}=r;e?.type===`ClassDeclaration`&&e.decorators?.length>0&&e.start===r.start&&this.resetStartLocation(r,n)}}return r}parseSubscript(e,t,n,r){let i=super.parseSubscript(e,t,n,r);if(r.optionalChainMember){if((i.type===`OptionalMemberExpression`||i.type===`OptionalCallExpression`)&&(i.type=i.type.substring(8)),r.stop){let e=this.startNodeAtNode(i);return e.expression=i,this.finishNode(e,`ChainExpression`)}}else(i.type===`MemberExpression`||i.type===`CallExpression`)&&(i.optional=!1);return i}hasPropertyAsPrivateName(e){return e.type===`ChainExpression`&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type===`Property`&&e.kind===`init`&&!e.method}isObjectMethod(e){return e.method||e.kind===`get`||e.kind===`set`}finishNodeAt(e,t,n){return re(super.finishNodeAt(e,t,n))}resetStartLocation(e,t){super.resetStartLocation(e,t),re(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),re(e)}}),ae=class{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}};let y={brace:new ae(`{`),j_oTag:new ae(`<tag`),j_cTag:new ae(`</tag`),j_expr:new ae(`<tag>...</tag>`,!0)};y.template=new ae("`",!0);var oe=class{constructor(e,t={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop==null?null:t.binop,this.updateContext=null}};let se=/* @__PURE__ */ new Map;function b(e,t={}){t.keyword=e;let n=T(e,t);return se.set(e,n),n}function x(e,t){return T(e,{beforeExpr:!0,binop:t})}let ce=-1,S=[],le=[],C=[],w=[],ue=[],de=[];function T(e,t={}){return++ce,le.push(e),C.push(t.binop??-1),w.push(t.beforeExpr??!1),ue.push(t.startsExpr??!1),de.push(t.prefix??!1),S.push(new oe(e,t)),ce}function E(e,t={}){return++ce,se.set(e,ce),le.push(e),C.push(t.binop??-1),w.push(t.beforeExpr??!1),ue.push(t.startsExpr??!1),de.push(t.prefix??!1),S.push(new oe(`name`,t)),ce}let D={bracketL:T(`[`,{beforeExpr:!0,startsExpr:!0}),bracketHashL:T(`#[`,{beforeExpr:!0,startsExpr:!0}),bracketBarL:T(`[|`,{beforeExpr:!0,startsExpr:!0}),bracketR:T(`]`),bracketBarR:T(`|]`),braceL:T(`{`,{beforeExpr:!0,startsExpr:!0}),braceBarL:T(`{|`,{beforeExpr:!0,startsExpr:!0}),braceHashL:T(`#{`,{beforeExpr:!0,startsExpr:!0}),braceR:T(`}`),braceBarR:T(`|}`),parenL:T(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:T(`)`),comma:T(`,`,{beforeExpr:!0}),semi:T(`;`,{beforeExpr:!0}),colon:T(`:`,{beforeExpr:!0}),doubleColon:T(`::`,{beforeExpr:!0}),dot:T(`.`),question:T(`?`,{beforeExpr:!0}),questionDot:T(`?.`),arrow:T(`=>`,{beforeExpr:!0}),template:T(`template`),ellipsis:T(`...`,{beforeExpr:!0}),backQuote:T("`",{startsExpr:!0}),dollarBraceL:T("${",{beforeExpr:!0,startsExpr:!0}),templateTail:T("...`",{startsExpr:!0}),templateNonTail:T("...${",{beforeExpr:!0,startsExpr:!0}),at:T(`@`),hash:T(`#`,{startsExpr:!0}),interpreterDirective:T(`#!...`),eq:T(`=`,{beforeExpr:!0,isAssign:!0}),assign:T(`_=`,{beforeExpr:!0,isAssign:!0}),slashAssign:T(`_=`,{beforeExpr:!0,isAssign:!0}),xorAssign:T(`_=`,{beforeExpr:!0,isAssign:!0}),moduloAssign:T(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:T(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),bang:T(`!`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),tilde:T(`~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),doubleCaret:T(`^^`,{startsExpr:!0}),doubleAt:T(`@@`,{startsExpr:!0}),pipeline:x(`|>`,0),nullishCoalescing:x(`??`,1),logicalOR:x(`||`,1),logicalAND:x(`&&`,2),bitwiseOR:x(`|`,3),bitwiseXOR:x(`^`,4),bitwiseAND:x(`&`,5),equality:x(`==/!=/===/!==`,6),lt:x(`</>/<=/>=`,7),gt:x(`</>/<=/>=`,7),relational:x(`</>/<=/>=`,7),bitShift:x(`<</>>/>>>`,8),bitShiftL:x(`<</>>/>>>`,8),bitShiftR:x(`<</>>/>>>`,8),plusMin:T(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:T(`%`,{binop:10,startsExpr:!0}),star:T(`*`,{binop:10}),slash:x(`/`,10),exponent:T(`**`,{beforeExpr:!0,binop:11,rightAssociative:!0}),_in:b(`in`,{beforeExpr:!0,binop:7}),_instanceof:b(`instanceof`,{beforeExpr:!0,binop:7}),_break:b(`break`),_case:b(`case`,{beforeExpr:!0}),_catch:b(`catch`),_continue:b(`continue`),_debugger:b(`debugger`),_default:b(`default`,{beforeExpr:!0}),_else:b(`else`,{beforeExpr:!0}),_finally:b(`finally`),_function:b(`function`,{startsExpr:!0}),_if:b(`if`),_return:b(`return`,{beforeExpr:!0}),_switch:b(`switch`),_throw:b(`throw`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_try:b(`try`),_var:b(`var`),_const:b(`const`),_with:b(`with`),_new:b(`new`,{beforeExpr:!0,startsExpr:!0}),_this:b(`this`,{startsExpr:!0}),_super:b(`super`,{startsExpr:!0}),_class:b(`class`,{startsExpr:!0}),_extends:b(`extends`,{beforeExpr:!0}),_export:b(`export`),_import:b(`import`,{startsExpr:!0}),_null:b(`null`,{startsExpr:!0}),_true:b(`true`,{startsExpr:!0}),_false:b(`false`,{startsExpr:!0}),_typeof:b(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_do:b(`do`,{isLoop:!0,beforeExpr:!0}),_for:b(`for`,{isLoop:!0}),_while:b(`while`,{isLoop:!0}),_as:E(`as`,{startsExpr:!0}),_assert:E(`assert`,{startsExpr:!0}),_async:E(`async`,{startsExpr:!0}),_await:E(`await`,{startsExpr:!0}),_from:E(`from`,{startsExpr:!0}),_get:E(`get`,{startsExpr:!0}),_let:E(`let`,{startsExpr:!0}),_meta:E(`meta`,{startsExpr:!0}),_of:E(`of`,{startsExpr:!0}),_sent:E(`sent`,{startsExpr:!0}),_set:E(`set`,{startsExpr:!0}),_static:E(`static`,{startsExpr:!0}),_using:E(`using`,{startsExpr:!0}),_yield:E(`yield`,{startsExpr:!0}),_asserts:E(`asserts`,{startsExpr:!0}),_checks:E(`checks`,{startsExpr:!0}),_exports:E(`exports`,{startsExpr:!0}),_global:E(`global`,{startsExpr:!0}),_implements:E(`implements`,{startsExpr:!0}),_intrinsic:E(`intrinsic`,{startsExpr:!0}),_infer:E(`infer`,{startsExpr:!0}),_is:E(`is`,{startsExpr:!0}),_mixins:E(`mixins`,{startsExpr:!0}),_proto:E(`proto`,{startsExpr:!0}),_require:E(`require`,{startsExpr:!0}),_satisfies:E(`satisfies`,{startsExpr:!0}),_keyof:E(`keyof`,{startsExpr:!0}),_readonly:E(`readonly`,{startsExpr:!0}),_unique:E(`unique`,{startsExpr:!0}),_abstract:E(`abstract`,{startsExpr:!0}),_declare:E(`declare`,{startsExpr:!0}),_enum:E(`enum`,{startsExpr:!0}),_module:E(`module`,{startsExpr:!0}),_namespace:E(`namespace`,{startsExpr:!0}),_interface:E(`interface`,{startsExpr:!0}),_type:E(`type`,{startsExpr:!0}),_opaque:E(`opaque`,{startsExpr:!0}),name:T(`name`,{startsExpr:!0}),string:T(`string`,{startsExpr:!0}),num:T(`num`,{startsExpr:!0}),bigint:T(`bigint`,{startsExpr:!0}),decimal:T(`decimal`,{startsExpr:!0}),regexp:T(`regexp`,{startsExpr:!0}),privateName:T(`#name`,{startsExpr:!0}),eof:T(`eof`),jsxName:T(`jsxName`),jsxText:T(`jsxText`,{beforeExpr:!0}),jsxTagStart:T(`jsxTagStart`,{startsExpr:!0}),jsxTagEnd:T(`jsxTagEnd`),placeholder:T(`%%`,{startsExpr:!0})};function O(e){return e>=93&&e<=130}function fe(e){return e<=92}function k(e){return e>=58&&e<=130}function A(e){return e>=58&&e<=134}function pe(e){return w[e]}function me(e){return ue[e]}function he(e){return e>=29&&e<=33}function j(e){return e>=127&&e<=129}function M(e){return e>=90&&e<=92}function N(e){return e>=58&&e<=92}function ge(e){return e>=39&&e<=59}function P(e){return e===34}function _e(e){return de[e]}function F(e){return e>=119&&e<=121}function ve(e){return e>=122&&e<=128}function I(e){return le[e]}function L(e){return C[e]}function ye(e){return e===57}function R(e){return e>=24&&e<=25}function z(e){return S[e]}S[8].updateContext=e=>{e.pop()},S[5].updateContext=S[7].updateContext=S[23].updateContext=e=>{e.push(y.brace)},S[22].updateContext=e=>{e[e.length-1]===y.template?e.pop():e.push(y.template)},S[140].updateContext=e=>{e.push(y.j_expr,y.j_oTag)};let be=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,xe=`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_`,Se=RegExp(`[`+be+`]`),Ce=RegExp(`[`+be+xe+`]`);be=xe=null;let we=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191],B=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function V(e,t){let n=65536;for(let r=0,i=t.length;r<i;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function H(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Se.test(String.fromCharCode(e)):V(e,we)}function U(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Ce.test(String.fromCharCode(e)):V(e,we)||V(e,B)}let Te={keyword:/* @__PURE__ */ `break.case.catch.continue.debugger.default.do.else.finally.for.function.if.return.switch.throw.try.var.const.while.with.new.this.super.class.extends.export.import.null.true.false.in.instanceof.typeof.void.delete`.split(`.`),strict:[`implements`,`interface`,`let`,`package`,`private`,`protected`,`public`,`static`,`yield`],strictBind:[`eval`,`arguments`]},W=new Set(Te.keyword),G=new Set(Te.strict),Ee=new Set(Te.strictBind);function De(e,t){return t&&e===`await`||e===`enum`}function Oe(e,t){return De(e,t)||G.has(e)}function ke(e){return Ee.has(e)}function K(e,t){return Oe(e,t)||ke(e)}function Ae(e){return W.has(e)}function je(e,t,n){return e===64&&t===64&&H(n)}let Me=/* @__PURE__ */ new Set(/* @__PURE__ */ `break.case.catch.continue.debugger.default.do.else.finally.for.function.if.return.switch.throw.try.var.const.while.with.new.this.super.class.extends.export.import.null.true.false.in.instanceof.typeof.void.delete.implements.interface.let.package.private.protected.public.static.yield.eval.arguments.enum.await`.split(`.`));function Ne(e){return Me.has(e)}let Pe=2048,q=4096,Fe=8331,Ie=8201,Le=1024,Re=4098;var ze=class{constructor(e){this.var=/* @__PURE__ */ new Set,this.lexical=/* @__PURE__ */ new Set,this.functions=/* @__PURE__ */ new Set,this.flags=e}},Be=class{constructor(e,t){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=/* @__PURE__ */ new Map,this.parser=e,this.inModule=t}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&64)>0&&!(e&2)}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&128)return!0;if(t&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new ze(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,t,n){let r=this.currentScope();if(t&8||t&16)this.checkRedeclarationInScope(r,e,t,n),t&16?r.functions.add(e):r.lexical.add(e),t&8&&this.maybeExportDefined(r,e);else if(t&4)for(let i=this.scopeStack.length-1;i>=0&&(r=this.scopeStack[i],this.checkRedeclarationInScope(r,e,t,n),r.var.add(e),this.maybeExportDefined(r,e),!(r.flags&387));--i);this.parser.inModule&&r.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,n,r){this.isRedeclaredInScope(e,t,n)&&this.parser.raise(_.VarRedeclaration,{at:r,identifierName:t})}isRedeclaredInScope(e,t,n){return n&1?n&8?e.lexical.has(t)||e.functions.has(t)||e.var.has(t):n&16?e.lexical.has(t)||!this.treatFunctionsAsVarInScope(e)&&e.var.has(t):e.lexical.has(t)&&!(e.flags&8&&e.lexical.values().next().value===t)||!this.treatFunctionsAsVarInScope(e)&&e.functions.has(t):!1}checkLocalExport(e){let{name:t}=e,n=this.scopeStack[0];n.lexical.has(t)||n.var.has(t)||n.functions.has(t)||this.undefinedExports.set(t,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&387)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&451&&!(t&4))return t}}},Ve=class extends ze{constructor(...e){super(...e),this.declareFunctions=/* @__PURE__ */ new Set}},He=class extends Be{createScope(e){return new Ve(e)}declareName(e,t,n){let r=this.currentScope();t&Pe?(this.checkRedeclarationInScope(r,e,t,n),this.maybeExportDefined(r,e),r.declareFunctions.add(e)):super.declareName(e,t,n)}isRedeclaredInScope(e,t,n){return super.isRedeclaredInScope(e,t,n)?!0:n&Pe?!e.declareFunctions.has(t)&&(e.lexical.has(t)||e.functions.has(t)):!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},Ue=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(e){if(typeof e==`string`)return this.plugins.has(e);{let[t,n]=e;if(!this.hasPlugin(t))return!1;let r=this.plugins.get(t);for(let e of Object.keys(n))if(r?.[e]!==n[e])return!1;return!0}}getPluginOption(e,t){return this.plugins.get(e)?.[t]}};function We(e,t){e.trailingComments===void 0?e.trailingComments=t:e.trailingComments.unshift(...t)}function Ge(e,t){e.leadingComments===void 0?e.leadingComments=t:e.leadingComments.unshift(...t)}function Ke(e,t){e.innerComments===void 0?e.innerComments=t:e.innerComments.unshift(...t)}function qe(e,t,n){let r=null,i=t.length;for(;r===null&&i>0;)r=t[--i];r===null||r.start>n.start?Ke(e,n.comments):We(r,n.comments)}var Je=class extends Ue{addComment(e){this.filename&&(e.loc.filename=this.filename),this.state.comments.push(e)}processComment(e){let{commentStack:t}=this.state,n=t.length;if(n===0)return;let r=n-1,i=t[r];i.start===e.end&&(i.leadingNode=e,r--);let{start:a}=e;for(;r>=0;r--){let n=t[r],i=n.end;if(i>a)n.containingNode=e,this.finalizeComment(n),t.splice(r,1);else{i===a&&(n.trailingNode=e);break}}}finalizeComment(e){let{comments:t}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&We(e.leadingNode,t),e.trailingNode!==null&&Ge(e.trailingNode,t);else{let{containingNode:n,start:r}=e;if(this.input.charCodeAt(r-1)===44)switch(n.type){case`ObjectExpression`:case`ObjectPattern`:case`RecordExpression`:qe(n,n.properties,e);break;case`CallExpression`:case`OptionalCallExpression`:qe(n,n.arguments,e);break;case`FunctionDeclaration`:case`FunctionExpression`:case`ArrowFunctionExpression`:case`ObjectMethod`:case`ClassMethod`:case`ClassPrivateMethod`:qe(n,n.params,e);break;case`ArrayExpression`:case`ArrayPattern`:case`TupleExpression`:qe(n,n.elements,e);break;case`ExportNamedDeclaration`:case`ImportDeclaration`:qe(n,n.specifiers,e);break;default:Ke(n,t)}else Ke(n,t)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:t}=this.state,{length:n}=t;if(n===0)return;let r=t[n-1];r.leadingNode===e&&(r.leadingNode=null)}takeSurroundingComments(e,t,n){let{commentStack:r}=this.state,i=r.length;if(i===0)return;let a=i-1;for(;a>=0;a--){let i=r[a],o=i.end;if(i.start===n)i.leadingNode=e;else if(o===t)i.trailingNode=e;else if(o<t)break}}};let Ye=/\r\n?|[\n\u2028\u2029]/,Xe=new RegExp(Ye.source,`g`);function Ze(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}let Qe=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,$e=/* @__PURE__ */ RegExp(`(?=((?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*))\\1(?=[\\n\\r\\u2028\\u2029]|\\/\\*(?!.*?\\*\\/)|$)`,`y`);function et(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var tt=class e{constructor(){this.strict=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.maybeInArrowParameters=!1,this.inType=!1,this.noAnonFunctionType=!1,this.hasFlowComment=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.inDisallowConditionalTypesContext=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.labels=[],this.comments=[],this.commentStack=[],this.pos=0,this.type=137,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.context=[y.brace],this.canStartJSXElement=!0,this.containsEsc=!1,this.firstInvalidTemplateEscapePos=null,this.strictErrors=/* @__PURE__ */ new Map,this.tokensLength=0}init({strictMode:e,sourceType:t,startLine:r,startColumn:i}){this.strict=e===!1?!1:e===!0||t===`module`,this.curLine=r,this.lineStart=-i,this.startLoc=this.endLoc=new n(r,i,0)}curPosition(){return new n(this.curLine,this.pos-this.lineStart,this.pos)}clone(t){let n=new e,r=Object.keys(this);for(let e=0,i=r.length;e<i;e++){let i=r[e],a=this[i];!t&&Array.isArray(a)&&(a=a.slice()),n[i]=a}return n}},nt=function(e){return e>=48&&e<=57};let rt={decBinOct:/* @__PURE__ */ new Set([46,66,69,79,95,98,101,111]),hex:/* @__PURE__ */ new Set([46,88,95,120])},it={bin:e=>e===48||e===49,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function at(e,t,n,r,i,a){let o=n,s=r,c=i,l=``,u=null,d=n,{length:f}=t;for(;;){if(n>=f){a.unterminated(o,s,c),l+=t.slice(d,n);break}let p=t.charCodeAt(n);if(ot(e,p,t,n)){l+=t.slice(d,n);break}if(p===92){l+=t.slice(d,n);let o=st(t,n,r,i,e===`template`,a);o.ch===null&&!u?u={pos:n,lineStart:r,curLine:i}:l+=o.ch,{pos:n,lineStart:r,curLine:i}=o,d=n}else p===8232||p===8233?(++n,++i,r=n):p===10||p===13?e===`template`?(l+=t.slice(d,n)+`
|
|
8
8
|
`,++n,p===13&&t.charCodeAt(n)===10&&++n,++i,d=r=n):a.unterminated(o,s,c):++n}return{pos:n,str:l,firstInvalidLoc:u,lineStart:r,curLine:i,containsInvalid:!!u}}function ot(e,t,n,r){return e===`template`?t===96||t===36&&n.charCodeAt(r+1)===123:t===(e===`double`?34:39)}function st(e,t,n,r,i,a){let o=!i;t++;let s=e=>({pos:t,ch:e,lineStart:n,curLine:r}),c=e.charCodeAt(t++);switch(c){case 110:return s(`
|
|
9
9
|
`);case 114:return s(`\r`);case 120:{let i;return{code:i,pos:t}=ct(e,t,n,r,2,!1,o,a),s(i===null?null:String.fromCharCode(i))}case 117:{let i;return{code:i,pos:t}=ut(e,t,n,r,o,a),s(i===null?null:String.fromCodePoint(i))}case 116:return s(` `);case 98:return s(`\b`);case 118:return s(`\v`);case 102:return s(`\f`);case 13:e.charCodeAt(t)===10&&++t;case 10:n=t,++r;case 8232:case 8233:return s(``);case 56:case 57:if(i)return s(null);a.strictNumericEscape(t-1,n,r);default:if(c>=48&&c<=55){let o=t-1,c=e.slice(o,t+2).match(/^[0-7]+/)[0],l=parseInt(c,8);l>255&&(c=c.slice(0,-1),l=parseInt(c,8)),t+=c.length-1;let u=e.charCodeAt(t);if(c!==`0`||u===56||u===57){if(i)return s(null);a.strictNumericEscape(o,n,r)}return s(String.fromCharCode(l))}return s(String.fromCharCode(c))}}function ct(e,t,n,r,i,a,o,s){let c=t,l;return{n:l,pos:t}=lt(e,t,n,r,16,i,a,!1,s,!o),l===null&&(o?s.invalidEscapeSequence(c,n,r):t=c-1),{code:l,pos:t}}function lt(e,t,n,r,i,a,o,s,c,l){let u=t,d=i===16?rt.hex:rt.decBinOct,f=i===16?it.hex:i===10?it.dec:i===8?it.oct:it.bin,p=!1,m=0;for(let u=0,h=a??1/0;u<h;++u){let a=e.charCodeAt(t),u;if(a===95&&s!==`bail`){let i=e.charCodeAt(t-1),a=e.charCodeAt(t+1);if(!s){if(l)return{n:null,pos:t};c.numericSeparatorInEscapeSequence(t,n,r)}else if(Number.isNaN(a)||!f(a)||d.has(i)||d.has(a)){if(l)return{n:null,pos:t};c.unexpectedNumericSeparator(t,n,r)}++t}else{if(u=a>=97?a-97+10:a>=65?a-65+10:nt(a)?a-48:1/0,u>=i){if(u<=9&&l)return{n:null,pos:t};if(u<=9&&c.invalidDigit(t,n,r,i))u=0;else if(o)u=0,p=!0;else break}++t,m=m*i+u}}return t===u||a!=null&&t-u!==a||p?{n:null,pos:t}:{n:m,pos:t}}function ut(e,t,n,r,i,a){let o=e.charCodeAt(t),s;if(o===123){if(++t,{code:s,pos:t}=ct(e,t,n,r,e.indexOf(`}`,t)-t,!0,i,a),++t,s!==null&&s>1114111){if(i)a.invalidCodePoint(t,n,r);else return{code:null,pos:t}}}else({code:s,pos:t}=ct(e,t,n,r,4,!1,i,a));return{code:s,pos:t}}let dt=[`at`],ft=[`at`];function pt(e,t,r){return new n(r,e-t,e)}let mt=/* @__PURE__ */ new Set([103,109,115,105,121,117,100,118]);var ht=class{constructor(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new r(e.startLoc,e.endLoc)}},gt=class extends Je{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(e,t,n,r)=>this.options.errorRecovery?(this.raise(_.InvalidDigit,{at:pt(e,t,n),radix:r}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(_.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(_.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(_.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(_.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(e,t,n)=>{this.recordStrictModeErrors(_.StrictNumericEscape,{at:pt(e,t,n)})},unterminated:(e,t,n)=>{throw this.raise(_.UnterminatedString,{at:pt(e-1,t,n)})}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(_.StrictNumericEscape),unterminated:(e,t,n)=>{throw this.raise(_.UnterminatedTemplate,{at:pt(e,t,n)})}}),this.state=new tt,this.state.init(e),this.input=t,this.length=t.length,this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new ht(this.state)),this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Qe.lastIndex=e,Qe.test(this.input)?Qe.lastIndex:e}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if((t&64512)==55296&&++e<this.input.length){let n=this.input.charCodeAt(e);(n&64512)==56320&&(t=65536+((t&1023)<<10)+(n&1023))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([e,t])=>this.raise(e,{at:t})),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length?this.finishToken(137):this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let n=this.state.pos,i=this.input.indexOf(e,n+2);if(i===-1)throw this.raise(_.UnterminatedComment,{at:this.state.curPosition()});for(this.state.pos=i+e.length,Xe.lastIndex=n+2;Xe.test(this.input)&&Xe.lastIndex<=i;)++this.state.curLine,this.state.lineStart=Xe.lastIndex;if(this.isLookahead)return;let a={type:`CommentBlock`,value:this.input.slice(n+2,i),start:n,end:i+e.length,loc:new r(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(a),a}skipLineComment(e){let t=this.state.pos,n;this.isLookahead||(n=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!Ze(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let a=this.state.pos,o={type:`CommentLine`,value:this.input.slice(t+e,a),start:t,end:a,loc:new r(n,this.state.curPosition())};return this.options.tokens&&this.pushToken(o),o}skipSpace(){let e=this.state.pos,t=[];loop:for(;this.state.pos<this.length;){let n=this.input.charCodeAt(this.state.pos);switch(n){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let e=this.skipBlockComment(`*/`);e!==void 0&&(this.addComment(e),this.options.attachComment&&t.push(e));break}case 47:{let e=this.skipLineComment(2);e!==void 0&&(this.addComment(e),this.options.attachComment&&t.push(e));break}default:break loop}break;default:if(et(n))++this.state.pos;else if(n===45&&!this.inModule&&this.options.annexB){let n=this.state.pos;if(this.input.charCodeAt(n+1)===45&&this.input.charCodeAt(n+2)===62&&(e===0||this.state.lineStart>e)){let e=this.skipLineComment(3);e!==void 0&&(this.addComment(e),this.options.attachComment&&t.push(e))}else break loop}else if(n===60&&!this.inModule&&this.options.annexB){let e=this.state.pos;if(this.input.charCodeAt(e+1)===33&&this.input.charCodeAt(e+2)===45&&this.input.charCodeAt(e+3)===45){let e=this.skipLineComment(4);e!==void 0&&(this.addComment(e),this.options.attachComment&&t.push(e))}else break loop}else break loop}}if(t.length>0){let n={start:e,end:this.state.pos,comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(n)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let n=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(n)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(_.UnexpectedDigitAfterHash,{at:this.state.curPosition()});if(t===123||t===91&&this.hasPlugin(`recordAndTuple`)){if(this.expectPlugin(`recordAndTuple`),this.getPluginOption(`recordAndTuple`,`syntaxType`)===`bar`)throw this.raise(t===123?_.RecordExpressionHashIncorrectStartSyntaxType:_.TupleExpressionHashIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,t===123?this.finishToken(7):this.finishToken(1)}else H(t)?(++this.state.pos,this.finishToken(136,this.readWord1(t))):t===92?(++this.state.pos,this.finishToken(136,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):e===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(e!==33)return!1;let t=this.state.pos;for(this.state.pos+=1;!Ze(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);let n=this.input.slice(t+2,this.state.pos);return this.finishToken(28,n),!0}readToken_mult_modulo(e){let t=e===42?55:54,n=1,r=this.input.charCodeAt(this.state.pos+1);e===42&&r===42&&(n++,r=this.input.charCodeAt(this.state.pos+2),t=57),r===61&&!this.state.inType&&(n++,t=e===37?33:30),this.finishOp(t,n)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===e)this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(e===124?41:42,2);else{if(e===124){if(t===62){this.finishOp(39,2);return}if(this.hasPlugin(`recordAndTuple`)&&t===125){if(this.getPluginOption(`recordAndTuple`,`syntaxType`)!==`bar`)throw this.raise(_.RecordExpressionBarIncorrectEndSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin(`recordAndTuple`)&&t===93){if(this.getPluginOption(`recordAndTuple`,`syntaxType`)!==`bar`)throw this.raise(_.TupleExpressionBarIncorrectEndSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(4);return}}t===61?this.finishOp(30,2):this.finishOp(e===124?43:45,1)}}readToken_caret(){let e=this.input.charCodeAt(this.state.pos+1);if(e===61&&!this.state.inType)this.finishOp(32,2);else if(e===94&&this.hasPlugin([`pipelineOperator`,{proposal:`hack`,topicToken:`^^`}])){if(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94)throw this.unexpected()}else this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin([`pipelineOperator`,{proposal:`hack`,topicToken:`@@`}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(e){let t=this.input.charCodeAt(this.state.pos+1);t===e?this.finishOp(34,2):t===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(t===60){if(this.input.charCodeAt(e+2)===61){this.finishOp(30,3);return}this.finishOp(51,2)}else t===61?this.finishOp(49,2):this.finishOp(47,1)}readToken_gt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(t===62){let t=this.input.charCodeAt(e+2)===62?3:2;if(this.input.charCodeAt(e+t)===61){this.finishOp(30,t+1);return}this.finishOp(52,t)}else t===61?this.finishOp(49,2):this.finishOp(48,1)}readToken_eq_excl(e){let t=this.input.charCodeAt(this.state.pos+1);t===61?this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2):e===61&&t===62?(this.state.pos+=2,this.finishToken(19)):this.finishOp(e===61?29:35,1)}readToken_question(){let e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);e===63?t===61?this.finishOp(30,3):this.finishOp(40,2):e===46&&!(t>=48&&t<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(e){switch(e){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin(`recordAndTuple`)&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption(`recordAndTuple`,`syntaxType`)!==`bar`)throw this.raise(_.TupleExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin(`recordAndTuple`)&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption(`recordAndTuple`,`syntaxType`)!==`bar`)throw this.raise(_.RecordExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin(`functionBind`)&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(e);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(e);return;case 124:case 38:this.readToken_pipe_amp(e);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(e);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(e);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(H(e)){this.readWord(e);return}}throw this.raise(_.InvalidOrUnexpectedToken,{at:this.state.curPosition(),unexpected:String.fromCodePoint(e)})}finishOp(e,t){let n=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,n)}readRegexp(){let e=this.state.startLoc,t=this.state.start+1,n,r,{pos:a}=this.state;for(;;++a){if(a>=this.length)throw this.raise(_.UnterminatedRegExp,{at:i(e,1)});let t=this.input.charCodeAt(a);if(Ze(t))throw this.raise(_.UnterminatedRegExp,{at:i(e,1)});if(n)n=!1;else{if(t===91)r=!0;else if(t===93&&r)r=!1;else if(t===47&&!r)break;n=t===92}}let o=this.input.slice(t,a);++a;let s=``,c=()=>i(e,a+2-t);for(;a<this.length;){let e=this.codePointAtPos(a),t=String.fromCharCode(e);if(mt.has(e))e===118?(this.expectPlugin(`regexpUnicodeSets`,c()),s.includes(`u`)&&this.raise(_.IncompatibleRegExpUVFlags,{at:c()})):e===117&&s.includes(`v`)&&this.raise(_.IncompatibleRegExpUVFlags,{at:c()}),s.includes(t)&&this.raise(_.DuplicateRegExpFlags,{at:c()});else if(U(e)||e===92)this.raise(_.MalformedRegExpFlags,{at:c()});else break;++a,s+=t}this.state.pos=a,this.finishToken(135,{pattern:o,flags:s})}readInt(e,t,n=!1,r=!0){let{n:i,pos:a}=lt(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,n,r,this.errorHandlers_readInt,!1);return this.state.pos=a,i}readRadixNumber(e){let t=this.state.curPosition(),n=!1;this.state.pos+=2;let r=this.readInt(e);r??this.raise(_.InvalidDigit,{at:i(t,2),radix:e});let a=this.input.charCodeAt(this.state.pos);if(a===110)++this.state.pos,n=!0;else if(a===109)throw this.raise(_.InvalidDecimal,{at:t});if(H(this.codePointAtPos(this.state.pos)))throw this.raise(_.NumberIdentifier,{at:this.state.curPosition()});if(n){let e=this.input.slice(t.index,this.state.pos).replace(/[_n]/g,``);this.finishToken(133,e)}else this.finishToken(132,r)}readNumber(e){let t=this.state.pos,n=this.state.curPosition(),r=!1,a=!1,o=!1,s=!1,c=!1;!e&&this.readInt(10)===null&&this.raise(_.InvalidNumber,{at:this.state.curPosition()});let l=this.state.pos-t>=2&&this.input.charCodeAt(t)===48;if(l){let e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(_.StrictOctalLiteral,{at:n}),!this.state.strict){let t=e.indexOf(`_`);t>0&&this.raise(_.ZeroDigitNumericSeparator,{at:i(n,t)})}c=l&&!/[89]/.test(e)}let u=this.input.charCodeAt(this.state.pos);if(u===46&&!c&&(++this.state.pos,this.readInt(10),r=!0,u=this.input.charCodeAt(this.state.pos)),u!==69&&u!==101||c||(u=this.input.charCodeAt(++this.state.pos),(u===43||u===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(_.InvalidOrMissingExponent,{at:n}),r=!0,s=!0,u=this.input.charCodeAt(this.state.pos)),u===110&&((r||l)&&this.raise(_.InvalidBigIntLiteral,{at:n}),++this.state.pos,a=!0),u===109&&(this.expectPlugin(`decimal`,this.state.curPosition()),(s||l)&&this.raise(_.InvalidDecimal,{at:n}),++this.state.pos,o=!0),H(this.codePointAtPos(this.state.pos)))throw this.raise(_.NumberIdentifier,{at:this.state.curPosition()});let d=this.input.slice(t,this.state.pos).replace(/[_mn]/g,``);if(a){this.finishToken(133,d);return}if(o){this.finishToken(134,d);return}let f=c?parseInt(d,8):parseFloat(d);this.finishToken(132,f)}readCodePoint(e){let{code:t,pos:n}=ut(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=n,t}readString(e){let{str:t,pos:n,curLine:r,lineStart:i}=at(e===34?`double`:`single`,this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=n+1,this.state.lineStart=i,this.state.curLine=r,this.finishToken(131,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:t,firstInvalidLoc:r,pos:i,curLine:a,lineStart:o}=at(`template`,this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=o,this.state.curLine=a,r&&(this.state.firstInvalidTemplateEscapePos=new n(r.curLine,r.pos-r.lineStart,r.pos)),this.input.codePointAt(i)===96?this.finishToken(24,r?null:e+t+"`"):(this.state.pos++,this.finishToken(25,r?null:e+t+"${"))}recordStrictModeErrors(e,{at:t}){let n=t.index;this.state.strict&&!this.state.strictErrors.has(n)?this.raise(e,{at:t}):this.state.strictErrors.set(n,[e,t])}readWord1(e){this.state.containsEsc=!1;let t=``,n=this.state.pos,r=this.state.pos;for(e!==void 0&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){let e=this.codePointAtPos(this.state.pos);if(U(e))this.state.pos+=e<=65535?1:2;else if(e===92){this.state.containsEsc=!0,t+=this.input.slice(r,this.state.pos);let e=this.state.curPosition(),i=this.state.pos===n?H:U;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(_.MissingUnicodeEscape,{at:this.state.curPosition()}),r=this.state.pos-1;continue}++this.state.pos;let a=this.readCodePoint(!0);a!==null&&(i(a)||this.raise(_.EscapedCharNotAnIdentifier,{at:e}),t+=String.fromCodePoint(a)),r=this.state.pos}else break}return t+this.input.slice(r,this.state.pos)}readWord(e){let t=this.readWord1(e),n=se.get(t);n===void 0?this.finishToken(130,t):this.finishToken(n,I(n))}checkKeywordEscapes(){let{type:e}=this.state;N(e)&&this.state.containsEsc&&this.raise(_.InvalidEscapedReservedWord,{at:this.state.startLoc,reservedWord:I(e)})}raise(e,r){let{at:i}=r,a=t(r,dt),o=e({loc:i instanceof n?i:i.loc.start,details:a});if(!this.options.errorRecovery)throw o;return this.isLookahead||this.state.errors.push(o),o}raiseOverwrite(e,r){let{at:i}=r,a=t(r,ft),o=i instanceof n?i:i.loc.start,s=o.index,c=this.state.errors;for(let t=c.length-1;t>=0;t--){let n=c[t];if(n.loc.index===s)return c[t]=e({loc:o,details:a});if(n.loc.index<s)break}return this.raise(e,r)}updateContext(e){}unexpected(e,t){throw this.raise(_.UnexpectedToken,{expected:t?I(t):null,at:e??this.state.startLoc})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(_.MissingPlugin,{at:t??this.state.startLoc,missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(e=>this.hasPlugin(e)))throw this.raise(_.MissingOneOfPlugins,{at:this.state.startLoc,missingPlugin:e})}errorBuilder(e){return(t,n,r)=>{this.raise(e,{at:pt(t,n,r)})}}},_t=class{constructor(){this.privateNames=/* @__PURE__ */ new Set,this.loneAccessors=/* @__PURE__ */ new Map,this.undefinedPrivateNames=/* @__PURE__ */ new Map}},vt=class{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=/* @__PURE__ */ new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new _t)}exit(){let e=this.stack.pop(),t=this.current();for(let[n,r]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(n)||t.undefinedPrivateNames.set(n,r):this.parser.raise(_.InvalidPrivateFieldResolution,{at:r,identifierName:n})}declarePrivateName(e,t,n){let{privateNames:r,loneAccessors:i,undefinedPrivateNames:a}=this.current(),o=r.has(e);if(t&3){let n=o&&i.get(e);if(n){let r=n&4,a=t&4;o=(n&3)==(t&3)||r!==a,o||i.delete(e)}else o||i.set(e,t)}o&&this.parser.raise(_.PrivateNameRedeclaration,{at:n,identifierName:e}),r.add(e),a.delete(e)}usePrivateName(e,t){let n;for(n of this.stack)if(n.privateNames.has(e))return;n?n.undefinedPrivateNames.set(e,t):this.parser.raise(_.InvalidPrivateFieldResolution,{at:t,identifierName:e})}},yt=class{constructor(e=0){this.type=void 0,this.type=e}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},bt=class extends yt{constructor(e){super(e),this.declarationErrors=/* @__PURE__ */ new Map}recordDeclarationError(e,{at:t}){let n=t.index;this.declarationErrors.set(n,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}},xt=class{constructor(e){this.parser=void 0,this.stack=[new yt],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,{at:t}){let n={at:t.loc.start},{stack:r}=this,i=r.length-1,a=r[i];for(;!a.isCertainlyParameterDeclaration();){if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(e,n);else return;a=r[--i]}this.parser.raise(e,n)}recordArrowParameterBindingError(e,{at:t}){let{stack:n}=this,r=n[n.length-1],i={at:t.loc.start};if(r.isCertainlyParameterDeclaration())this.parser.raise(e,i);else if(r.canBeArrowParameterDeclaration())r.recordDeclarationError(e,i);else return}recordAsyncArrowParametersError({at:e}){let{stack:t}=this,n=t.length-1,r=t[n];for(;r.canBeArrowParameterDeclaration();)r.type===2&&r.recordDeclarationError(_.AwaitBindingIdentifier,{at:e}),r=t[--n]}validateAsPattern(){let{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors(([t,n])=>{this.parser.raise(t,{at:n});let r=e.length-2,i=e[r];for(;i.canBeArrowParameterDeclaration();)i.clearDeclarationError(n.index),i=e[--r]})}};function St(){return new yt(3)}function Ct(){return new bt(1)}function wt(){return new bt(2)}function Tt(){return new yt}var Et=class{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function Dt(e,t){return(e?2:0)|!!t}var Ot=class extends gt{addExtra(e,t,n,r=!0){if(!e)return;let i=e.extra=e.extra||{};r?i[t]=n:Object.defineProperty(i,t,{enumerable:r,value:n})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){let n=e+t.length;if(this.input.slice(e,n)===t){let e=this.input.charCodeAt(n);return!(U(e)||(e&64512)==55296)}return!1}isLookaheadContextual(e){let t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return this.isContextual(e)?(this.next(),!0):!1}expectContextual(e,t){if(!this.eatContextual(e))throw t==null?this.unexpected(null,e):this.raise(t,{at:this.state.startLoc})}canInsertSemicolon(){return this.match(137)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Ye.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return $e.lastIndex=this.state.end,$e.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(_.MissingSemicolon,{at:this.state.lastTokEndLoc})}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){let n={node:null};try{let r=e((e=null)=>{throw n.node=e,n});if(this.state.errors.length>t.errors.length){let e=this.state;return this.state=t,this.state.tokensLength=e.tokensLength,{node:r,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){let r=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:r};if(e===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:r};throw e}}checkExpressionErrors(e,t){if(!e)return!1;let{shorthandAssignLoc:n,doubleProtoLoc:r,privateKeyLoc:i,optionalParametersLoc:a}=e,o=!!n||!!r||!!a||!!i;if(!t)return o;n!=null&&this.raise(_.InvalidCoverInitializedName,{at:n}),r!=null&&this.raise(_.DuplicateProto,{at:r}),i!=null&&this.raise(_.UnexpectedPrivateField,{at:i}),a!=null&&this.unexpected(a)}isLiteralPropertyName(){return A(this.state.type)}isPrivateName(e){return e.type===`PrivateName`}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return(e.type===`MemberExpression`||e.type===`OptionalMemberExpression`)&&this.isPrivateName(e.property)}isObjectProperty(e){return e.type===`ObjectProperty`}isObjectMethod(e){return e.type===`ObjectMethod`}initializeScopes(e=this.options.sourceType===`module`){let t=this.state.labels;this.state.labels=[];let n=this.exportedIdentifiers;this.exportedIdentifiers=/* @__PURE__ */ new Set;let r=this.inModule;this.inModule=e;let i=this.scope,a=this.getScopeHandler();this.scope=new a(this,e);let o=this.prodParam;this.prodParam=new Et;let s=this.classScope;this.classScope=new vt(this);let c=this.expressionScope;return this.expressionScope=new xt(this),()=>{this.state.labels=t,this.exportedIdentifiers=n,this.inModule=r,this.scope=i,this.prodParam=o,this.classScope=s,this.expressionScope=c}}enterInitialScopes(){let e=0;this.inModule&&(e|=2),this.scope.enter(1),this.prodParam.enter(e)}checkDestructuringPrivate(e){let{privateKeyLoc:t}=e;t!==null&&this.expectPlugin(`destructuringPrivate`,t)}},kt=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},At=class{constructor(e,t,n){this.type=``,this.start=t,this.end=0,this.loc=new r(n),e!=null&&e.options.ranges&&(this.range=[t,0]),e!=null&&e.filename&&(this.loc.filename=e.filename)}};let jt=At.prototype;jt.__clone=function(){let e=new At(void 0,this.start,this.loc.start),t=Object.keys(this);for(let n=0,r=t.length;n<r;n++){let r=t[n];r!==`leadingComments`&&r!==`trailingComments`&&r!==`innerComments`&&(e[r]=this[r])}return e};function Mt(e){return J(e)}function J(e){let{type:t,start:n,end:r,loc:i,range:a,extra:o,name:s}=e,c=Object.create(jt);return c.type=t,c.start=n,c.end=r,c.loc=i,c.range=a,c.extra=o,c.name=s,t===`Placeholder`&&(c.expectedNode=e.expectedNode),c}function Nt(e){let{type:t,start:n,end:r,loc:i,range:a,extra:o}=e;if(t===`Placeholder`)return Mt(e);let s=Object.create(jt);return s.type=t,s.start=n,s.end=r,s.loc=i,s.range=a,e.raw===void 0?s.extra=o:s.raw=e.raw,s.value=e.value,s}var Pt=class extends Ot{startNode(){return new At(this,this.state.start,this.state.startLoc)}startNodeAt(e){return new At(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,n){return e.type=t,e.end=n.index,e.loc.end=n,this.options.ranges&&(e.range[1]=n.index),this.options.attachComment&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,this.options.ranges&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,this.options.ranges&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}};let Ft=/* @__PURE__ */ new Set([`_`,`any`,`bool`,`boolean`,`empty`,`extends`,`false`,`interface`,`mixed`,`null`,`number`,`static`,`string`,`true`,`typeof`,`void`]),Y=g`flow`({AmbiguousConditionalArrow:`Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.`,AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:e})=>`Cannot overwrite reserved type ${e}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:n})=>`Enum \`${e}\` has type \`${n}\`, so the initializer of \`${t}\` needs to be a ${n} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:t,suggestion:n})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${n}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitailized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:`Explicit inexact syntax cannot appear inside an explicit exact object type.`,InexactInsideNonObject:`Explicit inexact syntax cannot appear in class or interface definitions.`,InexactVariance:`Explicit inexact syntax cannot have variance.`,InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:`Type parameter declaration needs a default, since a preceding type parameter declaration has a default.`,NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:`Cannot have a flow comment inside another flow comment.`,PatternIsOptional:Object.assign({message:`A binding pattern parameter cannot be optional in an implementation signature.`},{reasonCode:`OptionalBindingPattern`}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:`Spread properties cannot have variance.`,ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:`The type cast expression is expected to be wrapped with parenthesis.`,UnexpectedExplicitInexactInObject:`Explicit inexact syntax must appear at the end of an inexact object.`,UnexpectedReservedType:({reservedType:e})=>`Unexpected reserved type ${e}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:`Spread operator cannot appear in class or interface definitions.`,UnexpectedSubtractionOperand:`Unexpected token, expected "number" or "bigint".`,UnexpectedTokenAfterTypeParameter:`Expected an arrow function after this type parameter declaration.`,UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:`Only declares and type imports are allowed inside declare module.`,UnterminatedFlowComment:`Unterminated flow-comment.`});function It(e){return e.type===`DeclareExportAllDeclaration`||e.type===`DeclareExportDeclaration`&&(!e.declaration||e.declaration.type!==`TypeAlias`&&e.declaration.type!==`InterfaceDeclaration`)}function Lt(e){return e.importKind===`type`||e.importKind===`typeof`}function Rt(e){return k(e)&&e!==97}let zt={const:`declare export var`,let:`declare export var`,type:`export type`,interface:`export interface`};function Bt(e,t){let n=[],r=[];for(let i=0;i<e.length;i++)(t(e[i],i,e)?n:r).push(e[i]);return[n,r]}let Vt=/\*?\s*@((?:no)?flow)\b/;var Ht=(e=>class extends e{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return He}shouldParseTypes(){return this.getPluginOption(`flow`,`all`)||this.flowPragma===`flow`}shouldParseEnums(){return!!this.getPluginOption(`flow`,`enums`)}finishToken(e,t){return e!==131&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(this.flowPragma===void 0){let t=Vt.exec(e.value);if(t){if(t[1]===`flow`)this.flowPragma=`flow`;else if(t[1]===`noflow`)this.flowPragma=`noflow`;else throw Error(`Unexpected flow pragma`)}}return super.addComment(e)}flowParseTypeInitialiser(e){let t=this.state.inType;this.state.inType=!0,this.expect(e||14);let n=this.flowParseType();return this.state.inType=t,n}flowParsePredicate(){let e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(108),this.state.lastTokStart>t.index+1&&this.raise(Y.UnexpectedSpaceBetweenModuloChecks,{at:t}),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,`DeclaredPredicate`)):this.finishNode(e,`InferredPredicate`)}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let t=null,n=null;return this.match(54)?(this.state.inType=e,n=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(n=this.flowParsePredicate())),[t,n]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,`DeclareClass`)}flowParseDeclareFunction(e){this.next();let t=e.id=this.parseIdentifier(),n=this.startNode(),r=this.startNode();n.typeParameters=this.match(47)?this.flowParseTypeParameterDeclaration():null,this.expect(10);let i=this.flowParseFunctionTypeParams();return n.params=i.params,n.rest=i.rest,n.this=i._this,this.expect(11),[n.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.typeAnnotation=this.finishNode(n,`FunctionTypeAnnotation`),t.typeAnnotation=this.finishNode(r,`TypeAnnotation`),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,`DeclareFunction`)}flowParseDeclare(e,t){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(125))return this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(Y.NestedDeclareModule,{at:this.state.lastTokStartLoc}),this.flowParseDeclareModule(e));if(this.isContextual(128))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(129))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(127))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,t);throw this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,`DeclareVariable`)}flowParseDeclareModule(e){this.scope.enter(0),e.id=this.match(131)?super.parseExprAtom():this.parseIdentifier();let t=e.body=this.startNode(),n=t.body=[];for(this.expect(5);!this.match(8);){let e=this.startNode();this.match(83)?(this.next(),!this.isContextual(128)&&!this.match(87)&&this.raise(Y.InvalidNonTypeImportInDeclareModule,{at:this.state.lastTokStartLoc}),super.parseImport(e)):(this.expectContextual(123,Y.UnsupportedStatementInDeclareModule),e=this.flowParseDeclare(e,!0)),n.push(e)}this.scope.exit(),this.expect(8),this.finishNode(t,`BlockStatement`);let r=null,i=!1;return n.forEach(e=>{It(e)?(r===`CommonJS`&&this.raise(Y.AmbiguousDeclareModuleKind,{at:e}),r=`ES`):e.type===`DeclareModuleExports`&&(i&&this.raise(Y.DuplicateDeclareModuleExports,{at:e}),r===`ES`&&this.raise(Y.AmbiguousDeclareModuleKind,{at:e}),r=`CommonJS`,i=!0)}),e.kind=r||`CommonJS`,this.finishNode(e,`DeclareModule`)}flowParseDeclareExportDeclaration(e,t){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,`DeclareExportDeclaration`);if(this.match(75)||this.isLet()||(this.isContextual(128)||this.isContextual(127))&&!t){let e=this.state.value;throw this.raise(Y.UnsupportedDeclareExportKind,{at:this.state.startLoc,unsupportedExportKind:e,suggestion:zt[e]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(129))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,`DeclareExportDeclaration`);if(this.match(55)||this.match(5)||this.isContextual(127)||this.isContextual(128)||this.isContextual(129))return e=this.parseExport(e,null),e.type===`ExportNamedDeclaration`&&(e.type=`ExportDeclaration`,e.default=!1,delete e.exportKind),e.type=`Declare`+e.type,e;throw this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(109),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,`DeclareModuleExports`)}flowParseDeclareTypeAlias(e){this.next();let t=this.flowParseTypeAlias(e);return t.type=`DeclareTypeAlias`,t}flowParseDeclareOpaqueType(e){this.next();let t=this.flowParseOpaqueType(e,!0);return t.type=`DeclareOpaqueType`,t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,`DeclareInterface`)}flowParseInterfaceish(e,t=!1){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:Ie,e.id.loc.start),e.typeParameters=this.match(47)?this.flowParseTypeParameterDeclaration():null,e.extends=[],e.implements=[],e.mixins=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!t&&this.eat(12));if(this.isContextual(115)){this.next();do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12))}if(this.isContextual(111)){this.next();do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),e.typeParameters=this.match(47)?this.flowParseTypeParameterInstantiation():null,this.finishNode(e,`InterfaceExtends`)}flowParseInterface(e){return this.flowParseInterfaceish(e),this.finishNode(e,`InterfaceDeclaration`)}checkNotUnderscore(e){e===`_`&&this.raise(Y.UnexpectedReservedUnderscore,{at:this.state.startLoc})}checkReservedType(e,t,n){Ft.has(e)&&this.raise(n?Y.AssignReservedType:Y.UnexpectedReservedType,{at:t,reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,Ie,e.id.loc.start),e.typeParameters=this.match(47)?this.flowParseTypeParameterDeclaration():null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,`TypeAlias`)}flowParseOpaqueType(e,t){return this.expectContextual(128),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,Ie,e.id.loc.start),e.typeParameters=this.match(47)?this.flowParseTypeParameterDeclaration():null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,`OpaqueType`)}flowParseTypeParameter(e=!1){let t=this.state.startLoc,n=this.startNode(),r=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return n.name=i.name,n.variance=r,n.bound=i.typeAnnotation,this.match(29)?(this.eat(29),n.default=this.flowParseType()):e&&this.raise(Y.MissingTypeParamDefault,{at:t}),this.finishNode(n,`TypeParameter`)}flowParseTypeParameterDeclaration(){let e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(140)?this.next():this.unexpected();let n=!1;do{let e=this.flowParseTypeParameter(n);t.params.push(e),e.default&&(n=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,`TypeParameterDeclaration`)}flowParseTypeParameterInstantiation(){let e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let n=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=n,this.expect(48),this.state.inType=t,this.finishNode(e,`TypeParameterInstantiation`)}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=t,this.finishNode(e,`TypeParameterInstantiation`)}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(127),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,`InterfaceTypeAnnotation`)}flowParseObjectPropertyKey(){return this.match(132)||this.match(131)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,n){return e.static=t,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=n,this.finishNode(e,`ObjectTypeIndexer`)}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,`ObjectTypeInternalSlot`)}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,`FunctionTypeAnnotation`)}flowParseObjectTypeCallProperty(e,t){let n=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(n),this.finishNode(e,`ObjectTypeCallProperty`)}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:n,allowProto:r,allowInexact:i}){let a=this.state.inType;this.state.inType=!0;let o=this.startNode();o.callProperties=[],o.properties=[],o.indexers=[],o.internalSlots=[];let s,c,l=!1;for(t&&this.match(6)?(this.expect(6),s=9,c=!0):(this.expect(5),s=8,c=!1),o.exact=c;!this.match(s);){let t=!1,a=null,s=null,u=this.startNode();if(r&&this.isContextual(116)){let t=this.lookahead();t.type!==14&&t.type!==17&&(this.next(),a=this.state.startLoc,e=!1)}if(e&&this.isContextual(104)){let e=this.lookahead();e.type!==14&&e.type!==17&&(this.next(),t=!0)}let d=this.flowParseVariance();if(this.eat(0))a!=null&&this.unexpected(a),this.eat(0)?(d&&this.unexpected(d.loc.start),o.internalSlots.push(this.flowParseObjectTypeInternalSlot(u,t))):o.indexers.push(this.flowParseObjectTypeIndexer(u,t,d));else if(this.match(10)||this.match(47))a!=null&&this.unexpected(a),d&&this.unexpected(d.loc.start),o.callProperties.push(this.flowParseObjectTypeCallProperty(u,t));else{let e=`init`;(this.isContextual(98)||this.isContextual(103))&&A(this.lookahead().type)&&(e=this.state.value,this.next());let r=this.flowParseObjectTypeProperty(u,t,a,d,e,n,i??!c);r===null?(l=!0,s=this.state.lastTokStartLoc):o.properties.push(r)}this.flowObjectTypeSemicolon(),s&&!this.match(8)&&!this.match(9)&&this.raise(Y.UnexpectedExplicitInexactInObject,{at:s})}this.expect(s),n&&(o.inexact=l);let u=this.finishNode(o,`ObjectTypeAnnotation`);return this.state.inType=a,u}flowParseObjectTypeProperty(e,t,n,r,i,a,o){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(a?o||this.raise(Y.InexactInsideExact,{at:this.state.lastTokStartLoc}):this.raise(Y.InexactInsideNonObject,{at:this.state.lastTokStartLoc}),r&&this.raise(Y.InexactVariance,{at:r}),null):(a||this.raise(Y.UnexpectedSpreadType,{at:this.state.lastTokStartLoc}),n!=null&&this.unexpected(n),r&&this.raise(Y.SpreadVariance,{at:r}),e.argument=this.flowParseType(),this.finishNode(e,`ObjectTypeSpreadProperty`));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=n!=null,e.kind=i;let o=!1;return this.match(47)||this.match(10)?(e.method=!0,n!=null&&this.unexpected(n),r&&this.unexpected(r.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(i===`get`||i===`set`)&&this.flowCheckGetterSetterParams(e),!a&&e.key.name===`constructor`&&e.value.this&&this.raise(Y.ThisParamBannedInConstructor,{at:e.value.this})):(i!==`init`&&this.unexpected(),e.method=!1,this.eat(17)&&(o=!0),e.value=this.flowParseTypeInitialiser(),e.variance=r),e.optional=o,this.finishNode(e,`ObjectTypeProperty`)}}flowCheckGetterSetterParams(e){let t=e.kind===`get`?0:1,n=e.value.params.length+ +!!e.value.rest;e.value.this&&this.raise(e.kind===`get`?Y.GetterMayNotHaveThisParam:Y.SetterMayNotHaveThisParam,{at:e.value.this}),n!==t&&this.raise(e.kind===`get`?_.BadGetterArity:_.BadSetterArity,{at:e}),e.kind===`set`&&e.value.rest&&this.raise(_.BadSetterRestParameter,{at:e})}flowObjectTypeSemicolon(){this.eat(13)||this.eat(12)||this.match(8)||this.match(9)||this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){e??=this.state.startLoc;let n=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let t=this.startNodeAt(e);t.qualification=n,t.id=this.flowParseRestrictedIdentifier(!0),n=this.finishNode(t,`QualifiedTypeIdentifier`)}return n}flowParseGenericType(e,t){let n=this.startNodeAt(e);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,`GenericTypeAnnotation`)}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,`TypeofTypeAnnotation`)}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,`TupleTypeAnnotation`)}flowParseFunctionTypeParam(e){let t=null,n=!1,r=null,i=this.startNode(),a=this.lookahead(),o=this.state.type===78;return a.type===14||a.type===17?(o&&!e&&this.raise(Y.ThisParamMustBeFirst,{at:i}),t=this.parseIdentifier(o),this.eat(17)&&(n=!0,o&&this.raise(Y.ThisParamMayNotBeOptional,{at:i})),r=this.flowParseTypeInitialiser()):r=this.flowParseType(),i.name=t,i.optional=n,i.typeAnnotation=r,this.finishNode(i,`FunctionTypeParam`)}reinterpretTypeAsFunctionTypeParam(e){let t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,`FunctionTypeParam`)}flowParseFunctionTypeParams(e=[]){let t=null,n=null;for(this.match(78)&&(n=this.flowParseFunctionTypeParam(!0),n.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this:n}}flowIdentToTypeAnnotation(e,t,n){switch(n.name){case`any`:return this.finishNode(t,`AnyTypeAnnotation`);case`bool`:case`boolean`:return this.finishNode(t,`BooleanTypeAnnotation`);case`mixed`:return this.finishNode(t,`MixedTypeAnnotation`);case`empty`:return this.finishNode(t,`EmptyTypeAnnotation`);case`number`:return this.finishNode(t,`NumberTypeAnnotation`);case`string`:return this.finishNode(t,`StringTypeAnnotation`);case`symbol`:return this.finishNode(t,`SymbolTypeAnnotation`);default:return this.checkNotUnderscore(n.name),this.flowParseGenericType(e,n)}}flowParsePrimaryType(){let e=this.state.startLoc,t=this.startNode(),n,r,i=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,r=this.flowParseTupleType(),this.state.noAnonFunctionType=a,r;case 47:return t.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),n=this.flowParseFunctionTypeParams(),t.params=n.params,t.rest=n.rest,t.this=n._this,this.expect(11),this.expect(19),t.returnType=this.flowParseType(),this.finishNode(t,`FunctionTypeAnnotation`);case 10:if(this.next(),!this.match(11)&&!this.match(21)){if(O(this.state.type)||this.match(78)){let e=this.lookahead().type;i=e!==17&&e!==14}else i=!0}if(i){if(this.state.noAnonFunctionType=!1,r=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),r;this.eat(12)}return n=r?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(r)]):this.flowParseFunctionTypeParams(),t.params=n.params,t.rest=n.rest,t.this=n._this,this.expect(11),this.expect(19),t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,`FunctionTypeAnnotation`);case 131:return this.parseLiteral(this.state.value,`StringLiteralTypeAnnotation`);case 85:case 86:return t.value=this.match(85),this.next(),this.finishNode(t,`BooleanLiteralTypeAnnotation`);case 53:if(this.state.value===`-`){if(this.next(),this.match(132))return this.parseLiteralAtNode(-this.state.value,`NumberLiteralTypeAnnotation`,t);if(this.match(133))return this.parseLiteralAtNode(-this.state.value,`BigIntLiteralTypeAnnotation`,t);throw this.raise(Y.UnexpectedSubtractionOperand,{at:this.state.startLoc})}throw this.unexpected();case 132:return this.parseLiteral(this.state.value,`NumberLiteralTypeAnnotation`);case 133:return this.parseLiteral(this.state.value,`BigIntLiteralTypeAnnotation`);case 88:return this.next(),this.finishNode(t,`VoidTypeAnnotation`);case 84:return this.next(),this.finishNode(t,`NullLiteralTypeAnnotation`);case 78:return this.next(),this.finishNode(t,`ThisTypeAnnotation`);case 55:return this.next(),this.finishNode(t,`ExistsTypeAnnotation`);case 87:return this.flowParseTypeofType();default:if(N(this.state.type)){let e=I(this.state.type);return this.next(),super.createIdentifier(t,e)}if(O(this.state.type))return this.isContextual(127)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,t,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,t=this.flowParsePrimaryType(),n=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let r=this.startNodeAt(e),i=this.eat(18);n||=i,this.expect(0),!i&&this.match(3)?(r.elementType=t,this.next(),t=this.finishNode(r,`ArrayTypeAnnotation`)):(r.objectType=t,r.indexType=this.flowParseType(),this.expect(3),n?(r.optional=i,t=this.finishNode(r,`OptionalIndexedAccessType`)):t=this.finishNode(r,`IndexedAccessType`))}return t}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,`NullableTypeAnnotation`)):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,`FunctionTypeAnnotation`)}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return e.types.length===1?t:this.finishNode(e,`IntersectionTypeAnnotation`)}flowParseUnionType(){let e=this.startNode();this.eat(43);let t=this.flowParseIntersectionType();for(e.types=[t];this.eat(43);)e.types.push(this.flowParseIntersectionType());return e.types.length===1?t:this.finishNode(e,`UnionTypeAnnotation`)}flowParseType(){let e=this.state.inType;this.state.inType=!0;let t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(this.state.type===130&&this.state.value===`_`){let e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,`TypeAnnotation`)}flowParseTypeAnnotatableIdentifier(e){let t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),this.state.value===`+`?e.kind=`plus`:e.kind=`minus`,this.next(),this.finishNode(e,`Variance`)):e}parseFunctionBody(e,t,n=!1){return t?this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,n)):super.parseFunctionBody(e,!1,n)}parseFunctionBodyAndFinish(e,t,n=!1){if(this.match(14)){let t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,`TypeAnnotation`):null}return super.parseFunctionBodyAndFinish(e,t,n)}parseStatementLike(e){if(this.state.strict&&this.isContextual(127)){if(k(this.lookahead().type)){let e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.shouldParseEnums()&&this.isContextual(124)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}let t=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(t)&&(this.flowPragma=null),t}parseExpressionStatement(e,t,n){if(t.type===`Identifier`){if(t.name===`declare`){if(this.match(80)||O(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(O(this.state.type)){if(t.name===`interface`)return this.flowParseInterface(e);if(t.name===`type`)return this.flowParseTypeAlias(e);if(t.name===`opaque`)return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,t,n)}shouldParseExportDeclaration(){let{type:e}=this.state;return j(e)||this.shouldParseEnums()&&e===124?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return j(e)||this.shouldParseEnums()&&e===124?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(124)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,n){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let t=this.lookaheadCharCode();if(t===44||t===61||t===58||t===41)return this.setOptionalParametersError(n),e}this.expect(17);let r=this.state.clone(),i=this.state.noArrowAt,a=this.startNodeAt(t),{consequent:o,failed:s}=this.tryParseConditionalConsequent(),[c,l]=this.getArrowLikeExpressions(o);if(s||l.length>0){let e=[...i];if(l.length>0){this.state=r,this.state.noArrowAt=e;for(let t=0;t<l.length;t++)e.push(l[t].start);({consequent:o,failed:s}=this.tryParseConditionalConsequent()),[c,l]=this.getArrowLikeExpressions(o)}s&&c.length>1&&this.raise(Y.AmbiguousConditionalArrow,{at:r.startLoc}),s&&c.length===1&&(this.state=r,e.push(c[0].start),this.state.noArrowAt=e,{consequent:o,failed:s}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(o,!0),this.state.noArrowAt=i,this.expect(14),a.test=e,a.consequent=o,a.alternate=this.forwardNoArrowParamsConversionAt(a,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(a,`ConditionalExpression`)}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){let n=[e],r=[];for(;n.length!==0;){let e=n.pop();e.type===`ArrowFunctionExpression`?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):r.push(e),n.push(e.body)):e.type===`ConditionalExpression`&&(n.push(e.consequent),n.push(e.alternate))}return t?(r.forEach(e=>this.finishArrowValidation(e)),[r,[]]):Bt(r,e=>e.params.every(e=>this.isAssignable(e,!0)))}finishArrowValidation(e){this.toAssignableList(e.params,e.extra?.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let n;return this.state.noArrowParamsConversionAt.indexOf(e.start)===-1?n=t():(this.state.noArrowParamsConversionAt.push(this.state.start),n=t(),this.state.noArrowParamsConversionAt.pop()),n}parseParenItem(e,t){if(e=super.parseParenItem(e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let n=this.startNodeAt(t);return n.expression=e,n.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(n,`TypeCastExpression`)}return e}assertModuleNodeAllowed(e){e.type===`ImportDeclaration`&&(e.importKind===`type`||e.importKind===`typeof`)||e.type===`ExportNamedDeclaration`&&e.exportKind===`type`||e.type===`ExportAllDeclaration`&&e.exportKind===`type`||super.assertModuleNodeAllowed(e)}parseExport(e,t){let n=super.parseExport(e,t);return(n.type===`ExportNamedDeclaration`||n.type===`ExportAllDeclaration`)&&(n.exportKind=n.exportKind||`value`),n}parseExportDeclaration(e){if(this.isContextual(128)){e.exportKind=`type`;let t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}if(this.isContextual(129)){e.exportKind=`type`;let t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}if(this.isContextual(127)){e.exportKind=`type`;let t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.shouldParseEnums()&&this.isContextual(124)){e.exportKind=`value`;let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(128)&&this.lookahead().type===55?(e.exportKind=`type`,this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:t}=this.state,n=super.maybeParseExportNamespaceSpecifier(e);return n&&e.exportKind===`type`&&this.unexpected(t),n}parseClassId(e,t,n){super.parseClassId(e,t,n),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,n){let{startLoc:r}=this.state;if(this.isContextual(123)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,n),t.declare&&(t.type!==`ClassProperty`&&t.type!==`ClassPrivateProperty`&&t.type!==`PropertyDefinition`?this.raise(Y.DeclareClassElement,{at:r}):t.value&&this.raise(Y.DeclareClassFieldInitializer,{at:t.value}))}isIterator(e){return e===`iterator`||e===`asyncIterator`}readIterator(){let e=super.readWord1(),t=`@@`+e;this.isIterator(e)&&this.state.inType||this.raise(_.InvalidIdentifier,{at:this.state.curPosition(),identifierName:t}),this.finishToken(130,t)}getTokenFromCode(e){let t=this.input.charCodeAt(this.state.pos+1);return e===123&&t===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?t===46?this.finishOp(18,2):this.finishOp(17,1):je(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,t){return e.type===`TypeCastExpression`?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){!t&&e.type===`AssignmentExpression`&&e.left.type===`TypeCastExpression`&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,n){for(let t=0;t<e.length;t++){let n=e[t];n?.type===`TypeCastExpression`&&(e[t]=this.typeCastToParameter(n))}super.toAssignableList(e,t,n)}toReferencedList(e,t){for(let r=0;r<e.length;r++){var n;let i=e[r];i&&i.type===`TypeCastExpression`&&!((n=i.extra)!=null&&n.parenthesized)&&(e.length>1||!t)&&this.raise(Y.TypeCastInPattern,{at:i.typeAnnotation})}return e}parseArrayLike(e,t,n,r){let i=super.parseArrayLike(e,t,n,r);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(i.elements),i}isValidLVal(e,t,n){return e===`TypeCastExpression`||super.isValidLVal(e,t,n)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,n,r,i,a){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,n,r,i,a),t.params&&i){let e=t.params;e.length>0&&this.isThisParam(e[0])&&this.raise(Y.ThisParamBannedInConstructor,{at:t})}else if(t.type===`MethodDefinition`&&i&&t.value.params){let e=t.value.params;e.length>0&&this.isThisParam(e[0])&&this.raise(Y.ThisParamBannedInConstructor,{at:t})}}pushClassPrivateMethod(e,t,n,r){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,n,r)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(111)){this.next();let t=e.implements=[];do{let e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),e.typeParameters=this.match(47)?this.flowParseTypeParameterInstantiation():null,t.push(this.finishNode(e,`ClassImplements`))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let t=this.getObjectOrClassMethodParams(e);if(t.length>0){let n=t[0];this.isThisParam(n)&&e.kind===`get`?this.raise(Y.GetterMayNotHaveThisParam,{at:n}):this.isThisParam(n)&&this.raise(Y.SetterMayNotHaveThisParam,{at:n})}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,n,r,i,a,o){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let s;this.match(47)&&!a&&(s=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let c=super.parseObjPropValue(e,t,n,r,i,a,o);return s&&((c.value||c).typeParameters=s),c}parseAssignableListItemTypes(e){return this.eat(17)&&(e.type!==`Identifier`&&this.raise(Y.PatternIsOptional,{at:e}),this.isThisParam(e)&&this.raise(Y.ThisParamMayNotBeOptional,{at:e}),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(Y.ThisParamAnnotationRequired,{at:e}),this.match(29)&&this.isThisParam(e)&&this.raise(Y.ThisParamNoDefault,{at:e}),this.resetEndLocation(e),e}parseMaybeDefault(e,t){let n=super.parseMaybeDefault(e,t);return n.type===`AssignmentPattern`&&n.typeAnnotation&&n.right.start<n.typeAnnotation.start&&this.raise(Y.TypeBeforeInitializer,{at:n.typeAnnotation}),n}shouldParseDefaultImport(e){return Lt(e)?Rt(this.state.type):super.shouldParseDefaultImport(e)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!==`value`&&this.raise(Y.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}parseImportSpecifierLocal(e,t,n){t.local=Lt(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,n))}maybeParseDefaultImportSpecifier(e){e.importKind=`value`;let t=null;if(this.match(87)?t=`typeof`:this.isContextual(128)&&(t=`type`),t){let n=this.lookahead(),{type:r}=n;t===`type`&&r===55&&this.unexpected(null,n.type),(Rt(r)||r===5||r===55)&&(this.next(),e.importKind=t)}return super.maybeParseDefaultImportSpecifier(e)}parseImportSpecifier(e,t,n,r,i){let a=e.imported,o=null;a.type===`Identifier`&&(a.name===`type`?o=`type`:a.name===`typeof`&&(o=`typeof`));let s=!1;if(this.isContextual(93)&&!this.isLookaheadContextual(`as`)){let t=this.parseIdentifier(!0);o!==null&&!k(this.state.type)?(e.imported=t,e.importKind=o,e.local=J(t)):(e.imported=a,e.importKind=null,e.local=this.parseIdentifier())}else{if(o!==null&&k(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=o;else{if(t)throw this.raise(_.ImportBindingIsString,{at:e,importName:a.value});e.imported=a,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(s=!0,e.local=J(e.imported))}let c=Lt(e);return n&&c&&this.raise(Y.ImportTypeShorthandOnlyInPureImport,{at:e}),(n||c)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),s&&!n&&!c&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,`ImportSpecifier`)}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(e,t){let n=e.kind;n!==`get`&&n!==`set`&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){let t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=t}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var n;let r=null,i;if(this.hasPlugin(`jsx`)&&(this.match(140)||this.match(47))){if(r=this.state.clone(),i=this.tryParse(()=>super.parseMaybeAssign(e,t),r),!i.error)return i.node;let{context:n}=this.state,a=n[n.length-1];(a===y.j_oTag||a===y.j_expr)&&n.pop()}if((n=i)!=null&&n.error||this.match(47)){var a,o;r||=this.state.clone();let n,s=this.tryParse(r=>{var i;n=this.flowParseTypeParameterDeclaration();let a=this.forwardNoArrowParamsConversionAt(n,()=>{let r=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(r,n),r});(i=a.extra)!=null&&i.parenthesized&&r();let o=this.maybeUnwrapTypeCastExpression(a);return o.type!==`ArrowFunctionExpression`&&r(),o.typeParameters=n,this.resetStartLocationFromNode(o,n),a},r),c=null;if(s.node&&this.maybeUnwrapTypeCastExpression(s.node).type===`ArrowFunctionExpression`){if(!s.error&&!s.aborted)return s.node.async&&this.raise(Y.UnexpectedTypeParameterBeforeAsyncArrowFunction,{at:n}),s.node;c=s.node}if((a=i)!=null&&a.node)return this.state=i.failState,i.node;if(c)return this.state=s.failState,c;throw(o=i)!=null&&o.thrown?i.error:s.thrown?s.error:this.raise(Y.UnexpectedTokenAfterTypeParameter,{at:n})}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(()=>{let t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let n=this.startNode();return[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),n});if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,`TypeAnnotation`):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){this.state.noArrowParamsConversionAt.indexOf(e.start)===-1?super.setArrowFunctionParameters(e,t):e.params=t}checkParams(e,t,n,r=!0){if(!(n&&this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1)){for(let t=0;t<e.params.length;t++)this.isThisParam(e.params[t])&&t>0&&this.raise(Y.ThisParamMustBeFirst,{at:e.params[t]});return super.checkParams(e,t,n,r)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&this.state.noArrowAt.indexOf(this.state.start)===-1)}parseSubscripts(e,t,n){if(e.type===`Identifier`&&e.name===`async`&&this.state.noArrowAt.indexOf(t.index)!==-1){this.next();let n=this.startNodeAt(t);n.callee=e,n.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(n,`CallExpression`)}else if(e.type===`Identifier`&&e.name===`async`&&this.match(47)){let r=this.state.clone(),i=this.tryParse(e=>this.parseAsyncArrowWithTypeParameters(t)||e(),r);if(!i.error&&!i.aborted)return i.node;let a=this.tryParse(()=>super.parseSubscripts(e,t,n),r);if(a.node&&!a.error)return a.node;if(i.node)return this.state=i.failState,i.node;if(a.node)return this.state=a.failState,a.node;throw i.error||a.error}return super.parseSubscripts(e,t,n)}parseSubscript(e,t,n,r){if(this.match(18)&&this.isLookaheadToken_lt()){if(r.optionalChainMember=!0,n)return r.stop=!0,e;this.next();let i=this.startNodeAt(t);return i.callee=e,i.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),i.arguments=this.parseCallExpressionArguments(11,!1),i.optional=!0,this.finishCallExpression(i,!0)}if(!n&&this.shouldParseTypes()&&this.match(47)){let n=this.startNodeAt(t);n.callee=e;let i=this.tryParse(()=>(n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),n.arguments=super.parseCallExpressionArguments(11,!1),r.optionalChainMember&&(n.optional=!1),this.finishCallExpression(n,r.optionalChainMember)));if(i.node)return i.error&&(this.state=i.failState),i.node}return super.parseSubscript(e,t,n,r)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(47)&&(t=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){let t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){let t=this.input.charCodeAt(this.state.pos+1);e===42&&t===47&&this.state.hasFlowComment?(this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken()):super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);e===124&&t===125?this.finishOp(9,2):super.readToken_pipe_amp(e)}parseTopLevel(e,t){let n=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(Y.UnterminatedFlowComment,{at:this.state.curPosition()}),n}skipBlockComment(){if(this.hasPlugin(`flowComments`)&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Y.NestedFlowComment,{at:this.state.startLoc});this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0)}else return super.skipBlockComment(this.state.hasFlowComment?`*-/`:`*/`)}skipFlowComment(){let{pos:e}=this.state,t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;let n=this.input.charCodeAt(t+e),r=this.input.charCodeAt(t+e+1);return n===58&&r===58?t+2:this.input.slice(t+e,t+e+12)===`flow-include`?t+12:n===58&&r!==58&&t}hasFlowCommentCompletion(){if(this.input.indexOf(`*/`,this.state.pos)===-1)throw this.raise(_.UnterminatedComment,{at:this.state.curPosition()})}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:n}){this.raise(Y.EnumBooleanMemberNotInitialized,{at:e,memberName:n,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?t.explicitType===`symbol`?Y.EnumInvalidMemberInitializerSymbolType:Y.EnumInvalidMemberInitializerPrimaryType:Y.EnumInvalidMemberInitializerUnknownType,Object.assign({at:e},t))}flowEnumErrorNumberMemberNotInitialized(e,{enumName:t,memberName:n}){this.raise(Y.EnumNumberMemberNotInitialized,{at:e,enumName:t,memberName:n})}flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:t}){this.raise(Y.EnumStringMemberInconsistentlyInitailized,{at:e,enumName:t})}flowEnumMemberInit(){let e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 132:{let n=this.parseNumericLiteral(this.state.value);return t()?{type:`number`,loc:n.loc.start,value:n}:{type:`invalid`,loc:e}}case 131:{let n=this.parseStringLiteral(this.state.value);return t()?{type:`string`,loc:n.loc.start,value:n}:{type:`invalid`,loc:e}}case 85:case 86:{let n=this.parseBooleanLiteral(this.match(85));return t()?{type:`boolean`,loc:n.loc.start,value:n}:{type:`invalid`,loc:e}}default:return{type:`invalid`,loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(29)?this.flowEnumMemberInit():{type:`none`,loc:e}}}flowEnumCheckExplicitTypeMismatch(e,t,n){let{explicitType:r}=t;r!==null&&r!==n&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){let n=/* @__PURE__ */ new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},i=!1;for(;!this.match(8);){if(this.eat(21)){i=!0;break}let a=this.startNode(),{id:o,init:s}=this.flowEnumMemberRaw(),c=o.name;if(c===``)continue;/^[a-z]/.test(c)&&this.raise(Y.EnumInvalidMemberName,{at:o,memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),n.has(c)&&this.raise(Y.EnumDuplicateMemberName,{at:o,memberName:c,enumName:e}),n.add(c);let l={enumName:e,explicitType:t,memberName:c};switch(a.id=o,s.type){case`boolean`:this.flowEnumCheckExplicitTypeMismatch(s.loc,l,`boolean`),a.init=s.value,r.booleanMembers.push(this.finishNode(a,`EnumBooleanMember`));break;case`number`:this.flowEnumCheckExplicitTypeMismatch(s.loc,l,`number`),a.init=s.value,r.numberMembers.push(this.finishNode(a,`EnumNumberMember`));break;case`string`:this.flowEnumCheckExplicitTypeMismatch(s.loc,l,`string`),a.init=s.value,r.stringMembers.push(this.finishNode(a,`EnumStringMember`));break;case`invalid`:throw this.flowEnumErrorInvalidMemberInitializer(s.loc,l);case`none`:switch(t){case`boolean`:this.flowEnumErrorBooleanMemberNotInitialized(s.loc,l);break;case`number`:this.flowEnumErrorNumberMemberNotInitialized(s.loc,l);break;default:r.defaultedMembers.push(this.finishNode(a,`EnumDefaultedMember`))}}this.match(8)||this.expect(12)}return{members:r,hasUnknownMembers:i}}flowEnumStringMembers(e,t,{enumName:n}){if(e.length===0)return t;if(t.length===0)return e;if(t.length>e.length){for(let t of e)this.flowEnumErrorStringMemberInconsistentlyInitailized(t,{enumName:n});return t}for(let e of t)this.flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:n});return e}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(101))return null;if(!O(this.state.type))throw this.raise(Y.EnumInvalidExplicitTypeUnknownSupplied,{at:this.state.startLoc,enumName:e});let{value:t}=this.state;return this.next(),t!==`boolean`&&t!==`number`&&t!==`string`&&t!==`symbol`&&this.raise(Y.EnumInvalidExplicitType,{at:this.state.startLoc,enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){let n=t.name,r=t.loc.start,i=this.flowEnumParseExplicitType({enumName:n});this.expect(5);let{members:a,hasUnknownMembers:o}=this.flowEnumMembers({enumName:n,explicitType:i});switch(e.hasUnknownMembers=o,i){case`boolean`:return e.explicitType=!0,e.members=a.booleanMembers,this.expect(8),this.finishNode(e,`EnumBooleanBody`);case`number`:return e.explicitType=!0,e.members=a.numberMembers,this.expect(8),this.finishNode(e,`EnumNumberBody`);case`string`:return e.explicitType=!0,e.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(e,`EnumStringBody`);case`symbol`:return e.members=a.defaultedMembers,this.expect(8),this.finishNode(e,`EnumSymbolBody`);default:{let t=()=>(e.members=[],this.expect(8),this.finishNode(e,`EnumStringBody`));e.explicitType=!1;let i=a.booleanMembers.length,o=a.numberMembers.length,s=a.stringMembers.length,c=a.defaultedMembers.length;if(!i&&!o&&!s&&!c)return t();if(!i&&!o)return e.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(e,`EnumStringBody`);if(!o&&!s&&i>=c){for(let e of a.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.loc.start,{enumName:n,memberName:e.id.name});return e.members=a.booleanMembers,this.expect(8),this.finishNode(e,`EnumBooleanBody`)}if(!i&&!s&&o>=c){for(let e of a.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.loc.start,{enumName:n,memberName:e.id.name});return e.members=a.numberMembers,this.expect(8),this.finishNode(e,`EnumNumberBody`)}return this.raise(Y.EnumInconsistentMemberValues,{at:r,enumName:n}),t()}}}flowParseEnumDeclaration(e){let t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,`EnumDeclaration`)}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let t=this.input.charCodeAt(e+1);return t!==60&&t!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type===`TypeCastExpression`?e.expression:e}});let Ut={__proto__:null,quot:`"`,amp:`&`,apos:`'`,lt:`<`,gt:`>`,nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,fnof:`ƒ`,circ:`ˆ`,tilde:`˜`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,bull:`•`,hellip:`…`,permil:`‰`,prime:`′`,Prime:`″`,lsaquo:`‹`,rsaquo:`›`,oline:`‾`,frasl:`⁄`,euro:`€`,image:`ℑ`,weierp:`℘`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`},Wt=g`jsx`({AttributeIsEmpty:`JSX attributes must only be assigned a non-empty expression.`,MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,MissingClosingTagFragment:`Expected corresponding JSX closing tag for <>.`,UnexpectedSequenceExpression:`Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?`,UnexpectedToken:({unexpected:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,UnsupportedJsxValue:`JSX value should be either an expression or a quoted JSX text.`,UnterminatedJsxContent:`Unterminated JSX contents.`,UnwrappedAdjacentJSXElements:`Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?`});function Gt(e){return e?e.type===`JSXOpeningFragment`||e.type===`JSXClosingFragment`:!1}function Kt(e){if(e.type===`JSXIdentifier`)return e.name;if(e.type===`JSXNamespacedName`)return e.namespace.name+`:`+e.name.name;if(e.type===`JSXMemberExpression`)return Kt(e.object)+`.`+Kt(e.property);throw Error(`Node had unexpected type: `+e.type)}var qt=(e=>class extends e{jsxReadToken(){let e=``,t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Wt.UnterminatedJsxContent,{at:this.state.startLoc});let n=this.input.charCodeAt(this.state.pos);switch(n){case 60:case 123:return this.state.pos===this.state.start?n===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(140)):super.getTokenFromCode(n):(e+=this.input.slice(t,this.state.pos),this.finishToken(139,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:Ze(n)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let t=this.input.charCodeAt(this.state.pos),n;return++this.state.pos,t===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,n=e?`
|
|
10
10
|
`:`\r
|
|
@@ -4,6 +4,6 @@ import { dirname as __mintDirname } from 'node:path';
|
|
|
4
4
|
const require = __mintCreateRequire(import.meta.url);
|
|
5
5
|
const __filename = __mintFileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __mintDirname(__filename);
|
|
7
|
-
import{f as e,g as t,i as n,l as r,n as i,o as a,t as o,u as s,y as c}from"./esm-BtDK7B-d.js";import{n as l,t as u}from"./agent-Da2kI1tZ.js";import{a as d,c as f,i as p,n as m,o as h,r as g,s as _}from"./multi-repo-config-
|
|
7
|
+
import{f as e,g as t,i as n,l as r,n as i,o as a,t as o,u as s,y as c}from"./esm-BtDK7B-d.js";import{n as l,t as u}from"./agent-Da2kI1tZ.js";import{a as d,c as f,i as p,n as m,o as h,r as g,s as _}from"./multi-repo-config-C9dwfzPC.js";import{link as v,mkdir as y,readFile as b,readdir as x,rename as S,rm as C,writeFile as w}from"node:fs/promises";import T from"node:path";import{execFile as E}from"node:child_process";import{randomUUID as D}from"node:crypto";import{promisify as O}from"node:util";function k(e,t){let n=t!==!1;return/^(y|yes)/i.test(e)?n=!0:/^(n|no)/i.test(e)&&(n=!1),n}function A(e){return e?`Yes`:`No`}var j=n((n,i)=>{let{transformer:o=A}=n,[l,u]=e(`idle`),[d,f]=e(``),p=s(n.theme),m=r({status:l,theme:p});a((e,r)=>{if(l===`idle`){if(t(e)){let e=k(d,n.default);f(o(e)),u(`done`),i(e)}else if(c(e)){let e=A(!k(d,n.default));r.clearLine(0),r.write(e),f(e)}else f(r.line)}});let h=d,g=``;return l===`done`?h=p.style.answer(d):g=` ${p.style.defaultAnswer(n.default===!1?`y/N`:`Y/n`)}`,`${m} ${p.style.message(n.message,l)}${g} ${h}`}),M=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const N={text:(e,t)=>i({message:e,default:t}),confirm:(e,t)=>j({message:e,default:t}),folder:(e,t)=>o({message:e+` (type a path to see matching folders)`,source:e=>M(void 0,void 0,void 0,function*(){let n=d(e?.trim()||t,process.cwd()),r=T.dirname(n),i=T.basename(n),a=(yield x(r,{withFileTypes:!0}).catch(()=>[])).filter(e=>e.isDirectory()&&e.name.startsWith(i)).slice(0,30).map(e=>T.join(r,e.name));return(e?.endsWith(`/`)||e?.endsWith(T.sep))&&a.push(...(yield x(n,{withFileTypes:!0}).catch(()=>[])).filter(e=>e.isDirectory()).slice(0,30).map(e=>T.join(n,e.name))),[.../* @__PURE__ */ new Set([n,...a])].map(e=>({name:e,value:e}))}),validate:e=>M(void 0,void 0,void 0,function*(){return(yield p(T.join(e,`docs.json`)))||`Select a folder containing docs.json.`})})};function P(e){return M(this,void 0,void 0,function*(){try{let{stdout:t}=yield O(E)(`git`,[`-C`,e,`config`,`--get`,`remote.origin.url`],{timeout:2e3}),n=t.trim().replace(/\.git$/,``).match(/[:/]([^/:]+\/[^/]+)$/);if(n?.[1])return n[1]}catch{}return`local/${T.basename(e)}`})}function F(e){return Array.isArray(e)?e.flatMap(F):e&&typeof e==`object`?Object.entries(e).flatMap(([e,t])=>e===`sourceRef`&&typeof t==`string`?[t]:F(t)):[]}function I(e,t){return M(this,arguments,void 0,function*(e,t,n=N){let r=(yield p(e))?yield b(e,`utf8`):void 0,i;if(r)try{i=yield _(e)}catch{console.log(`The existing config is invalid. It will remain unchanged unless you confirm a valid replacement.`)}console.log(`Choose the base repo, then secondary repos and their URL mounts. The base supplies theme and global styles.`);let a=i?.sources.find(e=>e.base),o=yield n.folder(`Base repository folder`,a?d(a.directory,T.dirname(e)):t),s=[{repo:yield n.text(`Base repository identifier (owner/repo)`,a?.repo??(yield P(o))),directory:T.relative(T.dirname(e),o)||`.`,mountPath:``,base:!0}],c=(yield h(o)).config,l=[...new Set(F(c))],u=i?.sources.filter(e=>!e.base)??[],m=0;for(;yield n.confirm(m===0?`Add a secondary repository?`:`Add another secondary repository?`,m<u.length||l.some(e=>!s.some(t=>t.repo===e)));){let t=u[m++],r=yield n.folder(`Secondary repository folder`,t?d(t.directory,T.dirname(e)):T.dirname(o)),i=t?.repo??l.find(e=>!s.some(t=>t.repo===e))??(yield P(r)),a=yield n.text(`Repository identifier (match navigation sourceRef when present)`,i),c=(yield n.text(`URL mount path (for example api serves /api)`,t?.mountPath??T.basename(r))).replace(/^\/+|\/+$/g,``);s.push({repo:a,directory:T.relative(T.dirname(e),r)||`.`,mountPath:c})}let g={sources:s};yield f(g,e),console.log(`
|
|
8
8
|
Workspace mapping:`);for(let t of s)console.log(` ${t.repo}${t.base?` (base)`:``}: ${d(t.directory,T.dirname(e))} → /${t.mountPath}`);if(!(yield n.confirm(`Save ${e} and start preview?`,!0)))throw Error(`Setup cancelled. No config was changed.`);if(yield y(T.dirname(e),{recursive:!0}),((yield p(e))?yield b(e,`utf8`):void 0)!==r)throw Error(`The config changed during setup. Nothing was overwritten; run --setup again.`);let x=`${e}.${D()}.tmp`;try{yield w(x,JSON.stringify(g,null,2)+`
|
|
9
9
|
`,{flag:`wx`}),r===void 0?yield v(x,e):yield S(x,e)}finally{yield C(x,{force:!0})}return e})}function L(e,t){return M(this,void 0,void 0,function*(){var n;let r=(yield g(e.cwd,e.workspace))??T.join(e.cwd,m);if((yield p(r))&&!e.setup)return yield f(yield _(r),r),r;let i=t||process.stdin.isTTY&&process.stdout.isTTY&&!u()&&!l();if(e.nonInteractive||!i)throw Error(`${e.setup?`--setup requires an interactive human terminal.`:`No local multi-repo config found at ${r}.`} Create or update ${r}, then run mint dev --multi-repo --workspace "${r}" --non-interactive. Run mint dev --multi-repo --help for the complete example and field explanations.`);let a=yield I(r,e.cwd,t);return(n=e.onSaved)==null||n.call(e,a),a})}export{I as configureWorkspace,L as resolveWorkspace};
|
|
@@ -4,4 +4,4 @@ import { dirname as __mintDirname } from 'node:path';
|
|
|
4
4
|
const require = __mintCreateRequire(import.meta.url);
|
|
5
5
|
const __filename = __mintFileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __mintDirname(__filename);
|
|
7
|
-
import{at as e,ct as t,m as n,p as r}from"./utils-
|
|
7
|
+
import{at as e,ct as t,m as n,p as r}from"./utils-B7dNmFFf.js";`${Math.random().toString(36).slice(2)}${Math.random().toString(36).slice(2)}`;function i(e){if(!t(e)||!Array.isArray(e.body))return;let[r]=e.body;if(n(r)===`ExpressionStatement`&&t(r))return r.expression}const a=e=>[...new Set(e.map(e=>e.trim()))],o=e=>e.every(e=>typeof e==`string`),s=e=>Array.isArray(e)?e:[e];function c(t){if(Array.isArray(t)){if(t.length===0||!e(t)||!o(t))return;let n=a(t);return e(n)?n:void 0}let n=[t];if(!e(n)||o(n))return;let[r]=n.map(({includes:e,excludes:t})=>Object.assign(Object.assign({},e&&{includes:a(e)}),t&&{excludes:a(t)}));return r&&e([r])?r:void 0}function l(e){if(!t(e)||Object.keys(e).length!==1)return;let n=c(e.groups);return n&&{groups:n}}function u(e){return(e.type===`mdxJsxFlowElement`||e.type===`mdxJsxTextElement`)&&e.name===`Visibility`}const d=[`humans`,`agents`,`signed-in`,`signed-out`];function f(e){return d.some(t=>t===e)}function p(e){let t=(e.data?.estree)?.body[0];return t?.type===`ExpressionStatement`?t.expression:void 0}function m(e){switch(e?.type){case`Literal`:return typeof e.value==`string`?e.value:void 0;case`TemplateLiteral`:{let t=e.quasis[0]?.value.cooked??void 0;for(let[n,r]of e.expressions.entries()){let i=m(r),a=e.quasis[n+1]?.value.cooked;if(t===void 0||i===void 0||a==null)return;t+=i+a}return t}case`BinaryExpression`:{if(e.operator!==`+`)return;let t=m(e.left),n=m(e.right);return t===void 0||n===void 0?void 0:t+n}default:return}}function h(e){if(!(e.type!==`Property`||e.computed))return e.key.type===`Identifier`?e.key.name:e.key.type===`Literal`&&typeof e.key.value==`string`?e.key.value:void 0}function g(e){let t=e.elements.map(e=>m(e));return t.every(e=>e!==void 0)?t:void 0}function _(e){let t={};for(let n of e.properties){let e=h(n);if(n.type!==`Property`||e!==`includes`&&e!==`excludes`)return;let r=n.value.type===`ArrayExpression`?g(n.value):void 0;if(!r)return;t[e]=r}return t}function v(e){let t=p(e);if(t?.type!==`ObjectExpression`||t.properties.length!==1)return;let[n]=t.properties;if(n?.type===`Property`&&h(n)===`groups`)return n.value.type===`ObjectExpression`?c(_(n.value)):n.value.type===`ArrayExpression`?c(g(n.value)):void 0}function y(e){if(e.type!==`mdxJsxExpressionAttribute`)return!1;let t=p(e),n=t?.type===`ObjectExpression`&&t.properties.length===1?t.properties[0]:void 0;return n?.type!==`SpreadElement`||n.argument.type!==`ObjectExpression`||n.argument.properties.some(e=>{if(e.type!==`Property`||e.computed)return!0;let t=e.key.type===`Identifier`?e.key.name:void 0,n=e.key.type===`Literal`?e.key.value:void 0;return(t??n)===`for`})}function b(e,t=/* @__PURE__ */ new Map,n){let a,o=!1,s=e.attributes.findLastIndex(e=>e.type===`mdxJsxAttribute`&&e.name===`for`);if(e.attributes.slice(s+1).some(y))return{kind:`dynamic`};for(let c of s===-1?[]:e.attributes.slice(s,s+1))if(c.type===`mdxJsxAttribute`&&c.name===`for`){if(typeof c.value==`string`){if(f(c.value))return{kind:`audience`,audience:c.value};a??=c.value}else if(c.value&&typeof c.value==`object`){if(`value`in c.value&&typeof c.value.value==`string`){let e=c.value.value.trim(),t=m(p(c.value));if(t!==void 0){if(f(t))return{kind:`audience`,audience:t};a??=t;continue}let n=e.match(/^(["'`])((?:\\.|(?!\1)[^\\])*)\1$/);if(n){let e=n[2]??``;if(!(n[1]==="`"&&e.includes("${"))){if(f(e))return{kind:`audience`,audience:e};a??=e;continue}}let r=v(c.value);if(r)return{kind:`groups`,groups:r};if(p(c.value)?.type===`ObjectExpression`||e.startsWith(`{`)){a??=e;continue}}let e=i(`data`in c.value?c.value.data?.estree:void 0),s=r(e,{scope:t});if(s.ok){let t=s.value;if(f(t)){let i={kind:`audience`,audience:t};if(n===void 0||S(i))return i;let a=r(e,{scope:n});if(a.ok&&a.value===t)return i;o=!0;continue}let i=l(t);if(i)return{kind:`groups`,groups:i.groups};if(typeof t==`string`){a??=t;continue}}o=!0}}return a===void 0?o?{kind:`dynamic`}:{kind:`missing`}:{kind:`invalid`,raw:a}}function x(e){switch(e.kind){case`audience`:return e.audience===`agents`;case`groups`:return!1;case`invalid`:case`missing`:return!0;case`dynamic`:return!1}}function S(e){switch(e.kind){case`audience`:return e.audience===`humans`||e.audience===`signed-in`;case`groups`:case`invalid`:case`dynamic`:case`missing`:return!0}}function C(e){if(e.kind===`groups`)return{groups:e.groups};if(e.kind===`audience`&&(e.audience===`signed-in`||e.audience===`signed-out`))return e.audience}const w=(e,t)=>({type:`mdxJsxAttribute`,name:e,value:t});function T(e,t){let n=e.data,r=n&&`mintlifyTitleMarkdown`in n?n.mintlifyTitleMarkdown:void 0;return r&&typeof r==`object`&&`text`in r&&typeof r.text==`string`?r.text:t}const E=[],D=(e,t=1,n=E)=>{if(`name`in e&&e.name===`Update`)return e.attributes.find(e=>`name`in e&&e.name===`label`&&typeof e.value==`string`)?.value??``;if(u(e)){let t=b(e);if(!(t.kind===`dynamic`||t.kind===`audience`&&t.audience===`humans`))return``}let r=n[t-1],i=e.type===`text`,a=e.type===`inlineCode`,o=r?.type!==`mdxJsxFlowElement`,s=r&&`value`in r&&typeof r.value==`string`&&!r.value.startsWith(`<small`);if(a||i&&(o||s))return e.value;if(`children`in e&&Array.isArray(e.children)){let t=``;return e.children.forEach((e,n,r)=>{t+=D(e,n,r)}),t}return``};export{u as a,s as c,x as i,D as n,b as o,T as r,C as s,w as t};
|
package/dist/start.js
CHANGED
|
@@ -5,4 +5,4 @@ import { dirname as __mintDirname } from 'node:path';
|
|
|
5
5
|
const require = __mintCreateRequire(import.meta.url);
|
|
6
6
|
const __filename = __mintFileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __mintDirname(__filename);
|
|
8
|
-
import{r as e}from"./client-DXQ6Tgw0.js";var t=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function n(e,n=e=>process.exit(e)){let r;return i=>(r??=t(this,void 0,void 0,function*(){try{yield e()}catch(e){return console.error(`Preview cleanup failed:`,e),n(1)}return n(i)}),r)}var r=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const i=process.env.MINTLIFY_PACKAGE_NAME??`mint`;let a;function o(){return r(this,void 0,void 0,function*(){let e=a;a=void 0,yield e?.()})}function s(){return r(this,void 0,void 0,function*(){let e=process.argv.slice(2);if(e.some(e=>[`--multi-repo`,`--workspace`,`--setup`,`--non-interactive`].includes(e.split(`=`)[0]??``))){let{isMultiRepoDev:t,runMultiRepoDev:n}=yield import(`./multi-repo-command-
|
|
8
|
+
import{r as e}from"./client-DXQ6Tgw0.js";var t=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function n(e,n=e=>process.exit(e)){let r;return i=>(r??=t(this,void 0,void 0,function*(){try{yield e()}catch(e){return console.error(`Preview cleanup failed:`,e),n(1)}return n(i)}),r)}var r=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const i=process.env.MINTLIFY_PACKAGE_NAME??`mint`;let a;function o(){return r(this,void 0,void 0,function*(){let e=a;a=void 0,yield e?.()})}function s(){return r(this,void 0,void 0,function*(){let e=process.argv.slice(2);if(e.some(e=>[`--multi-repo`,`--workspace`,`--setup`,`--non-interactive`].includes(e.split(`=`)[0]??``))){let{isMultiRepoDev:t,runMultiRepoDev:n}=yield import(`./multi-repo-command-CtjEOn-c.js`);if(t(e)){yield n(e,i,e=>{a=e},()=>c(0));return}}let{cli:t}=yield import(`./cli-BLKVRDx9.js`);yield t({packageName:i})})}s().catch(e=>r(void 0,void 0,void 0,function*(){console.error(e instanceof Error?e.message:e),yield c(1)}));const c=n(()=>r(void 0,void 0,void 0,function*(){try{yield o()}finally{yield e()}}));process.once(`beforeExit`,()=>r(void 0,void 0,void 0,function*(){try{yield o(),yield e()}catch{}})),process.on(`SIGINT`,()=>{c(130)}),process.on(`SIGTERM`,()=>{c(143)});export{};
|